Skip to content

Commit 2fa6f77

Browse files
committed
Reduce template complexity in Layer.cpp to improve compile times
(But VS2017 build process is still 13x slower)
1 parent 56223ab commit 2fa6f77

1 file changed

Lines changed: 44 additions & 54 deletions

File tree

avs_core/filters/layer.cpp

Lines changed: 44 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,35 +2174,37 @@ static void layer_yuy2_add_c(BYTE* dstp, const BYTE* ovrp, int dst_pitch, int ov
21742174
// when chroma is processed, one can use/not use source chroma
21752175
// Only when use_alpha: maskMode defines mask generation for chroma planes
21762176
// When use_alpha == false -> maskMode ignored
2177-
// allow_leftminus1: prepare for to be called from SIMD code, remaining non-mod pixel's C function. For such non x=0 pos calculations there already exist valid [x-1] pixels
21782177

21792178
DISABLE_WARNING_PUSH
21802179
DISABLE_WARNING_UNREFERENCED_LOCAL_VARIABLE
21812180

21822181
// warning C4101 : 'mask_right' : unreferenced local variable
2183-
template<MaskMode maskMode, typename pixel_t, int bits_per_pixel, bool is_chroma, bool use_chroma, bool has_alpha, bool subtract, bool allow_leftminus1>
2184-
static void layer_yuv_add_subtract_c(BYTE* dstp8, const BYTE* ovrp8, const BYTE* mask8, int dst_pitch, int overlay_pitch, int mask_pitch, int width, int height, int level) {
2182+
template<MaskMode maskMode, typename pixel_t, bool lessthan16bits, bool is_chroma, bool use_chroma, bool has_alpha, bool subtract>
2183+
static void layer_yuv_add_subtract_c(BYTE* dstp8, const BYTE* ovrp8, const BYTE* mask8, int dst_pitch, int overlay_pitch, int mask_pitch, int width, int height, int level, int bits_per_pixel) {
21852184
pixel_t* dstp = reinterpret_cast<pixel_t*>(dstp8);
21862185
const pixel_t* ovrp = reinterpret_cast<const pixel_t*>(ovrp8);
21872186
const pixel_t* maskp = reinterpret_cast<const pixel_t*>(mask8);
21882187
dst_pitch /= sizeof(pixel_t);
21892188
overlay_pitch /= sizeof(pixel_t);
21902189
mask_pitch /= sizeof(pixel_t);
21912190

2192-
typedef typename std::conditional < bits_per_pixel < 16, int, int64_t>::type calc_t;
2191+
typedef typename std::conditional < lessthan16bits, int, int64_t>::type calc_t;
21932192

2194-
constexpr int max_pixel_value = (1 << bits_per_pixel) - 1;
2193+
if constexpr (sizeof(pixel_t) == 1)
2194+
bits_per_pixel = 255; // make quasi constexpr
2195+
2196+
const int max_pixel_value = (1 << bits_per_pixel) - 1;
21952197

21962198
for (int y = 0; y < height; ++y) {
21972199

21982200
int mask_right; // used for MPEG2 color schemes
21992201
if constexpr (has_alpha) {
22002202
// dstp is the source (and in-place destination) luma, compared to overlay luma
22012203
if constexpr (maskMode == MASK420_MPEG2) {
2202-
mask_right = allow_leftminus1 ? maskp[-1] + maskp[-1 + mask_pitch] : maskp[0] + maskp[0 + mask_pitch];
2204+
mask_right = maskp[0] + maskp[0 + mask_pitch];
22032205
}
22042206
else if constexpr (maskMode == MASK422_MPEG2) {
2205-
mask_right = allow_leftminus1 ? maskp[-1] : maskp[0];
2207+
mask_right = maskp[0];
22062208
}
22072209
}
22082210

@@ -2258,21 +2260,21 @@ static void layer_yuv_add_subtract_c(BYTE* dstp8, const BYTE* ovrp8, const BYTE*
22582260

22592261
alpha_mask = has_alpha ? (int)(((calc_t)effective_mask * level + 1) >> bits_per_pixel) : level;
22602262

2261-
constexpr int rounder = 1 << (bits_per_pixel - 1);
2263+
const int rounder = 1 << (bits_per_pixel - 1);
22622264

22632265
if constexpr (subtract) {
22642266
if constexpr (!is_chroma || use_chroma)
22652267
dstp[x] = (pixel_t)(dstp[x] + (((calc_t)(max_pixel_value - ovrp[x] - dstp[x]) * alpha_mask + rounder) >> bits_per_pixel));
22662268
else {
2267-
constexpr int half = 1 << (bits_per_pixel - 1);
2269+
const int half = 1 << (bits_per_pixel - 1);
22682270
dstp[x] = (pixel_t)(dstp[x] + (((calc_t)(/*max_pixel_value - */half - dstp[x]) * alpha_mask + rounder) >> bits_per_pixel));
22692271
}
22702272
}
22712273
else {
22722274
if constexpr (!is_chroma || use_chroma)
22732275
dstp[x] = (pixel_t)(dstp[x] + (((calc_t)(ovrp[x] - dstp[x]) * alpha_mask + rounder) >> bits_per_pixel));
22742276
else {
2275-
constexpr pixel_t half = 1 << (bits_per_pixel - 1);
2277+
const pixel_t half = 1 << (bits_per_pixel - 1);
22762278
dstp[x] = (pixel_t)(dstp[x] + (((calc_t)(half - dstp[x]) * alpha_mask + rounder) >> bits_per_pixel));
22772279
}
22782280
}
@@ -2400,14 +2402,14 @@ static void layer_yuv_add_subtract_f_c(BYTE* dstp8, const BYTE* ovrp8, const BYT
24002402
}
24012403
DISABLE_WARNING_POP
24022404

2403-
template<MaskMode maskMode, typename pixel_t, int bits_per_pixel, bool is_chroma, bool use_chroma, bool has_alpha>
2404-
static void layer_yuv_add_c(BYTE* dstp8, const BYTE* ovrp8, const BYTE* mask8, int dst_pitch, int overlay_pitch, int mask_pitch, int width, int height, int level) {
2405-
layer_yuv_add_subtract_c<maskMode, pixel_t, bits_per_pixel, is_chroma, use_chroma, has_alpha, false, false>(dstp8, ovrp8, mask8, dst_pitch, overlay_pitch, mask_pitch, width, height, level);
2405+
template<MaskMode maskMode, typename pixel_t, bool lessthan16bits, bool is_chroma, bool use_chroma, bool has_alpha>
2406+
static void layer_yuv_add_c(BYTE* dstp8, const BYTE* ovrp8, const BYTE* mask8, int dst_pitch, int overlay_pitch, int mask_pitch, int width, int height, int level, int bits_per_pixel) {
2407+
layer_yuv_add_subtract_c<maskMode, pixel_t, lessthan16bits, is_chroma, use_chroma, has_alpha, false>(dstp8, ovrp8, mask8, dst_pitch, overlay_pitch, mask_pitch, width, height, level, bits_per_pixel);
24062408
}
24072409

2408-
template<MaskMode maskMode, typename pixel_t, int bits_per_pixel, bool is_chroma, bool use_chroma, bool has_alpha>
2409-
static void layer_yuv_subtract_c(BYTE* dstp8, const BYTE* ovrp8, const BYTE* mask8, int dst_pitch, int overlay_pitch, int mask_pitch, int width, int height, int level) {
2410-
layer_yuv_add_subtract_c<maskMode, pixel_t, bits_per_pixel, is_chroma, use_chroma, has_alpha, true, false>(dstp8, ovrp8, mask8, dst_pitch, overlay_pitch, mask_pitch, width, height, level);
2410+
template<MaskMode maskMode, typename pixel_t, bool lessthan16bits, bool is_chroma, bool use_chroma, bool has_alpha>
2411+
static void layer_yuv_subtract_c(BYTE* dstp8, const BYTE* ovrp8, const BYTE* mask8, int dst_pitch, int overlay_pitch, int mask_pitch, int width, int height, int level, int bits_per_pixel) {
2412+
layer_yuv_add_subtract_c<maskMode, pixel_t, lessthan16bits, is_chroma, use_chroma, has_alpha, true>(dstp8, ovrp8, mask8, dst_pitch, overlay_pitch, mask_pitch, width, height, level, bits_per_pixel);
24112413
}
24122414

24132415
template<MaskMode maskMode, bool is_chroma, bool use_chroma, bool has_alpha>
@@ -4228,24 +4230,18 @@ PVideoFrame __stdcall Layer::GetFrame(int n, IScriptEnvironment* env)
42284230
#define YUV_ADD_CHROMA_DISPATCH(MaskType, has_alpha) \
42294231
switch (bits_per_pixel) { \
42304232
case 8: \
4231-
if (chroma) layer_yuv_add_c<MaskType, uint8_t, 8, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4232-
else layer_yuv_add_c<MaskType, uint8_t, 8, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4233+
if (chroma) layer_yuv_add_c<MaskType, uint8_t, true /*lessthan16bits*/, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
4234+
else layer_yuv_add_c<MaskType, uint8_t, true /*lessthan16bits*/, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
42334235
break; \
42344236
case 10: \
4235-
if (chroma) layer_yuv_add_c<MaskType, uint16_t, 10, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4236-
else layer_yuv_add_c<MaskType, uint16_t, 10, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4237-
break; \
42384237
case 12: \
4239-
if (chroma) layer_yuv_add_c<MaskType, uint16_t, 12, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4240-
else layer_yuv_add_c<MaskType, uint16_t, 12, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4241-
break; \
42424238
case 14: \
4243-
if (chroma) layer_yuv_add_c<MaskType, uint16_t, 14, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4244-
else layer_yuv_add_c<MaskType, uint16_t, 14, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4239+
if (chroma) layer_yuv_add_c<MaskType, uint16_t, true /*lessthan16bits*/, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
4240+
else layer_yuv_add_c<MaskType, uint16_t, true /*lessthan16bits*/, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
42454241
break; \
42464242
case 16: \
4247-
if (chroma) layer_yuv_add_c<MaskType, uint16_t, 16, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4248-
else layer_yuv_add_c<MaskType, uint16_t, 16, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4243+
if (chroma) layer_yuv_add_c<MaskType, uint16_t, false /*lessthan16bits*/, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
4244+
else layer_yuv_add_c<MaskType, uint16_t, false /*lessthan16bits*/, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
42494245
break; \
42504246
case 32: \
42514247
if (chroma) layer_yuv_add_f_c<MaskType, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, opacity); \
@@ -4255,11 +4251,11 @@ PVideoFrame __stdcall Layer::GetFrame(int n, IScriptEnvironment* env)
42554251

42564252
#define YUV_ADD_LUMA_DISPATCH(MaskType, has_alpha) \
42574253
switch (bits_per_pixel) { \
4258-
case 8: layer_yuv_add_c<MaskType, uint8_t, 8, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4259-
case 10: layer_yuv_add_c<MaskType, uint16_t, 10, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4260-
case 12: layer_yuv_add_c<MaskType, uint16_t, 12, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4261-
case 14: layer_yuv_add_c<MaskType, uint16_t, 14, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4262-
case 16: layer_yuv_add_c<MaskType, uint16_t, 16, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4254+
case 8: layer_yuv_add_c<MaskType, uint8_t, true /*lessthan16bits*/, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); break; \
4255+
case 10: \
4256+
case 12: \
4257+
case 14: layer_yuv_add_c<MaskType, uint16_t, true /*lessthan16bits*/, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); break; \
4258+
case 16: layer_yuv_add_c<MaskType, uint16_t, false /*lessthan16bits*/, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); break; \
42634259
case 32: layer_yuv_add_f_c<MaskType, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, opacity); break; \
42644260
}
42654261

@@ -4270,8 +4266,8 @@ PVideoFrame __stdcall Layer::GetFrame(int n, IScriptEnvironment* env)
42704266
{
42714267
if (vi.IsYV411())
42724268
{
4273-
if (chroma) layer_yuv_add_c<MASK411, uint8_t, 8, true, true, false/*has_alpha*/>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4274-
else layer_yuv_add_c<MASK411, uint8_t, 8, true, false, false /*has_alpha*/>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4269+
if (chroma) layer_yuv_add_c<MASK411, uint8_t, true /*lessthan16bits*/, true, true, false/*has_alpha*/>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
4270+
else layer_yuv_add_c<MASK411, uint8_t, true /*lessthan16bits*/, true, false, false /*has_alpha*/>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
42754271
// no alpha for 411
42764272
}
42774273
else if (vi.Is420())
@@ -4351,24 +4347,18 @@ PVideoFrame __stdcall Layer::GetFrame(int n, IScriptEnvironment* env)
43514347
#define YUV_SUBTRACT_CHROMA_DISPATCH(MaskType, has_alpha) \
43524348
switch (bits_per_pixel) { \
43534349
case 8: \
4354-
if (chroma) layer_yuv_subtract_c<MaskType, uint8_t, 8, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4355-
else layer_yuv_subtract_c<MaskType, uint8_t, 8, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4350+
if (chroma) layer_yuv_subtract_c<MaskType, uint8_t, true /*lessthan16bits*/, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
4351+
else layer_yuv_subtract_c<MaskType, uint8_t, true /*lessthan16bits*/, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
43564352
break; \
43574353
case 10: \
4358-
if (chroma) layer_yuv_subtract_c<MaskType, uint16_t, 10, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4359-
else layer_yuv_subtract_c<MaskType, uint16_t, 10, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4360-
break; \
43614354
case 12: \
4362-
if (chroma) layer_yuv_subtract_c<MaskType, uint16_t, 12, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4363-
else layer_yuv_subtract_c<MaskType, uint16_t, 12, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4364-
break; \
43654355
case 14: \
4366-
if (chroma) layer_yuv_subtract_c<MaskType, uint16_t, 14, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4367-
else layer_yuv_subtract_c<MaskType, uint16_t, 14, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4356+
if (chroma) layer_yuv_subtract_c<MaskType, uint16_t, true /*lessthan16bits*/, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
4357+
else layer_yuv_subtract_c<MaskType, uint16_t, true /*lessthan16bits*/, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
43684358
break; \
43694359
case 16: \
4370-
if (chroma) layer_yuv_subtract_c<MaskType, uint16_t, 16, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4371-
else layer_yuv_subtract_c<MaskType, uint16_t, 16, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4360+
if (chroma) layer_yuv_subtract_c<MaskType, uint16_t, false /*lessthan16bits*/, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
4361+
else layer_yuv_subtract_c<MaskType, uint16_t, false /*lessthan16bits*/, true, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
43724362
break; \
43734363
case 32: \
43744364
if (chroma) layer_yuv_subtract_f_c<MaskType, true, true, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, opacity); \
@@ -4378,11 +4368,11 @@ PVideoFrame __stdcall Layer::GetFrame(int n, IScriptEnvironment* env)
43784368

43794369
#define YUV_SUBTRACT_LUMA_DISPATCH(MaskType, has_alpha) \
43804370
switch (bits_per_pixel) { \
4381-
case 8: layer_yuv_subtract_c<MaskType, uint8_t, 8, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4382-
case 10: layer_yuv_subtract_c<MaskType, uint16_t, 10, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4383-
case 12: layer_yuv_subtract_c<MaskType, uint16_t, 12, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4384-
case 14: layer_yuv_subtract_c<MaskType, uint16_t, 14, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4385-
case 16: layer_yuv_subtract_c<MaskType, uint16_t, 16, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); break; \
4371+
case 8: layer_yuv_subtract_c<MaskType, uint8_t, true /*lessthan16bits*/, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); break; \
4372+
case 10:\
4373+
case 12:\
4374+
case 14: layer_yuv_subtract_c<MaskType, uint16_t, true /*lessthan16bits*/, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); break; \
4375+
case 16: layer_yuv_subtract_c<MaskType, uint16_t, false /*lessthan16bits*/, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); break; \
43864376
case 32: layer_yuv_subtract_f_c<MaskType, false, false, has_alpha>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, opacity); break; \
43874377
}
43884378

@@ -4393,8 +4383,8 @@ PVideoFrame __stdcall Layer::GetFrame(int n, IScriptEnvironment* env)
43934383
{
43944384
if (vi.IsYV411())
43954385
{
4396-
if (chroma) layer_yuv_subtract_c<MASK411, uint8_t, 8, true, true, false>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4397-
else layer_yuv_subtract_c<MASK411, uint8_t, 8, true, false, false>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel); \
4386+
if (chroma) layer_yuv_subtract_c<MASK411, uint8_t, true /*lessthan16bits*/, true, true, false>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
4387+
else layer_yuv_subtract_c<MASK411, uint8_t, true /*lessthan16bits*/, true, false, false>(src1p, src2p, maskp, src1_pitch, src2_pitch, mask_pitch, currentwidth, currentheight, mylevel, bits_per_pixel); \
43984388
}
43994389
else if (vi.Is420())
44004390
{

0 commit comments

Comments
 (0)