summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avformat/au: Deduplicate codec_tag listsAndreas Rheinhardt2021-02-23
| | | | | | Also saves a relocation. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/isom: Remove outcommented functionAndreas Rheinhardt2021-02-23
| | | | | | There is another ff_mov_read_chan in mov_chan.c. 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>
* avformat/Makefile: Remove outdated AIFF demuxer dependency on iso_mediaAndreas Rheinhardt2021-02-23
| | | | | | | | | | | | | | | | This is a result of the mov channel parsing stuff being factored out of mov.c twice: Once in 91b782720fd0df5571775b6591bc41797d6ecf78 to isom.c and later in 3bab7cd12802dc5abf2c5cc6dec49e9e249ce204. Also remove the isom.h header; and while just at it, remove an unused mathematics.h inclusion. (isom.c actually depends upon mpeg4audio from libavcodec for avpriv_mpeg4audio_get_config2 and avpriv_mpa_freq_tab; yet there is no configure dependency for iso_media which leads to failure of shared builds.) 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>
* configure: Remove mpegvideo_enc dependency from ljpeg encoderAndreas Rheinhardt2021-02-23
| | | | | | | | It only existed because some code in mjpegenc_common.c relied on it; yet said code was actually only used by mjpegenc.c and has been moved there. 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>
* lsws/ppc/yuv2rgb_altivec: Fix build in non-VSX environmentsChip Kerchner2021-02-22
| | | | | | | | | Add inline function for vec_xl if VSX is not supported. vec_xl intrinsic is only available on POWER 7 or higher. Fixes ticket #8750. Signed-off-by: Andriy Gelman <andriy.gelman@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>
* configure: use no-narrowing for cuda-llvm compilationMatt Oliver2021-02-22
| | | | | | | This fixes llvm compiler generating errors about narrowing conversion with recent releases. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* compat/cuda: correct ushort4 to use ushortMatt Oliver2021-02-22
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* 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>
* ffprobe: stop setting AVCodecContext.framerateAnton Khirnov2021-02-22
| | | | | That field is supposed to be exported by decoders, it makes no sense for a user to set it.
* ffprobe: stop printing deprecated fieldsAnton Khirnov2021-02-22
| | | | | | | | | | | The FF_API macros are private and must not be used by external callers. As the fields in question are to be removed without replacement, just drop them. The fields are: AVPacket.convergence_duration AVCodecContext.time_base AVCodecContext.timecode_frame_start AV_PIX_FMT_FLAG_PSEUDOPAL pixel descriptor flag
* ffprobe: drop code accessing deprecated AVStream.codecAnton Khirnov2021-02-22
|
* ffprobe: do not use deprecated AVStream.codec for max bitrateAnton Khirnov2021-02-22
| | | | Use the decoder context instead.
* ffprobe: remove an unnecessary deprecation guardAnton Khirnov2021-02-22
| | | | | | The code it is guarding is not accessing anything deprecated (disregarding the fact that a library caller must not use FF_API deprecation guards).
* avformat/mov: fix timecode with counter mode flag setMark Reid2021-02-22
| | | | | | | | | | | | | | | | | | | | | The current behaviour ends up squaring the avg_frame_rate if the conter mode flag is set. This messes up the timecode calculation, and looks to me as a regression that seems to have been introduced 428b4aac. Upon further testing is seems that no special case is need for having the counter flag set. av_timecode_init appears to handles the timecode correctly, at least in the sample files I have. Here is a sample mov file with the counter flag set https://www.dropbox.com/s/5l4fucb9lhq523s/timecode_counter_mode.mov before the patch ffmpeg will report the timecode as: 00:37:11:97 and warns that the timecode framerate is 576000000/1002001 after patch: 14:50:55:02 Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc/ac3enc: rename variable to avoid shadowingAnton Khirnov2021-02-22
| | | | Harmless, but confusing.
* avutil/tx: Fix declaration after statementAndreas Rheinhardt2021-02-22
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fate/matroska: Add fate-matroska targetAndreas Rheinhardt2021-02-22
| | | | | Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fate/matroska: Add test for remuxing VP8 with alphaAndreas Rheinhardt2021-02-22
| | | | | | | | | | This provides coverage for writing BlockGroups with BlockAdditional and ReferenceBlock elements. It also tests setting the hearing impaired disposition (it fits given that this video has no audio so one needs to be able to read lips to understand anything). Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Add support for FlagTextDescriptionsAndreas Rheinhardt2021-02-22
| | | | | | | | This is the Matroska equivalent of D_WEBVTT_DESCRIPTIONS and is therefore only enabled for subtitles. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Add support for FlagTextDescriptionsAndreas Rheinhardt2021-02-22
| | | | | | | | This is the equivalent of the WebM "D_WEBVTT/DESCRIPTIONS" and is therefore only exported for subtitles. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Add support for FlagHearing/VisualImpairedAndreas Rheinhardt2021-02-22
| | | | | Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Add support for FlagHearing/VisualImpairedAndreas Rheinhardt2021-02-22
| | | | | | | | | | Given that our disposition flags provide no way to distinguish the cases of "track is unsuitable for hearing impaired users" and "it is unknown whether the track is suitable for hearing impaired users" we do not need to use a CountedElement for these flags. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Add support for FlagCommentaryAndreas Rheinhardt2021-02-22
| | | | | Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Add support for FlagCommentaryAndreas Rheinhardt2021-02-22
| | | | | | | | | | Hint: Matroska actually provides a way to distinguish the cases of "track is no commentary track" and "it is unknown whether the track is a commentary track", but our disposition flags do not. Therefore we need not use a CountedElement. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Beautify setting default valuesAndreas Rheinhardt2021-02-22
| | | | | Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Reindent after the previous commitAndreas Rheinhardt2021-02-22
| | | | | Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Make reading zero-length elements spec-compliantAndreas Rheinhardt2021-02-22
| | | | | | | | | | | | For a very long time, the payload of integer and float elements had to have a length > 0. Our parser treated such invalid elements as having a value zero. But now it has been defined what an EBML element with length zero means: It is a shorthand for the default value. This has also been defined for strings (both ASCII and UTF-8). This commit modifies our parser to support this. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Don't use fake default value for ReferenceBlockAndreas Rheinhardt2021-02-22
| | | | | | | | | This has been done in order to find out whether this element is present at all; but this can now be done in a cleaner way by using a CountedElement for it. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Don't write empty languageAndreas Rheinhardt2021-02-22
| | | | | | | | According to the new EBML specifications, a string element of length zero would be read as the default value by a compliant parser. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Check min_luminance more thoroughlyAndreas Rheinhardt2021-02-22
| | | | | | | | | | | | | | | | | | | | In the absence of an explicitly coded minimal luminance, the current code inferred it to be -1, an invalid value. Yet it did not check the value lateron at all, so that if a valid maximum luminance is encountered, but no minimal luminance, an invalid minimal luminance of -1 is exported. If an minimal luminance element with a negative value is present, it is exported, too. This can be simply fixed by adding a check for the value of the element. Yet given that a minimal luminance of zero Cd/m² is legal and can be coded with a length of zero, we must not use a fake default value to find out whether the element is present or not. Therefore this patch uses an explicit counter for it. While just at it, also check for max_luminance > min_luminance. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Allow to count the number of element occurencesAndreas Rheinhardt2021-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, the generic EBML reader used by the Matroska demuxer did not have the capability to record whether an element was actually present or not; instead, in cases where it mattered one typically added an invalid default value and checked whether the value is valid (in which case it is guaranteed to be present). This worked pretty well so far, yet the EBML specifications have evolved: It is now legal to use zero-length elements for floats, ints, uints and strings (both ASCII and UTF-8); the value of these elements is the default value of the element (if it has one) or zero for scalar types and an empty string for strings. Furthermore, having a default value does no longer imply that the element may be presumed to be present (with its default value) if it is absent; this is only true if the element is mandatory, too. These rules are designed to allow size savings as follows: Consider the newly added FlagOriginal: It being zero means the track is not in its original language, it being one means it is. For backward compatibility reasons, neither of the two values may be inferred automatically in the absence of the element. But one can still save a byte when one wants to write the element with a value of zero, as one can write the integer with a length of zero: 0x55AE 80 instead of 0x55AE 81 00. In the former case, a parser has to infer the value of the element to be zero (which is the element's default value). When encountering an element with length zero, our parser always infers a value of zero (or an empty string); this is wrong for values with a different default value. It needs to infer the default value (or zero in its absence) and this precludes using an invalid default value for elements like FlagOriginal. Ergo one needs to be able to record whether an element is present or not by other means. This patch allows to use a simple counter for this. While just at it, some invalid and unnecessary default values have been removed (mastering metadata elements used default values of -1.0, despite these elements only being used if they are > 0). Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fate/matroska: Add test for mastering display metadataAndreas Rheinhardt2021-02-22
| | | | | | | | | The FATE suite already contains a file containing mastering display and content light level metadata: Meridian-Apple_ProResProxy-HDR10.mxf This file is used to test both the Matroska muxer and demuxer. Reviewed-by: Ridley Combs <rcombs@rcombs.me> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/microdvddec: use 64bit for durationsMichael Niedermayer2021-02-21
| | | | | | | | Fixes: signed integer overflow: 7 - -2147483647 cannot be represented in type 'int' Fixes: 28036/clusterfuzz-testcase-minimized-ffmpeg_dem_MICRODVD_fuzzer-5171698751766528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>