diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-01-24 11:55:16 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-30 07:58:46 -0700 |
commit | e3fcb14347466095839c2a3c47ebecff02da891e (patch) | |
tree | 38fbcef2c592faae3610887dbda3ab333181d1dc /libavcodec/mdec.c | |
parent | adcb8392c9b185fd8a91a95fa256d15ab1432a30 (diff) | |
download | ffmpeg-e3fcb14347466095839c2a3c47ebecff02da891e.tar.gz |
dsputil: Split off IDCT bits into their own context
Diffstat (limited to 'libavcodec/mdec.c')
-rw-r--r-- | libavcodec/mdec.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index b4213972b7..6b70e37e76 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -29,6 +29,7 @@ #include "avcodec.h" #include "blockdsp.h" +#include "idctdsp.h" #include "mpegvideo.h" #include "mpeg12.h" #include "thread.h" @@ -36,7 +37,7 @@ typedef struct MDECContext { AVCodecContext *avctx; BlockDSPContext bdsp; - DSPContext dsp; + IDCTDSPContext idsp; ThreadFrame frame; GetBitContext gb; ScanTable scantable; @@ -146,14 +147,14 @@ static inline void idct_put(MDECContext *a, AVFrame *frame, int mb_x, int mb_y) uint8_t *dest_cb = frame->data[1] + (mb_y * 8 * frame->linesize[1]) + mb_x * 8; uint8_t *dest_cr = frame->data[2] + (mb_y * 8 * frame->linesize[2]) + mb_x * 8; - a->dsp.idct_put(dest_y, linesize, block[0]); - a->dsp.idct_put(dest_y + 8, linesize, block[1]); - a->dsp.idct_put(dest_y + 8 * linesize, linesize, block[2]); - a->dsp.idct_put(dest_y + 8 * linesize + 8, linesize, block[3]); + a->idsp.idct_put(dest_y, linesize, block[0]); + a->idsp.idct_put(dest_y + 8, linesize, block[1]); + a->idsp.idct_put(dest_y + 8 * linesize, linesize, block[2]); + a->idsp.idct_put(dest_y + 8 * linesize + 8, linesize, block[3]); if (!(a->avctx->flags & CODEC_FLAG_GRAY)) { - a->dsp.idct_put(dest_cb, frame->linesize[1], block[4]); - a->dsp.idct_put(dest_cr, frame->linesize[2], block[5]); + a->idsp.idct_put(dest_cb, frame->linesize[1], block[4]); + a->idsp.idct_put(dest_cr, frame->linesize[2], block[5]); } } @@ -215,9 +216,10 @@ static av_cold int decode_init(AVCodecContext *avctx) a->avctx = avctx; ff_blockdsp_init(&a->bdsp, avctx); - ff_dsputil_init(&a->dsp, avctx); + ff_idctdsp_init(&a->idsp, avctx); ff_mpeg12_init_vlcs(); - ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct); + ff_init_scantable(a->idsp.idct_permutation, &a->scantable, + ff_zigzag_direct); if (avctx->idct_algo == FF_IDCT_AUTO) avctx->idct_algo = FF_IDCT_SIMPLE; |