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 aarch64: Add parentheses around the offset parameter in movrel 2017-02-16 09:56:11 +02:00
arm arm: Check for the .arch directive in configure 2017-05-08 14:21:08 +03:00
avr32 cosmetics: Fix spelling mistakes 2016-05-04 18:16:21 +02:00
bfin
mips
ppc ppc: Drop support for Apple GCC 2017-06-13 12:34:35 +02:00
sh4
tests Convert all AVClass struct declarations to designated initializers. 2017-06-12 11:01:10 +02:00
tomi
x86 x86util: Port all macros to cpuflags 2017-03-14 17:23:32 +01:00
.gitignore Split global .gitignore file into per-directory files 2016-05-13 14:55:56 +02:00
adler32.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
adler32.h
aes.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
aes.h
attributes.h libavutil: Hook up the rest of the gcc specific attributes to clang as well 2017-03-22 14:25:45 +02:00
audio_fifo.c audio_fifo: Drop write-only variable 2016-10-27 12:21:46 +02:00
audio_fifo.h
avassert.h cosmetics: Fix spelling mistakes 2016-05-04 18:16:21 +02:00
avstring.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
avstring.h avutil/avstring: Inline some tiny functions 2015-10-03 13:45:37 +02:00
avutil.h lavu: Add a video section to Doxygen documentation 2016-12-07 14:26:21 -05:00
base64.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
base64.h
blowfish.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
blowfish.h
bswap.h
buffer_internal.h buffer: convert to stdatomic 2016-10-02 18:58:04 +02:00
buffer.c buffer: convert to stdatomic 2016-10-02 18:58:04 +02:00
buffer.h buffer: fix av_buffer_pool_init2() documentation 2016-08-11 10:29:23 +02:00
channel_layout.c
channel_layout.h
colorspace.h colorspace: Add support for BT709 2016-05-10 11:30:25 +02:00
common.h libavutil: add av_mod_uintp2 2017-03-01 11:23:19 -05:00
cpu_internal.h
cpu.c cpu: add a function for querying maximum required data alignment 2017-02-11 11:37:45 +01:00
cpu.h cpu: add a function for querying maximum required data alignment 2017-02-11 11:37:45 +01:00
crc.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
crc.h
des.c tests: Move all test programs to a subdirectory 2016-05-13 14:55:56 +02:00
des.h
dict.c dict: Change return type of av_dict_copy() 2015-10-12 13:35:01 +02:00
dict.h cosmetics: Fix spelling mistakes 2016-05-04 18:16:21 +02:00
display.c
display.h lavu: Add a video section to Doxygen documentation 2016-12-07 14:26:21 -05:00
downmix_info.c
downmix_info.h
error.c
error.h
eval.c Convert all AVClass struct declarations to designated initializers. 2017-06-12 11:01:10 +02:00
eval.h
fifo.c fifo: Return the correct AVERROR value 2017-01-26 10:25:20 +01:00
fifo.h
file_open.c
file.c Convert all AVClass struct declarations to designated initializers. 2017-06-12 11:01:10 +02:00
file.h
float_dsp.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
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: Explicitly convert types at function pointer assignment 2017-01-09 15:18:16 +01:00
hmac.h
hwcontext_cuda.c hwcontext_cuda: implement frames_get_constraints 2017-02-01 10:43:00 +01:00
hwcontext_cuda.h hwcontext: add a CUDA implementation 2016-02-14 22:08:33 +01:00
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 avutil/hwcontext_dxva2: Don't improperly free IDirect3DSurface9 objects 2017-05-20 09:41:45 +02:00
hwcontext_dxva2.h dxva: add support for new dxva2 and d3d11 hwaccel APIs 2017-06-08 21:20:18 +02:00
hwcontext_internal.h lavu: add new D3D11 pixfmt and hwcontext 2017-06-08 20:55:36 +02:00
hwcontext_qsv.c hwcontext_qsv: Implement mapping frames to the child device type 2017-04-30 17:33:18 +01:00
hwcontext_qsv.h hwcontext: add a QSV implementation 2016-06-21 19:53:37 +02:00
hwcontext_vaapi.c vaapi: Add ABGR map only if VA_FOURCC_ABGR is defined 2017-05-29 13:50:03 +02:00
hwcontext_vaapi.h hwcontext_vaapi: Try to support the VDPAU wrapper 2017-02-13 21:44:47 +00:00
hwcontext_vdpau.c hwcontext_vdpau: Fix missing subscripts 2016-09-14 20:48:36 +01:00
hwcontext_vdpau.h hwcontext: add a VDPAU implementation 2016-02-14 22:06:04 +01:00
hwcontext.c hwcontext: Mark local table static const 2017-06-15 00:02:06 +01:00
hwcontext.h lavu: add new D3D11 pixfmt and hwcontext 2017-06-08 20:55:36 +02:00
imgutils_internal.h imgutils: add a function for copying image data from GPU mapped memory 2016-08-31 08:15:47 +02:00
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
internal.h libavutil: Make LOCAL_ALIGNED(xx be equal to LOCAL_ALIGNED_xx( 2017-03-31 22:06:52 +03:00
intfloat.h
intmath.c
intmath.h intmath: add faster clz support 2017-03-01 11:23:19 -05:00
intreadwrite.h Revert "libavutil: Use an intermediate variable in AV_COPY*U" 2016-08-02 21:18:18 +03:00
lfg.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
lfg.h
libavutil.v build: Change structure of the linker version script templates 2016-05-29 16:43:11 +02:00
libm.h
lls.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
lls.h libavutil: move FFALIGN macro from common.h to macros.h 2015-12-14 16:16:55 +01:00
log2_tab.c
log.c
log.h lavu: Drop deprecated av_dlog macro 2017-03-23 10:09:17 +01:00
lzo.c
lzo.h
macros.h libavutil: move FFALIGN macro from common.h to macros.h 2015-12-14 16:16:55 +01:00
Makefile lavu: add new D3D11 pixfmt and hwcontext 2017-06-08 20:55:36 +02:00
mathematics.c mathematics: Kill non-compiling disabled cruft 2016-08-17 12:16:42 +02:00
mathematics.h
md5.c avutil/md5: fix misaligned reads 2017-06-02 21:00:35 -04:00
md5.h crypto: consistently use size_t as type for length parameters 2017-01-09 15:17:43 +01:00
mem.c mem: uninline av_malloc(z)_array() 2017-04-26 09:05:28 +02:00
mem.h mem: uninline av_malloc(z)_array() 2017-04-26 09:05:28 +02:00
opt.c Drop unreachable break and return statements 2016-11-03 20:17:12 +01:00
opt.h lavu: Drop deprecated option type 2017-03-23 10:09:17 +01:00
parseutils.c Mark some arrays that never change as const. 2017-02-01 10:42:59 +01:00
parseutils.h
pixdesc.c lavu: add new D3D11 pixfmt and hwcontext 2017-06-08 20:55:36 +02:00
pixdesc.h pixdesc: Use AV_CEIL_RSHIFT in documentation 2016-01-25 12:02:20 -05:00
pixfmt.h lavu: add new D3D11 pixfmt and hwcontext 2017-06-08 20:55:36 +02:00
random_seed.c cosmetics: Fix spelling mistakes 2016-05-04 18:16:21 +02:00
random_seed.h
rational.c
rational.h
rc4.c
rc4.h
replaygain.h cosmetics: Drop empty comment lines 2016-02-18 15:35:30 +01:00
samplefmt.c
samplefmt.h cosmetics: Drop empty comment lines 2016-02-18 15:35:30 +01:00
sha.c crypto: consistently use size_t as type for length parameters 2017-01-09 15:17:43 +01:00
sha.h crypto: consistently use size_t as type for length parameters 2017-01-09 15:17:43 +01:00
spherical.c spherical: add functions to retrieve and request projection names 2017-04-27 09:59:54 -04:00
spherical.h spherical: add functions to retrieve and request projection names 2017-04-27 09:59:54 -04:00
stereo3d.c Mark some arrays that never change as const. 2017-02-01 10:42:59 +01:00
stereo3d.h lavu: Add a video section to Doxygen documentation 2016-12-07 14:26:21 -05:00
thread.h thread: Define ff_mutex_* macros as stub functions when threads are disabled 2017-04-12 10:07:09 +02:00
time_internal.h
time.c
time.h
timer.h arm64: add cycle counter support 2015-12-14 16:42:35 +01:00
tree.c build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
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 build: Split test programs off into separate files 2016-04-07 16:14:42 +02:00
xtea.h xtea: Add functions for little endian mode 2015-11-13 21:53:54 +02:00