summaryrefslogtreecommitdiff
path: root/libavfilter/vf_crop.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-09-24 23:14:01 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-09-24 23:14:01 +0000
commit2bc05d35470d5a18f9c6d2d10be9c1c8ddc2f634 (patch)
treec861f42870be72be249487c5b9f5b6e65bc9f143 /libavfilter/vf_crop.c
parentd66a546f77391cbac6e0453f4d76791ed94a61a2 (diff)
Change the syntax of the crop filter from x:y:w:h to w:h:x:y.
Slightly more intuitive and required by a pending changes for making the filter parametric. Originally committed as revision 25184 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/vf_crop.c')
-rw-r--r--libavfilter/vf_crop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 4f8a382fa2..dfbc223483 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -73,7 +73,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
CropContext *crop = ctx->priv;
if (args)
- sscanf(args, "%d:%d:%d:%d", &crop->x, &crop->y, &crop->w, &crop->h);
+ sscanf(args, "%d:%d:%d:%d", &crop->w, &crop->h, &crop->x, &crop->y);
return 0;
}
@@ -96,8 +96,8 @@ static int config_input(AVFilterLink *link)
crop->x &= ~((1 << crop->hsub) - 1);
crop->y &= ~((1 << crop->vsub) - 1);
- av_log(link->dst, AV_LOG_INFO, "x:%d y:%d w:%d h:%d\n",
- crop->x, crop->y, crop->w, crop->h);
+ av_log(link->dst, AV_LOG_INFO, "w:%d h:%d x:%d y:%d\n",
+ crop->w, crop->h, crop->x, crop->y);
if (crop->x < 0 || crop->y < 0 ||
crop->w <= 0 || crop->h <= 0 ||
@@ -172,7 +172,7 @@ static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
AVFilter avfilter_vf_crop = {
.name = "crop",
- .description = NULL_IF_CONFIG_SMALL("Crop the input video to x:y:width:height."),
+ .description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."),
.priv_size = sizeof(CropContext),