|
|
@ -538,12 +538,13 @@ static av_always_inline void blend_plane_##depth##_##nbits##bits(AVFilterContext |
|
|
|
if (i && yuv) \
|
|
|
|
if (i && yuv) \
|
|
|
|
*d = av_clip((*d * (max - alpha) + *s * alpha) / max + *s - mid, -mid, mid) + mid; \
|
|
|
|
*d = av_clip((*d * (max - alpha) + *s * alpha) / max + *s - mid, -mid, mid) + mid; \
|
|
|
|
else \
|
|
|
|
else \
|
|
|
|
*d = FFMIN((*d * (max - alpha) + *s * alpha) / max + *s, max); \
|
|
|
|
*d = av_clip_uintp2((*d * (max - alpha) + *s * alpha) / max + *s - (16<<(nbits-8)),\
|
|
|
|
|
|
|
|
nbits);\
|
|
|
|
} else { \
|
|
|
|
} else { \
|
|
|
|
if (i && yuv) \
|
|
|
|
if (i && yuv) \
|
|
|
|
*d = av_clip(FAST_DIV255((*d - mid) * (max - alpha)) + *s - mid, -mid, mid) + mid; \
|
|
|
|
*d = av_clip(FAST_DIV255((*d - mid) * (max - alpha)) + *s - mid, -mid, mid) + mid; \
|
|
|
|
else \
|
|
|
|
else \
|
|
|
|
*d = FFMIN(FAST_DIV255(*d * (max - alpha)) + *s, max); \
|
|
|
|
*d = av_clip_uint8(FAST_DIV255(*d * (255 - alpha)) + *s - 16); \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
s++; \
|
|
|
|
s++; \
|
|
|
|