# HG changeset patch # User michael # Date 1073237391 0 # Node ID ea5200a9f7308b9e3172ae218eb8817ce79b877d # Parent 033d889d7c2c6ac905dc7ef72a1ea134b17c4470 mpeg2 QP clamping fix diff -r 033d889d7c2c -r ea5200a9f730 libpostproc/postprocess.c --- a/libpostproc/postprocess.c Sun Jan 04 17:13:14 2004 +0000 +++ b/libpostproc/postprocess.c Sun Jan 04 17:29:51 2004 +0000 @@ -943,10 +943,10 @@ int i; const int count= mbHeight * QPStride; for(i=0; i<(count>>2); i++){ - ((uint32_t*)c->nonBQPTable)[i] = ((uint32_t*)QP_store)[i] & 0x1F1F1F1F; + ((uint32_t*)c->nonBQPTable)[i] = ((uint32_t*)QP_store)[i] & 0x3F3F3F3F; } for(i<<=2; inonBQPTable[i] = QP_store[i] & 0x1F; + c->nonBQPTable[i] = QP_store[i] & 0x3F; } } diff -r 033d889d7c2c -r ea5200a9f730 libpostproc/postprocess_internal.h --- a/libpostproc/postprocess_internal.h Sun Jan 04 17:13:14 2004 +0000 +++ b/libpostproc/postprocess_internal.h Sun Jan 04 17:29:51 2004 +0000 @@ -134,8 +134,8 @@ uint64_t __attribute__((aligned(8))) pQPb; uint64_t __attribute__((aligned(8))) pQPb2; - uint64_t __attribute__((aligned(8))) mmxDcOffset[32]; - uint64_t __attribute__((aligned(8))) mmxDcThreshold[32]; + uint64_t __attribute__((aligned(8))) mmxDcOffset[64]; + uint64_t __attribute__((aligned(8))) mmxDcThreshold[64]; QP_STORE_T *stdQPTable; ///< used to fix MPEG2 style qscale QP_STORE_T *nonBQPTable; diff -r 033d889d7c2c -r ea5200a9f730 libpostproc/postprocess_template.c --- a/libpostproc/postprocess_template.c Sun Jan 04 17:13:14 2004 +0000 +++ b/libpostproc/postprocess_template.c Sun Jan 04 17:29:51 2004 +0000 @@ -2792,7 +2792,7 @@ const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4; #ifdef HAVE_MMX - for(i=0; i<32; i++){ + for(i=0; i<57; i++){ int offset= ((i*c.ppMode.baseDcDiff)>>8) + 1; int threshold= offset*2 + 1; c.mmxDcOffset[i]= 0x7F - offset;