2 ; * SIMD optimized idct functions for HEVC decoding
3 ; * Copyright (c) 2014 Pierre-Edouard LEPERE
4 ; * Copyright (c) 2014 James Almer
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
22 %include "libavutil/x86/x86util.asm"
26 ; void ff_hevc_idctHxW_dc_{8,10}_<opt>(int16_t *coeffs)
28 ; %2 = number of loops
31 cglobal hevc_idct%1x%1_dc_%3, 1, 2, 1, coeff, tmp
32 movsx tmpq, word [coeffq]
33 add tmpw, ((1 << 14-%3) + 1)
37 DEFINE_ARGS coeff, cnt
40 mova [coeffq+mmsize*0], m0
41 mova [coeffq+mmsize*1], m0
42 mova [coeffq+mmsize*2], m0
43 mova [coeffq+mmsize*3], m0
44 mova [coeffq+mmsize*4], m0
45 mova [coeffq+mmsize*5], m0
46 mova [coeffq+mmsize*6], m0
47 mova [coeffq+mmsize*7], m0
56 %macro IDCT_DC_NL 2 ; No loop
57 cglobal hevc_idct%1x%1_dc_%2, 1, 2, 1, coeff, tmp
58 movsx tmpq, word [coeffq]
59 add tmpw, ((1 << 14-%2) + 1)
63 mova [coeffq+mmsize*0], m0
64 mova [coeffq+mmsize*1], m0
65 mova [coeffq+mmsize*2], m0
66 mova [coeffq+mmsize*3], m0
68 mova [coeffq+mmsize*4], m0
69 mova [coeffq+mmsize*5], m0
70 mova [coeffq+mmsize*6], m0
71 mova [coeffq+mmsize*7], m0
86 %if HAVE_AVX2_EXTERNAL
90 %endif ;HAVE_AVX2_EXTERNAL
102 %if HAVE_AVX2_EXTERNAL
106 %endif ;HAVE_AVX2_EXTERNAL