summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLESGuangyu Sun2021-07-12
| | | | | | | | | | | | | | | | | | | | | | After fixing AV_PKT_DATA_SKIP_SAMPLES for reading vorbis packets from ogg, the actual decoded samples become fewer. Three fate tests are failing: fate-vorbis-20: The samples in 6.ogg are not frame aligned. 6.pcm file was generated by ffmpeg before the fix. After the fix, the decoded pcm file does not match anymore. Ideally the ref file 6.pcm should be updated but it is probably not worth it including another copy of the same file, only smaller. SIZE_TOLERANCE is added for this test case. fate-webm-dash-chapters: The original vorbis_chapter_extension_demo.ogg is transmuxed to dash-webm. The ref file webm-dash-chapters needs to be updated. fate-vorbis-encode: This exposes another bug in the vorbis encoder that initial_padding is not correctly set. It is fixed in the previous patch. Signed-off-by: Guangyu Sun <gsun@roblox.com>
* libavcodec/vorbisenc: Add missing initial_paddingGuangyu Sun2021-07-12
| | | | | | | | | | | Vorbis has priming samples at the beginning. If the initial_padding is not set in the encoder, the total sample count will be one frame fewer than it should be. The result is that we get a truncated version of encoding. initial_padding should be set to the frame_size used in vorbis_encode_frame(). Signed-off-by: Guangyu Sun <gsun@roblox.com>
* avformat/oggparsevorbis: Update end_trimming for the last packetGuangyu Sun2021-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without end_trimming, the last packet will contain unexpected samples used for padding. This commit partially fixes #6367 when the audio length is long enough. dd if=/dev/zero of=./silence.raw count=20 bs=500 oggenc --raw silence.raw --output=silence.ogg oggdec --raw --output silence.oggdec.raw silence.ogg ffmpeg -codec:a libvorbis -i silence.ogg -f s16le -codec:a pcm_s16le silence.libvorbis.ffmpeg.raw ffmpeg -i silence.ogg -f s16le -codec:a pcm_s16le silence.native.ffmpeg.raw ls -l *.raw The original test case in #6367 is still not fixed due to a remaining issue. The remaining issue is that ogg_stream->private is not kept during ogg_save()/ogg_restore(). Field final_duration in the private data is important to calculate end_trimming. Some common operations such as avformat_open_input() and avformat_find_stream_info() before reading packet will trigger ogg_save() and ogg_restore(). Luckily, final_duration will not get updated until the last ogg page. The save/restore mentioned above will not change final_duration most of the time. But if the audio length is short, those reads may be performed on the last ogg page, causing trouble keeping the correct value of final_duration. We probably need a more complicated patch to address this issue. Signed-off-by: Guangyu Sun <gsun@roblox.com>
* cafenc: fill in avg. packet size later if unknownRoman Beranek2021-07-12
| | | | | | | | | | | | | | | | | Frame size of Opus stream was previously presumed here to be 960 samples (20ms), however sizes of 120, 240, 480, 1920, and 2880 are also allowed. It can also alter on a per-packet basis and even multiple frames may be present in a single packet according to the specification, for the sake of simplicity however, let us assume that this doesn't occur. Because the mFramesPerPacket field, representing the number of samples per packet in the ffmpeg terminilogy, is the key factor in calculating packet durations and all that follows from that (index, bitrate, ...), it is crucial to get right. Therefore, if the packet size is not available ahead of time (as it is in the case of Opus), calculate an average from the stream duration once we know how many packets there are and update the filed in the header.
* avcodec/qsvenc: clip global_quality for ICQ modes.Gyan Doshi2021-07-12
| | | | | | Allowed range is 1 to 51. Ref: https://software.intel.com/content/www/us/en/develop/articles/advanced-bitrate-control-methods-in-intel-media-sdk.html
* lavfi/dnn_backend_tf: Error HandlingShubhanshu Saxena2021-07-11
| | | | | | | This commit adds handling for cases where an error may occur, clearing the allocated memory resources. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Separate function for Completion CallbackShubhanshu Saxena2021-07-11
| | | | | | | This commit rearranges the existing code to create a separate function for the completion callback in execute_model_tf. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Separate function for filling RequestItemShubhanshu Saxena2021-07-11
| | | | | | | This commit rearranges the existing code to create separate function for filling request with execution data. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Request-based ExecutionShubhanshu Saxena2021-07-11
| | | | | | | | This commit uses TFRequestItem and the existing sync execution mechanism to use request-based execution. It will help in adding async functionality to the TensorFlow backend later. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Add TFInferRequest and TFRequestItemShubhanshu Saxena2021-07-11
| | | | | | | | This commit introduces a typedef TFInferRequest to store execution parameters for a single call to the TensorFlow C API. This typedef is used in the TFRequestItem. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: TaskItem Based InferenceShubhanshu Saxena2021-07-11
| | | | | | | This commit uses the common TaskItem and InferenceItem typedefs for execution in TensorFlow backend. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* ffmpeg: add option recast_mediaGyan Doshi2021-07-11
| | | | | Allows forcing decoders of different media type. Needed to decode media data muxed as data streams.
* lavc:libsvtav1: Update SVT-AV1 new repoJun Zhao2021-07-10
| | | | | | SVT-AV1 moved the repo from github to gitlab. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avformat/udp: fix check for pthread_cond_wait return valueZhao Zhili2021-07-10
| | | | | | | | POSIX errno is positive. We have strict_pthread_cond_wait to handle error code during development. Signed-off-by: zhilizhao <zhilizhao@tencent.com> Reviewed-by: Jun Zhao <barryjzhao@tencent.com>
* avcodec/libdav1d: don't repeatedly parse the same sequence headerJames Almer2021-07-09
| | | | | | | Look at the event flag that signals a new sequence header was found in the bitstream on supported libdav1d versions for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libdav1d: use ff_decode_frame_props() to fill frame propertiesJames Almer2021-07-09
| | | | | | | The main benefit comes from propagating container level metadata like hdr, which is more commonly used than the relevant Metadata OBUs. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/slice: Fix wrong return on errorMichael Niedermayer2021-07-09
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacdec_template: Avoid some invalid values to be set by ↵Michael Niedermayer2021-07-09
| | | | | | | | | | decode_audio_specific_config_gb() Fixes: NULL pointer dereference Fixes: decode_spectrum_and_dequant.mp4 Found-by: Rafael Dutra <rafael.dutra@cispa.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Use full chroma interpolation for rgb4/8 and dither noneMichael Niedermayer2021-07-09
| | | | | | | | Dither none is only implemented in full chroma interpolation for these rgb formats Its also a obscure choice (producing less nice images) that implementing it in the other code-paths makes no sense Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/output: Implement dither none for yuv2rgb_write_full()Michael Niedermayer2021-07-09
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/slice: Check slice for allocation failureMichael Niedermayer2021-07-09
| | | | | | | | Fixes: null pointer dereference Fixes: alloc_slice.mp4 Found-by: Rafael Dutra <rafael.dutra@cispa.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/img2dec: Fix typo in AVClass nameAndreas Rheinhardt2021-07-08
| | | | | Found-by: Gyan Doshi <ffmpeg@gyani.pro> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/textdec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/proresenc_anatoliy: Deduplicate pix_fmts arraysAndreas Rheinhardt2021-07-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/proresenc_anatoliy: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/pngenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Deduplicate ff_mpv_generic_options-based AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libwebpenc: Deduplicate options, AVClass, pix_fmtsAndreas Rheinhardt2021-07-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libcodec2: Remove AVClass for decoderAndreas Rheinhardt2021-07-08
| | | | | | The decoder has no options. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/g726: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3enc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3dec_float: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different AVCodecs to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/Makefile: Fix standalone build of adpcm_argo encoderAndreas Rheinhardt2021-07-08
| | | | | | | | Said encoder uses a function in adpcm.c and while it does not use anything from adpcm_data.c, other parts of both adpcm.c and adpcmenc.c need it, so adpcm_data.c needs to be enabled anyway. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/v210: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/segment: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rawdec: Deduplicate AVClasses based upon ff_rawvideo_optionsAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rawdec: Deduplicate AVClasses based upon ff_raw_optionsAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/pcmdec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/oggenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mpegenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/img2dec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/img2dec: Make ff_img2pipe_options staticAndreas Rheinhardt2021-07-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hashenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/g726: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flvdec: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/flacdec, takdec: Use FFRawDemuxerContext directlyAndreas Rheinhardt2021-07-08
| | | | | | | | | | | | | The beginning of the private contexts of both the FLAC and the TAK demuxer currently mimick FFRawDemuxerContext: A pointer to an AVClass followed by the AVOpt-enabled field raw_packet_size. Said field is only used by the demuxers' read_packet functions via ff_raw_read_partial_packet(), which treats the private context as an FFRaawDemuxerContext. Yet this is fragile, so better include a FFRawDemuxerContext struct at the beginning of said demuxers' private contexts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/codec2: Remove unused AVClass with wrong categoryAndreas Rheinhardt2021-07-08
| | | | | | | The codec2 muxer has no options and so it needs no AVClass; and it certainly needs no AVClass of category AV_CLASS_CATEGORY_DEMUXER. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/asfenc: Deduplicate AVClassesAndreas Rheinhardt2021-07-08
| | | | | | | | The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>