From: Derek Buitenhuis Date: Sun, 24 Apr 2016 11:19:53 +0000 (+0100) Subject: Merge commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a' X-Git-Tag: android-x86-7.1-r1~5492 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=83e0b1b1d7b4120f1bdd2576e977a6bda0283ce9;p=android-x86%2Fexternal-ffmpeg.git Merge commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a' * commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a': intrax8: Keep a reference to the context idctdsp Merged-by: Derek Buitenhuis --- 83e0b1b1d7b4120f1bdd2576e977a6bda0283ce9 diff --cc configure index 97f374bc1b,99b9405184..1f5788b855 --- a/configure +++ b/configure @@@ -2260,8 -1863,9 +2260,9 @@@ error_resilience_select="me_cmp faandct_deps="faan fdctdsp" faanidct_deps="faan idctdsp" h264dsp_select="startcode" +frame_thread_encoder_deps="encoders threads" + intrax8_select="idctdsp" mdct_select="fft" -rdft_select="fft" me_cmp_select="fdctdsp idctdsp pixblockdsp" mpeg_er_select="error_resilience" mpegaudio_select="mpegaudiodsp" diff --cc libavcodec/intrax8.c index 9141c5bb7a,0082591c6b..471009e61a --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@@ -488,7 -492,7 +488,7 @@@ static void x8_ac_compensation(IntraX8C { MpegEncContext *const s = w->s; int t; - #define B(x,y) s->block[0][w->idct_permutation[(x)+(y)*8]] -#define B(x, y) s->block[0][w->idsp.idct_permutation[(x) + (y) * 8]] ++#define B(x,y) s->block[0][w->idct_permutation[(x) + (y) * 8]] #define T(x) ((x) * dc_level + 0x8000) >> 16; switch (direction) { case 0: @@@ -745,9 -750,10 +746,10 @@@ av_cold int ff_intrax8_common_init(Intr if (ret < 0) return ret; + w->idsp = *idsp; w->s = s; - // two rows, 2 blocks per cannon mb + //two rows, 2 blocks per cannon mb w->prediction_table = av_mallocz(s->mb_width * 2 * 2); if (!w->prediction_table) return AVERROR(ENOMEM); diff --cc libavcodec/intrax8.h index fdbcdec59a,ef88d83d3c..849e04d952 --- a/libavcodec/intrax8.h +++ b/libavcodec/intrax8.h @@@ -21,8 -21,8 +21,9 @@@ #include "get_bits.h" #include "mpegvideo.h" + #include "idctdsp.h" #include "intrax8dsp.h" +#include "wmv2dsp.h" typedef struct IntraX8Context { VLC *j_ac_vlc[4]; // they point to the static j_mb_vlc @@@ -34,12 -34,11 +35,13 @@@ // set by ff_intrax8_common_init uint8_t *prediction_table; // 2 * (mb_w * 2) ScanTable scantable[3]; + WMV2DSPContext wdsp; + uint8_t idct_permutation[64]; - // set by the caller codec - MpegEncContext *s; + //set by the caller codec + MpegEncContext * s; IntraX8DSPContext dsp; + IDCTDSPContext idsp; int quant; int dquant; int qsum; diff --cc libavcodec/vc1dec.c index dae697bd9c,9e64a6bcd3..25251c820e --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@@ -382,12 -372,14 +382,12 @@@ av_cold int ff_vc1_decode_init_alloc_ta v->mv_f_next[1] = v->mv_f_next[0] + (s->b8_stride * (mb_height * 2 + 1) + s->mb_stride * (mb_height + 1) * 2); if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { - for (i = 0; i < 4; i++) { - v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width); - if (!v->sr_rows[i >> 1][i & 1]) - goto error; - } + for (i = 0; i < 4; i++) + if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width))) + return AVERROR(ENOMEM); } - ret = ff_intrax8_common_init(&v->x8, s); + ret = ff_intrax8_common_init(&v->x8, &s->idsp, s); if (ret < 0) goto error;