Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-06-19 Thread James Almer
On 6/19/2016 4:52 PM, Thomas Mundt wrote:
> James Almer schrieb am So, 19.6.2016:
>> On 2/7/2016 8:39 PM, Thomas Mundt wrote:
>>> + at item deint
>>> +Specify which frames to deinterlace. Accept one of the following
>>> +values:
>>> + 
>>> + at table @option
>>> + at item 0, all
>>> +Deinterlace all frames.
>>> + at item 1, interlaced
>>> +Only deinterlace frames marked as interlaced.
>>> + at end table
>>> + 
>>> +The default value is @code{all}.
>>
>> This...
>>
>> [...]
>>
>>> +{ "deint", "specify which frames to deinterlace", OFFSET(deint), 
>>> AV_OPT_TYPE_INT, {.i64=BWDIF_DEINT_INTERLACED}, 0, 1, FLAGS, "deint" },
>>
>> ...and this don't match. So either fix the docs line or change the
>> default here.
>> Bump lavfi micro version of you change the default.
>>
>> For the record, every other deinterlace filter seems to default to
>> "all".
>>
>>> +CONST("all","deinterlace all frames",   
>>> BWDIF_DEINT_ALL,"deint"),
>>> +CONST("interlaced", "only deinterlace frames marked as interlaced", 
>>> BWDIF_DEINT_INTERLACED, "deint"),
> 
> Oops, I also placed the documentation at the wrong alphabetical position.
> Patches attached.
> Sorry about that!!
> 
> Thomas

Both applied, thanks!

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-06-19 Thread Thomas Mundt
James Almer schrieb am So, 19.6.2016:
>On 2/7/2016 8:39 PM, Thomas Mundt wrote:
>> + at item deint
>> +Specify which frames to deinterlace. Accept one of the following
>> +values:
>> + 
>> + at table @option
>> + at item 0, all
>> +Deinterlace all frames.
>> + at item 1, interlaced
>> +Only deinterlace frames marked as interlaced.
>> + at end table
>> + 
>> +The default value is @code{all}.
>
>This...
>
>[...]
>
>> +{ "deint", "specify which frames to deinterlace", OFFSET(deint), 
>> AV_OPT_TYPE_INT, {.i64=BWDIF_DEINT_INTERLACED}, 0, 1, FLAGS, "deint" },
>
>...and this don't match. So either fix the docs line or change the
>default here.
>Bump lavfi micro version of you change the default.
>
>For the record, every other deinterlace filter seems to default to
>"all".
>
>> +CONST("all","deinterlace all frames",   
>> BWDIF_DEINT_ALL,"deint"),
>> +CONST("interlaced", "only deinterlace frames marked as interlaced", 
>> BWDIF_DEINT_INTERLACED, "deint"),

Oops, I also placed the documentation at the wrong alphabetical position.
Patches attached.
Sorry about that!!

Thomas

0001-avfilter-vf_bwdif-Change-default-to-deinterlace-all-.patch
Description: Binary data


0002-doc-filters.texi-Move-bwdif-to-correct-alphabetical-.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-06-19 Thread James Almer
On 2/7/2016 8:39 PM, Thomas Mundt wrote:
> +@item deint
> +Specify which frames to deinterlace. Accept one of the following
> +values:
> + 
> +@table @option
> +@item 0, all
> +Deinterlace all frames.
> +@item 1, interlaced
> +Only deinterlace frames marked as interlaced.
> +@end table
> + 
> +The default value is @code{all}.

This...

[...]

> +{ "deint", "specify which frames to deinterlace", OFFSET(deint), 
> AV_OPT_TYPE_INT, {.i64=BWDIF_DEINT_INTERLACED}, 0, 1, FLAGS, "deint" },

...and this don't match. So either fix the docs line or change the
default here.
Bump lavfi micro version of you change the default.

For the record, every other deinterlace filter seems to default to
"all".

