diff options
author | wm4 <wm4@nowhere> | 2016-04-29 23:13:24 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-29 23:24:28 +0200 |
commit | 016eab220971ecd3d4509bb4936cb579e9b4a7c3 (patch) | |
tree | 551629d12713b3e9c03d34d04c91692e8aa88af1 /video/decode/d3d.h | |
parent | bda111018c2440e0af70b462d24c757beb37b11f (diff) | |
download | mpv-016eab220971ecd3d4509bb4936cb579e9b4a7c3.tar.bz2 mpv-016eab220971ecd3d4509bb4936cb579e9b4a7c3.tar.xz |
d3d11va, dxva2: simplify decoder selection
In particular, this moves the depth test to common code.
Should be functionally equivalent, except that for DXVA2, the
IDirectXVideoDecoderService_GetDecoderRenderTargets API is called
more often potentially.
Diffstat (limited to 'video/decode/d3d.h')
-rw-r--r-- | video/decode/d3d.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/video/decode/d3d.h b/video/decode/d3d.h index bbd6bdfd2a..21b930528a 100644 --- a/video/decode/d3d.h +++ b/video/decode/d3d.h @@ -24,6 +24,13 @@ struct mp_image; struct lavc_ctx; +struct d3d_decoded_format { + DWORD dxfmt; // D3DFORMAT or DXGI_FORMAT + const char *name; // informational string repr. of dxfmt_decoded + int depth; // significant bits (not full size) + int mpfmt; // IMGFMT_ with compatible memory layout and semantics +}; + struct d3d_decoder_fmt { const GUID *guid; int mpfmt_decoded; @@ -31,9 +38,12 @@ struct d3d_decoder_fmt { }; int d3d_probe_codec(const char *codec); + struct d3d_decoder_fmt d3d_select_decoder_mode( struct lavc_ctx *s, const GUID *device_guids, UINT n_guids, - DWORD (*get_dxfmt_cb)(struct lavc_ctx *s, const GUID *guid, int depth)); + const struct d3d_decoded_format *formats, int n_formats, + bool (*test_fmt_cb)(struct lavc_ctx *s, const GUID *guid, + const struct d3d_decoded_format *fmt)); char *d3d_decoder_guid_to_desc_buf(char *buf, size_t buf_size, const GUID *mode_guid); |