IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
24bit PCM compress
yg2003618
post Nov 25 2010, 10:22
Post #1





Group: Members
Posts: 5
Joined: 25-November 10
Member No.: 86009



anyone knows about how to compress 24bit PCM 48Khz audio, I know that most codecs process 16bit pcm. i want compress 24bit PCM at real time, 3:1 or 4:1 compress rate. who can help me? i know that subband adpcm maybe a choice. anyone knows more about that?

thanks alot.
Go to the top of the page
+Quote Post
Engelsstaub
post Nov 25 2010, 10:37
Post #2





Group: Members
Posts: 564
Joined: 16-February 10
Member No.: 78200



You can use dBpoweramp or Foobar 2000. I'm certain there are other programs you can try as well.

There's already some discussion of this on HA. Just type in 24 to 16 into the search engine. Sorry I can't be a bit more helpful...I don't find myself converting 24-bit to 16 too often. I did do this with the Nine Inch Nails "The Slip" release for use on my iPod. Seems to work just fine in 16 bit ALAC. I retained the original for archival purposes.

I'm not at all certain how you plan to compress any more than 2:1 to 3:1 without using a lossy codec.


--------------------
The Loudness War is over. Now it's a hopeless occupation.
Go to the top of the page
+Quote Post
googlebot
post Nov 25 2010, 11:12
Post #3





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



QUOTE (Engelsstaub @ Nov 25 2010, 10:37) *
You can use dBpoweramp or Foobar 2000. I'm certain there are other programs you can try as well.

There's already some discussion of this on HA. Just type in 24 to 16 into the search engine. Sorry I can't be a bit more helpful...I don't find myself converting 24-bit to 16 too often. I did do this with the Nine Inch Nails "The Slip" release for use on my iPod. Seems to work just fine in 16 bit ALAC. I retained the original for archival purposes.

I'm not at all certain how you plan to compress any more than 2:1 to 3:1 without using a lossy codec.


  1. It has been asked for codecs, not applications. Why do you recommend Foobar and dBpoweramp?
  2. It has not been asked for a conversion to 16 bit. Why do you apologize for not having any experience with that?
  3. How is your interest in Nine Inch Nails in any way related here?
  4. What has the OP's question got to do with your iPod?
  5. How is the question related to ALAC?
  6. Why should anyone care that you retained the original?
  7. Why are you "not at all certain" that the OP's goal is not achievable without lossy codecs? Hint: He posted in the "other lossy codecs" forum.

There is not one partial sentence with at least some sense to it.

Pepper that with your sig:

QUOTE
I care immensely about you & everything you stand for.


Epic post! smile.gif

One of my favorites this year.

emot-toot.gif


To the OP:

It would help if you could provide more details about your realtime requirements, especially maximum latency and available processing power.

This post has been edited by googlebot: Nov 25 2010, 11:33
Go to the top of the page
+Quote Post
soiaf
post Nov 25 2010, 22:27
Post #4





Group: Members (Donating)
Posts: 74
Joined: 13-May 05
From: Dublin, Ireland
Member No.: 22024



WavPack (lossy/hybrid mode) will certainly handle 24 bit files and will give you the compression ratios you're looking for. It also has source code available for a 'tiny encoder' which is a more hardware friendly (should you have processing limitations etc.).
Go to the top of the page
+Quote Post
Engelsstaub
post Nov 25 2010, 23:15
Post #5





Group: Members
Posts: 564
Joined: 16-February 10
Member No.: 78200



QUOTE (googlebot @ Nov 25 2010, 04:12) *
QUOTE (Engelsstaub @ Nov 25 2010, 10:37) *
You can use dBpoweramp or Foobar 2000. I'm certain there are other programs you can try as well.

There's already some discussion of this on HA. Just type in 24 to 16 into the search engine. Sorry I can't be a bit more helpful...I don't find myself converting 24-bit to 16 too often. I did do this with the Nine Inch Nails "The Slip" release for use on my iPod. Seems to work just fine in 16 bit ALAC. I retained the original for archival purposes.

