FFmpeg coverage


Directory: ../../../ffmpeg/
File: src/libavfilter/x86/vf_pullup_init.c
Date: 2022-12-09 07:38:14
Exec Total Coverage
Lines: 4 7 57.1%
Functions: 1 1 100.0%
Branches: 1 2 50.0%

Line Branch Exec Source
1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #include "libavutil/attributes.h"
20 #include "libavutil/cpu.h"
21 #include "libavutil/x86/asm.h"
22 #include "libavutil/x86/cpu.h"
23 #include "libavfilter/vf_pullup.h"
24
25 int ff_pullup_filter_diff_mmx(const uint8_t *a, const uint8_t *b, ptrdiff_t s);
26 int ff_pullup_filter_comb_mmx(const uint8_t *a, const uint8_t *b, ptrdiff_t s);
27 int ff_pullup_filter_var_mmx (const uint8_t *a, const uint8_t *b, ptrdiff_t s);
28
29 12 av_cold void ff_pullup_init_x86(PullupContext *s)
30 {
31 #if HAVE_X86ASM
32 12 int cpu_flags = av_get_cpu_flags();
33
34
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 12 times.
12 if (EXTERNAL_MMX(cpu_flags)) {
35 s->diff = ff_pullup_filter_diff_mmx;
36 s->comb = ff_pullup_filter_comb_mmx;
37 s->var = ff_pullup_filter_var_mmx;
38 }
39 #endif
40 12 }
41