summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/libwebpenc_animencoder: stop propagating bogus empty packetsJames Almer2021-04-16
| | | | | | | | | | Packets must have at least one of data or side_data. If none are available, then got_packet must not be signaled. The generic encode code already discarded these empty packets, but it's better just not propagating them at all. Signed-off-by: James Almer <jamrial@gmail.com>
* doc/ffprobe.xsd: Clean-up choice indicator definitionsTobias Rapp2021-04-16
| | | | | | | | Remove the unneeded wrapping sequence element. Also the minOccurs/maxOccurs occurrence indicators on the inner element definitions can be removed. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* fftools/ffprobe: Remove check on show_frames and show_packets in XML writerTobias Rapp2021-04-16
| | | | | | | | The "packets_and_frames" element has been added to ffprobe.xsd in 0c9f0da0f7656059e9bd41931d250aafddf35ea3 but apparently removing the check in ffprobe.c has been forgotten. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* avformat/rawenc: remove singlejpeg muxerGyan Doshi2021-04-16
| | | | | It was added in 51ac1f616f due to ticket #4218, in order to show a single image via ffserver. With ffserver long gone, it serves no purpose.
* avcodec/nellymoserenc: Fix segfault when using unsupported channels/rateAndreas Rheinhardt2021-04-15
| | | | | | | | | NellyMoserEncodeContext.avctx is only set in init after these checks, yet it is used by encode_end(). This is a regression since 0a56bfa71f751a2b25da8d060a019c1c75ca9d7b. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* mov: Prioritize aspect ratio values found in pasp atomVittorio Giovara2021-04-15
| | | | | | | | | | | | | From the ISO/IEC specification for MP4: The pixel aspect ratio and clean aperture of the video may be specified using the ‘pasp’ and ‘clap’ sample entry boxes, respectively. These are both optional; if present, they over-ride the declarations (if any) in structures specific to the video codec, which structures should be examined if these boxes are absent. For maximum compatibility, these boxes should follow, not precede, any boxes defined in or required by derived specifications. Fixes trac/#7277.
* avcodec/mpeg4videodec: update exported AVOptions in the user-facing contextJames Almer2021-04-14
| | | | | | | This prevents bogus values being reported on frame multithreaded decoding scenarios. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264dec: update exported AVOptions in the user-facing contextJames Almer2021-04-14
| | | | | | | | Based on a patch by Hendrik Leppkes. Fixes ticket #9176. Signed-off-by: James Almer <jamrial@gmail.com>
* pthread_frame: introduce a codec callback to update the user-facing contextHendrik Leppkes2021-04-14
|
* ffprobe: only print exported private decoder optionsJames Almer2021-04-14
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264dec: add missing flags to is_avc and nal_length_size AVOptionsJames Almer2021-04-14
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* aarch64: h264pred: Optimize the inner loop of existing 8 bit functionsMartin Storsjö2021-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the loop counter decrement further from the branch instruction, this hides the latency of the decrement. In loops that first load, then store (the horizontal prediction cases), do the decrement after the load (where the next instruction would stall a bit anyway, waiting for the result of the load). In loops that store twice using the same destination register, also do the decrement between the two stores (as the second store would need to wait for the updated destination register from the first instruction). In loops that store twice to two different destination registers, do the decrement before both stores, to do it as soon before the branch as possible. This gives minor (1-2 cycle) speedups in most cases (modulo measurement noise), but the horizontal prediction functions get a rather notable speedup on the Cortex A53. Before: Cortex A53 A72 A73 pred8x8_dc_8_neon: 60.7 46.2 39.2 pred8x8_dc_128_8_neon: 30.7 18.0 14.0 pred8x8_horizontal_8_neon: 42.2 29.2 18.5 pred8x8_left_dc_8_neon: 52.7 36.2 32.2 pred8x8_mad_cow_dc_0l0_8_neon: 48.2 27.7 25.7 pred8x8_mad_cow_dc_0lt_8_neon: 52.5 33.2 34.7 pred8x8_mad_cow_dc_l0t_8_neon: 52.5 31.7 33.2 pred8x8_mad_cow_dc_l00_8_neon: 43.2 27.0 25.5 pred8x8_plane_8_neon: 112.2 86.2 88.2 pred8x8_top_dc_8_neon: 40.7 23.0 21.2 pred8x8_vertical_8_neon: 27.2 15.5 14.0 pred16x16_dc_8_neon: 91.0 73.2 70.5 pred16x16_dc_128_8_neon: 43.0 34.7 30.7 pred16x16_horizontal_8_neon: 86.0 49.7 44.7 pred16x16_left_dc_8_neon: 87.0 67.2 67.5 pred16x16_plane_8_neon: 236.0 175.7 173.0 pred16x16_top_dc_8_neon: 53.2 39.0 41.7 pred16x16_vertical_8_neon: 41.7 29.7 31.0 After: pred8x8_dc_8_neon: 59.0 46.7 42.5 pred8x8_dc_128_8_neon: 28.2 18.0 14.0 pred8x8_horizontal_8_neon: 34.2 29.2 18.5 pred8x8_left_dc_8_neon: 51.0 38.2 32.7 pred8x8_mad_cow_dc_0l0_8_neon: 46.7 28.2 26.2 pred8x8_mad_cow_dc_0lt_8_neon: 55.2 33.7 37.5 pred8x8_mad_cow_dc_l0t_8_neon: 51.2 31.7 37.2 pred8x8_mad_cow_dc_l00_8_neon: 41.7 27.5 26.0 pred8x8_plane_8_neon: 111.5 86.5 89.5 pred8x8_top_dc_8_neon: 39.0 23.2 21.0 pred8x8_vertical_8_neon: 27.2 16.0 14.0 pred16x16_dc_8_neon: 85.0 70.2 70.5 pred16x16_dc_128_8_neon: 42.0 30.0 30.7 pred16x16_horizontal_8_neon: 66.5 49.5 42.5 pred16x16_left_dc_8_neon: 81.0 66.5 67.5 pred16x16_plane_8_neon: 235.0 175.7 173.0 pred16x16_top_dc_8_neon: 52.0 39.0 41.7 pred16x16_vertical_8_neon: 40.2 33.2 31.0 Despite this, a number of these functions still are slower than what e.g. GCC 7 generates - this shows the relative speedup of the neon codepaths over the compiler generated ones: Cortex A53 A72 A73 pred8x8_dc_8_neon: 0.86 0.65 1.04 pred8x8_dc_128_8_neon: 0.59 0.44 0.62 pred8x8_horizontal_8_neon: 1.51 0.58 1.30 pred8x8_left_dc_8_neon: 0.72 0.56 0.89 pred8x8_mad_cow_dc_0l0_8_neon: 0.93 0.93 1.37 pred8x8_mad_cow_dc_0lt_8_neon: 1.37 1.41 1.68 pred8x8_mad_cow_dc_l0t_8_neon: 1.21 1.17 1.32 pred8x8_mad_cow_dc_l00_8_neon: 1.24 1.19 1.60 pred8x8_plane_8_neon: 3.36 3.58 3.76 pred8x8_top_dc_8_neon: 0.97 0.99 1.43 pred8x8_vertical_8_neon: 0.86 0.78 1.18 pred16x16_dc_8_neon: 1.20 1.06 1.49 pred16x16_dc_128_8_neon: 0.83 0.95 0.99 pred16x16_horizontal_8_neon: 1.78 0.96 1.59 pred16x16_left_dc_8_neon: 1.06 0.96 1.32 pred16x16_plane_8_neon: 5.78 6.49 7.19 pred16x16_top_dc_8_neon: 1.48 1.53 1.94 pred16x16_vertical_8_neon: 1.39 1.34 1.98 In particular, on Cortex A72, many of these functions are slower than the compiler generated code, while they're more beneficial on e.g. the Cortex A73. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/dashdec: Also fetch final partial segmentMatt Robinson2021-04-14
| | | | | | | | | | Currently, the DASH demuxer omits the final segment for a non-live stream (using SegmentTemplate) if it is shorter than the other segments. Correct calc_max_seg_no to round up when calulating the number of segments instead of rounding down to resolve this issue. Signed-off-by: Matt Robinson <git@nerdoftheherd.com>
* fftools/ffmpeg_filter: Fix check for mjpeg encoderAndreas Rheinhardt2021-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MJPEG encoder supports some pixel format/color range combinations only when strictness is set to unofficial or less. Before commit 059fc2d9da5364627613fb3e6424079e14dbdfd3 said encoder's pix_fmts array only included the pixel formats supported with default strictness. When strictness was <= unofficial, fftools/ffmpeg_filter.c used an extended list of pixel formats instead of the encoder's including the pixel formats only supported when strictness <= unofficial. Said commit turned the logic around: The encoder's pix_fmts array now included all pixel formats and fftools/ffmpeg_filter.c instead used a small list of all pixel formats supported when strictness is > unofficial and the encoder's pixel formats instead. In particular, the codec's pix_fmt is not used when strictness is normal. This works for the mjpeg encoder; yet it did not work for other (hardware-based) mjpeg encoders, because the check for whether one is using the MJPEG encoder is wrong: It just checks the codec id. So if one used strict unofficial with a hardware-accelerated MJPEG encoder before commit 059fc2d9da53, the unofficial (non-hardware) pixel formats of the MJPEG encoder would be used; since said commit the codec's pixel formats are overridden at ordinary strictness by the ordinary MJPEG pixel formats. This leads to format conversion errors lateron which were reported in #9186. The solution to this is to check AVCodec.name instead of its id. Fixes ticket #9186. Tested-by: Eoff, Ullysses A <ullysses.a.eoff@intel.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavdevice/gdigrab: fix capture of windows with non-ASCII titlesHe Yang2021-04-13
| | | | | | | Properly convert the UTF-8 input string to Windows wchar, and utilize the wchar version of FindWindow. Signed-off-by: He Yang <1160386205@qq.com>
* avcodec/jpeglsenc: Remove redundant pixel format checksAndreas Rheinhardt2021-04-13
| | | | | | | | This encoder has AVCodec.pix_fmts set, so ff_encode_preinit() already checks for this. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Put subtitles without duration into SimpleBlocksAndreas Rheinhardt2021-04-12
| | | | | | | | | | | | The value zero for AVPacket.duration means that the duration is unknown, which in practice means "play this subtitle until overridden by the next subtitle". Yet for Matroska a BlockGroup with duration zero means that the subtitle really has a duration zero. "Display until overridden" is achieved by not setting a duration on the container level at all and this is achieved by using a SimpleBlock or a BlockGroup without duration. This commit implements this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Remove remnant of inline-timing subtitle packetsAndreas Rheinhardt2021-04-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/msmpeg4dec: Avoid duplication of VLC init codeAndreas Rheinhardt2021-04-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vc1: Remove unused hrd fieldsAndreas Rheinhardt2021-04-12
| | | | | | Unused since be3492ec7eb2dbb0748c123af911a06c125c90db. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mss2: Remove redundant initialization of vc1 dspAndreas Rheinhardt2021-04-12
| | | | | | ff_vc1_init_common() already does it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vc1: Don't pretend ff_vc1_init_common() can failAndreas Rheinhardt2021-04-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/msmpeg4enc: Remove dead code for inexistent VC-1 encoderAndreas Rheinhardt2021-04-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263dec, mpeg12dec: Remove redundant writesAndreas Rheinhardt2021-04-12
| | | | | | ff_mpv_decode_init() already sets MpegEncContext.codec_id. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rv34: Move dsp init code to rv30/rv40Andreas Rheinhardt2021-04-12
| | | | | | It avoids both runtime and compile-time checks. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mvi: Check audio_data_size to be non negativeMichael Niedermayer2021-04-11
| | | | | | | | Fixes: left shift of negative value -224 Fixes: 32144/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-4971479323246592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/qsvvpp: support async depthFei Wang2021-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Async depth will allow qsv filter cache few frames, and avoid force switch and end filter task frame by frame. This change will improve performance for some multi-task case, for example 1:N transcode( decode + vpp + encode) with all QSV plugins. Performance data test on my Coffee Lake Desktop(i7-8700K) by using the following 1:8 transcode test case improvement: 1. Fps improved from 55 to 130. 2. Render/Video usage improved from ~61%/~38% to ~100%/~70%.(Data get from intel_gpu_top) test CMD: ffmpeg -v verbose -init_hw_device qsv=hw:/dev/dri/renderD128 -filter_hw_device \ hw -hwaccel qsv -hwaccel_output_format qsv -c:v h264_qsv -i 1920x1080.264 \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - Signed-off-by: Fei Wang <fei.w.wang@intel.com> Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com> Signed-off-by: Zhong Li <zhongli_dev@126.com>
* avformat/rawenc: perform stream checks for mp2 muxerGyan Doshi2021-04-11
|
* avformat/img2dec: set r_frame_rate in addition to avg_frame_rateJan Ekström2021-04-11
| | | | | | | | | Apparently for various image sequences libavformat/utils.c can calculate rather fancy r_frame_rate values, such as `186/1921`, and since ffmpeg.c utilizes r_frame_rate for the filter chain time base, this can quite deteriorate the output frame timing - even though the user has requested the image sequence to be interpreted at a specific, constant frame rate.
* avfilter/overlay_cuda: check av_buffer_ref resultTimo Rothenpieler2021-04-11
|
* avfilter/vf_v360: unbreak fov_from_dfov() for (d)fisheye when width != heightPaul B Mahol2021-04-11
| | | | Based on patch by Daniel Playfair Cal.
* avfilter/overlay_cuda: hold explicit reference to hw_device_ctxTimo Rothenpieler2021-04-11
|
* avcodec/nvenc: add support for gbrp rgb inputTimo Rothenpieler2021-04-11
|
* doc/muxers: add entries for raw muxersGyan Doshi2021-04-11
|
* avfilter/vf_v360: allow user to control fov for equirectagular formatPaul B Mahol2021-04-11
| | | | It may be useful to use different values from typical 360/180 deg.
* doc/protocols: update rtsp optionsAndriy Gelman2021-04-10
| | | | | | Define listen_timeout and user_agent. Set timeout and user-agent to deprecated. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
* avcodec/adpcm: refactor init/flush codeZane van Iperen2021-04-10
| | | | | | | | | | | Most of the codecs just need everything zeroed. Those that don't are either handled inline during decode, or pull state from extradata. Move state reset/init functionality into adpcm_flush(), and invoke it from adpcm_decode_init(). Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcm_swf: remove memory allocation during trellis encodingZane van Iperen2021-04-10
| | | | | | | The block size is hardcoded, so the buffer size is always known. Statically allocate the buffer on the stack. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/matroskaenc: Fix leak when writing attachment without filenameAndreas Rheinhardt2021-04-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Deprecate bframe opts for encoders not supporting themAndreas Rheinhardt2021-04-10
| | | | | | | | | | | MPEG-1/2/4 are the only mpegvideo based encoders that support bframes; yet even the encoders not supporting bframes have options that only make sense for an encoder that supports bframes; setting any of these options for such an encoder has no impact on the encoded outcome (but setting b_strategy to two slows down encoding considerably). So deprecate these options. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Deprecate duplicate matrix opt for unsupported codecsAndreas Rheinhardt2021-04-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Deprecate a53cc option for encoders != MPEG-2Andreas Rheinhardt2021-04-10
| | | | | | | The MPEG-2 encoder is the only mpegvideo-based encoder that supports embedding a53 side data. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Deprecate mpeg_quant option for codecs != MPEG-4Andreas Rheinhardt2021-04-10
| | | | | | | | | | | | | | mpeg_quant may only be set for MPEG-4 and MPEG-2, yet for the latter it is no option as the code acts as if it were always set. So deprecate the option for all codecs for which it makes no sense. Furthermore, given that the code already errors out if the option is set for a codec that doesn't support it we can restrict the range of the option for all these codecs without breaking something. This means that the checks for whether mpeg_quant is set for these codecs can be removed as soon as AVCodecContext.mpeg_quant is removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Combine identical checksAndreas Rheinhardt2021-04-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Perform size/level/profile checks earlierAndreas Rheinhardt2021-04-10
| | | | | | | This has the advantage that one does not waste some allocations if one errors out because of these checks. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg12enc: Move MPEG-1/2 dimension checks to mpeg12encAndreas Rheinhardt2021-04-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Remove redundant time_base checkAndreas Rheinhardt2021-04-10
| | | | | | This check is dead as ff_encode_preinit() has an even stricter check. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_filter: Don't needlessly copy stringAndreas Rheinhardt2021-04-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_filter: Don't write string that is never usedAndreas Rheinhardt2021-04-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_filter: Avoid allocations when configuring output filtersAndreas Rheinhardt2021-04-10
| | | | | | Use an AVBPrint to handle the (typically short) strings involved here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>