1 ;******************************************************************************
2 ;* SIMD-optimized UTVideo functions
3 ;* Copyright (c) 2017 Paul B Mahol
4 ;* Copyright (c) 2017 Jokyo Images
6 ;* This file is part of FFmpeg.
8 ;* FFmpeg is free software; you can redistribute it and/or
9 ;* modify it under the terms of the GNU Lesser General Public
10 ;* License as published by the Free Software Foundation; either
11 ;* version 2.1 of the License, or (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 GNU
16 ;* Lesser General Public License for more details.
18 ;* You should have received a copy of the GNU Lesser General Public
19 ;* License along with FFmpeg; if not, write to the Free Software
20 ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 ;******************************************************************************
23 %include "libavutil/x86/x86util.asm"
33 ;-------------------------------------------------------------------------------------------
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 ;-------------------------------------------------------------------------------------------
38 %macro RESTORE_RGB_PLANES 0
39 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
47 DEFINE_ARGS src_r, src_g, src_b, linesize_r, linesize_g, linesize_b, x
56 mova m0, [src_rq + xq]
57 mova m1, [src_gq + xq]
58 mova m2, [src_bq + xq]
67 add src_rq, linesize_rq
68 add src_gq, linesize_gq
69 add src_bq, linesize_bq
78 %if HAVE_AVX2_EXTERNAL
83 ;-------------------------------------------------------------------------------------------
84 ; void restore_rgb_planes10(uint16_t *src_r, uint16_t *src_g, uint16_t *src_b,
85 ; ptrdiff_t linesize_r, ptrdiff_t linesize_g, ptrdiff_t linesize_b,
86 ; int width, int height)
87 ;-------------------------------------------------------------------------------------------
88 %macro RESTORE_RGB_PLANES10 0
89 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
102 DEFINE_ARGS src_r, src_g, src_b, linesize_r, linesize_g, linesize_b, x
110 mova m0, [src_rq + xq]
111 mova m1, [src_gq + xq]
112 mova m2, [src_bq + xq]
123 add src_rq, linesize_rq
124 add src_gq, linesize_gq
125 add src_bq, linesize_bq
134 %if HAVE_AVX2_EXTERNAL