media/libvpx/vp8/encoder/vp8_asm_enc_offsets.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libvpx/vp8/encoder/vp8_asm_enc_offsets.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,93 @@
     1.4 +/*
     1.5 + *  Copyright (c) 2011 The WebM project authors. All Rights Reserved.
     1.6 + *
     1.7 + *  Use of this source code is governed by a BSD-style license
     1.8 + *  that can be found in the LICENSE file in the root of the source
     1.9 + *  tree. An additional intellectual property rights grant can be found
    1.10 + *  in the file PATENTS.  All contributing project authors may
    1.11 + *  be found in the AUTHORS file in the root of the source tree.
    1.12 + */
    1.13 +
    1.14 +
    1.15 +#include "vpx_ports/asm_offsets.h"
    1.16 +#include "vpx_config.h"
    1.17 +#include "block.h"
    1.18 +#include "vp8/common/blockd.h"
    1.19 +#include "onyx_int.h"
    1.20 +#include "treewriter.h"
    1.21 +#include "tokenize.h"
    1.22 +
    1.23 +BEGIN
    1.24 +
    1.25 +/* regular quantize */
    1.26 +DEFINE(vp8_block_coeff,                         offsetof(BLOCK, coeff));
    1.27 +DEFINE(vp8_block_zbin,                          offsetof(BLOCK, zbin));
    1.28 +DEFINE(vp8_block_round,                         offsetof(BLOCK, round));
    1.29 +DEFINE(vp8_block_quant,                         offsetof(BLOCK, quant));
    1.30 +DEFINE(vp8_block_quant_fast,                    offsetof(BLOCK, quant_fast));
    1.31 +DEFINE(vp8_block_zbin_extra,                    offsetof(BLOCK, zbin_extra));
    1.32 +DEFINE(vp8_block_zrun_zbin_boost,               offsetof(BLOCK, zrun_zbin_boost));
    1.33 +DEFINE(vp8_block_quant_shift,                   offsetof(BLOCK, quant_shift));
    1.34 +
    1.35 +DEFINE(vp8_blockd_qcoeff,                       offsetof(BLOCKD, qcoeff));
    1.36 +DEFINE(vp8_blockd_dequant,                      offsetof(BLOCKD, dequant));
    1.37 +DEFINE(vp8_blockd_dqcoeff,                      offsetof(BLOCKD, dqcoeff));
    1.38 +DEFINE(vp8_blockd_eob,                          offsetof(BLOCKD, eob));
    1.39 +
    1.40 +/* subtract */
    1.41 +DEFINE(vp8_block_base_src,                      offsetof(BLOCK, base_src));
    1.42 +DEFINE(vp8_block_src,                           offsetof(BLOCK, src));
    1.43 +DEFINE(vp8_block_src_diff,                      offsetof(BLOCK, src_diff));
    1.44 +DEFINE(vp8_block_src_stride,                    offsetof(BLOCK, src_stride));
    1.45 +
    1.46 +DEFINE(vp8_blockd_predictor,                    offsetof(BLOCKD, predictor));
    1.47 +
    1.48 +/* pack tokens */
    1.49 +DEFINE(vp8_writer_lowvalue,                     offsetof(vp8_writer, lowvalue));
    1.50 +DEFINE(vp8_writer_range,                        offsetof(vp8_writer, range));
    1.51 +DEFINE(vp8_writer_count,                        offsetof(vp8_writer, count));
    1.52 +DEFINE(vp8_writer_pos,                          offsetof(vp8_writer, pos));
    1.53 +DEFINE(vp8_writer_buffer,                       offsetof(vp8_writer, buffer));
    1.54 +DEFINE(vp8_writer_buffer_end,                   offsetof(vp8_writer, buffer_end));
    1.55 +DEFINE(vp8_writer_error,                        offsetof(vp8_writer, error));
    1.56 +
    1.57 +DEFINE(tokenextra_token,                        offsetof(TOKENEXTRA, Token));
    1.58 +DEFINE(tokenextra_extra,                        offsetof(TOKENEXTRA, Extra));
    1.59 +DEFINE(tokenextra_context_tree,                 offsetof(TOKENEXTRA, context_tree));
    1.60 +DEFINE(tokenextra_skip_eob_node,                offsetof(TOKENEXTRA, skip_eob_node));
    1.61 +DEFINE(TOKENEXTRA_SZ,                           sizeof(TOKENEXTRA));
    1.62 +
    1.63 +DEFINE(vp8_extra_bit_struct_sz,                 sizeof(vp8_extra_bit_struct));
    1.64 +
    1.65 +DEFINE(vp8_token_value,                         offsetof(vp8_token, value));
    1.66 +DEFINE(vp8_token_len,                           offsetof(vp8_token, Len));
    1.67 +
    1.68 +DEFINE(vp8_extra_bit_struct_tree,               offsetof(vp8_extra_bit_struct, tree));
    1.69 +DEFINE(vp8_extra_bit_struct_prob,               offsetof(vp8_extra_bit_struct, prob));
    1.70 +DEFINE(vp8_extra_bit_struct_len,                offsetof(vp8_extra_bit_struct, Len));
    1.71 +DEFINE(vp8_extra_bit_struct_base_val,           offsetof(vp8_extra_bit_struct, base_val));
    1.72 +
    1.73 +DEFINE(vp8_comp_tplist,                         offsetof(VP8_COMP, tplist));
    1.74 +DEFINE(vp8_comp_common,                         offsetof(VP8_COMP, common));
    1.75 +DEFINE(vp8_comp_bc ,                            offsetof(VP8_COMP, bc));
    1.76 +DEFINE(vp8_writer_sz ,                          sizeof(vp8_writer));
    1.77 +
    1.78 +DEFINE(tokenlist_start,                         offsetof(TOKENLIST, start));
    1.79 +DEFINE(tokenlist_stop,                          offsetof(TOKENLIST, stop));
    1.80 +DEFINE(TOKENLIST_SZ,                            sizeof(TOKENLIST));
    1.81 +
    1.82 +DEFINE(vp8_common_mb_rows,                      offsetof(VP8_COMMON, mb_rows));
    1.83 +
    1.84 +END
    1.85 +
    1.86 +/* add asserts for any offset that is not supported by assembly code
    1.87 + * add asserts for any size that is not supported by assembly code
    1.88 +
    1.89 + * These are used in vp8cx_pack_tokens.  They are hard coded so if their sizes
    1.90 + * change they will have to be adjusted.
    1.91 + */
    1.92 +
    1.93 +#if HAVE_EDSP
    1.94 +ct_assert(TOKENEXTRA_SZ, sizeof(TOKENEXTRA) == 8)
    1.95 +ct_assert(vp8_extra_bit_struct_sz, sizeof(vp8_extra_bit_struct) == 16)
    1.96 +#endif

mercurial