| Index: libvpx/source/libvpx/vp8/encoder/asm_enc_offsets.c
|
| diff --git a/libvpx/source/libvpx/vp8/encoder/asm_enc_offsets.c b/libvpx/source/libvpx/vp8/encoder/asm_enc_offsets.c
|
| index c79e915f8052aba912bce75320ea101660ff9a85..9c81c8d0a5e7e7e3089bd3c80f9028bde4254f46 100644
|
| --- a/libvpx/source/libvpx/vp8/encoder/asm_enc_offsets.c
|
| +++ b/libvpx/source/libvpx/vp8/encoder/asm_enc_offsets.c
|
| @@ -9,17 +9,31 @@
|
| */
|
|
|
|
|
| -#include "vpx_ports/asm_offsets.h"
|
| -#include "vpx_config.h"
|
| +#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"
|
|
|
| -BEGIN
|
| +#define ct_assert(name,cond) \
|
| + static void assert_##name(void) UNUSED;\
|
| + static void assert_##name(void) {switch(0){case 0:case !!(cond):;}}
|
| +
|
| +#define DEFINE(sym, val) int sym = val;
|
| +
|
| +/*
|
| +#define BLANK() asm volatile("\n->" : : )
|
| +*/
|
| +
|
| +/*
|
| + * int main(void)
|
| + * {
|
| + */
|
|
|
| -/* regular quantize */
|
| +//regular quantize
|
| DEFINE(vp8_block_coeff, offsetof(BLOCK, coeff));
|
| DEFINE(vp8_block_zbin, offsetof(BLOCK, zbin));
|
| DEFINE(vp8_block_round, offsetof(BLOCK, round));
|
| @@ -34,7 +48,7 @@ DEFINE(vp8_blockd_dequant, offsetof(BLOCKD, dequant));
|
| DEFINE(vp8_blockd_dqcoeff, offsetof(BLOCKD, dqcoeff));
|
| DEFINE(vp8_blockd_eob, offsetof(BLOCKD, eob));
|
|
|
| -/* subtract */
|
| +// subtract
|
| DEFINE(vp8_block_base_src, offsetof(BLOCK, base_src));
|
| DEFINE(vp8_block_src, offsetof(BLOCK, src));
|
| DEFINE(vp8_block_src_diff, offsetof(BLOCK, src_diff));
|
| @@ -42,7 +56,7 @@ DEFINE(vp8_block_src_stride, offsetof(BLOCK, src_stride));
|
|
|
| DEFINE(vp8_blockd_predictor, offsetof(BLOCKD, predictor));
|
|
|
| -/* pack tokens */
|
| +//pack tokens
|
| DEFINE(vp8_writer_lowvalue, offsetof(vp8_writer, lowvalue));
|
| DEFINE(vp8_writer_range, offsetof(vp8_writer, range));
|
| DEFINE(vp8_writer_value, offsetof(vp8_writer, value));
|
| @@ -76,16 +90,16 @@ DEFINE(TOKENLIST_SZ, sizeof(TOKENLIST));
|
|
|
| DEFINE(vp8_common_mb_rows, offsetof(VP8_COMMON, mb_rows));
|
|
|
| -END
|
| -
|
| -/* add asserts for any offset that is not supported by assembly code
|
| - * add asserts for any size that is not supported by assembly code
|
| -
|
| - * These are used in vp8cx_pack_tokens. They are hard coded so if their sizes
|
| - * change they will have to be adjusted.
|
| - */
|
| -
|
| +// 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
|
| ct_assert(TOKENEXTRA_SZ, sizeof(TOKENEXTRA) == 8)
|
| ct_assert(vp8_extra_bit_struct_sz, sizeof(vp8_extra_bit_struct) == 16)
|
| #endif
|
| +
|
| +//add asserts for any offset that is not supported by assembly code
|
| +//add asserts for any size that is not supported by assembly code
|
| +/*
|
| + * return 0;
|
| + * }
|
| + */
|
|
|