# HG changeset patch # User michael # Date 1073227432 0 # Node ID 7e040c2a86e4ae68d7b5b50e239389c1c831247e # Parent 8158e66f1f75583b3868209c00d5063d30ec5c16 warn the user if we had to clip some dct coefficient due to a crappy format which doenst support the whole needed range (msmpeg4/wmv mostly but mpeg1 too to a lesser extend) diff -r 8158e66f1f75 -r 7e040c2a86e4 mpegvideo.c --- a/mpegvideo.c Sun Jan 04 00:23:14 2004 +0000 +++ b/mpegvideo.c Sun Jan 04 14:43:52 2004 +0000 @@ -3140,6 +3140,7 @@ 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 @@ -3150,11 +3151,19 @@ const int j= s->intra_scantable.permutated[i]; int level = block[j]; - if (level>maxlevel) level=maxlevel; - else if(levelmaxlevel){ + level=maxlevel; + overflow++; + }else if(levelavctx->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