> +CONST("all","deinterlace all frames",   
> BWDIF_DEINT_ALL,"deint"),
> +CONST("interlaced", "only deinterlace frames marked as interlaced", 
> BWDIF_DEINT_INTERLACED, "deint"),

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-18 Thread Thomas Mundt
>>> Paul B Mahol  schrieb am Mi, 17.2.2016:
>  If nobody plans to comment on code I will apply this soon.

I´ve seen you applied it. Thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-17 Thread Paul B Mahol
On 2/16/16, Thomas Mundt  wrote:
 Paul B Mahol  schrieb am Di, 16.2.2016:
> On 2/8/16, Thomas Mundt  wrote:
>> Hendrik Leppkes  schrieb am Mo, 8.2.2016:
 How does the speed compare to YADIF?
 Or in other words, is it usable in real-time, or rather designed for
 offline processing?

>>> YADIF is quicker, because of its CPU optimizations. Without CPU
>>> optimizations BobWeaver is quicker.
>>> It should definitely be usable in real-time.
>>
>> Could you provide samples when this filters gives better output than
>> yadif/w3fdif ?
>
> I've uploaded some samples for comparison:
>
> http://free-vsts.com/files/bwdif_w3fdif_yadif.zip
>
> I used the same command for all competitors:
> ffmpeg -i xxx_orig.mp4 -vf DEINTERLACER -r 50 -aspect 16:9 -vcodec libx264
> -crf 18 out.mp4
> bwdif  DEINTERLACER: bwdif
> yadif  DEINTERLACER: yadif=1
> w3fdif DEINTERLACER: w3fdif=filter=complex
>
> For comparison of moving interlaced scenes I've uploaded the sample
> parkjoy(pj).
> This is difficult for deinterlacers and doesn't look very good with all
> competitors. Yadif makes kind of a watercolor effect. W3fdif is much closer
> to the original progressive parkjoy source file. BobWeaver is very close to
> w3fdif, but shows less artefacts especially in moving front trees.
>
> For comparison of still interlaced scenes I've uploaded the samples kiosk
> and bars.
> Here w3fdif shows jigging because of its absent still pixel detection. Yadif
> and BobWeaver are fine. With sample bars only BobWeaver shows the correct 3
> white lines in the timecode. I don't have original progressive versions of
> kiosk and bars, since this is broadcast content.

If nobody plans to comment on code I will apply this soon.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-16 Thread Thomas Mundt
>>> Paul B Mahol  schrieb am Di, 16.2.2016:
 On 2/8/16, Thomas Mundt  wrote:
> Hendrik Leppkes  schrieb am Mo, 8.2.2016:
>>> How does the speed compare to YADIF?
>>> Or in other words, is it usable in real-time, or rather designed for
>>> offline processing?
>>>
>> YADIF is quicker, because of its CPU optimizations. Without CPU
>> optimizations BobWeaver is quicker.
>> It should definitely be usable in real-time.
>
> Could you provide samples when this filters gives better output than
> yadif/w3fdif ?

I´ve uploaded some samples for comparison:

http://free-vsts.com/files/bwdif_w3fdif_yadif.zip

I used the same command for all competitors:
ffmpeg -i xxx_orig.mp4 -vf DEINTERLACER -r 50 -aspect 16:9 -vcodec libx264 -crf 
18 out.mp4
bwdif  DEINTERLACER: bwdif
yadif  DEINTERLACER: yadif=1
w3fdif DEINTERLACER: w3fdif=filter=complex

For comparison of moving interlaced scenes I´ve uploaded the sample parkjoy(pj).
This is difficult for deinterlacers and doesn´t look very good with all 
competitors. Yadif makes kind of a watercolor effect. W3fdif is much closer to 
the original progressive parkjoy source file. BobWeaver is very close to 
w3fdif, but shows less artefacts especially in moving front trees.

