vpx/vp9/encoder/arm/vp9_quantize_arm.c
Deb Mukherjee 0742b1e4ae Fixing 8x8/4x4 ADST for intra modes with tx select
This patch allows use of 8x8 and 4x4 ADST correctly for Intra
16x16 modes and Intra 8x8 modes when the block size selected
is smaller than the prediction mode. Also includes some cleanups
and refactoring.

Rebase.

Change-Id: Ie3257bdf07bdb9c6e9476915e3a80183c8fa005a
2012-11-28 16:21:12 -08:00

58 lines
1.6 KiB
C

/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include "vpx_mem/vpx_mem.h"
#include "vp9/encoder/vp9_quantize.h"
#include "vp9/common/vp9_entropy.h"
#if HAVE_ARMV7
/* vp8_quantize_mbX functions here differs from corresponding ones in
* vp9_quantize.c only by using quantize_b_pair function pointer instead of
* the regular quantize_b function pointer */
void vp8_quantize_mby_neon(MACROBLOCK *x) {
int i;
int has_2nd_order = get_2nd_order_usage(xd);
for (i = 0; i < 16; i += 2)
x->quantize_b_pair(&x->block[i], &x->block[i + 1],
&x->e_mbd.block[i], &x->e_mbd.block[i + 1]);
if (has_2nd_order)
x->quantize_b(&x->block[24], &x->e_mbd.block[24]);
}
void vp8_quantize_mb_neon(MACROBLOCK *x) {
int i;
int has_2nd_order = get_2nd_order_usage(xd);
for (i = 0; i < 24; i += 2)
x->quantize_b_pair(&x->block[i], &x->block[i + 1],
&x->e_mbd.block[i], &x->e_mbd.block[i + 1]);
if (has_2nd_order)
x->quantize_b(&x->block[i], &x->e_mbd.block[i]);
}
void vp8_quantize_mbuv_neon(MACROBLOCK *x) {
int i;
for (i = 16; i < 24; i += 2)
x->quantize_b_pair(&x->block[i], &x->block[i + 1],
&x->e_mbd.block[i], &x->e_mbd.block[i + 1]);
}
#endif /* HAVE_ARMV7 */