media/libvpx/vp9/common/vp9_enums.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.

     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  */
    11 #ifndef VP9_COMMON_VP9_ENUMS_H_
    12 #define VP9_COMMON_VP9_ENUMS_H_
    14 #include "./vpx_config.h"
    16 #define MI_SIZE_LOG2 3
    17 #define MI_BLOCK_SIZE_LOG2 (6 - MI_SIZE_LOG2)  // 64 = 2^6
    19 #define MI_SIZE (1 << MI_SIZE_LOG2)  // pixels per mi-unit
    20 #define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE_LOG2)  // mi-units per max block
    22 #define MI_MASK (MI_BLOCK_SIZE - 1)
    25 typedef enum BLOCK_SIZE {
    26   BLOCK_4X4,
    27   BLOCK_4X8,
    28   BLOCK_8X4,
    29   BLOCK_8X8,
    30   BLOCK_8X16,
    31   BLOCK_16X8,
    32   BLOCK_16X16,
    33   BLOCK_16X32,
    34   BLOCK_32X16,
    35   BLOCK_32X32,
    36   BLOCK_32X64,
    37   BLOCK_64X32,
    38   BLOCK_64X64,
    39   BLOCK_SIZES,
    40   BLOCK_INVALID = BLOCK_SIZES
    41 } BLOCK_SIZE;
    43 typedef enum PARTITION_TYPE {
    44   PARTITION_NONE,
    45   PARTITION_HORZ,
    46   PARTITION_VERT,
    47   PARTITION_SPLIT,
    48   PARTITION_TYPES,
    49   PARTITION_INVALID = PARTITION_TYPES
    50 } PARTITION_TYPE;
    52 #define PARTITION_PLOFFSET   4  // number of probability models per block size
    53 #define PARTITION_CONTEXTS (4 * PARTITION_PLOFFSET)
    55 typedef enum {
    56   TX_4X4 = 0,                      // 4x4 dct transform
    57   TX_8X8 = 1,                      // 8x8 dct transform
    58   TX_16X16 = 2,                    // 16x16 dct transform
    59   TX_32X32 = 3,                    // 32x32 dct transform
    60   TX_SIZES
    61 } TX_SIZE;
    63 typedef enum {
    64   ONLY_4X4            = 0,
    65   ALLOW_8X8           = 1,
    66   ALLOW_16X16         = 2,
    67   ALLOW_32X32         = 3,
    68   TX_MODE_SELECT      = 4,
    69   TX_MODES            = 5,
    70 } TX_MODE;
    72 typedef enum {
    73   DCT_DCT   = 0,                      // DCT  in both horizontal and vertical
    74   ADST_DCT  = 1,                      // ADST in vertical, DCT in horizontal
    75   DCT_ADST  = 2,                      // DCT  in vertical, ADST in horizontal
    76   ADST_ADST = 3                       // ADST in both directions
    77 } TX_TYPE;
    79 typedef enum {
    80   UNKNOWN    = 0,
    81   BT_601     = 1,  // YUV
    82   BT_709     = 2,  // YUV
    83   SMPTE_170  = 3,  // YUV
    84   SMPTE_240  = 4,  // YUV
    85   RESERVED_1 = 5,
    86   RESERVED_2 = 6,
    87   SRGB       = 7   // RGB
    88 } COLOR_SPACE;
    90 #endif  // VP9_COMMON_VP9_ENUMS_H_

mercurial