# HG changeset patch # User lorenm # Date 1136038478 0 # Node ID 6f6f307cffaca917192b50f02c123be6ee444e7f # Parent a22cf6e46b0e7a066ac0e506d350a78d690c28dc fix asymmetric CQMs with pre-transposed DCT. diff -r a22cf6e46b0e -r 6f6f307cffac h264.c --- a/h264.c Sat Dec 31 13:20:24 2005 +0000 +++ b/h264.c Sat Dec 31 14:14:38 2005 +0000 @@ -2973,6 +2973,7 @@ static void init_dequant4_coeff_table(H264Context *h){ int i,j,q,x; + const int transpose = (h->s.dsp.h264_idct_add != ff_h264_idct_add_c); //FIXME ugly for(i=0; i<6; i++ ){ h->dequant4_coeff[i] = h->dequant4_buffer[i]; for(j=0; jdequant4_coeff[i][q][x] = ((uint32_t)dequant4_coeff_init[idx][(x&1) + ((x>>2)&1)] * + h->dequant4_coeff[i][q][transpose ? (x>>2)|((x<<2)&0xF) : x] = + ((uint32_t)dequant4_coeff_init[idx][(x&1) + ((x>>2)&1)] * h->pps.scaling_matrix4[i][x]) << shift; } }