I'm not at all certain how you plan to compress any more than 2:1 to 3:1 without using a lossy codec.


  1. It has been asked for codecs, not applications. Why do you recommend Foobar and dBpoweramp?
  2. It has not been asked for a conversion to 16 bit. Why do you apologize for not having any experience with that?
  3. How is your interest in Nine Inch Nails in any way related here?
  4. What has the OP's question got to do with your iPod?
  5. How is the question related to ALAC?
  6. Why should anyone care that you retained the original?
  7. Why are you "not at all certain" that the OP's goal is not achievable without lossy codecs? Hint: He posted in the "other lossy codecs" forum.

There is not one partial sentence with at least some sense to it.

Pepper that with your sig:

QUOTE
I care immensely about you & everything you stand for.


Epic post! smile.gif

One of my favorites this year.

emot-toot.gif


To the OP:

It would help if you could provide more details about your realtime requirements, especially maximum latency and available processing power.



Oh, I'm sorry Googlebot! Have I offended you? I misunderstood the post in that I didn't realize the OP wanted to retain the files as 24-bit. So...

1. The apps handle conversion to various codecs.
2. See above.
3. My interest in NIN was relative to 24-bit conversion.
4. Number 3.
5. Number 2 and 3. Being conversational in explaining my need to convert such files.
6. Why are you being an asshole?
7 I don't know. Help him out with that then.

Are we trolling today? Danke, Arschloch.

Edit: It would have sufficed to simply call me an idiot and/or that I misunderstood the OP. The extent that you went to to criticize my entire post is unprecedented. I've not even seen something that "thorough" from a moderator! I think I know why you're upset and aggressive. It doesn't have anything to do with another post I made recently, does it? If so please comment on that.

This post has been edited by Engelsstaub: Nov 25 2010, 23:34


--------------------
The Loudness War is over. Now it's a hopeless occupation.
Go to the top of the page
+Quote Post
romor
post Nov 25 2010, 23:55
Post #6





Group: Members
Posts: 677
Joined: 16-January 09
Member No.: 65630



^ Can you believe this guy?
Is that old D.R.I. logo as avatar?
The only things I noticed posted by him were numerous repeatings to common HA terms and his Apples of course

Show some horizon man

and don't forget TOS about writing language, we are not making Babylon

This post has been edited by romor: Nov 25 2010, 23:56


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
googlebot
post Nov 26 2010, 01:07
Post #7





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



QUOTE (Engelsstaub @ Nov 25 2010, 23:15) *
It doesn't have anything to do with another post I made recently, does it?


No. I was just amused by the solipsistic appearance. I really thought it was funny! If you try to read it with a perspective other than your own, you might see what I mean. Sorry, if you took it as a joke at your cost.

If the OP answered with some details, we could get back on-topic. I think the solution might be simple: The Nero AAC encoder takes 24 bit samples (if not convert to 32 bit floating point first) and also supports the required sample rate. It's also much faster than real-time on most modern computers. WavPack lossy should also be fine. I think there's also a LAME encoder with support float samples.

This post has been edited by googlebot: Nov 26 2010, 01:11
Go to the top of the page
+Quote Post
yg2003618
post Nov 26 2010, 03:09
Post #8





Group: Members
Posts: 5
Joined: 25-November 10
Member No.: 86009



thanks everyone, my project is using an ARM7 cpu to compress and decompress HiFi audio/music(24bit 48K sample rate that is 24*48=1152Kbps) in real time, and Tx/RX the compressed data using 2.4G wireless, latency equal or less than 3ms, the max wireless speed is about 500Kbps, so we need compress rate 3:1 or 4:1, that is lossy codec. I tried adpcm souce, but the frequency spectrum analysis showing mang high frequency distortion. I want to do this using subband adpcm or other algorithms. are there any open source project concerning about this 24bit compress, or some papers i can reference?
Go to the top of the page
+Quote Post
yg2003618
post Nov 26 2010, 03:20
Post #9





