[FFmpeg-devel] frames not parsed correctly for VOB file (mpeg2)

Michael Niedermayer michaelni
Thu Feb 4 16:44:50 CET 2010


On Thu, Feb 04, 2010 at 10:02:09AM +0100, Christian Cier-Zniewski wrote:
> Michael Niedermayer schrieb:
>> On Wed, Feb 03, 2010 at 10:05:10PM +0100, Christian Cier-Zniewski wrote:
>>> Michael Niedermayer schrieb:
>>>> Outputing 1 field per packet solves this with the old code for
>>>> compute_pkt_fields()
>>>>   
>>> Please find attached the old code replacing the current one.
>> you are quick :)
>
> This first version of the patch was meant as a starting point.
>
>>> +	s->parity = 0;
>> tabs are forbidden in our svn
>
> Sorry, won't happen again.
>
>>>                                  s->repeat_pict = 2;
>>>                              }
>>>                          }
>>> +						
>>> +						/* the packet only represents half a frame
>>> +                           XXX,FIXME maybe find a different solution */
>>> +                        if(picture_structure != 3){
>>> +                            s->repeat_pict = -1;
>>> +                            s->parity = picture_structure-1;
>>> +                        }else
>>> +                            s->parity = !top_field_first;
>> the code above back then looked like:
>>                         if (repeat_first_field) {
>>                             if (pc->progressive_sequence) {
>>                                 if (top_field_first)
>>                                     s->repeat_pict = 4;
>>                                 else
>>                                     s->repeat_pict = 2;
>>                             } else if (progressive_frame) {
>>                                 s->repeat_pict = 1;
>>                             }
>>                         }
>> now its different, repeat_pict is off by 1
>> it does not seem you adapted your code, also beware there are 2 
>> repeat_pict
>> variables
>
> Yes, I am aware of that change and forgot to ask about that. Could you 
> please summarize the intention of this change?

the timebase should be accurate enough to specify the time of fields
(that is 1/60 for a 30fps video)
and repeat_pict is after te change defined as the additional duration
beyond the timebase that is 0 -> 1/60, 1->2/60 2->3/60 ...
previously it was defined in half timebase units and the first length
depended on field vs. frame


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100204/f8a46ce3/attachment.pgp>



More information about the ffmpeg-devel mailing list