Thu, 15 Jan 2015 15:59:08 +0100
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 VARIANCE_H
13 #define VARIANCE_H
15 #include "vpx_config.h"
17 typedef unsigned int(*vp8_sad_fn_t)(
18 const unsigned char *src_ptr,
19 int source_stride,
20 const unsigned char *ref_ptr,
21 int ref_stride,
22 unsigned int max_sad);
24 typedef void (*vp8_copy32xn_fn_t)(
25 const unsigned char *src_ptr,
26 int source_stride,
27 const unsigned char *ref_ptr,
28 int ref_stride,
29 int n);
31 typedef void (*vp8_sad_multi_fn_t)(
32 const unsigned char *src_ptr,
33 int source_stride,
34 const unsigned char *ref_ptr,
35 int ref_stride,
36 unsigned int *sad_array);
38 typedef void (*vp8_sad_multi1_fn_t)
39 (
40 const unsigned char *src_ptr,
41 int source_stride,
42 const unsigned char *ref_ptr,
43 int ref_stride,
44 unsigned short *sad_array
45 );
47 typedef void (*vp8_sad_multi_d_fn_t)
48 (
49 const unsigned char *src_ptr,
50 int source_stride,
51 const unsigned char * const ref_ptr[],
52 int ref_stride,
53 unsigned int *sad_array
54 );
56 typedef unsigned int (*vp8_variance_fn_t)
57 (
58 const unsigned char *src_ptr,
59 int source_stride,
60 const unsigned char *ref_ptr,
61 int ref_stride,
62 unsigned int *sse
63 );
65 typedef unsigned int (*vp8_subpixvariance_fn_t)
66 (
67 const unsigned char *src_ptr,
68 int source_stride,
69 int xoffset,
70 int yoffset,
71 const unsigned char *ref_ptr,
72 int Refstride,
73 unsigned int *sse
74 );
76 typedef void (*vp8_ssimpf_fn_t)
77 (
78 unsigned char *s,
79 int sp,
80 unsigned char *r,
81 int rp,
82 unsigned long *sum_s,
83 unsigned long *sum_r,
84 unsigned long *sum_sq_s,
85 unsigned long *sum_sq_r,
86 unsigned long *sum_sxr
87 );
89 typedef unsigned int (*vp8_getmbss_fn_t)(const short *);
91 typedef unsigned int (*vp8_get16x16prederror_fn_t)
92 (
93 const unsigned char *src_ptr,
94 int source_stride,
95 const unsigned char *ref_ptr,
96 int ref_stride
97 );
99 typedef struct variance_vtable
100 {
101 vp8_sad_fn_t sdf;
102 vp8_variance_fn_t vf;
103 vp8_subpixvariance_fn_t svf;
104 vp8_variance_fn_t svf_halfpix_h;
105 vp8_variance_fn_t svf_halfpix_v;
106 vp8_variance_fn_t svf_halfpix_hv;
107 vp8_sad_multi_fn_t sdx3f;
108 vp8_sad_multi1_fn_t sdx8f;
109 vp8_sad_multi_d_fn_t sdx4df;
110 #if ARCH_X86 || ARCH_X86_64
111 vp8_copy32xn_fn_t copymem;
112 #endif
113 } vp8_variance_fn_ptr_t;
115 #endif