diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-03-09 09:08:36 -0800 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-04-08 12:38:33 +0300 |
commit | 18df366a1857f9a92e158858cf495b61d096c7f1 (patch) | |
tree | 226e44d53d39bc2e0b00231d3f06409516acfe1d | |
parent | 610b18e2e3d8ef5eca3e78f33a0625689b8d2bb9 (diff) | |
download | ffmpeg-18df366a1857f9a92e158858cf495b61d096c7f1.tar.gz |
vp3: Embed idct_permutation array directly in VP3DecoderContext
This makes the vp3 decoder less dependent on dsputil, and will aid
in making it (eventually) dsputil-independent.
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r-- | libavcodec/vp3.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 3d55c784aa..18b9cb89bf 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -135,6 +135,7 @@ typedef struct Vp3DecodeContext { ThreadFrame last_frame; ThreadFrame current_frame; int keyframe; + uint8_t idct_permutation[64]; DSPContext dsp; VideoDSPContext vdsp; VP3DSPContext vp3dsp; @@ -374,7 +375,8 @@ static void init_dequantizer(Vp3DecodeContext *s, int qpi) int qmin= 8<<(inter + !i); int qscale= i ? ac_scale_factor : dc_scale_factor; - s->qmat[qpi][inter][plane][s->dsp.idct_permutation[i]]= av_clip((qscale * coeff)/100 * 4, qmin, 4096); + s->qmat[qpi][inter][plane][s->idct_permutation[i]] = + av_clip((qscale * coeff) / 100 * 4, qmin, 4096); } // all DC coefficients use the same quant so as not to interfere with DC prediction s->qmat[qpi][inter][plane][0] = s->qmat[0][inter][plane][0]; @@ -1698,8 +1700,8 @@ 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->dsp.idct_permutation, s->vp3dsp.idct_perm); - ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); + ff_init_scantable_permutation(s->idct_permutation, s->vp3dsp.idct_perm); + ff_init_scantable(s->idct_permutation, &s->scantable, ff_zigzag_direct); /* initialize to an impossible value which will force a recalculation * in the first frame decode */ |