intrax8: Add a local BlockDSPContext and initialize it

Helps in decoupling this code from mpegvideo.
This commit is contained in:
Vittorio Giovara 2016-02-20 00:46:49 -05:00
parent 1eaae7abb8
commit 159323897f
3 changed files with 5 additions and 2 deletions

2
configure vendored
View File

@ -1863,7 +1863,7 @@ error_resilience_select="me_cmp"
faandct_deps="faan fdctdsp"
faanidct_deps="faan idctdsp"
h264dsp_select="startcode"
intrax8_select="idctdsp"
intrax8_select="blockdsp idctdsp"
mdct_select="fft"
rdft_select="fft"
me_cmp_select="fdctdsp idctdsp pixblockdsp"

View File

@ -587,7 +587,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma)
int sign;
assert(w->orient < 12);
s->bdsp.clear_block(s->block[0]);
w->bdsp.clear_block(s->block[0]);
if (chroma)
dc_mode = 2;
@ -762,6 +762,7 @@ av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
ff_wmv1_scantable[3]);
ff_intrax8dsp_init(&w->dsp);
ff_blockdsp_init(&w->bdsp, avctx);
return 0;
}

View File

@ -19,6 +19,7 @@
#ifndef AVCODEC_INTRAX8_H
#define AVCODEC_INTRAX8_H
#include "blockdsp.h"
#include "get_bits.h"
#include "mpegvideo.h"
#include "idctdsp.h"
@ -41,6 +42,7 @@ typedef struct IntraX8Context {
MpegEncContext *s;
IntraX8DSPContext dsp;
IDCTDSPContext idsp;
BlockDSPContext bdsp;
int quant;
int dquant;
int qsum;