[FFmpeg-devel] [PATCH] IFF demuxer and 8SVX decoder

Jai Menon realityman
Fri Mar 28 00:48:10 CET 2008


On Thursday 27 March 2008 15:23:54 Michael Niedermayer wrote:
> On Thu, Mar 27, 2008 at 08:44:54PM +0000, Jai Menon wrote:
> > On Wednesday 26 March 2008 21:12:26 Michael Niedermayer wrote:
> > > uint8_t d = *buf++;
> > >
> > > > +        esc->fib_acc += esc->table[d & 0x0f];
> > > > +        *out_data++ = esc->fib_acc << 8;
> > > > +        esc->fib_acc += esc->table[d >> 4];
> > > > +        *out_data++ = esc->fib_acc << 8;
> > > > +    }
> > >
> > > you can do this with one subtraction and 2 shifts less
> >
> > I still don't know how i can eliminate the two shifts?
>
> change the table ...

I could change it to int16_t, and remove the 2 shifts.....but then i would 
need to clip twice before adding the table value to the accumulator......in 
which case imho we should stick to 2 shifts. 

Other changes  were made and all local tests were successfull. patch attached

Regards
Jai Menon
<realityman at gmx.net>
 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8svx_decoder.patch
Type: text/x-diff
Size: 5107 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080327/a5038d8f/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff_demuxer.patch
Type: text/x-diff
Size: 6653 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080327/a5038d8f/attachment-0001.patch>



More information about the ffmpeg-devel mailing list