Massive overhaul of nnz/cbp calculation
authorFiona Glaser <fiona@x264.com>
Fri, 30 Jan 2009 11:40:54 +0000 (03:40 -0800)
committerFiona Glaser <fiona@x264.com>
Fri, 30 Jan 2009 12:11:24 +0000 (04:11 -0800)
commite394bd600ba9b1a3cee24e7d0b01dfb0acc5d1ad
treefe639eaa30d3189ddf7be8ffc16bc52a06407099
parent9c55521590a2afe496394e51f6a42dc30939f8ad
Massive overhaul of nnz/cbp calculation
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.
18 files changed:
common/common.h
common/dct.c
common/dct.h
common/ppc/quant.c
common/ppc/quant.h
common/quant.c
common/quant.h
common/x86/dct-a.asm
common/x86/dct.h
common/x86/quant-a.asm
common/x86/quant.h
encoder/analyse.c
encoder/cabac.c
encoder/cavlc.c
encoder/macroblock.c
encoder/macroblock.h
encoder/rdo.c
tools/checkasm.c