avcodec/jpegxl_parse{,r}: fix integer overflow for some malformed files
[FFMpeg-mirror.git] / libavfilter / x86 / vf_pp7.asm
blob7b3e5cf5e342e09222c5f19cf0071175f643de7b
1 ;*****************************************************************************
2 ;* x86-optimized functions for pp7 filter
3 ;*
4 ;* Copyright (c) 2005 Michael Niedermayer <michaelni@gmx.at>
5 ;*
6 ;* This file is part of FFmpeg.
7 ;*
8 ;* FFmpeg is free software; you can redistribute it and/or modify
9 ;* it under the terms of the GNU General Public License as published by
10 ;* the Free Software Foundation; either version 2 of the License, or
11 ;* (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
16 ;* GNU General Public License for more details.
18 ;* You should have received a copy of the GNU General Public License along
19 ;* with FFmpeg; if not, write to the Free Software Foundation, Inc.,
20 ;* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 ;******************************************************************************
23 %include "libavutil/x86/x86util.asm"
25 SECTION .text
27 INIT_MMX mmx
29 ;void ff_pp7_dctB_mmx(int16_t *dst, int16_t *src)
30 cglobal pp7_dctB, 2, 2, 0, dst, src
31 movq m0, [srcq]
32 movq m1, [srcq+mmsize*1]
33 paddw m0, [srcq+mmsize*6]
34 paddw m1, [srcq+mmsize*5]
35 movq m2, [srcq+mmsize*2]
36 movq m3, [srcq+mmsize*3]
37 paddw m2, [srcq+mmsize*4]
38 paddw m3, m3
39 movq m4, m3
40 psubw m3, m0
41 paddw m4, m0
42 movq m0, m2
43 psubw m2, m1
44 paddw m0, m1
45 movq m1, m4
46 psubw m4, m0
47 paddw m1, m0
48 movq m0, m3
49 psubw m3, m2
50 psubw m3, m2
51 paddw m2, m0
52 paddw m2, m0
53 movq [dstq], m1
54 movq [dstq+mmsize*2], m4
55 movq [dstq+mmsize*1], m2
56 movq [dstq+mmsize*3], m3
57 RET