summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* Handle AVID MJPEG streams directly in the MJPEG decoder.Anton Khirnov2021-02-25
| | | | | | | | | | | | | | | | | | | | AVID streams - currently handled by the AVRN decoder - can be (depending on extradata contents) either MJPEG or raw video. To decode the MJPEG variant, the AVRN decoder currently instantiates a MJPEG decoder internally and forwards decoded frames to the caller (possibly after cropping them). This is suboptimal, because the AVRN decoder does not forward all the features of the internal MJPEG decoder, such as direct rendering. Handling such forwarding in a full and generic manner would be quite hard, so it is simpler to just handle those streams in the MJPEG decoder directly. The AVRN decoder, which now handles only the raw streams, can now be marked as supporting direct rendering. This also removes the last remaining internal use of the obsolete decoding API.
* lavc/lscrdec: use ff_reget_buffer()Anton Khirnov2021-02-24
| | | | | | It is simpler and more efficient. Suggested-by: James Almer <jamrial@gmail.com>
* pngdec: fix and simplify apng reference handlingAnton Khirnov2021-02-24
| | | | | | | | | Current code is very confused and confusing. It uses two different reference frames - "previous" and "last" - when only one is really necessary. It also confuses the two, leading to incorrect output with APNG_DISPOSE_OP_PREVIOUS mode. Fixes #9017.
* lavc/lscrdec: drop unapplicable private capabilitiesAnton Khirnov2021-02-24
| | | | | | | FF_CODEC_CAP_ALLOCATE_PROGRESS makes no sense because the decoder does not support frame threading. FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM makes no sense because the decoder does not handle skip_frame.
* lavc: split LSCR decoder out of PNG decoderAnton Khirnov2021-02-24
| | | | | It shares very little code with pngdec, so keeping them together only makes the code harder to read.
* avcodec/cfhdenc: do not try to encode junkPaul B Mahol2021-02-24
|
* avcodec/cfhdenc: add padding to each decompositionPaul B Mahol2021-02-24
|
* avcodec/cfhdenc: refactor DSP code for CFHD encoderPaul B Mahol2021-02-24
| | | | This is needed to implement x86 SIMD.
* avcodec/exr: simplify piz decompressionPaul B Mahol2021-02-24
| | | | | Note that >32 codes are no longer supported, give proper error code if such scenario ever happens.
* avcodec/rv34data: Remove rv34_dquant_tabAndreas Rheinhardt2021-02-24
| | | | | | It is unused and coincides with ff_modified_quant_tab. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/constants: Remove unused ff_pw_17Andreas Rheinhardt2021-02-24
| | | | | | Unused since 80944df720da98d6e5ee0e355db5814735914ec9. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/celp_math: Disable unused functionAndreas Rheinhardt2021-02-24
| | | | | | | The code using ff_exp2 (namely ff_acelp_decode_gain_code) use it only if G729_BITEXACT is defined. So disable it if not. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/diracdsp_init: Reuse macroAndreas Rheinhardt2021-02-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/diracdsp_init: Simplify macroAndreas Rheinhardt2021-02-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/diracdsp_init: Make functions only used here staticAndreas Rheinhardt2021-02-24
| | | | | | | | | This allowed to remove forward declarations. Because compilers expect declarations for all functions they encounter even when it is within blocks disabled via "if (0 && foo)", one has to use a real #if in ff_diracdsp_init_x86. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/diracdsp_init: Remove unused MMX functionsAndreas Rheinhardt2021-02-24
| | | | | | | | Unused since a1f3b18bf55f106c974eacb1dc831be4d2bd5277, yet as nonstatic functions the compiler can't detect this, so that these functions aren't stripped and no warning is emitted. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/acelp_vectors: Remove unused ff_fc_2pulses_9bits_track1Andreas Rheinhardt2021-02-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/acelp_pitch_delay: Inline small functions only used onceAndreas Rheinhardt2021-02-24
| | | | | | | | | | | | | ff_acelp_decode_8bit_to_1st_delay3, ff_acelp_decode_4bit_to_2nd_delay3 and ff_acelp_decode_5_6_bit_to_2nd_delay3 are all only used once (by g729dec) whereas ff_acelp_decode_9bit_to_1st_delay6 and ff_acelp_decode_6bit_to_2nd_delay6 are completely unused; with the possible exception of ff_acelp_decode_4bit_to_2nd_delay3, these functions are so small that inlining them is appropriate; and as long as ff_acelp_decode_4bit_to_2nd_delay3 is only called once, this is also true for it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/rangecoder: Move ff_rac_check_termination to tests/rangecoder.cAndreas Rheinhardt2021-02-24
| | | | | | It is only used there. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mqcenc: Remove unused ff_mqc_lengthAndreas Rheinhardt2021-02-24
| | | | | | Unused since 4624656797b667eb6405186682eb04e74dfd90fd. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ac3tab: Remove unused ff_eac3_default_chmapAndreas Rheinhardt2021-02-24
| | | | | | | | Added in 0c79b1402a48a99f32435a0f5ad2364c58c6fcf3 to use it in a function that was never used and was itself removed in 676f1f533e2c2960d81784188592a066b9ff1c3d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/bitstream: Rewrite code to avoid triggering compiler warningAndreas Rheinhardt2021-02-24
| | | | | | | | | | | | | Clang infers from the existence of a default case that said case can be taken. In case of libavcodec/bitstream.c said default case consisted of an av_assert1 that evaluates to nothing in case of the ordinary assert level. In this case (that doesn't happen) a variable wouldn't be initialized, so Clang emitted Wsometimes-uninitialized warnings. Solve this by making sure that the default path also initializes the aforementioned variable. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/movtextenc: Check for too many stylesAndreas Rheinhardt2021-02-24
| | | | | | | | | The counter for the number of styles is written on two bytes, ergo anything > UINT16_MAX is invalid. This also fixes a compiler warning because of a tautologically true check on 64bit systems. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/exrenc: use correct type for actual_size as argument for zlibPaul B Mahol2021-02-23
|
* avcodec/tiff_data: Move data to its only userAndreas Rheinhardt2021-02-23
| | | | | | | | | tiff.c is the only user of the data from tiff_data.c (the dependency of the tiff encoder of it is spurious). Therefore this commit moves all the data from tiff_data.c to tiff_data.h (which is only included by tiff.c) and makes the objects declared therein static. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/isom: Split movaudio/movvideo tags off into a separate fileAndreas Rheinhardt2021-02-23
| | | | | | | | | The NUT and avi demuxers only need ff_codec_movvideo_tags and so this removes a dependency on the rest of isom.c as well as on mpeg4audio.c (which isom depends on); it is similar for the Matroska demuxer and muxers, except that the mpeg4audio.c dependency can't be avoided. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/Makefile: Remove outdated dependency of FLV demuxer on mpeg4audioAndreas Rheinhardt2021-02-23
| | | | | | | Unneeded since f96a653184e63cea91e08ea75ae60d309e431f40 and b2bb09bcc330156e9d79d7ddfa59f9c5d05ca149. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpeg4audio: Use proper logcontext for loggingAndreas Rheinhardt2021-02-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/scpr3: Avoid code duplication when updating modelsAndreas Rheinhardt2021-02-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/Makefile: Don't build mjpegenc_huffman unconditionallyAndreas Rheinhardt2021-02-23
| | | | | | | Only the mjpeg and amv encoders as well as its testprogram actually need it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mjpegenc_common: Move stuff only used by mjpegenc.c to itAndreas Rheinhardt2021-02-23
| | | | | | | | This allows to make ff_init_uni_ac_vlc static; ff_mjpeg_encode_picture_frame has also been made static, but it could always have been made static. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/jpegtables: Move ff_mjpeg_build_huffman_codes to mjpegenc_commonAndreas Rheinhardt2021-02-23
| | | | | | | Since g2meet.c doesn't use it any more, only encoders use it and the place for their common code is mjpegenc_common.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/g2meet, mjpegdec: Factor out common VLC initialization codeAndreas Rheinhardt2021-02-23
| | | | | | | | | While just at it, remove the nb_codes parameter: It is redundant (the number of codes is implicitly contained in the array containing how many entries of a specific size there are) and for this reason it might even be wrong, so it is better to check what is actually used instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/Makefile: Remove redundant mjpegdec dependency from tiff decoderAndreas Rheinhardt2021-02-23
| | | | | | | | The MJPEG decoder is already activated by configure whenever the tiff decoder is selected; ergo it is unnecessary to add a dependency in the Makefile. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* configure, libavcodec/Makefile: Fix avrn dependenciesAndreas Rheinhardt2021-02-23
| | | | | | | | | | | The avrn decoder actually only needs one thing: The MJPEG decoder. Instead the Makefile made it compile mjpegdec and configure required some of the prerequisites of the MJPEG decoder (exif and jpegtables). Even if all the prerequisites of the MJPEG decoder were required, it would still not make the MJPEG decoder usable, because for that the MJPEG decoder needs to be in the list of codecs in codec_list.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avrndec: Remove unnecessary headersAndreas Rheinhardt2021-02-23
| | | | | | | The avrn decoder does not use any internals of the MJPEG decoder since e0031ca29a471c4a540ba2e01b3f81af03ef757b. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/Makefile: Remove spurios dcaenc dependencyAndreas Rheinhardt2021-02-23
| | | | | | It does not need dca.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* configure, libavcodec/Makefile: Remove spurious CAF demuxer dependenciesAndreas Rheinhardt2021-02-23
| | | | | | Forgotten in 604fbb3132e88727e496c96c92cfe02748c25a1a. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: remove pointless lowres deprecation wrappersJames Almer2021-02-22
| | | | | | | | Neither the feature, public fields, or AVOptions were ever truly deprecated, nor will have been removed if this FF_API_ define was left in place, so get rid of it as it's misleading. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mjpegdec: Cleanup ff_smvjpeg_decoder()Michael Niedermayer2021-02-22
| | | | | | | | | | Fixes: memleaks Fixes: 28533/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-6242529653686272 Fixes: 30594/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-6549216035995648 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cri: Stop the bitreader at the end of uncompressed inputMichael Niedermayer2021-02-22
| | | | | | | | | Fixes: Timeout Fixes: 29983/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6420415838814208 Fixes: 30595/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6559089360502784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cuviddec: set ulMaxDisplayDelay to zero if low_delay flag is setMichal Novotny2021-02-22
| | | | | | | Zero is the recommended value in Nvidia coding samples for low latency use-cases. Signed-off-by: Michal Novotny <michal.novotny@comprimato.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: don't disable b-frames by defaultRicardo Monteiro2021-02-22
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* lavc/ac3enc: rename variable to avoid shadowingAnton Khirnov2021-02-22
| | | | Harmless, but confusing.
* avcodec: add Simbiosis IMX video decoderPaul B Mahol2021-02-20
|
* avcodec/cpia: Mark decoder as init-threadsafeAndreas Rheinhardt2021-02-20
| | | | | Reviewed-by: Stephan Hilb <stephan@ecshi.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dirac_vlc: Make ff_dirac_golomb_lut staticAndreas Rheinhardt2021-02-20
| | | | | | | Only used here. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ac3tab: Move ff_ac3_enc_channel_map to its only userAndreas Rheinhardt2021-02-20
| | | | | | | and make it static. Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/hapdec: Change compressed_offset to unsigned 32bitMichael Niedermayer2021-02-20
| | | | | | | | | | | 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>
* avcodec/libvpxenc: optimize parsing vpx_svc_ref_frame_configWonkap Jang2021-02-19
| | | | | | | | Getting rid of unnecessary use of AVDictionary object in parsing vpx_svc_ref_frame_config. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: James Zern <jzern@google.com>