diff options
author | David Conrad <lessen42@gmail.com> | 2010-04-17 02:04:30 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-04-17 02:04:30 +0000 |
commit | eb6a6cd788a172f146534c5fab9b98d6cbf59520 (patch) | |
tree | 23225d7976eefaf0292342e6ee8b4ac946efcb8e /libavcodec/vp3.c | |
parent | f32f7d8b24d1228df447be85046b9346292d936e (diff) | |
download | ffmpeg-eb6a6cd788a172f146534c5fab9b98d6cbf59520.tar.gz |
vp3: DC-only IDCT
2-4% faster overall decode
Originally committed as revision 22896 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-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 e46e6a437a..2e72fba0fc 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1395,8 +1395,6 @@ static void render_slice(Vp3DecodeContext *s, int slice) /* transform if this block was coded */ if (s->all_fragments[i].coding_method != MODE_COPY) { - int intra = s->all_fragments[i].coding_method == MODE_INTRA; - if ((s->all_fragments[i].coding_method == MODE_USING_GOLDEN) || (s->all_fragments[i].coding_method == MODE_GOLDEN_MV)) motion_source= golden_plane; @@ -1456,11 +1454,11 @@ static void render_slice(Vp3DecodeContext *s, int slice) } s->dsp.clear_block(block); - vp3_dequant(s, s->all_fragments + i, plane, !intra, block); /* invert DCT and place (or add) in final output */ if (s->all_fragments[i].coding_method == MODE_INTRA) { + vp3_dequant(s, s->all_fragments + i, plane, 0, block); if(s->avctx->idct_algo!=FF_IDCT_VP3) block[0] += 128<<3; s->dsp.idct_put( @@ -1468,10 +1466,14 @@ static void render_slice(Vp3DecodeContext *s, int slice) stride, block); } else { + if (vp3_dequant(s, s->all_fragments + i, plane, 1, block)) { s->dsp.idct_add( output_plane + first_pixel, stride, block); + } else { + s->dsp.vp3_idct_dc_add(output_plane + first_pixel, stride, block); + } } } else { |