]> git.sesse.net Git - ffmpeg/commitdiff
avcodec: make the avcodec_get_chroma_sub_sample deprecation effective
authorJames Almer <jamrial@gmail.com>
Fri, 25 Aug 2017 15:09:26 +0000 (12:09 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 25 Aug 2017 15:19:41 +0000 (12:19 -0300)
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/avcodec.h
libavcodec/version.h

index c59499376693c18b7236cc37e594e2f133906620..655555092ae885ed82e13a60eac8582d7da8cefa 100644 (file)
@@ -5665,22 +5665,14 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
  * @{
  */
 
+#if FF_API_GETCHROMA
 /**
- * Utility function to access log2_chroma_w log2_chroma_h from
- * the pixel format AVPixFmtDescriptor.
- *
- * This function asserts that pix_fmt is valid. See av_pix_fmt_get_chroma_sub_sample
- * for one that returns a failure code and continues in case of invalid
- * pix_fmts.
- *
- * @param[in]  pix_fmt the pixel format
- * @param[out] h_shift store log2_chroma_w
- * @param[out] v_shift store log2_chroma_h
- *
- * @see av_pix_fmt_get_chroma_sub_sample
+ * @deprecated Use av_pix_fmt_get_chroma_sub_sample
  */
 
+attribute_deprecated
 void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
+#endif
 
 /**
  * Return a value representing the fourCC code associated to the
index 74730005793e011bbce3da67797c1e249bd58e61..48e57bd86b4fccfd05f13564db3641e4ada99d0c 100644 (file)
@@ -60,9 +60,6 @@
 #ifndef FF_API_AVCODEC_RESAMPLE
 #define FF_API_AVCODEC_RESAMPLE  FF_API_AUDIO_CONVERT
 #endif
-#ifndef FF_API_GETCHROMA
-#define FF_API_GETCHROMA         (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
 #ifndef FF_API_MISSING_SAMPLE
 #define FF_API_MISSING_SAMPLE    (LIBAVCODEC_VERSION_MAJOR < 58)
 #endif
 #ifndef FF_API_TAG_STRING
 #define FF_API_TAG_STRING        (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif
+#ifndef FF_API_GETCHROMA
+#define FF_API_GETCHROMA         (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
 
 
 #endif /* AVCODEC_VERSION_H */