For comparison of still interlaced scenes I´ve uploaded the samples kiosk and 
bars.
Here w3fdif shows jigging because of its absent still pixel detection. Yadif 
and BobWeaver are fine. With sample bars only BobWeaver shows the correct 3 
white lines in the timecode. I don´t have original progressive versions of 
kiosk and bars, since this is broadcast content.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-16 Thread Thomas Mundt
>>> Paul B Mahol  schrieb am Di, 16.2.2016:On 2/8/16, Thomas 
>>> Mundt  wrote:
> Hendrik Leppkes  schrieb am Mo, 8.2.2016:
>>> How does the speed compare to YADIF?
>>> Or in other words, is it usable in real-time, or rather designed for
>>> offline processing?
>>>
>> YADIF is quicker, because of its CPU optimizations. Without CPU
>> optimizations BobWeaver is quicker.
>> It should definitely be usable in real-time.
> 
> Could you provide samples when this filters gives better output than
> yadif/w3fdif ?

Shure. Is there an intended place where I can upload them or is it free choice?
Please note that the output is not better than yadif AND w3dif. But it will 
look like yadif when yadif is better than w3fdif and look like w3fdif when 
w3fdif is better than yadif.
I´m at work atm, but will upload the samples tonight.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-16 Thread Paul B Mahol
On 2/8/16, Thomas Mundt  wrote:
 Hendrik Leppkes  schrieb am Mo, 8.2.2016:
>> How does the speed compare to YADIF?
>> Or in other words, is it usable in real-time, or rather designed for
>> offline processing?
>>
> YADIF is quicker, because of its CPU optimizations. Without CPU
> optimizations BobWeaver is quicker.
> It should definitely be usable in real-time.

Could you provide samples when this filters gives better output than
yadif/w3fdif ?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-08 Thread Thomas Mundt
I forgot one information:
With yadif and w3fdif the temporal interpolation of the first and last field of 
a source file tend to result in heavy artefacts at fast motions. Therefore 
BobWeaver uses spatial cubic interpolation at first and last field.
That´s the filter_intra function.
I attached the same version of the patch. But this time as git format patch.


0001-avfilter-add-BobWeaver-deinterlacing-filter.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-08 Thread Hendrik Leppkes
On Mon, Feb 8, 2016 at 12:24 PM, Thomas Mundt
 wrote:
> I forgot one information:
> With yadif and w3fdif the temporal interpolation of the first and last field 
> of a source file tend to result in heavy artefacts at fast motions. Therefore 
> BobWeaver uses spatial cubic interpolation at first and last field.
> That´s the filter_intra function.
> I attached the same version of the patch. But this time as git format patch.
>

How does the speed compare to YADIF?
Or in other words, is it usable in real-time, or rather designed for
offline processing?

- Hendrik
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-08 Thread Thomas Mundt
>>> Hendrik Leppkes  schrieb am Mo, 8.2.2016:
> How does the speed compare to YADIF?
> Or in other words, is it usable in real-time, or rather designed for
> offline processing?
> 
YADIF is quicker, because of its CPU optimizations. Without CPU optimizations 
BobWeaver is quicker.
It should definitely be usable in real-time.

Thomas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avfilter: add BobWeaver deinterlacing filter

2016-02-07 Thread Thomas Mundt
Hi,
last years I did many quality tests with commercial broadcast transcoder 
software for SD/HD conversions.
Aside from few exeptions the weak point always was the deinterlacer. This was 
even more visible with new OLED monitors.
Here artefacts from edge directed interpolation are much more eye-catching than 
with TFTs.
I also tested ffmpeg deinterlacers. It was interesting to see that each one has 
its pros and cons.
Yadif has a very good detection of still and very slow moving parts of the 
picture, but invites many artefacts and slightly blurs the rest.
W3fdif performs well at slow and medium motion, but jiggles stills and traces 
the adjacent fields. Especially visible at scene changes and horizontal lines 
at fast vertical motion.
The attached deinterlacer tries to combine the advantages of both and uses 
cubic interpolation when temporal difference exeeds spatial difference for the 
interpolated pixel. This is far from perfect, but gives very homogenous results 
and is pretty fast. CPU optimizations of course would make it even faster, but 
I´m totally clueless about that.
I used the yadif code as basis. Due to quality requirements the slightly 
modified yadif spatial interlacing check is always on. Also the w3fdif complex 
filter.
Please test and comment.
And sorry for the stupid name...


attachment.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel