[FFmpeg-devel] [PATCH] yadif does not copy video props

Baptiste Coudurier baptiste.coudurier
Sun Nov 21 04:14:35 CET 2010


On 10/4/10 3:32 PM, Michael Niedermayer wrote:
> On Mon, Oct 04, 2010 at 12:25:44PM -0700, Baptiste Coudurier wrote:
>> On 10/04/2010 03:45 AM, Michael Niedermayer wrote:
>>> On Sun, Oct 03, 2010 at 08:56:33PM -0700, Baptiste Coudurier wrote:
>>>> Hi,
>>>>
>>>> $subject.
>>>>
>>>> Copy video props and unset interlaced :)
>>>>
>>>> --
>>>> Baptiste COUDURIER
>>>> Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
>>>> FFmpeg maintainer                                  http://www.ffmpeg.org
>>>
>>>>   vf_yadif.c |    2 ++
>>>>   1 file changed, 2 insertions(+)
>>>> 9e59687e1e0c65aab1fa4b25b861a64de82e4c97  yadif_video_props.patch
>>>> Index: libavfilter/vf_yadif.c
>>>> ===================================================================
>>>> --- libavfilter/vf_yadif.c	(revision 25329)
>>>> +++ libavfilter/vf_yadif.c	(working copy)
>>>> @@ -177,6 +177,8 @@
>>>>
>>>>       if (is_second)
>>>>           avfilter_start_frame(ctx->outputs[0], yadif->out);
>>>> +    avfilter_copy_buffer_ref_props(yadif->out, yadif->cur);
>>>> +    yadif->out->video->interlaced = 0;
>>>>       avfilter_draw_slice(ctx->outputs[0], 0, link->h, 1);
>>>>       avfilter_end_frame(ctx->outputs[0]);
>>>>
>>>
>>> this should remove yadif->out->pts = yadif->cur->pts;
>>
>> Ok, so the change be moved in start_frame ?
> 
> probably not
> 
> my pts copy was just in start_frame because that way the second field
> would end with the default pts which should be AV_NOPTS_VALUE
> 
> 
>>
>>> and the second frame with field->frame mode should have its pts set to
>>> unknown or interpolated
>>
>> I was fearing that.
> 
> it should be trivial, we have the next frame already its a matter of
> if either is AV_NOPTS make it AV_NOPTS otherwise (a+b)/2
> 

Humm, something like that ?

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: yadif_video_props.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101120/a924c466/attachment.asc>



More information about the ffmpeg-devel mailing list