mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
textoverlay: fix comparison is always false due to limited range of data type
Perform calculation in a temp var with enough room as there's guarantee that ret will be able to hold the result for example in _blit_AYUV.
This commit is contained in:
parent
35064fdc82
commit
fbc60fc6f4
1 changed files with 3 additions and 2 deletions
|
@ -145,8 +145,9 @@ GST_DEBUG_CATEGORY (pango_debug);
|
|||
|
||||
#define OVER(ret, alphaA, Ca, alphaB, Cb, alphaNew) \
|
||||
{ \
|
||||
ret = (Ca * alphaA + Cb * alphaB * (255 - alphaA) / 255) / alphaNew; \
|
||||
ret = CLAMP (ret, 0, 255); \
|
||||
gint _tmp; \
|
||||
_tmp = (Ca * alphaA + Cb * alphaB * (255 - alphaA) / 255) / alphaNew; \
|
||||
ret = CLAMP (_tmp, 0, 255); \
|
||||
}
|
||||
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
|
|
Loading…
Reference in a new issue