Re: [FFmpeg-devel] [PATCH 2/3] libvpx: remove pre-1.4.0 checks for vp9
On Fri, Jul 15, 2016 at 7:30 PM, James Almerwrote: > On 7/15/2016 10:15 PM, James Zern wrote: >> Signed-off-by: James Zern >> --- >> libavcodec/libvpx.c | 12 +--- >> 1 file changed, 1 insertion(+), 11 deletions(-) >> >> diff --git a/libavcodec/libvpx.c b/libavcodec/libvpx.c >> index 1eca97a..36f915a 100644 >> --- a/libavcodec/libvpx.c >> +++ b/libavcodec/libvpx.c >> @@ -40,9 +40,7 @@ static const enum AVPixelFormat vp9_pix_fmts_highcol[] = { >> AV_PIX_FMT_YUV422P, >> AV_PIX_FMT_YUV440P, >> AV_PIX_FMT_YUV444P, >> -#if VPX_IMAGE_ABI_VERSION >= 3 >> AV_PIX_FMT_GBRP, >> -#endif >> AV_PIX_FMT_NONE >> }; >> >> @@ -60,30 +58,22 @@ static const enum AVPixelFormat vp9_pix_fmts_highbd[] = { >> AV_PIX_FMT_YUV422P12, >> AV_PIX_FMT_YUV440P12, >> AV_PIX_FMT_YUV444P12, >> -#if VPX_IMAGE_ABI_VERSION >= 3 >> AV_PIX_FMT_GBRP, >> AV_PIX_FMT_GBRP10, >> AV_PIX_FMT_GBRP12, >> -#endif >> AV_PIX_FMT_NONE >> }; >> #endif >> >> av_cold void ff_vp9_init_static(AVCodec *codec) >> { >> -if (vpx_codec_version_major() < 1 >> -|| (vpx_codec_version_major() == 1 && vpx_codec_version_minor() < >> 3)) >> -codec->capabilities |= AV_CODEC_CAP_EXPERIMENTAL; >> codec->pix_fmts = vp9_pix_fmts_def; > > Remove this one. Unless i'm missing something, now that 1.4.0 is the > minimum version, one of the latter two are guaranteed to be used > instead. > >> #if CONFIG_LIBVPX_VP9_ENCODER > > You can remove all the CONFIG_LIBVPX_VP9_ENCODER checks in this file. > Makefile only compiles it if vp9 is enabled anyway. > It's enabled with the decoder and the encoder. So it becomes a question of what style of libvpx should be supported. I imagine cases of vp9 decode-only would only affect a few developers. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/3] libvpx: remove pre-1.4.0 checks for vp9
On 7/15/2016 10:15 PM, James Zern wrote: > Signed-off-by: James Zern> --- > libavcodec/libvpx.c | 12 +--- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/libavcodec/libvpx.c b/libavcodec/libvpx.c > index 1eca97a..36f915a 100644 > --- a/libavcodec/libvpx.c > +++ b/libavcodec/libvpx.c > @@ -40,9 +40,7 @@ static const enum AVPixelFormat vp9_pix_fmts_highcol[] = { > AV_PIX_FMT_YUV422P, > AV_PIX_FMT_YUV440P, > AV_PIX_FMT_YUV444P, > -#if VPX_IMAGE_ABI_VERSION >= 3 > AV_PIX_FMT_GBRP, > -#endif > AV_PIX_FMT_NONE > }; > > @@ -60,30 +58,22 @@ static const enum AVPixelFormat vp9_pix_fmts_highbd[] = { > AV_PIX_FMT_YUV422P12, > AV_PIX_FMT_YUV440P12, > AV_PIX_FMT_YUV444P12, > -#if VPX_IMAGE_ABI_VERSION >= 3 > AV_PIX_FMT_GBRP, > AV_PIX_FMT_GBRP10, > AV_PIX_FMT_GBRP12, > -#endif > AV_PIX_FMT_NONE > }; > #endif > > av_cold void ff_vp9_init_static(AVCodec *codec) > { > -if (vpx_codec_version_major() < 1 > -|| (vpx_codec_version_major() == 1 && vpx_codec_version_minor() < 3)) > -codec->capabilities |= AV_CODEC_CAP_EXPERIMENTAL; > codec->pix_fmts = vp9_pix_fmts_def; Remove this one. Unless i'm missing something, now that 1.4.0 is the minimum version, one of the latter two are guaranteed to be used instead. > #if CONFIG_LIBVPX_VP9_ENCODER You can remove all the CONFIG_LIBVPX_VP9_ENCODER checks in this file. Makefile only compiles it if vp9 is enabled anyway. > -if (vpx_codec_version_major() > 1 > -|| (vpx_codec_version_major() == 1 && vpx_codec_version_minor() >= > 4)) { > -#ifdef VPX_CODEC_CAP_HIGHBITDEPTH > +{ > vpx_codec_caps_t codec_caps = vpx_codec_get_caps(vpx_codec_vp9_cx()); > if (codec_caps & VPX_CODEC_CAP_HIGHBITDEPTH) > codec->pix_fmts = vp9_pix_fmts_highbd; > else > -#endif > codec->pix_fmts = vp9_pix_fmts_highcol; > } > #endif > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/3] libvpx: remove pre-1.4.0 checks for vp9
Signed-off-by: James Zern--- libavcodec/libvpx.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/libavcodec/libvpx.c b/libavcodec/libvpx.c index 1eca97a..36f915a 100644 --- a/libavcodec/libvpx.c +++ b/libavcodec/libvpx.c @@ -40,9 +40,7 @@ static const enum AVPixelFormat vp9_pix_fmts_highcol[] = { AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P, -#if VPX_IMAGE_ABI_VERSION >= 3 AV_PIX_FMT_GBRP, -#endif AV_PIX_FMT_NONE }; @@ -60,30 +58,22 @@ static const enum AVPixelFormat vp9_pix_fmts_highbd[] = { AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV440P12, AV_PIX_FMT_YUV444P12, -#if VPX_IMAGE_ABI_VERSION >= 3 AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, -#endif AV_PIX_FMT_NONE }; #endif av_cold void ff_vp9_init_static(AVCodec *codec) { -if (vpx_codec_version_major() < 1 -|| (vpx_codec_version_major() == 1 && vpx_codec_version_minor() < 3)) -codec->capabilities |= AV_CODEC_CAP_EXPERIMENTAL; codec->pix_fmts = vp9_pix_fmts_def; #if CONFIG_LIBVPX_VP9_ENCODER -if (vpx_codec_version_major() > 1 -|| (vpx_codec_version_major() == 1 && vpx_codec_version_minor() >= 4)) { -#ifdef VPX_CODEC_CAP_HIGHBITDEPTH +{ vpx_codec_caps_t codec_caps = vpx_codec_get_caps(vpx_codec_vp9_cx()); if (codec_caps & VPX_CODEC_CAP_HIGHBITDEPTH) codec->pix_fmts = vp9_pix_fmts_highbd; else -#endif codec->pix_fmts = vp9_pix_fmts_highcol; } #endif -- 2.8.0.rc3.226.g39d4020 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel