IPB

Welcome Guest ( Log In | Register )

15 Pages V  « < 3 4 5 6 7 > »   
Reply to this topicStart new topic
New FLAC encoder
Justin Ruggles
post Sep 19 2006, 01:26
Post #101





Group: Developer
Posts: 165
Joined: 3-June 06
From: Raleigh, NC
Member No.: 31393



QUOTE (HbG @ Sep 18 2006, 16:59) *
I can encode that sample at -0 just fine, using wisodev's Flake 0.10 build, both through Foobar and the commandline.

I did discover another bug: when trying to read from the following filename: "- 37_0-10_12.wav" or when trying to write a file called "- 37_0-10_12.flac" it fails. For the output i get a "tried to write to nonexistent pipe" error and for the input file, it treats it like an unrecognised commandline and gives the standard message. I tested further and it gives the error for all filenames that start with a dash.
Flac handles it fine.

I'll try to fix that very soon. Flake only has very simple commandline parsing right now. It should be fairly trivial to fix.
Thanks,
Justin


QUOTE (Synthetic Soul @ Sep 18 2006, 10:58) *
It seems the problem is still evident even in the first 10 seconds of the file, so I have uploaded a Flake -12 encoded version of the first 10 seconds for others to test:

http://synthetic-soul.co.uk/temp/37_0-10_12.flac


Hmm. It works for me, but I'm using Linux. The "-0" mode has been changed some since the 0.10 release. Could you try using current SVN? If you need a binary, I can compile one & post it.
Go to the top of the page
+Quote Post
Synthetic Soul
post Sep 19 2006, 07:29
Post #102





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



Mine is failing at home on Win2K with Athlon XP 2400+, and at work with XP. I believe the CPU at work is AMD. I will confirm later.

I will see if I can compile from SVN today at work.

Edit: I will only be able to compile if there are Visual C++ project files, as I'm not a C++ programmer, I can just hack some code and click a button to compile. smile.gif As you are a Linux man I doubt this will be the case so a binary would be nice if someone could provide. Edit 2: I do have Cygwin installed, but I'm not sure that I have the necessary parts, and I've never compiled using a makefile! I see from browsing the repository that there are no Visual C++ project files. smile.gif

QUOTE (bukem @ Sep 18 2006, 23:45) *
Flake 0.10 has failed to compress your test file with -0 switch on my Pentium 4 PC BUT it succeeded to compress it on my Intel Centrino laptop. Seems like Flake has some issues with Pentium 4?
Thanks for proving I'm not mad anyway!

This post has been edited by Synthetic Soul: Sep 19 2006, 07:58


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
Mangix
post Sep 19 2006, 08:27
Post #103





Group: Members
Posts: 587
Joined: 26-February 06
Member No.: 28077



