• Monty's avatar
    The automated book training scripts managed to create a few residue · 119bfda5
    Monty authored
    books with no codewords (in that mode with that partitioning scheme,
    no values happened to fall into that partition).  This is not really
    an error.
    
    However, the residue encoding code did not account for the possibility
    of looking up a codebook best match and finding no entries.  Because
    the unused book only came up very rarely (four hours of training audio
    didn't hit it once), it took a while to notice and only comes up on
    platforms with subtly different FP than the machine used to do
    training.
    
    This bug affects very low bitrate stereo 8, 11, 16 and 22kHz modes;
    added code to check for 'no match in codebook' (correct behavior is to
    encode nothing) and for good measure, removed the four dummy codebooks
    as there's no point in wasting a few bytes in the header to pack a
    nothing.
    
    Closes bug 1142.
    
    
    svn path=/trunk/vorbis/; revision=13170
    119bfda5
residue_16.h 4.63 KB