Changeset 48 in 3DVCSoftware
- Timestamp:
- 30 Mar 2012, 18:57:41 (13 years ago)
- Location:
- branches/0.3-poznan-univ
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-poznan-univ/build/linux/common/makefile.base
r28 r48 47 47 # default cpp flags for all configurations 48 48 #CPPFLAGS = -Wall -fPIC $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) 49 CPPFLAGS = -fPIC $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare 49 CPPFLAGS = -fPIC $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -Werror 50 50 51 51 ########## -
branches/0.3-poznan-univ/source/App/TAppDecoder/TAppDecTop.cpp
r41 r48 739 739 Void TAppDecTop::storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx, Int iCurPoc, Bool bDepth) 740 740 { 741 Int iLeftViewIdx = -1;742 Int iRightViewIdx = -1;743 741 Int iNearestViewIdx = -1; 744 742 Bool bRenderFromLeft; … … 830 828 Void TAppDecTop::storeDepthSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx, Int iCurPoc) 831 829 { 832 Int iLeftViewIdx = -1;833 Int iRightViewIdx = -1;834 830 Int iNearestViewIdx = -1; 835 831 Bool bRenderFromLeft; -
branches/0.3-poznan-univ/source/App/TAppEncoder/TAppEncCfg.cpp
r41 r48 523 523 size = m_iSourceWidth*m_iSourceHeight; 524 524 depth_buf = (unsigned char *)malloc(size); 525 fread(depth_buf, 1, size, base_depth_file);525 size_t read = fread(depth_buf, 1, size, base_depth_file); 526 526 fclose(base_depth_file); 527 memset(histogram, 0, sizeof(histogram)); 528 for (i=0; i<size;++i) histogram[depth_buf[i]]++; 529 weighted_avg = 0; 530 for (i=0; i<256; ++i) weighted_avg += i*histogram[i]; 531 weighted_avg /= size; 532 533 if (weighted_avg<m_iNonlinearDepthThreshold) 527 if(read) 534 528 { 535 m_bUseNonlinearDepth = 0; 536 printf ("\nWeighted average of depth histogram:%f < %d, turning NonlinearDepthRepresentation OFF\n", weighted_avg, m_iNonlinearDepthThreshold); 529 memset(histogram, 0, sizeof(histogram)); 530 for (i=0; i<size;++i) histogram[depth_buf[i]]++; 531 weighted_avg = 0; 532 for (i=0; i<256; ++i) weighted_avg += i*histogram[i]; 533 weighted_avg /= size; 534 535 if (weighted_avg<m_iNonlinearDepthThreshold) 536 { 537 m_bUseNonlinearDepth = 0; 538 printf ("\nWeighted average of depth histogram:%f < %d, turning NonlinearDepthRepresentation OFF\n", weighted_avg, m_iNonlinearDepthThreshold); 539 } 537 540 } 538 541 } … … 542 545 if(m_bUseNonlinearDepth) 543 546 { 547 if((Int)m_aiNonlinearDepthModel.size()== 0) 548 { 549 m_aiNonlinearDepthModel.push_back(10); 550 m_aiNonlinearDepthModel.push_back(19); 551 m_aiNonlinearDepthModel.push_back(24); 552 m_aiNonlinearDepthModel.push_back(27); 553 m_aiNonlinearDepthModel.push_back(26); 554 m_aiNonlinearDepthModel.push_back(22); 555 m_aiNonlinearDepthModel.push_back(13); 556 } 557 //10,19,24,27,26,22,13 544 558 m_cNonlinearDepthModel.m_iNum = (Int)m_aiNonlinearDepthModel.size(); 559 545 560 m_cNonlinearDepthModel.m_aiPoints[0]=0; 561 546 562 for (int i=0; i<m_cNonlinearDepthModel.m_iNum; ++i) 547 563 m_cNonlinearDepthModel.m_aiPoints[i+1] = m_aiNonlinearDepthModel[i]; -
branches/0.3-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp
r41 r48 150 150 #endif 151 151 152 #if BITSTREAM_EXTRACTION 153 m_acTEncTopList[iViewIdx]->setLayerId ( ( (UInt)iViewIdx ) << 1 ); 154 #endif 152 155 m_acTEncTopList[iViewIdx]->setViewId ( (UInt)iViewIdx ); 153 156 m_acTEncTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); … … 359 362 #endif 360 363 364 #if BITSTREAM_EXTRACTION 365 m_acTEncDepthTopList[iViewIdx]->setLayerId ( ( ( (UInt)iViewIdx ) << 1 ) + 1 ); 366 #endif 361 367 m_acTEncDepthTopList[iViewIdx]->setViewId ( (UInt)iViewIdx ); 362 368 m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 363 369 m_acTEncDepthTopList[iViewIdx]->setIsDepth ( true ); 370 #if FLEX_CODING_ORDER 371 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 372 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); 373 m_acTEncDepthTopList[iViewIdx]->setCodedScale ( m_cCameraData.getCodedScale () ); 374 m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( m_cCameraData.getCodedOffset () ); 375 #else 364 376 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( 0 ); 365 377 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( false ); 366 378 m_acTEncDepthTopList[iViewIdx]->setCodedScale ( 0 ); 367 379 m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( 0 ); 380 #endif 368 381 #if DEPTH_MAP_GENERATION 369 382 m_acTEncDepthTopList[iViewIdx]->setPredDepthMapGeneration ( 0 ); … … 794 807 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 795 808 bThisViewContinueReadingPics = bContinueReadingPics[iViewIdx]; 809 #if POZNAN_SYNTH 810 if( m_uiUseCUSkip ) 811 { 812 xStoreSynthPicsInBuffer(iViewIdx,false); 813 } 814 #endif 796 815 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 797 816 // If no depth picture reconstruction for current view and current POC is available sythesize one 798 Int iCurrPoc= m_acTEncTopList[ 0 ]->getNextFrameId();817 //Int iCurrPoc2 = m_acTEncTopList[ 0 ]->getNextFrameId(); 799 818 Bool bCurrPicDepthRec = getPicFromView( iViewIdx, iCurrPoc, true ) != NULL && getPicFromView( iViewIdx, iCurrPoc, true )->getReconMark(); 800 819 if(m_bUseTexDqpAccordingToDepth && !bCurrPicDepthRec) … … 825 844 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 826 845 bThisViewContinueReadingDepthPics = bContinueReadingDepthPics[iViewIdx]; 846 #if POZNAN_SYNTH 847 if( m_uiUseCUSkip ) 848 { 849 xStoreSynthPicsInBuffer(iViewIdx,true); 850 } 851 #endif 827 852 m_acTEncDepthTopList[iViewIdx]->encode( bDepthEos[iViewIdx], m_cListPicYuvDepthRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingDepthPics ); 828 853 bContinueReadingDepthPics[iViewIdx]=bThisViewContinueReadingDepthPics; … … 858 883 #if FLEX_CODING_ORDER 859 884 // If no depth picture reconstruction for current view and current POC is available sythesize one 860 Int iCurrPoc = m_acTEncTopList[ 0 ]->getNextFrameId();885 //Int iCurrPoc = m_acTEncTopList[ 0 ]->getNextFrameId(); 861 886 Bool bCurrPicDepthRec = getPicFromView( iViewIdx, iCurrPoc, true ) != NULL && getPicFromView( iViewIdx, iCurrPoc, true )->getReconMark(); 862 887 if(m_bUseTexDqpAccordingToDepth && !bCurrPicDepthRec) … … 1390 1415 } 1391 1416 1392 Int iNumberOfReferenceViews = 0;1393 1417 Int iNearestViewIdx = -1; 1394 1418 Bool bRenderFromLeft; … … 1477 1501 Void TAppEncTop::xStoreDepthSynthPicsInBuffer(Int iCoddedViewIdx) 1478 1502 { 1479 Int iLeftViewIdx = -1;1480 Int iRightViewIdx = -1;1481 1503 Int iNearestViewIdx = -1; 1482 1504 Bool bRenderFromLeft; -
branches/0.3-poznan-univ/source/App/TAppRenderer/TAppRendererTop.cpp
r45 r48 308 308 else 309 309 { 310 Int iDistLeft = abs( m_cCameraData.getBaseId2SortedId()[0] - m_cCameraData.getBaseId2SortedId() [iLeftBaseViewIdx ] );311 Int iDistRight = abs( m_cCameraData.getBaseId2SortedId()[0] - m_cCameraData.getBaseId2SortedId() [iRightBaseViewIdx] );310 //Int iDistLeft = abs( m_cCameraData.getBaseId2SortedId()[0] - m_cCameraData.getBaseId2SortedId() [iLeftBaseViewIdx ] ); 311 //Int iDistRight = abs( m_cCameraData.getBaseId2SortedId()[0] - m_cCameraData.getBaseId2SortedId() [iRightBaseViewIdx] ); 312 312 313 313 Int iFillViewIdx = (0!=iLeftBaseViewIdx)? iLeftBaseViewIdx: iRightBaseViewIdx; -
branches/0.3-poznan-univ/source/Lib/TLibCommon/SEI.h
r5 r48 41 41 class SEI 42 42 { 43 #if BITSTREAM_EXTRACTION 44 protected: 45 UInt m_uiLayerId; 46 #endif 47 43 48 public: 44 49 enum PayloadType { … … 51 56 52 57 virtual PayloadType payloadType() const = 0; 58 59 #if BITSTREAM_EXTRACTION 60 Void setLayerId ( UInt u ) { m_uiLayerId = u; } 61 UInt getLayerId () const { return m_uiLayerId; } 62 #endif 53 63 }; 54 64 -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComLoopFilter.cpp
r28 r48 419 419 UInt uiPartP; 420 420 TComDataCU* pcCUP; 421 UInt uiBs ;421 UInt uiBs = 0; 422 422 423 423 #if MTK_NONCROSS_INLOOP_FILTER -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComPic.cpp
r28 r48 490 490 491 491 Int x, y; 492 Bool bAvailable = true;493 492 Pel* pAvail = getPicYuvAvail()->getLumaAddr ( iCuAddr, uiAbsZorderIdx ); 494 493 Int CUHeight = g_uiMaxCUHeight >> uiPartDepth; //rpcCU->getHeight(uiAbsZorderIdx); -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComPrediction.cpp
r41 r48 1640 1640 1641 1641 #if DEPTH_MAP_GENERATION 1642 Int ref_frame0_idx_1st , ref_frame1_idx_1st;1642 Int ref_frame0_idx_1st = 0, ref_frame1_idx_1st = 0; 1643 1643 TComMv mv0_1st,mv1_1st; 1644 1644 #endif … … 1648 1648 Pel aiUTab[MAX_CU_SIZE]; 1649 1649 Pel aiVTab[MAX_CU_SIZE]; 1650 Pel iULast ;1651 Pel iVLast ;1650 Pel iULast = 0; 1651 Pel iVLast = 0; 1652 1652 Pel iTemp; 1653 1653 -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComSlice.cpp
r46 r48 737 737 } 738 738 739 #if FLEXCO_CAMPARAM_IN_DEPTH 740 Void 741 TComSPS::initMultiviewSPS( UInt uiViewId, Int iViewOrderIdx, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset , Bool bDepth) 742 #else 739 743 Void 740 744 TComSPS::initMultiviewSPS( UInt uiViewId, Int iViewOrderIdx, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 745 #endif 741 746 { 742 747 AOT( uiViewId == 0 && iViewOrderIdx != 0 ); … … 746 751 m_uiViewId = uiViewId; 747 752 m_iViewOrderIdx = iViewOrderIdx; 753 #if FLEXCO_CAMPARAM_IN_DEPTH 754 m_bDepth = bDepth; 755 #else 748 756 m_bDepth = false; 757 #endif 749 758 m_uiCamParPrecision = ( m_uiViewId ? uiCamParPrecision : 0 ); 750 759 m_bCamParInSliceHeader = ( m_uiViewId ? bCamParSlice : false ); -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TComSlice.h
r46 r48 221 221 Int* getPad ( ) { return m_aiPad; } 222 222 223 #if FLEX_CODING_ORDER 224 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0, Bool bDepth = false ); 225 #else 223 226 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 227 #endif 224 228 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); 225 229 -
branches/0.3-poznan-univ/source/Lib/TLibCommon/TypeDef.h
r46 r48 44 44 #define FLEX_CODING_ORDER 1 45 45 46 #define FLEXCO_CAMPARAM_IN_DEPTH FLEX_CODING_ORDER // encode pamera parameters in depth SPS 47 46 48 #define SONY_COLPIC_AVAILABILITY 1 47 49 -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp
r46 r48 255 255 xReadFlag( uiCode ); pcSPS->setUseSAO ( uiCode ? true : false ); 256 256 #endif 257 #if POZNAN_DBMP258 xReadFlag( uiCode ); pcSPS->setDBMP ( uiCode );259 #endif260 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU261 xReadFlag( uiCode ); pcSPS->setUseCUSkip ( uiCode );262 #endif263 257 xReadFlag( uiCode ); // SPS base view flag 264 258 if( uiCode ) … … 271 265 pcSPS->setMultiviewResPredMode ( 0 ); 272 266 #endif 267 #if POZNAN_DBMP 268 pcSPS->setDBMP ( false ); 269 #endif 270 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 271 pcSPS->setUseCUSkip ( false ); 272 #endif 273 273 } 274 274 else 275 275 { 276 #if POZNAN_DBMP 277 xReadFlag( uiCode ); pcSPS->setDBMP ( uiCode ); 278 #endif 279 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 280 xReadFlag( uiCode ); pcSPS->setUseCUSkip ( uiCode ); 281 #endif 276 282 xReadFlag ( uiCode ); // depth flag 277 283 if( uiCode ) 278 284 { 279 xReadUvlc( uiCode ); // view id 285 UInt uiViewId; 286 #if FLEXCO_CAMPARAM_IN_DEPTH 287 UInt uiCamParPrecision; 288 Int iVOI; 289 Bool bCamParSlice; 290 xReadUvlc( uiViewId ); 291 xReadSvlc( iVOI ); 292 if (uiViewId == 0) 293 { 294 pcSPS->initMultiviewSPSDepth ( uiViewId, iVOI ); 295 } 296 else 297 { 298 xReadUvlc( uiCamParPrecision ); 299 xReadFlag( uiCode ); bCamParSlice = ( uiCode == 1 ); 300 if( !bCamParSlice ) 301 { 302 //uiViewId++; 303 for( UInt uiBaseId = 0; uiBaseId < uiViewId; uiBaseId++ ) 304 { 305 xReadSvlc( iCode ); m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode; 306 xReadSvlc( iCode ); m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode; 307 xReadSvlc( iCode ); m_aaiTempScale [ uiViewId ][ uiBaseId ] = iCode - m_aaiTempScale [ uiBaseId ][ uiViewId ]; 308 xReadSvlc( iCode ); m_aaiTempOffset[ uiViewId ][ uiBaseId ] = iCode - m_aaiTempOffset[ uiBaseId ][ uiViewId ]; 309 } 310 } 311 pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset, true); 312 } 313 #else 314 xReadUvlc( uiViewId ); // view id 280 315 xReadSvlc( iCode ); // view order index 281 pcSPS->initMultiviewSPSDepth ( uiCode, iCode ); 316 pcSPS->initMultiviewSPSDepth ( uiViewId, iCode ); 317 #endif 282 318 #if DEPTH_MAP_GENERATION 283 pcSPS->setPredDepthMapGeneration( ui Code, true );319 pcSPS->setPredDepthMapGeneration( uiViewId, true ); 284 320 #endif 285 321 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 2729 2765 #endif 2730 2766 #if POZNAN_DBMP 2731 if(bDBMPAvailable) 2732 { 2733 if(uiIdx==POZNAN_DBMP_MERGE_POS) uiModIdx = POZNAN_DBMP_MRG_CAND; 2734 else if(uiIdx>POZNAN_DBMP_MERGE_POS) uiModIdx = uiIdx--; 2735 else uiModIdx = uiIdx; 2736 } 2737 else uiModIdx = uiIdx; 2738 if( pcCU->getNeighbourCandIdx( uiModIdx, uiAbsPartIdx ) != uiModIdx + 1 ) 2739 { 2740 ruiMergeIndex++; 2741 } 2767 { 2768 if(bDBMPAvailable) 2769 { 2770 if(uiIdx==POZNAN_DBMP_MERGE_POS) uiModIdx = POZNAN_DBMP_MRG_CAND; 2771 else if(uiIdx>POZNAN_DBMP_MERGE_POS) uiModIdx = uiIdx--; 2772 else uiModIdx = uiIdx; 2773 } 2774 else uiModIdx = uiIdx; 2775 2776 if( pcCU->getNeighbourCandIdx( uiModIdx, uiAbsPartIdx ) != uiModIdx + 1 ) 2777 { 2778 ruiMergeIndex++; 2779 } 2780 } 2742 2781 #else 2743 2782 if( pcCU->getNeighbourCandIdx( uiIdx, uiAbsPartIdx ) != uiIdx + 1 ) -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp
r46 r48 169 169 Int64 iTempScale = (Int64)uiDepthValue * iScale; 170 170 #endif 171 Int64 iTestScale = ( iTempScale + iOffset ); // for checking accuracy of camera parameters172 171 Int64 iShiftLuma = ( iTempScale + iOffsetLuma ) >> iLog2DivLuma; 173 172 Int64 iShiftChroma = ( iTempScale + iOffsetChroma ) >> iLog2DivChroma; … … 232 231 233 232 AOF( pcSlice->getSPS()->getViewId() < MAX_NUMBER_VIEWS ); 233 234 234 if ( pcSlice->getSPS()->isDepth () ) 235 235 { … … 238 238 m_cNonlinearDepthModel = pcSlice->getSPS()->getNonlinearDepthModel(); 239 239 #endif 240 #if !FLEX_CODING_ORDER //Owieczka 240 241 return; 241 } 242 #endif 243 } 244 #if !FLEX_CODING_ORDER //Owieczka 242 245 else 246 #endif 243 247 { 244 248 #if POZNAN_NONLINEAR_DEPTH … … 251 255 Bool bFirstSliceInView = ( pcSlice->getSPS()->getViewId() != UInt( m_iLastViewId ) || bFirstSliceInAU ); 252 256 AOT( bFirstSliceInAU && pcSlice->getSPS()->getViewId() != 0 ); 257 #if !FLEX_CODING_ORDER //Owieczka 253 258 AOT( !bFirstSliceInAU && pcSlice->getSPS()->getViewId() < UInt( m_iLastViewId ) ); 254 259 AOT( !bFirstSliceInAU && pcSlice->getSPS()->getViewId() > UInt( m_iLastViewId + 1 ) ); 260 #endif 255 261 AOT( !bFirstAU && pcSlice->getSPS()->getViewId() > m_uiMaxViewId ); 256 262 if ( !bFirstSliceInView ) -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.cpp
r41 r48 39 39 40 40 #include "TEncCavlc.h" 41 #include "../TLibCommon/SEI.h" 41 42 #include "SEIwrite.h" 42 43 … … 228 229 void TEncCavlc::codeSEI(const SEI& sei) 229 230 { 231 #if BITSTREAM_EXTRACTION 232 codeNALUnitHeader( NAL_UNIT_SEI, NAL_REF_IDC_PRIORITY_LOWEST, 0, sei.getLayerId() ); 233 #else 230 234 codeNALUnitHeader(NAL_UNIT_SEI, NAL_REF_IDC_PRIORITY_LOWEST); 235 #endif 231 236 writeSEImessage(*m_pcBitIf, sei); 232 237 } … … 235 240 { 236 241 // uiFirstByte 242 #if BITSTREAM_EXTRACTION 243 codeNALUnitHeader( NAL_UNIT_PPS, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcPPS->getLayerId() ); 244 #else 237 245 codeNALUnitHeader( NAL_UNIT_PPS, NAL_REF_IDC_PRIORITY_HIGHEST ); 246 #endif 238 247 239 248 xWriteUvlc( pcPPS->getPPSId() ); … … 249 258 } 250 259 260 #if BITSTREAM_EXTRACTION 261 Void TEncCavlc::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, UInt uiLayerId ) 262 { 263 // uiFirstByte 264 xWriteCode( 0, 1); // forbidden_zero_flag 265 xWriteCode( eNalRefIdc==0 ? 0:1, 1); // nal_ref_flag 266 xWriteCode( eNalUnitType, 6); // nal_unit_type 267 268 xWriteCode( TemporalId, 3); // temporal_id 269 xWriteCode( uiLayerId+1, 5); // layer_id_plus1 270 } 271 #else 251 272 Void TEncCavlc::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, Bool bOutputFlag ) 252 273 { … … 263 284 } 264 285 } 286 #endif 265 287 266 288 Void TEncCavlc::codeSPS( TComSPS* pcSPS ) 267 289 { 268 290 // uiFirstByte 291 #if BITSTREAM_EXTRACTION 292 codeNALUnitHeader( NAL_UNIT_SPS, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcSPS->getLayerId() ); 293 #else 269 294 codeNALUnitHeader( NAL_UNIT_SPS, NAL_REF_IDC_PRIORITY_HIGHEST ); 295 #endif 270 296 271 297 // Structure … … 326 352 xWriteFlag( pcSPS->getUseSAO() ? 1 : 0); 327 353 #endif 354 if( pcSPS->getViewId() || pcSPS->isDepth() ) 355 { 356 xWriteFlag( 0 ); // inverse of RBSP stop bit (for backwards compatible extension) 328 357 #if POZNAN_DBMP 329 358 xWriteFlag( pcSPS->getDBMP() ); … … 332 361 xWriteFlag( pcSPS->getUseCUSkip() ); 333 362 #endif 334 335 if( pcSPS->getViewId() || pcSPS->isDepth() )336 {337 xWriteFlag( 0 ); // inverse of RBSP stop bit (for backwards compatible extension)338 363 if( pcSPS->isDepth() ) 339 364 { … … 341 366 xWriteUvlc( pcSPS->getViewId() ); 342 367 xWriteSvlc( pcSPS->getViewOrderIdx() ); 368 #if FLEXCO_CAMPARAM_IN_DEPTH 369 if ( pcSPS->getViewId() != 0) 370 { 371 xWriteUvlc( pcSPS->getCamParPrecision() ); 372 xWriteFlag( pcSPS->hasCamParInSliceHeader() ? 1 : 0 ); 373 if( !pcSPS->hasCamParInSliceHeader() ) 374 { 375 for( UInt uiId = 0; uiId < pcSPS->getViewId(); uiId++ ) 376 { 377 xWriteSvlc( pcSPS->getCodedScale ()[ uiId ] ); 378 xWriteSvlc( pcSPS->getCodedOffset ()[ uiId ] ); 379 xWriteSvlc( pcSPS->getInvCodedScale ()[ uiId ] + pcSPS->getCodedScale ()[ uiId ] ); 380 xWriteSvlc( pcSPS->getInvCodedOffset()[ uiId ] + pcSPS->getCodedOffset()[ uiId ] ); 381 } 382 } 383 } 384 #endif 343 385 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 344 386 xWriteFlag( pcSPS->getUseDMM() ? 1 : 0 ); … … 408 450 // here someone can add an appropriated NalRefIdc type 409 451 #if DCM_DECODING_REFRESH 452 #if BITSTREAM_EXTRACTION 453 codeNALUnitHeader (pcSlice->getNalUnitType(), NAL_REF_IDC_PRIORITY_HIGHEST, 1, pcSlice->getLayerId()); 454 #else 410 455 codeNALUnitHeader (pcSlice->getNalUnitType(), NAL_REF_IDC_PRIORITY_HIGHEST, 1, true); 456 #endif 457 #else 458 #if BITSTREAM_EXTRACTION 459 codeNALUnitHeader (NAL_UNIT_CODED_SLICE, NAL_REF_IDC_PRIORITY_HIGHEST, 0, pcSlice->getLayerId()); 411 460 #else 412 461 codeNALUnitHeader (NAL_UNIT_CODED_SLICE, NAL_REF_IDC_PRIORITY_HIGHEST); 462 #endif 413 463 #endif 414 464 … … 784 834 { 785 835 #if POZNAN_DBMP 786 if(bDBMPAvailable)787 {788 if(uiIdx==POZNAN_DBMP_MERGE_POS) uiModIdx = POZNAN_DBMP_MRG_CAND;789 else if(uiIdx>POZNAN_DBMP_MERGE_POS) uiModIdx = uiIdx--;790 else uiModIdx = uiIdx;791 }792 else uiModIdx = uiIdx;793 if( pcCU->getNeighbourCandIdx( uiModIdx, uiAbsPartIdx ) == uiModIdx + 1 )794 {836 if(bDBMPAvailable) 837 { 838 if(uiIdx==POZNAN_DBMP_MERGE_POS) uiModIdx = POZNAN_DBMP_MRG_CAND; 839 else if(uiIdx>POZNAN_DBMP_MERGE_POS) uiModIdx = uiIdx--; 840 else uiModIdx = uiIdx; 841 } 842 else uiModIdx = uiIdx; 843 if( pcCU->getNeighbourCandIdx( uiModIdx, uiAbsPartIdx ) == uiModIdx + 1 ) 844 { 795 845 uiNumCand++; 796 846 } -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.h
r28 r48 206 206 UInt getCoeffCost () { return m_uiCoeffCost; } 207 207 208 #if BITSTREAM_EXTRACTION 209 Void codeNALUnitHeader ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, UInt uiLayerId = 0 ); 210 #else 208 211 Void codeNALUnitHeader ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, Bool bOutputFlag = true ); 212 #endif 209 213 210 214 Void codeSPS ( TComSPS* pcSPS ); -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncCfg.h
r41 r48 187 187 //std::vector<int> m_aiLayerQPOffset; 188 188 189 #if BITSTREAM_EXTRACTION 190 UInt m_uiLayerId; 191 #endif 189 192 UInt m_uiViewId; 190 193 Int m_iViewOrderIdx; … … 257 260 Void setRateGOPSize ( Int i ) { m_iRateGOPSize = i; } 258 261 262 #if BITSTREAM_EXTRACTION 263 Void setLayerId ( UInt u ) { m_uiLayerId = u; } 264 UInt getLayerId ( ) { return m_uiLayerId; } 265 #endif 259 266 Void setViewId ( UInt u ) { m_uiViewId = u; } 260 267 Void setViewOrderIdx ( Int i ) { m_iViewOrderIdx = i; } -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncEntropy.h
r5 r48 72 72 virtual UInt getCoeffCost () = 0; 73 73 74 #if BITSTREAM_EXTRACTION 75 virtual Void codeNALUnitHeader ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, UInt uiLayerId = 0 ) = 0; 76 #else 74 77 virtual Void codeNALUnitHeader ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, Bool bOutputFlag = true ) = 0; 78 #endif 75 79 76 80 virtual Void codeSPS ( TComSPS* pcSPS ) = 0; -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncGOP.cpp
r41 r48 658 658 seiBs.create(1024); 659 659 /* write the SEI messages */ 660 #if BITSTREAM_EXTRACTION 661 sei_recon_picture_digest.setLayerId( pcSlice->getLayerId() ); 662 #endif 660 663 m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice); 661 664 m_pcEntropyCoder->setBitstream(&seiBs); -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSbac.cpp
r41 r48 177 177 } 178 178 179 #if BITSTREAM_EXTRACTION 180 Void TEncSbac::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, UInt uiLayerId ) 181 #else 179 182 Void TEncSbac::codeNALUnitHeader( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId, Bool bOutputFlag ) 183 #endif 180 184 { 181 185 assert (0); -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSbac.h
r28 r48 89 89 //--SBAC RD 90 90 91 #if BITSTREAM_EXTRACTION 92 Void codeNALUnitHeader ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, UInt uiLayerId = 0 ); 93 #else 91 94 Void codeNALUnitHeader ( NalUnitType eNalUnitType, NalRefIdc eNalRefIdc, UInt TemporalId = 0, Bool bOutputFlag = true ); 95 #endif 92 96 93 97 Void codeSPS ( TComSPS* pcSPS ); -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncSlice.cpp
r21 r48 149 149 rpcSlice->initSlice(); 150 150 rpcSlice->setPOC( pcPic->getPOC() ); 151 #if BITSTREAM_EXTRACTION 152 rpcSlice->setLayerId( m_pcCfg->getLayerId() ); 153 #endif 151 154 #if SONY_COLPIC_AVAILABILITY 152 155 rpcSlice->setViewOrderIdx(m_pcCfg->getViewOrderIdx()); -
branches/0.3-poznan-univ/source/Lib/TLibEncoder/TEncTop.cpp
r41 r48 576 576 m_cSPS.setMaxTrSize ( 1 << m_uiQuadtreeTULog2MaxSize ); 577 577 578 #if BITSTREAM_EXTRACTION 579 m_cSPS.setLayerId( m_uiLayerId ); 580 #endif 581 578 582 if( m_bIsDepth ) 579 583 { 584 #if FLEXCO_CAMPARAM_IN_DEPTH 585 //m_cSPS.initMultiviewSPSDepth ( m_uiViewId, m_iViewOrderIdx ); 586 m_cSPS.initMultiviewSPS ( m_uiViewId, m_iViewOrderIdx, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset, true ); 587 #else 580 588 m_cSPS.initMultiviewSPSDepth ( m_uiViewId, m_iViewOrderIdx ); 589 #endif 581 590 #if DEPTH_MAP_GENERATION 582 591 m_cSPS.setPredDepthMapGeneration( m_uiViewId, true ); … … 654 663 m_cSPS.setUseDMM( m_bUseDMM ); 655 664 #endif 665 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER 666 m_cSPS.setUseDMM34( m_bUseDMM34 ); 667 #endif 656 668 #if HHI_MPI 657 669 m_cSPS.setUseMVI( m_bUseMVI ); … … 678 690 Void TEncTop::xInitPPS() 679 691 { 692 #if BITSTREAM_EXTRACTION 693 m_cPPS.setLayerId( m_uiLayerId ); 694 #endif 695 680 696 m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred ); 681 697 m_cPPS.setPPSId( ( m_uiViewId << 1 ) + ( m_bIsDepth ? 1 : 0 ) );
Note: See TracChangeset for help on using the changeset viewer.