IPB

Welcome Guest ( Log In | Register )

New FLAC encoder
Nayru
post May 26 2006, 13:29
Post #1





Group: Members
Posts: 17
Joined: 6-November 05
Member No.: 25599



A new FLAC encoder has been developed, which is proposed for inclusion in ffmpeg. The author claims that in high-compression mode, it can compress certain files better than libFLAC.

http://mplayerhq.hu/pipermail/ffmpeg-devel...May/011385.html
Go to the top of the page
+Quote Post
 
Start new topic
Replies
kurtnoise
post Jun 3 2006, 16:49
Post #2





Group: Members
Posts: 326
Joined: 26-June 02
From: Aix-en-Provence
Member No.: 2400



Hi Justin,

Thank you very much for this work (fork ?)...wink.gif

I've made a benchmarck on my AMD64 3200+. I've tested the last flake 0.2 and flac from the last cvs entry with a wav sample of 1h11m55s (mostly electro and pop rock).

Here are my results:

1) Flake 0.2 compiled with gcc 4.1.0 & CFLAGS = -g -O3 -Wall -pedantic -std=c99 -march=k8
CODE
|  level  |   Real Time   |       Bytes        |  Ratio   |  kbps |
|    0     |  2m11.511s  |  530 951 235  |  0,697  | 984   |
|    1     |  2m34.031s  |  513 566 686  |  0.675  | 952   |
|    2     |  2m34.206s  |  499 679 481  |  0,656  | 926   |
|    3     |  2m36.720s  |  491 472 721  |  0,645  | 911   |
|    4     |  2m35.962s  |  488 370 918  |  0,641  | 905   |
|    5     |  2m50.350s  |  487 493 404  |  0,640  | 904   |
|    6     |  2m51.587s  |  487 565 406  |  0,640  | 904   |
|    7     |  2m50.688s  |  490 601 577  |  0,644  | 910   |
|    8     |  4m13.558s  |  490 820 897  |  0,644  | 910   |



2) FLAC CVS 20060603 compiled with gcc 4.1.0
CODE
|  level  |   Real Time   |       Bytes        |  Ratio   |  kbps |
|    0     |  1m16.089s  |  531 245 719  |  0,698  | 984   |
|    1     |  1m20.170s  |  510 802 749  |  0.671  | 947   |
|    2     |  1m25.361s  |  505 186 083  |  0,663  | 940   |
|    3     |  1m32.409s  |  501 361 052  |  0,652  | 933   |
|    4     |  1m35.588s  |  489 589 293  |  0,643  | 908   |
|    5     |  1m50.881s  |  488 073 198  |  0,641  | 905   |
|    6     |  2m04.660s  |  487 691 205  |  0,641  | 904   |
|    7     |  6m59.237s  |  486 851 452  |  0,640  | 903   |
|    8     |  9m00.266s  |  485 704 730  |  0,638  | 901   |



Now, I've a question : why flake crashes during encoding on win32 plateform ? In fact, compilation is fine but running fails. Any idea ?

This post has been edited by kurtnoise: Jun 3 2006, 16:53
Go to the top of the page
+Quote Post
Justin Ruggles
post Jun 4 2006, 04:00
Post #3





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



QUOTE (kurtnoise @ Jun 3 2006, 09:49) *
Thank you very much for this work (fork ?)...wink.gif

You're welcome. Fork? Well, I suppose that if I get the LPC order selection code replaced with my own then I can claim it to be nearly non-derived smile.gif. The Levinson-Durbin LPC generation code is nearly identical to that in several other programs I've seen. I copied the UTF-8 code basically because I'm not 100% clear on how that encoding works. I suppose I should separate these 3 or 4 functions into a single file with proper copyright notice and attribution...or at least put a small notice above each and include both a COPYING.libFLAC file and COPYING.lgpl file. It wasn't really a fork though. I basically started from scratch using the specs and some reused FFmpeg code. I even tried my own UTF-8 function working backwards from the decoding in FFmpeg...I could never get it to work though, so I copied in that function. When adding non-fixed LPC I tried my hand at that as well, but fell short. So it's more of an independent implementation with crutches. wink.gif The structure is my own, but the puzzle had to be filled-in in a few places.

QUOTE
I've made a benchmarck on my AMD64 3200+. I've tested the last flake 0.2 and flac from the last cvs entry with a wav sample of 1h11m55s (mostly electro and pop rock).

Here are my results:

1) Flake 0.2 compiled with gcc 4.1.0 & CFLAGS = -g -O3 -Wall -pedantic -std=c99 -march=k8

