From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 805C843652 for ; Thu, 21 Jul 2022 02:26:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7EC1468B504; Thu, 21 Jul 2022 05:25:52 +0300 (EEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C7E3168B4AF for ; Thu, 21 Jul 2022 05:25:43 +0300 (EEST) Received: by mail-pf1-f172.google.com with SMTP id d10so463199pfd.9 for ; Wed, 20 Jul 2022 19:25:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VT5Jq3nHG6f9ea/3i4Kb1djNuxPV6b/LWW/4zfLKLhc=; b=Kk6sSOE53LoTYeVFjd5RuC3j1/4IfoHEqnQzgjxReiU2UukNx89WiaLyakfO6alC5N xfa3xnRGRhb3GF6JFIPO1ldSnLSMCCXJGRk1SVGUMyW0rZtKS/jdg2trXhHo8cYvJLea j/DyYL6T3k0VCLrgDDKvKU6mlbwaFj/4+vwmYr7mb2vhjWSCO48vzJtwOsv3nqfG5QB5 iPGGeQycil4h85ts1SEafiikwNAxHLF6XAa6gfeV3Wxc99NrQXE2Qn9WCk53N7EwHX2O alKprzgf1BW7lTeEQ0i3ZBsnoEoDs6kP66RPoVRaGXJIQvpH/WfR1IAOdEyD94NbTmNg GDng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VT5Jq3nHG6f9ea/3i4Kb1djNuxPV6b/LWW/4zfLKLhc=; b=4FjChBje6POA/sNAmuKQyyRhkBD2BfA2oCodY3mxgrG71uFWMTRSTvCLPmqwYJTtLt 2ebcvgm2Bk9ZUzw65WOD4u2XFdnccGd+8BkmsqEnS20b1ASGl55JxIMA2hn1Gw/pDYXE TIGQzjj21C91hw+fUiJSNwbmie09mmZkqgJtCtnCeutSyzAuA8BGlXf9pKpdsWFeDfQd aoNZw3K1TKASkRxoBxmh2cohIB51m/3k2WatWon7qsK8jy/ykvnvNVNp47fsO283rSj6 cpvmwlmhzwE9W/Og4v/X4suGagYvHztmUX2bYaMgEOe10Z0l/mGsxB5TAC2PGcHlHYBy Yyng== X-Gm-Message-State: AJIora/3Tp4vzYsSIFg5sFeFnQsp3OtTFFugpQonDSeuEsuFFcqm1g9g tcU4637RCGWcuRbTrlSoYL8mL5ntgRGg4g== X-Google-Smtp-Source: AGRyM1v+IDaLaZQaSXd7GeHMdk9+hgUr4iDR9HcYVa8tUUC9/E/RU6sn6IGjSnRPnVk3Rk1epTvmBA== X-Received: by 2002:a05:6a00:1a94:b0:52b:21a0:afbc with SMTP id e20-20020a056a001a9400b0052b21a0afbcmr35880629pfv.13.1658370341799; Wed, 20 Jul 2022 19:25:41 -0700 (PDT) Received: from localhost.localdomain (23-121-159-29.lightspeed.sntcca.sbcglobal.net. [23.121.159.29]) by smtp.googlemail.com with ESMTPSA id j3-20020a62c503000000b005251c6fbd0csm340079pfg.29.2022.07.20.19.25.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 19:25:41 -0700 (PDT) From: Chris Phlipot To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Jul 2022 19:25:12 -0700 Message-Id: <20220721022514.1466331-3-cphlipot0@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220721022514.1466331-1-cphlipot0@gmail.com> References: <20220721022514.1466331-1-cphlipot0@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 3/5] avfilter/vf_yadif: reformat code to improve readability X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Chris Phlipot Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Reformat some of the code to improve readability and reduce code duplication. This change is intended to be purely cosmentic and shouldn't result in any functional changes. Signed-off-by: Chris Phlipot --- libavfilter/vf_yadif.c | 11 +++++------ libavfilter/yadif.h | 3 +-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 42f6246330..54109566be 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -211,16 +211,15 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) uint8_t *cur = &s->cur ->data[td->plane][y * refs]; uint8_t *next = &s->next->data[td->plane][y * refs]; uint8_t *dst = &td->frame->data[td->plane][y * td->frame->linesize[td->plane]]; + int prefs = y + 1 < td->h ? refs : -refs; + int mrefs = y ? -refs : refs; + int parity = td->parity ^ td->tff; int mode = y == 1 || y + 2 == td->h ? 2 : s->mode; s->filter_line(dst + pix_3, prev + pix_3, cur + pix_3, next + pix_3, td->w - edge, - y + 1 < td->h ? refs : -refs, - y ? -refs : refs, - td->parity ^ td->tff, mode); + prefs, mrefs, parity, mode); s->filter_edges(dst, prev, cur, next, td->w, - y + 1 < td->h ? refs : -refs, - y ? -refs : refs, - td->parity ^ td->tff, mode, s->req_align); + prefs, mrefs, parity, mode, s->req_align); } else { memcpy(&td->frame->data[td->plane][y * td->frame->linesize[td->plane]], &s->cur->data[td->plane][y * refs], td->w * df); diff --git a/libavfilter/yadif.h b/libavfilter/yadif.h index b81f2fc1d9..f271fe8304 100644 --- a/libavfilter/yadif.h +++ b/libavfilter/yadif.h @@ -67,8 +67,7 @@ typedef struct YADIFContext { * Required alignment for filter_line */ int req_align; - void (*filter_line)(void *dst, - void *prev, void *cur, void *next, + void (*filter_line)(void *dst, void *prev, void *cur, void *next, int w, int prefs, int mrefs, int parity, int mode); void (*filter_edges)(void *dst, void *prev, void *cur, void *next, int w, int prefs, int mrefs, int parity, int mode, -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".