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
|
/*
* Copyright (C) 2016 Intel Corporation. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef TESTVAAPI_test_data_h
#define TESTVAAPI_test_data_h
#include "test_defs.h"
#include "test_utils.h"
#include <map>
#include <va/va.h>
#include <va/va_drmcommon.h>
namespace VAAPI {
static const Profiles g_vaProfiles = {
VAProfileNone,
VAProfileMPEG2Simple,
VAProfileMPEG2Main,
VAProfileMPEG4Simple,
VAProfileMPEG4AdvancedSimple,
VAProfileMPEG4Main,
VAProfileH264Main,
VAProfileH264High,
VAProfileVC1Simple,
VAProfileVC1Main,
VAProfileVC1Advanced,
VAProfileH263Baseline,
VAProfileJPEGBaseline,
VAProfileH264ConstrainedBaseline,
VAProfileVP8Version0_3,
VAProfileH264MultiviewHigh,
VAProfileH264StereoHigh,
VAProfileHEVCMain,
VAProfileHEVCMain10,
VAProfileVP9Profile0,
VAProfileVP9Profile1,
VAProfileVP9Profile2,
VAProfileVP9Profile3,
};
static const Profiles g_vaNoneProfiles = {
VAProfileNone,
};
static const Profiles g_vaMPEG2Profiles = {
VAProfileMPEG2Main, VAProfileMPEG2Simple,
};
static const Profiles g_vaMPEG4Profiles = {
VAProfileMPEG4Simple, VAProfileMPEG4Simple, VAProfileMPEG4AdvancedSimple,
VAProfileMPEG4Main,
};
static const Profiles g_vaH263Profiles = {
VAProfileH263Baseline,
};
static const Profiles g_vaH264Profiles = {
VAProfileH264Main, VAProfileH264High, VAProfileH264ConstrainedBaseline,
VAProfileH264MultiviewHigh, VAProfileH264StereoHigh,
};
static const Profiles g_vaVC1Profiles = {
VAProfileVC1Simple, VAProfileVC1Main, VAProfileVC1Advanced,
};
static const Profiles g_vaJPEGProfiles = {
VAProfileJPEGBaseline,
};
static const Profiles g_vaVP8Profiles = {
VAProfileVP8Version0_3,
};
static const Profiles g_vaHEVCProfiles = {
VAProfileHEVCMain, VAProfileHEVCMain10,
};
static const Profiles g_vaVP9Profiles = {
VAProfileVP9Profile0, VAProfileVP9Profile1, VAProfileVP9Profile2,
VAProfileVP9Profile3,
};
static const Entrypoints g_vaEntrypoints = {
VAEntrypointVLD,
VAEntrypointIZZ,
VAEntrypointIDCT,
VAEntrypointMoComp,
VAEntrypointDeblocking,
VAEntrypointEncSlice,
VAEntrypointEncPicture,
VAEntrypointEncSliceLP,
VAEntrypointVideoProc,
VAEntrypointFEI,
};
static const ConfigAttribTypes g_vaConfigAttribTypes = {
VAConfigAttribRTFormat,
VAConfigAttribSpatialResidual,
VAConfigAttribSpatialClipping,
VAConfigAttribIntraResidual,
VAConfigAttribEncryption,
VAConfigAttribRateControl,
VAConfigAttribDecSliceMode,
VAConfigAttribEncPackedHeaders,
VAConfigAttribEncInterlaced,
VAConfigAttribEncMaxRefFrames,
VAConfigAttribEncMaxSlices,
VAConfigAttribEncSliceStructure,
VAConfigAttribEncMacroblockInfo,
VAConfigAttribEncJPEG,
VAConfigAttribEncQualityRange,
VAConfigAttribEncSkipFrame,
VAConfigAttribEncROI,
VAConfigAttribEncRateControlExt,
VAConfigAttribFEIFunctionType,
VAConfigAttribFEIMVPredictors,
};
static const SurfaceAttribTypes g_vaSurfaceAttribTypes = {
VASurfaceAttribNone,
VASurfaceAttribPixelFormat,
VASurfaceAttribMinWidth,
VASurfaceAttribMaxWidth,
VASurfaceAttribMinHeight,
VASurfaceAttribMaxHeight,
VASurfaceAttribMemoryType,
VASurfaceAttribExternalBufferDescriptor,
VASurfaceAttribUsageHint,
VASurfaceAttribCount,
};
static const Resolutions g_vaResolutions = {
{ 16, 16 }, { 32, 32 }, { 176, 120 }, { 352, 240 },
{ 352, 288 }, { 480, 320 }, { 720, 480 }, { 720, 576 },
{ 768, 576 }, { 800, 480 }, { 854, 480 }, { 1280, 720 },
{ 1920, 1080 }, { 2048, 1080 }, { 4096, 2160 }, { 8192, 8192 },
{ 10240, 10240 } };
static const BitMasks g_vaRTFormats = {
VA_RT_FORMAT_YUV420, VA_RT_FORMAT_YUV422, VA_RT_FORMAT_YUV444,
VA_RT_FORMAT_YUV411, VA_RT_FORMAT_YUV400, VA_RT_FORMAT_YUV420_10BPP,
VA_RT_FORMAT_YUV422_10, VA_RT_FORMAT_YUV444_10, VA_RT_FORMAT_YUV420_12,
VA_RT_FORMAT_YUV422_12, VA_RT_FORMAT_YUV444_12,
VA_RT_FORMAT_RGB16, VA_RT_FORMAT_RGB32, VA_RT_FORMAT_RGBP,
VA_RT_FORMAT_RGB32_10BPP, VA_RT_FORMAT_PROTECTED,
};
static const BufferTypes g_vaBufferTypes = {
VAPictureParameterBufferType,
VAIQMatrixBufferType,
VABitPlaneBufferType,
VASliceGroupMapBufferType,
VASliceParameterBufferType,
VASliceDataBufferType,
VAMacroblockParameterBufferType,
VAResidualDataBufferType,
VADeblockingParameterBufferType,
VAImageBufferType,
VAProtectedSliceDataBufferType,
VAQMatrixBufferType,
VAHuffmanTableBufferType,
VAProbabilityBufferType,
VAEncCodedBufferType,
VAEncSequenceParameterBufferType,
VAEncPictureParameterBufferType,
VAEncSliceParameterBufferType,
VAEncPackedHeaderParameterBufferType,
VAEncPackedHeaderDataBufferType,
VAEncMiscParameterBufferType,
VAEncMacroblockParameterBufferType,
VAEncMacroblockMapBufferType,
VAProcPipelineParameterBufferType,
VAProcFilterParameterBufferType,
VAEncFEIMVBufferType,
VAEncFEIMBCodeBufferType,
VAEncFEIDistortionBufferType,
VAEncFEIMBControlBufferType,
VAEncFEIMVPredictorBufferType,
};
static const BitMasks g_vaRateControls = {
VA_RC_NONE, VA_RC_CBR, VA_RC_VBR, VA_RC_VCM, VA_RC_CQP,
VA_RC_VBR_CONSTRAINED, VA_RC_ICQ, VA_RC_MB, VA_RC_CFS,
VA_RC_PARALLEL,VA_RC_QVBR,VA_RC_AVBR,
#if VA_CHECK_VERSION(1, 10, 0)
VA_RC_TCBRC,
#endif
};
static const BitMasks g_vaDecSliceModes = {
VA_DEC_SLICE_MODE_NORMAL, VA_DEC_SLICE_MODE_BASE,
};
static const BitMasks g_vaEncPackedHeaders = {
VA_ENC_PACKED_HEADER_SEQUENCE, VA_ENC_PACKED_HEADER_PICTURE,
VA_ENC_PACKED_HEADER_SLICE, VA_ENC_PACKED_HEADER_MISC,
VA_ENC_PACKED_HEADER_RAW_DATA,
};
static const BitMasks g_vaEncInterlaced = {
VA_ENC_INTERLACED_FRAME, VA_ENC_INTERLACED_FIELD, VA_ENC_INTERLACED_MBAFF,
VA_ENC_INTERLACED_PAFF,
};
static const BitMasks g_vaFEIFunctionTypes = {
VA_FEI_FUNCTION_ENC, VA_FEI_FUNCTION_PAK, VA_FEI_FUNCTION_ENC_PAK,
};
static const std::map<VAConfigAttribType, const BitMasks&>
g_vaConfigAttribBitMasks = {
{VAConfigAttribRTFormat, g_vaRTFormats},
{VAConfigAttribRateControl, g_vaRateControls},
{VAConfigAttribDecSliceMode, g_vaDecSliceModes},
{VAConfigAttribEncPackedHeaders, g_vaEncPackedHeaders},
{VAConfigAttribEncInterlaced, g_vaEncInterlaced},
{VAConfigAttribFEIFunctionType, g_vaFEIFunctionTypes},
};
static const BitMasks g_vaSurfaceMemTypes = {
VA_SURFACE_ATTRIB_MEM_TYPE_VA, VA_SURFACE_ATTRIB_MEM_TYPE_V4L2,
VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR, VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM,
VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME,
VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2,
};
static const std::map<VASurfaceAttribType, const BitMasks&>
g_vaSurfaceAttribBitMasks = {
{VASurfaceAttribMemoryType, g_vaSurfaceMemTypes},
};
} // namespace VAAPI
#endif
|