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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 case TX_16X16: | 176 case TX_16X16: |
177 above_ec = !!*(const uint32_t *)a; | 177 above_ec = !!*(const uint32_t *)a; |
178 left_ec = !!*(const uint32_t *)l; | 178 left_ec = !!*(const uint32_t *)l; |
179 break; | 179 break; |
180 case TX_32X32: | 180 case TX_32X32: |
181 above_ec = !!*(const uint64_t *)a; | 181 above_ec = !!*(const uint64_t *)a; |
182 left_ec = !!*(const uint64_t *)l; | 182 left_ec = !!*(const uint64_t *)l; |
183 break; | 183 break; |
184 default: | 184 default: |
185 assert(0 && "Invalid transform size."); | 185 assert(0 && "Invalid transform size."); |
| 186 break; |
186 } | 187 } |
187 | 188 |
188 return combine_entropy_contexts(above_ec, left_ec); | 189 return combine_entropy_contexts(above_ec, left_ec); |
189 } | 190 } |
190 | 191 |
191 static const INLINE scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size, | 192 static INLINE const scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size, |
192 PLANE_TYPE type, int block_idx) { | 193 PLANE_TYPE type, int block_idx) { |
193 const MODE_INFO *const mi = xd->mi[0]; | 194 const MODE_INFO *const mi = xd->mi[0]; |
194 | 195 |
195 if (is_inter_block(&mi->mbmi) || type != PLANE_TYPE_Y || xd->lossless) { | 196 if (is_inter_block(&mi->mbmi) || type != PLANE_TYPE_Y || xd->lossless) { |
196 return &vp9_default_scan_orders[tx_size]; | 197 return &vp9_default_scan_orders[tx_size]; |
197 } else { | 198 } else { |
198 const PREDICTION_MODE mode = get_y_mode(mi, block_idx); | 199 const PREDICTION_MODE mode = get_y_mode(mi, block_idx); |
199 return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]]; | 200 return &vp9_scan_orders[tx_size][intra_mode_to_tx_type_lookup[mode]]; |
200 } | 201 } |
201 } | 202 } |
202 | 203 |
203 #ifdef __cplusplus | 204 #ifdef __cplusplus |
204 } // extern "C" | 205 } // extern "C" |
205 #endif | 206 #endif |
206 | 207 |
207 #endif // VP9_COMMON_VP9_ENTROPY_H_ | 208 #endif // VP9_COMMON_VP9_ENTROPY_H_ |
OLD | NEW |