- Timestamp:
- 13 May 2013, 16:09:14 (12 years ago)
- Location:
- branches/HTM-DEV-0.1-dev/source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.1-dev/source/App/TAppDecoder/TAppDecTop.cpp
r368 r401 151 151 * nal unit. */ 152 152 streampos location = bitstreamFile.tellg(); 153 #if H_MV 154 #if ENC_DEC_TRACE 155 Int64 symCount = g_nSymbolCounter; 156 #endif 157 #endif 153 158 AnnexBStats stats = AnnexBStats(); 154 159 #if !H_MV … … 246 251 bitstreamFile.seekg(location-streamoff(3)); 247 252 bytestream.reset(); 253 #if H_MV 254 #if ENC_DEC_TRACE 255 g_nSymbolCounter = symCount; 256 #endif 257 #endif 258 248 259 } 249 260 #if !H_MV … … 591 602 } 592 603 604 #if H_MV 605 Int TAppDecTop::xGetDecoderIdx( Int layerId, Bool createFlag /*= false */ ) 606 { 607 Int decIdx = -1; 608 if ( m_layerIdToDecIdx[ layerId ] != -1 ) 609 { 610 decIdx = m_layerIdToDecIdx[ layerId ]; 611 } 612 else 613 { 614 assert ( createFlag ); 615 assert( m_numDecoders < MAX_NUM_LAYERS ); 616 617 decIdx = m_numDecoders; 618 619 // Init decoder 620 m_tDecTop[ decIdx ] = new TDecTop; 621 m_tDecTop[ decIdx ]->create(); 622 m_tDecTop[ decIdx ]->init( ); 623 m_tDecTop[ decIdx ]->setLayerId( layerId ); 624 m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 625 m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 626 627 // append pic list of new decoder to PicLists 628 assert( m_ivPicLists.size() == m_numDecoders ); 629 m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() ); 630 631 // create recon file related stuff 632 Char* pchTempFilename = NULL; 633 if ( m_pchReconFile ) 634 { 635 Char buffer[4]; 636 sprintf(buffer,"_%i", layerId ); 637 assert ( m_pchReconFile ); 638 xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename ); 639 assert( m_pchReconFiles.size() == m_numDecoders ); 640 } 641 642 m_pchReconFiles.push_back( pchTempFilename ); 643 644 m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv; 645 m_reconOpen [ decIdx ] = false; 646 647 // set others 648 m_pocLastDisplay [ decIdx ] = -MAX_INT; 649 m_layerIdToDecIdx [ layerId ] = decIdx; 650 651 m_numDecoders++; 652 }; 653 return decIdx; 654 } 655 #endif 593 656 //! \} -
branches/HTM-DEV-0.1-dev/source/App/TAppDecoder/TAppDecTop.h
r368 r401 97 97 Void xWriteOutput ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file 98 98 Void xFlushOutput ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file 99 Int xGetDecoderIdx ( Int layerId, Bool createFlag = false ) 100 { 101 Int decIdx = -1; 102 if ( m_layerIdToDecIdx[ layerId ] != -1 ) 103 { 104 decIdx = m_layerIdToDecIdx[ layerId ]; 105 } 106 else 107 { 108 assert ( createFlag ); 109 assert( m_numDecoders < MAX_NUM_LAYERS ); 110 111 decIdx = m_numDecoders; 112 113 // Init decoder 114 m_tDecTop[ decIdx ] = new TDecTop; 115 m_tDecTop[ decIdx ]->create(); 116 m_tDecTop[ decIdx ]->init( ); 117 m_tDecTop[ decIdx ]->setLayerId( layerId ); 118 m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 119 m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 120 121 // append pic list of new decoder to PicLists 122 assert( m_ivPicLists.size() == m_numDecoders ); 123 m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() ); 124 125 // create recon file related stuff 126 Char* pchTempFilename = NULL; 127 if ( m_pchReconFile ) 128 { 129 Char buffer[4]; 130 sprintf(buffer,"_%i", layerId ); 131 assert ( m_pchReconFile ); 132 xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename ); 133 assert( m_pchReconFiles.size() == m_numDecoders ); 134 } 135 136 m_pchReconFiles.push_back( pchTempFilename ); 137 138 m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv; 139 m_reconOpen [ decIdx ] = false; 140 141 // set others 142 m_pocLastDisplay [ decIdx ] = -MAX_INT; 143 m_layerIdToDecIdx [ layerId ] = decIdx; 144 145 m_numDecoders++; 146 }; 147 return decIdx; 148 } 99 Int xGetDecoderIdx ( Int layerId, Bool createFlag = false ); 149 100 #else 150 101 Void xWriteOutput ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file -
branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r368 r401 578 578 { 579 579 #if L0323_DPB 580 #if H_MV 581 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]"); 582 #else 580 583 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1"); 584 #endif 581 585 pcSPS->setMaxDecPicBuffering( uiCode + 1, i); 582 586 #else … … 584 588 pcSPS->setMaxDecPicBuffering( uiCode, i); 585 589 #endif 590 #if H_MV 591 READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" ); 592 #else 586 593 READ_UVLC ( uiCode, "sps_num_reorder_pics" ); 594 #endif 587 595 pcSPS->setNumReorderPics(uiCode, i); 596 #if H_MV 597 READ_UVLC ( uiCode, "sps_max_latency_increase[i]"); 598 #else 588 599 READ_UVLC ( uiCode, "sps_max_latency_increase"); 600 #endif 589 601 pcSPS->setMaxLatencyIncrease( uiCode, i ); 590 602 … … 694 706 { 695 707 UInt uiCode; 696 708 697 709 READ_CODE( 4, uiCode, "vps_video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 698 710 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); … … 1204 1216 } 1205 1217 } 1206 // } 1218 // } 1207 1219 TComRefPicListModification* refPicListModification = rpcSlice->getRefPicListModification(); 1220 1208 1221 if(!rpcSlice->isIntra()) 1209 1222 { -
branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r372 r401 50 50 m_iMaxRefPicNum = 0; 51 51 #if ENC_DEC_TRACE 52 #if H_MV 53 if ( g_hTrace == NULL ) 54 { 55 #endif 52 56 g_hTrace = fopen( "TraceDec.txt", "wb" ); 53 57 g_bJustDoIt = g_bEncDecTraceDisable; 54 58 g_nSymbolCounter = 0; 59 #if H_MV 60 } 61 #endif 55 62 #endif 56 63 m_pocCRA = 0; -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
r324 r401 185 185 { 186 186 { 187 #if !H_MV 187 188 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 188 189 DTRACE_CABAC_T( "\tstate=" ) … … 191 192 DTRACE_CABAC_V( binValue ) 192 193 DTRACE_CABAC_T( "\n" ) 194 #endif 193 195 } 194 196 m_uiBinsCoded += m_binCountIncrement; … … 231 233 { 232 234 { 235 #if !H_MV 233 236 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 234 237 DTRACE_CABAC_T( "\tEPsymbol=" ) 235 238 DTRACE_CABAC_V( binValue ) 236 239 DTRACE_CABAC_T( "\n" ) 240 #endif 237 241 } 238 242 m_uiBinsCoded += m_binCountIncrement; … … 259 263 for ( Int i = 0; i < numBins; i++ ) 260 264 { 265 #if !H_MV 261 266 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 262 267 DTRACE_CABAC_T( "\tEPsymbol=" ) 263 268 DTRACE_CABAC_V( ( binValues >> ( numBins - 1 - i ) ) & 1 ) 264 269 DTRACE_CABAC_T( "\n" ) 270 #endif 265 271 } 266 272 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r368 r401 799 799 TComReferencePictureSet altRps; 800 800 Bool useAltRps = false; 801 #if H_MV 802 if (pcSlice->getRapPicFlag() && ( pcSlice->getLayerId() == 0 ) ) 803 #else 801 804 if (pcSlice->getRapPicFlag()) 805 #endif 802 806 { 803 807 for (Int picIdx = 0; !useAltRps && picIdx < rps->getNumberOfPictures(); picIdx++) -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncEntropy.cpp
r324 r401 587 587 if( pcCU->isIntra(uiAbsPartIdx) ) 588 588 { 589 #if !H_MV 589 590 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 590 591 DTRACE_CABAC_T( "\tdecodeTransformIdx()\tCUDepth=" ) 591 592 DTRACE_CABAC_V( uiDepth ) 592 593 DTRACE_CABAC_T( "\n" ) 594 #endif 593 595 } 594 596 else -
branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r369 r401 2846 2846 { 2847 2847 Int numModifications = 0; 2848 2848 2849 2849 for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 2850 2850 { … … 2853 2853 2854 2854 // set inter-view modifications 2855 Bool isModified = false; 2856 Int tempList[16]; 2857 for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; } 2858 2855 2859 if( (maxRefListSize > 1) && (numModifications > 0) ) 2856 2860 { 2857 refPicListModification->setRefPicListModificationFlagL( li, true );2858 Int tempList[16];2859 for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; }2860 2861 Bool isModified = false;2862 2861 for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 2863 2862 { … … 2878 2877 } 2879 2878 } 2880 if( isModified ) 2881 { 2882 Int temporalRefIdx = 0; 2883 for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ ) 2884 { 2885 if( tempList[i] >= 0 ) 2886 { 2887 refPicListModification->setRefPicSetIdxL( li, i, tempList[i] ); 2888 } 2889 else 2890 { 2891 refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx ); 2892 temporalRefIdx++; 2893 } 2894 } 2895 } 2896 else 2897 { 2898 refPicListModification->setRefPicListModificationFlagL( li, false ); 2899 } 2900 } 2879 } 2880 2881 refPicListModification->setRefPicListModificationFlagL( li, isModified ); 2882 2883 if( isModified ) 2884 { 2885 Int temporalRefIdx = 0; 2886 for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ ) 2887 { 2888 if( tempList[i] >= 0 ) 2889 { 2890 refPicListModification->setRefPicSetIdxL( li, i, tempList[i] ); 2891 } 2892 else 2893 { 2894 refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx ); 2895 temporalRefIdx++; 2896 } 2897 } 2898 } 2901 2899 } 2902 2900 }
Note: See TracChangeset for help on using the changeset viewer.