[MPlayer-dev-eng] [PATCH] Preliminary musepack support

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed May 11 12:22:38 CEST 2005


Hi,
On Tue, May 10, 2005 at 04:32:06PM -0400, Rich Felker wrote:
> On Tue, May 10, 2005 at 09:23:05PM +0200, Roberto Togni wrote:
> > On Tue, 10 May 2005 20:56:10 +0200
> > Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > I'm for committing it if it works, an hacky demuxer is better than no
> > support at all.
> > And iirc most of the limitations come from the file format (seeking
> > requiring codec knowledge, unless i'm mixing it up with other broken
> > audio formats)
> 
> Seeking requires codec knowledge for all raw formats. Same for mp3.

Looks like it will be easier than I thought. The biggest problem is that
frames are not byte-aligned :-(
The format is as follows:
You have a header (48, 64 or 200 bits), then follows the "normal"
bitstream. The bistream consists or frames. Each frame starts with 20
bits frame lenght (in bits), which by the current decoder is only used
for checking for errors in the stream.
The most annoying thing is the order of the bytes in the bitstream:
3 2 1 0 7 6 5 4 11 10 9 8 etc...
So here is what I intend to do if I get the time (I really wished I
could get some help with that):
The demuxer will split the stream into frames, removing the (IMHO pretty
useless) 20 bits of framesize info (that belongs in the container IMHO),
and aligning every frame to byte bounderies (max. 7 bits growth per
frame).
The decoder wil then decode frame per frame - seems to be possible, but
not with the lib - so we need our own decoder. I'd like to have it in
libavcodec, but I have zero experience with both libavcodec and
programming a decoder.
Comments and help qould be much appreciated.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list