[MPlayer-dev-eng] [PATCH] deinterlace property fix

Andy Furniss andyqos at ukfsn.org
Mon Oct 22 01:50:37 CEST 2012


Vicente Sendra wrote:
> --- El sáb, 20/10/12, Andy Furniss wrote:
>
>> De: Andy Furniss <andyqos at ukfsn.org>
>> Asunto: Re: [MPlayer-dev-eng] [PATCH] deinterlace property fix
>> Para: mplayer-dev-eng at mplayerhq.hu
>> CC: "Vicente Sendra" <visenri at yahoo.es>
>> Fecha: sábado, 20 de octubre, 2012 22:33
>> Vicente Sendra wrote:
>>> I've previously send a fix for command.c in:
>>> Better double frame rate output and framedrop
>>>
>>> But there was a bug in my code.
>>>
>>> This new one fixes old problem:
>>>
>>> Better handling of deinterlace property, returns
>> M_PROPERTY_ERROR if it can't be changed (or read), and
>> displays osd value correctly (when change was not successful
>> it showed the opposite value).
>>>
>>> And my bug:
>>>
>>> if VFCTRL_GET_DEINTERLACE was not successfull,
>> deinterlace value was undefined.
>>>
>>> I send it as a separate fix, as it's unrelated to new
>> framedrop system.
>>
>> I am interested in your work as I have been trying to get
>> field rate = refresh to work recently (I am sure long ago it
>> worked better than now, but this may be radeon/mesa related
>> rather than mplayer - or perhaps my test cases were
>> easier).
>>
>> Testing your framedrop patches + this one I see a problem
>> with -vo gl (I am not deinterlacing).
>>
>> A 50fps progressive HD file speeded up to 60fps to match
>> refresh works with vanilla mplayer, but drops lots of frames
>> with your patches.
>>
>> vblank_mode=2 mplayer -cache 20000 -demuxer lavf -speed
>> 30/25 -fs -lavdopts threads=4 -vo gl -framedrop samp50p.mkv
>>
>> One other thing - to deinterlace HD although I have 4x
>> 3.4Ghz CPUs I only really expect to be able to use tfields=0
>> or preferably -vo vdpau:deint=2 (radeon not nvidia - not
>> available without mesa hack) so if you plan on continuing
>> this good work maybe vdpau code needs a patch as well.
>
> Is it dropping frames if you play at it's normal speed (50fps)?

Yes and the sample below that I already had uploaded from a previous 
issue is 24 fps and also shows it.

> What screen refresh rate are you using?, if you are using 60fps (and playing at 60fps), my new frame drop system drops frames every now and then (on my system, 1-2 frames every 2-3 seconds), this is normal, because mplayer timing is not exactly equal to the screen refresh rate, and we have to drop some frames to compensate for this little difference.

it is 60fps but I get a lot more than a few drops.

> New frame drop system assumes that page flip should take almost 0 time, if page flip takes too much compared to total frame time, it stats dropping frames.

Maybe this is the problem - could be a radeon r600 specific thing, but 
then I haven't had time to test properly yet.

What little testing I have done it seems mpeg2 sd are OK, and a 720p 
h264 avi is OK, but anything else HD I have is affected - h264 
mov,ts,m2ts or mkv (made from ts).

> Can i have access to your samples?

http://www.andyqos.ukfsn.org/judder.m2ts

I am a bit short of space for anything bigger.

Here's the output I get for that sample before and after the four 
patches in your other post (obviously this patch doesn't apply any more 
now part of it is in).

You can see lots of drops and it looks terrible post patches.

mpn is a bash alias I use to run from source tree it's -
/home/andy/Src/Mplayer-svn/mplayer/mplayer -ao alsa

The ATTENTIONs are just because I have vblank_mode set to 0 in my ~/.drirc

bash-3.2$ vblank_mode=2 mpn -fs -vo gl -lavdopts threads=4 -framedrop 
judder.m2ts
MPlayer SVN-r35265-4.2.3 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote 
control.

Playing judder.m2ts.
libavformat version 54.33.100 (internal)
TS file format detected.
VIDEO H264(pid=4113) AUDIO A52(pid=4353) NO SUBS (yet)!  PROGRAM N. 1
FPS seems to be: 23.976025
Load subtitles in ./
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: option value of option vblank_mode ignored.
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.68.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 640.0 kbit/41.67% (ratio: 80000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
Movie-Aspect is undefined - no prescaling applied.
VO: [gl] 1920x1088 => 1920x1088 Planar YV12  [fs]
Mesa: User error: GL_INVALID_ENUM in 
glTexParameter(pname=GL_TEXTURE_STORAGE_HINT_APPLE)
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [gl] 1920x1080 => 1920x1080 Planar YV12  [fs]
A:  11.8 V:  11.9 A-V: -0.123 ct:  0.000   8/  8 ??% ??% ??,?% 1 0
Dropping frame with size not matching configured size
A:  22.6 V:  22.7 A-V: -0.104 ct: -0.301 264/264  2% 35%  1.1% 2 0
[ac3 @ 0x8a36260]incomplete frame
A:  22.9 V:  23.5 A-V: -0.603 ct: -0.394 284/284  2% 35%  1.0% 2 0


Exiting... (End of file)


bash-3.2$ vblank_mode=2 mpn -fs -vo gl -lavdopts threads=4 -framedrop 
judder.m2ts
MPlayer SVN-r35265-4.2.3 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote 
control.

Playing judder.m2ts.
libavformat version 54.33.100 (internal)
TS file format detected.
VIDEO H264(pid=4113) AUDIO A52(pid=4353) NO SUBS (yet)!  PROGRAM N. 1
FPS seems to be: 23.976025
Load subtitles in ./
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: option value of option vblank_mode ignored.
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.68.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 640.0 kbit/41.67% (ratio: 80000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
Movie-Aspect is undefined - no prescaling applied.
VO: [gl] 1920x1088 => 1920x1088 Planar YV12  [fs]
Mesa: User error: GL_INVALID_ENUM in 
glTexParameter(pname=GL_TEXTURE_STORAGE_HINT_APPLE)
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [gl] 1920x1080 => 1920x1080 Planar YV12  [fs]
A:  11.8 V:  11.9 A-V: -0.133 ct:  0.000   8/  8 ??% ??% ??,?% 1 0
Dropping frame with size not matching configured size
A:  22.7 V:  23.5 A-V: -0.790 ct: -1.001 284/284  2% 20%  1.0% 130 0
[ac3 @ 0x8a365c0]incomplete frame
A:  22.8 V:  23.5 A-V: -0.623 ct: -1.022 284/284  2% 20%  1.0% 130 0



More information about the MPlayer-dev-eng mailing list