Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: TTA codec rewrite (Read 2956 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: TTA codec rewrite

Reply #1
...yeeeeaaaaahhh... not really touching that.
Error 404; signature server not available.


Re: TTA codec rewrite

Reply #3
Who did that? The sourceforge page is inactive, the tausoft.org page is inactive, true-audio.com is defunct and "TTA2" was supposed to be a new codec that only got to the header stage ...


Re: TTA codec rewrite

Reply #4
 i downloaded and opened it in 7-zip. Looks like normal tarball with gpl-3 file.
wavpack -b2.9cs.5
lame --preset cd -f

Re: TTA codec rewrite

Reply #5
Who did that? The sourceforge page is inactive, the tausoft.org page is inactive, true-audio.com is defunct and "TTA2" was supposed to be a new codec that only got to the header stage ...



Back from the dead ?
wavpack -b2.9cs.5
lame --preset cd -f

Re: TTA codec rewrite

Reply #6
i'm not affiliated with the original authors
i was reading the source code for ttaenc, and decided to make some minor improvements like fixing compiler warnings and replacing char's, short's and int's with fixed length integers. i tried to add some additional features, but it became apparant that it would be easier to completely rewrite the program due to the way it was written
i named it tta2 to distinguish it from the reference encoder
i released it incase anyone is interested

 

Re: TTA codec rewrite

Reply #7
Oh. Then all is good except possibly the name? http://tausoft.org/wiki/True_Audio_Codec_Format .

Out of curiosity:
Have you compared it to ffmpeg's implementation? Does that have the same room for improvement? Asking because it makes the very same encoded bitstream, so likely it imported the code back in the day - but then it might have been improved later on.

And ... CUETools isn't in heavy development anymore, but it has its own FLAC encoders and its own ALAC encoder, and has cloned the TTA library for its own use: https://github.com/gchudov/libtta . Maybe that is the place to get it merged into a project that is in use?

Re: TTA codec rewrite

Reply #8
in regards to ffmpeg,
i did look at it. it was a straight copy of the reference with some small changes. ffmpeg decoding was faster for my desktop, but slower on my cruddy celeron laptop. ffmpeg encoding was slower. one of the changes ffmpeg made replaces some redundant code with an if statement, and that borks the compilers autoSIMDing making it measurably slower. that's the only major problem with ffmpeg's i can think of besides copying some of the reference's UB like shifting signed integers

Re: TTA codec rewrite

Reply #9
it makes the very same encoded bitstream,
From what I recall when I investigated this a while ago, TTA uses the audio samples themselves to set the decoding parameters, so it's not really possible to have a different encoded bitstream for the same audio. (But I may not be remembering correctly...)


Re: TTA codec rewrite

Reply #11
http://0x0.st/Hxzd.tar.xz/tta2.20231128-2.tar.xz
made unrolled mono/stereo version, ~5-9% faster
fixed possible buffer issue from a bad seektable
extra error checks
refactored a little

Re: TTA codec rewrite

Reply #12
unrolled mono/stereo
Pardon my ignorance, but what is that?

Curiosity got the better of me and I thought I might give it a few runs timed - but Windows screams bloody murder no matter how nice and green https://www.virustotal.com/gui/url/d25e6ff03748d19613794ca4a4ea07ea331d505d7c0b72cf5055596a98c5962c?nocache=1 looks.
Will rather wait a few updates. (Windows updates, I mean.)

Re: TTA codec rewrite

Reply #13
i made versions with an unrolled inner for-loop for mono and strereo. you can see them in src/codec/tta_???.c

i've never programmed for windows, not sure how to port it. i know i used some stuff from unistd.h

Re: TTA codec rewrite

Reply #14
Debian has MinGW-w64 GCC in its repos, try using that to build it in place of the regular GCC. You might not need to change anything, MinGW-w64 implements Windows-compatible versions of many Linux-specific headers.

Re: TTA codec rewrite

Reply #15
gcc (2-3 year old version) produces a much slower binary than clang. i have a mini rant about it in the make script

Re: TTA codec rewrite

Reply #16
There's MinGW-w64 Clang too.

Re: TTA codec rewrite

Reply #17
for linking with gold, comment out lines 65 & 66 in the make script (-O3, -icf=safe). they shave a couple of kilobytes off the binary, but make it ~4% slower. gold is still faster than just clang

i'll think about putting the code on some source host in the next week or two

Re: TTA codec rewrite

Reply #18
but Windows screams bloody murder
Windows does it for any not signed executables that it didn't see before. It's purely reputation based.