1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevVideo/src/TestDevVideoPlayTestData.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,679 @@
1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Header file: DevVideoPlay test data.
1.18 +//
1.19 +//
1.20 +
1.21 +/**
1.22 + @file TestDevVideoPlayTestData.h
1.23 +*/
1.24 +
1.25 +#ifndef __TESTDEVVIDEOPLAYTESTDATA_H__
1.26 +#define __TESTDEVVIDEOPLAYTESTDATA_H__
1.27 +
1.28 +#include "TSU_MMF_DevVideo.h"
1.29 +
1.30 +
1.31 +// mime types
1.32 +_LIT8(KTestMimeType1, "video/testvideo");
1.33 +
1.34 +// optional data
1.35 +_LIT8(KTestOptional1, "blah blah blah blah blah");
1.36 +
1.37 +// test uncompressed video formats
1.38 +const TUncompressedVideoFormat KTestVidFormat1 = {ERgbRawData};
1.39 +const TUncompressedVideoFormat KTestVidFormat2 = {ERgbFbsBitmap};
1.40 +const TUncompressedVideoFormat KTestVidFormat3 = {EYuvRawData};
1.41 +
1.42 +// test unit and encapsulation types
1.43 +const TVideoDataUnitType KTestUnitType1 = EDuCodedPicture;
1.44 +const TVideoDataUnitEncapsulation KTestEncapType1 = EDuElementaryStream;
1.45 +
1.46 +// test compressed video format utility function
1.47 +static inline CCompressedVideoFormat* GetTestCVFormatL( const TDesC8& aMimeType )
1.48 + {
1.49 + CCompressedVideoFormat* temp = CCompressedVideoFormat::NewL( aMimeType, KTestOptional1 );
1.50 + return temp;
1.51 + }
1.52 +
1.53 +// test pre-process types
1.54 +const TUint32 KTestProcessType1 = EPpInputCrop | EPpMirror | EPpRotate;
1.55 +const TUint32 KTestProcessType2 = EPpScale | EPpOutputCrop | EPpOutputPad;
1.56 +
1.57 +// input crop rectangles
1.58 +const TInt KTestInputCropRectA = 0;
1.59 +const TInt KTestInputCropRectB = 50;
1.60 +const TInt KTestInputCropRectC = 100;
1.61 +const TInt KTestInputCropRectD = 150;
1.62 +
1.63 +// KTestInputCropRect1 = A, B, C, D;
1.64 +// KTestInputCropRect2 = D, C, B, A;
1.65 +
1.66 +// yuv to rgb options
1.67 +const TYuvToRgbOptions KTestYuvToRgb1 = {50, 50, 50, 0.5, EDitherNone};
1.68 +const TYuvToRgbOptions KTestYuvToRgb2 = {100, 100, 100, 1.0, EDitherErrorDiffusion};
1.69 +static inline TBool CompareYuvRgbOptions(const TYuvToRgbOptions& a, const TYuvToRgbOptions& b)
1.70 + {
1.71 + if ( (a.iLightness == b.iLightness) && (a.iSaturation == b.iSaturation) &&
1.72 + (a.iContrast == b.iContrast) && (a.iGamma == b.iGamma) &&
1.73 + (a.iDitherType == b.iDitherType) )
1.74 + return ETrue;
1.75 + else return EFalse;
1.76 + }
1.77 +
1.78 +
1.79 +// conversion matrices
1.80 +const TYuvConversionMatrix KTestYuvMatrix1 = {{1, 2, 3}, {4, 5, 6, 7, 8, 9, 10, 11, 12}, {13, 14, 15}};
1.81 +const TYuvConversionMatrix KTestYuvMatrix2 = {{-1, -2, -3}, {-4, -5, -6, -7, -8, -9, -10, -11, -12}, {-13, -14, -15}};
1.82 +
1.83 +static inline TBool CompareYuvMatrices(const TYuvConversionMatrix& a, const TYuvConversionMatrix& b)
1.84 + {
1.85 + TBool same = ETrue;
1.86 + TInt x = 0;
1.87 +
1.88 + for (x = 0; x < 3; x++)
1.89 + {
1.90 + if ( (a.iPostOffset[x] != b.iPostOffset[x]) ||
1.91 + (a.iPreOffset[x] != b.iPreOffset[x]) )
1.92 + {
1.93 + same = EFalse;
1.94 + }
1.95 + }
1.96 +
1.97 + for (x = 0; x < 9; x++)
1.98 + {
1.99 + if (a.iMatrix[x] != b.iMatrix[x])
1.100 + {
1.101 + same = EFalse;
1.102 + }
1.103 + }
1.104 +
1.105 + return same;
1.106 + }
1.107 +
1.108 +// yuv formats
1.109 +const TYuvFormat KTestYuvFormat1 = {EYuvRange0, EYuv420Chroma1, EYuvDataPlanar, const_cast <TYuvConversionMatrix*> (&KTestYuvMatrix1), const_cast <TYuvConversionMatrix*> (&KTestYuvMatrix2), 10, 20};
1.110 +const TYuvFormat KTestYuvFormat2 = {EYuvRange1, EYuv420Chroma2, EYuvDataInterleavedLE, const_cast <TYuvConversionMatrix*> (&KTestYuvMatrix2), const_cast <TYuvConversionMatrix*> (&KTestYuvMatrix1), 5, 10};
1.111 +
1.112 +static inline TBool CompareYuvFormats(const TYuvFormat& a, const TYuvFormat& b)
1.113 + {
1.114 + if ( (a.iCoefficients == b.iCoefficients) &&
1.115 + (a.iPattern == b.iPattern) &&
1.116 + (a.iDataLayout == b.iDataLayout) &&
1.117 + (CompareYuvMatrices(*a.iYuv2RgbMatrix, *b.iYuv2RgbMatrix)) &&
1.118 + (CompareYuvMatrices(*a.iRgb2YuvMatrix, *b.iRgb2YuvMatrix)) &&
1.119 + (a.iAspectRatioNum == b.iAspectRatioNum) &&
1.120 + (a.iAspectRatioDenom == b.iAspectRatioDenom) )
1.121 + return ETrue;
1.122 + else return EFalse;
1.123 + }
1.124 +
1.125 +// rgb formats
1.126 +const TRgbFormat KTestRgbFormat1 = ERgb16bit444;
1.127 +const TRgbFormat KTestRgbFormat2 = EFbsBitmapColor16M;
1.128 +
1.129 +// rotation types
1.130 +const TRotationType KTestRotate1 = ERotate90Clockwise;
1.131 +const TRotationType KTestRotate2 = ERotate90Anticlockwise;
1.132 +
1.133 +// test scale size
1.134 +const TInt KTestScaleX = 100;
1.135 +const TInt KTestScaleY = 50;
1.136 +
1.137 +// output crop rectangles
1.138 +const TInt KTestOutputCropRectA = 0;
1.139 +const TInt KTestOutputCropRectB = 50;
1.140 +const TInt KTestOutputCropRectC = 256;
1.141 +const TInt KTestOutputCropRectD = 350;
1.142 +
1.143 +// KTestOutputCropRect1 = A, B, C, D;
1.144 +// KTestOutputCropRect2 = D, C, B, A;
1.145 +
1.146 +// post-processor options
1.147 +_LIT8(KTestPostProcOptions1, "abcdefghijklmno");
1.148 +_LIT8(KTestPostProcOptions2, "123456-7-654321");
1.149 +
1.150 +// buffer options creation utility function
1.151 +static inline CMMFDevVideoPlay::TBufferOptions GetTestBufferOptions( void )
1.152 + {
1.153 + CMMFDevVideoPlay::TBufferOptions buffOptions;
1.154 +
1.155 + buffOptions.iPreDecodeBufferSize = 10;
1.156 + buffOptions.iMaxPostDecodeBufferSize = 20;
1.157 + buffOptions.iPreDecoderBufferPeriod = 30;
1.158 + buffOptions.iPostDecoderBufferPeriod = 40;
1.159 + buffOptions.iMaxInputBufferSize = 50;
1.160 + buffOptions.iMinNumInputBuffers = 60;
1.161 +
1.162 + return buffOptions;
1.163 + }
1.164 +
1.165 +// buffer options comparison utility function
1.166 +static inline TBool CompareBufferOptions(const CMMFDevVideoPlay::TBufferOptions& a, const CMMFDevVideoPlay::TBufferOptions& b)
1.167 + {
1.168 + if ( (a.iPreDecodeBufferSize == b.iPreDecodeBufferSize) &&
1.169 + (a.iMaxPostDecodeBufferSize == b.iMaxPostDecodeBufferSize) &&
1.170 + (a.iPreDecoderBufferPeriod == b.iPreDecoderBufferPeriod) &&
1.171 + (a.iPostDecoderBufferPeriod == b.iPostDecoderBufferPeriod) &&
1.172 + (a.iMaxInputBufferSize == b.iMaxInputBufferSize) &&
1.173 + (a.iMinNumInputBuffers == b.iMinNumInputBuffers) )
1.174 + return ETrue;
1.175 + else return EFalse;
1.176 + }
1.177 +
1.178 +// Hrd/Vbv test data
1.179 +const THrdVbvSpecification KTestHrdVbvSpec = EHrdVbv3GPP;
1.180 +_LIT8(KTestHrdVbvParams, "not exactly a package of parameters but never mind");
1.181 +
1.182 +// direct screen access test data
1.183 +const TInt KTestDSARectA = 0;
1.184 +const TInt KTestDSARectB = 100;
1.185 +const TInt KTestDSARectC = 200;
1.186 +const TInt KTestDSARectD = 300;
1.187 +
1.188 +// KTestDSARect1 = A, B, C, D;
1.189 +// KTestDSARect2 = D, C, B, A;
1.190 +
1.191 +// KTestDSARegion1 = {KTestDSARect1};
1.192 +// KTestDSARegion2 = {KTestDSARect2};
1.193 +
1.194 +// position test data
1.195 +const TInt KTestPosition = 12345;
1.196 +const TInt KTestPositionFatal = 666;
1.197 +const TInt KTestDecodePosition = 256;
1.198 +const TInt KTestPlayPosition = 512;
1.199 +
1.200 +// buffer bytes test data
1.201 +const TUint KTestPreDecoderBytes = 1024;
1.202 +const TUint KTestPictureBytes = 2048;
1.203 +
1.204 +// picture counters creation utility function
1.205 +static inline CMMFDevVideoPlay::TPictureCounters GetTestPictureCounters( void )
1.206 + {
1.207 + CMMFDevVideoPlay::TPictureCounters picCount;
1.208 +
1.209 + picCount.iPicturesSkipped = 10;
1.210 + picCount.iPicturesDecoded = 20;
1.211 + picCount.iPicturesDisplayed = 30;
1.212 + picCount.iTotalPictures = 40;
1.213 +
1.214 + return picCount;
1.215 + }
1.216 +
1.217 +// picture counters comparison utility function
1.218 +static inline TBool ComparePictureCounters(const CMMFDevVideoPlay::TPictureCounters& a, const CMMFDevVideoPlay::TPictureCounters& b)
1.219 + {
1.220 + if ( (a.iPicturesSkipped == b.iPicturesSkipped) &&
1.221 + (a.iPicturesDecoded == b.iPicturesDecoded) &&
1.222 + (a.iPicturesDisplayed == b.iPicturesDisplayed) &&
1.223 + (a.iTotalPictures == b.iTotalPictures) )
1.224 + return ETrue;
1.225 + else return EFalse;
1.226 + }
1.227 +
1.228 +// bitstream counters creation utility function
1.229 +static inline CMMFDevVideoPlay::TBitstreamCounters GetTestBitstreamCounters( void )
1.230 + {
1.231 + CMMFDevVideoPlay::TBitstreamCounters bitCount;
1.232 +
1.233 + bitCount.iLostPackets = 256;
1.234 + bitCount.iTotalPackets = 512;
1.235 +
1.236 + return bitCount;
1.237 + }
1.238 +
1.239 +// bitstream counters comparison utility function
1.240 +static inline TBool CompareBitstreamCounters(const CMMFDevVideoPlay::TBitstreamCounters& a, const CMMFDevVideoPlay::TBitstreamCounters& b)
1.241 + {
1.242 + if ( (a.iLostPackets == b.iLostPackets) &&
1.243 + (a.iTotalPackets == b.iTotalPackets) )
1.244 + return ETrue;
1.245 + else return EFalse;
1.246 + }
1.247 +
1.248 +// test num buffers
1.249 +const TUint KTestNumFreeBuffers = 4096;
1.250 +
1.251 +// complexity levels
1.252 +const TUint KTestComplexityLevel1 = 1;
1.253 +const TUint KTestComplexityLevel2 = 3;
1.254 +const TUint KTestNumComplexityLevels1 = 5;
1.255 +const TUint KTestNumComplexityLevels2 = 10;
1.256 +
1.257 +// complexity level info creation utility function
1.258 +static inline CMMFDevVideoPlay::TComplexityLevelInfo GetTestLevelInfo( TInt a )
1.259 + {
1.260 + CMMFDevVideoPlay::TComplexityLevelInfo levInfo;
1.261 +
1.262 + levInfo.iOptions = CMMFDevVideoPlay::TComplexityLevelInfo::EAvgPictureRate;
1.263 + levInfo.iAvgPictureRate = 1.5;
1.264 + levInfo.iPictureSize.SetSize(a * 100,a * 200);
1.265 + levInfo.iRelativeImageQuality = 0.5;
1.266 + levInfo.iRequiredMIPS = a;
1.267 + levInfo.iRelativeProcessTime = 0.3;
1.268 +
1.269 + return levInfo;
1.270 + }
1.271 +
1.272 +// complexity level info comparison utility function
1.273 +static inline TBool CompareLevelInfos(const CMMFDevVideoPlay::TComplexityLevelInfo& a, const CMMFDevVideoPlay::TComplexityLevelInfo& b)
1.274 + {
1.275 + if ( (a.iOptions == b.iOptions) &&
1.276 + (a.iAvgPictureRate == b.iAvgPictureRate) &&
1.277 + (a.iPictureSize == b.iPictureSize) &&
1.278 + (a.iRelativeImageQuality == b.iRelativeImageQuality) &&
1.279 + (a.iRequiredMIPS == b.iRequiredMIPS) &&
1.280 + (a.iRelativeProcessTime == b.iRelativeProcessTime) )
1.281 + return ETrue;
1.282 + else return EFalse;
1.283 + }
1.284 +
1.285 +// picture timestamp test data
1.286 +const TInt KTestPictureTimestamp = 12345;
1.287 +
1.288 +// input buffer test data
1.289 +_LIT8(KTestBufferString, "Roobarb and Custard!");
1.290 +const TUint32 KTestBufferOptions = TVideoInputBuffer::EDecodingTimestamp;
1.291 +const TUint KTestBufferSize = 20;
1.292 +
1.293 +// decoder info
1.294 +const TUint32 KTestDecoderInfoCount = 3;
1.295 +
1.296 +const TText8* const KTestDecoderInfoMimeArray[KTestDecoderInfoCount] =
1.297 + {
1.298 + _S8("video/bunglevideo"),
1.299 + _S8("video/zippyvideo"),
1.300 + _S8("video/georgevideo")
1.301 + };
1.302 +
1.303 +_LIT(KTestDecoderInfoManufacturer, "fred bloggs plc");
1.304 +_LIT(KTestDecoderInfoIdentifier, "video funkifier");
1.305 +
1.306 +const TInt KTestDecoderInfoMaxSizeX = 256;
1.307 +const TInt KTestDecoderInfoMaxSizeY = 512;
1.308 +
1.309 +_LIT8(KTestDecoderInfoCSInfo, "coded by a blind monkey");
1.310 +_LIT8(KTestDecoderInfoISInfo, "implemented by a baboon");
1.311 +
1.312 +const TInt KTestDecoderInfoVersionMaj = 1;
1.313 +const TInt KTestDecoderInfoVersionMin = 2;
1.314 +const TInt KTestDecoderInfoVersionBuild = 3;
1.315 +// KTestDecoderInfoVersion = Maj.Min.Build;
1.316 +
1.317 +// post processor info
1.318 +const TUint32 KTestPostProcInfoCount = 3;
1.319 +_LIT(KTestPostProcInfoManufacturer, "honest sid inc");
1.320 +_LIT(KTestPostProcInfoIdentifier, "video post-funkifier");
1.321 +
1.322 +_LIT8(KTestPostProcInfoISInfo, "implemented by a lame pigeon");
1.323 +
1.324 +const TInt KTestPostProcInfoVersionMaj = 1;
1.325 +const TInt KTestPostProcInfoVersionMin = 2;
1.326 +const TInt KTestPostProcInfoVersionBuild = 3;
1.327 +// KTestPostProcInfoVersion = Maj.Min.Build;
1.328 +
1.329 +const TUint32 KTestPostProcInfoRotations = ERotate90Clockwise | ERotate90Anticlockwise | ERotate180;
1.330 +
1.331 +const TYuvToRgbCapabilities KTestPostProcInfoYuvToRgbCaps = {1, 2, 3, ETrue, EFalse, ETrue, EFalse, 4};
1.332 +static inline TBool CompareYuvRgbCaps(const TYuvToRgbCapabilities& a, const TYuvToRgbCapabilities& b)
1.333 + {
1.334 + if ( (a.iSamplingPatterns == b.iSamplingPatterns) && (a.iCoefficients == b.iCoefficients) &&
1.335 + (a.iRgbFormats == b.iRgbFormats) && (a.iLightnessControl == b.iLightnessControl) &&
1.336 + (a.iSaturationControl == b.iSaturationControl) && (a.iContrastControl == b.iContrastControl) &&
1.337 + (a.iGammaCorrection == b.iGammaCorrection) && (a.iDitherTypes == b.iDitherTypes) )
1.338 + return ETrue;
1.339 + else return EFalse;
1.340 + }
1.341 +
1.342 +const TUncompressedVideoFormat KTestPostProcInfoFormatArray[KTestPostProcInfoCount] =
1.343 + {{ERgbRawData}, {ERgbFbsBitmap}, {EYuvRawData}};
1.344 +
1.345 +const TUint32 KTestPostProcInfoCombsArray[KTestPostProcInfoCount] =
1.346 + {KTestProcessType1, KTestProcessType2, EPpNoiseFilter | EPpColorEnhancement | EPpFrameStabilisation};
1.347 +
1.348 +const TScaleFactor KTestPostProcInfoScaleFactorsArray[KTestPostProcInfoCount] =
1.349 + {{1, 2}, {1, 4}, {1,8}};
1.350 +
1.351 +static inline TBool CompareScaleFactors(const TScaleFactor& a, const TScaleFactor& b)
1.352 + {
1.353 + if ((a.iScaleNum == b.iScaleNum) && (a.iScaleDenom == b.iScaleDenom))
1.354 + return ETrue;
1.355 + else return EFalse;
1.356 + }
1.357 +
1.358 +const TUncompressedVideoFormat KTestPostProcInfoNegativeFormat = {EYuvRawData};
1.359 +const TUint32 KTestPostProcInfoNegativeComb = EPpCustom;
1.360 +
1.361 +
1.362 +// video header information
1.363 +const TVideoDataUnitType KTestDataUnitType = EDuCodedPicture;
1.364 +const TVideoDataUnitEncapsulation KTestDataUnitEncap = EDuElementaryStream;
1.365 +const TVideoInputBuffer::TVideoBufferOptions KTestInputBufferOptions = TVideoInputBuffer::EPresentationTimestamp;
1.366 +const TVideoPictureHeader::THeaderOptions KTestPictureHeaderOptions = TVideoPictureHeader::EPresentationTimestamp;
1.367 +const TInt KTestInputBufferTimestamp = 1000000;
1.368 +const TInt KTestPictureHeaderTimestamp = 2000000;
1.369 +_LIT8(KTestInputBufferData, "I'm a lumber jack and I'm OK!");
1.370 +
1.371 +// TPictureData
1.372 +const TInt KTestPictureDataSizeX = 57;
1.373 +const TInt KTestPictureDataSizeY = 18;
1.374 +
1.375 +// snapshot data
1.376 +const TInt KTestSnapshotTimestamp = 1000;
1.377 +const TPictureId KTestSnapshotId = {TPictureId::ETemporalReference, 999};
1.378 +
1.379 +// clock deviation
1.380 +const TUint KTestClockDeviationMS = 500000; // 0.5 seconds
1.381 +const TUint KTestClockBigDeviationMS = 2000000; // 2 seconds
1.382 +const TUint KTestClock2Seconds = 2000000;
1.383 +const TUint KTestClock4Seconds = 4000000;
1.384 +const TUint KTestClock18Seconds = 18000000;
1.385 +const TUint KTestClock20Seconds = 20000000;
1.386 +const TUint KTestClock22Seconds = 22000000;
1.387 +
1.388 +// devvideorecord specific test data
1.389 +const TInt KTestInputSize1X = 640;
1.390 +const TInt KTestInputSize1Y = 480;
1.391 +
1.392 +const TInt KTestInputSize2X = 320;
1.393 +const TInt KTestInputSize2Y = 200;
1.394 +
1.395 +const TInt KTestCamHandlePre = 1;
1.396 +const TInt KTestCamHandleEnc = 2;
1.397 +const TInt KTestCamHandleFatal = 666;
1.398 +
1.399 +const TReal KTestPictureRate = 29.97;
1.400 +
1.401 +// rgb data
1.402 +const TRgbRange KTestRgbRange1 = ERgbRangeFull;
1.403 +const TRgbRange KTestRgbRange2 = ERgbRange16to235;
1.404 +
1.405 +// output pad
1.406 +const TInt KTestPadX = 100;
1.407 +const TInt KTestPadY = 200;
1.408 +const TInt KTestPadPointX = 300;
1.409 +const TInt KTestPadPointY = 400;
1.410 +
1.411 +// color enhancement
1.412 +const TColorEnhancementOptions KTestColorEnhance1 = {1, 2, 3};
1.413 +const TColorEnhancementOptions KTestColorEnhance2 = {4, 5, 6};
1.414 +
1.415 +static inline TBool CompareColorEnhancements(const TColorEnhancementOptions& a, const TColorEnhancementOptions& b)
1.416 + {
1.417 + if ( (a.iLightness == b.iLightness) &&
1.418 + (a.iSaturation == b.iSaturation) &&
1.419 + (a.iContrast == b.iContrast) )
1.420 + return ETrue;
1.421 + else return EFalse;
1.422 + }
1.423 +
1.424 +// custom pre process options
1.425 +_LIT8(KTestCustomPreProc1, "rhubarb rhubarb rhubarb!");
1.426 +_LIT8(KTestCustomPreProc2, "custard custard custard?");
1.427 +
1.428 +const TReal KTestRandomAccessRate = 0.555;
1.429 +const TUint KTestNumBitrateLayers = 369;
1.430 +
1.431 +const TUint KTestLayer = 12;
1.432 +const TScalabilityType KTestScaleType = EScalabilityQualityFG;
1.433 +
1.434 +const TUint KTestMaxRefPics = 9;
1.435 +const TUint KTestMaxPicDelay = 111;
1.436 +
1.437 +// encoder buffer options creation utility function
1.438 +static inline TEncoderBufferOptions GetTestEncBufferOptions( void )
1.439 + {
1.440 + TEncoderBufferOptions buffOptions;
1.441 +
1.442 + buffOptions.iMaxPreEncoderBufferPictures = 10;
1.443 + buffOptions.iHrdVbvSpec = KTestHrdVbvSpec;
1.444 + buffOptions.iHrdVbvParams.Set(KTestHrdVbvParams);
1.445 + buffOptions.iMaxOutputBufferSize = 100;
1.446 + buffOptions.iMaxCodedPictureSize = 200;
1.447 + buffOptions.iMaxCodedSegmentSize = 300;
1.448 + buffOptions.iMinNumOutputBuffers = 400;
1.449 +
1.450 + return buffOptions;
1.451 + }
1.452 +
1.453 +// encoder buffer options comparison utility function
1.454 +static inline TBool CompareEncBufferOptions(const TEncoderBufferOptions& a, const TEncoderBufferOptions& b)
1.455 + {
1.456 + if ( (a.iMaxPreEncoderBufferPictures == b.iMaxPreEncoderBufferPictures) &&
1.457 + (a.iHrdVbvSpec == b.iHrdVbvSpec) &&
1.458 + (a.iHrdVbvParams == b.iHrdVbvParams) &&
1.459 + (a.iMaxOutputBufferSize == b.iMaxOutputBufferSize) &&
1.460 + (a.iMaxCodedPictureSize == b.iMaxCodedPictureSize) &&
1.461 + (a.iMaxCodedSegmentSize == b.iMaxCodedSegmentSize) &&
1.462 + (a.iMinNumOutputBuffers == b.iMinNumOutputBuffers) )
1.463 + return ETrue;
1.464 + else return EFalse;
1.465 + }
1.466 +
1.467 +_LIT8(KTestCSEncoderOptions, "there's a moose in the hoose!");
1.468 +_LIT8(KTestISEncoderOptions, "but did the moose chase the goose?");
1.469 +
1.470 +_LIT8(KTestISInitOutput, "I am a mole...");
1.471 +_LIT8(KTestCSInitOutput, "...and I live in a hole!");
1.472 +
1.473 +const TUint KTestProtectLevels = 444;
1.474 +const TUint KTestLevel = 11;
1.475 +const TUint KTestBitrate = 192;
1.476 +const TUint KTestStrength = EFecStrengthLow;
1.477 +
1.478 +const TInt KTestLossBurstLength = 123456;
1.479 +const TUint KTestLossRate = 8192;
1.480 +
1.481 +const TReal KTestErrorRate = 1.11;
1.482 +const TReal KTestStdDeviation = 2.22;
1.483 +
1.484 +const TUint KTestSizeBytes = 8;
1.485 +const TUint KTestSizeMacroblocks = 244;
1.486 +
1.487 +// encoder rate control options creation utility function
1.488 +static inline TRateControlOptions GetTestRateControlOptions( void )
1.489 + {
1.490 + TRateControlOptions rateOptions;
1.491 +
1.492 + rateOptions.iControl = EBrControlPicture;
1.493 + rateOptions.iBitrate = 256;
1.494 + rateOptions.iPictureQuality = 512;
1.495 + rateOptions.iPictureRate = 1.234;
1.496 + rateOptions.iQualityTemporalTradeoff = 4.321;
1.497 + rateOptions.iLatencyQualityTradeoff = 5.678;
1.498 +
1.499 + return rateOptions;
1.500 + }
1.501 +
1.502 +// encoder rate control options comparison utility function
1.503 +static inline TBool CompareRateControlOptions(const TRateControlOptions& a, const TRateControlOptions& b)
1.504 + {
1.505 + if ( (a.iControl == b.iControl) &&
1.506 + (a.iBitrate == b.iBitrate) &&
1.507 + (a.iPictureQuality == b.iPictureQuality) &&
1.508 + (a.iPictureRate == b.iPictureRate) &&
1.509 + (a.iQualityTemporalTradeoff == b.iQualityTemporalTradeoff) &&
1.510 + (a.iLatencyQualityTradeoff == b.iLatencyQualityTradeoff) )
1.511 + return ETrue;
1.512 + else return EFalse;
1.513 + }
1.514 +
1.515 +// scalability
1.516 +const TUint KTestNumSteps = 56;
1.517 +const TInLayerScalabilityType KTestLayerScaleType = EInLScalabilityTemporal;
1.518 +const TUint KTestBitrateShare1 = 666;
1.519 +const TUint KTestBitrateShare2 = 777;
1.520 +const TUint KTestPictureShare1 = 888;
1.521 +const TUint KTestPictureShare2 = 999;
1.522 +
1.523 +const TUint KTestPointPeriod = 2;
1.524 +
1.525 +// settings output
1.526 +_LIT8(KTestISSettingsOutput, "seven deadly sins...");
1.527 +_LIT8(KTestCSSettingsOutput, "...seven ways to win");
1.528 +
1.529 +// picture timestamp
1.530 +const TInt KTestEncPictureTimestamp = 98765;
1.531 +
1.532 +// supplemental info
1.533 +_LIT8(KTestSuppInfo, "don't eat spaghetti with chopsticks...");
1.534 +const TInt KTestSuppTime = 6000000;
1.535 +const TInt KTestSuppTimeCancel = 666666666;
1.536 +
1.537 +const TInt KTestRecordPosition = 999666333;
1.538 +
1.539 +const TUint KTestFreeBuffers = 9;
1.540 +const TUint KTestFreeBytes = 256;
1.541 +
1.542 +// picture counters creation utility function
1.543 +static inline CMMFDevVideoRecord::TPictureCounters GetTestEncPictureCounters( void )
1.544 + {
1.545 + CMMFDevVideoRecord::TPictureCounters picCount;
1.546 +
1.547 + picCount.iPicturesSkippedBufferOverflow = 10;
1.548 + picCount.iPicturesSkippedProcPower = 20;
1.549 + picCount.iPicturesSkippedRateControl = 30;
1.550 + picCount.iPicturesProcessed = 40;
1.551 + picCount.iInputPictures = 50;
1.552 + return picCount;
1.553 + }
1.554 +
1.555 +// picture counters comparison utility function
1.556 +static inline TBool CompareEncPictureCounters(const CMMFDevVideoRecord::TPictureCounters& a, const CMMFDevVideoRecord::TPictureCounters& b)
1.557 + {
1.558 + if ( (a.iPicturesSkippedBufferOverflow == b.iPicturesSkippedBufferOverflow) &&
1.559 + (a.iPicturesSkippedProcPower == b.iPicturesSkippedProcPower) &&
1.560 + (a.iPicturesSkippedRateControl == b.iPicturesSkippedRateControl) &&
1.561 + (a.iPicturesProcessed == b.iPicturesProcessed) &&
1.562 + (a.iInputPictures == b.iInputPictures ))
1.563 + return ETrue;
1.564 + else return EFalse;
1.565 + }
1.566 +
1.567 +const TInt KTestEncInputPictures = 10;
1.568 +
1.569 +const TInt KTestFrameStableX1 = 5;
1.570 +const TInt KTestFrameStableY1 = 10;
1.571 +const TInt KTestFrameStableX2 = 300;
1.572 +const TInt KTestFrameStableY2 = 200;
1.573 +
1.574 +const TPictureId KTestPictureId1 = {TPictureId::ETemporalReference, 999};
1.575 +const TPictureId KTestPictureId2 = {TPictureId::ETemporalReference, 666};
1.576 +const TPictureId KTestPictureId3 = {TPictureId::ETemporalReference, 333};
1.577 +
1.578 +static inline TBool ComparePictureIDs(const TPictureId& a, const TPictureId&b)
1.579 + {
1.580 + return ((a.iIdType == b.iIdType) && (a.iId == b.iId));
1.581 + }
1.582 +
1.583 +// slice loss
1.584 +const TUint KTestFirstMacroblock = 50;
1.585 +const TUint KTestNumMacroblocks = 3;
1.586 +
1.587 +// ref picture data
1.588 +_LIT8(KTestRefPictureInfo, "there once was an ugly duckling...");
1.589 +
1.590 +// start / stop / pause / resume positions
1.591 +const TInt KTestRecTimeStop = 0;
1.592 +
1.593 +const TInt KTestRecTimeStartEnc = 10;
1.594 +const TInt KTestRecTimePauseEnc = 20;
1.595 +const TInt KTestRecTimeResumeEnc = 30;
1.596 +
1.597 +const TInt KTestRecTimeStartPre = 40;
1.598 +const TInt KTestRecTimePausePre = 50;
1.599 +const TInt KTestRecTimeResumePre = 60;
1.600 +
1.601 +// command to start buffer creation
1.602 +_LIT8(KTestISEncBuffers, "get them buffers a rollin!");
1.603 +_LIT8(KTestISEncBufferData, "steam rollin along!");
1.604 +
1.605 +// encoder info
1.606 +const TUint32 KTestEncoderInfoCount = 3;
1.607 +
1.608 +const TText8* const KTestEncoderInfoMimeArray[KTestEncoderInfoCount] =
1.609 + {
1.610 + _S8("video/bunglevideo"),
1.611 + _S8("video/zippyvideo"),
1.612 + _S8("video/georgevideo")
1.613 + };
1.614 +
1.615 +_LIT(KTestEncoderInfoManufacturer, "bodgitt plc");
1.616 +_LIT(KTestEncoderInfoIdentifier, "video bodger");
1.617 +
1.618 +_LIT8(KTestEncoderInfoCSInfo, "coded by a blind orangutan");
1.619 +_LIT8(KTestEncoderInfoISInfo, "implemented by an imp");
1.620 +
1.621 +const TInt KTestEncoderInfoVersionMaj = 11;
1.622 +const TInt KTestEncoderInfoVersionMin = 22;
1.623 +const TInt KTestEncoderInfoVersionBuild = 33;
1.624 +// KTestEncoderInfoVersion = Maj.Min.Build;
1.625 +
1.626 +const TInt KTestEncoderInfoMaxSizeX = 256;
1.627 +const TInt KTestEncoderInfoMaxSizeY = 512;
1.628 +const TUint KTestEncoderInfoMaxUEPLevels = 5;
1.629 +const TUint KTestEncoderInfoMaxBitrate = 963;
1.630 +const TUint KTestEncoderInfoMaxILSSteps = 555;
1.631 +const TUint32 KTestEncoderInfoPictureOptions = TVideoPicture::ESceneCut | TVideoPicture::EEffectParameters | TVideoPicture::ETimestamp;
1.632 +
1.633 +static inline void GetTestEncoderInfoRate(TInt aIndex, TPictureRateAndSize& aRate)
1.634 + {
1.635 + TPictureRateAndSize rate;
1.636 + TSize size(aIndex * 10, aIndex * 20);
1.637 + TReal rIndex = aIndex;
1.638 +
1.639 + rate.iPictureSize = size;
1.640 + rate.iPictureRate = rIndex / 10.0;
1.641 +
1.642 + aRate = rate;
1.643 + }
1.644 +
1.645 +// Pre Processor Info
1.646 +_LIT(KTestPreProcInfoManufacturer, "iced inc");
1.647 +_LIT(KTestPreProcInfoIdentifier, "video munger");
1.648 +
1.649 +_LIT8(KTestPreProcInfoISInfo, "implemented by a marsupial");
1.650 +
1.651 +const TInt KTestPreProcInfoVersionMaj = 44;
1.652 +const TInt KTestPreProcInfoVersionMin = 55;
1.653 +const TInt KTestPreProcInfoVersionBuild = 66;
1.654 +// KTestPreProcInfoVersion = Maj.Min.Build;
1.655 +const TUint32 KTestPreProcInfoRotations = KTestRotate1 | KTestRotate2;
1.656 +const TUint32 KTestPreProcInfoRgbRanges = KTestRgbRange1 | KTestRgbRange2;
1.657 +
1.658 +const TYuvToYuvCapabilities KTestPreProcInfoYuvToYuvCaps = {1, 2, 3, 4};
1.659 +
1.660 +static inline TBool CompareYuvYuvCapabilities(const TYuvToYuvCapabilities& a, const TYuvToYuvCapabilities& b)
1.661 + {
1.662 + return ((a.iInputSamplingPatterns == b.iInputSamplingPatterns) &&
1.663 + (a.iInputDataLayouts == b.iInputDataLayouts) &&
1.664 + (a.iOutputSamplingPatterns == b.iOutputSamplingPatterns) &&
1.665 + (a.iOutputDataLayouts == b.iOutputDataLayouts) );
1.666 + }
1.667 +
1.668 +const TUncompressedVideoFormat KTestPreProcInfoOutputFormatArray[KTestPostProcInfoCount] =
1.669 + {{ERgbRawData}, {ERgbFbsBitmap}, {EYuvRawData}};
1.670 +
1.671 +const TUncompressedVideoFormat KTestPreProcInfoInputFormatArray[KTestPostProcInfoCount] =
1.672 + {{ERgbFbsBitmap}, {EYuvRawData}, {ERgbRawData}};
1.673 +
1.674 +const TUncompressedVideoFormat KTestPreProcInfoNegativeFormat = {ERgbRawData};
1.675 +
1.676 +// Custom Interface UIDs
1.677 +const TUid KUidCustomInterfaceOne = {0x101F7DD1}; //Supported by decoder
1.678 +const TUid KUidCustomInterfaceTwo = {0x101F7DD2}; //Supported by post processor
1.679 +const TUid KUidCustomInterfaceThree = {0x101F7DD3}; //Supported by encoder
1.680 +const TUid KUidCustomInterfaceFour = {0x101F7DD4}; //Supported by pre processor
1.681 +
1.682 +#endif // __TESTDEVVIDEOPLAYTESTDATA_H__