[vlc] Fw: about wma fixed decoder bug
Charis
chbtime at msn.com
Fri Nov 13 08:51:48 CET 2009
Dear friends,
thanks for your wma fixed-point decoder, I find a bug in the decoder,
you write:
int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx)
{
....................
int32_t tmp1 = high_freq*2; /* high_freq is a int32_t!*/
int32_t tmp2=itofix32(s->sample_rate>>1);
s->high_band_start[k] = fixtoi32( fixdiv32(tmp1, tmp2) * (block_len>>1) +0x8000);
/*
s->high_band_start[k] = (int)((block_len * 2 * high_freq) /
s->sample_rate + 0.5);*/
.......................
}
I think it's a bug, should be like this:
int32_t tmp1 = (high_freq*2); /* high_freq is a int32_t!*/
int32_t tmp2=(s->sample_rate>>1);
s->high_band_start[k] = fixtoi32( fixdiv32(tmp1, tmp2) * (block_len>>1) +0x8000);
and the associated file is a test file(Test.wma), but it has problems on decoding the file
^_^
--------------------------------
B.R
Charis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20091113/9f49fbe8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test.rar
Type: application/octet-stream
Size: 707191 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20091113/9f49fbe8/attachment.obj>
More information about the vlc
mailing list