media/libvpx/vp8/encoder/vp8_asm_enc_offsets.c

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /*
     2  *  Copyright (c) 2011 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  */
    12 #include "vpx_ports/asm_offsets.h"
    13 #include "vpx_config.h"
    14 #include "block.h"
    15 #include "vp8/common/blockd.h"
    16 #include "onyx_int.h"
    17 #include "treewriter.h"
    18 #include "tokenize.h"
    20 BEGIN
    22 /* regular quantize */
    23 DEFINE(vp8_block_coeff,                         offsetof(BLOCK, coeff));
    24 DEFINE(vp8_block_zbin,                          offsetof(BLOCK, zbin));
    25 DEFINE(vp8_block_round,                         offsetof(BLOCK, round));
    26 DEFINE(vp8_block_quant,                         offsetof(BLOCK, quant));
    27 DEFINE(vp8_block_quant_fast,                    offsetof(BLOCK, quant_fast));
    28 DEFINE(vp8_block_zbin_extra,                    offsetof(BLOCK, zbin_extra));
    29 DEFINE(vp8_block_zrun_zbin_boost,               offsetof(BLOCK, zrun_zbin_boost));
    30 DEFINE(vp8_block_quant_shift,                   offsetof(BLOCK, quant_shift));
    32 DEFINE(vp8_blockd_qcoeff,                       offsetof(BLOCKD, qcoeff));
    33 DEFINE(vp8_blockd_dequant,                      offsetof(BLOCKD, dequant));
    34 DEFINE(vp8_blockd_dqcoeff,                      offsetof(BLOCKD, dqcoeff));
    35 DEFINE(vp8_blockd_eob,                          offsetof(BLOCKD, eob));
    37 /* subtract */
    38 DEFINE(vp8_block_base_src,                      offsetof(BLOCK, base_src));
    39 DEFINE(vp8_block_src,                           offsetof(BLOCK, src));
    40 DEFINE(vp8_block_src_diff,                      offsetof(BLOCK, src_diff));
    41 DEFINE(vp8_block_src_stride,                    offsetof(BLOCK, src_stride));
    43 DEFINE(vp8_blockd_predictor,                    offsetof(BLOCKD, predictor));
    45 /* pack tokens */
    46 DEFINE(vp8_writer_lowvalue,                     offsetof(vp8_writer, lowvalue));
    47 DEFINE(vp8_writer_range,                        offsetof(vp8_writer, range));
    48 DEFINE(vp8_writer_count,                        offsetof(vp8_writer, count));
    49 DEFINE(vp8_writer_pos,                          offsetof(vp8_writer, pos));
    50 DEFINE(vp8_writer_buffer,                       offsetof(vp8_writer, buffer));
    51 DEFINE(vp8_writer_buffer_end,                   offsetof(vp8_writer, buffer_end));
    52 DEFINE(vp8_writer_error,                        offsetof(vp8_writer, error));
    54 DEFINE(tokenextra_token,                        offsetof(TOKENEXTRA, Token));
    55 DEFINE(tokenextra_extra,                        offsetof(TOKENEXTRA, Extra));
    56 DEFINE(tokenextra_context_tree,                 offsetof(TOKENEXTRA, context_tree));
    57 DEFINE(tokenextra_skip_eob_node,                offsetof(TOKENEXTRA, skip_eob_node));
    58 DEFINE(TOKENEXTRA_SZ,                           sizeof(TOKENEXTRA));
    60 DEFINE(vp8_extra_bit_struct_sz,                 sizeof(vp8_extra_bit_struct));
    62 DEFINE(vp8_token_value,                         offsetof(vp8_token, value));
    63 DEFINE(vp8_token_len,                           offsetof(vp8_token, Len));
    65 DEFINE(vp8_extra_bit_struct_tree,               offsetof(vp8_extra_bit_struct, tree));
    66 DEFINE(vp8_extra_bit_struct_prob,               offsetof(vp8_extra_bit_struct, prob));
    67 DEFINE(vp8_extra_bit_struct_len,                offsetof(vp8_extra_bit_struct, Len));
    68 DEFINE(vp8_extra_bit_struct_base_val,           offsetof(vp8_extra_bit_struct, base_val));
    70 DEFINE(vp8_comp_tplist,                         offsetof(VP8_COMP, tplist));
    71 DEFINE(vp8_comp_common,                         offsetof(VP8_COMP, common));
    72 DEFINE(vp8_comp_bc ,                            offsetof(VP8_COMP, bc));
    73 DEFINE(vp8_writer_sz ,                          sizeof(vp8_writer));
    75 DEFINE(tokenlist_start,                         offsetof(TOKENLIST, start));
    76 DEFINE(tokenlist_stop,                          offsetof(TOKENLIST, stop));
    77 DEFINE(TOKENLIST_SZ,                            sizeof(TOKENLIST));
    79 DEFINE(vp8_common_mb_rows,                      offsetof(VP8_COMMON, mb_rows));
    81 END
    83 /* add asserts for any offset that is not supported by assembly code
    84  * add asserts for any size that is not supported by assembly code
    86  * These are used in vp8cx_pack_tokens.  They are hard coded so if their sizes
    87  * change they will have to be adjusted.
    88  */
    90 #if HAVE_EDSP
    91 ct_assert(TOKENEXTRA_SZ, sizeof(TOKENEXTRA) == 8)
    92 ct_assert(vp8_extra_bit_struct_sz, sizeof(vp8_extra_bit_struct) == 16)
    93 #endif

mercurial