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"
28 pb_128: times 16 db 128
29 pw_512: times 8 dw 512
30 pw_1023: times 8 dw 1023
36 ; void restore_rgb_planes(uint8_t *src_r, uint8_t *src_g, uint8_t *src_b,
37 ; ptrdiff_t linesize_r, ptrdiff_t linesize_g, ptrdiff_t linesize_b,
38 ; int width, int height)
39 cglobal restore_rgb_planes, 8,9,4, src_r, src_g, src_b, linesize_r, linesize_g, linesize_b, w, h, x
50 mova m0, [src_rq + xq]
51 mova m1, [src_gq + xq]
52 mova m2, [src_bq + xq]
61 add src_rq, linesize_rq
62 add src_gq, linesize_gq
63 add src_bq, linesize_bq
68 cglobal restore_rgb_planes10, 8,9,5, src_r, src_g, src_b, linesize_r, linesize_g, linesize_b, w, h, x
83 mova m0, [src_rq + xq]
84 mova m1, [src_gq + xq]
85 mova m2, [src_bq + xq]
96 add src_rq, linesize_rq
97 add src_gq, linesize_gq
98 add src_bq, linesize_bq