[FFmpeg-devel] [PATCH] Add "progressive" to the options that "setfield" can force

Tim Nicholson nichot20 at yahoo.com
Fri Apr 20 12:02:29 CEST 2012


On 18/04/12 17:27, Nicolas George wrote:
> Le decadi 30 germinal, an CCXX, Tim Nicholson a écrit :
>> This patch adds the option to force the property of a video stream to be
>> progressive in addition to the existing auto/tff/bff options. It should
>> be useful in situations where progressive material is in a stream
>> flagged as interlaced to override filters that honour this flag.
>> -- 
>> Tim
> 
>> >From d833fea6cd9d3fddab07260d7c6d2b2803d598b8 Mon Sep 17 00:00:00 2001
>> From: Tim Nicholson <Tim.Nicholson at bbc.co.uk>
>> Date: Wed, 18 Apr 2012 15:49:47 +0100
>> Subject: [PATCH] Add "progressive" option to setfield filter
> 
> Nit: "vf_setfueld: add "progressive" option".
> 
> Also, mention in the git message that the integer values are deprecated by
> this patch as well.
> 

done

>>[..]
> Unusual indentation.
> 

Hopefully done. The restructure below has changed things anyway

>>      }
>>  
>> -    if (setfield->top_field_first < -1 || setfield->top_field_first > 1) {
>> +    if (setfield->top_field_first < -1 || setfield->top_field_first > 2) {
>>          av_log(ctx, AV_LOG_ERROR,
>> -               "Provided integer value %d must be included between -1 and +1\n",
>> +               "Provided integer value %d must be included between -1 and +2\n",
>>                 setfield->top_field_first);
> 
> Nit: maybe move the integer check in the else just above, so it applies only
> to numeric values and can stay at -1 - 1. That way, people will not start
> using +2 despite the docs.
> 

done

>>          return AVERROR(EINVAL);
>>      }
>> @@ -63,7 +66,8 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
>>      SetFieldContext *setfield = inlink->dst->priv;
>>      AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0);
>>  
>> -    if (setfield->top_field_first != -1) {
>> +    if (setfield->top_field_first = 2) outpicref->video->interlaced = 0;
> 
> This looks like a == / = mistake.

My bad, done.

Attached hopefully fixes all comments.
-- 
Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vf_setfield-add-progressive-option.patch
Type: text/x-patch
Size: 3487 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120420/24d5fc79/attachment.bin>


More information about the ffmpeg-devel mailing list