23#ifndef AVFILTER_D3D12_FILTER_H
24#define AVFILTER_D3D12_FILTER_H
40#define D3D12_FILTER_MAX_INPUTS 8
81 DXGI_COLOR_SPACE_TYPE *out_space);
94 HANDLE fence_event, DWORD timeout_ms);
101 D3D12_RESOURCE_STATES state_before,
102 D3D12_RESOURCE_STATES state_after);
127#if HAVE_ID3D12VIDEOENCODECOMMANDLIST
128 ID3D12VideoEncodeCommandList *video_encode;
154 ID3D12Device *device, D3D12_COMMAND_LIST_TYPE
type);
static const AVFilterPad inputs[]
static AVFormatContext * ctx
Main libavfilter public API header.
refcounted data buffer API
const D3D12FilterFormat * ff_d3d12_filter_format_from_pix_fmt(enum AVPixelFormat pix_fmt)
const D3D12FilterFormat * ff_d3d12_filter_format_from_dxgi(DXGI_FORMAT dxgi_format)
int ff_d3d12_cmd_uninit(AVFilterContext *ctx, D3D12CommandContext *cmd)
Wait for the GPU to finish all submitted work, then release all D3D12 objects and clear cmd->ready.
AVRational ff_d3d12_filter_get_input_framerate(AVFilterContext *ctx, AVFilterLink *inlink, const AVFrame *in)
int ff_d3d12_filter_get_colorspace(AVFilterContext *ctx, int is_rgb, int is_output, enum AVColorSpace *spc, enum AVColorRange *range, enum AVColorPrimaries *primaries, enum AVColorTransferCharacteristic *trc, enum AVChromaLocation chroma_loc, enum AVColorPrimaries input_601_hint, DXGI_COLOR_SPACE_TYPE *out_space)
Map AVFrame color properties to a DXGI color space.
int ff_d3d12_cmd_sync(AVFilterContext *ctx, D3D12CommandContext *cmd, DWORD timeout_ms)
Wait on the CPU until the latest submission has completed.
int ff_d3d12_cmd_wait_context(AVFilterContext *ctx, D3D12CommandContext *cmd, const D3D12CommandContext *other)
Make the queue of cmd wait, on the GPU, until the latest submission of other has completed.
int ff_d3d12_cmd_submit(AVFilterContext *ctx, D3D12CommandContext *cmd, AVFrame *const *inputs, int nb_inputs, AVFrame *output, int *frames_in_use)
Close and execute the command list.
int ff_d3d12_cmd_begin(AVFilterContext *ctx, D3D12CommandContext *cmd)
Get a command allocator the GPU is done with, and reset it together with the command list for recordi...
int ff_d3d12_filter_wait_fence(ID3D12Fence *fence, UINT64 target, HANDLE fence_event, DWORD timeout_ms)
Wait until fence reaches target, or until timeout_ms expires.
int ff_d3d12_filter_init_output_frames(AVFilterContext *ctx, AVBufferRef *device_ref, enum AVPixelFormat sw_format, int width, int height, int initial_pool_size, AVBufferRef **frames_ref)
Allocate and initialize a pool of D3D12 frames that can be used as render targets.
const D3D12FilterFormat * ff_d3d12_filter_format_iterate(void **opaque)
Iterate over all supported formats.
enum AVChromaLocation ff_d3d12_filter_chroma_location(DXGI_COLOR_SPACE_TYPE space)
void ff_d3d12_filter_add_frame_barriers(D3D12_RESOURCE_BARRIER *barriers, int *nb_barriers, const AVD3D12VAFrame *frame, int nb_planes, D3D12_RESOURCE_STATES state_before, D3D12_RESOURCE_STATES state_after)
Append one transition barrier per plane of a D3D12 frame.
int ff_d3d12_cmd_init(AVFilterContext *ctx, D3D12CommandContext *cmd, ID3D12Device *device, D3D12_COMMAND_LIST_TYPE type)
Create the command queue, the fence and a closed command list of the given type, after releasing any ...
static enum AVPixelFormat pix_fmt
reference-counted frame API
An API-specific header for AV_HWDEVICE_TYPE_D3D12VA.
AVChromaLocation
Location of chroma samples.
AVColorRange
Visual content value range.
AVPixelFormat
Pixel format.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVColorSpace
YUV colorspace type.
A reference to a data buffer.
D3D12VA frame descriptor for pool allocation.
A link between two filters.
This structure describes decoded (raw) audio or video data.
Rational number (pair of numerator and denominator).
One command queue with its command list, a pool of command allocators and a private fence.
ID3D12VideoProcessCommandList * video_process
ID3D12GraphicsCommandList * graphics
ID3D12CommandQueue * queue
ID3D12CommandAllocator * command_allocator
D3D12_COMMAND_LIST_TYPE type