Mercurial > libavcodec.hg
comparison h264_direct.c @ 11091:74748a220032 libavcodec
Factorize setting sub_mb_type out.
author | michael |
---|---|
date | Sun, 07 Feb 2010 17:15:17 +0000 |
parents | eda7b4f6db51 |
children | 64c36264b13f |
comparison
equal
deleted
inserted
replaced
11090:eda7b4f6db51 | 11091:74748a220032 |
---|---|
171 mb_type_col[0] = h->ref_list[1][0].mb_type[mb_xy]; | 171 mb_type_col[0] = h->ref_list[1][0].mb_type[mb_xy]; |
172 mb_type_col[1] = h->ref_list[1][0].mb_type[mb_xy + s->mb_stride]; | 172 mb_type_col[1] = h->ref_list[1][0].mb_type[mb_xy + s->mb_stride]; |
173 b8_stride *= 3; | 173 b8_stride *= 3; |
174 b4_stride *= 6; | 174 b4_stride *= 6; |
175 | 175 |
176 sub_mb_type = MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_8x8 */ | |
176 if( (mb_type_col[0] & MB_TYPE_16x16_OR_INTRA) | 177 if( (mb_type_col[0] & MB_TYPE_16x16_OR_INTRA) |
177 && (mb_type_col[1] & MB_TYPE_16x16_OR_INTRA) | 178 && (mb_type_col[1] & MB_TYPE_16x16_OR_INTRA) |
178 && !is_b8x8){ | 179 && !is_b8x8){ |
179 sub_mb_type = MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_8x8 */ | |
180 *mb_type |= MB_TYPE_16x8 |MB_TYPE_L0L1|MB_TYPE_DIRECT2; /* B_16x8 */ | 180 *mb_type |= MB_TYPE_16x8 |MB_TYPE_L0L1|MB_TYPE_DIRECT2; /* B_16x8 */ |
181 }else{ | 181 }else{ |
182 sub_mb_type = MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_8x8 */ | |
183 *mb_type |= MB_TYPE_8x8|MB_TYPE_L0L1; | 182 *mb_type |= MB_TYPE_8x8|MB_TYPE_L0L1; |
184 } | 183 } |
185 }else{ // AFR/FR -> AFR/FR | 184 }else{ // AFR/FR -> AFR/FR |
186 single_col: | 185 single_col: |
187 mb_type_col[0] = | 186 mb_type_col[0] = |