diff motion_est.c @ 2327:5e5cf598a48b libavcodec

H.261 encoder by (Maarten Daniels <maarten dot daniels at luc dot ac dot be>)
author michael
date Thu, 28 Oct 2004 10:12:57 +0000
parents 857e16e85aea
children 643724c609ff
line wrap: on
line diff
--- a/motion_est.c	Wed Oct 27 21:42:26 2004 +0000
+++ b/motion_est.c	Thu Oct 28 10:12:57 2004 +0000
@@ -279,6 +279,10 @@
         c->hpel_put[2][2]= c->hpel_put[2][3]= zero_hpel;
     }
 
+    if(s->codec_id == CODEC_ID_H261){
+        c->sub_motion_search= no_sub_motion_search;
+    }
+
     c->temp= c->scratchpad;
 }
       
@@ -691,6 +695,12 @@
         c->ymin = - y - 16;
         c->xmax = - x + s->mb_width *16;
         c->ymax = - y + s->mb_height*16;
+    } else if (s->out_format == FMT_H261){
+        // Search range of H261 is different from other codec standards
+        c->xmin = (x > 15) ? - 15 : 0;
+        c->ymin = (y > 15) ? - 15 : 0;
+        c->xmax = (x < s->mb_width * 16 - 16) ? 15 : 0;              
+        c->ymax = (y < s->mb_height * 16 - 16) ? 15 : 0;
     } else {
         c->xmin = - x;
         c->ymin = - y;