[FFmpeg-cvslog] avfilter/drawutils: Fix single plane with alpha
Michael Niedermayer
git at videolan.org
Thu Aug 25 05:21:41 EEST 2016
ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Tue Aug 9 12:22:15 2016 +0200| [905372be8f746ded92023fa92b858599368b2597] | committer: Michael Niedermayer
avfilter/drawutils: Fix single plane with alpha
Fixes Ticket5720
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 369ed11e3c8acc08db39fb2ed4e980a918cab61e)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=905372be8f746ded92023fa92b858599368b2597
---
libavfilter/drawutils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index e533040..8153fde 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -450,6 +450,7 @@ void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color,
alpha = 0x101 * color->rgba[3] + 0x2;
}
nb_planes = draw->nb_planes - !!(draw->desc->flags & AV_PIX_FMT_FLAG_ALPHA);
+ nb_planes += !nb_planes;
for (plane = 0; plane < nb_planes; plane++) {
nb_comp = draw->pixelstep[plane];
p0 = pointer_at(draw, dst, dst_linesize, plane, x0, y0);
@@ -627,6 +628,7 @@ void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color,
alpha = (0x101 * color->rgba[3] + 0x2) >> 8;
}
nb_planes = draw->nb_planes - !!(draw->desc->flags & AV_PIX_FMT_FLAG_ALPHA);
+ nb_planes += !nb_planes;
for (plane = 0; plane < nb_planes; plane++) {
nb_comp = draw->pixelstep[plane];
p0 = pointer_at(draw, dst, dst_linesize, plane, x0, y0);
More information about the ffmpeg-cvslog
mailing list