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

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

Issue 375983002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: 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/vp9/common/vp9_alloccommon.c ('k') | source/libvpx/vp9/common/vp9_blockd.c » ('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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 const MODE_INFO *const mi = xd->mi[0]; 263 const MODE_INFO *const mi = xd->mi[0];
264 264
265 if (plane_type != PLANE_TYPE_Y || xd->lossless || is_inter_block(&mi->mbmi)) 265 if (plane_type != PLANE_TYPE_Y || xd->lossless || is_inter_block(&mi->mbmi))
266 return DCT_DCT; 266 return DCT_DCT;
267 267
268 return intra_mode_to_tx_type_lookup[get_y_mode(mi, ib)]; 268 return intra_mode_to_tx_type_lookup[get_y_mode(mi, ib)];
269 } 269 }
270 270
271 void vp9_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y); 271 void vp9_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y);
272 272
273 static INLINE TX_SIZE get_uv_tx_size_impl(TX_SIZE y_tx_size, BLOCK_SIZE bsize) { 273 static INLINE TX_SIZE get_uv_tx_size_impl(TX_SIZE y_tx_size, BLOCK_SIZE bsize,
274 int xss, int yss) {
274 if (bsize < BLOCK_8X8) { 275 if (bsize < BLOCK_8X8) {
275 return TX_4X4; 276 return TX_4X4;
276 } else { 277 } else {
277 // TODO(dkovalev): Assuming YUV420 (ss_x == 1, ss_y == 1) 278 const BLOCK_SIZE plane_bsize = ss_size_lookup[bsize][xss][yss];
278 const BLOCK_SIZE plane_bsize = ss_size_lookup[bsize][1][1];
279 return MIN(y_tx_size, max_txsize_lookup[plane_bsize]); 279 return MIN(y_tx_size, max_txsize_lookup[plane_bsize]);
280 } 280 }
281 } 281 }
282 282
283 static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi) { 283 static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi,
284 return get_uv_tx_size_impl(mbmi->tx_size, mbmi->sb_type); 284 const struct macroblockd_plane *pd) {
285 return get_uv_tx_size_impl(mbmi->tx_size, mbmi->sb_type, pd->subsampling_x,
286 pd->subsampling_y);
285 } 287 }
286 288
287 static INLINE BLOCK_SIZE get_plane_block_size(BLOCK_SIZE bsize, 289 static INLINE BLOCK_SIZE get_plane_block_size(BLOCK_SIZE bsize,
288 const struct macroblockd_plane *pd) { 290 const struct macroblockd_plane *pd) {
289 BLOCK_SIZE bs = ss_size_lookup[bsize][pd->subsampling_x][pd->subsampling_y]; 291 BLOCK_SIZE bs = ss_size_lookup[bsize][pd->subsampling_x][pd->subsampling_y];
290 assert(bs < BLOCK_SIZES); 292 assert(bs < BLOCK_SIZES);
291 return bs; 293 return bs;
292 } 294 }
293 295
294 typedef void (*foreach_transformed_block_visitor)(int plane, int block, 296 typedef void (*foreach_transformed_block_visitor)(int plane, int block,
(...skipping 23 matching lines...) Expand all
318 320
319 void vp9_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd, 321 void vp9_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
320 BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob, 322 BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob,
321 int aoff, int loff); 323 int aoff, int loff);
322 324
323 #ifdef __cplusplus 325 #ifdef __cplusplus
324 } // extern "C" 326 } // extern "C"
325 #endif 327 #endif
326 328
327 #endif // VP9_COMMON_VP9_BLOCKD_H_ 329 #endif // VP9_COMMON_VP9_BLOCKD_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_alloccommon.c ('k') | source/libvpx/vp9/common/vp9_blockd.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698