This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11281 - [New WMA Codecs] WMA Pro simulator playback
Attached to Project:
Rockbox
Opened by MohamedTarek (mtarek16) - Sunday, 16 May 2010, 20:46 GMT+2
Last edited by MohamedTarek (mtarek16) - Tuesday, 27 July 2010, 11:49 GMT+2
Opened by MohamedTarek (mtarek16) - Sunday, 16 May 2010, 20:46 GMT+2
Last edited by MohamedTarek (mtarek16) - Tuesday, 27 July 2010, 11:49 GMT+2
|
DetailsThis patch enables the playback of WMA Pro streams in the simulator, but it's still in an early phase. There's also some random clicking noise along with the output,
|
This task depends upon
Closed by MohamedTarek (mtarek16)
Tuesday, 27 July 2010, 11:49 GMT+2
Reason for closing: Accepted
Additional comments about closing: last patch committed in r27402.
Tuesday, 27 July 2010, 11:49 GMT+2
Reason for closing: Accepted
Additional comments about closing: last patch committed in r27402.
I had test_codec produce a wav file from a wma pro sample. The output wav file played fine outside the simulator, but the noise was still there (in the wav file) in the simulator. I'll just ignore that for now.
The previous patch produced 16-bit samples. The current one produces 32-bit samples, and adds seeking too.
2) Is it possible that the random clicking noise is caused by sample overflow? E.g. a float samples >1.0 or <-1.0 will cause overflow.
2a) You could easily spot this in the wav-file. A simple way to check for this is to not scale by INT32_MAX but by e.g. ((1<<24)-1) to get a 8.24 representation. Additionally you'll need to configure the dsp settings accordingly. This way the dsp routines take care of saturation.
2b) If even saturated samples result in clicking noise, then try to reduce the scale in general and check whether the the output is fine then.
Before sending the patch, I tried reducing the scale factor but still nothing changed.
The thing is, when I checked the plot in something like Audacity, I didn't see saturated samples anywhere where I hear the noise.
I even applied a negative gain using audacity, and tried playing the file again in the sim, but again, nothing changed regarding that noise.
Here's part of the file I edited in audacity : http://filebin.ca/fhrnph/test.wav
The original file is the first one here : http://samples.mplayerhq.hu/A-codecs/WMA9/wmapro/
As to why it doesn't build, I sitll haven't checked. I'm currently preparing for my finals which start in ~1 week from now :( , so not sure when I'll be able to check it.
The point in code where the floating point coefficients are converted to fixed point was wrong. Now the sound quality is very good and plots show that the max error between the current decoder (with fixed point windowing) and that of ffmpeg's is 3.052*10^-5 which is good I think.
With this patch, wmapro uses its own imdct not ours, because of different trig tables.
There's still some bug with it that I can't track down. I think - but still not sure - something goes wrong in the imdct step.
Once this is fixed I could proceed on removing the unneeded code and start testing on hardware.
EDIT : The code in this patch isn't pretty at all, it is still for testing purposes. You've been warned !
The problem was with the mdct, I shifted the trig table values up by 16 which made some values overflow (stupid mistake), so I split the shifts between the trig values and the input coefficients and now everything is good. Fixed point step finally over ! or almost over, since it's still not in svn.