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 8E7364040D for ; Mon, 24 Jan 2022 11:10:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9701368AF97; Mon, 24 Jan 2022 13:10:09 +0200 (EET) Received: from shout02.mail.de (shout02.mail.de [62.201.172.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2BA2E68AE14 for ; Mon, 24 Jan 2022 13:10:03 +0200 (EET) Received: from postfix01.mail.de (postfix03.bt.mail.de [10.0.121.127]) by shout02.mail.de (Postfix) with ESMTP id 40958A16E2 for ; Mon, 24 Jan 2022 12:10:02 +0100 (CET) Received: from smtp01.mail.de (smtp01.bt.mail.de [10.0.121.211]) by postfix01.mail.de (Postfix) with ESMTP id 24F2C801E7 for ; Mon, 24 Jan 2022 12:10:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mailde202009; t=1643022602; bh=N3HR0KLng+X25dXPpTGTxQGhoS99Sr3mDpyA5KCzwpc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=mlO7TXYjVpVGZhnJFJIREnDRnDyjvoJMqcb3IE7iVmhElwNyRo1W+x5jf+3mNBgx9 5GHYim3I/nQJI5ednQ2v2wo22LmIY8IIY38JrSOiDcnZQz2ESlw7IAfVMRLb6B+pat QuyxxPmIxKGHZbqkFOh2bBbzeTMYWHeqrbVs9Q+K4ZSv2vu7PBEMm3N2DZFi2JeUZP gU8MxPMJNVO2xoIPOH9tJ0tGk41lp6Ph/6XihQMUOXDHZQiLFlIBbKuc5QZrKrm9rn PUqjiGC5cxeImcPPv3wxSn8N5Z72FZcM1BBOeQOMEAtIsFxoGqQyWTIH4bDJHxgBTI enWUlv/8gvfZQ== Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtp01.mail.de (Postfix) with ESMTPSA id E0A8B100117 for ; Mon, 24 Jan 2022 12:10:01 +0100 (CET) Message-ID: <0cd9bdc1-5a15-594b-4324-6537a8cbb261@mail.de> Date: Mon, 24 Jan 2022 12:10:01 +0100 MIME-Version: 1.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20210115045832.76405-1-borbarak@fb.com> <3fa8e9b2-6824-eb3a-2390-22fd024efa9f@mail.de> From: Thilo Borgmann In-Reply-To: X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 3022 X-purgate-ID: 154282::1643022602-00006BE6-769A67BA/0/0 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Am 18.01.22 um 14:58 schrieb Thilo Borgmann: > Am 15.01.22 um 09:27 schrieb Paul B Mahol: >> On Sat, Jan 15, 2022 at 9:25 AM Paul B Mahol wrote: >> >>> >>> >>> 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. > > Enhanced. > > >>> Also why filter description only shows SI part and TI part is missing? > > Mentioned. > > v2 attached. Ping. -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".