From f73947f41da6dcd68e8f5f72a14d001e92b877ed Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Sun, 29 Jan 2012 17:38:37 -0800 Subject: [PATCH] use 32bit for storing dequant coeffs, instead of 16b. is a tad faster Change-Id: Ibef8f3b4f3f04a9a647098e5946f616e211a61cd --- src/dec/vp8.c | 2 +- src/dec/vp8i.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dec/vp8.c b/src/dec/vp8.c index e59d4115..843583e1 100644 --- a/src/dec/vp8.c +++ b/src/dec/vp8.c @@ -460,7 +460,7 @@ typedef const uint8_t (*ProbaArray)[NUM_CTX][NUM_PROBAS]; // for const-casting // Returns the position of the last non-zero coeff plus one // (and 0 if there's no coeff at all) static int GetCoeffs(VP8BitReader* const br, ProbaArray prob, - int ctx, const uint16_t dq[2], int n, int16_t* out) { + int ctx, const quant_t dq, int n, int16_t* out) { const uint8_t* p = prob[kBands[n]][ctx]; if (!VP8GetBit(br, p[0])) { // first EOB is more a 'CBP' bit. return 0; diff --git a/src/dec/vp8i.h b/src/dec/vp8i.h index 5201b219..871451e1 100644 --- a/src/dec/vp8i.h +++ b/src/dec/vp8i.h @@ -162,8 +162,9 @@ typedef struct { // used for syntax-parsing } VP8MB; // Dequantization matrices +typedef int quant_t[2]; // [DC / AC]. Can be 'uint16_t[2]' too (~slower). typedef struct { - uint16_t y1_mat_[2], y2_mat_[2], uv_mat_[2]; // [DC / AC] + quant_t y1_mat_, y2_mat_, uv_mat_; } VP8QuantMatrix; // Persistent information needed by the parallel processing