Message ID | 20240821232455.238469-1-ramiro.polla@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avcodec/dnxhdenc: use BlockDSPContext from MpegEncContext | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Thu, Aug 22, 2024 at 1:24 AM Ramiro Polla <ramiro.polla@gmail.com> wrote: > MpegEncContext already has a BlockDSPContext, so we don't need another > one for DNXHDEncContext (which has an MpegEncContext). > --- > libavcodec/dnxhdenc.c | 10 +++++----- > libavcodec/dnxhdenc.h | 1 - > 2 files changed, 5 insertions(+), 6 deletions(-) I'll apply in a couple of days if there are no objections.
On Wed, Aug 28, 2024 at 2:11 PM Ramiro Polla <ramiro.polla@gmail.com> wrote: > On Thu, Aug 22, 2024 at 1:24 AM Ramiro Polla <ramiro.polla@gmail.com> wrote: > > MpegEncContext already has a BlockDSPContext, so we don't need another > > one for DNXHDEncContext (which has an MpegEncContext). > > --- > > libavcodec/dnxhdenc.c | 10 +++++----- > > libavcodec/dnxhdenc.h | 1 - > > 2 files changed, 5 insertions(+), 6 deletions(-) > > I'll apply in a couple of days if there are no objections. Pushed.
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 62612ef6d2..53e3669a30 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -420,7 +420,7 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) avctx->bits_per_raw_sample = ctx->bit_depth; - ff_blockdsp_init(&ctx->bdsp); + ff_blockdsp_init(&ctx->m.bdsp); ff_fdctdsp_init(&ctx->m.fdsp, avctx); ff_mpv_idct_init(&ctx->m); ff_mpegvideoencdsp_init(&ctx->m.mpvencdsp, avctx); @@ -768,10 +768,10 @@ void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y) ptr_v + dct_uv_offset, uvlinesize); } else { - 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]); + ctx->m.bdsp.clear_block(ctx->blocks[4]); + ctx->m.bdsp.clear_block(ctx->blocks[5]); + ctx->m.bdsp.clear_block(ctx->blocks[6]); + ctx->m.bdsp.clear_block(ctx->blocks[7]); } } else { pdsp->get_pixels(ctx->blocks[4], diff --git a/libavcodec/dnxhdenc.h b/libavcodec/dnxhdenc.h index 72077d631d..00d486babd 100644 --- a/libavcodec/dnxhdenc.h +++ b/libavcodec/dnxhdenc.h @@ -43,7 +43,6 @@ typedef struct RCEntry { typedef struct DNXHDEncContext { AVClass *class; - BlockDSPContext bdsp; MpegEncContext m; ///< Used for quantization dsp functions int cid;