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 81CF6420D8 for ; Sat, 15 Jan 2022 08:25:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4BF4768B415; Sat, 15 Jan 2022 10:25:14 +0200 (EET) Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1D7AE68B0F6 for ; Sat, 15 Jan 2022 10:25:08 +0200 (EET) Received: by mail-yb1-f173.google.com with SMTP id p5so30278235ybd.13 for ; Sat, 15 Jan 2022 00:25:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=1HXWHp9kc/ARfDfrhWbHzlNnuHicgYT0CNgf+YhbzDM=; b=S83vSN/YOeUoAhobfPno/zzdnkfrAT6GnbrSlo4gAfln1xJgX58QnwkbdQmcSqIObW N51SCCW2X3waB8q3R8A302w7HRK5DtYCb6CvIGOKeEOY1r4TRXsnpB3XMQt8tlpcVI9l aSjmz5N7drlqZ+97JP3AbLBiEmCQ3fXFgvcNP17LQvDhG9R56cPnjfUPNQ/AmE7lInoK aFGzf4g1KYJYDOxUa71PKXDcIGx+Qn+KLiWZ2dVunovkfqu8kwQ7Xubq1xnJVB8vNe88 4swQdlTDtCRYqUaBU1exbQWJ138G1D0t7GWS33frTdPifvuprroJcOChJLABvL47XKv+ vg8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=1HXWHp9kc/ARfDfrhWbHzlNnuHicgYT0CNgf+YhbzDM=; b=zRBzCs2bhya11wcYLqrTfIR+befWN4xu81yt26u6mk7XE5KEUiCvMc2ObsADYx3R19 WozETSmRX49BMWnYRsGFupob4gz4JWMZxViiiwNL2TMjcH/wgeQZhhYTK9+/wzE3kLfH cqJAtVa9W8dhCMVzXOcc7mCTOmh74a3kHLXOC+Ow4+eRSTtIwRK6qf+Lv1MtBABH8w94 ARGU4YFSjd3/wi1hlkV5jOrzHIL/ThrGnlzujf3wOc7o62scnmxd9EFTiKT55JGnEuqw gUhAM5bc50JtNrP4e1vbLIZtYFt6V2CtHEjudZ+cLf3QuxjrIwDXsXAkHTMwJeBbJhCB hlhg== X-Gm-Message-State: AOAM530RHFuXqOrEV3fn8Q6M0084rIhN7IeS6F8DygOptPmCy2j83w1J QJ/Mbd+uRet/XAMmGuDTMLZnAFAzvxmJQpXCrsJPQtZN X-Google-Smtp-Source: ABdhPJwR3m/0chGaU/Iw5lo35iZqo5rugQjRsNeXunAJFDL5PNf+6yNEeaInxQT2XCupe9nbkwEvHfCidqyiefEVlsM= X-Received: by 2002:a25:4dd4:: with SMTP id a203mr19116888ybb.580.1642235105912; Sat, 15 Jan 2022 00:25:05 -0800 (PST) MIME-Version: 1.0 References: <20210115045832.76405-1-borbarak@fb.com> <3fa8e9b2-6824-eb3a-2390-22fd024efa9f@mail.de> In-Reply-To: <3fa8e9b2-6824-eb3a-2390-22fd024efa9f@mail.de> From: Paul B Mahol Date: Sat, 15 Jan 2022 09:25:22 +0100 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] avfilter: Added siti filter 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 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: On Fri, Jan 14, 2022 at 5:22 PM Thilo Borgmann wrote: > Hi, > > Am 19.01.21 um 05:49 schrieb Lynne: > > Jan 19, 2021, 01:07 by borbarak@fb.com: > > > >> Calculate Spatial Info (SI) and Temporal Info (TI) scores for a video, > as defined > >> in ITU-T P.910: Subjective video quality assessment methods for > multimedia > >> applications. > >> > >> Update: Fixed bracket style. > >> > > > > Thanks, looks much neater now. > > > > > > > >> I'm already adding the data to the frame's metadata, is the suggestion > to remove the file option altogether? > >> > > > > Yes. We want to avoid filters having their own file in/out options rather > > than using generic ones. > > Updated the patch to apply to git HEAD. > Removed file output. > Made printing summary to console optional. > > > >> + > >> +#include "libavutil/imgutils.h" > >> +#include "libavutil/internal.h" > >> +#include "libavutil/opt.h" > >> + > >> +#include "avfilter.h" > >> +#include "formats.h" > >> +#include "internal.h" > >> +#include "video.h" > >> + > >> +static const int X_FILTER[9] = { > >> + 1, 0, -1, > >> + 2, 0, -2, > >> + 1, 0, -1 > >> +}; > >> + > >> +static const int Y_FILTER[9] = { > >> + 1, 2, 1, > >> + 0, 0, 0, > >> + -1, -2, -1 > >> +}; > >> > > > > We have optimized assembly to apply 3x3 matrices. Check out > > libavfilter/x86/vf_convolution.asm:ff_filter_3x3_sse4 > > vf_convolution already applies a sobel filter that way. Maybe > > look into sharing some DSP code with it? > > I checked a bit since I also want a common sobel for vf_edgedetect / my > patch for vf_blurriness. > > For sobel, there is no direct asm implementation. We have a generic > filter_3x3 with sse4 optimization. To use sobel with that, you'd need to > run two times filter_3x3 plus one pass for gradient calculation. > > As another difference, this filter (SITI) does on-the-fly conversion to > full-range pixel values during its sobel. While vf_edgedetect / > vf_bluriness use an abbreviation for the gradients during its sobel. Which > makes them both distinct enough not to fit into a general filter_3x3 or > filter_sobel from vf_convolution easily (and more overhead). So I think > it's not worth the effort to force them into a common function? (Especially > since we don't have a sobel_sse4 or something) > > Patch without a common sobel attached. > > Violations of code style. > -Thilo > > > _______________________________________________ > 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". > _______________________________________________ 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".