Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | * Copyright (C) 2001-2011 Michael Niedermayer <michaelni@gmx.at> | ||
3 | * | ||
4 | * This file is part of FFmpeg. | ||
5 | * | ||
6 | * FFmpeg is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU Lesser General Public | ||
8 | * License as published by the Free Software Foundation; either | ||
9 | * version 2.1 of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * FFmpeg is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * Lesser General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU Lesser General Public | ||
17 | * License along with FFmpeg; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <inttypes.h> | ||
22 | #include "config.h" | ||
23 | #include "libswscale/swscale.h" | ||
24 | #include "libswscale/swscale_internal.h" | ||
25 | #include "libavutil/attributes.h" | ||
26 | #include "libavutil/avassert.h" | ||
27 | #include "libavutil/intreadwrite.h" | ||
28 | #include "libavutil/x86/cpu.h" | ||
29 | #include "libavutil/cpu.h" | ||
30 | #include "libavutil/mem_internal.h" | ||
31 | #include "libavutil/pixdesc.h" | ||
32 | |||
33 | const DECLARE_ALIGNED(8, uint64_t, ff_dither4)[2] = { | ||
34 | 0x0103010301030103LL, | ||
35 | 0x0200020002000200LL,}; | ||
36 | |||
37 | const DECLARE_ALIGNED(8, uint64_t, ff_dither8)[2] = { | ||
38 | 0x0602060206020602LL, | ||
39 | 0x0004000400040004LL,}; | ||
40 | |||
41 | #if HAVE_INLINE_ASM | ||
42 | |||
43 | DECLARE_ASM_CONST(8, uint64_t, bF8)= 0xF8F8F8F8F8F8F8F8LL; | ||
44 | DECLARE_ASM_CONST(8, uint64_t, bFC)= 0xFCFCFCFCFCFCFCFCLL; | ||
45 | |||
46 | DECLARE_ASM_CONST(8, uint64_t, M24A) = 0x00FF0000FF0000FFLL; | ||
47 | DECLARE_ASM_CONST(8, uint64_t, M24B) = 0xFF0000FF0000FF00LL; | ||
48 | DECLARE_ASM_CONST(8, uint64_t, M24C) = 0x0000FF0000FF0000LL; | ||
49 | |||
50 | // MMXEXT versions | ||
51 | #if HAVE_MMXEXT_INLINE | ||
52 | #undef RENAME | ||
53 | #undef COMPILE_TEMPLATE_MMXEXT | ||
54 | #define COMPILE_TEMPLATE_MMXEXT 1 | ||
55 | #define RENAME(a) a ## _mmxext | ||
56 | #include "swscale_template.c" | ||
57 | #endif | ||
58 | |||
59 | 22610881 | void ff_updateMMXDitherTables(SwsInternal *c, int dstY) | |
60 | { | ||
61 | 22610881 | const int dstH= c->opts.dst_h; | |
62 | 22610881 | const int flags= c->opts.flags; | |
63 | |||
64 | 22610881 | SwsPlane *lumPlane = &c->slice[c->numSlice-2].plane[0]; | |
65 | 22610881 | SwsPlane *chrUPlane = &c->slice[c->numSlice-2].plane[1]; | |
66 | 22610881 | SwsPlane *alpPlane = &c->slice[c->numSlice-2].plane[3]; | |
67 | |||
68 | 22610881 | int hasAlpha = c->needAlpha; | |
69 | 22610881 | int32_t *vLumFilterPos= c->vLumFilterPos; | |
70 | 22610881 | int32_t *vChrFilterPos= c->vChrFilterPos; | |
71 | 22610881 | int16_t *vLumFilter= c->vLumFilter; | |
72 | 22610881 | int16_t *vChrFilter= c->vChrFilter; | |
73 | 22610881 | int32_t *lumMmxFilter= c->lumMmxFilter; | |
74 | 22610881 | int32_t *chrMmxFilter= c->chrMmxFilter; | |
75 | 22610881 | int32_t av_unused *alpMmxFilter= c->alpMmxFilter; | |
76 | 22610881 | const int vLumFilterSize= c->vLumFilterSize; | |
77 | 22610881 | const int vChrFilterSize= c->vChrFilterSize; | |
78 | 22610881 | const int chrDstY= dstY>>c->chrDstVSubSample; | |
79 | 22610881 | const int firstLumSrcY= vLumFilterPos[dstY]; //First line needed as input | |
80 | 22610881 | const int firstChrSrcY= vChrFilterPos[chrDstY]; //First line needed as input | |
81 | |||
82 | 22610881 | c->blueDither= ff_dither8[dstY&1]; | |
83 |
4/4✓ Branch 0 taken 22411253 times.
✓ Branch 1 taken 199628 times.
✓ Branch 2 taken 51048 times.
✓ Branch 3 taken 22360205 times.
|
22610881 | if (c->opts.dst_format == AV_PIX_FMT_RGB555 || c->opts.dst_format == AV_PIX_FMT_BGR555) |
84 | 250676 | c->greenDither= ff_dither8[dstY&1]; | |
85 | else | ||
86 | 22360205 | c->greenDither= ff_dither4[dstY&1]; | |
87 | 22610881 | c->redDither= ff_dither8[(dstY+1)&1]; | |
88 |
2/2✓ Branch 0 taken 22461259 times.
✓ Branch 1 taken 149622 times.
|
22610881 | if (dstY < dstH - 2) { |
89 | 22461259 | const int16_t **lumSrcPtr = (const int16_t **)(void*) lumPlane->line + firstLumSrcY - lumPlane->sliceY; | |
90 | 22461259 | const int16_t **chrUSrcPtr = (const int16_t **)(void*) chrUPlane->line + firstChrSrcY - chrUPlane->sliceY; | |
91 |
2/2✓ Branch 0 taken 97859 times.
✓ Branch 1 taken 22363400 times.
|
22461259 | const int16_t **alpSrcPtr = (CONFIG_SWSCALE_ALPHA && hasAlpha) ? (const int16_t **)(void*) alpPlane->line + firstLumSrcY - alpPlane->sliceY : NULL; |
92 | |||
93 | int i; | ||
94 |
2/4✓ Branch 0 taken 22461259 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 22461259 times.
|
22461259 | if (firstLumSrcY < 0 || firstLumSrcY + vLumFilterSize > c->opts.src_h) { |
95 | ✗ | const int16_t **tmpY = (const int16_t **) lumPlane->tmp; | |
96 | |||
97 | ✗ | int neg = -firstLumSrcY, i, end = FFMIN(c->opts.src_h - firstLumSrcY, vLumFilterSize); | |
98 | ✗ | for (i = 0; i < neg; i++) | |
99 | ✗ | tmpY[i] = lumSrcPtr[neg]; | |
100 | ✗ | for ( ; i < end; i++) | |
101 | ✗ | tmpY[i] = lumSrcPtr[i]; | |
102 | ✗ | for ( ; i < vLumFilterSize; i++) | |
103 | ✗ | tmpY[i] = tmpY[i-1]; | |
104 | ✗ | lumSrcPtr = tmpY; | |
105 | |||
106 | ✗ | if (alpSrcPtr) { | |
107 | ✗ | const int16_t **tmpA = (const int16_t **) alpPlane->tmp; | |
108 | ✗ | for (i = 0; i < neg; i++) | |
109 | ✗ | tmpA[i] = alpSrcPtr[neg]; | |
110 | ✗ | for ( ; i < end; i++) | |
111 | ✗ | tmpA[i] = alpSrcPtr[i]; | |
112 | ✗ | for ( ; i < vLumFilterSize; i++) | |
113 | ✗ | tmpA[i] = tmpA[i - 1]; | |
114 | ✗ | alpSrcPtr = tmpA; | |
115 | } | ||
116 | } | ||
117 |
2/4✓ Branch 0 taken 22461259 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 22461259 times.
|
22461259 | if (firstChrSrcY < 0 || firstChrSrcY + vChrFilterSize > c->chrSrcH) { |
118 | ✗ | const int16_t **tmpU = (const int16_t **) chrUPlane->tmp; | |
119 | ✗ | int neg = -firstChrSrcY, i, end = FFMIN(c->chrSrcH - firstChrSrcY, vChrFilterSize); | |
120 | ✗ | for (i = 0; i < neg; i++) { | |
121 | ✗ | tmpU[i] = chrUSrcPtr[neg]; | |
122 | } | ||
123 | ✗ | for ( ; i < end; i++) { | |
124 | ✗ | tmpU[i] = chrUSrcPtr[i]; | |
125 | } | ||
126 | ✗ | for ( ; i < vChrFilterSize; i++) { | |
127 | ✗ | tmpU[i] = tmpU[i - 1]; | |
128 | } | ||
129 | ✗ | chrUSrcPtr = tmpU; | |
130 | } | ||
131 | |||
132 |
2/2✓ Branch 0 taken 21971512 times.
✓ Branch 1 taken 489747 times.
|
22461259 | if (flags & SWS_ACCURATE_RND) { |
133 | 21971512 | int s= APCK_SIZE / 8; | |
134 |
2/2✓ Branch 0 taken 23703936 times.
✓ Branch 1 taken 21971512 times.
|
45675448 | for (i=0; i<vLumFilterSize; i+=2) { |
135 | 23703936 | *(const void**)&lumMmxFilter[s*i ]= lumSrcPtr[i ]; | |
136 | 23703936 | *(const void**)&lumMmxFilter[s*i+APCK_PTR2/4 ]= lumSrcPtr[i+(vLumFilterSize>1)]; | |
137 | 23703936 | lumMmxFilter[s*i+APCK_COEF/4 ]= | |
138 | 47407872 | lumMmxFilter[s*i+APCK_COEF/4+1]= vLumFilter[dstY*vLumFilterSize + i ] | |
139 |
2/2✓ Branch 0 taken 4968412 times.
✓ Branch 1 taken 18735524 times.
|
23703936 | + (vLumFilterSize>1 ? vLumFilter[dstY*vLumFilterSize + i + 1] * (1 << 16) : 0); |
140 |
2/2✓ Branch 0 taken 118544 times.
✓ Branch 1 taken 23585392 times.
|
23703936 | if (CONFIG_SWSCALE_ALPHA && hasAlpha) { |
141 | 118544 | *(const void**)&alpMmxFilter[s*i ]= alpSrcPtr[i ]; | |
142 | 118544 | *(const void**)&alpMmxFilter[s*i+APCK_PTR2/4 ]= alpSrcPtr[i+(vLumFilterSize>1)]; | |
143 | 118544 | alpMmxFilter[s*i+APCK_COEF/4 ]= | |
144 | 118544 | alpMmxFilter[s*i+APCK_COEF/4+1]= lumMmxFilter[s*i+APCK_COEF/4 ]; | |
145 | } | ||
146 | } | ||
147 |
2/2✓ Branch 0 taken 38680758 times.
✓ Branch 1 taken 21971512 times.
|
60652270 | for (i=0; i<vChrFilterSize; i+=2) { |
148 | 38680758 | *(const void**)&chrMmxFilter[s*i ]= chrUSrcPtr[i ]; | |
149 | 38680758 | *(const void**)&chrMmxFilter[s*i+APCK_PTR2/4 ]= chrUSrcPtr[i+(vChrFilterSize>1)]; | |
150 | 38680758 | chrMmxFilter[s*i+APCK_COEF/4 ]= | |
151 | 77361516 | chrMmxFilter[s*i+APCK_COEF/4+1]= vChrFilter[chrDstY*vChrFilterSize + i ] | |
152 |
2/2✓ Branch 0 taken 28137046 times.
✓ Branch 1 taken 10543712 times.
|
38680758 | + (vChrFilterSize>1 ? vChrFilter[chrDstY*vChrFilterSize + i + 1] * (1 << 16) : 0); |
153 | } | ||
154 | } else { | ||
155 |
2/2✓ Branch 0 taken 1376368 times.
✓ Branch 1 taken 489747 times.
|
1866115 | for (i=0; i<vLumFilterSize; i++) { |
156 | 1376368 | *(const void**)&lumMmxFilter[4*i+0]= lumSrcPtr[i]; | |
157 | 1376368 | lumMmxFilter[4*i+2]= | |
158 | 1376368 | lumMmxFilter[4*i+3]= | |
159 | 1376368 | ((uint16_t)vLumFilter[dstY*vLumFilterSize + i])*0x10001U; | |
160 |
2/2✓ Branch 0 taken 26510 times.
✓ Branch 1 taken 1349858 times.
|
1376368 | if (CONFIG_SWSCALE_ALPHA && hasAlpha) { |
161 | 26510 | *(const void**)&alpMmxFilter[4*i+0]= alpSrcPtr[i]; | |
162 | 26510 | alpMmxFilter[4*i+2]= | |
163 | 26510 | alpMmxFilter[4*i+3]= lumMmxFilter[4*i+2]; | |
164 | } | ||
165 | } | ||
166 |
2/2✓ Branch 0 taken 1928580 times.
✓ Branch 1 taken 489747 times.
|
2418327 | for (i=0; i<vChrFilterSize; i++) { |
167 | 1928580 | *(const void**)&chrMmxFilter[4*i+0]= chrUSrcPtr[i]; | |
168 | 1928580 | chrMmxFilter[4*i+2]= | |
169 | 1928580 | chrMmxFilter[4*i+3]= | |
170 | 1928580 | ((uint16_t)vChrFilter[chrDstY*vChrFilterSize + i])*0x10001U; | |
171 | } | ||
172 | } | ||
173 | } | ||
174 | 22610881 | } | |
175 | #endif /* HAVE_INLINE_ASM */ | ||
176 | |||
177 | #define YUV2YUVX_FUNC_MMX(opt, step) \ | ||
178 | void ff_yuv2yuvX_ ##opt(const int16_t *filter, int filterSize, int srcOffset, \ | ||
179 | uint8_t *dest, int dstW, \ | ||
180 | const uint8_t *dither, int offset); \ | ||
181 | static void yuv2yuvX_ ##opt(const int16_t *filter, int filterSize, \ | ||
182 | const int16_t **src, uint8_t *dest, int dstW, \ | ||
183 | const uint8_t *dither, int offset) \ | ||
184 | { \ | ||
185 | if(dstW > 0) \ | ||
186 | ff_yuv2yuvX_ ##opt(filter, filterSize - 1, 0, dest - offset, dstW + offset, dither, offset); \ | ||
187 | return; \ | ||
188 | } | ||
189 | |||
190 | #define YUV2YUVX_FUNC(opt, step) \ | ||
191 | void ff_yuv2yuvX_ ##opt(const int16_t *filter, int filterSize, int srcOffset, \ | ||
192 | uint8_t *dest, int dstW, \ | ||
193 | const uint8_t *dither, int offset); \ | ||
194 | static void yuv2yuvX_ ##opt(const int16_t *filter, int filterSize, \ | ||
195 | const int16_t **src, uint8_t *dest, int dstW, \ | ||
196 | const uint8_t *dither, int offset) \ | ||
197 | { \ | ||
198 | int remainder = (dstW % step); \ | ||
199 | int pixelsProcessed = dstW - remainder; \ | ||
200 | if(((uintptr_t)dest) & 15){ \ | ||
201 | yuv2yuvX_mmxext(filter, filterSize, src, dest, dstW, dither, offset); \ | ||
202 | return; \ | ||
203 | } \ | ||
204 | if(pixelsProcessed > 0) \ | ||
205 | ff_yuv2yuvX_ ##opt(filter, filterSize - 1, 0, dest - offset, pixelsProcessed + offset, dither, offset); \ | ||
206 | if(remainder > 0){ \ | ||
207 | ff_yuv2yuvX_mmxext(filter, filterSize - 1, pixelsProcessed, dest - offset, pixelsProcessed + remainder + offset, dither, offset); \ | ||
208 | } \ | ||
209 | return; \ | ||
210 | } | ||
211 | |||
212 | #if HAVE_MMXEXT_EXTERNAL | ||
213 |
1/2✓ Branch 0 taken 76 times.
✗ Branch 1 not taken.
|
76 | YUV2YUVX_FUNC_MMX(mmxext, 16) |
214 | #endif | ||
215 | #if HAVE_SSE3_EXTERNAL | ||
216 |
5/6✗ Branch 0 not taken.
✓ Branch 1 taken 76 times.
✓ Branch 3 taken 64 times.
✓ Branch 4 taken 12 times.
✓ Branch 6 taken 44 times.
✓ Branch 7 taken 32 times.
|
76 | YUV2YUVX_FUNC(sse3, 32) |
217 | #endif | ||
218 | #if HAVE_AVX2_EXTERNAL | ||
219 |
5/6✗ Branch 0 not taken.
✓ Branch 1 taken 76 times.
✓ Branch 3 taken 64 times.
✓ Branch 4 taken 12 times.
✓ Branch 6 taken 60 times.
✓ Branch 7 taken 16 times.
|
76 | YUV2YUVX_FUNC(avx2, 64) |
220 | #endif | ||
221 | |||
222 | #define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt) \ | ||
223 | void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( \ | ||
224 | SwsInternal *c, int16_t *data, \ | ||
225 | int dstW, const uint8_t *src, \ | ||
226 | const int16_t *filter, \ | ||
227 | const int32_t *filterPos, int filterSize) | ||
228 | |||
229 | #define SCALE_FUNCS(filter_n, opt) \ | ||
230 | SCALE_FUNC(filter_n, 8, 15, opt); \ | ||
231 | SCALE_FUNC(filter_n, 9, 15, opt); \ | ||
232 | SCALE_FUNC(filter_n, 10, 15, opt); \ | ||
233 | SCALE_FUNC(filter_n, 12, 15, opt); \ | ||
234 | SCALE_FUNC(filter_n, 14, 15, opt); \ | ||
235 | SCALE_FUNC(filter_n, 16, 15, opt); \ | ||
236 | SCALE_FUNC(filter_n, 8, 19, opt); \ | ||
237 | SCALE_FUNC(filter_n, 9, 19, opt); \ | ||
238 | SCALE_FUNC(filter_n, 10, 19, opt); \ | ||
239 | SCALE_FUNC(filter_n, 12, 19, opt); \ | ||
240 | SCALE_FUNC(filter_n, 14, 19, opt); \ | ||
241 | SCALE_FUNC(filter_n, 16, 19, opt) | ||
242 | |||
243 | #define SCALE_FUNCS_MMX(opt) \ | ||
244 | SCALE_FUNCS(4, opt); \ | ||
245 | SCALE_FUNCS(8, opt); \ | ||
246 | SCALE_FUNCS(X, opt) | ||
247 | |||
248 | #define SCALE_FUNCS_SSE(opt) \ | ||
249 | SCALE_FUNCS(4, opt); \ | ||
250 | SCALE_FUNCS(8, opt); \ | ||
251 | SCALE_FUNCS(X4, opt); \ | ||
252 | SCALE_FUNCS(X8, opt) | ||
253 | |||
254 | SCALE_FUNCS_SSE(sse2); | ||
255 | SCALE_FUNCS_SSE(ssse3); | ||
256 | SCALE_FUNCS_SSE(sse4); | ||
257 | |||
258 | SCALE_FUNC(4, 8, 15, avx2); | ||
259 | SCALE_FUNC(X4, 8, 15, avx2); | ||
260 | |||
261 | #define VSCALEX_FUNC(size, opt) \ | ||
262 | void ff_yuv2planeX_ ## size ## _ ## opt(const int16_t *filter, int filterSize, \ | ||
263 | const int16_t **src, uint8_t *dest, int dstW, \ | ||
264 | const uint8_t *dither, int offset) | ||
265 | #define VSCALEX_FUNCS(opt) \ | ||
266 | VSCALEX_FUNC(8, opt); \ | ||
267 | VSCALEX_FUNC(9, opt); \ | ||
268 | VSCALEX_FUNC(10, opt) | ||
269 | |||
270 | VSCALEX_FUNC(8, mmxext); | ||
271 | VSCALEX_FUNCS(sse2); | ||
272 | VSCALEX_FUNCS(sse4); | ||
273 | VSCALEX_FUNC(16, sse4); | ||
274 | VSCALEX_FUNCS(avx); | ||
275 | |||
276 | #define VSCALE_FUNC(size, opt) \ | ||
277 | void ff_yuv2plane1_ ## size ## _ ## opt(const int16_t *src, uint8_t *dst, int dstW, \ | ||
278 | const uint8_t *dither, int offset) | ||
279 | #define VSCALE_FUNCS(opt1, opt2) \ | ||
280 | VSCALE_FUNC(8, opt1); \ | ||
281 | VSCALE_FUNC(9, opt2); \ | ||
282 | VSCALE_FUNC(10, opt2); \ | ||
283 | VSCALE_FUNC(16, opt1) | ||
284 | |||
285 | VSCALE_FUNCS(sse2, sse2); | ||
286 | VSCALE_FUNC(16, sse4); | ||
287 | VSCALE_FUNCS(avx, avx); | ||
288 | |||
289 | #define INPUT_Y_FUNC(fmt, opt) \ | ||
290 | void ff_ ## fmt ## ToY_ ## opt(uint8_t *dst, const uint8_t *src, \ | ||
291 | const uint8_t *unused1, const uint8_t *unused2, \ | ||
292 | int w, uint32_t *unused, void *opq) | ||
293 | #define INPUT_UV_FUNC(fmt, opt) \ | ||
294 | void ff_ ## fmt ## ToUV_ ## opt(uint8_t *dstU, uint8_t *dstV, \ | ||
295 | const uint8_t *unused0, \ | ||
296 | const uint8_t *src1, \ | ||
297 | const uint8_t *src2, \ | ||
298 | int w, uint32_t *unused, void *opq) | ||
299 | #define INPUT_FUNC(fmt, opt) \ | ||
300 | INPUT_Y_FUNC(fmt, opt); \ | ||
301 | INPUT_UV_FUNC(fmt, opt) | ||
302 | #define INPUT_FUNCS(opt) \ | ||
303 | INPUT_FUNC(uyvy, opt); \ | ||
304 | INPUT_FUNC(yuyv, opt); \ | ||
305 | INPUT_UV_FUNC(nv12, opt); \ | ||
306 | INPUT_UV_FUNC(nv21, opt); \ | ||
307 | INPUT_FUNC(rgba, opt); \ | ||
308 | INPUT_FUNC(bgra, opt); \ | ||
309 | INPUT_FUNC(argb, opt); \ | ||
310 | INPUT_FUNC(abgr, opt); \ | ||
311 | INPUT_FUNC(rgb24, opt); \ | ||
312 | INPUT_FUNC(bgr24, opt) | ||
313 | |||
314 | INPUT_FUNCS(sse2); | ||
315 | INPUT_FUNCS(ssse3); | ||
316 | INPUT_FUNCS(avx); | ||
317 | INPUT_FUNC(rgba, avx2); | ||
318 | INPUT_FUNC(bgra, avx2); | ||
319 | INPUT_FUNC(argb, avx2); | ||
320 | INPUT_FUNC(abgr, avx2); | ||
321 | INPUT_FUNC(rgb24, avx2); | ||
322 | INPUT_FUNC(bgr24, avx2); | ||
323 | |||
324 | #if ARCH_X86_64 | ||
325 | #define YUV2NV_DECL(fmt, opt) \ | ||
326 | void ff_yuv2 ## fmt ## cX_ ## opt(enum AVPixelFormat format, const uint8_t *dither, \ | ||
327 | const int16_t *filter, int filterSize, \ | ||
328 | const int16_t **u, const int16_t **v, \ | ||
329 | uint8_t *dst, int dstWidth) | ||
330 | |||
331 | YUV2NV_DECL(nv12, avx2); | ||
332 | YUV2NV_DECL(nv21, avx2); | ||
333 | |||
334 | #define YUV2GBRP_FN_DECL(fmt, opt) \ | ||
335 | void ff_yuv2##fmt##_full_X_ ##opt(SwsInternal *c, const int16_t *lumFilter, \ | ||
336 | const int16_t **lumSrcx, int lumFilterSize, \ | ||
337 | const int16_t *chrFilter, const int16_t **chrUSrcx, \ | ||
338 | const int16_t **chrVSrcx, int chrFilterSize, \ | ||
339 | const int16_t **alpSrcx, uint8_t **dest, \ | ||
340 | int dstW, int y) | ||
341 | |||
342 | #define YUV2GBRP_DECL(opt) \ | ||
343 | YUV2GBRP_FN_DECL(gbrp, opt); \ | ||
344 | YUV2GBRP_FN_DECL(gbrap, opt); \ | ||
345 | YUV2GBRP_FN_DECL(gbrp9le, opt); \ | ||
346 | YUV2GBRP_FN_DECL(gbrp10le, opt); \ | ||
347 | YUV2GBRP_FN_DECL(gbrap10le, opt); \ | ||
348 | YUV2GBRP_FN_DECL(gbrp12le, opt); \ | ||
349 | YUV2GBRP_FN_DECL(gbrap12le, opt); \ | ||
350 | YUV2GBRP_FN_DECL(gbrp14le, opt); \ | ||
351 | YUV2GBRP_FN_DECL(gbrp16le, opt); \ | ||
352 | YUV2GBRP_FN_DECL(gbrap16le, opt); \ | ||
353 | YUV2GBRP_FN_DECL(gbrpf32le, opt); \ | ||
354 | YUV2GBRP_FN_DECL(gbrapf32le, opt); \ | ||
355 | YUV2GBRP_FN_DECL(gbrp9be, opt); \ | ||
356 | YUV2GBRP_FN_DECL(gbrp10be, opt); \ | ||
357 | YUV2GBRP_FN_DECL(gbrap10be, opt); \ | ||
358 | YUV2GBRP_FN_DECL(gbrp12be, opt); \ | ||
359 | YUV2GBRP_FN_DECL(gbrap12be, opt); \ | ||
360 | YUV2GBRP_FN_DECL(gbrp14be, opt); \ | ||
361 | YUV2GBRP_FN_DECL(gbrp16be, opt); \ | ||
362 | YUV2GBRP_FN_DECL(gbrap16be, opt); \ | ||
363 | YUV2GBRP_FN_DECL(gbrpf32be, opt); \ | ||
364 | YUV2GBRP_FN_DECL(gbrapf32be, opt) | ||
365 | |||
366 | YUV2GBRP_DECL(sse2); | ||
367 | YUV2GBRP_DECL(sse4); | ||
368 | YUV2GBRP_DECL(avx2); | ||
369 | |||
370 | #define INPUT_PLANAR_RGB_Y_FN_DECL(fmt, opt) \ | ||
371 | void ff_planar_##fmt##_to_y_##opt(uint8_t *dst, \ | ||
372 | const uint8_t *src[4], int w, int32_t *rgb2yuv, \ | ||
373 | void *opq) | ||
374 | |||
375 | #define INPUT_PLANAR_RGB_UV_FN_DECL(fmt, opt) \ | ||
376 | void ff_planar_##fmt##_to_uv_##opt(uint8_t *dstU, uint8_t *dstV, \ | ||
377 | const uint8_t *src[4], int w, int32_t *rgb2yuv, \ | ||
378 | void *opq) | ||
379 | |||
380 | #define INPUT_PLANAR_RGB_A_FN_DECL(fmt, opt) \ | ||
381 | void ff_planar_##fmt##_to_a_##opt(uint8_t *dst, \ | ||
382 | const uint8_t *src[4], int w, int32_t *rgb2yuv, \ | ||
383 | void *opq) | ||
384 | |||
385 | |||
386 | #define INPUT_PLANAR_RGBXX_A_DECL(fmt, opt) \ | ||
387 | INPUT_PLANAR_RGB_A_FN_DECL(fmt##le, opt); \ | ||
388 | INPUT_PLANAR_RGB_A_FN_DECL(fmt##be, opt) | ||
389 | |||
390 | #define INPUT_PLANAR_RGBXX_Y_DECL(fmt, opt) \ | ||
391 | INPUT_PLANAR_RGB_Y_FN_DECL(fmt##le, opt); \ | ||
392 | INPUT_PLANAR_RGB_Y_FN_DECL(fmt##be, opt) | ||
393 | |||
394 | #define INPUT_PLANAR_RGBXX_UV_DECL(fmt, opt) \ | ||
395 | INPUT_PLANAR_RGB_UV_FN_DECL(fmt##le, opt); \ | ||
396 | INPUT_PLANAR_RGB_UV_FN_DECL(fmt##be, opt) | ||
397 | |||
398 | #define INPUT_PLANAR_RGBXX_YUVA_DECL(fmt, opt) \ | ||
399 | INPUT_PLANAR_RGBXX_Y_DECL(fmt, opt); \ | ||
400 | INPUT_PLANAR_RGBXX_UV_DECL(fmt, opt); \ | ||
401 | INPUT_PLANAR_RGBXX_A_DECL(fmt, opt) | ||
402 | |||
403 | #define INPUT_PLANAR_RGBXX_YUV_DECL(fmt, opt) \ | ||
404 | INPUT_PLANAR_RGBXX_Y_DECL(fmt, opt); \ | ||
405 | INPUT_PLANAR_RGBXX_UV_DECL(fmt, opt) | ||
406 | |||
407 | #define INPUT_PLANAR_RGBXX_UVA_DECL(fmt, opt) \ | ||
408 | INPUT_PLANAR_RGBXX_UV_DECL(fmt, opt); \ | ||
409 | INPUT_PLANAR_RGBXX_A_DECL(fmt, opt) | ||
410 | |||
411 | #define INPUT_PLANAR_RGB_A_ALL_DECL(opt) \ | ||
412 | INPUT_PLANAR_RGB_A_FN_DECL(rgb, opt); \ | ||
413 | INPUT_PLANAR_RGBXX_A_DECL(rgb10, opt); \ | ||
414 | INPUT_PLANAR_RGBXX_A_DECL(rgb12, opt); \ | ||
415 | INPUT_PLANAR_RGBXX_A_DECL(rgb16, opt); \ | ||
416 | INPUT_PLANAR_RGBXX_A_DECL(rgbf32, opt) | ||
417 | |||
418 | #define INPUT_PLANAR_RGB_Y_ALL_DECL(opt) \ | ||
419 | INPUT_PLANAR_RGB_Y_FN_DECL(rgb, opt); \ | ||
420 | INPUT_PLANAR_RGBXX_Y_DECL(rgb9, opt); \ | ||
421 | INPUT_PLANAR_RGBXX_Y_DECL(rgb10, opt); \ | ||
422 | INPUT_PLANAR_RGBXX_Y_DECL(rgb12, opt); \ | ||
423 | INPUT_PLANAR_RGBXX_Y_DECL(rgb14, opt); \ | ||
424 | INPUT_PLANAR_RGBXX_Y_DECL(rgb16, opt); \ | ||
425 | INPUT_PLANAR_RGBXX_Y_DECL(rgbf32, opt) | ||
426 | |||
427 | #define INPUT_PLANAR_RGB_UV_ALL_DECL(opt) \ | ||
428 | INPUT_PLANAR_RGB_UV_FN_DECL(rgb, opt); \ | ||
429 | INPUT_PLANAR_RGBXX_UV_DECL(rgb9, opt); \ | ||
430 | INPUT_PLANAR_RGBXX_UV_DECL(rgb10, opt); \ | ||
431 | INPUT_PLANAR_RGBXX_UV_DECL(rgb12, opt); \ | ||
432 | INPUT_PLANAR_RGBXX_UV_DECL(rgb14, opt); \ | ||
433 | INPUT_PLANAR_RGBXX_UV_DECL(rgb16, opt); \ | ||
434 | INPUT_PLANAR_RGBXX_UV_DECL(rgbf32, opt) | ||
435 | |||
436 | INPUT_PLANAR_RGBXX_Y_DECL(rgbf32, sse2); | ||
437 | INPUT_PLANAR_RGB_UV_ALL_DECL(sse2); | ||
438 | INPUT_PLANAR_RGB_A_ALL_DECL(sse2); | ||
439 | |||
440 | INPUT_PLANAR_RGB_Y_ALL_DECL(sse4); | ||
441 | INPUT_PLANAR_RGB_UV_ALL_DECL(sse4); | ||
442 | INPUT_PLANAR_RGBXX_A_DECL(rgbf32, sse4); | ||
443 | |||
444 | INPUT_PLANAR_RGB_Y_ALL_DECL(avx2); | ||
445 | INPUT_PLANAR_RGB_UV_ALL_DECL(avx2); | ||
446 | INPUT_PLANAR_RGB_A_ALL_DECL(avx2); | ||
447 | #endif | ||
448 | |||
449 | #define RANGE_CONVERT_FUNCS(opt, bpc) do { \ | ||
450 | if (c->opts.src_range) { \ | ||
451 | c->lumConvertRange = ff_lumRangeFromJpeg##bpc##_##opt; \ | ||
452 | c->chrConvertRange = ff_chrRangeFromJpeg##bpc##_##opt; \ | ||
453 | } else { \ | ||
454 | c->lumConvertRange = ff_lumRangeToJpeg##bpc##_##opt; \ | ||
455 | c->chrConvertRange = ff_chrRangeToJpeg##bpc##_##opt; \ | ||
456 | } \ | ||
457 | } while (0) | ||
458 | |||
459 | #define RANGE_CONVERT_FUNCS_DECL(opt, bpc) \ | ||
460 | void ff_lumRangeFromJpeg##bpc##_##opt(int16_t *dst, int width, \ | ||
461 | uint32_t coeff, int64_t offset); \ | ||
462 | void ff_chrRangeFromJpeg##bpc##_##opt(int16_t *dstU, int16_t *dstV, int width, \ | ||
463 | uint32_t coeff, int64_t offset); \ | ||
464 | void ff_lumRangeToJpeg##bpc##_##opt(int16_t *dst, int width, \ | ||
465 | uint32_t coeff, int64_t offset); \ | ||
466 | void ff_chrRangeToJpeg##bpc##_##opt(int16_t *dstU, int16_t *dstV, int width, \ | ||
467 | uint32_t coeff, int64_t offset); \ | ||
468 | |||
469 | RANGE_CONVERT_FUNCS_DECL(sse2, 8) | ||
470 | RANGE_CONVERT_FUNCS_DECL(sse4, 16) | ||
471 | RANGE_CONVERT_FUNCS_DECL(avx2, 8) | ||
472 | RANGE_CONVERT_FUNCS_DECL(avx2, 16) | ||
473 | |||
474 | 3799 | av_cold void ff_sws_init_range_convert_x86(SwsInternal *c) | |
475 | { | ||
476 | 3799 | int cpu_flags = av_get_cpu_flags(); | |
477 |
3/4✓ Branch 0 taken 24 times.
✓ Branch 1 taken 3775 times.
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
|
3799 | if (EXTERNAL_AVX2_FAST(cpu_flags)) { |
478 |
2/2✓ Branch 0 taken 20 times.
✓ Branch 1 taken 4 times.
|
24 | if (c->dstBpc <= 14) { |
479 |
2/2✓ Branch 0 taken 10 times.
✓ Branch 1 taken 10 times.
|
20 | RANGE_CONVERT_FUNCS(avx2, 8); |
480 | } else { | ||
481 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
|
4 | RANGE_CONVERT_FUNCS(avx2, 16); |
482 | } | ||
483 |
4/4✓ Branch 0 taken 192 times.
✓ Branch 1 taken 3583 times.
✓ Branch 2 taken 160 times.
✓ Branch 3 taken 32 times.
|
3775 | } else if (EXTERNAL_SSE2(cpu_flags) && c->dstBpc <= 14) { |
484 |
2/2✓ Branch 0 taken 80 times.
✓ Branch 1 taken 80 times.
|
160 | RANGE_CONVERT_FUNCS(sse2, 8); |
485 |
3/4✓ Branch 0 taken 20 times.
✓ Branch 1 taken 3595 times.
✓ Branch 2 taken 20 times.
✗ Branch 3 not taken.
|
3615 | } else if (EXTERNAL_SSE4(cpu_flags) && c->dstBpc > 14) { |
486 |
2/2✓ Branch 0 taken 10 times.
✓ Branch 1 taken 10 times.
|
20 | RANGE_CONVERT_FUNCS(sse4, 16); |
487 | } | ||
488 | 3799 | } | |
489 | |||
490 | 33058 | av_cold void ff_sws_init_swscale_x86(SwsInternal *c) | |
491 | { | ||
492 | 33058 | int cpu_flags = av_get_cpu_flags(); | |
493 | |||
494 | #if HAVE_MMXEXT_INLINE | ||
495 |
2/2✓ Branch 0 taken 11799 times.
✓ Branch 1 taken 21259 times.
|
33058 | if (INLINE_MMXEXT(cpu_flags)) |
496 | 11799 | sws_init_swscale_mmxext(c); | |
497 | #endif | ||
498 |
3/4✓ Branch 0 taken 2485 times.
✓ Branch 1 taken 30573 times.
✓ Branch 2 taken 2485 times.
✗ Branch 3 not taken.
|
33058 | if(c->use_mmx_vfilter && !(c->opts.flags & SWS_ACCURATE_RND)) { |
499 | #if HAVE_MMXEXT_EXTERNAL | ||
500 |
1/2✓ Branch 0 taken 2485 times.
✗ Branch 1 not taken.
|
2485 | if (EXTERNAL_MMXEXT(cpu_flags)) |
501 | 2485 | c->yuv2planeX = yuv2yuvX_mmxext; | |
502 | #endif | ||
503 | #if HAVE_SSE3_EXTERNAL | ||
504 |
2/2✓ Branch 0 taken 1819 times.
✓ Branch 1 taken 666 times.
|
2485 | if (EXTERNAL_SSE3(cpu_flags)) |
505 | 1819 | c->yuv2planeX = yuv2yuvX_sse3; | |
506 | #endif | ||
507 | #if HAVE_AVX2_EXTERNAL | ||
508 |
3/4✓ Branch 0 taken 265 times.
✓ Branch 1 taken 2220 times.
✓ Branch 2 taken 265 times.
✗ Branch 3 not taken.
|
2485 | if (EXTERNAL_AVX2_FAST(cpu_flags)) |
509 | 265 | c->yuv2planeX = yuv2yuvX_avx2; | |
510 | #endif | ||
511 | } | ||
512 | #if ARCH_X86_32 && !HAVE_ALIGNED_STACK | ||
513 | // The better yuv2planeX_8 functions need aligned stack on x86-32, | ||
514 | // so we use MMXEXT in this case if they are not available. | ||
515 | if (EXTERNAL_MMXEXT(cpu_flags)) { | ||
516 | if (c->dstBpc == 8 && !c->use_mmx_vfilter) | ||
517 | c->yuv2planeX = ff_yuv2planeX_8_mmxext; | ||
518 | } | ||
519 | #endif /* ARCH_X86_32 && !HAVE_ALIGNED_STACK */ | ||
520 | |||
521 | #define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt1, opt2) do { \ | ||
522 | if (c->srcBpc == 8) { \ | ||
523 | hscalefn = c->dstBpc <= 14 ? ff_hscale8to15_ ## filtersize ## _ ## opt2 : \ | ||
524 | ff_hscale8to19_ ## filtersize ## _ ## opt1; \ | ||
525 | } else if (c->srcBpc == 9) { \ | ||
526 | hscalefn = c->dstBpc <= 14 ? ff_hscale9to15_ ## filtersize ## _ ## opt2 : \ | ||
527 | ff_hscale9to19_ ## filtersize ## _ ## opt1; \ | ||
528 | } else if (c->srcBpc == 10) { \ | ||
529 | hscalefn = c->dstBpc <= 14 ? ff_hscale10to15_ ## filtersize ## _ ## opt2 : \ | ||
530 | ff_hscale10to19_ ## filtersize ## _ ## opt1; \ | ||
531 | } else if (c->srcBpc == 12) { \ | ||
532 | hscalefn = c->dstBpc <= 14 ? ff_hscale12to15_ ## filtersize ## _ ## opt2 : \ | ||
533 | ff_hscale12to19_ ## filtersize ## _ ## opt1; \ | ||
534 | } else if (c->srcBpc == 14 || ((c->opts.src_format==AV_PIX_FMT_PAL8||isAnyRGB(c->opts.src_format)) && av_pix_fmt_desc_get(c->opts.src_format)->comp[0].depth<16)) { \ | ||
535 | hscalefn = c->dstBpc <= 14 ? ff_hscale14to15_ ## filtersize ## _ ## opt2 : \ | ||
536 | ff_hscale14to19_ ## filtersize ## _ ## opt1; \ | ||
537 | } else { /* c->srcBpc == 16 */ \ | ||
538 | av_assert0(c->srcBpc == 16);\ | ||
539 | hscalefn = c->dstBpc <= 14 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \ | ||
540 | ff_hscale16to19_ ## filtersize ## _ ## opt1; \ | ||
541 | } \ | ||
542 | } while (0) | ||
543 | #define ASSIGN_VSCALEX_FUNC(vscalefn, opt, do_16_case, condition_8bit) \ | ||
544 | switch(c->dstBpc){ \ | ||
545 | case 16: do_16_case; break; \ | ||
546 | case 10: if (!isBE(c->opts.dst_format) && !isSemiPlanarYUV(c->opts.dst_format)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \ | ||
547 | case 9: if (!isBE(c->opts.dst_format)) vscalefn = ff_yuv2planeX_9_ ## opt; break; \ | ||
548 | case 8: if ((condition_8bit) && !c->use_mmx_vfilter) vscalefn = ff_yuv2planeX_8_ ## opt; break; \ | ||
549 | } | ||
550 | #define ASSIGN_VSCALE_FUNC(vscalefn, opt) \ | ||
551 | switch(c->dstBpc){ \ | ||
552 | case 16: if (!isBE(c->opts.dst_format)) vscalefn = ff_yuv2plane1_16_ ## opt; break; \ | ||
553 | case 10: if (!isBE(c->opts.dst_format) && !isSemiPlanarYUV(c->opts.dst_format)) vscalefn = ff_yuv2plane1_10_ ## opt; break; \ | ||
554 | case 9: if (!isBE(c->opts.dst_format)) vscalefn = ff_yuv2plane1_9_ ## opt; break; \ | ||
555 | case 8: vscalefn = ff_yuv2plane1_8_ ## opt; break; \ | ||
556 | default: av_assert0(c->dstBpc>8); \ | ||
557 | } | ||
558 | #define case_rgb(x, X, opt) \ | ||
559 | case AV_PIX_FMT_ ## X: \ | ||
560 | c->lumToYV12 = ff_ ## x ## ToY_ ## opt; \ | ||
561 | if (!c->chrSrcHSubSample) \ | ||
562 | c->chrToYV12 = ff_ ## x ## ToUV_ ## opt; \ | ||
563 | break | ||
564 | #define ASSIGN_SSE_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \ | ||
565 | switch (filtersize) { \ | ||
566 | case 4: ASSIGN_SCALE_FUNC2(hscalefn, 4, opt1, opt2); break; \ | ||
567 | case 8: ASSIGN_SCALE_FUNC2(hscalefn, 8, opt1, opt2); break; \ | ||
568 | default: if (filtersize & 4) ASSIGN_SCALE_FUNC2(hscalefn, X4, opt1, opt2); \ | ||
569 | else ASSIGN_SCALE_FUNC2(hscalefn, X8, opt1, opt2); \ | ||
570 | break; \ | ||
571 | } | ||
572 |
2/2✓ Branch 0 taken 9665 times.
✓ Branch 1 taken 23393 times.
|
33058 | if (EXTERNAL_SSE2(cpu_flags)) { |
573 |
53/125✓ Branch 0 taken 1239 times.
✓ Branch 1 taken 109 times.
✓ Branch 2 taken 8317 times.
✓ Branch 3 taken 973 times.
✓ Branch 4 taken 266 times.
✓ Branch 5 taken 702 times.
✓ Branch 6 taken 271 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 265 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 264 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 263 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 262 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 262 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 261 times.
✓ Branch 25 taken 1 times.
✓ Branch 27 taken 225 times.
✓ Branch 28 taken 36 times.
✓ Branch 29 taken 207 times.
✓ Branch 30 taken 19 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 37 times.
✓ Branch 35 taken 23 times.
✓ Branch 36 taken 14 times.
✓ Branch 37 taken 108 times.
✓ Branch 38 taken 1 times.
✓ Branch 39 taken 54 times.
✓ Branch 40 taken 54 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 1 times.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✓ Branch 71 taken 108 times.
✓ Branch 72 taken 8209 times.
✓ Branch 73 taken 108 times.
✗ Branch 74 not taken.
✓ Branch 75 taken 54 times.
✓ Branch 76 taken 54 times.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✓ Branch 107 taken 8208 times.
✓ Branch 108 taken 1 times.
✓ Branch 109 taken 8010 times.
✓ Branch 110 taken 198 times.
✗ Branch 111 not taken.
✓ Branch 112 taken 1 times.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✓ Branch 120 taken 1 times.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✓ Branch 123 taken 1 times.
✗ Branch 124 not taken.
✓ Branch 125 taken 1 times.
✗ Branch 126 not taken.
✓ Branch 128 taken 1 times.
✗ Branch 129 not taken.
✓ Branch 131 taken 1 times.
✗ Branch 132 not taken.
✓ Branch 133 taken 1 times.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
|
9773 | ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse2, sse2); |
574 |
53/125✓ Branch 0 taken 1239 times.
✓ Branch 1 taken 109 times.
✓ Branch 2 taken 8317 times.
✓ Branch 3 taken 973 times.
✓ Branch 4 taken 266 times.
✓ Branch 5 taken 702 times.
✓ Branch 6 taken 271 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 265 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 264 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 263 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 262 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 262 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 261 times.
✓ Branch 25 taken 1 times.
✓ Branch 27 taken 225 times.
✓ Branch 28 taken 36 times.
✓ Branch 29 taken 207 times.
✓ Branch 30 taken 19 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 37 times.
✓ Branch 35 taken 23 times.
✓ Branch 36 taken 14 times.
✓ Branch 37 taken 108 times.
✓ Branch 38 taken 1 times.
✓ Branch 39 taken 54 times.
✓ Branch 40 taken 54 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 1 times.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✓ Branch 71 taken 108 times.
✓ Branch 72 taken 8209 times.
✓ Branch 73 taken 108 times.
✗ Branch 74 not taken.
✓ Branch 75 taken 54 times.
✓ Branch 76 taken 54 times.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✓ Branch 107 taken 8208 times.
✓ Branch 108 taken 1 times.
✓ Branch 109 taken 8010 times.
✓ Branch 110 taken 198 times.
✗ Branch 111 not taken.
✓ Branch 112 taken 1 times.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✓ Branch 120 taken 1 times.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✓ Branch 123 taken 1 times.
✗ Branch 124 not taken.
✓ Branch 125 taken 1 times.
✗ Branch 126 not taken.
✓ Branch 128 taken 1 times.
✗ Branch 129 not taken.
✓ Branch 131 taken 1 times.
✗ Branch 132 not taken.
✓ Branch 133 taken 1 times.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
|
9773 | ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse2, sse2); |
575 |
10/13✓ Branch 0 taken 260 times.
✓ Branch 1 taken 39 times.
✓ Branch 2 taken 38 times.
✓ Branch 3 taken 8573 times.
✓ Branch 4 taken 755 times.
✓ Branch 6 taken 39 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 39 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 38 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 7210 times.
✓ Branch 15 taken 1363 times.
|
9665 | ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse2, , |
576 | HAVE_ALIGNED_STACK || ARCH_X86_64); | ||
577 |
2/2✓ Branch 0 taken 8567 times.
✓ Branch 1 taken 1098 times.
|
9665 | if (!(c->opts.flags & SWS_ACCURATE_RND)) |
578 |
10/15✓ Branch 0 taken 44 times.
✓ Branch 1 taken 39 times.
✓ Branch 2 taken 38 times.
✓ Branch 3 taken 7691 times.
✓ Branch 4 taken 755 times.
✓ Branch 6 taken 44 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 39 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 39 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 38 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✓ Branch 18 taken 755 times.
|
8567 | ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2); |
579 | |||
580 |
7/12✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✓ Branch 5 taken 37 times.
✓ Branch 6 taken 28 times.
✓ Branch 7 taken 39 times.
✓ Branch 8 taken 38 times.
✓ Branch 9 taken 38 times.
✓ Branch 10 taken 38 times.
✓ Branch 11 taken 9447 times.
|
9665 | switch (c->opts.src_format) { |
581 | ✗ | case AV_PIX_FMT_YA8: | |
582 | ✗ | c->lumToYV12 = ff_yuyvToY_sse2; | |
583 | ✗ | if (c->needAlpha) | |
584 | ✗ | c->alpToYV12 = ff_uyvyToY_sse2; | |
585 | ✗ | break; | |
586 | ✗ | case AV_PIX_FMT_YUYV422: | |
587 | ✗ | c->lumToYV12 = ff_yuyvToY_sse2; | |
588 | ✗ | c->chrToYV12 = ff_yuyvToUV_sse2; | |
589 | ✗ | break; | |
590 | ✗ | case AV_PIX_FMT_UYVY422: | |
591 | ✗ | c->lumToYV12 = ff_uyvyToY_sse2; | |
592 | ✗ | c->chrToYV12 = ff_uyvyToUV_sse2; | |
593 | ✗ | break; | |
594 | ✗ | case AV_PIX_FMT_NV12: | |
595 | ✗ | c->chrToYV12 = ff_nv12ToUV_sse2; | |
596 | ✗ | break; | |
597 | ✗ | case AV_PIX_FMT_NV21: | |
598 | ✗ | c->chrToYV12 = ff_nv21ToUV_sse2; | |
599 | ✗ | break; | |
600 |
2/2✓ Branch 0 taken 10 times.
✓ Branch 1 taken 27 times.
|
37 | case_rgb(rgb24, RGB24, sse2); |
601 |
2/2✓ Branch 0 taken 10 times.
✓ Branch 1 taken 18 times.
|
28 | case_rgb(bgr24, BGR24, sse2); |
602 |
2/2✓ Branch 0 taken 21 times.
✓ Branch 1 taken 18 times.
|
39 | case_rgb(bgra, BGRA, sse2); |
603 |
2/2✓ Branch 0 taken 20 times.
✓ Branch 1 taken 18 times.
|
38 | case_rgb(rgba, RGBA, sse2); |
604 |
2/2✓ Branch 0 taken 20 times.
✓ Branch 1 taken 18 times.
|
38 | case_rgb(abgr, ABGR, sse2); |
605 |
2/2✓ Branch 0 taken 20 times.
✓ Branch 1 taken 18 times.
|
38 | case_rgb(argb, ARGB, sse2); |
606 | 9447 | default: | |
607 | 9447 | break; | |
608 | } | ||
609 | } | ||
610 |
2/2✓ Branch 0 taken 7531 times.
✓ Branch 1 taken 25527 times.
|
33058 | if (EXTERNAL_SSSE3(cpu_flags)) { |
611 |
53/125✓ Branch 0 taken 977 times.
✓ Branch 1 taken 85 times.
✓ Branch 2 taken 6469 times.
✓ Branch 3 taken 757 times.
✓ Branch 4 taken 220 times.
✓ Branch 5 taken 546 times.
✓ Branch 6 taken 211 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 219 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 218 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 217 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 216 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 216 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 215 times.
✓ Branch 25 taken 1 times.
✓ Branch 27 taken 179 times.
✓ Branch 28 taken 36 times.
✓ Branch 29 taken 161 times.
✓ Branch 30 taken 19 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 37 times.
✓ Branch 35 taken 23 times.
✓ Branch 36 taken 14 times.
✓ Branch 37 taken 84 times.
✓ Branch 38 taken 1 times.
✓ Branch 39 taken 42 times.
✓ Branch 40 taken 42 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 1 times.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✓ Branch 71 taken 84 times.
✓ Branch 72 taken 6385 times.
✓ Branch 73 taken 84 times.
✗ Branch 74 not taken.
✓ Branch 75 taken 42 times.
✓ Branch 76 taken 42 times.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✓ Branch 107 taken 6384 times.
✓ Branch 108 taken 1 times.
✓ Branch 109 taken 6230 times.
✓ Branch 110 taken 154 times.
✗ Branch 111 not taken.
✓ Branch 112 taken 1 times.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✓ Branch 120 taken 1 times.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✓ Branch 123 taken 1 times.
✗ Branch 124 not taken.
✓ Branch 125 taken 1 times.
✗ Branch 126 not taken.
✓ Branch 128 taken 1 times.
✗ Branch 129 not taken.
✓ Branch 131 taken 1 times.
✗ Branch 132 not taken.
✓ Branch 133 taken 1 times.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
|
7615 | ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, ssse3, ssse3); |
612 |
53/125✓ Branch 0 taken 977 times.
✓ Branch 1 taken 85 times.
✓ Branch 2 taken 6469 times.
✓ Branch 3 taken 757 times.
✓ Branch 4 taken 220 times.
✓ Branch 5 taken 546 times.
✓ Branch 6 taken 211 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 219 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 218 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 217 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 216 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 216 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 215 times.
✓ Branch 25 taken 1 times.
✓ Branch 27 taken 179 times.
✓ Branch 28 taken 36 times.
✓ Branch 29 taken 161 times.
✓ Branch 30 taken 19 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 37 times.
✓ Branch 35 taken 23 times.
✓ Branch 36 taken 14 times.
✓ Branch 37 taken 84 times.
✓ Branch 38 taken 1 times.
✓ Branch 39 taken 42 times.
✓ Branch 40 taken 42 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 1 times.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✓ Branch 71 taken 84 times.
✓ Branch 72 taken 6385 times.
✓ Branch 73 taken 84 times.
✗ Branch 74 not taken.
✓ Branch 75 taken 42 times.
✓ Branch 76 taken 42 times.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✓ Branch 107 taken 6384 times.
✓ Branch 108 taken 1 times.
✓ Branch 109 taken 6230 times.
✓ Branch 110 taken 154 times.
✗ Branch 111 not taken.
✓ Branch 112 taken 1 times.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✓ Branch 120 taken 1 times.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✓ Branch 123 taken 1 times.
✗ Branch 124 not taken.
✓ Branch 125 taken 1 times.
✗ Branch 126 not taken.
✓ Branch 128 taken 1 times.
✗ Branch 129 not taken.
✓ Branch 131 taken 1 times.
✗ Branch 132 not taken.
✓ Branch 133 taken 1 times.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
|
7615 | ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, ssse3, ssse3); |
613 |
3/3✓ Branch 0 taken 29 times.
✓ Branch 1 taken 22 times.
✓ Branch 2 taken 7480 times.
|
7531 | switch (c->opts.src_format) { |
614 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 21 times.
|
29 | case_rgb(rgb24, RGB24, ssse3); |
615 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 14 times.
|
22 | case_rgb(bgr24, BGR24, ssse3); |
616 | 7480 | default: | |
617 | 7480 | break; | |
618 | } | ||
619 | } | ||
620 |
2/2✓ Branch 0 taken 6464 times.
✓ Branch 1 taken 26594 times.
|
33058 | if (EXTERNAL_SSE4(cpu_flags)) { |
621 | /* Xto15 don't need special sse4 functions */ | ||
622 |
53/125✓ Branch 0 taken 846 times.
✓ Branch 1 taken 73 times.
✓ Branch 2 taken 5545 times.
✓ Branch 3 taken 649 times.
✓ Branch 4 taken 197 times.
✓ Branch 5 taken 468 times.
✓ Branch 6 taken 181 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 196 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 195 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 194 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 193 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 193 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 192 times.
✓ Branch 25 taken 1 times.
✓ Branch 27 taken 156 times.
✓ Branch 28 taken 36 times.
✓ Branch 29 taken 138 times.
✓ Branch 30 taken 19 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 37 times.
✓ Branch 35 taken 23 times.
✓ Branch 36 taken 14 times.
✓ Branch 37 taken 72 times.
✓ Branch 38 taken 1 times.
✓ Branch 39 taken 36 times.
✓ Branch 40 taken 36 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 1 times.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✓ Branch 71 taken 72 times.
✓ Branch 72 taken 5473 times.
✓ Branch 73 taken 72 times.
✗ Branch 74 not taken.
✓ Branch 75 taken 36 times.
✓ Branch 76 taken 36 times.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✓ Branch 107 taken 5472 times.
✓ Branch 108 taken 1 times.
✓ Branch 109 taken 5340 times.
✓ Branch 110 taken 132 times.
✗ Branch 111 not taken.
✓ Branch 112 taken 1 times.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✓ Branch 120 taken 1 times.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✓ Branch 123 taken 1 times.
✗ Branch 124 not taken.
✓ Branch 125 taken 1 times.
✗ Branch 126 not taken.
✓ Branch 128 taken 1 times.
✗ Branch 129 not taken.
✓ Branch 131 taken 1 times.
✗ Branch 132 not taken.
✓ Branch 133 taken 1 times.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
|
6536 | ASSIGN_SSE_SCALE_FUNC(c->hyScale, c->hLumFilterSize, sse4, ssse3); |
623 |
53/125✓ Branch 0 taken 846 times.
✓ Branch 1 taken 73 times.
✓ Branch 2 taken 5545 times.
✓ Branch 3 taken 649 times.
✓ Branch 4 taken 197 times.
✓ Branch 5 taken 468 times.
✓ Branch 6 taken 181 times.
✓ Branch 7 taken 1 times.
✓ Branch 8 taken 196 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 1 times.
✓ Branch 11 taken 1 times.
✓ Branch 12 taken 195 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 1 times.
✓ Branch 15 taken 1 times.
✓ Branch 16 taken 194 times.
✗ Branch 17 not taken.
✓ Branch 18 taken 1 times.
✓ Branch 19 taken 193 times.
✓ Branch 20 taken 1 times.
✓ Branch 21 taken 193 times.
✗ Branch 22 not taken.
✓ Branch 24 taken 192 times.
✓ Branch 25 taken 1 times.
✓ Branch 27 taken 156 times.
✓ Branch 28 taken 36 times.
✓ Branch 29 taken 138 times.
✓ Branch 30 taken 19 times.
✗ Branch 31 not taken.
✓ Branch 32 taken 37 times.
✓ Branch 35 taken 23 times.
✓ Branch 36 taken 14 times.
✓ Branch 37 taken 72 times.
✓ Branch 38 taken 1 times.
✓ Branch 39 taken 36 times.
✓ Branch 40 taken 36 times.
✗ Branch 41 not taken.
✓ Branch 42 taken 1 times.
✗ Branch 43 not taken.
✗ Branch 44 not taken.
✗ Branch 45 not taken.
✓ Branch 46 taken 1 times.
✗ Branch 47 not taken.
✗ Branch 48 not taken.
✓ Branch 49 taken 1 times.
✗ Branch 50 not taken.
✗ Branch 51 not taken.
✓ Branch 52 taken 1 times.
✗ Branch 53 not taken.
✗ Branch 54 not taken.
✗ Branch 55 not taken.
✗ Branch 56 not taken.
✗ Branch 58 not taken.
✗ Branch 59 not taken.
✗ Branch 61 not taken.
✗ Branch 62 not taken.
✗ Branch 63 not taken.
✗ Branch 64 not taken.
✗ Branch 65 not taken.
✗ Branch 66 not taken.
✗ Branch 69 not taken.
✗ Branch 70 not taken.
✓ Branch 71 taken 72 times.
✓ Branch 72 taken 5473 times.
✓ Branch 73 taken 72 times.
✗ Branch 74 not taken.
✓ Branch 75 taken 36 times.
✓ Branch 76 taken 36 times.
✗ Branch 77 not taken.
✗ Branch 78 not taken.
✗ Branch 79 not taken.
✗ Branch 80 not taken.
✗ Branch 81 not taken.
✗ Branch 82 not taken.
✗ Branch 83 not taken.
✗ Branch 84 not taken.
✗ Branch 85 not taken.
✗ Branch 86 not taken.
✗ Branch 87 not taken.
✗ Branch 88 not taken.
✗ Branch 89 not taken.
✗ Branch 90 not taken.
✗ Branch 91 not taken.
✗ Branch 92 not taken.
✗ Branch 94 not taken.
✗ Branch 95 not taken.
✗ Branch 97 not taken.
✗ Branch 98 not taken.
✗ Branch 99 not taken.
✗ Branch 100 not taken.
✗ Branch 101 not taken.
✗ Branch 102 not taken.
✗ Branch 105 not taken.
✗ Branch 106 not taken.
✓ Branch 107 taken 5472 times.
✓ Branch 108 taken 1 times.
✓ Branch 109 taken 5340 times.
✓ Branch 110 taken 132 times.
✗ Branch 111 not taken.
✓ Branch 112 taken 1 times.
✗ Branch 113 not taken.
✗ Branch 114 not taken.
✗ Branch 115 not taken.
✓ Branch 116 taken 1 times.
✗ Branch 117 not taken.
✗ Branch 118 not taken.
✗ Branch 119 not taken.
✓ Branch 120 taken 1 times.
✗ Branch 121 not taken.
✗ Branch 122 not taken.
✓ Branch 123 taken 1 times.
✗ Branch 124 not taken.
✓ Branch 125 taken 1 times.
✗ Branch 126 not taken.
✓ Branch 128 taken 1 times.
✗ Branch 129 not taken.
✓ Branch 131 taken 1 times.
✗ Branch 132 not taken.
✓ Branch 133 taken 1 times.
✗ Branch 134 not taken.
✗ Branch 135 not taken.
✗ Branch 136 not taken.
✗ Branch 139 not taken.
✗ Branch 140 not taken.
|
6536 | ASSIGN_SSE_SCALE_FUNC(c->hcScale, c->hChrFilterSize, sse4, ssse3); |
624 |
12/15✓ Branch 0 taken 176 times.
✓ Branch 1 taken 27 times.
✓ Branch 2 taken 26 times.
✓ Branch 3 taken 5720 times.
✓ Branch 4 taken 515 times.
✓ Branch 6 taken 104 times.
✓ Branch 7 taken 72 times.
✓ Branch 9 taken 27 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 27 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 26 times.
✗ Branch 16 not taken.
✓ Branch 17 taken 4807 times.
✓ Branch 18 taken 913 times.
|
6464 | ASSIGN_VSCALEX_FUNC(c->yuv2planeX, sse4, |
625 | if (!isBE(c->opts.dst_format)) c->yuv2planeX = ff_yuv2planeX_16_sse4, | ||
626 | HAVE_ALIGNED_STACK || ARCH_X86_64); | ||
627 |
6/6✓ Branch 0 taken 176 times.
✓ Branch 1 taken 6288 times.
✓ Branch 3 taken 104 times.
✓ Branch 4 taken 72 times.
✓ Branch 5 taken 32 times.
✓ Branch 6 taken 72 times.
|
6464 | if (c->dstBpc == 16 && !isBE(c->opts.dst_format) && !(c->opts.flags & SWS_ACCURATE_RND)) |
628 | 32 | c->yuv2plane1 = ff_yuv2plane1_16_sse4; | |
629 | } | ||
630 | |||
631 |
2/2✓ Branch 0 taken 3263 times.
✓ Branch 1 taken 29795 times.
|
33058 | if (EXTERNAL_AVX(cpu_flags)) { |
632 |
10/13✓ Branch 0 taken 92 times.
✓ Branch 1 taken 15 times.
✓ Branch 2 taken 14 times.
✓ Branch 3 taken 2867 times.
✓ Branch 4 taken 275 times.
✓ Branch 6 taken 15 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 15 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 14 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 2404 times.
✓ Branch 15 taken 463 times.
|
3263 | ASSIGN_VSCALEX_FUNC(c->yuv2planeX, avx, , |
633 | HAVE_ALIGNED_STACK || ARCH_X86_64); | ||
634 |
2/2✓ Branch 0 taken 2897 times.
✓ Branch 1 taken 366 times.
|
3263 | if (!(c->opts.flags & SWS_ACCURATE_RND)) |
635 |
10/15✓ Branch 0 taken 20 times.
✓ Branch 1 taken 15 times.
✓ Branch 2 taken 14 times.
✓ Branch 3 taken 2573 times.
✓ Branch 4 taken 275 times.
✓ Branch 6 taken 20 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 15 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 15 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 14 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✓ Branch 18 taken 275 times.
|
2897 | ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx); |
636 | |||
637 |
7/11✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 13 times.
✓ Branch 5 taken 10 times.
✓ Branch 6 taken 15 times.
✓ Branch 7 taken 14 times.
✓ Branch 8 taken 14 times.
✓ Branch 9 taken 14 times.
✓ Branch 10 taken 3183 times.
|
3263 | switch (c->opts.src_format) { |
638 | ✗ | case AV_PIX_FMT_YUYV422: | |
639 | ✗ | c->chrToYV12 = ff_yuyvToUV_avx; | |
640 | ✗ | break; | |
641 | ✗ | case AV_PIX_FMT_UYVY422: | |
642 | ✗ | c->chrToYV12 = ff_uyvyToUV_avx; | |
643 | ✗ | break; | |
644 | ✗ | case AV_PIX_FMT_NV12: | |
645 | ✗ | c->chrToYV12 = ff_nv12ToUV_avx; | |
646 | ✗ | break; | |
647 | ✗ | case AV_PIX_FMT_NV21: | |
648 | ✗ | c->chrToYV12 = ff_nv21ToUV_avx; | |
649 | ✗ | break; | |
650 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 9 times.
|
13 | case_rgb(rgb24, RGB24, avx); |
651 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 6 times.
|
10 | case_rgb(bgr24, BGR24, avx); |
652 |
2/2✓ Branch 0 taken 9 times.
✓ Branch 1 taken 6 times.
|
15 | case_rgb(bgra, BGRA, avx); |
653 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 6 times.
|
14 | case_rgb(rgba, RGBA, avx); |
654 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 6 times.
|
14 | case_rgb(abgr, ABGR, avx); |
655 |
2/2✓ Branch 0 taken 8 times.
✓ Branch 1 taken 6 times.
|
14 | case_rgb(argb, ARGB, avx); |
656 | 3183 | default: | |
657 | 3183 | break; | |
658 | } | ||
659 | } | ||
660 | |||
661 | #if ARCH_X86_64 | ||
662 | #define ASSIGN_AVX2_SCALE_FUNC(hscalefn, filtersize) \ | ||
663 | switch (filtersize) { \ | ||
664 | case 4: hscalefn = ff_hscale8to15_4_avx2; break; \ | ||
665 | default: hscalefn = ff_hscale8to15_X4_avx2; break; \ | ||
666 | break; \ | ||
667 | } | ||
668 | |||
669 |
4/6✓ Branch 0 taken 1129 times.
✓ Branch 1 taken 31929 times.
✓ Branch 2 taken 1129 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 1129 times.
✗ Branch 5 not taken.
|
33058 | if (EXTERNAL_AVX2_FAST(cpu_flags) && !(cpu_flags & AV_CPU_FLAG_SLOW_GATHER)) { |
670 |
4/4✓ Branch 0 taken 1045 times.
✓ Branch 1 taken 84 times.
✓ Branch 2 taken 980 times.
✓ Branch 3 taken 65 times.
|
1129 | if ((c->srcBpc == 8) && (c->dstBpc <= 14)) { |
671 |
2/2✓ Branch 0 taken 78 times.
✓ Branch 1 taken 902 times.
|
980 | ASSIGN_AVX2_SCALE_FUNC(c->hcScale, c->hChrFilterSize); |
672 |
2/2✓ Branch 0 taken 78 times.
✓ Branch 1 taken 902 times.
|
980 | ASSIGN_AVX2_SCALE_FUNC(c->hyScale, c->hLumFilterSize); |
673 | } | ||
674 | } | ||
675 | |||
676 |
3/4✓ Branch 0 taken 1129 times.
✓ Branch 1 taken 31929 times.
✓ Branch 2 taken 1129 times.
✗ Branch 3 not taken.
|
33058 | if (EXTERNAL_AVX2_FAST(cpu_flags)) { |
677 | if (ARCH_X86_64) | ||
678 |
7/7✓ Branch 0 taken 5 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 7 times.
✓ Branch 3 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 5 taken 6 times.
✓ Branch 6 taken 1095 times.
|
1129 | switch (c->opts.src_format) { |
679 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 3 times.
|
5 | case_rgb(rgb24, RGB24, avx2); |
680 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
|
4 | case_rgb(bgr24, BGR24, avx2); |
681 |
2/2✓ Branch 0 taken 5 times.
✓ Branch 1 taken 2 times.
|
7 | case_rgb(bgra, BGRA, avx2); |
682 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 2 times.
|
6 | case_rgb(rgba, RGBA, avx2); |
683 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 2 times.
|
6 | case_rgb(abgr, ABGR, avx2); |
684 |
2/2✓ Branch 0 taken 4 times.
✓ Branch 1 taken 2 times.
|
6 | case_rgb(argb, ARGB, avx2); |
685 | } | ||
686 |
2/2✓ Branch 0 taken 1007 times.
✓ Branch 1 taken 122 times.
|
1129 | if (!(c->opts.flags & SWS_ACCURATE_RND)) // FIXME |
687 |
2/3✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1005 times.
|
1007 | switch (c->opts.dst_format) { |
688 | 2 | case AV_PIX_FMT_NV12: | |
689 | case AV_PIX_FMT_NV24: | ||
690 | 2 | c->yuv2nv12cX = ff_yuv2nv12cX_avx2; | |
691 | 2 | break; | |
692 | ✗ | case AV_PIX_FMT_NV21: | |
693 | case AV_PIX_FMT_NV42: | ||
694 | ✗ | c->yuv2nv12cX = ff_yuv2nv21cX_avx2; | |
695 | ✗ | break; | |
696 | 1005 | default: | |
697 | 1005 | break; | |
698 | } | ||
699 | } | ||
700 | |||
701 | |||
702 | #define INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(fmt, name, opt) \ | ||
703 | case fmt: \ | ||
704 | c->readAlpPlanar = ff_planar_##name##_to_a_##opt; | ||
705 | |||
706 | #define INPUT_PLANER_RGBA_YUV_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ | ||
707 | case rgba_fmt: \ | ||
708 | case rgb_fmt: \ | ||
709 | c->readLumPlanar = ff_planar_##name##_to_y_##opt; \ | ||
710 | c->readChrPlanar = ff_planar_##name##_to_uv_##opt; \ | ||
711 | break; | ||
712 | |||
713 | #define INPUT_PLANER_RGB_YUV_FUNC_CASE(fmt, name, opt) \ | ||
714 | case fmt: \ | ||
715 | c->readLumPlanar = ff_planar_##name##_to_y_##opt; \ | ||
716 | c->readChrPlanar = ff_planar_##name##_to_uv_##opt; \ | ||
717 | break; | ||
718 | |||
719 | #define INPUT_PLANER_RGB_UV_FUNC_CASE(fmt, name, opt) \ | ||
720 | case fmt: \ | ||
721 | c->readChrPlanar = ff_planar_##name##_to_uv_##opt; \ | ||
722 | break; | ||
723 | |||
724 | #define INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ | ||
725 | INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##LE, name##le, opt) \ | ||
726 | INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##LE, name##le, opt) \ | ||
727 | INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##BE, name##be, opt) \ | ||
728 | INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##BE, name##be, opt) | ||
729 | |||
730 | #define INPUT_PLANER_RGBAXX_UVA_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ | ||
731 | INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##LE, name##le, opt) \ | ||
732 | INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##LE, name##le, opt) \ | ||
733 | INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##BE, name##be, opt) \ | ||
734 | INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##BE, name##be, opt) | ||
735 | |||
736 | #define INPUT_PLANER_RGBAXX_YUV_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ | ||
737 | INPUT_PLANER_RGBA_YUV_FUNC_CASE(rgb_fmt##LE, rgba_fmt##LE, name##le, opt) \ | ||
738 | INPUT_PLANER_RGBA_YUV_FUNC_CASE(rgb_fmt##BE, rgba_fmt##BE, name##be, opt) | ||
739 | |||
740 | #define INPUT_PLANER_RGBXX_YUV_FUNC_CASE(rgb_fmt, name, opt) \ | ||
741 | INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##LE, name##le, opt) \ | ||
742 | INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##BE, name##be, opt) | ||
743 | |||
744 | #define INPUT_PLANER_RGBXX_UV_FUNC_CASE(rgb_fmt, name, opt) \ | ||
745 | INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##LE, name##le, opt) \ | ||
746 | INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##BE, name##be, opt) | ||
747 | |||
748 | #define INPUT_PLANER_RGB_YUVA_ALL_CASES(opt) \ | ||
749 | INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(AV_PIX_FMT_GBRAP, rgb, opt) \ | ||
750 | INPUT_PLANER_RGB_YUV_FUNC_CASE( AV_PIX_FMT_GBRP, rgb, opt) \ | ||
751 | INPUT_PLANER_RGBXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP9, rgb9, opt) \ | ||
752 | INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10, rgb10, opt) \ | ||
753 | INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12, rgb12, opt) \ | ||
754 | INPUT_PLANER_RGBXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP14, rgb14, opt) \ | ||
755 | INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16, rgb16, opt) \ | ||
756 | INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32, rgbf32, opt) | ||
757 | |||
758 | |||
759 |
2/2✓ Branch 0 taken 9665 times.
✓ Branch 1 taken 23393 times.
|
33058 | if (EXTERNAL_SSE2(cpu_flags)) { |
760 |
23/23✓ Branch 0 taken 163 times.
✓ Branch 1 taken 109 times.
✓ Branch 2 taken 109 times.
✓ Branch 3 taken 108 times.
✓ Branch 4 taken 163 times.
✓ Branch 5 taken 109 times.
✓ Branch 6 taken 162 times.
✓ Branch 7 taken 108 times.
✓ Branch 8 taken 163 times.
✓ Branch 9 taken 109 times.
✓ Branch 10 taken 162 times.
✓ Branch 11 taken 108 times.
✓ Branch 12 taken 109 times.
✓ Branch 13 taken 108 times.
✓ Branch 14 taken 163 times.
✓ Branch 15 taken 109 times.
✓ Branch 16 taken 162 times.
✓ Branch 17 taken 108 times.
✓ Branch 18 taken 162 times.
✓ Branch 19 taken 138 times.
✓ Branch 20 taken 162 times.
✓ Branch 21 taken 108 times.
✓ Branch 22 taken 6763 times.
|
9665 | switch (c->opts.src_format) { |
761 | 163 | INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(AV_PIX_FMT_GBRAP, rgb, sse2); | |
762 | 272 | INPUT_PLANER_RGB_UV_FUNC_CASE( AV_PIX_FMT_GBRP, rgb, sse2); | |
763 | 217 | INPUT_PLANER_RGBXX_UV_FUNC_CASE( AV_PIX_FMT_GBRP9, rgb9, sse2); | |
764 | 542 | INPUT_PLANER_RGBAXX_UVA_FUNC_CASE( AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10, rgb10, sse2); | |
765 | 542 | INPUT_PLANER_RGBAXX_UVA_FUNC_CASE( AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12, rgb12, sse2); | |
766 | 217 | INPUT_PLANER_RGBXX_UV_FUNC_CASE( AV_PIX_FMT_GBRP14, rgb14, sse2); | |
767 | 542 | INPUT_PLANER_RGBAXX_UVA_FUNC_CASE( AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16, rgb16, sse2); | |
768 | 570 | INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32, rgbf32, sse2); | |
769 | 6763 | default: | |
770 | 6763 | break; | |
771 | } | ||
772 | } | ||
773 | |||
774 |
2/2✓ Branch 0 taken 6464 times.
✓ Branch 1 taken 26594 times.
|
33058 | if (EXTERNAL_SSE4(cpu_flags)) { |
775 |
16/16✓ Branch 0 taken 182 times.
✓ Branch 1 taken 73 times.
✓ Branch 2 taken 72 times.
✓ Branch 3 taken 182 times.
✓ Branch 4 taken 180 times.
✓ Branch 5 taken 182 times.
✓ Branch 6 taken 180 times.
✓ Branch 7 taken 73 times.
✓ Branch 8 taken 72 times.
✓ Branch 9 taken 182 times.
✓ Branch 10 taken 180 times.
✓ Branch 11 taken 108 times.
✓ Branch 12 taken 102 times.
✓ Branch 13 taken 108 times.
✓ Branch 14 taken 72 times.
✓ Branch 15 taken 4516 times.
|
6464 | switch (c->opts.src_format) { |
776 | 182 | case AV_PIX_FMT_GBRAP: | |
777 | 182 | INPUT_PLANER_RGB_YUV_FUNC_CASE( AV_PIX_FMT_GBRP, rgb, sse4); | |
778 | 145 | INPUT_PLANER_RGBXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP9, rgb9, sse4); | |
779 | 362 | INPUT_PLANER_RGBAXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10, rgb10, sse4); | |
780 | 362 | INPUT_PLANER_RGBAXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12, rgb12, sse4); | |
781 | 145 | INPUT_PLANER_RGBXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP14, rgb14, sse4); | |
782 | 362 | INPUT_PLANER_RGBAXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16, rgb16, sse4); | |
783 | 390 | INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32, rgbf32, sse4); | |
784 | 4516 | default: | |
785 | 4516 | break; | |
786 | } | ||
787 | } | ||
788 | |||
789 |
3/4✓ Branch 0 taken 1129 times.
✓ Branch 1 taken 31929 times.
✓ Branch 2 taken 1129 times.
✗ Branch 3 not taken.
|
33058 | if (EXTERNAL_AVX2_FAST(cpu_flags)) { |
790 |
23/23✓ Branch 0 taken 19 times.
✓ Branch 1 taken 13 times.
✓ Branch 2 taken 13 times.
✓ Branch 3 taken 12 times.
✓ Branch 4 taken 19 times.
✓ Branch 5 taken 13 times.
✓ Branch 6 taken 18 times.
✓ Branch 7 taken 12 times.
✓ Branch 8 taken 19 times.
✓ Branch 9 taken 13 times.
✓ Branch 10 taken 18 times.
✓ Branch 11 taken 12 times.
✓ Branch 12 taken 13 times.
✓ Branch 13 taken 12 times.
✓ Branch 14 taken 19 times.
✓ Branch 15 taken 13 times.
✓ Branch 16 taken 18 times.
✓ Branch 17 taken 12 times.
✓ Branch 18 taken 18 times.
✓ Branch 19 taken 42 times.
✓ Branch 20 taken 18 times.
✓ Branch 21 taken 12 times.
✓ Branch 22 taken 771 times.
|
1129 | switch (c->opts.src_format) { |
791 | 358 | INPUT_PLANER_RGB_YUVA_ALL_CASES(avx2) | |
792 | 771 | default: | |
793 | 771 | break; | |
794 | } | ||
795 | } | ||
796 | |||
797 |
2/2✓ Branch 0 taken 12047 times.
✓ Branch 1 taken 21011 times.
|
33058 | if(c->opts.flags & SWS_FULL_CHR_H_INT) { |
798 | |||
799 | #define YUV2ANYX_FUNC_CASE(fmt, name, opt) \ | ||
800 | case fmt: \ | ||
801 | c->yuv2anyX = ff_yuv2##name##_full_X_##opt; \ | ||
802 | break; | ||
803 | |||
804 | #define YUV2ANYX_GBRAP_CASES(opt) \ | ||
805 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP, gbrp, opt) \ | ||
806 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAP, gbrap, opt) \ | ||
807 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP9LE, gbrp9le, opt) \ | ||
808 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP10LE, gbrp10le, opt) \ | ||
809 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAP10LE, gbrap10le, opt) \ | ||
810 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP12LE, gbrp12le, opt) \ | ||
811 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAP12LE, gbrap12le, opt) \ | ||
812 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP14LE, gbrp14le, opt) \ | ||
813 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP16LE, gbrp16le, opt) \ | ||
814 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAP16LE, gbrap16le, opt) \ | ||
815 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRPF32LE, gbrpf32le, opt) \ | ||
816 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAPF32LE, gbrapf32le, opt) \ | ||
817 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP9BE, gbrp9be, opt) \ | ||
818 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP10BE, gbrp10be, opt) \ | ||
819 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAP10BE, gbrap10be, opt) \ | ||
820 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP12BE, gbrp12be, opt) \ | ||
821 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAP12BE, gbrap12be, opt) \ | ||
822 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP14BE, gbrp14be, opt) \ | ||
823 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRP16BE, gbrp16be, opt) \ | ||
824 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAP16BE, gbrap16be, opt) \ | ||
825 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRPF32BE, gbrpf32be, opt) \ | ||
826 | YUV2ANYX_FUNC_CASE(AV_PIX_FMT_GBRAPF32BE, gbrapf32be, opt) | ||
827 | |||
828 |
2/2✓ Branch 0 taken 4806 times.
✓ Branch 1 taken 7241 times.
|
12047 | if (EXTERNAL_SSE2(cpu_flags)) { |
829 |
23/23✓ Branch 0 taken 217 times.
✓ Branch 1 taken 217 times.
✓ Branch 2 taken 217 times.
✓ Branch 3 taken 217 times.
✓ Branch 4 taken 217 times.
✓ Branch 5 taken 217 times.
✓ Branch 6 taken 217 times.
✓ Branch 7 taken 217 times.
✓ Branch 8 taken 217 times.
✓ Branch 9 taken 217 times.
✓ Branch 10 taken 246 times.
✓ Branch 11 taken 216 times.
✓ Branch 12 taken 216 times.
✓ Branch 13 taken 216 times.
✓ Branch 14 taken 216 times.
✓ Branch 15 taken 216 times.
✓ Branch 16 taken 216 times.
✓ Branch 17 taken 216 times.
✓ Branch 18 taken 216 times.
✓ Branch 19 taken 216 times.
✓ Branch 20 taken 216 times.
✓ Branch 21 taken 216 times.
✓ Branch 22 taken 14 times.
|
4806 | switch (c->opts.dst_format) { |
830 | 4792 | YUV2ANYX_GBRAP_CASES(sse2) | |
831 | 14 | default: | |
832 | 14 | break; | |
833 | } | ||
834 | } | ||
835 | |||
836 |
2/2✓ Branch 0 taken 3222 times.
✓ Branch 1 taken 8825 times.
|
12047 | if (EXTERNAL_SSE4(cpu_flags)) { |
837 |
23/23✓ Branch 0 taken 145 times.
✓ Branch 1 taken 145 times.
✓ Branch 2 taken 145 times.
✓ Branch 3 taken 145 times.
✓ Branch 4 taken 145 times.
✓ Branch 5 taken 145 times.
✓ Branch 6 taken 145 times.
✓ Branch 7 taken 145 times.
✓ Branch 8 taken 145 times.
✓ Branch 9 taken 145 times.
✓ Branch 10 taken 174 times.
✓ Branch 11 taken 144 times.
✓ Branch 12 taken 144 times.
✓ Branch 13 taken 144 times.
✓ Branch 14 taken 144 times.
✓ Branch 15 taken 144 times.
✓ Branch 16 taken 144 times.
✓ Branch 17 taken 144 times.
✓ Branch 18 taken 144 times.
✓ Branch 19 taken 144 times.
✓ Branch 20 taken 144 times.
✓ Branch 21 taken 144 times.
✓ Branch 22 taken 14 times.
|
3222 | switch (c->opts.dst_format) { |
838 | 3208 | YUV2ANYX_GBRAP_CASES(sse4) | |
839 | 14 | default: | |
840 | 14 | break; | |
841 | } | ||
842 | } | ||
843 | |||
844 |
3/4✓ Branch 0 taken 582 times.
✓ Branch 1 taken 11465 times.
✓ Branch 2 taken 582 times.
✗ Branch 3 not taken.
|
12047 | if (EXTERNAL_AVX2_FAST(cpu_flags)) { |
845 |
23/23✓ Branch 0 taken 25 times.
✓ Branch 1 taken 25 times.
✓ Branch 2 taken 25 times.
✓ Branch 3 taken 25 times.
✓ Branch 4 taken 25 times.
✓ Branch 5 taken 25 times.
✓ Branch 6 taken 25 times.
✓ Branch 7 taken 25 times.
✓ Branch 8 taken 25 times.
✓ Branch 9 taken 25 times.
✓ Branch 10 taken 54 times.
✓ Branch 11 taken 24 times.
✓ Branch 12 taken 24 times.
✓ Branch 13 taken 24 times.
✓ Branch 14 taken 24 times.
✓ Branch 15 taken 24 times.
✓ Branch 16 taken 24 times.
✓ Branch 17 taken 24 times.
✓ Branch 18 taken 24 times.
✓ Branch 19 taken 24 times.
✓ Branch 20 taken 24 times.
✓ Branch 21 taken 24 times.
✓ Branch 22 taken 14 times.
|
582 | switch (c->opts.dst_format) { |
846 | 568 | YUV2ANYX_GBRAP_CASES(avx2) | |
847 | 14 | default: | |
848 | 14 | break; | |
849 | } | ||
850 | } | ||
851 | } | ||
852 | |||
853 | #endif | ||
854 | 33058 | } | |
855 |