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