ffmpeg/libswscale
Ronald S. Bultje be1bafc303 swscale: fix overflows in output of RGB48 pixels.
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>
2011-12-17 18:36:20 +00:00
..
bfin swscale: Remove unused variable from ff_bfin_get_unscaled_swscale(). 2011-06-21 20:53:52 +02:00
mlib
ppc swscale: update altivec yuv2planeX asm to new per-plane API. 2011-10-22 10:35:14 -07:00
sparc
x86 swscale_mmx: drop no longer required parameters from VSCALEX macros 2011-12-14 12:00:44 +01:00
colorspace-test.c sws: replace all long with int. 2011-05-28 10:03:37 -04:00
libswscale.v
Makefile build: move inclusion of subdir.mak to main subdir loop 2011-12-13 14:26:49 +00:00
options.c AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
rgb2rgb_template.c swscale: Remove disabled code. 2011-05-29 14:32:08 +02:00
rgb2rgb.c Remove extraneous semicolons 2011-12-11 17:23:24 +00:00
rgb2rgb.h sws: replace all long with int. 2011-05-28 10:03:37 -04:00
swscale_internal.h doxygen: misc consistency, spelling and wording fixes 2011-12-12 23:06:23 +01:00
swscale_unscaled.c swscale: add rgb565 endianess conversion 2011-12-17 19:35:16 +01:00
swscale-test.c swscale: Remove commented-out printf cruft. 2011-05-26 03:45:58 +02:00
swscale.c swscale: fix overflows in output of RGB48 pixels. 2011-12-17 18:36:20 +00:00
swscale.h doxygen: misc consistency, spelling and wording fixes 2011-12-12 23:06:23 +01:00
utils.c swscale: #include "libavutil/mathematics.h" 2011-12-01 19:12:26 +01:00
yuv2rgb.c swscale: fix signed shift overflows in ff_yuv2rgb_c_init_tables() 2011-10-21 20:56:59 +01:00