comparison indeo5.c @ 11121:1d4aeef800d4 libavcodec

Move 'chksum' declaration to the only block where that variable is used
author kostya
date Thu, 11 Feb 2010 07:59:24 +0000
parents b622564e2d60
children 384b6a615a92
comparison
equal deleted inserted replaced
11120:b622564e2d60 11121:1d4aeef800d4
599 static int decode_band(IVI5DecContext *ctx, int plane_num, 599 static int decode_band(IVI5DecContext *ctx, int plane_num,
600 IVIBandDesc *band, AVCodecContext *avctx) 600 IVIBandDesc *band, AVCodecContext *avctx)
601 { 601 {
602 int result, i, t, idx1, idx2; 602 int result, i, t, idx1, idx2;
603 IVITile *tile; 603 IVITile *tile;
604 uint16_t chksum;
605 604
606 band->buf = band->bufs[ctx->dst_buf]; 605 band->buf = band->bufs[ctx->dst_buf];
607 band->ref_buf = band->bufs[ctx->ref_buf]; 606 band->ref_buf = band->bufs[ctx->ref_buf];
608 band->data_ptr = ctx->frame_data + (get_bits_count(&ctx->gb) >> 3); 607 band->data_ptr = ctx->frame_data + (get_bits_count(&ctx->gb) >> 3);
609 608
672 FFSWAP(int16_t, band->rv_map->valtab[idx1], band->rv_map->valtab[idx2]); 671 FFSWAP(int16_t, band->rv_map->valtab[idx1], band->rv_map->valtab[idx2]);
673 } 672 }
674 673
675 #if IVI_DEBUG 674 #if IVI_DEBUG
676 if (band->checksum_present) { 675 if (band->checksum_present) {
677 chksum = ivi_calc_band_checksum(band); 676 uint16_t chksum = ivi_calc_band_checksum(band);
678 if (chksum != band->checksum) { 677 if (chksum != band->checksum) {
679 av_log(avctx, AV_LOG_ERROR, 678 av_log(avctx, AV_LOG_ERROR,
680 "Band checksum mismatch! Plane %d, band %d, received: %x, calculated: %x\n", 679 "Band checksum mismatch! Plane %d, band %d, received: %x, calculated: %x\n",
681 band->plane, band->band_num, band->checksum, chksum); 680 band->plane, band->band_num, band->checksum, chksum);
682 } 681 }