History

swscale: document SWS_FULL_CHR_H_* flags

Based on my best understanding of what they do, given the source code.

Niklas Haas committed 2 years ago

Commit 3e064f51 parent be7ab631 file · +26 −2Browse files

Unified · Split

libswscale/swscale.h+26−2
@@ -82,11 +82,35 @@ const char *swscale_license(void); · 81 unmodified lines
8282 #define SWS_PRINT_INFO 0x1000
8383
8484 //the following 3 flags are not completely implemented
85−//internal chrominance subsampling info
85+
86+/**
87+ * Perform full chroma upsampling when upscaling to RGB.
88+ *
89+ * For example, when converting 50x50 yuv420p to 100x100 rgba, setting this flag
90+ * will scale the chroma plane from 25x25 to 100x100 (4:4:4), and then convert
91+ * the 100x100 yuv444p image to rgba in the final output step.
92+ *
93+ * Without this flag, the chroma plane is instead scaled to 50x100 (4:2:2),
94+ * with a single chroma sample being re-used for both of the horizontally
95+ * adjacent RGBA output pixels.
96+ */
8697 #define SWS_FULL_CHR_H_INT 0x2000
87−//input subsampling info
98+
99+/**
100+ * Perform full chroma interpolation when downscaling RGB sources.
101+ *
102+ * For example, when converting a 100x100 rgba source to 50x50 yuv444p, setting
103+ * this flag will generate a 100x100 (4:4:4) chroma plane, which is then
104+ * downscaled to the required 50x50.
105+ *
106+ * Without this flag, the chroma plane is instead generated at 50x100 (dropping
107+ * every other pixel), before then being downscaled to the required 50x50
108+ * resolution.
109+ */
88110 #define SWS_FULL_CHR_H_INP 0x4000
111+
89112 #define SWS_DIRECT_BGR 0x8000
113+
90114 #define SWS_ACCURATE_RND 0x40000
91115 #define SWS_BITEXACT 0x80000
92116 #define SWS_ERROR_DIFFUSION 0x800000

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t