Changeset 869 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon
- Timestamp:
- 14 Aug 2014, 00:00:45 (11 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 6 edited
-
TComPic.cpp (modified) (4 diffs)
-
TComPicYuv.cpp (modified) (3 diffs)
-
TComPicYuv.h (modified) (1 diff)
-
TComSlice.cpp (modified) (4 diffs)
-
TComSlice.h (modified) (5 diffs)
-
TypeDef.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset for help on using the changeset viewer.