[MPlayer-dev-eng] NUT cleanup

Rich Felker dalias at aerifal.cx
Sat Sep 3 12:07:57 CEST 2005


Some things Oded(ods15) and I have found while reading the NUT spec
and working on a possible independent implementation:

1. In stream_header, stream_id field is redundant since the headers
   are required to be stored in order. Removing this field would
   enforce the requirement that they be stored in order, but also
   might make it more difficult to recover some streams from a damaged
   file in the absence of backup headers..?

2. Time base num/den have opposite meaning in NUT from what they mean
   in libavformat. That is to say, lavf's idea of the time base would
   be 1001/30000 whereas NUT's would be 30000/1001. I'd like to rename
   the fields in the NUT spec to be consistent with lavf usage, which
   seems more logical.

3. In the audio stream header, we have a channel count.. is this
   useful? IMO knowing a channel count without a channel arrangement
   is useless except for mono/stereo. For PCM formats, we'll need a
   separate fourcc (or extradata) for each channel layout anyway, and
   for compressed audio the output channel order (and possibly even
   the number of channels output) is dependent on the decoder
   implementation.

4. Index. There's no pointer at the end of the file pointing back to
   the beginning of the index, so you have to keep seeking back and
   searching (without bound) for the index startcode. I'd propose
   either an end-of-index startcode followed by a vlc-coded
   backpointer to the index, or a reverse-vlc-coded backpointer at the
   end of the index.

5. FIXME? Line 316: stream_id[FIXME].. no idea what the FIXME is for.

6. Field name "fourcc", usage of word "codec". To windows kids, codec
   usually means the implementation, not the compression standard. IMO
   we should call it the "compression format" or the "encoding" rather
   than codec to make it clear. Also might be good to drop the name
   "fourcc" in favor of a more general name for the identifier.

7. Old sample_rate_mul stuff still appears under time_base
   documentation. I'll fix this soon unless someone objects since it's
   very straightforward.

Rich





More information about the MPlayer-dev-eng mailing list