Based on my best understanding of what they do, given the source code.
Unified · Split
| @@ -82,11 +82,35 @@ const char *swscale_license(void); · 81 unmodified lines | ||
| 82 | 82 | #define SWS_PRINT_INFO 0x1000 |
| 83 | 83 | |
| 84 | 84 | //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 | + */ | |
| 86 | 97 | #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 | + */ | |
| 88 | 110 | #define SWS_FULL_CHR_H_INP 0x4000 |
| 111 | + | |
| 89 | 112 | #define SWS_DIRECT_BGR 0x8000 |
| 113 | + | |
| 90 | 114 | #define SWS_ACCURATE_RND 0x40000 |
| 91 | 115 | #define SWS_BITEXACT 0x80000 |
| 92 | 116 | #define SWS_ERROR_DIFFUSION 0x800000 |