summaryrefslogtreecommitdiff
path: root/vp8/encoder
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2011-06-08 14:43:34 -0400
committerJohann <johannkoenig@google.com>2011-06-08 16:19:37 -0400
commit79327be6c729ed73cb339630b0ab770e3c54a4ab (patch)
tree21b0507eba5f96abcba636833f26b498e017a2f6 /vp8/encoder
parentbaa17db184722fd59ac917ae8701552d9d481835 (diff)
downloadlibvpx-79327be6c729ed73cb339630b0ab770e3c54a4ab.tar
libvpx-79327be6c729ed73cb339630b0ab770e3c54a4ab.tar.gz
libvpx-79327be6c729ed73cb339630b0ab770e3c54a4ab.tar.bz2
libvpx-79327be6c729ed73cb339630b0ab770e3c54a4ab.zip
use GCC inline magic
Better fix for #326. ICC happens to support the inline magic Change-Id: Ic367eea608c88d89475cb7b05d73500d2a1bc42b
Diffstat (limited to 'vp8/encoder')
-rw-r--r--vp8/encoder/asm_enc_offsets.c44
1 files changed, 15 insertions, 29 deletions
diff --git a/vp8/encoder/asm_enc_offsets.c b/vp8/encoder/asm_enc_offsets.c
index 9c81c8d0a..c79e915f8 100644
--- a/vp8/encoder/asm_enc_offsets.c
+++ b/vp8/encoder/asm_enc_offsets.c
@@ -9,31 +9,17 @@
*/
-#include "vpx_ports/config.h"
-#include <stddef.h>
-
+#include "vpx_ports/asm_offsets.h"
+#include "vpx_config.h"
#include "block.h"
#include "vp8/common/blockd.h"
#include "onyx_int.h"
#include "treewriter.h"
#include "tokenize.h"
-#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)
- * {
- */
+BEGIN
-//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));
@@ -48,7 +34,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));
@@ -56,7 +42,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));
@@ -90,16 +76,16 @@ DEFINE(TOKENLIST_SZ, sizeof(TOKENLIST));
DEFINE(vp8_common_mb_rows, offsetof(VP8_COMMON, mb_rows));
-// These two sizes are used in vp8cx_pack_tokens. They are hard coded
-// so if the size changes this will have to be adjusted.
+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.
+ */
+
#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;
- * }
- */