summaryrefslogtreecommitdiff
path: root/libavutil
Commit message (Collapse)AuthorAge
...
* hwcontext_vulkan: support user-provided poolsLynne2020-05-23
| | | | | If an external pool was provided we skipped all of frames init, including the exec context.
* hwcontext_vulkan: use all enabled queues for transfers, make uploads asyncLynne2020-05-23
| | | | | | This commit makes full use of the enabled queues to provide asynchronous uploads of images (downloads remain synchronous). For a pure uploading use cases, the performance gains can be significant.
* hwcontext_vulkan: wrap ImageBufs into AVBufferRefsLynne2020-05-23
| | | | Makes it easier to support multiple queues
* hwcontext_vulkan: improve public header documentationLynne2020-05-23
| | | | | Some things like using ImageLists were from a really old version that still used multiplanar images.
* hwcontext_vulkan: expose the enabled device featuresLynne2020-05-23
| | | | | | | With this, the puzzle of making libplacebo, ffmpeg and any other Vulkan API users interoperable is complete. Users of both libraries can initialize one another's contexts without having to create a new one.
* hwcontext_vulkan: expose the amount of queues for each queue familyLynne2020-05-23
| | | | | This, along with the next patch, are the last missing pieces to being interoperable with libplacebo.
* hwcontext: add av_hwdevice_ctx_create_derived_optsLynne2020-05-23
| | | | | | | | | | | | | This allows for users who derive devices to set options for the new device context they derive. The main use case of this is to allow users to enable extensions (such as surface drawing extensions) in Vulkan while deriving from the device their frames are on. That way, users don't need to write any initialization code themselves, since the Vulkan spec invalidates mixing instances, physical devices and active devices. Apart from Vulkan, other hwcontexts ignore the opts argument since they don't support options at all (or in VAAPI and OpenCL's case, options are currently only used for device selection, which device_derive overrides).
* lavu: add av_gcd_q().Nicolas George2020-05-23
|
* avutil/opt: add AV_OPT_FLAG_CHILD_CONSTSMarton Balint2020-05-22
| | | | | | | | This will be used for AVCodecContext->profile. By specifying constants in the encoders we won't have to use the common AVCodecContext options table and different encoders can use the same profile name even with different values. Signed-off-by: Marton Balint <cus@passwd.hu>
* Stop hardcoding align=32 in av_frame_get_buffer() calls.Anton Khirnov2020-05-22
| | | | Use 0, which selects the alignment automatically.
* lavc/qsvdec: add decode support for HEVC 4:2:2 8-bit and 10-bitLinjie Fu2020-05-18
| | | | | | | | | Enables HEVC Range Extension decoding support (Linux) for 4:2:2 8/10 bit on ICL+ (gen11 +) platform. Restricted to linux only for now. Signed-off-by: Linjie Fu <linjie.fu@intel.com>
* avutil: bump version after addition of av_sat_add64 and av_sat_sub64James Almer2020-05-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/common: Add saturated add/sub operations for int64_t.Dale Curtis2020-05-15
| | | | | | | | | Many places are using their own custom code for handling overflow around timestamps or other int64_t values. There are enough of these now that having some common saturated math functions seems sound. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* aarch64: Explicitly forbid using the x18 registerMartin Storsjö2020-05-15
| | | | | | | | | | | On windows and darwin (and modern android), the x18 register is reserved and shouldn't be modified by user code, while it is freely available on linux. Strictly avoid it, to keep the assembly code portable. This would have helped catch the issue fixed in 872790b1f9be6 immediately. Signed-off-by: Martin Storsjö <martin@martin.st>
* hwcontext_vulkan: fix incorrect print argumentLynne2020-05-14
|
* hwcontext_vulkan: don't add the optional VK_KHR_surface extension by defaultLynne2020-05-12
| | | | Both API and CLI users can enable any extension they'd like using the options.
* hwcontext_vulkan: don't error on unavailable user-specified extensionsLynne2020-05-12
| | | | | | Only warn instead. API users can find out which extensions were unavailable by using the enabled_inst_extensions and enabled_dev_extensions fields. This eliminates having to trial-and-error to find which extensions were missing.
* hwcontext_vulkan: use the maximum amount of queues for each familyLynne2020-05-12
| | | | | | | | | | Due to our AVHWDevice infrastructure, where API users are offered a way to derive contexts rather than always create new one, our filterchains, being supported by a single hardware device context, can grow to considerable size. Hence, in such situations, using the maximum amount of queues the device offers can be benefitial to eliminating bottlenecks where queue submissions on the same family have to wait for the previous one to finish.
* hwcontext_vulkan: update prepare_frame() for multiple semaphores when exportingLynne2020-05-12
|
* vp9dec: support exporting QP tables through the AVVideoEncParams APIAnton Khirnov2020-05-12
|
* libavutil: add API for exporting video frame quantizersJuan De León2020-05-12
| | | | | | | | | | | | | | | This is intended to replace the deprecated the AV_FRAME_DATA_QP_TABLE* API and extend it to a wider range of codecs. In the future, it may also be extended to support other encoding parameters such as motion vectors. Additional changes by Anton Khirnov <anton@khirnov.net> with suggestions by Lynne <dev@lynne.ee>. Signed-off-by: Juan De León <juandl@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Revert "hwcontext_vulkan: only use one semaphore per image"Lynne2020-05-11
| | | | | | | | | This reverts commit 97b526c192add6f252b327245fd9223546867352. It broke the API, and assumed no other APIs used multiple semaphores. This also disallowed certain optimizations to happen. Dealing with APIs that give or expect single semaphores is easier when we use per-image semaphores.
* hwcontext_vulkan: convert to general layout and transfer queue when exportingLynne2020-05-10
| | | | | | | The specs note that images should be in the GENERAL layout when exporting for maximum compatibility. CUDA exported images are handled differently, and the queue is the same, so we don't need to do that there.
* hwcontext_vulkan: create all images with concurrent sharing modeLynne2020-05-10
| | | | | | | | | As it turns out, we were already assuming and treating all images as if they had concurrent access mode. This just changes the flag to CONCURRENT, which has less restrictions than EXCLUSIVE, and fixed validation messages on machines with multiple queues. The validation layer didn't pick this up because the machine I was testing on had only a single queue.
* hwcontext_vulkan: fix inverted condition when exporting images to drm_primeLynne2020-05-10
| | | | Calling vkGetImageSubresourceLayout is only legal for linear and drm images.
* hwcontext_vulkan: update debugging layer nameLynne2020-05-10
|
* hwcontext_vulkan: remove unused internal REQUIRED extension flagLynne2020-05-10
| | | | | This is a leftover from an old version which used the 1.0 Vulkan API with the maintenance extensions being required.
* hwcontext_vulkan: expose enabled device and instance extensionsLynne2020-05-10
| | | | | | | This solves a huge oversight - it lets users reliably use their own AVVulkanDeviceContext. Otherwise, the extensions supplied and enabled are not discoverable by anything outside of hwcontext_vulkan. Also clarifies that any user-supplied VkInstance must be at least 1.1.
* hwcontext_vulkan: let users enable device and instance extensions using optionsLynne2020-05-10
| | | | | | Also documents all options supported by the hwdevice. This lets users enable all extensions they need without writing their own instance initialization code.
* hwcontext_vulkan: optionally enable the VK_KHR_surface extension if availableLynne2020-05-10
| | | | This allows any phys_device derived to be used as a display rendering device.
* avutil/opt: only skip evaluation for rational optionsMarton Balint2020-05-01
| | | | | | | | | | | | Fixes problems when non-rational options were set using rational expressions, causing rounding errors and the option range limits not to be enforced properly. ffmpeg -f lavfi -i "sine=r=96000/2" This caused an assertion failure with assert level 2. Signed-off-by: Marton Balint <cus@passwd.hu>
* lavu/version: bump minor version for DOVI sidedataJun Zhao2020-04-25
| | | | | | | bump minor version for DOVI sidedata, because added the dovi_meta.h as lavu API part. Also update APIchanges. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavutil: add DOVI related headervacingfang2020-04-23
| | | | | | add DOVI related struct Signed-off-by: vacingfang <vacingfang@tencent.com>
* hwcontext_vulkan: correctly download and upload flipped imagesLynne2020-04-21
| | | | | | | | | | | | We derive the destination buffer stride from the input stride, which meant if the image was flipped with a negative stride, we'd be FFALIGNING a negative number which ends up being huge, thus making the Vulkan buffer allocation fail and the whole image transfer fail. Only found out about this as OpenGL compositors can copy an entire image with a single call if its flipped, rather than iterate over each line.
* avutil/log: update text requesting samplesMarton Balint2020-04-17
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavu/mem: Make other alloc functions more similar to av_malloc().Carl Eugen Hoyos2020-04-12
| | | | | | | Do not limit the array allocation functions and av_calloc() to allocations of INT_MAX, instead depend on max_alloc_size like av_malloc(). Allows a workaround for ticket #7140.
* hwcontext_vulkan: only use one semaphore per imageLynne2020-04-07
| | | | | | The idea was to allow separate planes to be filtered independently, however, in hindsight, literaly nothing uses separate per-plane semaphores and it would only work when each plane is backed by separate device memory.
* avutil/hwcontext_cuda: Only handle CUDA hardware framesTimo Rothenpieler2020-04-06
|
* avutil/opt: Don't use NULL for %s string in a log messageAndreas Rheinhardt2020-04-01
| | | | | | | | | | | | | | | If one calls av_opt_set() with an incorrect string to set the value of an option of type AV_OPT_TYPE_VIDEO_RATE, the given string is used in a log message via %s. This also happens when the string is actually a nullpointer in which case using it for %s is forbidden. This commit changes this by erroring out early in case of a nullpointer. This also fixes a warning from GCC 9.2: "‘%s’ directive argument is null [-Wformat-overflow=]" Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avutil/frame: make frame copy functions hwframe awareTimo Rothenpieler2020-03-28
|
* avutil/hwcontext: correctly set extended_data on hwframe_get_bufferTimo Rothenpieler2020-03-28
|
* lavu/tx: add 2-point FFT transformLynne2020-03-23
| | | | | | By itself, this allows 6-point, 10-point and 30-point transforms. When the 9-point transform is added it allows for 18-point FFT, and also for a 36-point MDCT (used by MP3).
* lavu/tx: improve documentationLynne2020-03-23
|
* hwcontext_opencl: include header file in HEADERSDaniel Playfair Cal2020-03-20
| | | | | | | | This matches the inclusion of the other hwcontext_<hwaccel>.h headers. The skipping of the header depending on build flags is already present. Signed-off-by: Daniel Playfair Cal: <daniel.playfair.cal@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil/hwcontext_cuda: combine transfer functionsTimo Rothenpieler2020-03-19
| | | | | Gets rid of some mostly duplicated code and adds the ability to do hardware to hardware transfers.
* avutil/hwcontext_cuda: add YUVA420P pixel formatYaroslav Pogrebnyak2020-03-19
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* hwcontext_vulkan: fix imported image bitmaskLynne2020-03-17
|
* hwcontext_vulkan: support more than one plane per DMABUF layerLynne2020-03-12
| | | | | Requires the dmabuf modifiers extension. Allows for importing of compressed images with a second plane.
* hwcontext_vulkan: duplicate DMABUF objects before importing themLynne2020-03-12
| | | | | | | | The specifications are very vague about who has ownership, and in this case, Vulkan takes ownership of all DMABUF FDs passed to it, causing errors to occur if someone gave us images for mapping which were meant to be kept. The old behavior worked with one-way VAAPI and DMABUF imports, but was broken with clients like wlroots' dmabuf-capture.
* hwcontext_vulkan: initialize semaphores of DMABUF importsLynne2020-03-12
| | | | | | | | | There was a recent change in Intel's driver that triggered a driver-internal error if the semaphore given to the command buffer wasn't initialized. Given that the specifications require the semaphore to be initialized, this is within spec. Unlike what's causing it in the first place, which is that there are no ways to extract/import dma sync objects from DMABUFs, so we must leave our semaphores bare.