* Re: [FFmpeg-devel] [FFmpeg-cvslog] swscale/output: add VUYA output support [not found] <20220807174331.46F5D410470@natalya.videolan.org> @ 2022-08-08 8:56 ` Martin Storsjö 2022-08-08 12:28 ` James Almer 0 siblings, 1 reply; 2+ messages in thread From: Martin Storsjö @ 2022-08-08 8:56 UTC (permalink / raw) To: ffmpeg-devel; +Cc: James Almer On Sun, 7 Aug 2022, James Almer wrote: > ffmpeg | branch: master | James Almer <jamrial@gmail.com> | Fri Aug 5 13:44:16 2022 -0300| [19748132613d1d13f5b6786051910e7375bb3df6] | committer: James Almer > > swscale/output: add VUYA output support > > Signed-off-by: James Almer <jamrial@gmail.com> > >> 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". ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [FFmpeg-cvslog] swscale/output: add VUYA output support 2022-08-08 8:56 ` [FFmpeg-devel] [FFmpeg-cvslog] swscale/output: add VUYA output support Martin Storsjö @ 2022-08-08 12:28 ` James Almer 0 siblings, 0 replies; 2+ messages in thread From: James Almer @ 2022-08-08 12:28 UTC (permalink / raw) To: ffmpeg-devel On 8/8/2022 5:56 AM, Martin Storsjö wrote: > On Sun, 7 Aug 2022, James Almer wrote: > >> ffmpeg | branch: master | James Almer <jamrial@gmail.com> | Fri Aug 5 >> 13:44:16 2022 -0300| [19748132613d1d13f5b6786051910e7375bb3df6] | >> committer: James Almer >> >> swscale/output: add VUYA output support >> >> Signed-off-by: James Almer <jamrial@gmail.com> >> >>> 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 I sent a patch that fixed what you described for me on x86 (and a segfault, even), "[PATCH] swscale/output: fix reading chroma values when generating vuya output". Does it also fix arm for you? _______________________________________________ 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". ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-08 12:28 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20220807174331.46F5D410470@natalya.videolan.org> 2022-08-08 8:56 ` [FFmpeg-devel] [FFmpeg-cvslog] swscale/output: add VUYA output support Martin Storsjö 2022-08-08 12:28 ` James Almer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git