img_format: remove some guards against old ffmpeg API

These are always present in ffmpeg-mpv, and never in Libav.
This commit is contained in:
wm4 2017-11-06 17:14:01 +01:00
parent 4ef0887f7b
commit 921073bf86
1 changed files with 2 additions and 5 deletions

View File

@ -345,7 +345,7 @@ enum mp_component_type mp_imgfmt_get_component_type(int imgfmt)
if (!pixdesc)
return MP_COMPONENT_TYPE_UNKNOWN;
#ifdef AV_PIX_FMT_FLAG_FLOAT
#if LIBAVUTIL_VERSION_MICRO >= 100
if (pixdesc->flags & AV_PIX_FMT_FLAG_FLOAT)
return MP_COMPONENT_TYPE_FLOAT;
#endif
@ -441,12 +441,9 @@ bool mp_get_regular_imgfmt(struct mp_regular_imgfmt *dst, int imgfmt)
res.chroma_w = 1 << pixdesc->log2_chroma_w;
res.chroma_h = 1 << pixdesc->log2_chroma_h;
#ifdef AV_PIX_FMT_FLAG_BAYER
#if LIBAVUTIL_VERSION_MICRO >= 100
if (pixdesc->flags & AV_PIX_FMT_FLAG_BAYER)
return false; // it's satan himself
#else
if (strncmp(pixdesc->name, "bayer_", 6) == 0)
return false; // it's satan himself
#endif
if (!validate_regular_imgfmt(&res))