[Ffmpeg-devel] WMA decoder improvement
Michael Niedermayer
michaelni
Wed Mar 28 16:32:26 CEST 2007
Hi
On Wed, Mar 28, 2007 at 03:50:47PM +0200, Ian Braithwaite wrote:
> Hi,
>
>
> Here's a little improvement to wma decoding.
>
> I've compared the decoded output against that produced by the wmadmo dll
> used with mplayer.
>
> Testing on "...samples/A-codecs/WMA/Bangles 01 - Walk Like An Egyptian.wma",
> it reduces the difference between MS and ffmpeg from
> max +-4142, rms 21.0 to max +-575, rms 1.3.
>
> On a 30s clip I use for testing ("g_64k.wma", can't remember now where it came
> from:-/) the improvement is from
> max +-1361, rms = 9.3 to max +-1, rms = 0.04 (!!)
>
>
> Here's what it does.
> Exponents can be reused from one block to the next.
> In wma, block sizes vary, for example between 128,256,512,1024 and 2048 samples.
> Currently, when reusing exponents in blocks with a different block size,
> the exponent block is down or up sampled to the new size.
> So a block of exponents can be resized from 512 -> 256 samples, and then
> resized back again from 256 -> 512 samples,
> discarding and duplicating every other sample, respectively.
>
> The patch keeps the original exponent blocks, and resizes (on the fly) to
> each new block size.
>
>
> wma.h | 1
> wmadec.c | 79 ++++++++++++++++++---------------------------------------------
> 2 files changed, 24 insertions(+), 56 deletions(-)
looks ok
>
>
> There seem to be quite a few variants of wma, so I can't be sure that
> this is the right thing to do in all cases.
>
> Also, to compare against the MS codec, I had to prevent the first two
> blocks from being output.
> There's a little patch for that too, but I'm pretty sure it doesn't
> do the right thing in all cases.
> I've attached it in case anyone wants to reproduce my measurements.
[...]
--
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: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070328/1d401f79/attachment.pgp>
More information about the ffmpeg-devel
mailing list