mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-29 10:43:15 +00:00
Move dquant check into qscale overflow check.
This should be faster (couldnt meassue a difference), and its less picky on slightly out of spec dquant. Originally committed as revision 21373 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e380b9182b
commit
1f445f5473
@ -936,15 +936,15 @@ decode_intra_mb:
|
||||
|
||||
dquant= get_se_golomb(&s->gb);
|
||||
|
||||
if( dquant > 25 || dquant < -26 ){
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "dquant out of range (%d) at %d %d\n", dquant, s->mb_x, s->mb_y);
|
||||
return -1;
|
||||
}
|
||||
|
||||
s->qscale += dquant;
|
||||
|
||||
if(((unsigned)s->qscale) > 51){
|
||||
if(s->qscale<0) s->qscale+= 52;
|
||||
else s->qscale-= 52;
|
||||
if(((unsigned)s->qscale) > 51){
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "dquant out of range (%d) at %d %d\n", dquant, s->mb_x, s->mb_y);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
h->chroma_qp[0]= get_chroma_qp(h, 0, s->qscale);
|
||||
|
Loading…
Reference in New Issue
Block a user