mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-15 19:55:08 +00:00
be1bafc303
For certain types of filters where the intermediate sum of coefficients can go above the fixed-point equivalent of 1.0 in the middle of a filter, the sum of a 31-bit calculation can overflow in both directions and can thus not be represented in a 32-bit signed or unsigned integer. To work around this, we subtract 0x40000000 from a signed integer base, so that we're halfway signed/unsigned, which makes it fit even if it overflows. After the filter finishes, we add the scaled bias back after a shift. We use the same trick for 16-bit bpc YUV output routines. Signed-off-by: Mans Rullgard <mans@mansr.com> |
||
---|---|---|
.. | ||
bfin | ||
mlib | ||
ppc | ||
sparc | ||
x86 | ||
colorspace-test.c | ||
libswscale.v | ||
Makefile | ||
options.c | ||
rgb2rgb_template.c | ||
rgb2rgb.c | ||
rgb2rgb.h | ||
swscale_internal.h | ||
swscale_unscaled.c | ||
swscale-test.c | ||
swscale.c | ||
swscale.h | ||
utils.c | ||
yuv2rgb.c |