[MPlayer-dev-eng] mpeg2 interlased fps need some help

Arpi arpi at thot.banki.hu
Mon Oct 8 01:57:25 CEST 2001


Hi,

> There was an idea picture->repeat_count to be used to
> keep proper framerate. The fix realy works for me but
> i am not sure that it is corect, so i want to discus
> some things
> 1. in libmpeg2/header.c::
> // repeat_first implementation by A'rpi/ESP-team,
> based on libmpeg3:
>     if(picture->repeat_count>=100)
> picture->repeat_count=0;
> // what does this mean? why this is so?

I don't really know. I've just copied this few lines from libmpeg3,
added that fields to the picture structure and it worked.
Never understand how does it really works, mpeg2 standard is unclean
about it, at least for me :(

>     if(picture->repeat_first_field){
>         if(picture->progressive_sequence){
>             if(picture->top_field_first)
>                 picture->repeat_count+=200;
>             else
>                 picture->repeat_count+=100;
>         } else
>         if(picture->progressive_frame){
>                 picture->repeat_count+=50;//Is this
> correct? 
> //I think that in this situation we have 1 frame. I
Everytiem we have oen frame, but the display time of a
frame varies from 100% to 300%, so the repeat_count
(silly name, but it's ok) contents the time over the
normal 100%, so it varies from 0 to 200%.
3:2 pudown means repeating every second field of every
second frame. As we didn't handle fields, it means
displaying every second frame 0.5 times longer than normal.

Really we should split progressive mpeg2 movie to fields,
and display it by fields, using hardware interpolation
(currently only -vo syncfb can do that).

> 2. The better solution is to use repeat_count as
> persentage of frame time (100%,200%,50%), but in this
> case it should be with some other name. I am short of
> names so please give me one:)
display_time ?
btw display_time=repeat_count+100

maybe we should re-read mpeg standards, and try to figure
out how does it really works and implement it in a clean way.
as i said, current code is just copied from libmpeg3.


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu



More information about the MPlayer-dev-eng mailing list