for(x=0; x<w; x++){
int i= line[x];
if(i<0){
- line[x]= -((-i*qmul + qadd)>>(QEXPSHIFT)); //FIXME try different bias
+ line[x]= -((-i*(unsigned)qmul + qadd)>>(QEXPSHIFT)); //FIXME try different bias
}else if(i>0){
- line[x]= (( i*qmul + qadd)>>(QEXPSHIFT));
+ line[x]= (( i*(unsigned)qmul + qadd)>>(QEXPSHIFT));
}
}
}
av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size\n", s->spatial_decomposition_count);
return AVERROR_INVALIDDATA;
}
+ if (s->avctx->width > 65536-4) {
+ av_log(s->avctx, AV_LOG_ERROR, "Width %d is too large\n", s->avctx->width);
+ return AVERROR_INVALIDDATA;
+ }
s->qlog += get_symbol(&s->c, s->header_state, 1);
s->block_max_depth= 0;
return AVERROR_INVALIDDATA;
}
+ if (FFABS(s->qbias) > 127) {
+ av_log(s->avctx, AV_LOG_ERROR, "qbias %d is too large\n", s->qbias);
+ s->qbias = 0;
+ return AVERROR_INVALIDDATA;
+ }
return 0;
}
}
}
- {
for(level=0; level<s->spatial_decomposition_count; level++){
for(orientation=level ? 1 : 0; orientation<4; orientation++){
SubBand *b= &p->band[level][orientation];
unpack_coeffs(s, b, b->parent, orientation);
}
}
- }
{
const int mb_h= s->b_height << s->block_max_depth;