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