[FFmpeg-devel] [PATCH] Lego Mindstorms RSO de/muxer (copied from au.c)

Kostya kostya.shishkov
Sun Jul 18 19:49:07 CEST 2010


On Sun, Jul 18, 2010 at 07:36:56PM +0200, Rafa?l Carr? wrote:
> On Sun, 18 Jul 2010 19:13:26 +0200
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > On Sun, Jul 18, 2010 at 05:37:13PM +0200, Rafa?l Carr? wrote:
> > [...]
> > > +static int rso_read_header(AVFormatContext *s, AVFormatParameters
> 
> > > +    st->duration            = (size * 8) >> av_log2(bps);
> > 
> > why not 
> > st->duration            = (size * 8) / bps ?
> 
> I thought I could spare an expensive division since bps is always 4 or 8
> 
> But I'll try to make some demuxers use raw_read_packet() from raw.c and
> then it won't be the case anymore so let's just drop that.
> 
> Attached patch use / bps
 
Just to remind what I said on IRC - the source you provided explicitly
sets predictor and step_size in IMA ADPCM to zero at the beginning and
then just decodes nibbles. Current decoders read those values from
bitstream, so you'll need new decoder as well. And your sample was not
proper RSO judging by demuxer code.



More information about the ffmpeg-devel mailing list