summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avutil/pixdesc: Use av_strstart where appropriateAndreas Rheinhardt2021-02-28
| | | | | | | It makes the intent clearer and allows to avoid calculating the strlen separately. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/pcmdec: Beautify pcm_read_headerAndreas Rheinhardt2021-02-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/pcmdec: Simplify parsing MIME typeAndreas Rheinhardt2021-02-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/pcmdec: Fix NULL + 1Andreas Rheinhardt2021-02-28
| | | | | | It is undefined behaviour. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/pcm(dec|enc): Don't include disabled (de)muxersAndreas Rheinhardt2021-02-28
| | | | | | | | Also make the macro used for the demuxers spec-compliant. The earlier macro was not, because the ... argument of a variadic macro must not be left out. GCC and Clang warn about this when using -pedantic. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: Only check for timecodes if they are usedAndreas Rheinhardt2021-02-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/ffmpeg, ffplay: Don't set refcounted_framesAndreas Rheinhardt2021-02-28
| | | | | | | It only affects the old and deprecated avcodec_decode_(video2|audio4) API which is no longer used here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: Don't check for disabled muxersAndreas Rheinhardt2021-02-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: Remove always true checkAndreas Rheinhardt2021-02-28
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/exr: handle case when |im - IM| == 1 for huff compressionPaul B Mahol2021-02-28
|
* avformat/movenccenc: Fix memory leak for muxing CENC-encrypted filesVadym Bezdushnyi2021-02-27
| | | | | | | | | | | | | | | | | | | | | | | | Memory for auxillary_info was not freed after usage. Leak can be reproduced with following commands: Optionally, generate input video: ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 input.mp4 Run ffmpeg with valgrind: valgrind --leak-check=full --show-leak-kinds=all \ ffmpeg -y -i input.mp4 -vcodec copy -acodec copy \ -encryption_scheme cenc-aes-ctr \ -encryption_key 00000000000000000000000000000000 \ -encryption_kid 00000000000000000000000000000000 \ ffmpeg_encrypted.mp4 For test video which has duration of 10 sec, leak is 4 Kb. For 100 sec video, leak will be 33 Kb. Most likely, leaked memory will grow linearly to the number of input frames. Signed-off-by: Vadym Bezdushnyi <vadim.bezdush@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice: use av_gettime_relative() for elapsed time calculationsMarton Balint2021-02-27
| | | | | | | | | | av_gettime_relative() is using the monotonic clock therefore more suitable for elapsed time calculations. Packet timestamps are still kept absolute, although that should be configurable in the future. Related to ticket #9089. Signed-off-by: Marton Balint <cus@passwd.hu>
* avdevice/timefilter: remove obsolete comments from the docsMarton Balint2021-02-27
| | | | | | Also rename the parameters of the function to match with the implementation. Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/avf_showcqt: use av_gettime_relative() instead of av_gettime()Marton Balint2021-02-27
| | | | | | | av_gettime_relative() is using the monotonic clock therefore more suitable for relative time calculations. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/x86: add cfhdenc SIMDPaul B Mahol2021-02-27
|
* avcodec/options: deprecate avcodec_get_frame_class()James Almer2021-02-27
| | | | | | | | AVFrame hasn't been a struct defined in libavcodec for a decade now, when it was moved to libavutil. Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/avrndec: remove max_lowres valueJames Almer2021-02-27
| | | | | | The decoder does not support lowres since 9e4225cf7f. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: Add webm file extensionAndreas Rheinhardt2021-02-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu/tx: do not invert permutes on MDCTsLynne2021-02-27
|
* avformat/concat: Remove unnecessary checkAndreas Rheinhardt2021-02-27
| | | | | | | | | This code was written when the allocation functions used parameters of type unsigned. This is no longer true today and therefore we only need to check whether the multiplication of the array's size stays within a size_t -- and this can be offloaded to av_realloc_array. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/spdifenc: Fix leak upon errorAndreas Rheinhardt2021-02-27
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/wavenc: Fix leak and segfault on reallocation errorAndreas Rheinhardt2021-02-27
| | | | | | | | | | | | | | | | | | | | | Up until now, the wav muxer used a reallocation of the form ptr = av_realloc(ptr, size); that leaks upon error. Furthermore, if a failed reallocation happened when writing the trailer, a segfault would occur due to avio_write(NULL, size) because the muxer only prints an error message upon allocation error, but does not return the error. Moreover setting the pointer to the buffer to NULL on error seems to be done on purpose in order to record that an error has occured so that outputting the peak values is no longer attempted. This behaviour has been retained by simply disabling whether peak data should be written if an error occurs. Finally, the reallocation is now done once per peak block and not once per peak block per channel; it is also done with av_fast_realloc and not with a linear size increase. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu/tx: invert permutation lookupsLynne2021-02-27
| | | | | | | | | | | | | out[lut[i]] = in[i] lookups were 4.04 times(!) slower than out[i] = in[lut[i]] lookups for an out-of-place FFT of length 4096. The permutes remain unchanged for anything but out-of-place monolithic FFT, as those benefit quite a lot from the current order (it means there's only 1 lookup necessary to add to an offset, rather than a full gather). The code was based around non-power-of-two FFTs, so this wasn't benchmarked early on.
* lavu/tx: simplify in-place permute search functionLynne2021-02-27
|
* avcodec/exrenc: add half-float supportPaul B Mahol2021-02-27
|
* avcodec: add missing FF_API_OLD_ENCDEC wrappers to xmm clobber functionsJames Almer2021-02-26
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Add missing FF_API define for libavcodec pix fmt APIAndreas Rheinhardt2021-02-26
| | | | | | | | | | | | | | | avcodec_find_best_pix_fmt2 has been deprecated and replaced by avcodec_find_best_pix_fmt_of_2 in 2a54ae9df8cbc1717b3929222ac75f384e2ff240. avcodec_find_best_pix_fmt_of_2 and avcodec_get_pix_fmt_loss meanwhile were deprecated in 617e866e25b72fa5d9f9d6bbcbd7e4bd69e63a54 when these functions were de facto moved to libavutil; this has been mentioned in APIchanges in f7a1c5e4d2294a8970ede7f6deb2fe0a64e202a5. Yet the attribute_deprecated was never set for the latter two functions and they were not wrapped in an FF_API define. This commit does this. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/ffmpeg_filter: Don't use deprecated functionAndreas Rheinhardt2021-02-26
| | | | | | | | avcodec_find_best_pix_fmt_of_2 has been moved to libavutil in 617e866e25b72fa5d9f9d6bbcbd7e4bd69e63a54. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu/tx: require output argument to match input for inplace transformsLynne2021-02-26
| | | | | This simplifies some assembly code by a lot, by either saving a branch or saving an entire duplicated function.
* avformat/imx: set video stream durationPaul B Mahol2021-02-25
|
* avcodec/imx: use ff_reget_buffer()Paul B Mahol2021-02-25
| | | | | Also flush internal stuff upon seeking. This codec is not intra only.
* avformat/avlanguage: Remove long disabled av_convert_lang_toAndreas Rheinhardt2021-02-25
| | | | | | | | 1582e306a47977b09fddb029b999f99eb03cd485 scheduled it for removal with libavformat major version 58, but it was never removed. Reviewed-by: Paul B Mahol <onemda@gmail.com Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/lavfutils.h: Don't include avformat.hAndreas Rheinhardt2021-02-25
| | | | | | | Only lavfutils.c needs avformat.h, not lavfutils.h. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec: Add missing deprecation to AVCodecParser.nextAndreas Rheinhardt2021-02-25
| | | | | | | | | | | The whole old next API has been deprecated in commit 7e8eba2d8755962d9dca5eade57bf8f591a73c0c, yet deprecating the next pointer has been forgotten (the next pointers of other structures are below the public API delimiter, but such a delimiter doesn't exist for AVCodecParser). Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: unschedule removing some functions with FF_API_COPY_CONTEXTJames Almer2021-02-25
| | | | | | | | These functions were never deprecated. The merge from commit 6988cf2969 included them by mistake. Found-by: mkver Signed-off-by: James Almer <jamrial@gmail.com>
* Revert "avcodec/options: add missing FF_API_COPY_CONTEXT checks"James Almer2021-02-25
| | | | | | | | | | This reverts commit 0191f2d29c2a62b8699ac75f09708187e943814c. These functions were never deprecated. The merge from commit 6988cf2969 included them by mistake. Found-by: mkver Signed-off-by: James Almer <jamrial@gmail.com>
* doc/encoders: Add documentation for the GIF encoderDerek Buitenhuis2021-02-25
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/gifenc: Only write frame palette entries that actually usedDerek Buitenhuis2021-02-25
| | | | | | | | | | | | | | | | GIF palette entries are not compressed, and writing 256 entries, which can be up to every frame, uses a significant amount of space, especially in extreme cases, where palettes can be very small. Example, first six seconds of Tears of Steel, palette generated with libimagequant, 320x240 resolution, and with transparency optimization + per frame palette: * Before patch: 186765 bytes * After patch: 77895 bytes Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/gifenc: Add global_palette optionDerek Buitenhuis2021-02-25
| | | | | | | | | | | | | This option will disable the writing of the global palette in global GIF header if it is set to 0, causing only the frame-level palette to ever be written. This will be useful later on when further frame-level palette optimizations are introduced. The default is 1, which maintains current default behavior. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/wavenc: Improve unsupported codec error messagesAndreas Rheinhardt2021-02-25
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_vif: add support for more formatsPaul B Mahol2021-02-25
|
* avfilter/vf_vif: simplify case comparing same inputsPaul B Mahol2021-02-25
|
* tests/api-band-test: simplify codeAnton Khirnov2021-02-25
|
* 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.
* avfilter/vf_vif.c: fix build warning for [-Wmain]Guo, Yejun2021-02-25
| | | | | | | | | src/libavfilter/vf_vif.c: In function ‘process_frame’: src/libavfilter/vf_vif.c:542:20: warning: ‘main’ is usually a function [-Wmain] AVFrame *out, *main = NULL, *ref = NULL; ^~~~ Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* avfilter/vf_ssim.c: fix build warning for [-Wmain]Guo, Yejun2021-02-25
| | | | | | | | | | | | | | The build warning message: src/libavfilter/vf_ssim.c: In function ‘ssim_plane_16bit’: src/libavfilter/vf_ssim.c:246:24: warning: ‘main’ is usually a function [-Wmain] const uint8_t *main = td->main_data[c]; ^~~~ src/libavfilter/vf_ssim.c: In function ‘ssim_plane’: src/libavfilter/vf_ssim.c:289:24: warning: ‘main’ is usually a function [-Wmain] const uint8_t *main = td->main_data[c]; ^~~~ Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* lavc/lscrdec: use ff_reget_buffer()Anton Khirnov2021-02-24
| | | | | | It is simpler and more efficient. Suggested-by: James Almer <jamrial@gmail.com>
* tests/fate/apng: add a test for APNG_DISPOSE_OP_PREVIOUSAnton Khirnov2021-02-24
|
* 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.