• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Codecs
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Uchida - 2010-05-09
Last edited by Uchida - 2010-05-13

FS#11256 - true audio (TTA) codec

This patch is the true audio (tta) decoder.

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.

ARM cpu

 137 - 138 % (44.1 kHz) (on iPod photo/video)

other cpu


Operation verification according to a lot of testers, please.

Closed by  Uchida
2010-05-13 13:30
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

patch commits and the manual updates.

sorry. this patch updates (does not include some files)

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):

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.

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 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().

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.

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 :)

optimize a bit
on iPod video, about +5 % spped up.

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


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

optimize more
maybe all targets speed up.
on iPod, + 8 - 9 % speed up against yesterday’s patch (i.e., decoding speed is 152 - 153 %)


 get_samples: The decoding logic is optimized by using that the max channels is 2.
 tta_info: deletes HANDLE

commit tta codec.
please, problems concerning TTA must open as other tasks.
After I update the manual, I will close this task.


Available keyboard shortcuts


Task Details

Task Editing