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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 int uv_dc_delta_q; | 136 int uv_dc_delta_q; |
137 int uv_ac_delta_q; | 137 int uv_ac_delta_q; |
138 | 138 |
139 /* We allocate a MODE_INFO struct for each macroblock, together with | 139 /* We allocate a MODE_INFO struct for each macroblock, together with |
140 an extra row on top and column on the left to simplify prediction. */ | 140 an extra row on top and column on the left to simplify prediction. */ |
141 | 141 |
142 int mi_idx; | 142 int mi_idx; |
143 int prev_mi_idx; | 143 int prev_mi_idx; |
144 int mi_alloc_size; | 144 int mi_alloc_size; |
145 MODE_INFO *mip_array[2]; | 145 MODE_INFO *mip_array[2]; |
146 MODE_INFO **mi_grid_base_array[2]; | |
147 | 146 |
148 MODE_INFO *mip; /* Base of allocated array */ | 147 MODE_INFO *mip; /* Base of allocated array */ |
149 MODE_INFO *mi; /* Corresponds to upper left visible macroblock */ | 148 MODE_INFO *mi; /* Corresponds to upper left visible macroblock */ |
150 MODE_INFO *prev_mip; /* MODE_INFO array 'mip' from last decoded frame */ | 149 MODE_INFO *prev_mip; /* MODE_INFO array 'mip' from last decoded frame */ |
151 MODE_INFO *prev_mi; /* 'mi' from last frame (points into prev_mip) */ | 150 MODE_INFO *prev_mi; /* 'mi' from last frame (points into prev_mip) */ |
152 | 151 |
153 // Persistent mb segment id map used in prediction. | 152 // Persistent mb segment id map used in prediction. |
154 unsigned char *last_frame_seg_map; | 153 unsigned char *last_frame_seg_map; |
155 | 154 |
156 INTERP_FILTER interp_filter; | 155 INTERP_FILTER interp_filter; |
(...skipping 16 matching lines...) Expand all Loading... |
173 FRAME_CONTEXT fc; /* this frame entropy */ | 172 FRAME_CONTEXT fc; /* this frame entropy */ |
174 FRAME_CONTEXT frame_contexts[FRAME_CONTEXTS]; | 173 FRAME_CONTEXT frame_contexts[FRAME_CONTEXTS]; |
175 unsigned int frame_context_idx; /* Context to use/update */ | 174 unsigned int frame_context_idx; /* Context to use/update */ |
176 FRAME_COUNTS counts; | 175 FRAME_COUNTS counts; |
177 | 176 |
178 unsigned int current_video_frame; | 177 unsigned int current_video_frame; |
179 BITSTREAM_PROFILE profile; | 178 BITSTREAM_PROFILE profile; |
180 | 179 |
181 // VPX_BITS_8 in profile 0 or 1, VPX_BITS_10 or VPX_BITS_12 in profile 2 or 3. | 180 // VPX_BITS_8 in profile 0 or 1, VPX_BITS_10 or VPX_BITS_12 in profile 2 or 3. |
182 vpx_bit_depth_t bit_depth; | 181 vpx_bit_depth_t bit_depth; |
| 182 vpx_bit_depth_t dequant_bit_depth; // bit_depth of current dequantizer |
183 | 183 |
184 #if CONFIG_VP9_POSTPROC | 184 #if CONFIG_VP9_POSTPROC |
185 struct postproc_state postproc_state; | 185 struct postproc_state postproc_state; |
186 #endif | 186 #endif |
187 | 187 |
188 int error_resilient_mode; | 188 int error_resilient_mode; |
189 int frame_parallel_decoding_mode; | 189 int frame_parallel_decoding_mode; |
190 | 190 |
191 int log2_tile_cols, log2_tile_rows; | 191 int log2_tile_cols, log2_tile_rows; |
192 | 192 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 vpx_memset(above_ctx, partition_context_lookup[subsize].above, bs); | 321 vpx_memset(above_ctx, partition_context_lookup[subsize].above, bs); |
322 vpx_memset(left_ctx, partition_context_lookup[subsize].left, bs); | 322 vpx_memset(left_ctx, partition_context_lookup[subsize].left, bs); |
323 } | 323 } |
324 | 324 |
325 static INLINE int partition_plane_context(const MACROBLOCKD *xd, | 325 static INLINE int partition_plane_context(const MACROBLOCKD *xd, |
326 int mi_row, int mi_col, | 326 int mi_row, int mi_col, |
327 BLOCK_SIZE bsize) { | 327 BLOCK_SIZE bsize) { |
328 const PARTITION_CONTEXT *above_ctx = xd->above_seg_context + mi_col; | 328 const PARTITION_CONTEXT *above_ctx = xd->above_seg_context + mi_col; |
329 const PARTITION_CONTEXT *left_ctx = xd->left_seg_context + (mi_row & MI_MASK); | 329 const PARTITION_CONTEXT *left_ctx = xd->left_seg_context + (mi_row & MI_MASK); |
330 | 330 |
331 const int bsl = mi_width_log2(bsize); | 331 const int bsl = mi_width_log2_lookup[bsize]; |
332 const int bs = 1 << bsl; | 332 const int bs = 1 << bsl; |
333 int above = 0, left = 0, i; | 333 int above = 0, left = 0, i; |
334 | 334 |
335 assert(b_width_log2(bsize) == b_height_log2(bsize)); | 335 assert(b_width_log2_lookup[bsize] == b_height_log2_lookup[bsize]); |
336 assert(bsl >= 0); | 336 assert(bsl >= 0); |
337 | 337 |
338 for (i = 0; i < bs; i++) { | 338 for (i = 0; i < bs; i++) { |
339 above |= above_ctx[i]; | 339 above |= above_ctx[i]; |
340 left |= left_ctx[i]; | 340 left |= left_ctx[i]; |
341 } | 341 } |
342 above = (above & bs) > 0; | 342 above = (above & bs) > 0; |
343 left = (left & bs) > 0; | 343 left = (left & bs) > 0; |
344 | 344 |
345 return (left * 2 + above) + bsl * PARTITION_PLOFFSET; | 345 return (left * 2 + above) + bsl * PARTITION_PLOFFSET; |
346 } | 346 } |
347 | 347 |
348 #ifdef __cplusplus | 348 #ifdef __cplusplus |
349 } // extern "C" | 349 } // extern "C" |
350 #endif | 350 #endif |
351 | 351 |
352 #endif // VP9_COMMON_VP9_ONYXC_INT_H_ | 352 #endif // VP9_COMMON_VP9_ONYXC_INT_H_ |
OLD | NEW |