Group: Members
Posts: 5
Joined: 25-November 10
Member No.: 86009



Nero AAC may do 24bit compress, but i need source code, and lame/mp3 dosn't suit for real time. so it's a hard job.....
Go to the top of the page
+Quote Post
Engelsstaub
post Nov 26 2010, 04:14
Post #10





Group: Members
Posts: 564
Joined: 16-February 10
Member No.: 78200



QUOTE (romor @ Nov 25 2010, 16:55) *
^ Can you believe this guy?
Is that old D.R.I. logo as avatar?
The only things I noticed posted by him were numerous repeatings to common HA terms and his Apples of course

Show some horizon man

and don't forget TOS about writing language, we are not making Babylon


What are you on about? Yes, it's the DRI logo. Like it?

I don't currently own an Apple computer. Numerous reference to Apples?

Since everyone here wants to be an asshole when I just made a mistake trying to help someone, your reference to languages means nothing. Everyone knows what "danke" means and "Arschloch" is reiterated from when I asked why he was being an "asshole." My turn: some of the nonsense you two write in English is pretty hard to understand. I wouldn't normally make light of this, but if you want help through personal correspondence let me know. It was two words.

"Can you believe this guy?" Whatever. googlebot can sugar-coat his arrogant and obnoxious post all he wants. It was what it was. Now you're here to add to the bullcrap?

I tried to help. I failed, but at least I tried. Googlebot's "help" was an editorial afterthought to his post ripping mine up. He could have corrected me in two sentences. Now here comes Romor! No help for the OP from you at all. What in the living breathing name of crap does "Show some horizon, man" mean?? I barely understand some people in any language...


--------------------
The Loudness War is over. Now it's a hopeless occupation.
Go to the top of the page
+Quote Post
saratoga
post Nov 26 2010, 05:57
Post #11





Group: Members
Posts: 5002
Joined: 2-September 02
Member No.: 3264



QUOTE (yg2003618 @ Nov 25 2010, 21:09) *
thanks everyone, my project is using an ARM7 cpu to compress and decompress HiFi audio/music(24bit 48K sample rate that is 24*48=1152Kbps) in real time, and Tx/RX the compressed data using 2.4G wireless, latency equal or less than 3ms, the max wireless speed is about 500Kbps, so we need compress rate 3:1 or 4:1, that is lossy codec. I tried adpcm souce, but the frequency spectrum analysis showing mang high frequency distortion. I want to do this using subband adpcm or other algorithms. are there any open source project concerning about this 24bit compress, or some papers i can reference?


3ms latency rules out pretty much any mainstream format (including AAC and MP3). Does it need to be free? Apt-X has a very low latency subband codec, perhaps they'll sell you something if you're on a commercial product. Otherwise some kind of ADPCM or custom subband codec might be your best bet.
Go to the top of the page
+Quote Post
yg2003618
post Nov 26 2010, 07:17
Post #12





Group: Members
Posts: 5
Joined: 25-November 10
Member No.: 86009



QUOTE (saratoga @ Nov 26 2010, 06:57) *
QUOTE (yg2003618 @ Nov 25 2010, 21:09) *
thanks everyone, my project is using an ARM7 cpu to compress and decompress HiFi audio/music(24bit 48K sample rate that is 24*48=1152Kbps) in real time, and Tx/RX the compressed data using 2.4G wireless, latency equal or less than 3ms, the max wireless speed is about 500Kbps, so we need compress rate 3:1 or 4:1, that is lossy codec. I tried adpcm souce, but the frequency spectrum analysis showing mang high frequency distortion. I want to do this using subband adpcm or other algorithms. are there any open source project concerning about this 24bit compress, or some papers i can reference?


3ms latency rules out pretty much any mainstream format (including AAC and MP3). Does it need to be free? Apt-X has a very low latency subband codec, perhaps they'll sell you something if you're on a commercial product. Otherwise some kind of ADPCM or custom subband codec might be your best bet.


