[MPlayer-cvslog] CVS: main/DOCS/tech mpcf.txt,1.75,1.76

Rich Felker dalias at aerifal.cx
Sat Sep 17 22:15:49 CEST 2005


On Sat, Sep 17, 2005 at 09:27:41PM +0200, Michael Niedermayer CVS wrote:
> +back_ptr
> +	pointer to the latest syncpoint, for which there is at least one
> +	keyframe prior to the global_timestamp in every stream
> +

This encoding is inefficient and will often make back_ptr 1 byte
larger than it needs to be. Instead, we should have:

actual_back_ptr == coded_back_ptr*8+7+9

The first *8 and +7 are because startcodes are 8 bytes long, so as
long as we point to a position no more than 7 bytes before the
syncpoint we want, we can be guaranteed to find the syncpoint with a
trivial 15-byte linear search. The final +9 is because the minimal
possible distance back to the previous syncpoint is 9 (8 byte
startcode + 1 byte framecode immediately following it).

> @@ -450,7 +459,7 @@
>  	stream, into which the current pts is inserted and the element with
>  	the smallest value is removed, this is then the current dts
>  	this buffer is initalized with decode_delay -1 elements
> -	all frames with dts == timestamp must be monotone, that means a frame
> +	all frames except repeated frames must be monotone, that means a frame
>  	which occurs later in the stream must have a larger or equal dts
>  	than an earlier frame

This rule does not work. :( After seeking, we have no idea if a
timestamp we encounter is repeated or not, so we can't use invalid
timestamps to detect an error (nor to brute-force search for a valid
chain of frames to the next syncpoint).

Rich




More information about the MPlayer-cvslog mailing list