Anton Khirnov
1f4cf92cfb
pthread_frame: merge the functionality for normal decoder init and init_thread_copy
...
The current design, where
- proper init is called for the first per-thread context
- first thread's private data is copied into private data for all the
other threads
- a "fixup" function is called for all the other threads to e.g.
allocate dynamically allocated data
is very fragile and hard to follow, so it is abandoned. Instead, the
same init function is used to init each per-thread context. Where
necessary, AVCodecInternal.is_copy can be used to differentiate between
the first thread and the other ones (e.g. for decoding the extradata
just once).
2020-04-10 15:24:54 +02:00
Michael Niedermayer
07519f363b
avcodec/hqx: Check the input data against the image size
...
Fixes: Timeout (22 -> 100 ms)
Fixes: 15173/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQX_fuzzer-5662556846292992
Fixes: 17896/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQX_fuzzer-5679312077848576
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-09 15:20:30 +01:00
Paul B Mahol
20f7872d99
avcodec/hqx: add support for frame threads
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-04-09 10:50:11 +02:00
Clément Bœsch
549045254c
Fix all -Wformat warnings raised by DJGPP
2017-03-29 14:49:29 +02:00
Andreas Cadhalpun
1ed7fcd42a
hqx: correct type and size check of info_offset
...
It is used as size argument of ff_canopus_parse_info_tag, which uses it
as size argument to bytestream2_init, which only supports sizes up to
INT_MAX.
Changing it's type to unsigned simplifies the check.
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-11-20 00:50:06 +01: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
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
8d5088a168
Merge commit 'bb428e00ac158244d6691bf135be404e85b66a8b'
...
* commit 'bb428e00ac158244d6691bf135be404e85b66a8b':
hqx: Mark codec as init-thread-safe and init-cleanup
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-24 22:00:35 +02:00
Vittorio Giovara
bb428e00ac
hqx: Mark codec as init-thread-safe and init-cleanup
2015-04-24 14:55:11 +01:00
Michael Niedermayer
fcca7671e2
Merge commit 'e6fb844f7b736e72da364032d251283bce9e63ad'
...
* commit 'e6fb844f7b736e72da364032d251283bce9e63ad':
Implement shared parsing of INFO tag in Canopus family
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 05:19:46 +02:00
Michael Niedermayer
1fa7d0902c
Merge commit '5b5338f6d1272526d2634501555cbaff4cdfb87b'
...
* commit '5b5338f6d1272526d2634501555cbaff4cdfb87b':
hqx: Implement slice-threaded decoding
Conflicts:
libavcodec/hqx.c
libavcodec/hqx.h
See: eff72a6c73
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 05:11:48 +02:00
Michael Niedermayer
55b866f618
Merge commit '453642f8afe9f979fcc813a246b1ec656ec36a93'
...
* commit '453642f8afe9f979fcc813a246b1ec656ec36a93':
hqx: Store shareable data in main decoder context
Conflicts:
libavcodec/hqx.c
libavcodec/hqx.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:57:06 +02:00
Michael Niedermayer
d8b4e9adbb
Merge commit 'ea031b75fb50c59196ccb654c9d143fb75365da9'
...
* commit 'ea031b75fb50c59196ccb654c9d143fb75365da9':
hqx: Move DSP related code to a separate file
Conflicts:
libavcodec/hqx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:33:06 +02:00
Michael Niedermayer
73e6af9d7b
Merge commit '17aa81d94781c6f62dc7d1dbd1f8891c020c9905'
...
* commit '17aa81d94781c6f62dc7d1dbd1f8891c020c9905':
hqx: Merge invalid format check within switch block
Conflicts:
libavcodec/hqx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:29:58 +02:00
Vittorio Giovara
e6fb844f7b
Implement shared parsing of INFO tag in Canopus family
...
Add some bounds checking to CLLC; reduce HQX variable scoping,
add an error message.
2015-04-19 22:37:02 +01:00
Vittorio Giovara
5b5338f6d1
hqx: Implement slice-threaded decoding
...
Inspired by a patch from Ferdinand Oeinck <ferdo@demon.nl>.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-19 22:36:48 +01:00
Vittorio Giovara
453642f8af
hqx: Store shareable data in main decoder context
...
In preparation for multithreaded decoding.
2015-04-19 22:36:41 +01:00
Vittorio Giovara
ea031b75fb
hqx: Move DSP related code to a separate file
2015-04-19 12:41:59 +01:00
Vittorio Giovara
17aa81d947
hqx: Merge invalid format check within switch block
2015-04-19 12:41:59 +01:00
Michael Niedermayer
599dc8fee1
avcodec/hqx: Use av_clip_uintp2()
...
Suggested-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-10 12:38:03 +02:00
Ferdinand Oeinck
eff72a6c73
libavcodec/hqx: multi threading support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-10 03:11:40 +02:00
Ferdinand Oeinck
0266988ccd
hqx: Fix clipping error in idct put function
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-09 13:52:04 +02:00
ferdo@bigroses.nl
92f94fd5dd
libavcodec/hqx: correct clipping error
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-08 09:53:59 +02:00
Paul B Mahol
aa7a2fa58f
avcodec/hqx: use init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-02-27 09:30:13 +00:00
Paul B Mahol
5440076303
avcodec/hqx: fix typo
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-02-27 08:38:14 +00:00
Paul B Mahol
665916ffa2
avcodec/hqx: remove superfluous log message
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-02-23 15:04:15 +00:00
Michael Niedermayer
2cf521718d
Merge commit '35c6ce76b107225a19eb33aea38857d2405882af'
...
* commit '35c6ce76b107225a19eb33aea38857d2405882af':
Canopus HQX decoder
Conflicts:
Changelog
libavcodec/avcodec.h
libavcodec/version.h
tests/fate/video.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 12:19:26 +01:00
Vittorio Giovara
35c6ce76b1
Canopus HQX decoder
...
Based on work by Kostya Shishkov <kostya.shishkov@gmail.com>.
2015-02-22 22:42:27 +00:00