Global gain, scale factors, signal, quantization |
![]() ![]() |
Global gain, scale factors, signal, quantization |
Aug 26 2003, 11:01
Post
#1
|
|
![]() LAME developer Group: Developer Posts: 2950 Joined: 1-October 01 From: Nanterre, France Member No.: 138 |
This could belong to both mp3 and aac forums, so I am asking here.
My question is about how to quantize (and dequantize) the signal. I have some doubts regarding how factors are interacting with each others. *global gain and scalefactors: How is the scaling done? Is the scaling done by (global gain * scalefactor) or by (global gain - scalefactor)? *scaling: What is scaled, signal or quantizer step size? |
|
|
|
Aug 26 2003, 11:40
Post
#2
|
|
|
Nero MPEG4 developer Group: Developer Posts: 1466 Joined: 22-September 01 Member No.: 8 |
QUOTE *global gain and scalefactors: How is the scaling done? Is the scaling done by (global gain * scalefactor) or by (global gain - scalefactor)? It should be: actual_local_sf = global_gain - stored_local_sf; Where - actual local sf would be an actual scaling factor for the particual band, and stored_local_sf would be a value stored in the encoded bitstream. QUOTE *scaling: What is scaled, signal or quantizer step size? During encoding, MDCT floating-point signal is scaled according to the quantizer step size, and the scaled representation is quantized (converted to integer domain). |
|
|
|
Aug 26 2003, 11:56
Post
#3
|
|
![]() LAME developer Group: Developer Posts: 2950 Joined: 1-October 01 From: Nanterre, France Member No.: 138 |
I think that I am still missing a part:
let's call ix the mdct output signal (floating point), do we quantize: actual_local_sf * ix ? (of course actual_local_sf is varying between sf bands) |
|
|
|
Aug 26 2003, 13:17
Post
#4
|
|
|
Nero MPEG4 developer Group: Developer Posts: 1466 Joined: 22-September 01 Member No.: 8 |
QUOTE (Gabriel @ Aug 26 2003, 10:56 AM) I think that I am still missing a part: let's call ix the mdct output signal (floating point), do we quantize: actual_local_sf * ix ? (of course actual_local_sf is varying between sf bands) do for every frequency coef w: QuantSignal[w] = NINT( pow( ix[w] / actual_local_sf, 0.75 ) - 0.0946 ) Where: int QuantSignal[w] --> integerized, quantized value of spectrum float ix[w] --> input MDCT signal, floating point actual_local_sf --> global_gain - scale_factor[sfb] |
|
|
|
Aug 26 2003, 13:31
Post
#5
|
|
![]() LAME developer Group: Developer Posts: 2950 Joined: 1-October 01 From: Nanterre, France Member No.: 138 |
Thank you very much for those clarifications Ivan.
|
|
|
|
Aug 26 2003, 14:07
Post
#6
|
|
|
Nero MPEG4 developer Group: Developer Posts: 1466 Joined: 22-September 01 Member No.: 8 |
QUOTE QuantSignal[w] = NINT( pow( ix[w] / actual_local_sf, 0.75 ) - 0.0946 ) Ah, yes - I forgot So, it can be seen that if you increase scale_factor[sb], the actual_local_sf value will be decreased (actual_local_sf = global_gain - scale_factor[sb]), and the quantized signal will be amplified - and therefore closer to the original MDCT signal. That's why in the loop iteration process, the distorted bands get amplified and re-checked for distortion. This post has been edited by Ivan Dimkovic: Aug 26 2003, 14:10 |
|
|
|
Aug 26 2003, 14:47
Post
#7
|
|
![]() LAME developer Group: Developer Posts: 2950 Joined: 1-October 01 From: Nanterre, France Member No.: 138 |
Language is strange sometimes.
It seems to me that by increasing the scale_factor (so decreasing the global scale value) the signal is not really amplified but less devided. Overall it is equivalent, but still strange. (I was asking those clarifications because I was wondering about the sfb21 strangeness) |
|
|
|
Aug 26 2003, 15:04
Post
#8
|
|
|
Nero MPEG4 developer Group: Developer Posts: 1466 Joined: 22-September 01 Member No.: 8 |
QUOTE It seems to me that by increasing the scale_factor (so decreasing the global scale value) the signal is not really amplified but less devided. Overall it is equivalent, but still strange. Well, it is a power-law quantizer, in reality it is really an amplification - and in the same time the deviation gets smaller |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 25th May 2013 - 02:18 |