Browse code

CANDIDATE_MB_TYPE_INTER heuristic doesnt work at really low quality where the distortion becomes less relevant then the overhead of intra blocks

Originally committed as revision 6829 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer authored on 2006/10/29 05:00:05
Showing 1 changed files
... ...
@@ -1299,7 +1299,8 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
1299 1299
 
1300 1300
         if (vard*2 + 200*256 > varc)
1301 1301
             mb_type|= CANDIDATE_MB_TYPE_INTRA;
1302
-        if (varc*2 + 200*256 > vard){
1302
+        if (varc*2 + 200*256 > vard || s->qscale > 24){
1303
+//        if (varc*2 + 200*256 + 50*(s->lambda2>>FF_LAMBDA_SHIFT) > vard){
1303 1304
             mb_type|= CANDIDATE_MB_TYPE_INTER;
1304 1305
             c->sub_motion_search(s, &mx, &my, dmin, 0, 0, 0, 16);
1305 1306
             if(s->flags&CODEC_FLAG_MV0)