Changeset 869 in SHVCSoftware
- Timestamp:
- 14 Aug 2014, 00:00:45 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r868 r869 181 181 repFormat->setBitDepthVpsChroma ( getInternalBitDepthC() ); // Need modification to change for each layer 182 182 #endif 183 184 #if R0156_CONF_WINDOW_IN_REP_FORMAT 185 repFormat->getConformanceWindowVps().setWindow( 186 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinLeft, 187 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinRight, 188 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinTop, 189 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinBottom ); 190 #endif 191 183 192 #if HIGHER_LAYER_IRAP_SKIP_FLAG 184 193 m_acTEncTop[mapIdxToLayer[idx]].setSkipPictureAtArcSwitch( m_skipPictureAtArcSwitch ); -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r827 r869 84 84 if (!bIsVirtual) 85 85 { 86 #if R0156_CONF_WINDOW_IN_REP_FORMAT 87 #if AUXILIARY_PICTURES 88 m_apcPicYuv[0] = new TComPicYuv; m_apcPicYuv[0]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 89 #else 90 m_apcPicYuv[0] = new TComPicYuv; m_apcPicYuv[0]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 91 #endif 92 #else 86 93 #if AUXILIARY_PICTURES 87 94 m_apcPicYuv[0] = new TComPicYuv; m_apcPicYuv[0]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); … … 89 96 m_apcPicYuv[0] = new TComPicYuv; m_apcPicYuv[0]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); 90 97 #endif 91 } 98 #endif 99 } 100 #if R0156_CONF_WINDOW_IN_REP_FORMAT 101 #if AUXILIARY_PICTURES 102 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 103 #else 104 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 105 #endif 106 #else 92 107 #if AUXILIARY_PICTURES 93 108 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); … … 95 110 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); 96 111 #endif 112 #endif 97 113 98 114 for( Int i = 0; i < MAX_LAYERS; i++ ) … … 100 116 if( m_bSpatialEnhLayer[i] ) 101 117 { 118 #if R0156_CONF_WINDOW_IN_REP_FORMAT 119 #if AUXILIARY_PICTURES 120 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 121 #else 122 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 123 #endif 124 #else 102 125 #if AUXILIARY_PICTURES 103 126 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); 104 127 #else 105 128 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); 129 #endif 106 130 #endif 107 131 } -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.cpp
r856 r869 69 69 70 70 #if SVC_EXTENSION 71 #if R0156_CONF_WINDOW_IN_REP_FORMAT 72 #if AUXILIARY_PICTURES 73 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, Window* conformanceWindow ) 74 #else 75 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, Window* conformanceWindow ) 76 #endif 77 #else // R0156_CONF_WINDOW_IN_REP_FORMAT 71 78 #if AUXILIARY_PICTURES 72 79 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps ) … … 74 81 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps ) 75 82 #endif 83 #endif 76 84 #else 77 85 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth ) … … 82 90 83 91 #if SVC_EXTENSION 92 #if R0156_CONF_WINDOW_IN_REP_FORMAT 93 if(conformanceWindow != NULL) 94 { 95 m_conformanceWindow = *conformanceWindow; 96 } 97 #else 84 98 if(pcSps != NULL) 85 99 { 86 100 m_conformanceWindow = pcSps->getConformanceWindow(); 87 101 } 102 #endif 88 103 #endif 89 104 -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h
r856 r869 111 111 // ------------------------------------------------------------------------------------------------ 112 112 #if SVC_EXTENSION 113 #if R0156_CONF_WINDOW_IN_REP_FORMAT 114 #if AUXILIARY_PICTURES 115 Void create ( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, Window* conformanceWindow = NULL); 116 #else 117 Void create ( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, Window* conformanceWindow = NULL); 118 #endif 119 #else 113 120 #if AUXILIARY_PICTURES 114 121 Void create ( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps = NULL); 115 122 #else 116 123 Void create ( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps = NULL); 124 #endif 117 125 #endif 118 126 #else -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r867 r869 2316 2316 } 2317 2317 2318 #if R0156_CONF_WINDOW_IN_REP_FORMAT 2319 Window& TComSlice::getConformanceWindow() 2320 { 2321 TComSPS *sps = getSPS(); 2322 TComVPS *vps = getVPS(); 2323 UInt layerId = getLayerId(); 2324 #if O0096_REP_FORMAT_INDEX 2325 #if R0279_REP_FORMAT_INBL 2326 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) 2327 { 2328 if( layerId == 0 && vps->getAvcBaseLayerFlag() ) 2329 #else 2330 if ( layerId == 0 ) 2331 { 2332 if( vps->getAvcBaseLayerFlag() ) 2333 #endif 2334 { 2335 return vps->getVpsRepFormat(layerId)->getConformanceWindowVps(); 2336 } 2337 else 2338 { 2339 return sps->getConformanceWindow(); 2340 } 2341 } 2342 else 2343 { 2344 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : layerId) )->getConformanceWindowVps(); 2345 } 2346 #else 2347 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 2348 { 2349 return sps->getConformanceWindow(); 2350 } 2351 else 2352 { 2353 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getConformanceWindowVps(); 2354 } 2355 #endif 2356 } 2357 #endif 2358 2318 2359 RepFormat::RepFormat() 2319 2360 #if AUXILIARY_PICTURES … … 2337 2378 m_bitDepthVpsLuma = 0; 2338 2379 m_bitDepthVpsChroma = 0; 2380 #if R0156_CONF_WINDOW_IN_REP_FORMAT 2381 m_conformanceWindowVps.resetWindow(); 2382 #endif 2339 2383 } 2340 2384 #endif … … 3102 3146 m_bitDepthVpsLuma = other.m_bitDepthVpsLuma; 3103 3147 m_bitDepthVpsChroma = other.m_bitDepthVpsChroma; 3148 #if R0156_CONF_WINDOW_IN_REP_FORMAT 3149 m_conformanceWindowVps = other.m_conformanceWindowVps; 3150 #endif 3104 3151 } 3105 3152 return *this; … … 4077 4124 TComPic* pcRefPicBL = m_pcBaseColPic[refLayerIdc]; 4078 4125 4079 // copy scalability ratio, it is needed to get the cor ect location for the motion field of the corresponding reference layer block4126 // copy scalability ratio, it is needed to get the correct location for the motion field of the corresponding reference layer block 4080 4127 pcIlpPic[refLayerIdc]->setSpatialEnhLayerFlag( refLayerIdc, m_pcPic->isSpatialEnhLayer(refLayerIdc) ); 4081 4128 -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r867 r869 403 403 }; 404 404 405 class Window 406 { 407 private: 408 Bool m_enabledFlag; 409 Int m_winLeftOffset; 410 Int m_winRightOffset; 411 Int m_winTopOffset; 412 Int m_winBottomOffset; 413 #if P0312_VERT_PHASE_ADJ 414 Bool m_vertPhasePositionEnableFlag; 415 #endif 416 public: 417 Window() 418 : m_enabledFlag (false) 419 , m_winLeftOffset (0) 420 , m_winRightOffset (0) 421 , m_winTopOffset (0) 422 , m_winBottomOffset (0) 423 #if P0312_VERT_PHASE_ADJ 424 , m_vertPhasePositionEnableFlag(false) 425 #endif 426 { } 427 428 Bool getWindowEnabledFlag() const { return m_enabledFlag; } 429 #if P0312_VERT_PHASE_ADJ 430 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = false; } 431 #else 432 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0;} 433 #endif 434 Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } 435 Void setWindowLeftOffset(Int val) { if(val) {m_winLeftOffset = val; m_enabledFlag = true;} } 436 Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } 437 Void setWindowRightOffset(Int val) { if(val) {m_winRightOffset = val; m_enabledFlag = true;} } 438 Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } 439 Void setWindowTopOffset(Int val) { if(val) {m_winTopOffset = val; m_enabledFlag = true;} } 440 Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } 441 Void setWindowBottomOffset(Int val) { if(val) {m_winBottomOffset = val; m_enabledFlag = true;} } 442 #if P0312_VERT_PHASE_ADJ 443 Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag; } 444 Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; } 445 #endif 446 447 #if P0312_VERT_PHASE_ADJ 448 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom, Bool vertPhasePositionEnableFlag = 0) 449 #else 450 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) 451 #endif 452 { 453 if(offsetLeft || offsetLRight || offsetLTop || offsetLBottom) 454 { 455 m_enabledFlag = true; 456 m_winLeftOffset = offsetLeft; 457 m_winRightOffset = offsetLRight; 458 m_winTopOffset = offsetLTop; 459 m_winBottomOffset = offsetLBottom; 460 } 461 #if P0312_VERT_PHASE_ADJ 462 m_vertPhasePositionEnableFlag = vertPhasePositionEnableFlag; 463 #endif 464 } 465 }; 466 405 467 #if REPN_FORMAT_IN_VPS 406 468 class RepFormat … … 420 482 Int m_bitDepthVpsChroma; // coded as minus8 421 483 484 #if R0156_CONF_WINDOW_IN_REP_FORMAT 485 Window m_conformanceWindowVps; 486 #endif 487 422 488 public: 423 489 RepFormat(); … … 454 520 Int getBitDepthVpsChroma() { return m_bitDepthVpsChroma; } 455 521 Void setBitDepthVpsChroma(Int x) { m_bitDepthVpsChroma = x; } 522 523 #if R0156_CONF_WINDOW_IN_REP_FORMAT 524 Window& getConformanceWindowVps() { return m_conformanceWindowVps; } 525 Void setConformanceWindowVps(Window& conformanceWindow ) { m_conformanceWindowVps = conformanceWindow; } 526 #endif 456 527 }; 457 528 #endif … … 1246 1317 }; 1247 1318 1248 class Window1249 {1250 private:1251 Bool m_enabledFlag;1252 Int m_winLeftOffset;1253 Int m_winRightOffset;1254 Int m_winTopOffset;1255 Int m_winBottomOffset;1256 #if P0312_VERT_PHASE_ADJ1257 Bool m_vertPhasePositionEnableFlag;1258 #endif1259 public:1260 Window()1261 : m_enabledFlag (false)1262 , m_winLeftOffset (0)1263 , m_winRightOffset (0)1264 , m_winTopOffset (0)1265 , m_winBottomOffset (0)1266 #if P0312_VERT_PHASE_ADJ1267 , m_vertPhasePositionEnableFlag(false)1268 #endif1269 { }1270 1271 Bool getWindowEnabledFlag() const { return m_enabledFlag; }1272 #if P0312_VERT_PHASE_ADJ1273 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = false; }1274 #else1275 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0;}1276 #endif1277 Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; }1278 Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; }1279 Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; }1280 Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; }1281 Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; }1282 Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; }1283 Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; }1284 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; }1285 #if P0312_VERT_PHASE_ADJ1286 Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag; }1287 Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; }1288 #endif1289 1290 #if P0312_VERT_PHASE_ADJ1291 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom, Bool vertPhasePositionEnableFlag = 0)1292 #else1293 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom)1294 #endif1295 {1296 m_enabledFlag = true;1297 m_winLeftOffset = offsetLeft;1298 m_winRightOffset = offsetLRight;1299 m_winTopOffset = offsetLTop;1300 m_winBottomOffset = offsetLBottom;1301 #if P0312_VERT_PHASE_ADJ1302 m_vertPhasePositionEnableFlag = vertPhasePositionEnableFlag;1303 #endif1304 }1305 };1306 1307 1308 1319 class TComVUI 1309 1320 { … … 2571 2582 Int getQpBDOffsetY(); 2572 2583 Int getQpBDOffsetC(); 2584 2585 #if R0156_CONF_WINDOW_IN_REP_FORMAT 2586 Window& getConformanceWindow(); 2587 #endif 2573 2588 #endif 2574 2589 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r866 r869 209 209 #define Q0195_REP_FORMAT_CLEANUP 1 ///< JCTVC-Q0195: restructureing of rep_format() signaling 210 210 #define REP_FORMAT_FIX 1 ///< update_rep_format_flag should be inferred to be equal to 0 211 212 #define R0156_CONF_WINDOW_IN_REP_FORMAT O0096_REP_FORMAT_INDEX ///< JCTVC-R0156: add conformance window cropping offsets to rep_format() 211 213 212 214 #define RESAMPLING_CONSTRAINT_BUG_FIX 1 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r866 r869 729 729 #endif 730 730 #endif 731 READ_FLAG( uiCode, "conformance_window_flag"); 732 if (uiCode != 0) 733 { 734 Window &conf = pcSPS->getConformanceWindow(); 731 732 #if R0156_CONF_WINDOW_IN_REP_FORMAT 735 733 #if REPN_FORMAT_IN_VPS 736 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode ); 737 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode ); 738 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode ); 739 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 740 #else 741 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 742 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 743 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 744 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 745 #endif 746 } 734 #if O0096_REP_FORMAT_INDEX 735 if( pcSPS->getLayerId() == 0 ) 736 #else 737 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 738 #endif 739 { 740 #endif 741 #endif 742 READ_FLAG( uiCode, "conformance_window_flag"); 743 if (uiCode != 0) 744 { 745 Window &conf = pcSPS->getConformanceWindow(); 746 #if REPN_FORMAT_IN_VPS 747 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode ); 748 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode ); 749 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode ); 750 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 751 #else 752 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 753 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 754 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 755 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 756 #endif 757 } 758 #if R0156_CONF_WINDOW_IN_REP_FORMAT 759 #if REPN_FORMAT_IN_VPS 760 } 761 #endif 762 #endif 763 747 764 #if REPN_FORMAT_IN_VPS 748 765 #if O0096_REP_FORMAT_INDEX … … 2069 2086 repFormat->setBitDepthVpsChroma ( repFormatPrev->getBitDepthVpsChroma() ); 2070 2087 } 2088 2071 2089 #else 2072 2090 #if AUXILIARY_PICTURES … … 2087 2105 READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" ); repFormat->setBitDepthVpsChroma( uiCode + 8 ); 2088 2106 #endif 2107 2108 #if R0156_CONF_WINDOW_IN_REP_FORMAT 2109 READ_FLAG( uiCode, "conformance_window_vps_flag" ); 2110 if( uiCode != 0) 2111 { 2112 Window &conf = repFormat->getConformanceWindowVps(); 2113 READ_UVLC( uiCode, "conf_win_vps_left_offset" ); conf.setWindowLeftOffset ( uiCode ); 2114 READ_UVLC( uiCode, "conf_win_vps_right_offset" ); conf.setWindowRightOffset ( uiCode ); 2115 READ_UVLC( uiCode, "conf_win_vps_top_offset" ); conf.setWindowTopOffset ( uiCode ); 2116 READ_UVLC( uiCode, "conf_win_vps_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 2117 } 2118 #endif 2089 2119 } 2090 2120 #endif -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r858 r869 214 214 215 215 Int numReorderPics[MAX_TLAYER]; 216 #if R0156_CONF_WINDOW_IN_REP_FORMAT 217 Window &conformanceWindow = slice->getConformanceWindow(); 218 #else 216 219 Window &conformanceWindow = pcSPS->getConformanceWindow(); 220 #endif 217 221 Window defaultDisplayWindow = pcSPS->getVuiParametersPresentFlag() ? pcSPS->getVuiParameters()->getDefaultDisplayWindow() : Window(); 218 222 … … 303 307 { 304 308 Int numReorderPics[MAX_TLAYER]; 309 #if R0156_CONF_WINDOW_IN_REP_FORMAT 310 Window &conformanceWindow = pcSlice->getConformanceWindow(); 311 #else 305 312 Window &conformanceWindow = pcSlice->getSPS()->getConformanceWindow(); 313 #endif 306 314 Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window(); 307 315 … … 765 773 766 774 Int numReorderPics[MAX_TLAYER]; 775 #if !R0156_CONF_WINDOW_IN_REP_FORMAT 767 776 Window conformanceWindow; 777 #endif 768 778 Window defaultDisplayWindow; 769 779 780 #if R0156_CONF_WINDOW_IN_REP_FORMAT 781 #if AUXILIARY_PICTURES 782 pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), repFormat->getChromaFormatVpsIdc(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), repFormat->getConformanceWindowVps(), defaultDisplayWindow, numReorderPics, NULL, true); 783 #else 784 pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), repFormat->getConformanceWindowVps(), defaultDisplayWindow, numReorderPics, NULL, true); 785 #endif 786 #else 770 787 #if AUXILIARY_PICTURES 771 788 pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), repFormat->getChromaFormatVpsIdc(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, NULL, true); 772 789 #else 773 790 pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, NULL, true); 791 #endif 774 792 #endif 775 793 // it is needed where the VPS is accessed through the slice -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r866 r869 555 555 #endif 556 556 #endif 557 Window conf = pcSPS->getConformanceWindow(); 558 559 WRITE_FLAG( conf.getWindowEnabledFlag(), "conformance_window_flag" ); 560 if (conf.getWindowEnabledFlag()) 561 { 557 558 #if R0156_CONF_WINDOW_IN_REP_FORMAT 562 559 #if REPN_FORMAT_IN_VPS 563 WRITE_UVLC( conf.getWindowLeftOffset(), "conf_win_left_offset" ); 564 WRITE_UVLC( conf.getWindowRightOffset(), "conf_win_right_offset" ); 565 WRITE_UVLC( conf.getWindowTopOffset(), "conf_win_top_offset" ); 566 WRITE_UVLC( conf.getWindowBottomOffset(), "conf_win_bottom_offset" ); 567 #else 568 WRITE_UVLC( conf.getWindowLeftOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_left_offset" ); 569 WRITE_UVLC( conf.getWindowRightOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_right_offset" ); 570 WRITE_UVLC( conf.getWindowTopOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_top_offset" ); 571 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 572 #endif 573 } 560 #if O0096_REP_FORMAT_INDEX 561 if( pcSPS->getLayerId() == 0 ) 562 #else 563 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 564 #endif 565 { 566 #endif 567 #endif 568 Window conf = pcSPS->getConformanceWindow(); 569 570 WRITE_FLAG( conf.getWindowEnabledFlag(), "conformance_window_flag" ); 571 if (conf.getWindowEnabledFlag()) 572 { 573 #if REPN_FORMAT_IN_VPS 574 WRITE_UVLC( conf.getWindowLeftOffset(), "conf_win_left_offset" ); 575 WRITE_UVLC( conf.getWindowRightOffset(), "conf_win_right_offset" ); 576 WRITE_UVLC( conf.getWindowTopOffset(), "conf_win_top_offset" ); 577 WRITE_UVLC( conf.getWindowBottomOffset(), "conf_win_bottom_offset" ); 578 #else 579 WRITE_UVLC( conf.getWindowLeftOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_left_offset" ); 580 WRITE_UVLC( conf.getWindowRightOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc() ), "conf_win_right_offset" ); 581 WRITE_UVLC( conf.getWindowTopOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_top_offset" ); 582 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 583 #endif 584 } 585 #if R0156_CONF_WINDOW_IN_REP_FORMAT 586 #if REPN_FORMAT_IN_VPS 587 } 588 #endif 589 #endif 574 590 575 591 #if REPN_FORMAT_IN_VPS … … 1471 1487 WRITE_CODE( repFormat->getBitDepthVpsLuma() - 8, 4, "bit_depth_luma_minus8" ); 1472 1488 WRITE_CODE( repFormat->getBitDepthVpsChroma() - 8, 4, "bit_depth_chroma_minus8" ); 1489 #endif 1490 1491 #if R0156_CONF_WINDOW_IN_REP_FORMAT 1492 Window conf = repFormat->getConformanceWindowVps(); 1493 1494 WRITE_FLAG( conf.getWindowEnabledFlag(), "conformance_window_vps_flag" ); 1495 if (conf.getWindowEnabledFlag()) 1496 { 1497 WRITE_UVLC( conf.getWindowLeftOffset(), "conf_win_vps_left_offset" ); 1498 WRITE_UVLC( conf.getWindowRightOffset(), "conf_win_vps_right_offset" ); 1499 WRITE_UVLC( conf.getWindowTopOffset(), "conf_win_vps_top_offset" ); 1500 WRITE_UVLC( conf.getWindowBottomOffset(), "conf_win_vps_bottom_offset" ); 1501 } 1473 1502 #endif 1474 1503 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r849 r869 1698 1698 1699 1699 Int numReorderPics[MAX_TLAYER]; 1700 #if R0156_CONF_WINDOW_IN_REP_FORMAT 1701 Window &conformanceWindow = repFormat->getConformanceWindowVps(); 1702 #else 1700 1703 Window &conformanceWindow = m_cSPS.getConformanceWindow(); 1704 #endif 1701 1705 Window defaultDisplayWindow = m_cSPS.getVuiParametersPresentFlag() ? m_cSPS.getVuiParameters()->getDefaultDisplayWindow() : Window(); 1702 1706
Note: See TracChangeset for help on using the changeset viewer.