qt: playlist: use item title if available
[vlc.git] / modules / video_chroma / dxgi_fmt.h
blob32b68ae445380883a0dd1657a2b9a21caee97328
1 /*****************************************************************************
2 * dxgi_fmt.h : DXGI helper calls
3 *****************************************************************************
4 * Copyright © 2015 VLC authors, VideoLAN and VideoLabs
6 * Authors: Steve Lhomme <robux4@gmail.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
23 #ifndef VLC_VIDEOCHROMA_DXGI_FMT_H_
24 #define VLC_VIDEOCHROMA_DXGI_FMT_H_
26 #include <dxgi.h>
27 #include <dxgiformat.h>
29 #include <vlc_common.h>
30 #include <vlc_fourcc.h>
32 #define GPU_MANUFACTURER_AMD 0x1002
33 #define GPU_MANUFACTURER_NVIDIA 0x10DE
34 #define GPU_MANUFACTURER_VIA 0x1106
35 #define GPU_MANUFACTURER_INTEL 0x8086
36 #define GPU_MANUFACTURER_S3 0x5333
37 #define GPU_MANUFACTURER_QUALCOMM 0x4D4F4351
39 #define DXGI_MAX_SHADER_VIEW 4
40 #define DXGI_MAX_RENDER_TARGET 2 // for NV12/P010 we render Y and UV separately
42 typedef struct
44 const char *name;
45 DXGI_FORMAT formatTexture;
46 vlc_fourcc_t fourcc;
47 uint8_t bitsPerChannel;
48 uint8_t widthDenominator;
49 uint8_t heightDenominator;
50 DXGI_FORMAT resourceFormat[DXGI_MAX_SHADER_VIEW];
51 } d3d_format_t;
53 const char *DxgiFormatToStr(DXGI_FORMAT format);
54 vlc_fourcc_t DxgiFormatFourcc(DXGI_FORMAT format);
55 const d3d_format_t *DxgiGetRenderFormatList(void);
56 void DxgiFormatMask(DXGI_FORMAT format, video_format_t *);
57 DXGI_FORMAT DxgiFourccFormat(vlc_fourcc_t fcc);
58 const char *DxgiVendorStr(unsigned int gpu_vendor);
59 UINT DxgiResourceCount(const d3d_format_t *);
61 bool DxgiIsRGBFormat(const d3d_format_t *);
63 #define DXGI_RGB_FORMAT 1
64 #define DXGI_YUV_FORMAT 2
66 #define DXGI_CHROMA_CPU 1
67 #define DXGI_CHROMA_GPU 2
69 union DXGI_Color
71 struct {
72 FLOAT r, g, b, a;
74 struct {
75 FLOAT y;
77 struct {
78 FLOAT u, v;
80 FLOAT array[4];
82 void DXGI_GetBlackColor( const d3d_format_t *,
83 union DXGI_Color black[DXGI_MAX_RENDER_TARGET],
84 size_t colors[DXGI_MAX_RENDER_TARGET] );
86 #endif /* include-guard */