From patchwork Wed Aug 31 09:33:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Rothenpieler X-Patchwork-Id: 349 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp281052vsd; Wed, 31 Aug 2016 02:34:20 -0700 (PDT) X-Received: by 10.194.107.130 with SMTP id hc2mr7936726wjb.7.1472636060553; Wed, 31 Aug 2016 02:34:20 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dw15si43049077wjb.134.2016.08.31.02.34.16; Wed, 31 Aug 2016 02:34:20 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rothenpieler.org; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 80EDC689D93; Wed, 31 Aug 2016 12:33:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from btbn.de (btbn.de [5.9.118.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E880689D19 for ; Wed, 31 Aug 2016 12:33:51 +0300 (EEST) Received: from localhost.localdomain (ip4d1666ad.dynamic.kabel-deutschland.de [77.22.102.173]) by btbn.de (Postfix) with ESMTPSA id 3608B778F6; Wed, 31 Aug 2016 11:33:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rothenpieler.org; s=mail; t=1472636038; bh=hLLjU7j1KzogIpwcoPkCnRQKEf12FiZIpWKJ9SAA9Vk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RmizwrNKBf48++Ewa8HO/vQ/Gh2i1XPaHK3MSr7JfFLyWdjU2uBnMwwwOcII6L65i aCGZRBc45Vbt6ZyEi8d5eOmUc1bilFOgTgs9rsnL4PUja+LQnKdbRgROzUweYqY8Ty t+33EQuuco5HlTVU1mJUDLrlczKPupMRqMxh9nLg= From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Wed, 31 Aug 2016 11:33:48 +0200 Message-Id: <20160831093349.11140-2-timo@rothenpieler.org> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160831093349.11140-1-timo@rothenpieler.org> References: <20160829212300.7695-1-timo@rothenpieler.org> <20160831093349.11140-1-timo@rothenpieler.org> Subject: [FFmpeg-devel] [PATCH 2/3] avfilter/drawutils: honor shift for color component description X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Timo Rothenpieler MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavfilter/drawutils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c index a3710db..f6760be 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);