int i;
const int maxlevel= s->max_qcoeff;
const int minlevel= s->min_qcoeff;
+ int overflow=0;
if(s->mb_intra){
i=1; //skip clipping of intra dc
const int j= s->intra_scantable.permutated[i];
int level = block[j];
- if (level>maxlevel) level=maxlevel;
- else if(level<minlevel) level=minlevel;
-
+ if (level>maxlevel){
+ level=maxlevel;
+ overflow++;
+ }else if(level<minlevel){
+ level=minlevel;
+ overflow++;
+ }
+
block[j]= level;
}
+
+ if(overflow && s->avctx->mb_decision == FF_MB_DECISION_SIMPLE)
+ av_log(s->avctx, AV_LOG_INFO, "warning, cliping %d dct coefficents to %d..%d\n", overflow, minlevel, maxlevel);
}
#if 0