~30% encoding speedup: use NEON for QuantizeBlock()

also revamped the signature to avoid having to pass the 'first' parameter

Change-Id: Ief9af1747dcfb5db0700b595d0073cebd57542a5
This commit is contained in:
skal
2014-04-07 18:02:25 +02:00
committed by Gerrit Code Review
parent f758af6b73
commit 869eaf6c60
6 changed files with 87 additions and 24 deletions

View File

@@ -600,9 +600,10 @@ static const uint8_t kZigzag[16] = {
// Simple quantization
static int QuantizeBlock(int16_t in[16], int16_t out[16],
int n, const VP8Matrix* const mtx) {
const VP8Matrix* const mtx) {
int last = -1;
for (; n < 16; ++n) {
int n;
for (n = 0; n < 16; ++n) {
const int j = kZigzag[n];
const int sign = (in[j] < 0);
const uint32_t coeff = (sign ? -in[j] : in[j]) + mtx->sharpen_[j];