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 22 matching lines...) Expand all Loading... |
33 } else { | 33 } else { |
34 assert(b == 2 || b == 3); | 34 assert(b == 2 || b == 3); |
35 return cur_mi->bmi[b - 2].as_mode; | 35 return cur_mi->bmi[b - 2].as_mode; |
36 } | 36 } |
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].src_mi->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, pd) | 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; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 void vp9_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y) { | 141 void vp9_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y) { |
142 int i; | 142 int i; |
143 | 143 |
144 for (i = 0; i < MAX_MB_PLANE; i++) { | 144 for (i = 0; i < MAX_MB_PLANE; i++) { |
145 xd->plane[i].plane_type = i ? PLANE_TYPE_UV : PLANE_TYPE_Y; | 145 xd->plane[i].plane_type = i ? PLANE_TYPE_UV : PLANE_TYPE_Y; |
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 } | 149 } |
OLD | NEW |