[FFmpeg-devel] [PATCH] avfilter/vf_crop: make it possible to crop single pixels from subsampled pixel formats

Paul B Mahol onemda at gmail.com
Sun Aug 21 00:52:05 EEST 2016


On 8/20/16, Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Sat, Aug 20, 2016 at 07:42:09PM +0200, Paul B Mahol wrote:
>> Hi,
>>
>> patch attached.
>
>>  vf_crop.c |    2 --
>>  1 file changed, 2 deletions(-)
>> fa7e5dd663b07c06f58f845cb3b519f8904e3bca
>> 0001-avfilter-vf_crop-make-it-possible-to-crop-single-pix.patch
>> From e9f380d9aab2f1f82183f05b91f37ec1e50bd6da Mon Sep 17 00:00:00 2001
>> From: Paul B Mahol <onemda at gmail.com>
>> Date: Sat, 20 Aug 2016 19:38:48 +0200
>> Subject: [PATCH] avfilter/vf_crop: make it possible to crop single pixels
>> from
>>  subsampled pixel formats
>>
>> ---
>>  libavfilter/vf_crop.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
>> index 01773fa..91cb3c0 100644
>> --- a/libavfilter/vf_crop.c
>> +++ b/libavfilter/vf_crop.c
>> @@ -184,8 +184,6 @@ static int config_input(AVFilterLink *link)
>>                 s->w_expr, s->h_expr);
>>          return AVERROR(EINVAL);
>>      }
>> -    s->w &= ~((1 << s->hsub) - 1);
>> -    s->h &= ~((1 << s->vsub) - 1);
>
> this might be unexpected for people that use expressions
> like w:h*aspectwhatever
> as they could get odd sized videos which might have issues playing
> on some devices
>
> I agree that when litteral numbers are specified the change makes
> sense

Then I will add option, by default turned off, to enable exact cropping.


More information about the ffmpeg-devel mailing list