Rockbox

Tasklist

FS#11256 - true audio (TTA) codec

Attached to Project: Rockbox
Opened by Yoshihisa Uchida (Uchida) - Sunday, 09 May 2010, 08:26 GMT
Last edited by Yoshihisa Uchida (Uchida) - Thursday, 13 May 2010, 13:30 GMT
Task Type Patches
Category Codecs
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch is the true audio (tta) decoder.

*** NOTICE ***
1) This codec is confirmed only on iPod photo/video.(I can confirm these players only)
2) There is a possibility that a big problems occur because I don't test enough.
3) under the slow cpu, the sound might be able to tune off sometimes.

*** PERFORMANCE ***
ARM cpu
137 - 138 % (44.1 kHz) (on iPod photo/video)
other cpu
unknown

Operation verification according to a lot of testers, please.
This task depends upon

Closed by  Yoshihisa Uchida (Uchida)
Thursday, 13 May 2010, 13:30 GMT
Reason for closing:  Accepted
Additional comments about closing:  patch commits and the manual updates.
Comment by Yoshihisa Uchida (Uchida) - Sunday, 09 May 2010, 08:39 GMT
sorry. this patch updates (does not include some files)


Comment by MichaelGiacomelli (saratoga) - Sunday, 09 May 2010, 23:43 GMT
Works fine on the Sansa clipv2, but not on coldfire due to endian-ness issues (Coldfire is big endian, x86 and ARM are little endian):

http://www.rockbox.org/irc/log-20100510#00:57:29

I tried removing the extra letoh32/letoh16 calls, and it works on ARM, but so far no one has tested this on Coldfire to see if it fixes the problem.



Comment by Jens Arnold (amiconn) - Monday, 10 May 2010, 06:42 GMT
ttav2.patch works on coldfire, but isn't realtime. test_codec yields 52.4% realtime for the test track on my iriver H180. Imo it's ready for initial commit.

I'll look into assemblerising the filter for coldfire. EMAC should help a lot :)
Comment by Yoshihisa Uchida (Uchida) - Monday, 10 May 2010, 10:54 GMT
comment and correction of the endian thanks.

hybrid_filter() is a very slow function, and If this function is not executed, decode speed becomes twice or more.
However, the speed doesn't change so much even if it rewrite by assembler (in ARM, C to asm about 7 - 8 % speed up at most)

I think that it is necessary to optimize more for not hybrid_filter() but get_samples().


Comment by Andree Buschmann (Buschel) - Monday, 10 May 2010, 11:33 GMT
For speed up you should use IRAM for some more variables and buffers. Especially tta[], cache[] and some of the global variables used in bit fiddling (e.g. bitpos, bit_cache, bit_count, ...).
I expect that moving tta[] to IRAM will improve the decoding speed quite a lot.

Edit: Forget about my guess. This will speed up decoding by only ~1.4 MHz (unpatched needs 57.5 MHz) on a PP502x.
Comment by Jens Arnold (amiconn) - Tuesday, 11 May 2010, 06:59 GMT
IRAM is an absolute must on coldfire. As-is, coldfire would need ~240MHz for realtime decoding; I would expect this to be on par with arm, probably even faster, with proper IRAM usage.
However, I do think this work should be done after committing the current patch to svn. Much easier for others to help this way :)
Comment by Yoshihisa Uchida (Uchida) - Wednesday, 12 May 2010, 12:17 GMT
optimize a bit
on iPod video, about +5 % spped up.

But, it is to slow oppositely according to the player.

changes:
get_samples: rice update logic is changed to the function (update_rice()).


Comment by Yoshihisa Uchida (Uchida) - Thursday, 13 May 2010, 11:40 GMT
optimize more
maybe all targets speed up.
on iPod, + 8 - 9 % speed up against yesterday's patch (i.e., decoding speed is 152 - 153 %)

changes:
get_samples: The decoding logic is optimized by using that the max channels is 2.
tta_info: deletes HANDLE
Comment by Yoshihisa Uchida (Uchida) - Thursday, 13 May 2010, 12:49 GMT
commit tta codec.
please, problems concerning TTA must open as other tasks.
After I update the manual, I will close this task.

Loading...