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.2.0 Development Thread (Read 309755 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

lossyWAV 1.2.0 Development Thread

Reply #450
How about a link somewhere to http://www.fftw.org/download.html to make the lib easy to find (and avoid a lot of asking)?
In theory, there is no difference between theory and practice. In practice there is.


lossyWAV 1.2.0 Development Thread

Reply #452
actually, I can't find where to download libfftw3-3.dll either...

Use the link I gave, on this page you find links for Windows (there's 64bits too), OS-X, Linux and so on.

The current version is FFTW 3.2.1 in the zip file you find libfftw3-3.dll

BTW. At the beginning of this thread Nick says "Use of FFTW requires the presence of "libfftw3-3.dll" on the host", I tell you it needs that lib always with version 1.1.4c whether used or not.
In theory, there is no difference between theory and practice. In practice there is.

lossyWAV 1.2.0 Development Thread

Reply #453
Use the link I gave, on this page you find links for Windows (there's 64bits too), OS-X, Linux and so on.

The current version is FFTW 3.2.1 in the zip file you find libfftw3-3.dll

Oh. Thanks.
But I'm on Ubuntu and I've got libfftw3-3 installed, but I doubt Wine will care about that.  So I still need the dll.

BTW. At the beginning of this thread Nick says "Use of FFTW requires the presence of "libfftw3-3.dll" on the host", I tell you it needs that lib always with version 1.1.4c whether used or not.

Probably just a bug.

lossyWAV 1.2.0 Development Thread

Reply #454
Meh - I think that I'll have to compile a separate version without FFTW support.
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.2.0 Development Thread

Reply #456
Quote
I tell you it needs that lib always with version 1.1.4c whether used or not.

I created DLL stub (only 1kb in 7z archive)  But yes, static linking isn't reasonable here.

Quote
I think that I'll have to compile a separate version without FFTW support.

Maybe it's better to use LoadLibrary() when user chooses to use fftw library?

lossyWAV 1.2.0 Development Thread

Reply #457
I'm unwilling to add circa 500kiB to the download as it will eat into HA's bandwidth, so I do not intend to add the DLL to the distribution.

I am searching for error trapping principles to allow the program to continue in the event that the DLL is missing.
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.2.0 Development Thread

Reply #458
Don't know how to make this in Pascal, but C code looks like this:
Code: [Select]
//init
if(fftw_switch)
{
    hinstLib = LoadLibrary("libfftw3-3.dll");
    if(hinstLib == NULL)
    {
        print_error("...");
        exit(-1);
    }
    proc1 = GetProcAddress(hinstLib, "_fftw_execute");
    if(proc1 == NULL)
    {
        print_error("...");
        exit(-1);
    }

    //here we can call proc1
}


//cleanup
if(fftw_switch)
{
    FreeLibrary(hinstLib);
}

lossyWAV 1.2.0 Development Thread

Reply #459
I'm unwilling to add circa 500kiB to the download as it will eat into HA's bandwidth, so I do not intend to add the DLL to the distribution.

I am searching for error trapping principles to allow the program to continue in the event that the DLL is missing.

Well I could host it for you if you don't find a way to make it run without the DLL being present.

Although, granted, it would be better to fix it so it can run even if there is no libfftw3-3.dll.

 

lossyWAV 1.2.0 Development Thread

Reply #460
Thanks for the offer of hosting. I think that I have cracked the running without 'libfftw3-3.dll' problem (thanks for the pointer lvqcl!!). Still testing - will try to post beta 1.1.4d and source later.

[edit] Should lossyWAV terminate with an error if --fftw is included in the command line and 'libfftw3-3.dll' cannot be found? The alternative would be to continue using the existing FFT routines. [/edit]
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.2.0 Development Thread

Reply #461
Thanks for the offer of hosting. I think that I have cracked the running without 'libfftw3-3.dll' problem (thanks for the pointer lvqcl!!). Still testing - will try to post beta 1.1.4d and source later.

No problem.  I'm glad you managed to fix it.

[edit] Should lossyWAV terminate with an error if --fftw is included in the command line and 'libfftw3-3.dll' cannot be found? The alternative would be to continue using the existing FFT routines. [/edit]

If I understand correctly, the only difference is the speed and not the quality, right? In that case, I think it would be the best if it just printed out a warning that it can't use FFTW because the libfftw3-3.dll is not present and continue "encoding" using the existing FFT routines.

lossyWAV 1.2.0 Development Thread

Reply #462
If I understand correctly, the only difference is the speed and not the quality, right? In that case, I think it would be the best if it just printed out a warning that it can't use FFTW because the libfftw3-3.dll is not present and continue "encoding" using the existing FFT routines.
We're certainly thinking on the same wavelength....

lossyWAV beta 1.1.4d 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.2.0 Development Thread

Reply #463
If I understand correctly, the only difference is the speed and not the quality, right? In that case, I think it would be the best if it just printed out a warning that it can't use FFTW because the libfftw3-3.dll is not present and continue "encoding" using the existing FFT routines.
We're certainly thinking on the same wavelength....

lossyWAV beta 1.1.4d attached to post #1 in this thread.

Just for your information, I've tested it on No You Girls from Franz Ferdinand's latest album, here are the results:

Size of the original wav: 32.3 MB

Size of the flac compressed using -8 compression setting without lossyWAV preprocessing: 27.1 MB

After preprocessing with lossyWAV using -S setting (and with --fftw, but that's not important here) and then compressing with flac using settings -8 -b 512 --keep-foreign-metadata: 12.0 MB

 

I haven't measured the time it takes with and without --fftw, but I don't really care because these results are purely awesome! And damn you're a quick developer. (No sarcasm intended.)

lossyWAV 1.2.0 Development Thread

Reply #464
Okay, I tested the difference between running it with and without --fftw now (on the same song as above). Without --fftw it takes 6.31 seconds, with --fftw it takes 5.21 seconds - approx. 17.43% faster.

The resulting files are the same, of course.

lossyWAV 1.2.0 Development Thread

Reply #465
Oh, it doesn't support wild-cards in file-names?

I can only run it through Wine so it may also be a Wine issue, but it gives me an error when I put *.wav for input...

lossyWAV 1.2.0 Development Thread

Reply #466
lossyWAV doesn't support wild cards in the input filename. If foobar2000 works under WINE then I would suggest that as a very good option for processing.
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.2.0 Development Thread

Reply #467
lossyWAV doesn't support wild cards in the input filename.

Perhaps it would be a good feature to implement sometime in the future?

I prefer doing things directly from command-line, although I would be willing to use Foobar2000 until such a feature was implemented (if you ever decide implement it, that is), but it seems the latest versions of it don't work quite well under latest versions of Wine.

So for the moment I'll just settle with encoding file-by-file. 

Luckily, command-line interface of Linux is rather advanced so I think there might be a trick to make the command-line itself call "wine lossyWAV.exe *.wav -S --fftw", replacing '*' with any filename which ends with ".wav". I'll look into that, I might be wrong, though.

lossyWAV 1.2.0 Development Thread

Reply #468
I don't know if batch files are of any use to you using WINE, but there was a drag-n-drop batch file somewhere in one of these threads which also copied the tags from the source file.
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.2.0 Development Thread

Reply #469
I don't know if batch files are of any use to you using WINE, but there was a drag-n-drop batch file somewhere in one of these threads which also copied the tags from the source file.

Hm. Thanks, maybe I'll dig through sometime, but right now I have no problem with doing it file-by-file. 

What can I say - laziness shows itself in weird ways... :-/

lossyWAV 1.2.0 Development Thread

Reply #470
Having finished encoding for my DAP (using 1.1.3e)  I didn't do any encodings recently.
But now with these news on lossyWAV I wanted to compare 1.1.4d -P --fftw against 1.1.3.e -P.
I noticed bitrate was always a bit lower (up to 4 kbps with my test set) when using 1.1.4d --fftw.

Can you tell about what has changed, Nick?
lame3995o -Q1.7 --lowpass 17

lossyWAV 1.2.0 Development Thread

Reply #471
At beta 1.1.4a I separated the spreading function average calculations so that one is calculated for the results of the old spreading method and one is calculated for the results of the new spreading method. This does not affect the minima at all - the lowest value is still the lowest but the average is now taken as the lower of old and new rather than the average of the minimum overall.
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.2.0 Development Thread

Reply #472
Thank you, Nick.
lame3995o -Q1.7 --lowpass 17

lossyWAV 1.2.0 Development Thread

Reply #473
Er, so, what features are you trying to implement in the next beta?

lossyWAV 1.2.0 Development Thread

Reply #474
I'm looking again at window functions - specifically, implementing the Blackman window which takes a parameter alpha in the range 0..1. Zero is equivalent to the existing Hanning window function used, 0.57 is approximately equal to the Flat-Top window. I have been re-calculating noise threshold values for values in the permissible range (although I am thinking of limiting the user selectable alpha range to 0.0 to 0.6) and have spotted a relationship between some constants specific to each alpha value.
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)