Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th October 2011, 22:26   #1  |  Link
epitaxial
Registered User
 
Join Date: Apr 2011
Location: NY
Posts: 3
MPEG1 layer II Mode and Mode extension bits

Can someone please explain the purpose and use of the mode and mode extension bits as used in MPEG1 Layer II audio coding?

Many thanks.
epitaxial is offline   Reply With Quote
Old 5th October 2011, 23:00   #2  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,907
It's in the MPEG1 audio spec:

mode - Indicates the mode according to the following table. In Layer I and II the joint_stereo mode is intensity_stereo, in Layer III it is intensity_stereo and/or ms_stereo.

'00' stereo
'01' joint_stereo (intensity_stereo and/or ms_stereo)
'10' dual_channel
'11' single_channel

mode_extension - these bits are used in joint_stereo mode. In Layer I and II they indicate which subbands are in intensity_stereo. All other subbands are coded in stereo.

'00' subbands 4-31 in intensity_stereo, bound==4
'01' subbands 8-31 in intensity_stereo, bound==8
'10' subbands 12-31 in intensity_stereo, bound==12
'11' subbands 16-31 in intensity_stereo, bound==16

In Layer III they indicate which type of joint stereo coding method is applied. The frequency ranges over which the intensity_stereo and ms_stereo modes are applied are implicit in the algorithm. For more information see 2.4.3.4.

value intensity_stereo ms_stereo
'00' off off
'01' on off
'10' off on
'11' on on
Guest is offline   Reply With Quote
Old 6th October 2011, 18:52   #3  |  Link
epitaxial
Registered User
 
Join Date: Apr 2011
Location: NY
Posts: 3
Thanks for the reply. My question (not clearly stated) is less about what the standards say and more about how the coder uses these fields.

I have a bit stream where the mode changes at some point from stereo to joint-stereo and I am curious as to whether this is correct (standards wise) and if so what decision did the coder make to affect this change.

Seems to me that the mode-ext is ignored when the mode is stereo and per the standard -

"The mode-extension bits set the ‘bound’ as shown in 2.4.2.3 and thus indicate which subbands are coded in joint-stereo mode."

In joint stereo the ext bits are used.

Greg
epitaxial is offline   Reply With Quote
Old 6th October 2011, 21:31   #4  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,235
Quote:
Originally Posted by epitaxial View Post
Thanks for the reply. My question (not clearly stated) is less about what the standards say and more about how the coder uses these fields.

I have a bit stream where the mode changes at some point from stereo to joint-stereo and I am curious as to whether this is correct (standards wise) and if so what decision did the coder make to affect this change.
Well, I think it's up to the individual encoder to chose the channel mode.

The standard only defines the bitstream syntax, but it doesn't define exact rules on how to convert an arbitrary input audio to such a bitstream.

It's the encoder's job to convert the individual input audio into a valid compressed bitstream. And every encoder uses it's own algorithms, heuristics, psy models and so on.

A "dumb" encoder would probably use a fixed channel mode, while a more sophisticated one will analyze the audio first and then pick the "optimal" mode.

The LAME encoder, e.g., offers "joint stereo" and "forced joint stereo" modes. The former selects the mode on a frame basis, the latter uses MS joint stereo on all frames.

Quote:
Originally Posted by epitaxial View Post
Seems to me that the mode-ext is ignored when the mode is stereo and per the standard
Indeed, looks like these bits apply to Joint Stereo mode only.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 7th October 2011 at 01:43.
LoRd_MuldeR is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.