[FFmpeg-devel] [PATCH] WMA Voice decoder

Michael Niedermayer michaelni
Sun Jan 31 02:20:10 CET 2010


On Sat, Jan 30, 2010 at 05:03:26PM -0500, Ronald S. Bultje wrote:
> Hi Vitor,
> 
> On Sat, Jan 23, 2010 at 12:06 AM, Vitor Sessak <vitor1001 at gmail.com> wrote:
> > Ronald S. Bultje wrote:
[...]
> >> +    s->min_pitch_val    = ((int) ((ctx->sample_rate << 8) * 0.0025) + 50)
> >> >> 8;
> >> +    s->max_pitch_val    = ((int) ((ctx->sample_rate << 8) * 0.0185) + 50)
> >> >> 8;
> >
> > I think this is better done with integer math
> 
> I could, don't really have a strong opinion here. The binary uses
> bit-truncation math here which I refuse to use out of principle (i.e.
> int x int -> int64, then >> 20  and << 1). Divisions are slow.
> Anything else we could use here? /= 400 

> and whatever for .0185?

37/200


[...]
> >> +static int get_vbm_bits(GetBitContext *gb)
> [..]
> > I've never actually used the {init,get}_vlc() functions, so I'm not sure,
> > but it looks like they could be useful here.
> 
> I think that does something else, and has a max_depth==3 (this one has
> 6), or did I misread that? Michael?

Not enough context quoted to awnser question


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

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/20100131/9f9fb0cd/attachment.pgp>



More information about the ffmpeg-devel mailing list