2011-09-30 12:37:11 +00:00
|
|
|
;******************************************************************************
|
|
|
|
;* x86-SIMD-optimized IDCT for prores
|
2011-10-12 20:09:40 +00:00
|
|
|
;* this is identical to "simple" IDCT written by Michael Niedermayer
|
|
|
|
;* except for the clip range
|
2011-09-30 12:37:11 +00:00
|
|
|
;*
|
|
|
|
;* Copyright (c) 2011 Ronald S. Bultje <rsbultje@gmail.com>
|
|
|
|
;*
|
2011-10-12 20:09:40 +00:00
|
|
|
;* This file is part of FFmpeg.
|
2011-09-30 12:37:11 +00:00
|
|
|
;*
|
2011-10-12 20:09:40 +00:00
|
|
|
;* FFmpeg is free software; you can redistribute it and/or
|
2011-09-30 12:37:11 +00:00
|
|
|
;* 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.
|
|
|
|
;*
|
2011-10-12 20:09:40 +00:00
|
|
|
;* FFmpeg is distributed in the hope that it will be useful,
|
2011-09-30 12:37:11 +00:00
|
|
|
;* 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
|
2011-10-12 20:09:40 +00:00
|
|
|
;* License along with FFmpeg; if not, write to the Free Software
|
2011-09-30 12:37:11 +00:00
|
|
|
;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
;******************************************************************************
|
|
|
|
|
2012-07-15 09:48:21 +00:00
|
|
|
%include "libavutil/x86/x86util.asm"
|
2011-09-30 12:37:11 +00:00
|
|
|
|
2012-01-23 09:45:58 +00:00
|
|
|
%if ARCH_X86_64
|
2011-09-30 12:37:11 +00:00
|
|
|
|
|
|
|
SECTION_RODATA
|
|
|
|
|
2011-10-12 19:59:44 +00:00
|
|
|
pw_88: times 8 dw 0x2008
|
2011-10-12 20:18:35 +00:00
|
|
|
cextern pw_1
|
2011-09-30 12:37:11 +00:00
|
|
|
cextern pw_4
|
|
|
|
cextern pw_1019
|
2015-10-13 19:21:39 +00:00
|
|
|
; 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
|
2011-09-30 12:37:11 +00:00
|
|
|
|
2015-10-12 17:37:44 +00:00
|
|
|
%include "libavcodec/x86/simple_idct10_template.asm"
|
2011-09-30 12:37:11 +00:00
|
|
|
|
2015-10-12 12:13:00 +00:00
|
|
|
SECTION .text
|
2011-09-30 12:37:11 +00:00
|
|
|
|
2015-10-12 17:37:47 +00:00
|
|
|
%macro idct_fn 0
|
2015-10-12 17:37:46 +00:00
|
|
|
cglobal prores_idct_put_10, 4, 4, 15
|
2015-10-12 17:37:47 +00:00
|
|
|
IDCT_FN pw_1, 15, pw_88, 18, pw_4, pw_1019, r3
|
2011-09-30 12:37:11 +00:00
|
|
|
RET
|
|
|
|
%endmacro
|
|
|
|
|
2012-07-27 03:38:27 +00:00
|
|
|
INIT_XMM sse2
|
2015-10-12 17:37:47 +00:00
|
|
|
idct_fn
|
2012-08-31 13:39:03 +00:00
|
|
|
%if HAVE_AVX_EXTERNAL
|
2012-07-27 03:38:27 +00:00
|
|
|
INIT_XMM avx
|
2015-10-12 17:37:47 +00:00
|
|
|
idct_fn
|
2012-01-12 15:35:49 +00:00
|
|
|
%endif
|
2011-09-30 12:37:11 +00:00
|
|
|
|
|
|
|
%endif
|