1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00
wm4 45df7adc1d imgutils: add function to clear an image to black
Black isn't always just memset(ptr, 0, size). Limited YUV in particular
requires relatively non-obvious values, and filling a frame with
repeating 0 bytes is disallowed in some contexts. With component sizes
larger than 8 or packed YUV, this can become relatively complicated. So
having a generic function for this seems helpful.

In order to handle the complex cases in a generic way without destroying
performance, this code attempts to compute a black pixel, and then uses
that value to clear the image data quickly by using a function like
memset.

Common cases like yuv410p10 or rgba can't be handled with a simple
memset, so there is some code to fill memory with 2/4/8 byte patterns.
For the remaining cases, a generic slow fallback is used.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2017-07-26 23:21:26 +02:00
..
2016-05-04 18:16:21 +02:00
2016-05-04 18:16:21 +02:00
2013-08-28 11:02:56 +02:00
2017-04-02 19:06:33 +01:00
2017-07-05 13:05:54 +02:00
2016-05-04 18:16:21 +02:00
2017-01-31 00:45:30 +02:00
2016-05-04 18:16:21 +02:00
2012-12-21 00:18:34 +01:00
2016-05-19 13:44:41 +02:00
2011-12-11 00:32:25 +01:00
2016-05-04 18:16:21 +02:00
2016-05-04 18:16:21 +02:00