summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-26 07:38:33 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-26 18:29:45 +0100
commit169259d9a381a3c2132672da5c5f250fa194fb4d (patch)
tree72a469532d9498280fc8a54defff35f7ac01b478 /libavcodec/avcodec.h
parent5ad0eb936c5de04d731c5e2033bc5639be8057a7 (diff)
downloadffmpeg-169259d9a381a3c2132672da5c5f250fa194fb4d.tar.gz
avcodec: Add missing FF_API define for libavcodec pix fmt API
avcodec_find_best_pix_fmt2 has been deprecated and replaced by avcodec_find_best_pix_fmt_of_2 in 2a54ae9df8cbc1717b3929222ac75f384e2ff240. avcodec_find_best_pix_fmt_of_2 and avcodec_get_pix_fmt_loss meanwhile were deprecated in 617e866e25b72fa5d9f9d6bbcbd7e4bd69e63a54 when these functions were de facto moved to libavutil; this has been mentioned in APIchanges in f7a1c5e4d2294a8970ede7f6deb2fe0a64e202a5. 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>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 3d77d2f6fd..3178c163b9 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3787,12 +3787,6 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int
unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt);
/**
- * @deprecated see av_get_pix_fmt_loss()
- */
-int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
- int has_alpha);
-
-/**
* 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
@@ -3813,15 +3807,24 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *p
enum AVPixelFormat src_pix_fmt,
int has_alpha, int *loss_ptr);
+#if FF_API_AVCODEC_PIX_FMT
+/**
+ * @deprecated see av_get_pix_fmt_loss()
+ */
+attribute_deprecated
+int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
+ int has_alpha);
/**
* @deprecated see av_find_best_pix_fmt_of_2()
*/
+attribute_deprecated
enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
attribute_deprecated
enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
+#endif
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);