(commit by michael)

dequantizers skip trailing zeros
msmpeg4 non-intra decoder has its dequantizer "build in" now

Originally committed as revision 260 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2002-01-13 04:59:37 +00:00
parent 05f361f0c7
commit badaf88eeb
4 changed files with 91 additions and 30 deletions

View File

@@ -83,9 +83,24 @@ static UINT8 simple_mmx_permutation[64]={
0x32, 0x3A, 0x33, 0x3B, 0x36, 0x3E, 0x37, 0x3F,
};
/* used to skip zeros at the end */
UINT8 zigzag_end[64];
UINT8 permutation[64];
//UINT8 invPermutation[64];
static void build_zigzag_end()
{
int lastIndex;
int lastIndexAfterPerm=0;
for(lastIndex=0; lastIndex<64; lastIndex++)
{
if(zigzag_direct[lastIndex] > lastIndexAfterPerm)
lastIndexAfterPerm= zigzag_direct[lastIndex];
zigzag_end[lastIndex]= lastIndexAfterPerm + 1;
}
}
void get_pixels_c(DCTELEM *block, const UINT8 *pixels, int line_size)
{
DCTELEM *p;
@@ -509,4 +524,6 @@ void dsputil_init(void)
block_permute(default_intra_matrix);
block_permute(default_non_intra_matrix);
}
build_zigzag_end();
}