From patchwork Fri May 24 09:36:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 13270 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 9EFA9449A53 for ; Fri, 24 May 2019 12:36:51 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7BA6C68A3D5; Fri, 24 May 2019 12:36:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2DFF4689D68 for ; Fri, 24 May 2019 12:36:45 +0300 (EEST) Received: by mail-pg1-f175.google.com with SMTP id h17so4775184pgv.0 for ; Fri, 24 May 2019 02:36:45 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=n67LzpspYWZ2PFf1LySjr56y/ewPtTKLQ0geo+m9pyE=; b=mRgdDBFBQCB/jCgeevPKSF5kUPcUaDkUl3ylh2hiqrB/mR4vo6myhGkWzjtM+KWeKB /H7b1tJXLOGORDz3hJcxOFp9DiO6Dj2eqao6XYrmiTRIBVF5uSHEUHMXn/oySr/JJBsq BF92bSpJ6lDJ7ZAFPhjxX9BZKM+RbTxkspKrENgYZYXqo6GqZwSQHERDRKiUp8frzx0g XaEs271q8Gu5r6tpaNr6Y/oZP0PHvLgtE5f0wRzdI4ET2S/8oyZ6WH2UEb0sjgdGa0Xx ZXzZ04T4DyENTjyG5NxBYhB4jEoFRolCQagSHNxlaXt07h7HfyVmVo/rm5dJ0LoZ82pj QMXg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=n67LzpspYWZ2PFf1LySjr56y/ewPtTKLQ0geo+m9pyE=; b=F/hMsocwm7dKc1NpNmXoCxpRvwDt6aZP5IOqZUmiqhUXnvpKVGTRrqWt7PTZH6Ar2v hMzmME7Ems56ZK1I9zAQiwL/8RhJrEfA22BpviTOOMYzPc9y86kkjweQA/GNm7UJZ+fD +rThmeGG1kFARzi18BDmWomtuOYurI5fBaPhHDhWUvFcQpPkSjKt6zekK8IQlMNg8jCq GFS8EHd70ZlyoB6tZy5+NfBCU8DJPgOX9ATMlfrQ/ajPdFIo/xWjsJcGkv5gvv7MrqnQ vI576O9cLK/IdFh77LPGH01LYBGq8uAW53BYIjsM77Fx8uTly7CQSR2HAMq2FJJeFlbr 54bw== X-Gm-Message-State: APjAAAXiidR/p0mOUiBwqjrxVrVZ1ic3yOgi6iQkxZQoB91nRyKHn2sh 6oKpVnkAHSNGmIb4XJGeHKkZGeoSFGo= X-Google-Smtp-Source: APXvYqxRF/DT5nMvAFkkrWpeeA6e3mQpTU0TofPfp5P/5+surCLSVpsOPMliqpeTibZOJdY/bBsvZw== X-Received: by 2002:a65:60cd:: with SMTP id r13mr89593746pgv.58.1558690603118; Fri, 24 May 2019 02:36:43 -0700 (PDT) Received: from localhost.localdomain ([47.90.99.151]) by smtp.gmail.com with ESMTPSA id x7sm1951254pfm.82.2019.05.24.02.36.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 May 2019 02:36:42 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 May 2019 17:36:11 +0800 Message-Id: <20190524093616.74647-2-lance.lmwang@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190524093616.74647-1-lance.lmwang@gmail.com> References: <20190524093616.74647-1-lance.lmwang@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] libavfilter/vf_overlay.c: Add '\' for every line of the blend_slice_yuv function by vim column edit 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: onemda@gmail.com, Limin Wang Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang --- libavfilter/vf_overlay.c | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index b468cedf2e..c1abd3e1b2 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -598,32 +598,32 @@ static inline void alpha_composite(const AVFrame *src, const AVFrame *dst, } } -static av_always_inline void blend_slice_yuv(AVFilterContext *ctx, - AVFrame *dst, const AVFrame *src, - int hsub, int vsub, - int main_has_alpha, - int x, int y, - int is_straight, - int jobnr, int nb_jobs) -{ - OverlayContext *s = ctx->priv; - const int src_w = src->width; - const int src_h = src->height; - const int dst_w = dst->width; - const int dst_h = dst->height; - - blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 0, 0, 0, x, y, main_has_alpha, - s->main_desc->comp[0].plane, s->main_desc->comp[0].offset, s->main_desc->comp[0].step, is_straight, 1, - jobnr, nb_jobs); - blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 1, hsub, vsub, x, y, main_has_alpha, - s->main_desc->comp[1].plane, s->main_desc->comp[1].offset, s->main_desc->comp[1].step, is_straight, 1, - jobnr, nb_jobs); - blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 2, hsub, vsub, x, y, main_has_alpha, - s->main_desc->comp[2].plane, s->main_desc->comp[2].offset, s->main_desc->comp[2].step, is_straight, 1, - jobnr, nb_jobs); - - if (main_has_alpha) - alpha_composite(src, dst, src_w, src_h, dst_w, dst_h, x, y, jobnr, nb_jobs); +static av_always_inline void blend_slice_yuv(AVFilterContext *ctx, \ + AVFrame *dst, const AVFrame *src, \ + int hsub, int vsub, \ + int main_has_alpha, \ + int x, int y, \ + int is_straight, \ + int jobnr, int nb_jobs) \ +{ \ + OverlayContext *s = ctx->priv; \ + const int src_w = src->width; \ + const int src_h = src->height; \ + const int dst_w = dst->width; \ + const int dst_h = dst->height; \ + \ + blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 0, 0, 0, x, y, main_has_alpha, \ + s->main_desc->comp[0].plane, s->main_desc->comp[0].offset, s->main_desc->comp[0].step, is_straight, 1, \ + jobnr, nb_jobs); \ + blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 1, hsub, vsub, x, y, main_has_alpha, \ + s->main_desc->comp[1].plane, s->main_desc->comp[1].offset, s->main_desc->comp[1].step, is_straight, 1, \ + jobnr, nb_jobs); \ + blend_plane(ctx, dst, src, src_w, src_h, dst_w, dst_h, 2, hsub, vsub, x, y, main_has_alpha, \ + s->main_desc->comp[2].plane, s->main_desc->comp[2].offset, s->main_desc->comp[2].step, is_straight, 1, \ + jobnr, nb_jobs); \ + \ + if (main_has_alpha) \ + alpha_composite(src, dst, src_w, src_h, dst_w, dst_h, x, y, jobnr, nb_jobs); \ } static av_always_inline void blend_slice_planar_rgb(AVFilterContext *ctx,