media/libvpx/vpx_scale/yv12config.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 #ifndef YV12_CONFIG_H
michael@0 12 #define YV12_CONFIG_H
michael@0 13
michael@0 14 #ifdef __cplusplus
michael@0 15 extern "C" {
michael@0 16 #endif
michael@0 17
michael@0 18 #include "vpx/vpx_integer.h"
michael@0 19
michael@0 20 #define VP8BORDERINPIXELS 32
michael@0 21 #define VP9INNERBORDERINPIXELS 96
michael@0 22 #define VP9BORDERINPIXELS 160
michael@0 23 #define VP9_INTERP_EXTEND 4
michael@0 24
michael@0 25 typedef struct yv12_buffer_config {
michael@0 26 int y_width;
michael@0 27 int y_height;
michael@0 28 int y_crop_width;
michael@0 29 int y_crop_height;
michael@0 30 int y_stride;
michael@0 31 /* int yinternal_width; */
michael@0 32
michael@0 33 int uv_width;
michael@0 34 int uv_height;
michael@0 35 int uv_crop_width;
michael@0 36 int uv_crop_height;
michael@0 37 int uv_stride;
michael@0 38 /* int uvinternal_width; */
michael@0 39
michael@0 40 int alpha_width;
michael@0 41 int alpha_height;
michael@0 42 int alpha_stride;
michael@0 43
michael@0 44 uint8_t *y_buffer;
michael@0 45 uint8_t *u_buffer;
michael@0 46 uint8_t *v_buffer;
michael@0 47 uint8_t *alpha_buffer;
michael@0 48
michael@0 49 uint8_t *buffer_alloc;
michael@0 50 int buffer_alloc_sz;
michael@0 51 int border;
michael@0 52 int frame_size;
michael@0 53
michael@0 54 int corrupted;
michael@0 55 int flags;
michael@0 56 } YV12_BUFFER_CONFIG;
michael@0 57
michael@0 58 int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
michael@0 59 int width, int height, int border);
michael@0 60 int vp8_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
michael@0 61 int width, int height, int border);
michael@0 62 int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf);
michael@0 63
michael@0 64 int vp9_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
michael@0 65 int width, int height, int ss_x, int ss_y,
michael@0 66 int border);
michael@0 67 int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
michael@0 68 int width, int height, int ss_x, int ss_y,
michael@0 69 int border);
michael@0 70 int vp9_free_frame_buffer(YV12_BUFFER_CONFIG *ybf);
michael@0 71
michael@0 72 #ifdef __cplusplus
michael@0 73 }
michael@0 74 #endif
michael@0 75
michael@0 76 #endif // YV12_CONFIG_H

mercurial