summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/omx: Remove remnants of old preallocated buffersAndreas Rheinhardt2021-06-08
| | | | | | | | | There are no preallocated buffer packets any more; this feature only worked with the old encode API and only until said API was turned into a wrapper for the new API in 93016f5d1d280f9cb7856883af287fa66affc04c. So remove its remnants. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dvenc: Avoid copying packet data, allow user-supplied buffersAndreas Rheinhardt2021-06-08
| | | | | | | | | | | | When the packet size is known in advance like here, one can avoid an intermediate buffer for the packet data; this also makes it easy to allow user-supplied buffers. Only one thing needed to be changed: The earlier code relied on the buffer having been initially zeroed by av_fast_padded_malloc(), so one now needs to zero the packet at first. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/overlay_cuda: add hsub and vsub compute x and y positionsSteven Liu2021-06-07
| | | | | | | | | | | | | | | | fix problem when set x to odd number in nv12 by cuda test step: 1. ffmpeg -f lavfi testsrc2=s=176x144 -pix_fmt nv12 -t 1 output_overlay.yuv 2. ffmpeg -f lavfi testsrc2=s=352x288 -pix_fmt nv12 -t 1 output_main.yuv before this patch: overlay_cuda=x=0:y=0 will right, overlay_cuda=x=3:y=0 will wrong, both will right after patch. Signed-off-by: Steven Liu <liuqi05@kuaishou.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: add option to disable all extra SEI dataTimo Rothenpieler2021-06-06
| | | | | | | | | | | With these triggering a lot of crashes recently, an option to globally disable all of them is added as a tool to work around those crashes in case the SEI data is not needed by the user. Also re-enables s12m for hevc_nvenc, since the issue is not specifically with that, but it affects all SEI data. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* configure: detect nvcc without sm_30 supportTimo Rothenpieler2021-06-06
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* swscale/swscale_unscaled: don't use the optimized bgr24toYV12 unscaled ↵Limin Wang2021-06-06
| | | | | | | conversion when width%2 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rpl: Use 64bit in bitrate computation and check itMichael Niedermayer2021-06-05
| | | | | | | | Fixes: signed integer overflow: 777777776 * 4 cannot be represented in type 'int' Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-6726188921913344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_hqdn3d: fix left shift of negative numbersValerii Zapodovnikov2021-06-05
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/dnn/dnn_io_proc.c: fix CID 1484955Guo Yejun2021-06-05
| | | | CID 1484955: Memory - corruptions (ARRAY_VS_SINGLETON)
* fftools/ffmpeg: remove usage of internal timestamp AVStream fieldsJames Almer2021-06-04
| | | | | | They should not be accessed outside of libavformat. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: extract sei data prep into own functionTimo Rothenpieler2021-06-04
|
* avcodec/nvenc: write out user data unregistered SEIBrad Hards2021-06-04
| | | | | Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/nvenc: use persistent sei data bufferBrad Hards2021-06-04
| | | | | Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* libavcodec/mips: Fix fate errors reported by clangJin Bo2021-06-03
| | | | | | | | The data width of gsldrc1/gsldlc1 should be 8 bytes wide. Signed-off-by: Jin Bo <jinbo@loongson.cn> Reviewed-by: yinshiyou-hf@loongson.cn Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/mips: Fix build errors reported by clangJin Bo2021-06-03
| | | | | | | | | | Clang is more strict on the type of asm operands, float or double type variable should use constraint 'f', integer variable should use constraint 'r'. Signed-off-by: Jin Bo <jinbo@loongson.cn> Reviewed-by: yinshiyou-hf@loongson.cn Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeglsdec: force pal8 only onceMichael Niedermayer2021-06-02
| | | | | | | | | | | Fixes: Infinite loop Fixes: 33958/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-6590264069193728 Fixes: 33981/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5343224173559808 Fixes: 33986/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-6598815122587648 Fixes: 34001/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMVJPEG_fuzzer-6171098111672320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: Fix order of condition for pal8Michael Niedermayer2021-06-02
| | | | | | | | | Fixes: out of array access Fixes: 33960/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-5052852809629696 Fixes: 34163/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-6123678099177472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpegvideo_enc: Reset stuffing bits if they are not supportedMichael Niedermayer2021-06-02
| | | | | | | Fixes: Assertion failure Fixes: Ticket8202 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/svq1enc: Do not print debug RD value before it has been computedMichael Niedermayer2021-06-02
| | | | | | | | Avoids floating point division by 0 Fixes: Ticket8191 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacpsy: Check bandwidthMichael Niedermayer2021-06-02
| | | | | | Fixes: Ticket8011 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacenc: Do not divide by lambda_count if it is 0Michael Niedermayer2021-06-02
| | | | | | | | Avoids Floating point division by 0 Fixes: Ticket8011 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacenc: Use FLT_EPSILON for lambda minimumMichael Niedermayer2021-06-02
|
* pixfmt: fixed wrong fix of commentValerii Zapodovnikov2021-06-02
| | | | | | | | | | | | This mostly reverts 785bfb1d7bb8de567c3aac1d9cc369b55ac9fb7b. But I also added some clarifications so that nobody mixes primaries with matrix again. SMPTE 240 and 170 primaires are the same, while matrix coeff. are different, because 240 is derived from 170's new primaries and white point while 170 uses BT.601 derived from BT.470 System M (yes, with Illuminant C) a.k.a. NTSC 1953. Some nits too. Reviewed-by: Reto Kromer <lists@reto.ch> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: add option to use tfdt for fragment timestamps.Gyan Doshi2021-06-02
|
* avcodec/movenc: fix spelling in warning messageJoel Linn2021-06-01
| | | | hldr -> hdlr
* lavf/dashenc.c: Fix creating audio-only HLS playlistsPrzemysław Sobala2021-06-01
| | | | | | | | With audio/video HLS playlists, audio chunklists are treated as alternative renditions for video chunklists. This is wrong for audio-only HLS playlists. fixes: 9252
* avutil/mem: use GCC builtins to check for overflow in av_size_mult()James Almer2021-05-31
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hls: relay format options to segment demuxerGyan Doshi2021-05-30
| | | | | Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro> Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
* avcodec/nvenc: disable s12m timestamps by defaultTimo Rothenpieler2021-05-29
| | | | | Leads to weird crashes with valid looking input data for otherwise unknown reasons.
* avfilter/yadif_cuda: Fix time base for large denominatorsPhilip Langdale2021-05-29
| | | | | | This is the same fix applied to regular yadif. Signed-off-by: Philip Langdale <philipl@overt.org>
* avfilter/bwdif: Fix time base for large denominatorsPhilip Langdale2021-05-29
| | | | | | This is the same fix applied to regular yadif. Signed-off-by: Philip Langdale <philipl@overt.org>
* avfilter/vf_yadif: Fix handing of tiny imagesMichael Niedermayer2021-05-29
| | | | | | | | Fixes: out of array access Fixes: Ticket8240 Fixes: CVE-2020-22021 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_vmafmotion: Check dimensionsMichael Niedermayer2021-05-29
| | | | | | | | | | Fixes: out of array access Fixes: Ticket8241 Fixes: Ticket8246 Fixes: CVE-2020-22019 Fixes: CVE-2020-22033 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: Check pal_size before useMichael Niedermayer2021-05-29
| | | | | | | | | Fixes: assertion failure Fixes: out of array read Fixes: Ticket8190 Fixes: CVE-2020-22015 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/lpc: Avoid floating point division by 0Michael Niedermayer2021-05-29
| | | | | | | Fixes: Ticket7996 Fixes: CVE-2020-20445 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacpsy: Avoid floating point division by 0 of norm_facMichael Niedermayer2021-05-29
| | | | | | | Fixes: Ticket7995 Fixes: CVE-2020-20446 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacenc: Avoid 0 lambdaMichael Niedermayer2021-05-29
| | | | | | | Fixes: Ticket8003 Fixes: CVE-2020-20453 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_subtitles: allow using embedded fontsOneric2021-05-29
| | | | | ASS subtitles can have encoded fonts embedded into the subtitle file itself. Allow libass to load those, to render subs as intended.
* libavcodec/mips: Fix specification of instruction nameJin Bo2021-05-28
| | | | | | | | | | | 1.'xor,or,and' to 'pxor,por,pand'. In the case of operating FPR, gcc supports both of them, clang only supports the second type. 2.'dsrl,srl' to 'ssrld,ssrlw'. In the case of operating FPR, gcc supports both of them, clang only supports the second type. Signed-off-by: Jin Bo <jinbo@loongson.cn> Reviewed-by: yinshiyou-hf@loongson.cn Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/dnn_backend_openvino.c: Correct Pointer Type while FreeingShubhanshu Saxena2021-05-28
| | | | | | | This commit corrects the type of pointer of elements from the inference queue in ff_dnn_free_model_ov. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* avfilter/yadif: Fix time base for large denominatorsTom Boshoven2021-05-27
| | | | | | | This fixes an issue where the yadif filter could cause the timebase denominator to overflow. Signed-off-by: Tom Boshoven <tom@jwplayer.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: More strictly check dc_countMichael Niedermayer2021-05-27
| | | | | | | | Fixes: out of array access Fixes: exr/deneme Found-by: Burak Çarıkçı <burakcarikci@crypttech.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: x/ymax cannot be INT_MAXMichael Niedermayer2021-05-27
| | | | | | | | | | The code uses x/ymax + 1 so the maximum is INT_MAX-1 Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 33158/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5545462457303040 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/error_resilience: cleanup mpeg2 handlingMichael Niedermayer2021-05-27
| | | | | | After this, the loop for the mpeg2 case is only executed when needed Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/avio: Check av_opt_copy() for failureMichael Niedermayer2021-05-27
| | | | | | Fixes: CID1477416 Unchecked return value Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/moflex: Remove unneeded format variableMichael Niedermayer2021-05-27
| | | | | | Fixes: CID1477423 Uninitialized scalar variable Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/mem: check for max_alloc_size in av_fast_malloc()James Almer2021-05-27
| | | | | | This puts av_fast_malloc*() in line with av_fast_realloc(). Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/mem: make ff_fast_malloc() internal to mem.cJames Almer2021-05-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/utils: don't use ff_fast_mallocz() in av_fast_padded_malloc()James Almer2021-05-27
| | | | | | It will be removed in the next commit. Signed-off-by: James Almer <jamrial@gmail.com>
* libavfilter: vf_drawtext filter support draw text with detection bounding ↵Ting Fu2021-05-26
| | | | | | | | | | | | | | | boxes in side_data This feature can be used with dnn detection by setting vf_drawtext's option text_source=side_data_detection_bboxes, for example: ./ffmpeg -i face.jpeg -vf dnn_detect=dnn_backend=openvino:model=face-detection-adas-0001.xml:\ input=data:output=detection_out:labels=face-detection-adas-0001.label,drawbox=box_source= side_data_detection_bboxes,drawtext=text_source=side_data_detection_bboxes:fontcolor=green:\ fontsize=40, -y face_detect.jpeg Please note, the default fontsize of vf_drawtext is 12, which may be too small to be seen clearly. Signed-off-by: Ting Fu <ting.fu@intel.com>