[3/5] libvpx: Require at least version 1.4.0

Message ID 1472056128-7656-4-git-send-email-diego@biurrun.de
State New
Headers show

Commit Message

Diego Biurrun Aug. 24, 2016, 4:28 p.m.
This allows dropping some compatibility ifdefs, which will simplify
sharing code with the libaom wrapper.
---
 configure              | 2 +-
 libavcodec/libvpx.c    | 4 ----
 libavcodec/libvpxenc.c | 2 --
 3 files changed, 1 insertion(+), 7 deletions(-)

Patch

diff --git a/configure b/configure
index cca6faf..033bc19 100755
--- a/configure
+++ b/configure
@@ -4632,7 +4632,7 @@  enabled libtwolame        && require libtwolame twolame.h twolame_init -ltwolame
 enabled libvo_aacenc      && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc
 enabled libvo_amrwbenc    && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
 enabled libvorbis         && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
-enabled libvpx            && require_pkg_config "vpx >= 1.3.0" vpx/vpx_codec.h vpx_codec_version && {
+enabled libvpx            && require_pkg_config "vpx >= 1.4.0" vpx/vpx_codec.h vpx_codec_version && {
     enabled libvpx_vp8_decoder && {
         check_pkg_config vpx "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx ||
             disable libvpx_vp8_decoder;
diff --git a/libavcodec/libvpx.c b/libavcodec/libvpx.c
index 49f966d..cb07177 100644
--- a/libavcodec/libvpx.c
+++ b/libavcodec/libvpx.c
@@ -40,12 +40,10 @@  enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt_t img)
     case VPX_IMG_FMT_I422:      return AV_PIX_FMT_YUV422P;
     case VPX_IMG_FMT_I444:      return AV_PIX_FMT_YUV444P;
     case VPX_IMG_FMT_444A:      return AV_PIX_FMT_YUVA444P;
-#if VPX_IMAGE_ABI_VERSION >= 3
     case VPX_IMG_FMT_I440:      return AV_PIX_FMT_YUV440P;
     case VPX_IMG_FMT_I42016:    return AV_PIX_FMT_YUV420P16BE;
     case VPX_IMG_FMT_I42216:    return AV_PIX_FMT_YUV422P16BE;
     case VPX_IMG_FMT_I44416:    return AV_PIX_FMT_YUV444P16BE;
-#endif
     default:                    return AV_PIX_FMT_NONE;
     }
 }
@@ -68,12 +66,10 @@  vpx_img_fmt_t ff_vpx_pixfmt_to_imgfmt(enum AVPixelFormat pix)
     case AV_PIX_FMT_YUV422P:      return VPX_IMG_FMT_I422;
     case AV_PIX_FMT_YUV444P:      return VPX_IMG_FMT_I444;
     case AV_PIX_FMT_YUVA444P:     return VPX_IMG_FMT_444A;
-#if VPX_IMAGE_ABI_VERSION >= 3
     case AV_PIX_FMT_YUV440P:      return VPX_IMG_FMT_I440;
     case AV_PIX_FMT_YUV420P16BE:  return VPX_IMG_FMT_I42016;
     case AV_PIX_FMT_YUV422P16BE:  return VPX_IMG_FMT_I42216;
     case AV_PIX_FMT_YUV444P16BE:  return VPX_IMG_FMT_I44416;
-#endif
     default:                      return VPX_IMG_FMT_NONE;
     }
 }
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index bb4c98f..c6c9105 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -694,11 +694,9 @@  AVCodec ff_libvpx_vp9_encoder = {
     .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
     .pix_fmts       = (const enum AVPixelFormat[]) {
         AV_PIX_FMT_YUV420P,
-#if VPX_IMAGE_ABI_VERSION >= 3
         AV_PIX_FMT_YUV422P,
         AV_PIX_FMT_YUV444P,
         AV_PIX_FMT_YUV440P,
-#endif
         AV_PIX_FMT_NONE,
     },
     .profiles       = NULL_IF_CONFIG_SMALL(profiles),