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

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

Issue 54923004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 1 month 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_pred_common.c ('k') | source/libvpx/vp9/common/vp9_reconinter.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 #include "vp9/common/vp9_common.h" 11 #include "vp9/common/vp9_common.h"
12 #include "vp9/common/vp9_quant_common.h" 12 #include "vp9/common/vp9_quant_common.h"
13 #include "vp9/common/vp9_seg_common.h" 13 #include "vp9/common/vp9_seg_common.h"
14 14
15 #if 1 15 #if 1
16 static const int16_t dc_qlookup[QINDEX_RANGE] = { 16 static const int16_t dc_qlookup[QINDEX_RANGE] = {
17 4, 8, 8, 9, 10, 11, 12, 12, 17 4, 8, 8, 9, 10, 11, 12, 12,
18 13, 14, 15, 16, 17, 18, 19, 19, 18 13, 14, 15, 16, 17, 18, 19, 19,
19 20, 21, 22, 23, 24, 25, 26, 26, 19 20, 21, 22, 23, 24, 25, 26, 26,
20 27, 28, 29, 30, 31, 32, 32, 33, 20 27, 28, 29, 30, 31, 32, 32, 33,
21 34, 35, 36, 37, 38, 38, 39, 40, 21 34, 35, 36, 37, 38, 38, 39, 40,
22 41, 42, 43, 43, 44, 45, 46, 47, 22 41, 42, 43, 43, 44, 45, 46, 47,
23 48, 48, 49, 50, 51, 52, 53, 53, 23 48, 48, 49, 50, 51, 52, 53, 53,
24 54, 55, 56, 57, 57, 58, 59, 60, 24 54, 55, 56, 57, 57, 58, 59, 60,
25 61, 62, 62, 63, 64, 65, 66, 66, 25 61, 62, 62, 63, 64, 65, 66, 66,
26 67, 68, 69, 70, 70, 71, 72, 73, 26 67, 68, 69, 70, 70, 71, 72, 73,
27 74, 74, 75, 76, 77, 78, 78, 79, 27 74, 74, 75, 76, 77, 78, 78, 79,
28 80, 81, 81, 82, 83, 84, 85, 85, 28 80, 81, 81, 82, 83, 84, 85, 85,
29 87, 88, 90, 92, 93, 95, 96, 98, 29 87, 88, 90, 92, 93, 95, 96, 98,
30 99, 101, 102, 104, 105, 107, 108, 110, 30 99, 101, 102, 104, 105, 107, 108, 110,
31 111, 113, 114, 116, 117, 118, 120, 121, 31 111, 113, 114, 116, 117, 118, 120, 121,
32 123, 125, 127, 129, 131, 134, 136, 138, 32 123, 125, 127, 129, 131, 134, 136, 138,
33 140, 142, 144, 146, 148, 150, 152, 154, 33 140, 142, 144, 146, 148, 150, 152, 154,
34 156, 158, 161, 164, 166, 169, 172, 174, 34 156, 158, 161, 164, 166, 169, 172, 174,
35 177, 180, 182, 185, 187, 190, 192, 195, 35 177, 180, 182, 185, 187, 190, 192, 195,
36 199, 202, 205, 208, 211, 214, 217, 220, 36 199, 202, 205, 208, 211, 214, 217, 220,
37 223, 226, 230, 233, 237, 240, 243, 247, 37 223, 226, 230, 233, 237, 240, 243, 247,
38 250, 253, 257, 261, 265, 269, 272, 276, 38 250, 253, 257, 261, 265, 269, 272, 276,
39 280, 284, 288, 292, 296, 300, 304, 309, 39 280, 284, 288, 292, 296, 300, 304, 309,
40 313, 317, 322, 326, 330, 335, 340, 344, 40 313, 317, 322, 326, 330, 335, 340, 344,
41 349, 354, 359, 364, 369, 374, 379, 384, 41 349, 354, 359, 364, 369, 374, 379, 384,
42 389, 395, 400, 406, 411, 417, 423, 429, 42 389, 395, 400, 406, 411, 417, 423, 429,
43 435, 441, 447, 454, 461, 467, 475, 482, 43 435, 441, 447, 454, 461, 467, 475, 482,
44 489, 497, 505, 513, 522, 530, 539, 549, 44 489, 497, 505, 513, 522, 530, 539, 549,
45 559, 569, 579, 590, 602, 614, 626, 640, 45 559, 569, 579, 590, 602, 614, 626, 640,
46 654, 668, 684, 700, 717, 736, 755, 775, 46 654, 668, 684, 700, 717, 736, 755, 775,
47 796, 819, 843, 869, 896, 925, 955, 988, 47 796, 819, 843, 869, 896, 925, 955, 988,
48 1022, 1058, 1098, 1139, 1184, 1232, 1282, 1336, 48 1022, 1058, 1098, 1139, 1184, 1232, 1282, 1336,
49 }; 49 };
50 50
51 static const int16_t ac_qlookup[QINDEX_RANGE] = { 51 static const int16_t ac_qlookup[QINDEX_RANGE] = {
52 4, 8, 9, 10, 11, 12, 13, 14, 52 4, 8, 9, 10, 11, 12, 13, 14,
53 15, 16, 17, 18, 19, 20, 21, 22, 53 15, 16, 17, 18, 19, 20, 21, 22,
54 23, 24, 25, 26, 27, 28, 29, 30, 54 23, 24, 25, 26, 27, 28, 29, 30,
55 31, 32, 33, 34, 35, 36, 37, 38, 55 31, 32, 33, 34, 35, 36, 37, 38,
56 39, 40, 41, 42, 43, 44, 45, 46, 56 39, 40, 41, 42, 43, 44, 45, 46,
57 47, 48, 49, 50, 51, 52, 53, 54, 57 47, 48, 49, 50, 51, 52, 53, 54,
58 55, 56, 57, 58, 59, 60, 61, 62, 58 55, 56, 57, 58, 59, 60, 61, 62,
59 63, 64, 65, 66, 67, 68, 69, 70, 59 63, 64, 65, 66, 67, 68, 69, 70,
60 71, 72, 73, 74, 75, 76, 77, 78, 60 71, 72, 73, 74, 75, 76, 77, 78,
61 79, 80, 81, 82, 83, 84, 85, 86, 61 79, 80, 81, 82, 83, 84, 85, 86,
62 87, 88, 89, 90, 91, 92, 93, 94, 62 87, 88, 89, 90, 91, 92, 93, 94,
63 95, 96, 97, 98, 99, 100, 101, 102, 63 95, 96, 97, 98, 99, 100, 101, 102,
64 104, 106, 108, 110, 112, 114, 116, 118, 64 104, 106, 108, 110, 112, 114, 116, 118,
65 120, 122, 124, 126, 128, 130, 132, 134, 65 120, 122, 124, 126, 128, 130, 132, 134,
66 136, 138, 140, 142, 144, 146, 148, 150, 66 136, 138, 140, 142, 144, 146, 148, 150,
67 152, 155, 158, 161, 164, 167, 170, 173, 67 152, 155, 158, 161, 164, 167, 170, 173,
68 176, 179, 182, 185, 188, 191, 194, 197, 68 176, 179, 182, 185, 188, 191, 194, 197,
69 200, 203, 207, 211, 215, 219, 223, 227, 69 200, 203, 207, 211, 215, 219, 223, 227,
70 231, 235, 239, 243, 247, 251, 255, 260, 70 231, 235, 239, 243, 247, 251, 255, 260,
71 265, 270, 275, 280, 285, 290, 295, 300, 71 265, 270, 275, 280, 285, 290, 295, 300,
72 305, 311, 317, 323, 329, 335, 341, 347, 72 305, 311, 317, 323, 329, 335, 341, 347,
73 353, 359, 366, 373, 380, 387, 394, 401, 73 353, 359, 366, 373, 380, 387, 394, 401,
74 408, 416, 424, 432, 440, 448, 456, 465, 74 408, 416, 424, 432, 440, 448, 456, 465,
75 474, 483, 492, 501, 510, 520, 530, 540, 75 474, 483, 492, 501, 510, 520, 530, 540,
76 550, 560, 571, 582, 593, 604, 615, 627, 76 550, 560, 571, 582, 593, 604, 615, 627,
77 639, 651, 663, 676, 689, 702, 715, 729, 77 639, 651, 663, 676, 689, 702, 715, 729,
78 743, 757, 771, 786, 801, 816, 832, 848, 78 743, 757, 771, 786, 801, 816, 832, 848,
79 864, 881, 898, 915, 933, 951, 969, 988, 79 864, 881, 898, 915, 933, 951, 969, 988,
80 1007, 1026, 1046, 1066, 1087, 1108, 1129, 1151, 80 1007, 1026, 1046, 1066, 1087, 1108, 1129, 1151,
81 1173, 1196, 1219, 1243, 1267, 1292, 1317, 1343, 81 1173, 1196, 1219, 1243, 1267, 1292, 1317, 1343,
82 1369, 1396, 1423, 1451, 1479, 1508, 1537, 1567, 82 1369, 1396, 1423, 1451, 1479, 1508, 1537, 1567,
83 1597, 1628, 1660, 1692, 1725, 1759, 1793, 1828, 83 1597, 1628, 1660, 1692, 1725, 1759, 1793, 1828,
84 }; 84 };
85 85
86 void vp9_init_quant_tables(void) { } 86 void vp9_init_quant_tables(void) { }
87 #else 87 #else
88 static int16_t dc_qlookup[QINDEX_RANGE]; 88 static int16_t dc_qlookup[QINDEX_RANGE];
89 static int16_t ac_qlookup[QINDEX_RANGE]; 89 static int16_t ac_qlookup[QINDEX_RANGE];
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 if (vp9_segfeature_active(seg, segment_id, SEG_LVL_ALT_Q)) { 134 if (vp9_segfeature_active(seg, segment_id, SEG_LVL_ALT_Q)) {
135 const int data = vp9_get_segdata(seg, segment_id, SEG_LVL_ALT_Q); 135 const int data = vp9_get_segdata(seg, segment_id, SEG_LVL_ALT_Q);
136 return seg->abs_delta == SEGMENT_ABSDATA ? 136 return seg->abs_delta == SEGMENT_ABSDATA ?
137 data : // Abs value 137 data : // Abs value
138 clamp(base_qindex + data, 0, MAXQ); // Delta value 138 clamp(base_qindex + data, 0, MAXQ); // Delta value
139 } else { 139 } else {
140 return base_qindex; 140 return base_qindex;
141 } 141 }
142 } 142 }
143 143
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_pred_common.c ('k') | source/libvpx/vp9/common/vp9_reconinter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698