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 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
|
/******************************************************************************\
Copyright (c) 2005-2019, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This sample was distributed or derived from the Intel's Media Samples package.
The original version of this sample may be obtained from https://software.intel.com/en-us/intel-media-server-studio
or https://software.intel.com/en-us/media-client-solutions-support.
\**********************************************************************************/
#ifndef __SAMPLE_VPP_CONFIG_H
#define __SAMPLE_VPP_CONFIG_H
#include <vector>
#include "mfxvideo.h"
#include "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_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;
} 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
{
mfxU16 algorithm;
mfxU16 tc_pattern;
mfxU16 tc_pos;
FilterConfig mode;
} sDIParam;
typedef struct
{
msdk_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;
};
#endif /* __SAMPLE_VPP_CONFIG_H */
/* EOF */
|