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