[FFmpeg-devel] [PATCH]Make high bit-depth libvpx samples show the correct bit depth

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Sep 22 23:19:29 CEST 2014


On Thursday 18 September 2014 12:15:58 am James Zern wrote:
> Hi,
>
> On Tue, Sep 16, 2014 at 1:30 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> > Hi!
> >
> > Attached patch fixes ffmpeg -i output for high-bitrate vp9 files here.
>
> Do you mean high bitdepth?

Yes, sorry.

> > +#if !defined(VPX_IMG_FMT_HIGHBITDEPTH)
> >      avctx->pix_fmt = AV_PIX_FMT_YUV420P;
> > +#endif
> >      return 0;
> >  }
>
> The fix is a bit odd. This can just go given set_pix_fmt is called

New patch attached.

> when decoding a frame. I think in its current state all this will
> avoid is not forcing a decode call with older libraries.

This was the intention, yes.

Thank you, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 8312460..ba20579 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -56,7 +56,6 @@ static av_cold int vpx_init(AVCodecContext *avctx,
         return AVERROR(EINVAL);
     }
 
-    avctx->pix_fmt = AV_PIX_FMT_YUV420P;
     return 0;
 }
 


More information about the ffmpeg-devel mailing list