media/libvpx/unified.patch

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 diff --git a/media/libvpx/vp8/common/setupintrarecon.h b/media/libvpx/vp8/common/setupintrarecon.h
michael@0 2 index e515c3a..9317a6d 100644
michael@0 3 --- a/media/libvpx/vp8/common/setupintrarecon.h
michael@0 4 +++ b/media/libvpx/vp8/common/setupintrarecon.h
michael@0 5 @@ -3,16 +3,18 @@
michael@0 6 *
michael@0 7 * Use of this source code is governed by a BSD-style license
michael@0 8 * that can be found in the LICENSE file in the root of the source
michael@0 9 * tree. An additional intellectual property rights grant can be found
michael@0 10 * in the file PATENTS. All contributing project authors may
michael@0 11 * be found in the AUTHORS file in the root of the source tree.
michael@0 12 */
michael@0 13
michael@0 14 +#ifndef SETUPINTRARECON_H
michael@0 15 +#define SETUPINTRARECON_H
michael@0 16
michael@0 17 #include "vpx_scale/yv12config.h"
michael@0 18 extern void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf);
michael@0 19 extern void vp8_setup_intra_recon_top_line(YV12_BUFFER_CONFIG *ybf);
michael@0 20
michael@0 21 static
michael@0 22 void setup_intra_recon_left(unsigned char *y_buffer,
michael@0 23 unsigned char *u_buffer,
michael@0 24 @@ -26,8 +28,10 @@ void setup_intra_recon_left(unsigned char *y_buffer,
michael@0 25 y_buffer[y_stride *i] = (unsigned char) 129;
michael@0 26
michael@0 27 for (i = 0; i < 8; i++)
michael@0 28 u_buffer[uv_stride *i] = (unsigned char) 129;
michael@0 29
michael@0 30 for (i = 0; i < 8; i++)
michael@0 31 v_buffer[uv_stride *i] = (unsigned char) 129;
michael@0 32 }
michael@0 33 +
michael@0 34 +#endif
michael@0 35 diff --git a/media/libvpx/vpx_ports/vpx_once.h b/media/libvpx/vpx_ports/vpx_once.h
michael@0 36 index 16a735c..0387a71 100644
michael@0 37 --- a/media/libvpx/vpx_ports/vpx_once.h
michael@0 38 +++ b/media/libvpx/vpx_ports/vpx_once.h
michael@0 39 @@ -2,16 +2,19 @@
michael@0 40 * Copyright (c) 2011 The WebM project authors. All Rights Reserved.
michael@0 41 *
michael@0 42 * Use of this source code is governed by a BSD-style license
michael@0 43 * that can be found in the LICENSE file in the root of the source
michael@0 44 * tree. An additional intellectual property rights grant can be found
michael@0 45 * in the file PATENTS. All contributing project authors may
michael@0 46 * be found in the AUTHORS file in the root of the source tree.
michael@0 47 */
michael@0 48 +#ifndef VPX_ONCE_H
michael@0 49 +#define VPX_ONCE_H
michael@0 50 +
michael@0 51 #include "vpx_config.h"
michael@0 52
michael@0 53 #if CONFIG_MULTITHREAD && defined(_WIN32)
michael@0 54 #include <windows.h>
michael@0 55 #include <stdlib.h>
michael@0 56 static void once(void (*func)(void))
michael@0 57 {
michael@0 58 static CRITICAL_SECTION *lock;
michael@0 59 @@ -90,8 +93,10 @@ static void once(void (*func)(void))
michael@0 60
michael@0 61 if(!done)
michael@0 62 {
michael@0 63 func();
michael@0 64 done = 1;
michael@0 65 }
michael@0 66 }
michael@0 67 #endif
michael@0 68 +
michael@0 69 +#endif
michael@0 70 diff --git a/media/libvpx/vp8/common/loopfilter.c b/media/libvpx/vp8/common/loopfilter.c
michael@0 71 index 19857a7..3c0fa63 100644
michael@0 72 --- a/media/libvpx/vp8/common/loopfilter.c
michael@0 73 +++ b/media/libvpx/vp8/common/loopfilter.c
michael@0 74 @@ -15,8 +15,6 @@
michael@0 75 #include "onyxc_int.h"
michael@0 76 #include "vpx_mem/vpx_mem.h"
michael@0 77
michael@0 78 -typedef unsigned char uc;
michael@0 79 -
michael@0 80 static void lf_init_lut(loop_filter_info_n *lfi)
michael@0 81 {
michael@0 82 int filt_lvl;

mercurial