strmbase: Print colorimetry information in strmbase_dump_media_type().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-10-13 23:30:26 -05:00 committed by Alexandre Julliard
parent 976fa1b491
commit ff01e58f73
3 changed files with 92 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "strmbase_private.h"
#include "dvdmedia.h"
#include "dxva.h"
WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
@ -132,6 +133,14 @@ void strmbase_dump_media_type(const AM_MEDIA_TYPE *mt)
if (vih->dwCopyProtectFlags) TRACE("copy-protection flags %#x, ", vih->dwCopyProtectFlags);
TRACE("aspect ratio %u/%u, ", vih->dwPictAspectRatioX, vih->dwPictAspectRatioY);
if (vih->u.dwControlFlags) TRACE("control flags %#x, ", vih->u.dwControlFlags);
if (vih->u.dwControlFlags & AMCONTROL_COLORINFO_PRESENT)
{
const DXVA_ExtendedFormat *colorimetry = (const DXVA_ExtendedFormat *)&vih->u.dwControlFlags;
TRACE("chroma site %#x, range %#x, matrix %#x, lighting %#x, primaries %#x, transfer function %#x, ",
colorimetry->VideoChromaSubsampling, colorimetry->NominalRange, colorimetry->VideoTransferMatrix,
colorimetry->VideoLighting, colorimetry->VideoPrimaries, colorimetry->VideoTransferFunction);
}
TRACE("size %dx%d, %u planes, %u bpp, compression %s, image size %u",
vih->bmiHeader.biWidth, vih->bmiHeader.biHeight, vih->bmiHeader.biPlanes,
vih->bmiHeader.biBitCount, debugstr_fourcc(vih->bmiHeader.biCompression),

View File

@ -22,6 +22,7 @@
#define AMCONTROL_USED 0x00000001
#define AMCONTROL_PAD_TO_4x3 0x00000002
#define AMCONTROL_PAD_TO_16x9 0x00000004
#define AMCONTROL_COLORINFO_PRESENT 0x00000080
typedef struct tagVIDEOINFOHEADER2 {
RECT rcSource;

View File

@ -565,6 +565,88 @@ typedef struct _DXVA_Status_VPx
#include <poppack.h>
typedef enum _DXVA_VideoChromaSubsampling
{
DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes = 0x1,
DXVA_VideoChromaSubsampling_Vertically_Cosited = 0x2,
DXVA_VideoChromaSubsampling_Horizontally_Cosited = 0x4,
DXVA_VideoChromaSubsampling_ProgressiveChroma = 0x8,
DXVA_VideoChromaSubsampling_Unknown = 0,
DXVA_VideoChromaSubsampling_Cosited = DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes
| DXVA_VideoChromaSubsampling_Vertically_Cosited
| DXVA_VideoChromaSubsampling_Horizontally_Cosited,
DXVA_VideoChromaSubsampling_DV_PAL = DXVA_VideoChromaSubsampling_Vertically_Cosited
| DXVA_VideoChromaSubsampling_Horizontally_Cosited,
DXVA_VideoChromaSubsampling_MPEG1 = DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes,
DXVA_VideoChromaSubsampling_MPEG2 = DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes
| DXVA_VideoChromaSubsampling_Horizontally_Cosited,
} DXVA_VideoChromaSubsampling;
typedef enum _DXVA_NominalRange
{
DXVA_NominalRange_Unknown = 0,
DXVA_NominalRange_0_255 = 1,
DXVA_NominalRange_16_235 = 2,
DXVA_NominalRange_48_208 = 3,
DXVA_NominalRange_Normal = DXVA_NominalRange_0_255,
DXVA_NominalRange_Wide = DXVA_NominalRange_16_235,
} DXVA_NominalRange;
typedef enum _DXVA_VideoTransferMatrix
{
DXVA_VideoTransferMatrix_Unknown = 0,
DXVA_VideoTransferMatrix_BT709 = 1,
DXVA_VideoTransferMatrix_BT601 = 2,
DXVA_VideoTransferMatrix_SMPTE240M = 3,
} DXVA_VideoTransferMatrix;
typedef enum _DXVA_VideoLighting
{
DXVA_VideoLighting_Unknown = 0,
DXVA_VideoLighting_bright = 1,
DXVA_VideoLighting_office = 2,
DXVA_VideoLighting_dim = 3,
DXVA_VideoLighting_dark = 4,
} DXVA_VideoLighting;
typedef enum _DXVA_VideoPrimaries
{
DXVA_VideoPrimaries_Unknown = 0,
DXVA_VideoPrimaries_reserved = 1,
DXVA_VideoPrimaries_BT709 = 2,
DXVA_VideoPrimaries_BT470_2_SysM = 3,
DXVA_VideoPrimaries_BT470_2_SysBG = 4,
DXVA_VideoPrimaries_SMPTE170M = 5,
DXVA_VideoPrimaries_SMPTE420M = 6,
DXVA_VideoPrimaries_EBU3213 = 7,
DXVA_VideoPrimaries_SMPTE_C = 8,
} DXVA_VideoPrimaries;
typedef enum _DXVA_VideoTransferFunction
{
DXVA_VideoTransFunc_Unknown = 0,
DXVA_VideoTransFunc_10 = 1,
DXVA_VideoTransFunc_18 = 2,
DXVA_VideoTransFunc_20 = 3,
DXVA_VideoTransFunc_22 = 4,
DXVA_VideoTransFunc_22_709 = 5,
DXVA_VideoTransFunc_22_240M = 6,
DXVA_VideoTransFunc_22_8bit_sRGB = 7,
DXVA_VideoTransFunc_28 = 8,
} DXVA_VideoTransferFunction;
typedef struct _DXVA_ExtendedFormat
{
UINT SampleFormat : 8;
UINT VideoChromaSubsampling : 4;
DXVA_NominalRange NominalRange : 3;
DXVA_VideoTransferMatrix VideoTransferMatrix : 3;
DXVA_VideoLighting VideoLighting : 4;
DXVA_VideoPrimaries VideoPrimaries : 5;
DXVA_VideoTransferFunction VideoTransferFunction : 5;
} DXVA_ExtendedFormat;
#ifdef __cplusplus
}
#endif