Revision e470ef76

View differences:

libavcodec/h264_loopfilter.c
632 632
            *(uint64_t*)&bS[0]=
633 633
            *(uint64_t*)&bS[4]= 0x0004000400040004ULL;
634 634
        else {
635
            static const uint8_t offset[2][2][8]={
636
                {
637
                    {7+8*0, 7+8*0, 7+8*0, 7+8*0, 7+8*1, 7+8*1, 7+8*1, 7+8*1},
638
                    {7+8*2, 7+8*2, 7+8*2, 7+8*2, 7+8*3, 7+8*3, 7+8*3, 7+8*3},
639
                },{
640
                    {7+8*0, 7+8*1, 7+8*2, 7+8*3, 7+8*0, 7+8*1, 7+8*2, 7+8*3},
641
                    {7+8*0, 7+8*1, 7+8*2, 7+8*3, 7+8*0, 7+8*1, 7+8*2, 7+8*3},
642
                }
643
            };
644
            const uint8_t *off= offset[MB_FIELD][mb_y&1];
635 645
            for( i = 0; i < 8; i++ ) {
636 646
                int j= MB_FIELD ? i>>2 : i&1;
637 647
                int mbn_xy = h->left_mb_xy[j];
......
644 654
                         ((!h->pps.cabac && IS_8x8DCT(mbn_type)) ?
645 655
                            (h->cbp_table[mbn_xy] & ((MB_FIELD ? (i&2) : (mb_y&1)) ? 8 : 2))
646 656
                                                                       :
647
                            h->non_zero_count[mbn_xy][7+(MB_FIELD ? (i&3) : (i>>2)+(mb_y&1)*2)*8]));
657
                            h->non_zero_count[mbn_xy][ off[i] ]));
648 658
                }
649 659
            }
650 660
        }

Also available in: Unified diff