Changeset 521 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder
- Timestamp:
- 4 Jul 2013, 21:00:23 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r324 r521 49 49 { 50 50 xReadCode (length, rValue); 51 #if H_MV_ENC_DEC_TRAC 52 if ( g_disableHLSTrace ) 53 { 54 return; 55 } 56 #endif 51 57 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 52 58 if (length < 10) … … 64 70 { 65 71 xReadUvlc (rValue); 72 #if H_MV_ENC_DEC_TRAC 73 if ( g_disableHLSTrace ) 74 { 75 return; 76 } 77 #endif 66 78 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 67 79 fprintf( g_hTrace, "%-50s ue(v) : %d\n", pSymbolName, rValue ); … … 72 84 { 73 85 xReadSvlc(rValue); 86 #if H_MV_ENC_DEC_TRAC 87 if ( g_disableHLSTrace ) 88 { 89 return; 90 } 91 #endif 74 92 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 75 93 fprintf( g_hTrace, "%-50s se(v) : %d\n", pSymbolName, rValue ); … … 80 98 { 81 99 xReadFlag(rValue); 100 #if H_MV_ENC_DEC_TRAC 101 if ( g_disableHLSTrace ) 102 { 103 return; 104 } 105 #endif 82 106 fprintf( g_hTrace, "%8lld ", g_nSymbolCounter++ ); 83 107 fprintf( g_hTrace, "%-50s u(1) : %d\n", pSymbolName, rValue ); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
r324 r521 37 37 38 38 #include "TDecBinCoderCABAC.h" 39 #include "../TLibCommon/TComRom.h" 39 40 40 41 //! \ingroup TLibDecoder … … 260 261 UInt uiBit = 0; 261 262 m_pcTComBitstream->read( iNum, uiBit ); 263 #if H_MV_ENC_DEC_TRAC 264 DTRACE_CU("Number of pcm_alignment_zero_bit", iNum) 265 #endif 262 266 } 263 267 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.cpp
r504 r521 47 47 Void xTraceSPSHeader (TComSPS *pSPS) 48 48 { 49 #if H_MV_ENC_DEC_TRAC 50 if ( g_disableHLSTrace ) 51 { 52 return; 53 } 54 // To avoid mismatches 55 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" ); 56 #else 49 57 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); 58 #endif 50 59 } 51 60 52 61 Void xTracePPSHeader (TComPPS *pPPS) 53 62 { 63 #if H_MV_ENC_DEC_TRAC 64 if ( g_disableHLSTrace ) 65 { 66 return; 67 } 68 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" ); 69 #else 54 70 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); 71 #endif 55 72 } 56 73 57 74 Void xTraceSliceHeader (TComSlice *pSlice) 58 75 { 76 #if H_MV_ENC_DEC_TRAC 77 if ( g_disableHLSTrace ) 78 { 79 return; 80 } 81 #endif 59 82 fprintf( g_hTrace, "=========== Slice ===========\n"); 60 83 } -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCu.cpp
r510 r521 204 204 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 205 205 UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; 206 206 #if H_MV_ENC_DEC_TRAC 207 DTRACE_CU_S("=========== coding_quadtree ===========\n") 208 DTRACE_CU("x0", uiLPelX) 209 DTRACE_CU("x1", uiTPelY) 210 DTRACE_CU("log2CbSize", g_uiMaxCUWidth>>uiDepth) 211 DTRACE_CU("cqtDepth" , uiDepth) 212 #endif 207 213 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); 208 214 Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr(); … … 264 270 } 265 271 272 #if H_MV_ENC_DEC_TRAC 273 DTRACE_CU_S("=========== coding_unit ===========\n") 274 #endif 275 266 276 if( (g_uiMaxCUWidth>>uiDepth) >= pcCU->getSlice()->getPPS()->getMinCuDQPSize() && pcCU->getSlice()->getPPS()->getUseDQP()) 267 277 { … … 330 340 if( pcCU->isSkipped(uiAbsPartIdx) ) 331 341 { 342 #if H_MV_ENC_DEC_TRAC 343 DTRACE_PU_S("=========== prediction_unit ===========\n") 344 DTRACE_PU("x0", uiLPelX) 345 DTRACE_PU("x1", uiTPelY) 346 #endif 332 347 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 333 348 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp
r510 r521 215 215 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 216 216 { 217 #if H_MV_ENC_DEC_TRAC 218 DTRACE_PU_S("=========== prediction_unit ===========\n") 219 // ToDo: 220 //DTRACE_PU("x0", uiLPelX) 221 //DTRACE_PU("x1", uiTPelY) 222 #endif 217 223 decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 218 224 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) … … 364 370 { 365 371 m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx ); 372 #if H_MV_ENC_DEC_TRAC 373 #if ENC_DEC_TRACE 374 if ( eRefList == REF_PIC_LIST_0 ) 375 { 376 DTRACE_PU("mvp_l0_flag", iMVPIdx) 377 } 378 else 379 { 380 DTRACE_PU("mvp_l1_flag", iMVPIdx) 381 } 382 #endif 383 #endif 366 384 } 367 385 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo); … … 484 502 pcCU->setTrIdxSubParts( uiTrDepth, uiAbsPartIdx, uiDepth ); 485 503 504 #if !H_MV_ENC_DEC_TRAC 486 505 { 487 506 DTRACE_CABAC_VL( g_nSymbolCounter++ ); … … 494 513 DTRACE_CABAC_T( "\n" ); 495 514 } 515 #endif 496 516 497 517 pcCU->setCbfSubParts ( 0, TEXT_LUMA, uiAbsPartIdx, uiDepth ); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecSbac.cpp
r504 r521 331 331 m_pcTDecBinIf->decodeBinTrm(uiSymbol); 332 332 333 #if H_MV_ENC_DEC_TRAC 334 DTRACE_CU("pcm_flag", uiSymbol) 335 #endif 333 336 if (uiSymbol) 334 337 { … … 412 415 UInt uiSymbol; 413 416 m_pcTDecBinIf->decodeBin( uiSymbol, m_CUTransquantBypassFlagSCModel.get( 0, 0, 0 ) ); 417 #if H_MV_ENC_DEC_TRAC 418 DTRACE_CU("cu_transquant_bypass_flag", uiSymbol); 419 #endif 414 420 pcCU->setCUTransquantBypassSubParts(uiSymbol ? true : false, uiAbsPartIdx, uiDepth); 415 421 } … … 431 437 UInt uiCtxSkip = pcCU->getCtxSkipFlag( uiAbsPartIdx ); 432 438 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSkipFlagSCModel.get( 0, 0, uiCtxSkip ) ); 439 #if !H_MV_ENC_DEC_TRAC 433 440 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 434 441 DTRACE_CABAC_T( "\tSkipFlag" ); … … 438 445 DTRACE_CABAC_V( uiSymbol ); 439 446 DTRACE_CABAC_T( "\n"); 447 #endif 440 448 441 449 if( uiSymbol ) … … 447 455 pcCU->setMergeFlagSubParts( true , uiAbsPartIdx, 0, uiDepth ); 448 456 } 457 #if H_MV_ENC_DEC_TRAC 458 DTRACE_CU("cu_skip_flag", uiSymbol); 459 #endif 449 460 } 450 461 … … 460 471 UInt uiSymbol; 461 472 m_pcTDecBinIf->decodeBin( uiSymbol, *m_cCUMergeFlagExtSCModel.get( 0 ) ); 473 #if H_MV_ENC_DEC_TRAC 474 DTRACE_PU("merge_flag", uiSymbol) 475 #endif 462 476 pcCU->setMergeFlagSubParts( uiSymbol ? true : false, uiAbsPartIdx, uiPUIdx, uiDepth ); 463 477 478 #if !H_MV_ENC_DEC_TRAC 464 479 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 465 480 DTRACE_CABAC_T( "\tMergeFlag: " ); … … 470 485 DTRACE_CABAC_V( uiAbsPartIdx ); 471 486 DTRACE_CABAC_T( "\n" ); 487 #endif 472 488 } 473 489 … … 494 510 } 495 511 } 512 #if H_MV_ENC_DEC_TRAC 513 DTRACE_PU("merge_idx", uiUnaryIdx) 514 #endif 496 515 } 497 516 ruiMergeIndex = uiUnaryIdx; 498 517 518 #if !H_MV_ENC_DEC_TRAC 499 519 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 500 520 DTRACE_CABAC_T( "\tparseMergeIndex()" ) … … 502 522 DTRACE_CABAC_V( ruiMergeIndex ) 503 523 DTRACE_CABAC_T( "\n" ) 524 #endif 504 525 } 505 526 … … 521 542 UInt uiSymbol; 522 543 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 544 #if H_MV_ENC_DEC_TRAC 545 DTRACE_CU("split_cu_flag", uiSymbol); 546 #else 523 547 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 524 548 DTRACE_CABAC_T( "\tSplitFlag\n" ) 549 #endif 525 550 pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx ); 526 551 … … 545 570 { 546 571 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 572 #if H_MV_ENC_DEC_TRAC 573 DTRACE_CU("part_mode", uiSymbol) 574 #endif 547 575 } 548 576 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; … … 598 626 } 599 627 } 628 #if H_MV_ENC_DEC_TRAC 629 DTRACE_CU("part_mode", eMode ) 630 #endif 600 631 } 601 632 pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth ); … … 621 652 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPredModeSCModel.get( 0, 0, 0 ) ); 622 653 iPredMode += uiSymbol; 654 #if H_MV_ENC_DEC_TRAC 655 DTRACE_CU("pred_mode_flag", uiSymbol) 656 #endif 623 657 pcCU->setPredModeSubParts( (PredMode)iPredMode, uiAbsPartIdx, uiDepth ); 624 658 } … … 639 673 m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) ); 640 674 mpmPred[j] = symbol; 675 #if H_MV_ENC_DEC_TRAC 676 DTRACE_CU("prev_intra_luma_pred_flag", symbol) 677 #endif 641 678 } 642 679 for (j=0;j<partNum;j++) … … 652 689 symbol++; 653 690 } 691 #if H_MV_ENC_DEC_TRAC 692 DTRACE_CU("mpm_idx", symbol) 693 #endif 654 694 intraPredMode = preds[symbol]; 655 695 } … … 659 699 m_pcTDecBinIf->decodeBinsEP( symbol, 5 ); 660 700 intraPredMode = symbol; 661 701 #if H_MV_ENC_DEC_TRAC 702 DTRACE_CU("rem_intra_luma_pred_mode", symbol) 703 #endif 662 704 //postponed sorting of MPMs (only in remaining branch) 663 705 if (preds[0] > preds[1]) … … 690 732 if( uiSymbol == 0 ) 691 733 { 734 #if H_MV_ENC_DEC_TRAC 735 DTRACE_CU("intra_chroma_pred_mode", uiSymbol ) 736 #endif 692 737 uiSymbol = DM_CHROMA_IDX; 693 738 } … … 697 742 UInt uiIPredMode; 698 743 m_pcTDecBinIf->decodeBinsEP( uiIPredMode, 2 ); 744 #if H_MV_ENC_DEC_TRAC 745 DTRACE_CU("intra_chroma_pred_mode", uiIPredMode ) 746 #endif 699 747 UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ]; 700 748 pcCU->getAllowedChromaDir( uiAbsPartIdx, uiAllowedChromaDir ); … … 729 777 uiSymbol++; 730 778 ruiInterDir = uiSymbol; 779 #if H_MV_ENC_DEC_TRAC 780 DTRACE_PU("inter_pred_idc", ruiInterDir - 1 ) 781 #endif 782 731 783 return; 732 784 } … … 764 816 } 765 817 818 #if H_MV_ENC_DEC_TRAC 819 #if ENC_DEC_TRACE 820 if ( eRefList == REF_PIC_LIST_0 ) 821 { 822 DTRACE_PU("ref_idx_l0", uiSymbol) 823 } 824 else 825 { 826 DTRACE_PU("ref_idx_l1", uiSymbol) 827 } 828 #endif 829 #endif 766 830 return; 767 831 } … … 835 899 { 836 900 m_pcTDecBinIf->decodeBin( ruiSubdivFlag, m_cCUTransSubdivFlagSCModel.get( 0, 0, uiLog2TransformBlockSize ) ); 901 #if !H_MV_ENC_DEC_TRAC 837 902 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 838 903 DTRACE_CABAC_T( "\tparseTransformSubdivFlag()" ) … … 842 907 DTRACE_CABAC_V( uiLog2TransformBlockSize ) 843 908 DTRACE_CABAC_T( "\n" ) 909 #endif 844 910 } 845 911 … … 849 915 const UInt uiCtx = 0; 850 916 m_pcTDecBinIf->decodeBin( uiSymbol , m_cCUQtRootCbfSCModel.get( 0, 0, uiCtx ) ); 917 #if !H_MV_ENC_DEC_TRAC 851 918 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 852 919 DTRACE_CABAC_T( "\tparseQtRootCbf()" ) … … 858 925 DTRACE_CABAC_V( uiAbsPartIdx ) 859 926 DTRACE_CABAC_T( "\n" ) 927 #else 928 DTRACE_CU( "rqt_root_cbf", uiSymbol ) 929 #endif 860 930 861 931 uiQtRootCbf = uiSymbol; … … 904 974 const UInt uiCtx = pcCU->getCtxQtCbf( eType, uiTrDepth ); 905 975 m_pcTDecBinIf->decodeBin( uiSymbol , m_cCUQtCbfSCModel.get( 0, eType ? TEXT_CHROMA: eType, uiCtx ) ); 906 976 #if !H_MV_ENC_DEC_TRAC 907 977 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 908 978 DTRACE_CABAC_T( "\tparseQtCbf()" ) … … 916 986 DTRACE_CABAC_V( uiAbsPartIdx ) 917 987 DTRACE_CABAC_T( "\n" ) 988 #endif 918 989 919 990 pcCU->setCbfSubParts( uiSymbol << uiTrDepth, eType, uiAbsPartIdx, uiDepth ); … … 941 1012 } 942 1013 } 1014 #if !H_MV_ENC_DEC_TRAC 943 1015 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 944 1016 DTRACE_CABAC_T("\tparseTransformSkip()"); … … 952 1024 DTRACE_CABAC_V( uiAbsPartIdx ) 953 1025 DTRACE_CABAC_T( "\n" ) 1026 #endif 954 1027 955 1028 pcCU->setTransformSkipSubParts( useTransformSkip, eTType, uiAbsPartIdx, uiDepth); … … 1027 1100 Void TDecSbac::parseCoeffNxN( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType ) 1028 1101 { 1102 #if !H_MV_ENC_DEC_TRAC 1029 1103 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 1030 1104 DTRACE_CABAC_T( "\tparseCoeffNxN()\teType=" ) … … 1051 1125 DTRACE_CABAC_V( pcCU->getPredictionMode( uiAbsPartIdx ) ) 1052 1126 DTRACE_CABAC_T( "\n" ) 1127 #endif 1053 1128 1054 1129 if( uiWidth > pcCU->getSlice()->getSPS()->getMaxTrSize() ) … … 1588 1663 uiW += ( 1 == uiCode ? 1 : 0 ); 1589 1664 } 1665 #if H_MV_ENC_DEC_TRAC 1666 DTRACE_CU("iv_res_pred_weight_idx", uiW ) 1667 #endif 1590 1668 pcCU->setARPWSubParts( ( UChar )( uiW ) , uiAbsPartIdx, uiDepth ); 1591 1669 } … … 1604 1682 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ); 1605 1683 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) ); 1684 #if !H_MV_ENC_DEC_TRAC 1606 1685 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 1607 1686 DTRACE_CABAC_T( "\tICFlag" ); … … 1611 1690 DTRACE_CABAC_V( uiSymbol ); 1612 1691 DTRACE_CABAC_T( "\n"); 1692 #else 1693 DTRACE_CU("ic_flag", uiSymbol) 1694 #endif 1613 1695 1614 1696 pcCU->setICFlagSubParts( uiSymbol ? true : false , uiAbsPartIdx, 0, uiDepth ); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecSlice.cpp
r324 r521 123 123 DTRACE_CABAC_T( "\tPOC: " ); 124 124 DTRACE_CABAC_V( rpcPic->getPOC() ); 125 #if H_MV_ENC_DEC_TRAC 126 DTRACE_CABAC_T( " Layer: " ); 127 DTRACE_CABAC_V( rpcPic->getLayerId() ); 128 #endif 125 129 DTRACE_CABAC_T( "\n" ); 126 130 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp
r504 r521 718 718 return false; 719 719 } 720 #if ENC_DEC_TRACE 721 #if H_MV_ENC_DEC_TRAC 722 // parse remainder of SH 723 g_disableHLSTrace = false; 724 #endif 725 #endif 720 726 #endif 721 727 // actual decoding starts here
Note: See TracChangeset for help on using the changeset viewer.