On 12/26/2017 10:10 AM, Nicolas George wrote: > James Almer (2017-12-26): >>> +#if X264_BUILD >= 155 >>> + if (x4->params.i_bitdepth > 8) >>> +#else > >> Wouldn't using av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth here >> as well be cleaner? > > avctx->pix_fmt tells us what libavcodec wants; x4->params.i_bitdepth > tells us what x264 proposes; they are not necessarily the same thing.
x4->params.i_bitdepth is set by libavcodec based on the value of avctx->pix_fmt at the time AVCodec.init() is called, so it should be the same. Unless avctx->pix_fmt can change mid encoding, in which case things would just not work anyway. > > You may want to check the similar change you made on FFmpeg. > > Regards, > > > > _______________________________________________ > libav-devel mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-devel > _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
