]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Remove even condition on pad and crop.
authorbcoudurier <bcoudurier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 11 Jun 2009 04:07:29 +0000 (04:07 +0000)
committerbcoudurier <bcoudurier@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 11 Jun 2009 04:07:29 +0000 (04:07 +0000)
Odd padding or cropping is needed when encoders only support
even resolution.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19146 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

ffmpeg.c

index 9d035df4aac8b41bd1f1424ebc5cee5919bd4374..1c734c3f846da65b5f23c102eae1c0b651a7ce39 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2384,10 +2384,6 @@ static void opt_frame_crop_top(const char *arg)
         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 char *arg)
         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 char *arg)
         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 char *arg)
         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 *arg)
         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 char *arg)
         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 char *arg)
         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 char *arg)
         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)