Go to the documentation of this file.
23 #ifndef AVCODEC_D3D12VA_DECODE_H
24 #define AVCODEC_D3D12VA_DECODE_H
55 D3D12_VIDEO_DECODE_CONFIGURATION
cfg;
127 #define D3D12VA_VIDEO_DEC_ASYNC_DEPTH 36
128 #define D3D12VA_DECODE_CONTEXT(avctx) ((D3D12VADecodeContext *)((avctx)->internal->hwaccel_priv_data))
129 #define D3D12VA_FRAMES_CONTEXT(avctx) ((AVHWFramesContext *)(avctx)->hw_frames_ctx->data)
175 const void *pp,
unsigned pp_size,
176 const void *qm,
unsigned qm_size,
177 int(*)(
AVCodecContext *, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *, ID3D12Resource *));
AVPixelFormat
Pixel format.
D3D12_VIDEO_DECODE_CONFIGURATION cfg
D3D12 configuration used to create the decoder.
This structure describes decoded (raw) audio or video data.
ID3D12Resource ** ref_resources
The array of resources used for reference frames.
UINT max_num_ref
Maximum number of reference frames.
int ff_d3d12va_common_end_frame(AVCodecContext *avctx, AVFrame *frame, const void *pp, unsigned pp_size, const void *qm, unsigned qm_size, int(*)(AVCodecContext *, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *, ID3D12Resource *))
d3d12va common end frame
AVD3D12VASyncContext sync_ctx
The sync context used to sync command queue.
AVD3D12VADeviceContext * device_ctx
A pointer to AVD3D12VADeviceContext used to create D3D12 objects.
ID3D12VideoDecoderHeap * decoder_heap
D3D12 video decoder heap.
This struct is used to sync d3d12 execution.
UINT bitstream_size
Bitstream size for each frame.
UINT used_mask
Used mask used to record reference frames indices.
ID3D12VideoDecoder * decoder
D3D12 video decoder.
int ff_d3d12va_decode_init(AVCodecContext *avctx)
init D3D12VADecodeContext
int ff_d3d12va_decode_uninit(AVCodecContext *avctx)
uninit D3D12VADecodeContext
AVBufferRef * decoder_ref
AVFifo * objects_queue
A cached queue for reusing the D3D12 command allocators and upload buffers.
This struct is allocated as AVHWDeviceContext.hwctx.
ID3D12CommandQueue * command_queue
D3D12 command queue.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
main external API structure.
unsigned report_id
Private to the FFmpeg AVHWAccel implementation.
ID3D12VideoDecodeCommandList * command_list
D3D12 video decode command list.
enum AVPixelFormat pix_fmt
Pixel format.
int ff_d3d12va_get_suitable_max_bitstream_size(AVCodecContext *avctx)
Get a suitable maximum bitstream size.
A reference to a data buffer.
This structure is used to provide the necessary configurations and data to the FFmpeg Direct3D 12 HWA...
UINT * ref_subresources
The array of subresources used for reference frames.
int ff_d3d12va_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
d3d12va common frame params