Revision daaf6e3e libavcodec/h264_direct.c

View differences:

libavcodec/h264_direct.c
184 184
single_col:
185 185
            mb_type_col[0] =
186 186
            mb_type_col[1] = h->ref_list[1][0].mb_type[mb_xy];
187
            if(IS_8X8(mb_type_col[0]) && !h->sps.direct_8x8_inference_flag){
188
                /* FIXME save sub mb types from previous frames (or derive from MVs)
189
                * so we know exactly what block size to use */
190
                sub_mb_type = MB_TYPE_8x8|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_4x4 */
191
                *mb_type   |= MB_TYPE_8x8|MB_TYPE_L0L1;
192
            }else if(!is_b8x8 && (mb_type_col[0] & MB_TYPE_16x16_OR_INTRA)){
193
                sub_mb_type = MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_8x8 */
187

  
188
            sub_mb_type = MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_8x8 */
189
            if(!is_b8x8 && (mb_type_col[0] & MB_TYPE_16x16_OR_INTRA)){
194 190
                *mb_type   |= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_16x16 */
195 191
            }else if(!is_b8x8 && (mb_type_col[0] & (MB_TYPE_16x8|MB_TYPE_8x16))){
196
                sub_mb_type = MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_8x8 */
197 192
                *mb_type   |= MB_TYPE_L0L1|MB_TYPE_DIRECT2 | (mb_type_col[0] & (MB_TYPE_16x8|MB_TYPE_8x16));
198 193
            }else{
199
                sub_mb_type = MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_8x8 */
194
                if(!h->sps.direct_8x8_inference_flag){
195
                    /* FIXME save sub mb types from previous frames (or derive from MVs)
196
                    * so we know exactly what block size to use */
197
                    sub_mb_type = MB_TYPE_8x8|MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2; /* B_SUB_4x4 */
198
                }
200 199
                *mb_type   |= MB_TYPE_8x8|MB_TYPE_L0L1;
201 200
            }
202 201
        }

Also available in: Unified diff