1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/encoder/arm/quantize_arm.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,64 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 + 1.15 +#include "vpx_config.h" 1.16 +#include "vp8_rtcd.h" 1.17 +#include "vp8/encoder/block.h" 1.18 +#include <math.h> 1.19 +#include "vpx_mem/vpx_mem.h" 1.20 +#include "vp8/encoder/quantize.h" 1.21 +#include "vp8/common/entropy.h" 1.22 + 1.23 + 1.24 +#if HAVE_NEON 1.25 + 1.26 +/* vp8_quantize_mbX functions here differs from corresponding ones in 1.27 + * quantize.c only by using quantize_b_pair function pointer instead of 1.28 + * the regular quantize_b function pointer */ 1.29 +void vp8_quantize_mby_neon(MACROBLOCK *x) 1.30 +{ 1.31 + int i; 1.32 + int has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED 1.33 + && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); 1.34 + 1.35 + for (i = 0; i < 16; i+=2) 1.36 + x->quantize_b_pair(&x->block[i], &x->block[i+1], 1.37 + &x->e_mbd.block[i], &x->e_mbd.block[i+1]); 1.38 + 1.39 + if(has_2nd_order) 1.40 + x->quantize_b(&x->block[24], &x->e_mbd.block[24]); 1.41 +} 1.42 + 1.43 +void vp8_quantize_mb_neon(MACROBLOCK *x) 1.44 +{ 1.45 + int i; 1.46 + int has_2nd_order=(x->e_mbd.mode_info_context->mbmi.mode != B_PRED 1.47 + && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); 1.48 + 1.49 + for (i = 0; i < 24; i+=2) 1.50 + x->quantize_b_pair(&x->block[i], &x->block[i+1], 1.51 + &x->e_mbd.block[i], &x->e_mbd.block[i+1]); 1.52 + 1.53 + if (has_2nd_order) 1.54 + x->quantize_b(&x->block[24], &x->e_mbd.block[24]); 1.55 +} 1.56 + 1.57 + 1.58 +void vp8_quantize_mbuv_neon(MACROBLOCK *x) 1.59 +{ 1.60 + int i; 1.61 + 1.62 + for (i = 16; i < 24; i+=2) 1.63 + x->quantize_b_pair(&x->block[i], &x->block[i+1], 1.64 + &x->e_mbd.block[i], &x->e_mbd.block[i+1]); 1.65 +} 1.66 + 1.67 +#endif /* HAVE_NEON */