FFmpeg
|
#include <string.h>
#include <initguid.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/log.h"
#include "libavutil/time.h"
#include "avcodec.h"
#include "decode.h"
#include "dxva2_internal.h"
Go to the source code of this file.
Data Structures | |
struct | dxva_mode |
Functions | |
DEFINE_GUID (ff_DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28, 0x4e65, 0xbe, 0xea, 0x1d, 0x26, 0xb5, 0x08, 0xad, 0xc9) | |
DEFINE_GUID (ff_DXVA2_ModeMPEG2and1_VLD, 0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, 0x53, 0xdd, 0x32, 0x74, 0x60) | |
DEFINE_GUID (ff_DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5) | |
DEFINE_GUID (ff_DXVA2_ModeH264_F, 0x1b81be69, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5) | |
DEFINE_GUID (ff_DXVADDI_Intel_ModeH264_E, 0x604F8E68, 0x4951, 0x4C54, 0x88, 0xFE, 0xAB, 0xD2, 0x5C, 0x15, 0xB3, 0xD6) | |
DEFINE_GUID (ff_DXVA2_ModeVC1_D, 0x1b81beA3, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5) | |
DEFINE_GUID (ff_DXVA2_ModeVC1_D2010, 0x1b81beA4, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5) | |
DEFINE_GUID (ff_DXVA2_ModeHEVC_VLD_Main, 0x5b11d51b, 0x2f4c, 0x4452, 0xbc, 0xc3, 0x09, 0xf2, 0xa1, 0x16, 0x0c, 0xc0) | |
DEFINE_GUID (ff_DXVA2_ModeHEVC_VLD_Main10, 0x107af0e0, 0xef1a, 0x4d19, 0xab, 0xa8, 0x67, 0xa1, 0x63, 0x07, 0x3d, 0x13) | |
DEFINE_GUID (ff_DXVA2_ModeVP9_VLD_Profile0, 0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e) | |
DEFINE_GUID (ff_DXVA2_ModeVP9_VLD_10bit_Profile2, 0xa4c749ef, 0x6ecf, 0x48aa, 0x84, 0x48, 0x50, 0xa7, 0xa1, 0x16, 0x5f, 0xf7) | |
DEFINE_GUID (ff_DXVA2_ModeAV1_VLD_Profile0, 0xb8be4ccb, 0xcf53, 0x46ba, 0x8d, 0x59, 0xd6, 0xb8, 0xa6, 0xda, 0x5d, 0x2a) | |
DEFINE_GUID (ff_DXVA2_NoEncrypt, 0x1b81beD0, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5) | |
DEFINE_GUID (ff_GUID_NULL, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) | |
DEFINE_GUID (ff_IID_IDirectXVideoDecoderService, 0xfc51a551, 0xd5e7, 0x11d9, 0xaf, 0x55, 0x00, 0x05, 0x4e, 0x43, 0xff, 0x02) | |
static int | dxva_get_decoder_configuration (AVCodecContext *avctx, const void *cfg_list, unsigned cfg_count) |
static int | dxva_check_codec_compatibility (AVCodecContext *avctx, const dxva_mode *mode) |
static void | dxva_list_guids_debug (AVCodecContext *avctx, void *service, unsigned guid_count, const GUID *guid_list) |
static int | dxva_get_decoder_guid (AVCodecContext *avctx, void *service, void *surface_format, unsigned guid_count, const GUID *guid_list, GUID *decoder_guid) |
static void | bufref_free_interface (void *opaque, uint8_t *data) |
static AVBufferRef * | bufref_wrap_interface (IUnknown *iface) |
static void | ff_dxva2_lock (AVCodecContext *avctx) |
static void | ff_dxva2_unlock (AVCodecContext *avctx) |
int | ff_dxva2_common_frame_params (AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) |
int | ff_dxva2_decode_init (AVCodecContext *avctx) |
int | ff_dxva2_decode_uninit (AVCodecContext *avctx) |
static void * | get_surface (const AVCodecContext *avctx, const AVFrame *frame) |
unsigned | ff_dxva2_get_surface_index (const AVCodecContext *avctx, AVDXVAContext *ctx, const AVFrame *frame, int curr) |
int | ff_dxva2_commit_buffer (AVCodecContext *avctx, AVDXVAContext *ctx, DECODER_BUFFER_DESC *dsc, unsigned type, const void *data, unsigned size, unsigned mb_count) |
static int | frame_add_buf (AVFrame *frame, AVBufferRef *ref) |
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)) |
int | ff_dxva2_is_d3d11 (const AVCodecContext *avctx) |
unsigned * | ff_dxva2_get_report_id (const AVCodecContext *avctx, AVDXVAContext *ctx) |
Variables | |
static const int | prof_mpeg2_main [] |
static const int | prof_h264_high [] |
static const int | prof_hevc_main [] |
static const int | prof_hevc_main10 [] |
static const int | prof_vp9_profile0 [] |
static const int | prof_vp9_profile2 [] |
static const int | prof_av1_profile0 [] |
static const dxva_mode | dxva_modes [] |
DEFINE_GUID | ( | ff_DXVA2_ModeMPEG2_VLD | , |
0xee27417f | , | ||
0x5e28 | , | ||
0x4e65 | , | ||
0xbe | , | ||
0xea | , | ||
0x1d | , | ||
0x26 | , | ||
0xb5 | , | ||
0x08 | , | ||
0xad | , | ||
0xc9 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeMPEG2and1_VLD | , |
0x86695f12 | , | ||
0x340e | , | ||
0x4f04 | , | ||
0x9f | , | ||
0xd3 | , | ||
0x92 | , | ||
0x53 | , | ||
0xdd | , | ||
0x32 | , | ||
0x74 | , | ||
0x60 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeH264_E | , |
0x1b81be68 | , | ||
0xa0c7 | , | ||
0x11d3 | , | ||
0xb9 | , | ||
0x84 | , | ||
0x00 | , | ||
0xc0 | , | ||
0x4f | , | ||
0x2e | , | ||
0x73 | , | ||
0xc5 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeH264_F | , |
0x1b81be69 | , | ||
0xa0c7 | , | ||
0x11d3 | , | ||
0xb9 | , | ||
0x84 | , | ||
0x00 | , | ||
0xc0 | , | ||
0x4f | , | ||
0x2e | , | ||
0x73 | , | ||
0xc5 | |||
) |
DEFINE_GUID | ( | ff_DXVADDI_Intel_ModeH264_E | , |
0x604F8E68 | , | ||
0x4951 | , | ||
0x4C54 | , | ||
0x88 | , | ||
0xFE | , | ||
0xAB | , | ||
0xD2 | , | ||
0x5C | , | ||
0x15 | , | ||
0xB3 | , | ||
0xD6 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeVC1_D | , |
0x1b81beA3 | , | ||
0xa0c7 | , | ||
0x11d3 | , | ||
0xb9 | , | ||
0x84 | , | ||
0x00 | , | ||
0xc0 | , | ||
0x4f | , | ||
0x2e | , | ||
0x73 | , | ||
0xc5 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeVC1_D2010 | , |
0x1b81beA4 | , | ||
0xa0c7 | , | ||
0x11d3 | , | ||
0xb9 | , | ||
0x84 | , | ||
0x00 | , | ||
0xc0 | , | ||
0x4f | , | ||
0x2e | , | ||
0x73 | , | ||
0xc5 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeHEVC_VLD_Main | , |
0x5b11d51b | , | ||
0x2f4c | , | ||
0x4452 | , | ||
0xbc | , | ||
0xc3 | , | ||
0x09 | , | ||
0xf2 | , | ||
0xa1 | , | ||
0x16 | , | ||
0x0c | , | ||
0xc0 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeHEVC_VLD_Main10 | , |
0x107af0e0 | , | ||
0xef1a | , | ||
0x4d19 | , | ||
0xab | , | ||
0xa8 | , | ||
0x67 | , | ||
0xa1 | , | ||
0x63 | , | ||
0x07 | , | ||
0x3d | , | ||
0x13 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeVP9_VLD_Profile0 | , |
0x463707f8 | , | ||
0xa1d0 | , | ||
0x4585 | , | ||
0x87 | , | ||
0x6d | , | ||
0x83 | , | ||
0xaa | , | ||
0x6d | , | ||
0x60 | , | ||
0xb8 | , | ||
0x9e | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeVP9_VLD_10bit_Profile2 | , |
0xa4c749ef | , | ||
0x6ecf | , | ||
0x48aa | , | ||
0x84 | , | ||
0x48 | , | ||
0x50 | , | ||
0xa7 | , | ||
0xa1 | , | ||
0x16 | , | ||
0x5f | , | ||
0xf7 | |||
) |
DEFINE_GUID | ( | ff_DXVA2_ModeAV1_VLD_Profile0 | , |
0xb8be4ccb | , | ||
0xcf53 | , | ||
0x46ba | , | ||
0x8d | , | ||
0x59 | , | ||
0xd6 | , | ||
0xb8 | , | ||
0xa6 | , | ||
0xda | , | ||
0x5d | , | ||
0x2a | |||
) |
DEFINE_GUID | ( | ff_DXVA2_NoEncrypt | , |
0x1b81beD0 | , | ||
0xa0c7 | , | ||
0x11d3 | , | ||
0xb9 | , | ||
0x84 | , | ||
0x00 | , | ||
0xc0 | , | ||
0x4f | , | ||
0x2e | , | ||
0x73 | , | ||
0xc5 | |||
) |
DEFINE_GUID | ( | ff_GUID_NULL | , |
0x00000000 | , | ||
0x0000 | , | ||
0x0000 | , | ||
0x00 | , | ||
0x00 | , | ||
0x00 | , | ||
0x00 | , | ||
0x00 | , | ||
0x00 | , | ||
0x00 | , | ||
0x00 | |||
) |
DEFINE_GUID | ( | ff_IID_IDirectXVideoDecoderService | , |
0xfc51a551 | , | ||
0xd5e7 | , | ||
0x11d9 | , | ||
0xaf | , | ||
0x55 | , | ||
0x00 | , | ||
0x05 | , | ||
0x4e | , | ||
0x43 | , | ||
0xff | , | ||
0x02 | |||
) |
|
static |
|
static |
Definition at line 195 of file dxva2.c.
Referenced by dxva_get_decoder_guid().
|
static |
Definition at line 215 of file dxva2.c.
Referenced by dxva_get_decoder_guid().
|
static |
|
static |
Definition at line 307 of file dxva2.c.
Referenced by bufref_wrap_interface().
|
static |
|
static |
Definition at line 560 of file dxva2.c.
Referenced by ff_dxva2_common_end_frame(), and ff_dxva2_decode_init().
|
static |
Definition at line 576 of file dxva2.c.
Referenced by ff_dxva2_common_end_frame(), and ff_dxva2_decode_init().
int ff_dxva2_common_frame_params | ( | AVCodecContext * | avctx, |
AVBufferRef * | hw_frames_ctx | ||
) |
int ff_dxva2_decode_init | ( | AVCodecContext * | avctx | ) |
int ff_dxva2_decode_uninit | ( | AVCodecContext * | avctx | ) |
Definition at line 730 of file dxva2.c.
Referenced by dxva2_av1_uninit(), and ff_dxva2_decode_init().
|
static |
Definition at line 753 of file dxva2.c.
Referenced by ff_dxva2_common_end_frame(), and ff_dxva2_get_surface_index().
unsigned ff_dxva2_get_surface_index | ( | const AVCodecContext * | avctx, |
AVDXVAContext * | ctx, | ||
const AVFrame * | frame, | ||
int | curr | ||
) |
Definition at line 770 of file dxva2.c.
Referenced by ff_dxva2_av1_fill_picture_parameters(), ff_dxva2_h264_fill_picture_parameters(), ff_dxva2_hevc_fill_picture_parameters(), ff_dxva2_mpeg2_fill_picture_parameters(), ff_dxva2_vc1_fill_picture_parameters(), ff_dxva2_vp9_fill_picture_parameters(), and fill_slice_long().
int ff_dxva2_commit_buffer | ( | AVCodecContext * | avctx, |
AVDXVAContext * | ctx, | ||
DECODER_BUFFER_DESC * | dsc, | ||
unsigned | type, | ||
const void * | data, | ||
unsigned | size, | ||
unsigned | mb_count | ||
) |
Definition at line 802 of file dxva2.c.
Referenced by commit_bitstream_and_slice_buffer(), and ff_dxva2_common_end_frame().
|
static |
Definition at line 875 of file dxva2.c.
Referenced by ff_dxva2_common_end_frame().
int ff_dxva2_common_end_frame | ( | AVCodecContext * | avctx, |
AVFrame * | frame, | ||
const void * | pp, | ||
unsigned | pp_size, | ||
const void * | qm, | ||
unsigned | qm_size, | ||
int(*)(AVCodecContext *, DECODER_BUFFER_DESC *bs, DECODER_BUFFER_DESC *slice) | commit_bs_si | ||
) |
Definition at line 891 of file dxva2.c.
Referenced by dxva2_av1_end_frame(), dxva2_h264_end_frame(), dxva2_hevc_end_frame(), dxva2_mpeg2_end_frame(), dxva2_vc1_end_frame(), and dxva2_vp9_end_frame().
int ff_dxva2_is_d3d11 | ( | const AVCodecContext * | avctx | ) |
Definition at line 1056 of file dxva2.c.
Referenced by commit_bitstream_and_slice_buffer(), ff_dxva2_commit_buffer(), ff_dxva2_common_end_frame(), ff_dxva2_get_report_id(), ff_dxva2_lock(), and ff_dxva2_unlock().
unsigned* ff_dxva2_get_report_id | ( | const AVCodecContext * | avctx, |
AVDXVAContext * | ctx | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 79 of file dxva2.c.
Referenced by dxva_get_decoder_guid().