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 | #include "vpx_config.h" |
michael@0 | 12 | #include "vp8_rtcd.h" |
michael@0 | 13 | |
michael@0 | 14 | void vp8_idct_dequant_0_2x_sse2 |
michael@0 | 15 | (short *q, short *dq , |
michael@0 | 16 | unsigned char *dst, int dst_stride); |
michael@0 | 17 | void vp8_idct_dequant_full_2x_sse2 |
michael@0 | 18 | (short *q, short *dq , |
michael@0 | 19 | unsigned char *dst, int dst_stride); |
michael@0 | 20 | |
michael@0 | 21 | void vp8_dequant_idct_add_y_block_sse2 |
michael@0 | 22 | (short *q, short *dq, |
michael@0 | 23 | unsigned char *dst, int stride, char *eobs) |
michael@0 | 24 | { |
michael@0 | 25 | int i; |
michael@0 | 26 | |
michael@0 | 27 | for (i = 0; i < 4; i++) |
michael@0 | 28 | { |
michael@0 | 29 | if (((short *)(eobs))[0]) |
michael@0 | 30 | { |
michael@0 | 31 | if (((short *)(eobs))[0] & 0xfefe) |
michael@0 | 32 | vp8_idct_dequant_full_2x_sse2 (q, dq, dst, stride); |
michael@0 | 33 | else |
michael@0 | 34 | vp8_idct_dequant_0_2x_sse2 (q, dq, dst, stride); |
michael@0 | 35 | } |
michael@0 | 36 | if (((short *)(eobs))[1]) |
michael@0 | 37 | { |
michael@0 | 38 | if (((short *)(eobs))[1] & 0xfefe) |
michael@0 | 39 | vp8_idct_dequant_full_2x_sse2 (q+32, dq, dst+8, stride); |
michael@0 | 40 | else |
michael@0 | 41 | vp8_idct_dequant_0_2x_sse2 (q+32, dq, dst+8, stride); |
michael@0 | 42 | } |
michael@0 | 43 | q += 64; |
michael@0 | 44 | dst += stride*4; |
michael@0 | 45 | eobs += 4; |
michael@0 | 46 | } |
michael@0 | 47 | } |
michael@0 | 48 | |
michael@0 | 49 | void vp8_dequant_idct_add_uv_block_sse2 |
michael@0 | 50 | (short *q, short *dq, |
michael@0 | 51 | unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) |
michael@0 | 52 | { |
michael@0 | 53 | if (((short *)(eobs))[0]) |
michael@0 | 54 | { |
michael@0 | 55 | if (((short *)(eobs))[0] & 0xfefe) |
michael@0 | 56 | vp8_idct_dequant_full_2x_sse2 (q, dq, dstu, stride); |
michael@0 | 57 | else |
michael@0 | 58 | vp8_idct_dequant_0_2x_sse2 (q, dq, dstu, stride); |
michael@0 | 59 | } |
michael@0 | 60 | q += 32; |
michael@0 | 61 | dstu += stride*4; |
michael@0 | 62 | |
michael@0 | 63 | if (((short *)(eobs))[1]) |
michael@0 | 64 | { |
michael@0 | 65 | if (((short *)(eobs))[1] & 0xfefe) |
michael@0 | 66 | vp8_idct_dequant_full_2x_sse2 (q, dq, dstu, stride); |
michael@0 | 67 | else |
michael@0 | 68 | vp8_idct_dequant_0_2x_sse2 (q, dq, dstu, stride); |
michael@0 | 69 | } |
michael@0 | 70 | q += 32; |
michael@0 | 71 | |
michael@0 | 72 | if (((short *)(eobs))[2]) |
michael@0 | 73 | { |
michael@0 | 74 | if (((short *)(eobs))[2] & 0xfefe) |
michael@0 | 75 | vp8_idct_dequant_full_2x_sse2 (q, dq, dstv, stride); |
michael@0 | 76 | else |
michael@0 | 77 | vp8_idct_dequant_0_2x_sse2 (q, dq, dstv, stride); |
michael@0 | 78 | } |
michael@0 | 79 | q += 32; |
michael@0 | 80 | dstv += stride*4; |
michael@0 | 81 | |
michael@0 | 82 | if (((short *)(eobs))[3]) |
michael@0 | 83 | { |
michael@0 | 84 | if (((short *)(eobs))[3] & 0xfefe) |
michael@0 | 85 | vp8_idct_dequant_full_2x_sse2 (q, dq, dstv, stride); |
michael@0 | 86 | else |
michael@0 | 87 | vp8_idct_dequant_0_2x_sse2 (q, dq, dstv, stride); |
michael@0 | 88 | } |
michael@0 | 89 | } |