diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-01 14:38:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-01 15:22:11 +0200 |
commit | 581b5f0b9b93969712e73e0ae6324bbd03e85d4e (patch) | |
tree | d1319dc7744ac67e6ebd3379f11ff6e4a8178dc1 /libavcodec/mdec.c | |
parent | 909f53f2b285bc7dbe77d4690a03f3d114417297 (diff) | |
parent | e3fcb14347466095839c2a3c47ebecff02da891e (diff) | |
download | ffmpeg-581b5f0b9b93969712e73e0ae6324bbd03e85d4e.tar.gz |
Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'
* commit 'e3fcb14347466095839c2a3c47ebecff02da891e':
dsputil: Split off IDCT bits into their own context
Conflicts:
configure
libavcodec/aic.c
libavcodec/arm/Makefile
libavcodec/arm/dsputil_init_arm.c
libavcodec/arm/dsputil_init_armv6.c
libavcodec/asvdec.c
libavcodec/dnxhdenc.c
libavcodec/dsputil.c
libavcodec/dvdec.c
libavcodec/dxva2_mpeg2.c
libavcodec/intrax8.c
libavcodec/mdec.c
libavcodec/mjpegdec.c
libavcodec/mjpegenc_common.h
libavcodec/mpegvideo.c
libavcodec/ppc/dsputil_altivec.h
libavcodec/ppc/dsputil_ppc.c
libavcodec/ppc/idctdsp.c
libavcodec/x86/Makefile
libavcodec/x86/dsputil_init.c
libavcodec/x86/dsputil_mmx.c
libavcodec/x86/dsputil_x86.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 aa38ab5534..051adaefe2 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -30,6 +30,7 @@ #include "avcodec.h" #include "blockdsp.h" #include "bswapdsp.h" +#include "idctdsp.h" #include "mpegvideo.h" #include "mpeg12.h" #include "thread.h" @@ -38,7 +39,7 @@ typedef struct MDECContext { AVCodecContext *avctx; BlockDSPContext bdsp; BswapDSPContext bbdsp; - DSPContext dsp; + IDCTDSPContext idsp; ThreadFrame frame; GetBitContext gb; ScanTable scantable; @@ -148,14 +149,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]); } } @@ -214,9 +215,10 @@ static av_cold int decode_init(AVCodecContext *avctx) ff_blockdsp_init(&a->bdsp, avctx); ff_bswapdsp_init(&a->bbdsp); - 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; |