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 26B5940D92 for ; Mon, 8 Aug 2022 08:56:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 081BB68B726; Mon, 8 Aug 2022 11:56:34 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 03AA568B308 for ; Mon, 8 Aug 2022 11:56:26 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 2788uPUK006802-2788uPUL006802; Mon, 8 Aug 2022 11:56:25 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id A0FBDA1468; Mon, 8 Aug 2022 11:56:25 +0300 (EEST) Date: Mon, 8 Aug 2022 11:56:24 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20220807174331.46F5D410470@natalya.videolan.org> Message-ID: <7fc3aced-e539-2a12-45cd-8d706f868f67@martin.st> References: <20220807174331.46F5D410470@natalya.videolan.org> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] swscale/output: add VUYA output support 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: James Almer 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: On Sun, 7 Aug 2022, James Almer wrote: > ffmpeg | branch: master | James Almer | Fri Aug 5 13:44:16 2022 -0300| [19748132613d1d13f5b6786051910e7375bb3df6] | committer: James Almer > > swscale/output: add VUYA output support > > Signed-off-by: James Almer > >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19748132613d1d13f5b6786051910e7375bb3df6 > --- > > libswscale/output.c | 57 ++++++++++++++++++++++++++++++++ > libswscale/utils.c | 2 +- > tests/ref/fate/filter-pixdesc-vuya | 1 + > tests/ref/fate/filter-pixfmts-copy | 1 + > tests/ref/fate/filter-pixfmts-crop | 1 + > tests/ref/fate/filter-pixfmts-field | 1 + > tests/ref/fate/filter-pixfmts-fieldorder | 1 + > tests/ref/fate/filter-pixfmts-hflip | 1 + > tests/ref/fate/filter-pixfmts-il | 1 + > tests/ref/fate/filter-pixfmts-null | 1 + > tests/ref/fate/filter-pixfmts-pad | 1 + > tests/ref/fate/filter-pixfmts-scale | 1 + > tests/ref/fate/filter-pixfmts-transpose | 1 + > tests/ref/fate/filter-pixfmts-vflip | 1 + > 14 files changed, 70 insertions(+), 1 deletion(-) The new tests for vuya fail in all ARM configurations. The issue disappears if running with CPUFLAGS=0 - but the issue isn't tied to any specific ARM specific assembly routine, but seems to be triggered by "filterAlign = 2" for the vertical luma filter. To reproduce the issue on x86, apply this patch: diff --git a/libswscale/utils.c b/libswscale/utils.c index 34503e57f4..e70281d74f 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1855,11 +1855,11 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, const int filterAlign = X86_MMX(cpu_flags) ? 2 : PPC_ALTIVEC(cpu_flags) ? 8 : have_neon(cpu_flags) ? 2 : 1; if ((ret = initFilter(&c->vLumFilter, &c->vLumFilterPos, &c->vLumFilterSize, - c->lumYInc, srcH, dstH, filterAlign, (1 << 12), + c->lumYInc, srcH, dstH, 2, (1 << 12), (flags & SWS_BICUBLIN) ? (flags | SWS_BICUBIC) : flags, cpu_flags, srcFilter->lumV, dstFilter->lumV, c->param, get_local_pos(c, 0, 0, 1), get_local_pos(c, 0, 0, 1))) < 0) I.e. hardcode passing filterAlign=2 to initFilter for vLumFilter. When running e.g. fate-filter-pixfmts-vflip with this modification on x86 normally, it works, but if one runs the same with CPUFLAGS=0, it fails. Thus, something in the vertical scaler fails if the the filter is overaligned; fails only for the vuya format test and nothing else. But the x86 assembly seems to cope with it. Can you please have a look? // Martin _______________________________________________ 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".