Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: source/libvpx/vp9/common/vp9_blockd.h

Issue 390713002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp8/vp8_dx_iface.c ('k') | source/libvpx/vp9/common/vp9_common_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 ENTROPY_CONTEXT *above_context[MAX_MB_PLANE]; 236 ENTROPY_CONTEXT *above_context[MAX_MB_PLANE];
237 ENTROPY_CONTEXT left_context[MAX_MB_PLANE][16]; 237 ENTROPY_CONTEXT left_context[MAX_MB_PLANE][16];
238 238
239 PARTITION_CONTEXT *above_seg_context; 239 PARTITION_CONTEXT *above_seg_context;
240 PARTITION_CONTEXT left_seg_context[8]; 240 PARTITION_CONTEXT left_seg_context[8];
241 } MACROBLOCKD; 241 } MACROBLOCKD;
242 242
243 static INLINE BLOCK_SIZE get_subsize(BLOCK_SIZE bsize, 243 static INLINE BLOCK_SIZE get_subsize(BLOCK_SIZE bsize,
244 PARTITION_TYPE partition) { 244 PARTITION_TYPE partition) {
245 const BLOCK_SIZE subsize = subsize_lookup[partition][bsize]; 245 return subsize_lookup[partition][bsize];
246 assert(subsize < BLOCK_SIZES);
247 return subsize;
248 } 246 }
249 247
250 extern const TX_TYPE intra_mode_to_tx_type_lookup[INTRA_MODES]; 248 extern const TX_TYPE intra_mode_to_tx_type_lookup[INTRA_MODES];
251 249
252 static INLINE TX_TYPE get_tx_type(PLANE_TYPE plane_type, 250 static INLINE TX_TYPE get_tx_type(PLANE_TYPE plane_type,
253 const MACROBLOCKD *xd) { 251 const MACROBLOCKD *xd) {
254 const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi; 252 const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
255 253
256 if (plane_type != PLANE_TYPE_Y || is_inter_block(mbmi)) 254 if (plane_type != PLANE_TYPE_Y || is_inter_block(mbmi))
257 return DCT_DCT; 255 return DCT_DCT;
(...skipping 23 matching lines...) Expand all
281 } 279 }
282 280
283 static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi, 281 static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi,
284 const struct macroblockd_plane *pd) { 282 const struct macroblockd_plane *pd) {
285 return get_uv_tx_size_impl(mbmi->tx_size, mbmi->sb_type, pd->subsampling_x, 283 return get_uv_tx_size_impl(mbmi->tx_size, mbmi->sb_type, pd->subsampling_x,
286 pd->subsampling_y); 284 pd->subsampling_y);
287 } 285 }
288 286
289 static INLINE BLOCK_SIZE get_plane_block_size(BLOCK_SIZE bsize, 287 static INLINE BLOCK_SIZE get_plane_block_size(BLOCK_SIZE bsize,
290 const struct macroblockd_plane *pd) { 288 const struct macroblockd_plane *pd) {
291 BLOCK_SIZE bs = ss_size_lookup[bsize][pd->subsampling_x][pd->subsampling_y]; 289 return ss_size_lookup[bsize][pd->subsampling_x][pd->subsampling_y];
292 assert(bs < BLOCK_SIZES);
293 return bs;
294 } 290 }
295 291
296 typedef void (*foreach_transformed_block_visitor)(int plane, int block, 292 typedef void (*foreach_transformed_block_visitor)(int plane, int block,
297 BLOCK_SIZE plane_bsize, 293 BLOCK_SIZE plane_bsize,
298 TX_SIZE tx_size, 294 TX_SIZE tx_size,
299 void *arg); 295 void *arg);
300 296
301 void vp9_foreach_transformed_block_in_plane( 297 void vp9_foreach_transformed_block_in_plane(
302 const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane, 298 const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane,
303 foreach_transformed_block_visitor visit, void *arg); 299 foreach_transformed_block_visitor visit, void *arg);
(...skipping 16 matching lines...) Expand all
320 316
321 void vp9_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd, 317 void vp9_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
322 BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob, 318 BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob,
323 int aoff, int loff); 319 int aoff, int loff);
324 320
325 #ifdef __cplusplus 321 #ifdef __cplusplus
326 } // extern "C" 322 } // extern "C"
327 #endif 323 #endif
328 324
329 #endif // VP9_COMMON_VP9_BLOCKD_H_ 325 #endif // VP9_COMMON_VP9_BLOCKD_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp8/vp8_dx_iface.c ('k') | source/libvpx/vp9/common/vp9_common_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698