Commit 58c9c03f authored by bcoudurier's avatar bcoudurier

Remove even condition on pad and crop.

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
parent 6ae9cda7
...@@ -2384,10 +2384,6 @@ static void opt_frame_crop_top(const char *arg) ...@@ -2384,10 +2384,6 @@ static void opt_frame_crop_top(const char *arg)
fprintf(stderr, "Incorrect top crop size\n"); fprintf(stderr, "Incorrect top crop size\n");
av_exit(1); 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){ 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"); fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
av_exit(1); av_exit(1);
...@@ -2402,10 +2398,6 @@ static void opt_frame_crop_bottom(const char *arg) ...@@ -2402,10 +2398,6 @@ static void opt_frame_crop_bottom(const char *arg)
fprintf(stderr, "Incorrect bottom crop size\n"); fprintf(stderr, "Incorrect bottom crop size\n");
av_exit(1); 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){ 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"); fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
av_exit(1); av_exit(1);
...@@ -2420,10 +2412,6 @@ static void opt_frame_crop_left(const char *arg) ...@@ -2420,10 +2412,6 @@ static void opt_frame_crop_left(const char *arg)
fprintf(stderr, "Incorrect left crop size\n"); fprintf(stderr, "Incorrect left crop size\n");
av_exit(1); 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){ 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"); fprintf(stderr, "Horizontal crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
av_exit(1); av_exit(1);
...@@ -2438,10 +2426,6 @@ static void opt_frame_crop_right(const char *arg) ...@@ -2438,10 +2426,6 @@ static void opt_frame_crop_right(const char *arg)
fprintf(stderr, "Incorrect right crop size\n"); fprintf(stderr, "Incorrect right crop size\n");
av_exit(1); 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){ 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"); fprintf(stderr, "Horizontal crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
av_exit(1); av_exit(1);
...@@ -2483,10 +2467,6 @@ static void opt_frame_pad_top(const char *arg) ...@@ -2483,10 +2467,6 @@ static void opt_frame_pad_top(const char *arg)
fprintf(stderr, "Incorrect top pad size\n"); fprintf(stderr, "Incorrect top pad size\n");
av_exit(1); 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) static void opt_frame_pad_bottom(const char *arg)
...@@ -2496,10 +2476,6 @@ 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"); fprintf(stderr, "Incorrect bottom pad size\n");
av_exit(1); 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) ...@@ -2510,10 +2486,6 @@ static void opt_frame_pad_left(const char *arg)
fprintf(stderr, "Incorrect left pad size\n"); fprintf(stderr, "Incorrect left pad size\n");
av_exit(1); 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) ...@@ -2524,10 +2496,6 @@ static void opt_frame_pad_right(const char *arg)
fprintf(stderr, "Incorrect right pad size\n"); fprintf(stderr, "Incorrect right pad size\n");
av_exit(1); 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) static void list_fmts(void (*get_fmt_string)(char *buf, int buf_size, int fmt), int nb_fmts)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment