proresdsp.asm 1.79 KB
Newer Older
1 2
;******************************************************************************
;* x86-SIMD-optimized IDCT for prores
3 4
;* this is identical to "simple" IDCT written by Michael Niedermayer
;* except for the clip range
5 6 7
;*
;* Copyright (c) 2011 Ronald S. Bultje <rsbultje@gmail.com>
;*
8
;* This file is part of FFmpeg.
9
;*
10
;* FFmpeg is free software; you can redistribute it and/or
11 12 13 14
;* modify it under the terms of the GNU Lesser General Public
;* License as published by the Free Software Foundation; either
;* version 2.1 of the License, or (at your option) any later version.
;*
15
;* FFmpeg is distributed in the hope that it will be useful,
16 17 18 19 20
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;* Lesser General Public License for more details.
;*
;* You should have received a copy of the GNU Lesser General Public
21
;* License along with FFmpeg; if not, write to the Free Software
22 23 24
;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;******************************************************************************

25
%include "libavutil/x86/x86util.asm"
26

27
%if ARCH_X86_64
28 29 30

SECTION_RODATA

31
pw_88:      times 8 dw 0x2008
32
cextern pw_1
33 34
cextern pw_4
cextern pw_1019
35 36 37 38 39 40 41 42 43 44 45 46 47
; Below are defined in simple_idct10.asm built from selecting idctdsp
cextern w4_plus_w2
cextern w4_min_w2
cextern w4_plus_w6
cextern w4_min_w6
cextern w1_plus_w3
cextern w3_min_w1
cextern w7_plus_w3
cextern w3_min_w7
cextern w1_plus_w5
cextern w5_min_w1
cextern w5_plus_w7
cextern w7_min_w5
48

49
%include "libavcodec/x86/simple_idct10_template.asm"
50

51
SECTION .text
52

53
%macro idct_fn 0
54
cglobal prores_idct_put_10, 4, 4, 15
55
    IDCT_FN    pw_1, 15, pw_88, 18, pw_4, pw_1019, r3
56 57 58
    RET
%endmacro

59
INIT_XMM sse2
60
idct_fn
61
%if HAVE_AVX_EXTERNAL
62
INIT_XMM avx
63
idct_fn
64
%endif
65 66

%endif