Michael Niedermayer
81fe316ad9
avcodec/hapdec: Check tex_size more strictly and before using it
...
Fixes: OOM
Fixes: 20774/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5678608951803904
Fixes: 20956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5713643025203200
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
576bf05aa9
avcodec/hapdec: Add codec_tags list
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Martin Vignali
f869e54d22
avcodec/hap : move parse_section_header to hap.c in order to be use by new bsf filter
7 years ago
Martin Vignali
21c06c4095
avcodec/hapdec : use gray8 for HapAlphaOnly decoding instead of RGB0
7 years ago
Martin Vignali
2053832d1c
avcodec/hapdec : add support for hapqa decoding
7 years ago
Martin Vignali
fca8919961
avcodec/hapdec : indent after previous commit
7 years ago
Martin Vignali
518b9ee3d1
avcodec/hapdec : reorganize code before adding multi-texture decoding
7 years ago
Mark Thompson
2068d116db
hapdec: Delete include for nonexistent file
...
It exists as an alias for string.h in most C libraries, so usually this
line is harmless.
7 years ago
Martin Vignali
cab71e4e4e
libavcodec/hapdec : add support HapAlphaOnly
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Tom Butterworth
92280f86b4
avcodec/hap: consistent name for codec
...
"Vidvox Hap", not "Vidvox Hap encoder" or "Vidvox Hap decoder". Fixes
bad name in "ffmpeg -codecs", matches other codec naming.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Josh de Kock
238733f741
hapdec: remove unused memory.h include
...
Most systems have this, so it isn't really a problem to include it
even if it's not used, but some do not have memory.h as it is
non-standard. Since it's unused just remove it anyway.
8 years ago
Carl Eugen Hoyos
9c069bf71a
lavc/hapdec: Use correct no-transparency colour space.
...
Reviewed-by: Tom Butterworth
9 years ago
Michael Niedermayer
205c31b301
avcodec/hapdec: Check section_size for non negativity in parse_section_header()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Tom Butterworth
3ee217853a
Support the Hap chunked frame format
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Tom Butterworth
43dd004747
hap: Move some per-stream setup into decoder init rather than per-frame
...
This change will reject frames with a texture type which does not match
the stream description.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
5da90d7ec3
avcodec/hapdec: Check that there is sufficient input data
...
Fixes Ticket4729
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Tom Butterworth
083cbc930d
snappy: Refactor so ff_snappy_uncompress() uses an existing buffer
...
Some uses of Snappy require uncompressing to positions within
an existing buffer. Also adds a function to get the uncompressed
length of Snappy data.
9 years ago
Tom Butterworth
ae5a8dca67
hap: Fix slice size computation
...
A bug was introduced in 977105407c
whereby when
frame height wasn't divisible by the number of threads, pixels would be omitted
from the bottom rows during decode.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Tom Butterworth
c7e6443441
Support the Hap chunked frame format
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Tom Butterworth
5d0616ce0e
avcodec/hapdec: log reason for failure when texture type doesn't match stream
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Luca Barbato
977105407c
hap: Decode using optimal slices sizes
...
Enjoy some cache locality and use less threads.
About 5x speedup (from 60ms to 12ms to decode a 4k frame).
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Tom Butterworth
6b96c70f2d
avcodec/hapdec: don't log texture format every frame, do it once per decode session
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Tom Butterworth
17ee24af7e
avcodec/snappy: refactor so ff_snappy_uncompress uses an existing buffer
...
Some uses of Snappy require uncompressing to positions within an existing buffer. Also adds a function to get the uncompressed length of Snappy data.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Tom Butterworth
6074956fa1
avcodec/hap: move some per-stream setup into decoder init rather than per-frame
...
This change will reject frames with a texture type which doesn't match the stream description.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Carl Eugen Hoyos
8080688d0e
lavc/hapenc: Silence a warning for multithreaded encoding.
10 years ago
Vittorio Giovara
7ca3e5203f
Hap decoder and encoder
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago