Revision 3babc711

View differences:

libavcodec/h264_direct.c
319 319
            fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, a, 4);
320 320
            fill_rectangle(&h->mv_cache[1][scan8[0]], 4, 4, 8, b, 4);
321 321
        }else{
322
            int n=0;
322 323
            for(i8=0; i8<4; i8++){
323 324
                const int x8 = i8&1;
324 325
                const int y8 = i8>>1;
......
344 345
                                fill_rectangle(&h->mv_cache[0][scan8[i8*4]], 2, 2, 8, 0, 4);
345 346
                            if(ref[1] == 0)
346 347
                                fill_rectangle(&h->mv_cache[1][scan8[i8*4]], 2, 2, 8, 0, 4);
348
                            n+=4;
347 349
                        }
348 350
                    }else{
349 351
                        int m=0;
......
359 361
                    }
360 362
                    if(!(m&3))
361 363
                        h->sub_mb_type[i8]+= MB_TYPE_16x16 - MB_TYPE_8x8;
364
                    n+=m;
362 365
                    }
363 366
                }
364 367
            }
368
            if(!is_b8x8 && !(n&15))
369
                *mb_type= (*mb_type & ~(MB_TYPE_8x8|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_P1L0|MB_TYPE_P1L1))|MB_TYPE_16x16|MB_TYPE_DIRECT2;
365 370
        }
366 371
    }else{ /* direct temporal mv pred */
367 372
        const int *map_col_to_list0[2] = {h->map_col_to_list0[0], h->map_col_to_list0[1]};

Also available in: Unified diff