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_BLOCK_H_ | 11 #ifndef VP9_ENCODER_VP9_BLOCK_H_ |
12 #define VP9_ENCODER_VP9_BLOCK_H_ | 12 #define VP9_ENCODER_VP9_BLOCK_H_ |
13 | 13 |
14 #include "vp9/common/vp9_entropymv.h" | 14 #include "vp9/common/vp9_entropymv.h" |
15 #include "vp9/common/vp9_entropy.h" | 15 #include "vp9/common/vp9_entropy.h" |
16 #include "vpx_ports/mem.h" | 16 #include "vpx_ports/mem.h" |
17 #include "vp9/common/vp9_onyxc_int.h" | 17 #include "vp9/common/vp9_onyxc_int.h" |
18 | 18 |
19 #ifdef __cplusplus | 19 #ifdef __cplusplus |
20 extern "C" { | 20 extern "C" { |
21 #endif | 21 #endif |
22 | 22 |
| 23 typedef struct { |
| 24 unsigned int sse; |
| 25 int sum; |
| 26 unsigned int var; |
| 27 } diff; |
| 28 |
23 struct macroblock_plane { | 29 struct macroblock_plane { |
24 DECLARE_ALIGNED(16, int16_t, src_diff[64 * 64]); | 30 DECLARE_ALIGNED(16, int16_t, src_diff[64 * 64]); |
25 int16_t *qcoeff; | 31 int16_t *qcoeff; |
26 int16_t *coeff; | 32 int16_t *coeff; |
27 uint16_t *eobs; | 33 uint16_t *eobs; |
28 struct buf_2d src; | 34 struct buf_2d src; |
29 | 35 |
30 // Quantizer setings | 36 // Quantizer setings |
31 int16_t *quant_fp; | 37 int16_t *quant_fp; |
| 38 int16_t *round_fp; |
32 int16_t *quant; | 39 int16_t *quant; |
33 int16_t *quant_shift; | 40 int16_t *quant_shift; |
34 int16_t *zbin; | 41 int16_t *zbin; |
35 int16_t *round; | 42 int16_t *round; |
36 | 43 |
37 // Zbin Over Quant value | 44 // Zbin Over Quant value |
38 int16_t zbin_extra; | 45 int16_t zbin_extra; |
39 }; | 46 }; |
40 | 47 |
41 /* The [2] dimension is for whether we skip the EOB node (i.e. if previous | 48 /* The [2] dimension is for whether we skip the EOB node (i.e. if previous |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 int mv_col_min; | 93 int mv_col_min; |
87 int mv_col_max; | 94 int mv_col_max; |
88 int mv_row_min; | 95 int mv_row_min; |
89 int mv_row_max; | 96 int mv_row_max; |
90 | 97 |
91 uint8_t zcoeff_blk[TX_SIZES][256]; | 98 uint8_t zcoeff_blk[TX_SIZES][256]; |
92 int skip; | 99 int skip; |
93 | 100 |
94 int encode_breakout; | 101 int encode_breakout; |
95 | 102 |
96 int in_active_map; | |
97 | |
98 // note that token_costs is the cost when eob node is skipped | 103 // note that token_costs is the cost when eob node is skipped |
99 vp9_coeff_cost token_costs[TX_SIZES]; | 104 vp9_coeff_cost token_costs[TX_SIZES]; |
100 | 105 |
101 int in_static_area; | 106 int in_static_area; |
102 | 107 |
103 int optimize; | 108 int optimize; |
104 | 109 |
105 // indicate if it is in the rd search loop or encoding process | 110 // indicate if it is in the rd search loop or encoding process |
106 int use_lp32x32fdct; | 111 int use_lp32x32fdct; |
107 int skip_encode; | 112 int skip_encode; |
108 | 113 |
| 114 // use fast quantization process |
| 115 int quant_fp; |
| 116 |
109 // skip forward transform and quantization | 117 // skip forward transform and quantization |
110 int skip_txfm; | 118 int skip_txfm; |
111 | 119 |
112 // Used to store sub partition's choices. | 120 // Used to store sub partition's choices. |
113 MV pred_mv[MAX_REF_FRAMES]; | 121 MV pred_mv[MAX_REF_FRAMES]; |
114 | 122 |
115 void (*fwd_txm4x4)(const int16_t *input, int16_t *output, int stride); | 123 void (*fwd_txm4x4)(const int16_t *input, int16_t *output, int stride); |
116 void (*itxm_add)(const int16_t *input, uint8_t *dest, int stride, int eob); | 124 void (*itxm_add)(const int16_t *input, uint8_t *dest, int stride, int eob); |
117 }; | 125 }; |
118 | 126 |
119 #ifdef __cplusplus | 127 #ifdef __cplusplus |
120 } // extern "C" | 128 } // extern "C" |
121 #endif | 129 #endif |
122 | 130 |
123 #endif // VP9_ENCODER_VP9_BLOCK_H_ | 131 #endif // VP9_ENCODER_VP9_BLOCK_H_ |
OLD | NEW |