summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* lavc/golomb: unmerge the cached bitstream reader codebitstream_unmergeAlexandra Hájková2022-01-25
| | | | | | | | | | Move the cached bitstream reader code to a new header, which can either be used on its own with the cached bitstream reader, or from get_bits code by #defining CACHED_BITSTREAM_READER. Restore proper attribution for this code. Integration by Anton Khirnov <anton@khirnov.net>
* lavc/get_bits: add a compat wrapper for the cached bitstream readerAnton Khirnov2022-01-25
| | | | Use that instead of the merged version.
* lavc/bitstream: make skip_remaining() publicAnton Khirnov2022-01-25
| | | | | Also rename it to bitstream_skip_cache(), which is more descriptive and follows the naming conventions of tis API.
* lavc/bitstream: templatize for BE/LEAnton Khirnov2022-01-25
| | | | Allows using both BE and LE bitstream readers in the same file.
* lavc: add standalone cached bitstream readerAlexandra Hájková2022-01-25
| | | | | | | | | | | | | | | | | | | | The cached bitstream reader was originally written by Alexandra Hájková for Libav, with significant input from Kostya Shishkov and Luca Barbato. It was then committed to FFmpeg in ca079b09549, by merging it with the implementation of the current bitstream reader. This merge makes the code of get_bits.h significantly harder to read, since it now contains two different bitstream readers interleaved with #ifdefs. Additionally, the code was committed without proper authorship attribution. This commit re-adds the cached bitstream reader as a standalone header, as it was originally developed. It will be made useful in following commits. Integration by Anton Khirnov. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* get_bits: move check_marker() to mpegvideo.hAnton Khirnov2022-01-25
| | | | | It is only used by mpegvideo-based decoders - specifically mpeg12, intelh263, ituh263, mpeg4video.
* avcodec/h264_parse: Move ff_h264_get_profile() to h264_ps.hAndreas Rheinhardt2022-01-24
| | | | | | It is a more fitting place for it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_*: Remove unnecessary internal.h inclusionsAndreas Rheinhardt2022-01-24
| | | | | | Also remove some other unnecessary headers while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264dec: Remove unnecessary headersAndreas Rheinhardt2022-01-24
| | | | | | | E.g. the inclusion of parser.h comes from a time when the parser used a H264Context. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264*: Remove unnecessary h264_mvpred.h inclusionsAndreas Rheinhardt2022-01-24
| | | | | | | This is only needed by h264_cabac.c and h264_cavlc.c. Also fix up the other headers while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/svq3: stop including h264dec.hAnton Khirnov2022-01-24
| | | | | | | | The only thing that is actually used directly from there is the PART_NOT_AVAILABLE constant, which can be trivially copied to svq3 decoder itself. Otherwise it only depends on other indirectly included headers.
* lavc/x86/h264_qpel: stop unnecessarily including h264decAnton Khirnov2022-01-24
|
* lavc/vdpau: stop unnecessarily including h264decAnton Khirnov2022-01-24
|
* lavc/h264: move MB_TYPE defs from h264dec.h to h264_parseAnton Khirnov2022-01-24
| | | | Allows to stop including h264dec.h in h264data.c.
* lavc/h264_parse: stop including h264dec.hAnton Khirnov2022-01-24
| | | | | | It is unnecessary and only files that are parts of the decoder (as opposed to standalone code called by the decoder) are allowed to include h264dec.h
* lavc/h264data.h: stop including h264dec.hAnton Khirnov2022-01-24
| | | | This header does not need anything from there.
* lavc/h264: move some shared code from h264dec to h264_parseAnton Khirnov2022-01-24
|
* lavc/h264_parser: add missing headersAnton Khirnov2022-01-24
|
* lavc/h264: replace MAX_DELAYED_PIC_COUNT by H264_MAX_DPB_FRAMESAnton Khirnov2022-01-24
|
* lavc/h264: replace MAX_DELAYED_PIC_COUNT with FF_ARRAY_ELEMS where appropriateAnton Khirnov2022-01-24
|
* lavc/h264dec.h: Move MMCOOpcode to h264_parse.hAnton Khirnov2022-01-24
| | | | | Both parser and decoder use these, so h264_parse is the proper place for them.
* lavc/h264: replace MAX_MMCO_COUNT with H264_MAX_MMCO_COUNTAnton Khirnov2022-01-24
| | | | | | They apparently serve the same purpose; the latter is one larger and has a comment explaining how the value is derived, so seems more trustworthy.
* avcodec/h264dec: Move find_start_code() to its only userAndreas Rheinhardt2022-01-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264_parser: don't alter decoder private dataJames Almer2022-01-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tests: add test for ffmpeg's fix_sub_duration featureJan Ekström2022-01-24
| | | | | | | | This long-existing feature calculates subtitle durations by keeping it around until the following subtitle is decoded, and then utilizes the following subtitle's pts as the end point of the previous one. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* doc/filters: note format constraint for volumedetectGyan Doshi2022-01-24
|
* libavcodec/qsvenc: fix a memory leak problemWenbin Chen2022-01-24
| | | | | | | | | | "qf->frame" ref to input frame but it isn't released. av_frame_unref() is added before refering qf->frame to new frame to make sure the previous reference is released. Reported-by: Mark Samuelson <Mark.Samuelson@sonicfoundry.com> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avfilter/vf_libvmaf: update filter for libvmaf v2.0.0Kyle Swanson2022-01-23
|
* avfilter/vf_v360: improve xyz_to_dfisheye()Paul B Mahol2022-01-22
|
* fate/ffmpeg: Add test for autorotating videoAndreas Rheinhardt2022-01-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/x86/swscale: Remove superfluous and invalid ';'Andreas Rheinhardt2022-01-22
| | | | | | | | | Inside a function an unnecessary ';' is just a null statement; yet outside of it it is actually illegal (but compilers happen to accept it without warning except when using -pedantic). So modify the macros to always expect the user to add a ';'. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hls: Remove redundant castAndreas Rheinhardt2022-01-21
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Peek into the muxing queue for avoid_negative_tsAndreas Rheinhardt2022-01-21
| | | | | | | | | | | Peeking into the muxing queue can improve the estimate of the lowest timestamp needed for avoid_negative_ts in case the lowest timestamp is in a packet other than the first packet to be muxed. This fixes tickets #4536 and #5784 as well as the output from the matroska-avoid-negative-ts FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Preserve sync even if later packet has negative tsAndreas Rheinhardt2022-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | write_packet() has code to shift the packets timestamps to make them nonnegative or even make them start at ts zero; this code inspects every packet that is written and if a packet with negative timestamp (whether this is dts or pts depends upon another flag; basically: Matroska uses pts, everyone else dts) is encountered, this is offset to make the timestamp zero. All further packets will be offset accordingly (with the offset converted according to the streams' timebases). This is based around an assumption, namely that the timestamps are indeed non-decreasing, so that the first packet with negative timestamps is the first packet with timestamps. This assumption is often fulfilled given that the default interleavement function by default interleaves per dts; yet there are scenarios in which it may not be fulfilled: a) av_write_frame() instead of av_interleaved_write_frame() is used. b) The audio_preload option is used. c) When the timestamps that are made nonnegative/zero are pts (i.e. with Matroska), because the packet with the smallest dts is not necessarily the packet with the smallest pts. d) Possibly with custom interleavement functions. In these cases the relative sync of the first few packet(s) is offset relative to the later packets. This contradicts the documentation ("When shifting is enabled, all output timestamps are shifted by the same amount"). Therefore this commit changes this: As soon as the first packet with valid timestamps is output, it is checked and recorded whether the timestamps need to be shifted. Further packets are no longer checked for needing to be offset; instead they are simply offset. In the cases above this leads to packets with negative timestamps (and the appropriate warnings) instead of desync. This will mostly be fixed in the next commit. This commit also factors handling the avoid_negative_ts stuff out of write_packet() in order to be able to return immediately. Tickets #4536 and #5784 as well as the matroska-avoid-negative-ts-test are examples of c); as has been said, some timestamps are now negative, yet the ref file update does not show it because ffmpeg.c sanitizes the timestamps (-copyts disables it; ffprobe and mkvinfo also show the original timestamps). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avformat: Add AVFMT_AVOID_NEG_TS_DISABLEDAndreas Rheinhardt2022-01-21
| | | | | | And also don't use explicit constants in the movenc test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/matroska: Add test for avoiding negative timestampsAndreas Rheinhardt2022-01-21
| | | | | | | This tests the issue from tickets #4536, #5784; the output of this test is currently broken. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Remove assert based on faulty assumptionsAndreas Rheinhardt2022-01-21
| | | | | | | | | This assert is based upon the wrong assumption that the noninterleaved codepath is never used; if it is used, max_interleave_delta is irrelevant. It furthermore ignores audio_preload. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/pixfmt.h: typoDiederick Niehorster2022-01-21
| | | | | Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mov: Fix endian-dependent parsingAndreas Rheinhardt2022-01-21
| | | | | | | | | | MOVAtom.type is always read as a little-endian number (despite MOV/ISOBMFF being big-endian). Fixes the matroska-dovi-write-config8 FATE-test on big-endian arches (which runs into the "index out of range" warning message). Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/hwcontext_vulkan: clear dangling pointers on map failureAnton Khirnov2022-01-21
|
* configure: link to libatomic when it's presentAnton Khirnov2022-01-21
| | | | | | | C11 atomics in some configurations (e.g. 64bit operations on ppc64 with GCC) require linking to libatomic. Fixes #9275
* lavf/network: log ff_listen() errors to proper contexts rather than NULLAnton Khirnov2022-01-21
|
* lavf/network: log ff_socket() errors to proper contexts rather than NULLAnton Khirnov2022-01-21
|
* lavf/udp: log net errors to proper contexts rather than NULLAnton Khirnov2022-01-21
|
* libavcodec/qsvenc: Add transform skip to hevc_qsvWenbin Chen2022-01-21
| | | | | | | | | Add transform_skip option to hevc_qsv. By enabling this option, the transform_skip_enabled_flag in PPS will be set to 1. This option is supported on the platform equal or newer than ICL. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add low latency P-pyramid support to qsvWenbin Chen2022-01-21
| | | | | | | | | | | Add low latency P-pyramid support to qsv. This feature relates to command line option "-p_strategy". To enable this flag, user also need to set "-bf" to 0. P-strategy has two modes "1-simple" and "2-pyramid". The details of the two models refer to https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#preftype Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add DisableDeblockingIdc support to qsvWenbin Chen2022-01-21
| | | | | | | | Add dblk_idc option to 264_qsv and hevc_qsv. Turining on this opion can disable deblocking. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Add max_frame_size support to hevc_qsvWenbin Chen2022-01-21
| | | | | | | Add max_frame_size support to hevc_qsv as well. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avformat/matroskaenc: Fix writing AV_SPHERICAL_EQUIRECTANGULARAndreas Rheinhardt2022-01-20
| | | | | | | | According to the documentation, the ISOBMFF 'equi' box must be present for equirectangular projections. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/matroska: Add test for reading/writing BlockAdditionMapping elementsquietvoid2022-01-20
| | | | | | | | Tests the parsing and writing of AVDOVIDecoderConfigurationRecord, when it is present as a Dolby Vision configuration block addition mapping. Signed-off-by: quietvoid <tcChlisop0@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>