i think that you can just use make to compile the sources. if you want to do that, just grab a copy of MinGW(there's a nice installer for it too) and use "mingw32-make" on the directory with all of the source code. i just quickly browsed through the SVN and i saw that there was a makefile in there so theoretically, it should work. I'm a bit lazy to try it out though.

edit: btw, flake is really nice. right now, I'm using the -12 option on build 0.10 and it makes smaller files with faster decoding. i tested it with Josh's optimized FLAC build(the one which he uploaded here) and flake still beats it. I've also heard that FLAC 1.1.3 will have some of flake's improvements so i can't wait till FLAC 1.1.3 releases.

edit2: spelling

This post has been edited by Mangix: Sep 19 2006, 08:31
Go to the top of the page
+Quote Post
ckjnigel
post Sep 19 2006, 08:47
Post #104





Group: Members
Posts: 218
Joined: 12-October 01
Member No.: 278



QUOTE (Mangix @ Sep 19 2006, 03:27) *
I've also heard that FLAC 1.1.3 will have some of flake's improvements


Are the two developers in contact and working cooperatively rather than competitively?
Go to the top of the page
+Quote Post
Mangix
post Sep 19 2006, 08:53
Post #105





Group: Members
Posts: 587
Joined: 26-February 06
Member No.: 28077



i, personally, am not too sure. i've only seen a post in a yalac thread(or something similar) by Josh saying that some of flake's improvements will be in 1.1.3. if you want to know the answer to the question, then i guess you should contact Josh.
Go to the top of the page
+Quote Post
bukem
post Sep 19 2006, 09:06
Post #106





Group: Members
Posts: 120
Joined: 14-September 03
From: Poland
Member No.: 8837



Guys, sorry for beeing noob, but could someone of you upload the build for win32 platform using latest SVN, please?
Go to the top of the page
+Quote Post
wisodev
post Sep 19 2006, 10:53
Post #107





Group: Developer
Posts: 123
Joined: 31-January 06
Member No.: 27439



@bukem
I will upload binarys based on SVN sources after I come home from work (around 16.00 CET).

@Synthetic Soul
You can use project files from flake-0.10-win32-wisodev-src.zip at SourceForge. Copy win32 directory to exported SVN sources root directory and build flake project using Debug setting to provide more information on possible crashes.


--------------------
http://code.google.com/p/wavtoac3encoder/
Go to the top of the page
+Quote Post
Synthetic Soul
post Sep 19 2006, 11:14
Post #108





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



I appear to have managed to build flake under cygwin. I had to download autoconf and make but it finally worked (once I worked out gcc didn't like paths with spaces...).

My binary can be found here. Edit: Link updated to bug-free version (see #113)

It appears to work with 37.wav.

QUOTE (wisodev @ Sep 19 2006, 10:53) *
@Synthetic Soul
You can use project files from flake-0.10-win32-wisodev-src.zip at SourceForge. Copy win32 directory to exported SVN sources root directory and build flake project using Debug setting to provide more information on possible crashes.
Ah, thanks for that. I may take a look anyway.

Edit: wisodev. I'm using Visual C++ 2005 Express Edition and, after I had converted the solution file to the newer format, it complains about the .icproj files... saying the application is not installed... no idea what it's all about. I think I've proved for now that the SVN code works with my file, but I will no doubt test again if you release an SVN version.

Justin, out of interest, what is flake_g.exe? Is it a debug version? As I said, I'm not used to compiling with make!

QUOTE (Mangix @ Sep 19 2006, 08:27) *
i think that you can just use make to compile the sources. if you want to do that, just grab a copy of MinGW(there's a nice installer for it too) and use "mingw32-make" on the directory with all of the source code.
I tried this, but the directory had a configure file which I found out is used with autoconf to create config.mak which is required to build, so I had to go the cygwin route (I think). Thanks for the info anyway.


Edit 10: Hmm... for some reason my cygwin compile refuses to accept -12 saying 21 is too high. Using -21 works but I'm yet to check whether it is actually being accepted as 12. Is this my compile's fault?! blink.gif

This post has been edited by Synthetic Soul: Sep 19 2006, 20:37


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
bukem
post Sep 19 2006, 13:19
Post #109





Group: Members
Posts: 120
Joined: 14-September 03
From: Poland
Member No.: 8837



@wisodev:
thanks

@Synthetic Soul / Justin:
There's problem with your compile of flake or with that particular SVN version. When I try to use preset -12 I get following error:

CODE
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\documents\music\.work>flake -12 37_0-10_12.wav test.flac

Flake: FLAC audio encoder
(c) 2006  Justin Ruggles

invalid compression: 21. must be 0 to 12.
usage: flake [options] <input.wav> <output.flac>
type 'flake -h' for more details.


It seems that for preset 12 wrong value is hardcoded in the source code -> 21 instead of 12.

This post has been edited by bukem: Sep 19 2006, 15:21
Go to the top of the page
+Quote Post
wisodev
post Sep 19 2006, 13:40
Post #110





Group: Developer
Posts: 123
Joined: 31-January 06
Member No.: 27439



QUOTE (Synthetic Soul @ Sep 19 2006, 12:14) *
QUOTE (wisodev @ Sep 19 2006, 10:53) *
@Synthetic Soul
You can use project files from flake-0.10-win32-wisodev-src.zip at SourceForge. Copy win32 directory to exported SVN sources root directory and build flake project using Debug setting to provide more information on possible crashes.
Ah, thanks for that. I may take a look anyway.

Edit: wisodev. I'm using Visual C++ 2005 Express Edition and, after I had converted the solution file to the newer format, it complains about the .icproj files... saying the application is not installed... no idea what it's all about. I think I've proved for now that the SVN code works with my file, but I will no doubt test again if you release an SVN version.


Oh sorry I am using Intel C++ compile at version 8.0.40 and C99 switch (this is req.) witch means it wan't compile Visual Studio without Intel compiler. And version 8 of Intel C++ compiler do not works with Express edition, maybe version 9 works but it produces for me slower binarys (trail version of compiler available on intel website).

This post has been edited by wisodev: Sep 19 2006, 13:51


--------------------
http://code.google.com/p/wavtoac3encoder/
Go to the top of the page
+Quote Post
Synthetic Soul
post Sep 19 2006, 13:50
Post #111





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



QUOTE (bukem @ Sep 19 2006, 13:19) *
@Synthetic Soul / Justin:
There's problem with your compile of flake or with that particular SVN version. When I try to use preset -12 I get following error:

CODE
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\documents\music\.work>flake -12 37_0-10_12.wav test.flac

Flake: FLAC audio encoder
(c) 2006  Justin Ruggles

invalid compression: 21. must be 0 to 12.
usage: flake [options] <input.wav> <output.flac>
type 'flake -h' for more details.
Yes, I just noticed this (see edit above)! Very curious. I can only assume it is my dodgy compiling though. I would wait for wisodev's.


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
pest
post Sep 19 2006, 14:43
Post #112





Group: Members
Posts: 208
Joined: 12-March 04
From: Germany
Member No.: 12686



there is a small bug in flake.c in the parse_number() subroutine

a quick fix

change

CODE
  for(i=0; i<max; i++)


to

CODE
  for(i=max-1; i>=0; i--)
Go to the top of the page
+Quote Post
Synthetic Soul
post Sep 19 2006, 14:54
Post #113





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



QUOTE (pest @ Sep 19 2006, 14:43) *
there is a small bug in flake.c in the parse_number() subroutine
Thanks for that.

New binary uploaded

http://synthetic-soul.co.uk/temp/flake_svn_20060919c.7z

Edit: Compile reuploaded using Justin's fix described below.

This post has been edited by Synthetic Soul: Sep 19 2006, 15:32


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
Justin Ruggles
post Sep 19 2006, 15:18
Post #114





Group: Developer
Posts: 165
Joined: 3-June 06
From: Raleigh, NC
Member No.: 31393



QUOTE (Mangix @ Sep 19 2006, 02:53) *
i, personally, am not too sure. i've only seen a post in a yalac thread(or something similar) by Josh saying that some of flake's improvements will be in 1.1.3. if you want to know the answer to the question, then i guess you should contact Josh.

To answer your question, no we are not in direct collaboration. It's not that I want to be competitive...open source is collaborative by its very nature. I do want to continue to make Flake faster and better, but I'll also be quite happy if some of the ideas in Flake are used to help improve the reference encoder.

QUOTE (Synthetic Soul @ Sep 19 2006, 07:50) *
QUOTE (bukem @ Sep 19 2006, 13:19) *
@Synthetic Soul / Justin:
There's problem with your compile of flake or with that particular SVN version. When I try to use preset -12 I get following error:

CODE
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\documents\music\.work>flake -12 37_0-10_12.wav test.flac

Flake: FLAC audio encoder
(c) 2006  Justin Ruggles

invalid compression: 21. must be 0 to 12.
usage: flake [options] <input.wav> <output.flac>
type 'flake -h' for more details.
Yes, I just noticed this (see edit above)! Very curious. I can only assume it is my dodgy compiling though. I would wait for wisodev's.

It is fixed now in SVN. And as was just pointed out, it was my dodgy coding, not anyone's dodgy compiling.


QUOTE (pest @ Sep 19 2006, 08:43) *
there is a small bug in flake.c in the parse_number() subroutine

a quick fix

change

CODE
  for(i=0; i<max; i++)


to

CODE
  for(i=max-1; i>=0; i--)

That was the problem, but that solution does not work. The 'max' parameter is not the actual number of digits, but the maximum number. If the number of digits is shorter, that code will not work. I applied a fix which counts the digits first, then works backwards.
Go to the top of the page
+Quote Post
pest
post Sep 19 2006, 16:06
Post #115





Group: Members
Posts: 208
Joined: 12-March 04
From: Germany
Member No.: 12686



QUOTE
The 'max' parameter is not the actual number of digits, but the maximum number.


the fix was as quick as my thoughts about it, sry!
btw, why do you reinvent the wheel? use atoi()

this also works
CODE
int ParseNumber(char *arg)
{
  int i;
  int n = 0;
  for(i=0;i<strlen(arg);i++)
  {
    if(arg[i] < '0' || arg[i] > '9') return -1;
    n *= 10;
    n += (arg[i]-48);
  }
  return n;
}
Go to the top of the page
+Quote Post
lexor
post Sep 19 2006, 16:18
Post #116





Group: Members
Posts: 216
Joined: 20-July 03
Member No.: 7896



Hey Justin, I was just looking over the code for Levinson-Durbin recursion, and noticed something odd. In it's very signature you have lpc[][], which is declared in lpc_calc_coefs as lpc[32][32] (I put numbers instead of constant name for readability here), but the algorithm works on the Toeplitz matrix, so storage should be 2N-1. That's a terrible waste of bits, even if it is only a 32x32 array.

what makes even less sense to me is that Levinson algorithm supposed to solve Ax=b for x, given A and b. and that lpc_compute_coefs seems to take 2 vectors and compute the matrix.

This post has been edited by lexor: Sep 19 2006, 18:00


--------------------
The Plan Within Plans
Go to the top of the page
+Quote Post
wisodev
post Sep 19 2006, 16:34
Post #117





Group: Developer
Posts: 123
Joined: 31-January 06
Member No.: 27439



Wll I am bit late but I have tested this wav file witch caused crushes.
I think the s->max_frame_size is estimated incorrectly.

I have patched sources and I think fixed both bugs (crushing and incorrect command-line argument parsing).
My ParseNumber fix is similiar to posted here.

Download patched sources:
flake-svn-2006-09-19-patched-win32-src.zip
Download patched binarys:
flake-svn-2006-09-19-patched-win32-bin.zip

wiso


--------------------
http://code.google.com/p/wavtoac3encoder/
Go to the top of the page
+Quote Post
Synthetic Soul
post Sep 19 2006, 17:15
Post #118





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



Thanks for the non-cygwin-reliant compile wisodev.

I must admit that I am a little confused about the s->max_frame_size bug.

The version I compiled from the SVN source worked fine with my troublesome 37.wav.

Are you saying that, even so, there was still a bug present that could reproduce the behaviour I had seen?


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
wisodev
post Sep 19 2006, 17:23
Post #119





Group: Developer
Posts: 123
Joined: 31-January 06
Member No.: 27439



QUOTE (Synthetic Soul @ Sep 19 2006, 18:15) *
Thanks for the non-cygwin-reliant compile wisodev.

I must admit that I am a little confused about the s->max_frame_size bug.

The version I compiled from the SVN source worked fine with my troublesome 37.wav.

Are you saying that, even so, there was still a bug present that could reproduce the behaviour I had seen?


No problem.

- Well I tested the sources (before ParseNumber fix) and this bug was present. The free(frame) in main.c was causing this crush.
- When I changed max frame bufer to bigger value (added 4 bytes) then it was all OK.
- I have checked older sources (07 version of flake) and the estimation of max frame buffer (encode.c) was changed since them. So I have patched the svn sources and the bug was gone.
- Please try this flake-svn-2006-09-19-win32-bin.zip binary because it is causing flake to crush with 37.wav file and setting -0.

This becomes little complicated. Maybe Justin can put more light on this bug.

This post has been edited by wisodev: Sep 19 2006, 17:27


--------------------
http://code.google.com/p/wavtoac3encoder/
Go to the top of the page
+Quote Post
bukem
post Sep 19 2006, 18:10
Post #120





Group: Members
Posts: 120
Joined: 14-September 03
From: Poland
Member No.: 8837



Thanx wisodev for non-cygwin version! And thank you Synthetic Soul for a cygwin one wink.gif
Go to the top of the page
+Quote Post
jcoalson
post Sep 19 2006, 19:00
Post #121


FLAC Developer


Group: Developer
Posts: 1526
Joined: 27-February 02
Member No.: 1408



QUOTE (ckjnigel @ Sep 19 2006, 02:47) *
QUOTE (Mangix @ Sep 19 2006, 03:27) *
I've also heard that FLAC 1.1.3 will have some of flake's improvements

Are the two developers in contact and working cooperatively rather than competitively?

it's not competitive. it's good to have independent (compliant) implementations. flake code is simpler and encodes faster, but has less features.

the improvement is in how the signal is windowed before lpc analysis. we were both working on this at the same time but flake has a shorter release cycle. the method in the upcoming version of FLAC is slower but gives slightly more compression.

QUOTE (lexor @ Sep 19 2006, 10:18) *
Hey Justin, I was just looking over the code for Levinson-Durbin recursion, and noticed something odd. In it's very signature you have lpc[][], which is declared in lpc_calc_coefs as lpc[32][32] (I put numbers instead of constant name for readability here), but the algorithm works on the Toeplitz matrix, so storage should be 2N-1. That's a terrible waste of bits, even if it is only a 32x32 array.

that 32x32 array is for the output coefficients for all orders. the max order is 32 so you need 32+31+30+...+1 doubles. there is some waste putting it in a sparse array but not much, and the code is simpler.

QUOTE (lexor @ Sep 19 2006, 10:18) *
what makes even less sense to me is that Levinson algorithm supposed to solve Ax=b for x, given A and b. and that lpc_compute_coefs seems to take 2 vectors and compute the matrix.

it's computing several solutions for several Ax=b, for several x and b, from the same autocorrelation of the original signal. that's the magic. see also http://en.wikipedia.org/wiki/Linear_prediction
Go to the top of the page
+Quote Post
Synthetic Soul
post Sep 19 2006, 19:31
Post #122





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



QUOTE (wisodev @ Sep 19 2006, 17:23) *
- Please try this flake-svn-2006-09-19-win32-bin.zip binary because it is causing flake to crush with 37.wav file and setting -0.
I am now at home, on Win 2K AMD XP 2400+. I have just tried both your compile and the cygwin compile with the full 37.wav and 37_0-10_12.wav. The cygwin compile is fine, but your compile crashes.

I'm getting really confused now! blink.gif


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
bukem
post Sep 19 2006, 19:38
Post #123





Group: Members
Posts: 120
Joined: 14-September 03
From: Poland
Member No.: 8837



@Synthetic Soul:
if I'm not wrong wisodev has compiled two versions of flake:

1. patched (with no error) -> flake-svn-2006-09-19-patched-win32-bin.zip
2. and not patched (for testing purpose?) -> flake-svn-2006-09-19-win32-bin.zip

This post has been edited by bukem: Sep 19 2006, 19:41
Go to the top of the page
+Quote Post
Synthetic Soul
post Sep 19 2006, 20:03
Post #124





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



Yes. The patched version does work fine here.

However, what is still slightly confusing is that my cygwin compile from the SVN works fine, but wisodev's non-patched compile from the SVN does not.

NB: When I posted above I was confused about wisodev's two compiles, but I realised after posting what he was asking. However, as you can see, I am still confused. That said, if wisodev's patch means that all new compiles would work then I suppose that should be an end to the confusion... I don't need to worry why my compile works... I hope. wink.gif


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
bukem
post Sep 19 2006, 20:52
Post #125





Group: Members
Posts: 120
Joined: 14-September 03
From: Poland
Member No.: 8837



@wisodev:
another problem found -> "p" switch for padding isn't working at all; it seems that is treated as "s" switch for stereo decorrelation crying.gif

CODE
D:\documents\music\.work>flake -p 256 -12 37_0-10_12.wav test.flac

Flake: FLAC audio encoder
(c) 2006  Justin Ruggles

invalid stereo decorrelation method: 2. must be 0 or 1.
usage: flake [options] <input.wav> <output.flac>
type 'flake -h' for more details.
Go to the top of the page
+Quote Post

15 Pages V  « < 3 4 5 6 7 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th September 2014 - 23:22