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
..
aarch64
arm
avr32
bfin
mips
ppc ppc: Drop support for Apple GCC 2017-06-13 12:34:35 +02:00
sh4
tests
tomi
x86
.gitignore
Makefile
adler32.c
adler32.h
aes.c
aes.h
attributes.h
audio_fifo.c
audio_fifo.h
avassert.h
avstring.c
avstring.h
avutil.h
base64.c
base64.h
blowfish.c
blowfish.h
bswap.h
buffer.c
buffer.h
buffer_internal.h
channel_layout.c
channel_layout.h
colorspace.h
common.h
cpu.c
cpu.h
cpu_internal.h
crc.c
crc.h
des.c
des.h
dict.c
dict.h
display.c
display.h
downmix_info.c
downmix_info.h
error.c
error.h
eval.c
eval.h
fifo.c
fifo.h
file.c
file.h
file_open.c
float_dsp.c
float_dsp.h
frame.c lavc, lavu: move frame cropping to a convenience function 2017-07-26 23:20:40 +02:00
frame.h lavc, lavu: move frame cropping to a convenience function 2017-07-26 23:20:40 +02:00
hmac.c
hmac.h
hwcontext.c hwcontext: Mark local table static const 2017-06-15 00:02:06 +01:00
hwcontext.h
hwcontext_cuda.c
hwcontext_cuda.h
hwcontext_d3d11va.c d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY 2017-07-05 13:55:11 +03:00
hwcontext_d3d11va.h hwcontext_d3d11va: add option to enable debug mode 2017-06-27 00:23:12 +02:00
hwcontext_dxva2.c
hwcontext_dxva2.h
hwcontext_internal.h
hwcontext_qsv.c
hwcontext_qsv.h
hwcontext_vaapi.c
hwcontext_vaapi.h
hwcontext_vdpau.c
hwcontext_vdpau.h
imgutils.c imgutils: add function to clear an image to black 2017-07-26 23:21:26 +02:00
imgutils.h imgutils: add function to clear an image to black 2017-07-26 23:21:26 +02:00
imgutils_internal.h
internal.h
intfloat.h
intmath.c
intmath.h
intreadwrite.h
lfg.c
lfg.h
libavutil.v
libm.h
lls.c
lls.h
log.c
log.h
log2_tab.c
lzo.c
lzo.h
macros.h
mathematics.c
mathematics.h
md5.c
md5.h
mem.c
mem.h
opt.c
opt.h
parseutils.c
parseutils.h
pixdesc.c
pixdesc.h
pixfmt.h
random_seed.c
random_seed.h
rational.c
rational.h
rc4.c
rc4.h
replaygain.h
samplefmt.c
samplefmt.h
sha.c
sha.h
spherical.c
spherical.h
stereo3d.c
stereo3d.h
thread.h
time.c
time.h
time_internal.h
timer.h
tree.c
tree.h
utils.c
version.h imgutils: add function to clear an image to black 2017-07-26 23:21:26 +02:00
wchar_filename.h
xtea.c
xtea.h