From 015821229f96bf7e677f2a711a58dbea3009f574 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 12 Mar 2013 07:28:12 -0700 Subject: vp3: Use full transpose for all IDCTs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way, the special IDCT permutations are no longer needed. This is similar to how H264 does it, and removes the dsputil dependency imposed by the scantable code. Also remove the unused type == 0 cases from the plain C version of the idct. Signed-off-by: Martin Storsjö --- libavcodec/vp56.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libavcodec/vp56.c') diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index b93f75da7e..1a83f00f47 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -263,7 +263,7 @@ static VP56mb vp56_decode_mv(VP56Context *s, int row, int col) static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame) { - int idx = s->scantable.permutated[0]; + int idx = s->idct_scantable[0]; int b; for (b=0; b<6; b++) { @@ -661,8 +661,11 @@ av_cold int ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha) ff_videodsp_init(&s->vdsp, 8); ff_vp3dsp_init(&s->vp3dsp, avctx->flags); ff_vp56dsp_init(&s->vp56dsp, avctx->codec->id); - ff_init_scantable_permutation(s->dsp.idct_permutation, s->vp3dsp.idct_perm); - ff_init_scantable(s->dsp.idct_permutation, &s->scantable,ff_zigzag_direct); + for (i = 0; i < 64; i++) { +#define T(x) (x >> 3) | ((x & 7) << 3) + s->idct_scantable[i] = T(ff_zigzag_direct[i]); +#undef T + } for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++) { s->frames[i] = av_frame_alloc(); -- cgit v1.2.3