Re: [MP3 ENCODER] l3psycho_anal

2000-06-05 Thread Mark Taylor



The decision to encode in M/S or Stereo could be made in
l3psycho_anal, just after it determines the block type,
but this would make the routine even bigger :-)

Mark

 
 Gabriel Bouvigne schrieb am Don, 01 Jun 2000:
  In the big (too big?) l3psycho_anal function, in the "determin final block
  type" section, is there a way to know if the frame is m/s or stereo? I mean,
  is there something like blocktype[chn] to know it?
  
  
  Regards,
  
  --
  
  Gabriel Bouvigne - France
  [EMAIL PROTECTED]
  icq: 12138873
  
  MP3' Tech: www.mp3-tech.org
 
 Hi Gabriel,
 
 the decision to encode in M/S or Stereo is made in lame.c:
 
 
   /* use m/s gfc-stereo? */
   check_ms_stereo =  (gfp-mode == MPG_MD_JOINT_STEREO);
   if (check_ms_stereo) {
 /* make sure block type is the same in each channel */
 check_ms_stereo =
   
(gfc-l3_side.gr[0].ch[0].tt.block_type==gfc-l3_side.gr[0].ch[1].tt.block_type) 
   
(gfc-l3_side.gr[1].ch[0].tt.block_type==gfc-l3_side.gr[1].ch[1].tt.block_type);
   }
   if (check_ms_stereo) {
 /* ms_ratio = is like the ratio of side_energy/total_energy */
 FLOAT8 ms_ratio_ave;
 /* ms_ratio_ave = .5*(ms_ratio[0] + ms_ratio[1]);*/
 ms_ratio_ave = .25*(gfc-ms_ratio[0] + gfc-ms_ratio[1]+
ms_ratio_prev + ms_ratio_next);
 if ( (ms_ratio_ave .35)  (.5*(gfc-ms_ratio[0]+gfc-ms_ratio[1]).45) )
  gfc-mode_ext = MPG_MD_MS_LR;
   }
   if (gfp-force_ms) gfc-mode_ext = MPG_MD_MS_LR;
 
 Robert
 --
 MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
 
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] l3psycho_anal

2000-06-02 Thread Robert Hegemann

Gabriel Bouvigne schrieb am Don, 01 Jun 2000:
 In the big (too big?) l3psycho_anal function, in the "determin final block
 type" section, is there a way to know if the frame is m/s or stereo? I mean,
 is there something like blocktype[chn] to know it?
 
 
 Regards,
 
 --
 
 Gabriel Bouvigne - France
 [EMAIL PROTECTED]
 icq: 12138873
 
 MP3' Tech: www.mp3-tech.org

Hi Gabriel,

the decision to encode in M/S or Stereo is made in lame.c:


  /* use m/s gfc-stereo? */
  check_ms_stereo =  (gfp-mode == MPG_MD_JOINT_STEREO);
  if (check_ms_stereo) {
/* make sure block type is the same in each channel */
check_ms_stereo =
  (gfc-l3_side.gr[0].ch[0].tt.block_type==gfc-l3_side.gr[0].ch[1].tt.block_type) 

  (gfc-l3_side.gr[1].ch[0].tt.block_type==gfc-l3_side.gr[1].ch[1].tt.block_type);
  }
  if (check_ms_stereo) {
/* ms_ratio = is like the ratio of side_energy/total_energy */
FLOAT8 ms_ratio_ave;
/* ms_ratio_ave = .5*(ms_ratio[0] + ms_ratio[1]);*/
ms_ratio_ave = .25*(gfc-ms_ratio[0] + gfc-ms_ratio[1]+
 ms_ratio_prev + ms_ratio_next);
if ( (ms_ratio_ave .35)  (.5*(gfc-ms_ratio[0]+gfc-ms_ratio[1]).45) )
 gfc-mode_ext = MPG_MD_MS_LR;
  }
  if (gfp-force_ms) gfc-mode_ext = MPG_MD_MS_LR;

Robert
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



[MP3 ENCODER] l3psycho_anal

2000-06-01 Thread Gabriel Bouvigne

In the big (too big?) l3psycho_anal function, in the "determin final block
type" section, is there a way to know if the frame is m/s or stereo? I mean,
is there something like blocktype[chn] to know it?


Regards,

--

Gabriel Bouvigne - France
[EMAIL PROTECTED]
icq: 12138873

MP3' Tech: www.mp3-tech.org


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )