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

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

Issue 168343002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 10 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_quant_common.h ('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
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 int16_t vp9_dc_quant(int qindex, int delta) { 124 int16_t vp9_dc_quant(int qindex, int delta) {
125 return dc_qlookup[clamp(qindex + delta, 0, MAXQ)]; 125 return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
126 } 126 }
127 127
128 int16_t vp9_ac_quant(int qindex, int delta) { 128 int16_t vp9_ac_quant(int qindex, int delta) {
129 return ac_qlookup[clamp(qindex + delta, 0, MAXQ)]; 129 return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];
130 } 130 }
131 131
132 132
133 int vp9_get_qindex(struct segmentation *seg, int segment_id, int base_qindex) { 133 int vp9_get_qindex(const struct segmentation *seg, int segment_id,
134 int base_qindex) {
134 if (vp9_segfeature_active(seg, segment_id, SEG_LVL_ALT_Q)) { 135 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); 136 const int data = vp9_get_segdata(seg, segment_id, SEG_LVL_ALT_Q);
136 return seg->abs_delta == SEGMENT_ABSDATA ? 137 return seg->abs_delta == SEGMENT_ABSDATA ?
137 data : // Abs value 138 data : // Abs value
138 clamp(base_qindex + data, 0, MAXQ); // Delta value 139 clamp(base_qindex + data, 0, MAXQ); // Delta value
139 } else { 140 } else {
140 return base_qindex; 141 return base_qindex;
141 } 142 }
142 } 143 }
143 144
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_quant_common.h ('k') | source/libvpx/vp9/common/vp9_reconinter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698