Mercurial > libavcodec.hg
annotate x86/dnxhd_mmx.c @ 12471:d821f7c64fc9 libavcodec
Remove use of deprecated functions av_image_fill_pointers/linesizes in
libavcodec/utils.c, fix warnings.
author | stefano |
---|---|
date | Tue, 07 Sep 2010 21:24:03 +0000 |
parents | a5ddb39627fd |
children | 9fef0a8ddd63 |
rev | line source |
---|---|
8430 | 1 /* |
2 * VC3/DNxHD SIMD functions | |
3 * Copyright (c) 2007 Baptiste Coudurier <baptiste dot coudurier at smartjog dot com> | |
4 * | |
5 * VC-3 encoder funded by the British Broadcasting Corporation | |
6 * | |
7 * This file is part of FFmpeg. | |
8 * | |
9 * FFmpeg is free software; you can redistribute it and/or | |
10 * modify it under the terms of the GNU Lesser General Public | |
11 * License as published by the Free Software Foundation; either | |
12 * version 2.1 of the License, or (at your option) any later version. | |
13 * | |
14 * FFmpeg is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 * Lesser General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU Lesser General Public | |
20 * License along with FFmpeg; if not, write to the Free Software | |
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
22 */ | |
23 | |
24 #include "libavutil/x86_cpu.h" | |
25 #include "libavcodec/dnxhdenc.h" | |
26 | |
27 static void get_pixels_8x4_sym_sse2(DCTELEM *block, const uint8_t *pixels, int line_size) | |
28 { | |
29 __asm__ volatile( | |
30 "pxor %%xmm7, %%xmm7 \n\t" | |
31 "movq (%0), %%xmm0 \n\t" | |
32 "add %2, %0 \n\t" | |
33 "movq (%0), %%xmm1 \n\t" | |
34 "movq (%0, %2), %%xmm2 \n\t" | |
35 "movq (%0, %2,2), %%xmm3 \n\t" | |
36 "punpcklbw %%xmm7, %%xmm0 \n\t" | |
37 "punpcklbw %%xmm7, %%xmm1 \n\t" | |
38 "punpcklbw %%xmm7, %%xmm2 \n\t" | |
39 "punpcklbw %%xmm7, %%xmm3 \n\t" | |
40 "movdqa %%xmm0, (%1) \n\t" | |
41 "movdqa %%xmm1, 16(%1) \n\t" | |
42 "movdqa %%xmm2, 32(%1) \n\t" | |
43 "movdqa %%xmm3, 48(%1) \n\t" | |
44 "movdqa %%xmm3 , 64(%1) \n\t" | |
45 "movdqa %%xmm2 , 80(%1) \n\t" | |
46 "movdqa %%xmm1 , 96(%1) \n\t" | |
47 "movdqa %%xmm0, 112(%1) \n\t" | |
48 : "+r" (pixels) | |
49 : "r" (block), "r" ((x86_reg)line_size) | |
50 ); | |
51 } | |
52 | |
53 void ff_dnxhd_init_mmx(DNXHDEncContext *ctx) | |
54 { | |
12456
a5ddb39627fd
Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
stefano
parents:
12414
diff
changeset
|
55 if (mm_support() & AV_CPU_FLAG_SSE2) { |
8430 | 56 ctx->get_pixels_8x4_sym = get_pixels_8x4_sym_sse2; |
57 } | |
58 } |