summaryrefslogtreecommitdiff
path: root/libavfilter/drawutils.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-08-31 11:25:25 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-08-31 13:19:46 +0200
commit2625b955a31a94d5f433ba75e933d1acf4259f13 (patch)
treea3153f3db3135494f28b5ddd1a642d316e3cc902 /libavfilter/drawutils.c
parentd3a23b67777a739d64080f03fc209b0ba1df7b2e (diff)
avfilter/drawutils: honor shift for color component description
Diffstat (limited to 'libavfilter/drawutils.c')
-rw-r--r--libavfilter/drawutils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index a3710db939..f6760be963 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -253,7 +253,8 @@ void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4
#define EXPAND(compn) \
if (desc->comp[compn].depth > 8) \
color->comp[desc->comp[compn].plane].u16[desc->comp[compn].offset] = \
- color->comp[desc->comp[compn].plane].u8[desc->comp[compn].offset] << (draw->desc->comp[compn].depth - 8)
+ color->comp[desc->comp[compn].plane].u8[desc->comp[compn].offset] << \
+ (draw->desc->comp[compn].depth + draw->desc->comp[compn].shift - 8)
EXPAND(3);
EXPAND(2);
EXPAND(1);