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
jcoalson
post May 26 2006, 21:57
Post #2


FLAC Developer


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



it seems like a nice clean interface. some notes:

1. at the higher compression settings it is using large block sizes (16k for 44.1kHz) and high lpc order (32) which increase the decoding burden with little improvement (at least in my tests). (e.g. I'm not sure the squeezebox supports 16k blocks due to buffer requirements.) also, performance with larger blocksizes in more dependent on the audio characteristics so his results might be biased by his sample.

2. it has an interesting way of selecting the stereo decorrelation method which is faster than the reference encoder; whether it's better on not needs some testing. same for fixed/lpc subframe selection.

3. it's guessing at the max frame size without supporting verbatim encoding, which might explain it crashing

4. the lpc analysis stage looks just like the reference encoder.

so I think any compression gain is just due to the larger blocksize and high lpc order, which you can do with the reference encoder (though I wouldn't encourage that for general use).

Josh
Go to the top of the page
+Quote Post
Justin Ruggles
post Jun 3 2006, 06:14
Post #3





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



Hi,
I am the person writing the encoder mentioned above. It is in an extremely experimental phase at the moment. I am fairly new to audio encoding, so most of what I am doing is just learning by trying things out and reading as much as I can. I do enjoy it though. I want to say that I greatly admire what Josh has done with the flac format and reference software. Its openness and good documentation are a rarity and a pleasure. I am writing an encoder for FFmpeg because one of the goals of that project is to write its own decoders and encoders so as not to rely on too many external libraries, and because of licensing (which I don't think is really much of an issue in the case of FLAC). Also, I am doing it for the shear pleasure of learning something new. My claims of better encoding are more due to excitement at the results than anything else. Beating the reference encoder is not my goal. It's just a good motivator, both for the excitement when I succeed and for the challenge when I can't seem to get anywhere close. smile.gif

QUOTE (jcoalson @ May 26 2006, 14:57) *
it seems like a nice clean interface. some notes:

1. at the higher compression settings it is using large block sizes (16k for 44.1kHz) and high lpc order (32) which increase the decoding burden with little improvement (at least in my tests). (e.g. I'm not sure the squeezebox supports 16k blocks due to buffer requirements.) also, performance with larger blocksizes in more dependent on the audio characteristics so his results might be biased by his sample.

That is true. I have found some odd results in my tests though. Many times I have seen my encoder do much better on a particular clip with, say, max lpc order of 32, but do not see the same benefit on the same clip with the reference encoder. I couldn't say why or how though. I am mostly just trying to test anything I can and observing what settings work best in which situations. You do have a point about buffer requirements. I had to increase the SDL audio buffer size in ffplay to get the high blocksize clips to play without skipping.

The issue with block sizes and different audio characteristics is one I am still struggling with. It seems to be one of the biggest drawbacks to really good compression quality. Variable blocksize would be ideal, but I know the compatiblity issues. Given the limitations, one of my objectives is to have good compatible modes, but also to provide more options for better compression. The reference encoder seems to go for the middle ground in many cases. This has its benefits, but personally, I like more options.

QUOTE
2. it has an interesting way of selecting the stereo decorrelation method which is faster than the reference encoder; whether it's better on not needs some testing. same for fixed/lpc subframe selection.

Yeah, the stereo decorrelation selection was just a guess that turned out to work okay. I haven't looked closely enough to see how the reference encoder does it. As for fixed/lpc subframe selection...I can't really remember how I was doing that on May 26 smile.gif . I have had too many abandoned approaches to keep up... Right now I am using fixed mode (and mostly just order 2) only in the fastest encoding setting and for small frames (usually just the last frame).

QUOTE
3. it's guessing at the max frame size without supporting verbatim encoding, which might explain it crashing

I have no idea about the crashing on windows, as I use Linux. As for verbatim encoding, I actually started the program as verbatim only just to get the bitstream right. I later removed it. I probably should add it back in as a backup mechanism for audio that really just won't compress...a rarity, but it would save the guessing you mentioned. For now, I have at least added a warning & skip frames that are too big. It's not ideal, nor lossless, but at least it gives a warning...

QUOTE
4. the lpc analysis stage looks just like the reference encoder.

Yeah, it pretty much is. I have modified the autocorrelation slightly and implemented my own quantizer. The levinson-durbin function is the same. I experimented some with other ways of estimating the best predictor order, but it was not as good as the reference encoder. When I coupled the 2 together and selected the best by counting the bits I got slightly better encoding...that might have just been chance though smile.gif I could have probably selected an order at random and done the same thing. I guess I'll have to keep researching. It's not that I think the reference encoder has a bad solution...I just like a challenge. I recently added, and am currently experimenting with, window functions before autocorrelation. Yesterday I was pointed to a Hydrogenaudio thread on how this is being added to the reference encoder as well. Very exciting stuff!

QUOTE
so I think any compression gain is just due to the larger blocksize and high lpc order, which you can do with the reference encoder (though I wouldn't encourage that for general use).

Blocksize I understand, but what's wrong with a higher LPC order? True, it isn't ideal for every situation, but it does help in many cases. I haven't noticed much of an impact on decoding, and I have a quite slow computer.

Anyway, I just thought I would respond. I am new to Hydrogenaudio, but since I seem to have thrown myself into the fray I might as well join in on the discussion. smile.gif

-Justin
Go to the top of the page
+Quote Post
jcoalson
post Jun 14 2006, 19:46
Post #4


FLAC Developer


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



QUOTE (Justin Ruggles @ Jun 3 2006, 00:14) *
Yesterday I was pointed to a Hydrogenaudio thread on how this is being added to the reference encoder as well. Very exciting stuff!

btw in the FLAC code in CVS there is a src/libFLAC/window.c that may save you some time.

QUOTE (Justin Ruggles @ Jun 3 2006, 00:14) *
Blocksize I understand, but what's wrong with a higher LPC order? True, it isn't ideal for every situation, but it does help in many cases. I haven't noticed much of an impact on decoding, and I have a quite slow computer.

the number of multiply-adds in the FIR filter equals the order. flac -8 uses max 12, so order 32 requires 20 more multiplies+adds per sample than what is widely used.

Josh
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: 17th April 2014 - 23:21