band->inv_transform = transforms[transform_id].inv_trans;
band->dc_transform = transforms[transform_id].dc_trans;
band->is_2d_trans = transforms[transform_id].is_2d_trans;
+ band->transform_size= (transform_id < 10) ? 8 : 4;
scan_indx = get_bits(&ctx->gb, 4);
- if ((scan_indx>4 && scan_indx<10) != (band->blk_size==4)) {
- av_log(avctx, AV_LOG_ERROR, "mismatching scan table!\n");
- return AVERROR_INVALIDDATA;
- }
if (scan_indx == 15) {
av_log(avctx, AV_LOG_ERROR, "Custom scan pattern encountered!\n");
return AVERROR_INVALIDDATA;
}
- if (band->blk_size != 4)
+ if (scan_indx > 4 && scan_indx < 10) {
- } else if (band->blk_size != 8)
++ if (band->blk_size != 4) {
++ av_log(avctx, AV_LOG_ERROR, "mismatching scan table!\n");
+ return AVERROR_INVALIDDATA;
++ }
++ } else if (band->blk_size != 8) {
++ av_log(avctx, AV_LOG_ERROR, "mismatching scan table!\n");
+ return AVERROR_INVALIDDATA;
++ }
+
band->scan = scan_index_to_tab[scan_indx];
+ band->scan_size = band->blk_size;
- band->quant_mat = get_bits(&ctx->gb, 5);
- if (band->quant_mat == 31) {
+ quant_mat = get_bits(&ctx->gb, 5);
+ if (quant_mat == 31) {
av_log(avctx, AV_LOG_ERROR, "Custom quant matrix encountered!\n");
return AVERROR_INVALIDDATA;
}