[FFmpeg-devel] [PATCH] Add crop filter
Diego Biurrun
diego
Tue Oct 6 09:15:15 CEST 2009
On Tue, Oct 06, 2009 at 12:58:41AM +0200, Stefano Sabatini wrote:
>
> In attachment there is the exact copy of the crop filter you can find
> in the soc repo.
>
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ ffmpeg/libavfilter/vf_crop.c 2009-10-06 00:37:11.000000000 +0200
> @@ -0,0 +1,160 @@
> +
> +typedef struct
> +{
{ on the same line please
> + /* default parameters */
> + crop->x = 0;
> + crop->y = 0;
> + crop->w = -1;
> + crop->h = -1;
align
> + if(args)
if (, same below
> + if(crop->cw <= 0) crop->cw = link->w - crop->cx;
> + if(crop->ch <= 0) crop->ch = link->h - crop->cy;
ditto
> + switch(link->format) {
switch (
> + ref2->w = crop->cw;
> + ref2->h = crop->ch;
> + ref2->data[0] += crop->cy * ref2->linesize[0];
> + ref2->data[0] += crop->cx * crop->bpp;
align
> + for(i = 1; i < 4; i ++) {
for (
> + if(y >= crop->cy + crop->ch || y + h <= crop->cy) return;
Sometimes statements are on the next line, sometimes not. I'd place
them all on the next line.
> +AVFilter avfilter_vf_crop =
> +{
{ on the same line please
More information about the ffmpeg-devel
mailing list