diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-03-12 18:28:12 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-13 01:54:10 +0400 |
commit | d85c9b036e65afa05dcc8fbf37813ef4a05db1f3 (patch) | |
tree | cdf7469df86a63771fa6a2df5ef9ee4db9be2a95 /libavcodec/vp3.c | |
parent | db594f65ec4e4a8d85113f309f3d9c31959b48e3 (diff) |
vp3/x86: use full transpose for all IDCTs.
This way, the special IDCT permutations are no longer needed. Bfin code
is disabled until someone updates it. This is similar to how H264 does
it, and removes the dsputil dependency imposed by the scantable code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index a77bf8fe59..5f5a3e3b22 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -140,6 +140,7 @@ typedef struct Vp3DecodeContext { ThreadFrame current_frame; int keyframe; uint8_t idct_permutation[64]; + uint8_t idct_scantable[64]; DSPContext dsp; VideoDSPContext vdsp; VP3DSPContext vp3dsp; @@ -177,8 +178,6 @@ typedef struct Vp3DecodeContext { int8_t (*motion_val[2])[2]; - ScanTable scantable; - /* tables */ uint16_t coded_dc_scale_factor[64]; uint32_t coded_ac_scale_factor[64]; @@ -1356,7 +1355,7 @@ static inline int vp3_dequant(Vp3DecodeContext *s, Vp3Fragment *frag, int plane, int inter, int16_t block[64]) { int16_t *dequantizer = s->qmat[frag->qpi][inter][plane]; - uint8_t *perm = s->scantable.permutated; + uint8_t *perm = s->idct_scantable; int i = 0; do { @@ -1699,8 +1698,12 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) ff_videodsp_init(&s->vdsp, 8); ff_vp3dsp_init(&s->vp3dsp, avctx->flags); - ff_init_scantable_permutation(s->idct_permutation, s->vp3dsp.idct_perm); - ff_init_scantable(s->idct_permutation, &s->scantable, ff_zigzag_direct); + for (i = 0; i < 64; i++) { +#define T(x) (x >> 3) | ((x & 7) << 3) + s->idct_permutation[i] = T(i); + s->idct_scantable[i] = T(ff_zigzag_direct[i]); +#undef T + } /* initialize to an impossible value which will force a recalculation * in the first frame decode */ |