From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] swscale/output: add VUYA output support
Date: Mon, 8 Aug 2022 09:28:32 -0300
Message-ID: <80c1124b-75ff-a99e-d787-6ce6bcf81d34@gmail.com> (raw)
In-Reply-To: <7fc3aced-e539-2a12-45cd-8d706f868f67@martin.st>
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".
prev parent reply other threads:[~2022-08-08 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220807174331.46F5D410470@natalya.videolan.org>
2022-08-08 8:56 ` Martin Storsjö
2022-08-08 12:28 ` James Almer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80c1124b-75ff-a99e-d787-6ce6bcf81d34@gmail.com \
--to=jamrial@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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