Changeset 288 in SHVCSoftware for branches/SHM-2.1-dev/source
- Timestamp:
- 12 Jun 2013, 03:37:28 (12 years ago)
- Location:
- branches/SHM-2.1-dev/source
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r282 r288 345 345 #endif 346 346 #if SCALED_REF_LAYER_OFFSETS 347 Int* cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 348 Int* cfg_scaledRefLayerTopOffset [MAX_LAYERS]; 349 Int* cfg_scaledRefLayerRightOffset [MAX_LAYERS]; 350 Int* cfg_scaledRefLayerBottomOffset [MAX_LAYERS]; 347 string cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 348 string cfg_scaledRefLayerTopOffset [MAX_LAYERS]; 349 string cfg_scaledRefLayerRightOffset [MAX_LAYERS]; 350 string cfg_scaledRefLayerBottomOffset [MAX_LAYERS]; 351 Int* cfg_numScaledRefLayerOffsets[MAX_LAYERS]; 352 353 string* cfg_scaledRefLayerLeftOffsetPtr [MAX_LAYERS]; 354 string* cfg_scaledRefLayerTopOffsetPtr [MAX_LAYERS]; 355 string* cfg_scaledRefLayerRightOffsetPtr [MAX_LAYERS]; 356 string* cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS]; 351 357 #endif 352 358 #if RC_SHVC_HARMONIZATION … … 376 382 #endif 377 383 #if SCALED_REF_LAYER_OFFSETS 378 cfg_scaledRefLayerLeftOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerLeftOffset; 379 cfg_scaledRefLayerTopOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerTopOffset; 380 cfg_scaledRefLayerRightOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerRightOffset; 381 cfg_scaledRefLayerBottomOffset[layer] = &m_acLayerCfg[layer].m_scaledRefLayerBottomOffset; 384 cfg_numScaledRefLayerOffsets [layer] = &m_acLayerCfg[layer].m_numScaledRefLayerOffsets; 385 for(Int i = 0; i < MAX_LAYERS; i++) 386 { 387 cfg_scaledRefLayerLeftOffsetPtr [layer] = &cfg_scaledRefLayerLeftOffset[layer] ; 388 cfg_scaledRefLayerTopOffsetPtr [layer] = &cfg_scaledRefLayerTopOffset[layer] ; 389 cfg_scaledRefLayerRightOffsetPtr [layer] = &cfg_scaledRefLayerRightOffset[layer] ; 390 cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer]; 391 } 382 392 #endif 383 393 #if RC_SHVC_HARMONIZATION … … 452 462 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 453 463 #if SCALED_REF_LAYER_OFFSETS 454 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffset, 0, MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" 464 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets, 0, MAX_LAYERS, "Number of scaled offset layer sets ") 465 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" 455 466 " top-left luma sample of the EL picture, in units of two luma samples") 456 ("ScaledRefLayerTopOffset%d", cfg_scaledRefLayerTopOffset , 0, MAX_LAYERS, "Vertical offset of top-left luma sample of scaled base layer picture with respect to"467 ("ScaledRefLayerTopOffset%d", cfg_scaledRefLayerTopOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of top-left luma sample of scaled base layer picture with respect to" 457 468 " top-left luma sample of the EL picture, in units of two luma samples") 458 ("ScaledRefLayerRightOffset%d", cfg_scaledRefLayerRightOffset , 0, MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to"469 ("ScaledRefLayerRightOffset%d", cfg_scaledRefLayerRightOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to" 459 470 " bottom-right luma sample of the EL picture, in units of two luma samples") 460 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffset ,0, MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to"471 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 461 472 " bottom-right luma sample of the EL picture, in units of two luma samples") 462 473 #endif … … 892 903 m_pRowHeight = NULL; 893 904 } 905 #if SCALED_REF_LAYER_OFFSETS 906 for(Int layer = 0; layer < MAX_LAYERS; layer++) 907 { 908 // If number of scaled ref. layer offsets is non-zero, at least one of the offsets should be specified 909 if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets) 910 { 911 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") || 912 strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") || 913 strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(), "") || 914 strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") 915 ); 916 } 917 918 Int *tempArray = NULL; // Contain the value 919 // Left offset // 920 if(strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "")) 921 { 922 cfgStringToArray( &tempArray, cfg_scaledRefLayerLeftOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "LeftOffset"); 923 if(tempArray) 924 { 925 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 926 { 927 m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i] = tempArray[i]; 928 } 929 delete [] tempArray; tempArray = NULL; 930 } 931 } 932 933 // Top offset // 934 if(strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(), "")) 935 { 936 cfgStringToArray( &tempArray, cfg_scaledRefLayerTopOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "TopOffset"); 937 if(tempArray) 938 { 939 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 940 { 941 m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i] = tempArray[i]; 942 } 943 delete [] tempArray; tempArray = NULL; 944 } 945 } 946 947 // Right offset // 948 if(strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "")) 949 { 950 cfgStringToArray( &tempArray, cfg_scaledRefLayerRightOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RightOffset"); 951 if(tempArray) 952 { 953 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 954 { 955 m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i] = tempArray[i]; 956 } 957 delete [] tempArray; tempArray = NULL; 958 } 959 } 960 961 // Bottom offset // 962 if(strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(), "")) 963 { 964 cfgStringToArray( &tempArray, cfg_scaledRefLayerBottomOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "BottomOffset"); 965 if(tempArray) 966 { 967 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 968 { 969 m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i] = tempArray[i]; 970 } 971 delete [] tempArray; tempArray = NULL; 972 } 973 } 974 } 975 #endif 894 976 #if VPS_EXTN_DIRECT_REF_LAYERS 895 977 for(Int layer = 0; layer < MAX_LAYERS; layer++) … … 2096 2178 } 2097 2179 2180 #if SCALED_REF_LAYER_OFFSETS 2181 Void TAppEncCfg::cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString) 2182 { 2183 Char *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str()); 2184 if( numEntries > 0 ) 2185 { 2186 Char *arrayEntry; 2187 Int i = 0; 2188 *arr = new Int[numEntries]; 2189 2190 arrayEntry = strtok( tempChar, " ,"); 2191 while(arrayEntry != NULL) 2192 { 2193 if( i >= numEntries ) 2194 { 2195 printf( "%c: The number of entries specified is larger than the allowed number.\n", logString ); 2196 exit( EXIT_FAILURE ); 2197 } 2198 *( *arr + i ) = atoi( arrayEntry ); 2199 arrayEntry = strtok(NULL, " ,"); 2200 i++; 2201 } 2202 if( i < numEntries ) 2203 { 2204 printf( "%c: Some entries are not specified.\n", logString ); 2205 exit( EXIT_FAILURE ); 2206 } 2207 } 2208 else 2209 { 2210 *arr = NULL; 2211 } 2212 } 2213 #endif 2098 2214 //! \} -
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.h
r245 r288 390 390 Char* getBLSyntaxFile() { return m_BLSyntaxFile; } 391 391 #endif 392 #if SCALED_REF_LAYER_OFFSETS 393 Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString); 394 #endif 392 395 #endif 393 396 };// END CLASS DEFINITION TAppEncCfg -
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r211 r288 35 35 m_confLeft = m_confRight = m_confTop = m_confBottom = 0; 36 36 m_aiPad[1] = m_aiPad[0] = 0; 37 #if SCALED_REF_LAYER_OFFSETS 38 m_numScaledRefLayerOffsets = 0; 39 ::memset(m_scaledRefLayerLeftOffset, 0, sizeof(m_scaledRefLayerLeftOffset)); 40 ::memset(m_scaledRefLayerTopOffset, 0, sizeof(m_scaledRefLayerTopOffset)); 41 ::memset(m_scaledRefLayerRightOffset, 0, sizeof(m_scaledRefLayerRightOffset)); 42 ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset)); 43 #endif 37 44 } 38 45 -
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r282 r288 68 68 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 69 69 #if SCALED_REF_LAYER_OFFSETS 70 Int m_scaledRefLayerLeftOffset; 71 Int m_scaledRefLayerTopOffset; 72 Int m_scaledRefLayerRightOffset; 73 Int m_scaledRefLayerBottomOffset; 70 Int m_numScaledRefLayerOffsets ; 71 Int m_scaledRefLayerLeftOffset [MAX_LAYERS]; 72 Int m_scaledRefLayerTopOffset [MAX_LAYERS]; 73 Int m_scaledRefLayerRightOffset [MAX_LAYERS]; 74 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 74 75 #endif 75 76 public: -
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r282 r288 451 451 if( layer > 0 ) 452 452 { 453 m_acTEncTop[layer].getScaledRefLayerWindow().setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset, 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset, 454 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset, 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset); 453 m_acTEncTop[layer].setNumScaledRefLayerOffsets( m_acLayerCfg[layer].m_numScaledRefLayerOffsets ); 454 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 455 { 456 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 457 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 458 } 455 459 } 456 460 #endif -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComDataCU.cpp
r282 r288 4270 4270 #if SIMPLIFIED_MV_POS_SCALING 4271 4271 #if SCALED_REF_LAYER_OFFSETS 4272 Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow( ).getWindowLeftOffset();4273 Int topStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow( ).getWindowTopOffset();4272 Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); 4273 Int topStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 4274 4274 Int iBX = ((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16; 4275 4275 Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r282 r288 580 580 { 581 581 Int numResampler = 0; 582 const Window &scalEL = getSPS()->getScaledRefLayerWindow( );582 const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 583 583 Int scalingOffset = ((scalEL.getWindowLeftOffset() == 0 ) && 584 584 (scalEL.getWindowRightOffset() == 0 ) && … … 1765 1765 #if SVC_EXTENSION 1766 1766 , m_layerId(0) 1767 #endif 1768 #if SCALED_REF_LAYER_OFFSETS 1769 , m_numScaledRefLayerOffsets (0) 1767 1770 #endif 1768 1771 { -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h
r282 r288 1029 1029 #endif 1030 1030 #if SCALED_REF_LAYER_OFFSETS 1031 Window m_scaledRefLayerWindow; 1031 UInt m_numScaledRefLayerOffsets; 1032 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1032 1033 #endif 1033 1034 public: … … 1171 1172 #endif 1172 1173 #if SCALED_REF_LAYER_OFFSETS 1173 Window& getScaledRefLayerWindow( ) { return m_scaledRefLayerWindow; } 1174 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1175 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 1176 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 1174 1177 #endif 1175 1178 }; -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h
r285 r288 45 45 #if SVC_EXTENSION 46 46 #define SPS_EXTENSION 1 ///< Define sps_extension() syntax structure 47 #define SCALED_REF_LAYER_OFFSET_FLAG 1///< M0309: Signal scaled reference layer offsets in SPS47 #define SCALED_REF_LAYER_OFFSET_FLAG 0 ///< M0309: Signal scaled reference layer offsets in SPS 48 48 #define SCALED_REF_LAYER_OFFSETS 1 ///< M0309: Signal scaled reference layer offsets in SPS 49 49 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r245 r288 764 764 #endif 765 765 { 766 Int iCode; 767 Window& scaledWindow = pcSPS->getScaledRefLayerWindow(); 768 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1); 769 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1); 770 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1); 771 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1); 766 Int iCode; 767 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets(uiCode); 768 for(Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets(); i++) 769 { 770 Window& scaledWindow = pcSPS->getScaledRefLayerWindow(i); 771 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1); 772 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1); 773 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1); 774 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1); 775 } 772 776 } 773 777 #endif -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r282 r288 255 255 for(UInt i = 0; i < pcSlice->getVPS()->getNumDirectRefLayers( m_layerId ); i++ ) 256 256 { 257 const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow( );257 const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(i); 258 258 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 259 259 … … 865 865 #if SIMPLIFIED_MV_POS_SCALING 866 866 #if SCALED_REF_LAYER_OFFSETS 867 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow( );867 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 868 868 869 869 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(); … … 893 893 { 894 894 #if SCALED_REF_LAYER_OFFSETS 895 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow( ) );895 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) ); 896 896 #else 897 897 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() ); -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r282 r288 584 584 #endif 585 585 { 586 Window scaledWindow = pcSPS->getScaledRefLayerWindow(); 587 WRITE_SVLC( scaledWindow.getWindowLeftOffset() >> 1, "scaled_ref_layer_left_offset" ); 588 WRITE_SVLC( scaledWindow.getWindowTopOffset() >> 1, "scaled_ref_layer_top_offset" ); 589 WRITE_SVLC( scaledWindow.getWindowRightOffset() >> 1, "scaled_ref_layer_right_offset" ); 590 WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" ); 586 WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets(), "num_scaled_ref_layer_offsets" ); 587 for(Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets(); i++) 588 { 589 Window scaledWindow = pcSPS->getScaledRefLayerWindow(i); 590 WRITE_SVLC( scaledWindow.getWindowLeftOffset() >> 1, "scaled_ref_layer_left_offset" ); 591 WRITE_SVLC( scaledWindow.getWindowTopOffset() >> 1, "scaled_ref_layer_top_offset" ); 592 WRITE_SVLC( scaledWindow.getWindowRightOffset() >> 1, "scaled_ref_layer_right_offset" ); 593 WRITE_SVLC( scaledWindow.getWindowBottomOffset() >> 1, "scaled_ref_layer_bottom_offset" ); 594 } 591 595 } 592 596 #endif -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r282 r288 547 547 #if SIMPLIFIED_MV_POS_SCALING 548 548 #if SCALED_REF_LAYER_OFFSETS 549 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow( );549 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc); 550 550 551 551 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(); … … 575 575 { 576 576 #if SCALED_REF_LAYER_OFFSETS 577 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow( ) );577 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc) ); 578 578 #else 579 579 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec() ); -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r282 r288 89 89 m_bMFMEnabledFlag = false; 90 90 #endif 91 #if SCALED_REF_LAYER_OFFSETS 92 m_numScaledRefLayerOffsets = 0; 93 #endif 91 94 } 92 95 … … 509 512 for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 510 513 { 511 const Window scalEL = getSPS()->getScaledRefLayerWindow( );514 const Window scalEL = getSPS()->getScaledRefLayerWindow(i); 512 515 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 513 516 … … 546 549 for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 547 550 { 548 const Window scalEL = getSPS()->getScaledRefLayerWindow( );551 const Window scalEL = getSPS()->getScaledRefLayerWindow(i); 549 552 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 550 553 … … 599 602 #endif 600 603 #if SCALED_REF_LAYER_OFFSETS 601 m_cSPS.getScaledRefLayerWindow() = m_scaledRefLayerWindow; 604 m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 605 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++) 606 { 607 m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i]; 608 } 602 609 #endif 603 610 ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL(); -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.h
r250 r288 140 140 #endif 141 141 #if SCALED_REF_LAYER_OFFSETS 142 Window m_scaledRefLayerWindow; 142 UInt m_numScaledRefLayerOffsets; 143 Window m_scaledRefLayerWindow[MAX_LAYERS]; 143 144 #endif 144 145 protected: … … 207 208 #endif 208 209 #if SCALED_REF_LAYER_OFFSETS 209 Window& getScaledRefLayerWindow() { return m_scaledRefLayerWindow; } 210 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 211 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 212 Window& getScaledRefLayerWindow(Int x) { return m_scaledRefLayerWindow[x]; } 210 213 #endif 211 214
Note: See TracChangeset for help on using the changeset viewer.