36 DEFINE_GUID(ff_DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28,0x4e65,0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);
37 DEFINE_GUID(ff_DXVA2_ModeMPEG2and1_VLD, 0x86695f12, 0x340e,0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60);
38 DEFINE_GUID(ff_DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
39 DEFINE_GUID(ff_DXVA2_ModeH264_F, 0x1b81be69, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
40 DEFINE_GUID(ff_DXVADDI_Intel_ModeH264_E, 0x604F8E68, 0x4951,0x4C54,0x88,0xFE,0xAB,0xD2,0x5C,0x15,0xB3,0xD6);
41 DEFINE_GUID(ff_DXVA2_ModeVC1_D, 0x1b81beA3, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
42 DEFINE_GUID(ff_DXVA2_ModeVC1_D2010, 0x1b81beA4, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
43 DEFINE_GUID(ff_DXVA2_ModeHEVC_VLD_Main, 0x5b11d51b, 0x2f4c,0x4452,0xbc,0xc3,0x09,0xf2,0xa1,0x16,0x0c,0xc0);
44 DEFINE_GUID(ff_DXVA2_ModeHEVC_VLD_Main10,0x107af0e0, 0xef1a,0x4d19,0xab,0xa8,0x67,0xa1,0x63,0x07,0x3d,0x13);
45 DEFINE_GUID(ff_DXVA2_ModeVP9_VLD_Profile0,0x463707f8,0xa1d0,0x4585,0x87,0x6d,0x83,0xaa,0x6d,0x60,0xb8,0x9e);
46 DEFINE_GUID(ff_DXVA2_NoEncrypt, 0x1b81beD0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
47 DEFINE_GUID(ff_GUID_NULL, 0x00000000, 0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);
48 DEFINE_GUID(ff_IID_IDirectXVideoDecoderService, 0xfc51a551,0xd5e7,0x11d9,0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02);
102 unsigned i, best_score = 0;
105 for (i = 0; i < cfg_count; i++) {
107 UINT ConfigBitstreamRaw;
108 GUID guidConfigBitstreamEncryption;
112 D3D11_VIDEO_DECODER_CONFIG *cfg = &((D3D11_VIDEO_DECODER_CONFIG *)cfg_list)[i];
113 ConfigBitstreamRaw = cfg->ConfigBitstreamRaw;
114 guidConfigBitstreamEncryption = cfg->guidConfigBitstreamEncryption;
119 DXVA2_ConfigPictureDecode *cfg = &((DXVA2_ConfigPictureDecode *)cfg_list)[i];
120 ConfigBitstreamRaw = cfg->ConfigBitstreamRaw;
121 guidConfigBitstreamEncryption = cfg->guidConfigBitstreamEncryption;
125 if (ConfigBitstreamRaw == 1)
131 if (IsEqualGUID(&guidConfigBitstreamEncryption, &ff_DXVA2_NoEncrypt))
133 if (score > best_score) {
148 static int d3d11va_validate_output(
void *service,
GUID guid,
const void *surface_format)
152 hr = ID3D11VideoDevice_CheckVideoDecoderFormat((ID3D11VideoDevice *)service,
154 *(DXGI_FORMAT *)surface_format,
161 static int dxva2_validate_output(
void *decoder_service,
GUID guid,
const void *surface_format)
165 unsigned j, target_count;
166 D3DFORMAT *target_list;
167 hr = IDirectXVideoDecoderService_GetDecoderRenderTargets((IDirectXVideoDecoderService *)decoder_service, &guid, &target_count, &target_list);
169 for (j = 0; j < target_count; j++) {
170 const D3DFORMAT
format = target_list[j];
171 if (format == *(D3DFORMAT *)surface_format) {
176 CoTaskMemFree(target_list);
203 unsigned guid_count,
const GUID *guid_list)
210 for (i = 0; i < guid_count; i++) {
211 const GUID *guid = &guid_list[i];
214 "{%8.8x-%4.4x-%4.4x-%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x}",
226 for (format = 0; format < 200; format++) {
227 if (d3d11va_validate_output(service, *guid, &format))
235 MKTAG(
'P',
'0',
'1',
'0')};
238 if (dxva2_validate_output(service, *guid, &formats[i]))
248 unsigned guid_count,
const GUID *guid_list,
GUID *decoder_guid)
255 *decoder_guid = ff_GUID_NULL;
256 for (i = 0; dxva_modes[i].
guid; i++) {
262 for (j = 0; j < guid_count; j++) {
263 if (IsEqualGUID(mode->
guid, &guid_list[j]))
271 validate = d3d11va_validate_output(service, *mode->
guid, surface_format);
275 validate = dxva2_validate_output(service, *mode->
guid, surface_format);
278 *decoder_guid = *mode->
guid;
283 if (IsEqualGUID(decoder_guid, &ff_GUID_NULL)) {
288 if (IsEqualGUID(decoder_guid, &ff_DXVADDI_Intel_ModeH264_E))
296 IUnknown_Release((IUnknown *)opaque);
306 static int dxva2_get_decoder_configuration(
AVCodecContext *avctx,
const GUID *device_guid,
307 const DXVA2_VideoDesc *
desc,
308 DXVA2_ConfigPictureDecode *
config)
312 DXVA2_ConfigPictureDecode *cfg_list;
316 hr = IDirectXVideoDecoderService_GetDecoderConfigurations(sctx->dxva2_service, device_guid, desc,
NULL, &cfg_count, &cfg_list);
324 *config = cfg_list[ret];
325 CoTaskMemFree(cfg_list);
336 MKTAG(
'P',
'0',
'1',
'0') : MKTAG(
'N',
'V',
'1',
'2');
337 DXVA2_VideoDesc desc = { 0 };
338 DXVA2_ConfigPictureDecode
config;
346 hr = IDirect3DDeviceManager9_OpenDeviceHandle(device_hwctx->devmgr,
353 hr = IDirect3DDeviceManager9_GetVideoService(device_hwctx->devmgr, device_handle,
354 &ff_IID_IDirectXVideoDecoderService,
355 (
void **)&sctx->dxva2_service);
356 IDirect3DDeviceManager9_CloseDeviceHandle(device_hwctx->devmgr, device_handle);
362 hr = IDirectXVideoDecoderService_GetDecoderDeviceGuids(sctx->dxva2_service, &guid_count, &guid_list);
369 guid_count, guid_list, &device_guid);
370 CoTaskMemFree(guid_list);
377 desc.Format = surface_format;
379 ret = dxva2_get_decoder_configuration(avctx, &device_guid, &desc, &config);
384 hr = IDirectXVideoDecoderService_CreateVideoDecoder(sctx->dxva2_service, &device_guid,
385 &desc, &config, frames_hwctx->surfaces,
386 frames_hwctx->nb_surfaces, &sctx->dxva2_decoder);
392 sctx->dxva2_config =
config;
407 static int d3d11va_get_decoder_configuration(
AVCodecContext *avctx,
408 ID3D11VideoDevice *video_device,
409 const D3D11_VIDEO_DECODER_DESC *desc,
410 D3D11_VIDEO_DECODER_CONFIG *config)
412 unsigned cfg_count = 0;
413 D3D11_VIDEO_DECODER_CONFIG *cfg_list =
NULL;
417 hr = ID3D11VideoDevice_GetVideoDecoderConfigCount(video_device, desc, &cfg_count);
423 cfg_list =
av_malloc_array(cfg_count,
sizeof(D3D11_VIDEO_DECODER_CONFIG));
424 if (cfg_list ==
NULL)
426 for (i = 0; i < cfg_count; i++) {
427 hr = ID3D11VideoDevice_GetVideoDecoderConfig(video_device, desc, i, &cfg_list[i]);
429 av_log(avctx,
AV_LOG_ERROR,
"Unable to retrieve decoder configurations. (hr=0x%lX)\n", hr);
437 *config = cfg_list[ret];
448 default:
return DXGI_FORMAT_UNKNOWN;
456 unsigned guid_count, i;
458 D3D11_VIDEO_DECODER_DESC desc = { 0 };
459 D3D11_VIDEO_DECODER_CONFIG
config;
463 DXGI_FORMAT surface_format = d3d11va_map_sw_to_hw_format(frames_ctx->
sw_format);
464 D3D11_TEXTURE2D_DESC texdesc;
468 if (!frames_hwctx->texture) {
472 ID3D11Texture2D_GetDesc(frames_hwctx->texture, &texdesc);
474 guid_count = ID3D11VideoDevice_GetVideoDecoderProfileCount(device_hwctx->video_device);
476 if (guid_list ==
NULL || guid_count == 0) {
481 for (i = 0; i < guid_count; i++) {
482 hr = ID3D11VideoDevice_GetVideoDecoderProfile(device_hwctx->video_device, i, &guid_list[i]);
491 guid_count, guid_list, &decoder_guid);
498 desc.OutputFormat = surface_format;
499 desc.Guid = decoder_guid;
501 ret = d3d11va_get_decoder_configuration(avctx, device_hwctx->video_device, &desc, &config);
505 sctx->d3d11_views =
av_mallocz_array(texdesc.ArraySize,
sizeof(sctx->d3d11_views[0]));
506 if (!sctx->d3d11_views)
508 sctx->nb_d3d11_views = texdesc.ArraySize;
510 for (i = 0; i < sctx->nb_d3d11_views; i++) {
511 D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc = {
512 .DecodeProfile = decoder_guid,
513 .ViewDimension = D3D11_VDOV_DIMENSION_TEXTURE2D,
518 hr = ID3D11VideoDevice_CreateVideoDecoderOutputView(device_hwctx->video_device,
519 (ID3D11Resource*) frames_hwctx->texture,
521 (ID3D11VideoDecoderOutputView**) &sctx->d3d11_views[i]);
528 hr = ID3D11VideoDevice_CreateVideoDecoder(device_hwctx->video_device, &desc,
529 &config, &sctx->d3d11_decoder);
535 sctx->d3d11_config =
config;
536 sctx->d3d11_texture = frames_hwctx->texture;
584 int surface_alignment, num_surfaces;
591 surface_alignment = 32;
595 surface_alignment = 128;
597 surface_alignment = 16;
625 frames_hwctx->
surface_type = DXVA2_VideoDecoderRenderTarget;
633 frames_hwctx->
BindFlags |= D3D11_BIND_DECODER;
652 av_log(avctx,
AV_LOG_ERROR,
"Either a hw_frames_ctx or a hw_device_ctx needs to be set for hardware decoding.\n");
688 ret = d3d11va_create_decoder(avctx);
693 d3d11_ctx->
decoder = sctx->d3d11_decoder;
695 d3d11_ctx->
cfg = &sctx->d3d11_config;
697 d3d11_ctx->
surface = sctx->d3d11_views;
709 ret = dxva2_create_decoder(avctx);
714 dxva_ctx->
decoder = sctx->dxva2_decoder;
715 dxva_ctx->
cfg = &sctx->dxva2_config;
737 for (i = 0; i < sctx->nb_d3d11_views; i++) {
738 if (sctx->d3d11_views[i])
739 ID3D11VideoDecoderOutputView_Release(sctx->d3d11_views[i]);
745 if (sctx->dxva2_service)
746 IDirectXVideoDecoderService_Release(sctx->dxva2_service);
757 intptr_t
index = (intptr_t)frame->
data[1];
758 if (index < 0 || index >= sctx->nb_d3d11_views ||
759 sctx->d3d11_texture != (ID3D11Texture2D *)frame->
data[0]) {
763 return sctx->d3d11_views[
index];
766 return frame->
data[3];
778 return (intptr_t)frame->
data[1];
780 D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc;
781 ID3D11VideoDecoderOutputView_GetDesc((ID3D11VideoDecoderOutputView*) surface, &viewDesc);
782 return viewDesc.Texture2D.ArraySlice;
786 for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) {
809 hr = ID3D11VideoContext_GetDecoderBuffer(
D3D11VA_CONTEXT(ctx)->video_context,
812 &dxva_size, &dxva_data);
817 &dxva_data, &dxva_size);
824 if (size <= dxva_size) {
825 memcpy(dxva_data, data, size);
829 D3D11_VIDEO_DECODER_BUFFER_DESC *dsc11 = dsc;
830 memset(dsc11, 0,
sizeof(*dsc11));
831 dsc11->BufferType =
type;
832 dsc11->DataSize =
size;
833 dsc11->NumMBsInBuffer = mb_count;
838 DXVA2_DecodeBufferDesc *dsc2 = dsc;
839 memset(dsc2, 0,
sizeof(*dsc2));
840 dsc2->CompressedBufferType =
type;
841 dsc2->DataSize =
size;
842 dsc2->NumMBsInBuffer = mb_count;
862 "Failed to release buffer type %u: 0x%x\n",
874 if (!frame->
buf[i]) {
886 const void *pp,
unsigned pp_size,
887 const void *qm,
unsigned qm_size,
893 unsigned buffer_count = 0;
895 D3D11_VIDEO_DECODER_BUFFER_DESC buffer11[4];
898 DXVA2_DecodeBufferDesc buffer2[4];
901 int result, runs = 0;
926 if (hr != E_PENDING || ++runs > 50)
940 buffer = &buffer11[buffer_count];
941 type = D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS;
946 buffer = &buffer2[buffer_count];
947 type = DXVA2_PictureParametersBufferType;
955 "Failed to add picture parameter buffer\n");
963 buffer = &buffer11[buffer_count];
964 type = D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX;
969 buffer = &buffer2[buffer_count];
970 type = DXVA2_InverseQuantizationMatrixBufferType;
978 "Failed to add inverse quantization matrix buffer\n");
986 buffer = &buffer11[buffer_count + 0];
987 buffer_slice = &buffer11[buffer_count + 1];
992 buffer = &buffer2[buffer_count + 0];
993 buffer_slice = &buffer2[buffer_count + 1];
997 result = commit_bs_si(avctx,
1002 "Failed to add bitstream or slice control buffer\n");
1009 assert(buffer_count == 1 + (qm_size > 0) + 2);
1013 hr = ID3D11VideoContext_SubmitDecoderBuffers(
D3D11VA_CONTEXT(ctx)->video_context,
1015 buffer_count, buffer11);
1019 DXVA2_DecodeExecuteParams exec = {
1020 .NumCompBuffers = buffer_count,
1021 .pCompressedBuffers = buffer2,
1022 .pExtensionData =
NULL,
#define FF_PROFILE_H264_MAIN
This structure is used to provides the necessary configurations and data to the Direct3D11 FFmpeg HWA...
static enum AVPixelFormat pix_fmt
#define AV_NUM_DATA_POINTERS
#define FF_PROFILE_MPEG2_MAIN
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it...
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
int coded_width
Bitstream width / height, may be different from width/height e.g.
DEFINE_GUID(ff_DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28, 0x4e65, 0xbe, 0xea, 0x1d, 0x26, 0xb5, 0x08, 0xad, 0xc9)
static int dxva_get_decoder_guid(AVCodecContext *avctx, void *service, void *surface_format, unsigned guid_count, const GUID *guid_list, GUID *decoder_guid)
This struct is allocated as AVHWFramesContext.hwctx.
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
static FFServerConfig config
enum AVPixelFormat pix_fmt
Supported pixel format.
int width
The allocated dimensions of the frames in this pool.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
enum AVPixelFormat format
The pixel format identifying the underlying HW surface type.
static void * get_surface(const AVCodecContext *avctx, const AVFrame *frame)
static void dxva_adjust_hwframes(AVCodecContext *avctx, AVHWFramesContext *frames_ctx)
LPDIRECT3DSURFACE9 * surface
The array of Direct3D surfaces used to create the decoder.
int av_usleep(unsigned usec)
Sleep for a period of time.
#define D3D11VA_CONTEXT(ctx)
const DXVA2_ConfigPictureDecode * cfg
DXVA2 configuration used to create the decoder.
UINT BindFlags
D3D11_TEXTURE2D_DESC.BindFlags used for texture creation.
unsigned surface_count
The number of surface in the surface array.
struct AVHWAccel * hwaccel
Hardware accelerator in use.
int ff_dxva2_decode_uninit(AVCodecContext *avctx)
static const dxva_mode dxva_modes[]
void * hwaccel_context
Hardware accelerator context.
HANDLE context_mutex
Mutex to access video_context.
ID3D11VideoDecoder * decoder
D3D11 decoder object.
DWORD surface_type
The surface type (e.g.
static av_cold int end(AVCodecContext *avctx)
int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame, const void *pp, unsigned pp_size, const void *qm, unsigned qm_size, int(*commit_bs_si)(AVCodecContext *, DECODER_BUFFER_DESC *bs, DECODER_BUFFER_DESC *slice))
#define FF_PROFILE_HEVC_MAIN
#define DXVA_SHARED_CONTEXT(avctx)
static void ff_dxva2_lock(AVCodecContext *avctx)
void * hwctx
The format-specific data, allocated and freed by libavutil along with this context.
#define AV_LOG_VERBOSE
Detailed information.
#define FF_PROFILE_HEVC_MAIN_10
uint64_t workaround
A bit field configuring the workarounds needed for using the decoder.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
D3D11_VIDEO_DECODER_CONFIG * cfg
D3D11 configuration used to create the decoder.
int active_thread_type
Which multithreading methods are in use by the codec.
static AVBufferRef * bufref_wrap_interface(IUnknown *iface)
int ff_dxva2_is_d3d11(const AVCodecContext *avctx)
#define FF_PROFILE_H264_HIGH
#define DXVA2_CONTEXT(ctx)
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
AVBufferRef * av_buffer_create(uint8_t *data, int size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
Create an AVBuffer from an existing array.
int av_hwframe_ctx_init(AVBufferRef *ref)
Finalize the context before use.
static const int prof_hevc_main10[]
static void * av_mallocz_array(size_t nmemb, size_t size)
ID3D11VideoContext * video_context
If unset, this will be set from the device_context field on init.
int initial_pool_size
Initial size of the frame pool.
static void ff_dxva2_unlock(AVCodecContext *avctx)
#define FF_THREAD_FRAME
Decode more than one frame at once.
AVHWDeviceContext * device_ctx
The parent AVHWDeviceContext.
static const chunk_decoder decoder[8]
#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO
Work around for Direct3D11 and old Intel GPUs with ClearVideo interface.
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames...
#define FF_PROFILE_UNKNOWN
static void bufref_free_interface(void *opaque, uint8_t *data)
unsigned surface_count
The number of surface in the surface array.
ID3D11VideoContext * video_context
D3D11 VideoContext.
static int dxva_get_decoder_configuration(AVCodecContext *avctx, const void *cfg_list, unsigned cfg_count)
int ff_dxva2_decode_init(AVCodecContext *avctx)
AVHWDeviceContext * device_ctx
preferred ID for MPEG-1/2 video decoding
enum AVPixelFormat pix_fmt
#define FF_ARRAY_ELEMS(a)
int thread_count
thread count is used to decide how many independent tasks should be passed to execute() ...
static int dxva_check_codec_compatibility(AVCodecContext *avctx, const dxva_mode *mode)
static const int prof_h264_high[]
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
void(* unlock)(void *lock_ctx)
Libavcodec external API header.
unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, const AVDXVAContext *ctx, const AVFrame *frame)
static int is_supported(enum AVCodecID id)
main external API structure.
uint8_t * data
The data buffer.
void * hwctx
The format-specific data, allocated and freed automatically along with this context.
int ff_dxva2_commit_buffer(AVCodecContext *avctx, AVDXVAContext *ctx, DECODER_BUFFER_DESC *dsc, unsigned type, const void *data, unsigned size, unsigned mb_count)
#define AV_PIX_FMT_YUV420P10
static const char * format
static const int prof_mpeg2_main[]
uint64_t workaround
A bit field configuring the workarounds needed for using the decoder.
This struct describes a set or pool of "hardware" frames (i.e.
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer. ...
This struct is allocated as AVHWFramesContext.hwctx.
AVBufferRef * decoder_ref
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Hardware surfaces for Direct3D11.
A reference to a data buffer.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal and external API header
static int ref[MAX_W *MAX_W]
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
Allocate an AVHWFramesContext tied to a given device context.
AVBufferRef * av_buffer_ref(AVBufferRef *buf)
Create a new reference to an AVBuffer.
ID3D11VideoDecoderOutputView ** surface
The array of Direct3D surfaces used to create the decoder.
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.
IDirect3DSurface9 ** surfaces
The surface pool.
static int frame_add_buf(AVFrame *frame, AVBufferRef *ref)
This struct is allocated as AVHWDeviceContext.hwctx.
static void dxva_list_guids_debug(AVCodecContext *avctx, void *service, unsigned guid_count, const GUID *guid_list)
#define FF_PROFILE_MPEG2_SIMPLE
#define DXVA_CONTEXT(avctx)
static const int prof_hevc_main[]
This struct is allocated as AVHWDeviceContext.hwctx.
void(* lock)(void *lock_ctx)
Callbacks for locking.
#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH
Hardware acceleration should still be attempted for decoding when the codec profile does not match th...
int hwaccel_flags
Bit set of AV_HWACCEL_FLAG_* flags, which affect hardware accelerated decoding (if active)...
HW decoding through Direct3D11 via old API, Picture.data[3] contains a ID3D11VideoDecoderOutputView p...
IDirectXVideoDecoder * decoder
DXVA2 decoder object.
#define av_malloc_array(a, b)
#define INVALID_HANDLE_VALUE
#define FF_PROFILE_H264_CONSTRAINED_BASELINE
#define MKTAG(a, b, c, d)
AVBufferRef * hw_device_ctx
A reference to the AVHWDeviceContext describing the device which will be used by a hardware encoder/d...
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
AVPixelFormat
Pixel format.
mode
Use these values in ebur128_init (or'ed).
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
This structure is used to provides the necessary configurations and data to the DXVA2 FFmpeg HWAccel ...