From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2 3/8] swscale/options: relax src/dst_h/v_chr_pos value range
Date: Sun, 7 Jul 2024 20:56:15 +0200
Message-ID: <20240707185615.GK4991@pb2> (raw)
In-Reply-To: <20240704143104.1821386-3-ffmpeg@haasn.xyz>
[-- Attachment #1.1: Type: text/plain, Size: 1034 bytes --]
On Thu, Jul 04, 2024 at 04:30:59PM +0200, Niklas Haas wrote:
> From: Niklas Haas <git@haasn.dev>
>
> When dealing with 4x subsampling ratios (log2 == 2), such as can arise
> with 4:1:1 or 4:1:0, a value range of 512 is not enough to cover the
> range of possible scenarios.
>
> For example, bottom-sited chroma in 4:1:0 would require an offset of 768
> (three luma rows). Simply double the limit to 1024. I don't see any
> place in initFilter() that would experience overflow as a result of this
> change, especially since get_local_pos() right-shifts it by the
> subsampling ratio again.
> ---
> libswscale/options.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
maybe limit it to the max value you know is needed instead of simply doubling.
it can be bumped up more later if we run in cases needing more
either way
LGTM
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
next prev parent reply other threads:[~2024-07-07 18:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 14:30 [FFmpeg-devel] [PATCH v2 1/8] swscale: document SWS_FULL_CHR_H_* flags Niklas Haas
2024-07-04 14:30 ` [FFmpeg-devel] [PATCH v2 2/8] avfilter/vf_setparams: allow setting chroma location Niklas Haas
2024-07-04 14:30 ` [FFmpeg-devel] [PATCH v2 3/8] swscale/options: relax src/dst_h/v_chr_pos value range Niklas Haas
2024-07-07 18:56 ` Michael Niedermayer [this message]
2024-07-04 14:31 ` [FFmpeg-devel] [PATCH v2 4/8] avfilter/swscale: always fix interlaced chroma location Niklas Haas
2024-07-04 14:31 ` [FFmpeg-devel] [PATCH v2 5/8] avfilter/vf_scale: add in/out_chroma_loc Niklas Haas
2024-07-04 14:31 ` [FFmpeg-devel] [PATCH v2 6/8] avfilter/vf_scale: fix 4:1:0 interlaced chroma pos Niklas Haas
2024-07-04 14:31 ` [FFmpeg-devel] [PATCH v2 7/8] avfilter/vf_zscale: remove unused fields Niklas Haas
2024-07-04 14:31 ` [FFmpeg-devel] [PATCH v2 8/8] fate/scalechroma: switch to standard chroma location Niklas Haas
2024-07-04 14:33 ` [FFmpeg-devel] [PATCH v2 1/8] swscale: document SWS_FULL_CHR_H_* flags Niklas Haas
2024-07-04 15:24 ` Andrew Sayers
2024-07-04 17:56 ` Niklas Haas
2024-07-04 17:59 ` Niklas Haas
2024-07-04 18:14 ` Andrew Sayers
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=20240707185615.GK4991@pb2 \
--to=michael@niedermayer.cc \
--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