diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-01-14 13:33:47 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-19 01:07:23 +0400 |
commit | e74433a8e6fc00c8dbde293c97a3e45384c2c1d9 (patch) | |
tree | f975b37a58a7c6e62c84c12349610ce6f40ad4d1 /libavcodec/dnxhddec.c | |
parent | 869fc416f7c78ed4e397e0208acd1545771c0502 (diff) |
dsputil: Split clear_block*/fill_block* off into a separate context
Diffstat (limited to 'libavcodec/dnxhddec.c')
-rw-r--r-- | libavcodec/dnxhddec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 4daee04cf0..3bd8ffecd6 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -25,6 +25,7 @@ #include "libavutil/imgutils.h" #include "libavutil/timer.h" #include "avcodec.h" +#include "blockdsp.h" #include "get_bits.h" #include "dnxhddata.h" #include "dsputil.h" @@ -33,6 +34,7 @@ typedef struct DNXHDContext { AVCodecContext *avctx; GetBitContext gb; + BlockDSPContext bdsp; int cid; ///< compression id unsigned int width, height; unsigned int mb_width, mb_height; @@ -133,6 +135,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->avctx->pix_fmt = AV_PIX_FMT_YUV444P10; ctx->avctx->bits_per_raw_sample = 10; if (ctx->bit_depth != 10) { + ff_blockdsp_init(&ctx->bdsp, ctx->avctx); ff_dsputil_init(&ctx->dsp, ctx->avctx); ctx->bit_depth = 10; ctx->decode_dct_block = dnxhd_decode_dct_block_10_444; @@ -142,6 +145,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P10; ctx->avctx->bits_per_raw_sample = 10; if (ctx->bit_depth != 10) { + ff_blockdsp_init(&ctx->bdsp, ctx->avctx); ff_dsputil_init(&ctx->dsp, ctx->avctx); ctx->bit_depth = 10; ctx->decode_dct_block = dnxhd_decode_dct_block_10; @@ -150,6 +154,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P; ctx->avctx->bits_per_raw_sample = 8; if (ctx->bit_depth != 8) { + ff_blockdsp_init(&ctx->bdsp, ctx->avctx); ff_dsputil_init(&ctx->dsp, ctx->avctx); ctx->bit_depth = 8; ctx->decode_dct_block = dnxhd_decode_dct_block_8; @@ -307,12 +312,12 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx, AVFrame *frame, skip_bits1(&ctx->gb); for (i = 0; i < 8; i++) { - ctx->dsp.clear_block(ctx->blocks[i]); + ctx->bdsp.clear_block(ctx->blocks[i]); ctx->decode_dct_block(ctx, ctx->blocks[i], i, qscale); } if (ctx->is_444) { for (; i < 12; i++) { - ctx->dsp.clear_block(ctx->blocks[i]); + ctx->bdsp.clear_block(ctx->blocks[i]); ctx->decode_dct_block(ctx, ctx->blocks[i], i, qscale); } } |