1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00
FFmpeg/libavutil
wm4 463b81de2b 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>

Merged from Libav commit 45df7adc1d9b7.
2017-08-08 13:37:37 +02:00
..
2015-12-15 14:16:28 +01:00
2016-10-02 19:35:55 +02:00
2016-10-02 19:35:55 +02:00
2016-02-18 11:55:00 +01:00
2016-05-04 18:16:21 +02:00
2015-11-01 19:35:01 -05:00
2016-06-03 14:49:56 +02:00
2016-01-13 20:00:19 -05:00
2016-08-02 07:50:44 -07:00
2016-11-23 02:01:05 +01:00
2017-08-07 13:06:51 +02:00
2017-03-20 08:02:30 +01:00
2017-08-07 13:06:51 +02:00
2016-01-28 19:49:48 -08:00
2016-08-02 21:52:40 -07:00
2016-10-21 23:58:47 +02:00