Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH v2 1/8] swscale: document SWS_FULL_CHR_H_* flags
@ 2024-07-04 14:30 Niklas Haas
  2024-07-04 14:30 ` [FFmpeg-devel] [PATCH v2 2/8] avfilter/vf_setparams: allow setting chroma location Niklas Haas
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Niklas Haas @ 2024-07-04 14:30 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Niklas Haas

From: Niklas Haas <git@haasn.dev>

Based on my best understanding of what they do, given the source code.
---
 libswscale/swscale.h | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/libswscale/swscale.h b/libswscale/swscale.h
index 9d4612aaf3..e22931cab4 100644
--- a/libswscale/swscale.h
+++ b/libswscale/swscale.h
@@ -82,11 +82,35 @@ const char *swscale_license(void);
 #define SWS_PRINT_INFO              0x1000
 
 //the following 3 flags are not completely implemented
-//internal chrominance subsampling info
+
+/**
+ * Perform full chroma upsampling when converting to RGB as part of scaling.
+ *
+ * For example, when converting 50x50 yuv420p to 100x100 rgba, setting this flag
+ * will scale the chroma plane from 25x25 to 100x100 (4:4:4), and then convert
+ * the 100x100 yuv444p image to rgba in the final output step.
+ *
+ * Without this flag, the chroma plane is instead scaled to 50x100 (4:2:2),
+ * with a single chroma sample being re-used for both horizontally adjacent RGBA
+ * output pixels.
+ */
 #define SWS_FULL_CHR_H_INT    0x2000
-//input subsampling info
+
+/**
+ * Perform full chroma interpolation when downscaling RGB sources.
+ *
+ * For example, when converting a 100x100 rgba source to 50x50 yuv444p, setting
+ * this flag will generate a 100x100 (4:4:4) chroma plane, which is then
+ * downscaled to the required 50x50.
+ *
+ * Without this flag, the chroma plane is instead generated at 50x100 (dropping
+ * every other pixel), before then being downscaled to the required 50x50
+ * resolution.
+ */
 #define SWS_FULL_CHR_H_INP    0x4000
+
 #define SWS_DIRECT_BGR        0x8000
+
 #define SWS_ACCURATE_RND      0x40000
 #define SWS_BITEXACT          0x80000
 #define SWS_ERROR_DIFFUSION  0x800000
-- 
2.45.2

_______________________________________________
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] 14+ messages in thread

end of thread, other threads:[~2024-07-07 18:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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