History

avfilter/drawutils: Fix single plane with alpha

Fixes Ticket5720

Michael Niedermayer committed 10 years ago

Commit 369ed111 parent 01183721 file · +2 −0Browse files

Showing the changes to libavfilter/drawutils.c (1 of 1 file). Show all

Unified · Split

libavfilter/drawutils.c+2−0
@@ -450,6 +450,7 @@ void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color, · 449 unmodified lines
450450 alpha = 0x101 * color->rgba[3] + 0x2;
451451 }
452452 nb_planes = draw->nb_planes - !!(draw->desc->flags & AV_PIX_FMT_FLAG_ALPHA);
453+ nb_planes += !nb_planes;
453454 for (plane = 0; plane < nb_planes; plane++) {
454455 nb_comp = draw->pixelstep[plane];
455456 p0 = pointer_at(draw, dst, dst_linesize, plane, x0, y0);
@@ -627,6 +628,7 @@ void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color, · 171 unmodified lines
627628 alpha = (0x101 * color->rgba[3] + 0x2) >> 8;
628629 }
629630 nb_planes = draw->nb_planes - !!(draw->desc->flags & AV_PIX_FMT_FLAG_ALPHA);
631+ nb_planes += !nb_planes;
630632 for (plane = 0; plane < nb_planes; plane++) {
631633 nb_comp = draw->pixelstep[plane];
632634 p0 = pointer_at(draw, dst, dst_linesize, plane, x0, y0);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t