some simple statistics bitrate index 0: free bitrate . not allowed in VBR mode : bitrates, kbps depending on MPEG version bitrate index 15: forbidden mode_ext: 0: LR 1: LR-i 2: MS 3: MS-i
(final LameInternalFlags gfc)
| 251 | * </PRE> |
| 252 | */ |
| 253 | private void updateStats(final LameInternalFlags gfc) { |
| 254 | int gr, ch; |
| 255 | assert (0 <= gfc.bitrate_index && gfc.bitrate_index < 16); |
| 256 | assert (0 <= gfc.mode_ext && gfc.mode_ext < 4); |
| 257 | |
| 258 | /* count bitrate indices */ |
| 259 | gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][4]++; |
| 260 | gfc.bitrate_stereoMode_Hist[15][4]++; |
| 261 | |
| 262 | /* count 'em for every mode extension in case of 2 channel encoding */ |
| 263 | if (gfc.channels_out == 2) { |
| 264 | gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][gfc.mode_ext]++; |
| 265 | gfc.bitrate_stereoMode_Hist[15][gfc.mode_ext]++; |
| 266 | } |
| 267 | for (gr = 0; gr < gfc.mode_gr; ++gr) { |
| 268 | for (ch = 0; ch < gfc.channels_out; ++ch) { |
| 269 | int bt = gfc.l3_side.tt[gr][ch].block_type; |
| 270 | if (gfc.l3_side.tt[gr][ch].mixed_block_flag != 0) |
| 271 | bt = 4; |
| 272 | gfc.bitrate_blockType_Hist[gfc.bitrate_index][bt]++; |
| 273 | gfc.bitrate_blockType_Hist[gfc.bitrate_index][5]++; |
| 274 | gfc.bitrate_blockType_Hist[15][bt]++; |
| 275 | gfc.bitrate_blockType_Hist[15][5]++; |
| 276 | } |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | private void lame_encode_frame_init(final LameGlobalFlags gfp, |
| 281 | final float inbuf[][]) { |
no outgoing calls
no test coverage detected