From e6bc38fd49c94726b45d5d5cc2b756ad8ec49ee0 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 20 Jan 2013 22:12:35 -0800 Subject: wmv2: move IDCT to its own DSP context. This allows us to remove FF_IDCT_WMV2, which serves no practical purpose other than to be able to select the WMV2 IDCT for MPEG (or vice versa) and get corrupt output. Fate tests for all wmv2-related tests change, because (for some obscure reason) they forced use of the MPEG IDCT. You would get the same changes previously by not using -idct simple in the fate test (or replacing it with -idct auto). --- libavcodec/wmv2.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'libavcodec/wmv2.c') diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index a3dcbb37ae..595630f2ca 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -28,8 +28,24 @@ av_cold void ff_wmv2_common_init(Wmv2Context * w){ MpegEncContext * const s= &w->s; - ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0], ff_wmv2_scantableA); - ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[1], ff_wmv2_scantableB); + ff_wmv2dsp_init(&w->wdsp); + ff_init_scantable_permutation(s->dsp.idct_permutation, + w->wdsp.idct_perm); + ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0], + ff_wmv2_scantableA); + ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[1], + ff_wmv2_scantableB); + ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, + ff_wmv1_scantable[1]); + ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, + ff_wmv1_scantable[2]); + ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, + ff_wmv1_scantable[3]); + ff_init_scantable(s->dsp.idct_permutation, &s->inter_scantable, + ff_wmv1_scantable[0]); + s->dsp.idct_put = w->wdsp.idct_put; + s->dsp.idct_add = w->wdsp.idct_add; + s->dsp.idct = NULL; } static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int stride, int n){ @@ -38,7 +54,7 @@ static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int st if (s->block_last_index[n] >= 0) { switch(w->abt_type_table[n]){ case 0: - s->dsp.idct_add (dst, stride, block1); + w->wdsp.idct_add(dst, stride, block1); break; case 1: ff_simple_idct84_add(dst , stride, block1); -- cgit v1.2.3