[FFmpeg-devel] [PATCH] blockdsp: remove high bit depth parameter

Ronald S. Bultje rsbultje at gmail.com
Thu Oct 1 15:41:23 CEST 2015


Hi,

On Thu, Oct 1, 2015 at 9:26 AM, Christophe Gisquet <
christophe.gisquet at gmail.com> wrote:

> 2015-10-01 14:40 GMT+02:00 Ronald S. Bultje <rsbultje at gmail.com>:
> > bash-3.2$ grep ff_pixblockdsp_init ../libavcodec/*
> > ../libavcodec/asvenc.c:    ff_pixblockdsp_init(&a->pdsp, avctx);
> > ../libavcodec/avdct.c:        ff_pixblockdsp_init(&pdsp, avctx);
> > ../libavcodec/dnxhdenc.c:    ff_pixblockdsp_init(&ctx->m.pdsp, avctx);
> > ../libavcodec/dvenc.c:    ff_pixblockdsp_init(&pdsp, avctx);
> > ../libavcodec/mpegvideo_enc.c:    ff_pixblockdsp_init(&s->pdsp, avctx);
> >
> > bash-3.2$ grep AV_PIX_FMT ../libavcodec/dvenc.c ../libavcodec/dnxhdenc.c
> > ../libavcodec/mpegvideo_enc.c ../libavcodec/asvenc.c
> > ../libavcodec/dnxhdenc.c:    case AV_PIX_FMT_YUV422P10:
> > ../libavcodec/dnxhdenc.c:        AV_PIX_FMT_YUV422P10,
> >
> > bash-3.2$ grep clear_block ../libavcodec/dnxhdenc.c
> >             ctx->bdsp.clear_block(ctx->blocks[4]);
> >             ctx->bdsp.clear_block(ctx->blocks[5]);
> >             ctx->bdsp.clear_block(ctx->blocks[6]);
> >             ctx->bdsp.clear_block(ctx->blocks[7]);
> >
> > So this may break 10bit dnxhd encoding.
>
> Well, that's part of the routine of what I've been testing since a
> while, and it doesn't seem so. But that's not a very convincing
> argument.
>
> But I'm not sure what you are finding with your greps. That dnxhdenc
> is actually using clear_block depending on the highbitdepth parameter?
> In dnxhdenc, ctx->blocks are still 16bits dct coeffs blocks, as in all
> of those codecs. There's 12 bit content and support incoming, but even
> there, coeffs are 15bits (DC is).


OK, that's basically what I was wondering about. If the dct coef types are
bitdepth independent (as seems to be the case), your patch should be OK.

Ronald


More information about the ffmpeg-devel mailing list