1 ;******************************************************************************
2 ;* SIMD optimized AAC encoder DSP functions
4 ;* Copyright (C) 2016 Rostislav Pehlivanov <atomnuker@gmail.com>
6 ;* This file is part of FFmpeg.
8 ;* FFmpeg is free software; you can redistribute it and/or
9 ;* modify it under the terms of the GNU Lesser General Public
10 ;* License as published by the Free Software Foundation; either
11 ;* version 2.1 of the License, or (at your option) any later version.
13 ;* FFmpeg is distributed in the hope that it will be useful,
14 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ;* Lesser General Public License for more details.
18 ;* You should have received a copy of the GNU Lesser General Public
19 ;* License along with FFmpeg; if not, write to the Free Software
20 ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 ;******************************************************************************
23 %include "libavutil/x86/x86util.asm"
27 float_abs_mask: times 4 dd 0x7fffffff
31 ;*******************************************************************
32 ;void ff_abs_pow34(float *out, const float *in, const int size);
33 ;*******************************************************************
35 cglobal abs_pow34, 3, 3, 3, out, in, size
36 mova m2, [float_abs_mask]
42 andps m0, m2, [inq+sizeq]
51 ;*******************************************************************
52 ;void ff_aac_quantize_bands(int *out, const float *in, const float *scaled,
53 ; int size, int is_signed, int maxval, const float Q34,
54 ; const float rounding)
55 ;*******************************************************************
57 cglobal aac_quantize_bands, 5, 5, 6, out, in, scaled, size, is_signed, maxval, Q34, rounding
61 cvtsi2ss m3, dword maxvalm
77 mulps m2, m0, [scaledq+sizeq]
80 andps m5, m4, [inq+sizeq]