1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

34 Commits

Author SHA1 Message Date
Andreas Rheinhardt
a247ac640d avcodec: Constify AVCodecs
Given that the AVCodec.next pointer has now been removed, most of the
AVCodecs are not modified at all any more and can therefore be made
const (as this patch does); the only exceptions are the very few codecs
for external libraries that have a init_static_data callback.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:15 -03:00
Michael Niedermayer
89fe1935b1 avcodec/hapdec: Change compressed_offset to unsigned 32bit
Fixes: out of array access
Fixes: 29345/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5401813482340352
Fixes: 30745/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HAP_fuzzer-5762798221131776

Suggested-by: Anton
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-20 14:16:00 +01:00
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>
2020-05-10 01:09:13 +02:00
Michael Niedermayer
576bf05aa9 avcodec/hapdec: Add codec_tags list
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-22 21:50:49 +01:00
Martin Vignali
f869e54d22 avcodec/hap : move parse_section_header to hap.c in order to be use by new bsf filter 2018-03-13 20:26:02 +01:00
Martin Vignali
21c06c4095 avcodec/hapdec : use gray8 for HapAlphaOnly decoding instead of RGB0 2017-11-25 19:49:30 +01:00
Martin Vignali
2053832d1c avcodec/hapdec : add support for hapqa decoding 2017-11-21 12:05:16 +01:00
Martin Vignali
fca8919961 avcodec/hapdec : indent after previous commit 2017-11-21 12:05:10 +01:00
Martin Vignali
518b9ee3d1 avcodec/hapdec : reorganize code before adding multi-texture decoding 2017-11-21 12:05:06 +01:00
Martin Vignali
cab71e4e4e libavcodec/hapdec : add support HapAlphaOnly
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-24 21:54:13 +02:00
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>
2016-11-04 11:19:47 -08:00
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.
2016-07-29 09:13:01 +01:00
Carl Eugen Hoyos
9c069bf71a lavc/hapdec: Use correct no-transparency colour space.
Reviewed-by: Tom Butterworth
2015-10-24 13:09:58 +02:00
Michael Niedermayer
205c31b301 avcodec/hapdec: Check section_size for non negativity in parse_section_header()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 00:37:53 +02:00
Michael Niedermayer
4be1b6bef0 Merge commit '3ee217853a6741b829a2683f49c590618891b1ab'
* commit '3ee217853a6741b829a2683f49c590618891b1ab':
  Support the Hap chunked frame format

Conflicts:
	libavcodec/hap.h
	libavcodec/hapdec.c
	libavcodec/version.h

See: c7e6443441
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 23:53:55 +02:00
Michael Niedermayer
f01e3c5d00 Merge commit '43dd004747fa697396b47d034a80e069facbea09'
* commit '43dd004747fa697396b47d034a80e069facbea09':
  hap: Move some per-stream setup into decoder init rather than per-frame

Conflicts:
	libavcodec/hapdec.c

See: 6074956fa1
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 23:37:19 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Tom Butterworth
3ee217853a Support the Hap chunked frame format
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 16:00:22 +01:00
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>
2015-07-27 15:53:03 +01:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
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>
2015-07-24 04:40:15 +02:00
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.
2015-07-23 13:35:16 +01:00
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>
2015-07-23 10:46:19 +02:00
Michael Niedermayer
b04b021005 Merge commit 'ae5a8dca675ee544178225256893e679b750cb63'
* commit 'ae5a8dca675ee544178225256893e679b750cb63':
  hap: Fix slice size computation

Conflicts:
	libavcodec/hapdec.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 12:35:10 +02:00
Tom Butterworth
c7e6443441 Support the Hap chunked frame format
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-22 16:15:53 +02:00
Michael Niedermayer
2de5737ee2 Merge commit '977105407cae55876041dddbf4ce0934cdd4cd6c'
* commit '977105407cae55876041dddbf4ce0934cdd4cd6c':
  hap: Decode using optimal slices sizes

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 20:21:54 +02:00
Tom Butterworth
5d0616ce0e avcodec/hapdec: log reason for failure when texture type doesn't match stream
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 14:54:25 +02:00
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>
2015-07-21 12:14:25 +02:00
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>
2015-07-21 03:25:01 +02:00
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>
2015-07-16 20:41:07 +02:00
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>
2015-07-16 16:04:06 +02:00
Carl Eugen Hoyos
8080688d0e lavc/hapenc: Silence a warning for multithreaded encoding. 2015-06-30 14:34:56 +02:00
Michael Niedermayer
55219a78c7 Merge commit '7ca3e5203f133eb41a0b5c3a1d753a7427ba72e7'
* commit '7ca3e5203f133eb41a0b5c3a1d753a7427ba72e7':
  Hap decoder and encoder

Conflicts:
	Changelog
	configure
	doc/general.texi
	libavcodec/allcodecs.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-22 22:47:32 +02:00
Vittorio Giovara
7ca3e5203f Hap decoder and encoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-06-22 15:23:08 +01:00