rcombs
9a890e49b6
lavc/proresdec: fix threaded hwaccel decode
2021-12-22 18:38:40 -06:00
rcombs
da0179b262
lavc/proresdec: add videotoolbox hwaccel
2021-11-28 16:40:58 -06:00
rcombs
805bf2ebc9
lavc/proresdec: add scaffolding for hwdec support
2021-11-28 16:40:58 -06:00
Andreas Rheinhardt
1ea3650823
Replace all occurences of av_mallocz_array() by av_calloc()
...
They do the same.
Reviewed-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-09-20 01:03:52 +02:00
Andreas Rheinhardt
659c2aa35c
avcodec/proresdec2: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
2021-05-02 02:35:37 +02:00
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
Andreas Rheinhardt
f83976344e
avcodec/proresdec2: Don't apply non-zero offset to null pointer
...
Affected ProRes without alpha; affected 32 FATE tests, e.g. prores-422,
prores-422_proxy, prores-422_lt or matroska-prores-header-insertion-bz2.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
2021-04-01 14:13:50 +02:00
Anton Khirnov
c8c2dfbc37
lavu: move LOCAL_ALIGNED from internal.h to mem_internal.h
...
That is a more appropriate place for it.
2021-01-01 14:11:01 +01:00
Paul B Mahol
7b1ed4b53a
avcodec/proresdec2: let long name match one from codec_desc.c
2020-09-02 19:03:55 +02:00
Harry Mallon
a606e3b339
libavcodec/proresdec2: Setup qmat_chroma according to RDD36
...
Signed-off-by: Harry Mallon <harry.mallon@codex.online >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-08-20 13:21:20 +02:00
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
468ae6a734
avcodec/proresdec2: decode picture header before frame allocation
...
Fixes: Timeout (21sec -> 0.3sec)
Fixes: 13716/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_fuzzer-5755593333145600
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2019-03-31 23:23:52 +02:00
Paul B Mahol
49d792fff6
avcodec/proresdec2: allow changing resolution
2018-12-10 17:25:49 +01:00
Paul B Mahol
3cc5576ee1
avcodec/proresdec2: add new line at end of debug message
2018-12-07 20:05:37 +01:00
Martin Vignali
ffafa53dbf
avcodec/proresdec : add 12b decoding
...
based on patch by Kieran Kunhya
ticket 7163
2018-12-02 12:55:57 +01:00
Martin Vignali
fddc92d454
avcodec/proresdec : add unpack alpha 12 func
2018-12-02 12:55:48 +01:00
Martin Vignali
859604fe9d
avcodec/proresdec : make inline func for unpack alpha
2018-12-02 12:55:44 +01:00
Martin Vignali
1cccf9365d
avcodec/proresdec : put unpack alpha func in prores ctx
2018-12-02 12:55:40 +01:00
Martin Vignali
c097a32e93
avcodec/proresdec : rename dsp part for 10b and check dspinit for supported bits per raw sample
...
based on patch by Kieran Kunhya
2018-12-02 12:55:31 +01:00
Martin Vignali
a970920026
avcodec/proresdec : move dsp init after codec tag check
2018-12-02 12:55:20 +01:00
Vittorio Giovara
aefbb2bf02
proresdec2: Parse codec_tag and export profile information
2018-11-05 12:39:23 -05:00
Vittorio Giovara
cdc487bfc8
prores: Use profile names in the various encoders and decoders
...
Export FF_PROFILE_PRORES_* symbols publicly, add a missing one.
2018-11-05 12:36:05 -05:00
Paul B Mahol
3aacb0d196
avcodec/proresdec2: add frame threading support
2018-08-26 18:07:57 +02:00
Paul B Mahol
81d78fe13b
avcodec/proresdec2: add missing frame color metadata
...
Stolen from removed decoder.
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2018-04-28 13:58:05 +02:00
Paul B Mahol
99d24499c2
avcodec/proresdec2: make long name more descriptive
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2018-04-28 12:45:04 +02:00
James Almer
f399172d6e
avcodec/proresdec: align dequantization matrix buffers
...
Should fix ticket #6838
Signed-off-by: James Almer <jamrial@gmail.com >
2017-11-15 21:28:36 -03:00
Carl Eugen Hoyos
ce508f0bcc
lavc/proresdec2: Do not mix variable declaration and statement.
...
Fixes ticket #6728 .
2017-10-12 12:43:09 +02:00
Martin Vignali
cbbec68847
libavcodec/blockdsp : add AVX version
...
Also modify the required alignment, to 32 instead of 16
for several codecs
Signed-off-by: James Almer <jamrial@gmail.com >
2017-10-03 19:47:37 -03:00
Michael Niedermayer
4ee77cefae
avcodec/proresdec2: Use LAST_SKIP_BITS where possible
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-10-03 20:34:35 +02:00
Michael Niedermayer
c37138e01a
avcodec/proresdec2: SKIP_BITS() does not work with len=32
...
Fixes: invalid shift
Fixes: 3482/clusterfuzz-testcase-minimized-5446915875405824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-10-03 20:34:35 +02:00
Michael Niedermayer
4f5eaf0b59
avcodec/proresdec2: Check bits in DECODE_CODEWORD(), fixes invalid shift
...
Fixes: runtime error: shift exponent 42 is too large for 32-bit type 'unsigned int'
Fixes: 3410/clusterfuzz-testcase-minimized-5313377960198144
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-09-24 21:54:13 +02:00
Muhammad Faiz
31f61b0d4f
avcodec: do not use AVFrame accessor
...
Reviewed-by: wm4 <nfxjfg@googlemail.com >
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com >
2017-04-23 14:27:47 +07:00
Michael Niedermayer
8aa4f3bb4f
avcodec/proresdec2: Do not discard frames with bad slices
...
The code previously completely discarded frames that had any error in a slice
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-03-06 16:47:17 +01:00
Håvard Espeland
9c43703620
avcodec/proresdec2: Add support for grayscale videos
...
Signed-off-by: Håvard Espeland <espeland@mixedrealities.no >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-05-27 17:25:40 +02:00
Carl Eugen Hoyos
bd1d67efe8
lavc/proresdec2: Fix slice_count for very high resolutions.
...
QT ignores the value written in the frame header.
Issue reported by forum user Koracas.
2015-10-30 01:32:39 +01:00
Ronald S. Bultje
229843aa35
Replace av_dlog with ff_dlog.
...
ff_dlog checks compilability, and is non-public. av_dlog is deprecated
and no longer exists if FF_API_DLOG=0.
2015-08-18 10:24:01 -04: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
Michael Niedermayer
94d68a41fa
Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
...
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
lavc: AV-prefix all codec flags
Conflicts:
doc/examples/muxing.c
ffmpeg.c
ffmpeg_opt.c
ffplay.c
libavcodec/aacdec.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/ac3enc_float.c
libavcodec/atrac1.c
libavcodec/atrac3.c
libavcodec/atrac3plusdec.c
libavcodec/dcadec.c
libavcodec/ffv1enc.c
libavcodec/h264.c
libavcodec/h264_loopfilter.c
libavcodec/h264_mb.c
libavcodec/imc.c
libavcodec/libmp3lame.c
libavcodec/libtheoraenc.c
libavcodec/libtwolame.c
libavcodec/libvpxenc.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/mpeg12dec.c
libavcodec/mpeg12enc.c
libavcodec/mpegaudiodec_template.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_motion.c
libavcodec/nellymoserdec.c
libavcodec/nellymoserenc.c
libavcodec/nvenc.c
libavcodec/on2avc.c
libavcodec/options_table.h
libavcodec/opus_celt.c
libavcodec/pngenc.c
libavcodec/ra288.c
libavcodec/ratecontrol.c
libavcodec/twinvq.c
libavcodec/vc1_block.c
libavcodec/vc1_loopfilter.c
libavcodec/vc1_mc.c
libavcodec/vc1dec.c
libavcodec/vorbisdec.c
libavcodec/vp3.c
libavcodec/wma.c
libavcodec/wmaprodec.c
libavcodec/x86/hpeldsp_init.c
libavcodec/x86/me_cmp_init.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc >
2015-07-27 22:10:35 +02:00
Michael Niedermayer
c4c6aea397
avcodec/proresdec2: Reset slice_count on deallocation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-15 15:23:32 +02:00
Michael Niedermayer
3a2d1465c8
Merge commit '2d60444331fca1910510038dd3817bea885c2367'
...
* commit '2d60444331fca1910510038dd3817bea885c2367':
dsputil: Split motion estimation compare bits off into their own context
Conflicts:
configure
libavcodec/Makefile
libavcodec/arm/Makefile
libavcodec/dvenc.c
libavcodec/error_resilience.c
libavcodec/h264.h
libavcodec/h264_slice.c
libavcodec/me_cmp.c
libavcodec/me_cmp.h
libavcodec/motion_est.c
libavcodec/motion_est_template.c
libavcodec/mpeg4videoenc.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/x86/Makefile
libavcodec/x86/me_cmp_init.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-07-17 23:27:40 +02:00
Michael Niedermayer
581b5f0b9b
Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'
...
* commit 'e3fcb14347466095839c2a3c47ebecff02da891e':
dsputil: Split off IDCT bits into their own context
Conflicts:
configure
libavcodec/aic.c
libavcodec/arm/Makefile
libavcodec/arm/dsputil_init_arm.c
libavcodec/arm/dsputil_init_armv6.c
libavcodec/asvdec.c
libavcodec/dnxhdenc.c
libavcodec/dsputil.c
libavcodec/dvdec.c
libavcodec/dxva2_mpeg2.c
libavcodec/intrax8.c
libavcodec/mdec.c
libavcodec/mjpegdec.c
libavcodec/mjpegenc_common.h
libavcodec/mpegvideo.c
libavcodec/ppc/dsputil_altivec.h
libavcodec/ppc/dsputil_ppc.c
libavcodec/ppc/idctdsp.c
libavcodec/x86/Makefile
libavcodec/x86/dsputil_init.c
libavcodec/x86/dsputil_mmx.c
libavcodec/x86/dsputil_x86.h
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-07-01 15:22:11 +02:00
Michael Niedermayer
2b05db4f81
Merge commit 'e74433a8e6fc00c8dbde293c97a3e45384c2c1d9'
...
* commit 'e74433a8e6fc00c8dbde293c97a3e45384c2c1d9':
dsputil: Split clear_block*/fill_block* off into a separate context
Conflicts:
configure
libavcodec/asvdec.c
libavcodec/dnxhddec.c
libavcodec/dnxhdenc.c
libavcodec/dsputil.h
libavcodec/eamad.c
libavcodec/intrax8.c
libavcodec/mjpegdec.c
libavcodec/ppc/dsputil_ppc.c
libavcodec/vc1dec.c
libavcodec/x86/dsputil_init.c
libavcodec/x86/dsputil_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-06-19 04:54:38 +02:00
Michael Niedermayer
aca48725af
avcodec/proresdec2: Use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-05-22 15:05:27 +02:00
Michael Niedermayer
ef6b85e9b8
avcodec/proresdec2: propagate error codes
...
Based-on: 44690dfa68
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-10-10 13:11:54 +02:00
Clément Bœsch
b46f19100b
cosmetics: group remaining .name and .long_name.
...
See b2bed9325 .
2013-10-04 13:33:20 +00:00
Reimar Döffinger
547c2f002a
Make decoding alpha optional for some codecs.
...
For codecs where decoding of a whole plane can simply
be skipped, we should offer applications to not decode
alpha for better performance (ca. 30% less CPU usage
and 40% reduced memory bandwidth).
It also means applications do not need to implement support
(even if it is rather simple) for YUVA formats in order to be
able to play these files.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de >
2013-09-22 16:20:54 +02:00
Paul B Mahol
3dcd3e08f6
avcodec/proresdec2: remove duplicated tables
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2013-09-13 19:28:10 +00:00
Paul B Mahol
43497d8a83
avcodec/proresdec2: return meaningful error codes
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2013-09-08 21:44:32 +00:00
Michael Niedermayer
30df9789a9
proresdec: Fix end condition
...
Fixes out of array writes
No FFmpeg release is affected by this
This also fixes some artifacts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-05-22 20:24:50 +02:00
Carl Eugen Hoyos
e32bbd4112
proresdec2: Only try to decode alpha plane if four output planes were allocated.
...
Fixes a crash with MPlayer.
2013-05-19 01:48:39 +02:00