From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id EF8444BEDF for ; Fri, 29 Aug 2025 20:20:49 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'1XcZw4nOmKumK20JvgAPSPc4L2MPo3MVcqibQSGU6B4=', expected b'of4O7/sdOUnhbw9mXaUewuXQUBaiCYDOSRMiIAqKlrM=')) header.d=protonmail.com header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1756498830; h=date : to : message-id : mime-version : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=6PDSxtRC+DlHZExdNyXsfyZVeWvJ7LdwFTAazwQRcsk=; b=d1k21Fb0bgmzjMK+zVEV81YjkGgbfu9wCyDu3lINW0qeNb3pO1XnLN7OGlGpoQA4mKOc6 P0fhTC2BISON21kIzxoYZntePmEHRNmS/kjvw2vjheDzlNgEXlmuGBTe6XjTlpaK8xXgP1U uNG47nbnV4RqlEb/FsFNg5zROgNqqWCss98KqwFyV41FH0ANrj/CPUAo0j1Xt6pSg34Bzlh Ygbqw+S0DiHR8lHXVhmxIlQj/xILlb9hoUy9lLdDSyofrVy59LJc9F6AC47MbraixwSuygU /Air5pZJ1UUnHUof55XvLwxTTEH+tzKm/iZB63S2qZpKbOnbUnoC+TvVvRTA== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C44CB68E7CB; Fri, 29 Aug 2025 23:20:30 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1756498819; b=NpLQZrXpsG2791aXeXfOiOASoJ0xdfaEfmIs+vkLGPK/7lWPcwRhmU0pn39PRXzjn4vEK REXDYEliViXy3zR3hpbFC3daYRgbuRe0Y+7zmDKxwXvIdGeE2rccejvvHwPUwVtwF1xJBBc qPzLa8GkdYhFP3cba2zypufIoMByJmpV9XDyHBcV8EuD0BUZbyt045mGY/0QEvDh+6UR0NX wmFbqI+ygo1+2ebt5pyRJuHtW/Sii4FgDsIB80/bythxB+2SX+mG74BffdDv+b2FT52R6O/ 2fQhLT/Co94x+pfGDI5jbeW7W8r3/7w3nCiiHrz7x0MhCcHG2ny366BOIabw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1756498819; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=1XcZw4nOmKumK20JvgAPSPc4L2MPo3MVcqibQSGU6B4=; b=Nt5gxECapijQyiz/c15zNdGo8jSNJ9M/vUDEmuDVpvkswg7Fft0uVVW39/O9GT5Yevhfi jEBT9ULc5foQkmHz54ZMJScKTlvV06lk8483RWbA/ezYgo31kqmOnFHEzoIu8AK2mNfqvKp 5GluynZ50Ifw9GsiFMGRuKx9TBgQ8PUtT9IhigW3zZ8p9XJ7IQ6c40Vq4cpflO7fAPDNLIo arNfEwFScTazcf2Zh6FM1/ehfAHwjYL6hc9YRpCwNs5k3mA6rYbqCf0hdCw+ZK4hyo9/90+ ayEVABS2m1cD6a2VZnmkITRkhRIqvQzWlnmOYi+M04rZlMNI9BMh7GgzCGDg== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=protonmail.com; arc=none; dmarc=pass header.from=protonmail.com policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=protonmail.com; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=protonmail.com policy.dmarc=quarantine Received: from mail-43166.protonmail.ch (mail-43166.protonmail.ch [185.70.43.166]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 29EB668E6FA for ; Fri, 29 Aug 2025 23:19:52 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1756498791; x=1756757991; bh=of4O7/sdOUnhbw9mXaUewuXQUBaiCYDOSRMiIAqKlrM=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=zNwaeOtASBuh6WWoDuPbquKK2dII5xev4jnNrmMkafgoKKfDRTUPVLKZHLDf74SK8 oFRmBHzZL76yM4mJBaOqc74o5caJW5McNP0lt9ujPUtiVwuEAdpyweiRcCnxbHvBsm fsADQZtbi/ajJ6dMx0HmUwRrQoJK2zZoQfhECgrzD9ki23NrcoS+phdNYPGQWHGkyP lWmgCRPTrLiw59WAGcrIq9g9Qlf5CAL9RjEo/M+pzTfscVZuBHX5Or09sv53CuCd9S vhb0y+17rRPY6zX5dLojoUTcFKHq4+mmv/HjTbcVLrzgS1946VvlgMozX/JGljkZQo /yHCO6PX/2gaw== Date: Fri, 29 Aug 2025 20:19:47 +0000 To: FFmpeg development discussions and patches Message-ID: <-bW6jmQQSuGIZXDUmE8tnqn_TU1c-wo1WbKGAytFLIpE3oHFbeXNhoVAfr7U1ioIbeO7HVb_W52Ib9rccz1l5_rUWw-VZtdVyIcKnwv3kDY=@protonmail.com> Feedback-ID: 28710920:user:proton X-Pm-Message-ID: 1fe7be9beedd7b85d6b5ce5a8319f878feba7ebd MIME-Version: 1.0 Message-ID-Hash: 5NX4R4BZ3ZOMQFDRMFBRS7AXI2B5XWTI X-Message-ID-Hash: 5NX4R4BZ3ZOMQFDRMFBRS7AXI2B5XWTI X-MailFrom: SRS0=77Jk=3J=protonmail.com=zsolt_vadasz@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH 1/2] libavfilter/vf_minterpolate: Hoist hot loop in `set_frame_data` List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Zsolt_Vad=C3=A1sz_via_ffmpeg-devel?= Cc: =?utf-8?Q?Zsolt_Vad=C3=A1sz?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: Signed-off-by: Zsolt Vadasz --- libavfilter/vf_minterpolate.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c index d034783bc5..2406259056 100644 --- a/libavfilter/vf_minterpolate.c +++ b/libavfilter/vf_minterpolate.c @@ -939,17 +939,20 @@ static void set_frame_data(MIContext *mi_ctx, int alpha, AVFrame *avf_out) weight_sum = ALPHA_MAX; } - for (i = 0; i < pixel_refs->nb; i++) { - Frame *frame = &mi_ctx->frames[pixel_refs->refs[i]]; - if (chroma) { + if (chroma) { + for (i = 0; i < pixel_refs->nb; i++) { + Frame *frame = &mi_ctx->frames[pixel_refs->refs[i]]; x_mv = (x >> mi_ctx->log2_chroma_w) + pixel_mvs->mvs[i][0] / (1 << mi_ctx->log2_chroma_w); y_mv = (y >> mi_ctx->log2_chroma_h) + pixel_mvs->mvs[i][1] / (1 << mi_ctx->log2_chroma_h); - } else { + val += pixel_weights->weights[i] * frame->avf->data[plane][x_mv + y_mv * frame->avf->linesize[plane]]; + } + } else { + for (i = 0; i < pixel_refs->nb; i++) { + Frame *frame = &mi_ctx->frames[pixel_refs->refs[i]]; x_mv = x + pixel_mvs->mvs[i][0]; y_mv = y + pixel_mvs->mvs[i][1]; + val += pixel_weights->weights[i] * frame->avf->data[plane][x_mv + y_mv * frame->avf->linesize[plane]]; } - - val += pixel_weights->weights[i] * frame->avf->data[plane][x_mv + y_mv * frame->avf->linesize[plane]]; } val = ROUNDED_DIV(val, weight_sum); -- 2.51.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org