summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-07-22 23:05:14 +0200
committerwm4 <nfxjfg@googlemail.com>2017-08-08 13:37:37 +0200
commit463b81de2b252691d75417643597c42684bf830d (patch)
tree9fffe9f41caf458bae6492803686e2e2bed418ec /doc
parentcaa12027baf1180453846c58da08fc87accc0ff6 (diff)
downloadffmpeg-463b81de2b252691d75417643597c42684bf830d.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> Merged from Libav commit 45df7adc1d9b7.
Diffstat (limited to 'doc')
-rw-r--r--doc/APIchanges3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index cd69ec7bc6..c82de684ab 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil: 2015-08-28
API changes, most recent first:
+2017-08-08 - xxxxxxx - lavu 55.72.100 - imgutils.h
+ Add av_image_fill_black().
+
2017-08-08 - xxxxxxx - lavu 55.71.100 - frame.h
Add av_frame_apply_cropping().