Deprecated in 617e866e25 and
2a54ae9df8.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
avcodec_find_best_pix_fmt2 has been deprecated and replaced by
avcodec_find_best_pix_fmt_of_2 in 2a54ae9df8.
avcodec_find_best_pix_fmt_of_2 and avcodec_get_pix_fmt_loss meanwhile
were deprecated in 617e866e25 when these
functions were de facto moved to libavutil; this has been mentioned in
APIchanges in f7a1c5e4d2. Yet the
attribute_deprecated was never set for the latter two functions and they
were not wrapped in an FF_API define. This commit does this.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
example:
AVPixelFormat pixFmts[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA };
int loss = 0;
AVPixelFormat best = avcodec_find_best_pix_fmt_of_list(pixFmts, AV_PIX_FMT_BGRA, 1, &loss);
best is AV_PIX_FMT_RGB24. But AV_PIX_FMT_RGBA is better.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This structure served as a bridge between data pointers and frames,
but it suffers from several limitations:
- it is not refcounted and data must be copied to every time
- it cannot be expanded without ABI break due to being used on the stack
- its functions are just wrappers to imgutils which add a layer of
unneeded indirection, and maintenance burden
- it allows hacks like embedding uncompressed data in packets
- its use is often confusing to our users
AVFrame provides a much better API, and, if a full blown frame is not
needed, it is just as simple and more straightfoward to use data and
linesize arrays directly.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This causes us to favor RGB8 over PAL8 when FF_LOSS_COLORQUANT is used
It probably makes sense to reinvestigate the exact scoring of pal8 when
our pal8 support improves to be supperior to rgb8
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec_find_best_pix_fmt2 does not modify its first argument so may be
marked const. This avoids a warning when passing in AVCodec.pix_fmts.
Signed-off-by: Dylan Simon <dylan@dylex.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
"Fork" is an ambiguous term, since there may be more than one fork, also
"fork" could be confused with the corresponding function. Also it seems
important to point the name of the referenced fork in the symbol.
Note: the old --enable-incompatible-fork-abi command is retained for
compatibility, although it should be considered deprecated.
get_pix_fmt_score() returns a score representing the amount
of loss when converting a pixel format
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>