| level | Real Time | Bytes | Ratio | kbps |
[...]
| 5 | 2m50.350s | 487 493 404 | 0,640 | 904 |

2) FLAC CVS 20060603 compiled with gcc 4.1.0

| level | Real Time | Bytes | Ratio | kbps |
[...]
| 8 | 9m00.266s | 485 704 730 | 0,638 | 901 |

I also noticed similar results (not quite as good as libFLAC) on samples where flake did the best with smaller block sizes (i.e. level 5, which is blocksize 2048), but that the reference encoder did best at level 8 (blocksize 4608). I am still trying to wrap my head around this issue. It is possibly due to whatever libFLAC does in "exhaustive" mode? Or maybe my version of stereo decorrelation works well only on audio with certain characteristics? Testing, testing, and more testing. I'm working on my own horribly slow "brute-force" mode to help me out in my tests.

QUOTE
Now, I've a question : why flake crashes during encoding on win32 plateform ? In fact, compilation is fine but running fails. Any idea ?

I really have no clue here. What does the crash look like? Is it a segfault? Any gdb info? If I had Windows I would test it myself. If MinGW is being used, maybe it needs "--enable-memalign-hack"...? It has been several..5..6.. years since I have done any gcc compilation in Windows.

-Justin
Go to the top of the page
+Quote Post
kurtnoise
post Jun 4 2006, 07:55
Post #4





Group: Members
Posts: 326
Joined: 26-June 02
From: Aix-en-Provence
Member No.: 2400



QUOTE (Justin Ruggles @ Jun 4 2006, 05:00) *
I really have no clue here. What does the crash look like? Is it a segfault? Any gdb info? If I had Windows I would test it myself. If MinGW is being used, maybe it needs "--enable-memalign-hack"...? It has been several..5..6.. years since I have done any gcc compilation in Windows.

Through wine, here is the debug :

QUOTE
lionel@kubuntu:~/flake$ wine ./flake.exe -2 /home/lionel/wav/input.wav /home/lionel/wav/output.flac
Flake: FLAC audio encoder
Signed 16-bit 44100 Hz stereo
samples: 190288560
wine: Unhandled page fault on write access to 0x7f9a0dd4 at address 0x405703 (thread 0009), starting debugger...
WineDbg starting on pid 0x8
Unhandled exception: page fault on write access to 0x7f9a0dd4 in 32-bit code (0x00405703).
Register dump:
CS:0073 SS:007b DS:007b ES:007b FS:1007 GS:0033
EIP:00405703 ESP:7fbafdcc EBP:7fbafdd8 EFLAGS:00210206( - 00 - RIP1)
EAX:001f4514 EBX:ffffffff ECX:7f9a0dd4 EDX:7fd085e0
ESI:00401210 EDI:7ffdf760
Stack dump:
0x7fbafdcc: 7fcf0020 004018f6 ffffffff 7fbafeb8
0x7fbafddc: 00403306 7fd085e0 7fbafe60 0b5792b0
0x7fbafdec: 00402fd4 7fcf0020 00000000 7fcf0020
0x7fbafdfc: 00402fcf 7fd08c38 7fd0945c 7fbafe28
0x7fbafe0c: 00000010 7fcf0000 00000000 7fd084b0
0x7fbafe1c: 00000000 7fcf0000 7fc946dc 7fbafe48
0200: sel=1007 base=7fe6c000 limit=00001fff 32-bit rw-
Backtrace:
=>1 0x00405703 in flake (+0x5703) (0x00405703)
2 0x00403306 in flake (+0x3306) (0x00403306)
3 0x004011d9 __mingw_CRTStartup+0xc9 [/build/buildd/mingw32-runtime-3.8/build_dir/src/mingw-runtime-3.8/crt1.c:226] in flake (0x004011d9)
4 0x00401223 in flake (+0x1223) (0x00401223)
5 0x7fc5b311 in kernel32 (+0x4b311) (0x7fc5b311)
6 0xb7ed8ddb wine_switch_to_stack+0x17 in libwine.so.1 (0xb7ed8ddb)
0x00405703: orl $0,0x0(%ecx)
Modules:
Module Address Debug info Name (19 modules)
PE 0x00400000-00438000 DIA flake
ELF 0x7bf00000-7bf03000 Deferred <wine-loader>
ELF 0x7f93f000-7f9a0000 Deferred msvcrt<elf>
\-PE 0x7f950000-7f9a0000 \ msvcrt
ELF 0x7fbee000-7fcf0000 Export kernel32<elf>
\-PE 0x7fc10000-7fcf0000 \ kernel32
ELF 0x7fe07000-7fe11000 Deferred libnss_files.so.2
ELF 0x7fe11000-7fe26000 Deferred libnsl.so.1
ELF 0x7fe3a000-7fe5c000 Deferred libm.so.6
ELF 0x7fe63000-7fe6c000 Deferred libnss_nis.so.2
ELF 0x7fe70000-7ff66000 Deferred libwine_unicode.so.1
ELF 0x7ff66000-7ffe0000 Deferred ntdll<elf>
\-PE 0x7ff80000-7ffe0000 \ ntdll
ELF 0xb7d71000-b7d7a000 Deferred libnss_compat.so.2
ELF 0xb7d7b000-b7d7e000 Deferred libdl.so.2
ELF 0xb7d7e000-b7ead000 Deferred libc.so.6
ELF 0xb7ead000-b7ebf000 Deferred libpthread.so.0
ELF 0xb7ed4000-b7eee000 Export libwine.so.1
ELF 0xb7ef1000-b7f07000 Deferred ld-linux.so.2
Threads:
process tid prio (all id:s are in hex)
00000008 (D) Z:\home\lionel\flake\flake.exe
00000009 0 <==

