OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 void vp9_foreach_transformed_block_in_plane( | 39 void vp9_foreach_transformed_block_in_plane( |
40 const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane, | 40 const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane, |
41 foreach_transformed_block_visitor visit, void *arg) { | 41 foreach_transformed_block_visitor visit, void *arg) { |
42 const struct macroblockd_plane *const pd = &xd->plane[plane]; | 42 const struct macroblockd_plane *const pd = &xd->plane[plane]; |
43 const MB_MODE_INFO* mbmi = &xd->mi[0]->mbmi; | 43 const MB_MODE_INFO* mbmi = &xd->mi[0]->mbmi; |
44 // block and transform sizes, in number of 4x4 blocks log 2 ("*_b") | 44 // block and transform sizes, in number of 4x4 blocks log 2 ("*_b") |
45 // 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8 | 45 // 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8 |
46 // transform size varies per plane, look it up in a common way. | 46 // transform size varies per plane, look it up in a common way. |
47 const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi) | 47 const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi, pd) |
48 : mbmi->tx_size; | 48 : mbmi->tx_size; |
49 const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd); | 49 const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd); |
50 const int num_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize]; | 50 const int num_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize]; |
51 const int num_4x4_h = num_4x4_blocks_high_lookup[plane_bsize]; | 51 const int num_4x4_h = num_4x4_blocks_high_lookup[plane_bsize]; |
52 const int step = 1 << (tx_size << 1); | 52 const int step = 1 << (tx_size << 1); |
53 int i; | 53 int i; |
54 | 54 |
55 // If mb_to_right_edge is < 0 we are in a situation in which | 55 // If mb_to_right_edge is < 0 we are in a situation in which |
56 // the current block size extends into the UMV and we won't | 56 // the current block size extends into the UMV and we won't |
57 // visit the sub blocks that are wholly within the UMV. | 57 // visit the sub blocks that are wholly within the UMV. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 xd->plane[i].subsampling_x = i ? ss_x : 0; | 146 xd->plane[i].subsampling_x = i ? ss_x : 0; |
147 xd->plane[i].subsampling_y = i ? ss_y : 0; | 147 xd->plane[i].subsampling_y = i ? ss_y : 0; |
148 } | 148 } |
149 #if CONFIG_ALPHA | 149 #if CONFIG_ALPHA |
150 // TODO(jkoleszar): Using the Y w/h for now | 150 // TODO(jkoleszar): Using the Y w/h for now |
151 xd->plane[3].plane_type = PLANE_TYPE_Y; | 151 xd->plane[3].plane_type = PLANE_TYPE_Y; |
152 xd->plane[3].subsampling_x = 0; | 152 xd->plane[3].subsampling_x = 0; |
153 xd->plane[3].subsampling_y = 0; | 153 xd->plane[3].subsampling_y = 0; |
154 #endif | 154 #endif |
155 } | 155 } |
OLD | NEW |