1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-14 22:22:59 +02:00
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
2011-12-13 17:02:55 +01:00
2011-12-17 15:49:25 +00:00
2011-12-13 23:34:24 +01:00
2011-12-11 00:32:25 +01:00
2011-03-16 21:54:39 +01:00
2011-12-11 00:32:25 +01:00
2011-04-07 02:54:12 +02:00

Libav README
------------

1) Documentation
----------------

* Read the documentation in the doc/ directory.

2) Licensing
------------

* See the LICENSE file.
Languages
C 90.3%
Assembly 7.8%
Makefile 1.3%
C++ 0.2%
Objective-C 0.2%
Other 0.1%