[FFmpeg-devel] [PATCH] vf_mp: remove blackframe filter wrapper

Ivan Kalvachev ikalvachev at gmail.com
Sun Jul 24 01:44:00 CEST 2011


On 7/18/11, Stefano Sabatini <stefano.sabatini-lala at poste.it> wrote:
> On date Sunday 2011-07-17 20:30:09 +0200, Michael Niedermayer encoded:
>> On Sun, Jul 17, 2011 at 05:10:34PM +0200, Stefano Sabatini wrote:
>> > blackframe is integrated as a native filter, also the wrapper doesn't
>> > seem to work fine.
>> > ---
>> >  doc/filters.texi                        |    1 -
>> >  libavfilter/Makefile                    |    1 -
>> >  libavfilter/libmpcodecs/vf_blackframe.c |  148
>> > -------------------------------
>> >  libavfilter/vf_mp.c                     |    2 -
>> >  4 files changed, 0 insertions(+), 152 deletions(-)
>> >  delete mode 100644 libavfilter/libmpcodecs/vf_blackframe.c
>>
>> LGTM if our filter was tested against the mplayer filter in
>> mencoder/mplayer
>
> $ ffplay INPUT -vf mp=blackframe
> [...]
> [mp @ 0x9ab00c0] This is a unholy filter, it will be purified by the ffmpeg
> exorcist team
> which will change its syntax from dark -vf mp to light -vf.
> Thou shalst not make spells or scripts that depend on it
>
> NO OUTPUT...
>
> $ ffplay INPUT -vf blackframe
> [...]
> [blackframe @ 0xb3400b40] bamount:98 bthresh:32
> [blackframe @ 0xb3400b40] frame:0 pblack:100 pos:67 pts:0 t:0.000000 type:I
> last_keyframe:0
> [blackframe @ 0xb3400b40] frame:1 pblack:100 pos:6290 pts:1201 t:1.201000
> type:P last_keyframe:0
> [blackframe @ 0xb3400b40] frame:2 pblack:100 pos:7007 pts:1235 t:1.235000
> type:I last_keyframe:2
> [blackframe @ 0xb3400b40] frame:3 pblack:100 pos:9214 pts:1268 t:1.268000
> type:I last_keyframe:3
> [blackframe @ 0xb3400b40] frame:4 pblack:100 pos:12187 pts:1335 t:1.335000
> type:I last_keyframe:4
> [blackframe @ 0xb3400b40] frame:5 pblack:100 pos:14775 pts:1368 t:1.368000
> type:P last_keyframe:4
> [blackframe @ 0xb3400b40] frame:6 pblack:100 pos:15161 pts:1401 t:1.401000
> type:P last_keyframe:4
> [blackframe @ 0xb3400b40] frame:7 pblack:99 pos:15702 pts:1435 t:1.435000
> type:I last_keyframe:7
> ...
>
> $ mplayer INPUT -vf mp=blackframe
> [...]
> vf_blackframe: 0, 100%, I (I:0)
> vf_blackframe: 1, 100%, P (I:0)t:  0.000   0/  0 ??% ??% ??,?% 0 0
> vf_blackframe: 2, 100%, I (I:2)t:  0.018   0/  0 15%  0%  0.7% 1 0
> vf_blackframe: 3, 100%, I (I:3)t:  0.034   0/  0 15%  0%  0.7% 1 0
> vf_blackframe: 4, 100%, P (I:3)t:  0.049   0/  0 15%  0%  0.7% 1 0
> vf_blackframe: 5, 100%, I (I:5)t:  0.062   0/  0 14%  0%  0.7% 1 0
> vf_blackframe: 6, 100%, P (I:5)t:  0.074   0/  0 14%  0%  0.7% 1 0
> vf_blackframe: 7, 100%, P (I:5)t:  0.085   0/  0 14%  0%  0.7% 1 0
> vf_blackframe: 8, 99%, I (I:8)ct:  0.095   0/  0 13%  0%  0.7% 1 0
> A:   4.6 V:   4.6 A-V: -0.004 ct:  0.186   0/  0  4%  0%  0.9% 1 0
> ...
>
> lavfi blackframe output is consistent with that of showinfo:
> [showinfo @ 0xb2d00c00] n:0 pts:0 pts_time:0.000000 pos:67 fmt:yuv420p
> sar:0/1 s:320x240 i:P iskey:1 type:I checksum:928957811
> plane_checksum:[900907278 732660267 732660267 0]
> [showinfo @ 0xb2d00c00] n:1 pts:1201 pts_time:1.201000 pos:6290 fmt:yuv420p
> sar:0/1 s:320x240 i:P iskey:0 type:P checksum:928957811
> plane_checksum:[900907278 732660267 732660267 0]
> [showinfo @ 0xb2d00c00] n:2 pts:1235 pts_time:1.235000 pos:7007 fmt:yuv420p
> sar:0/1 s:320x240 i:P iskey:1 type:I checksum:2383302752
> plane_checksum:[1592252780 4154258603 732660267 0]
> [showinfo @ 0xb2d00c00] n:3 pts:1268 pts_time:1.268000 pos:9214 fmt:yuv420p
> sar:0/1 s:320x240 i:P iskey:1 type:I checksum:2564156591
> plane_checksum:[4108869898 3951822778 3879109611 0]
> [showinfo @ 0xb2d00c00] n:4 pts:1335 pts_time:1.335000 pos:12187 fmt:yuv420p
> sar:0/1 s:320x240 i:P iskey:1 type:I checksum:1175562317
> plane_checksum:[825423641 2075608186 2346413227 0]
> [showinfo @ 0xb2d00c00] n:5 pts:1368 pts_time:1.368000 pos:14775 fmt:yuv420p
> sar:0/1 s:320x240 i:P iskey:0 type:P checksum:375761864
> plane_checksum:[2174810437 980632878 3000003910 0]
> [showinfo @ 0xb2d00c00] n:6 pts:1401 pts_time:1.401000 pos:15161 fmt:yuv420p
> sar:0/1 s:320x240 i:P iskey:0 type:P checksum:3711640053
> plane_checksum:[2441571687 1206339077 1027632762 0]
> [showinfo @ 0xb2d00c00] n:7 pts:1435 pts_time:1.435000 pos:15702 fmt:yuv420p
> sar:0/1 s:320x240 i:P iskey:1 type:I checksum:4248739321
> plane_checksum:[1932719749 2442216058 2970707179 0]
>
> Now there are some differences between mplayer/blackframe and
> lavfi/blackframe, but I don't feel like I want to debug MPlayer to
> understand what's the difference, and mp=blackframe is not working at
> all, so I see no point at keeping it.

No objections about the test and the removal.
However the difference is puzzling to me.
It seems that we have
012345678
IPIIPIPPI - MPlayer
IPII_IPPI - FFplay

If you take a look of the pts in the ffplay, you will see that pts
advances by 33/34, except on the place where the missing P frame is,
there it have duration of 67.
What is the format of the test file? (avi have repeat frames of size
0, so this is the first thing I thought of).

Well whatever the reason, it is clear it is not filter problem.

Best Regards.


More information about the ffmpeg-devel mailing list