Mercurial > libavcodec.hg
comparison indeo5.c @ 11386:0262869c11a9 libavcodec
Band quant tables should not be assigned inside band tile loop,
one time is enough.
Patch by Maxim (max_pole, gmx de)
author | kostya |
---|---|
date | Sun, 07 Mar 2010 12:12:42 +0000 |
parents | d617766bf19b |
children | 128f82b41fc1 |
comparison
equal
deleted
inserted
replaced
11385:351d1c11195b | 11386:0262869c11a9 |
---|---|
566 if (band->is_empty) { | 566 if (band->is_empty) { |
567 av_log(avctx, AV_LOG_ERROR, "Empty band encountered!\n"); | 567 av_log(avctx, AV_LOG_ERROR, "Empty band encountered!\n"); |
568 return -1; | 568 return -1; |
569 } | 569 } |
570 | 570 |
571 if (band->blk_size == 8) { | |
572 band->intra_base = &ivi5_base_quant_8x8_intra[band->quant_mat][0]; | |
573 band->inter_base = &ivi5_base_quant_8x8_inter[band->quant_mat][0]; | |
574 band->intra_scale = &ivi5_scale_quant_8x8_intra[band->quant_mat][0]; | |
575 band->inter_scale = &ivi5_scale_quant_8x8_inter[band->quant_mat][0]; | |
576 } else { | |
577 band->intra_base = ivi5_base_quant_4x4_intra; | |
578 band->inter_base = ivi5_base_quant_4x4_inter; | |
579 band->intra_scale = ivi5_scale_quant_4x4_intra; | |
580 band->inter_scale = ivi5_scale_quant_4x4_inter; | |
581 } | |
582 | |
571 band->rv_map = &ctx->rvmap_tabs[band->rvmap_sel]; | 583 band->rv_map = &ctx->rvmap_tabs[band->rvmap_sel]; |
572 | 584 |
573 /* apply corrections to the selected rvmap table if present */ | 585 /* apply corrections to the selected rvmap table if present */ |
574 for (i = 0; i < band->num_corr; i++) { | 586 for (i = 0; i < band->num_corr; i++) { |
575 idx1 = band->corr[i*2]; | 587 idx1 = band->corr[i*2]; |
590 tile->data_size = ff_ivi_dec_tile_data_size(&ctx->gb); | 602 tile->data_size = ff_ivi_dec_tile_data_size(&ctx->gb); |
591 | 603 |
592 result = decode_mb_info(ctx, band, tile, avctx); | 604 result = decode_mb_info(ctx, band, tile, avctx); |
593 if (result < 0) | 605 if (result < 0) |
594 break; | 606 break; |
595 | |
596 if (band->blk_size == 8) { | |
597 band->intra_base = &ivi5_base_quant_8x8_intra[band->quant_mat][0]; | |
598 band->inter_base = &ivi5_base_quant_8x8_inter[band->quant_mat][0]; | |
599 band->intra_scale = &ivi5_scale_quant_8x8_intra[band->quant_mat][0]; | |
600 band->inter_scale = &ivi5_scale_quant_8x8_inter[band->quant_mat][0]; | |
601 } else { | |
602 band->intra_base = ivi5_base_quant_4x4_intra; | |
603 band->inter_base = ivi5_base_quant_4x4_inter; | |
604 band->intra_scale = ivi5_scale_quant_4x4_intra; | |
605 band->inter_scale = ivi5_scale_quant_4x4_inter; | |
606 } | |
607 | 607 |
608 result = ff_ivi_decode_blocks(&ctx->gb, band, tile); | 608 result = ff_ivi_decode_blocks(&ctx->gb, band, tile); |
609 if (result < 0) { | 609 if (result < 0) { |
610 av_log(avctx, AV_LOG_ERROR, "Corrupted blocks data encountered!\n"); | 610 av_log(avctx, AV_LOG_ERROR, "Corrupted blocks data encountered!\n"); |
611 break; | 611 break; |