media/libvpx/vp8/encoder/mcomp.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     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  */
    12 #ifndef __INC_MCOMP_H
    13 #define __INC_MCOMP_H
    15 #include "block.h"
    16 #include "vp8/common/variance.h"
    18 #ifdef VP8_ENTROPY_STATS
    19 extern void init_mv_ref_counts();
    20 extern void accum_mv_refs(MB_PREDICTION_MODE, const int near_mv_ref_cts[4]);
    21 #endif
    24 /* The maximum number of steps in a step search given the largest allowed
    25  * initial step
    26  */
    27 #define MAX_MVSEARCH_STEPS 8
    29 /* Max full pel mv specified in 1 pel units */
    30 #define MAX_FULL_PEL_VAL ((1 << (MAX_MVSEARCH_STEPS)) - 1)
    32 /* Maximum size of the first step in full pel units */
    33 #define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1))
    35 extern void print_mode_context(void);
    36 extern int vp8_mv_bit_cost(int_mv *mv, int_mv *ref, int *mvcost[2], int Weight);
    37 extern void vp8_init_dsmotion_compensation(MACROBLOCK *x, int stride);
    38 extern void vp8_init3smotion_compensation(MACROBLOCK *x,  int stride);
    41 extern int vp8_hex_search
    42 (
    43     MACROBLOCK *x,
    44     BLOCK *b,
    45     BLOCKD *d,
    46     int_mv *ref_mv,
    47     int_mv *best_mv,
    48     int search_param,
    49     int error_per_bit,
    50     const vp8_variance_fn_ptr_t *vf,
    51     int *mvsadcost[2],
    52     int *mvcost[2],
    53     int_mv *center_mv
    54 );
    56 typedef int (fractional_mv_step_fp)
    57     (MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *bestmv, int_mv *ref_mv,
    58      int error_per_bit, const vp8_variance_fn_ptr_t *vfp, int *mvcost[2],
    59      int *distortion, unsigned int *sse);
    61 extern fractional_mv_step_fp vp8_find_best_sub_pixel_step_iteratively;
    62 extern fractional_mv_step_fp vp8_find_best_sub_pixel_step;
    63 extern fractional_mv_step_fp vp8_find_best_half_pixel_step;
    64 extern fractional_mv_step_fp vp8_skip_fractional_mv_step;
    66 typedef int (*vp8_full_search_fn_t)
    67     (
    68      MACROBLOCK *x,
    69      BLOCK *b,
    70      BLOCKD *d,
    71      int_mv *ref_mv,
    72      int sad_per_bit,
    73      int distance,
    74      vp8_variance_fn_ptr_t *fn_ptr,
    75      int *mvcost[2],
    76      int_mv *center_mv
    77     );
    79 typedef int (*vp8_refining_search_fn_t)
    80     (
    81      MACROBLOCK *x,
    82      BLOCK *b,
    83      BLOCKD *d,
    84      int_mv *ref_mv,
    85      int sad_per_bit,
    86      int distance,
    87      vp8_variance_fn_ptr_t *fn_ptr,
    88      int *mvcost[2],
    89      int_mv *center_mv
    90     );
    92 typedef int (*vp8_diamond_search_fn_t)
    93     (
    94      MACROBLOCK *x,
    95      BLOCK *b,
    96      BLOCKD *d,
    97      int_mv *ref_mv,
    98      int_mv *best_mv,
    99      int search_param,
   100      int sad_per_bit,
   101      int *num00,
   102      vp8_variance_fn_ptr_t *fn_ptr,
   103      int *mvcost[2],
   104      int_mv *center_mv
   105     );
   107 #endif

mercurial