M> I notice that best_huffman_divide() is specifically disabled
    M> for short blocks in MPEG 2/2.5.  Does any one remember why this
    M> was done?

Ok, I found the reason. It's easy bug, after all...

Enabling the best_huffman_divide() for MPEG2/2.5 short blocks,
LAME simply stops with "assertion faulure" in bitstream.c
And I found the bug is in the counting bits.

In best_huffman_divide().

    if (cod_info2.block_type == NORM_TYPE)
        recalc_divide_sub(gfc, &cod_info2, gi, ix, r01_bits,r01_div,r0_tbl,r1_tbl);
    else {
            :
        a1 = gfc->scalefac_band.l[7 + 1];    <======= HERE
        if (a1 > i) {
            a1 = i;
        }

For all the "not NORM_TYPE" block of MPEG1, the huffman division point is
same. But MPEG2/2.5, they differ from SHORT to STOP or START.

I fixed this and enabled best_huffman_divide() for MPEG2/2.5.
And it works fine now (with my "little" tests).

The fix is already done in my experimental branch.

Any comments ? If it is right answer to fix the problem, I will
backport to the main branch.
-- 
Takehiro TOMINAGA // may the source be with you!
_______________________________________________
mp3encoder mailing list
[EMAIL PROTECTED]
http://minnie.tuhs.org/mailman/listinfo/mp3encoder

Reply via email to