diff --git a/vp8/encoder/block.h b/vp8/encoder/block.h index 5a2568dde0ac7f790c02553df13086917317b5d1..6de4c85174de836948cfcfcdb0f9d116988d062d 100644 --- a/vp8/encoder/block.h +++ b/vp8/encoder/block.h @@ -34,7 +34,7 @@ typedef struct // 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries short *quant; short *quant_fast; - short *quant_shift; + unsigned char *quant_shift; short *zbin; short *zrun_zbin_boost; short *round; diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 1dbf46eb122121dbdaecef8764299bd6ddfbeb92..66718b5a7545bce5e08d9554b18b7aabbdc3b3de 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -147,7 +147,7 @@ static const int qzbin_factors_y2[129] = #define EXACT_QUANT #ifdef EXACT_QUANT static void vp8cx_invert_quant(int improved_quant, short *quant, - short *shift, short d) + unsigned char *shift, short d) { if(improved_quant) { diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h index 0ab528e27504d6e77124e4315af14e4de457f8e1..4c1854244113c25604d7bc412125d4467b37ec45 100644 --- a/vp8/encoder/onyx_int.h +++ b/vp8/encoder/onyx_int.h @@ -244,17 +244,17 @@ typedef struct { DECLARE_ALIGNED(16, short, Y1quant[QINDEX_RANGE][16]); - DECLARE_ALIGNED(16, short, Y1quant_shift[QINDEX_RANGE][16]); + DECLARE_ALIGNED(16, unsigned char, Y1quant_shift[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, short, Y1zbin[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, short, Y1round[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, short, Y2quant[QINDEX_RANGE][16]); - DECLARE_ALIGNED(16, short, Y2quant_shift[QINDEX_RANGE][16]); + DECLARE_ALIGNED(16, unsigned char, Y2quant_shift[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, short, Y2zbin[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, short, Y2round[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, short, UVquant[QINDEX_RANGE][16]); - DECLARE_ALIGNED(16, short, UVquant_shift[QINDEX_RANGE][16]); + DECLARE_ALIGNED(16, unsigned char, UVquant_shift[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, short, UVzbin[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, short, UVround[QINDEX_RANGE][16]); diff --git a/vp8/encoder/quantize.c b/vp8/encoder/quantize.c index 803e3a51dd156a3360b0f2bb798beff76071beae..86ed267fb084c3613154d019dffaac92a96fc9b9 100644 --- a/vp8/encoder/quantize.c +++ b/vp8/encoder/quantize.c @@ -27,7 +27,7 @@ void vp8_fast_quantize_b_c(BLOCK *b, BLOCKD *d) short *zbin_ptr = b->zbin; short *round_ptr = b->round; short *quant_ptr = b->quant_fast; - short *quant_shift_ptr = b->quant_shift; + unsigned char *quant_shift_ptr = b->quant_shift; short *qcoeff_ptr = d->qcoeff; short *dqcoeff_ptr = d->dqcoeff; short *dequant_ptr = d->dequant; @@ -112,7 +112,7 @@ void vp8_regular_quantize_b(BLOCK *b, BLOCKD *d) short *zbin_ptr = b->zbin; short *round_ptr = b->round; short *quant_ptr = b->quant; - short *quant_shift_ptr = b->quant_shift; + unsigned char *quant_shift_ptr = b->quant_shift; short *qcoeff_ptr = d->qcoeff; short *dqcoeff_ptr = d->dqcoeff; short *dequant_ptr = d->dequant; @@ -166,7 +166,7 @@ void vp8_strict_quantize_b(BLOCK *b, BLOCKD *d) int sz; short *coeff_ptr; short *quant_ptr; - short *quant_shift_ptr; + unsigned char *quant_shift_ptr; short *qcoeff_ptr; short *dqcoeff_ptr; short *dequant_ptr; diff --git a/vp8/encoder/x86/quantize_sse2.asm b/vp8/encoder/x86/quantize_sse2.asm index 5e40dc7de7804421fea9db0c0b3d4ff8d2dfd028..7b7ae706a64a84c8d896811ec968c7b13b7e5a6c 100644 --- a/vp8/encoder/x86/quantize_sse2.asm +++ b/vp8/encoder/x86/quantize_sse2.asm @@ -142,7 +142,7 @@ sym(vp8_regular_quantize_b_sse2): movsx edi, WORD PTR[rsp + temp_qcoeff + %1 * 2] ; downshift by quant_shift[rc] - movsx ecx, WORD PTR[rax + %1 * 2] ; quant_shift_ptr[rc] + movsx cx, BYTE PTR[rax + %1] ; quant_shift_ptr[rc] sar edi, cl ; also sets Z bit je rq_zigzag_loop_%1 ; !y mov WORD PTR[rsp + qcoeff + %1 * 2], di ;qcoeff_ptr[rc] = temp_qcoeff[rc]