1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00
FFmpeg/libavutil
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
2017-06-13 12:34:35 +02:00
2017-03-14 17:23:32 +01:00
2016-05-04 18:16:21 +02:00
2015-07-31 09:04:09 +02:00
2016-10-02 18:58:04 +02:00
2016-10-02 18:58:04 +02:00
2016-05-10 11:30:25 +02:00
2017-03-01 11:23:19 -05:00
2015-08-31 17:06:32 +02:00
2016-05-04 18:16:21 +02:00
2017-01-26 10:25:20 +01:00
2015-07-29 22:09:16 +03:00
2017-03-01 11:23:19 -05:00
2017-03-23 10:09:17 +01:00
2017-06-02 21:00:35 -04:00
2017-04-26 09:05:28 +02:00
2017-04-26 09:05:28 +02:00
2017-03-23 10:09:17 +01:00
2016-05-04 18:16:21 +02:00
2015-07-31 09:04:12 +02:00
2015-07-31 09:04:12 +02:00
2014-10-24 09:53:41 +03:00
2014-10-24 09:53:41 +03:00
2015-12-14 16:42:35 +01:00