Hope this helps....


About fork. It was just a joking. wink.gif Keep up the good work.
Go to the top of the page
+Quote Post

Posts in this topic
- Nayru   New FLAC encoder   May 26 2006, 13:29
- - kurtnoise   For those who want to test it, I've made a com...   May 26 2006, 14:40
- - jcoalson   it seems like a nice clean interface. some notes:...   May 26 2006, 21:57
|- - Justin Ruggles   Hi, I am the person writing the encoder mentioned ...   Jun 3 2006, 06:14
|- - jcoalson   QUOTE (Justin Ruggles @ Jun 3 2006, 00:14...   Jun 14 2006, 19:46
|- - Justin Ruggles   QUOTE (jcoalson @ Jun 14 2006, 12:46) QUO...   Jun 14 2006, 20:33
- - kurtnoise   Hi Justin, Thank you very much for this work (for...   Jun 3 2006, 16:49
|- - Justin Ruggles   QUOTE (kurtnoise @ Jun 3 2006, 09:49) Tha...   Jun 4 2006, 04:00
|- - kurtnoise   QUOTE (Justin Ruggles @ Jun 4 2006, 05:00...   Jun 4 2006, 07:55
|- - Justin Ruggles   QUOTE (kurtnoise @ Jun 4 2006, 00:55) Thr...   Jun 4 2006, 08:27
- - Justin Ruggles   Hi, I have made a small webpage to post updated ve...   Jun 14 2006, 08:56
- - kurtnoise   Hi Justin, Great stuff...Now, flake 0.4 works fin...   Jun 14 2006, 09:39
- - krmathis   flake dont seem to work correctly on Mac OS X (Pow...   Jun 14 2006, 18:42
|- - Justin Ruggles   QUOTE (krmathis @ Jun 14 2006, 11:42) fla...   Jun 14 2006, 18:49
- - krmathis   Hope you nail this, cause this looks like an inter...   Jun 14 2006, 19:34
- - ggf31416   40.964.828 bytes 16-bit Stereo 44100Hz WAV 3:52 ...   Jun 15 2006, 04:06
|- - Justin Ruggles   QUOTE (ggf31416 @ Jun 14 2006, 21:06) I s...   Jun 15 2006, 07:43
- - Justin Ruggles   Hi, Pre-release 5 is now out. * I hope the PPC en...   Jun 15 2006, 09:47
|- - krmathis   QUOTE (Justin Ruggles @ Jun 15 2006, 10:4...   Jun 15 2006, 17:00
- - Justin Ruggles   Hi all, Sorry to keep posting updates so often. ...   Jun 17 2006, 03:31
- - krmathis   Album: Toto - Legend (in a single file) Playing ti...   Jun 17 2006, 08:45
|- - Justin Ruggles   QUOTE (krmathis @ Jun 17 2006, 01:45) Alb...   Jun 18 2006, 04:20
|- - krmathis   QUOTE (Justin Ruggles @ Jun 18 2006, 05:2...   Jun 18 2006, 07:39
|- - miros   Here are my results for four albums lying around. ...   Jun 18 2006, 08:13
|- - Justin Ruggles   QUOTE (miros @ Jun 18 2006, 01:13) Justin...   Jun 25 2006, 02:14
- - HbG   CODEPearl Jam - Ten (new european version...   Jun 28 2006, 00:58
|- - Justin Ruggles   QUOTE (HbG @ Jun 27 2006, 17:58) CODEPear...   Jun 28 2006, 04:26
- - surf   hello. does this new encoder supports unicode? i c...   Jun 28 2006, 07:56
- - sundance   Justin, I'd also like to join in saying ...   Jun 28 2006, 08:47
|- - Justin Ruggles   Hello, QUOTE (sundance @ Jun 28 2006, 01...   Jun 28 2006, 14:38
|- - HbG   QUOTE (Justin Ruggles @ Jun 28 2006, 05:3...   Jun 28 2006, 14:57
|- - sundance   QUOTE (HbG @ Jun 28 2006, 13:57) ...but i...   Jun 28 2006, 15:25
|- - Justin Ruggles   QUOTE (HbG @ Jun 28 2006, 07:57) QUOTE (J...   Jun 29 2006, 03:06
- - wisodev   Well I am propobly too late but I have builded som...   Jul 4 2006, 19:19
|- - Justin Ruggles   QUOTE (wisodev @ Jul 4 2006, 12:19) Well ...   Jul 4 2006, 23:12
||- - wisodev   QUOTE Thank you! Especially for the win32 bui...   Jul 5 2006, 06:59
|- - HbG   QUOTE (wisodev @ Jul 4 2006, 10:19) Well ...   Jul 7 2006, 21:36
|- - Justin Ruggles   QUOTE (HbG @ Jul 7 2006, 14:36) Oh, one m...   Jul 8 2006, 00:29
- - jcoalson   another thing I would suggest is a big fat warning...   Jul 8 2006, 00:51
|- - Justin Ruggles   QUOTE (jcoalson @ Jul 7 2006, 17:51) anot...   Jul 8 2006, 21:44
- - Justin Ruggles   Hello, I'm posting again here because the FFm...   Jul 17 2006, 02:36
|- - Garf   QUOTE (Justin Ruggles @ Jul 17 2006, 03:3...   Jul 17 2006, 09:43
||- - Justin Ruggles   QUOTE (Garf @ Jul 17 2006, 02:43) QUOTE (...   Jul 17 2006, 10:36
|- - SebastianG   QUOTE (Justin Ruggles @ Jul 17 2006, 03:3...   Jul 18 2006, 09:14
- - krmathis   Great work! Hope you plan to "back-port...   Jul 17 2006, 08:02
- - Garf   Okay, I understand the what and why What's t...   Jul 17 2006, 10:51
|- - Justin Ruggles   QUOTE (Garf @ Jul 17 2006, 03:51) Okay, I...   Jul 17 2006, 21:45
- - jcoalson   I have actually been doing experiments solving the...   Jul 24 2006, 07:04
|- - SebastianG   QUOTE (jcoalson @ Jul 24 2006, 08:04) I h...   Jul 24 2006, 08:27
||- - jcoalson   QUOTE (SebastianG @ Jul 24 2006, 02:27) Q...   Jul 25 2006, 04:49
|- - TBeck   QUOTE (jcoalson @ Jul 24 2006, 08:04) I h...   Jul 24 2006, 16:25
- - HbG   Only noticed this now, it's leaking memory lik...   Sep 9 2006, 21:08
|- - Justin Ruggles   QUOTE (HbG @ Sep 9 2006, 14:08) Only noti...   Sep 9 2006, 23:21
|- - Justin Ruggles   QUOTE (Justin Ruggles @ Sep 9 2006, 16:21...   Sep 10 2006, 00:29
- - HbG   Thanks in advance!   Sep 9 2006, 23:34
- - HbG   That fixed it, thanks. But the speed's now dr...   Sep 10 2006, 12:02
|- - Justin Ruggles   QUOTE (HbG @ Sep 10 2006, 05:02) That fix...   Sep 10 2006, 19:31
- - wisodev   I have build the binary for Win32 (version 07 of f...   Sep 10 2006, 18:35
- - wisodev   QUOTE (Justin Ruggles @ Sep 10 2006, 20:3...   Sep 10 2006, 19:46
- - HbG   Oh yeah, wisodev's .07 build clocks in at abou...   Sep 11 2006, 01:35
|- - Justin Ruggles   QUOTE (HbG @ Sep 10 2006, 18:35) Oh yeah,...   Sep 11 2006, 03:28
|- - wisodev   He, I have found too that 0.08 windows binarys are...   Sep 11 2006, 07:38
- - sundance   Justin, would you consider adding wisodev's ...   Sep 11 2006, 21:55
|- - Justin Ruggles   QUOTE (sundance @ Sep 11 2006, 14:55) wou...   Sep 11 2006, 22:03
- - sundance   Justin, that's really good news. Too bad that...   Sep 11 2006, 22:08
|- - Justin Ruggles   QUOTE (sundance @ Sep 11 2006, 15:08) Jus...   Sep 11 2006, 22:21
|- - Justin Ruggles   Whew...it was accepted. http://sourceforge.net/pro...   Sep 11 2006, 22:49
|- - Justin Ruggles   QUOTE (Justin Ruggles @ Sep 11 2006, 15:4...   Sep 12 2006, 03:27
|- - wisodev   QUOTE For now I have built binaries for Linux, opt...   Sep 12 2006, 07:19
- - jcoalson   "flache" (High-Efficiency? painful?) is ...   Sep 11 2006, 23:25
- - sundance   What do you think about adding some version inform...   Sep 12 2006, 14:03
- - krmathis   Justin. I pulled revision 2 from SVN, and tried to...   Sep 12 2006, 16:14
- - wisodev   FLAKE 0.10 Win32 Build and Sources Download binar...   Sep 12 2006, 17:28
- - lexor   CODE FILE SIZE t_FLAC.flac 321 356 528 t_i686...   Sep 12 2006, 20:19
|- - wisodev   QUOTE CODE FILE SIZE t_FLAC.flac 321 356 528 ...   Sep 13 2006, 06:48
|- - lexor   QUOTE (wisodev @ Sep 13 2006, 01:48) This...   Sep 13 2006, 14:43
|- - wisodev   QUOTE (lexor @ Sep 13 2006, 15:43) QUOTE ...   Sep 13 2006, 19:07
|- - Egor   QUOTE (wisodev @ Sep 14 2006, 01:07) Oh t...   Sep 14 2006, 08:46
|- - wisodev   QUOTE Digit grouping symbol depends on your locale...   Sep 14 2006, 09:18
- - HbG   My run went at 37.00x That's more than three t...   Sep 13 2006, 01:20
- - sundance   wisodev, still one mystery remains: CODEDECODE...   Sep 13 2006, 08:29
|- - wisodev   QUOTE wisodev, still one mystery remains: CODEDEC...   Sep 13 2006, 08:52
- - iGold   I want to write my notes on lack of some features ...   Sep 14 2006, 08:18
- - lexor   hi, I have a somewhat strange request a few pages...   Sep 14 2006, 19:27
- - Madman2003   Is this encoder (flake 0.10) trustworthy for ...   Sep 14 2006, 19:32
- - bukem   FYI: I have just encoded my favorite album of Mar...   Sep 14 2006, 23:17
|- - guruboolez   QUOTE (bukem @ Sep 15 2006, 00:17) I have...   Sep 15 2006, 00:10
|- - bukem   QUOTE (guruboolez @ Sep 14 2006, 15:10) Q...   Sep 15 2006, 12:20
- - Justin Ruggles   QUOTE (Madman2003 @ Sep 14 2006, 12:32) I...   Sep 15 2006, 00:07
- - jcoalson   yes, that level 0-2 limitation was from the early ...   Sep 15 2006, 16:32
- - HbG   I've encoded over a dozen cd's with flake ...   Sep 16 2006, 00:53
- - Synthetic Soul   I have tried running my scripts with wisodev's...   Sep 18 2006, 11:31
|- - wisodev   @Synthetic Soul Can you try running this scripts ...   Sep 18 2006, 13:00
- - sundance   I've been using wiso's flake 0.10 several ...   Sep 18 2006, 12:01
- - Synthetic Soul   I have run my scripts here at work using the i586,...   Sep 18 2006, 13:39
- - Synthetic Soul   OK, I have tested 37.wav with the i586, i686 and w...   Sep 18 2006, 13:53
- - Will Fisher   Hey, I work for Winamp, and I'm very impresse...   Sep 18 2006, 16:15
- - Synthetic Soul   It seems the problem is still evident even in the ...   Sep 18 2006, 16:58
- - HbG   I can encode that sample at -0 just fine, using wi...   Sep 18 2006, 22:59
- - bukem   @Synthetic Soul: Flake 0.10 has failed to compres...   Sep 18 2006, 23:45
4 Pages V   1 2 3 > » 


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: 24th November 2014 - 16:29