summaryrefslogtreecommitdiff
path: root/libavformat/av1dec.c
Commit message (Collapse)AuthorAge
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Avoid allocation for AVStreamInternalAndreas Rheinhardt2021-09-17
| | | | | | | | | | Do this by allocating AVStream together with the data that is currently in AVStreamInternal; or rather: Put AVStream at the beginning of a new structure called FFStream (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove AVStreamInternal altogether. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/avio: Move internal AVIOContext fields to avio_internal.hAndreas Rheinhardt2021-08-25
| | | | | | | | | | | | | | Currently AVIOContext's private fields are all over AVIOContext. This commit moves them into a new structure in avio_internal.h instead. Said structure contains the public AVIOContext as its first element in order to avoid having to allocate a separate AVIOContextInternal which is costly for those use cases where one just wants to access an already existing buffer via the AVIOContext-API. For these cases ffio_init_context() can't fail and always returned zero, which was typically not checked. Therefore it has been made to not return anything. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/av1dec: Disallow seeking by bytesAndreas Rheinhardt2021-08-23
| | | | | | | | | The low overhead OBU format provides no means to resync after performing a byte-based seek; in other words: Byte based seeking is just not supported. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/av1dec: Flush BSF upon seekingAndreas Rheinhardt2021-08-23
| | | | | | | | | | | | | | The av1_merge_frame BSF outputs its cached data when it sees the beginning of a new frame, i.e. when it sees a temporal delimiter OBU. Therefore it typically has a temporal delimiter OBU cached after outputting a packet. This implies that the OBU demuxer must flush its BSF upon seeking because otherwise the first frame returned after a seek consists of an old temporal delimiter OBU only. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/av1dec: Deduplicate Annex B and low overhead OBU AV1 demuxerAndreas Rheinhardt2021-08-23
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/av1dec: Set position of AVPackets given to BSFAndreas Rheinhardt2021-08-23
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including bsf.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include bsf.h directly wherever it is used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/av1dec: Simplify cleanup after read_header failureAndreas Rheinhardt2021-07-07
| | | | | | | by setting the FF_FMT_INIT_CLEANUP flag. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: move AVStream.{parser,need_parsing} to AVStreamInternalJames Almer2021-05-07
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: check size before addition in probingMichael Niedermayer2020-12-06
| | | | | | | | Fixes: signed integer overflow: 175 + 2147483571 cannot be represented in type 'int' Fixes: 26833/clusterfuzz-testcase-minimized-ffmpeg_dem_IMAGE2_fuzzer-5969501214212096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/av1dec: Fix padding in obu_get_packet()Michael Niedermayer2020-10-20
| | | | | | | | Fixes: stack buffer overflow (read) Fixes: 26369/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5721057325219840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/av1dec: don't update temporal_unit_size after it's no longer usedJames Almer2020-08-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: inline obu_read_data() and obu_prefetch() into obu_get_packet()James Almer2020-08-15
| | | | | | | They don't really help making the demuxer more readable. Reviewed-by: Guangxin Xu <oddstone@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: fix return value on some code pathsJames Almer2020-08-14
| | | | | | | | | | | If avio_read() returns a value of bytes read that's lower than the expected, return an error instead. And when there are zero bytes in the prefetch buffer, return 0 in order for the frame merge bsf to drain all potentially buffered packets. Missed by mistake when amending and committing 9a7bdb6d71. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: add missing preprocessor wrappers to annexb and obu demuxersJames Almer2020-08-14
| | | | | | Ensure the modules are compiled only if enabled. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: add low-overhead bitstream formatXu Guangxin2020-08-14
| | | | | | It's defined in Section 5.2, used by netflix. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: simplify annexb_probe()James Almer2019-11-16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/av1dec: Redo flushing of bsfAndreas Rheinhardt2019-11-14
| | | | | | | | | | | | | | The current approach has two different calls to av_bsf_send_packet(): A normal one, sending a packet; and an extraordinary one just for flushing. These can be unified into one by making use of the newly documented fact that av_bsf_send_packet() allows to signal flushing via empty packets (i.e. packets without data and side-data). This also fixes CID 1455685 which resulted from the fact that the call for flushing was not checked given that it couldn't fail. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: add an AV1 Annex B demuxerJames Almer2019-11-12
Signed-off-by: James Almer <jamrial@gmail.com>