From patchwork Sun May 26 00:07:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 13294 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 83189448A21 for ; Sun, 26 May 2019 03:08:35 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5FDA9689259; Sun, 26 May 2019 03:08:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 981D16806CC for ; Sun, 26 May 2019 03:08:28 +0300 (EEST) Received: by mail-pl1-f193.google.com with SMTP id f97so5617838plb.5 for ; Sat, 25 May 2019 17:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iYlVaBAfALcQ+vQ6vjjuQ96NpiVnIAkJsW4YMUWQ428=; b=unwwLbUytyPs/9+XqzdmwsKzK8bxUBju2ZXM9sV00kNpXlYLRn6Cjt3Mt0Ujb6dc0W SxL4o7kCNHyFAtjC+knEsEQ/4UaqoLa2PB0dyCveZCzq+I/c76sXr9sKWipMj2npebwV AS7GNdE56gf4EaOU5fu0pnnaIU4MrethdGCt8bM1WGy9sJrzKVz8b3zyEk2DCWY+19z1 On1l3VY0iaU6HK44329DbWFRlAovDsXUlrb987D44oXKzmFv0wk8QuQFxEnFKDHlbZ6d 0WvryBxiMZ4U1EAHwRlWyA3G+VYfz32rid3j0yEp+KqSwK6D0Z7pyTJrwrSzNFD/jnZf 9eIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iYlVaBAfALcQ+vQ6vjjuQ96NpiVnIAkJsW4YMUWQ428=; b=jmUGMnQfDal0TAyYsnXOzliHsh+COM2xeyaVJkctbOF/P7sewbdJBE4chumFF57XT4 bvBb5++FYDXGBIqEKxxJDuAAFtkOGEJi/DjJtf7ywsY6H8opDaISK1IGg/iNzI7GifxY F4oaN2+mMst9QnzArs2Egr11pxzIFGls912WudVtQDGQkIqs73YSuVWtmj+kX+l0fotC OXKlL0wsYggrPnB8oceqf1lxXdXF0HPplekw6/OOC1lWozmb7Y5fGvrnb0GroGWbGhsT /MZivIEEGhE7zG3Jj44BUfRnpIWYScbcqiBQtGkXxu+ymrmPipAUSyZFl5RggstM4haz 1Fkw== X-Gm-Message-State: APjAAAXVc0HyvEYKs3wDz0vjU1/zSxdBSIGDDoYC8VABf0oktj/8PgZs PQlWPYfCtXXZjr4qfY0Es6m6vQ9Sqbw= X-Google-Smtp-Source: APXvYqwd1jXbVgDDRofy7G7Sa1sqrDqF73RG8DbkaMfArWTlQY5srP3738Mcdmctc8771KaI42EfyA== X-Received: by 2002:a17:902:21:: with SMTP id 30mr100259685pla.302.1558829306591; Sat, 25 May 2019 17:08:26 -0700 (PDT) Received: from localhost.localdomain ([47.90.99.151]) by smtp.gmail.com with ESMTPSA id a9sm6323945pgw.72.2019.05.25.17.08.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 25 May 2019 17:08:25 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Sun, 26 May 2019 08:07:46 +0800 Message-Id: <20190526000750.79563-1-lance.lmwang@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] libavfilter/vf_overlay.c: change the comment style for the following macro defined function 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: michael@niedermayer.cc, Limin Wang , ceffmpeg@gmail.com, barsnick@gmx.net, james.darnley@gmail.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang --- libavfilter/vf_overlay.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index 0a8f089c0d..b468cedf2e 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -500,7 +500,7 @@ static av_always_inline void blend_plane(AVFilterContext *ctx, for (; k < kmax; k++) { int alpha_v, alpha_h, alpha; - // average alpha for color components, improve quality + /* average alpha for color components, improve quality */ if (hsub && vsub && j+1 < src_hp && k+1 < src_wp) { alpha = (a[0] + a[src->linesize[3]] + a[1] + a[src->linesize[3]+1]) >> 2; @@ -512,10 +512,10 @@ static av_always_inline void blend_plane(AVFilterContext *ctx, alpha = (alpha_v + alpha_h) >> 1; } else alpha = a[0]; - // if the main channel has an alpha channel, alpha has to be calculated - // to create an un-premultiplied (straight) alpha value + /* if the main channel has an alpha channel, alpha has to be calculated */ + /* to create an un-premultiplied (straight) alpha value */ if (main_has_alpha && alpha != 0 && alpha != 255) { - // average alpha for color components, improve quality + /* average alpha for color components, improve quality */ uint8_t alpha_d; if (hsub && vsub && j+1 < src_hp && k+1 < src_wp) { alpha_d = (da[0] + da[dst->linesize[3]] + @@ -556,7 +556,7 @@ static inline void alpha_composite(const AVFrame *src, const AVFrame *dst, int x, int y, int jobnr, int nb_jobs) { - uint8_t alpha; ///< the amount of overlay to blend on to main + uint8_t alpha; /* the amount of overlay to blend on to main */ uint8_t *s, *sa, *d, *da; int i, imax, j, jmax; int slice_start, slice_end; @@ -587,7 +587,7 @@ static inline void alpha_composite(const AVFrame *src, const AVFrame *dst, *d = *s; break; default: - // apply alpha compositing: main_alpha += (1-main_alpha) * overlay_alpha + /* apply alpha compositing: main_alpha += (1-main_alpha) * overlay_alpha */ *d += FAST_DIV255((255 - *d) * *s); } d += 1;