mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-11-02 05:23:14 +08:00
dsputil: Split clear_block*/fill_block* off into a separate context
This commit is contained in:
@@ -28,12 +28,14 @@
|
||||
*/
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "blockdsp.h"
|
||||
#include "mpegvideo.h"
|
||||
#include "mpeg12.h"
|
||||
#include "thread.h"
|
||||
|
||||
typedef struct MDECContext {
|
||||
AVCodecContext *avctx;
|
||||
BlockDSPContext bdsp;
|
||||
DSPContext dsp;
|
||||
ThreadFrame frame;
|
||||
GetBitContext gb;
|
||||
@@ -123,7 +125,7 @@ static inline int decode_mb(MDECContext *a, int16_t block[6][64])
|
||||
int i, ret;
|
||||
const int block_index[6] = { 5, 4, 0, 1, 2, 3 };
|
||||
|
||||
a->dsp.clear_blocks(block[0]);
|
||||
a->bdsp.clear_blocks(block[0]);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if ((ret = mdec_decode_block_intra(a, block[block_index[i]],
|
||||
@@ -212,6 +214,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
|
||||
a->avctx = avctx;
|
||||
|
||||
ff_blockdsp_init(&a->bdsp, avctx);
|
||||
ff_dsputil_init(&a->dsp, avctx);
|
||||
ff_mpeg12_init_vlcs();
|
||||
ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct);
|
||||
|
||||
Reference in New Issue
Block a user