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: lossyWAV 1.3.0 Delphi to C++ Translation Thread (Read 158578 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #75
Got sidetracked again - I'm going to add an option to convert any valid input audio (9-bit to 32-bit signed integer) to Float16, with or without adaptive / fixed noise-shaping. This will require the same messing about with the WAV handling code that I had to do for TransPCM. ETA is sometime early in the new year.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

 

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #76
any progress on lossywav?

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #77
Still working on it, still distracted by the Elite: Dangerous KickStarter....
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #78
I've been experimenting with various compression levels in FLAC and -q X, and I've found that for certain tracks, -0 compresses much more efficiently than higher levels, and is practically equivalent with at least one of the tracks I tested at -8.  Extraportable combined with -0 might very well make for the most overall efficient decode combination ever.  Exciting stuff.
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #79
lossyWAV beta 1.3.0g attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #80
lossyWAV beta 1.3.0g attached to post #1 in this thread.


Neat!  I'm getting an average of 2 to 3 kbps reduction at level 0 compression for the material I've tested so far.  It also seems to average faster processing than 1.3.0a, which is what I was using previously.
FLAC -2 w/ lossyWAV 1.3.0i -q X -i

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #81
I'm getting an average of 2 to 3 kbps reduction at level 0 compression for the material I've tested so far.
I've carried out a FLAC settings comparison test (based on my 55 problem sample test set) and will post the results this evening.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #82
I did a bit of testing with my 55 problem sample set (12:43.933 of audio) processed using "-q X" and got the following results:

Code: [Select]
+------------------+---------------------+
|      FLAC      |      Relative      |
|      Encoder    +----------+----------+
|      Setting    |  Size  |  Time  |
+------------------+----------+----------+
| -8 -m -r 8 -p    |  97.66%  |  2187%  |
| -8 -r 8 -p      |  97.66%  |  2089%  |
| -8 -e -r 8 -p    |  97.66%  |  2094%  |
| -8 -e -m -r 8 -p |  97.66%  |  2105%  |
| -8 -e -p        |  97.66%  |  1599%  |
| -8 -p            |  97.66%  |  1615%  |
| -8 -m -p        |  97.66%  |  1616%  |
| -8 -e -m -p      |  97.66%  |  1634%  |
| -6 -e -m -r 8 -p |  98.06%  |  1689%  |
| -7 -e -r 8 -p    |  98.06%  |  1694%  |
| -6 -e -r 8 -p    |  98.06%  |  1695%  |
| -7 -e -m -r 8 -p |  98.06%  |  1697%  |
| -4 -e -m -r 8 -p |  98.06%  |  1701%  |
| -7 -r 8 -p      |  98.06%  |  1705%  |
| -7 -m -r 8 -p    |  98.06%  |  1710%  |
| -5 -e -m -r 8 -p |  98.06%  |  1723%  |
| -5 -e -r 8 -p    |  98.06%  |  1799%  |
| -7 -e -p        |  98.06%  |  1215%  |
| -6 -e -p        |  98.06%  |  1220%  |
| -6 -e -m -p      |  98.06%  |  1222%  |
| -7 -m -p        |  98.06%  |  1222%  |
| -7 -e -m -p      |  98.06%  |  1224%  |
| -7 -p            |  98.06%  |  1225%  |
| -5 -e -p        |  98.10%  |    983%  |
| -5 -e -m -p      |  98.10%  |  1020%  |
| -4 -e -m -p      |  98.18%  |    825%  |
| -8 -r 8          |  98.36%  |    368%  |
| -8 -m -r 8      |  98.36%  |    370%  |
| -8 -e -m -r 8    |  98.36%  |    374%  |
| -8 -e -r 8      |  98.36%  |    379%  |
| -8 -e -m        |  98.36%  |    249%  |
| -8 -m            |  98.36%  |    249%  |
| -8              |  98.36%  |    250%  |
| -8 -e            |  98.36%  |    250%  |
| -3 -e -m -r 8 -p |  98.69%  |  1449%  |
| -6 -e -m -r 8    |  98.80%  |    294%  |
| -7 -e -r 8      |  98.80%  |    295%  |
| -7 -r 8          |  98.80%  |    295%  |
| -5 -e -r 8      |  98.80%  |    296%  |
| -7 -e -m -r 8    |  98.80%  |    296%  |
| -6 -e -r 8      |  98.80%  |    296%  |
| -4 -e -m -r 8    |  98.80%  |    298%  |
| -7 -m -r 8      |  98.80%  |    298%  |
| -5 -e -m -r 8    |  98.80%  |    318%  |
| -6 -e -m        |  98.81%  |    174%  |
| -7 -e -m        |  98.81%  |    175%  |
| -6 -e            |  98.81%  |    176%  |
| -7 -m            |  98.81%  |    177%  |
| -7 -e            |  98.81%  |    183%  |
| -7              |  98.81%  |    189%  |
| -3 -e -m -p      |  98.82%  |    605%  |
| -5 -e            |  98.86%  |    127%  |
| -5 -e -m        |  98.86%  |    138%  |
| -4 -e -m        |  98.95%  |    105%  |
| -3 -e -m -r 8    |  99.40%  |    261%  |
| -6 -m -r 8 -p    |  99.42%  |    201%  |
| -6 -r 8 -p      |  99.42%  |    205%  |
| -5 -r 8 -p      |  99.42%  |    206%  |
| -5 -m -r 8 -p    |  99.42%  |    209%  |
| -4 -m -r 8 -p    |  99.42%  |    215%  |
| -6 -m -p        |  99.42%  |    137%  |
| -6 -p            |  99.42%  |    138%  |
| -5 -m -p        |  99.45%  |    106%  |
| -5 -p            |  99.45%  |    108%  |
| -4 -m -p        |  99.51%  |    87%  |
| -3 -e -m        |  99.55%  |    71%  |
| -3 -m -r 8 -p    |  99.86%  |    209%  |
| -3 -m -p        |  99.95%  |    88%  |
| -6 -m -r 8      |  99.97%  |    28%  |
| -6 -r 8          |  99.97%  |    31%  |
| -5 -m -r 8      |  99.97%  |    32%  |
| -4 -m -r 8      |  99.97%  |    33%  |
| -5 -r 8          |  99.97%  |    33%  |
| -6 -m            |  99.97%  |      6%  |
| -6              |  99.97%  |      7%  |
| -5 -m            | 100.00%  |    -1%  |
+------------------+----------+----------+
| -5              | 100.00%  |      0%  |
+------------------+----------+----------+
| -4 -m            | 100.06%  |    -5%  |
| -3 -m -r 8      | 100.44%  |    27%  |
| -3 -m            | 100.52%  |    -9%  |
| -3 -e -r 8 -p    | 100.54%  |    678%  |
| -3 -e -p        | 100.69%  |    279%  |
| -3 -e -r 8      | 101.28%  |    102%  |
| -3 -e            | 101.45%  |      9%  |
| -3 -r 8 -p      | 101.76%  |    78%  |
| -3 -p            | 101.87%  |    20%  |
| -3 -r 8          | 102.37%  |    -15%  |
| -3              | 102.48%  |    -30%  |
| -4 -e -r 8 -p    | 102.59%  |    846%  |
| -4 -e -p        | 102.74%  |    403%  |
| -4 -e -r 8      | 103.33%  |    130%  |
| -4 -e            | 103.50%  |    28%  |
| -4 -r 8 -p      | 104.08%  |    85%  |
| -4 -p            | 104.19%  |    22%  |
| -4 -r 8          | 104.64%  |    -8%  |
| -4              | 104.76%  |    -28%  |
| -2 -e -m -r 8 -p | 108.34%  |    113%  |
| 0 -e -m -r 8 -p  | 108.34%  |    114%  |
| 0 -e -m -r 8    | 108.34%  |    114%  |
| -2 -e -m -r 8    | 108.34%  |    115%  |
| -1 -e -m -r 8    | 108.34%  |    115%  |
| -1 -e -m -r 8 -p | 108.34%  |    117%  |
| -2 -e -r 8 -p    | 108.34%  |    118%  |
| -2 -e -r 8      | 108.34%  |    119%  |
| -2 -r 8          | 108.50%  |    -4%  |
| 0 -m -r 8 -p    | 108.50%  |    -3%  |
| 0 -m -r 8        | 108.50%  |    -3%  |
| -1 -m -r 8 -p    | 108.50%  |    -2%  |
| -2 -r 8 -p      | 108.50%  |    -1%  |
| -2 -m -r 8      | 108.50%  |    -1%  |
| -1 -m -r 8      | 108.50%  |      0%  |
| -2 -m -r 8 -p    | 108.50%  |      5%  |
| -2 -e -m -p      | 108.65%  |    -2%  |
| -2 -e -m        | 108.65%  |    -1%  |
| -1 -e -m -p      | 108.65%  |    -1%  |
| 0 -e -m -p      | 108.65%  |    -1%  |
| 0 -e -m          | 108.65%  |    -1%  |
| -1 -e -m        | 108.65%  |      2%  |
| -2 -e -p        | 108.65%  |      5%  |
| -2 -e            | 108.65%  |      7%  |
| 0 -m            | 108.71%  |    -28%  |
| 0 -m -p          | 108.71%  |    -28%  |
| -1 -m            | 108.71%  |    -27%  |
| -2 -m -p        | 108.71%  |    -27%  |
| -2              | 108.71%  |    -27%  |
| -2 -m            | 108.71%  |    -25%  |
| -2 -p            | 108.71%  |    -23%  |
| -1 -m -p        | 108.71%  |    -21%  |
| 0 -e -r 8 -p    | 110.94%  |    30%  |
| 0 -e -r 8        | 110.94%  |    35%  |
| 0 -r 8 -p        | 111.12%  |    -31%  |
| 0 -r 8          | 111.12%  |    -28%  |
| 0 -e            | 111.29%  |    -29%  |
| 0 -e -p          | 111.29%  |    -25%  |
| 0 -p            | 111.37%  |    -41%  |
| 0                | 111.37%  |    -34%  |
| -1 -e -r 8 -p    | 113.83%  |    34%  |
| -1 -e -r 8      | 113.83%  |    44%  |
| -1 -r 8 -p      | 114.06%  |    -27%  |
| -1 -r 8          | 114.06%  |    -24%  |
| -1 -e -p        | 114.18%  |    -20%  |
| -1 -e            | 114.18%  |    -19%  |
| -1 -p            | 114.31%  |    -39%  |
| -1              | 114.31%  |    -38%  |
+------------------+----------+----------+
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #83
lossyWAV beta 1.3.0h attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #84
lossyWAV beta 1.3.0i attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #85
lossyWAV beta 1.3.0j attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #86
What is the penalty (if any) for using the -i switch? Slower encoding, higher risk of artifacts, or both? For someone not that concerned with filsesize, is the new noise shaping routine preferable to the default?

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #87
Hi Cynic,

The penalty is simply that the noise shaping is a bit more aggressive in trying to conform to the lossless audio spectrum. This saves about 1% of the resultant lossyFLAC size when compressed at --extraportable, less at higher quality levels.

I am currently working on a (very) simplistic psymodel based on masking using the Bark scale. This may be a wrong turn, but it is an option for both the classic method and the --interp-curve method of determining the basis shape of the noise spectrum.

Nick.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #88
Out of curiousity, why does the distribution include a "gpl.txt" file? I thought it is for open source software.

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #89
When v1.40 is released, the source will be as well in a similar manner to the previous versions.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #90
lossyWAV beta 1.3.0k attached to post #1 in this thread.

[edit] updated to beta 1.3.0k2 [/edit]
[edit2] updated to beta 1.3.0k3 [/edit2]
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #91
lossyWAV beta 1.3.0m attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #92
lossyWAV beta 1.3.0n attached to post #1 in this thread.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #93
Thanks for your work. I'm looking forward to 1.3.0 final.

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #94
I may be late for the party, but regarding the internal FFT routines...

You might consider using FFTW's genfft to generate efficient FFT routine source code. genfft is a set of routines written in OCaml which generate C code for efficient FFT routines. For example, this is a C code for 128-sample MDCT generated with genfft. These were used to generate FFTW's FFT routines, and you can use it to generate the code for lossyWAV's internal FFT routines. You can download it from here. Contact and I'm sure they'll gladly assist you with using it to generate code for lossyWAV.

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #95
By the way, you can read more about genfft and why FFTW is fast here.

The best solution, however, is to not have a specified internal FFT routine, because ultimately its performance will be hardware-specific (better/worse on some hardware). You are better off completely relying on FFTW since it adapts itself to whatever hardware it's used on.

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #96
lossyWAV beta 1.3.0o attached to post #1 in this thread.

=============================================================

Hi doccolinni,

The internal FFT / IFFT routines are only used if the appropriate FFTW 32-bit DLL is not available to lossyWAV.

Nick.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #97
does pipeing work with wave64 format? for example latest flac 1.3 -> lossywav -> latest flac 1.3

btw soon you will run out of alphabet

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #98
FLAC 1.3.0 > lossyWAV 1.3.0o > FLAC 1.3.0 works with --force-wave64-format in the first FLAC command.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

lossyWAV 1.3.0 Delphi to C++ Translation Thread

Reply #99
Ok works like I charm 
I've encoded using pipes (FLAC -> lossywav -> FLAC) 2h:41m 6 channels avatar soundtrack without any problems.
Lossywav now really needs multithreading optimalization. Using internal algo it took 40 minutes to complete task on my Q6600@3Ghz. With proper multithreading this could be reduced to 12-14 minutes.

Btw What exactly .dll does lossywav need to use FFTW? libfftw3-3.dll , libfftw3f-3.dll or libfftw3l-3.dll ?

One more thing. You forgot to include pthreadGC2.dll in package.