GCC Code Coverage Report


Directory: avs_core/
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 20.3% 2921 / 0 / 14411
Functions: 19.9% 110 / 0 / 554
Branches: 19.6% 280 / 0 / 1426

convert/intel/convert_planar_avx2.cpp
Line Branch Exec Source
1 // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al.
2 // http://avisynth.nl
3
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program 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
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
17 // http://www.gnu.org/copyleft/gpl.html .
18 //
19 // Linking Avisynth statically or dynamically with other modules is making a
20 // combined work based on Avisynth. Thus, the terms and conditions of the GNU
21 // General Public License cover the whole combination.
22 //
23 // As a special exception, the copyright holders of Avisynth give you
24 // permission to link Avisynth with independent modules that communicate with
25 // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
26 // terms of these independent modules, and to copy and distribute the
27 // resulting combined work under terms of your choice, provided that
28 // every copy of the combined work is accompanied by a complete copy of
29 // the source code of Avisynth (the version of Avisynth used to produce the
30 // combined work), being distributed under the terms of the GNU General
31 // Public License plus this exception. An independent module is a module
32 // which is not derived from or based on Avisynth, such as 3rd-party filters,
33 // import and export plugins, or graphical user interfaces.
34
35
36 #include <avs/alignment.h>
37 #ifdef _MSC_VER
38 #include <intrin.h>
39 #else
40 #include <x86intrin.h>
41 #endif
42 #include <immintrin.h>
43
44 #include "convert_planar_avx2.h"
45 #include "../convert_planar.h"
46 #include "../convert_helper.h"
47
48 #ifndef _mm256_set_m128i
49 #define _mm256_set_m128i(v0, v1) _mm256_insertf128_si256(_mm256_castsi128_si256(v1), (v0), 1)
50 #endif
51
52 DISABLE_WARNING_PUSH
53 DISABLE_WARNING_UNREFERENCED_LOCAL_VARIABLE
54
55 // no srai64 in AVX2, only in AVX512 + VL
56 // AVX2 logical shift (_mm256_srl_epi64) plus sign fill
57 static AVS_FORCEINLINE __m256i mm256_srai_epi64_simul(__m256i x, int count) {
58 // logical right shift on 64bit lanes
59 const __m128i cnt = _mm_cvtsi32_si128(count);
60 const __m256i logical = _mm256_srl_epi64(x, cnt);
61
62 // have the sign bit present in both 32 bit halves of each 64bit lane before we do a 32bit arithmetic shift.
63 const __m256i hi_dup = _mm256_shuffle_epi32(x, _MM_SHUFFLE(3, 3, 1, 1));
64 const __m256i sign_shifted = _mm256_sra_epi32(hi_dup, cnt);
65
66 // mask back sign extension
67 const __m256i upper_mask = _mm256_set1_epi64x(0xFFFFFFFF00000000ULL);
68 const __m256i sign_ext = _mm256_and_si256(sign_shifted, upper_mask);
69
70 return _mm256_or_si256(logical, sign_ext);
71 }
72
73 // packed rgb helper
74 static AVS_FORCEINLINE __m256i convert_yuv_to_rgb_avx2_core(const __m256i& px0189, const __m256i& px23AB, const __m256i& px45CD, const __m256i& px67EF, const __m256i& zero, const __m256i& matrix, const __m256i& round_mask_plus_rgb_offset) {
75 //int b = (((int)m[0] * Y + (int)m[1] * U + (int)m[ 2] * V + 4096 + rgb_offset)>>13);
76
77 //px01 - xx xx 00 V1 00 U1 00 Y1 xx xx 00 V0 00 U0 00 Y0
78
79 288 auto low_lo = _mm256_madd_epi16(px0189, matrix); //xx*0 + v1*m2 | u1*m1 + y1*m0 | xx*0 + v0*m2 | u0*m1 + y0*m0
80 144 auto low_hi = _mm256_madd_epi16(px23AB, matrix); //xx*0 + v3*m2 | u3*m1 + y3*m0 | xx*0 + v2*m2 | u2*m1 + y2*m0
81 144 auto high_lo = _mm256_madd_epi16(px45CD, matrix);
82 288 auto high_hi = _mm256_madd_epi16(px67EF, matrix);
83
84 432 auto low_v = _mm256_castps_si256(_mm256_shuffle_ps(_mm256_castsi256_ps(low_lo), _mm256_castsi256_ps(low_hi), _MM_SHUFFLE(3, 1, 3, 1))); // v3*m2 | v2*m2 | v1*m2 | v0*m2
85 432 auto high_v = _mm256_castps_si256(_mm256_shuffle_ps(_mm256_castsi256_ps(high_lo), _mm256_castsi256_ps(high_hi), _MM_SHUFFLE(3, 1, 3, 1)));
86
87 432 auto low_yu = _mm256_castps_si256(_mm256_shuffle_ps(_mm256_castsi256_ps(low_lo), _mm256_castsi256_ps(low_hi), _MM_SHUFFLE(2, 0, 2, 0))); // u3*m1 + y3*m0 | u2*m1 + y2*m0 | u1*m1 + y1*m0 | u0*m1 + y0*m0
88 432 auto high_yu = _mm256_castps_si256(_mm256_shuffle_ps(_mm256_castsi256_ps(high_lo), _mm256_castsi256_ps(high_hi), _MM_SHUFFLE(2, 0, 2, 0)));
89
90 144 auto t_lo = _mm256_add_epi32(low_v, low_yu); // v3*m2 + u3*m1 + y3*m0...
91 144 auto t_hi = _mm256_add_epi32(high_v, high_yu);
92
93 // v3*m2 + u3*m1 + y3*m0 + 4096 + rgb_offset
94 144 t_lo = _mm256_add_epi32(t_lo, round_mask_plus_rgb_offset);
95 288 t_hi = _mm256_add_epi32(t_hi, round_mask_plus_rgb_offset);
96
97 144 t_lo = _mm256_srai_epi32(t_lo, 13); // (v3*m2 + u3*m1 + y3*m0 + 4096) >> 13...
98 144 t_hi = _mm256_srai_epi32(t_hi, 13);
99
100 144 auto result = _mm256_packs_epi32(t_lo, t_hi);
101 144 result = _mm256_packus_epi16(result, zero); //00 00 00 00 00 00 00 00 b15 b14 b14 b12 b11 b10 b9 b8 00 00 00 00 00 00 00 00 b7 b6 b5 b4 b3 b2 b1 b0
102 144 return result;
103 }
104
105 template<int rgb_pixel_step, bool hasAlpha>
106 8 void convert_yv24_to_rgb_avx2(BYTE* dstp, const BYTE* srcY, const BYTE* srcU, const BYTE* srcV, const BYTE* srcA, size_t dst_pitch, size_t src_pitch_y, size_t src_pitch_uv, size_t src_pitch_a, size_t width, size_t height, const ConversionMatrix& matrix)
107 {
108 8 dstp += dst_pitch * (height - 1); // We start at last line
109
110 8 size_t mod16_width = rgb_pixel_step == 3 ? width / 16 * 16 : width;
111 // for rgb32 target we can process pixels beyond width, but we have 64bit alignment at target 16 pixels to 16*4=64 rgb pixels
112 // if alignment would only be 32 bytes, we'd do the last cycle to process only 8 source pixels
113
114 8 auto matrix_b = _mm256_set_epi16(0, matrix.v_b, matrix.u_b, matrix.y_b, 0, matrix.v_b, matrix.u_b, matrix.y_b, 0, matrix.v_b, matrix.u_b, matrix.y_b, 0, matrix.v_b, matrix.u_b, matrix.y_b);
115 8 auto matrix_g = _mm256_set_epi16(0, matrix.v_g, matrix.u_g, matrix.y_g, 0, matrix.v_g, matrix.u_g, matrix.y_g, 0, matrix.v_g, matrix.u_g, matrix.y_g, 0, matrix.v_g, matrix.u_g, matrix.y_g);
116 16 auto matrix_r = _mm256_set_epi16(0, matrix.v_r, matrix.u_r, matrix.y_r, 0, matrix.v_r, matrix.u_r, matrix.y_r, 0, matrix.v_r, matrix.u_r, matrix.y_r, 0, matrix.v_r, matrix.u_r, matrix.y_r);
117
118 8 auto zero128 = _mm_setzero_si128();
119 8 auto zero = _mm256_setzero_si256();
120
121 // .13 bit frac integer arithmetic
122 8 int round_mask_plus_rgb_offset_i = (1 << 12) + (matrix.offset_rgb << 13);
123 8 auto round_mask_plus_rgb_offset = _mm256_set1_epi32(round_mask_plus_rgb_offset_i);
124 8 auto offset = _mm256_set_epi16(0, -128, -128, matrix.offset_y, 0, -128, -128, matrix.offset_y, 0, -128, -128, matrix.offset_y, 0, -128, -128, matrix.offset_y);
125
126 // 16 YUV(A) pixels --> 4x16 RGB quads = 64 bytes. Avisynth's alignment is 64 fortunately.
127
128
6/8
void convert_yv24_to_rgb_avx2<3, false>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✓ Branch 251 → 17 taken 9 times.
✓ Branch 251 → 252 taken 3 times.
void convert_yv24_to_rgb_avx2<3, true>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✗ Branch 253 → 17 not taken.
✗ Branch 253 → 254 not taken.
void convert_yv24_to_rgb_avx2<4, false>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✓ Branch 221 → 17 taken 6 times.
✓ Branch 221 → 222 taken 2 times.
void convert_yv24_to_rgb_avx2<4, true>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✓ Branch 223 → 17 taken 9 times.
✓ Branch 223 → 224 taken 3 times.
32 for (size_t y = 0; y < height; ++y) {
129
6/8
void convert_yv24_to_rgb_avx2<3, false>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✓ Branch 243 → 18 taken 18 times.
✓ Branch 243 → 244 taken 9 times.
void convert_yv24_to_rgb_avx2<3, true>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✗ Branch 245 → 18 not taken.
✗ Branch 245 → 246 not taken.
void convert_yv24_to_rgb_avx2<4, false>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✓ Branch 219 → 18 taken 12 times.
✓ Branch 219 → 220 taken 6 times.
void convert_yv24_to_rgb_avx2<4, true>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✓ Branch 221 → 18 taken 18 times.
✓ Branch 221 → 222 taken 9 times.
72 for (size_t x = 0; x < mod16_width; x += 16) {
130 48 __m128i src_y = _mm_load_si128(reinterpret_cast<const __m128i*>(srcY + x)); //Y15 .. Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
131 48 __m128i src_u = _mm_load_si128(reinterpret_cast<const __m128i*>(srcU + x)); //U15 .. U7 U6 U5 U4 U3 U2 U1 U0
132 78 __m128i src_v = _mm_load_si128(reinterpret_cast<const __m128i*>(srcV + x)); //V15 .. V7 V6 V5 V4 V3 V2 V1 V0
133 [[maybe_unused]] __m128i src_a;
134 if constexpr(hasAlpha)
135 36 src_a = _mm_load_si128(reinterpret_cast<const __m128i*>(srcA + x)); //A15 .. A7 A6 A5 A4 A3 A2 A1 A0
136
137 48 __m128i t1_lo = _mm_unpacklo_epi8(src_y, src_u); //U7 Y7 U6 Y6 U5 Y5 U4 Y4 U3 Y3 U2 Y2 U1 Y1 U0 Y0
138 48 __m128i t1_hi = _mm_unpackhi_epi8(src_y, src_u); //U15 Y15 U14 Y14 U13 Y13 U12 Y12 U11 Y11 U10 Y10 U9 Y9 U8 Y8
139 48 __m128i t2_lo = _mm_unpacklo_epi8(src_v, zero128); //00 V7 00 V6 00 V5 00 V4 00 V3 00 V2 00 V1 00 V0
140 48 __m128i t2_hi = _mm_unpackhi_epi8(src_v, zero128); //00 V15 00 V14 00 V13 00 V12 00 V11 00 V10 00 V9 00 V8
141
142 48 __m256i t1 = _mm256_set_m128i(t1_hi, t1_lo);
143 48 __m256i t2 = _mm256_set_m128i(t2_hi, t2_lo);
144 48 t1 = _mm256_permute4x64_epi64(t1, (0 << 0) | (2 << 2) | (1 << 4) | (3 << 6));
145 48 t2 = _mm256_permute4x64_epi64(t2, (0 << 0) | (2 << 2) | (1 << 4) | (3 << 6));
146
147 48 __m256i low = _mm256_unpacklo_epi16(t1, t2); //xx V11 U11 Y11 xx V10 U10 Y10 xx V9 U9 Y9 xx V8 U8 Y8 xx V3 U3 Y3 xx V2 U2 Y2 xx V1 U1 Y1 xx V0 U0 Y0
148 48 __m256i high = _mm256_unpackhi_epi16(t1, t2); //xx V15 U15 Y15 xx V14 U14 Y14 xx V13 U13 Y13 xx V12 U12 Y12 xx V7 U7 Y7 xx V6 U6 Y6 xx V5 U5 Y5 xx V4 U4 Y4
149
150 48 __m256i px0189 = _mm256_unpacklo_epi8(low, zero); //xx xx 00 V1 00 U1 00 Y1 xx xx 00 V0 00 U0 00 Y0
151 48 __m256i px23AB = _mm256_unpackhi_epi8(low, zero); //xx xx 00 V3 00 U3 00 Y3 xx xx 00 V2 00 U2 00 Y2
152 48 __m256i px45CD = _mm256_unpacklo_epi8(high, zero); //xx xx 00 V5 00 U5 00 Y5 xx xx 00 V4 00 U4 00 Y4
153 48 __m256i px67EF = _mm256_unpackhi_epi8(high, zero); //xx xx 00 V7 00 U7 00 Y7 xx xx 00 V6 00 U6 00 Y6
154
155 48 px0189 = _mm256_add_epi16(px0189, offset);
156 48 px23AB = _mm256_add_epi16(px23AB, offset);
157 48 px45CD = _mm256_add_epi16(px45CD, offset);
158 96 px67EF = _mm256_add_epi16(px67EF, offset);
159
160 48 __m256i result_b = convert_yuv_to_rgb_avx2_core(px0189, px23AB, px45CD, px67EF, zero, matrix_b, round_mask_plus_rgb_offset); // b15..0
161 48 __m256i result_g = convert_yuv_to_rgb_avx2_core(px0189, px23AB, px45CD, px67EF, zero, matrix_g, round_mask_plus_rgb_offset); // g15..0
162 48 __m256i result_r = convert_yuv_to_rgb_avx2_core(px0189, px23AB, px45CD, px67EF, zero, matrix_r, round_mask_plus_rgb_offset); // r15..0
163
164 48 __m256i result_bg = _mm256_unpacklo_epi8(result_b, result_g); //g15 b15 g14 b14 g13 b13 g12 b12 g11 b11 g10 b10 g9 b9 g8 b8 | g7 b7 g6 b6 g5 b5 g4 b4 g3 b3 g2 b2 g1 b1 g0 b0
165 __m256i alpha;
166 if constexpr(hasAlpha) {
167 18 const __m128i alpha_lo = _mm_shuffle_epi32(src_a, _MM_SHUFFLE(3, 1, 2, 0)); // a15 a14 a13 a12 a7 a6 a5 a4 a11 a10 a9 a8 a3 a2 a1 a0
168 18 const __m128i alpha_hi = _mm_shuffle_epi32(src_a, _MM_SHUFFLE(3, 3, 3, 1)); // a15 a14 a13 a12 a15 a14 a13 a12 a15 a14 a13 a12 a7 a6 a5 a4
169 36 alpha = _mm256_set_m128i(alpha_hi, alpha_lo); // high lane: a15..a12 a15..a12 a15..a12 a7..a4 | low lane: a15..a12 a7..a4 a11..a8 a3..a0
170 }
171 else
172 30 alpha = _mm256_cmpeq_epi32(result_r, result_r); // FF FF FF FF ... default alpha transparent
173
174 48 __m256i result_ra = _mm256_unpacklo_epi8(result_r, alpha); //a7 r7 a6 r6 a5 r5 a4 r4 a3 r3 a2 r2 a1 r1 a0 r0
175
176 48 __m256i result_lo = _mm256_unpacklo_epi16(result_bg, result_ra); // a11 r11 g11 b11 | a10 r10 g10 b10 | a9 r9 g9 b9 | a8 r8 g8 b8 | a3 r3 g3 b3 | a2 r2 g2 b2 | a1 r1 g1 b1 | a0 r0 g0 b0
177 48 __m256i result_hi = _mm256_unpackhi_epi16(result_bg, result_ra);
178 // note: actual pixel indexes are different from the numbers in comments, they are kept to be follow more easily
179 // Initial _mm256_permute4x64_epi64 ensures that the order here is properly argb7..argb0 and argb15..argb8
180
181 if constexpr (rgb_pixel_step == 4) {
182 //rgb32
183 30 _mm256_store_si256(reinterpret_cast<__m256i*>(dstp + x * 4), result_lo);
184 30 _mm256_store_si256(reinterpret_cast<__m256i*>(dstp + x * 4 + 32), result_hi);
185 }
186 else {
187 // rgb24
188 // 16*4 bytes to 16*3 bytes
189 18 __m256i perm10 = _mm256_set_epi32(0, 0, 6, 5, 4, 2, 1, 0);
190 18 __m256i shuffle_lo = _mm256_set_epi8(
191 0, 0, 0, 0, 14, 13, 12, 10, 9, 8, 6, 5, 4, 2, 1, 0,
192 0, 0, 0, 0, 14, 13, 12, 10, 9, 8, 6, 5, 4, 2, 1, 0
193 );
194 18 __m128i shuffle_hi_lo = _mm_set_epi8(9, 8, 6, 5, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0);
195
196 18 __m128i result_hi_lo = _mm256_extracti128_si256(result_hi, 0); // aBbBgBrB aAbAgArA a9b9g9r9 a8b8g8r8
197 18 __m128i result_hi_hi = _mm256_extracti128_si256(result_hi, 1); // aFbFgFrF aEbEgErE aDbDgDrD aCbCgCrC
198
199 18 __m256i result_lo_reorg = _mm256_shuffle_epi8(result_lo, shuffle_lo);
200 // x x x x b7g7r7 b6g6r6 b5g5r5 b4g4r4 x x x x b3g3r3 b2g2r2 b1g1r1 b0g0r0
201 18 result_lo_reorg = _mm256_permutevar8x32_epi32(result_lo_reorg, perm10);
202 // x x x x x x x x b7g7r7 b6g6r6 b5g5r5 b4g4r4 b3g3r3 b2g2r2 b1g1r1 b0g0r0
203
204 18 __m128i result_hi_lo_reorg = _mm_shuffle_epi8(result_hi_lo, shuffle_hi_lo);
205 // gA rA b9 g9 r9 b8 g8 r8 x x x x x x x x
206
207 18 __m256i dummy_y0 = _mm256_undefined_si256();
208 18 auto result_hi_lo_reorg_2 = _mm256_inserti128_si256(dummy_y0, result_hi_lo_reorg, 1);
209 //
210 // gA rA b9 g9|r9 b8 g8 r8|x x x x|x x x x|x x x x |x x x x|x x x x|x x x x // result_hi_lo_reorg_2
211 // x x x x x x x x b7g7r7 b6g6r6 b5g5r5 b4g4r4 b3g3r3 b2g2r2 b1g1r1 b0g0r0 // result_lo_reorg
212 18 auto result_0_15 = _mm256_blend_epi32(result_lo_reorg, result_hi_lo_reorg_2, 0xC0); // 11000000
213 18 _mm256_storeu_si256(reinterpret_cast<__m256i*>(dstp + x * 3), result_0_15); // not necessarily 32 bytes aligned
214
215 // => x x x x x x x x x x x x bB gB rB bA
216 18 __m128i shuffle_hi_lo_2 = _mm_set_epi8((char)0x80, (char)0x80, (char)0x80, (char)0x80, (char)0x80, (char)0x80, (char)0x80, (char)0x80, (char)0x80, (char)0x80, (char)0x80, (char)0x80, 14, 13, 12, 10);
217 18 __m128i xmm4 = _mm_shuffle_epi8(result_hi_lo, shuffle_hi_lo_2);
218
219 // => bF gF rF bE gE rE bD gD rD bC gC rC x x x x
220 18 __m128i shuffle_hi_hi = _mm_set_epi8(14, 13, 12, 10, 9, 8, 6, 5, 4, 2, 1, 0, (char)0x80, (char)0x80, (char)0x80, (char)0x80);
221 18 __m128i xmm5 = _mm_shuffle_epi8(result_hi_hi, shuffle_hi_hi);
222
223 // => bF gF rF bE gE rE bD gD rD bC gC rC bB gB rB bA
224 18 __m128i result_16_23 = _mm_or_si128(xmm4, xmm5);
225 18 _mm_store_si128(reinterpret_cast<__m128i*>(dstp + x * 3 + 32), result_16_23);
226 #if 0
227 // Intel compiler can cope with it 100% optimized. No store, just shuffles and blends as above.
228 alignas(32) BYTE temp[64];
229 _mm256_store_si256(reinterpret_cast<__m256i*>(temp), result_lo);
230 _mm256_store_si256(reinterpret_cast<__m256i*>(temp + 32), result_hi);
231 for (int i = 0; i < 16; ++i) {
232 dstp[(x + i) * 3 + 0] = temp[i * 4 + 0];
233 dstp[(x + i) * 3 + 1] = temp[i * 4 + 1];
234 dstp[(x + i) * 3 + 2] = temp[i * 4 + 2];
235 }
236 #endif
237 }
238 }
239
240 if constexpr (rgb_pixel_step == 3) {
241 // for rgb32 (pixel_step == 4) we processed full width and more, including padded bytes
242
2/4
void convert_yv24_to_rgb_avx2<3, false>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✓ Branch 249 → 245 taken 27 times.
✓ Branch 249 → 250 taken 9 times.
void convert_yv24_to_rgb_avx2<3, true>(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, ConversionMatrix const&):
✗ Branch 251 → 247 not taken.
✗ Branch 251 → 252 not taken.
36 for (size_t x = mod16_width; x < width; ++x) {
243 27 int Y = srcY[x] + matrix.offset_y;
244 27 int U = srcU[x] - 128;
245 27 int V = srcV[x] - 128;
246 27 int b = (((int)matrix.y_b * Y + (int)matrix.u_b * U + (int)matrix.v_b * V + round_mask_plus_rgb_offset_i) >> 13);
247 27 int g = (((int)matrix.y_g * Y + (int)matrix.u_g * U + (int)matrix.v_g * V + round_mask_plus_rgb_offset_i) >> 13);
248 27 int r = (((int)matrix.y_r * Y + (int)matrix.u_r * U + (int)matrix.v_r * V + round_mask_plus_rgb_offset_i) >> 13);
249 27 dstp[x * rgb_pixel_step + 0] = PixelClip(b);
250 27 dstp[x * rgb_pixel_step + 1] = PixelClip(g);
251 27 dstp[x * rgb_pixel_step + 2] = PixelClip(r);
252 if constexpr (rgb_pixel_step == 4) { // n/a
253 dstp[x * 4 + 3] = 255;
254 }
255 }
256 }
257 24 dstp -= dst_pitch;
258 24 srcY += src_pitch_y;
259 24 srcU += src_pitch_uv;
260 24 srcV += src_pitch_uv;
261 if constexpr(hasAlpha)
262 9 srcA += src_pitch_a;
263 }
264 8 }
265
266 //instantiate
267 //template<int rgb_pixel_step, bool targetHasAlpha>
268 template void convert_yv24_to_rgb_avx2<3, false>(BYTE* dstp, const BYTE* srcY, const BYTE* srcU, const BYTE* srcV, const BYTE* srcA, size_t dst_pitch, size_t src_pitch_y, size_t src_pitch_uv, size_t src_pitch_a, size_t width, size_t height, const ConversionMatrix& matrix);
269 template void convert_yv24_to_rgb_avx2<4, false>(BYTE* dstp, const BYTE* srcY, const BYTE* srcU, const BYTE* srcV, const BYTE* srcA, size_t dst_pitch, size_t src_pitch_y, size_t src_pitch_uv, size_t src_pitch_a, size_t width, size_t height, const ConversionMatrix& matrix);
270 template void convert_yv24_to_rgb_avx2<3, true>(BYTE* dstp, const BYTE* srcY, const BYTE* srcU, const BYTE* srcV, const BYTE* srcA, size_t dst_pitch, size_t src_pitch_y, size_t src_pitch_uv, size_t src_pitch_a, size_t width, size_t height, const ConversionMatrix& matrix);
271 template void convert_yv24_to_rgb_avx2<4, true>(BYTE* dstp, const BYTE* srcY, const BYTE* srcU, const BYTE* srcV, const BYTE* srcA, size_t dst_pitch, size_t src_pitch_y, size_t src_pitch_uv, size_t src_pitch_a, size_t width, size_t height, const ConversionMatrix& matrix);
272
273 #define XP_LAMBDA_CAPTURE_FIX(x) (void)(x)
274 /*
275 ================================================================================
276 YUV ↔ RGB Color Space Conversion - Unified Implementation
277 ================================================================================
278
279 This module provides a unified, highly optimized implementation for color space
280 conversions between YUV and RGB formats, supporting all bit depths (8-16 bit
281 integer and 32-bit float) with optional bit-depth conversion.
282
283 CONVERSION DIRECTIONS:
284 - YUV_TO_RGB: YUV → RGB (e.g., video decode path)
285 - RGB_TO_YUV: RGB → YUV (e.g., video encode path)
286 - YUV_TO_YUV: YUV → YUV (e.g., BT.601 → BT.709 matrix conversion)
287 - RGB_TO_RGB: RGB → RGB (e.g., gamut/color correction)
288
289 ARITHMETIC PRECISION:
290 - YUV→RGB / RGB→RGB: 13-bit fixed-point (coefficients scaled by 2^13 = 8192)
291 - RGB→YUV: 15-bit fixed-point (coefficients scaled by 2^15 = 32768)
292 - YUV→YUV: 14-bit fixed-point (fused matrix precision)
293
294 PLANE MEMORY LAYOUT:
295 - YUV: Plane[0]=Y, Plane[1]=U, Plane[2]=V
296 - RGB: Plane[0]=G, Plane[1]=B, Plane[2]=R (AviSynth convention)
297
298 ================================================================================
299 */
300
301 /**
302 * @enum YuvRgbConversionType
303 * @brief Defines the conversion workflow type for color space transformations
304 *
305 * Each conversion type determines:
306 * - Whether to use integer or float arithmetic for the matrix multiply
307 * - How input/output offsets are applied
308 * - Whether bit-depth conversion is integrated into the workflow
309 * - Whether 16-bit pivot trick is needed for exact 16-bit integer paths
310 *
311 * CONVERSION TYPE COMPARISON TABLE:
312 * ┌─────────────────────┬────────────┬─────────────┬──────────────┬─────────────┬──────────────┐
313 * │ Conversion Type │ 16-bit │ Input │ Matrix │ Post-Matrix │ Bit-Depth │
314 * │ │ Pivot? │ Offset │ Coefficients │ Rounding │ Scaling │
315 * ├─────────────────────┼────────────┼─────────────┼──────────────┼─────────────┼──────────────┤
316 * │ NATIVE_INT │ Yes (16) │ After load │ Integer │ Yes (shift) │ None │
317 * │ │ No (<16) │ (16-bit add)│ (13/15-bit) │ Integrated │ │
318 * ├─────────────────────┼────────────┼─────────────┼──────────────┼─────────────┼──────────────┤
319 * │ FORCE_FLOAT │ N/A │ Pre-matrix │ Float │ Float+0.5 │ In scale_f │
320 * │ │ │ (float add) │ (scaled) │ (if int out)│ │
321 * ├─────────────────────┼────────────┼─────────────┼──────────────┼─────────────┼──────────────┤
322 * │ FLOAT_OUTPUT │ Yes (16) │ After load │ Integer │ No shift │ Post-matrix │
323 * │ │ No (<16) │ (16-bit add)│ (13/15-bit) │ (int→float) │ (scale_f) │
324 * ├─────────────────────┼────────────┼─────────────┼──────────────┼─────────────┼──────────────┤
325 * │ BITCONV_INT_LIMITED │ Yes (16) │ After load │ Integer │ Yes (adj. │ Integrated │
326 * │ │ No (<16) │ (16-bit add)│ (13/15-bit) │ shift) │ into shift │
327 * ├─────────────────────┼────────────┼─────────────┼──────────────┼─────────────┼──────────────┤
328 * │ BITCONV_INT_FULL │ N/A │ Pre-matrix │ Float │ Float+0.5 │ In scale_f │
329 * │ │ │ (float add) │ (scaled) │ (if int out)│ │
330 * └─────────────────────┴────────────┴─────────────┴──────────────┴─────────────┴──────────────┘
331 *
332 * OFFSET APPLICATION DETAILS:
333 * ┌─────────────────────┬─────────────────────────────────────────────────────────────────────┐
334 * │ Conversion Type │ Offset Application Strategy │
335 * ├─────────────────────┼─────────────────────────────────────────────────────────────────────┤
336 * │ NATIVE_INT │ • <16-bit: offset_in added as int16 after load │
337 * │ │ • 16-bit: offset_in in 32-bit patch after MADD (with pivot) │
338 * │ │ • Output: offset_out in MADD rounding constant (scaled by 2^13/15) │
339 * ├─────────────────────┼─────────────────────────────────────────────────────────────────────┤
340 * │ FORCE_FLOAT │ • Input: offset_in added as float before matrix multiply │
341 * │ │ • Output: offset_out added as float in matrix result │
342 * │ │ • Coefficients pre-scaled by scale_f for bit-depth conversion │
343 * ├─────────────────────┼─────────────────────────────────────────────────────────────────────┤
344 * │ FLOAT_OUTPUT │ • Input: Same as NATIVE_INT (int16 or 32-bit patch) │
345 * │ │ • Output: No offset in MADD; added post-conversion in float domain │
346 * │ │ • Result: int32 → float with scale_f, then + offset_out_f │
347 * ├─────────────────────┼─────────────────────────────────────────────────────────────────────┤
348 * │ BITCONV_INT_LIMITED │ • Same as NATIVE_INT but with adjusted shift (13 - bit_diff) │
349 * │ │ • Chroma offset uses SOURCE bit depth (half_pixel_offset) │
350 * │ │ • Bit-depth scaling integrated into the right-shift operation │
351 * ├─────────────────────┼─────────────────────────────────────────────────────────────────────┤
352 * │ BITCONV_INT_FULL │ • Same as FORCE_FLOAT (uses float workflow internally) │
353 * │ │ • Required for full-range bit-depth conversions (e.g., 10→8 full) │
354 * └─────────────────────┴─────────────────────────────────────────────────────────────────────┘
355 *
356 * 16-BIT PIVOT TECHNIQUE (for integer paths only):
357 * Problem: uint16 range [0, 65535] doesn't fit in signed int16 [-32768, 32767]
358 * Solution: Flip MSB to pivot unsigned to signed: Y_signed = Y XOR 0x8000
359 * - 0 → -32768, 65535 → 32767 (all values fit in int16)
360 * - Correction applied in 32-bit patch: add (32768 + offset_in) × coefficients
361 * - See detailed explanation at top of function
362 *
363 * CHROMA CENTERING:
364 * YUV Input: U/V centered around half (e.g., 128 for 8-bit) → subtract half
365 * YUV Output: U/V centered around half → add half after matrix
366 * RGB: No centering (all values have same zero point)
367 *
368 * PERFORMANCE CHARACTERISTICS:
369 * - AVX2: 32 pixels per iteration (primary target, 2013+ CPUs)
370 * - SSE2: 8 pixels per iteration (legacy compatibility)
371 * - Integer MADD path: ~4000-5400 fps (1920×1080, 8-bit, Ryzen)
372 * - Float workflow: ~3200-3900 fps (10-26% slower, but necessary for some cases)
373 *
374 * EXAMPLE USE CASES:
375 * YUV→RGB, 10-bit→10-bit, limited range:
376 * → NATIVE_INT (integer MADD, no bit conversion)
377 *
378 * YUV→RGB, 10-bit→8-bit, limited→limited:
379 * → BITCONV_INT_LIMITED (integrated bit scaling in shift)
380 *
381 * YUV→RGB, 10-bit→8-bit, full→full:
382 * → BITCONV_INT_FULL (uses float workflow internally)
383 *
384 * YUV→RGB, 16-bit→32-bit float:
385 * → FORCE_FLOAT (required for float input)
386 *
387 * YUV→RGB, 8-bit→32-bit float, limited→full:
388 * → FLOAT_OUTPUT (integer matrix, float output with range expansion)
389 *
390 * YUV(BT.601)→YUV(BT.709), 10-bit→10-bit:
391 * → NATIVE_INT with fused conversion matrix (avoids RGB intermediate)
392 */
393
394 /**
395 * @brief Universal color space conversion function (AVX2 optimized)
396 *
397 * Converts between YUV and RGB color spaces with optional bit-depth conversion.
398 * Supports all combinations of 8/10/12/14/16-bit integer and 32-bit float formats.
399 *
400 * @tparam direction Conversion direction (YUV_TO_RGB, RGB_TO_YUV, YUV_TO_YUV, RGB_TO_RGB)
401 * @tparam pixel_t Input pixel type (uint8_t, uint16_t, or float)
402 * @tparam lessthan16bit True if input is 8/10/12/14-bit (enables optimizations)
403 * @tparam lessthan16bit_target True if output is 8/10/12/14-bit (enables clamping)
404 * @tparam pixel_t_dst Output pixel type (uint8_t, uint16_t, or float)
405 * @tparam conv_type Conversion workflow type (see YuvRgbConversionType)
406 *
407 * @param dstp Output plane pointers [3] (G/Y, B/U, R/V)
408 * @param dstPitch Output plane pitches in bytes [3]
409 * @param srcp Input plane pointers [3] (G/Y, B/U, R/V)
410 * @param srcPitch Input plane pitches in bytes [3]
411 * @param width Frame width in pixels
412 * @param height Frame height in pixels
413 * @param m Conversion matrix with coefficients and offsets
414 * @param bits_per_pixel Input bit depth (8-16)
415 * @param bits_per_pixel_target Output bit depth (8-16)
416 *
417 * @note Matrix coefficients in ConversionMatrix must be pre-scaled:
418 * - Integer coefficients: scaled by 2^13 (YUV↔RGB) or 2^15 (RGB→YUV)
419 * - Float coefficients: unscaled, will be multiplied by scale_f internally
420 *
421 * @note For 16-bit integer paths, the function uses a pivot trick to work around
422 * signed int16 range limitations. See detailed comment at function start.
423 *
424 * @note Processes 32 pixels per iteration on AVX2. For float input/output, includes
425 * safety checks to respect 64-byte scanline alignment guarantees.
426 */
427 template<ConversionDirection direction, typename pixel_t, bool lessthan16bit, bool lessthan16bit_target, typename pixel_t_dst, YuvRgbConversionType conv_type>
428 63 static void convert_yuv_to_planarrgb_avx2_internal(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m,
429 int bits_per_pixel, int bits_per_pixel_target)
430 {
431
432 63 constexpr int INT_ARITH_SHIFT =
433 (direction == ConversionDirection::YUV_TO_RGB) ? 13 :
434 (direction == ConversionDirection::RGB_TO_YUV || direction == ConversionDirection::RGB_TO_Y) ? 15 :
435 (direction == ConversionDirection::YUV_TO_YUV) ? 14 : 13;
436
437 // 8 bit uint8_t
438 // 10,12,14 bit uint16_t (signed range)
439 // 16 bit logic:
440 /*
441 1. pivot the pixel:
442 Convert uint16 pixel Y to a signed int16 by flipping the MSB (this is mathematically identical to Y−32768).
443 0 becomes −32768.
444 65535 becomes 32767.
445 All values now fit in int16 without saturation.
446 2. reorganize the formula (offset_in is negative when exists, e.g. -4096):
447 Original: (Y + offset_y) * Cy
448 Substitute
449 Y = (Ysigned​ + 32768)
450 => (Ysigned​ + 32768 + offset_y) * Cy​
451 => (Ysigned​ * Cy​) + (32768 + offset_y) * Cy​)
452 3. correction after the madd section:
453 Add ((32768 + offset_y) * Cy​) to the existing 32-bit rounding/offset_in constant.
454 4. Output rgb offset_in is also added to the precalculated patch.
455 */
456
457 // When input is float (pixel_t), float workflow (FORCE_FLOAT) is compulsory.
458 // But not the opposite: FORCE_FLOAT and not float input is fine
459 // make a static assert
460 static_assert(!(std::is_floating_point<pixel_t>::value && conv_type != YuvRgbConversionType::FORCE_FLOAT), "FORCE_FLOAT conversion type is required for float input pixel type");
461
462 63 constexpr bool final_is_float = std::is_floating_point<pixel_t_dst>::value;
463 63 constexpr bool would_need_64bit_v_patch = !lessthan16bit && !final_is_float && (INT_ARITH_SHIFT == 15);
464 // RGB_TO_YUV, RGB_TO_Y 16 bit origin case needs 64 bit extension at one point to avoid overflow
465 // but it makes it much slower than the full-float path, so we force float path for that case as well
466
467 // effectively full-float-inside for int full range conversion, but with the same output rules as other float conversions
468 63 constexpr bool force_float = (conv_type == YuvRgbConversionType::FORCE_FLOAT) || would_need_64bit_v_patch;
469
470 63 constexpr bool need_int_conversion_narrow_range = conv_type == YuvRgbConversionType::BITCONV_INT_LIMITED; // full_d is false
471 63 constexpr bool need_int_conversion_full_range = conv_type == YuvRgbConversionType::BITCONV_INT_FULL; // full_d is true
472 63 constexpr bool need_int_conversion = conv_type == YuvRgbConversionType::BITCONV_INT_FULL || conv_type == YuvRgbConversionType::BITCONV_INT_LIMITED ||
473 (conv_type == YuvRgbConversionType::FORCE_FLOAT && !final_is_float);
474
475 63 constexpr bool float_matrix_workflow = force_float || need_int_conversion_full_range; // effectively full-float-inside for int full range conversion
476
477 // quasi-constexpr, may help optimizer
478 24 if constexpr (std::is_same<pixel_t, uint8_t>::value) bits_per_pixel = 8;
479 19 if constexpr (std::is_same<pixel_t_dst, uint8_t>::value) bits_per_pixel_target = 8;
480 13 if constexpr (std::is_same<pixel_t, uint16_t>::value && !lessthan16bit) bits_per_pixel = 16;
481 15 if constexpr (std::is_same<pixel_t_dst, uint16_t>::value && !lessthan16bit_target) bits_per_pixel_target = 16;
482 28 if constexpr (conv_type == YuvRgbConversionType::NATIVE_INT) bits_per_pixel_target = bits_per_pixel;
483
484 63 const int bit_diff = need_int_conversion ? bits_per_pixel_target - bits_per_pixel : 0;
485 63 const int target_shift = need_int_conversion_narrow_range ? INT_ARITH_SHIFT - bit_diff : INT_ARITH_SHIFT; // int->int narrow range: integrate the bit depth conversion into the scaling back
486
487 63 const int ROUNDER = (final_is_float || float_matrix_workflow) ? 0 : (1 << (target_shift - 1)); // 0 when float internal calculation is involved
488
489 // For integer workflow + final is float:
490 63 const float out_offset_f = m.offset_out_f_32; // for post-32-bit float conversion
491
492 63 const int half_pixel_offset = 1 << (bits_per_pixel - 1); // YUV --> // at input is float: n/a
493 63 const int half_pixel_offset_target = 1 << (bits_per_pixel_target - 1); // For float_matrix_workflow or output is float
494 63 const int max_pixel_value_target = (1 << bits_per_pixel_target) - 1;
495
496 63 bits_conv_constants conversion_ranges;
497 63 const bool full_scale_d = m.offset_out == 0;
498 // matrix is handling only the same-bit-depth factor. Output result must be scaled as if
499 // we further correct it with a post-matrix scaling for bit depth conversion which depends only
500 // on the destination limite/full
501
30/320
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 4 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 8 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 6 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 5 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 24 not taken.
63 get_bits_conv_constants(conversion_ranges, false, full_scale_d, full_scale_d, bits_per_pixel, bits_per_pixel_target); // our final scale would be as if work to float
502
503 63 constexpr int int_arithmetic_shift = 1 << INT_ARITH_SHIFT;
504 63 float scale_f = conversion_ranges.mul_factor;
505 // Integer matrix workflow + 32 bit final float output extra rules
506 // - no rounding and scaling back INT_ARITH_SHIFT e.g. 13 for YUV-RGB, 15 for RGB-YUV bits
507 // - no clamping to bit depth limits
508 // - the INT_ARITH_SHIFT-bit scaling factor is integrated into the bits_per_pixel shift
509 if (final_is_float && !float_matrix_workflow)
510 scale_f = scale_f / int_arithmetic_shift; // int workflow, float at the end
511
512 63 __m256i half = _mm256_set1_epi16((short)half_pixel_offset); // 128
513 63 __m256i limit = _mm256_set1_epi16((short)max_pixel_value_target); // 255
514
515 // 13 bit INT_ARITH_SHIFT example:
516 // to be able to use it as signed 16 bit in madd; 4096+(16<<13) would not fit into i16
517 // multiplier is 4096 instead of 1:
518 // original : 1 * 4096
519 // needed : 1 * (4096 + offset_rgb<<13) (4096 + 131072 overflows i16)
520 // changed to : 4096 * (1 + offset_rgb>>(13-1)
521 // Except for exact 16 bit, where we do the output offset_in adjustment along with the 16 bit signed-unsigned pivot fix
522
523 // Overflow and rounding magnitude considerations.
524 // INT_ARITH_SHIFT is 13,14,15; bit_diff is +/-8; target_shift is INT_ARITH_SHIFT+/-8
525 // Make ROUND_SCALE
526 // - still safely fit in signed 16 bit
527 // - keeping ROUNDER as multiple of ROUND_SCALE
528 // Since ROUNDER is (1 << (target_shift - 1)), we have to limit it only when
529 // ROUNDER/ROUND_SCALE would result in 0
530 // e.g. rgb->Y 8->10 bits: INT_ARITH_SHIFT=15, bit_diff=10-8=2, target_shift=13
531 // ROUNDER is 1<<(target_shift-1)=1<<(13-1)
532 // old code: ROUND_SCALE is 1<<(INT_ARITH_SHIFT-1)=1<<(15-1)
533 // ROUNDER/ROUND_SCALE would always be 0, so in madd the multiplication would result in 0.as well
534 // new code (keep minimum of target_shift and INT_ARITH_SHIFT)
535 // ROUNDER/ROUND_SCALE as a multiplier is now 1 or a small power-of-2
536
537
5/72
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 63 → 64 taken 1 time.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 63 → 64 taken 1 time.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 63 → 64 taken 3 times.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 63 → 64 taken 1 time.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✓ Branch 63 → 65 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 63 → 64 not taken.
✗ Branch 63 → 65 not taken.
63 const int ROUND_SCALE = 1 << ((target_shift < INT_ARITH_SHIFT ? target_shift : INT_ARITH_SHIFT) - 1);
538 71 const __m256i m256i_round_scale = _mm256_set1_epi16((short)ROUND_SCALE);
539
540 int round_mask_plus_offset_out_scaled_i;
541 int round_mask_plus_offset_out_chroma_scaled_i;
542
543 // integer workflow + exact 16 bit path: needs a special handling for the pivot and input offset_in and output rgb offset_out
544 __m256i v_patch_G, v_patch_B, v_patch_R;
545 63 __m256i sign_flip_mask = _mm256_set1_epi16((short)0x8000); // for 16 bit pivot
546
547 // Full-range is float-workflow inside, so no need to do any of the above adjustments in
548 // integer arithmetic, just do the full float conversion and clamp at the end if needed
549
550 // Input offset_in handling
551 63 const int offset_in_scalar = m.offset_in;
552 63 const int offset_out_scalar = m.offset_out;
553
554 __m256i offset_in;
555 __m256 offset_in_f;
556 if constexpr (float_matrix_workflow) {
557 32 offset_in = _mm256_set1_epi32(offset_in_scalar); // float workflow, integer inputs
558 64 offset_in_f = _mm256_set1_ps(m.offset_in_f); // float workflow, float inputs
559 }
560 else if constexpr (lessthan16bit) // integer workflow, lessthan16 bit path
561 26 offset_in = _mm256_set1_epi16((short)offset_in_scalar); // input offset_in correction can happen in 16 bit arithmetic
562 else // n/a, for exact 16 bit integer workflow, the offset_in is handled in the 32-bit patch together with the pivot adjustment
563 5 offset_in = _mm256_setzero_si256();
564
565 if constexpr (!float_matrix_workflow) {
566 // integer preparations for the madd-based main loop
567 // keep madd simple: only handle the rounding (ROUND_SCALE * 1)
568 // offsets are handled later in the patch, after the madd, added to the same place as the optional 16-bit pivot adjustment
569 31 round_mask_plus_offset_out_scaled_i = ROUNDER / ROUND_SCALE; // 1 or small power-of-2 or 0 (final_is_float)
570 31 round_mask_plus_offset_out_chroma_scaled_i = ROUNDER / ROUND_SCALE; // 1 or small power-of-2 or 0 (final_is_float)
571
572 // 32-bit post-conversion adds offset in float domain, this is why it's 0 for final_is_float
573 31 const int offset_out_for_patch = final_is_float ? 0 : (offset_out_scalar << INT_ARITH_SHIFT);
574 31 const int chroma_offset_out_for_patch = final_is_float ? 0 : (half_pixel_offset << INT_ARITH_SHIFT); // 32-bit post-conversion adds offset in float domain.
575
576 if constexpr (lessthan16bit) {
577 // 8-14 bit
578 // move ONLY the output offset to the 32-bit patch
579 if constexpr (direction == ConversionDirection::RGB_TO_YUV || direction == ConversionDirection::YUV_TO_YUV) {
580 12 v_patch_G = _mm256_set1_epi32(offset_out_for_patch);
581 12 v_patch_B = _mm256_set1_epi32(chroma_offset_out_for_patch);
582 12 v_patch_R = _mm256_set1_epi32(chroma_offset_out_for_patch);
583 }
584 else {
585 // YUV_TO_RGB, RGB_TO_RGB, RGB_TO_Y: same nonchroma offset
586 14 v_patch_G = v_patch_B = v_patch_R = _mm256_set1_epi32(offset_out_for_patch);
587 }
588 }
589 else {
590 // exact 16 bit
591
592 // move BOTH the pivot and the output offset to the 32-bit patch
593 // Since we have to do the patching anyway, we can combine both adjustments here
594 5 const int luma_or_rgbin_pivot = 32768 + offset_in_scalar;
595 5 const int chroma_pivot = 32768;
596
597 if constexpr (direction == ConversionDirection::YUV_TO_RGB) {
598 // for YUV->RGB, the pivot adjustment is needed for all three channels since the luma coeffs are not zero, but pivot only the Y
599 3 v_patch_G = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_g + offset_out_for_patch);
600 3 v_patch_B = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_b + offset_out_for_patch);
601 6 v_patch_R = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_r + offset_out_for_patch);
602 }
603 else if constexpr (direction == ConversionDirection::RGB_TO_RGB) {
604 // for RGB->RGB, the pivot adjustment is needed for all three channels in and aout
605 v_patch_G = _mm256_set1_epi32(luma_or_rgbin_pivot * (m.y_g + m.u_g + m.v_g) + offset_out_for_patch);
606 v_patch_B = _mm256_set1_epi32(luma_or_rgbin_pivot * (m.y_b + m.u_b + m.v_b) + offset_out_for_patch);
607 v_patch_R = _mm256_set1_epi32(luma_or_rgbin_pivot * (m.y_r + m.u_r + m.v_r) + offset_out_for_patch);
608 }
609 else if constexpr (direction == ConversionDirection::RGB_TO_YUV) {
610 // RGB→YUV: All RGB inputs are pivoted, need to account for all three
611 // Out0=Y (luma offset), Out1=U and Out2=V (chroma offset)
612 // Y output = y_r*R + y_g*G + y_b*B
613 if constexpr (!would_need_64bit_v_patch) {
614 v_patch_G = _mm256_set1_epi32(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
615 // U output = u_r*R + u_g*G + u_b*B
616 v_patch_B = _mm256_set1_epi32(luma_or_rgbin_pivot * (m.u_r + m.u_g + m.u_b) + chroma_offset_out_for_patch);
617 // V output = v_r*R + v_g*G + v_b*B
618 v_patch_R = _mm256_set1_epi32(luma_or_rgbin_pivot * (m.v_r + m.v_g + m.v_b) + chroma_offset_out_for_patch);
619 }
620 else {
621 // this path must error out, never can be used, redirected to full-float workflow for this case due to speed reasons.
622 static_assert(!would_need_64bit_v_patch, "64-bit patch needed for RGB->YUV conversion, but not supported in this path. Redirected to float workflow instead.");
623 v_patch_G = _mm256_set1_epi64x(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
624 v_patch_B = _mm256_set1_epi64x(luma_or_rgbin_pivot * (m.u_r + m.u_g + m.u_b) + chroma_offset_out_for_patch);
625 v_patch_R = _mm256_set1_epi64x(luma_or_rgbin_pivot * (m.v_r + m.v_g + m.v_b) + chroma_offset_out_for_patch);
626 }
627 }
628 else if constexpr (direction == ConversionDirection::RGB_TO_Y) {
629 // RGB→YUV: All RGB inputs are pivoted, need to account for all three
630 // Out0=Y (luma offset), No chroma
631 // Y output = y_r*R + y_g*G + y_b*B
632 if constexpr (!would_need_64bit_v_patch) {
633 v_patch_G = _mm256_set1_epi32(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
634 //v_patch_B = _mm256_set1_epi32(0); // no chroma
635 //v_patch_R = _mm256_set1_epi32(0); // no chroma
636 }
637 else {
638 // this path must error out, never can be used, redirected to full-float workflow for this case due to speed reasons.
639 static_assert(!would_need_64bit_v_patch, "64-bit patch needed for RGB->Y conversion, but not supported in this path. Redirected to float workflow instead.");
640 v_patch_G = _mm256_set1_epi64x(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
641 //v_patch_B = _mm256_set1_epi64x(0); // no chroma
642 //v_patch_R = _mm256_set1_epi64x(0); // no chroma
643 }
644 }
645 else if constexpr (direction == ConversionDirection::YUV_TO_YUV) {
646 // for YUV->YUV
647 // FIXME: untested, no AviSynth caller yet. Suspect m.y_b/m.y_r should be
648 // m.u_b/m.v_r (chroma diagonal), and offset should be chroma_offset_out_for_patch.
649 2 v_patch_G = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_g + offset_out_for_patch);
650 2 v_patch_B = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_b + chroma_offset_out_for_patch);
651 4 v_patch_R = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_r + chroma_offset_out_for_patch);
652 }
653 }
654 }
655
656 // For integer workflow + final is float
657 63 const __m256 out_offset_f_avx2 = _mm256_set1_ps(out_offset_f);
658
659 63 __m256i zero = _mm256_setzero_si256();
660 63 const __m256 scale_f_avx2 = _mm256_set1_ps(scale_f);
661
662 // For integer workflow
663 __m256i m_uy_G, m_vr_G, m_uy_B, m_vr_B, m_uy_R, m_vr_R; // integer arithmetic, including 32-bit float target when non-float_matrix_workflow
664 // For float_matrix_workflow: define coefficient accessors based on direction
665 __m256 coeff_out0_in0, coeff_out0_in1, coeff_out0_in2; // First output row
666 __m256 coeff_out1_in0, coeff_out1_in1, coeff_out1_in2; // Second output row
667 __m256 coeff_out2_in0, coeff_out2_in1, coeff_out2_in2; // Third output row
668
669 __m256 m_offset_out_y_or_g_f, m_offset_out_u_or_b_f, m_offset_out_v_or_r_f; // three separate offsets, in YUV-RGB they are the same, in RGB-YUV they are different for luma and chroma
670
671 if constexpr (float_matrix_workflow) {
672 __m256 m_y_g_f, m_y_b_f, m_y_r_f, m_u_g_f, m_u_b_f, m_u_r_f, m_v_g_f, m_v_b_f, m_v_r_f;
673 64 m_y_g_f = _mm256_mul_ps(_mm256_set1_ps(m.y_g_f), scale_f_avx2);
674 64 m_y_b_f = _mm256_mul_ps(_mm256_set1_ps(m.y_b_f), scale_f_avx2);
675 64 m_y_r_f = _mm256_mul_ps(_mm256_set1_ps(m.y_r_f), scale_f_avx2);
676 if constexpr (direction != ConversionDirection::RGB_TO_Y) {
677 42 m_u_g_f = _mm256_mul_ps(_mm256_set1_ps(m.u_g_f), scale_f_avx2);
678 42 m_u_b_f = _mm256_mul_ps(_mm256_set1_ps(m.u_b_f), scale_f_avx2);
679 42 m_u_r_f = _mm256_mul_ps(_mm256_set1_ps(m.u_r_f), scale_f_avx2);
680 42 m_v_g_f = _mm256_mul_ps(_mm256_set1_ps(m.v_g_f), scale_f_avx2);
681 42 m_v_b_f = _mm256_mul_ps(_mm256_set1_ps(m.v_b_f), scale_f_avx2);
682 42 m_v_r_f = _mm256_mul_ps(_mm256_set1_ps(m.v_r_f), scale_f_avx2);
683 }
684
685 if constexpr (direction == ConversionDirection::YUV_TO_RGB || direction == ConversionDirection::RGB_TO_RGB) {
686 // RGB output: same offset for all channels
687 7 float rgb_out_offset_scaled = m.offset_out_f * scale_f;
688 7 m_offset_out_y_or_g_f = _mm256_set1_ps(rgb_out_offset_scaled);
689 7 m_offset_out_u_or_b_f = _mm256_set1_ps(rgb_out_offset_scaled);
690 7 m_offset_out_v_or_r_f = _mm256_set1_ps(rgb_out_offset_scaled);
691 }
692 else if constexpr (direction == ConversionDirection::RGB_TO_YUV || direction == ConversionDirection::YUV_TO_YUV) {
693
694 // YUV output
695 14 float y_out_offset = m.offset_out_f;
696 14 float y_out_offset_scaled = y_out_offset * scale_f;
697
698 // U/V center offset - should NOT be scaled by scale_f!
699 // The matrix output is already in the target range, just add the center
700 14 float uv_center_offset = final_is_float ? 0.0f : (float)half_pixel_offset_target;
701
702 14 m_offset_out_y_or_g_f = _mm256_set1_ps(y_out_offset_scaled);
703 14 m_offset_out_u_or_b_f = _mm256_set1_ps(uv_center_offset);
704 14 m_offset_out_v_or_r_f = _mm256_set1_ps(uv_center_offset);
705 }
706 else if constexpr (direction == ConversionDirection::RGB_TO_Y) {
707 // no chroma output
708 11 float y_out_offset_scaled = m.offset_out_f * scale_f;
709 11 m_offset_out_y_or_g_f = _mm256_set1_ps(y_out_offset_scaled);
710 }
711
712 if constexpr (direction == ConversionDirection::YUV_TO_RGB) {
713 // YUV→RGB: outputs are RGB (rows G,B,R), inputs are YUV (columns Y,U,V)
714 // Out0=G, Out1=B, Out2=R
715 7 coeff_out0_in0 = m_y_g_f; coeff_out0_in1 = m_u_g_f; coeff_out0_in2 = m_v_g_f;
716 7 coeff_out1_in0 = m_y_b_f; coeff_out1_in1 = m_u_b_f; coeff_out1_in2 = m_v_b_f;
717 7 coeff_out2_in0 = m_y_r_f; coeff_out2_in1 = m_u_r_f; coeff_out2_in2 = m_v_r_f;
718 }
719 else if constexpr (direction == ConversionDirection::RGB_TO_YUV) {
720 // RGB→YUV: outputs are YUV (rows Y,U,V), inputs are RGB in memory order (G, B, R)
721 // Out0=Y, Out1=U, Out2=V
722 // Inputs: in0=G, in1=B, in2=R
723 // Y = y_r*R + y_g*G + y_b*B
724 // = y_g*in0 + y_b*in1 + y_r*in2
725 13 coeff_out0_in0 = m_y_g_f; coeff_out0_in1 = m_y_b_f; coeff_out0_in2 = m_y_r_f;
726
727 // U = u_r*R + u_g*G + u_b*B
728 // = u_g*in0 + u_b*in1 + u_r*in2
729 13 coeff_out1_in0 = m_u_g_f; coeff_out1_in1 = m_u_b_f; coeff_out1_in2 = m_u_r_f;
730
731 // V = v_r*R + v_g*G + v_b*B
732 // = v_g*in0 + v_b*in1 + v_r*in2
733 13 coeff_out2_in0 = m_v_g_f; coeff_out2_in1 = m_v_b_f; coeff_out2_in2 = m_v_r_f;
734 }
735 else if constexpr (direction == ConversionDirection::RGB_TO_Y) {
736 // RGB→YUV: outputs are YUV (rows Y,U,V), inputs are RGB in memory order (G, B, R)
737 // Out0=Y, No chroma output
738 // Inputs: in0=G, in1=B, in2=R
739 // Y = y_r*R + y_g*G + y_b*B
740 // = y_g*in0 + y_b*in1 + y_r*in2
741 11 coeff_out0_in0 = m_y_g_f; coeff_out0_in1 = m_y_b_f; coeff_out0_in2 = m_y_r_f;
742 }
743 else if constexpr (direction == ConversionDirection::YUV_TO_YUV) {
744 // YUV→YUV: outputs are YUV (rows Y,U,V), inputs are YUV (columns Y,U,V)
745 // For BT.601→BT.709 conversion, this is a fused matrix
746 // Out0=Y_out, Out1=U_out, Out2=V_out
747 1 coeff_out0_in0 = m_y_g_f; coeff_out0_in1 = m_u_g_f; coeff_out0_in2 = m_v_g_f;
748 1 coeff_out1_in0 = m_y_b_f; coeff_out1_in1 = m_u_b_f; coeff_out1_in2 = m_v_b_f;
749 1 coeff_out2_in0 = m_y_r_f; coeff_out2_in1 = m_u_r_f; coeff_out2_in2 = m_v_r_f;
750 }
751 else if constexpr (direction == ConversionDirection::RGB_TO_RGB) { // RGB_TO_RGB
752 // RGB→RGB: outputs are RGB (rows R,G,B), inputs are RGB (columns R,G,B)
753 // For gamut conversion or color correction
754 // Out0=G_out, Out1=B_out, Out2=R_out
755 coeff_out0_in0 = m_y_g_f; coeff_out0_in1 = m_u_g_f; coeff_out0_in2 = m_v_g_f;
756 coeff_out1_in0 = m_y_b_f; coeff_out1_in1 = m_u_b_f; coeff_out1_in2 = m_v_b_f;
757 coeff_out2_in0 = m_y_r_f; coeff_out2_in1 = m_u_r_f; coeff_out2_in2 = m_v_r_f;
758 }
759 }
760 else {
761 // Integer workflow coefficient setup
762 int round_and_out_offset_y_or_g;
763 int round_and_out_offset_u_or_b;
764 int round_and_out_offset_v_or_r;
765
766 if constexpr (direction == ConversionDirection::YUV_TO_RGB || direction == ConversionDirection::RGB_TO_RGB) {
767 // output RGB: same offset for all channels
768 13 round_and_out_offset_y_or_g = round_mask_plus_offset_out_scaled_i;
769 13 round_and_out_offset_u_or_b = round_mask_plus_offset_out_scaled_i;
770 13 round_and_out_offset_v_or_r = round_mask_plus_offset_out_scaled_i;
771 }
772 else if constexpr (direction == ConversionDirection::RGB_TO_YUV || direction == ConversionDirection::YUV_TO_YUV) {
773 // output YUV: different offsets for Y vs U/V
774 14 round_and_out_offset_y_or_g = round_mask_plus_offset_out_scaled_i;
775 14 round_and_out_offset_u_or_b = round_mask_plus_offset_out_chroma_scaled_i;
776 14 round_and_out_offset_v_or_r = round_mask_plus_offset_out_chroma_scaled_i;
777 }
778 else if constexpr (direction == ConversionDirection::RGB_TO_Y) {
779 // no chroma output
780 4 round_and_out_offset_y_or_g = round_mask_plus_offset_out_scaled_i;
781 }
782
783 // Pack coefficients based on direction
784 // For MADD packing: [coeff_in1, coeff_in0] and [coeff_in2, round]
785
786 if constexpr (direction == ConversionDirection::YUV_TO_RGB || direction == ConversionDirection::YUV_TO_YUV) {
787 // YUV→RGB: Out0=G, Out1=B, Out2=R
788 // YUV→YUV: Out0=Y, Out1=U, Out2=V
789 // G = y_g*Y + u_g*U + v_g*V
790 // Inputs are: in0=Y, in1=U, in2=V
791 16 m_uy_G = _mm256_set1_epi32((static_cast<uint16_t>(m.y_g) << 16) | static_cast<uint16_t>(m.u_g));
792 16 m_vr_G = _mm256_set1_epi32((static_cast<uint16_t>(round_and_out_offset_y_or_g) << 16) | static_cast<uint16_t>(m.v_g));
793
794 // B = y_b*Y + u_b*U + v_b*V
795 16 m_uy_B = _mm256_set1_epi32((static_cast<uint16_t>(m.y_b) << 16) | static_cast<uint16_t>(m.u_b));
796 16 m_vr_B = _mm256_set1_epi32((static_cast<uint16_t>(round_and_out_offset_u_or_b) << 16) | static_cast<uint16_t>(m.v_b));
797
798 // R = y_r*Y + u_r*U + v_r*V
799 16 m_uy_R = _mm256_set1_epi32((static_cast<uint16_t>(m.y_r) << 16) | static_cast<uint16_t>(m.u_r));
800 16 m_vr_R = _mm256_set1_epi32((static_cast<uint16_t>(round_and_out_offset_v_or_r) << 16) | static_cast<uint16_t>(m.v_r));
801 }
802 else if constexpr (direction == ConversionDirection::RGB_TO_YUV || direction == ConversionDirection::RGB_TO_RGB) {
803 // RGB→YUV: Out0=Y, Out1=U, Out2=V
804 // RGB→RGB: Out0=G, Out1=B, Out2=R
805 // Inputs are: in0=G, in1=B, in2=R
806
807 // Y = y_r*R + y_g*G + y_b*B
808 // = y_g*in0 + y_b*in1 + y_r*in2
809 11 m_uy_G = _mm256_set1_epi32((static_cast<uint16_t>(m.y_g) << 16) | static_cast<uint16_t>(m.y_b));
810 11 m_vr_G = _mm256_set1_epi32((static_cast<uint16_t>(round_and_out_offset_y_or_g) << 16) | static_cast<uint16_t>(m.y_r));
811
812 // U = u_r*R + u_g*G + u_b*B
813 // = u_g*in0 + u_b*in1 + u_r*in2
814 11 m_uy_B = _mm256_set1_epi32((static_cast<uint16_t>(m.u_g) << 16) | static_cast<uint16_t>(m.u_b));
815 11 m_vr_B = _mm256_set1_epi32((static_cast<uint16_t>(round_and_out_offset_u_or_b) << 16) | static_cast<uint16_t>(m.u_r));
816
817 // V = v_r*R + v_g*G + v_b*B
818 // = v_g*in0 + v_b*in1 + v_r*in2
819 11 m_uy_R = _mm256_set1_epi32((static_cast<uint16_t>(m.v_g) << 16) | static_cast<uint16_t>(m.v_b));
820 11 m_vr_R = _mm256_set1_epi32((static_cast<uint16_t>(round_and_out_offset_v_or_r) << 16) | static_cast<uint16_t>(m.v_r));
821 }
822 else if constexpr (direction == ConversionDirection::RGB_TO_Y) {
823 // RGB→Y: Out0=Y, No chroma output
824 // Inputs are: in0=G, in1=B, in2=R
825 // Y = y_r*R + y_g*G + y_b*B
826 // = y_g*in0 + y_b*in1 + y_r*in2
827 4 m_uy_G = _mm256_set1_epi32((static_cast<uint16_t>(m.y_g) << 16) | static_cast<uint16_t>(m.y_b));
828 4 m_vr_G = _mm256_set1_epi32((static_cast<uint16_t>(round_and_out_offset_y_or_g) << 16) | static_cast<uint16_t>(m.y_r));
829 }
830 }
831
832 63 const int rowsize = width * sizeof(pixel_t);
833 63 const int rowsize_aligned = AlignNumber(rowsize, FRAME_ALIGN); // 64
834
60/320
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 171 → 125 taken 12 times.
✓ Branch 171 → 172 taken 4 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 171 → 125 not taken.
✗ Branch 171 → 172 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 171 → 125 not taken.
✗ Branch 171 → 172 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 171 → 125 taken 3 times.
✓ Branch 171 → 172 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 96 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 153 → 100 not taken.
✗ Branch 153 → 154 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 150 → 97 taken 36 times.
✓ Branch 150 → 151 taken 8 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 153 → 100 not taken.
✗ Branch 153 → 154 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 153 → 100 not taken.
✗ Branch 153 → 154 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 180 → 125 taken 3 times.
✓ Branch 180 → 181 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 145 → 98 not taken.
✗ Branch 145 → 146 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 146 → 99 taken 11 times.
✓ Branch 146 → 147 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 102 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 102 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 102 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 174 → 125 taken 3 times.
✓ Branch 174 → 175 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 143 → 96 not taken.
✗ Branch 143 → 144 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 100 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 100 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 144 → 97 taken 10 times.
✓ Branch 144 → 145 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 100 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 187 → 125 taken 17 times.
✓ Branch 187 → 188 taken 6 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 187 → 125 not taken.
✗ Branch 187 → 188 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 187 → 125 not taken.
✗ Branch 187 → 188 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 187 → 125 taken 3 times.
✓ Branch 187 → 188 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 224 → 125 not taken.
✗ Branch 224 → 225 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 153 → 100 not taken.
✗ Branch 153 → 154 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 224 → 125 not taken.
✗ Branch 224 → 225 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 157 → 104 taken 5 times.
✓ Branch 157 → 158 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 224 → 125 not taken.
✗ Branch 224 → 225 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 154 → 101 taken 23 times.
✓ Branch 154 → 155 taken 5 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 224 → 125 not taken.
✗ Branch 224 → 225 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 157 → 104 not taken.
✗ Branch 157 → 158 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 224 → 125 not taken.
✗ Branch 224 → 225 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 224 → 125 taken 6 times.
✓ Branch 224 → 225 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 157 → 104 taken 5 times.
✓ Branch 157 → 158 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 224 → 125 not taken.
✗ Branch 224 → 225 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 145 → 98 not taken.
✗ Branch 145 → 146 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 218 → 125 taken 13 times.
✓ Branch 218 → 219 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 221 → 128 not taken.
✗ Branch 221 → 222 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 221 → 128 not taken.
✗ Branch 221 → 222 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 221 → 128 not taken.
✗ Branch 221 → 222 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 218 → 125 taken 3 times.
✓ Branch 218 → 219 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 100 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 151 → 104 taken 15 times.
✓ Branch 151 → 152 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 104 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 148 → 101 taken 5 times.
✓ Branch 148 → 149 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 104 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 218 → 125 not taken.
✗ Branch 218 → 219 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 171 → 125 taken 3 times.
✓ Branch 171 → 172 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 171 → 125 not taken.
✗ Branch 171 → 172 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 171 → 125 not taken.
✗ Branch 171 → 172 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 171 → 125 not taken.
✗ Branch 171 → 172 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 153 → 100 not taken.
✗ Branch 153 → 154 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 157 → 104 not taken.
✗ Branch 157 → 158 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 154 → 101 taken 3 times.
✓ Branch 154 → 155 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 157 → 104 not taken.
✗ Branch 157 → 158 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 157 → 104 not taken.
✗ Branch 157 → 158 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 180 → 125 not taken.
✗ Branch 180 → 181 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 145 → 98 not taken.
✗ Branch 145 → 146 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 146 → 99 taken 6 times.
✓ Branch 146 → 147 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 102 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 102 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 102 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 100 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 104 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 104 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 148 → 101 not taken.
✗ Branch 148 → 149 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 104 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 174 → 125 not taken.
✗ Branch 174 → 175 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 157 → 97 taken 9 times.
✓ Branch 157 → 158 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 157 → 97 not taken.
✗ Branch 157 → 158 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 157 → 97 not taken.
✗ Branch 157 → 158 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 157 → 97 not taken.
✗ Branch 157 → 158 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 194 → 97 not taken.
✗ Branch 194 → 195 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 139 → 88 not taken.
✗ Branch 139 → 140 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 194 → 97 not taken.
✗ Branch 194 → 195 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 143 → 92 not taken.
✗ Branch 143 → 144 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 194 → 97 not taken.
✗ Branch 194 → 195 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 140 → 89 taken 6 times.
✓ Branch 140 → 141 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 194 → 97 taken 3 times.
✓ Branch 194 → 195 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 143 → 92 not taken.
✗ Branch 143 → 144 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 194 → 97 not taken.
✗ Branch 194 → 195 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 194 → 97 taken 3 times.
✓ Branch 194 → 195 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 143 → 92 taken 3 times.
✓ Branch 143 → 144 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 194 → 97 not taken.
✗ Branch 194 → 195 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 131 → 86 not taken.
✗ Branch 131 → 132 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 188 → 97 taken 3 times.
✓ Branch 188 → 189 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 191 → 100 not taken.
✗ Branch 191 → 192 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 191 → 100 taken 6 times.
✓ Branch 191 → 192 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 191 → 100 not taken.
✗ Branch 191 → 192 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 133 → 88 not taken.
✗ Branch 133 → 134 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 137 → 92 not taken.
✗ Branch 137 → 138 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 188 → 97 taken 6 times.
✓ Branch 188 → 189 taken 2 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 137 → 92 not taken.
✗ Branch 137 → 138 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 134 → 89 taken 3 times.
✓ Branch 134 → 135 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 188 → 97 taken 3 times.
✓ Branch 188 → 189 taken 1 time.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 137 → 92 not taken.
✗ Branch 137 → 138 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 188 → 97 not taken.
✗ Branch 188 → 189 not taken.
293 for (int yy = 0; yy < height; yy++) {
835 // 32 pixels per loop: 32 * 8 bit = 32 bytes; 32 * 16 bit = 64 bytes
836 // Note: extra care needed for 32-bit float input or output, since 32xfloat is over
837 // Avisynth+ guaranteed scanline alignment (64 bytes)
838 // Ideally, we have to separate the processing into 32 pixel then 16 pixel chunks.
839 // See ConvertBits to float AVX2 version for reference.
840 // Actually, we only check a pre-calculated limit inside the loop, before the storage. (FIXME)
841 // But I guess, when processing so many pixels at once, it's not that big penalty.
842 // However duplicating the loop body seen below for the two float-problematic cases, that _is_ penalty :)
843
844
60/320
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 169 → 126 taken 12 times.
✓ Branch 169 → 170 taken 12 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 169 → 126 not taken.
✗ Branch 169 → 170 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 169 → 126 not taken.
✗ Branch 169 → 170 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 169 → 126 taken 3 times.
✓ Branch 169 → 170 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 97 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 101 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 148 → 98 taken 36 times.
✓ Branch 148 → 149 taken 36 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 101 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 101 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 178 → 126 taken 3 times.
✓ Branch 178 → 179 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 143 → 99 not taken.
✗ Branch 143 → 144 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 144 → 100 taken 11 times.
✓ Branch 144 → 145 taken 11 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 103 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 103 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 103 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 172 → 126 taken 3 times.
✓ Branch 172 → 173 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 141 → 97 not taken.
✗ Branch 141 → 142 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 145 → 101 not taken.
✗ Branch 145 → 146 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 145 → 101 not taken.
✗ Branch 145 → 146 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 142 → 98 taken 10 times.
✓ Branch 142 → 143 taken 10 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 145 → 101 not taken.
✗ Branch 145 → 146 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 185 → 126 taken 17 times.
✓ Branch 185 → 186 taken 17 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 185 → 126 not taken.
✗ Branch 185 → 186 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 185 → 126 not taken.
✗ Branch 185 → 186 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 185 → 126 taken 3 times.
✓ Branch 185 → 186 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 222 → 126 not taken.
✗ Branch 222 → 223 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 101 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 222 → 126 not taken.
✗ Branch 222 → 223 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 155 → 105 taken 10 times.
✓ Branch 155 → 156 taken 5 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 222 → 126 not taken.
✗ Branch 222 → 223 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 152 → 102 taken 28 times.
✓ Branch 152 → 153 taken 23 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 222 → 126 not taken.
✗ Branch 222 → 223 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 155 → 105 not taken.
✗ Branch 155 → 156 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 222 → 126 not taken.
✗ Branch 222 → 223 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 222 → 126 taken 6 times.
✓ Branch 222 → 223 taken 6 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 155 → 105 taken 10 times.
✓ Branch 155 → 156 taken 5 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 222 → 126 not taken.
✗ Branch 222 → 223 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 143 → 99 not taken.
✗ Branch 143 → 144 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 216 → 126 taken 13 times.
✓ Branch 216 → 217 taken 13 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 219 → 129 not taken.
✗ Branch 219 → 220 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 219 → 129 not taken.
✗ Branch 219 → 220 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 219 → 129 not taken.
✗ Branch 219 → 220 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 216 → 126 taken 3 times.
✓ Branch 216 → 217 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 145 → 101 not taken.
✗ Branch 145 → 146 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 149 → 105 taken 30 times.
✓ Branch 149 → 150 taken 15 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 105 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 146 → 102 taken 5 times.
✓ Branch 146 → 147 taken 5 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 105 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 216 → 126 not taken.
✗ Branch 216 → 217 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 169 → 126 taken 3 times.
✓ Branch 169 → 170 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 169 → 126 not taken.
✗ Branch 169 → 170 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 169 → 126 not taken.
✗ Branch 169 → 170 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 169 → 126 not taken.
✗ Branch 169 → 170 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 151 → 101 not taken.
✗ Branch 151 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 155 → 105 not taken.
✗ Branch 155 → 156 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 152 → 102 taken 3 times.
✓ Branch 152 → 153 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 155 → 105 not taken.
✗ Branch 155 → 156 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 155 → 105 not taken.
✗ Branch 155 → 156 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 178 → 126 not taken.
✗ Branch 178 → 179 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 143 → 99 not taken.
✗ Branch 143 → 144 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 144 → 100 taken 6 times.
✓ Branch 144 → 145 taken 6 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 103 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 103 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 147 → 103 not taken.
✗ Branch 147 → 148 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 145 → 101 not taken.
✗ Branch 145 → 146 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 105 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 105 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 146 → 102 not taken.
✗ Branch 146 → 147 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 149 → 105 not taken.
✗ Branch 149 → 150 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 172 → 126 not taken.
✗ Branch 172 → 173 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 155 → 98 taken 9 times.
✓ Branch 155 → 156 taken 9 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 155 → 98 not taken.
✗ Branch 155 → 156 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 155 → 98 not taken.
✗ Branch 155 → 156 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 155 → 98 not taken.
✗ Branch 155 → 156 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 192 → 98 not taken.
✗ Branch 192 → 193 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 137 → 89 not taken.
✗ Branch 137 → 138 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 192 → 98 not taken.
✗ Branch 192 → 193 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 141 → 93 not taken.
✗ Branch 141 → 142 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 192 → 98 not taken.
✗ Branch 192 → 193 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 138 → 90 taken 6 times.
✓ Branch 138 → 139 taken 6 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 192 → 98 taken 3 times.
✓ Branch 192 → 193 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 141 → 93 not taken.
✗ Branch 141 → 142 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 192 → 98 not taken.
✗ Branch 192 → 193 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 192 → 98 taken 3 times.
✓ Branch 192 → 193 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 141 → 93 taken 3 times.
✓ Branch 141 → 142 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned char, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 192 → 98 not taken.
✗ Branch 192 → 193 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 129 → 87 not taken.
✗ Branch 129 → 130 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 186 → 98 taken 3 times.
✓ Branch 186 → 187 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 189 → 101 not taken.
✗ Branch 189 → 190 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 189 → 101 taken 6 times.
✓ Branch 189 → 190 taken 6 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 189 → 101 not taken.
✗ Branch 189 → 190 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, false, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, float, (YuvRgbConversionType)2>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 131 → 89 not taken.
✗ Branch 131 → 132 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 135 → 93 not taken.
✗ Branch 135 → 136 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, false, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 186 → 98 taken 6 times.
✓ Branch 186 → 187 taken 6 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 135 → 93 not taken.
✗ Branch 135 → 136 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned char, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)0>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 132 → 90 taken 3 times.
✓ Branch 132 → 133 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 186 → 98 taken 3 times.
✓ Branch 186 → 187 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)3>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 135 → 93 not taken.
✗ Branch 135 → 136 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, unsigned short, true, true, unsigned short, (YuvRgbConversionType)4>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 186 → 98 not taken.
✗ Branch 186 → 187 not taken.
490 for (int x = 0; x < rowsize; x += 32 * sizeof(pixel_t)) {
845
846 // ConversionDirection::YUV_TO_RGB: y, u, v
847 // ConversionDirection::RGB_TO_YUV: g, b, r
848
849 // Regardless of the YUV/RGB source, we ise in0_1, in1_1, in2_1 for the first 16 pixels, and in0_2, in1_2, in2_2 for the second 16 pixels
850 // Layout for 0-1-2: Y-U-V or G-B-R
851
852 // integer input pixels
853 __m256i in0_1, in1_1, in2_1;
854 __m256i in0_2, in1_2, in2_2;
855 // float workflow
856 __m256 in0_1_f_lo, in0_1_f_hi, in0_2_f_lo, in0_2_f_hi;
857 __m256 in1_1_f_lo, in1_1_f_hi, in1_2_f_lo, in1_2_f_hi;
858 __m256 in2_1_f_lo, in2_1_f_hi, in2_2_f_lo, in2_2_f_hi;
859
860 // Avisynth FRAME_ALIGN == 64, so when final_is_float, we cannot process 32 pixels at once at the end of the line
861 // Can I write all 32 pixels (blockA+B+C+D)?
862 // yes: write all 4 blocks (blockA, B, C, D)
863 // no : Write only first 2 blocks (blockA, B), 16 floats are guaranteed safe due to 64-byte alignment
864 bool safe_last_16float_64bytes;
865 if constexpr (final_is_float || sizeof(pixel_t) == 4)
866 47 safe_last_16float_64bytes = (x + 32 * (int)sizeof(pixel_t)) <= rowsize_aligned;
867 else
868 213 safe_last_16float_64bytes = false;
869
870 // Note on widening strategy (Y, U, V) for the float internal path, where series of widenings are required:
871 //
872 // We use unpacklo/hi_epi16 for widening Y, U and V from (uint8 to) (u)int16 to int32,
873 // rather than _mm256_extracti128_si256 + (cvtepu8_epi16) + cvtepi16_epi32/cvtepu16_epi32.
874 // For U and V, an additional srai_epi16 generates the sign fill word needed
875 // for correct sign extension of the centered (negative-capable) chroma values.
876 //
877 // Although the extract+cvt approach would produce a sequential lane layout
878 // that avoids the permute2f128 shuffles before the final float store, it is
879 // measurably slower (Possibly port contention).
880
881 // Load pixels, for the integer path, we pivot for exact 16 bit Y later
882 if constexpr (sizeof(pixel_t) == 1) {
883 // Load 32 bytes (32 pixels), unpack to two 16-bit registers
884 111 __m256i in0_raw = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[0] + x)); // 0..7 8..15 16..23 24..31 Y or G
885 111 __m256i in1_raw = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[1] + x)); // U or B
886 184 __m256i in2_raw = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[2] + x)); // V or R
887
888 if constexpr (sizeof(pixel_t_dst) == 2) {
889 // 8->16 bit: pre-shuffle to avoid permutes at the end
890 35 in0_raw = _mm256_permute4x64_epi64(in0_raw, 0xD8); // (0 << 0) | (2 << 2) | (1 << 4) | (3 << 6)
891 // 0..7, 16..23, 8..15, 24..31
892 35 in1_raw = _mm256_permute4x64_epi64(in1_raw, 0xD8);
893 35 in2_raw = _mm256_permute4x64_epi64(in2_raw, 0xD8);
894 }
895 222 in0_1 = _mm256_unpacklo_epi8(in0_raw, zero); in0_2 = _mm256_unpackhi_epi8(in0_raw, zero);
896 // in0_1: 0..7, 8..15, in0_2: 16..23, 24..31
897 222 in1_1 = _mm256_unpacklo_epi8(in1_raw, zero); in1_2 = _mm256_unpackhi_epi8(in1_raw, zero);
898 222 in2_1 = _mm256_unpacklo_epi8(in2_raw, zero); in2_2 = _mm256_unpackhi_epi8(in2_raw, zero);
899 }
900 else if constexpr (sizeof(pixel_t) == 2) {
901 // Load 64 bytes (32 pixels)
902 102 in0_1 = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[0] + x));
903 102 in1_1 = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[1] + x));
904 102 in2_1 = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[2] + x));
905 102 in0_2 = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[0] + x + 32));
906 102 in1_2 = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[1] + x + 32));
907 167 in2_2 = _mm256_load_si256(reinterpret_cast<const __m256i*>(srcp[2] + x + 32));
908 }
909 else { // if constexpr (sizeof(pixel_t) == 4) {
910 // this also implies full float workflow
911 // Load 128 bytes (32 pixels) // safety! we are well beyond Avisynth's 64 byte alignment
912 47 in0_1_f_lo = _mm256_load_ps(reinterpret_cast<const float*>(srcp[0] + x));
913 47 in0_1_f_hi = _mm256_load_ps(reinterpret_cast<const float*>(srcp[0] + x + 32));
914 47 in1_1_f_lo = _mm256_load_ps(reinterpret_cast<const float*>(srcp[1] + x));
915 47 in1_1_f_hi = _mm256_load_ps(reinterpret_cast<const float*>(srcp[1] + x + 32));
916 47 in2_1_f_lo = _mm256_load_ps(reinterpret_cast<const float*>(srcp[2] + x));
917 47 in2_1_f_hi = _mm256_load_ps(reinterpret_cast<const float*>(srcp[2] + x + 32));
918
8/32
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 138 → 139 taken 5 times.
✓ Branch 138 → 152 taken 7 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✗ Branch 138 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✗ Branch 138 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)0, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✓ Branch 138 → 152 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 138 → 139 taken 5 times.
✓ Branch 138 → 152 taken 12 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✗ Branch 138 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✗ Branch 138 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)1, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✓ Branch 138 → 152 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✓ Branch 138 → 152 taken 3 times.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✗ Branch 138 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✗ Branch 138 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)2, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 138 → 139 not taken.
✗ Branch 138 → 152 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, false, float, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✓ Branch 110 → 111 taken 9 times.
✗ Branch 110 → 124 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, false, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 110 → 111 not taken.
✗ Branch 110 → 124 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, true, unsigned char, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 110 → 111 not taken.
✗ Branch 110 → 124 not taken.
void convert_yuv_to_planarrgb_avx2_internal<(ConversionDirection)4, float, false, true, unsigned short, (YuvRgbConversionType)1>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int):
✗ Branch 110 → 111 not taken.
✗ Branch 110 → 124 not taken.
47 if (safe_last_16float_64bytes) {
919 19 in0_2_f_lo = _mm256_load_ps(reinterpret_cast<const float*>(srcp[0] + x + 64));
920 19 in0_2_f_hi = _mm256_load_ps(reinterpret_cast<const float*>(srcp[0] + x + 96));
921 19 in1_2_f_lo = _mm256_load_ps(reinterpret_cast<const float*>(srcp[1] + x + 64));
922 19 in1_2_f_hi = _mm256_load_ps(reinterpret_cast<const float*>(srcp[1] + x + 96));
923 19 in2_2_f_lo = _mm256_load_ps(reinterpret_cast<const float*>(srcp[2] + x + 64));
924 38 in2_2_f_hi = _mm256_load_ps(reinterpret_cast<const float*>(srcp[2] + x + 96));
925 }
926 else {
927 // fill them with something to silence the warning, they won't be stored, either.
928 28 in0_2_f_lo = in0_2_f_hi = in1_2_f_lo = in1_2_f_hi = in2_2_f_lo = in2_2_f_hi = _mm256_setzero_ps();
929 }
930 }
931
932 if constexpr (float_matrix_workflow) {
933 // complete float workflow, even for integer targets, do matrixes in float math.
934 // Also for maximum accuracy.
935
936 // convert integer pixels to float, only for non-float input
937 if constexpr (sizeof(pixel_t) == 4) {
938 // even float input can be "limited" in Avisynth, correct with offset_in as well
939 // YUV chroma is zero centered, no offset correction needed
940 if constexpr (direction == ConversionDirection::YUV_TO_RGB || direction == ConversionDirection::YUV_TO_YUV) {
941 // YUV Source
942 // Y
943 18 in0_1_f_lo = _mm256_add_ps(in0_1_f_lo, offset_in_f);
944 18 in0_1_f_hi = _mm256_add_ps(in0_1_f_hi, offset_in_f);
945 18 in0_2_f_lo = _mm256_add_ps(in0_2_f_lo, offset_in_f);
946 18 in0_2_f_hi = _mm256_add_ps(in0_2_f_hi, offset_in_f);
947 }
948 else {
949 // RGB source: all channels need offset_in adjustments if studio RGB RGB_TO_RGB, RGB_TO_YUV, RGB_TO_Y
950 29 in0_1_f_lo = _mm256_add_ps(in0_1_f_lo, offset_in_f);
951 29 in0_1_f_hi = _mm256_add_ps(in0_1_f_hi, offset_in_f);
952 29 in0_2_f_lo = _mm256_add_ps(in0_2_f_lo, offset_in_f);
953 29 in0_2_f_hi = _mm256_add_ps(in0_2_f_hi, offset_in_f);
954 29 in1_1_f_lo = _mm256_add_ps(in1_1_f_lo, offset_in_f);
955 29 in1_1_f_hi = _mm256_add_ps(in1_1_f_hi, offset_in_f);
956 29 in1_2_f_lo = _mm256_add_ps(in1_2_f_lo, offset_in_f);
957 29 in1_2_f_hi = _mm256_add_ps(in1_2_f_hi, offset_in_f);
958 29 in2_1_f_lo = _mm256_add_ps(in2_1_f_lo, offset_in_f);
959 29 in2_1_f_hi = _mm256_add_ps(in2_1_f_hi, offset_in_f);
960 29 in2_2_f_lo = _mm256_add_ps(in2_2_f_lo, offset_in_f);
961 29 in2_2_f_hi = _mm256_add_ps(in2_2_f_hi, offset_in_f);
962 }
963
964 }
965 else {
966 // integer input
967
968 // Order: move to int32, and only then adjust offset_in.
969 // Superblacks would yield negative values that can only be sign-extend to int32
970 // with excessive operations, see the U and V workaround.
971
972 // We've already put the input offset_in into each int32. We use add, offset_in is stored as negative.
973
974 // int32->float
975
976 if constexpr (direction == ConversionDirection::YUV_TO_RGB || direction == ConversionDirection::YUV_TO_YUV) {
977 // YUV Source
978 // Y
979 18 in0_1_f_lo = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpacklo_epi16(in0_1, zero), offset_in));
980 18 in0_1_f_hi = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpackhi_epi16(in0_1, zero), offset_in));
981 18 in0_2_f_lo = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpacklo_epi16(in0_2, zero), offset_in));
982 18 in0_2_f_hi = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpackhi_epi16(in0_2, zero), offset_in));
983
984 // UV to sign extend
985 // Though from SSE4.1 we could use _mm_cvtepi16_epi32 directly but it makes packus lane
986 // crossing correction difficult (and slow). Mayne from avx512 _mm512_cvtepi16_ps (only signed 16 exists)?
987
988 // No lane keeping cvtepi16_epi32 here either.
989 // U,V, make signed, then int16->int32
990
991 // sign-extend int16 chroma to int32, then convert to float
992 // using unpacklo/hi to preserve lane layout compatible with downstream packus
993 54 auto chroma_to_float = [&](__m256i c, __m256& f_lo, __m256& f_hi) {
994 48 c = _mm256_sub_epi16(c, half);
995 24 __m256i sign = _mm256_srai_epi16(c, 15); // 0xFFFF if negative, 0x0000 if positive
996 48 f_lo = _mm256_cvtepi32_ps(_mm256_unpacklo_epi16(c, sign));
997 24 f_hi = _mm256_cvtepi32_ps(_mm256_unpackhi_epi16(c, sign));
998 };
999
1000 6 chroma_to_float(in1_1, in1_1_f_lo, in1_1_f_hi); // U1
1001 6 chroma_to_float(in2_1, in2_1_f_lo, in2_1_f_hi); // V1
1002 6 chroma_to_float(in1_2, in1_2_f_lo, in1_2_f_hi); // U2
1003 6 chroma_to_float(in2_2, in2_2_f_lo, in2_2_f_hi); // V2
1004 }
1005 else {
1006 // RGB source: only offset_in adjustment, no centering needed
1007 // Green
1008 138 in0_1_f_lo = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpacklo_epi16(in0_1, zero), offset_in));
1009 138 in0_1_f_hi = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpackhi_epi16(in0_1, zero), offset_in));
1010 138 in0_2_f_lo = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpacklo_epi16(in0_2, zero), offset_in));
1011 138 in0_2_f_hi = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpackhi_epi16(in0_2, zero), offset_in));
1012 // Blue
1013 138 in1_1_f_lo = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpacklo_epi16(in1_1, zero), offset_in));
1014 138 in1_1_f_hi = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpackhi_epi16(in1_1, zero), offset_in));
1015 138 in1_2_f_lo = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpacklo_epi16(in1_2, zero), offset_in));
1016 138 in1_2_f_hi = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpackhi_epi16(in1_2, zero), offset_in));
1017 // Red
1018 138 in2_1_f_lo = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpacklo_epi16(in2_1, zero), offset_in));
1019 138 in2_1_f_hi = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpackhi_epi16(in2_1, zero), offset_in));
1020 138 in2_2_f_lo = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpacklo_epi16(in2_2, zero), offset_in));
1021 138 in2_2_f_hi = _mm256_cvtepi32_ps(_mm256_add_epi32(_mm256_unpackhi_epi16(in2_2, zero), offset_in));
1022 }
1023 } // end of integer to float conversion and offset_in adjustment
1024
1025 // COMMON matrix multiply code - works for all 4 directions!
1026
1027 495 auto matrix_multiply = [&](
1028 __m256 in0_lo, __m256 in0_hi,
1029 __m256 in1_lo, __m256 in1_hi,
1030 __m256 in2_lo, __m256 in2_hi,
1031 __m256& out0_lo, __m256& out0_hi,
1032 __m256& out1_lo, __m256& out1_hi,
1033 __m256& out2_lo, __m256& out2_hi)
1034 {
1035 XP_LAMBDA_CAPTURE_FIX(coeff_out0_in0);
1036 XP_LAMBDA_CAPTURE_FIX(coeff_out0_in1);
1037 XP_LAMBDA_CAPTURE_FIX(coeff_out0_in2);
1038 XP_LAMBDA_CAPTURE_FIX(coeff_out1_in0);
1039 XP_LAMBDA_CAPTURE_FIX(coeff_out1_in1);
1040 XP_LAMBDA_CAPTURE_FIX(coeff_out1_in2);
1041 XP_LAMBDA_CAPTURE_FIX(coeff_out2_in0);
1042 XP_LAMBDA_CAPTURE_FIX(coeff_out2_in1);
1043 XP_LAMBDA_CAPTURE_FIX(coeff_out2_in2);
1044 XP_LAMBDA_CAPTURE_FIX(m_offset_out_y_or_g_f);
1045 XP_LAMBDA_CAPTURE_FIX(m_offset_out_u_or_b_f);
1046 XP_LAMBDA_CAPTURE_FIX(m_offset_out_v_or_r_f);
1047
1048 594 out0_lo = _mm256_fmadd_ps(coeff_out0_in2, in2_lo, _mm256_fmadd_ps(coeff_out0_in1, in1_lo, _mm256_fmadd_ps(coeff_out0_in0, in0_lo, m_offset_out_y_or_g_f)));
1049 594 out0_hi = _mm256_fmadd_ps(coeff_out0_in2, in2_hi, _mm256_fmadd_ps(coeff_out0_in1, in1_hi, _mm256_fmadd_ps(coeff_out0_in0, in0_hi, m_offset_out_y_or_g_f)));
1050
1051 if constexpr (direction != ConversionDirection::RGB_TO_Y) {
1052
1053 396 out1_lo = _mm256_fmadd_ps(coeff_out1_in2, in2_lo, _mm256_fmadd_ps(coeff_out1_in1, in1_lo, _mm256_fmadd_ps(coeff_out1_in0, in0_lo, m_offset_out_u_or_b_f)));
1054 396 out1_hi = _mm256_fmadd_ps(coeff_out1_in2, in2_hi, _mm256_fmadd_ps(coeff_out1_in1, in1_hi, _mm256_fmadd_ps(coeff_out1_in0, in0_hi, m_offset_out_u_or_b_f)));
1055
1056 396 out2_lo = _mm256_fmadd_ps(coeff_out2_in2, in2_lo, _mm256_fmadd_ps(coeff_out2_in1, in1_lo, _mm256_fmadd_ps(coeff_out2_in0, in0_lo, m_offset_out_v_or_r_f)));
1057 396 out2_hi = _mm256_fmadd_ps(coeff_out2_in2, in2_hi, _mm256_fmadd_ps(coeff_out2_in1, in1_hi, _mm256_fmadd_ps(coeff_out2_in0, in0_hi, m_offset_out_v_or_r_f)));
1058 }
1059 };
1060
1061 // output variables
1062 __m256 out0_1_f_lo, out0_1_f_hi, out1_1_f_lo, out1_1_f_hi, out2_1_f_lo, out2_1_f_hi;
1063 __m256 out0_2_f_lo, out0_2_f_hi, out1_2_f_lo, out1_2_f_hi, out2_2_f_lo, out2_2_f_hi;
1064
1065 // SET#1: First 16 pixels
1066 99 matrix_multiply(
1067 in0_1_f_lo, in0_1_f_hi, in1_1_f_lo, in1_1_f_hi, in2_1_f_lo, in2_1_f_hi, // in0 in1 in2
1068 out0_1_f_lo, out0_1_f_hi, out1_1_f_lo, out1_1_f_hi, out2_1_f_lo, out2_1_f_hi // out0 out1 out2: Pixels 0..7 in lo, 8..15 in hi
1069 );
1070
1071 // SET#2: Next 16 pixels
1072 99 matrix_multiply(
1073 in0_2_f_lo, in0_2_f_hi, in1_2_f_lo, in1_2_f_hi, in2_2_f_lo, in2_2_f_hi, // in0 in1 in2
1074 out0_2_f_lo, out0_2_f_hi, out1_2_f_lo, out1_2_f_hi, out2_2_f_lo, out2_2_f_hi // out0 out1 out2: Pixels 16..23 in lo, 24..31 in hi
1075 );
1076
1077 435 auto process_from_float_plane_avx2 = [&](BYTE* plane_ptr, __m256 lo_1, __m256 hi_1, __m256 lo_2, __m256 hi_2) {
1078 XP_LAMBDA_CAPTURE_FIX(zero);
1079 XP_LAMBDA_CAPTURE_FIX(limit);
1080
1081 #ifdef XP_TLS
1082 if (final_is_float) {
1083 #else
1084 if constexpr (final_is_float) {
1085 #endif
1086 // float inside path, + 32 bit float output
1087 105 const int pix_idx = x / sizeof(pixel_t);
1088 105 float* f_dst = reinterpret_cast<float*>(plane_ptr) + pix_idx;
1089
1090 // Define the blocks (8 pixels each) correctly by healing the lanes
1091 // Remember: this is still quicker that using lane-preserving cvt's earlier.
1092 __m256 blockA, blockB, blockC, blockD;
1093
1094 if constexpr (sizeof(pixel_t) == 1) {
1095 // 8-bit: The lanes were swapped across res1 and res2
1096 blockA = _mm256_permute2f128_ps(lo_1, hi_1, 0x20); // Pixels 0-7
1097 blockB = _mm256_permute2f128_ps(lo_2, hi_2, 0x20); // Pixels 8-15
1098 blockC = _mm256_permute2f128_ps(lo_1, hi_1, 0x31); // Pixels 16-23
1099 blockD = _mm256_permute2f128_ps(lo_2, hi_2, 0x31); // Pixels 24-31
1100 }
1101 else if constexpr (sizeof(pixel_t) == 2) {
1102 // 16-bit: res1 is 0-15, res2 is 16-31
1103 blockA = _mm256_permute2f128_ps(lo_1, hi_1, 0x20); // Pixels 0-7
1104 blockB = _mm256_permute2f128_ps(lo_1, hi_1, 0x31); // Pixels 8-15
1105 blockC = _mm256_permute2f128_ps(lo_2, hi_2, 0x20); // Pixels 16-23
1106 blockD = _mm256_permute2f128_ps(lo_2, hi_2, 0x31); // Pixels 24-31
1107 }
1108 else {
1109 // 32-bit: no lane swap needed, but we still need to define the blocks for the tail processing
1110 105 blockA = lo_1; // Pixels 0-7
1111 105 blockB = hi_1; // Pixels 8-15
1112 105 blockC = lo_2; // Pixels 16-23
1113 105 blockD = hi_2; // Pixels 24-31
1114 }
1115
1116 _mm256_store_ps(f_dst, blockA);
1117 105 _mm256_store_ps(f_dst + 8, blockB);
1118
1119 // Safety check: only store the first half of the 32-pixel block if row width allows
1120
2/2
✓ Branch 4 → 5 taken 39 times.
✓ Branch 4 → 8 taken 66 times.
105 if (safe_last_16float_64bytes) {
1121 39 _mm256_store_ps(f_dst + 16, blockC);
1122 39 _mm256_store_ps(f_dst + 24, blockD);
1123 }
1124 }
1125 else {
1126 // Float workflow + integer output with rounding and clamping
1127 // r,g,b = static_cast<int>(r,g,b_f + 0.5f);
1128 // back to int32 domain
1129 126 __m256 float_rounder = _mm256_set1_ps(0.5f);
1130 252 __m256i res1_lo = _mm256_cvttps_epi32(_mm256_add_ps(lo_1, float_rounder));
1131 252 __m256i res1_hi = _mm256_cvttps_epi32(_mm256_add_ps(hi_1, float_rounder));
1132 252 __m256i res2_lo = _mm256_cvttps_epi32(_mm256_add_ps(lo_2, float_rounder));
1133 126 __m256i res2_hi = _mm256_cvttps_epi32(_mm256_add_ps(hi_2, float_rounder));
1134
1135 126 const int pix_idx = x * sizeof(pixel_t_dst) / sizeof(pixel_t);
1136
1137 126 __m256i p1 = _mm256_packus_epi32(res1_lo, res1_hi);
1138 9 __m256i p2 = _mm256_packus_epi32(res2_lo, res2_hi);
1139
1140 if constexpr (sizeof(pixel_t_dst) == 1) {
1141 // X->8 bits
1142 __m256i final8 = _mm256_packus_epi16(p1, p2);
1143 if constexpr (sizeof(pixel_t) == 4) {
1144 // 32->8 bits
1145 /*
1146 res1_lo: int32 [ 0 1 2 3 | 4 5 6 7]
1147 res1_hi: int32 [ 8 9 10 11 | 12 13 14 15]
1148 res2_lo: int32 [16 17 18 19 | 20 21 22 23]
1149 res2_hi: int32 [24 25 26 27 | 28 29 30 31]
1150 - after packus_epi32:
1151 p1 = [0..3, 8..11 | 4..7, 12..15]
1152 p2 = [16..19, 24..27 | 20..23, 28..31]
1153 - after packus_epi16 p1, p2: (more lane crossing)
1154 p8 = [0..3, 8..11, 16..19, 24..27 | 4..7, 12..15, 20..23, 28..31]
1155
1156 I need final8: 32 bytes [0,1,2..31]
1157 */
1158 __m256i p1 = _mm256_packus_epi32(res1_lo, res1_hi);
1159 __m256i p2 = _mm256_packus_epi32(res2_lo, res2_hi);
1160 __m256i p8 = _mm256_packus_epi16(p1, p2);
1161 // p8 = [0..3, 8..11, 16..19, 24..27 | 4..7, 12..15, 20..23, 28..31]
1162 // as 8x int32: [A, B, C, D, E, F, G, H] where we need [A,E,B,F,C,G,D,H]
1163 const __m256i idx = _mm256_set_epi32(7, 3, 6, 2, 5, 1, 4, 0);
1164 final8 = _mm256_permutevar8x32_epi32(p8, idx);
1165 }
1166 else if constexpr (sizeof(pixel_t) == 2) {
1167 // 16->8 bits
1168 6 final8 = _mm256_permute4x64_epi64(final8, (0 << 0) | (2 << 2) | (1 << 4) | (3 << 6));
1169 }
1170 else {
1171 // 8->8 bits, no change needed
1172 }
1173 9 _mm256_store_si256(reinterpret_cast<__m256i*>(plane_ptr + pix_idx), final8);
1174 }
1175 else if constexpr (sizeof(pixel_t_dst) == 2) {
1176 // x->16 bits
1177 if constexpr (lessthan16bit_target) {
1178 69 p1 = _mm256_min_epi16(p1, limit);
1179 69 p2 = _mm256_min_epi16(p2, limit);
1180 }
1181 if constexpr (sizeof(pixel_t) == 1) {
1182 // 8->16 bits:
1183 /* If we'd not pre-shuffled the input for 8->16 bit, we would need to do this shuffle at the end to heal the lanes:
1184 // p1: 0-7 16-23; p2: 8-15 24-31
1185 // two shuffles per R G B plane would be needed, so 6 total, Pre-shuffling Y U V is only 3
1186 __m256i temp_p1 = _mm256_permute2x128_si256(p1, p2, 0x20); // 0-7, 8-15
1187 __m256i temp_p2 = _mm256_permute2x128_si256(p1, p2, 0x31); // 16-23, 24-31
1188 p1 = temp_p1;
1189 p2 = temp_p2;
1190 */
1191 }
1192 else if constexpr (sizeof(pixel_t) == 4) {
1193 // 32->16 bits
1194 18 p1 = _mm256_permute4x64_epi64(p1, (0 << 0) | (2 << 2) | (1 << 4) | (3 << 6)); // 0xD8
1195 18 p2 = _mm256_permute4x64_epi64(p2, (0 << 0) | (2 << 2) | (1 << 4) | (3 << 6)); // 0xD8
1196 }
1197
1198 117 _mm256_store_si256(reinterpret_cast<__m256i*>(plane_ptr + pix_idx), p1);
1199 117 _mm256_store_si256(reinterpret_cast<__m256i*>(plane_ptr + pix_idx + 32), p2);
1200 }
1201 }
1202 };
1203
1204 99 process_from_float_plane_avx2(dstp[0], out0_1_f_lo, out0_1_f_hi, out0_2_f_lo, out0_2_f_hi);
1205 if constexpr (direction != ConversionDirection::RGB_TO_Y) {
1206 66 process_from_float_plane_avx2(dstp[1], out1_1_f_lo, out1_1_f_hi, out1_2_f_lo, out1_2_f_hi);
1207 66 process_from_float_plane_avx2(dstp[2], out2_1_f_lo, out2_1_f_hi, out2_2_f_lo, out2_2_f_hi);
1208 }
1209 // end of float_matrix_workflow
1210 }
1211 else {
1212 // start of integer matrix arithmetic path, both for integer and float target
1213 if constexpr (lessthan16bit) {
1214 // offset_in is added, stored as negative
1215 if constexpr (direction == ConversionDirection::RGB_TO_YUV || direction == ConversionDirection::RGB_TO_RGB || direction == ConversionDirection::RGB_TO_Y) {
1216 // RGB sources: same input offset for G, B and R
1217 190 in0_1 = _mm256_adds_epi16(in0_1, offset_in); in0_2 = _mm256_adds_epi16(in0_2, offset_in); // G1 G2
1218 190 in1_1 = _mm256_adds_epi16(in1_1, offset_in); in1_2 = _mm256_adds_epi16(in1_2, offset_in); // B1 B2
1219 190 in2_1 = _mm256_adds_epi16(in2_1, offset_in); in2_2 = _mm256_adds_epi16(in2_2, offset_in); // R1 R2
1220 }
1221 else {
1222 // YUV sources: only luma. add, because offset_in is negative
1223 98 in0_1 = _mm256_adds_epi16(in0_1, offset_in); in0_2 = _mm256_adds_epi16(in0_2, offset_in); // Y1 Y2
1224 }
1225 }
1226 else {
1227 // make unsigned to signed by flipping MSB
1228 if constexpr (direction == ConversionDirection::RGB_TO_YUV || direction == ConversionDirection::RGB_TO_RGB || direction == ConversionDirection::RGB_TO_Y) {
1229 // RGB sources: same pivoting offset for G, B and R
1230 // pivot the pixel, adjust the offset_in separately, if any, later
1231 in0_1 = _mm256_xor_si256(in0_1, sign_flip_mask); in0_2 = _mm256_xor_si256(in0_2, sign_flip_mask); // G1 G2
1232 in1_1 = _mm256_xor_si256(in1_1, sign_flip_mask); in1_2 = _mm256_xor_si256(in1_2, sign_flip_mask); // B1 B2
1233 in2_1 = _mm256_xor_si256(in2_1, sign_flip_mask); in2_2 = _mm256_xor_si256(in2_2, sign_flip_mask); // R1 R2
1234 }
1235 else {
1236 // YUV sources: only pivot luma, chroma will be pivoted and centered together in the next step
1237 34 in0_1 = _mm256_xor_si256(in0_1, sign_flip_mask); in0_2 = _mm256_xor_si256(in0_2, sign_flip_mask); // Y1 Y2
1238 }
1239 }
1240
1241 // YUV source: move to signed UV
1242 if constexpr (direction == ConversionDirection::YUV_TO_RGB || direction == ConversionDirection::YUV_TO_YUV) {
1243 132 in1_1 = _mm256_sub_epi16(in1_1, half); in1_2 = _mm256_sub_epi16(in1_2, half); // U1 U2
1244 132 in2_1 = _mm256_sub_epi16(in2_1, half); in2_2 = _mm256_sub_epi16(in2_2, half); // V1 V2
1245 }
1246
1247 // pre-unpack MADD pairs
1248 // These are common for all R, G, B planes
1249 // Pair 1: [U0 Y0 U1 Y1 ... | U8 Y8 U9 Y9 ...]
1250 161 __m256i uy1_lo = _mm256_unpacklo_epi16(in1_1, in0_1);
1251 161 __m256i uy1_hi = _mm256_unpackhi_epi16(in1_1, in0_1);
1252 161 __m256i uy2_lo = _mm256_unpacklo_epi16(in1_2, in0_2);
1253 161 __m256i uy2_hi = _mm256_unpackhi_epi16(in1_2, in0_2);
1254
1255 // Pair 2: [V0 Rnd V1 Rnd ... | V8 Rnd V9 Rnd ...]
1256 161 __m256i vr1_lo = _mm256_unpacklo_epi16(in2_1, m256i_round_scale);
1257 161 __m256i vr1_hi = _mm256_unpackhi_epi16(in2_1, m256i_round_scale);
1258 161 __m256i vr2_lo = _mm256_unpacklo_epi16(in2_2, m256i_round_scale);
1259 161 __m256i vr2_hi = _mm256_unpackhi_epi16(in2_2, m256i_round_scale);
1260
1261 // for 16 bit, the rgb_offset is merged into the post patch adjustment
1262 // 13 bit fixed point arithmetic rounder 0.5 is 4096. In general: INT_ARITH_SHIFT
1263 // Need1: (m.y_b m.u_b ) (m.y_b m.u_b) (m.y_b m.u_b) (m.y_b m.u_b) 8x16 bit
1264 // ( y3 u3 ) ( y2 u2 ) ( y1 u1 ) ( y0 u0 ) 8x16 bit
1265 // res1= (y_b*y3 + u_b*u3) ... 4x32 bit
1266 // Need2: (m.v_b round') (m.y_b round') (m.y_b round') (m.y_b round')
1267 // ( v3 4096 ) ( v2 4096 ) ( v1 4096 ) ( v0 4096 )
1268 // res2= (yv_b*v3 + round' ) ... round' = round + rgb_offset
1269
1270 // Processing lambda - checked and benchmarked to be inlined nicely -avoids code bloat
1271
1272 // For v141_xp compatibility: forces the compiler to capture a const variable
1273 // that would otherwise be optimized out of nested lambda scopes.
1274
1275 // integer matrix arithmetic path, followed by integer-integer shift-scaling or 32-bit float conversion.
1276 1079 auto process_plane = [&](BYTE* plane_ptr, __m256i m_uy, __m256i m_vr, __m256i v_patch, auto apply_float_offset_out) {
1277 XP_LAMBDA_CAPTURE_FIX(limit);
1278 XP_LAMBDA_CAPTURE_FIX(safe_last_16float_64bytes);
1279 // Note: v_patch is already set to the right 32 or 64 bits width based on final_is_float and lessthan16bit
1280 2295 auto madd_scale = [&](__m256i uy, __m256i vr) {
1281 XP_LAMBDA_CAPTURE_FIX(v_patch);
1282 XP_LAMBDA_CAPTURE_FIX(target_shift);
1283 5508 __m256i sum = _mm256_add_epi32(_mm256_madd_epi16(m_uy, uy), _mm256_madd_epi16(m_vr, vr));
1284 // 16-bit adjustment (signed patch, offset_in, output rgb offset_in)
1285
1286 #ifdef XP_TLS
1287 if (!final_is_float)
1288 #else
1289 if constexpr (!final_is_float)
1290 #endif
1291 {
1292 __m256i sum_lo, sum_hi;
1293 #ifdef XP_TLS
1294 if (!would_need_64bit_v_patch)
1295 #else
1296 if constexpr (!would_need_64bit_v_patch)
1297 #endif
1298 {
1299 3060 sum = _mm256_add_epi32(sum, v_patch);
1300 }
1301 else {
1302 // use two 64 bit sums
1303 // avx2 extract low/high 128 bits, add, then insert back
1304 sum_lo = _mm256_cvtepi32_epi64(_mm256_castsi256_si128(sum));
1305 sum_lo = _mm256_add_epi64(sum_lo, v_patch);
1306 sum_hi = _mm256_cvtepi32_epi64(_mm256_extracti128_si256(sum, 1));
1307 sum_hi = _mm256_add_epi64(sum_hi, v_patch);
1308 }
1309 // target_shift is INT_ARITH_SHIFT - modified with bit-conversion diff, bit fixed point shift
1310 #ifdef XP_TLS
1311 if (!would_need_64bit_v_patch) {
1312 #else
1313 if constexpr (!would_need_64bit_v_patch) {
1314 #endif
1315 612 sum = _mm256_srai_epi32(sum, target_shift);
1316 }
1317 else {
1318 // _mm256_srai_epi64 is AVX512+VL only
1319 sum_lo = mm256_srai_epi64_simul(sum_lo, target_shift);
1320 sum_hi = mm256_srai_epi64_simul(sum_hi, target_shift);
1321 }
1322 #ifdef XP_TLS
1323 if (would_need_64bit_v_patch) {
1324 #else
1325 if constexpr (would_need_64bit_v_patch) {
1326 #endif
1327 // pack back to 32 bit: no _mm256_cvtepi64_epi32 in AVX2
1328 __m256i pack_lo = _mm256_shuffle_epi32(sum_lo, _MM_SHUFFLE(3, 2, 2, 0));
1329 __m256i pack_hi = _mm256_shuffle_epi32(sum_hi, _MM_SHUFFLE(3, 2, 2, 0));
1330 __m256i mixed = _mm256_unpacklo_epi64(pack_lo, pack_hi);
1331 // [0, 1, 4, 5 | 2, 3, 6, 7] => [0, 1, 2, 3 | 4, 5, 6, 7]
1332 sum = _mm256_permute4x64_epi64(mixed, _MM_SHUFFLE(3, 1, 2, 0));
1333 }
1334 }
1335 else {
1336 // no 64-bit needed, no overflow danger in pivot, since no U and V integer offset which is the cause of overflow.
1337 sum = _mm256_add_epi32(sum, v_patch);
1338 }
1339 1836 return sum;
1340 };
1341
1342 459 __m256i res1_lo = madd_scale(uy1_lo, vr1_lo); // Pixels 0-3, 8-11
1343 459 __m256i res1_hi = madd_scale(uy1_hi, vr1_hi); // Pixels 4-7, 12-15
1344 459 __m256i res2_lo = madd_scale(uy2_lo, vr2_lo); // Pixels 16-19, 24-27
1345 459 __m256i res2_hi = madd_scale(uy2_hi, vr2_hi); // Pixels 20-23, 28-31
1346
1347 #ifdef XP_TLS
1348 if (final_is_float) {
1349 #else
1350 if constexpr (final_is_float) {
1351 #endif
1352 // when float output is needed, convert after scaling, mimic a post-ConvertBits
1353 const int pix_idx = x / sizeof(pixel_t);
1354 float* f_dst = reinterpret_cast<float*>(plane_ptr) + pix_idx;
1355
1356 // Define the blocks (8 pixels each) correctly by healing the lanes
1357 __m256i blockA = _mm256_permute2x128_si256(res1_lo, res1_hi, 0x20); // Pixels 0-7
1358 __m256i blockB, blockC, blockD;
1359
1360 if constexpr (sizeof(pixel_t) == 1) {
1361 // 8-bit: The lanes were swapped across res1 and res2
1362 blockB = _mm256_permute2x128_si256(res2_lo, res2_hi, 0x20); // Pixels 8-15
1363 blockC = _mm256_permute2x128_si256(res1_lo, res1_hi, 0x31); // Pixels 16-23
1364 blockD = _mm256_permute2x128_si256(res2_lo, res2_hi, 0x31); // Pixels 24-31
1365 }
1366 else {
1367 // 16-bit: res1 is 0-15, res2 is 16-31
1368 blockB = _mm256_permute2x128_si256(res1_lo, res1_hi, 0x31); // Pixels 8-15
1369 blockC = _mm256_permute2x128_si256(res2_lo, res2_hi, 0x20); // Pixels 16-23
1370 blockD = _mm256_permute2x128_si256(res2_lo, res2_hi, 0x31); // Pixels 24-31
1371 }
1372
1373 // Convert and Store
1374 auto store_block = [&](float* ptr, __m256i b, auto apply_float_offset_out) {
1375 if (apply_float_offset_out)
1376 _mm256_store_ps(ptr, _mm256_fmadd_ps(_mm256_cvtepi32_ps(b), scale_f_avx2, out_offset_f_avx2));
1377 else // only mul, no add, when offset_out is 0 for non Y,R,G,B channels
1378 _mm256_store_ps(ptr, _mm256_mul_ps(_mm256_cvtepi32_ps(b), scale_f_avx2));
1379 };
1380
1381 store_block(f_dst, blockA, apply_float_offset_out);
1382 store_block(f_dst + 8, blockB, apply_float_offset_out);
1383
1384 // Safety check: only store the first half of the 32-pixel block if row width allows
1385 if (safe_last_16float_64bytes) {
1386 store_block(f_dst + 16, blockC, apply_float_offset_out);
1387 store_block(f_dst + 24, blockD, apply_float_offset_out);
1388 }
1389 }
1390 else {
1391 459 const int pix_idx = x * sizeof(pixel_t_dst) / sizeof(pixel_t);
1392 // unlike SSE2, AVX2 has packus_epi32
1393 459 __m256i p1 = _mm256_packus_epi32(res1_lo, res1_hi); // Auto-heals lanes, no permute needed
1394 207 __m256i p2 = _mm256_packus_epi32(res2_lo, res2_hi);
1395
1396 if constexpr (sizeof(pixel_t_dst) == 1) {
1397 // X->8 bits
1398 207 __m256i final8 = _mm256_packus_epi16(p1, p2);
1399 if constexpr (sizeof(pixel_t) == 2) {
1400 // 16->8 extra shuffle
1401 final8 = _mm256_permute4x64_epi64(final8, (0 << 0) | (2 << 2) | (1 << 4) | (3 << 6));
1402 }
1403 207 _mm256_store_si256(reinterpret_cast<__m256i*>(plane_ptr + pix_idx), final8);
1404 }
1405 else {
1406 // X->16 bits
1407 if constexpr (lessthan16bit_target) {
1408 81 p1 = _mm256_min_epi16(p1, limit);
1409 81 p2 = _mm256_min_epi16(p2, limit);
1410 }
1411 if constexpr (sizeof(pixel_t) == 1) {
1412 // 8->16 bits:
1413 /* If we'd not pre-shuffled the input for 8->16 bit, we would need to do this shuffle at the end to heal the lanes:
1414 // p1: 0-7 16-23; p2: 8-15 24-31
1415 // two shuffles per R G B plane would be needed, so 6 total, Pre-shuffling Y U V is only 3
1416 __m256i temp_p1 = _mm256_permute2x128_si256(p1, p2, 0x20); // 0-7, 8-15
1417 __m256i temp_p2 = _mm256_permute2x128_si256(p1, p2, 0x31); // 16-23, 24-31
1418 p1 = temp_p1;
1419 p2 = temp_p2;
1420 */
1421 }
1422 252 _mm256_store_si256(reinterpret_cast<__m256i*>(plane_ptr + pix_idx), p1);
1423 252 _mm256_store_si256(reinterpret_cast<__m256i*>(plane_ptr + pix_idx + 32), p2);
1424 }
1425 }
1426 };
1427
1428 // Process planes, using pre-packed coefficient, and the 16 bit patch if needed
1429 161 process_plane(dstp[0], m_uy_G, m_vr_G, v_patch_G, true /* apply_float_offset_out */);
1430 // only Y,R,G,B needs it uniformly, so for YUV, we call it with false
1431 // last param: apply_float_offset_out
1432 if constexpr (direction == ConversionDirection::YUV_TO_RGB || direction == ConversionDirection::RGB_TO_RGB) {
1433 57 process_plane(dstp[1], m_uy_B, m_vr_B, v_patch_B, true);
1434 57 process_plane(dstp[2], m_uy_R, m_vr_R, v_patch_R, true);
1435 }
1436 else if constexpr (direction == ConversionDirection::RGB_TO_YUV || direction == ConversionDirection::YUV_TO_YUV) {
1437 92 process_plane(dstp[1], m_uy_B, m_vr_B, v_patch_B, false);
1438 92 process_plane(dstp[2], m_uy_R, m_vr_R, v_patch_R, false);
1439 }
1440 else if constexpr (direction != ConversionDirection::RGB_TO_Y) {
1441 // no other planes
1442 }
1443 } // if float_matrix_workflow else integer_matrix_arithmetic
1444 } // x
1445 230 srcp[0] += srcPitch[0];
1446 230 srcp[1] += srcPitch[1];
1447 230 srcp[2] += srcPitch[2];
1448 230 dstp[0] += dstPitch[0];
1449 if constexpr (direction != ConversionDirection::RGB_TO_Y) {
1450 185 dstp[1] += dstPitch[1];
1451 185 dstp[2] += dstPitch[2];
1452 }
1453 } // y
1454 63 }
1455
1456 #undef XP_LAMBDA_CAPTURE_FIX
1457
1458 // Further separating cases inside, dispatcher remains relatively simple
1459 template<ConversionDirection direction, typename pixel_t_src, bool lessthan16bit>
1460 63 void convert_yuv_to_planarrgb_avx2(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m,
1461 int bits_per_pixel, int bits_per_pixel_target, bool force_float)
1462 {
1463 // Accuracy forever
1464
15/24
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 11 taken 9 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 11 taken 4 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 11 taken 2 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 2 → 3 taken 2 times.
✓ Branch 2 → 11 taken 7 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 11 taken 4 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 11 taken 4 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 11 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 11 taken 2 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✗ Branch 2 → 11 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 2 → 3 taken 2 times.
✓ Branch 2 → 11 taken 3 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 2 → 3 taken 1 time.
✓ Branch 2 → 11 taken 2 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 2 → 3 taken 1 time.
✓ Branch 2 → 11 taken 3 times.
47 if (force_float || std::is_floating_point<pixel_t_src>::value) {
1465 // int->float conversion
1466 // limited/full is handled automatically through scaling and offsets
1467 // lessthan16bit_target is still important due to clamping
1468
9/32
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 4 taken 5 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 4 taken 7 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 2 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 4 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✗ Branch 3 → 5 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 4 taken 3 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 3 → 4 taken 1 time.
✓ Branch 3 → 5 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 1 time.
22 if (bits_per_pixel_target == 8) {
1469 1 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, true, uint8_t, YuvRgbConversionType::FORCE_FLOAT>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1470 }
1471
10/32
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 4 → 5 taken 1 time.
✓ Branch 4 → 6 taken 4 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 4 → 5 taken 1 time.
✓ Branch 4 → 6 taken 6 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 5 → 6 taken 2 times.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 4 → 5 not taken.
✓ Branch 4 → 6 taken 3 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 5 → 6 taken 1 time.
✗ Branch 5 → 7 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 5 → 6 taken 1 time.
✗ Branch 5 → 7 not taken.
21 else if (bits_per_pixel_target < 16) {
1472 // lessthan16bit_target is false. Need signed pack and clamping
1473 6 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, true, uint16_t, YuvRgbConversionType::FORCE_FLOAT>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1474 }
1475
5/32
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 4 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 6 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, float, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 6 → 7 not taken.
✓ Branch 6 → 8 taken 3 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 7 → 8 taken 1 time.
✗ Branch 7 → 9 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 9 not taken.
15 else if (bits_per_pixel_target == 16) { // == 16
1476 1 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, false, uint16_t, YuvRgbConversionType::FORCE_FLOAT>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1477 }
1478 else { // 32 bit float target
1479 // limited/full is handled automatically through scaling and offsets
1480 // lessthan16bit_target doesn't matter since float output has no clamping
1481 14 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, false, float, YuvRgbConversionType::FORCE_FLOAT>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1482 }
1483 22 return;
1484 }
1485
1486 // this is needed to avoid instantiating the full integer conversion logic when not needed,
1487 // it can result static_asssert failure.
1488 if constexpr (!std::is_floating_point<pixel_t_src>::value) {
1489 41 const bool need_conversion = bits_per_pixel_target != bits_per_pixel;
1490
18/24
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 8 times.
✓ Branch 11 → 14 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 3 times.
✓ Branch 11 → 14 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 2 times.
✗ Branch 11 → 14 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 5 times.
✓ Branch 11 → 14 taken 2 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 3 times.
✓ Branch 11 → 14 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 1 time.
✓ Branch 11 → 14 taken 3 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 1 time.
✗ Branch 11 → 14 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 2 times.
✗ Branch 11 → 14 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 14 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 2 times.
✓ Branch 11 → 14 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 11 → 12 not taken.
✓ Branch 11 → 14 taken 2 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 11 → 12 taken 1 time.
✓ Branch 11 → 14 taken 2 times.
41 if (!need_conversion) {
1491 // no conversion, just YUV to RGB
1492 28 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, lessthan16bit, pixel_t_src, YuvRgbConversionType::NATIVE_INT>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1493 28 return;
1494 }
1495
1496 13 const bool full_d = m.offset_out == 0;
1497
1498
16/48
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 14 → 15 taken 1 time.
✗ Branch 14 → 29 not taken.
✓ Branch 15 → 16 taken 1 time.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 14 → 15 taken 1 time.
✗ Branch 14 → 29 not taken.
✓ Branch 15 → 16 taken 1 time.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 29 not taken.
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 14 → 15 taken 2 times.
✗ Branch 14 → 29 not taken.
✓ Branch 15 → 16 taken 2 times.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 14 → 15 taken 1 time.
✗ Branch 14 → 29 not taken.
✓ Branch 15 → 16 taken 1 time.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 14 → 15 taken 3 times.
✗ Branch 14 → 29 not taken.
✓ Branch 15 → 16 taken 3 times.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 29 not taken.
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 29 not taken.
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 29 not taken.
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 14 → 15 taken 1 time.
✗ Branch 14 → 29 not taken.
✓ Branch 15 → 16 taken 1 time.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 14 → 15 taken 2 times.
✗ Branch 14 → 29 not taken.
✓ Branch 15 → 16 taken 2 times.
✗ Branch 15 → 29 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 14 → 15 taken 2 times.
✗ Branch 14 → 29 not taken.
✓ Branch 15 → 16 taken 2 times.
✗ Branch 15 → 29 not taken.
13 if (bits_per_pixel_target >= 8 && bits_per_pixel <= 16) {
1499 // int->int conversion with range conversion (limited<->full), or upscale with no range conversion (full->full or limited->limited)
1500
8/24
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 20 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 20 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 20 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 20 taken 2 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 20 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 20 taken 3 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 20 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 20 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 20 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 20 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 16 → 17 taken 2 times.
✗ Branch 16 → 20 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 16 → 17 not taken.
✓ Branch 16 → 20 taken 2 times.
13 if (bits_per_pixel_target == 8) {
1501
1/24
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✓ Branch 17 → 19 taken 2 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 17 → 18 not taken.
✗ Branch 17 → 19 not taken.
2 if (full_d)
1502 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, true, uint8_t, YuvRgbConversionType::BITCONV_INT_FULL>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1503 else
1504 2 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, true, uint8_t, YuvRgbConversionType::BITCONV_INT_LIMITED>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1505 }
1506
8/24
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 20 → 21 taken 1 time.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 20 → 21 taken 1 time.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 20 → 21 taken 1 time.
✓ Branch 20 → 24 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 20 → 21 taken 1 time.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 24 taken 3 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 20 → 21 taken 1 time.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 24 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 24 taken 2 times.
11 else if (bits_per_pixel_target < 16) {
1507 // lessthan16bit_target is false. Need signed pack and clamping
1508
5/24
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 21 → 22 taken 1 time.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 21 → 22 taken 1 time.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 23 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 21 → 22 taken 1 time.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✓ Branch 21 → 23 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 21 → 22 not taken.
✗ Branch 21 → 23 not taken.
5 if (full_d)
1509 3 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, true, uint16_t, YuvRgbConversionType::BITCONV_INT_FULL>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1510 else
1511 2 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, true, uint16_t, YuvRgbConversionType::BITCONV_INT_LIMITED>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1512 }
1513
3/24
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 24 → 25 taken 1 time.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 24 → 25 taken 3 times.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 24 → 25 not taken.
✗ Branch 24 → 28 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 24 → 25 taken 2 times.
✗ Branch 24 → 28 not taken.
6 else if (bits_per_pixel_target == 16) { // == 16
1514
3/24
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)0, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 1 time.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)1, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✓ Branch 25 → 27 taken 3 times.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)2, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned char, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, false>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
void convert_yuv_to_planarrgb_avx2<(ConversionDirection)4, unsigned short, true>(unsigned char* (&) [3], int (&) [3], unsigned char const* (&) [3], int const (&) [3], int, int, ConversionMatrix const&, int, int, bool):
✓ Branch 25 → 26 taken 2 times.
✗ Branch 25 → 27 not taken.
6 if (full_d)
1515 2 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, false, uint16_t, YuvRgbConversionType::BITCONV_INT_FULL>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1516 else
1517 4 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, false, uint16_t, YuvRgbConversionType::BITCONV_INT_LIMITED>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1518 }
1519 else { // 32 bit float target
1520 // int->float conversion
1521 // limited/full is handled automatically through scaling and offsets
1522 // lessthan16bit_target doesn't matter since float output has no clamping
1523 convert_yuv_to_planarrgb_avx2_internal<direction, pixel_t_src, lessthan16bit, false, float, YuvRgbConversionType::FLOAT_OUTPUT /*n/a*/>(dstp, dstPitch, srcp, srcPitch, width, height, m, bits_per_pixel, bits_per_pixel_target);
1524 }
1525 }
1526 }
1527 }
1528
1529 //instantiate
1530 // YUV_TO_RGB
1531 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::YUV_TO_RGB, uint8_t, true>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1532 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::YUV_TO_RGB, uint16_t, true>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1533 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::YUV_TO_RGB, uint16_t, false>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1534 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::YUV_TO_RGB, float, false>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1535
1536 // RGB_TO_YUV
1537 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::RGB_TO_YUV, uint8_t, true>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1538 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::RGB_TO_YUV, uint16_t, true>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1539 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::RGB_TO_YUV, uint16_t, false>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1540 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::RGB_TO_YUV, float, false>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1541
1542 // RGB_TO_Y
1543 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::RGB_TO_Y, uint8_t, true>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1544 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::RGB_TO_Y, uint16_t, true>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1545 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::RGB_TO_Y, uint16_t, false>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1546 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::RGB_TO_Y, float, false>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1547
1548 // YUV_TO_YUV (for future use - e.g., BT.601 → BT.709)
1549 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::YUV_TO_YUV, uint8_t, true>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1550 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::YUV_TO_YUV, uint16_t, true>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1551 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::YUV_TO_YUV, uint16_t, false>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1552 template void convert_yuv_to_planarrgb_avx2<ConversionDirection::YUV_TO_YUV, float, false>(BYTE* (&dstp)[3], int(&dstPitch)[3], const BYTE* (&srcp)[3], const int(&srcPitch)[3], int width, int height, const ConversionMatrix& m, int bits_per_pixel, int bits_per_pixel_target, bool force_float);
1553
1554 DISABLE_WARNING_POP
1555