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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_quantize.c

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_psnrhvs.c ('k') | source/libvpx/vp9/encoder/vp9_ratectrl.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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 #endif 192 #endif
193 193
194 void vp9_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, 194 void vp9_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block,
195 const int16_t *scan, const int16_t *iscan) { 195 const int16_t *scan, const int16_t *iscan) {
196 MACROBLOCKD *const xd = &x->e_mbd; 196 MACROBLOCKD *const xd = &x->e_mbd;
197 struct macroblock_plane *p = &x->plane[plane]; 197 struct macroblock_plane *p = &x->plane[plane];
198 struct macroblockd_plane *pd = &xd->plane[plane]; 198 struct macroblockd_plane *pd = &xd->plane[plane];
199 199
200 #if CONFIG_VP9_HIGHBITDEPTH 200 #if CONFIG_VP9_HIGHBITDEPTH
201 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { 201 if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
202 vp9_highbd_quantize_b(BLOCK_OFFSET(p->coeff, block), 202 vpx_highbd_quantize_b(BLOCK_OFFSET(p->coeff, block),
203 16, x->skip_block, 203 16, x->skip_block,
204 p->zbin, p->round, p->quant, p->quant_shift, 204 p->zbin, p->round, p->quant, p->quant_shift,
205 BLOCK_OFFSET(p->qcoeff, block), 205 BLOCK_OFFSET(p->qcoeff, block),
206 BLOCK_OFFSET(pd->dqcoeff, block), 206 BLOCK_OFFSET(pd->dqcoeff, block),
207 pd->dequant, &p->eobs[block], 207 pd->dequant, &p->eobs[block],
208 scan, iscan); 208 scan, iscan);
209 return; 209 return;
210 } 210 }
211 #endif 211 #endif
212 vp9_quantize_b(BLOCK_OFFSET(p->coeff, block), 212 vpx_quantize_b(BLOCK_OFFSET(p->coeff, block),
213 16, x->skip_block, 213 16, x->skip_block,
214 p->zbin, p->round, p->quant, p->quant_shift, 214 p->zbin, p->round, p->quant, p->quant_shift,
215 BLOCK_OFFSET(p->qcoeff, block), 215 BLOCK_OFFSET(p->qcoeff, block),
216 BLOCK_OFFSET(pd->dqcoeff, block), 216 BLOCK_OFFSET(pd->dqcoeff, block),
217 pd->dequant, &p->eobs[block], scan, iscan); 217 pd->dequant, &p->eobs[block], scan, iscan);
218 } 218 }
219 219
220 static void invert_quant(int16_t *quant, int16_t *shift, int d) { 220 static void invert_quant(int16_t *quant, int16_t *shift, int d) {
221 unsigned t; 221 unsigned t;
222 int l; 222 int l;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 int vp9_qindex_to_quantizer(int qindex) { 381 int vp9_qindex_to_quantizer(int qindex) {
382 int quantizer; 382 int quantizer;
383 383
384 for (quantizer = 0; quantizer < 64; ++quantizer) 384 for (quantizer = 0; quantizer < 64; ++quantizer)
385 if (quantizer_to_qindex[quantizer] >= qindex) 385 if (quantizer_to_qindex[quantizer] >= qindex)
386 return quantizer; 386 return quantizer;
387 387
388 return 63; 388 return 63;
389 } 389 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_psnrhvs.c ('k') | source/libvpx/vp9/encoder/vp9_ratectrl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698