[FFmpeg-devel] [PATCH] Musepack SV8 demuxer and decoder

Kostya kostya.shishkov
Sun Nov 4 15:47:46 CET 2007


On Sun, Nov 04, 2007 at 12:35:37PM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Sun, Nov 04, 2007 at 02:12:04PM +0200, Kostya wrote:
> > On Sun, Nov 04, 2007 at 12:58:22AM +0100, Michael Niedermayer wrote:
> [...]
> > > [...]
> > > > +    if(keyframe){
> > > > +        c->buf_size = buf_size;
> > > > +        c->bits = av_realloc(c->bits, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
> > > > +        memcpy(c->bits, buf, buf_size);
> > > > +        init_get_bits(gb, c->bits, buf_size * 8);
> > > > +        memset(c->Q, 0, sizeof(c->Q));
> > > > +    c->last_bits_used = 0;
> > > > +    }
> > > 
> > > please remove this realloc() and memcpy() mess and decode the individual
> > > frames which your decoder receives from the parser
> > 
> > I fear it would be overkill as parser needs to effectively duplicate decode_frame().
> > MPC SV8 stores several frames in one packet, first of them is keyframe, they should
> > be parsed as single bitstream with no byte paddings. Also there is no way to determine
> > frame length without decoding it and using correct information from previous frame
> > to decode current frame.
> 
> still theres no sense or need for realloc() and memcpy()

Removed
 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpc8.patch.gz
Type: application/x-gzip
Size: 11451 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071104/5c55e98f/attachment.bin>



More information about the ffmpeg-devel mailing list