From: Derek Buitenhuis Date: Sat, 7 May 2016 20:38:30 +0000 (+0100) Subject: Merge commit '9fa888c02801fff2e8817c24068f5296bbe60000' X-Git-Tag: android-x86-7.1-r1~5331 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f110c624b1f30ac7f817eda128db1265260e57c7;p=android-x86%2Fexternal-ffmpeg.git Merge commit '9fa888c02801fff2e8817c24068f5296bbe60000' * commit '9fa888c02801fff2e8817c24068f5296bbe60000': intrax8: Keep a reference to the decoder blocks Merged-by: Derek Buitenhuis --- f110c624b1f30ac7f817eda128db1265260e57c7 diff --cc libavcodec/intrax8.c index ff828ee021,3bd8807f8d..c953804505 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@@ -476,9 -480,8 +476,8 @@@ static void x8_get_prediction(IntraX8Co static void x8_ac_compensation(IntraX8Context *const w, const int direction, const int dc_level) { - MpegEncContext *const s = w->s; int t; - #define B(x,y) s->block[0][w->idct_permutation[(x) + (y) * 8]] -#define B(x, y) w->block[0][w->idsp.idct_permutation[(x) + (y) * 8]] ++#define B(x,y) w->block[0][w->idct_permutation[(x) + (y) * 8]] #define T(x) ((x) * dc_level + 0x8000) >> 16; switch (direction) { case 0: @@@ -578,8 -579,8 +575,8 @@@ static int x8_decode_intra_mb(IntraX8Co int use_quant_matrix; int sign; - assert(w->orient < 12); + av_assert2(w->orient < 12); - w->bdsp.clear_block(s->block[0]); + w->bdsp.clear_block(w->block[0]); if (chroma) dc_mode = 2; @@@ -690,9 -691,9 +687,9 @@@ w->frame->linesize[!!chroma]); } if (!zeros_only) - w->idsp.idct_add(w->dest[chroma], + w->wdsp.idct_add(w->dest[chroma], w->frame->linesize[!!chroma], - s->block[0]); + w->block[0]); block_placed: if (!chroma) diff --cc libavcodec/intrax8.h index c8897fe863,ebc9a79a30..a28c7cafec --- a/libavcodec/intrax8.h +++ b/libavcodec/intrax8.h @@@ -37,12 -36,12 +37,14 @@@ typedef struct IntraX8Context // set by ff_intrax8_common_init uint8_t *prediction_table; // 2 * (mb_w * 2) ScanTable scantable[3]; + WMV2DSPContext wdsp; + uint8_t idct_permutation[64]; AVCodecContext *avctx; + int *block_last_index; ///< last nonzero coefficient in block + int16_t (*block)[64]; - // set by the caller codec - MpegEncContext *s; + //set by the caller codec + MpegEncContext * s; IntraX8DSPContext dsp; IDCTDSPContext idsp; BlockDSPContext bdsp;