1 ;******************************************************************************
2 ;* SIMD-optimized UTVideo functions
3 ;* Copyright (c) 2017 Paul B Mahol
5 ;* This file is part of FFmpeg.
7 ;* FFmpeg is free software; you can redistribute it and/or
8 ;* modify it under the terms of the GNU Lesser General Public
9 ;* License as published by the Free Software Foundation; either
10 ;* version 2.1 of the License, or (at your option) any later version.
12 ;* FFmpeg is distributed in the hope that it will be useful,
13 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 ;* Lesser General Public License for more details.
17 ;* You should have received a copy of the GNU Lesser General Public
18 ;* License along with FFmpeg; if not, write to the Free Software
19 ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 ;******************************************************************************
22 %include "libavutil/x86/x86util.asm"
26 pb_128: times 16 db 128
27 pw_512: times 8 dw 512
28 pw_1023: times 8 dw 1023
34 ; void restore_rgb_planes(uint8_t *src_r, uint8_t *src_g, uint8_t *src_b,
35 ; ptrdiff_t linesize_r, ptrdiff_t linesize_g, ptrdiff_t linesize_b,
36 ; int width, int height)
37 cglobal restore_rgb_planes, 7 + ARCH_X86_64, 7 + ARCH_X86_64 * 2, 4, src_r, src_g, src_b, linesize_r, linesize_g, linesize_b, w, h, x
45 DEFINE_ARGS src_r, src_g, src_b, linesize_r, linesize_g, linesize_b, x
54 mova m0, [src_rq + xq]
55 mova m1, [src_gq + xq]
56 mova m2, [src_bq + xq]
65 add src_rq, linesize_rq
66 add src_gq, linesize_gq
67 add src_bq, linesize_bq
72 cglobal restore_rgb_planes10, 7 + ARCH_X86_64, 7 + ARCH_X86_64 * 2, 5, src_r, src_g, src_b, linesize_r, linesize_g, linesize_b, w, h, x
85 DEFINE_ARGS src_r, src_g, src_b, linesize_r, linesize_g, linesize_b, x
93 mova m0, [src_rq + xq]
94 mova m1, [src_gq + xq]
95 mova m2, [src_bq + xq]
106 add src_rq, linesize_rq
107 add src_gq, linesize_gq
108 add src_bq, linesize_bq