filters/overlay/OF_softhardlight.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 | // Overlay (c) 2003, 2004 by Klaus Post | ||
| 36 | |||
| 37 | #include "overlayfunctions.h" | ||
| 38 | #include "blend_common.h" | ||
| 39 | |||
| 40 | #include <stdint.h> | ||
| 41 | #include <type_traits> | ||
| 42 | |||
| 43 | 2 | void OL_SoftLightImage::DoBlendImageMask(ImageOverlayInternal* base, ImageOverlayInternal* overlay, ImageOverlayInternal* mask) { | |
| 44 | 2 | const bool fullOpacity = (opacity_f == 1.0f); // becomes a template switch | |
| 45 |
2/2✓ Branch 2 → 3 taken 1 time.
✓ Branch 2 → 11 taken 1 time.
|
2 | if(of_mode == OF_SoftLight) { |
| 46 |
1/2✓ Branch 3 → 4 taken 1 time.
✗ Branch 3 → 7 not taken.
|
1 | if (bits_per_pixel == 8) { |
| 47 |
1/2✓ Branch 4 → 5 taken 1 time.
✗ Branch 4 → 6 not taken.
|
1 | if (fullOpacity) BlendImageMask<uint8_t, true, false, true>(base, overlay, mask); |
| 48 | ✗ | else BlendImageMask<uint8_t, true, false, false>(base, overlay, mask); | |
| 49 | ✗ | } else if(bits_per_pixel <= 16) { | |
| 50 | ✗ | if (fullOpacity) BlendImageMask<uint16_t, true, false, true>(base, overlay, mask); | |
| 51 | ✗ | else BlendImageMask<uint16_t, true, false, false>(base, overlay, mask); | |
| 52 | } | ||
| 53 | //else if(bits_per_pixel == 32) | ||
| 54 | // BlendImageMask<float>(base, overlay, mask); | ||
| 55 | } else { | ||
| 56 | // OF_HardLight | ||
| 57 |
1/2✓ Branch 11 → 12 taken 1 time.
✗ Branch 11 → 15 not taken.
|
1 | if (bits_per_pixel == 8) { |
| 58 |
1/2✓ Branch 12 → 13 taken 1 time.
✗ Branch 12 → 14 not taken.
|
1 | if (fullOpacity) BlendImageMask<uint8_t, true, true, true>(base, overlay, mask); |
| 59 | ✗ | else BlendImageMask<uint8_t, true, true, false>(base, overlay, mask); | |
| 60 | ✗ | } else if(bits_per_pixel <= 16) { | |
| 61 | ✗ | if (fullOpacity) BlendImageMask<uint16_t, true, true, true>(base, overlay, mask); | |
| 62 | ✗ | else BlendImageMask<uint16_t, true, true, false>(base, overlay, mask); | |
| 63 | } | ||
| 64 | //else if(bits_per_pixel == 32) | ||
| 65 | // BlendImageMask<float>(base, overlay, mask); | ||
| 66 | } | ||
| 67 | 2 | } | |
| 68 | |||
| 69 | 6 | void OL_SoftLightImage::DoBlendImage(ImageOverlayInternal* base, ImageOverlayInternal* overlay) { | |
| 70 | 6 | const bool fullOpacity = (opacity_f == 1.0f); // becomes a template switch | |
| 71 |
2/2✓ Branch 2 → 3 taken 3 times.
✓ Branch 2 → 11 taken 3 times.
|
6 | if(of_mode == OF_SoftLight) { |
| 72 |
1/2✓ Branch 3 → 4 taken 3 times.
✗ Branch 3 → 7 not taken.
|
3 | if (bits_per_pixel == 8) { |
| 73 |
2/2✓ Branch 4 → 5 taken 2 times.
✓ Branch 4 → 6 taken 1 time.
|
3 | if (fullOpacity) BlendImageMask<uint8_t, false, false, true>(base, overlay, nullptr); |
| 74 | 1 | else BlendImageMask<uint8_t, false, false, false>(base, overlay, nullptr); | |
| 75 | ✗ | } else if(bits_per_pixel <= 16) { | |
| 76 | ✗ | if (fullOpacity) BlendImageMask<uint16_t, false, false, true>(base, overlay, nullptr); | |
| 77 | ✗ | else BlendImageMask<uint16_t, false, false, false>(base, overlay, nullptr); | |
| 78 | } | ||
| 79 | //else if(bits_per_pixel == 32) | ||
| 80 | // BlendImage<float>(base, overlay); | ||
| 81 | } | ||
| 82 | else { | ||
| 83 | // OF_HardLight | ||
| 84 |
1/2✓ Branch 11 → 12 taken 3 times.
✗ Branch 11 → 15 not taken.
|
3 | if (bits_per_pixel == 8) { |
| 85 |
2/2✓ Branch 12 → 13 taken 2 times.
✓ Branch 12 → 14 taken 1 time.
|
3 | if (fullOpacity) BlendImageMask<uint8_t, false, true, true>(base, overlay, nullptr); |
| 86 | 1 | else BlendImageMask<uint8_t, false, true, false>(base, overlay, nullptr); | |
| 87 | ✗ | } else if(bits_per_pixel <= 16) { | |
| 88 | ✗ | if (fullOpacity) BlendImageMask<uint16_t, false, true, true>(base, overlay, nullptr); | |
| 89 | ✗ | else BlendImageMask<uint16_t, false, true, false>(base, overlay, nullptr); | |
| 90 | } | ||
| 91 | //else if(bits_per_pixel == 32) | ||
| 92 | // BlendImageMask<float>(base, overlay, mask); | ||
| 93 | } | ||
| 94 | 6 | } | |
| 95 | |||
| 96 | template<typename pixel_t, bool maskMode, bool hardLight, bool fullOpacity> | ||
| 97 | 8 | void OL_SoftLightImage::BlendImageMask(ImageOverlayInternal* base, ImageOverlayInternal* overlay, ImageOverlayInternal* mask) { | |
| 98 | 8 | pixel_t* baseY = reinterpret_cast<pixel_t*>(base->GetPtr(PLANAR_Y)); | |
| 99 | 8 | pixel_t* baseU = reinterpret_cast<pixel_t*>(base->GetPtr(PLANAR_U)); | |
| 100 | 8 | pixel_t* baseV = reinterpret_cast<pixel_t*>(base->GetPtr(PLANAR_V)); | |
| 101 | |||
| 102 | 8 | pixel_t* ovY = reinterpret_cast<pixel_t*>(overlay->GetPtr(PLANAR_Y)); | |
| 103 | 8 | pixel_t* ovU = reinterpret_cast<pixel_t*>(overlay->GetPtr(PLANAR_U)); | |
| 104 | 8 | pixel_t* ovV = reinterpret_cast<pixel_t*>(overlay->GetPtr(PLANAR_V)); | |
| 105 | |||
| 106 | pixel_t* maskY; | ||
| 107 | pixel_t* maskU; | ||
| 108 | pixel_t* maskV; | ||
| 109 | if constexpr (maskMode) { | ||
| 110 | 2 | maskY = reinterpret_cast<pixel_t*>(mask->GetPtr(PLANAR_Y)); | |
| 111 | 2 | maskU = reinterpret_cast<pixel_t*>(mask->GetPtr(PLANAR_U)); | |
| 112 | 2 | maskV = reinterpret_cast<pixel_t*>(mask->GetPtr(PLANAR_V)); | |
| 113 | } | ||
| 114 | else { | ||
| 115 | 6 | maskY = nullptr; | |
| 116 | 6 | maskU = nullptr; | |
| 117 | 6 | maskV = nullptr; | |
| 118 | } | ||
| 119 | |||
| 120 | 8 | const int half_pixel_value = (sizeof(pixel_t) == 1) ? 128 : (1 << (bits_per_pixel - 1)); | |
| 121 | 8 | const int max_pixel_value = (sizeof(pixel_t) == 1) ? 255 : (1 << bits_per_pixel) - 1; | |
| 122 | 8 | const int pixel_range = max_pixel_value + 1; | |
| 123 | 8 | const int SHIFT = (sizeof(pixel_t) == 1) ? 5 : 5 + (bits_per_pixel - 8); | |
| 124 | 8 | const int over32 = (1 << SHIFT); // 32 | |
| 125 | 8 | const int basepitch = (base->pitch) / sizeof(pixel_t); | |
| 126 | 8 | const int overlaypitch = (overlay->pitch) / sizeof(pixel_t); | |
| 127 | int maskpitch; | ||
| 128 | if constexpr (maskMode) { | ||
| 129 | 2 | maskpitch = (mask->pitch) / sizeof(pixel_t); | |
| 130 | } | ||
| 131 | else { | ||
| 132 | 6 | maskpitch = 0; | |
| 133 | } | ||
| 134 | |||
| 135 | 8 | const MagicDiv magic = get_magic_div(bits_per_pixel); | |
| 136 | |||
| 137 | // fullOpacity is a template parameter (based on opacity_f==1.0f check) | ||
| 138 | // Formulas below containing opacity_i are hopefully compiler optimized. | ||
| 139 | // opacity_i on the max_pixel_value scale gives finer opacity granularity at >8-bit | ||
| 140 | // than the old fixed 0..256 scale. | ||
| 141 | 8 | const int opacity_i = fullOpacity ? max_pixel_value : (int)(opacity_f * max_pixel_value + 0.5f); | |
| 142 | 8 | const int rounder = max_pixel_value / 2; | |
| 143 | |||
| 144 | 8 | int w = base->w(); | |
| 145 | 8 | int h = base->h(); | |
| 146 | |||
| 147 |
12/32void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 67 → 12 taken 3 times.
✓ Branch 67 → 68 taken 1 time.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 46 → 12 taken 5 times.
✓ Branch 46 → 47 taken 2 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 67 → 12 taken 3 times.
✓ Branch 67 → 68 taken 1 time.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 46 → 12 taken 5 times.
✓ Branch 46 → 47 taken 2 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 76 → 15 not taken.
✗ Branch 76 → 77 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 70 → 15 taken 2 times.
✓ Branch 70 → 71 taken 1 time.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 76 → 15 not taken.
✗ Branch 76 → 77 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 70 → 15 taken 2 times.
✓ Branch 70 → 71 taken 1 time.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 67 → 12 not taken.
✗ Branch 67 → 68 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 46 → 12 not taken.
✗ Branch 46 → 47 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 67 → 12 not taken.
✗ Branch 67 → 68 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 46 → 12 not taken.
✗ Branch 46 → 47 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 76 → 15 not taken.
✗ Branch 76 → 77 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 70 → 15 not taken.
✗ Branch 70 → 71 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 76 → 15 not taken.
✗ Branch 76 → 77 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 70 → 15 not taken.
✗ Branch 70 → 71 not taken.
|
28 | for (int y = 0; y < h; y++) { |
| 148 |
12/32void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 65 → 13 taken 15 times.
✓ Branch 65 → 66 taken 3 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 44 → 13 taken 23 times.
✓ Branch 44 → 45 taken 5 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 65 → 13 taken 15 times.
✓ Branch 65 → 66 taken 3 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 44 → 13 taken 23 times.
✓ Branch 44 → 45 taken 5 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 74 → 16 not taken.
✗ Branch 74 → 75 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 68 → 16 taken 8 times.
✓ Branch 68 → 69 taken 2 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 74 → 16 not taken.
✗ Branch 74 → 75 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 68 → 16 taken 8 times.
✓ Branch 68 → 69 taken 2 times.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 65 → 13 not taken.
✗ Branch 65 → 66 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 13 not taken.
✗ Branch 44 → 45 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 65 → 13 not taken.
✗ Branch 65 → 66 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 13 not taken.
✗ Branch 44 → 45 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 74 → 16 not taken.
✗ Branch 74 → 75 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 68 → 16 not taken.
✗ Branch 68 → 69 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 74 → 16 not taken.
✗ Branch 74 → 75 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 68 → 16 not taken.
✗ Branch 68 → 69 not taken.
|
112 | for (int x = 0; x < w; x++) { |
| 149 | int Y; | ||
| 150 | if constexpr (hardLight) | ||
| 151 | 46 | Y = (int)baseY[x] + ((int)ovY[x]) * 2 - half_pixel_value * 2; | |
| 152 | else | ||
| 153 | 46 | Y = (int)baseY[x] + (int)ovY[x] - half_pixel_value; | |
| 154 | 92 | int U = baseU[x] + ovU[x] - half_pixel_value; | |
| 155 | 92 | int V = baseV[x] + ovV[x] - half_pixel_value; | |
| 156 | if constexpr (!(fullOpacity && !maskMode)) { | ||
| 157 | // reformulated from (Y*mask + (max-mask)*base) / max to | ||
| 158 | // base + effective_mask * (Y - base) / max | ||
| 159 | // effective_mask is on the max_pixel_value scale | ||
| 160 | // Note: mask == max_pixel_value when absent otherwise scaled by opacity. | ||
| 161 | // (Y-base) range is +/-(max_pixel_value+1), the eff*(Y-base) is uint32_t safe | ||
| 162 | // But since it's signed and magic_div_rt is uint32_t only, special sign handling is needed | ||
| 163 | int effY, effU, effV; // effective masks/opacity/their combinations | ||
| 164 | if constexpr (maskMode) { | ||
| 165 | if constexpr (fullOpacity) { | ||
| 166 | 16 | effY = maskY[x]; | |
| 167 | 16 | effU = maskU[x]; | |
| 168 | 16 | effV = maskV[x]; | |
| 169 | } | ||
| 170 | else { | ||
| 171 | ✗ | effY = magic_div_rt<pixel_t>((uint32_t)maskY[x] * (uint32_t)opacity_i + rounder, magic); | |
| 172 | ✗ | effU = magic_div_rt<pixel_t>((uint32_t)maskU[x] * (uint32_t)opacity_i + rounder, magic); | |
| 173 | ✗ | effV = magic_div_rt<pixel_t>((uint32_t)maskV[x] * (uint32_t)opacity_i + rounder, magic); | |
| 174 | } | ||
| 175 | } | ||
| 176 | else { | ||
| 177 | 30 | effY = opacity_i; | |
| 178 | 30 | effU = opacity_i; | |
| 179 | 30 | effV = opacity_i; | |
| 180 | } | ||
| 181 | 46 | int dY = Y - (int)baseY[x]; | |
| 182 | 46 | int dU = U - (int)baseU[x]; | |
| 183 | 46 | int dV = V - (int)baseV[x]; | |
| 184 |
6/24void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 13 → 14 taken 9 times.
✓ Branch 13 → 17 taken 6 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 13 → 14 taken 9 times.
✓ Branch 13 → 17 taken 6 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 26 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 16 → 17 taken 8 times.
✗ Branch 16 → 20 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 26 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 16 → 17 taken 8 times.
✗ Branch 16 → 20 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 17 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 17 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 26 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 20 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 22 → 23 not taken.
✗ Branch 22 → 26 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 16 → 17 not taken.
✗ Branch 16 → 20 not taken.
|
80 | int tY = (dY >= 0) ? (int)magic_div_rt<pixel_t>((uint32_t)effY * (uint32_t)dY + rounder, magic) |
| 185 | 24 | : -(int)magic_div_rt<pixel_t>((uint32_t)effY * (uint32_t)(-dY) + rounder, magic); | |
| 186 |
6/24void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 20 → 21 taken 9 times.
✓ Branch 20 → 24 taken 6 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 20 → 21 taken 9 times.
✓ Branch 20 → 24 taken 6 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 29 → 30 not taken.
✗ Branch 29 → 33 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 23 → 24 taken 8 times.
✗ Branch 23 → 27 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 29 → 30 not taken.
✗ Branch 29 → 33 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 23 → 24 taken 8 times.
✗ Branch 23 → 27 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 24 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 24 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 29 → 30 not taken.
✗ Branch 29 → 33 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 23 → 24 not taken.
✗ Branch 23 → 27 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 29 → 30 not taken.
✗ Branch 29 → 33 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 23 → 24 not taken.
✗ Branch 23 → 27 not taken.
|
80 | int tU = (dU >= 0) ? (int)magic_div_rt<pixel_t>((uint32_t)effU * (uint32_t)dU + rounder, magic) |
| 187 | 24 | : -(int)magic_div_rt<pixel_t>((uint32_t)effU * (uint32_t)(-dU) + rounder, magic); | |
| 188 |
6/24void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 27 → 28 taken 9 times.
✓ Branch 27 → 31 taken 6 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 27 → 28 taken 9 times.
✓ Branch 27 → 31 taken 6 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 36 → 37 not taken.
✗ Branch 36 → 40 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 34 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 36 → 37 not taken.
✗ Branch 36 → 40 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 34 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 31 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 31 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 36 → 37 not taken.
✗ Branch 36 → 40 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 30 → 31 not taken.
✗ Branch 30 → 34 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 36 → 37 not taken.
✗ Branch 36 → 40 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 30 → 31 not taken.
✗ Branch 30 → 34 not taken.
|
64 | int tV = (dV >= 0) ? (int)magic_div_rt<pixel_t>((uint32_t)effV * (uint32_t)dV + rounder, magic) |
| 189 | 56 | : -(int)magic_div_rt<pixel_t>((uint32_t)effV * (uint32_t)(-dV) + rounder, magic); | |
| 190 | 46 | Y = (int)baseY[x] + tY; | |
| 191 | 46 | U = (int)baseU[x] + tU; | |
| 192 | 46 | V = (int)baseV[x] + tV; | |
| 193 | } | ||
| 194 |
7/32void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 41 taken 15 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 13 → 14 not taken.
✓ Branch 13 → 20 taken 23 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 34 → 35 not taken.
✓ Branch 34 → 41 taken 15 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✓ Branch 13 → 14 taken 2 times.
✓ Branch 13 → 20 taken 21 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 43 → 44 not taken.
✗ Branch 43 → 50 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 44 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 43 → 44 not taken.
✗ Branch 43 → 50 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 37 → 38 not taken.
✓ Branch 37 → 44 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 41 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 20 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 41 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 13 → 14 not taken.
✗ Branch 13 → 20 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 43 → 44 not taken.
✗ Branch 43 → 50 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 37 → 38 not taken.
✗ Branch 37 → 44 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 43 → 44 not taken.
✗ Branch 43 → 50 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 37 → 38 not taken.
✗ Branch 37 → 44 not taken.
|
92 | if (Y > max_pixel_value) { // Apply overbrightness to UV |
| 195 |
1/32void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 14 → 15 not taken.
✓ Branch 14 → 16 taken 2 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 46 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 40 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 46 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 40 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 16 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 46 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 40 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 46 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 40 not taken.
|
2 | int multiplier = max(0, pixel_range + over32 - Y); // 0 to 32 |
| 196 | 2 | U = ((U * (multiplier)) + (half_pixel_value * (over32 - multiplier))) >> SHIFT; | |
| 197 | 2 | V = ((V * (multiplier)) + (half_pixel_value * (over32 - multiplier))) >> SHIFT; | |
| 198 | 2 | Y = max_pixel_value; | |
| 199 | } | ||
| 200 |
6/32void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 41 → 42 not taken.
✓ Branch 41 → 48 taken 15 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 27 taken 23 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 41 → 42 not taken.
✓ Branch 41 → 48 taken 15 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 20 → 21 not taken.
✓ Branch 20 → 27 taken 21 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 50 → 51 not taken.
✗ Branch 50 → 57 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 45 not taken.
✓ Branch 44 → 51 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 50 → 51 not taken.
✗ Branch 50 → 57 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 45 not taken.
✓ Branch 44 → 51 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 41 → 42 not taken.
✗ Branch 41 → 48 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 27 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 41 → 42 not taken.
✗ Branch 41 → 48 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 27 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 50 → 51 not taken.
✗ Branch 50 → 57 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 51 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 50 → 51 not taken.
✗ Branch 50 → 57 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 44 → 45 not taken.
✗ Branch 44 → 51 not taken.
|
90 | else if (Y < 0) { // Apply superdark to UV |
| 201 | ✗ | int multiplier = min(-Y, over32); // 0 to 32 | |
| 202 | ✗ | U = ((U * (over32 - multiplier)) + (half_pixel_value * (multiplier))) >> SHIFT; | |
| 203 | ✗ | V = ((V * (over32 - multiplier)) + (half_pixel_value * (multiplier))) >> SHIFT; | |
| 204 | ✗ | Y = 0; | |
| 205 | } | ||
| 206 |
6/32void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 48 → 49 not taken.
✓ Branch 48 → 50 taken 15 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 29 taken 23 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 48 → 49 not taken.
✓ Branch 48 → 50 taken 15 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 27 → 28 not taken.
✓ Branch 27 → 29 taken 23 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 57 → 58 not taken.
✗ Branch 57 → 59 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 51 → 52 not taken.
✓ Branch 51 → 53 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 57 → 58 not taken.
✗ Branch 57 → 59 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 51 → 52 not taken.
✓ Branch 51 → 53 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 48 → 49 not taken.
✗ Branch 48 → 50 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 29 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 48 → 49 not taken.
✗ Branch 48 → 50 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 27 → 28 not taken.
✗ Branch 27 → 29 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 57 → 58 not taken.
✗ Branch 57 → 59 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 51 → 52 not taken.
✗ Branch 51 → 53 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 57 → 58 not taken.
✗ Branch 57 → 59 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 51 → 52 not taken.
✗ Branch 51 → 53 not taken.
|
92 | baseY[x] = (pixel_t)Y; |
| 207 |
6/32void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 56 → 57 not taken.
✓ Branch 56 → 58 taken 15 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 37 taken 23 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 56 → 57 not taken.
✓ Branch 56 → 58 taken 15 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 35 → 36 not taken.
✓ Branch 35 → 37 taken 23 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 65 → 66 not taken.
✗ Branch 65 → 67 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 59 → 60 not taken.
✓ Branch 59 → 61 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 65 → 66 not taken.
✗ Branch 65 → 67 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned char, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 59 → 60 not taken.
✓ Branch 59 → 61 taken 8 times.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 56 → 57 not taken.
✗ Branch 56 → 58 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 56 → 57 not taken.
✗ Branch 56 → 58 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, false, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 37 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 65 → 66 not taken.
✗ Branch 65 → 67 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, false, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 61 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, false>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 65 → 66 not taken.
✗ Branch 65 → 67 not taken.
void OL_SoftLightImage::BlendImageMask<unsigned short, true, true, true>(ImageOverlayInternal*, ImageOverlayInternal*, ImageOverlayInternal*):
✗ Branch 59 → 60 not taken.
✗ Branch 59 → 61 not taken.
|
92 | baseU[x] = (pixel_t)clamp(U, 0, max_pixel_value); |
| 208 | 92 | baseV[x] = (pixel_t)clamp(V, 0, max_pixel_value); | |
| 209 | } | ||
| 210 | 20 | baseY += basepitch; | |
| 211 | 20 | baseU += basepitch; | |
| 212 | 20 | baseV += basepitch; | |
| 213 | |||
| 214 | 20 | ovY += overlaypitch; | |
| 215 | 20 | ovU += overlaypitch; | |
| 216 | 20 | ovV += overlaypitch; | |
| 217 | |||
| 218 | if constexpr (maskMode) { | ||
| 219 | 4 | maskY += maskpitch; | |
| 220 | 4 | maskU += maskpitch; | |
| 221 | 4 | maskV += maskpitch; | |
| 222 | } | ||
| 223 | } | ||
| 224 | 8 | } | |
| 225 | |||
| 226 |