Revision badaf88e libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
83 83
	0x32, 0x3A, 0x33, 0x3B, 0x36, 0x3E, 0x37, 0x3F,
84 84
};
85 85

  
86
/* used to skip zeros at the end */
87
UINT8 zigzag_end[64];
88

  
86 89
UINT8 permutation[64];
87 90
//UINT8 invPermutation[64];
88 91

  
92
static void build_zigzag_end()
93
{
94
    int lastIndex;
95
    int lastIndexAfterPerm=0;
96
    for(lastIndex=0; lastIndex<64; lastIndex++)
97
    {
98
        if(zigzag_direct[lastIndex] > lastIndexAfterPerm) 
99
            lastIndexAfterPerm= zigzag_direct[lastIndex];
100
        zigzag_end[lastIndex]= lastIndexAfterPerm + 1;
101
    }
102
}
103

  
89 104
void get_pixels_c(DCTELEM *block, const UINT8 *pixels, int line_size)
90 105
{
91 106
    DCTELEM *p;
......
509 524
        block_permute(default_intra_matrix);
510 525
        block_permute(default_non_intra_matrix);
511 526
    }
527
    
528
    build_zigzag_end();
512 529
}

Also available in: Unified diff