[FFmpeg-devel] Patch for High color and High bit-depth support
James Zern
jzern at google.com
Fri Apr 17 00:12:13 CEST 2015
On Thu, Apr 9, 2015 at 4:00 PM, Debargha Mukherjee <debargha at google.com> wrote:
> Resolutions inline.
>
Sorry for the late reply. Looks mostly all right and seems to work,
some minor details below.
> On Wed, Apr 8, 2015 at 8:45 PM, James Zern <jzern at google.com> wrote:
>
>> On Tue, Apr 7, 2015 at 5:16 PM, Debargha Mukherjee <debargha at google.com>
>> wrote:
>> [...]
>>
>> > +#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.
>>
>
> doesn't harm to keep the tables. Also eventually will be good to set these
> for decoding as well.
>
it will mildly increase the shard object size and result in a warning
with the right flags set.
> 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;
> + 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)) {
> + vpx_codec_caps_t codec_caps = vpx_codec_get_caps(vpx_codec_vp9_cx());
>
this could be put under the ifdef.
> static av_cold int vpx_init(AVCodecContext *avctx,
> const struct vpx_codec_iface *iface)
> {
> @@ -267,6 +334,8 @@ static av_cold int vpx_init(AVCodecContext *avctx,
> struct vpx_codec_enc_cfg enccfg_alpha;
> vpx_codec_flags_t flags = (avctx->flags & CODEC_FLAG_PSNR) ? VPX_CODEC_USE_PSNR : 0;
> int res;
> + vpx_img_fmt_t img_fmt = VPX_IMG_FMT_I420;
> + vpx_codec_caps_t codec_caps = vpx_codec_get_caps(iface);
>
codec_caps will be unused when vp9 is disabled.
More information about the ffmpeg-devel
mailing list