[vlc-commits] avcodec: use some chroma based on some related defines
Steve Lhomme
git at videolan.org
Fri Aug 3 11:00:26 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Aug 3 10:54:36 2018 +0200| [a243a830f26fe4e522c2a5126de4a0ea0881aec7] | committer: Steve Lhomme
avcodec: use some chroma based on some related defines
So we don't have to depend on the library version
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a243a830f26fe4e522c2a5126de4a0ea0881aec7
---
modules/codec/avcodec/chroma.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c
index e29d7bbf72..cd8d714bf2 100644
--- a/modules/codec/avcodec/chroma.c
+++ b/modules/codec/avcodec/chroma.c
@@ -86,7 +86,7 @@ static const struct
{VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 },
{VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 },
{VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 },
-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) )
+#ifdef AV_PIX_FMT_YUV420P12 /* 54, 17, 100 */
{VLC_CODEC_I420_12L, AV_PIX_FMT_YUV420P12LE, 0, 0, 0 },
{VLC_CODEC_I420_12B, AV_PIX_FMT_YUV420P12BE, 0, 0, 0 },
#endif
@@ -102,7 +102,7 @@ static const struct
{VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 },
{VLC_CODEC_I422_16L, AV_PIX_FMT_YUV422P16LE, 0, 0, 0 },
{VLC_CODEC_I422_16B, AV_PIX_FMT_YUV422P16BE, 0, 0, 0 },
-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) )
+#ifdef AV_PIX_FMT_YUV422P12 /* 54, 17, 100 */
{VLC_CODEC_I422_12L, AV_PIX_FMT_YUV422P12LE, 0, 0, 0 },
{VLC_CODEC_I422_12B, AV_PIX_FMT_YUV422P12BE, 0, 0, 0 },
#endif
@@ -118,7 +118,7 @@ static const struct
{VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 },
{VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 },
{VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 },
-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 54, 17, 100 ) )
+#ifdef AV_PIX_FMT_YUV444P12 /* 54, 17, 100 */
{VLC_CODEC_I444_12L, AV_PIX_FMT_YUV444P12LE, 0, 0, 0 },
{VLC_CODEC_I444_12B, AV_PIX_FMT_YUV444P12BE, 0, 0, 0 },
#endif
@@ -170,23 +170,21 @@ static const struct
{VLC_CODEC_GBR_PLANAR_9B, AV_PIX_FMT_GBRP9BE, 0, 0, 0 },
{VLC_CODEC_GBR_PLANAR_10L, AV_PIX_FMT_GBRP10LE, 0, 0, 0 },
{VLC_CODEC_GBR_PLANAR_10B, AV_PIX_FMT_GBRP10BE, 0, 0, 0 },
-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 51, 74, 100 ) ) || \
- (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 24, 0 ) )
+#ifdef AV_PIX_FMT_GBRP12 /* 55, 24, 0 / 51, 74, 100 */
{VLC_CODEC_GBR_PLANAR_12L, AV_PIX_FMT_GBRP12LE, 0, 0, 0 },
{VLC_CODEC_GBR_PLANAR_12B, AV_PIX_FMT_GBRP12BE, 0, 0, 0 },
#endif
-#if (LIBAVUTIL_VERSION_MICRO >= 100)
+#ifdef AV_PIX_FMT_GBRP14 /* ffmpeg only */
{VLC_CODEC_GBR_PLANAR_14L, AV_PIX_FMT_GBRP14LE, 0, 0, 0 },
{VLC_CODEC_GBR_PLANAR_14B, AV_PIX_FMT_GBRP14BE, 0, 0, 0 },
#endif
{VLC_CODEC_GBR_PLANAR_16L, AV_PIX_FMT_GBRP16LE, 0, 0, 0 },
{VLC_CODEC_GBR_PLANAR_16B, AV_PIX_FMT_GBRP16BE, 0, 0, 0 },
-#if (LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 55, 25, 100 ) ) || \
- (LIBAVUTIL_VERSION_MICRO < 100 && LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 56, 1, 0 ) )
+#ifdef AV_PIX_FMT_GBRAP10 /* 56, 1, 0 / 55, 25, 100 */
{VLC_CODEC_GBRA_PLANAR_10L, AV_PIX_FMT_GBRAP10LE, 0, 0, 0 },
{VLC_CODEC_GBRA_PLANAR_10B, AV_PIX_FMT_GBRAP10BE, 0, 0, 0 },
#endif
-#if LIBAVUTIL_VERSION_CHECK(55, 25, 0, 19, 100)
+#ifdef AV_PIX_FMT_GBRAP12 /* 55, 25, 0, 19, 100 */
{VLC_CODEC_GBRA_PLANAR_12L, AV_PIX_FMT_GBRAP12LE, 0, 0, 0 },
{VLC_CODEC_GBRA_PLANAR_12B, AV_PIX_FMT_GBRAP12BE, 0, 0, 0 },
#endif
More information about the vlc-commits
mailing list