summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avformat/demux: Remove fake-loopAndreas Rheinhardt2021-12-16
| | | | | | | When flushing, try_decode_frame() itself loops until the desired properties have been found or the decoder is drained. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h2645_parse: Move ref_idc further up in H2645NALAndreas Rheinhardt2021-12-16
| | | | | | | | This puts it directly near the NALU type which is more natural and furthermore reduces the size of the structure because it can be placed in padding (on 64-bit systems). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h2645_parse: Remove H2645NAL.rbsp_bufferAndreas Rheinhardt2021-12-16
| | | | | | | | | | Forgotten in 03b82b3ab9883cef017e513c7d0b3b986b3b3e7b. (Moving data to the front is only done to make existing initializations like H2645NAL nal = { NULL } not emit int->pointer conversion warnings.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libswscale: Adds ff_hscale8to15_4_avx2 and ff_hscale8to15_X4_avx2 for all ↵Alan Kelly2021-12-15
| | | | | | | | | | filter sizes. Fixes so that fate under 64 bit Windows passes. These functions replace all ff_hscale8to15_*_ssse3 when avx2 is available. Signed-off-by: James Almer <jamrial@gmail.com>
* lavfi/vf_libplacebo: update deprecated option nameNiklas Haas2021-12-15
| | | | | | | | This was renamed upstream quite a while ago (v3.112.0). Rename the option name as well for consistency (and expand the description just slightly). Signed-off-by: Niklas Haas <git@haasn.dev>
* vf_libplacebo: switch to newer libplacebo helpersNiklas Haas2021-12-15
| | | | | | | | | | | | | | | | | Support for mapping/unmapping hardware frames has been added into libplacebo itself, so we can scrap this code in favor of using the new functions. This has the additional benefit of being forwards-compatible as support for more complicated frame-related state management is added to libplacebo (e.g. mapping dolby vision metadata). It's worth pointing out that, technically, this would also allow `vf_libplacebo` to accept, practically unmodified, other frame types (e.g. vaapi or drm), or even software input formats. (Although we still need a vulkan *device* to be available) To keep things simple, though, retain the current restriction to vulkan frames. It's possible we could rethink this in a future commit, but for now I don't want to introduce any more potentially breaking changes.
* avcodec: [loongarch] Optimize pred16x16_plane with LASX.Hao Chen2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:295 after :296 Change-Id: I281bc739f708d45f91fc3860150944c0b8a6a5ba Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264_deblock with LASX.Jin Bo2021-12-15
| | | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:293 after :295 Change-Id: I5ff6cba4eaca0c4218c0c97b880ca500e35f9c87 Signed-off-by: Hao Chen <chenhao@loongson.cn> Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264idct with LASX.Lu Wang2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:282 after :293 Change-Id: Ia8889935a6359630dd5dbb61263287f1cb24a0a4 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264dsp with LASX.gxw2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:225 after :282 Change-Id: Ibe245827dcdfe8fc1541c6b172483151bfa9e642 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264qpel with LASX.Shiyou Yin2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:183 after :225 Change-Id: I7c7d2f34cd82ef728aab5ce8f6bfb46dd81f0da4 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: [loongarch] Optimize h264_chroma_mc with LASX.Shiyou Yin2021-12-15
| | | | | | | | | | | ./ffmpeg -i ../1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an before:170 after :183 Change-Id: I42ff23cc2dc7c32bd1b7e4274da9d9ec87065f20 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: [loongarch] Add support for loongarch SIMD.Shiyou Yin2021-12-15
| | | | | | | | | | | LSX and LASX is loongarch SIMD extention. They are enabled by default if compiler support it, and can be disabled with '--disable-lsx' '--disable-lasx'. Change-Id: Ie2608ea61dbd9b7fffadbf0ec2348bad6c124476 Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: guxiwei <guxiwei-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_astats: improve options descriptionsLimin Wang2021-12-14
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtpdec_rfc4175: cosmetic changesLimin Wang2021-12-14
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/hlsenc: deprecate hls_ts_options optionSteven Liu2021-12-13
| | | | | | | Because the hls_ts_options will be misunderstand by user, and then user can use hls_segment_options instead of hls_ts_options. Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
* avformat/hlsenc: add hls_segment_options correct the segment options nameSteven Liu2021-12-13
| | | | | | | Because the hls_ts_options will be misunderstand by user that only can be used in mpegts segments option. So add this option for segments. Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
* avcodec/mmaldec: Deduplicate AVClassesAndreas Rheinhardt2021-12-12
| | | | | | | Possible now that the child_class_next API is gone. Tested-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mmaldec: Avoid creating unnecessary reference, simplify codeAndreas Rheinhardt2021-12-12
| | | | | | | | | | ffmal_add_packet() basically duplicated the logic in av_packet_make_refcounted() with the added twist that it always created a reference even if one is already available. This commit stops doing this. Tested-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mmaldec: fix pointer type warningHo Ming Shun2021-12-12
| | | | | Tested-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Ho Ming Shun <cyph1984@gmail.com>
* avcodec/mmaldec: re-use AVPacket for extra_dataHo Ming Shun2021-12-12
| | | | | | | | | | | | extra_data and normal packets (from ff_decode_get_packet) processing do not overlap, thus we can re-use the spare AVPacket to send to ffmmal_add_packet. Furthermore, this removes allocation of AVPacket on the stack and stops using deprecated av_init_packet. Tested-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Ho Ming Shun <cyph1984@gmail.com>
* avcodec/mmaldec: use decoupled dataflowHo Ming Shun2021-12-12
| | | | | | | | | | | | | | | | | | MMAL is an fundamentally an asynchronous decoder, which was a bad fit for the legacy dataflow API. Often multiple packets are enqueued before a flood of frames are returned from MMAL. The previous lockstep dataflow meant that any delay in returning packets from the VPU would cause ctx->queue_decoded_frames to grow with no way of draining the queue. Testing this with mpv streaming from a live RTSP source visibly reduced latency introduced by frames waiting in queue_decoded_frames from roughly 2s to 0. Tested-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Ho Ming Shun <cyph1984@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: add audio dynamic equalizer filterPaul B Mahol2021-12-12
|
* avformat/img2enc: do not ignore IO errorsMarton Balint2021-12-12
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: introduce AVFormatContext io_close2 which returns an intMarton Balint2021-12-12
| | | | | | | | | | | | | | | | | Otherwise there is no way to detect an error returned by avio_close() because ff_format_io_close cannot get the return value. Checking the return value of the close function is important in order to check if all data was successfully written and the underlying close() operation was successful. It can also be useful even for read mode because it can return any pending AVIOContext error, so the user don't have to manually check AVIOContext->error. In order to still support if the user overrides io_close, the generic code only uses io_close2 if io_close is either NULL or the default io_close callback. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffmpeg: close output files before cleanupMarton Balint2021-12-12
| | | | | | This allows us to check the return value of avio_closep(). Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/aviobuf: return stored AVIO context error on avio_closeMarton Balint2021-12-12
| | | | | | Otherwise IO errors at avio_flush() before closing may be lost. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/file: use proper return value in file_closeMarton Balint2021-12-12
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/movtextenc: Check for existence of font name before using itCharlie Monroe2021-12-11
| | | | | | | | Fixes crashes if the font name is NULL (which it is if a \fn tag is not followed by a font name). Signed-off-by: Charlie Monroe <charlie@charliemonroe.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Fix wrong error codeAndreas Rheinhardt2021-12-11
| | | | | Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Switch to pointer comparisons and bytestream APIAndreas Rheinhardt2021-12-11
| | | | | | | | Improves readability and avoids a redundant index variable that was mistakenly called "tracksize". Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Redo TextSampleModifierBox size checksAndreas Rheinhardt2021-12-11
| | | | | | | | | | | | The current checks just check whether the boxes fit into the remaining size of the packet instead of whether they actually fit into the box size. This has been changed; part of this change is to pass the size of the box (minus the box header) as parameter instead of a pointer to the AVPacket by which the box parsing function is supposed to recalculate whether enough data is available. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Use const where appropriateAndreas Rheinhardt2021-12-11
| | | | | Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Improve size checkAndreas Rheinhardt2021-12-11
| | | | | Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Switch to smaller typeAndreas Rheinhardt2021-12-11
| | | | | | | | | | The base size of a box refers to the size the box has in a file, not in memory; so size_t is not their natural type. Therefore use a plain unsigned which is smaller on 64bit systems and still big enough to represent any conceivable base size. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_transpose_vulkan: simplify config_props_output functionWu Jianhua2021-12-10
| | | | | | | It's no need to assign outlink here, which has been done in ff_vk_filter_config_output already. Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter/vf_transpose_vulkan: add clock and cclock optionWu Jianhua2021-12-10
| | | | | | | | | | | | | | | | | | | | | | The following command is on how to apply cclock option: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan=dir=cclock,hwdownload,format=yuv420p \ output.264 The following command is on how to apply clock_flip option: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan=dir=clock_flip,hwdownload,format=yuv420p \ output.264 The following command is on how to apply clock option: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan=dir=clock,hwdownload,format=yuv420p \ output.264 Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* hwcontext_vulkan: wait on semaphores when exporting to DRMLynne2021-12-10
| | | | There is no synchronization method for DRM yet.
* lavu: bump minor version and add doc/APIchanges entry for Vulkan changesLynne2021-12-10
|
* hwcontext_vulkan: stricter semaphore number requirementsLynne2021-12-10
| | | | | | Always require one semaphore per sw_format plane. This is what the implementation uses and relies upon throughout. This was a leftover from an earlier revision that was never needed.
* hwcontext_vulkan: support creating DRM-tiled images and autodetecting modifiersWenbin Chen2021-12-10
| | | | | | | | | | | | | | | When vulkan image exports to drm, the tilling need to be VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. Now add code to create vulkan image using this format. Now the following command line works: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format \ vaapi -i input_1080p.264 -vf "hwmap=derive_device=vulkan,format=vulkan, \ scale_vulkan=1920:1080,hwmap=derive_device=vaapi,format=vaapi" -c:v h264_vaapi output.264 Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Further-modifications-by: Lynne <dev@lynne.ee>
* hwcontext_vulkan: add support for mapping frames with planes in a single ↵Wenbin Chen2021-12-10
| | | | | | | | | | VkDeviceMemory Add support to map vulkan frames to software frames when using contiguous_planes flag. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Further-modifications-by: Lynne <dev@lynne.ee>
* hwcontext_vulkan: add support for allocating all planes in a single allocationWenbin Chen2021-12-10
| | | | | | | | | | | | | | VAAPI on Intel can import external frame, but the planes of the external frames should be in the same drm object. A new option "contiguous_planes" is added to device. This flag tells device to allocate places in one memory. When device is derived from vaapi this flag will be enabled. A new flag frame_flag is also added to AVVulkanFramesContext. User can use this flag to force enable or disable this behaviour. A new variable "offset "is added to AVVKFrame. It describe describe the offset from the memory currently bound to the VkImage. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Further-modifications-by: Lynne <dev@lynne.ee>
* libavutil/hwcontext_vaapi: Add a new nv12 format map to support vulkan frameWenbin Chen2021-12-10
| | | | | | | Vulkan will map nv12 to R8 and GR88, so add this map to vaapi to support vulkan frame. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
* hwcontext_vaapi: Use PRIME_2 memory type for modifiers.Bas Nieuwenhuizen2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | This way we can pass explicit modifiers in. Sometimes the modifier matters for the number of memory planes that libva accepts, in particular when dealing with driver-compressed textures. Furthermore the driver might not actually be able to determine the implicit modifier if all the buffer-passing has used explicit modifier. All these issues should be resolved by passing in the modifier, and for that we switch to using the PRIME_2 memory type. Tested with experimental radeonsi patches for modifiers and kmsgrab. Also tested with radeonsi without the patches to double-check it works without PRIME_2 support. v2: Cache PRIME_2 support to avoid doing two calls every time on libva drivers that do not support it. v3: Remove prime2_vas usage. Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
* avfilter: add a transpose_vulkan filterWu Jianhua2021-12-10
| | | | | | | | The following command is on how to apply transpose_vulkan filter: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan,hwdownload,format=yuv420p output.264 Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avfilter/vf_transpose: fix un-checked potential memory allocation failureWu Jianhua2021-12-10
| | | | Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
* avformat/mxfdec: Check for duplicate mxf_read_index_entry_array()Michael Niedermayer2021-12-09
| | | | | | | | | Fixes: memleak Fixes: 41596/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-6439060204290048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Change avg to uint32_tMichael Niedermayer2021-12-09
| | | | | | | | | Fixes: Integer overflow Fixes: 40973/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6739312704618496 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Suggested-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/targa: Do not return images when there is no image in the tgaMichael Niedermayer2021-12-09
| | | | | | | | Fixes: Timeout Fixes: 35877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-5407292819374080 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>