Home | History | Annotate | Download | only in arm
      1 /*
      2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
      3  *
      4  *  Use of this source code is governed by a BSD-style license
      5  *  that can be found in the LICENSE file in the root of the source
      6  *  tree. An additional intellectual property rights grant can be found
      7  *  in the file PATENTS.  All contributing project authors may
      8  *  be found in the AUTHORS file in the root of the source tree.
      9  */
     10 
     11 
     12 #include "vpx_ports/config.h"
     13 #include <stddef.h>
     14 
     15 #include "../treewriter.h"
     16 #include "../tokenize.h"
     17 #include "../onyx_int.h"
     18 
     19 #define ct_assert(name,cond) \
     20     static void assert_##name(void) UNUSED;\
     21     static void assert_##name(void) {switch(0){case 0:case !!(cond):;}}
     22 
     23 #define DEFINE(sym, val) int sym = val;
     24 
     25 /*
     26 #define BLANK() asm volatile("\n->" : : )
     27 */
     28 
     29 /*
     30  * int main(void)
     31  * {
     32  */
     33 
     34 DEFINE(vp8_writer_lowvalue,                     offsetof(vp8_writer, lowvalue));
     35 DEFINE(vp8_writer_range,                        offsetof(vp8_writer, range));
     36 DEFINE(vp8_writer_value,                        offsetof(vp8_writer, value));
     37 DEFINE(vp8_writer_count,                        offsetof(vp8_writer, count));
     38 DEFINE(vp8_writer_pos,                          offsetof(vp8_writer, pos));
     39 DEFINE(vp8_writer_buffer,                       offsetof(vp8_writer, buffer));
     40 
     41 DEFINE(tokenextra_token,                        offsetof(TOKENEXTRA, Token));
     42 DEFINE(tokenextra_extra,                        offsetof(TOKENEXTRA, Extra));
     43 DEFINE(tokenextra_context_tree,                  offsetof(TOKENEXTRA, context_tree));
     44 DEFINE(tokenextra_skip_eob_node,                offsetof(TOKENEXTRA, skip_eob_node));
     45 DEFINE(TOKENEXTRA_SZ,                           sizeof(TOKENEXTRA));
     46 
     47 DEFINE(vp8_extra_bit_struct_sz,                   sizeof(vp8_extra_bit_struct));
     48 
     49 DEFINE(vp8_token_value,                         offsetof(vp8_token, value));
     50 DEFINE(vp8_token_len,                           offsetof(vp8_token, Len));
     51 
     52 DEFINE(vp8_extra_bit_struct_tree,                 offsetof(vp8_extra_bit_struct, tree));
     53 DEFINE(vp8_extra_bit_struct_prob,                 offsetof(vp8_extra_bit_struct, prob));
     54 DEFINE(vp8_extra_bit_struct_prob_bc,               offsetof(vp8_extra_bit_struct, prob_bc));
     55 DEFINE(vp8_extra_bit_struct_len,                  offsetof(vp8_extra_bit_struct, Len));
     56 DEFINE(vp8_extra_bit_struct_base_val,              offsetof(vp8_extra_bit_struct, base_val));
     57 
     58 DEFINE(vp8_comp_tplist,                         offsetof(VP8_COMP, tplist));
     59 DEFINE(vp8_comp_common,                         offsetof(VP8_COMP, common));
     60 DEFINE(vp8_comp_bc2,                            offsetof(VP8_COMP, bc2));
     61 
     62 DEFINE(tokenlist_start,                         offsetof(TOKENLIST, start));
     63 DEFINE(tokenlist_stop,                          offsetof(TOKENLIST, stop));
     64 DEFINE(TOKENLIST_SZ,                            sizeof(TOKENLIST));
     65 
     66 DEFINE(vp8_common_mb_rows,                       offsetof(VP8_COMMON, mb_rows));
     67 
     68 // These two sizes are used in vp7cx_pack_tokens.  They are hard coded
     69 //  so if the size changes this will have to be adjusted.
     70 ct_assert(TOKENEXTRA_SZ, sizeof(TOKENEXTRA) == 20)
     71 ct_assert(vp8_extra_bit_struct_sz, sizeof(vp8_extra_bit_struct) == 20)
     72 
     73 //add asserts for any offset that is not supported by assembly code
     74 //add asserts for any size that is not supported by assembly code
     75 /*
     76  * return 0;
     77  * }
     78  */
     79