[MPlayer-dev-eng] [PATCH] Better double frame rate output and frame limit option.

Andy Furniss andyqos at ukfsn.org
Fri Jan 4 12:07:09 CET 2013


Vicente Sendra wrote:
> --- El sáb, 29/12/12, Andy Furniss <andyqos at ukfsn.org> escribió:
>
>> I tried a longer version of the sample I previously uploaded
>> and linked in previous reply -
>>
>> http://www.andyqos.ukfsn.org/judder.m2ts
>>
>> If I play it with -demuxer lavf (which I would always do for
>> ts/m2ts as it tends to get the right sound track and better
>> lipsync) it's quite broken.
>>
>> Initially it starts by alternating 10 sec turns of sound
>> then video - ie if there is sound video pauses, when video
>> resumes sound stops this continues for the first 70 seconds,
>> then both play together but well out of sync, which takes
>> another minute to sort.
>>
>> Without -demuxer lavf it seems Ok.
>>
>> This happens regardless of -vo or vsync settings or audio
>> track selected.
>>
>> I have not tried any new options/filters yet, this is just
>> playing a 24fps file on a 60Hz monitor with -framedrop.
>
> I found the problem, it was related to my comment:
>
>>   In correct-pts mode full_frame should be used to check if frame is
>>   complete and not an interlaced frame.
>
> But it is not limited to interlaced frames, some times decode_video returns without a complete frame because it has decoded a frame it needs but it is not the actual frame.
>
> I declared full_frame in generate_video_frame and changed code as follows:
>
> decoded_frame  = decode_video(sh_video, start, in_size, drop_frame, pts, &full_frame);
>
>          if (decoded_frame) {
>              ....
>          } else {
>              if(full_frame){
>                  *frame_time = calculate_frame_time_by_pts(sh_video,0);
>                  process_framedrop(0,*frame_time,drop_frame);
>                  break;
>              }
>          }
>
> We do frame stuff only if full frame.
> In your sample, calculate_frame_time_by_pts was called for some frames that were not a full_frame, and this resulted in an incorrect mpctx->delay.
>
> (note: the demuxer lavf activates correct_pts by default, so you get correct_pts mode even if not specified)
>
> The file attached is the new updated patch.

Testing HD ts and m2ts with this and just -framedrop I can't find any 
regressions.

Being able to field step is nice, is it possible to implement the same 
for vdpau:deint=2 ?

I have yet to decide if the new options help or hinder my use case of 
playing 50i deinterlaced on a 50Hz TV - my system seems to be working 
well currently with tests that are (or have been) borderline for running 
out of cpu/gpu. As I run git kernel/mesa/llvm this could change as it 
has in the past.





More information about the MPlayer-dev-eng mailing list