summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* arm64: Add Armv8.3-A PAC support to assembly filesAndre Kempe2022-03-09
| | | | | | | | | | | This patch adds optional support for Arm Pointer Authentication Codes. PAC support is turned on or off at compile time using additional compiler flags. Unless any of these is enabled explicitly, no additional code will be emitted at all. Signed-off-by: André Kempe <andre.kempe@arm.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* lavfi/drawtext: Add %N for drawing fractions of a secondThilo Borgmann2022-03-08
| | | | Suggested-By: ffmpeg@fb.com
* avfilter/f_segment: fix sending frames with zero samples outPaul B Mahol2022-03-08
| | | | Fix max_samples variable type, and check for out of range values.
* avcodec/pngdec: support alpha blending for palette apngPaul B Mahol2022-03-08
| | | | Update clock test, as PAL8 apngs are now decoded as RGBA.
* avcodec/argo: Check packet sizeMichael Niedermayer2022-03-08
| | | | | | | | Fixes: Timeout Fixes: 45052/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-6033489206575104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/g729_parser: Check channelsMichael Niedermayer2022-03-08
| | | | | | | | | Fixes: signed integer overflow: 10 * 808464428 cannot be represented in type 'int' Fixes: assertion failure Fixes: ticket9651 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avidec: Check heightMichael Niedermayer2022-03-08
| | | | | | | Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: Ticket8486 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust threshold for targaMichael Niedermayer2022-03-08
| | | | | | | | Fixes: Timeout Fixes: 44877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-4870505251864576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: Better duplicate tags checkMichael Niedermayer2022-03-08
| | | | | | | | Fixes: memleaks Fixes: 44810/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5619494647627776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/f_sendcmd: export width and height tooPaul B Mahol2022-03-07
|
* avfilter/af_channelsplit: switch to activate()Paul B Mahol2022-03-07
|
* avfilter/af_acrossover: switch to activate()Paul B Mahol2022-03-07
|
* avfilter/vf_extractplanes: switch to activate()Paul B Mahol2022-03-07
| | | | | | | Fixes hang at end of input with this command: ffmpeg -f lavfi -i testsrc2=d=50,format=yuv444p -lavfi \ "extractplanes=y+u+v[y][u][v];[y]tpad=start=0[y];[u]tpad=start=0[u];[v]negate[v];[y][u][v]vstack=3" -f null -
* avfilter/split: switch to activate()Paul B Mahol2022-03-07
|
* libavfilter: vf_scale: Properly take in->color_range into accountMartin Storsjö2022-03-07
| | | | | | | | | | | | | | | | | | | | | While swscale can be reconfigured with sws_setColorspaceDetails, the in/out ranges also need to be set before calling sws_init_context, otherwise the initialization might choose fastpaths that don't take the ranges into account. Therefore, look at in->color_range too, when deciding on whether the scaler needs to be reconfigured. Add a new member variable for keeping track of this, for being able to differentiate between whether the scale filter parameter "in_range" has been set (which should override whatever the input frame has set) or whether it has been configured based on the latest frame (which should trigger reconfiguring the scaler if the input frame ranges change). Fixes: Ticket #9576 Signed-off-by: Martin Storsjö <martin@martin.st>
* avfilter/vf_colorlevels: Fix build failure on ARMMichael Niedermayer2022-03-06
| | | | | | | | | | This fixes building for arm after 10c2ef1ca41dbe7811f0588f4163c8cf7b8fda66. The argument to av_clip_uintp2 must be an assembly time immediate constant. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by and commit message details-by: Martin Storsjö <martin@martin.st> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vsrc_gradients: add radial gradientsPaul B Mahol2022-03-06
|
* avfilter/vsrc_gradients: add gbrapf32 format supportPaul B Mahol2022-03-06
|
* avfilter/vf_colorlevels: add planar rgb formats supportPaul B Mahol2022-03-06
|
* avcodec: add pcm-bluray encoderPaul B Mahol2022-03-06
|
* avformat/mpegtsenc: fix muxing pcm-blurayPaul B Mahol2022-03-06
|
* tests: update hash as output have changed again for fate-lavf-mxf_opatomPaul B Mahol2022-03-06
|
* avfilter/avf_ahistogram: use av_clip_uint8() insteadPaul B Mahol2022-03-06
|
* avcodec/dnxhdenc: fill unused bytes from put bits buffer with zerosPaul B Mahol2022-03-05
|
* avfilter/avf_ahistogram: add new histogram mode optionPaul B Mahol2022-03-05
|
* avcodec/dnxhdenc: retry increasing qscale to not overflow max_bitsPaul B Mahol2022-03-05
| | | | | | | Increase mb_bits type from uint16_t to uint32_t to fix possible overflows in bit size calculations. Update fate test that needs change.
* avcodec/dnxhdenc: fix possible out of bound writes for big w/hPaul B Mahol2022-03-04
| | | | It was caused by integer overflows.
* fftools/ffmpeg_opt: Apply copyinkf for all stream typesAndreas Rheinhardt2022-03-04
| | | | | | | | | | The earlier code has ignored it for all stream types except video and subtitles, probably because audio was presumed to only consist of keyframes. Yet this assumption is not true for e.g. TrueHD. Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_pad: use already available outlink variablePaul B Mahol2022-03-04
|
* avformat/mov: reindent after previous commitClément Bœsch2022-03-04
|
* avformat/mov: fix seeking with HEVC open GOP filesClément Bœsch2022-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was tested with medias recorded from an iPhone XR and an iPhone 13. Here is how a typical stream looks like in coding order: ┌────────┬─────┬─────┬──────────┐ │ sample | PTS | DTS | keyframe | ├────────┼─────┼─────┼──────────┤ ┊ ┊ ┊ ┊ ┊ │ 53 │ 560 │ 510 │ No │ │ 54 │ 540 │ 520 │ No │ │ 55 │ 530 │ 530 │ No │ │ 56 │ 550 │ 540 │ No │ │ 57 │ 600 │ 550 │ Yes │ │ * 58 │ 580 │ 560 │ No │ │ * 59 │ 570 │ 570 │ No │ │ * 60 │ 590 │ 580 │ No │ │ 61 │ 640 │ 590 │ No │ │ 62 │ 620 │ 600 │ No │ ┊ ┊ ┊ ┊ ┊ In composition/display order: ┌────────┬─────┬─────┬──────────┐ │ sample | PTS | DTS | keyframe | ├────────┼─────┼─────┼──────────┤ ┊ ┊ ┊ ┊ ┊ │ 55 │ 530 │ 530 │ No │ │ 54 │ 540 │ 520 │ No │ │ 56 │ 550 │ 540 │ No │ │ 53 │ 560 │ 510 │ No │ │ * 59 │ 570 │ 570 │ No │ │ * 58 │ 580 │ 560 │ No │ │ * 60 │ 590 │ 580 │ No │ │ 57 │ 600 │ 550 │ Yes │ │ 63 │ 610 │ 610 │ No │ │ 62 │ 620 │ 600 │ No │ ┊ ┊ ┊ ┊ ┊ Sample/frame 58, 59 and 60 are B-frames which actually depends on the key frame (57). Here the key frame is not an IDR but a "CRA" (Clean Random Access). Initially, I thought I could rely on the sdtp box (independent and disposable samples), but unfortunately: sdtp[54] is_leading:0 sample_depends_on:1 sample_is_depended_on:0 sample_has_redundancy:0 sdtp[55] is_leading:0 sample_depends_on:1 sample_is_depended_on:2 sample_has_redundancy:0 sdtp[56] is_leading:0 sample_depends_on:1 sample_is_depended_on:2 sample_has_redundancy:0 sdtp[57] is_leading:0 sample_depends_on:2 sample_is_depended_on:0 sample_has_redundancy:0 sdtp[58] is_leading:0 sample_depends_on:1 sample_is_depended_on:0 sample_has_redundancy:0 sdtp[59] is_leading:0 sample_depends_on:1 sample_is_depended_on:2 sample_has_redundancy:0 sdtp[60] is_leading:0 sample_depends_on:1 sample_is_depended_on:2 sample_has_redundancy:0 sdtp[61] is_leading:0 sample_depends_on:1 sample_is_depended_on:0 sample_has_redundancy:0 sdtp[62] is_leading:0 sample_depends_on:1 sample_is_depended_on:0 sample_has_redundancy:0 The information that might have been useful here would have been is_leading, but all the samples are set to 0 so this was unusable. Instead, we need to rely on sgpd/sbgp tables. In my case the video track contained 3 sgpd tables with the following grouping types: tscl, sync and tsas. In the sync table we have the following 2 entries (only): sgpd.sync[1]: sync nal_unit_type:0x14 sgpd.sync[2]: sync nal_unit_type:0x15 (The count starts at 1 because 0 carries the undefined semantic, we'll see that later in the reference table). The NAL unit types presented here correspond to: libavcodec/hevc.h: HEVC_NAL_IDR_N_LP = 20, libavcodec/hevc.h: HEVC_NAL_CRA_NUT = 21, In parallel, the sbgp sync table contains the following: ┌────┬───────┬─────┐ │ id │ count │ gdi │ ├────┼───────┼─────┤ │ 0 │ 1 │ 1 │ │ 1 │ 56 │ 0 │ │ 2 │ 1 │ 2 │ │ 3 │ 59 │ 0 │ │ 4 │ 1 │ 2 │ │ 5 │ 59 │ 0 │ │ 6 │ 1 │ 2 │ │ 7 │ 59 │ 0 │ │ 8 │ 1 │ 2 │ │ 9 │ 59 │ 0 │ │ 10 │ 1 │ 2 │ │ 11 │ 11 │ 0 │ └────┴───────┴─────┘ The gdi column (group description index) directly refers to the index in the sgpd.sync table. This means the first frame is an IDR, then we have batches of undefined frames interlaced with CRA frames. No IDR ever appears again (tried on a 30+ seconds sample). With that information, we can build an heuristic using the presentation order. A few things needed to be introduced in this commit: 1. min_sample_duration is extracted from the stts: we need the minimal step between sample in order to PTS-step backward to a valid point 2. In order to avoid a loop over the ctts table systematically during a seek, we build an expanded list of sample offsets which will be used to translate from DTS to PTS 3. An open_key_samples index to keep track of all the non-IDR key frames; for now it only supports HEVC CRA frames. We should probably add BLA frames as well, but I don't have any sample so I prefered to leave that for later It is entirely possible I missed something obvious in my approach, but I couldn't come up with a better solution. Also, as mentioned in the diff, we could optimize is_open_key_sample(), but the linear scaling overhead should be fine for now since it only happens in seek events. Fixing this issue prevents sending broken packets to the decoder. With FFmpeg hevc decoder the frames are skipped, with VideoToolbox the frames are glitching.
* avformat/mov: add parsing for the sgpd sync boxClément Bœsch2022-03-04
| | | | | | | | | | | sgpd means Sample Group Description Box. For now, only the sync grouping type is parsed, but the function can easily be adjusted to support other flavours. The sbgp (Sample to Group Box) sync_group table built in previous commit contains references to this table through the group_description_index field.
* avformat/mov: add support for sync group in sbgp boxClément Bœsch2022-03-04
|
* avformat/mov: prepare sbgp parsing for other grouping typesClément Bœsch2022-03-04
|
* avfilter/vf_zscale: fix leaks in fast/bypass pathPaul B Mahol2022-03-04
|
* avfilter/avf_abitscope: make frame writable before writing to itPaul B Mahol2022-03-04
|
* avfilter/avf_aphasemeter: make frame writable before writing to itPaul B Mahol2022-03-04
|
* avfilter/avf_ahistogram: make frame writable before writing to itPaul B Mahol2022-03-04
|
* avfilter/avf_avectorscope: make frame writable before writing to itPaul B Mahol2022-03-04
|
* avfilter/f_ebur128: make sure frame is writable before writing to itPaul B Mahol2022-03-04
|
* avfilter/f_graphmonitor: add several more flagsPaul B Mahol2022-03-04
|
* avfilter/f_ebur128: switch to activate()Paul B Mahol2022-03-04
|
* configure: Fix detecting/using getauxvalMartin Storsjö2022-03-04
| | | | | | | While trying to detect getauxval, this actually never output HAVE_GETAUXVAL into config.h before. Signed-off-by: Martin Storsjö <martin@martin.st>
* avfilter/asrc_sinc: check allocation return valuePaul B Mahol2022-03-03
|
* avfilter/asrc_sinc: remove no longer correct (un)packPaul B Mahol2022-03-03
|
* avcodec/tiff: do not abort on zero denominatorPaul B Mahol2022-03-03
| | | | Fixes decoding valid DNG file.
* avfilter/framepool: remove superfluous pallete buffer allocationJames Almer2022-03-03
| | | | | | | av_image_fill_plane_sizes() already sets sizes[1] to AVPALETTE_SIZE. Should fix memory leaks. Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/framepool: use av_image_fill_plane_sizes() to calculate pool sizesJames Almer2022-03-03
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_zscale: fix several issues in previous commitPaul B Mahol2022-03-03
|
* avfilter/vf_zscale: add slice threading supportVictoria Zhislina2022-03-03
| | | | | | | | | | | By ffmpeg threading support implementation via frame slicing and doing zimg_filter_graph_build that used to take 30-60% of each frame processig only if necessary (some parameters changed) the performance increase vs original version in video downscale and color conversion >4x is seen on 64 cores Intel Xeon, 3x on i7-6700K (4 cores with HT) Signed-off-by: Victoria Zhislina <Victoria.Zhislina@intel.com>