[FFmpeg-cvslog] r19146 - trunk/ffmpeg.c

bcoudurier subversion
Thu Jun 11 06:07:30 CEST 2009


Author: bcoudurier
Date: Thu Jun 11 06:07:29 2009
New Revision: 19146

Log:
Remove even condition on pad and crop.
Odd padding or cropping is needed when encoders only support
even resolution.

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Wed Jun 10 22:50:53 2009	(r19145)
+++ trunk/ffmpeg.c	Thu Jun 11 06:07:29 2009	(r19146)
@@ -2384,10 +2384,6 @@ static void opt_frame_crop_top(const cha
         fprintf(stderr, "Incorrect top crop size\n");
         av_exit(1);
     }
-    if ((frame_topBand % 2) != 0) {
-        fprintf(stderr, "Top crop size must be a multiple of 2\n");
-        av_exit(1);
-    }
     if ((frame_topBand) >= frame_height){
         fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
         av_exit(1);
@@ -2402,10 +2398,6 @@ static void opt_frame_crop_bottom(const 
         fprintf(stderr, "Incorrect bottom crop size\n");
         av_exit(1);
     }
-    if ((frame_bottomBand % 2) != 0) {
-        fprintf(stderr, "Bottom crop size must be a multiple of 2\n");
-        av_exit(1);
-    }
     if ((frame_bottomBand) >= frame_height){
         fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
         av_exit(1);
@@ -2420,10 +2412,6 @@ static void opt_frame_crop_left(const ch
         fprintf(stderr, "Incorrect left crop size\n");
         av_exit(1);
     }
-    if ((frame_leftBand % 2) != 0) {
-        fprintf(stderr, "Left crop size must be a multiple of 2\n");
-        av_exit(1);
-    }
     if ((frame_leftBand) >= frame_width){
         fprintf(stderr, "Horizontal crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
         av_exit(1);
@@ -2438,10 +2426,6 @@ static void opt_frame_crop_right(const c
         fprintf(stderr, "Incorrect right crop size\n");
         av_exit(1);
     }
-    if ((frame_rightBand % 2) != 0) {
-        fprintf(stderr, "Right crop size must be a multiple of 2\n");
-        av_exit(1);
-    }
     if ((frame_rightBand) >= frame_width){
         fprintf(stderr, "Horizontal crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
         av_exit(1);
@@ -2483,10 +2467,6 @@ static void opt_frame_pad_top(const char
         fprintf(stderr, "Incorrect top pad size\n");
         av_exit(1);
     }
-    if ((frame_padtop % 2) != 0) {
-        fprintf(stderr, "Top pad size must be a multiple of 2\n");
-        av_exit(1);
-    }
 }
 
 static void opt_frame_pad_bottom(const char *arg)
@@ -2496,10 +2476,6 @@ static void opt_frame_pad_bottom(const c
         fprintf(stderr, "Incorrect bottom pad size\n");
         av_exit(1);
     }
-    if ((frame_padbottom % 2) != 0) {
-        fprintf(stderr, "Bottom pad size must be a multiple of 2\n");
-        av_exit(1);
-    }
 }
 
 
@@ -2510,10 +2486,6 @@ static void opt_frame_pad_left(const cha
         fprintf(stderr, "Incorrect left pad size\n");
         av_exit(1);
     }
-    if ((frame_padleft % 2) != 0) {
-        fprintf(stderr, "Left pad size must be a multiple of 2\n");
-        av_exit(1);
-    }
 }
 
 
@@ -2524,10 +2496,6 @@ static void opt_frame_pad_right(const ch
         fprintf(stderr, "Incorrect right pad size\n");
         av_exit(1);
     }
-    if ((frame_padright % 2) != 0) {
-        fprintf(stderr, "Right pad size must be a multiple of 2\n");
-        av_exit(1);
-    }
 }
 
 static void list_fmts(void (*get_fmt_string)(char *buf, int buf_size, int fmt), int nb_fmts)



More information about the ffmpeg-cvslog mailing list