[FFmpeg-devel] Patch for High color and High bit-depth support
James Zern
jzern at google.com
Thu Apr 9 05:45:54 CEST 2015
On Tue, Apr 7, 2015 at 5:16 PM, Debargha Mukherjee <debargha at google.com> wrote:
> Protected use of VPX_CODEC_CAP_HIGHBITDEPTH within
> #ifdef VPX_CODEC_CAP_HIGHBITDEPTH
>
> --- a/libavcodec/libvpx.c
> +++ b/libavcodec/libvpx.c
> @@ -19,12 +19,50 @@
> */
>
> #include <vpx/vpx_codec.h>
> +#include <vpx/vpx_encoder.h>
Technically one could build a decode only lib and this header wouldn't be
installed.
> 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 |= CODEC_CAP_EXPERIMENTAL;
> + if ( vpx_codec_version_major() >= 1 && vpx_codec_version_minor() >= 4) {
> + vpx_codec_caps_t codec_caps = vpx_codec_get_caps(vpx_codec_vp9_cx());
>
This should be major > 1 || (major == 1 && minor >= 4)
> +#ifdef VPX_CODEC_CAP_HIGHBITDEPTH
> + if (codec_caps & VPX_CODEC_CAP_HIGHBITDEPTH)
> + codec->pix_fmts = vp9_pix_fmts_highbd;
> + else
> +#endif
> + codec->pix_fmts = vp9_pix_fmts_highcol;
I don't think you want to set this in the decode case; if you avoid it
then you can ifdef the tables out.
More information about the ffmpeg-devel
mailing list