MCPcopy Create free account
hub / github.com/zhuker/lamejs / ShortHuffmancodebits

Method ShortHuffmancodebits

src/main/java/mp3/BitStream.java:547–558  ·  view source on GitHub ↗

Note the discussion of huffmancodebits() on pages 28 and 29 of the IS, as well as the definitions of the side information on pages 26 and 27.

(final LameInternalFlags gfc,
			final GrInfo gi)

Source from the content-addressed store, hash-verified

545 * well as the definitions of the side information on pages 26 and 27.
546 */
547 private int ShortHuffmancodebits(final LameInternalFlags gfc,
548 final GrInfo gi) {
549 int region1Start = 3 * gfc.scalefac_band.s[3];
550 if (region1Start > gi.big_values)
551 region1Start = gi.big_values;
552
553 /* short blocks do not have a region2 */
554 int bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);
555 bits += Huffmancode(gfc, gi.table_select[1], region1Start,
556 gi.big_values, gi);
557 return bits;
558 }
559
560 private int LongHuffmancodebits(final LameInternalFlags gfc, final GrInfo gi) {
561 int bigvalues, bits;

Callers 1

writeMainDataMethod · 0.95

Calls 1

HuffmancodeMethod · 0.95

Tested by

no test coverage detected