HydrogenAudio

Lossy Audio Compression => AAC => AAC - Tech => Topic started by: sana.iitkgp on 2012-10-05 07:09:15

Title: PNS and M/S coding
Post by: sana.iitkgp on 2012-10-05 07:09:15
From the specifications of AAC

In M/S coding section

Please note that ms_used[][] is also used in the context of intensity stereo coding and perceptual noise substitution. If intensity
stereo coding or noise substitution is on for a particular scalefactor band, no M/S stereo decoding is carried out.


In PNS section

If the same scalefactor band and group is coded by perceptual noise substitution in both channels of a channel pair, the correlation of the noise signal can be controlled by means of the ms_used field: While the default noise generation process works independently for each channel (separate generation of random vectors), the same random vector is used for both channels if ms_used[] is set for a particular scalefactor band and group. In this case, no M/S stereo coding is carried out (because M/S stereo coding and noise substitution coding are mutually exclusive). If the same scalefactor band and group is coded by perceptual noise substitution in only one channel of a channel pair the setting of ms_used[] is not evaluated.


I'm confused after reading both these. If only one channel has PNS data and if MS coding is on for that particular scalefactor band. Do we need to proceed with M/S coding or skip M/S coding for that scalefactor band?
Title: PNS and M/S coding
Post by: C.R.Helmrich on 2012-10-08 10:37:55
I'm confused after reading both these. If only one channel has PNS data and if MS coding is on for that particular scalefactor band. Do we need to proceed with M/S coding or skip M/S coding for that scalefactor band?

I'm confused, too. If you're building an encoder, I think you should avoid having PNS in only one channel-SFB of a channel pair element. Either in the same SFB in both channels, or in none. My guess is that you should assume that M/S decoding is skipped, but I'll double-check.

Chris
Title: PNS and M/S coding
Post by: sana.iitkgp on 2012-10-09 06:15:02
Hi Chris,

Thanks for your reply. I'm building a decoder. Can I assume that in a channel pair element, if one channel has PNS then the other channel also have PNS for the same SFB?
Title: PNS and M/S coding
Post by: C.R.Helmrich on 2012-10-09 09:06:22
No, don't assume, check. If PNS is on in only one channel of a CPE for a SFB, this means stereo-wise it's treated as "on" in both channels, so you need to skip M/S decoding for that SFB (but of course you still do PNS decoding in the channel in which it's signaled).

Chris
Title: PNS and M/S coding
Post by: sana.iitkgp on 2012-10-09 09:40:24
What if only one channel has PNS on, Do I need to skip M/S Coding or proceed with M/S Coding?
Title: PNS and M/S coding
Post by: C.R.Helmrich on 2012-10-09 09:48:59
I just answered that question.

Chris
Title: PNS and M/S coding
Post by: sana.iitkgp on 2012-10-09 10:21:27
Thanks Chris