Otherwise some kind of ADPCM or custom subband codec might be your best bet. ?

could you please tell more?
Go to the top of the page
+Quote Post
Engelsstaub
post Nov 26 2010, 09:32
Post #13





Group: Members
Posts: 564
Joined: 16-February 10
Member No.: 78200



Doesn't compressing a 24-bit file to a lossy codec (other than a hybrid like WavPack) theoretically defeat the supposed benefits of DVD Audio quality? I'm seriously wondering. I was a bit confused before, of course, but this has me more befuddled. I've never heard of such a want or need and wonder why one would do this.

I guess what I mean is: wouldn't just converting this to a 16-bit lossy file be about the same? AFAIK the lossy codecs will discard most of the stuff that's supposed to be in the 24-bit range. (Sorry if my terminology is imprecise or if my question seems too novice. I come to HA because I'm not that knowledgeable about some of the things most of you are and am trying to learn rather than "teach.")

I've been looking online for a solution to your question but the only thing I can find is Wavpack as soiaf pointed out.

Edited for a grammatical error.

This post has been edited by Engelsstaub: Nov 26 2010, 10:17


--------------------
The Loudness War is over. Now it's a hopeless occupation.
Go to the top of the page
+Quote Post
knutinh
post Nov 26 2010, 11:16
Post #14





Group: Members
Posts: 569
Joined: 1-November 06
Member No.: 37047



QUOTE (Engelsstaub @ Nov 26 2010, 09:32) *
Doesn't compressing a 24-bit file to a lossy codec (other than a hybrid like WavPack) theoretically defeat the supposed benefits of DVD Audio quality? I'm seriously wondering. I was a bit confused before, of course, but this has me more befuddled. I've never heard of such a want or need and wonder why one would do this.

I guess what I mean is: wouldn't just converting this to a 16-bit lossy file be about the same? AFAIK the lossy codecs will discard most of the stuff that's supposed to be in the 24-bit range. (Sorry if my terminology is imprecise or if my question seems too novice. I come to HA because I'm not that knowledgeable about some of the things most of you are and am trying to learn rather than "teach.")

I've been looking online for a solution to your question but the only thing I can find is Wavpack as soiaf pointed out.

Edited for a grammatical error.

If the question is "what is the perceptually best quality that one can get within a 500kbps limitation", 16 bit/44.1kHz flac seems like a sensible choice. If doing lossy encoding at >16bit or >44.1kHz sampling rate, what will the psycho acoustic model be to exploit the extra information? Of course, one could extend/extrapolate knowledge about what is/isnt important inside the audible window, and hope that it somehow makes sense outside.

FLAC may not be within latency, processing requirements though.

Does it have to be robust against transmission errors (I guess yes)? For really, really low total latency, anything fancy is out of the question.

-k

This post has been edited by knutinh: Nov 26 2010, 11:19
Go to the top of the page
+Quote Post
Engelsstaub
post Nov 26 2010, 14:52
Post #15





Group: Members
Posts: 564
Joined: 16-February 10
Member No.: 78200



Thanks for the explanation, knutinh.

I failed to comprehend the original post (as has been made obvious enough by googlebot) and now I'm just trying to figure it out. I'll just excuse myself from this discussion now since I don't know what I'm (or what nearly everyone else is) talking about.



--------------------
The Loudness War is over. Now it's a hopeless occupation.
Go to the top of the page
+Quote Post
saratoga
post Nov 26 2010, 16:59
Post #16





Group: Members
Posts: 5002
Joined: 2-September 02
Member No.: 3264



QUOTE (yg2003618 @ Nov 26 2010, 01:17) *
QUOTE (saratoga @ Nov 26 2010, 06:57) *
QUOTE (yg2003618 @ Nov 25 2010, 21:09) *
thanks everyone, my project is using an ARM7 cpu to compress and decompress HiFi audio/music(24bit 48K sample rate that is 24*48=1152Kbps) in real time, and Tx/RX the compressed data using 2.4G wireless, latency equal or less than 3ms, the max wireless speed is about 500Kbps, so we need compress rate 3:1 or 4:1, that is lossy codec. I tried adpcm souce, but the frequency spectrum analysis showing mang high frequency distortion. I want to do this using subband adpcm or other algorithms. are there any open source project concerning about this 24bit compress, or some papers i can reference?


3ms latency rules out pretty much any mainstream format (including AAC and MP3). Does it need to be free? Apt-X has a very low latency subband codec, perhaps they'll sell you something if you're on a commercial product. Otherwise some kind of ADPCM or custom subband codec might be your best bet.


Otherwise some kind of ADPCM or custom subband codec might be your best bet. ?

could you please tell more?


3 ms is 144 audio samples at 48khz. Even if everything else in your codec took no time at all, the biggest buffer of samples anywhere in the codec would be 144 audio samples, and probably much smaller. Even AAC Low Delay mode uses a 512 point transform, far bigger then you would have access to.

I'm not entirely sure how Apt-X works, but I think the basic idea is to do a very course subband decomposition so that your filters have low resolution but also low delay. Then you compress as in a normal subband codec, except with extremely high bitrates to make up for the fact that your filterbank has very low resolution. Something like that might work well for you since you have high bitrate but low latency tolerance.

Unfortunately, this is a little out of my area, so I'm not 100% what is the best approach.
Go to the top of the page
+Quote Post
[JAZ]
post Nov 26 2010, 19:10
Post #17





Group: Members
Posts: 1783
Joined: 24-June 02
From: Catalunya(Spain)
Member No.: 2383



Mmm... 1152kbps for 24bit 48Khz is a mono signal.

Like other people have said, you seem to aim for something like APT-X or CELT.

This second one may suit you better, but is still in development.
Go to the top of the page
+Quote Post
googlebot
post Nov 26 2010, 19:56
Post #18





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



QUOTE (Engelsstaub @ Nov 26 2010, 09:32) *
Doesn't compressing a 24-bit file to a lossy codec (other than a hybrid like WavPack) theoretically defeat the supposed benefits of DVD Audio quality? I'm seriously wondering


While more than 16 bits doesn't make much sense as a final delivery format, there are applications for higher bit depths. For example, when recording live, 8 bits of additional headroom free from the necessity to continually adjust the input gain to fit into a 16 bit window.



To the OP:

Celt and APT-X are AFAIK the only viable options. Celt is still a moving target, not even the bitstream is stabilized, yet. If you control both receiver and transmitter and don't need to care about compatibility, it could be worth a try. Most of Celt's testing has been done with frame sizes of about 8 ms. Getting it to work around 3ms, at such an early development stage, might lead over stony ground.

Apt-X Live and Apt-X Enhanced are the only viable options, I see at this moment, if this is a commercial project with deadlines not years ahead. Both support < 3ms latencies and 24 bit word lenghts.

This post has been edited by googlebot: Nov 26 2010, 20:53
Go to the top of the page
+Quote Post
knutinh
post Nov 26 2010, 20:56
Post #19





Group: Members
Posts: 569
Joined: 1-November 06
Member No.: 37047



QUOTE (googlebot @ Nov 26 2010, 19:56) *
While more than 16 bits doesn't make much sense as a final delivery format, there are applications for higher bit depths. For example, when recording live, 8 bits of additional headroom free from the necessity to continually adjust the input gain to fit into a 16 bit window.

I guessed that the thread starter was talking about playback, not recording?

Anyways, within a 500kbps "envelope" do you think that it makes sense to encode >16 bit even for studio use? Given that one can do 50% compression +/- using FLAC, and that no significantly more efficient lossless codecs are out there, what would you sacrifice in order to get >16 bits?

-k
Go to the top of the page
+Quote Post
googlebot
post Nov 26 2010, 21:26
Post #20





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



It depends, if high dynamic range is a top priority (at the cost of others), then yes.

And especially regarding ultra low delay codecs: 144 samples per frame is such a tight limit for the set of possible filtering operations, maybe a higher "vertical" input resolution can help the encoder make better choices under these extreme circumstances. But that's only a guess.

This post has been edited by googlebot: Nov 26 2010, 21:28
Go to the top of the page
+Quote Post
saratoga
post Nov 26 2010, 21:42
Post #21





Group: Members
Posts: 5002
Joined: 2-September 02
Member No.: 3264



QUOTE (googlebot @ Nov 26 2010, 15:26) *
It depends, if high dynamic range is a top priority (at the cost of others), then yes.

And especially regarding ultra low delay codecs: 144 samples per frame is such a tight limit for the set of possible filtering operations,


No thats the absolute limit assuming an infinitely fast processor, not the ancient arm7 core the OP is using. Realistically he probably has a fraction of that to work with.

QUOTE (googlebot @ Nov 26 2010, 15:26) *
maybe a higher "vertical" input resolution can help the encoder make better choices under these extreme circumstances. But that's only a guess.


I think thats unlikely. Hes using ARM7, which means 32 bit fixed point inputs to the encoder, no matter what the actual PCM is (since arm7 lacks dsp extensions for things like 16 bit multiplies). In practice, since he is using lossy anyway, the choice the input PCM format is likely to be of no consequence.
Go to the top of the page
+Quote Post
googlebot
post Nov 26 2010, 21:54
Post #22





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



QUOTE (saratoga @ Nov 26 2010, 21:42) *
I think thats unlikely. Hes using ARM7, which means 32 bit fixed point inputs to the encoder, no matter what the actual PCM is (since arm7 lacks dsp extensions for things like 16 bit multiplies).


A 4 bit signal stays a 4 bit signal. A mandatory conversion to 32 bit int doesn't change that, neither for 16 bit or 24 bit. The samples are just padded with zeroes.

QUOTE (saratoga @ Nov 26 2010, 21:42) *
In practice, since he is using lossy anyway, the choice the input PCM format is likely to be of no consequence.


Could you please explain the inference? I don't understand it. Especially how it is supposed to refute to the paragraph you have cited.

This post has been edited by googlebot: Nov 26 2010, 22:22
Go to the top of the page
+Quote Post
saratoga
post Nov 26 2010, 22:39
Post #23





Group: Members
Posts: 5002
Joined: 2-September 02
Member No.: 3264



QUOTE (googlebot @ Nov 26 2010, 15:54) *
Could you please explain the inference? I don't understand it. Especially how it is supposed to refute to the paragraph you have cited.


Thats because its not an inference; I wasn't really trying to refute anything you said, rather I was just diplomatically telling you thats not how it works. In your quote you broke up the paragraph at the wrong point, it should be the first sentence on its own, with the remainder being the second idea.

But anyway, what I was alluding to is that lossy encoders generally don't care about bit depth since they're never going to actually store anything as PCM except in their internal memory while they wait to process it. With that in mind, the only difference between 16 and 24 bit would be how they are actually implemented. Hence the second point, which was that since the processor had no good way to operate on 16 or 24 bit values, it would have to operate on 32 bit ones, and so it would feed all PCM sizes <= 32 bits down the same routines. This might not be the case on a 16 bit DSP though, where you might use separate routines depending on the input data (and hence might also have a reason to treat the calculations differently).
Go to the top of the page
+Quote Post
googlebot
post Nov 26 2010, 23:43
Post #24





Group: Members
Posts: 698
Joined: 6-March 10
Member No.: 78779



I've read it again. Maybe you are right. Even with the very limited filtering options you have with 3ms, the ARM7 might still impose more significant limits.
Go to the top of the page
+Quote Post
yg2003618
post Nov 27 2010, 00:48
Post #25





Group: Members
Posts: 5
Joined: 25-November 10
Member No.: 86009



CELT is the answer! thank you, thank you everyone.
Go to the top of the page
+Quote Post

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: 2nd October 2014 - 04:21