From 1e97f6c6eab6c00bf7a3f73862f1bb24feae6ce5 Mon Sep 17 00:00:00 2001 From: Noumi Akira Date: Fri, 10 Jul 2009 15:05:27 +0900 Subject: [PATCH] check test code. --- Tests/TBenchEx/Main.cpp | 70 +++---------- Tests/TBenchEx/Release/sum.txt | 228 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 240 insertions(+), 58 deletions(-) create mode 100644 Tests/TBenchEx/Release/sum.txt diff --git a/Tests/TBenchEx/Main.cpp b/Tests/TBenchEx/Main.cpp index 31b83c2..e5e48b1 100644 --- a/Tests/TBenchEx/Main.cpp +++ b/Tests/TBenchEx/Main.cpp @@ -109,12 +109,6 @@ public: printf("ERROR Compare : %d\n", i); } -#if 0 - if (i >= 2) { - break; - } -#endif - } } @@ -159,8 +153,6 @@ private: for (; track < end; track++) { if (strcmp(track->CodecId, "V_THEORA") == 0) { - // TestSetup(track->CodecPrivate, track->CodecPrivateSize); - m_vsetup = QT_CreateDecoderSetup(); if (m_vsetup == 0) { return false; @@ -197,51 +189,6 @@ private: return true; } - void TestSetup(const VOID* packet, SIZE_T size) - { - QT_SetEnableX86(FALSE); - QT_SetEnableMMX(FALSE); - QT_SetEnableSSE2(FALSE); - - { - QTheoraDecoderSetup_t* setup = QT_CreateDecoderSetup(); - if (setup != 0) { - if (!QT_SetupDecoderSetupLacing(setup, packet, size)) { - puts("Error"); - } - QT_ReleaseDecoderSetup(setup); - } - } - - QT_SetEnableX86(TRUE); - QT_SetEnableMMX(FALSE); - QT_SetEnableSSE2(FALSE); - - { - QTheoraDecoderSetup_t* setup = QT_CreateDecoderSetup(); - if (setup != 0) { - if (!QT_SetupDecoderSetupLacing(setup, packet, size)) { - puts("Error"); - } - QT_ReleaseDecoderSetup(setup); - } - } - - QT_SetEnableX86(TRUE); - QT_SetEnableMMX(TRUE); - QT_SetEnableSSE2(FALSE); - - { - QTheoraDecoderSetup_t* setup = QT_CreateDecoderSetup(); - if (setup != 0) { - if (!QT_SetupDecoderSetupLacing(setup, packet, size)) { - puts("Error"); - } - QT_ReleaseDecoderSetup(setup); - } - } - } - }; int wmain(int argc, wchar_t* argv[]) @@ -254,6 +201,7 @@ int wmain(int argc, wchar_t* argv[]) LPCWSTR yuv = 0; bool no_SSE2 = false; + bool no_MMX = false; for (INT32 i = 1; i < argc; i++) { LPCWSTR a = argv[i]; @@ -262,6 +210,11 @@ int wmain(int argc, wchar_t* argv[]) continue; } + if (wcscmp(a, L"-m") == 0) { + no_MMX = true; + continue; + } + if (mkv == 0) { mkv = a; } else if (yuv == 0) { @@ -271,6 +224,8 @@ int wmain(int argc, wchar_t* argv[]) if (mkv == 0) { puts("TBenchEx [input mkv] (ref yuv)"); + puts(" -n No SSE2"); + puts(" -m No MMX"); return -1; } @@ -278,11 +233,9 @@ int wmain(int argc, wchar_t* argv[]) QT_SetEnableSSE2(FALSE); } -#if 0 - QT_SetEnableX86(FALSE); - QT_SetEnableMMX(FALSE); - QT_SetEnableSSE2(FALSE); -#endif + if (no_MMX) { + QT_SetEnableMMX(FALSE); + } SetThreadAffinityMask(GetCurrentThread(), 1); @@ -293,6 +246,7 @@ int wmain(int argc, wchar_t* argv[]) if (!app.Decode()) { puts("NG."); + return -1; } puts("DONE."); diff --git a/Tests/TBenchEx/Release/sum.txt b/Tests/TBenchEx/Release/sum.txt new file mode 100644 index 0000000..91e8302 --- /dev/null +++ b/Tests/TBenchEx/Release/sum.txt @@ -0,0 +1,228 @@ +Microsoft(R) Profile Guided Optimization Manager 9.00.21022.08 +Copyright (C) Microsoft Corporation. All rights reserved. + +PGD ƒtƒ@ƒCƒ‹: TBenchEx.pgd 07/08/2009 15:45:33 +ƒ‚ƒWƒ…[ƒ‹‚̐”: 1 ŠÖ”‚̐”: 198 Arc ‚̐”: 1265 ’l‚̐”: 38 + +Ã“I–½—ß: 21864 Šî–{ƒuƒƒbƒN: 3528 •½‹Ï BB ƒTƒCƒY: 6.2 +“®“I–½—ß: 19333576359 + + entry static dynamic % run +ŠÖ”–¼ count instr instr total total +_FrameDecoder_DecodeBlocks_MMX 794880 326 7074247049 36.6 36.6 +_DecodeCoefficients_SSE2 11460723 46 2758545944 14.3 50.9 +_DequantizeIDCT8x8_SSE2 7220517 79 2166155100 11.2 62.1 +_UndoDCPrediction 4140 191 1609657646 8.3 70.4 +_Reconstruct_YPlane_SSE2 4140 635 864582674 4.5 74.9 +_FrameDecoder_DecodeCodedBlockFlag_MMX + 4072 453 758669434 3.9 78.8 +_DecodeDCCoefficients 4140 77 702013265 3.6 82.4 +_Reconstruct_InterBlock 46075818 61 691942425 3.6 86.0 +_Reconstruct_CPlane_SSE2 4140 395 594223086 3.1 89.1 +_MotionComp_Compensate8x8H_SSE2 + 2721044 170 392379845 2.0 91.1 +_AdjustBlocksCodedCount 794880 25 333526680 1.7 92.8 +_FrameDecoder_DecodeMacroBlockCodingModes_MMX + 4072 203 314223982 1.6 94.4 +_MotionComp_Compensate16x16H_SSE2 + 1048915 283 234406808 1.2 95.7 +_DequantizeIDCT8x8_16_SSE2 1694326 61 206707772 1.1 96.7 +_MotionComp_Block8x8C_SSE2 2798982 91 201230326 1.0 97.8 +_FrameDecoder_DecodeMotionVectors_MMX + 4072 229 197011893 1.0 98.8 +_MotionComp_Block16x16_SSE2 1387616 79 81628667 0.4 99.2 +_Block_Extract8x8_MMX 220449 343 48099242 0.2 99.5 +_Reconstruct_IntraBlock 1120182 57 32306740 0.2 99.6 +_MotionComp_Compensate16x16_SSE2 + 338701 117 27970170 0.1 99.8 +_FrameDecoder_DecodeDCTCoefficients_MMX + 4140 130 25199412 0.1 99.9 +_MotionComp_Compensate8x8_SSE2 232326 53 10567189 0.1 100.0 +_MotionComp_Block8x8Y_SSE2 47500 81 2742745 0.0 100.0 +_Huffman_MakeLookupTable 80 72 1358752 0.0 100.0 +_StreamChunk_GetBinaryData 5617 33 421451 0.0 100.0 +_MatroskaReader_Read 5611 145 381878 0.0 100.0 +_StreamChunk_GetElementSize 6512 55 355072 0.0 100.0 +_StreamChunk_CopyBinaryData 5610 70 287006 0.0 100.0 +_FrameHeader_Decode_MMX 4140 180 286340 0.0 100.0 +_ReadBlockPayload 5610 54 258060 0.0 100.0 +_FrameDecoder_Decode_MMX 4140 134 250829 0.0 100.0 +_SetupMBIndex 1 72 221064 0.0 100.0 +_SetupBIndex 1 77 219371 0.0 100.0 +_compare 14034 24 171130 0.0 100.0 +TestApp::Decode 1 131 168241 0.0 100.0 +_Huffman_Decode_MMX 80 90 151736 0.0 100.0 +_Huffman_MakeDecoder 80 78 134288 0.0 100.0 +_StreamChunk_GetElementId 6512 39 132279 0.0 100.0 +_StreamView_ReadElement 5683 58 125375 0.0 100.0 +_StreamChunk_GetElement 6509 20 104144 0.0 100.0 +_QT_DecodeFrame 4140 28 103500 0.0 100.0 +_RunLength_Start 12177 7 73031 0.0 100.0 +_StreamChunk_CheckSize 5816 11 52471 0.0 100.0 +_TryLoadElement 5887 9 41209 0.0 100.0 +_SetupCBIndex 1 59 40098 0.0 100.0 +_QT_FrameDecoder_DecodeFrame 4140 9 37260 0.0 100.0 +_QT_ReconstructFrame_SSE2 4140 11 33120 0.0 100.0 +_StreamChunk_GetInt64Data 288 54 30280 0.0 100.0 +_QM_ReadBlock 5611 4 22444 0.0 100.0 +_Dequantize_MakeMatrix 1 113 16067 0.0 100.0 +_CheckCueingData 1 262 12328 0.0 100.0 +_StreamChunk_GetInt32Data 155 45 11168 0.0 100.0 +_CheckSeekHead 1 185 7619 0.0 100.0 +_Dequantize_Decode_MMX 1 377 6545 0.0 100.0 +_StreamChunk_CheckEndPoint 846 11 5524 0.0 100.0 +_CheckCluster 73 38 2628 0.0 100.0 +_QT_MemoryPool_Allocate 185 15 2405 0.0 100.0 +_SetupHeader_Decode_MMX 1 61 1870 0.0 100.0 +_QT_MemoryPool_Release 2 15 1498 0.0 100.0 +_QT_SetupDecoderSetupLacing_MMX + 1 212 1431 0.0 100.0 +_Filter_Decode_MMX 1 63 1294 0.0 100.0 +_s_read 130 9 1170 0.0 100.0 +_StreamView_CheckElement 73 54 1095 0.0 100.0 +_CheckTrackInformation 1 325 1082 0.0 100.0 +_StreamChunk_Skip 27 22 540 0.0 100.0 +_CheckMetaSeekInfomation 1 188 449 0.0 100.0 +_IdentifyHeader_Decode_MMX 1 616 399 0.0 100.0 +_QT_FrameDecoder_Setup 1 179 355 0.0 100.0 +_StreamView_Seek 5 73 209 0.0 100.0 +_CheckSegmentInformation 1 99 202 0.0 100.0 +_CheckTrackVideo 1 100 162 0.0 100.0 +_BlockIndex_Setup 1 121 159 0.0 100.0 +_CheckHeader 1 110 140 0.0 100.0 +_QM_MemoryPool_Allocate 9 17 135 0.0 100.0 +_StreamChunk_GetFloatData 2 60 106 0.0 100.0 +_QM_MemoryPool_Release 1 16 106 0.0 100.0 +_StreamView_LoadElement 4 63 96 0.0 100.0 +_QT_UpdateDequantizeMatrix_SSE2 + 1 22 88 0.0 100.0 +_CheckTrackAudio 1 85 87 0.0 100.0 +_MatroskaReader_Open 1 102 76 0.0 100.0 +_wmain 1 96 75 0.0 100.0 +_ReadBlockGroup 1 88 72 0.0 100.0 +_s_allocate 13 5 65 0.0 100.0 +TestApp::CheckVideo 1 74 59 0.0 100.0 +_s_free 13 4 52 0.0 100.0 +_StreamView_Read 1 74 44 0.0 100.0 +_s_reallocate 6 7 42 0.0 100.0 +_ilog 4 41 36 0.0 100.0 +_MatroskaReader_Release 1 35 35 0.0 100.0 +_QT_SetupDecoderSetupLacing 1 53 29 0.0 100.0 +_Filter_Setup 1 51 26 0.0 100.0 +_QT_Initialize 1 26 25 0.0 100.0 +_MatroskaReader_Init 1 26 24 0.0 100.0 +_s_seek 2 14 24 0.0 100.0 +TestApp::Setup 1 50 23 0.0 100.0 +_CheckSegment 1 27 23 0.0 100.0 +_StreamView_Create 1 26 22 0.0 100.0 +_QM_OpenReader 1 24 20 0.0 100.0 +_QT_SetupDecoder 1 19 16 0.0 100.0 +_QT_CreateDecoderSetup 1 17 15 0.0 100.0 +_QT_CreateDecoder 1 17 15 0.0 100.0 +_QM_CreateReader 1 17 15 0.0 100.0 +_QM_ReleaseReader 1 14 11 0.0 100.0 +_StreamView_Release 1 11 11 0.0 100.0 +TestApp::~TestApp 1 12 10 0.0 100.0 +_QT_ReleaseDecoderSetup 1 7 7 0.0 100.0 +_QT_ReleaseDecoder 1 7 7 0.0 100.0 +_MotionComp_Compensate8x8H 0 115 0 0.0 100.0 +_QT_FrameLoopFilter 0 100 0 0.0 100.0 +_MotionComp_Compensate8x8 0 56 0 0.0 100.0 +_MotionComp_Compensate16x16 0 99 0 0.0 100.0 +_QM_GetTrackCount 0 1 0 0.0 100.0 +_MotionComp_Compensate16x16H 0 193 0 0.0 100.0 +_IDCT_8x8 0 75 0 0.0 100.0 +_QT_MemoryPool_Init 0 2 0 0.0 100.0 +_QT_CSConvert_YV12_SSE2 0 195 0 0.0 100.0 +_QT_BitReader_C_Initialize 0 6 0 0.0 100.0 +_QT_BitReader_X86_Initialize 0 7 0 0.0 100.0 +_QT_BitReader_MMX_Initialize 0 7 0 0.0 100.0 +_FrameDecoder_DecodeBlocks_X86 0 389 0 0.0 100.0 +_FrameDecoder_DecodeMotionVectors_X86 + 0 285 0 0.0 100.0 +_FrameDecoder_DecodeCodedBlockFlag_X86 + 0 572 0 0.0 100.0 +_FrameDecoder_DecodeBlocks_C 0 339 0 0.0 100.0 +_FrameDecoder_DecodeMotionVectors_C + 0 219 0 0.0 100.0 +_FrameDecoder_DecodeCodedBlockFlag_C + 0 445 0 0.0 100.0 +_QM_GetTracks 0 1 0 0.0 100.0 +_IdentifyHeader_Decode_C 0 589 0 0.0 100.0 +_Filter_Decode_C 0 64 0 0.0 100.0 +_Huffman_Decode_C 0 95 0 0.0 100.0 +_Dequantize_Decode_X86 0 550 0 0.0 100.0 +_Dequantize_Decode_C 0 375 0 0.0 100.0 +_IdentifyHeader_Decode_X86 0 987 0 0.0 100.0 +_Filter_Decode_X86 0 99 0 0.0 100.0 +_Huffman_Decode_X86 0 128 0 0.0 100.0 +_StreamChunk_GetSInt32Data 0 56 0 0.0 100.0 +_DecodeMV0 0 18 0 0.0 100.0 +_QM_MemoryPool_Init 0 2 0 0.0 100.0 +_StreamView_TellPosition 0 9 0 0.0 100.0 +_StreamView_RetireChunk 0 10 0 0.0 100.0 +_StreamView_MapChunk 0 12 0 0.0 100.0 +_FrameHeader_Decode_C 0 177 0 0.0 100.0 +_FrameDecoder_DecodeMacroBlockCodingModes_C + 0 216 0 0.0 100.0 +_FrameHeader_Decode_X86 0 299 0 0.0 100.0 +_StreamReader_Init 0 3 0 0.0 100.0 +_Allocator_Get 0 1 0 0.0 100.0 +YUVReader::YUVReader 0 7 0 0.0 100.0 +YUVReader::~YUVReader 0 21 0 0.0 100.0 +YUVReader::`scalar deleting destructor' + 0 8 0 0.0 100.0 +TestApp::Compare 0 17 0 0.0 100.0 +_QT_SetEnableSSE2 0 2 0 0.0 100.0 +_FrameDecoder_DecodeMacroBlockCodingModes_X86 + 0 288 0 0.0 100.0 +_CopyCSC_16 0 9 0 0.0 100.0 +_CopyCSC_8 0 9 0 0.0 100.0 +_Reconstruct_InterBlock 0 43 0 0.0 100.0 +_Reconstruct_IntraBlock 0 41 0 0.0 100.0 +_MotionComp_Block8x8C 0 93 0 0.0 100.0 +_MotionComp_Block8x8Y 0 80 0 0.0 100.0 +_MotionComp_Block16x16 0 80 0 0.0 100.0 +_QT_CSConvert_YUY2_SSE2 0 99 0 0.0 100.0 +_QT_CSConvert_YV12 0 144 0 0.0 100.0 +_QT_CSConvert_YUY2 0 96 0 0.0 100.0 +_FrameDecoder_DecodeDCTCoefficients_X86 + 0 170 0 0.0 100.0 +_FrameDecoder_DecodeDCTCoefficients_C + 0 137 0 0.0 100.0 +_Transpose_SSE2 0 64 0 0.0 100.0 +_Block_CopyPlane8x8_SSE2 0 38 0 0.0 100.0 +_SetupHeader_Decode_X86 0 62 0 0.0 100.0 +_SetupHeader_Decode_C 0 62 0 0.0 100.0 +_Block_CopyPlane16x16_SSE2 0 73 0 0.0 100.0 +_Block_CopyIntra8x8_SSE2 0 47 0 0.0 100.0 +_Block_ReviseInter8x8_SSE2 0 69 0 0.0 100.0 +_IDCT_R_8_SSE2 0 110 0 0.0 100.0 +_IDCT_R_8_4_SSE2 0 80 0 0.0 100.0 +_IDCT_C_8_SSE2 0 135 0 0.0 100.0 +_Transpose_U_SSE2 0 64 0 0.0 100.0 +_DequantizeIDCT8x8_0_SSE2 0 23 0 0.0 100.0 +_Reconstruct_CPlane 0 381 0 0.0 100.0 +_Reconstruct_YPlane 0 610 0 0.0 100.0 +_Block_Extract8x8 0 47 0 0.0 100.0 +_Block_CopyIntra8x8 0 42 0 0.0 100.0 +_Block_ReviseInter8x8 0 43 0 0.0 100.0 +_FrameDecoder_Decode_X86 0 142 0 0.0 100.0 +_FrameDecoder_Decode_C 0 143 0 0.0 100.0 +_Block_CopyPlane16x16 0 50 0 0.0 100.0 +_QT_SetupDecoderSetupLacing_X86 + 0 298 0 0.0 100.0 +_QT_SetupDecoderSetupLacing_C 0 208 0 0.0 100.0 +_StreamChunk_GetEndPoint 0 2 0 0.0 100.0 +_Block_CopyPlane8x8 0 33 0 0.0 100.0 +_IDCT_8 0 113 0 0.0 100.0 +_DecodeCoefficients 0 50 0 0.0 100.0 +YUVReader::ReadFrame 0 67 0 0.0 100.0 +_Dequantize_DoDequantize 0 18 0 0.0 100.0 +_QT_ReconstructFrame 0 12 0 0.0 100.0 +_Filter_LoopFilterH 0 65 0 0.0 100.0 +_Filter_LoopFilterV 0 69 0 0.0 100.0 +YUVReader::Compare 0 127 0 0.0 100.0 +TestApp::TestApp 0 8 0 0.0 100.0 +_DecodeMV1 0 25 0 0.0 100.0 +YUVReader::Open 0 135 0 0.0 100.0 -- 2.11.0