[FFmpeg-devel] Patch for High color and High bit-depth support

Debargha Mukherjee debargha at google.com
Fri Apr 17 03:19:46 CEST 2015


Resolutions inline...

On Thu, Apr 16, 2015 at 3:12 PM, James Zern <jzern at google.com> wrote:

> 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.
>

Done.


>
> >  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.
>

Done.


>
> >  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.
>

Done.


> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>



-- 
Debargha Mukherjee, Ph.D.
Staff Software Engineer,
Google, Inc.
Email: debargha at google.com
Phone: 408-234-5956 (cell)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Support-for-VP9-high-color-high-bit-depth-encoding.patch
Type: text/x-patch
Size: 8581 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150416/fd77525d/attachment.bin>


More information about the ffmpeg-devel mailing list