aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/indeo5.c
diff options
context:
space:
mode:
authorMaxim Poliakovski <max_pole@gmx.de>2010-03-07 12:12:42 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2010-03-07 12:12:42 +0000
commit7fcb98a7ec51123ecfd810a167d96f128eed9b79 (patch)
treef7c9c3c58040dc58620a1d8612aa96c1194a4abc /libavcodec/indeo5.c
parent0209cd07191f20abd9d525266d37bdd79167fa02 (diff)
downloadffmpeg-7fcb98a7ec51123ecfd810a167d96f128eed9b79.tar.gz
Band quant tables should not be assigned inside band tile loop,
one time is enough. Patch by Maxim (max_pole, gmx de) Originally committed as revision 22279 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/indeo5.c')
-rw-r--r--libavcodec/indeo5.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index fa150f20bd..5bfa8e7be4 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -568,6 +568,18 @@ static int decode_band(IVI5DecContext *ctx, int plane_num,
return -1;
}
+ if (band->blk_size == 8) {
+ band->intra_base = &ivi5_base_quant_8x8_intra[band->quant_mat][0];
+ band->inter_base = &ivi5_base_quant_8x8_inter[band->quant_mat][0];
+ band->intra_scale = &ivi5_scale_quant_8x8_intra[band->quant_mat][0];
+ band->inter_scale = &ivi5_scale_quant_8x8_inter[band->quant_mat][0];
+ } else {
+ band->intra_base = ivi5_base_quant_4x4_intra;
+ band->inter_base = ivi5_base_quant_4x4_inter;
+ band->intra_scale = ivi5_scale_quant_4x4_intra;
+ band->inter_scale = ivi5_scale_quant_4x4_inter;
+ }
+
band->rv_map = &ctx->rvmap_tabs[band->rvmap_sel];
/* apply corrections to the selected rvmap table if present */
@@ -593,18 +605,6 @@ static int decode_band(IVI5DecContext *ctx, int plane_num,
if (result < 0)
break;
- if (band->blk_size == 8) {
- band->intra_base = &ivi5_base_quant_8x8_intra[band->quant_mat][0];
- band->inter_base = &ivi5_base_quant_8x8_inter[band->quant_mat][0];
- band->intra_scale = &ivi5_scale_quant_8x8_intra[band->quant_mat][0];
- band->inter_scale = &ivi5_scale_quant_8x8_inter[band->quant_mat][0];
- } else {
- band->intra_base = ivi5_base_quant_4x4_intra;
- band->inter_base = ivi5_base_quant_4x4_inter;
- band->intra_scale = ivi5_scale_quant_4x4_intra;
- band->inter_scale = ivi5_scale_quant_4x4_inter;
- }
-
result = ff_ivi_decode_blocks(&ctx->gb, band, tile);
if (result < 0) {
av_log(avctx, AV_LOG_ERROR, "Corrupted blocks data encountered!\n");