| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at> | ||
| 3 | * Copyright (C) 2005 Nikolaj Poroshin <porosh3@psu.ru> | ||
| 4 | * | ||
| 5 | * This file is part of FFmpeg. | ||
| 6 | * | ||
| 7 | * FFmpeg is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 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 | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License along | ||
| 18 | * with FFmpeg; if not, write to the Free Software Foundation, Inc., | ||
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include "libavutil/attributes.h" | ||
| 23 | #include "libavutil/x86/cpu.h" | ||
| 24 | #include "libavfilter/vf_fsppdsp.h" | ||
| 25 | |||
| 26 | void ff_store_slice_sse2(uint8_t *dst, int16_t *src, | ||
| 27 | ptrdiff_t dst_stride, ptrdiff_t src_stride, | ||
| 28 | ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale); | ||
| 29 | void ff_store_slice2_sse2(uint8_t *dst, int16_t *src, | ||
| 30 | ptrdiff_t dst_stride, ptrdiff_t src_stride, | ||
| 31 | ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale); | ||
| 32 | void ff_mul_thrmat_sse2(const int16_t *thr_adr_noq, int16_t *thr_adr, int q); | ||
| 33 | void ff_column_fidct_sse2(const int16_t *thr_adr, const int16_t *data, int16_t *output, int cnt); | ||
| 34 | void ff_row_idct_mmx(const int16_t *workspace, int16_t *output_adr, ptrdiff_t output_stride, int cnt); | ||
| 35 | void ff_row_fdct_mmx(int16_t *data, const uint8_t *pixels, ptrdiff_t line_size, int cnt); | ||
| 36 | |||
| 37 | 42 | av_cold void ff_fsppdsp_init_x86(FSPPDSPContext *s) | |
| 38 | { | ||
| 39 | 42 | int cpu_flags = av_get_cpu_flags(); | |
| 40 | |||
| 41 |
2/2✓ Branch 0 taken 39 times.
✓ Branch 1 taken 3 times.
|
42 | if (EXTERNAL_MMX(cpu_flags)) { |
| 42 | 39 | s->row_idct = ff_row_idct_mmx; | |
| 43 | 39 | s->row_fdct = ff_row_fdct_mmx; | |
| 44 | } | ||
| 45 |
2/2✓ Branch 0 taken 30 times.
✓ Branch 1 taken 12 times.
|
42 | if (EXTERNAL_SSE2(cpu_flags)) { |
| 46 | 30 | s->store_slice = ff_store_slice_sse2; | |
| 47 | 30 | s->store_slice2 = ff_store_slice2_sse2; | |
| 48 | 30 | s->mul_thrmat = ff_mul_thrmat_sse2; | |
| 49 | 30 | s->column_fidct = ff_column_fidct_sse2; | |
| 50 | } | ||
| 51 | 42 | } | |
| 52 |