1; 2; Copyright (c) 2016 The WebM project authors. All Rights Reserved. 3; 4; Use of this source code is governed by a BSD-style license 5; that can be found in the LICENSE file in the root of the source 6; tree. An additional intellectual property rights grant can be found 7; in the file PATENTS. All contributing project authors may 8; be found in the AUTHORS file in the root of the source tree. 9; 10 11 INCLUDE ./vpx_config.asm 12 13 ; Helper functions used to load tran_low_t into int16, narrowing if 14 ; necessary. 15 16 ; $dst0..3 are d registers with the pairs assumed to be contiguous in 17 ; non-high-bitdepth builds. q0-q3 are used as temporaries in high-bitdepth. 18 MACRO 19 LOAD_TRAN_LOW_TO_S16 $dst0, $dst1, $dst2, $dst3, $src 20 IF CONFIG_VP9_HIGHBITDEPTH 21 vld1.s32 {q0,q1}, [$src]! 22 vld1.s32 {q2,q3}, [$src]! 23 vmovn.i32 $dst0, q0 24 vmovn.i32 $dst1, q1 25 vmovn.i32 $dst2, q2 26 vmovn.i32 $dst3, q3 27 ELSE 28 vld1.s16 {$dst0-$dst1,$dst2-$dst3}, [$src]! 29 ENDIF 30 MEND 31 32 ; $dst0..3 are d registers. q0-q3 are used as temporaries in high-bitdepth. 33 MACRO 34 LOAD_TRAN_LOW_TO_S16X2 $dst0, $dst1, $dst2, $dst3, $src 35 IF CONFIG_VP9_HIGHBITDEPTH 36 vld2.s32 {q0,q1}, [$src]! 37 vld2.s32 {q2,q3}, [$src]! 38 vmovn.i32 $dst0, q0 39 vmovn.i32 $dst1, q2 40 vmovn.i32 $dst2, q1 41 vmovn.i32 $dst3, q3 42 ELSE 43 vld2.s16 {$dst0,$dst1,$dst2,$dst3}, [$src]! 44 ENDIF 45 MEND 46 END 47