summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* fftools/ffmpeg: move the mux queue into muxer private dataAnton Khirnov2022-07-23
| | | | | | | | | The muxing queue currently lives in OutputStream, which is a very large struct storing the state for both encoding and muxing. The muxing queue is only used by the code in ffmpeg_mux, so it makes sense to restrict it to that file. This makes the first step towards reducing the scope of OutputStream.
* fftools/ffmpeg: do not log to the muxer contextAnton Khirnov2022-07-23
| | | | All other logging goes to NULL context.
* fftools/ffmpeg: access output file chapters through a wrapperAnton Khirnov2022-07-23
| | | | | Avoid accessing the muxer context directly, as this will become forbidden in future commits.
* fftools/ffmpeg: refactor the code checking for bitexact outputAnton Khirnov2022-07-23
| | | | | | | | Figure out earlier whether the output stream/file should be bitexact and store this information in a flag in OutputFile/OutputStream. Stop accessing the muxer in set_encoder_id(), which will become forbidden in future commits.
* fftools/ffmpeg: move closing the file into of_write_trailer()Anton Khirnov2022-07-23
| | | | | | The current code postpones closing the files until after printing the final report, which accesses the output file size. Deal with this by storing the final file size before closing the file.
* fftools/ffmpeg: write the header for stream-less outputs when initializing ↵Anton Khirnov2022-07-23
| | | | | | the muxer There is no reason to delay this.
* fftools/ffmpeg: set want_sdp when initializing the muxerAnton Khirnov2022-07-23
| | | | Allows making the variable local to ffmpeg_mux.
* fftools/ffmpeg: refactor limiting output file size with -fsAnton Khirnov2022-07-23
| | | | | | Move the file size checking code to ffmpeg_mux. Use the recently introduced of_filesize(), making this code consistent with the size shown by print_report().
* fftools/ffmpeg: fix the type of limit_filesizeAnton Khirnov2022-07-23
| | | | | The option is parsed as INT64 (signed). It is also compared to the output of avio_tell(), which is also int64_t.
* fftools/ffmpeg: add a helper function to access output file sizeAnton Khirnov2022-07-23
| | | | Stop accessing muxer internals from outside of ffmpeg_mux.
* fftools/ffmpeg_mux: add private muxer contextAnton Khirnov2022-07-23
| | | | | | | | Move header_written into it, which is not (and should not be) used by any code outside of ffmpeg_mux. In the future this context will contain more muxer-private state that should not be visible to other code.
* avcodec/hevc_filter: copy_CTB() only within width&heightMichael Niedermayer2022-07-22
| | | | | | | | Fixes: out of array access Fixes: 49271/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5424984922652672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tiff: Check tile_length and tile_widthMichael Niedermayer2022-07-22
| | | | | | | | Fixes: Division by 0 Fixes: 49235/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5495613847896064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacdec: remove skip samples multiplierJames Almer2022-07-22
| | | | | | | | | The amount of padding samples reported by containers take into account the extended samplerate in HE-AAC. Fixes ticket #9671. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/sr: fix the segmentation fault caused by incorrect input frame free.Ting Fu2022-07-22
| | | | | | | This issue would cause segmetaion fault when running srcnn model with sr filter by TensorFlow backend. This filter would free the frame incorectly. Signed-off-by: Ting Fu <ting.fu@intel.com>
* avcodec/mss4: Check image size with av_image_check_size2()Michael Niedermayer2022-07-21
| | | | | | | | Fixes: Timeout Fixes: 48418/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MTS2_fuzzer-4834851466903552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mpc8: Check and propagate more errorsMichael Niedermayer2022-07-21
| | | | | | | | Fixes: Timeout Fixes: 48846/clusterfuzz-testcase-minimized-ffmpeg_dem_MPC8_fuzzer-5278532493770752 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvdec: Check for EOF in index readingMichael Niedermayer2022-07-21
| | | | | | | | Fixes: Timeout Fixes: 47992/clusterfuzz-testcase-minimized-ffmpeg_dem_LIVE_FLV_fuzzer-6020443879899136 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/nutdec: Check get_packetheader() in mainheaderMichael Niedermayer2022-07-21
| | | | | | | | Fixes; Timeout Fixes: 48794/clusterfuzz-testcase-minimized-ffmpeg_dem_NUT_fuzzer-6524604713140224 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Check for EOF in mov_read_iloc()Michael Niedermayer2022-07-21
| | | | | | | | Fixes: Timeout Fixes: 49216/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6563000529584128 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust threshold for MWSCMichael Niedermayer2022-07-21
| | | | | | | Fixes: Timeout Fixes: 49172/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MWSC_fuzzer-5213749102903296 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/asfdec_f: Use 64bit for packet start timeMichael Niedermayer2022-07-21
| | | | | | | | Fixes: signed integer overflow: 2147483647 + 32 cannot be represented in type 'int' Fixes: 49014/clusterfuzz-testcase-minimized-ffmpeg_dem_ASF_fuzzer-6314973315334144 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check x/ysizeMichael Niedermayer2022-07-21
| | | | | | | | Fixes: OOM Fixes: 48911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6352002510094336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Fix AC_GOLOMB_RICE min size checkMichael Niedermayer2022-07-21
| | | | | | Found-by: mkver Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: consider run increase in minimal golomb frame sizeMichael Niedermayer2022-07-20
| | | | | | | | | Fixes: Timeout Fixes: 49160/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5672826144686080 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust threshold for MMVIDEOMichael Niedermayer2022-07-20
| | | | | | | | | Fixes: Timeout Fixes: 49003/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MMVIDEO_fuzzer-5550368423018496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videoenc: fix encoding long framesMichael Niedermayer2022-07-20
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hdrdec: lines can be emptyMichael Niedermayer2022-07-20
| | | | | | | | | Fixes: infinite loop Fixes: 49223/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HDR_fuzzer-6603308596330496 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>
* libavfilter/vf_overlay_qsv: Use format of first input to set output format ↵Wenbin Chen2022-07-20
| | | | | | | | | | | | | | | for overlay_qsv overlay_qsv hard coded to use nv12 as output format. Now use the format of the first input to set output format. For detailed information of supported format on different platform, please see the "composition" rows in "Video Processing Features" at below link: https://www.intel.com/content/www/us/en/develop/documentation/media-capabilities-of-intel-hardware/top.html Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Use parameter from AVCodecContext to reset qsv codecWenbin Chen2022-07-20
| | | | | | | | | | | | | | | Using parameter from AVCodecContext to reset qsv codec is more suitable for MFXVideoENCODE_Reset()'s usage. Per-frame metadata is more suitable for the usage of mfxEncodeCtrl being passed to MFXVideoENCODE_EncodeFrameAsync(). Now change it to use the value from AVCodecContext. Because q->param is passed to both "in" and "out" parameters when call MFXVideoENCODE_Query(), the value in q->param may be changed. New variables are added to store old configuration, so that we can detect real parameter change. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* libavcodec/qsvenc: Change the parameter log to be thread safeWenbin Chen2022-07-20
| | | | | | | | Dividing one line log into several av_log() call is not thread safe. Now merge these strings into one av_log() call. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avfilter/vsrc_ddagrab: check for existence of DPI_AWARENESS_CONTEXTTimo Rothenpieler2022-07-19
| | | | | | Apparently some (broken?) Windows SDK versions define IDXGIOutput5 but not DPI_AWARENESS_CONTEXT. So we need to explicitly check for its existence.
* lavfi/vf_showinfo: print frame durationsAnton Khirnov2022-07-19
|
* tests/api: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* ffmpeg: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* ffprobe: print AVFrame.durationAnton Khirnov2022-07-19
|
* lavd: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* lavf: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* lavfi: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* lavc: use AVFrame.duration instead of AVFrame.pkt_durationAnton Khirnov2022-07-19
|
* lavu/frame: add a duration field to AVFrameAnton Khirnov2022-07-19
| | | | | | | | | The only duration field currently present in AVFrame is pkt_duration, which is semantically restricted to those frames that are output by decoders. Add a new field that stores the frame's duration without regard for how that frame was produced. Deprecate pkt_duration.
* swscale: add NV16 input/outputMatthieu Bouron2022-07-19
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avfilter/vsrc_ddagrab: dynamically load SetThreadDpiAwarenessContextTimo Rothenpieler2022-07-19
| | | | | It's a Windows 10 only function, and its presence alone prevents the binary from loading on older Windows versions.
* avcodec/wrapped_avframe: Don't presume AVPacket to be writableAndreas Rheinhardt2022-07-18
| | | | | | | | | | It need not be writable; in fact, it is often not writable even if the packet sent to the decoder was writable, because the generic code calls av_packet_ref() on it. It is never writable if a user drains the decoder after every packet, because in this case the decode callback is called from avcodec_send_packet(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/wrapped_avframe: Don't leak frame metadata, side-dataAndreas Rheinhardt2022-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapped_avframe_decode() uses an AVFrame as dst in av_frame_move_ref() after having called ff_decode_frame_props() to attach side-date to this very frame. This leaks all the side-data and metadata that ff_decode_frame_props() has attached. This happens in various fate-filter-metadata tests since 6ca43a9675d651d7ea47c7ba2fafb1bf831c4d0b. These particular leaks (which affect metadata-only) could be fixed by not adding metadata side-data to AVPackets in libavdevice if they are also available from the AVFrames. Yet this would break users that extract the metadata from AVPackets. The changes to FATE happen because of the way av_dict_set() works when it overwrites an already existing entry: It overwrites the entry to be overwritten with the last entry and adds the new entry at the end. The end result is that the first entry of the dict is the second-to-last-entry of the original dict, the last entry of the dict is the last entry of the old dict and the first count - 2 entries of the original dict are at positions 1..count - 2 in their original order. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Make init-threadsafety the defaultAndreas Rheinhardt2022-07-18
| | | | | | | | | | | and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Add FF_CODEC_CAP_NOT_INIT_THREADSAFEAndreas Rheinhardt2022-07-18
| | | | | | | This is in preparation of switching the default init-thread-safety to a codec being init-thread-safe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pnmdec: Mark PHM decoder as init-threadsafeAndreas Rheinhardt2022-07-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Changelog: move ddagrab addition to correct versionTimo Rothenpieler2022-07-18
|
* avfilter/vsrc_ddagrab: fix checkheaders errorTimo Rothenpieler2022-07-18
|