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: TAK 1.0.2 (Read 77031 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

TAK 1.0.2

Final release of TAK 1.0.2 ((T)om's lossless (A)udio (K)ompressor)

This version brings a new low complexity Turbo preset, a faster preset configuration, a significant encoding speedup of the strongest setting and support for the LossyWav/LossyFlac preprocessor.

It consists of:

- TAK Applications 1.0.2.
- TAK Winamp plugin 1.0.6  (Updated 2007-11-12).
- TAK SDK 1.0.4.
- TAK Decoding library 1.0.5.

Download and Changelog

Download the main archive and tools, and view the changelog, in the upload section: TAK 1.0.2 Final

TAK 1.0.2

Reply #1
wow nice...awesome work  will check out the new version...thanks TBeck

TAK 1.0.2

Reply #2
Thank you very much, Thomas. Your work is appreciated.
Error 404; signature server not available.

TAK 1.0.2

Reply #3
Good one. I like tak.

TAK 1.0.2

Reply #4
Very nice speed increase when encoding into -p4 and only a small increase to the total file size.  Great work!
Zune 80, Tak -p4 audio library, Lossless=Choice

TAK 1.0.2

Reply #5
The error in WinAmp plugin persists 

TAK 1.0.2

Reply #6
I'll use it from now on.



Thanks heaps




TAK 1.0.2

Reply #10
I don't know if it is the foo_input_tak.dll or the tak_deco_lib.dll, but for the new Insane preset Foobar shows "Codec Profile : TAK 5 extra".

TAK 1.0.2

Reply #11
I don't know if it is the foo_input_tak.dll or the tak_deco_lib.dll, but for the new Insane preset Foobar shows "Codec Profile : TAK 5 extra".

That is expected as the current version of foo_input_tak does not know about the Insane preset yet; tak_deco_lib only reports the numerical code.

TAK 1.0.2

Reply #12
Hi, TBeck:
  About the C header file "tak_deco_lib.h"
  I think you should add
Code: [Select]
#ifndef _TAK_DECO_LIB
#define _TAK_DECO_LIB
...
#endif

  otherwise, the head will be included more than once in a project.

TAK 1.0.2

Reply #13
There is a deadly bug in your new SDK 1.0.4.
I've created a decoding plug-in for a player with your TAK v1.0.1 and it works fine.
But the .tak file CANNOT be decoded by your new tak_deco_lib.dll after I update it to your TAK v1.0.2.

I have tried to debug my programme and I found that A deadly bug will be caught after I invoked "tak_SSD_ReadAudio" 6-7 times.

Can you fix it?

TAK 1.0.2

Reply #14
..but for the new Insane preset Foobar shows "Codec Profile : TAK 5 extra".

That is expected as the current version of foo_input_tak does not know about the Insane preset yet; tak_deco_lib only reports the numerical code.


How about having it always show the numeric value?
If I'm correct the old Normal is about the same as the new High
(Likewise the old -p2 is about the same as the new -p3).
  Hmm... I see now that it wouldn't help.
In theory, there is no difference between theory and practice. In practice there is.

TAK 1.0.2

Reply #15
First, thanks for the encouraging words! 

The error in WinAmp plugin persists 

Until know i haven't dealt with it...

Hi, TBeck:
  About the C header file "tak_deco_lib.h"
  I think you should add
Code: [Select]
#ifndef _TAK_DECO_LIB
#define _TAK_DECO_LIB
...
#endif

  otherwise, the head will be included more than once in a project.

Huh! I thought i had this done. Thanks for the hint!

There is a deadly bug in your new SDK 1.0.4.
I've created a decoding plug-in for a player with your TAK v1.0.1 and it works fine.
But the .tak file CANNOT be decoded by your new tak_deco_lib.dll after I update it to your TAK v1.0.2.

I have tried to debug my programme and I found that A deadly bug will be caught after I invoked "tak_SSD_ReadAudio" 6-7 times.

Can you fix it?

Not without further information. Of course i have checked the backwards compatibility before releasing V1.0.2. Ok, i only checked the applications but since they are using the same code as the library this should be sufficient.

Can you decode the file with the V1.0.2 applications?

Can you send me the affected file via email (see my profile)?

  Thomas

TAK 1.0.2

Reply #16
Ive asked Cog developer if he could implement TAK into Cog. The short answer:

Quote
Neither of these formats seem to have an open source decoder.   

Without that, I'm not very interested in adding support for it. Plugins could be written for them, but I won't be including them in the main distribution and I won't be making them.

TAK 1.0.2

Reply #17
Ive asked Cog developer if he could implement TAK into Cog. The short answer:

Quote

Neither of these formats seem to have an open source decoder.   

Without that, I'm not very interested in adding support for it. Plugins could be written for them, but I won't be including them in the main distribution and I won't be making them.


yeah i also wanted to say that tak cant expect to be spread till its closed source

TAK 1.0.2

Reply #18
Yes, i think the decoder part should be open source. I dont kow much about these algorithms, but if the decoding process is invertabe then it cant be done alone saflely (without the enc p.).

For OSX i dont know any other lossless audio player (even if it plays only a small part of the formats). Once i had to decode my albums before i played them in OSX. TAK is yet only for Win32? 

Tom, youve made a good work, thanks.

EDIT: Irrelevant, Ive find the answer in the wiki .

TAK 1.0.2

Reply #19
Not without further information. Of course i have checked the backwards compatibility before releasing V1.0.2. Ok, i only checked the applications but since they are using the same code as the library this should be sufficient.

Can you decode the file with the V1.0.2 applications?

Can you send me the affected file via email (see my profile)?

  Thomas


Hi, Thomas:
  I use your new v1.0.2 to encode a new .tak file and decode it. Everything is OK.
  But my code did not work.
Here is my sample code.
Can you help me to fix it? It only decode one frame and exit:(
Code: [Select]
#include <windows.h>
#include <stdio.h>
#include "tak_deco_lib.h"
#pragma comment( lib, "tak_deco_lib")

static TtakBool _CanRead(void * AUser) { return tak_True; }
static TtakBool _CanWrite(void * AUser) { return tak_False; }
static TtakBool _CanSeek(void * AUser) { return tak_True; }
static TtakBool _Read(void * AUser, void * ABuf, TtakInt32 ANum, TtakInt32 * AReadNum)
{
    FILE ** fp = (FILE **)AUser;
    *AReadNum = fread( (LPBYTE)ABuf, 1, ANum, *fp);
    if ( *AReadNum < ANum) {
        return tak_False;
    } else {
        return tak_True;
    }
}
static TtakBool _Seek(void * AUser, TtakInt64 APos)
{
    return (0 == _fseeki64( *(FILE **)AUser, APos, SEEK_SET)) ? tak_True : tak_False;
}
static TtakBool _GetLength(void * AUser, TtakInt64 * ALength)
{
    FILE ** fp = (FILE **)AUser;
    TtakInt64 pos = _ftelli64( *fp); // save it
    if ( 0 != _fseeki64( *fp, 0, SEEK_END)) return tak_False; // seek to end
    *ALength = _ftelli64( *fp); // get length
    if ( 0 != _fseeki64( *fp, pos, SEEK_SET)) return tak_False; // restore
    return tak_True;
}

int _tmain(int argc, _TCHAR* argv[])
{
    FILE * m_fp;
    m_fp = _tfopen( _T("test.tak"), _T("r"));

    TtakSeekableStreamDecoder m_Decoder;
    Ttak_str_StreamInfo       m_StreamInfo;

    LPBYTE m_TAKBuf; // decoded buffer

    // OPEN

    TtakSSDOptions            opt  = { tak_Cpu_Any, 0 };
    TtakStreamIoInterface     sioi = { _CanRead, _CanWrite, _CanSeek, _Read, NULL, NULL, NULL, _Seek, _GetLength };

    m_Decoder = tak_SSD_Create_FromStream( &sioi, &m_fp, &opt, NULL, NULL);

    int ret = 0;
    if ( (tak_True == tak_SSD_Valid( m_Decoder))
      && (tak_res_Ok == tak_SSD_GetStreamInfo( m_Decoder, &m_StreamInfo))
       )
    {
        // allocate decoding buffer
        m_TAKBuf = new BYTE[m_StreamInfo.Sizes.FrameSizeInSamples * m_StreamInfo.Audio.BlockSize];
    } else {
        tak_SSD_Destroy( m_Decoder);
        fclose( m_fp);
        return 0;
    }

    // DECODE
    TtakInt32 readNum;
    TtakResult takResult;
    do {
        takResult = tak_SSD_ReadAudio( m_Decoder, m_TAKBuf, m_StreamInfo.Sizes.FrameSizeInSamples, &readNum);
        Sleep( 10);
    } while ( (takResult == tak_res_Ok) || (takResult == tak_res_ssd_FrameDamaged));

    // DESTROY

    tak_SSD_Destroy( m_Decoder);

    fclose( m_fp);

    return 0;
}

TAK 1.0.2

Reply #20
Hi, Thomas:
  I use your new v1.0.2 to encode a new .tak file and decode it. Everything is OK.
  But my code did not work.
Here is my sample code.
Can you help me to fix it? It only decode one frame and exit:(

At first sight your code looks ok.

I have to speculate a bit.

You don't check the success of _tfopen() before using the file with TAK. Possibly _tfopen() already fails...

Code: [Select]
int _tmain(int argc, _TCHAR* argv[])
{
    FILE * m_fp;
    m_fp = _tfopen( _T("test.tak"), _T("r"));

    TtakSeekableStreamDecoder m_Decoder;
    Ttak_str_StreamInfo       m_StreamInfo;

    LPBYTE m_TAKBuf; // decoded buffer

    // OPEN

    TtakSSDOptions            opt  = { tak_Cpu_Any, 0 };
    TtakStreamIoInterface     sioi = { _CanRead, _CanWrite, _CanSeek, _Read, NULL, NULL, NULL, _Seek, _GetLength };

    m_Decoder = tak_SSD_Create_FromStream( &sioi, &m_fp, &opt, NULL, NULL);

TAK 1.0.2

Reply #21
I have been playing around with this and I must say that I am impressed.  With TAK 1.0.2 I not only end up smaller files than my WavPack -hhx files with -p5m but the TAK files decode quite a bit faster.

I actually have a few of my CDs encoded as TAK with embedded cuesheets now and will probably have more soon.  Thank you for TAK, TBeck
Nero AAC 1.5.1.0: -q0.45

TAK 1.0.2

Reply #22
I have just uploaded a new version of foo_input_tak for foobar2000 0.9.x (does not require 0.9.5) that adds recognition for the "Insane" profile in TAK 1.0.2 (full change list).

I did some quick testing with the CPU optimization options:
Code: [Select]
Encoder: TAK 1.0.2
Profile: normal

Decoder: foo_input_tak 0.3.4 / tak_deco_lib 1.0.5

Decoding test settings (foo_benchmark):
  Buffer entire file into memory: yes
  High priority: yes
  Passes: 3
  
Desktop PC: AMD Athlon XP 2500+ (1.84 GHz)
Laptop PC:  AMD Turion64 MT30 (1.60 GHz)

Results:

Setting  | Desktop PC        | Laptop PC
==========================================
Any      | 134.264x realtime | 126.254x realtime
None     |  91.834x realtime | 104.393x realtime
ASM only |  91.834x realtime | 105.475x realtime
MMX only | 133.722x realtime | 128.006x realtime
SSE only |  91.959x realtime | 105.537x realtime


TBeck: Is SSE support implemented or is that flag only a placeholder?

TAK 1.0.2

Reply #23
TBeck: Is SSE support implemented or is that flag only a placeholder?



Wow...  MMX is slower than none?  What was this compiled with?

[edit]
nevermind, i just answered my own question... Borland Delphi 6 or 7
[/edit]

TAK 1.0.2

Reply #24
If there would be more decoders may be there will be more users whowill use tak?
What I really miss is something to play Tak also in Linux systems.

Great work.