luv

Workshop wiki

video-interop-vulkan.lisp

luvcraft/video-interop-vulkan.lisp

system luvcraft/core · 0 definitions · on GitHub

FFmpeg Vulkan decode configuration and AVVkFrame plane adoption.

in-package#:luvcraft
#-darwin
defunvulkan-video-queue-flags-value
flags
loopforflaginflagssum
ecaseflag
:graphics#x1
:compute#x2
:transfer#x4
:sparse-binding#x8
:video-decode#x20
:video-encode#x40
#-darwin
defmethodvideo-decode-configuration
hardware-policy
declare
ignorehardware-policy
let*
graphics-family
luv::vulkan-device-queue-familydevice
video-family
luv::vulkan-device-video-queue-familydevice
families
luv.vulkan:physical-device-queue-families
luv::vulkan-device-physical-devicedevice
graphics-flags
luv.vulkan:queue-family-flags
nthgraphics-familyfamilies
video-flags
andvideo-family
luv.vulkan:queue-family-flags
nthvideo-familyfamilies
extensions
luv::vulkan-device-extension-namesdevice
when
andvideo-family
member"VK_KHR_video_queue"extensions:test#'string=
member"VK_KHR_video_decode_queue"extensions:test#'string=
values:vulkan
list:instance
luv::vulkan-device-instancedevice
:physical-device
luv::vulkan-device-physical-devicedevice
:device
luv::vulkan-handledevice
:get-instance-proc-addr
cffi:foreign-symbol-pointer"vkGetInstanceProcAddr":library'luv.vulkan::vulkan-loader
:instance-extensions
luv::vulkan-device-instance-extension-namesdevice
:device-extensionsextensions:queue-families
list
list:indexgraphics-family:flags
vulkan-video-queue-flags-valuegraphics-flags
list:indexvideo-family:flags
vulkan-video-queue-flags-valuevideo-flags
:video-capabilities
logior
if
member"VK_KHR_video_decode_h264"extensions:test#'string=
#x10
if
member"VK_KHR_video_decode_h265"extensions:test#'string=
#x20
#-darwin
defclassvulkan-video-frame-importer
:documentation

Stateless importer for AVVkFrame-backed pictures.

#-darwin
defmethodmake-video-frame-importer
make-instance'vulkan-video-frame-importer:devicedevice
#-darwin
defunvulkan-decoded-frame-element
pointerslottypeindex
cffi:mem-aref
cffi:foreign-slot-pointerpointer'
:structlibav::av-vulkan-frame
slot
typeindex
#-darwin
defmethodadopt-decoded-video-frame
importervulkan-video-frame-importer
framewidthheight
let
unlessvulkan-frame
error"FFmpeg did not return an AVVkFrame."
let*
device
video-frame-importer-deviceimporter
image
vulkan-decoded-frame-elementvulkan-frame'libav::images:pointer0
layout-value
vulkan-decoded-frame-elementvulkan-frame'libav::layouts:uint320
layout
or
cffi:foreign-enum-keyword'luv.vulkan::image-layoutlayout-value:errorpnil
:general
semaphore
vulkan-decoded-frame-elementvulkan-frame'libav::semaphores:pointer0
semaphore-value
vulkan-decoded-frame-elementvulkan-frame'libav::semaphore-values:uint640
labels
make-plane
plane
let
release-ownernil
adopted-pnil
unwind-protect
progn
setfrelease-owner
let*
retained-vulkan-frame
submitted
lambda
new-layoutnew-value
setf
cffi:mem-aref
cffi:foreign-slot-pointerretained-vulkan-frame'
:structlibav::av-vulkan-frame
'libav::layouts
:uint320
cffi:foreign-enum-value'luv.vulkan::image-layoutnew-layout
cffi:mem-aref
cffi:foreign-slot-pointerretained-vulkan-frame'
:structlibav::av-vulkan-frame
'libav::semaphore-values
:uint640
new-value
plane-width
if
zeropplane
width
ceilingwidth2
plane-height
if
zeropplane
height
ceilingheight2
descriptor-format
if
zeropplane
:r8-unorm:rg8-unorm
native-format
if
zeropplane
:r8-unorm:r8g8-unorm
texture
adopt-native-texturedevice
list:imageimage:formatnative-format:aspect
if
zeropplane
:plane-0:plane-1
:layoutlayout:semaphoresemaphore:semaphore-valuesemaphore-value:submittedsubmitted
release-owner
make-texture-descriptor:label
formatnil"FFmpeg Vulkan plane ~D"plane
:size
listplane-widthplane-height
:dimensions:2d:formatdescriptor-format:usage'
:texture-binding
unlesstexture
error"The HAL did not adopt Vulkan video plane ~D."plane
setfadopted-pt
texture
unlessadopted-p
ifrelease-owner
funcallrelease-owner