[FFmpeg-devel] Patch for "non monotone timestamp" error

Diep Ho DHo
Fri Aug 8 10:07:59 CEST 2008


> -----Original Message-----
> From: ffmpeg-devel-bounces at mplayerhq.hu [mailto:ffmpeg-devel-
> bounces at mplayerhq.hu] On Behalf Of Michael Niedermayer
> Sent: jeudi 7 ao?t 2008 20:41
> To: FFmpeg development discussions and patches
> Subject: Re: [FFmpeg-devel] Patch for "non monotone timestamp" error
> 
> On Thu, Aug 07, 2008 at 05:25:38PM +0200, Diep Ho wrote:
> > > -----Original Message-----
> > > From: ffmpeg-devel-bounces at mplayerhq.hu [mailto:ffmpeg-devel-
> > > bounces at mplayerhq.hu] On Behalf Of Michael Niedermayer
> > > Sent: jeudi 7 ao?t 2008 13:07
> > > To: FFmpeg development discussions and patches
> > > Subject: Re: [FFmpeg-devel] Patch for "non monotone timestamp"
> error
> > >
> > > On Thu, Aug 07, 2008 at 12:04:54PM +0200, Diep Ho wrote:
> > > > > -----Original Message-----
> > > > > From: ffmpeg-devel-bounces at mplayerhq.hu [mailto:ffmpeg-devel-
> > > > > bounces at mplayerhq.hu] On Behalf Of Michael Niedermayer
> > > > > Sent: mardi 5 ao?t 2008 22:39
> > > > > To: FFmpeg development discussions and patches
> > > > > Subject: Re: [FFmpeg-devel] Patch for "non monotone timestamp"
> > > error
> > > > >
> > > > > On Tue, Aug 05, 2008 at 05:45:59PM +0200, Diep Ho wrote:
> > > > > > > -----Original Message-----
> > > > > > > From: ffmpeg-devel-bounces at mplayerhq.hu
> > > > > > > [mailto:ffmpeg-devel-
> > > > >
> > > > > Ive fixed the encoder so it will fail with an error message if
> > > > > someone tries to encode low delay mpeg1
> > > >
> > > > OK. I have to accept that, unfortunately.
> > > >
> > > > Just do me a favor to clarify this: "If in a MPEG1 file, every
> > > > packet
> > > has PTS == DTS then this file is not a valid Mpeg1 video file?"
> > >
> > > read the specification
> >
> >From my understanding, these files are valid. And they should be
> correctly read.
> 
> you will have to quote the specification if you think so.

The ISO/IEC 11172-1 (P18) reads: "For the presentation units that are not reorders, tpn(k) is equal to tdn(k). For presentation unit that are not reordered, tpn(k) is equal to tdn(k) since the access units are decoded instantaneously. ..."

The timestamps PTS and DTS in the files are the intended values of these values tpn (presentation time) and the tdn (decoding time) in the system target decoder. Hence, unless there is a reordering, PTS COULD be equal to DTS at all part of a mpeg1 file. This means that in this case, files may contain only PTS, since when DTS = PTS, the DTS value can be omitted. 

Our files does not contain any b-frames, no ordering is required. And PTS COULD be equal to DTS. They are certainly valid.

About the patch I proposed. It is not only about our case, it is also about having better value for presentation_delayed test. Please do consider. I attach again my patch proposition. Furthermore, in the regression test, I had some wrong PTS fixed. That is the gain of the patch.

Best rgds,

DHO


-------------- next part --------------
A non-text attachment was scrubbed...
Name: presentationdelay.patch
Type: application/octet-stream
Size: 2851 bytes
Desc: presentationdelay.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080808/cd1deaad/attachment.obj>



More information about the ffmpeg-devel mailing list