public static function bitratelookup(&$mp3)
 {
     //bits               V1,L1  V1,L2  V1,L3  V2,L1  V2,L2&L3
     $array = array();
     $array['0000'] = array('free', 'free', 'free', 'free', 'free');
     $array['0001'] = array('32', '32', '32', '32', '8');
     $array['0010'] = array('64', '48', '40', '48', '16');
     $array['0011'] = array('96', '56', '48', '56', '24');
     $array['0100'] = array('128', '64', '56', '64', '32');
     $array['0101'] = array('160', '80', '64', '80', '40');
     $array['0110'] = array('192', '96', '80', '96', '48');
     $array['0111'] = array('224', '112', '96', '112', '56');
     $array['1000'] = array('256', '128', '112', '128', '64');
     $array['1001'] = array('288', '160', '128', '144', '80');
     $array['1010'] = array('320', '192', '160', '160', '96');
     $array['1011'] = array('352', '224', '192', '176', '112');
     $array['1100'] = array('384', '256', '224', '192', '128');
     $array['1101'] = array('416', '320', '256', '224', '144');
     $array['1110'] = array('448', '384', '320', '256', '160');
     $array['1111'] = array('bad', 'bad', 'bad', 'bad', 'bad');
     $whichcolumn = -1;
     if (mp3file::is_mpeg10($mp3) && mp3file::is_layer1($mp3)) {
         //V1,L1
         $whichcolumn = 0;
     } else {
         if (mp3file::is_mpeg10($mp3) && mp3file::is_layer2($mp3)) {
             //V1,L2
             $whichcolumn = 1;
         } else {
             if (mp3file::is_mpeg10($mp3) && mp3file::is_layer3($mp3)) {
                 //V1,L3
                 $whichcolumn = 2;
             } else {
                 if (mp3file::is_mpeg20or25($mp3) && mp3file::is_layer1($mp3)) {
                     //V2,L1
                     $whichcolumn = 3;
                 } else {
                     if (mp3file::is_mpeg20or25($mp3) && (mp3file::is_layer2($mp3) || mp3file::is_layer3($mp3))) {
                         $whichcolumn = 4;
                     }
                 }
             }
         }
     }
     //V2,   L2||L3
     if (isset($array[$mp3['Bitrate Index']][$whichcolumn])) {
         return $array[$mp3['Bitrate Index']][$whichcolumn];
     } else {
         return "bad";
     }
 }