diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-07-22 23:05:14 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2017-07-26 23:21:26 +0200 |
commit | 45df7adc1d9b7e8fbae5af9328baa6ab3562002b (patch) | |
tree | 33f68a6fd0c5813e702bf0f9d684094c27dad322 /doc | |
parent | 47399ccdfd93d337c96c76fbf591f0e3637131ef (diff) | |
download | ffmpeg-streaming-45df7adc1d9b7e8fbae5af9328baa6ab3562002b.zip ffmpeg-streaming-45df7adc1d9b7e8fbae5af9328baa6ab3562002b.tar.gz |
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>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/APIchanges | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 30a8f80..463247f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2017-03-23 API changes, most recent first: +2017-xx-xx - xxxxxxx - lavu 56.4.0 - imgutils.h + Add av_image_fill_black(). + 2017-xx-xx - xxxxxxx - lavu 56.3.0 - frame.h Add av_frame_apply_cropping(). |