|
FFmpeg
|
#include "libavutil/fifo.h"#include "libavutil/hwcontext.h"#include "libavutil/hwcontext_d3d12va.h"#include "avcodec.h"#include "internal.h"#include "hwaccel_internal.h"Go to the source code of this file.
Data Structures | |
| struct | D3D12VADecodeContext |
| This structure is used to provide the necessary configurations and data to the FFmpeg Direct3D 12 HWAccel implementation for video decoder. More... | |
Macros | |
| #define | D3D12VA_VIDEO_DEC_ASYNC_DEPTH 36 |
| #define | D3D12VA_DECODE_CONTEXT(avctx) |
| #define | D3D12VA_FRAMES_CONTEXT(avctx) |
Functions | |
| int | ff_d3d12va_get_suitable_max_bitstream_size (AVCodecContext *avctx) |
| Get a suitable maximum bitstream size. | |
| int | ff_d3d12va_decode_init (AVCodecContext *avctx) |
| init D3D12VADecodeContext | |
| int | ff_d3d12va_decode_uninit (AVCodecContext *avctx) |
| uninit D3D12VADecodeContext | |
| int | ff_d3d12va_common_frame_params (AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) |
| d3d12va common frame params | |
| 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 | |
| #define D3D12VA_VIDEO_DEC_ASYNC_DEPTH 36 |
Definition at line 140 of file d3d12va_decode.h.
Referenced by ff_d3d12va_decode_init().
| #define D3D12VA_DECODE_CONTEXT | ( | avctx | ) |
Definition at line 141 of file d3d12va_decode.h.
Referenced by d3d12va_av1_decode_init(), d3d12va_av1_start_frame(), d3d12va_create_decoder(), d3d12va_create_decoder_heap(), d3d12va_discard_helper_objects(), d3d12va_get_valid_helper_objects(), d3d12va_h264_decode_init(), d3d12va_h264_start_frame(), d3d12va_hevc_decode_init(), d3d12va_hevc_start_frame(), d3d12va_mpeg2_decode_init(), d3d12va_mpeg2_start_frame(), d3d12va_sync_with_gpu(), d3d12va_update_reference_frames_state(), d3d12va_vc1_decode_init(), d3d12va_vc1_start_frame(), d3d12va_vp9_decode_init(), d3d12va_vp9_start_frame(), ff_d3d12va_common_end_frame(), ff_d3d12va_decode_init(), ff_d3d12va_decode_uninit(), free_reference_only_resources(), get_reference_only_resource(), prepare_reference_only_resources(), update_input_arguments(), update_input_arguments(), update_input_arguments(), update_input_arguments(), update_input_arguments(), and update_input_arguments().
| #define D3D12VA_FRAMES_CONTEXT | ( | avctx | ) |
Definition at line 142 of file d3d12va_decode.h.
Referenced by d3d12va_create_decoder(), d3d12va_create_decoder_heap(), ff_d3d12va_decode_init(), and ff_d3d12va_get_suitable_max_bitstream_size().
| int ff_d3d12va_get_suitable_max_bitstream_size | ( | AVCodecContext * | avctx | ) |
Get a suitable maximum bitstream size.
Creating and destroying a resource on d3d12 needs sync and reallocation, so use this function to help allocate a big enough bitstream buffer to avoid recreating resources when decoding.
Definition at line 150 of file d3d12va_decode.c.
Referenced by d3d12va_av1_decode_init(), and ff_d3d12va_decode_init().
| int ff_d3d12va_decode_init | ( | AVCodecContext * | avctx | ) |
init D3D12VADecodeContext
Definition at line 405 of file d3d12va_decode.c.
Referenced by d3d12va_av1_decode_init(), d3d12va_h264_decode_init(), d3d12va_hevc_decode_init(), d3d12va_mpeg2_decode_init(), d3d12va_vc1_decode_init(), and d3d12va_vp9_decode_init().
| int ff_d3d12va_decode_uninit | ( | AVCodecContext * | avctx | ) |
uninit D3D12VADecodeContext
Definition at line 495 of file d3d12va_decode.c.
Referenced by d3d12va_av1_decode_uninit(), and ff_d3d12va_decode_init().
| int ff_d3d12va_common_frame_params | ( | AVCodecContext * | avctx, |
| AVBufferRef * | hw_frames_ctx ) |
d3d12va common frame params
Definition at line 389 of file d3d12va_decode.c.
| int ff_d3d12va_common_end_frame | ( | AVCodecContext * | avctx, |
| AVFrame * | frame, | ||
| const void * | pp, | ||
| unsigned | pp_size, | ||
| const void * | qm, | ||
| unsigned | qm_size, | ||
| int(* | update_input_arguments )(AVCodecContext *, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *, ID3D12Resource *) ) |
d3d12va common end frame
| avctx | codec context |
| frame | current output frame |
| pp | picture parameters |
| pp_size | the size of the picture parameters |
| qm | quantization matrix |
| qm_size | the size of the quantization matrix |
| callback | update decoder-specified input stream arguments |
Definition at line 558 of file d3d12va_decode.c.
Referenced by d3d12va_av1_end_frame(), d3d12va_h264_end_frame(), d3d12va_hevc_end_frame(), d3d12va_mpeg2_end_frame(), d3d12va_vc1_end_frame(), and d3d12va_vp9_end_frame().