QUOTE(gbmallikarjunarao @ Jul 1 2005, 06:25 AM)
Thanks for your kind information.
I checked some files. The files are giving, same 'mode', throughout the whole file.
If it is stereo mode, mode bits showing '00' in the header,
if it is joint stereo, mode bits showing '01'.
There's this 2 bit mode field in each header with
00 = stereo
01 = joint stereo
10 = dual channel
11 = mono
In case of this field being 01 (joint stereo) the mode extension field (again 2 bits) have the following meaning
00 = L/R (completely)
01 = L/R + Intensity for upper frequencies
10 = M/S (completely)
11 = M/S + Intensity for upper frequencies
Though it's not common for an MP3 encoder to produce a stream mixed of stereo and joint stereo frames one could replace mp3 headers in a stream with 01/00 (joint stereo, L/R completely) with 00 (stereo) or 10 (dual) since these three modes are actually equivalent (should be still legal). The difference is meta information only: By using 01/00 you signal that some frames might use M/S and/or Intensity coding in the stream.
IIRC nowhere in the MPEG-1 Audio specification is said that swithing between the first three modes (stereo, joint, dual) is illegal. It is however uncommon for an MP3 encoder to produce such streams. As for MP2, the TooLame encoder switches between stereo and joint frames in its joint-stereo mode to be able to totally switch off intensity stereo for all bands (the mode extension has another meaning for MP2 and is intensity stereo specific).
As for L.A.M.E: In the "joint-stereo mode" it produces always joint-stereo frames with mode extensions 00 or 10 (L/R or M/S frames -- always without Intensity Sterem (for 3.xx))
IMHO it should be avoided to switch between modes, even though the stream won't be illegal otherwise. The problem is that some decoders might check the mode of the first frame they can find and filter following frames (ie not accepting frames with another mode). The built-in MP2 decoder of PowerDVD is a decoder which does that in order to fight "read-errors" (They obviously think swithing is illegal and thus it must have been a read-error) -- So, TooLame's joint-stereo + PowerDVD doesn't work well due to the switching between joint and stereo frames.
HTH,
Sebi