• mru's avatar
    AAC: Compress codebook tables and optimise sign bit handling · d0adf8e8
    mru authored
    The codebooks each consist of small number of values repeated in
    groups of 2 or 4.  Storing the codebooks as a packed list of 2- or
    4-bit indexes into a table reduces their size substantially (from 7.5k
    to 1.5k), resulting in less cache pressure.
    
    For the band types with sign bits in the bitstream, storing the number
    and position of non-zero codebook values using a few bits avoids
    multiple get_bits() calls and floating-point comparisons which gcc
    handles miserably.
    
    Some float/int type punning also avoids gcc brain damage.
    
    Overall speedup 20-35% on Cortex-A8, 20% on Core i7.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21188 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
    d0adf8e8
aac.c 69.9 KB