| 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 |
| 11 #ifndef VP9_ENCODER_VP9_QUANTIZE_H_ | 11 #ifndef VP9_ENCODER_VP9_QUANTIZE_H_ |
| 12 #define VP9_ENCODER_VP9_QUANTIZE_H_ | 12 #define VP9_ENCODER_VP9_QUANTIZE_H_ |
| 13 | 13 |
| 14 #include "vp9/encoder/vp9_block.h" | 14 #include "vp9/encoder/vp9_block.h" |
| 15 | 15 |
| 16 #ifdef __cplusplus | 16 #ifdef __cplusplus |
| 17 extern "C" { | 17 extern "C" { |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 typedef struct { |
| 21 DECLARE_ALIGNED(16, int16_t, y_quant[QINDEX_RANGE][8]); |
| 22 DECLARE_ALIGNED(16, int16_t, y_quant_shift[QINDEX_RANGE][8]); |
| 23 DECLARE_ALIGNED(16, int16_t, y_zbin[QINDEX_RANGE][8]); |
| 24 DECLARE_ALIGNED(16, int16_t, y_round[QINDEX_RANGE][8]); |
| 25 |
| 26 DECLARE_ALIGNED(16, int16_t, uv_quant[QINDEX_RANGE][8]); |
| 27 DECLARE_ALIGNED(16, int16_t, uv_quant_shift[QINDEX_RANGE][8]); |
| 28 DECLARE_ALIGNED(16, int16_t, uv_zbin[QINDEX_RANGE][8]); |
| 29 DECLARE_ALIGNED(16, int16_t, uv_round[QINDEX_RANGE][8]); |
| 30 |
| 31 #if CONFIG_ALPHA |
| 32 DECLARE_ALIGNED(16, int16_t, a_quant[QINDEX_RANGE][8]); |
| 33 DECLARE_ALIGNED(16, int16_t, a_quant_shift[QINDEX_RANGE][8]); |
| 34 DECLARE_ALIGNED(16, int16_t, a_zbin[QINDEX_RANGE][8]); |
| 35 DECLARE_ALIGNED(16, int16_t, a_round[QINDEX_RANGE][8]); |
| 36 #endif |
| 37 } QUANTS; |
| 38 |
| 20 void vp9_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, | 39 void vp9_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, |
| 21 const int16_t *scan, const int16_t *iscan); | 40 const int16_t *scan, const int16_t *iscan); |
| 22 | 41 |
| 23 struct VP9_COMP; | 42 struct VP9_COMP; |
| 24 | 43 struct VP9Common; |
| 25 void vp9_set_quantizer(struct VP9_COMP *cpi, int q); | |
| 26 | 44 |
| 27 void vp9_frame_init_quantizer(struct VP9_COMP *cpi); | 45 void vp9_frame_init_quantizer(struct VP9_COMP *cpi); |
| 28 | 46 |
| 29 void vp9_update_zbin_extra(struct VP9_COMP *cpi, MACROBLOCK *x); | 47 void vp9_update_zbin_extra(struct VP9_COMP *cpi, MACROBLOCK *x); |
| 30 | 48 |
| 31 void vp9_init_plane_quantizers(struct VP9_COMP *cpi, MACROBLOCK *x); | 49 void vp9_init_plane_quantizers(struct VP9_COMP *cpi, MACROBLOCK *x); |
| 32 | 50 |
| 33 void vp9_init_quantizer(struct VP9_COMP *cpi); | 51 void vp9_init_quantizer(struct VP9_COMP *cpi); |
| 34 | 52 |
| 53 void vp9_set_quantizer(struct VP9Common *cm, int q); |
| 54 |
| 55 int vp9_quantizer_to_qindex(int quantizer); |
| 56 |
| 57 int vp9_qindex_to_quantizer(int qindex); |
| 58 |
| 35 #ifdef __cplusplus | 59 #ifdef __cplusplus |
| 36 } // extern "C" | 60 } // extern "C" |
| 37 #endif | 61 #endif |
| 38 | 62 |
| 39 #endif // VP9_ENCODER_VP9_QUANTIZE_H_ | 63 #endif // VP9_ENCODER_VP9_QUANTIZE_H_ |
| OLD | NEW |