- Status Closed
- Percent Complete
- Task Type Bugs
- Category Codecs
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Release 3.12
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#12871 - rockbox play ogg_vorbis data has noise when enable the macro CPU_ARM
in the file fft-ffmpeg_arm.h
in the function XNPROD31_R, use the t5 and t6 as input data while ouput data,
there maybe has a error.
static inline FFTComplex* TRANSFORM_W01( FFTComplex* z, int n, const FFTSample* w )
{
register FFTSample t1,t2 asm("r5"),t5 asm("r6"),t6 asm("r7"),r_re asm("r8"),r_im asm("r9");
/* load wre,wim into t5,t6 */ asm volatile( "ldmia %[w], {%[wre], %[wim]}\n\t":[wre] "=r" (t5), [wim] "=r" (t6):[w] "r" (w)); z += n*2; /* z[o2] -- 2n * 2 since complex numbers */ asm volatile( "ldmia %[my_z], {%[r_re],%[r_im]}\n\t":[r_re] "=r" (r_re), [r_im] "=r" (r_im):[my_z] "r" (z)); XPROD31_R(r_re, r_im, t5 /*wre*/, t6 /*wim*/, t1,t2);
z += n; /* z[o3] */ asm volatile( "ldmia %[my_z], {%[r_re],%[r_im]}\n\t":[r_re] "=r" (r_re), [r_im] "=r" (r_im):[my_z] "r" (z)); XNPROD31_R(r_re, r_im, t5 /*wre*/, t6 /*wim*/, t5,t6);
}
I suggest use like this, maybe a butter way, but I am not sure:
static inline FFTComplex* TRANSFORM_W01( FFTComplex* z, int n, const FFTSample* w )
{
register FFTSample t1, t3, t4, t2 asm("r5"),t5 asm("r6"),t6 asm("r7"),r_re asm("r8"),r_im asm("r9");
/* load wre,wim into t5,t6 */ asm volatile( "ldmia %[w], {%[wre], %[wim]}\n\t":[wre] "=r" (t3), [wim] "=r" (t4):[w] "r" (w)); z += n*2; /* z[o2] -- 2n * 2 since complex numbers */ asm volatile( "ldmia %[my_z], {%[r_re],%[r_im]}\n\t":[r_re] "=r" (r_re), [r_im] "=r" (r_im):[my_z] "r" (z)); XPROD31_R(r_re, r_im, t3 /*wre*/, t4 /*wim*/, t1,t2);
z += n; /* z[o3] */ asm volatile( "ldmia %[my_z], {%[r_re],%[r_im]}\n\t":[r_re] "=r" (r_re), [r_im] "=r" (r_im):[my_z] "r" (z)); XNPROD31_R(r_re, r_im, t3 /*wre*/, t4 /*wim*/, t5,t6);
}
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Which device are you testing on?
I just tested x86 and AMSv2 with ASM enabled and the output is identical to 16 bits precision for our vorbis_128k track.
Is this problem specific to one track?
Is it specific to one device?
Have you made any changes to the source code?
Also, if possible please use diff to post code changes. Its very difficult to parse assembly changes otherwise :)
1. I merged all the code which related with vorbis decoding to my project;
2. If I don’t include the file “fft-ffmpeg_arm.h” in mdct.c, then the vorbis will use C code to decoding vorbis, it can work normal;
3. Otherwise, I include the file “fft-ffmpeg_arm.h” in mdct.c, the vorbis will use assembly, it will has noise;
4. My project is work on arm926EJ-S single core, compiler is arm-none-eabi-gcc;
The attached file is the diff.
Location:
file: fft-ffmpeg_arm.h
function: TRANSFORM_W01
So about a million different things could be wrong :)
First verify that your compiler can successfully compile our version of the code by using it to compile our codeclib’s command line interface:
configure > (pick any target) > (W) Warble Codec Tool
make
Assuming the binary you get decodes correctly, I guess you’ll have to go through your changes one by one and try to figure out what is wrong.
Maybe this problem is caused by compiler, I’m working on it.
I have find the root_cause, it is my platform’s error, cause the embedded assemble error when compile, please close this bug.
What was the problem with your platform? Is it something we could have prevented?