]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/motion_est.c
mpeg12: Move finding the best frame rate to common code
[ffmpeg] / libavcodec / motion_est.c
index 657c28a02de7c15221948869926e10c646333e65..c6dd3b86afb2bc311052c8a24a036f9403204d3e 100644 (file)
@@ -202,7 +202,7 @@ static av_always_inline int cmp_inline(MpegEncContext *s, const int x, const int
                     cx= (cx>>1)|(cx&1);
                     cy= (cy>>1)|(cy&1);
                     uvdxy= (cx&1) + 2*(cy&1);
-                    //FIXME x/y wrong, but mpeg4 qpel is sick anyway, we should drop as much of it as possible in favor for h264
+                    // FIXME x/y wrong, but MPEG-4 qpel is sick anyway, we should drop as much of it as possible in favor for H.264
                 }
             }else{
                 c->hpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride, h);
@@ -310,25 +310,6 @@ int ff_init_me(MpegEncContext *s){
         return -1;
     }
 
-#if FF_API_MOTION_EST
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (s->motion_est == FF_ME_EPZS) {
-        if (s->me_method == ME_ZERO)
-            s->motion_est = FF_ME_ZERO;
-        else if (s->me_method == ME_EPZS)
-            s->motion_est = FF_ME_EPZS;
-        else if (s->me_method == ME_X1)
-            s->motion_est = FF_ME_XONE;
-        else {
-            av_log(s->avctx, AV_LOG_ERROR,
-                   "me_method is only allowed to be set to zero and epzs; "
-                   "for hex,umh,full and others see dia_size\n");
-            return -1;
-        }
-    }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     c->avctx= s->avctx;
 
     if(cache_size < 2*dia_size && !c->stride){
@@ -547,7 +528,7 @@ static inline void get_limits(MpegEncContext *s, int x, int y)
         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
+        // Search range of H.261 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;
@@ -936,7 +917,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
             if (s->out_format == FMT_H263) {
                 c->pred_x = P_MEDIAN[0];
                 c->pred_y = P_MEDIAN[1];
-            } else { /* mpeg1 at least */
+            } else { /* MPEG-1 at least */
                 c->pred_x = P_LEFT[0];
                 c->pred_y = P_LEFT[1];
             }
@@ -1506,7 +1487,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
         dmin= direct_search(s, mb_x, mb_y);
     else
         dmin= INT_MAX;
-//FIXME penalty stuff for non mpeg4
+// FIXME penalty stuff for non-MPEG-4
     c->skip=0;
     fmin = estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code) +
            3 * penalty_factor;
@@ -1684,7 +1665,6 @@ void ff_fix_long_p_mvs(MpegEncContext * s)
 }
 
 /**
- *
  * @param truncate 1 for truncation, 0 for using intra
  */
 void ff_fix_long_mvs(MpegEncContext * s, uint8_t *field_select_table, int field_select,