Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: source/libvpx/vp9/common/vp9_common_data.c

Issue 668403002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/common/vp9_common.h ('k') | source/libvpx/vp9/common/vp9_convolve.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11
12 #include "vp9/common/vp9_blockd.h"
13 #include "vp9/common/vp9_common_data.h" 11 #include "vp9/common/vp9_common_data.h"
14 12
15 // Log 2 conversion lookup tables for block width and height 13 // Log 2 conversion lookup tables for block width and height
16 const int b_width_log2_lookup[BLOCK_SIZES] = 14 const int b_width_log2_lookup[BLOCK_SIZES] =
17 {0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4}; 15 {0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4};
18 const int b_height_log2_lookup[BLOCK_SIZES] = 16 const int b_height_log2_lookup[BLOCK_SIZES] =
19 {0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4}; 17 {0, 1, 0, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4};
20 const int num_4x4_blocks_wide_lookup[BLOCK_SIZES] = 18 const int num_4x4_blocks_wide_lookup[BLOCK_SIZES] =
21 {1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16}; 19 {1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16};
22 const int num_4x4_blocks_high_lookup[BLOCK_SIZES] = 20 const int num_4x4_blocks_high_lookup[BLOCK_SIZES] =
23 {1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16}; 21 {1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16};
24 // Log 2 conversion lookup tables for modeinfo width and height 22 // Log 2 conversion lookup tables for modeinfo width and height
25 const int mi_width_log2_lookup[BLOCK_SIZES] = 23 const int mi_width_log2_lookup[BLOCK_SIZES] =
26 {0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3}; 24 {0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3};
27 const int num_8x8_blocks_wide_lookup[BLOCK_SIZES] = 25 const int num_8x8_blocks_wide_lookup[BLOCK_SIZES] =
28 {1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8}; 26 {1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 8, 8};
29 const int num_8x8_blocks_high_lookup[BLOCK_SIZES] = 27 const int num_8x8_blocks_high_lookup[BLOCK_SIZES] =
30 {1, 1, 1, 1, 2, 1, 2, 4, 2, 4, 8, 4, 8}; 28 {1, 1, 1, 1, 2, 1, 2, 4, 2, 4, 8, 4, 8};
31 29
32 // MIN(3, MIN(b_width_log2(bsize), b_height_log2(bsize))) 30 // MIN(3, MIN(b_width_log2(bsize), b_height_log2(bsize)))
33 const int size_group_lookup[BLOCK_SIZES] = 31 const int size_group_lookup[BLOCK_SIZES] =
34 {0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3}; 32 {0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3};
35 33
36 const int num_pels_log2_lookup[BLOCK_SIZES] = 34 const int num_pels_log2_lookup[BLOCK_SIZES] =
37 {4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12}; 35 {4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12};
38 36
39
40 const PARTITION_TYPE partition_lookup[][BLOCK_SIZES] = { 37 const PARTITION_TYPE partition_lookup[][BLOCK_SIZES] = {
41 { // 4X4 38 { // 4X4
42 // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64 39 // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
43 PARTITION_NONE, PARTITION_INVALID, PARTITION_INVALID, 40 PARTITION_NONE, PARTITION_INVALID, PARTITION_INVALID,
44 PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID, 41 PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
45 PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID, 42 PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
46 PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID, 43 PARTITION_INVALID, PARTITION_INVALID, PARTITION_INVALID,
47 PARTITION_INVALID 44 PARTITION_INVALID
48 }, { // 8X8 45 }, { // 8X8
49 // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64 46 // 4X4, 4X8,8X4,8X8,8X16,16X8,16X16,16X32,32X16,32X32,32X64,64X32,64X64
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 {14, 12}, // 8X16 - {0b1110, 0b1100} 151 {14, 12}, // 8X16 - {0b1110, 0b1100}
155 {12, 14}, // 16X8 - {0b1100, 0b1110} 152 {12, 14}, // 16X8 - {0b1100, 0b1110}
156 {12, 12}, // 16X16 - {0b1100, 0b1100} 153 {12, 12}, // 16X16 - {0b1100, 0b1100}
157 {12, 8 }, // 16X32 - {0b1100, 0b1000} 154 {12, 8 }, // 16X32 - {0b1100, 0b1000}
158 {8, 12}, // 32X16 - {0b1000, 0b1100} 155 {8, 12}, // 32X16 - {0b1000, 0b1100}
159 {8, 8 }, // 32X32 - {0b1000, 0b1000} 156 {8, 8 }, // 32X32 - {0b1000, 0b1000}
160 {8, 0 }, // 32X64 - {0b1000, 0b0000} 157 {8, 0 }, // 32X64 - {0b1000, 0b0000}
161 {0, 8 }, // 64X32 - {0b0000, 0b1000} 158 {0, 8 }, // 64X32 - {0b0000, 0b1000}
162 {0, 0 }, // 64X64 - {0b0000, 0b0000} 159 {0, 0 }, // 64X64 - {0b0000, 0b0000}
163 }; 160 };
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_common.h ('k') | source/libvpx/vp9/common/vp9_convolve.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698