diff options
author | Johann <johannkoenig@google.com> | 2011-02-10 14:57:43 -0500 |
---|---|---|
committer | Johann <johannkoenig@google.com> | 2011-03-24 13:34:48 -0400 |
commit | 8edaf6e2f232f00de3e3aac1657a31a3effe9a11 (patch) | |
tree | 697dd89f02461daee46c8caca4c9e84df8d9ba21 /vp8/encoder/asm_enc_offsets.c | |
parent | edfc93aebac7674f26ed4c0389d97ae15e8b8c2b (diff) | |
download | libvpx-8edaf6e2f232f00de3e3aac1657a31a3effe9a11.tar libvpx-8edaf6e2f232f00de3e3aac1657a31a3effe9a11.tar.gz libvpx-8edaf6e2f232f00de3e3aac1657a31a3effe9a11.tar.bz2 libvpx-8edaf6e2f232f00de3e3aac1657a31a3effe9a11.zip |
use asm_offsets with vp8_regular_quantize_b_sse2
remove helper function and avoid shadowing all the arguments to the
stack on 64bit systems
when running with --good --cpu-used=0:
~2% on linux x86 and x86_64
~2% on win32 x86 msys and visual studio
more on darwin10 x86_64
significantly more on
x86_64-win64-vs9
Change-Id: Ib7be12edf511fbf2922f191afd5b33b19a0c4ae6
Diffstat (limited to 'vp8/encoder/asm_enc_offsets.c')
-rw-r--r-- | vp8/encoder/asm_enc_offsets.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/vp8/encoder/asm_enc_offsets.c b/vp8/encoder/asm_enc_offsets.c index fcf77756a..c7983c1b0 100644 --- a/vp8/encoder/asm_enc_offsets.c +++ b/vp8/encoder/asm_enc_offsets.c @@ -12,9 +12,11 @@ #include "vpx_ports/config.h" #include <stddef.h> +#include "block.h" +#include "vp8/common/blockd.h" +#include "onyx_int.h" #include "treewriter.h" #include "tokenize.h" -#include "onyx_int.h" #define ct_assert(name,cond) \ static void assert_##name(void) UNUSED;\ @@ -31,6 +33,21 @@ * { */ +//regular quantize +DEFINE(vp8_block_coeff, offsetof(BLOCK, coeff)); +DEFINE(vp8_block_zbin, offsetof(BLOCK, zbin)); +DEFINE(vp8_block_round, offsetof(BLOCK, round)); +DEFINE(vp8_block_quant, offsetof(BLOCK, quant)); +DEFINE(vp8_block_quant_fast, offsetof(BLOCK, quant_fast)); +DEFINE(vp8_block_zbin_extra, offsetof(BLOCK, zbin_extra)); +DEFINE(vp8_block_zrun_zbin_boost, offsetof(BLOCK, zrun_zbin_boost)); +DEFINE(vp8_block_quant_shift, offsetof(BLOCK, quant_shift)); + +DEFINE(vp8_blockd_qcoeff, offsetof(BLOCKD, qcoeff)); +DEFINE(vp8_blockd_dequant, offsetof(BLOCKD, dequant)); +DEFINE(vp8_blockd_dqcoeff, offsetof(BLOCKD, dqcoeff)); +DEFINE(vp8_blockd_eob, offsetof(BLOCKD, eob)); + //pack tokens DEFINE(vp8_writer_lowvalue, offsetof(vp8_writer, lowvalue)); DEFINE(vp8_writer_range, offsetof(vp8_writer, range)); @@ -65,17 +82,6 @@ DEFINE(TOKENLIST_SZ, sizeof(TOKENLIST)); DEFINE(vp8_common_mb_rows, offsetof(VP8_COMMON, mb_rows)); -// offsets from BLOCK structure -DEFINE(vp8_block_coeff, offsetof(BLOCK, coeff)); -DEFINE(vp8_block_quant_fast, offsetof(BLOCK, quant_fast)); -DEFINE(vp8_block_round, offsetof(BLOCK, round)); - -// offsets from BLOCKD structure -DEFINE(vp8_blockd_qcoeff, offsetof(BLOCKD, qcoeff)); -DEFINE(vp8_blockd_dqcoeff, offsetof(BLOCKD, dqcoeff)); -DEFINE(vp8_blockd_dequant, offsetof(BLOCKD, dequant)); -DEFINE(vp8_blockd_eob, offsetof(BLOCKD, eob)); - // These two sizes are used in vp8cx_pack_tokens. They are hard coded // so if the size changes this will have to be adjusted. #if HAVE_ARMV5TE |