summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
* avutil/hwcontext_qsv: Remove redundant checkAndreas Rheinhardt2021-11-18
| | | | | | | | | | | | | It has already been checked immediately before that said AVDictionaryEntry exists; checking again is redundant. Furthermore, av_hwdevice_find_type_by_name() requires its argument to be non-NULL, so adding a codepath that automatically calls it with that parameter is nonsense. The same goes for the argument corresponding to %s. Fixes Coverity issue 1491394. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/hwcontext_qsv: Fix leak of AVBuffer and AVBufferRefAndreas Rheinhardt2021-11-18
| | | | | | | | | This av_buffer_create() does nothing but leak an AVBuffer and an AVBufferRef (except on allocation error). Fixes Coverity issue 1491393. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* vulkan_loader: fix typo in error messageLynne2021-11-18
|
* avutil: Add Dolby Vision RPU side data typeDerek Buitenhuis2021-11-17
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* aarch64: Add Armv8.5-A BTI supportJonathan Wright2021-11-16
| | | | | | | | | | | | | | | | | Add Branch Target Identifiers (BTIs) to all functions defined in AArch64 assembly files. Most of the BTI landing pads are added automatically by the 'function' macro. BTI support is turned on or off at compile time based on the presence of the __ARM_FEATURE_BTI_DEFAULT feature macro. A binary compiled with BTI support can be executed on an Armv8-A processor without BTI support because the instructions are defined in NOP space. Signed-off-by: Jonathan Wright <jonathan.wright@arm.com> Signed-off-by: Elijah Ahmad <elijah.ahmad@arm.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* libavutil/common: clip nan value to aminMark Reid2021-11-15
| | | | | | | | | | | | Changes av_clipf to return amin if a is nan. Before if a is nan av_clipf_c returned nan and av_clipf_sse would return amax. Now the both should behave the same. This works because nan > amin is false. The max(nan, amin) will be amin. Signed-off-by: James Almer <jamrial@gmail.com>
* */version.h: define FF_API macros unconditionallyAnton Khirnov2021-11-15
| | | | | | | There is no reason to wrap them in #ifndef guards, they should only be defined here and nowhere else. The define guards just add the possibility to accidentally use the same FF_API name in different libraries.
* avutil/hwcontext_vulkan: add support for exporting memory via Win32 HandlesTimo Rothenpieler2021-11-14
|
* avutil/vulkan: load win32 external memory functionsTimo Rothenpieler2021-11-14
|
* avutil/opt: fix mis-alignment of option and constant values for filter helpSoft Works2021-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before: overlay AVOptions: x <string> ..FV....... set the x expression (default "0") y <string> ..FV....... set the y expression (default "0") eof_action <int> ..FV....... Action to take when encountering EOF from secondary input (from 0 to 2) (default repeat) repeat 0 ..FV....... Repeat the previous frame. endall 1 ..FV....... End both streams. pass 2 ..FV....... Pass through the main input. eval <int> ..FV....... specify when to evaluate expressions (from 0 to 1) (default frame) After: a overlay AVOptions: x <string> ..FV....... set the x expression (default "0") y <string> ..FV....... set the y expression (default "0") eof_action <int> ..FV....... Action to take when encountering EOF from secondary input (from 0 to 2) (default repeat) repeat 0 ..FV....... Repeat the previous frame. endall 1 ..FV....... End both streams. pass 2 ..FV....... Pass through the main input. eval <int> ..FV....... specify when to evaluate expressions (from 0 to 1) (default frame) Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/hwcontext_dxva2: add ARGB formatSoft Works2021-11-13
| | | | | | | | Required for uploading frames with alpha for qsv_overlay (v2: remove tab indent) Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* hwcontext_vaapi: don't use the generic mapping struct for DRM/VAAPILynne2021-11-13
| | | | Avoids a per-frame allocation since we don't need the flag field.
* hwcontext_vulkan: fix small memory leak when unmappingLynne2021-11-13
|
* hwcontext_vulkan: wait for semaphores when unmapping from VAAPILynne2021-11-13
| | | | | We don't really want to do a full all-queue blocking wait here, since this happens once per frame, and this could delay future frames.
* hwcontext_vulkan: print error information on queue submission failureLynne2021-11-13
| | | | Makes it clearer what went wrong.
* hwcontext_vulkan: fix DMABUF import format check callLynne2021-11-13
| | | | | VkExternalImageFormatProperties is required to be present in the .pNext chain of VkImageFormatProperties2, or some drivers crash (RADV).
* hwcontext_vulkan: improve CUDA error handlingLynne2021-11-13
|
* hwcontext_vulkan: close exported memory FD on CUDA import errorLynne2021-11-13
| | | | Prevents resource leakage.
* hwcontext_vulkan: do not dup() semaphore FDs for CUDALynne2021-11-13
|
* hwcontext_vulkan: properly migrate queue families with DRM import/exportLynne2021-11-13
|
* hwcontext_vulkan: properly migrate between queue families on CUDA import/exportLynne2021-11-13
| | | | It's more correct.
* hwcontext_vulkan: properly error out if timeline semaphores are unsupportedLynne2021-11-13
| | | | Missing goto.
* hwcontext_vulkan: fix CreateSemaphore conflict with synchapi.hLynne2021-11-12
| | | | | | Include windows.h to fix it. Normally, it'd be better to include it in vulkan_functions.h, but I'm reasonably confident nothing else that uses the Vulkan code will need to include Windows functions and not windows.h.
* hwcontext_vulkan: use vkDeviceWaitIdle instead of vkWaitSemaphores on uninitLynne2021-11-12
| | | | | To silence a possible validation layer bug, switch the function. It only gets triggered by vf_libplacebo, which is odd.
* doc/APIchanges: update for Vulkan API changesLynne2021-11-12
|
* lavu: move hwcontext_vulkan's function loader into separate filesLynne2021-11-12
| | | | This allows for the loader to be shared with libavcodec and libavfilter.
* hwcontext_vulkan: clean up extensions code and add additional defaultsLynne2021-11-12
|
* hwcontext_vulkan: host wait on semaphores before freeing frameLynne2021-11-12
|
* hwcontext_vulkan: report device that's usedLynne2021-11-12
| | | | Not sure why this wasn't done before.
* vulkan: add support for encode and decode queues and refactor queue codeLynne2021-11-12
| | | | | | | | | This simplifies and makes queue family picking simpler and more robust. The requirements on the device context are relaxed. They made no sense in the first place. The video encode/decode extension is still in beta, at least on paper, but I really doubt they'd change needing a separate queue family.
* hwcontext_vulkan: port CUDA interop to use timeline semaphoresLynne2021-11-12
|
* hwcontext_vulkan: fix mapping from/to DRM/VAAPI framesLynne2021-11-12
|
* hwcontext_vulkan: switch to using timeline semaphoresLynne2021-11-12
|
* hwcontext_vulkan: bump required Vulkan loader version to 1.2Lynne2021-11-12
|
* avutil/opt: handle whole range of int64_t in av_opt_get_intZhao Zhili2021-11-11
| | | | | | | Make get_int/set_int symetric. The int64_t to double to int64_t conversion is unprecise for large value. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/parseutils: add qhd(Quad HD) or wqhd(Wide Quad HD) for 1440pLimin Wang2021-11-03
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avutil/hwcontext_videotoolbox: fix use of unknown builtin '__builtin_available'Limin Wang2021-11-03
| | | | | | | | OSX version: 10.11.6 Apple LLVM version 8.0.0 (clang-800.0.42.1) Target: x86_64-apple-darwin15.6.0 Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avutil/mathematics: Document av_rescale_rnd() behavior on non int64 resultsMichael Niedermayer2021-10-21
| | | | | Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/detection_bbox: Fix av_detection_bbox_alloc failed if nb_bboxes == 0Limin Wang2021-10-08
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avutil/detection_bbox: use offsetof for bboxes_offsetLimin Wang2021-10-08
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avutil/md5: Avoid av_unused variableAndreas Rheinhardt2021-10-02
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/utils: Remove racy check from avutil_version()Andreas Rheinhardt2021-09-29
| | | | | | | | | | | | | | | | avutil_version() currently performs several checks before just returning the version. There is a static int that aims to ensure that these tests are run only once. The reason is that there used to be a slightly expensive check, but it has been removed in 92e3a6fdac73f7e1d69d69717219a7538877d7a0. Today running only once is unnecessary and can be counterproductive: GCC 10 optimizes all the actual checks away, but the checks_done variable and the code setting it has been kept. Given that this check is inherently racy (it uses non-atomic variables), it is best to just remove it. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/tests/opt: Set AVClass.versionAndreas Rheinhardt2021-09-27
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/opt: Remove outdated version checkAndreas Rheinhardt2021-09-27
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/pix_fmt: add pixel format for x2bgr10Manuel Stoeckl2021-09-26
| | | | | | | | | | | The new format (given in big/little endian forms) matches the existing X2RGB10 format, except with B and R channels switched. AV_PIX_FMT_X2BGR10 data often is created by OpenGL programs whose buffers use the GL_RGB10 internal format. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavutil/hwcontext_qsv: fix a bug for mapping qsv frame to vaapiWenbin Chen2021-09-23
| | | | | | | | | | | | | | Command below failed. ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device qsv=qs@va -hwaccel qsv -hwaccel_device qs -filter_hw_device va -c:v h264_qsv -i 1080P.264 -vf "hwmap,format=vaapi" -c:v h264_vaapi output.264 Cause: Assign pair->first directly to data[3] in vaapi frame. pair->first is *VASurfaceID while data[3] in vaapi frame is VASurfaceID. I fix this line of code. Now the command above works. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
* avutil/mem: Deprecate av_mallocz_array()Andreas Rheinhardt2021-09-20
| | | | | | | | It does the same as av_calloc(), so one of them should be removed. Given that av_calloc() has the shorter name, it is retained. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-20
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/opt: Simplify av_opt_set_dict2()Andreas Rheinhardt2021-09-20
| | | | | | Make it clearer that the ordinary exit always returns 0. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/opt: Also warn for deprecated named constantsAndreas Rheinhardt2021-09-20
| | | | | | Intended for the "truncated" AVCodecContext flag. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>