Changeset 820 in SHVCSoftware
- Timestamp:
- 7 Jul 2014, 11:08:41 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp
r815 r820 78 78 string cfg_ReconFile; 79 79 #endif 80 #if AVC_SYNTAX || SYNTAX_OUTPUT 81 string cfg_BLSyntaxFile; 82 #endif 80 83 81 string cfg_TargetDecLayerIdSetFile; 84 82 … … 96 94 ("BLSourceHeight,-hgt", m_iBLSourceHeight, 0, "BL source picture height") 97 95 #endif 98 #if AVC_SYNTAX99 ("BLSyntaxFile,-ibs", cfg_BLSyntaxFile, string(""), "BL syntax input file name")100 #endif101 96 #endif 102 97 #else 103 98 ("ReconFile,o", cfg_ReconFile, string(""), "reconstructed YUV output file name\n" 104 99 "YUV writing is skipped if omitted") 105 #endif106 #if SYNTAX_OUTPUT107 ("BLSyntaxFile,-ibs", cfg_BLSyntaxFile, string(""), "BL syntax input file name")108 ("BLSourceWidth,-wdt", m_iBLSourceWidth, 0, "BL source picture width")109 ("BLSourceHeight,-hgt", m_iBLSourceHeight, 0, "BL source picture height")110 ("BLFrames,-fr", m_iBLFrames, 0, "BL number of frames")111 100 #endif 112 101 ("SkipFrames,s", m_iSkipFrame, 0, "number of frames to skip before random access") … … 163 152 #else 164 153 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 165 #endif166 #if AVC_SYNTAX || SYNTAX_OUTPUT167 m_pchBLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str());168 154 #endif 169 155 -
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h
r713 r820 78 78 Int m_iBLSourceHeight; 79 79 #endif 80 #if AVC_SYNTAX81 Char* m_pchBLSyntaxFile; ///< input BL syntax file name82 80 #endif 83 #endif84 #endif85 86 #if SYNTAX_OUTPUT87 Char* m_pchBLSyntaxFile; ///< input BL syntax file name88 #if !REPN_FORMAT_IN_VPS89 Int m_iBLSourceWidth;90 Int m_iBLSourceHeight;91 #endif92 Int m_iBLFrames;93 81 #endif 94 82 … … 116 104 , m_iBLSourceHeight(0) 117 105 #endif 118 #if SYNTAX_OUTPUT119 , m_iBLSourceWidth(0)120 , m_iBLSourceHeight(0)121 , m_iBLFrames(0)122 #endif123 106 #endif 124 107 , m_respectDefDispWindow(0) -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r815 r820 102 102 } 103 103 #endif 104 #if AVC_SYNTAX || SYNTAX_OUTPUT105 if( m_pchBLSyntaxFile )106 {107 free ( m_pchBLSyntaxFile );108 m_pchBLSyntaxFile = NULL;109 }110 #endif111 104 } 112 105 … … 163 156 } 164 157 TComList<TComPic*> *cListPic = m_acTDecTop[0].getListPic(); 165 #if AVC_SYNTAX || !REPN_FORMAT_IN_VPS166 m_acTDecTop[0].setBLsize( m_iBLSourceWidth, m_iBLSourceHeight );167 #endif168 158 m_acTDecTop[0].setBLReconFile( &streamYUV ); 169 159 pcBLPic.setLayerId( 0 ); 170 160 cListPic->pushBack( &pcBLPic ); 171 #if AVC_SYNTAX172 fstream streamSyntaxFile;173 if( m_pchBLSyntaxFile )174 {175 streamSyntaxFile.open( m_pchBLSyntaxFile, fstream::in | fstream::binary );176 }177 m_acTDecTop[0].setBLSyntaxFile( &streamSyntaxFile );178 #endif179 161 #endif 180 162 … … 363 345 streamYUV.close(); 364 346 } 365 #if AVC_SYNTAX366 if( streamSyntaxFile.is_open() )367 {368 streamSyntaxFile.close();369 }370 #endif371 347 pcBLPic.destroy(); 372 348 … … 405 381 Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen) 406 382 Bool loopFiltered = false; 407 408 #if SYNTAX_OUTPUT409 if( !m_pchBLSyntaxFile )410 {411 printf( "Wrong base layer syntax file\n" );412 exit(EXIT_FAILURE);413 }414 fstream streamSyntaxFile( m_pchBLSyntaxFile, fstream::out | fstream::binary );415 if( !streamSyntaxFile.good() )416 {417 printf( "Base layer syntax input reading error\n" );418 exit(EXIT_FAILURE);419 }420 m_cTDecTop.setBLSyntaxFile( &streamSyntaxFile );421 422 for( Int i = m_iBLFrames * m_iBLSourceWidth * m_iBLSourceHeight * SYNTAX_BYTES / 16; i >= 0; i-- )423 {424 streamSyntaxFile.put( 0 );425 }426 streamSyntaxFile.seekp( 0 );427 #endif428 383 429 384 while (!!bitstreamFile) … … 542 497 } 543 498 } 544 545 #if SYNTAX_OUTPUT546 if( streamSyntaxFile.is_open() )547 {548 streamSyntaxFile.close();549 }550 #endif551 499 552 500 xFlushOutput( pcListPic ); … … 873 821 if ( m_pchReconFile ) 874 822 { 875 #if SYNTAX_OUTPUT876 TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();877 #if Q0074_SEI_COLOR_MAPPING878 if( m_acTDecTop[layerIdx].m_ColorMapping->getColorMappingFlag() )879 {880 pPicCYuvRec = m_acTDecTop[layerIdx].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerIdx );881 }882 #endif883 823 const Window &conf = pcPic->getConformanceWindow(); 884 824 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 885 m_cTVideoIOYuvReconFile.write( pPicCYuvRec, 886 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 887 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 888 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 889 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 890 #endif 825 m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(), 826 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 827 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 828 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 829 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 891 830 } 892 831 -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r815 r820 510 510 string cfg_BLInputFile; 511 511 #endif 512 #if AVC_SYNTAX513 string cfg_BLSyntaxFile;514 #endif515 512 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 516 513 string cfg_tileSets; … … 629 626 ("AvcBase,-avc", m_avcBaseLayerFlag, 0, "avc_base_layer_flag") 630 627 ("InputBLFile,-ibl", cfg_BLInputFile, string(""), "Base layer rec YUV input file name") 631 #if AVC_SYNTAX632 ("InputBLSyntaxFile,-ibs", cfg_BLSyntaxFile, string(""), "Base layer syntax input file name")633 #endif634 628 #endif 635 629 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)") … … 1095 1089 #endif 1096 1090 m_pBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 1097 #if AVC_SYNTAX1098 m_BLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str());1099 #endif1100 1091 #else //SVC_EXTENSION 1101 1092 m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str()); … … 2933 2924 { 2934 2925 printf("=== Layer %d settings === \n", layer); 2935 #if AVC_SYNTAX2936 m_acLayerCfg[layer].xPrintParameter( layer );2937 #else2938 2926 m_acLayerCfg[layer].xPrintParameter(); 2939 #endif2940 2927 printf("\n"); 2941 2928 } 2942 2929 printf("=== Common configuration settings === \n"); 2943 2930 printf("Bitstream File : %s\n", m_pBitstreamFile ); 2944 #else 2931 #else //SVC_EXTENSION 2945 2932 printf("Input File : %s\n", m_pchInputFile ); 2946 2933 printf("Bitstream File : %s\n", m_pchBitstreamFile ); … … 2948 2935 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate ); 2949 2936 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 2950 #endif 2937 #endif //SVC_EXTENSION 2951 2938 if (m_isField) 2952 2939 { -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r815 r820 69 69 #if AVC_BASE 70 70 Int m_avcBaseLayerFlag; ///< avc_baselayer_flag 71 #endif72 #if AVC_SYNTAX73 Char* m_BLSyntaxFile; ///< input syntax file74 71 #endif 75 72 Bool m_maxTidRefPresentFlag; … … 470 467 Int getWaveFrontSynchro() { return m_iWaveFrontSynchro; } 471 468 Void getDirFilename(string& filename, string& dir, const string path); 472 #if AVC_SYNTAX473 Char* getBLSyntaxFile() { return m_BLSyntaxFile; }474 #endif475 469 Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString); 476 470 #if REPN_FORMAT_IN_VPS -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r713 r820 157 157 } 158 158 159 #if AVC_SYNTAX160 Void TAppEncLayerCfg::xPrintParameter( UInt layerId )161 #else162 159 Void TAppEncLayerCfg::xPrintParameter() 163 #endif164 160 { 165 161 printf("Input File : %s\n", m_cInputFile.c_str() ); 166 162 printf("Reconstruction File : %s\n", m_cReconFile.c_str() ); 167 #if AVC_SYNTAX168 if( layerId == 0 )169 {170 printf("Base layer syntax file : %s\n", m_cAppEncCfg->getBLSyntaxFile() );171 }172 #endif173 163 #if REPN_FORMAT_IN_VPS 174 164 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_confLeft + m_confRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confTop + m_confBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate ); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r815 r820 122 122 bool parseCfg ( const string& cfgFileName ); ///< parse layer configuration file to fill member variables 123 123 124 #if AVC_SYNTAX125 Void xPrintParameter( UInt layerId );126 #else127 124 Void xPrintParameter(); 128 #endif129 125 Bool xCheckParameter( Bool isField ); 130 126 -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r815 r820 226 226 #if REF_IDX_MFM 227 227 #if AVC_BASE 228 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX: true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());228 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers()); 229 229 #else 230 230 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) ); … … 1669 1669 } 1670 1670 1671 #if AVC_SYNTAX1672 fstream streamSyntaxFile;1673 if( m_acTEncTop[0].getVPS()->getAvcBaseLayerFlag() )1674 {1675 if( !m_BLSyntaxFile )1676 {1677 printf( "Wrong base layer syntax input file\n" );1678 exit(EXIT_FAILURE);1679 }1680 streamSyntaxFile.open( m_BLSyntaxFile, fstream::in | fstream::binary );1681 if( !streamSyntaxFile.good() )1682 {1683 printf( "Base layer syntax input reading error\n" );1684 exit(EXIT_FAILURE);1685 }1686 m_acTEncTop[0].setBLSyntaxFile( &streamSyntaxFile );1687 }1688 #endif1689 1690 1671 Bool bFirstFrame = true; 1691 1672 while ( !bEos ) … … 1884 1865 m_acTEncTop[layer].deletePicBuffer(); 1885 1866 } 1886 1887 #if AVC_SYNTAX1888 if( streamSyntaxFile.is_open() )1889 {1890 streamSyntaxFile.close();1891 }1892 #endif1893 1867 1894 1868 // delete buffers & classes … … 2324 2298 if (m_pchReconFile) 2325 2299 { 2326 #if SYNTAX_OUTPUT2327 2300 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom ); 2328 #endif2329 2301 } 2330 2302 -
branches/SHM-dev/source/Lib/TLibCommon/TComMotionInfo.h
r713 r820 155 155 Void compress(Char* pePredMode, Int scale); 156 156 157 #if AVC_SYNTAX158 Void setMv (TComMv cMv, Int iIdx ) { m_pcMv [iIdx] = cMv; }159 Void setRefIdx(Int iRefIdx, Int iIdx ) { m_piRefIdx[iIdx] = iRefIdx; }160 #endif161 162 157 #if REF_IDX_MFM 163 158 Void setMvField( TComMvField const& mvField, Int iIdx ) -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r815 r820 334 334 #endif 335 335 336 #if AVC_SYNTAX337 Void TComPic::readBLSyntax( fstream* filestream, UInt numBytes )338 {339 if( !filestream->good() )340 {341 return;342 }343 344 UInt width = this->getPicYuvRec()->getWidth();345 UInt height = this->getPicYuvRec()->getHeight();346 347 UInt64 poc = (UInt64)this->getPOC();348 UInt partWidth = width / 4;349 UInt partHeight = height / 4;350 351 UInt numPartInWidth = this->getNumPartInWidth();352 UInt numPartInHeight = this->getNumPartInHeight();353 UInt numPartLCUInWidth = this->getFrameWidthInCU();354 355 UInt64 uiPos = (UInt64)poc * width * height * numBytes / 16;356 357 filestream->seekg( uiPos, ios_base::beg );358 359 for( Int i = 0; i < partHeight; i++ )360 {361 for( Int j = 0; j < partWidth; j++ )362 {363 UInt x = ( j / numPartInWidth );364 UInt y = ( i / numPartInHeight );365 366 UInt addrLCU = y * numPartLCUInWidth + x;367 UInt partAddr = ( i - y * numPartInHeight ) * numPartInWidth + ( j - x * numPartInWidth );368 partAddr = g_auiRasterToZscan[partAddr];369 370 TComDataCU* pcCU = this->getCU( addrLCU );371 372 TComMv mv;373 Short temp;374 375 // RefIdxL0376 Char refIdxL0 = -1;377 filestream->read( &refIdxL0, 1 );378 assert( refIdxL0 >= -1 );379 pcCU->getCUMvField( REF_PIC_LIST_0 )->setRefIdx( (Int)refIdxL0, partAddr );380 381 // RefIdxL1382 Char refIdxL1 = -1;383 filestream->read( &refIdxL1, 1 );384 assert( refIdxL1 >= -1 );385 pcCU->getCUMvField( REF_PIC_LIST_1 )->setRefIdx( (Int)refIdxL1, partAddr );386 387 // MV L0388 temp = 0;389 filestream->read( reinterpret_cast<char*>(&temp), 2 );390 mv.setHor( (Short)temp );391 temp = 0;392 filestream->read( reinterpret_cast<char*>(&temp), 2 );393 mv.setVer( (Short)temp );394 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMv( mv, partAddr );395 396 // MV L1397 temp = 0;398 filestream->read( reinterpret_cast<char*>(&temp), 2 );399 mv.setHor( (Short)temp );400 temp = 0;401 filestream->read( reinterpret_cast<char*>(&temp), 2 );402 mv.setVer( (Short)temp );403 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMv( mv, partAddr );404 405 // set dependent information406 pcCU->setPredictionMode( partAddr, ( refIdxL0 == NOT_VALID && refIdxL1 == NOT_VALID ) ? MODE_INTRA : MODE_INTER );407 UInt interDir = ( refIdxL0 != NOT_VALID ) + ( refIdxL1 != NOT_VALID && this->getSlice(0)->isInterB() ) * 2;408 assert( interDir <= 3 );409 pcCU->setInterDir( partAddr, interDir );410 }411 }412 }413 #endif414 415 #if SYNTAX_OUTPUT416 Void TComPic::wrireBLSyntax( fstream* filestream, UInt numBytes )417 {418 if( !filestream->good() )419 {420 return;421 }422 423 UInt width = this->getPicYuvRec()->getWidth();424 UInt height = this->getPicYuvRec()->getHeight();425 426 UInt64 poc = (UInt64)this->getPOC();427 UInt partWidth = width / 4;428 UInt partHeight = height / 4;429 430 UInt numPartInWidth = this->getNumPartInWidth();431 UInt numPartInHeight = this->getNumPartInHeight();432 UInt numPartLCUInWidth = this->getFrameWidthInCU();433 434 filestream->seekg( poc * width * height * numBytes / 16 );435 436 for( Int i = 0; i < partHeight; i++ )437 {438 for( Int j = 0; j < partWidth; j++ )439 {440 UInt x = ( j / numPartInWidth );441 UInt y = ( i / numPartInHeight );442 443 UInt addrLCU = y * numPartLCUInWidth + x;444 UInt partAddr = ( i - y * numPartInHeight ) * numPartInWidth + ( j - x * numPartInWidth );445 partAddr = g_auiRasterToZscan[partAddr];446 447 TComDataCU* pcCU = this->getCU( addrLCU );448 449 TComMv mv;450 Short temp;451 Char refIdxL0 = NOT_VALID, refIdxL1 = NOT_VALID;452 453 // RefIdx454 if( !pcCU->isIntra( partAddr ) )455 {456 refIdxL0 = (Char)pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( partAddr );457 refIdxL1 = (Char)pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( partAddr );458 }459 assert( refIdxL0 >= - 1 && refIdxL1 >= - 1 );460 filestream->put( refIdxL0 );461 filestream->put( refIdxL1 );462 463 // MV L0464 mv.setZero();465 if( refIdxL0 >= 0 )466 {467 mv = pcCU->getCUMvField( REF_PIC_LIST_0 )->getMv( partAddr );468 }469 temp = (Short)mv.getHor();470 filestream->write( reinterpret_cast<char*>(&temp), 2 );471 temp = (Short)mv.getVer();472 filestream->write( reinterpret_cast<char*>(&temp), 2 );473 474 // MV L1475 mv.setZero();476 if( refIdxL1 >= 0 )477 {478 mv = pcCU->getCUMvField( REF_PIC_LIST_1 )->getMv( partAddr );479 }480 temp = (Short)mv.getHor();481 filestream->write( reinterpret_cast<char*>(&temp), 2 );482 temp = (Short)mv.getVer();483 filestream->write( reinterpret_cast<char*>(&temp), 2 );484 }485 }486 }487 #endif488 489 336 #if MFM_ENCCONSTRAINT 490 337 Bool TComPic::checkSameRefInfo() -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.h
r815 r820 45 45 #include "TComBitStream.h" 46 46 #include "SEI.h" 47 #if AVC_BASE || SYNTAX_OUTPUT47 #if AVC_BASE 48 48 #include <fstream> 49 49 #endif … … 213 213 #endif 214 214 Void copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut); 215 #if AVC_SYNTAX216 Void readBLSyntax( fstream* filestream, UInt numBytes );217 #endif218 #endif219 #if SYNTAX_OUTPUT220 Void wrireBLSyntax( fstream* filestream, UInt numBytes );221 215 #endif 222 216 -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h
r595 r820 161 161 UInt getMaxCUHeight() { return m_uiMaxCUHeight; } 162 162 #endif 163 #if AVC_SYNTAX164 UInt getMaxCUWidth() { return m_uiMaxCUWidth; }165 UInt getMaxCUHeight() { return m_uiMaxCUHeight; }166 UInt getMaxDepth() { return m_uhTotalDepth; }167 #endif168 163 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 169 164 Void setTileSetIdxMap( Int i, Int tileSetIdx, UChar setType, Bool skipFlag ) -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r815 r820 3854 3854 3855 3855 #if SVC_EXTENSION 3856 #if AVC_SYNTAX3857 Void TComSlice::initBaseLayerRPL( TComSlice *pcSlice )3858 {3859 // Assumed that RPL of the base layer is same to the EL, otherwise this information should be also dumped and read from the metadata file3860 setPOC( pcSlice->getPOC() );3861 if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )3862 {3863 setSliceType( I_SLICE );3864 }3865 else3866 {3867 setSliceType( pcSlice->getSliceType() );3868 }3869 3870 if( this->isIntra() )3871 {3872 return;3873 }3874 3875 //initialize reference POC of BL3876 for( Int iRefPicList = 0; iRefPicList < 2; iRefPicList++ )3877 {3878 RefPicList eRefPicList = RefPicList( iRefPicList );3879 3880 assert( pcSlice->getNumRefIdx( eRefPicList) >= 0 );3881 setNumRefIdx( eRefPicList, pcSlice->getNumRefIdx( eRefPicList ) - 1 );3882 assert( getNumRefIdx( eRefPicList) <= MAX_NUM_REF);3883 3884 for(Int refIdx = 0; refIdx < getNumRefIdx( eRefPicList ); refIdx++)3885 {3886 setRefPOC( pcSlice->getRefPic( eRefPicList, refIdx )->getPOC(), eRefPicList, refIdx );3887 setRefPic( pcSlice->getRefPic( eRefPicList, refIdx ), eRefPicList, refIdx );3888 /*3889 // should be set if the base layer has its own instance of the reference picture lists, currently EL RPL is reused.3890 getRefPic( eRefPicList, refIdx )->setLayerId( 0 );3891 getRefPic( eRefPicList, refIdx )->setIsLongTerm( pcSlice->getRefPic( eRefPicList, refIdx )->getIsLongTerm() );3892 */3893 3894 }3895 }3896 return;3897 }3898 #endif3899 3900 3856 Bool TComSlice::setBaseColPic( TComList<TComPic*>& rcListPic, UInt refLayerIdc ) 3901 3857 { -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r819 r820 2407 2407 TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } 2408 2408 2409 #if AVC_SYNTAX2410 Void initBaseLayerRPL( TComSlice *pcSlice );2411 #endif2412 2413 2409 Void setRefPicListModificationSvc(); 2414 2410 Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r818 r820 41 41 #define SVC_EXTENSION 1 42 42 43 #define SYNTAX_BYTES 10 ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)]44 43 #if SVC_EXTENSION 45 44 #define MAX_LAYERS 8 ///< max number of layers the codec is supposed to handle … … 152 151 153 152 #define AVC_BASE 1 ///< YUV BL reading for AVC base SVC 154 #if AVC_BASE155 #define AVC_SYNTAX 0 ///< Syntax reading for AVC base156 #endif157 153 158 154 #define REF_IDX_MFM 1 ///< JCTVC-L0336: motion vector mapping of inter-layer reference picture … … 262 258 263 259 264 #else265 #define SYNTAX_OUTPUT 0266 260 #endif // SVC_EXTENSION 267 261 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r815 r820 74 74 memset(m_cIlpPic, 0, sizeof(m_cIlpPic)); 75 75 #endif 76 #if AVC_SYNTAX || SYNTAX_OUTPUT77 m_pBLSyntaxFile = NULL;78 #endif79 76 m_prevSliceSkipped = false; 80 77 m_skippedPOC = 0; … … 522 519 m_cGopDecoder.filterPicture(pcPic); 523 520 524 #if SYNTAX_OUTPUT525 pcPic->wrireBLSyntax( getBLSyntaxFile(), SYNTAX_BYTES );526 #endif527 521 TComSlice::sortPicList( m_cListPic ); // sorting for application output 528 522 poc = pcPic->getSlice(m_uiSliceIdx-1)->getPOC(); … … 781 775 782 776 #if AUXILIARY_PICTURES 783 #if AVC_SYNTAX784 pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), repFormat->getChromaFormatVpsIdc(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, activeSPS, true);785 #else786 777 pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), repFormat->getChromaFormatVpsIdc(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, NULL, true); 787 #endif788 #else789 #if AVC_SYNTAX790 pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, activeSPS, true);791 778 #else 792 779 pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, NULL, true); 793 #endif794 780 #endif 795 781 // it is needed where the VPS is accessed through the slice … … 1805 1791 continue; 1806 1792 } 1807 #if AVC_SYNTAX1808 TComPic* pBLPic = pcSlice->getBaseColPic(refLayerIdc);1809 if( pcSlice->getPOC() == 0 )1810 {1811 // initialize partition order.1812 UInt* piTmp = &g_auiZscanToRaster[0];1813 initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );1814 initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );1815 }1816 pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );1817 pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );1818 #endif1819 1793 } 1820 1794 else … … 1931 1905 { 1932 1906 pcSlice->setBaseColPic ( refLayerIdc, *m_ppcTDecTop[0]->getListPic()->begin() ); 1933 #if AVC_SYNTAX1934 TComPic* pBLPic = pcSlice->getBaseColPic(refLayerIdc);1935 if( pcSlice->getPOC() == 0 )1936 {1937 // initialize partition order.1938 UInt* piTmp = &g_auiZscanToRaster[0];1939 initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );1940 initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );1941 }1942 pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );1943 pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );1944 #endif1945 1907 } 1946 1908 else … … 2294 2256 exit(EXIT_FAILURE); 2295 2257 } 2296 #if AVC_SYNTAX2297 if( !m_ppcTDecTop[0]->getBLSyntaxFile()->good() )2298 {2299 printf( "Base layer syntax input reading error\n" );2300 exit(EXIT_FAILURE);2301 }2302 #endif2303 2258 } 2304 2259 else -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
r815 r820 195 195 CommonDecoderParams* m_commonDecoderParams; 196 196 #endif 197 #if AVC_SYNTAX || SYNTAX_OUTPUT198 fstream* m_pBLSyntaxFile;199 #endif200 201 197 #if NO_CLRAS_OUTPUT_FLAG 202 198 Bool m_noClrasOutputFlag; … … 327 323 #endif 328 324 #endif //SVC_EXTENSION 329 #if AVC_SYNTAX || SYNTAX_OUTPUT 330 Void setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; } 331 fstream* getBLSyntaxFile() { return m_pBLSyntaxFile; } 332 #endif 325 333 326 protected: 334 327 Void xGetNewPicBuffer (TComSlice* pcSlice, TComPic*& rpcPic); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r818 r820 2174 2174 } 2175 2175 #endif 2176 #if AVC_SYNTAX2177 pcPic->readBLSyntax( m_ppcTEncTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );2178 #endif2179 2176 return; 2180 2177 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h
r815 r820 125 125 static Int m_iSPSIdCnt; ///< next Id number for SPS 126 126 static Int m_iPPSIdCnt; ///< next Id number for PPS 127 #if AVC_SYNTAX128 fstream* m_pBLSyntaxFile;129 #endif130 127 TEncTop** m_ppcTEncTop; 131 128 TEncTop* getLayerEnc(UInt layer) { return m_ppcTEncTop[layer]; } … … 246 243 Bool getInterLayerWeightedPredFlag() { return m_interLayerWeightedPredFlag; } 247 244 #endif 248 #if AVC_SYNTAX249 Void setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; }250 fstream* getBLSyntaxFile() { return m_pBLSyntaxFile; }251 #endif252 245 Void encode( TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int iPicIdInGOP ); 253 246 Void encodePrep( TComPicYuv* pcPicYuvOrg );
Note: See TracChangeset for help on using the changeset viewer.