1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
|
/*############################################################################
# Copyright (C) 2005 Intel Corporation
#
# SPDX-License-Identifier: MIT
############################################################################*/
#ifndef __SAMPLE_VPP_CONFIG_H
#define __SAMPLE_VPP_CONFIG_H
#include <vector>
#include "vpl/mfxvideo++.h"
#include "vpl/mfxvideo.h"
#ifndef MFX_VERSION
#error MFX_VERSION not defined
#endif
enum { NOT_INIT_VALUE = 0xFFF7 };
enum MemType { SYSTEM_MEMORY = 0x00, D3D9_MEMORY = 0x01, D3D11_MEMORY = 0x02, VAAPI_MEMORY = 0x03 };
#define VPP_PROCAMP_BRIGHTNESS_DEFAULT 0.0
#define VPP_PROCAMP_CONTRAST_DEFAULT 1.0
#define VPP_PROCAMP_HUE_DEFAULT 0.0
#define VPP_PROCAMP_SATURATION_DEFAULT 1.0
#define VPP_DENOISE_FACTOR_DEFAULT NOT_INIT_VALUE
#define VPP_FILTER_FACTOR_DEFAULT NOT_INIT_VALUE
#define MULTI_VIEW_COUNT_MAX (1024)
#define MAX_INPUT_STREAMS 64
typedef enum {
VPP_FILTER_DISABLED = 0,
VPP_FILTER_ENABLED_DEFAULT = 1,
VPP_FILTER_ENABLED_CONFIGURED = 7
} FilterConfig;
typedef struct {
FilterConfig mode;
} sVideoAnalysisParam;
typedef struct {
FilterConfig mode;
} sVarianceReportParam;
typedef struct {
FilterConfig mode;
} sIDetectParam; // for interlace detection algorithm (PICSTRUCT_DETECTION)
typedef struct {
mfxF64 brightness;
mfxF64 contrast;
mfxF64 saturation;
mfxF64 hue;
FilterConfig mode;
} sProcAmpParam;
struct sVideoSignalInfoParam : public mfxExtVPPVideoSignalInfo {
FilterConfig mode;
sVideoSignalInfoParam() : mode(VPP_FILTER_DISABLED) {
In.NominalRange = MFX_NOMINALRANGE_UNKNOWN;
In.TransferMatrix = MFX_TRANSFERMATRIX_UNKNOWN;
Out = In;
};
};
struct sMirroringParam : public mfxExtVPPMirroring {
FilterConfig mode;
sMirroringParam() : mode(VPP_FILTER_DISABLED) {
Type = MFX_MIRRORING_DISABLED;
};
};
typedef struct {
mfxU16 factor;
FilterConfig mode;
mfxU16 config;
} sDenoiseParam;
struct sColorFillParam : public mfxExtVPPColorFill {
FilterConfig mode;
sColorFillParam() : mfxExtVPPColorFill(), mode(VPP_FILTER_DISABLED) {}
};
#ifdef ENABLE_MCTF
typedef struct {
mfxExtVppMctf params;
FilterConfig mode;
} sMCTFParam;
#endif
typedef struct {
mfxU16 factor;
FilterConfig mode;
} sDetailParam;
typedef struct {
mfxU32 algorithm;
FilterConfig mode;
} sFrameRateConversionParam;
typedef struct {
mfxU32 algorithm;
FilterConfig mode;
} sSRParam;
typedef struct {
mfxU16 algorithm;
mfxU16 tc_pattern;
mfxU16 tc_pos;
FilterConfig mode;
} sDIParam;
typedef struct {
char streamName[MSDK_MAX_FILENAME_LEN];
mfxVPPCompInputStream compStream;
mfxU32 streamFourcc;
} sCompositionStreamInfo;
typedef struct {
sCompositionStreamInfo streamInfo[MAX_INPUT_STREAMS];
FilterConfig mode;
} sCompositionParam;
//------------------------------------------
// MSDK 3.0 (re-priority)
//------------------------------------------
typedef struct {
bool bBT709;
FilterConfig mode;
} sGamutMappingParam;
//------------------------------------------
// MSDK API 1.5
//------------------------------------------
typedef struct {
mfxU16 Red;
mfxU16 Green;
mfxU16 Blue;
mfxU16 Cyan;
mfxU16 Magenta;
mfxU16 Yellow;
FilterConfig mode;
} sTccParam;
typedef struct {
FilterConfig mode;
} sAceParam;
typedef struct {
mfxU16 SkinToneFactor;
FilterConfig mode;
} sSteParam;
typedef struct {
mfxU8 istabMode;
FilterConfig mode;
} sIStabParam;
//-------------------------------------------------------
typedef struct {
mfxU16 viewCount;
FilterConfig mode;
} sMultiViewParam;
typedef struct {
mfxU16 active;
mfxU16 width;
mfxU16 height;
// cropX/Y/W/H will be added ASAP
mfxU16 cropX;
mfxU16 cropY;
mfxU16 cropW;
mfxU16 cropH;
} sSVCLayerDescr;
typedef struct {
sSVCLayerDescr descr[8];
FilterConfig mode;
} sSVCParam;
class ViewGenerator {
public:
ViewGenerator(mfxU16 viewCount) : m_viewID(viewCount - 1), m_viewCount(viewCount) {}
~ViewGenerator(void) {
m_viewID = 0;
m_viewCount = 0;
}
mfxU16 GetNextViewID(void) {
m_viewID++;
m_viewID %= m_viewCount;
return m_viewID;
};
mfxU16 GetViewIndx(mfxU16 viewID) {
return viewID;
};
private:
mfxU16 m_viewID;
mfxU16 m_viewCount;
};
typedef struct {
FilterConfig mode;
mfxU16 VideoFullRange;
mfxU16 ColourPrimaries;
mfxU16 TransferCharacteristics;
} sVideoSignalInfo;
#endif /* __SAMPLE_VPP_CONFIG_H */
/* EOF */
|