IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Quantization
Max A.K.
post Nov 25 2003, 09:54
Post #1





Group: Members
Posts: 4
Joined: 25-November 03
Member No.: 10032



How to calculate the number of bits required to ensure that the quantization error for the tone is within the minimum masking threshold if i know power of the tone and masking threshold?
Go to the top of the page
+Quote Post
NumLOCK
post Nov 25 2003, 10:18
Post #2


Neutrino G-RSA developer


Group: Developer
Posts: 852
Joined: 8-May 02
From: Geneva
Member No.: 2002



Hi,

Seems simple.

I would use: ceil(log2(tone_power/masking_threshold))


--------------------
Try Leeloo Chat at http://leeloo.webhop.net
Go to the top of the page
+Quote Post
Max A.K.
post Nov 25 2003, 11:12
Post #3





Group: Members
Posts: 4
Joined: 25-November 03
Member No.: 10032



QUOTE (NumLOCK @ Nov 25 2003, 01:18 AM)
Hi,

Seems simple.

I would use: ceil(log2(tone_power/masking_threshold))

masking_threshold should be the minimum masking threshold in that segment?
Go to the top of the page
+Quote Post
NumLOCK
post Nov 25 2003, 11:29
Post #4


Neutrino G-RSA developer


Group: Developer
Posts: 852
Joined: 8-May 02
From: Geneva
Member No.: 2002



QUOTE (Max A.K. @ Nov 25 2003, 11:12 AM)
QUOTE (NumLOCK @ Nov 25 2003, 01:18 AM)
Hi,

Seems simple.

I would use: ceil(log2(tone_power/masking_threshold))

masking_threshold should be the minimum masking threshold in that segment?

Yes. This might depend on the codec, but in general if you don't take the minimum value, the quantization noise might get perceptible.


--------------------
Try Leeloo Chat at http://leeloo.webhop.net
Go to the top of the page
+Quote Post
Max A.K.
post Nov 26 2003, 10:16
Post #5





Group: Members
Posts: 4
Joined: 25-November 03
Member No.: 10032



QUOTE (NumLOCK @ Nov 25 2003, 02:29 AM)
QUOTE (Max A.K. @ Nov 25 2003, 11:12 AM)
QUOTE (NumLOCK @ Nov 25 2003, 01:18 AM)
Hi,

Seems simple.

I would use: ceil(log2(tone_power/masking_threshold))

masking_threshold should be the minimum masking threshold in that segment?

Yes. This might depend on the codec, but in general if you don't take the minimum value, the quantization noise might get perceptible.

Maybe you can give me some references where I can read more about it?
Go to the top of the page
+Quote Post
NumLOCK
post Nov 26 2003, 10:35
Post #6


Neutrino G-RSA developer


Group: Developer
Posts: 852
Joined: 8-May 02
From: Geneva
Member No.: 2002



QUOTE (Max A.K. @ Nov 26 2003, 10:16 AM)
Maybe you can give me some references where I can read more about it?

My apologies, I can't.. because I won't be home until some time wink.gif

Edit: Since your question was pretty essential, you can probably get away with any good book on psychoacoustics (but I don't know which ones by heart).

This post has been edited by NumLOCK: Nov 26 2003, 10:38


--------------------
Try Leeloo Chat at http://leeloo.webhop.net
Go to the top of the page
+Quote Post
Ivan Dimkovic
post Nov 26 2003, 11:59
Post #7


Nero MPEG4 developer


Group: Developer
Posts: 1466
Joined: 22-September 01
Member No.: 8



The measure we are talking about here is called "perceptual entropy", and the basic paper where it was described is:

J. D. Johnston, "Estimation of perceptual entropy using noise-masking criteria," in Proc. ICASSP, 1988, pp. 2524--2527.

Basically, for plurality of frequency lines, amount of the bits required to code the bitstream can't be lower than:

PE = SUM (0<i<-numlines) log2(Energy[i] / MaskThr[i])

(where MaskThr is the masking threshold calculated by the psymodel)

PE is a theoretical minimum - and it can't be achieved in true codec (you need some side bits to represent the coding information, etc...)

So, for a real coding system, bits required to code a plurality of signals is most likely to be around:

BITS = p * PE + q

where p and q are codec dependent parameters.. For example, for MPEG-4 AAC:

BITS = 0.6 * PE + 24 * sqrt (PE)

This is not exact measure, of course - since huffman codebooks are not perfect, and signal statistic might vary from frame to frame, etc..

This post has been edited by Ivan Dimkovic: Nov 26 2003, 12:00
Go to the top of the page
+Quote Post
Max A.K.
post Nov 28 2003, 09:51
Post #8





Group: Members
Posts: 4
Joined: 25-November 03
Member No.: 10032



QUOTE (Ivan Dimkovic @ Nov 26 2003, 02:59 AM)
The measure we are talking about here is called "perceptual entropy",  and the basic paper where it was described is:

J. D. Johnston, "Estimation of perceptual entropy using noise-masking criteria," in Proc. ICASSP, 1988, pp. 2524--2527.

Basically, for plurality of frequency lines, amount of the bits required to code the bitstream can't be lower than:

PE = SUM (0<i<-numlines) log2(Energy[i] / MaskThr[i])

(where MaskThr is the masking threshold calculated by the psymodel)

PE is a theoretical minimum - and it can't be achieved in true codec (you need some side bits to represent the coding information, etc...)

So, for a real coding system, bits required to code a plurality of signals is most likely to be around:

BITS = p * PE + q

where  p and q are codec dependent parameters..  For example, for MPEG-4 AAC:

BITS = 0.6 * PE + 24 * sqrt (PE)

This is not exact measure, of course - since huffman codebooks are not perfect, and signal statistic might vary from frame to frame, etc..

So if i have one tone (TF) and i know minimum masking threshold (MinT) i need

log2(TF / MinT) bits to quantize this tone?
Go to the top of the page
+Quote Post
Ivan Dimkovic
post Nov 28 2003, 17:31
Post #9


Nero MPEG4 developer


Group: Developer
Posts: 1466
Joined: 22-September 01
Member No.: 8



QUOTE
log2(TF / MinT) bits to quantize this tone?


Yep.. actually, this should be the "theoretical minimum" - like with normal entropy.

You also have to add side data necessary to represent the compressed spectrum, like huffman table indexes or tables themselves - also, each huffman codebook has its own performance on different signal statistics, etc..

So, for a particular coding system (like MP3) the formula is little bit more complicated.
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: 22nd September 2014 - 06:34