diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-15 01:21:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-15 01:23:16 +0200 |
commit | 39afcf1d7eba8f2f3d59c973aa57df714e679629 (patch) | |
tree | b56a004e08c68a38cc15becdec66bf528bd26478 /libavcodec/avcodec.h | |
parent | 2c501ae82b847d89c93e8aa1f4506fb564c344a7 (diff) | |
parent | 2d497c141d1fb6df290cdf45404b01ea1697d618 (diff) | |
download | ffmpeg-39afcf1d7eba8f2f3d59c973aa57df714e679629.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
eval: add gt(), gte(), lt() and lte() fate tests
eval: fix swapping of lt() and lte()
imgconvert: deprecate avcodec_find_best_pix_fmt()
imgconvert: add avcodec_find_best_pix_fmt2()
imgconvert: avoid undefined left shift in avcodec_find_best_pix_fmt
Conflicts:
libavcodec/imgconvert.c
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 22cb17e772..3c180407a4 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4413,7 +4413,10 @@ unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt); int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt, int has_alpha); +#if FF_API_FIND_BEST_PIX_FMT /** + * @deprecated use avcodec_find_best_pix_fmt2() instead. + * * Find the best pixel format to convert to given a certain source pixel * format. When converting from one pixel format to another, information loss * may occur. For example, when converting from RGB24 to GRAY, the color @@ -4437,8 +4440,31 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_ * @param[out] loss_ptr Combination of flags informing you what kind of losses will occur. * @return The best pixel format to convert to or -1 if none was found. */ +attribute_deprecated enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); +#endif /* FF_API_FIND_BEST_PIX_FMT */ + +/** + * Find the best pixel format to convert to given a certain source pixel + * format. When converting from one pixel format to another, information loss + * may occur. For example, when converting from RGB24 to GRAY, the color + * information will be lost. Similarly, other losses occur when converting from + * some formats to other formats. avcodec_find_best_pix_fmt2() searches which of + * the given pixel formats should be used to suffer the least amount of loss. + * The pixel formats from which it chooses one, are determined by the + * pix_fmt_list parameter. + * + * + * @param[in] pix_fmt_list PIX_FMT_NONE terminated array of pixel formats to choose from + * @param[in] src_pix_fmt source pixel format + * @param[in] has_alpha Whether the source pixel format alpha channel is used. + * @param[out] loss_ptr Combination of flags informing you what kind of losses will occur. + * @return The best pixel format to convert to or -1 if none was found. + */ +enum PixelFormat avcodec_find_best_pix_fmt_of_list(enum PixelFormat *pix_fmt_list, + enum PixelFormat src_pix_fmt, + int has_alpha, int *loss_ptr); /** * Find the best pixel format to convert to given a certain source pixel |