media/libvpx/vp9/encoder/vp9_rdopt.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.

michael@0 1 /*
michael@0 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license
michael@0 5 * that can be found in the LICENSE file in the root of the source
michael@0 6 * tree. An additional intellectual property rights grant can be found
michael@0 7 * in the file PATENTS. All contributing project authors may
michael@0 8 * be found in the AUTHORS file in the root of the source tree.
michael@0 9 */
michael@0 10
michael@0 11
michael@0 12 #ifndef VP9_ENCODER_VP9_RDOPT_H_
michael@0 13 #define VP9_ENCODER_VP9_RDOPT_H_
michael@0 14
michael@0 15 #define RDDIV_BITS 7
michael@0 16
michael@0 17 #define RDCOST(RM, DM, R, D) \
michael@0 18 (((128 + ((int64_t)R) * (RM)) >> 8) + (D << DM))
michael@0 19 #define QIDX_SKIP_THRESH 115
michael@0 20
michael@0 21 struct TileInfo;
michael@0 22
michael@0 23 int vp9_compute_rd_mult(VP9_COMP *cpi, int qindex);
michael@0 24
michael@0 25 void vp9_initialize_rd_consts(VP9_COMP *cpi);
michael@0 26
michael@0 27 void vp9_initialize_me_consts(VP9_COMP *cpi, int qindex);
michael@0 28
michael@0 29 void vp9_rd_pick_intra_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
michael@0 30 int *r, int64_t *d, BLOCK_SIZE bsize,
michael@0 31 PICK_MODE_CONTEXT *ctx, int64_t best_rd);
michael@0 32
michael@0 33 int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
michael@0 34 const struct TileInfo *const tile,
michael@0 35 int mi_row, int mi_col,
michael@0 36 int *returnrate,
michael@0 37 int64_t *returndistortion,
michael@0 38 BLOCK_SIZE bsize,
michael@0 39 PICK_MODE_CONTEXT *ctx,
michael@0 40 int64_t best_rd_so_far);
michael@0 41
michael@0 42 int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
michael@0 43 const struct TileInfo *const tile,
michael@0 44 int mi_row, int mi_col,
michael@0 45 int *returnrate,
michael@0 46 int64_t *returndistortion,
michael@0 47 BLOCK_SIZE bsize,
michael@0 48 PICK_MODE_CONTEXT *ctx,
michael@0 49 int64_t best_rd_so_far);
michael@0 50
michael@0 51 void vp9_init_me_luts();
michael@0 52
michael@0 53 void vp9_set_mbmode_and_mvs(MACROBLOCK *x,
michael@0 54 MB_PREDICTION_MODE mb, int_mv *mv);
michael@0 55
michael@0 56 void vp9_get_entropy_contexts(TX_SIZE tx_size,
michael@0 57 ENTROPY_CONTEXT t_above[16], ENTROPY_CONTEXT t_left[16],
michael@0 58 const ENTROPY_CONTEXT *above, const ENTROPY_CONTEXT *left,
michael@0 59 int num_4x4_w, int num_4x4_h);
michael@0 60
michael@0 61 #endif // VP9_ENCODER_VP9_RDOPT_H_

mercurial