• Fiona Glaser's avatar
    Massive overhaul of nnz/cbp calculation · e394bd60
    Fiona Glaser authored
    Modify quantization to also calculate array_non_zero.
    PPC assembly changes by gpoirior.
    New quant asm includes some small tweaks to quant and SSE4 versions using ptest for the array_non_zero.
    Use this new feature of quant to merge nnz/cbp calculation directly with encoding and avoid many unnecessary calls to dequant/zigzag/decimate/etc.
    Also add new i16x16 DC-only iDCT with asm.
    Since intra encoding now directly calculates nnz, skip_intra now backs up nnz/cbp as well.
    Output should be equivalent except when using p4x4+RDO because of a subtlety involving old nnz values lying around.
    Performance increase in macroblock_encode: ~18% with dct-decimate, 30% without at CRF 25.
    Overall performance increase 0-6% depending on encoding settings.
macroblock.c 40.2 KB