| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 const int16_t *quant_ptr, const int16_t *quant_shift_ptr, | 25 const int16_t *quant_ptr, const int16_t *quant_shift_ptr, |
| 26 int16_t *qcoeff_ptr, int16_t *dqcoeff_ptr, | 26 int16_t *qcoeff_ptr, int16_t *dqcoeff_ptr, |
| 27 const int16_t *dequant_ptr, | 27 const int16_t *dequant_ptr, |
| 28 int zbin_oq_value, uint16_t *eob_ptr, | 28 int zbin_oq_value, uint16_t *eob_ptr, |
| 29 const int16_t *scan, const int16_t *iscan) { | 29 const int16_t *scan, const int16_t *iscan) { |
| 30 int i, non_zero_count = (int)count, eob = -1; | 30 int i, non_zero_count = (int)count, eob = -1; |
| 31 const int zbins[2] = { zbin_ptr[0] + zbin_oq_value, | 31 const int zbins[2] = { zbin_ptr[0] + zbin_oq_value, |
| 32 zbin_ptr[1] + zbin_oq_value }; | 32 zbin_ptr[1] + zbin_oq_value }; |
| 33 const int nzbins[2] = { zbins[0] * -1, | 33 const int nzbins[2] = { zbins[0] * -1, |
| 34 zbins[1] * -1 }; | 34 zbins[1] * -1 }; |
| 35 (void)iscan; |
| 35 | 36 |
| 36 vpx_memset(qcoeff_ptr, 0, count * sizeof(int16_t)); | 37 vpx_memset(qcoeff_ptr, 0, count * sizeof(int16_t)); |
| 37 vpx_memset(dqcoeff_ptr, 0, count * sizeof(int16_t)); | 38 vpx_memset(dqcoeff_ptr, 0, count * sizeof(int16_t)); |
| 38 | 39 |
| 39 if (!skip_block) { | 40 if (!skip_block) { |
| 40 // Pre-scan pass | 41 // Pre-scan pass |
| 41 for (i = (int)count - 1; i >= 0; i--) { | 42 for (i = (int)count - 1; i >= 0; i--) { |
| 42 const int rc = scan[i]; | 43 const int rc = scan[i]; |
| 43 const int coeff = coeff_ptr[rc]; | 44 const int coeff = coeff_ptr[rc]; |
| 44 | 45 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 const int16_t *dequant_ptr, | 81 const int16_t *dequant_ptr, |
| 81 int zbin_oq_value, uint16_t *eob_ptr, | 82 int zbin_oq_value, uint16_t *eob_ptr, |
| 82 const int16_t *scan, const int16_t *iscan) { | 83 const int16_t *scan, const int16_t *iscan) { |
| 83 const int zbins[2] = { ROUND_POWER_OF_TWO(zbin_ptr[0] + zbin_oq_value, 1), | 84 const int zbins[2] = { ROUND_POWER_OF_TWO(zbin_ptr[0] + zbin_oq_value, 1), |
| 84 ROUND_POWER_OF_TWO(zbin_ptr[1] + zbin_oq_value, 1) }; | 85 ROUND_POWER_OF_TWO(zbin_ptr[1] + zbin_oq_value, 1) }; |
| 85 const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1}; | 86 const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1}; |
| 86 | 87 |
| 87 int idx = 0; | 88 int idx = 0; |
| 88 int idx_arr[1024]; | 89 int idx_arr[1024]; |
| 89 int i, eob = -1; | 90 int i, eob = -1; |
| 91 (void)iscan; |
| 90 | 92 |
| 91 vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(int16_t)); | 93 vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(int16_t)); |
| 92 vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(int16_t)); | 94 vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(int16_t)); |
| 93 | 95 |
| 94 if (!skip_block) { | 96 if (!skip_block) { |
| 95 // Pre-scan pass | 97 // Pre-scan pass |
| 96 for (i = 0; i < n_coeffs; i++) { | 98 for (i = 0; i < n_coeffs; i++) { |
| 97 const int rc = scan[i]; | 99 const int rc = scan[i]; |
| 98 const int coeff = coeff_ptr[rc]; | 100 const int coeff = coeff_ptr[rc]; |
| 99 | 101 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 306 |
| 305 int vp9_qindex_to_quantizer(int qindex) { | 307 int vp9_qindex_to_quantizer(int qindex) { |
| 306 int quantizer; | 308 int quantizer; |
| 307 | 309 |
| 308 for (quantizer = 0; quantizer < 64; ++quantizer) | 310 for (quantizer = 0; quantizer < 64; ++quantizer) |
| 309 if (quantizer_to_qindex[quantizer] >= qindex) | 311 if (quantizer_to_qindex[quantizer] >= qindex) |
| 310 return quantizer; | 312 return quantizer; |
| 311 | 313 |
| 312 return 63; | 314 return 63; |
| 313 } | 315 } |
| OLD | NEW |