- Timestamp:
- 25 Nov 2013, 17:32:16 (11 years ago)
- Location:
- branches/SHM-4.1-dev
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/cfg/per-sequence-svc/BQTerrace-2x.cfg
r494 r507 23 23 ConformanceMode1 : 1 # conformance mode 24 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 25 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 26 27 QP1 : 20 -
branches/SHM-4.1-dev/cfg/per-sequence-svc/BasketballDrive-2x.cfg
r494 r507 23 23 ConformanceMode1 : 1 # conformance mode 24 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 25 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 26 27 QP1 : 20 -
branches/SHM-4.1-dev/cfg/per-sequence-svc/Cactus-2x.cfg
r494 r507 23 23 ConformanceMode1 : 1 # conformance mode 24 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 25 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 26 27 QP1 : 20 -
branches/SHM-4.1-dev/cfg/per-sequence-svc/Kimono-2x.cfg
r494 r507 23 23 ConformanceMode1 : 1 # conformance mode 24 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 25 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 26 27 QP1 : 20 -
branches/SHM-4.1-dev/cfg/per-sequence-svc/ParkScene-2x.cfg
r494 r507 23 23 ConformanceMode1 : 1 # conformance mode 24 24 NumScaledRefLayerOffsets1 : 1 # Number of scaled entry offsets for this layer 25 ScaledRefLayerId1 : 0 # Scaled reference layer ID 25 26 ScaledRefLayerBottomOffset1 : -4 # offset for spatial alignment of the base and enhancement layers 26 27 QP1 : 20 -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r494 r507 399 399 string* cfg_predLayerIdsPtr [MAX_LAYERS]; 400 400 #endif 401 #if O0098_SCALED_REF_LAYER_ID 402 string cfg_scaledRefLayerId [MAX_LAYERS]; 403 #endif 401 404 string cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 402 405 string cfg_scaledRefLayerTopOffset [MAX_LAYERS]; … … 405 408 Int* cfg_numScaledRefLayerOffsets[MAX_LAYERS]; 406 409 410 #if O0098_SCALED_REF_LAYER_ID 411 string* cfg_scaledRefLayerIdPtr [MAX_LAYERS]; 412 #endif 407 413 string* cfg_scaledRefLayerLeftOffsetPtr [MAX_LAYERS]; 408 414 string* cfg_scaledRefLayerTopOffsetPtr [MAX_LAYERS]; … … 471 477 for(Int i = 0; i < MAX_LAYERS; i++) 472 478 { 479 #if O0098_SCALED_REF_LAYER_ID 480 cfg_scaledRefLayerIdPtr [layer] = &cfg_scaledRefLayerId[layer] ; 481 #endif 473 482 cfg_scaledRefLayerLeftOffsetPtr [layer] = &cfg_scaledRefLayerLeftOffset[layer] ; 474 483 cfg_scaledRefLayerTopOffsetPtr [layer] = &cfg_scaledRefLayerTopOffset[layer] ; … … 582 591 #endif 583 592 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets, 0, MAX_LAYERS, "Number of scaled offset layer sets ") 593 #if O0098_SCALED_REF_LAYER_ID 594 ("ScaledRefLayerId%d", cfg_scaledRefLayerIdPtr, string(""), MAX_LAYERS, "Layer ID of scaled base layer picture") 595 #endif 584 596 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" 585 597 " top-left luma sample of the EL picture, in units of two luma samples") … … 1086 1098 if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets) 1087 1099 { 1100 #if O0098_SCALED_REF_LAYER_ID 1101 assert( strcmp(cfg_scaledRefLayerId[layer].c_str(), "")); 1102 #endif 1088 1103 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") || 1089 1104 strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") || … … 1094 1109 1095 1110 Int *tempArray = NULL; // Contain the value 1111 1112 #if O0098_SCALED_REF_LAYER_ID 1113 // ID // 1114 if(strcmp(cfg_scaledRefLayerId[layer].c_str(), "")) 1115 { 1116 cfgStringToArray( &tempArray, cfg_scaledRefLayerId[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "ScaledRefLayerId"); 1117 if(tempArray) 1118 { 1119 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1120 { 1121 m_acLayerCfg[layer].m_scaledRefLayerId[i] = tempArray[i]; 1122 } 1123 delete [] tempArray; tempArray = NULL; 1124 } 1125 } 1126 #endif 1127 1096 1128 // Left offset // 1097 1129 if(strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "")) -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r494 r507 53 53 m_aiPad[1] = m_aiPad[0] = 0; 54 54 m_numScaledRefLayerOffsets = 0; 55 #if O0098_SCALED_REF_LAYER_ID 56 ::memset(m_scaledRefLayerId, 0, sizeof(m_scaledRefLayerId)); 57 #endif 55 58 ::memset(m_scaledRefLayerLeftOffset, 0, sizeof(m_scaledRefLayerLeftOffset)); 56 59 ::memset(m_scaledRefLayerTopOffset, 0, sizeof(m_scaledRefLayerTopOffset)); -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r494 r507 95 95 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 96 96 Int m_numScaledRefLayerOffsets ; 97 #if O0098_SCALED_REF_LAYER_ID 98 Int m_scaledRefLayerId [MAX_LAYERS]; 99 #endif 97 100 Int m_scaledRefLayerLeftOffset [MAX_LAYERS]; 98 101 Int m_scaledRefLayerTopOffset [MAX_LAYERS]; -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r503 r507 605 605 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 606 606 { 607 #if O0098_SCALED_REF_LAYER_ID 608 m_acTEncTop[layer].setScaledRefLayerId(i, m_acLayerCfg[layer].m_scaledRefLayerId[i]); 609 #endif 607 610 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 608 611 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComDataCU.cpp
r494 r507 4028 4028 #endif 4029 4029 4030 #if O0098_SCALED_REF_LAYER_ID 4031 Int leftStartL = getSlice()->getSPS()->getScaledRefLayerWindowForLayer(getSlice()->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset(); 4032 Int topStartL = getSlice()->getSPS()->getScaledRefLayerWindowForLayer(getSlice()->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset(); 4033 #else 4030 4034 Int leftStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); 4031 4035 Int topStartL = this->getSlice()->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 4036 #endif 4032 4037 Int iBX = ((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16; 4033 4038 Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r504 r507 522 522 memset( refResamplingLayer, 0, sizeof( refResamplingLayer ) ); 523 523 #endif 524 #if !RESAMPLING_CONSTRAINT_BUG_FIX 524 525 const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 525 526 Int scalingOffset = ((scalEL.getWindowLeftOffset() == 0 ) && … … 528 529 (scalEL.getWindowBottomOffset() == 0 ) 529 530 ); 531 #endif 530 532 531 533 for( i=0; i < m_activeNumILRRefIdx; i++ ) 532 534 { 533 535 UInt refLayerIdc = m_interLayerPredLayerIdc[i]; 536 #if RESAMPLING_CONSTRAINT_BUG_FIX 537 #if O0098_SCALED_REF_LAYER_ID 538 const Window &scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_pcVPS->getRefLayerId( m_layerId, m_interLayerPredLayerIdc[i] )); 539 #else 540 const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 541 #endif 542 Int scalingOffset = ((scalEL.getWindowLeftOffset() == 0 ) && 543 (scalEL.getWindowRightOffset() == 0 ) && 544 (scalEL.getWindowTopOffset() == 0 ) && 545 (scalEL.getWindowBottomOffset() == 0 ) 546 ); 547 #endif 534 548 if(!( g_posScalingFactor[refLayerIdc][0] == 65536 && g_posScalingFactor[refLayerIdc][1] == 65536 ) || (!scalingOffset)) // ratio 1x 535 549 { … … 2470 2484 const Int TComSPS::m_winUnitY[]={1,2,1,1}; 2471 2485 2486 #if O0098_SCALED_REF_LAYER_ID 2487 Window& TComSPS::getScaledRefLayerWindowForLayer(Int layerId) 2488 { 2489 static Window win; 2490 2491 for (Int i = 0; i < m_numScaledRefLayerOffsets; i++) 2492 { 2493 if (layerId == m_scaledRefLayerId[i]) 2494 { 2495 return m_scaledRefLayerWindow[i]; 2496 } 2497 } 2498 2499 win.resetWindow(); // scaled reference layer offsets are inferred to be zero when not present 2500 return win; 2501 } 2502 #endif 2503 2472 2504 TComPPS::TComPPS() 2473 2505 : m_PPSId (0) -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r504 r507 1227 1227 #endif 1228 1228 UInt m_numScaledRefLayerOffsets; 1229 #if O0098_SCALED_REF_LAYER_ID 1230 UInt m_scaledRefLayerId[MAX_LAYERS]; 1231 #endif 1229 1232 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1230 1233 #if REPN_FORMAT_IN_VPS … … 1412 1415 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1413 1416 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 1417 #if O0098_SCALED_REF_LAYER_ID 1418 UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } 1419 Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } 1420 Window& getScaledRefLayerWindowForLayer( Int layerId ); 1421 #endif 1414 1422 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 1415 1423 #if REPN_FORMAT_IN_VPS -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r504 r507 175 175 #define O0096_REP_FORMAT_INDEX 1 ///< JCTVC-O0096: identify SPS rep_format() with an index into the lists of formats in VPS extension. 176 176 #define O0096_DEFAULT_DEPENDENCY_TYPE 1 ///< JCTVC-O0096: specify default dependency type for all direct reference layers 177 178 #define RESAMPLING_CONSTRAINT_BUG_FIX 1 179 #define O0098_SCALED_REF_LAYER_ID 1 ///< JCTVC-O0098: signal scaled reference id 177 180 178 181 #else -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r505 r507 861 861 { 862 862 Window& scaledWindow = pcSPS->getScaledRefLayerWindow(i); 863 #if O0098_SCALED_REF_LAYER_ID 864 READ_CODE( 6, uiCode, "scaled_ref_layer_left_id" ); pcSPS->setScaledRefLayerId( i, uiCode ); 865 #endif 863 866 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1); 864 867 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1); -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r494 r507 278 278 for(UInt i = 0; i < pcSlice->getVPS()->getNumDirectRefLayers( m_layerId ); i++ ) 279 279 { 280 #if O0098_SCALED_REF_LAYER_ID 281 const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, i)); 282 #else 280 283 const Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(i); 284 #endif 281 285 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 282 286 … … 1194 1198 #endif 1195 1199 1200 #if O0098_SCALED_REF_LAYER_ID 1201 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 1202 #else 1196 1203 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 1204 #endif 1197 1205 1198 1206 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(); … … 1211 1219 if( pcPic->isSpatialEnhLayer(refLayerIdc) ) 1212 1220 { 1221 #if O0098_SCALED_REF_LAYER_ID 1222 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 1223 #else 1224 Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 1225 #endif 1213 1226 #if O0215_PHASE_ALIGNMENT 1214 1227 #if O0194_JOINT_US_BITSHIFT 1215 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );1216 #else 1217 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );1228 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL, pcSlice->getVPS()->getPhaseAlignFlag() ); 1229 #else 1230 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL, pcSlice->getVPS()->getPhaseAlignFlag() ); 1218 1231 #endif 1219 1232 #else 1220 1233 #if O0194_JOINT_US_BITSHIFT 1221 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc));1222 #else 1223 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc));1234 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL ); 1235 #else 1236 m_cPrediction.upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL ); 1224 1237 #endif 1225 1238 #endif -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r506 r507 684 684 { 685 685 Window scaledWindow = pcSPS->getScaledRefLayerWindow(i); 686 #if O0098_SCALED_REF_LAYER_ID 687 WRITE_CODE( pcSPS->getScaledRefLayerId(i), 6, "scaled_ref_layer_id" ); 688 #endif 686 689 WRITE_SVLC( scaledWindow.getWindowLeftOffset() >> 1, "scaled_ref_layer_left_offset" ); 687 690 WRITE_SVLC( scaledWindow.getWindowTopOffset() >> 1, "scaled_ref_layer_top_offset" ); -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r506 r507 783 783 } 784 784 785 #if O0098_SCALED_REF_LAYER_ID 786 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 787 #else 785 788 const Window &scalEL = m_pcEncTop->getScaledRefLayerWindow(refLayerIdc); 789 #endif 786 790 787 791 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(); … … 800 804 if( pcPic->isSpatialEnhLayer(refLayerIdc)) 801 805 { 806 #if O0098_SCALED_REF_LAYER_ID 807 Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 808 #else 809 Window scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 810 #endif 802 811 #if O0215_PHASE_ALIGNMENT 803 812 #if O0194_JOINT_US_BITSHIFT 804 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );805 #else 806 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );813 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL, pcSlice->getVPS()->getPhaseAlignFlag() ); 814 #else 815 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL, pcSlice->getVPS()->getPhaseAlignFlag() ); 807 816 #endif 808 817 #else 809 818 #if O0194_JOINT_US_BITSHIFT 810 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc));811 #else 812 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc));819 m_pcPredSearch->upsampleBasePic( pcSlice, refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL ); 820 #else 821 m_pcPredSearch->upsampleBasePic( refLayerIdc, pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), pcPic->getPicYuvRec(), scalEL ); 813 822 #endif 814 823 #endif -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r506 r507 791 791 for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 792 792 { 793 #if O0098_SCALED_REF_LAYER_ID 794 const Window scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); 795 #else 793 796 const Window scalEL = getSPS()->getScaledRefLayerWindow(i); 797 #endif 794 798 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 795 799 … … 842 846 for(UInt i = 0; i < m_cVPS.getNumDirectRefLayers( m_layerId ); i++ ) 843 847 { 848 #if O0098_SCALED_REF_LAYER_ID 849 const Window scalEL = getSPS()->getScaledRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); 850 #else 844 851 const Window scalEL = getSPS()->getScaledRefLayerWindow(i); 852 #endif 845 853 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); 846 854 … … 912 920 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++) 913 921 { 922 #if O0098_SCALED_REF_LAYER_ID 923 m_cSPS.setScaledRefLayerId(i, m_scaledRefLayerId[i]); 924 #endif 914 925 m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i]; 915 926 } … … 1683 1694 } 1684 1695 #endif 1696 1697 #if O0098_SCALED_REF_LAYER_ID 1698 Window& TEncTop::getScaledRefLayerWindowForLayer(Int layerId) 1699 { 1700 static Window win; 1701 1702 for (Int i = 0; i < m_numScaledRefLayerOffsets; i++) 1703 { 1704 if (layerId == m_scaledRefLayerId[i]) 1705 { 1706 return m_scaledRefLayerWindow[i]; 1707 } 1708 } 1709 1710 win.resetWindow(); // scaled reference layer offsets are inferred to be zero when not present 1711 return win; 1712 } 1713 #endif 1714 1685 1715 #endif //SVC_EXTENSION 1686 1716 //! \} -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.h
r494 r507 141 141 #endif 142 142 UInt m_numScaledRefLayerOffsets; 143 #if O0098_SCALED_REF_LAYER_ID 144 UInt m_scaledRefLayerId[MAX_LAYERS]; 145 #endif 143 146 Window m_scaledRefLayerWindow[MAX_LAYERS]; 144 147 #if POC_RESET_FLAG … … 209 212 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 210 213 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 214 #if O0098_SCALED_REF_LAYER_ID 215 Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } 216 UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } 217 Window& getScaledRefLayerWindowForLayer(Int layerId); 218 #endif 211 219 Window& getScaledRefLayerWindow(Int x) { return m_scaledRefLayerWindow[x]; } 212 220 #endif //SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.