Browse Source

avfilter/vf_blend: clip result for divide blend mode

Pointed-out-by: Rudolf Polzer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n2.7
Paul B Mahol 10 years ago
parent
commit
ac973926b8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavfilter/vf_blend.c

+ 1
- 1
libavfilter/vf_blend.c View File

@@ -203,7 +203,7 @@ DEFINE_BLEND(overlay, (A < 128) ? MULTIPLY(2, A, B) : SCREEN(2, A, B))
DEFINE_BLEND(hardlight, (B < 128) ? MULTIPLY(2, B, A) : SCREEN(2, B, A))
DEFINE_BLEND(darken, FFMIN(A, B))
DEFINE_BLEND(lighten, FFMAX(A, B))
DEFINE_BLEND(divide, ((float)A / ((float)B) * 255))
DEFINE_BLEND(divide, av_clip_uint8(((float)A / ((float)B) * 255)))
DEFINE_BLEND(dodge, DODGE(A, B))
DEFINE_BLEND(burn, BURN(A, B))
DEFINE_BLEND(softlight, (A > 127) ? B + (255 - B) * (A - 127.5) / 127.5 * (0.5 - FFABS(B - 127.5) / 255): B - B * ((127.5 - A) / 127.5) * (0.5 - FFABS(B - 127.5)/255))


Loading…
Cancel
Save