[FFmpeg-devel] [PATCH] WMA Voice decoder

Michael Niedermayer michaelni
Fri Jan 22 16:39:55 CET 2010


On Thu, Jan 21, 2010 at 01:01:16PM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Wed, Jan 20, 2010 at 7:53 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
[...]

> 
> >> + ? ?int z = (uint16_t) (x * 49995 / y);
> >
> > I wonder if the 9 possible values for y could with a table ?9 entries
> > and multiply + >> be used to simplify this
> 
> So x%9=[0,8], so y is then 6, 11, 16, 21, ..., 46. Since 49995 uses 16
> bits and x itself is 16 bits also, we'd either have to guarantee that
> x*49995/y == x*(49995/y), which I think is not possible I think, or
> use 64 bits. Couldn't I just use FASTDIV here also? I suppose a more
> optimal solution would be:

i mean you should try by brute force or if prefered another form of
proof if this can be done by some multiply / add / shift


[...]
> 
> >> +static const uint8_t ff_wmavoice_dq_lsp16r2[0x500] = {
> >> + ? ? 98, ?98, 119, 121, 109, 112, 128, 135, 115, 121,
> [..]
> > If you want to reuduce the size of these tables, i suspect it
> > might be possible, first convert them to deltas that is
> > new_table= oldtable[i] - oldtable[i-1]
> > then store using a wisely choosen vlc code
> > That might or might not be a good idea but as someone seemed
> > to dislike their size this might be able to cut them in half
> 
> Uh, I have no idea how to do that, can I do that after committing? :-).

of course

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100122/273857b7/attachment.pgp>



More information about the ffmpeg-devel mailing list