Changeset 906 in SHVCSoftware for trunk/source/Lib/TLibCommon
- Timestamp:
- 15 Oct 2014, 07:25:10 (10 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-dev (added) merged: 817-905
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-dev/source (added) merged: 818-875,877-905
- Property svn:mergeinfo changed
-
trunk/source/Lib/TLibCommon/CommonDef.h
r815 r906 58 58 #if SVC_EXTENSION 59 59 #include <vector> 60 #define NV_VERSION " 6.1 (HM-14.0)" ///< Current software version60 #define NV_VERSION "7.0 (HM-15.0)" ///< Current software version 61 61 #else 62 #define NV_VERSION "1 4.0" ///< Current software version62 #define NV_VERSION "15.0" ///< Current software version 63 63 #endif 64 64 -
trunk/source/Lib/TLibCommon/SEI.h
r815 r906 94 94 BSP_NESTING = 140, 95 95 BSP_INITIAL_ARRIVAL_TIME = 141, 96 #if !REMOVE_BSP_HRD_SEI 96 97 BSP_HRD = 142, 97 98 #endif 98 #if Q0074_SEI_COLOR_MAPPING 99 COLOR_MAPPING_INFO = 143, 99 #endif 100 #if Q0074_COLOUR_REMAPPING_SEI 101 COLOUR_REMAPPING_INFO = 143, 100 102 #endif 101 103 #if Q0078_ADD_LAYER_SETS … … 173 175 Int numSpsIdsMinus1; 174 176 std::vector<Int> activeSeqParameterSetId; 177 #if R0247_SEI_ACTIVE 178 std::vector<Int> layerSpsIdx; 179 #endif 175 180 }; 176 181 … … 199 204 UInt m_bpSeqParameterSetId; 200 205 Bool m_rapCpbParamsPresentFlag; 201 Boolm_cpbDelayOffset;202 Boolm_dpbDelayOffset;206 UInt m_cpbDelayOffset; 207 UInt m_dpbDelayOffset; 203 208 UInt m_initialCpbRemovalDelay [MAX_CPB_CNT][2]; 204 209 UInt m_initialCpbRemovalDelayOffset [MAX_CPB_CNT][2]; … … 445 450 }; 446 451 #endif 447 #if Q0074_SEI_COLOR_MAPPING 448 class SEIColorMappingInfo : public SEI 449 { 450 public: 451 PayloadType payloadType() const { return COLOR_MAPPING_INFO; } 452 SEIColorMappingInfo() { 453 } 454 virtual ~SEIColorMappingInfo() {} 455 456 Int m_colorMapId; 457 Bool m_colorMapCancelFlag; 458 Bool m_colorMapPersistenceFlag; 459 Bool m_colorMap_video_signal_type_present_flag; 460 Bool m_colorMap_video_full_range_flag; 461 Int m_colorMap_primaries; 462 Int m_colorMap_transfer_characteristics; 463 Int m_colorMap_matrix_coeffs; 464 Int m_colorMapModelId; 465 466 Int m_colour_map_coded_data_bit_depth; 467 Int m_colour_map_target_bit_depth; 468 469 Int m_num_input_pivots[3]; 470 Int* m_coded_input_pivot_value[3]; 471 Int* m_target_input_pivot_value[3]; 472 473 Bool m_matrix_flag; 474 Int m_log2_matrix_denom; 475 Int m_matrix_coef[3][3]; 476 477 Int m_num_output_pivots[3]; 478 Int* m_coded_output_pivot_value[3]; 479 Int* m_target_output_pivot_value[3]; 452 #if Q0074_COLOUR_REMAPPING_SEI 453 class SEIColourRemappingInfo : public SEI 454 { 455 public: 456 PayloadType payloadType() const { return COLOUR_REMAPPING_INFO; } 457 SEIColourRemappingInfo() {} 458 ~SEIColourRemappingInfo() {} 459 460 Int m_colourRemapId; 461 Bool m_colourRemapCancelFlag; 462 Bool m_colourRemapPersistenceFlag; 463 Bool m_colourRemapVideoSignalInfoPresentFlag; 464 Bool m_colourRemapFullRangeFlag; 465 Int m_colourRemapPrimaries; 466 Int m_colourRemapTransferFunction; 467 Int m_colourRemapMatrixCoefficients; 468 Int m_colourRemapInputBitDepth; 469 Int m_colourRemapBitDepth; 470 Int m_preLutNumValMinus1[3]; 471 std::vector<Int> m_preLutCodedValue[3]; 472 std::vector<Int> m_preLutTargetValue[3]; 473 Bool m_colourRemapMatrixPresentFlag; 474 Int m_log2MatrixDenom; 475 Int m_colourRemapCoeffs[3][3]; 476 Int m_postLutNumValMinus1[3]; 477 std::vector<Int> m_postLutCodedValue[3]; 478 std::vector<Int> m_postLutTargetValue[3]; 480 479 }; 481 480 #endif … … 593 592 Bool m_callerOwnsSEIs; 594 593 SEIMessages m_nestedSEIs; 594 #if VPS_VUI_BSP_HRD_PARAMS 595 Int m_seiPartitioningSchemeIdx; 596 Int m_seiOlsIdx; 597 #endif 595 598 }; 596 599 … … 607 610 }; 608 611 612 #if !REMOVE_BSP_HRD_SEI 609 613 class SEIBspHrd : public SEI 610 614 { … … 627 631 TComHRD *hrd; 628 632 }; 633 #endif 629 634 630 635 #endif -
trunk/source/Lib/TLibCommon/TCom3DAsymLUT.cpp
r815 r906 17 17 m_pCuboid = NULL; 18 18 m_nResQuanBit = 0; 19 #if R0164_CGS_LUT_BUGFIX_CHECK 20 m_pCuboidExplicit = NULL; 21 m_pCuboidFilled = NULL; 22 #endif 19 23 } 20 24 … … 24 28 } 25 29 26 Void TCom3DAsymLUT::create( Int nMaxOctantDepth , Int nInputBitDepth , Int nInputBitDepthC , Int nOutputBitDepth , Int nOutputBitDepthC , Int nMaxYPartNumLog2 ) 30 Void TCom3DAsymLUT::create( Int nMaxOctantDepth , Int nInputBitDepth , Int nInputBitDepthC , Int nOutputBitDepth , Int nOutputBitDepthC , Int nMaxYPartNumLog2 31 #if R0151_CGS_3D_ASYMLUT_IMPROVE 32 , Int nAdaptCThresholdU , Int nAdaptCThresholdV 33 #endif 34 ) 27 35 { 28 36 m_nMaxOctantDepth = nMaxOctantDepth; … … 36 44 m_nMaxPartNumLog2 = 3 * m_nMaxOctantDepth + m_nMaxYPartNumLog2; 37 45 38 xUpdatePartitioning( nMaxOctantDepth , nMaxYPartNumLog2 ); 46 xUpdatePartitioning( nMaxOctantDepth , nMaxYPartNumLog2 47 #if R0151_CGS_3D_ASYMLUT_IMPROVE 48 , nAdaptCThresholdU , nAdaptCThresholdV 49 #endif 50 ); 39 51 40 52 m_nYSize = 1 << ( m_nMaxOctantDepth + m_nMaxYPartNumLog2 ); … … 48 60 } 49 61 xAllocate3DArray( m_pCuboid , m_nYSize , m_nUSize , m_nVSize ); 62 63 #if R0164_CGS_LUT_BUGFIX_CHECK 64 xAllocate3DArray( m_pCuboidExplicit , m_nYSize , m_nUSize , m_nVSize ); 65 xAllocate3DArray( m_pCuboidFilled , m_nYSize , m_nUSize , m_nVSize ); 66 #endif 50 67 } 51 68 … … 53 70 { 54 71 xFree3DArray( m_pCuboid ); 55 } 56 57 Void TCom3DAsymLUT::xUpdatePartitioning( Int nCurOctantDepth , Int nCurYPartNumLog2 ) 72 #if R0164_CGS_LUT_BUGFIX_CHECK 73 xFree3DArray( m_pCuboidExplicit ); 74 xFree3DArray( m_pCuboidFilled ); 75 #endif 76 } 77 78 79 Void TCom3DAsymLUT::xUpdatePartitioning( Int nCurOctantDepth , Int nCurYPartNumLog2 80 #if R0151_CGS_3D_ASYMLUT_IMPROVE 81 , Int nAdaptCThresholdU , Int nAdaptCThresholdV 82 #endif 83 ) 58 84 { 59 85 assert( nCurOctantDepth <= m_nMaxOctantDepth ); 86 #if R0179_CGS_SIZE_8x1x1 87 assert( nCurYPartNumLog2 + nCurOctantDepth <= m_nMaxYPartNumLog2 + m_nMaxOctantDepth ); 88 #else 60 89 assert( nCurYPartNumLog2 <= m_nMaxYPartNumLog2 ); 90 #endif 61 91 62 92 m_nCurOctantDepth = nCurOctantDepth; … … 64 94 m_nYShift2Idx = m_nInputBitDepthY - m_nCurOctantDepth - m_nCurYPartNumLog2; 65 95 m_nUShift2Idx = m_nVShift2Idx = m_nInputBitDepthC - m_nCurOctantDepth; 96 #if R0151_CGS_3D_ASYMLUT_IMPROVE 97 m_nMappingShift = 10 + m_nInputBitDepthY - m_nOutputBitDepthY; 98 m_nAdaptCThresholdU = nAdaptCThresholdU; 99 m_nAdaptCThresholdV = nAdaptCThresholdV; 100 #else 66 101 m_nMappingShift = m_nYShift2Idx + m_nUShift2Idx; 102 #endif 67 103 m_nMappingOffset = 1 << ( m_nMappingShift - 1 ); 104 105 #if R0179_ENC_OPT_3DLUT_SIZE 106 m_nYSize = 1 << ( m_nCurOctantDepth + m_nCurYPartNumLog2 ); 107 m_nUSize = 1 << m_nCurOctantDepth; 108 m_nVSize = 1 << m_nCurOctantDepth; 109 #endif 68 110 } 69 111 … … 159 201 160 202 SYUVP sPred; 203 #if R0151_CGS_3D_ASYMLUT_IMPROVE 204 sPred.Y = sPred.U = sPred.V = 0; 205 if( nVertexIdx == 0 ) 206 sPred.Y = xGetNormCoeffOne() << ( m_nOutputBitDepthY - m_nInputBitDepthY ); 207 else if( nVertexIdx == 1 ) 208 sPred.U = xGetNormCoeffOne() << ( m_nOutputBitDepthY - m_nInputBitDepthY ); 209 else if( nVertexIdx == 2 ) 210 sPred.V = xGetNormCoeffOne() << ( m_nOutputBitDepthY - m_nInputBitDepthY ); 211 #else 161 212 sPred.Y = ( yIdx + m_nVertexIdxOffset[nVertexIdx][0] ) << ( m_nYShift2Idx + m_nDeltaBitDepth ); 162 213 sPred.U = ( uIdx + m_nVertexIdxOffset[nVertexIdx][1] ) << ( m_nUShift2Idx + m_nDeltaBitDepthC ); 163 214 sPred.V = ( vIdx + m_nVertexIdxOffset[nVertexIdx][2] ) << ( m_nVShift2Idx + m_nDeltaBitDepthC ); 215 #endif 164 216 return( sPred ); 165 217 } … … 169 221 SCuboid*** pCuboid = pCurCuboid ? pCurCuboid : m_pCuboid ; 170 222 223 #if R0151_CGS_3D_ASYMLUT_IMPROVE 224 SYUVP sPred; 225 if( yIdx == 0 ) 226 { 227 sPred.Y = nVertexIdx == 0 ? 1024 : 0; 228 sPred.U = nVertexIdx == 1 ? 1024 : 0; 229 sPred.V = nVertexIdx == 2 ? 1024 : 0; 230 } 231 else 232 { 233 sPred = pCuboid[yIdx-1][uIdx][vIdx].P[nVertexIdx]; 234 } 235 #else 171 236 // PredA 172 237 SYUVP sPredA = xGetCuboidVertexPredA( yIdx , uIdx , vIdx , nVertexIdx ); … … 196 261 sPred.U = sPredA.U + sPredB.U; 197 262 sPred.V = sPredA.V + sPredB.V; 198 263 #endif 199 264 return sPred ; 200 265 } … … 220 285 rYUVP.U = sPred.U + ( deltaU << m_nResQuanBit ); 221 286 rYUVP.V = sPred.V + ( deltaV << m_nResQuanBit ); 287 #if R0150_CGS_SIGNAL_CONSTRAINTS 288 // LUT coefficients are less than 12-bit 289 assert( -2048 <= rYUVP.Y && rYUVP.Y <= 2047 ); 290 assert( -2048 <= rYUVP.U && rYUVP.U <= 2047 ); 291 assert( -2048 <= rYUVP.V && rYUVP.V <= 2047 ); 292 #endif 222 293 } 223 294 224 295 Pel TCom3DAsymLUT::xMapY( Pel y , Pel u , Pel v ) 225 296 { 297 #if R0151_CGS_3D_ASYMLUT_IMPROVE 298 const SCuboid & rCuboid = m_pCuboid[xGetYIdx(y)][xGetUIdx(u)][xGetVIdx(v)]; 299 Pel dstY = ( ( rCuboid.P[0].Y * y + rCuboid.P[1].Y * u + rCuboid.P[2].Y * v + m_nMappingOffset ) >> m_nMappingShift ) + rCuboid.P[3].Y; 300 #else 226 301 const SCuboid & rCuboid = m_pCuboid[y>>m_nYShift2Idx][u>>m_nUShift2Idx][v>>m_nVShift2Idx]; 227 302 Pel dstY = rCuboid.P[0].Y; … … 233 308 + ( ( deltaV * ( rCuboid.P[2].Y - rCuboid.P[1].Y ) ) << m_nYShift2Idx ) 234 309 + m_nMappingOffset ) >> m_nMappingShift ); 310 #endif 235 311 return( dstY ); 236 312 } … … 238 314 SYUVP TCom3DAsymLUT::xMapUV( Pel y , Pel u , Pel v ) 239 315 { 316 #if R0151_CGS_3D_ASYMLUT_IMPROVE 317 const SCuboid & rCuboid = m_pCuboid[xGetYIdx(y)][xGetUIdx(u)][xGetVIdx(v)]; 318 SYUVP dst; 319 dst.Y = 0; 320 dst.U = ( ( rCuboid.P[0].U * y + rCuboid.P[1].U * u + rCuboid.P[2].U * v + m_nMappingOffset ) >> m_nMappingShift ) + rCuboid.P[3].U; 321 dst.V = ( ( rCuboid.P[0].V * y + rCuboid.P[1].V * u + rCuboid.P[2].V * v + m_nMappingOffset ) >> m_nMappingShift ) + rCuboid.P[3].V; 322 #else 240 323 const SCuboid & rCuboid = m_pCuboid[y>>m_nYShift2Idx][u>>m_nUShift2Idx][v>>m_nVShift2Idx]; 241 324 SYUVP dst = rCuboid.P[0]; … … 251 334 + ( ( deltaV * ( rCuboid.P[2].V - rCuboid.P[1].V ) ) << m_nYShift2Idx ) 252 335 + m_nMappingOffset ) >> m_nMappingShift ); 336 #endif 253 337 return( dst ); 254 338 } … … 256 340 Void TCom3DAsymLUT::xSaveCuboids( SCuboid *** pSrcCuboid ) 257 341 { 342 #if R0179_ENC_OPT_3DLUT_SIZE 343 memcpy( m_pCuboid[0][0] , pSrcCuboid[0][0] , sizeof( SCuboid ) * getMaxYSize() * getMaxCSize() * getMaxCSize() ); 344 #else 258 345 memcpy( m_pCuboid[0][0] , pSrcCuboid[0][0] , sizeof( SCuboid ) * m_nYSize * m_nUSize * m_nVSize ); 346 #endif 259 347 } 260 348 … … 262 350 { 263 351 assert( pSrc->getMaxOctantDepth() == getMaxOctantDepth() && pSrc->getMaxYPartNumLog2() == getMaxYPartNumLog2() ); 264 xUpdatePartitioning( pSrc->getCurOctantDepth() , pSrc->getCurYPartNumLog2() ); 352 xUpdatePartitioning( pSrc->getCurOctantDepth() , pSrc->getCurYPartNumLog2() 353 #if R0151_CGS_3D_ASYMLUT_IMPROVE 354 , pSrc->getAdaptChromaThresholdU() , pSrc->getAdaptChromaThresholdV() 355 #endif 356 ); 265 357 setResQuantBit( pSrc->getResQuantBit() ); 266 358 xSaveCuboids( pSrc->m_pCuboid ); 267 359 } 268 360 269 #endif 270 361 #if R0164_CGS_LUT_BUGFIX_CHECK 362 Void TCom3DAsymLUT::xInitCuboids( ) 363 { 364 // All vertices are initialized as non-exlicitly-encoded 365 for( Int yIdx = 0 ; yIdx < m_nYSize ; yIdx++ ) 366 { 367 for( Int uIdx = 0 ; uIdx < m_nUSize ; uIdx++ ) 368 { 369 for( Int vIdx = 0 ; vIdx < m_nVSize ; vIdx++ ) 370 { 371 m_pCuboidExplicit[yIdx][uIdx][vIdx] = false; 372 m_pCuboidFilled[yIdx][uIdx][vIdx] = false; 373 } 374 } 375 } 376 } 377 378 Void TCom3DAsymLUT::xCuboidsFilledCheck( Int yIdx , Int uIdx , Int vIdx ) 379 { 380 if ( m_pCuboidFilled[yIdx][uIdx][vIdx] == false ) 381 { 382 if( yIdx > 0) 383 assert ( m_pCuboidFilled[yIdx-1][uIdx][vIdx] ); 384 385 for ( Int nVertexIdx=0 ; nVertexIdx<4 ; nVertexIdx++ ) 386 m_pCuboid[yIdx][uIdx][vIdx].P[nVertexIdx] = yIdx == 0 ? xGetCuboidVertexPredA( yIdx , uIdx , vIdx , nVertexIdx ): xGetCuboidVertexPredAll( yIdx , uIdx , vIdx , nVertexIdx ); 387 388 m_pCuboidFilled[yIdx][uIdx][vIdx] = true ; 389 } 390 } 391 392 393 Void TCom3DAsymLUT::xCuboidsFilledCheck( Bool bDecode ) 394 { 395 Int ySize = 1 << ( getCurOctantDepth() + getCurYPartNumLog2() ); 396 Int uSize = 1 << getCurOctantDepth(); 397 Int vSize = 1 << getCurOctantDepth(); 398 for( Int yIdx = 0 ; yIdx < ySize ; yIdx++ ) 399 { 400 for( Int uIdx = 0 ; uIdx < uSize ; uIdx++ ) 401 { 402 for( Int vIdx = 0 ; vIdx < vSize ; vIdx++ ) 403 { 404 if ( bDecode ) 405 xCuboidsFilledCheck( yIdx , uIdx , vIdx ); 406 407 assert( m_pCuboidFilled[yIdx][uIdx][vIdx] ); 408 } 409 } 410 } 411 412 } 413 #endif 414 415 #if R0150_CGS_SIGNAL_CONSTRAINTS 416 Bool TCom3DAsymLUT::isRefLayer( UInt uiRefLayerId ) 417 { 418 Bool bIsRefLayer = false; 419 for( UInt i = 0 ; i < m_vRefLayerId.size() ; i++ ) 420 { 421 if( m_vRefLayerId[i] == uiRefLayerId ) 422 { 423 bIsRefLayer = true; 424 break; 425 } 426 } 427 428 return( bIsRefLayer ); 429 } 430 #endif 431 432 #if R0164_CGS_LUT_BUGFIX_CHECK 433 Void TCom3DAsymLUT::display( Bool bFilled ) 434 { 435 Int ySize = 1 << ( getCurOctantDepth() + getCurYPartNumLog2() ); 436 Int uSize = 1 << getCurOctantDepth(); 437 Int vSize = 1 << getCurOctantDepth(); 438 Int vIdx=0; 439 440 printf("\n"); 441 printf("3DLut Explicit flag:\n"); 442 for( Int uIdx = 0 ; uIdx < uSize ; uIdx++ ) 443 { 444 for( Int yIdx = 0 ; yIdx < ySize ; yIdx++ ) 445 { 446 printf("%d\t", m_pCuboidExplicit[yIdx][uIdx][vIdx] ); 447 } 448 printf("\n"); 449 } 450 451 printf("3DLut values (explicit):\n"); 452 for( Int uIdx = 0 ; uIdx < uSize ; uIdx++ ) 453 { 454 for( Int yIdx = 0 ; yIdx < ySize ; yIdx++ ) 455 { 456 if ( m_pCuboidExplicit[yIdx][uIdx][vIdx] ) printf("%d\t", m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 457 else printf("?\t", m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 458 } 459 printf("\n"); 460 } 461 462 printf("3DLut values (all):\n"); 463 for( Int uIdx = 0 ; uIdx < uSize ; uIdx++ ) 464 { 465 for( Int yIdx = 0 ; yIdx < ySize ; yIdx++ ) 466 { 467 if ( bFilled ) { 468 if ( m_pCuboidFilled[yIdx][uIdx][vIdx] ) printf("%d\t" , m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 469 else printf("unk\t" , m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 470 } 471 else 472 printf("%d\t" , m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 473 } 474 printf("\n"); 475 } 476 477 } 478 #endif 479 480 #endif 481 -
trunk/source/Lib/TLibCommon/TCom3DAsymLUT.h
r815 r906 4 4 5 5 #include "TypeDef.h" 6 #if R0150_CGS_SIGNAL_CONSTRAINTS 7 #include <cassert> 8 #include <vector> 9 #endif 6 10 7 11 #if Q0048_CGS_3D_ASYMLUT … … 25 29 virtual ~TCom3DAsymLUT(); 26 30 27 virtual Void create( Int nMaxOctantDepth , Int nInputBitDepth , Int nInputBitDepthC , Int nOutputBitDepth , Int nOutputBitDepthC , Int nMaxYPartNumLog2 ); 31 virtual Void create( Int nMaxOctantDepth , Int nInputBitDepth , Int nInputBitDepthC , Int nOutputBitDepth , Int nOutputBitDepthC , Int nMaxYPartNumLog2 32 #if R0151_CGS_3D_ASYMLUT_IMPROVE 33 , Int nAdaptCThresholdU , Int nAdaptCThresholdV 34 #endif 35 ); 28 36 virtual Void destroy(); 29 37 … … 36 44 Int getResQuantBit() { return m_nResQuanBit; } 37 45 Void setResQuantBit(Int n){ m_nResQuanBit = n; } 46 #if R0300_CGS_RES_COEFF_CODING 47 Int getMappingShift() { return m_nMappingShift; } 48 Int getDeltaBits() { return m_nDeltaBits; } 49 Void setDeltaBits(Int n) { m_nDeltaBits = n; } 50 #endif 38 51 Int getMaxYPartNumLog2() { return m_nMaxYPartNumLog2; } 39 52 Int getCurYPartNumLog2() { return m_nCurYPartNumLog2; } 53 #if R0150_CGS_SIGNAL_CONSTRAINTS 54 Void addRefLayerId( UInt uiRefLayerId ) 55 { 56 if( !isRefLayer( uiRefLayerId ) ) 57 m_vRefLayerId.push_back( uiRefLayerId ); 58 } 59 size_t getRefLayerNum() { return m_vRefLayerId.size(); } 60 UInt getRefLayerId( UInt n ) { assert( n < m_vRefLayerId.size() ); return m_vRefLayerId[n]; } 61 Bool isRefLayer( UInt uiRefLayerId ); 62 #endif 63 #if R0151_CGS_3D_ASYMLUT_IMPROVE 64 Void setAdaptChromaThresholdU( Int n ) { m_nAdaptCThresholdU = n; } 65 Int getAdaptChromaThresholdU() { return m_nAdaptCThresholdU; } 66 Void setAdaptChromaThresholdV( Int n ) { m_nAdaptCThresholdV = n; } 67 Int getAdaptChromaThresholdV() { return m_nAdaptCThresholdV; } 68 #endif 69 #if R0179_ENC_OPT_3DLUT_SIZE 70 Int getMaxYSize() { return 1<<(m_nMaxOctantDepth+m_nMaxYPartNumLog2); } 71 Int getMaxCSize() { return 1<<m_nMaxOctantDepth; } 72 #endif 40 73 41 74 Void colorMapping( TComPicYuv * pcPicSrc, TComPicYuv * pcPicDst ); … … 45 78 SYUVP getCuboidVertexResTree( Int yIdx , Int uIdx , Int vIdx , Int nVertexIdx ); 46 79 Void setCuboidVertexResTree( Int yIdx , Int uIdx , Int vIdx , Int nVertexIdx , Int deltaY , Int deltaU , Int deltaV ); 47 80 #if R0164_CGS_LUT_BUGFIX_CHECK 81 Void xInitCuboids( ); 82 Void xCuboidsFilledCheck( Int yIdx , Int uIdx , Int vIdx ); 83 Void xCuboidsFilledCheck( Bool bDecode ); 84 Void display( Bool bFilled=true ); 85 Void xSetExplicit( Int yIdx , Int uIdx , Int vIdx ) { m_pCuboidExplicit[yIdx][uIdx][vIdx] = true ; xSetFilled(yIdx,uIdx,vIdx); } 86 Void xSetFilled( Int yIdx , Int uIdx , Int vIdx ) { m_pCuboidFilled[yIdx][uIdx][vIdx] = true ; } 87 #endif 48 88 49 89 private: … … 68 108 Int m_nMappingOffset; 69 109 Int m_nResQuanBit; 110 #if R0300_CGS_RES_COEFF_CODING 111 Int m_nDeltaBits; 112 #endif 70 113 SCuboid *** m_pCuboid; 71 114 const static Int m_nVertexIdxOffset[4][3]; 115 #if R0150_CGS_SIGNAL_CONSTRAINTS 116 std::vector<UInt> m_vRefLayerId; 117 #endif 118 #if R0151_CGS_3D_ASYMLUT_IMPROVE 119 Int m_nAdaptCThresholdU; 120 Int m_nAdaptCThresholdV; 121 #endif 122 #if R0164_CGS_LUT_BUGFIX_CHECK 123 Bool *** m_pCuboidExplicit; 124 Bool *** m_pCuboidFilled; 125 #endif 72 126 73 127 protected: … … 79 133 Void xFree3DArray( T *** &p ); 80 134 81 Void xUpdatePartitioning( Int nCurOctantDepth , Int nCurYPartNumLog2 ); 135 Void xUpdatePartitioning( Int nCurOctantDepth , Int nCurYPartNumLog2 136 #if R0151_CGS_3D_ASYMLUT_IMPROVE 137 , Int nAdaptCThresholdU , Int nAdaptCThreshodV 138 #endif 139 ); 82 140 SYUVP xGetCuboidVertexPredA( Int yIdx , Int uIdx , Int vIdx , Int nVertexIdx ); 83 141 Pel xMapY( Pel y , Pel u , Pel v ); … … 87 145 Int xGetUSize() { return m_nUSize; } 88 146 Int xGetVSize() { return m_nVSize; } 147 #if R0151_CGS_3D_ASYMLUT_IMPROVE 148 Int xGetYIdx(Pel y) { return( y >> m_nYShift2Idx ); } 149 Int xGetUIdx(Pel u) { return( m_nCurOctantDepth == 1 ? u >= m_nAdaptCThresholdU : u >> m_nUShift2Idx ); } 150 Int xGetVIdx(Pel v) { return( m_nCurOctantDepth == 1 ? v >= m_nAdaptCThresholdV : v >> m_nVShift2Idx ); } 151 Int xGetNormCoeffOne() { return( 1 << m_nMappingShift ); } 152 #else 89 153 Int xGetYShift2Idx() { return m_nYShift2Idx; } 90 154 Int xGetUShift2Idx() { return m_nUShift2Idx; } 91 155 Int xGetVShift2Idx() { return m_nVShift2Idx; } 156 #endif 92 157 SCuboid & xGetCuboid( Int yIdx , Int uIdx , Int vIdx ){ return m_pCuboid[yIdx][uIdx][vIdx]; } 93 158 Void xSaveCuboids( SCuboid *** pSrcCuboid ); -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r815 r906 3481 3481 3482 3482 #if SVC_EXTENSION 3483 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping )3483 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping ) 3484 3484 { 3485 3485 UInt uiPelX = getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiCuAbsPartIdx] ]; 3486 3486 UInt uiPelY = getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiCuAbsPartIdx] ]; 3487 3487 3488 return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase, iMotionMapping );3489 } 3490 3491 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping )3488 return getBaseColCU( refLayerIdc, uiPelX, uiPelY, uiCUAddrBase, uiAbsPartIdxBase, motionMapping ); 3489 } 3490 3491 TComDataCU* TComDataCU::getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping ) 3492 3492 { 3493 3493 TComPic* baseColPic = m_pcSlice->getBaseColPic(refLayerIdc); 3494 3494 3495 uiPelX = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getWidth() - 1, uiPelX); 3496 uiPelY = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getHeight() - 1, uiPelY); 3495 UInt uiPelX = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getWidth() - 1, pelX); 3496 UInt uiPelY = (UInt)Clip3<UInt>(0, m_pcPic->getPicYuvRec()->getHeight() - 1, pelY); 3497 3498 #if REF_IDX_MFM 3499 // centre of the collocated 16x16 block for motion mapping 3500 if( motionMapping ) 3501 { 3502 uiPelX = pelX + 8; 3503 uiPelY = pelY + 8; 3504 } 3505 #endif 3497 3506 3498 3507 #if !LAYER_CTB … … 3500 3509 #endif 3501 3510 3511 #if MOVE_SCALED_OFFSET_TO_PPS 3512 #if O0098_SCALED_REF_LAYER_ID 3513 Int leftStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset(); 3514 Int topStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowTopOffset(); 3515 #else 3516 Int leftStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindow(refLayerIdc).getWindowLeftOffset(); 3517 Int topStartL = baseColPic->getSlice(0)->getPPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 3518 #endif 3519 #else 3502 3520 #if O0098_SCALED_REF_LAYER_ID 3503 3521 Int leftStartL = baseColPic->getSlice(0)->getSPS()->getScaledRefLayerWindowForLayer(baseColPic->getSlice(0)->getVPS()->getRefLayerId(getSlice()->getLayerId(), refLayerIdc)).getWindowLeftOffset(); … … 3507 3525 Int topStartL = baseColPic->getSlice(0)->getSPS()->getScaledRefLayerWindow(refLayerIdc).getWindowTopOffset(); 3508 3526 #endif 3509 3527 #endif 3528 3529 #if REF_REGION_OFFSET 3530 const Window &windowRL = baseColPic->getSlice(0)->getPPS()->getRefLayerWindow(refLayerIdc); 3531 Int iBX = (((uiPelX - leftStartL)*g_posScalingFactor[refLayerIdc][0] + (1<<15)) >> 16) + windowRL.getWindowLeftOffset(); 3532 Int iBY = (((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16) + windowRL.getWindowTopOffset(); 3533 #else 3510 3534 #if Q0200_CONFORMANCE_BL_SIZE 3511 3535 Int chromaFormatIdc = baseColPic->getSlice(0)->getChromaFormatIdc(); … … 3516 3540 Int iBY = ((uiPelY - topStartL )*g_posScalingFactor[refLayerIdc][1] + (1<<15)) >> 16; 3517 3541 #endif 3542 #endif 3518 3543 3519 3544 #if REF_IDX_MFM 3520 3545 // offset for collocated block in the motion mapping 3521 if( iMotionMapping == 1 ) 3522 { 3523 Bool unequalPictureSizeFlag = g_posScalingFactor[refLayerIdc][0] != 65536 || g_posScalingFactor[refLayerIdc][1] != 65536; //the condition should be updated according to the WD. 3524 3525 // actually, motion field compression is performed in the Void TComPic::compressMotion() function, but with (+4) the rounding may have effect on the picture boundary check. 3526 if( unequalPictureSizeFlag ) 3527 { 3546 if( motionMapping ) 3547 { 3548 if( m_pcPic->equalPictureSizeAndOffsetFlag(refLayerIdc) ) 3549 { 3550 // copy motion field from the same sample position for the case of 1x scaling ratio and same offset value between the current and reference layers 3551 iBX = pelX; 3552 iBY = pelY; 3553 } 3554 else 3555 { 3556 // actually, motion field compression is performed in the Void TComPic::compressMotion() function, but with (+4) the rounding may have effect on the picture boundary check. 3528 3557 iBX = ( ( iBX + 4 ) >> 4 ) << 4; 3529 3558 iBY = ( ( iBY + 4 ) >> 4 ) << 4; 3530 }3531 else3532 {3533 iBX += 4;3534 iBY += 4;3535 3559 } 3536 3560 } … … 3587 3611 { 3588 3612 // check BL mode 3589 UInt 3613 UInt uiCUAddrBase = 0, uiAbsPartAddrBase = 0; 3590 3614 // the right reference layerIdc should be specified, currently it is set to m_layerId-1 3591 TComDataCU* pcTempCU = getBaseColCU(m_layerId - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, 0);3615 TComDataCU* pcTempCU = getBaseColCU(m_layerId - 1, uiAbsPartIdx, uiCUAddrBase, uiAbsPartAddrBase, false ); 3592 3616 3593 3617 if( pcTempCU->getPredictionMode( uiAbsPartAddrBase ) != MODE_INTRA ) -
trunk/source/Lib/TLibCommon/TComDataCU.h
r713 r906 469 469 Bool xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx); 470 470 #endif 471 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping = 0);472 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Int iMotionMapping = 0);471 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping = false ); 472 TComDataCU* getBaseColCU( UInt refLayerIdc, UInt pelX, UInt pelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase, Bool motionMapping = false ); 473 473 Void scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase ); 474 474 #endif -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r713 r906 155 155 Void compress(Char* pePredMode, Int scale); 156 156 157 #if AVC_SYNTAX158 Void setMv (TComMv cMv, Int iIdx ) { m_pcMv [iIdx] = cMv; }159 Void setRefIdx(Int iRefIdx, Int iIdx ) { m_piRefIdx[iIdx] = iRefIdx; }160 #endif161 162 157 #if REF_IDX_MFM 163 158 Void setMvField( TComMvField const& mvField, Int iIdx ) -
trunk/source/Lib/TLibCommon/TComPic.cpp
r815 r906 64 64 memset( m_pcFullPelBaseRec, 0, sizeof( m_pcFullPelBaseRec ) ); 65 65 memset( m_bSpatialEnhLayer, false, sizeof( m_bSpatialEnhLayer ) ); 66 memset( m_equalPictureSizeAndOffsetFlag, false, sizeof( m_equalPictureSizeAndOffsetFlag ) ); 66 67 #endif 67 68 m_apcPicYuv[0] = NULL; … … 84 85 if (!bIsVirtual) 85 86 { 87 #if R0156_CONF_WINDOW_IN_REP_FORMAT 88 #if AUXILIARY_PICTURES 89 m_apcPicYuv[0] = new TComPicYuv; m_apcPicYuv[0]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 90 #else 91 m_apcPicYuv[0] = new TComPicYuv; m_apcPicYuv[0]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 92 #endif 93 #else 86 94 #if AUXILIARY_PICTURES 87 95 m_apcPicYuv[0] = new TComPicYuv; m_apcPicYuv[0]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); … … 89 97 m_apcPicYuv[0] = new TComPicYuv; m_apcPicYuv[0]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); 90 98 #endif 91 } 99 #endif 100 } 101 #if R0156_CONF_WINDOW_IN_REP_FORMAT 102 #if AUXILIARY_PICTURES 103 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 104 #else 105 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 106 #endif 107 #else 92 108 #if AUXILIARY_PICTURES 93 109 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); … … 95 111 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); 96 112 #endif 113 #endif 97 114 98 115 for( Int i = 0; i < MAX_LAYERS; i++ ) … … 100 117 if( m_bSpatialEnhLayer[i] ) 101 118 { 119 #if R0156_CONF_WINDOW_IN_REP_FORMAT 120 #if AUXILIARY_PICTURES 121 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 122 #else 123 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, &conformanceWindow ); 124 #endif 125 #else 102 126 #if AUXILIARY_PICTURES 103 127 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, chromaFormatIDC, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); 104 128 #else 105 129 m_pcFullPelBaseRec[i] = new TComPicYuv; m_pcFullPelBaseRec[i]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth, pcSps ); 130 #endif 106 131 #endif 107 132 } … … 187 212 for( Int i = 0; i < MAX_LAYERS; i++ ) 188 213 { 189 if( m_bSpatialEnhLayer[i] )214 if( m_bSpatialEnhLayer[i] && m_pcFullPelBaseRec[i] ) 190 215 { 191 216 m_pcFullPelBaseRec[i]->destroy(); … … 260 285 Void TComPic::copyUpsampledMvField(UInt refLayerIdc, TComPic* pcPicBase) 261 286 { 262 UInt numPartitions 263 UInt widthMinPU 264 UInt heightMinPU 265 Int unitNum 287 UInt numPartitions = 1<<(g_uiMaxCUDepth<<1); 288 UInt widthMinPU = g_uiMaxCUWidth/(1<<g_uiMaxCUDepth); 289 UInt heightMinPU = g_uiMaxCUHeight/(1<<g_uiMaxCUDepth); 290 Int unitNum = max (1, (Int)((16/widthMinPU)*(16/heightMinPU)) ); 266 291 267 292 for(UInt cuIdx = 0; cuIdx < getPicSym()->getNumberOfCUsInFrame(); cuIdx++) //each LCU … … 277 302 278 303 TComDataCU *pcColCU = 0; 279 pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX + 8, pelY + 8, baseCUAddr, baseAbsPartIdx, 1);304 pcColCU = pcCUDes->getBaseColCU(refLayerIdc, pelX, pelY, baseCUAddr, baseAbsPartIdx, true); 280 305 281 306 if( pcColCU && (pcColCU->getPredictionMode(baseAbsPartIdx) != MODE_NONE) && (pcColCU->getPredictionMode(baseAbsPartIdx) != MODE_INTRA) ) //base layer unit not skip and invalid mode … … 306 331 } 307 332 } 308 memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(Char)*numPartitions );333 memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(Char)*numPartitions ); 309 334 } 310 335 } … … 332 357 } 333 358 #endif 334 #endif335 336 #if AVC_SYNTAX337 Void TComPic::readBLSyntax( fstream* filestream, UInt numBytes )338 {339 if( !filestream->good() )340 {341 return;342 }343 344 UInt width = this->getPicYuvRec()->getWidth();345 UInt height = this->getPicYuvRec()->getHeight();346 347 UInt64 poc = (UInt64)this->getPOC();348 UInt partWidth = width / 4;349 UInt partHeight = height / 4;350 351 UInt numPartInWidth = this->getNumPartInWidth();352 UInt numPartInHeight = this->getNumPartInHeight();353 UInt numPartLCUInWidth = this->getFrameWidthInCU();354 355 UInt64 uiPos = (UInt64)poc * width * height * numBytes / 16;356 357 filestream->seekg( uiPos, ios_base::beg );358 359 for( Int i = 0; i < partHeight; i++ )360 {361 for( Int j = 0; j < partWidth; j++ )362 {363 UInt x = ( j / numPartInWidth );364 UInt y = ( i / numPartInHeight );365 366 UInt addrLCU = y * numPartLCUInWidth + x;367 UInt partAddr = ( i - y * numPartInHeight ) * numPartInWidth + ( j - x * numPartInWidth );368 partAddr = g_auiRasterToZscan[partAddr];369 370 TComDataCU* pcCU = this->getCU( addrLCU );371 372 TComMv mv;373 Short temp;374 375 // RefIdxL0376 Char refIdxL0 = -1;377 filestream->read( &refIdxL0, 1 );378 assert( refIdxL0 >= -1 );379 pcCU->getCUMvField( REF_PIC_LIST_0 )->setRefIdx( (Int)refIdxL0, partAddr );380 381 // RefIdxL1382 Char refIdxL1 = -1;383 filestream->read( &refIdxL1, 1 );384 assert( refIdxL1 >= -1 );385 pcCU->getCUMvField( REF_PIC_LIST_1 )->setRefIdx( (Int)refIdxL1, partAddr );386 387 // MV L0388 temp = 0;389 filestream->read( reinterpret_cast<char*>(&temp), 2 );390 mv.setHor( (Short)temp );391 temp = 0;392 filestream->read( reinterpret_cast<char*>(&temp), 2 );393 mv.setVer( (Short)temp );394 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMv( mv, partAddr );395 396 // MV L1397 temp = 0;398 filestream->read( reinterpret_cast<char*>(&temp), 2 );399 mv.setHor( (Short)temp );400 temp = 0;401 filestream->read( reinterpret_cast<char*>(&temp), 2 );402 mv.setVer( (Short)temp );403 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMv( mv, partAddr );404 405 // set dependent information406 pcCU->setPredictionMode( partAddr, ( refIdxL0 == NOT_VALID && refIdxL1 == NOT_VALID ) ? MODE_INTRA : MODE_INTER );407 UInt interDir = ( refIdxL0 != NOT_VALID ) + ( refIdxL1 != NOT_VALID && this->getSlice(0)->isInterB() ) * 2;408 assert( interDir <= 3 );409 pcCU->setInterDir( partAddr, interDir );410 }411 }412 }413 #endif414 415 #if SYNTAX_OUTPUT416 Void TComPic::wrireBLSyntax( fstream* filestream, UInt numBytes )417 {418 if( !filestream->good() )419 {420 return;421 }422 423 UInt width = this->getPicYuvRec()->getWidth();424 UInt height = this->getPicYuvRec()->getHeight();425 426 UInt64 poc = (UInt64)this->getPOC();427 UInt partWidth = width / 4;428 UInt partHeight = height / 4;429 430 UInt numPartInWidth = this->getNumPartInWidth();431 UInt numPartInHeight = this->getNumPartInHeight();432 UInt numPartLCUInWidth = this->getFrameWidthInCU();433 434 filestream->seekg( poc * width * height * numBytes / 16 );435 436 for( Int i = 0; i < partHeight; i++ )437 {438 for( Int j = 0; j < partWidth; j++ )439 {440 UInt x = ( j / numPartInWidth );441 UInt y = ( i / numPartInHeight );442 443 UInt addrLCU = y * numPartLCUInWidth + x;444 UInt partAddr = ( i - y * numPartInHeight ) * numPartInWidth + ( j - x * numPartInWidth );445 partAddr = g_auiRasterToZscan[partAddr];446 447 TComDataCU* pcCU = this->getCU( addrLCU );448 449 TComMv mv;450 Short temp;451 Char refIdxL0 = NOT_VALID, refIdxL1 = NOT_VALID;452 453 // RefIdx454 if( !pcCU->isIntra( partAddr ) )455 {456 refIdxL0 = (Char)pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( partAddr );457 refIdxL1 = (Char)pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( partAddr );458 }459 assert( refIdxL0 >= - 1 && refIdxL1 >= - 1 );460 filestream->put( refIdxL0 );461 filestream->put( refIdxL1 );462 463 // MV L0464 mv.setZero();465 if( refIdxL0 >= 0 )466 {467 mv = pcCU->getCUMvField( REF_PIC_LIST_0 )->getMv( partAddr );468 }469 temp = (Short)mv.getHor();470 filestream->write( reinterpret_cast<char*>(&temp), 2 );471 temp = (Short)mv.getVer();472 filestream->write( reinterpret_cast<char*>(&temp), 2 );473 474 // MV L1475 mv.setZero();476 if( refIdxL1 >= 0 )477 {478 mv = pcCU->getCUMvField( REF_PIC_LIST_1 )->getMv( partAddr );479 }480 temp = (Short)mv.getHor();481 filestream->write( reinterpret_cast<char*>(&temp), 2 );482 temp = (Short)mv.getVer();483 filestream->write( reinterpret_cast<char*>(&temp), 2 );484 }485 }486 }487 359 #endif 488 360 … … 529 401 #endif 530 402 403 #if WPP_FIX 404 UInt TComPic::getSubstreamForLCUAddr(const UInt uiLCUAddr, const Bool bAddressInRaster, TComSlice *pcSlice) 405 { 406 const Int iNumSubstreams = pcSlice->getPPS()->getNumSubstreams(); 407 UInt uiSubStrm; 408 409 if (iNumSubstreams > 1) // wavefronts, and possibly tiles being used. 410 { 411 TComPicSym &picSym=*(getPicSym()); 412 const UInt uiLCUAddrRaster = bAddressInRaster?uiLCUAddr : picSym.getCUOrderMap(uiLCUAddr); 413 const UInt uiWidthInLCUs = picSym.getFrameWidthInCU(); 414 const UInt uiTileIndex=picSym.getTileIdxMap(uiLCUAddrRaster); 415 const UInt widthInTiles=(picSym.getNumColumnsMinus1()+1); 416 TComTile *pTile=picSym.getTComTile(uiTileIndex); 417 const UInt uiTileStartLCU = pTile->getFirstCUAddr(); 418 const UInt uiTileLCUY = uiTileStartLCU / uiWidthInLCUs; 419 // independent tiles => substreams are "per tile". iNumSubstreams has already been multiplied. 420 const UInt uiLin = uiLCUAddrRaster / uiWidthInLCUs; 421 UInt uiStartingSubstreamForTile=(uiTileLCUY*widthInTiles) + (pTile->getTileHeight()*(uiTileIndex%widthInTiles)); 422 uiSubStrm = uiStartingSubstreamForTile + (uiLin-uiTileLCUY); 423 } 424 else 425 { 426 // dependent tiles => substreams are "per frame". 427 uiSubStrm = 0;//uiLin % iNumSubstreams; // x modulo 1 = 0 ! 428 } 429 return uiSubStrm; 430 } 431 #endif 432 433 531 434 //! \} -
trunk/source/Lib/TLibCommon/TComPic.h
r815 r906 45 45 #include "TComBitStream.h" 46 46 #include "SEI.h" 47 #if AVC_BASE || SYNTAX_OUTPUT47 #if AVC_BASE 48 48 #include <fstream> 49 49 #endif … … 88 88 Bool m_bSpatialEnhLayer[MAX_LAYERS]; // whether current layer is a spatial enhancement layer, 89 89 TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; // upsampled base layer recontruction for difference domain inter prediction 90 #if REF_IDX_MFM 91 Bool m_equalPictureSizeAndOffsetFlag[MAX_LAYERS]; 92 #endif 90 93 #endif 91 94 #if Q0048_CGS_3D_ASYMLUT … … 203 206 #endif 204 207 #if REF_IDX_MFM 208 Bool equalPictureSizeAndOffsetFlag(UInt refLayerIdc) { return m_equalPictureSizeAndOffsetFlag[refLayerIdc]; } 209 Void setEqualPictureSizeAndOffsetFlag(UInt refLayerIdc, Bool b) { m_equalPictureSizeAndOffsetFlag[refLayerIdc] = b; } 205 210 Void copyUpsampledMvField ( UInt refLayerIdc, TComPic* pcPicBase ); 206 211 Void initUpsampledMvField (); … … 213 218 #endif 214 219 Void copyUpsampledPictureYuv(TComPicYuv* pcPicYuvIn, TComPicYuv* pcPicYuvOut); 215 #if AVC_SYNTAX216 Void readBLSyntax( fstream* filestream, UInt numBytes );217 #endif218 #endif219 #if SYNTAX_OUTPUT220 Void wrireBLSyntax( fstream* filestream, UInt numBytes );221 220 #endif 222 221 … … 229 228 Void setCurrAuFlag(Bool x) {m_currAuFlag = x; } 230 229 #endif 230 #if WPP_FIX 231 UInt getSubstreamForLCUAddr(const UInt uiLCUAddr, const Bool bAddressInRaster, TComSlice *pcSlice); 232 #endif 231 233 };// END CLASS DEFINITION TComPic 232 234 -
trunk/source/Lib/TLibCommon/TComPicSym.cpp
r595 r906 38 38 #include "TComPicSym.h" 39 39 #include "TComSampleAdaptiveOffset.h" 40 #include "TComSlice.h" 40 41 41 42 //! \ingroup TLibCommon … … 63 64 ,m_iNumColumnsMinus1 (0) 64 65 ,m_iNumRowsMinus1(0) 65 ,m_apcTComTile(NULL)66 66 ,m_puiCUOrderMap(0) 67 67 ,m_puiTileIdxMap(NULL) … … 101 101 delete [] m_apcTComSlice; 102 102 } 103 m_apcTComSlice = new TComSlice*[m_uiNumCUsInFrame *m_uiNumPartitions];103 m_apcTComSlice = new TComSlice*[m_uiNumCUsInFrame]; 104 104 m_apcTComSlice[0] = new TComSlice; 105 105 m_uiNumAllocatedSlice = 1; … … 152 152 delete [] m_apcTComDataCU; 153 153 m_apcTComDataCU = NULL; 154 155 #if SVC_EXTENSION156 if( m_apcTComTile )157 {158 #endif159 for(Int i = 0; i < (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ )160 {161 delete m_apcTComTile[i];162 }163 delete [] m_apcTComTile;164 #if SVC_EXTENSION165 }166 #endif167 168 m_apcTComTile = NULL;169 154 170 155 delete [] m_puiCUOrderMap; … … 193 178 Void TComPicSym::allocateNewSlice() 194 179 { 180 assert ((m_uiNumAllocatedSlice + 1) <= m_uiNumCUsInFrame); 195 181 m_apcTComSlice[m_uiNumAllocatedSlice ++] = new TComSlice; 196 182 if (m_uiNumAllocatedSlice>=2) … … 225 211 } 226 212 227 Void TComPicSym::xCreateTComTileArray() 228 { 229 m_apcTComTile = new TComTile*[(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1)]; 230 for( UInt i=0; i<(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ ) 231 { 232 m_apcTComTile[i] = new TComTile; 233 } 234 } 235 236 Void TComPicSym::xInitTiles() 237 { 238 UInt uiTileIdx; 239 UInt uiColumnIdx = 0; 240 UInt uiRowIdx = 0; 241 UInt uiRightEdgePosInCU; 242 UInt uiBottomEdgePosInCU; 243 Int i, j; 213 Void TComPicSym::initTiles(TComPPS *pps) 214 { 215 //set NumColumnsMinus1 and NumRowsMinus1 216 setNumColumnsMinus1( pps->getNumTileColumnsMinus1() ); 217 setNumRowsMinus1( pps->getTileNumRowsMinus1() ); 218 219 const Int numCols = pps->getNumTileColumnsMinus1() + 1; 220 const Int numRows = pps->getTileNumRowsMinus1() + 1; 221 const Int numTiles = numRows * numCols; 222 223 // allocate memory for tile parameters 224 m_tileParameters.resize(numTiles); 225 226 if( pps->getTileUniformSpacingFlag() ) 227 { 228 //set width and height for each (uniform) tile 229 for(Int row=0; row < numRows; row++) 230 { 231 for(Int col=0; col < numCols; col++) 232 { 233 const Int tileIdx = row * numCols + col; 234 m_tileParameters[tileIdx].setTileWidth( (col+1)*getFrameWidthInCU()/numCols 235 - (col*getFrameWidthInCU())/numCols ); 236 m_tileParameters[tileIdx].setTileHeight( (row+1)*getFrameHeightInCU()/numRows 237 - (row*getFrameHeightInCU())/numRows ); 238 } 239 } 240 } 241 else 242 { 243 //set the width for each tile 244 for(Int row=0; row < numRows; row++) 245 { 246 Int cumulativeTileWidth = 0; 247 for(Int col=0; col < getNumColumnsMinus1(); col++) 248 { 249 m_tileParameters[row * numCols + col].setTileWidth( pps->getTileColumnWidth(col) ); 250 cumulativeTileWidth += pps->getTileColumnWidth(col); 251 } 252 m_tileParameters[row * numCols + getNumColumnsMinus1()].setTileWidth( getFrameWidthInCU()-cumulativeTileWidth ); 253 } 254 255 //set the height for each tile 256 for(Int col=0; col < numCols; col++) 257 { 258 Int cumulativeTileHeight = 0; 259 for(Int row=0; row < getNumRowsMinus1(); row++) 260 { 261 m_tileParameters[row * numCols + col].setTileHeight( pps->getTileRowHeight(row) ); 262 cumulativeTileHeight += pps->getTileRowHeight(row); 263 } 264 m_tileParameters[getNumRowsMinus1() * numCols + col].setTileHeight( getFrameHeightInCU()-cumulativeTileHeight ); 265 } 266 } 267 268 #if TILE_SIZE_CHECK 269 Int minWidth = 1; 270 Int minHeight = 1; 271 const Int profileIdc = pps->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc(); 272 if ( profileIdc == Profile::MAIN || profileIdc == Profile::MAIN10) 273 { 274 if (pps->getTilesEnabledFlag()) 275 { 276 minHeight = 64 / g_uiMaxCUHeight; 277 minWidth = 256 / g_uiMaxCUWidth; 278 } 279 } 280 for(Int row=0; row < numRows; row++) 281 { 282 for(Int col=0; col < numCols; col++) 283 { 284 const Int tileIdx = row * numCols + col; 285 assert (m_tileParameters[tileIdx].getTileWidth() >= minWidth); 286 assert (m_tileParameters[tileIdx].getTileHeight() >= minHeight); 287 } 288 } 289 #endif 244 290 245 291 //initialize each tile of the current picture 246 for( uiRowIdx=0; uiRowIdx < m_iNumRowsMinus1+1; uiRowIdx++ )247 { 248 for( uiColumnIdx=0; uiColumnIdx < m_iNumColumnsMinus1+1; uiColumnIdx++ )249 { 250 uiTileIdx = uiRowIdx * (m_iNumColumnsMinus1+1) + uiColumnIdx;292 for( Int row=0; row < numRows; row++ ) 293 { 294 for( Int col=0; col < numCols; col++ ) 295 { 296 const Int tileIdx = row * numCols + col; 251 297 252 298 //initialize the RightEdgePosInCU for each tile 253 uiRightEdgePosInCU = 0;254 for( i=0; i <= uiColumnIdx; i++ )255 { 256 uiRightEdgePosInCU += this->getTComTile(uiRowIdx * (m_iNumColumnsMinus1+1) + i)->getTileWidth();257 } 258 this->getTComTile(uiTileIdx)->setRightEdgePosInCU(uiRightEdgePosInCU-1);299 Int rightEdgePosInCTU = 0; 300 for( Int i=0; i <= col; i++ ) 301 { 302 rightEdgePosInCTU += m_tileParameters[row * numCols + i].getTileWidth(); 303 } 304 m_tileParameters[tileIdx].setRightEdgePosInCU(rightEdgePosInCTU-1); 259 305 260 306 //initialize the BottomEdgePosInCU for each tile 261 uiBottomEdgePosInCU = 0;262 for( i=0; i <= uiRowIdx; i++ )263 { 264 uiBottomEdgePosInCU += this->getTComTile(i * (m_iNumColumnsMinus1+1) + uiColumnIdx)->getTileHeight();265 } 266 this->getTComTile(uiTileIdx)->setBottomEdgePosInCU(uiBottomEdgePosInCU-1);307 Int bottomEdgePosInCTU = 0; 308 for( Int i=0; i <= row; i++ ) 309 { 310 bottomEdgePosInCTU += m_tileParameters[i * numCols + col].getTileHeight(); 311 } 312 m_tileParameters[tileIdx].setBottomEdgePosInCU(bottomEdgePosInCTU-1); 267 313 268 314 //initialize the FirstCUAddr for each tile 269 this->getTComTile(uiTileIdx)->setFirstCUAddr( (this->getTComTile(uiTileIdx)->getBottomEdgePosInCU() - this->getTComTile(uiTileIdx)->getTileHeight() +1)*m_uiWidthInCU + 270 this->getTComTile(uiTileIdx)->getRightEdgePosInCU() - this->getTComTile(uiTileIdx)->getTileWidth() + 1); 271 } 272 } 315 m_tileParameters[tileIdx].setFirstCUAddr( (m_tileParameters[tileIdx].getBottomEdgePosInCU() - m_tileParameters[tileIdx].getTileHeight() + 1) * getFrameWidthInCU() + 316 m_tileParameters[tileIdx].getRightEdgePosInCU() - m_tileParameters[tileIdx].getTileWidth() + 1); 317 } 318 } 319 320 Int columnIdx = 0; 321 Int rowIdx = 0; 273 322 274 323 //initialize the TileIdxMap 275 for( i=0; i<m_uiNumCUsInFrame; i++) 276 { 277 for(j=0; j < m_iNumColumnsMinus1+1; j++) 278 { 279 if(i % m_uiWidthInCU <= this->getTComTile(j)->getRightEdgePosInCU()) 280 { 281 uiColumnIdx = j; 282 j = m_iNumColumnsMinus1+1; 283 } 284 } 285 for(j=0; j < m_iNumRowsMinus1+1; j++) 286 { 287 if(i/m_uiWidthInCU <= this->getTComTile(j*(m_iNumColumnsMinus1 + 1))->getBottomEdgePosInCU()) 288 { 289 uiRowIdx = j; 290 j = m_iNumRowsMinus1 + 1; 291 } 292 } 293 m_puiTileIdxMap[i] = uiRowIdx * (m_iNumColumnsMinus1 + 1) + uiColumnIdx; 294 } 295 324 for( Int i=0; i<m_uiNumCUsInFrame; i++) 325 { 326 for( Int col=0; col < numCols; col++) 327 { 328 if(i % getFrameWidthInCU() <= m_tileParameters[col].getRightEdgePosInCU()) 329 { 330 columnIdx = col; 331 break; 332 } 333 } 334 for(Int row=0; row < numRows; row++) 335 { 336 if(i / getFrameWidthInCU() <= m_tileParameters[row*numCols].getBottomEdgePosInCU()) 337 { 338 rowIdx = row; 339 break; 340 } 341 } 342 m_puiTileIdxMap[i] = rowIdx * numCols + columnIdx; 343 } 296 344 } 297 345 … … 441 489 442 490 TComTile::TComTile() 491 : m_uiTileWidth (0) 492 , m_uiTileHeight (0) 493 , m_uiRightEdgePosInCU (0) 494 , m_uiBottomEdgePosInCU (0) 495 , m_uiFirstCUAddr (0) 496 443 497 { 444 498 } -
trunk/source/Lib/TLibCommon/TComPicSym.h
r595 r906 45 45 #include "TComDataCU.h" 46 46 class TComSampleAdaptiveOffset; 47 class TComPPS; 47 48 48 49 //! \ingroup TLibCommon … … 102 103 Int m_iNumColumnsMinus1; 103 104 Int m_iNumRowsMinus1; 104 TComTile** m_apcTComTile;105 std::vector<TComTile> m_tileParameters; 105 106 UInt* m_puiCUOrderMap; //the map of LCU raster scan address relative to LCU encoding order 106 107 UInt* m_puiTileIdxMap; //the map of the tile index relative to LCU raster scan address … … 142 143 Int getNumRowsMinus1() { return m_iNumRowsMinus1; } 143 144 Int getNumTiles() { return (m_iNumRowsMinus1+1)*(m_iNumColumnsMinus1+1); } 144 TComTile* getTComTile ( UInt tileIdx ) { return *(m_apcTComTile + tileIdx); }145 TComTile* getTComTile ( UInt tileIdx ) { return &(m_tileParameters[tileIdx]); } 145 146 Void setCUOrderMap( Int encCUOrder, Int cuAddr ) { *(m_puiCUOrderMap + encCUOrder) = cuAddr; } 146 147 UInt getCUOrderMap( Int encCUOrder ) { return *(m_puiCUOrderMap + (encCUOrder>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : encCUOrder)); } … … 150 151 UInt getPicSCUEncOrder( UInt SCUAddr ); 151 152 UInt getPicSCUAddr( UInt SCUEncOrder ); 152 Void xCreateTComTileArray(); 153 Void xInitTiles(); 153 Void initTiles(TComPPS *pps); 154 154 UInt xCalculateNxtCUAddr( UInt uiCurrCUAddr ); 155 155 SAOBlkParam* getSAOBlkParam() { return m_saoBlkParams;} … … 160 160 UInt getMaxCUWidth() { return m_uiMaxCUWidth; } 161 161 UInt getMaxCUHeight() { return m_uiMaxCUHeight; } 162 #endif163 #if AVC_SYNTAX164 UInt getMaxCUWidth() { return m_uiMaxCUWidth; }165 UInt getMaxCUHeight() { return m_uiMaxCUHeight; }166 UInt getMaxDepth() { return m_uhTotalDepth; }167 162 #endif 168 163 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI -
trunk/source/Lib/TLibCommon/TComPicYuv.cpp
r815 r906 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 … … 366 381 } 367 382 368 #if SVC_EXTENSION369 383 Void TComPicYuv::dump( Char* pFileName, Bool bAdd, Int bitDepth ) 370 384 { … … 431 445 } 432 446 433 #endif434 435 447 //! \} -
trunk/source/Lib/TLibCommon/TComPicYuv.h
r815 r906 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 … … 191 199 Void convertToMonochrome(); 192 200 #endif 201 #endif //SVC_EXTENSION 193 202 Void dump( Char* pFileName, Bool bAdd, Int bitDepth ); 194 #endif //SVC_EXTENSION195 203 196 204 };// END CLASS DEFINITION TComPicYuv -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r815 r906 796 796 #else 797 797 #if O0194_JOINT_US_BITSHIFT 798 #if REF_REGION_OFFSET 799 Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, const Window altRefWindow ) 800 { 801 m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window, altRefWindow ); 802 } 803 #else 798 804 Void TComPrediction::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window) 799 805 { 800 806 m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window); 801 807 } 808 #endif 802 809 #else 803 810 Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window) -
trunk/source/Lib/TLibCommon/TComPrediction.h
r815 r906 126 126 #else 127 127 #if O0194_JOINT_US_BITSHIFT 128 #if REF_REGION_OFFSET 129 Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, const Window altRefWindow ); 130 #else 128 131 Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); 132 #endif 129 133 #else 130 134 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r815 r906 36 36 */ 37 37 38 #include <numeric> 38 39 #include "CommonDef.h" 39 40 #include "TComSlice.h" … … 47 48 #if SVC_EXTENSION 48 49 ParameterSetMap<TComVPS> ParameterSetManager::m_vpsMap(MAX_NUM_VPS); 50 ParameterSetMap<TComSPS> ParameterSetManager::m_spsMap(MAX_NUM_SPS); 51 ParameterSetMap<TComPPS> ParameterSetManager::m_ppsMap(MAX_NUM_PPS); 49 52 Int ParameterSetManager::m_activeVPSId = -1; 50 53 #endif … … 104 107 , m_temporalLayerNonReferenceFlag ( false ) 105 108 , m_enableTMVPFlag ( true ) 109 #if R0226_SLICE_TMVP 110 , m_availableForTMVPRefFlag ( true ) 111 #endif 106 112 #if SVC_EXTENSION 107 113 , m_layerId ( 0 ) … … 124 130 , m_pocMsbValRequiredFlag ( false ) 125 131 , m_pocMsbValPresentFlag ( false ) 132 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 133 , m_pocMsbValNeeded ( false ) 134 #endif 126 135 #endif 127 136 #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER … … 215 224 m_picOrderCntLsb = 0; 216 225 #endif 226 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 227 m_pocMsbValNeeded = false; 228 m_pocResetDeltaPoc = 0; 229 #endif 217 230 } 218 231 … … 265 278 } 266 279 } 280 267 281 Int TComSlice::getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal ) 268 282 { … … 281 295 } 282 296 #endif 297 283 298 /** 284 299 - allocate table to contain substream sizes to be written to the slice header. … … 516 531 #endif 517 532 518 #if SVC_EXTENSION519 for( i = 0; i < m_activeNumILRRefIdx; i++ )520 {521 UInt refLayerIdc = m_interLayerPredLayerIdc[i];522 //inter-layer reference picture523 #if O0225_MAX_TID_FOR_REF_LAYERS524 Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId) : 0;525 #else526 Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()) : 0;527 #endif528 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<= maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) )529 {530 #if REF_IDX_MFM531 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && getMFMEnabledFlag())532 {533 ilpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] );534 }535 else536 {537 ilpPic[refLayerIdc]->initUpsampledMvField();538 }539 #endif540 ilpPic[refLayerIdc]->setIsLongTerm(1);541 }542 }543 #endif544 533 // ref_pic_list_init 545 534 TComPic* rpsCurrList0[MAX_NUM_REF+1]; … … 595 584 UInt refLayerId = m_pcVPS->getRefLayerId( m_layerId, refLayerIdc ); 596 585 #if RESAMPLING_CONSTRAINT_BUG_FIX 586 #if MOVE_SCALED_OFFSET_TO_PPS 587 #if O0098_SCALED_REF_LAYER_ID 588 const Window &scalEL = getPPS()->getScaledRefLayerWindowForLayer(refLayerId); 589 #else 590 const Window &scalEL = getPPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 591 #endif 592 #else 597 593 #if O0098_SCALED_REF_LAYER_ID 598 594 const Window &scalEL = getSPS()->getScaledRefLayerWindowForLayer(refLayerId); 599 595 #else 600 596 const Window &scalEL = getSPS()->getScaledRefLayerWindow(m_interLayerPredLayerIdc[i]); 597 #endif 601 598 #endif 602 599 Int scalingOffset = ((scalEL.getWindowLeftOffset() == 0 ) && … … 1942 1939 Int nrOfPositivePictures = 0; 1943 1940 TComReferencePictureSet* pcRPS = this->getLocalRPS(); 1941 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 1942 Bool pocsAdjusted = false; 1943 #endif 1944 1944 1945 1945 // loop through all pictures in the Reference Picture Set … … 1954 1954 rpcPic = *(iterPic++); 1955 1955 1956 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 1957 // poc adjustement by poc reset needs to be taken into account here 1958 Int deltaPOC = pReferencePictureSet->getDeltaPOC(i) - rpcPic->getPicSym()->getSlice(0)->getPocResetDeltaPoc(); 1959 if (rpcPic->getPicSym()->getSlice(0)->getPocResetDeltaPoc() != 0) 1960 { 1961 pocsAdjusted = true; 1962 } 1963 1964 if (rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + deltaPOC && rpcPic->getSlice(0)->isReferenced()) 1965 #else 1956 1966 if(rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i) && rpcPic->getSlice(0)->isReferenced()) 1967 #endif 1957 1968 { 1958 1969 // This picture exists as a reference picture 1959 1970 // and should be added to the explicit Reference Picture Set 1971 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 1972 pcRPS->setDeltaPOC(k, deltaPOC); 1973 #else 1960 1974 pcRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i)); 1975 #endif 1961 1976 pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP)); 1962 1977 #if ALLOW_RECOVERY_POINT_AS_RAP 1978 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 1979 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + deltaPOC < pocRandomAccess) ); 1980 #else 1963 1981 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) ); 1982 #endif 1964 1983 #endif 1965 1984 if(pcRPS->getDeltaPOC(k) < 0) … … 2005 2024 || useNewRPS 2006 2025 #endif 2026 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 2027 || pocsAdjusted // inter RPS prediction does not work if POCs have been adjusted 2028 #endif 2007 2029 ) 2008 2030 { … … 2139 2161 UInt retVal, layerId = getLayerId(); 2140 2162 #if O0096_REP_FORMAT_INDEX 2163 #if R0279_REP_FORMAT_INBL 2164 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) 2165 { 2166 #if VPS_AVC_BL_FLAG_REMOVAL 2167 if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() ) 2168 #else 2169 if( layerId == 0 && vps->getAvcBaseLayerFlag() ) 2170 #endif 2171 #else 2141 2172 if ( layerId == 0 ) 2142 2173 { 2143 2174 if( vps->getAvcBaseLayerFlag() ) 2175 #endif 2144 2176 { 2145 2177 retVal = vps->getVpsRepFormat(layerId)->getPicWidthVpsInLumaSamples(); … … 2172 2204 UInt retVal, layerId = getLayerId(); 2173 2205 #if O0096_REP_FORMAT_INDEX 2174 if( layerId == 0 ) 2206 #if R0279_REP_FORMAT_INBL 2207 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) 2208 { 2209 #if VPS_AVC_BL_FLAG_REMOVAL 2210 if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() ) 2211 #else 2212 if( layerId == 0 && vps->getAvcBaseLayerFlag() ) 2213 #endif 2214 #else 2215 if ( layerId == 0 ) 2175 2216 { 2176 2217 if( vps->getAvcBaseLayerFlag() ) 2218 #endif 2177 2219 { 2178 2220 retVal = vps->getVpsRepFormat(layerId)->getPicHeightVpsInLumaSamples(); … … 2214 2256 #endif 2215 2257 #if O0096_REP_FORMAT_INDEX 2216 if( layerId == 0 ) 2258 #if R0279_REP_FORMAT_INBL 2259 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) 2260 { 2261 #if VPS_AVC_BL_FLAG_REMOVAL 2262 if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() ) 2263 #else 2264 if( layerId == 0 && vps->getAvcBaseLayerFlag() ) 2265 #endif 2266 #else 2267 if ( layerId == 0 ) 2217 2268 { 2218 2269 if( vps->getAvcBaseLayerFlag() ) 2270 #endif 2219 2271 { 2220 2272 retVal = vps->getVpsRepFormat(layerId)->getChromaFormatVpsIdc(); … … 2247 2299 UInt retVal, layerId = getLayerId(); 2248 2300 #if O0096_REP_FORMAT_INDEX 2249 if( layerId == 0 ) 2301 #if R0279_REP_FORMAT_INBL 2302 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) 2303 #else 2304 if ( layerId == 0 ) 2305 #endif 2250 2306 { 2251 2307 retVal = sps->getBitDepthY(); … … 2273 2329 UInt retVal, layerId = getLayerId(); 2274 2330 #if O0096_REP_FORMAT_INDEX 2275 if( layerId == 0 ) 2331 #if R0279_REP_FORMAT_INBL 2332 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) 2333 #else 2334 if ( layerId == 0 ) 2335 #endif 2276 2336 { 2277 2337 retVal = sps->getBitDepthC(); … … 2301 2361 return (getBitDepthC() - 8) * 6; 2302 2362 } 2363 2364 #if R0156_CONF_WINDOW_IN_REP_FORMAT 2365 Window& TComSlice::getConformanceWindow() 2366 { 2367 TComSPS *sps = getSPS(); 2368 TComVPS *vps = getVPS(); 2369 UInt layerId = getLayerId(); 2370 #if O0096_REP_FORMAT_INDEX 2371 #if R0279_REP_FORMAT_INBL 2372 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) 2373 { 2374 #if VPS_AVC_BL_FLAG_REMOVAL 2375 if( layerId == 0 && vps->getNonHEVCBaseLayerFlag() ) 2376 #else 2377 if( layerId == 0 && vps->getAvcBaseLayerFlag() ) 2378 #endif 2379 #else 2380 if ( layerId == 0 ) 2381 { 2382 if( vps->getAvcBaseLayerFlag() ) 2383 #endif 2384 { 2385 return vps->getVpsRepFormat(layerId)->getConformanceWindowVps(); 2386 } 2387 else 2388 { 2389 return sps->getConformanceWindow(); 2390 } 2391 } 2392 else 2393 { 2394 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : layerId) )->getConformanceWindowVps(); 2395 } 2396 #else 2397 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 2398 { 2399 return sps->getConformanceWindow(); 2400 } 2401 else 2402 { 2403 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getConformanceWindowVps(); 2404 } 2405 #endif 2406 } 2407 #endif 2303 2408 2304 2409 RepFormat::RepFormat() … … 2323 2428 m_bitDepthVpsLuma = 0; 2324 2429 m_bitDepthVpsChroma = 0; 2430 #if R0156_CONF_WINDOW_IN_REP_FORMAT 2431 m_conformanceWindowVps.resetWindow(); 2432 #endif 2325 2433 } 2326 2434 #endif … … 2333 2441 TComVPS::TComVPS() 2334 2442 : m_VPSId ( 0) 2443 #if VPS_RESERVED_FLAGS 2444 , m_baseLayerInternalFlag (true) 2445 , m_baseLayerAvailableFlag (true) 2446 #endif 2335 2447 , m_uiMaxTLayers ( 1) 2336 2448 , m_uiMaxLayers ( 1) … … 2384 2496 , m_vpsNonVuiExtLength (0) 2385 2497 #endif 2498 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 2499 , m_vpsPocLsbAlignedFlag(false) 2500 #endif 2386 2501 { 2387 2502 for( Int i = 0; i < MAX_TLAYER; i++) … … 2392 2507 } 2393 2508 #if VPS_EXTN_MASK_AND_DIM_INFO 2509 #if VPS_AVC_BL_FLAG_REMOVAL 2510 m_nonHEVCBaseLayerFlag = false; 2511 #else 2394 2512 m_avcBaseLayerFlag = false; 2513 #endif 2395 2514 m_splittingFlag = false; 2396 2515 ::memset(m_scalabilityMask, 0, sizeof(m_scalabilityMask)); … … 2422 2541 ::memset(m_directDependencyType, 0, sizeof(m_directDependencyType)); 2423 2542 #endif 2543 #if !NECESSARY_LAYER_FLAG 2424 2544 #if DERIVE_LAYER_ID_LIST_VARIABLES 2425 2545 ::memset(m_layerSetLayerIdList, 0, sizeof(m_layerSetLayerIdList)); 2426 2546 ::memset(m_numLayerInIdList, 0, sizeof(m_numLayerInIdList )); 2427 2547 #endif 2548 #endif 2549 #if !PER_LAYER_PTL 2428 2550 ::memset(m_profileLevelTierIdx, 0, sizeof(m_profileLevelTierIdx)); 2551 #endif 2429 2552 m_maxOneActiveRefLayerFlag = true; 2430 2553 #if O0062_POC_LSB_NOT_PRESENT_FLAG … … 2542 2665 } 2543 2666 #if DERIVE_LAYER_ID_LIST_VARIABLES 2667 #if NECESSARY_LAYER_FLAG 2668 Void TComVPS::deriveLayerIdListVariables() 2669 { 2670 // For layer 0 2671 m_numLayerInIdList.push_back(1); 2672 m_layerSetLayerIdList.resize(m_numLayerSets); 2673 m_layerSetLayerIdList[0].push_back(0); 2674 2675 // For other layers 2676 for( Int i = 1; i < m_numLayerSets; i++ ) 2677 { 2678 for( Int m = 0; m <= m_maxLayerId; m++) 2679 { 2680 if( m_layerIdIncludedFlag[i][m] ) 2681 { 2682 m_layerSetLayerIdList[i].push_back(m); 2683 } 2684 } 2685 m_numLayerInIdList.push_back(m_layerSetLayerIdList[i].size()); 2686 } 2687 } 2688 #else 2544 2689 Void TComVPS::deriveLayerIdListVariables() 2545 2690 { … … 2564 2709 } 2565 2710 #endif 2711 #endif 2566 2712 #if !RESOLUTION_BASED_DPB 2567 2713 #if VPS_DPB_SIZE_TABLE … … 2660 2806 Void TComVPS::setPredictedLayerIds() 2661 2807 { 2662 for (UInt i = 0; i < getMaxLayers()- 1; i++)2663 { 2664 UInt iNuhLId = getLayerIdInNuh(i);2808 for (UInt i = 0; i < m_uiMaxLayers - 1; i++) 2809 { 2810 UInt iNuhLId = m_layerIdInNuh[i]; 2665 2811 UInt predIdx = 0; 2666 2812 for (UInt j = iNuhLId + 1; j < MAX_NUM_LAYER_IDS; j++) 2667 2813 { 2668 if (getRecursiveRefLayerFlag(j, iNuhLId))2669 { 2670 setPredictedLayerId(i, predIdx, j);2814 if( m_recursiveRefLayerFlag[j][iNuhLId] ) 2815 { 2816 m_predictedLayerId[iNuhLId][predIdx] = j; 2671 2817 predIdx++; 2672 2818 } 2673 2819 } 2674 setNumPredictedLayers(iNuhLId, predIdx); 2675 } 2820 m_numPredictedLayers[iNuhLId] = predIdx; 2821 } 2822 m_numPredictedLayers[m_layerIdInNuh[m_uiMaxLayers-1]] = 0; 2676 2823 } 2677 2824 … … 2679 2826 { 2680 2827 Bool countedLayerIdxFlag[MAX_NUM_LAYER_IDS]; 2681 2682 for (UInt i = 0; i <= getMaxLayers() - 1; i++) 2683 { 2684 countedLayerIdxFlag[i] = false; 2685 } 2828 memset( countedLayerIdxFlag, 0, sizeof(countedLayerIdxFlag) ); 2686 2829 2687 2830 Int numIndependentLayers = 0; 2688 2831 2689 for (UInt i = 0; i < = getMaxLayers() - 1; i++)2690 { 2691 UInt iNuhLId = getLayerIdInNuh(i);2692 if (getNumDirectRefLayers(iNuhLId) == 0)2693 { 2694 setTreePartitionLayerId(numIndependentLayers, 0, iNuhLId);2695 setNumLayersInTreePartition(numIndependentLayers, 1);2696 for (UInt j = 0; j < getNumPredictedLayers(iNuhLId); j++)2697 { 2698 if (!countedLayerIdxFlag[getLayerIdInVps(iNuhLId)])2699 { 2700 setTreePartitionLayerId(numIndependentLayers, getNumLayersInTreePartition(numIndependentLayers), getPredictedLayerId(iNuhLId, j));2701 setNumLayersInTreePartition(numIndependentLayers, getNumLayersInTreePartition(numIndependentLayers) + 1);2702 countedLayerIdxFlag[ getLayerIdInVps(getPredictedLayerId(iNuhLId, j))] = true;2832 for (UInt i = 0; i < m_uiMaxLayers; i++) 2833 { 2834 UInt iNuhLId = m_layerIdInNuh[i]; 2835 if( m_numDirectRefLayers[iNuhLId] == 0 ) 2836 { 2837 m_treePartitionLayerIdList[numIndependentLayers][0] = iNuhLId; 2838 m_numLayersInTreePartition[numIndependentLayers] = 1; 2839 for( UInt j = 0; j < m_numPredictedLayers[iNuhLId]; j++ ) 2840 { 2841 if( !countedLayerIdxFlag[m_layerIdInVps[iNuhLId]] ) 2842 { 2843 m_treePartitionLayerIdList[numIndependentLayers][m_numLayersInTreePartition[numIndependentLayers]] = m_predictedLayerId[iNuhLId][j]; 2844 m_numLayersInTreePartition[numIndependentLayers] = m_numLayersInTreePartition[numIndependentLayers] + 1; 2845 countedLayerIdxFlag[m_layerIdInVps[m_predictedLayerId[iNuhLId][j]]] = true; 2703 2846 } 2704 2847 } … … 2707 2850 } 2708 2851 2709 setNumIndependentLayers(numIndependentLayers);2852 m_numIndependentLayers = numIndependentLayers; 2710 2853 } 2711 2854 2712 2855 void TComVPS::setLayerIdIncludedFlagsForAddLayerSets() 2713 2856 { 2714 for (UInt i = 0; i < getNumAddLayerSets(); i++)2715 { 2716 for (UInt j = 1; j < getNumIndependentLayers(); j++)2857 for (UInt i = 0; i < m_numAddLayerSets; i++) 2858 { 2859 for (UInt j = 1; j < m_numIndependentLayers; j++) 2717 2860 { 2718 2861 Int layerNum = 0; 2719 Int lsIdx = getVpsNumLayerSetsMinus1()+ 1 + i;2862 Int lsIdx = m_vpsNumLayerSetsMinus1 + 1 + i; 2720 2863 for (Int layerId = 0; layerId < MAX_VPS_LAYER_ID_PLUS1; layerId++) 2721 2864 { 2722 setLayerIdIncludedFlag(false, lsIdx, layerId);2723 } 2724 for (Int treeIdx = 1; treeIdx < getNumIndependentLayers(); treeIdx++)2725 { 2726 for (Int layerCnt = 0; layerCnt < getHighestLayerIdxPlus1(i, j); layerCnt++)2727 { 2728 setLayerSetLayerIdList(lsIdx, layerNum, getTreePartitionLayerId(treeIdx, layerCnt));2729 setLayerIdIncludedFlag(true, lsIdx, getTreePartitionLayerId(treeIdx, layerCnt));2865 m_layerIdIncludedFlag[lsIdx][layerId] = false; 2866 } 2867 for (Int treeIdx = 1; treeIdx < m_numIndependentLayers; treeIdx++) 2868 { 2869 for (Int layerCnt = 0; layerCnt < m_highestLayerIdxPlus1[i][j]; layerCnt++) 2870 { 2871 m_layerSetLayerIdList[lsIdx][layerNum] = m_treePartitionLayerIdList[treeIdx][layerCnt]; 2872 m_layerIdIncludedFlag[lsIdx][m_treePartitionLayerIdList[treeIdx][layerCnt]] = true; 2730 2873 layerNum++; 2731 2874 } 2732 2875 } 2733 setNumLayersInIdList(lsIdx, layerNum);2876 m_numLayerInIdList[lsIdx] = layerNum; 2734 2877 } 2735 2878 } … … 2979 3122 } 2980 3123 #endif 3124 #if NECESSARY_LAYER_FLAG 3125 Void TComVPS::deriveNecessaryLayerFlag() 3126 { 3127 m_necessaryLayerFlag.empty(); 3128 m_numNecessaryLayers.empty(); 3129 // Assumed that output layer sets and variables RecursiveRefLayer are already derived 3130 for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++) 3131 { 3132 deriveNecessaryLayerFlag(olsIdx); 3133 } 3134 } 3135 Void TComVPS::deriveNecessaryLayerFlag(Int const olsIdx) 3136 { 3137 Int lsIdx = this->getOutputLayerSetIdx( olsIdx ); 3138 Int numLayersInLs = this->getNumLayersInIdList( lsIdx ); 3139 assert( m_necessaryLayerFlag.size() == olsIdx ); // Function should be called in the correct order. 3140 m_necessaryLayerFlag.push_back( std::vector<Bool>( numLayersInLs, false ) ); // Initialize to false 3141 for( Int lsLayerIdx = 0; lsLayerIdx < numLayersInLs; lsLayerIdx++ ) 3142 { 3143 if( this->m_outputLayerFlag[olsIdx][lsLayerIdx] ) 3144 { 3145 m_necessaryLayerFlag[olsIdx][lsLayerIdx] = true; 3146 Int currNuhLayerId = this->m_layerSetLayerIdList[lsIdx][lsLayerIdx]; 3147 for( Int rLsLayerIdx = 0; rLsLayerIdx < lsLayerIdx; rLsLayerIdx++ ) 3148 { 3149 Int refNuhLayerId = this->m_layerSetLayerIdList[lsIdx][rLsLayerIdx]; 3150 if( this->m_recursiveRefLayerFlag[currNuhLayerId][refNuhLayerId] ) 3151 { 3152 m_necessaryLayerFlag[olsIdx][rLsLayerIdx] = true; 3153 } 3154 } 3155 } 3156 } 3157 m_numNecessaryLayers.push_back(std::accumulate(m_necessaryLayerFlag[olsIdx].begin(), m_necessaryLayerFlag[olsIdx].end(), 0)); 3158 } 3159 Void TComVPS::checkNecessaryLayerFlagCondition() 3160 { 3161 /* It is a requirement of bitstream conformance that for each layer index layerIdx in the range of 3162 ( vps_base_layer_internal_flag ? 0 : 1 ) to MaxLayersMinus1, inclusive, there shall be at least one OLS with index olsIdx such that 3163 NecessaryLayerFlag[ olsIdx ][ lsLayerIdx ] is equal to 1 for the value of lsLayerIdx 3164 for which LayerSetLayerIdList[ OlsIdxToLsIdx[ olsIdx ] ][ lsLayerIdx ] is equal to layer_id_in_nuh[ layerIdx ]. */ 3165 for(Int layerIdx = this->getBaseLayerInternalFlag() ? 0 : 1; layerIdx < this->getMaxLayers(); layerIdx++) 3166 { 3167 Bool layerFoundNecessaryLayerFlag = false; 3168 for(Int olsIdx = 0; olsIdx < this->getNumOutputLayerSets(); olsIdx++) 3169 { 3170 Int lsIdx = this->getOutputLayerSetIdx( olsIdx ); 3171 Int currNuhLayerId = this->getLayerIdInNuh( layerIdx ); 3172 std::vector<Int>::iterator iter = std::find( m_layerSetLayerIdList[lsIdx].begin(), m_layerSetLayerIdList[lsIdx].end(), currNuhLayerId ); 3173 if( iter != m_layerSetLayerIdList[lsIdx].end() ) // Layer present in layer set 3174 { 3175 size_t positionLayer = iter - m_layerSetLayerIdList[lsIdx].begin(); 3176 if( *(m_necessaryLayerFlag[olsIdx].begin() + positionLayer) == true ) 3177 { 3178 layerFoundNecessaryLayerFlag = true; 3179 break; 3180 } 3181 } 3182 } 3183 assert( layerFoundNecessaryLayerFlag ); 3184 } 3185 } 3186 #endif 3187 #if PER_LAYER_PTL 3188 Int TComVPS::calculateLenOfSyntaxElement( Int const numVal ) 3189 { 3190 Int numBits = 1; 3191 while((1 << numBits) < numVal) 3192 { 3193 numBits++; 3194 } 3195 return numBits; 3196 } 3197 #endif 3198 #if SUB_LAYERS_IN_LAYER_SET 3199 Void TComVPS::calculateMaxSLInLayerSets() 3200 { 3201 for(Int lsIdx = 0; lsIdx < getNumLayerSets(); lsIdx++) 3202 { 3203 UInt maxSLMinus1 = 0; 3204 for(Int k = 0; k < getNumLayersInIdList(lsIdx); k++ ) { 3205 Int lId = getLayerSetLayerIdList(lsIdx, k); 3206 maxSLMinus1 = std::max(maxSLMinus1, getMaxTSLayersMinus1(getLayerIdInVps(lId))); 3207 } 3208 setMaxSLayersInLayerSetMinus1(lsIdx,maxSLMinus1); 3209 } 3210 } 3211 #endif 3212 2981 3213 #if RESOLUTION_BASED_DPB 2982 3214 // RepFormat Assignment operator … … 2992 3224 m_bitDepthVpsLuma = other.m_bitDepthVpsLuma; 2993 3225 m_bitDepthVpsChroma = other.m_bitDepthVpsChroma; 3226 #if R0156_CONF_WINDOW_IN_REP_FORMAT 3227 m_conformanceWindowVps = other.m_conformanceWindowVps; 3228 #endif 2994 3229 } 2995 3230 return *this; … … 3016 3251 , m_chromaFormatIdc (CHROMA_420) 3017 3252 , m_uiMaxTLayers ( 1) 3253 #if R0279_REP_FORMAT_INBL 3254 , m_bV1CompatibleSPSFlag ( 0) 3255 #endif 3018 3256 // Structure 3019 3257 , m_picWidthInLumaSamples (352) … … 3052 3290 , m_layerId ( 0 ) 3053 3291 , m_extensionFlag ( false ) 3292 #if !MOVE_SCALED_OFFSET_TO_PPS 3054 3293 , m_numScaledRefLayerOffsets ( 0 ) 3294 #endif 3055 3295 #if REPN_FORMAT_IN_VPS 3056 3296 , m_updateRepFormatFlag (false) … … 3075 3315 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 3076 3316 3317 #if !MOVE_SCALED_OFFSET_TO_PPS 3077 3318 #if P0312_VERT_PHASE_ADJ 3078 3319 ::memset(m_vertPhasePositionEnableFlag, 0, sizeof(m_vertPhasePositionEnableFlag)); 3320 #endif 3079 3321 #endif 3080 3322 } … … 3208 3450 const Int TComSPS::m_winUnitY[]={1,2,1,1}; 3209 3451 3452 #if !MOVE_SCALED_OFFSET_TO_PPS 3210 3453 #if O0098_SCALED_REF_LAYER_ID 3211 3454 Window& TComSPS::getScaledRefLayerWindowForLayer(Int layerId) … … 3224 3467 return win; 3225 3468 } 3469 #endif 3470 #if REF_REGION_OFFSET 3471 Window& TComSPS::getRefLayerWindowForLayer(Int layerId) 3472 { 3473 static Window win; 3474 3475 for (Int i = 0; i < m_numRefLayerOffsets; i++) 3476 { 3477 if (layerId == m_refLayerId[i]) 3478 { 3479 return m_refLayerWindow[i]; 3480 } 3481 } 3482 3483 win.resetWindow(); // reference region offsets are inferred to be zero when not present 3484 return win; 3485 } 3486 #endif 3226 3487 #endif 3227 3488 … … 3246 3507 , m_entropyCodingSyncEnabledFlag (false) 3247 3508 , m_loopFilterAcrossTilesEnabledFlag (true) 3248 , m_uniformSpacingFlag (0) 3249 , m_iNumColumnsMinus1 (0) 3250 , m_puiColumnWidth (NULL) 3251 , m_iNumRowsMinus1 (0) 3252 , m_puiRowHeight (NULL) 3253 , m_iNumSubstreams (1) 3509 , m_uniformSpacingFlag (false) 3510 , m_numTileColumnsMinus1 (0) 3511 , m_numTileRowsMinus1 (0) 3512 , m_numSubstreams (1) 3254 3513 , m_signHideFlag(0) 3255 3514 , m_cabacInitPresentFlag (false) … … 3269 3528 , m_pocResetInfoPresentFlag (false) 3270 3529 #endif 3530 #if MOVE_SCALED_OFFSET_TO_PPS 3531 , m_numScaledRefLayerOffsets ( 0 ) 3532 #endif 3271 3533 #if Q0048_CGS_3D_ASYMLUT 3272 3534 , m_nCGSFlag(0) … … 3277 3539 { 3278 3540 m_scalingList = new TComScalingList; 3541 #if REF_REGION_OFFSET 3542 ::memset(m_scaledRefLayerOffsetPresentFlag, 0, sizeof(m_scaledRefLayerOffsetPresentFlag)); 3543 ::memset(m_refRegionOffsetPresentFlag, 0, sizeof(m_refRegionOffsetPresentFlag)); 3544 #endif 3545 #if R0209_GENERIC_PHASE 3546 ::memset(m_resamplePhaseSetPresentFlag, 0, sizeof(m_resamplePhaseSetPresentFlag)); 3547 ::memset(m_phaseHorLuma, 0, sizeof(m_phaseHorLuma)); 3548 ::memset(m_phaseVerLuma, 0, sizeof(m_phaseVerLuma)); 3549 ::memset(m_phaseHorChroma, 0, sizeof(m_phaseHorChroma)); 3550 ::memset(m_phaseVerChroma, 0, sizeof(m_phaseVerChroma)); 3551 #endif 3279 3552 } 3280 3553 3281 3554 TComPPS::~TComPPS() 3282 3555 { 3283 if( m_iNumColumnsMinus1 > 0 && m_uniformSpacingFlag == 0 )3284 {3285 if (m_puiColumnWidth) delete [] m_puiColumnWidth;3286 m_puiColumnWidth = NULL;3287 }3288 if( m_iNumRowsMinus1 > 0 && m_uniformSpacingFlag == 0 )3289 {3290 if (m_puiRowHeight) delete [] m_puiRowHeight;3291 m_puiRowHeight = NULL;3292 }3293 3294 3556 #if SCALINGLIST_INFERRING 3295 3557 if( !m_inferScalingListFlag ) … … 3297 3559 delete m_scalingList; 3298 3560 } 3561 3562 #if MOVE_SCALED_OFFSET_TO_PPS 3563 #if O0098_SCALED_REF_LAYER_ID 3564 Window& TComPPS::getScaledRefLayerWindowForLayer(Int layerId) 3565 { 3566 static Window win; 3567 3568 for (Int i = 0; i < m_numScaledRefLayerOffsets; i++) 3569 { 3570 if (layerId == m_scaledRefLayerId[i]) 3571 { 3572 return m_scaledRefLayerWindow[i]; 3573 } 3574 } 3575 3576 win.resetWindow(); // scaled reference layer offsets are inferred to be zero when not present 3577 return win; 3578 } 3579 #endif 3580 #if REF_REGION_OFFSET 3581 Window& TComPPS::getRefLayerWindowForLayer(Int layerId) 3582 { 3583 static Window win; 3584 3585 for (Int i = 0; i < m_numScaledRefLayerOffsets; i++) 3586 { 3587 if (layerId == m_scaledRefLayerId[i]) 3588 { 3589 return m_refLayerWindow[i]; 3590 } 3591 } 3592 3593 win.resetWindow(); // reference region offsets are inferred to be zero when not present 3594 return win; 3595 } 3596 #endif 3597 3598 #if RESAMPLING_FIX 3599 #if R0209_GENERIC_PHASE 3600 Bool TComPPS::hasZeroResamplingPhase(Int refLayerIdc) 3601 { 3602 Int phaseHorLuma = this->getPhaseHorLuma(refLayerIdc); 3603 Int phaseVerLuma = this->getPhaseVerLuma(refLayerIdc); 3604 Int phaseHorChroma = this->getPhaseHorChroma(refLayerIdc); 3605 Int phaseVerChroma = this->getPhaseVerChroma(refLayerIdc); 3606 return ( phaseHorLuma == 0 && phaseHorChroma == 0 && phaseVerLuma == 0 && phaseVerChroma == 0); 3607 } 3608 #endif 3609 #endif 3610 3611 #endif 3299 3612 3300 3613 TComReferencePictureSet::TComReferencePictureSet() … … 3718 4031 ParameterSetManager::ParameterSetManager() 3719 4032 #if SVC_EXTENSION 3720 : m_spsMap(MAX_NUM_SPS) 3721 , m_ppsMap(MAX_NUM_PPS) 3722 , m_activeSPSId(-1) 4033 : m_activeSPSId(-1) 3723 4034 , m_activePPSId(-1) 3724 4035 #else … … 3854 4165 3855 4166 #if SVC_EXTENSION 3856 #if AVC_SYNTAX3857 Void TComSlice::initBaseLayerRPL( TComSlice *pcSlice )3858 {3859 // Assumed that RPL of the base layer is same to the EL, otherwise this information should be also dumped and read from the metadata file3860 setPOC( pcSlice->getPOC() );3861 if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )3862 {3863 setSliceType( I_SLICE );3864 }3865 else3866 {3867 setSliceType( pcSlice->getSliceType() );3868 }3869 3870 if( this->isIntra() )3871 {3872 return;3873 }3874 3875 //initialize reference POC of BL3876 for( Int iRefPicList = 0; iRefPicList < 2; iRefPicList++ )3877 {3878 RefPicList eRefPicList = RefPicList( iRefPicList );3879 3880 assert( pcSlice->getNumRefIdx( eRefPicList) >= 0 );3881 setNumRefIdx( eRefPicList, pcSlice->getNumRefIdx( eRefPicList ) - 1 );3882 assert( getNumRefIdx( eRefPicList) <= MAX_NUM_REF);3883 3884 for(Int refIdx = 0; refIdx < getNumRefIdx( eRefPicList ); refIdx++)3885 {3886 setRefPOC( pcSlice->getRefPic( eRefPicList, refIdx )->getPOC(), eRefPicList, refIdx );3887 setRefPic( pcSlice->getRefPic( eRefPicList, refIdx ), eRefPicList, refIdx );3888 /*3889 // should be set if the base layer has its own instance of the reference picture lists, currently EL RPL is reused.3890 getRefPic( eRefPicList, refIdx )->setLayerId( 0 );3891 getRefPic( eRefPicList, refIdx )->setIsLongTerm( pcSlice->getRefPic( eRefPicList, refIdx )->getIsLongTerm() );3892 */3893 3894 }3895 }3896 return;3897 }3898 #endif3899 3900 4167 Bool TComSlice::setBaseColPic( TComList<TComPic*>& rcListPic, UInt refLayerIdc ) 3901 4168 { … … 3939 4206 #endif 3940 4207 3941 #if REF_IDX_MFM3942 Void TComSlice::setRefPOCListILP( TComPic** ilpPic, TComPic** pcRefPicRL )3943 {3944 for( UInt i = 0; i < m_activeNumILRRefIdx; i++ )3945 {3946 UInt refLayerIdc = m_interLayerPredLayerIdc[i];3947 3948 TComPic* pcRefPicBL = pcRefPicRL[refLayerIdc];3949 3950 //set reference picture POC of each ILP reference3951 Int thePoc = ilpPic[refLayerIdc]->getPOC();3952 assert(thePoc == pcRefPicBL->getPOC());3953 3954 ilpPic[refLayerIdc]->getSlice(0)->setBaseColPic( refLayerIdc, pcRefPicBL );3955 3956 //copy layer id from the reference layer3957 ilpPic[refLayerIdc]->setLayerId( pcRefPicBL->getLayerId() );3958 3959 //copy slice type from the reference layer3960 ilpPic[refLayerIdc]->getSlice(0)->setSliceType( pcRefPicBL->getSlice(0)->getSliceType() );3961 3962 //copy "used for reference"3963 ilpPic[refLayerIdc]->getSlice(0)->setReferenced( pcRefPicBL->getSlice(0)->isReferenced() );3964 3965 for( Int refList = 0; refList < 2; refList++ )3966 {3967 RefPicList refPicList = RefPicList( refList );3968 3969 //set reference POC of ILP3970 ilpPic[refLayerIdc]->getSlice(0)->setNumRefIdx(refPicList, pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList));3971 assert(ilpPic[refLayerIdc]->getSlice(0)->getNumRefIdx(refPicList) >= 0);3972 assert(ilpPic[refLayerIdc]->getSlice(0)->getNumRefIdx(refPicList) <= MAX_NUM_REF);3973 3974 //initialize reference POC of ILP3975 for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx++)3976 {3977 ilpPic[refLayerIdc]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(refPicList, refIdx), refPicList, refIdx);3978 ilpPic[refLayerIdc]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(refPicList, refIdx), refPicList, refIdx);3979 }3980 3981 for(Int refIdx = pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx < MAX_NUM_REF; refIdx++)3982 {3983 ilpPic[refLayerIdc]->getSlice(0)->setRefPOC(0, refPicList, refIdx);3984 ilpPic[refLayerIdc]->getSlice(0)->setRefPic(NULL, refPicList, refIdx);3985 }3986 3987 //copy reference pictures' marking from the reference layer3988 for(Int j = 0; j < MAX_NUM_REF + 1; j++)3989 {3990 ilpPic[refLayerIdc]->getSlice(0)->setIsUsedAsLongTerm(refList, j, pcRefPicBL->getSlice(0)->getIsUsedAsLongTerm(refList, j));3991 }3992 }3993 }3994 return;3995 }3996 #endif3997 3998 4208 Void TComSlice::setILRPic(TComPic **pcIlpPic) 3999 4209 { … … 4004 4214 if( pcIlpPic[refLayerIdc] ) 4005 4215 { 4006 pcIlpPic[refLayerIdc]->copyUpsampledPictureYuv( m_pcPic->getFullPelBaseRec( refLayerIdc ), pcIlpPic[refLayerIdc]->getPicYuvRec() ); 4216 TComPic* pcRefPicBL = m_pcBaseColPic[refLayerIdc]; 4217 4218 // copy scalability ratio, it is needed to get the correct location for the motion field of the corresponding reference layer block 4219 pcIlpPic[refLayerIdc]->setSpatialEnhLayerFlag( refLayerIdc, m_pcPic->isSpatialEnhLayer(refLayerIdc) ); 4220 4221 pcIlpPic[refLayerIdc]->copyUpsampledPictureYuv( m_pcPic->getFullPelBaseRec( refLayerIdc ), pcIlpPic[refLayerIdc]->getPicYuvRec() ); 4222 pcIlpPic[refLayerIdc]->getSlice(0)->setBaseColPic( refLayerIdc, pcRefPicBL ); 4223 4224 //set reference picture POC of each ILP reference 4007 4225 pcIlpPic[refLayerIdc]->getSlice(0)->setPOC( m_iPOC ); 4008 pcIlpPic[refLayerIdc]->setLayerId( m_pcBaseColPic[refLayerIdc]->getLayerId() ); //set reference layerId 4226 4227 //set temporal Id 4228 pcIlpPic[refLayerIdc]->getSlice(0)->setTLayer( m_uiTLayer ); 4229 4230 //copy layer id from the reference layer 4231 pcIlpPic[refLayerIdc]->setLayerId( pcRefPicBL->getLayerId() ); 4232 4009 4233 pcIlpPic[refLayerIdc]->getPicYuvRec()->setBorderExtension( false ); 4010 4234 pcIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder(); … … 4013 4237 pcIlpPic[refLayerIdc]->getPicSym()->getCU(j)->setLayerId( pcIlpPic[refLayerIdc]->getLayerId() ); 4014 4238 } 4015 } 4016 } 4017 } 4018 4239 pcIlpPic[refLayerIdc]->setIsLongTerm(1); 4240 4241 #if REF_IDX_MFM 4242 if( m_bMFMEnabledFlag && !(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) ) 4243 { 4244 //set reference picture POC of each ILP reference 4245 assert( pcIlpPic[refLayerIdc]->getPOC() == pcRefPicBL->getPOC() ); 4246 4247 //copy slice type from the reference layer 4248 pcIlpPic[refLayerIdc]->getSlice(0)->setSliceType( pcRefPicBL->getSlice(0)->getSliceType() ); 4249 4250 //copy "used for reference" 4251 pcIlpPic[refLayerIdc]->getSlice(0)->setReferenced( pcRefPicBL->getSlice(0)->isReferenced() ); 4252 4253 for( Int refList = 0; refList < 2; refList++ ) 4254 { 4255 RefPicList refPicList = RefPicList( refList ); 4256 4257 //set reference POC of ILP 4258 pcIlpPic[refLayerIdc]->getSlice(0)->setNumRefIdx(refPicList, pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList)); 4259 assert(pcIlpPic[refLayerIdc]->getSlice(0)->getNumRefIdx(refPicList) >= 0); 4260 assert(pcIlpPic[refLayerIdc]->getSlice(0)->getNumRefIdx(refPicList) <= MAX_NUM_REF); 4261 4262 //initialize reference POC of ILP 4263 for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx++) 4264 { 4265 pcIlpPic[refLayerIdc]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(refPicList, refIdx), refPicList, refIdx); 4266 pcIlpPic[refLayerIdc]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(refPicList, refIdx), refPicList, refIdx); 4267 } 4268 4269 for(Int refIdx = pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx < MAX_NUM_REF; refIdx++) 4270 { 4271 pcIlpPic[refLayerIdc]->getSlice(0)->setRefPOC(0, refPicList, refIdx); 4272 pcIlpPic[refLayerIdc]->getSlice(0)->setRefPic(NULL, refPicList, refIdx); 4273 } 4274 4275 //copy reference pictures' marking from the reference layer 4276 for(Int j = 0; j < MAX_NUM_REF + 1; j++) 4277 { 4278 pcIlpPic[refLayerIdc]->getSlice(0)->setIsUsedAsLongTerm(refList, j, pcRefPicBL->getSlice(0)->getIsUsedAsLongTerm(refList, j)); 4279 } 4280 } 4281 4282 pcIlpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] ); 4283 } 4284 else 4285 { 4286 pcIlpPic[refLayerIdc]->initUpsampledMvField(); 4287 } 4288 #endif 4289 4290 #if O0225_MAX_TID_FOR_REF_LAYERS 4291 Int maxTidIlRefPicsPlus1 = m_pcVPS->getMaxTidIlRefPicsPlus1( pcIlpPic[refLayerIdc]->getSlice(0)->getLayerId(), m_layerId ); 4292 #else 4293 Int maxTidIlRefPicsPlus1 = m_pcVPS->getMaxTidIlRefPicsPlus1( pcIlpPic[refLayerIdc]->getSlice(0)->getLayerId() ); 4294 #endif 4295 assert( (Int)pcIlpPic[refLayerIdc]->getSlice(0)->getTLayer() < maxTidIlRefPicsPlus1 || ( !maxTidIlRefPicsPlus1 && pcIlpPic[refLayerIdc]->getSlice(0)->getRapPicFlag() ) ); 4296 4297 } 4298 } 4299 } 4300 4301 Int TComSlice::getReferenceLayerIdc( UInt refLayerId ) 4302 { 4303 for( Int i = 0; i < m_activeNumILRRefIdx; i++ ) 4304 { 4305 if( m_pcVPS->getRefLayerId(m_layerId, m_interLayerPredLayerIdc[i]) == refLayerId ) 4306 { 4307 return m_interLayerPredLayerIdc[i]; 4308 } 4309 } 4310 4311 return -1; 4312 } 4019 4313 #endif //SVC_EXTENSION 4020 4314 -
trunk/source/Lib/TLibCommon/TComSlice.h
r815 r906 370 370 UInt getNumDU ( ) { return m_numDU; } 371 371 Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } 372 373 #if VPS_VUI_BSP_HRD_PARAMS 374 Void copyCommonInformation( TComHRD *refHrd ) 375 { 376 m_nalHrdParametersPresentFlag = refHrd->getNalHrdParametersPresentFlag(); 377 m_vclHrdParametersPresentFlag = refHrd->getVclHrdParametersPresentFlag(); 378 m_subPicCpbParamsPresentFlag = refHrd->getSubPicCpbParamsPresentFlag(); 379 m_tickDivisorMinus2 = refHrd->getTickDivisorMinus2(); 380 m_duCpbRemovalDelayLengthMinus1 = refHrd->getDuCpbRemovalDelayLengthMinus1(); 381 m_subPicCpbParamsInPicTimingSEIFlag = refHrd->getSubPicCpbParamsInPicTimingSEIFlag(); 382 m_dpbOutputDelayDuLengthMinus1 = refHrd->getDpbOutputDelayDuLengthMinus1(); 383 m_bitRateScale = refHrd->getBitRateScale(); 384 m_cpbSizeScale = refHrd->getCpbSizeScale(); 385 m_ducpbSizeScale = refHrd->getDuCpbSizeScale(); 386 m_initialCpbRemovalDelayLengthMinus1 = refHrd->getInitialCpbRemovalDelayLengthMinus1(); 387 m_cpbRemovalDelayLengthMinus1 = refHrd->getCpbRemovalDelayLengthMinus1(); 388 m_dpbOutputDelayLengthMinus1 = refHrd->getDpbOutputDelayLengthMinus1(); 389 } 390 #endif 372 391 }; 373 392 … … 403 422 }; 404 423 424 class Window 425 { 426 private: 427 Bool m_enabledFlag; 428 Int m_winLeftOffset; 429 Int m_winRightOffset; 430 Int m_winTopOffset; 431 Int m_winBottomOffset; 432 #if P0312_VERT_PHASE_ADJ 433 Bool m_vertPhasePositionEnableFlag; 434 #endif 435 public: 436 Window() 437 : m_enabledFlag (false) 438 , m_winLeftOffset (0) 439 , m_winRightOffset (0) 440 , m_winTopOffset (0) 441 , m_winBottomOffset (0) 442 #if P0312_VERT_PHASE_ADJ 443 , m_vertPhasePositionEnableFlag(false) 444 #endif 445 { } 446 447 Bool getWindowEnabledFlag() const { return m_enabledFlag; } 448 #if P0312_VERT_PHASE_ADJ 449 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = false; } 450 #else 451 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0;} 452 #endif 453 Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; } 454 Void setWindowLeftOffset(Int val) { if(val) {m_winLeftOffset = val; m_enabledFlag = true;} } 455 Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; } 456 Void setWindowRightOffset(Int val) { if(val) {m_winRightOffset = val; m_enabledFlag = true;} } 457 Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; } 458 Void setWindowTopOffset(Int val) { if(val) {m_winTopOffset = val; m_enabledFlag = true;} } 459 Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; } 460 Void setWindowBottomOffset(Int val) { if(val) {m_winBottomOffset = val; m_enabledFlag = true;} } 461 #if P0312_VERT_PHASE_ADJ 462 Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag; } 463 Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; } 464 #endif 465 #if REF_REGION_OFFSET && RESAMPLING_FIX 466 Bool hasEqualOffset(const Window& ref) const 467 { 468 return ( this->getWindowLeftOffset() == ref.getWindowLeftOffset() 469 && this->getWindowTopOffset() == ref.getWindowTopOffset() 470 && this->getWindowRightOffset() == ref.getWindowRightOffset() 471 && this->getWindowBottomOffset() == ref.getWindowBottomOffset() ); 472 } 473 #endif 474 475 #if P0312_VERT_PHASE_ADJ 476 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom, Bool vertPhasePositionEnableFlag = 0) 477 #else 478 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) 479 #endif 480 { 481 if(offsetLeft || offsetLRight || offsetLTop || offsetLBottom) 482 { 483 m_enabledFlag = true; 484 m_winLeftOffset = offsetLeft; 485 m_winRightOffset = offsetLRight; 486 m_winTopOffset = offsetLTop; 487 m_winBottomOffset = offsetLBottom; 488 } 489 #if P0312_VERT_PHASE_ADJ 490 m_vertPhasePositionEnableFlag = vertPhasePositionEnableFlag; 491 #endif 492 } 493 }; 494 405 495 #if REPN_FORMAT_IN_VPS 406 496 class RepFormat … … 420 510 Int m_bitDepthVpsChroma; // coded as minus8 421 511 512 #if R0156_CONF_WINDOW_IN_REP_FORMAT 513 Window m_conformanceWindowVps; 514 #endif 515 422 516 public: 423 517 RepFormat(); … … 454 548 Int getBitDepthVpsChroma() { return m_bitDepthVpsChroma; } 455 549 Void setBitDepthVpsChroma(Int x) { m_bitDepthVpsChroma = x; } 550 551 #if R0156_CONF_WINDOW_IN_REP_FORMAT 552 Window& getConformanceWindowVps() { return m_conformanceWindowVps; } 553 Void setConformanceWindowVps(Window& conformanceWindow ) { m_conformanceWindowVps = conformanceWindow; } 554 #endif 456 555 }; 457 556 #endif … … 460 559 private: 461 560 Int m_VPSId; 561 #if VPS_RESERVED_FLAGS 562 Bool m_baseLayerInternalFlag; 563 Bool m_baseLayerAvailableFlag; 564 #endif 462 565 UInt m_uiMaxTLayers; 463 566 UInt m_uiMaxLayers; … … 485 588 #if DERIVE_LAYER_ID_LIST_VARIABLES 486 589 #if Q0078_ADD_LAYER_SETS 590 #if NECESSARY_LAYER_FLAG 591 std::vector< std::vector<Int> > m_layerSetLayerIdList; 592 std::vector<Int> m_numLayerInIdList;; 593 #else 487 594 Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1]; 488 595 Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS]; 596 #endif 489 597 #else 490 598 Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; … … 510 618 // ------------------------------------------ 511 619 #if VPS_EXTN_MASK_AND_DIM_INFO 620 #if VPS_AVC_BL_FLAG_REMOVAL 621 Bool m_nonHEVCBaseLayerFlag; 622 #else 512 623 Bool m_avcBaseLayerFlag; // For now, always set to true. 624 #endif 513 625 Bool m_splittingFlag; 514 626 Bool m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; … … 576 688 #endif 577 689 #endif 690 #if PER_LAYER_PTL 691 std::vector< std::vector<Int> > m_profileLevelTierIdx; 692 #else 578 693 Int m_profileLevelTierIdx[64]; 694 #endif 579 695 Bool m_maxOneActiveRefLayerFlag; 580 696 #if O0062_POC_LSB_NOT_PRESENT_FLAG … … 717 833 #if O0164_MULTI_LAYER_HRD 718 834 Bool m_vpsVuiBspHrdPresentFlag; 835 #if VPS_VUI_BSP_HRD_PARAMS 836 Int m_vpsNumAddHrdParams; 837 std::vector<Bool> m_cprmsAddPresentFlag; 838 std::vector<Int> m_numSubLayerHrdMinus1; 839 std::vector<TComHRD> m_bspHrd; 840 Int m_numSignalledPartitioningSchemes[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; 841 Int m_numPartitionsInSchemeMinus1 [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16]; 842 Int m_layerIncludedInPartitionFlag [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_LAYERS][MAX_LAYERS]; 843 Int m_numBspSchedulesMinus1 [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER]; 844 Int m_bspHrdIdx [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER][31][MAX_LAYERS]; 845 Int m_bspSchedIdx [MAX_VPS_OUTPUT_LAYER_SETS_PLUS1][16][MAX_TLAYER][31][MAX_LAYERS]; 846 #else 719 847 UInt m_vpsNumBspHrdParametersMinus1; 720 848 Bool m_bspCprmsPresentFlag[MAX_VPS_LAYER_SETS_PLUS1]; … … 726 854 UInt m_bspCombSchedIdx[MAX_VPS_LAYER_SETS_PLUS1][16][16]; 727 855 #endif 856 #endif 728 857 729 858 #if P0182_VPS_VUI_PS_FLAG … … 741 870 Int m_vpsNonVuiExtLength; 742 871 #endif 872 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 873 Bool m_vpsPocLsbAlignedFlag; 874 #endif 743 875 #if RESOLUTION_BASED_DPB 744 876 Int m_subDpbAssigned [MAX_VPS_LAYER_SETS_PLUS1][MAX_LAYERS]; 877 #endif 878 #if NECESSARY_LAYER_FLAG 879 std::vector< std::vector<Bool> > m_necessaryLayerFlag; 880 std::vector<Int> m_numNecessaryLayers; 745 881 #endif 746 882 #endif //SVC_EXTENSION … … 748 884 TComVPS(); 749 885 virtual ~TComVPS(); 886 887 #if VPS_RESERVED_FLAGS 888 Void setBaseLayerInternalFlag(Bool x) { m_baseLayerInternalFlag = x; } 889 Bool getBaseLayerInternalFlag() { return m_baseLayerInternalFlag; } 890 Void setBaseLayerAvailableFlag(Bool x) { m_baseLayerAvailableFlag = x; } 891 Bool getBaseLayerAvailableFlag() { return m_baseLayerAvailableFlag; } 892 #endif 750 893 751 894 Void createHrdParamBuffer() … … 759 902 Void createBspHrdParamBuffer(UInt numHrds) 760 903 { 904 #if VPS_VUI_BSP_HRD_PARAMS 905 m_bspHrd.resize( numHrds ); 906 m_cprmsAddPresentFlag.resize( numHrds ); 907 m_numSubLayerHrdMinus1.resize( numHrds ); 908 #else 761 909 m_bspHrd = new TComHRD[ numHrds ]; 910 #endif 762 911 // m_hrdOpSetIdx = new UInt [ getNumHrdParameters() ]; 763 912 // m_cprmsPresentFlag = new Bool [ getNumHrdParameters() ]; … … 767 916 Int getBspHrdParamBufferCpbCntMinus1(UInt i, UInt sl) 768 917 { 918 #if VPS_VUI_BSP_HRD_PARAMS 919 return m_bspHrd[i].getCpbCntMinus1(sl); 920 #else 769 921 return m_bspHrd->getCpbCntMinus1(sl); 922 #endif 770 923 } 771 924 #endif … … 817 970 #if DERIVE_LAYER_ID_LIST_VARIABLES 818 971 Int getLayerSetLayerIdList(Int set, Int layerId) { return m_layerSetLayerIdList[set][layerId]; } 819 Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x ;}972 Void setLayerSetLayerIdList(Int set, Int layerId, Int x) { m_layerSetLayerIdList[set][layerId] = x; } 820 973 821 974 Int getNumLayersInIdList(Int set) { return m_numLayerInIdList[set]; } 822 Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x ;}975 Void setNumLayersInIdList(Int set, Int x) { m_numLayerInIdList[set] = x; } 823 976 824 977 Void deriveLayerIdListVariables(); … … 861 1014 Void setNumLayerSets(UInt v) { m_numLayerSets = v; } 862 1015 #if VPS_EXTN_MASK_AND_DIM_INFO 1016 #if VPS_AVC_BL_FLAG_REMOVAL 1017 Bool getNonHEVCBaseLayerFlag() { return m_nonHEVCBaseLayerFlag; } 1018 Void setNonHEVCBaseLayerFlag(Bool x) { m_nonHEVCBaseLayerFlag = x; } 1019 #else 863 1020 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 864 1021 Void setAvcBaseLayerFlag(Bool x) { m_avcBaseLayerFlag = x; } 1022 #endif 865 1023 866 1024 Bool getSplittingFlag() { return m_splittingFlag; } … … 964 1122 #endif 965 1123 #endif 1124 #if PER_LAYER_PTL 1125 Bool getNecessaryLayerFlag(Int const i, Int const j) { return m_necessaryLayerFlag[i][j]; } 1126 std::vector< std::vector<Int> >* getProfileLevelTierIdx() { return &m_profileLevelTierIdx; } 1127 std::vector<Int>* getProfileLevelTierIdx(Int const olsIdx) { return &m_profileLevelTierIdx[olsIdx]; } 1128 Int getProfileLevelTierIdx(Int const olsIdx, Int const layerIdx) { return m_profileLevelTierIdx[olsIdx][layerIdx]; } 1129 Void setProfileLevelTierIdx(Int const olsIdx, Int const layerIdx, Int const ptlIdx) { m_profileLevelTierIdx[olsIdx][layerIdx] = ptlIdx; } 1130 Int calculateLenOfSyntaxElement( Int const numVal ); 1131 #else 966 1132 Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } 967 1133 Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } 1134 #endif 968 1135 Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } 969 1136 Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } … … 971 1138 UInt getPocLsbNotPresentFlag(Int i) { return m_pocLsbNotPresentFlag[i]; } 972 1139 Void setPocLsbNotPresentFlag(Int i, Bool x) { m_pocLsbNotPresentFlag[i] = x; } 1140 #endif 1141 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 1142 Bool getVpsPocLsbAlignedFlag() { return m_vpsPocLsbAlignedFlag; } 1143 Void setVpsPocLsbAlignedFlag(Bool x) { m_vpsPocLsbAlignedFlag = x; } 973 1144 #endif 974 1145 #if O0223_PICTURE_TYPES_ALIGN_FLAG … … 1074 1245 Bool getVpsVuiBspHrdPresentFlag() { return m_vpsVuiBspHrdPresentFlag; } 1075 1246 Void setVpsVuiBspHrdPresentFlag(Bool x) { m_vpsVuiBspHrdPresentFlag = x; } 1247 #if VPS_VUI_BSP_HRD_PARAMS 1248 Int getVpsNumAddHrdParams() { return m_vpsNumAddHrdParams; } 1249 Void setVpsNumAddHrdParams(Int i) { m_vpsNumAddHrdParams = i; } 1250 1251 Bool getCprmsAddPresentFlag(Int i) { return m_cprmsAddPresentFlag[i]; } 1252 Void setCprmsAddPresentFlag(Int i, Bool val) { m_cprmsAddPresentFlag[i] = val; } 1253 1254 Int getNumSubLayerHrdMinus1(Int i) { return m_numSubLayerHrdMinus1[i]; } 1255 Void setNumSubLayerHrdMinus1(Int i, Int val) { m_numSubLayerHrdMinus1[i] = val; } 1256 1257 TComHRD* getBspHrd(Int i) {return &m_bspHrd[i];} 1258 1259 Int getNumSignalledPartitioningSchemes(Int i) { return m_numSignalledPartitioningSchemes[i]; } 1260 Void setNumSignalledPartitioningSchemes(Int i, Int val) { m_numSignalledPartitioningSchemes[i] = val; } 1261 1262 Int getNumPartitionsInSchemeMinus1(Int i, Int j) { return m_numPartitionsInSchemeMinus1[i][j];} 1263 Void setNumPartitionsInSchemeMinus1(Int i, Int j, Int val) { m_numPartitionsInSchemeMinus1[i][j] = val; } 1264 1265 Int getLayerIncludedInPartitionFlag(Int i, Int j, Int k, Int l) { return m_layerIncludedInPartitionFlag[i][j][k][l];} 1266 Void setLayerIncludedInPartitionFlag(Int i, Int j, Int k, Int l, Int val) { m_layerIncludedInPartitionFlag[i][j][k][l] = val; } 1267 1268 Int getNumBspSchedulesMinus1(Int i, Int j, Int k) { return m_numBspSchedulesMinus1[i][j][k];} 1269 Void setNumBspSchedulesMinus1(Int i, Int j, Int k, Int val) { m_numBspSchedulesMinus1[i][j][k] = val; } 1270 1271 Int getBspSchedIdx(Int i, Int j, Int k, Int l, Int m) { return m_bspSchedIdx[i][j][k][l][m];} 1272 Void setBspSchedIdx(Int i, Int j, Int k, Int l, Int m, Int val) { m_bspSchedIdx[i][j][k][l][m] = val; } 1273 1274 Int getBspHrdIdx(Int i, Int j, Int k, Int l, Int m) { return m_bspHrdIdx[i][j][k][l][m];} 1275 Void setBspHrdIdx(Int i, Int j, Int k, Int l, Int m, Int val) { m_bspHrdIdx[i][j][k][l][m] = val; } 1276 #else 1076 1277 UInt getVpsNumBspHrdParametersMinus1() { return m_vpsNumBspHrdParametersMinus1; } 1077 1278 Void setVpsNumBspHrdParametersMinus1(UInt i) { m_vpsNumBspHrdParametersMinus1 = i; } … … 1090 1291 Void setBspCombSchedIdx(UInt h, UInt i, UInt j, UInt val) { m_bspCombSchedIdx[h][i][j] = val; } 1091 1292 #endif 1293 #endif 1092 1294 #if P0182_VPS_VUI_PS_FLAG 1093 1295 Int getSPSId (Int layer) { return m_SPSId[layer]; } … … 1205 1407 Void setBspHrdParameters( UInt hrdIdx, UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ); 1206 1408 #endif 1409 #if NECESSARY_LAYER_FLAG 1410 Void deriveNecessaryLayerFlag(); 1411 Void deriveNecessaryLayerFlag(Int const olsIdx); 1412 Void checkNecessaryLayerFlagCondition(); 1413 #endif 1414 #if SUB_LAYERS_IN_LAYER_SET 1415 Void calculateMaxSLInLayerSets(); 1416 #endif 1207 1417 #endif //SVC_EXTENSION 1208 1418 }; 1209 1210 class Window1211 {1212 private:1213 Bool m_enabledFlag;1214 Int m_winLeftOffset;1215 Int m_winRightOffset;1216 Int m_winTopOffset;1217 Int m_winBottomOffset;1218 #if P0312_VERT_PHASE_ADJ1219 Bool m_vertPhasePositionEnableFlag;1220 #endif1221 public:1222 Window()1223 : m_enabledFlag (false)1224 , m_winLeftOffset (0)1225 , m_winRightOffset (0)1226 , m_winTopOffset (0)1227 , m_winBottomOffset (0)1228 #if P0312_VERT_PHASE_ADJ1229 , m_vertPhasePositionEnableFlag(false)1230 #endif1231 { }1232 1233 Bool getWindowEnabledFlag() const { return m_enabledFlag; }1234 #if P0312_VERT_PHASE_ADJ1235 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0; m_vertPhasePositionEnableFlag = false; }1236 #else1237 Void resetWindow() { m_enabledFlag = false; m_winLeftOffset = m_winRightOffset = m_winTopOffset = m_winBottomOffset = 0;}1238 #endif1239 Int getWindowLeftOffset() const { return m_enabledFlag ? m_winLeftOffset : 0; }1240 Void setWindowLeftOffset(Int val) { m_winLeftOffset = val; m_enabledFlag = true; }1241 Int getWindowRightOffset() const { return m_enabledFlag ? m_winRightOffset : 0; }1242 Void setWindowRightOffset(Int val) { m_winRightOffset = val; m_enabledFlag = true; }1243 Int getWindowTopOffset() const { return m_enabledFlag ? m_winTopOffset : 0; }1244 Void setWindowTopOffset(Int val) { m_winTopOffset = val; m_enabledFlag = true; }1245 Int getWindowBottomOffset() const { return m_enabledFlag ? m_winBottomOffset: 0; }1246 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; }1247 1248 #if P0312_VERT_PHASE_ADJ1249 Bool getVertPhasePositionEnableFlag() const { return m_vertPhasePositionEnableFlag; }1250 Void setVertPhasePositionEnableFlag(Bool val) { m_vertPhasePositionEnableFlag = val; }1251 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom, Bool vertPhasePositionEnableFlag = 0)1252 #else1253 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom)1254 #endif1255 {1256 m_enabledFlag = true;1257 m_winLeftOffset = offsetLeft;1258 m_winRightOffset = offsetLRight;1259 m_winTopOffset = offsetLTop;1260 m_winBottomOffset = offsetLBottom;1261 #if P0312_VERT_PHASE_ADJ1262 m_vertPhasePositionEnableFlag = vertPhasePositionEnableFlag;1263 #endif1264 }1265 };1266 1267 1419 1268 1420 class TComVUI … … 1445 1597 UInt m_uiMaxTLayers; // maximum number of temporal layers 1446 1598 1599 #if R0279_REP_FORMAT_INBL 1600 Bool m_bV1CompatibleSPSFlag; 1601 #endif 1602 1447 1603 // Structure 1448 1604 UInt m_picWidthInLumaSamples; … … 1514 1670 Bool m_extensionFlag; 1515 1671 UInt m_numScaledRefLayerOffsets; 1672 #if R0042_PROFILE_INDICATION 1673 Int m_NumDirectRefLayers; 1674 #endif 1516 1675 #if P0312_VERT_PHASE_ADJ 1517 1676 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS]; 1518 1677 #endif 1678 #if !MOVE_SCALED_OFFSET_TO_PPS 1519 1679 #if O0098_SCALED_REF_LAYER_ID 1520 1680 UInt m_scaledRefLayerId[MAX_LAYERS]; 1521 1681 #endif 1522 1682 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1683 #endif 1523 1684 #if REPN_FORMAT_IN_VPS 1524 Bool 1685 Bool m_updateRepFormatFlag; 1525 1686 #if O0096_REP_FORMAT_INDEX 1526 1687 UInt m_updateRepFormatIndex; … … 1532 1693 #endif 1533 1694 #endif //SVC_EXTENSION 1695 1534 1696 public: 1535 1697 TComSPS(); … … 1554 1716 static Int getWinUnitY (Int chromaFormatIdc) { assert (chromaFormatIdc > 0 && chromaFormatIdc <= MAX_CHROMA_FORMAT_IDC); return m_winUnitY[chromaFormatIdc]; } 1555 1717 #endif 1556 1718 1719 #if R0279_REP_FORMAT_INBL //These two functions shall be used / called when the syntax element sps_ext_or_max_sub_layers_minus1 and V1CompatibleSPSFlag are implemented 1720 Bool getV1CompatibleSPSFlag() {return m_bV1CompatibleSPSFlag;} 1721 Void setV1CompatibleSPSFlag(Bool x) { m_bV1CompatibleSPSFlag = x;} 1722 #endif 1723 1557 1724 // structure 1558 1725 Void setPicWidthInLumaSamples ( UInt u ) { m_picWidthInLumaSamples = u; } … … 1673 1840 Int getExtensionFlag() { return m_extensionFlag; } 1674 1841 Void setExtensionFlag(Int n) { m_extensionFlag = n; } 1842 #if R0042_PROFILE_INDICATION 1843 Int getNumDirectRefLayers() { return m_NumDirectRefLayers; } 1844 Void setNumDirectRefLayers(Int n) { m_NumDirectRefLayers = n; } 1845 #endif 1846 #if !MOVE_SCALED_OFFSET_TO_PPS 1675 1847 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 1676 1848 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } … … 1685 1857 #endif 1686 1858 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 1859 #endif 1687 1860 #if REPN_FORMAT_IN_VPS 1688 1861 Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } … … 1761 1934 1762 1935 Bool m_loopFilterAcrossTilesEnabledFlag; 1763 Intm_uniformSpacingFlag;1764 Int m_iNumColumnsMinus1;1765 UInt* m_puiColumnWidth;1766 Int m_iNumRowsMinus1;1767 UInt* m_puiRowHeight;1768 1769 Int m_ iNumSubstreams;1936 Bool m_uniformSpacingFlag; 1937 Int m_numTileColumnsMinus1; 1938 Int m_numTileRowsMinus1; 1939 std::vector<Int> m_tileColumnWidth; 1940 std::vector<Int> m_tileRowHeight; 1941 1942 Int m_numSubstreams; 1770 1943 1771 1944 Int m_signHideFlag; … … 1797 1970 Bool m_pocResetInfoPresentFlag; 1798 1971 #endif 1972 #if MOVE_SCALED_OFFSET_TO_PPS 1973 UInt m_numScaledRefLayerOffsets; 1974 #if O0098_SCALED_REF_LAYER_ID 1975 UInt m_scaledRefLayerId[MAX_LAYERS]; 1976 #endif 1977 Window m_scaledRefLayerWindow[MAX_LAYERS]; 1978 #if REF_REGION_OFFSET 1979 Window m_refLayerWindow[MAX_LAYERS]; 1980 Bool m_scaledRefLayerOffsetPresentFlag[MAX_LAYERS]; 1981 Bool m_refRegionOffsetPresentFlag[MAX_LAYERS]; 1982 #endif 1983 #if R0209_GENERIC_PHASE 1984 Int m_phaseHorLuma[MAX_LAYERS]; 1985 Int m_phaseVerLuma[MAX_LAYERS]; 1986 Int m_phaseHorChroma[MAX_LAYERS]; 1987 Int m_phaseVerChroma[MAX_LAYERS]; 1988 Bool m_resamplePhaseSetPresentFlag[MAX_LAYERS]; 1989 #endif 1990 #endif 1799 1991 #if Q0048_CGS_3D_ASYMLUT 1800 1992 Int m_nCGSFlag; … … 1855 2047 Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } 1856 2048 Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } 1857 Bool getTilesEnabledFlag() const { return m_tilesEnabledFlag; }1858 Void setTilesEnabledFlag(Bool val) { m_tilesEnabledFlag = val; }1859 2049 Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } 1860 2050 Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } 1861 Void setUniformSpacingFlag ( Bool b ) { m_uniformSpacingFlag = b; } 1862 Bool getUniformSpacingFlag () { return m_uniformSpacingFlag; } 1863 Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } 1864 Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } 1865 Void setColumnWidth ( UInt* columnWidth ) 1866 { 1867 if( m_uniformSpacingFlag == 0 && m_iNumColumnsMinus1 > 0 ) 1868 { 1869 m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; 1870 1871 for(Int i=0; i<m_iNumColumnsMinus1; i++) 1872 { 1873 m_puiColumnWidth[i] = columnWidth[i]; 1874 } 1875 } 1876 } 1877 UInt getColumnWidth (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); } 1878 Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } 1879 Int getNumRowsMinus1() { return m_iNumRowsMinus1; } 1880 Void setRowHeight ( UInt* rowHeight ) 1881 { 1882 if( m_uniformSpacingFlag == 0 && m_iNumRowsMinus1 > 0 ) 1883 { 1884 m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; 1885 1886 for(Int i=0; i<m_iNumRowsMinus1; i++) 1887 { 1888 m_puiRowHeight[i] = rowHeight[i]; 1889 } 1890 } 1891 } 1892 UInt getRowHeight (UInt rowIdx) { return *( m_puiRowHeight + rowIdx ); } 1893 Void setNumSubstreams(Int iNumSubstreams) { m_iNumSubstreams = iNumSubstreams; } 1894 Int getNumSubstreams() { return m_iNumSubstreams; } 2051 2052 Void setTilesEnabledFlag (Bool val) { m_tilesEnabledFlag = val; } 2053 Bool getTilesEnabledFlag () const { return m_tilesEnabledFlag; } 2054 Void setTileUniformSpacingFlag (Bool b) { m_uniformSpacingFlag = b; } 2055 Bool getTileUniformSpacingFlag () const { return m_uniformSpacingFlag; } 2056 Void setNumTileColumnsMinus1 (Int i) { m_numTileColumnsMinus1 = i; } 2057 Int getNumTileColumnsMinus1 () const { return m_numTileColumnsMinus1; } 2058 Void setTileColumnWidth (const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; } 2059 UInt getTileColumnWidth (UInt columnIdx) const { return m_tileColumnWidth[columnIdx]; } 2060 Void setNumTileRowsMinus1 (Int i) { m_numTileRowsMinus1 = i; } 2061 Int getTileNumRowsMinus1 () const { return m_numTileRowsMinus1; } 2062 Void setTileRowHeight (const std::vector<Int>& rowHeight) { m_tileRowHeight = rowHeight; } 2063 UInt getTileRowHeight (UInt rowIdx) const { return m_tileRowHeight[rowIdx]; } 2064 2065 Void setNumSubstreams (Int numSubstreams) { m_numSubstreams = numSubstreams; } 2066 Int getNumSubstreams () { return m_numSubstreams; } 1895 2067 1896 2068 Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } … … 1945 2117 Void setPocResetInfoPresentFlag (const Bool val) { m_pocResetInfoPresentFlag = val; } 1946 2118 #endif 2119 #if MOVE_SCALED_OFFSET_TO_PPS 2120 UInt getNumScaledRefLayerOffsets() { return m_numScaledRefLayerOffsets; } 2121 Void setNumScaledRefLayerOffsets(Int x) { m_numScaledRefLayerOffsets = x; } 2122 #if O0098_SCALED_REF_LAYER_ID 2123 UInt getScaledRefLayerId(Int x) { return m_scaledRefLayerId[x]; } 2124 Void setScaledRefLayerId(Int x, UInt id) { m_scaledRefLayerId[x] = id; } 2125 Window& getScaledRefLayerWindowForLayer( Int layerId ); 2126 #endif 2127 Window& getScaledRefLayerWindow( Int x ) { return m_scaledRefLayerWindow[x]; } 2128 #if REF_REGION_OFFSET 2129 Window& getRefLayerWindowForLayer( Int layerId ); 2130 Window& getRefLayerWindow( Int x ) { return m_refLayerWindow[x]; } 2131 Bool getScaledRefLayerOffsetPresentFlag(Int x) { return m_scaledRefLayerOffsetPresentFlag[x]; } 2132 Void setScaledRefLayerOffsetPresentFlag(Int x, Bool b) { m_scaledRefLayerOffsetPresentFlag[x] = b; } 2133 Bool getRefRegionOffsetPresentFlag(Int x) { return m_refRegionOffsetPresentFlag[x]; } 2134 Void setRefRegionOffsetPresentFlag(Int x, Bool b) { m_refRegionOffsetPresentFlag[x] = b; } 2135 #endif 2136 #if R0209_GENERIC_PHASE 2137 Int getPhaseHorLuma(Int x) { return m_phaseHorLuma[x]; } 2138 Int getPhaseVerLuma(Int x) { return m_phaseVerLuma[x]; } 2139 Int getPhaseHorChroma(Int x) { return m_phaseHorChroma[x]; } 2140 Int getPhaseVerChroma(Int x) { return m_phaseVerChroma[x]; } 2141 Void setPhaseHorLuma(Int x, Int val) { m_phaseHorLuma[x] = val; } 2142 Void setPhaseVerLuma(Int x, Int val) { m_phaseVerLuma[x] = val; } 2143 Void setPhaseHorChroma(Int x, Int val) { m_phaseHorChroma[x] = val; } 2144 Void setPhaseVerChroma(Int x, Int val) { m_phaseVerChroma[x] = val; } 2145 Bool getResamplePhaseSetPresentFlag(Int x) { return m_resamplePhaseSetPresentFlag[x]; } 2146 Void setResamplePhaseSetPresentFlag(Int x, Bool b) { m_resamplePhaseSetPresentFlag[x] = b; } 2147 #if RESAMPLING_FIX 2148 Bool hasZeroResamplingPhase(Int layerId); 2149 #endif 2150 #endif 2151 #endif 1947 2152 #if Q0048_CGS_3D_ASYMLUT 1948 2153 Int getCGSFlag() { return m_nCGSFlag; } … … 1994 2199 Int m_associatedIrapPocBeforeReset; 1995 2200 #endif 1996 1997 2201 NalUnitType m_iAssociatedIRAPType; 1998 2202 static Int m_prevTid0POC; … … 2085 2289 2086 2290 Bool m_enableTMVPFlag; 2291 #if R0226_SLICE_TMVP 2292 Bool m_availableForTMVPRefFlag; 2293 #endif 2087 2294 2088 2295 #if SVC_EXTENSION … … 2120 2327 Bool m_pocMsbValRequiredFlag; 2121 2328 Bool m_pocMsbValPresentFlag; 2329 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 2330 Bool m_pocMsbValNeeded; 2331 Int m_pocResetDeltaPoc; 2332 #endif 2122 2333 #endif 2123 2334 #if POC_RESET_IDC_ENCODER … … 2392 2603 Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} 2393 2604 2605 #if R0226_SLICE_TMVP 2606 Void setAvailableForTMVPRefFlag ( Bool b ) { m_availableForTMVPRefFlag = b; } 2607 Bool getAvailableForTMVPRefFlag () { return m_availableForTMVPRefFlag;} 2608 #endif 2609 2394 2610 #if SVC_EXTENSION 2395 2611 Bool setBaseColPic ( TComList<TComPic*>& rcListPic , UInt refLayerIdc ); … … 2407 2623 TComPicYuv* getFullPelBaseRec (UInt refLayerIdc) { return m_pcFullPelBaseRec[refLayerIdc]; } 2408 2624 2409 #if AVC_SYNTAX2410 Void initBaseLayerRPL( TComSlice *pcSlice );2411 #endif2412 2413 2625 Void setRefPicListModificationSvc(); 2414 2626 Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } 2415 2416 #if REF_IDX_MFM2417 Void setRefPOCListILP(TComPic** ilpPic, TComPic** pcRefPicRL);2418 #endif2419 2627 2420 2628 Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } … … 2444 2652 Bool isRASL() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); } 2445 2653 2654 #if POC_RESET_RESTRICTIONS 2655 Bool isIDR() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 2656 || m_eNalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP); } 2657 Bool isCRA() { return m_eNalUnitType == NAL_UNIT_CODED_SLICE_CRA; } 2658 Bool isBLA() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP 2659 || m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL 2660 || m_eNalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP ); } 2661 Bool isSLNR() { return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N 2662 || m_eNalUnitType == NAL_UNIT_CODED_SLICE_TSA_N 2663 || m_eNalUnitType == NAL_UNIT_CODED_SLICE_STSA_N 2664 || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N 2665 || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N 2666 || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N10 2667 || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N12 2668 || m_eNalUnitType == NAL_UNIT_RESERVED_VCL_N14 ); } 2669 #endif 2446 2670 #if POC_RESET_FLAG 2447 2671 Bool getPocResetFlag () { return m_bPocResetFlag; } … … 2473 2697 Int getQpBDOffsetY(); 2474 2698 Int getQpBDOffsetC(); 2699 2700 #if R0156_CONF_WINDOW_IN_REP_FORMAT 2701 Window& getConformanceWindow(); 2702 #endif 2475 2703 #endif 2476 2704 … … 2485 2713 Int getPocLsbVal () { return m_pocLsbVal; } 2486 2714 Void setPocLsbVal (Int b) { m_pocLsbVal = b; } 2715 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 2716 Void setPocMsbNeeded (Bool x) { m_pocMsbValNeeded = x; } 2717 Bool getPocMsbNeeded () { return m_pocMsbValNeeded; } 2718 Int getPocResetDeltaPoc () { return m_pocResetDeltaPoc; } 2719 Void setPocResetDeltaPoc (Int x) { m_pocResetDeltaPoc = x; } 2720 #endif 2487 2721 Int getPocMsbVal () { return m_pocMsbVal; } 2488 2722 Void setPocMsbVal (Int b) { m_pocMsbVal = b; } … … 2512 2746 Int getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal ); 2513 2747 #endif 2514 2748 Int getReferenceLayerIdc( UInt refLayerId ); 2515 2749 2516 2750 #endif //SVC_EXTENSION … … 2567 2801 } 2568 2802 2569 #if Q0078_ADD_LAYER_SETS2570 Void removePS(Int psId)2571 {2572 assert(psId < m_maxId);2573 if (m_paramsetMap.find(psId) != m_paramsetMap.end())2574 {2575 m_paramsetMap.erase(psId);2576 }2577 }2578 #endif2579 2580 2581 2803 private: 2582 2804 std::map<Int,T *> m_paramsetMap; … … 2601 2823 TComSPS* getSPS(Int spsId) { return m_spsMap.getPS(spsId); }; 2602 2824 TComSPS* getFirstSPS() { return m_spsMap.getFirstPS(); }; 2603 #if Q0078_ADD_LAYER_SETS2604 Void removeSPS(Int spsId) { m_spsMap.removePS(spsId); };2605 #endif2606 2825 2607 2826 //! store picture parameter set and take ownership of it … … 2610 2829 TComPPS* getPPS(Int ppsId) { return m_ppsMap.getPS(ppsId); }; 2611 2830 TComPPS* getFirstPPS() { return m_ppsMap.getFirstPS(); }; 2612 #if Q0078_ADD_LAYER_SETS2613 Void removePPS(Int ppsId) { m_ppsMap.removePS(ppsId); };2614 #endif2615 2831 2616 2832 //! activate a SPS from a active parameter sets SEI message … … 2630 2846 #if SVC_EXTENSION 2631 2847 static ParameterSetMap<TComVPS> m_vpsMap; 2848 static ParameterSetMap<TComSPS> m_spsMap; 2849 static ParameterSetMap<TComPPS> m_ppsMap; 2632 2850 #else 2633 2851 ParameterSetMap<TComVPS> m_vpsMap; 2634 #endif2635 2852 ParameterSetMap<TComSPS> m_spsMap; 2636 2853 ParameterSetMap<TComPPS> m_ppsMap; 2854 #endif 2637 2855 2638 2856 #if SVC_EXTENSION … … 2648 2866 2649 2867 #endif // __TCOMSLICE__ 2868 -
trunk/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r815 r906 59 59 #else 60 60 #if O0194_JOINT_US_BITSHIFT 61 #if REF_REGION_OFFSET 62 Void TComUpsampleFilter::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, const Window altRefWindow ) 63 #else 61 64 Void TComUpsampleFilter::upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ) 65 #endif 62 66 #else 63 67 Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ) … … 75 79 #endif 76 80 81 #if MOVE_SCALED_OFFSET_TO_PPS 82 #if O0098_SCALED_REF_LAYER_ID 83 const Window &scalEL = currSlice->getPPS()->getScaledRefLayerWindowForLayer(refLayerId); 84 #else 85 const Window &scalEL = currSlice->getPPS()->getScaledRefLayerWindow(refLayerIdc); 86 #endif 87 #if REF_REGION_OFFSET 88 const Window &windowRL = currSlice->getPPS()->getRefLayerWindow(refLayerIdc); 89 #endif 90 #else 77 91 #if O0098_SCALED_REF_LAYER_ID 78 92 const Window &scalEL = currSlice->getSPS()->getScaledRefLayerWindowForLayer(refLayerId); 79 93 #else 80 94 const Window &scalEL = currSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 95 #endif 81 96 #endif 82 97 … … 91 106 92 107 #if Q0200_CONFORMANCE_BL_SIZE 108 const Window &confBL = currSlice->getBaseColPic(refLayerIdc)->getConformanceWindow(); 109 #endif 110 #if Q0200_CONFORMANCE_BL_SIZE || REF_REGION_OFFSET 93 111 Int chromaFormatIdc = currSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc(); 94 const Window &confBL = currSlice->getBaseColPic(refLayerIdc)->getConformanceWindow();95 112 Int xScal = TComSPS::getWinUnitX( chromaFormatIdc ); 96 113 Int yScal = TComSPS::getWinUnitY( chromaFormatIdc ); 114 #endif 115 #if R0209_GENERIC_PHASE 116 Int phaseHorLuma = currSlice->getPPS()->getPhaseHorLuma(refLayerIdc); 117 Int phaseVerLuma = currSlice->getPPS()->getPhaseVerLuma(refLayerIdc); 118 Int phaseHorChroma = currSlice->getPPS()->getPhaseHorChroma(refLayerIdc); 119 Int phaseVerChroma; 120 if (currSlice->getPPS()->getResamplePhaseSetPresentFlag(refLayerIdc)) 121 { 122 phaseVerChroma = currSlice->getPPS()->getPhaseVerChroma(refLayerIdc); 123 } 124 else 125 { 126 Int refRegionHeight = heightBL - windowRL.getWindowTopOffset() - windowRL.getWindowBottomOffset(); 127 phaseVerChroma = (4 * heightEL + (refRegionHeight >> 1)) / refRegionHeight - 4; 128 } 97 129 #endif 98 130 #if P0312_VERT_PHASE_ADJ … … 223 255 Int shiftY = 16; 224 256 257 #if R0209_GENERIC_PHASE 258 Int phaseX = phaseHorLuma; 259 Int phaseY = phaseVerLuma; 260 Int addX = ( ( phaseX * scaleX + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 261 Int addY = ( ( phaseY * scaleY + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 262 #if REF_REGION_OFFSET 263 Int refOffsetX = windowRL.getWindowLeftOffset() << 4; 264 Int refOffsetY = windowRL.getWindowTopOffset() << 4; 265 #else 266 #if Q0200_CONFORMANCE_BL_SIZE 267 Int refOffsetX = ( confBL.getWindowLeftOffset() * xScal ) << 4; 268 Int refOffsetY = ( confBL.getWindowTopOffset() * yScal ) << 4; 269 #endif 270 #endif 271 #else 225 272 #if O0215_PHASE_ALIGNMENT //for Luma, if Phase 0, then both PhaseX and PhaseY should be 0. If symmetric: both PhaseX and PhaseY should be 2 226 273 Int phaseX = 2*phaseAlignFlag; … … 258 305 #endif 259 306 307 #if REF_REGION_OFFSET 308 Int refOffsetX = windowRL.getWindowLeftOffset() << 4; 309 Int refOffsetY = windowRL.getWindowTopOffset() << 4; 310 #else 260 311 #if Q0200_CONFORMANCE_BL_SIZE 261 312 deltaX -= ( confBL.getWindowLeftOffset() * xScal ) << 4; 262 313 deltaY -= ( confBL.getWindowTopOffset() * yScal ) << 4; 263 314 #endif 315 #endif 316 #endif 264 317 265 318 Int shiftXM4 = shiftX - 4; … … 272 325 heightBL = min<Int>( pcBasePic->getHeight(), heightEL ); 273 326 327 #if R0220_REMOVE_EL_CLIP 328 Int phaseXL = scalEL.getWindowLeftOffset(); 329 Int phaseYL = scalEL.getWindowTopOffset(); 330 Int rlClipL = -(NTAPS_US_LUMA>>1); 331 Int rlClipR = widthBL -1 + (NTAPS_US_LUMA>>1); 332 Int rlClipT = -(NTAPS_US_LUMA>>1); 333 Int rlClipB = heightBL - 1 + (NTAPS_US_LUMA>>1); 334 #else 274 335 Int leftStartL = scalEL.getWindowLeftOffset(); 275 336 Int rightEndL = pcUsPic->getWidth() - scalEL.getWindowRightOffset(); … … 277 338 Int bottomEndL = pcUsPic->getHeight() - scalEL.getWindowBottomOffset(); 278 339 Int leftOffset = leftStartL > 0 ? leftStartL : 0; 340 #endif 279 341 #if O0194_JOINT_US_BITSHIFT 280 342 // g_bitDepthY was set to EL bit-depth, but shift1 should be calculated using BL bit-depth … … 293 355 for( i = 0; i < widthEL; i++ ) 294 356 { 357 #if R0220_REMOVE_EL_CLIP 358 Int x = i; 359 #if R0209_GENERIC_PHASE 360 refPos16 = (((x - phaseXL)*scaleX - addX) >> shiftXM4) + refOffsetX; 361 #else 362 #if REF_REGION_OFFSET 363 refPos16 = (((x - phaseXL)*scaleX + addX) >> shiftXM4) - deltaX + refOffsetX; 364 #else 365 refPos16 = (((x - phaseXL)*scaleX + addX) >> shiftXM4) - deltaX; 366 #endif 367 #endif 368 #else 295 369 Int x = Clip3( leftStartL, rightEndL - 1, i ); 370 #if REF_REGION_OFFSET 371 refPos16 = (((x - leftStartL)*scaleX + addX) >> shiftXM4) - deltaX + refOffsetX; 372 #else 296 373 refPos16 = (((x - leftStartL)*scaleX + addX) >> shiftXM4) - deltaX; 374 #endif 375 #endif 297 376 phase = refPos16 & 15; 298 377 refPos = refPos16 >> 4; 378 #if R0220_REMOVE_EL_CLIP 379 refPos = Clip3( rlClipL, rlClipR, refPos ); 380 #endif 299 381 coeff = m_lumaFilter[phase]; 300 382 … … 325 407 for( j = 0; j < pcTempPic->getHeight(); j++ ) 326 408 { 409 #if R0220_REMOVE_EL_CLIP 410 Int y = j; 411 #if R0209_GENERIC_PHASE 412 refPos16 = ((( y - phaseYL )*scaleY - addY) >> shiftYM4) + refOffsetY; 413 #else 414 #if REF_REGION_OFFSET 415 refPos16 = ((( y - phaseYL )*scaleY + addY) >> shiftYM4) - deltaY + refOffsetY; 416 #else 417 refPos16 = ((( y - pahseYL )*scaleY + addY) >> shiftYM4) - deltaY; 418 #endif 419 #endif 420 #else 327 421 Int y = Clip3(topStartL, bottomEndL - 1, j); 422 #if REF_REGION_OFFSET 423 refPos16 = ((( y - topStartL )*scaleY + addY) >> shiftYM4) - deltaY + refOffsetY; 424 #else 328 425 refPos16 = ((( y - topStartL )*scaleY + addY) >> shiftYM4) - deltaY; 426 #endif 427 #endif 329 428 phase = refPos16 & 15; 330 429 refPos = refPos16 >> 4; 430 #if R0220_REMOVE_EL_CLIP 431 refPos = Clip3( rlClipT, rlClipB, refPos ); 432 #endif 331 433 coeff = m_lumaFilter[phase]; 332 434 333 435 piSrcY = piTempBufY + (refPos -((NTAPS_US_LUMA>>1) - 1))*strideEL; 334 436 Pel* piDstY0 = piDstBufY + j * strideEL; 335 piDstY = piDstY0 + leftOffset; 336 piSrcY += leftOffset; 337 338 for( i = min<Int>(rightEndL, pcTempPic->getWidth()) - max<Int>(0, leftStartL); i > 0; i-- ) 437 438 #if R0220_REMOVE_EL_CLIP 439 piDstY = piDstY0; 440 441 for( i = pcTempPic->getWidth(); i > 0; i-- ) 339 442 { 340 443 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); … … 342 445 piDstY++; 343 446 } 447 #else 448 piDstY = piDstY0 + leftOffset; 449 piSrcY += leftOffset; 450 451 for( i = min<Int>(rightEndL, pcTempPic->getWidth()) - max<Int>(0, leftStartL); i > 0; i-- ) 452 { 453 *piDstY = ClipY( (sumLumaVer(piSrcY, coeff, strideEL) + iOffset) >> (nShift)); 454 piSrcY++; 455 piDstY++; 456 } 344 457 345 458 for( i = rightEndL; i < pcTempPic->getWidth(); i++ ) … … 355 468 piDstY++; 356 469 } 357 470 #endif 358 471 } 359 472 … … 374 487 strideEL = pcUsPic->getCStride(); 375 488 489 #if R0220_REMOVE_EL_CLIP 490 Int srlLOffsetC = scalEL.getWindowLeftOffset() >> 1; 491 Int srlTOffsetC = scalEL.getWindowTopOffset() >> 1; 492 rlClipL = -(NTAPS_US_CHROMA>>1); 493 rlClipR = widthBL -1 + (NTAPS_US_CHROMA>>1); 494 rlClipT = -(NTAPS_US_CHROMA>>1); 495 rlClipB = heightBL - 1 + (NTAPS_US_CHROMA>>1); 496 #else 376 497 Int leftStartC = scalEL.getWindowLeftOffset() >> 1; 377 498 Int rightEndC = (pcUsPic->getWidth() >> 1) - (scalEL.getWindowRightOffset() >> 1); … … 379 500 Int bottomEndC = (pcUsPic->getHeight() >> 1) - (scalEL.getWindowBottomOffset() >> 1); 380 501 leftOffset = leftStartC > 0 ? leftStartC : 0; 502 #endif 381 503 shiftX = 16; 382 504 shiftY = 16; 383 505 506 #if R0209_GENERIC_PHASE 507 addX = ( ( phaseHorChroma * scaleX + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 508 addY = ( ( phaseVerChroma * scaleY + 8 ) >> 4 ) - (1 << ( shiftX - 5 )); 509 Int refOffsetXC = (windowRL.getWindowLeftOffset() / xScal) << 4; 510 Int refOffsetYC = (windowRL.getWindowTopOffset() / yScal) << 4; 511 #else 384 512 #if O0215_PHASE_ALIGNMENT 385 513 Int phaseXC = phaseAlignFlag; … … 417 545 #endif 418 546 547 #if REF_REGION_OFFSET 548 Int refOffsetXC = (windowRL.getWindowLeftOffset() / xScal) << 4; 549 Int refOffsetYC = (windowRL.getWindowTopOffset() / yScal) << 4; 550 #else 419 551 #if Q0200_CONFORMANCE_BL_SIZE 420 552 deltaX -= ( ( confBL.getWindowLeftOffset() * xScal ) >> 1 ) << 4; 421 553 deltaY -= ( ( confBL.getWindowTopOffset() * yScal ) >> 1 ) << 4; 554 #endif 555 #endif 422 556 #endif 423 557 … … 447 581 for( i = 0; i < widthEL; i++ ) 448 582 { 583 #if R0220_REMOVE_EL_CLIP 584 Int x = i; 585 #if R0209_GENERIC_PHASE 586 refPos16 = (((x - srlLOffsetC)*scaleX - addX) >> shiftXM4) + refOffsetXC; 587 #else 588 #if REF_REGION_OFFSET 589 refPos16 = (((x - srlLOffsetC)*scaleX + addX) >> shiftXM4) - deltaX + refOffsetXC; 590 #else 591 refPos16 = (((x - srlLOffsetC)*scaleX + addX) >> shiftXM4) - deltaX; 592 #endif 593 #endif 594 #else 449 595 Int x = Clip3(leftStartC, rightEndC - 1, i); 596 #if REF_REGION_OFFSET 597 refPos16 = (((x - leftStartC)*scaleX + addX) >> shiftXM4) - deltaX + refOffsetXC; 598 #else 450 599 refPos16 = (((x - leftStartC)*scaleX + addX) >> shiftXM4) - deltaX; 600 #endif 601 #endif 451 602 phase = refPos16 & 15; 452 603 refPos = refPos16 >> 4; 604 #if R0220_REMOVE_EL_CLIP 605 refPos = Clip3(rlClipL, rlClipR, refPos); 606 #endif 453 607 coeff = m_chromaFilter[phase]; 454 608 … … 485 639 for( j = 0; j < pcTempPic->getHeight() >> 1; j++ ) 486 640 { 641 #if R0220_REMOVE_EL_CLIP 642 Int y = j; 643 #if R0209_GENERIC_PHASE 644 refPos16 = (((y - srlTOffsetC)*scaleX - addY) >> shiftYM4) + refOffsetYC; 645 #else 646 #if REF_REGION_OFFSET 647 refPos16 = (((y - srlTOffsetC)*scaleY + addY) >> shiftYM4) - deltaY + refOffsetYC; 648 #else 649 refPos16 = (((y - srlTOffsetC)*scaleY + addY) >> shiftYM4) - deltaY; 650 #endif 651 #endif 652 #else 487 653 Int y = Clip3(topStartC, bottomEndC - 1, j); 654 #if REF_REGION_OFFSET 655 refPos16 = (((y - topStartC)*scaleY + addY) >> shiftYM4) - deltaY + refOffsetYC; 656 #else 488 657 refPos16 = (((y - topStartC)*scaleY + addY) >> shiftYM4) - deltaY; 658 #endif 659 #endif 489 660 phase = refPos16 & 15; 490 661 refPos = refPos16 >> 4; 662 #if R0220_REMOVE_EL_CLIP 663 refPos = Clip3(rlClipT, rlClipB, refPos); 664 #endif 491 665 coeff = m_chromaFilter[phase]; 492 666 … … 496 670 Pel* piDstU0 = piDstBufU + j*strideEL; 497 671 Pel* piDstV0 = piDstBufV + j*strideEL; 498 piDstU = piDstU0 + leftOffset; 499 piDstV = piDstV0 + leftOffset; 500 pi SrcU += leftOffset;501 pi SrcV += leftOffset;502 503 for( i = min<Int>(rightEndC, pcTempPic->getWidth() >> 1) - max<Int>(0, leftStartC); i > 0; i-- )672 673 #if R0220_REMOVE_EL_CLIP 674 piDstU = piDstU0; 675 piDstV = piDstV0; 676 677 for( i = pcTempPic->getWidth() >> 1; i > 0; i-- ) 504 678 { 505 679 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); … … 510 684 piDstV++; 511 685 } 686 #else 687 piDstU = piDstU0 + leftOffset; 688 piDstV = piDstV0 + leftOffset; 689 piSrcU += leftOffset; 690 piSrcV += leftOffset; 691 692 for( i = min<Int>(rightEndC, pcTempPic->getWidth() >> 1) - max<Int>(0, leftStartC); i > 0; i-- ) 693 { 694 *piDstU = ClipC( (sumChromaVer(piSrcU, coeff, strideEL) + iOffset) >> (nShift)); 695 *piDstV = ClipC( (sumChromaVer(piSrcV, coeff, strideEL) + iOffset) >> (nShift)); 696 piSrcU++; 697 piSrcV++; 698 piDstU++; 699 piDstV++; 700 } 512 701 513 702 for( i = rightEndC; i < pcTempPic->getWidth() >> 1; i++ ) … … 528 717 piDstV++; 529 718 } 719 #endif 530 720 531 721 } -
trunk/source/Lib/TLibCommon/TComUpsampleFilter.h
r713 r906 51 51 #else 52 52 #if O0194_JOINT_US_BITSHIFT 53 #if REF_REGION_OFFSET 54 Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window, const Window altRefWindow ); 55 #else 53 56 Void upsampleBasePic( TComSlice* currSlice, UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); 57 #endif 54 58 #else 55 59 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window ); -
trunk/source/Lib/TLibCommon/TypeDef.h
r815 r906 41 41 #define SVC_EXTENSION 1 42 42 43 #define SYNTAX_BYTES 10 ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)]44 43 #if SVC_EXTENSION 45 44 #define MAX_LAYERS 8 ///< max number of layers the codec is supposed to handle 46 45 46 #define SIGNALLING_BITRATE_PICRATE_FIX 1 ///< Fix for signalling of bitrate and picture rate info in VPS VUI to be more aligned to JCTVC-R1008 47 #define INFERENCE_POC_MSB_VAL_PRESENT 1 ///< JCTVC-Q0146 -- poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0 48 #define CROSS_LAYER_BLA_FLAG_FIX 1 ///< Fix for earlier implementation mistake that omit the signalling of cross_layer_bla_flag 49 #define NON_REF_NAL_TYPE_DISCARDABLE 1 ///< JCTVC-P0041 -- If discardable picture is a non-IRAP, it must be a non-referenced sub-layer picture 50 #define VPS_AVC_BL_FLAG_REMOVAL 1 ///< remove avc_base_layer_flag and direct the function its offer to vps_base_layer_internal_flag and vps_base_layer_available_flag 51 #define VPS_RESERVED_FLAGS 1 ///< vps_base_layer_internal_flag and vps_base_layer_available_flag 52 #define VPS_VUI_VST_PARAMS 1 ///< JCTVC-R0227: Related to signalling of VST parameters of the base layer. 47 53 #define VPS_VUI_OFFSET 1 ///< N0085: Signal VPS VUI offset in the VPS extension 54 #define REMOVE_BSP_HRD_SEI 1 ///< R0010: Remove bitstream partition HRD SEI message. 55 #define NESTING_SEI_EXTENSIBILITY 1 ///< R0221: Signalling the number of SEI messages in bitstream partition nesting SEI message 56 #define POC_RESET_RESTRICTIONS 1 ///< Restrictions on semantics of POC reset-related syntax elements, including one item from R0223 57 #define POC_RESET_VALUE_RESTRICTION 1 ///< R0223: Restriction on the value of full_poc_reset_flag 58 #define OUTPUT_LAYER_SETS_CONFIG 1 59 #define MOVE_ADDN_LS_SIGNALLING 1 ///< JCTVC-R0238: (Ed.) Move additional layer set signalling in VPS extn. 60 #define PTL_SIGNALLING 1 ///< Overall macro for all PTL-related signalling 61 #if PTL_SIGNALLING 62 #define LIST_OF_PTL 1 ///< JCTVC-R0272: Signalling the PTL for the 0-th OLS 63 #define NECESSARY_LAYER_FLAG 1 ////< Derivation of NecessaryLayerFlag 64 #define PER_LAYER_PTL 1 ///< Signal profile-tier-level information for each layer. 65 #endif 66 #define BSP_INIT_ARRIVAL_SEI 1 ///< JCTVC-R0231: Make signalling of vcl_initial_arrival_delay independent of NalHrdBpPresentFlag 67 #define SUB_LAYERS_IN_LAYER_SET 1 ///< Move calculation of MaxSubLayerInLayerSets to a separate function 68 #define VPS_VUI_BSP_HRD_PARAMS 1 ///< JCTVC-R0231: Define the VPS VUI BSP hrd_params() as a separate function, and apply changes adopted. 48 69 #define O0137_MAX_LAYERID 1 ///< JCTVC-O0137, JCTVC-O0200, JCTVC-O0223: restrict nuh_layer_id and vps_max_layers_minus1 49 70 50 #define Q0108_TSA_STSA 0 ///< JCTVC-Q0108, Remove cross-layer alignment constraints of TSA and STSA pictures, enable to have different prediction structures in different layers 71 #define R0226_CONSTRAINT_TMVP_SEI 1 ///< JCTVC-R0226, Modification to semantics in temporal motion vector prediction constraints SEI message 72 #define R0226_SLICE_TMVP 1 ///< JCTVC-R0226, Regarding slice_temporal_mvp_enabled_flag 73 #define R0279_REP_FORMAT_INBL 1 ///< JCTVC-R0279, For any independent non-base layer the used representation format is the one that is signalled in the active SPS for the layer 74 #define R0227_VUI_BSP_HRD_FLAG 1 ///< JCTVC-R0227, Conformance checking such that VPS VUI HRD only present if VPS timing info is signalled 75 #define R0227_REP_FORMAT_CONSTRAINT 1 ///< JCTVC-R0227, Conformance checking such that representation format of a particular layer shall not be greater than the one defined in VPS for that layer 76 #define R0227_BR_PR_ADD_LAYER_SET 1 ///< JCTVC-R0227, Signalling of bit-rate and picture rate for additional layer set 77 #define R0042_PROFILE_INDICATION 1 ///< JCTVC-R0042, Profile indication for additional layer sets 78 79 #define Q0108_TSA_STSA 1 ///< JCTVC-Q0108, Remove cross-layer alignment constraints of TSA and STSA pictures, enable to have different prediction structures in different layers 51 80 #define Q0177_SPS_TEMP_NESTING_FIX 1 ///< JCTVC-Q0177; Fix the inference value of sps_temporal_id_nesting_flag when it is not present 52 81 #define Q0177_EOS_CHECKS 1 ///< JCTVC-Q0177; Put checks on handling EOS … … 54 83 #define Q0146_SSH_EXT_DATA_BIT 1 ///< JCTVC-Q0146; Bug-fix -- the SSH_EXT_DATA_BIT can have any value -- not required to be 1 55 84 56 #define Q0200_CONFORMANCE_BL_SIZE 1 ///< JCTVC-Q0200; use conformance picture size in re-sampling processs57 #define P0312_VERT_PHASE_ADJ 1 ///< JCTVC-P0312: vertical phase adjustment in re-sampling process (BoG report)58 #if P0312_VERT_PHASE_ADJ59 #define Q0120_PHASE_CALCULATION 1 ///< JCTVC-Q0120 phase offset derivation for combination of spatial scalibility and field coding.60 #endif61 85 #define P0130_EOB 1 ///< JCTVC-P0130, set layer Id of EOB NALU to be fixed to 0 86 #define T_ID_EOB_BUG_FIX 1 ///< Bug fix for the value of temporal id of EOB NALU. It must be set to 0 62 87 #define P0307_REMOVE_VPS_VUI_OFFSET 1 ///< JCTVC-P0307, remove implementation related to VPS VUI offset signalling 63 88 #define P0307_VPS_NON_VUI_EXTENSION 1 ///< JCTVC-P0307, implementation related to NON VUI VPS Extension signalling … … 94 119 #if Q0048_CGS_3D_ASYMLUT 95 120 #define CGS_GCC_NO_VECTORIZATION 1 96 #define O0194_WEIGHTED_PREDICTION_CGS 0 97 #else 98 #define O0194_WEIGHTED_PREDICTION_CGS 1 ///< JCTVC-O0194: Weighted prediciton for color gamut scalability 99 #endif 121 #define R0150_CGS_SIGNAL_CONSTRAINTS 1 ///< JCTVC-R0150: CGS signaling improvement and constraints 122 #define R0151_CGS_3D_ASYMLUT_IMPROVE 1 ///< JCTVC-R0151: Non-uniform chroma partitioning and improved LUT coefficient coding 123 #define R0164_CGS_LUT_BUGFIX 1 ///< JCTVC-R0164: Bug fix with LUT syntax 124 #define R0164_CGS_LUT_BUGFIX_CHECK 0 ///< JCTVC-R0164: Add traces explicitly/non-explicitly encoded vertices and check if 3DLUT is correctly filled 125 #define R0179_CGS_SIZE_8x1x1 1 ///< JCTVC-R0179: allow CGS LUT size to be 8x1x1 as well 126 #define R0300_CGS_RES_COEFF_CODING 1 ///< JCTVC-R0300: improved residual coefficient coding for R0151 127 #define R0179_ENC_OPT_3DLUT_SIZE 0 ///< JCTVC-R0179: RD decision based LUT size selection 128 #endif 129 #define O0194_WEIGHTED_PREDICTION_CGS 1 ///< JCTVC-O0194: Weighted prediction for colour gamut scalability 100 130 #define POC_RESET_FLAG 0 ///< JCTVC-N0244: POC reset flag for layer pictures. 101 131 #define POC_RESET_IDC 1 ///< JCTVC-P0041: Include poc_reset_idc and related derivation - eventually will replace POC_RESET_FLAG … … 107 137 #define UNAVAILABLE_PIC_BUGFIX 1 108 138 #endif 139 #if INFERENCE_POC_MSB_VAL_PRESENT 140 #define POC_MSB_VAL_PRESENT_FLAG_SEM 0 ///< JCTVC-Q0146: Inference of poc_msb_val_present_flag 141 #else 109 142 #define POC_MSB_VAL_PRESENT_FLAG_SEM 1 ///< JCTVC-Q0146: Inference of poc_msb_val_present_flag 143 #endif 110 144 #define POC_RESET_INFO_INFERENCE 1 ///< JCTVC-Q0146: Infer the value of poc_reset_info_present_flag when not present 111 145 #define NO_OUTPUT_OF_PRIOR_PICS 1 ///< Use no_output_of_prior_pics_flag … … 123 157 #endif 124 158 159 #define P0297_VPS_POC_LSB_ALIGNED_FLAG 1 ///< JCTVC-P0297: vps_poc_lsb_aligned_flag for cross-layer POC anchor picture derivation 160 125 161 #define VPS_EXTN_MASK_AND_DIM_INFO 1 ///< Include avc_base_layer_flag, splitting_flag, scalability mask and dimension related info 126 162 #if VPS_EXTN_MASK_AND_DIM_INFO … … 152 188 153 189 #define AVC_BASE 1 ///< YUV BL reading for AVC base SVC 154 #if AVC_BASE155 #define AVC_SYNTAX 0 ///< Syntax reading for AVC base156 #endif157 190 158 191 #define REF_IDX_MFM 1 ///< JCTVC-L0336: motion vector mapping of inter-layer reference picture … … 193 226 #define REP_FORMAT_FIX 1 ///< update_rep_format_flag should be inferred to be equal to 0 194 227 228 #define R0156_CONF_WINDOW_IN_REP_FORMAT O0096_REP_FORMAT_INDEX ///< JCTVC-R0156: add conformance window cropping offsets to rep_format() 229 195 230 #define RESAMPLING_CONSTRAINT_BUG_FIX 1 196 231 #define O0098_SCALED_REF_LAYER_ID 1 ///< JCTVC-O0098: signal scaled reference id … … 226 261 #define HRD_BPB 1 ///< JCTVC-Q0101 Bitstream Partition Buffering Proposals 227 262 #define DPB_CONSTRAINTS 1 ///< JCTVC-Q0100 RPS DPB constraints 263 #define DPB_INTERNAL_BL_SIG 1 ///< JCTVC-R0153: external base layer 264 #define ALT_OPT_LAYER_FLAG 1 ///< JCTVC-R0154: proposal1 - alt_output_layer_flag[i] inference 265 #define DEF_OPT_LAYER_IDC 1 ///< JCTVC-R0154: proposal2 - default_output_layer_idc and output_layer_flag[i][j] 266 #define ISLICE_TYPE_NUMDIR 1 ///< JCTVC-R0155: Proposal 1 I slice_type 267 #define OLS_IDX_CHK 1 ///< JCTVC-R0155: Proposal 2 valid range for output_layer_set_idx_to_vps[i] 268 #define R0340_RESAMPLING_MODIFICATION 1 ///< JCTVC-R0340: set of changes regarding resampling (as listed below) 269 #if R0340_RESAMPLING_MODIFICATION 270 #define MOVE_SCALED_OFFSET_TO_PPS 1 ///< JCTVC-R0013: move scaled reference layer offset from SPS to PPS 271 #if MOVE_SCALED_OFFSET_TO_PPS 272 #define REF_REGION_OFFSET 1 ///< JCTVC-Q0159/R0220: reference region offset 273 #define R0209_GENERIC_PHASE 1 ///< JCTVC-R0209: resampling with generic phase 274 #define R0220_REMOVE_EL_CLIP 1 ///< JCTVC-R0220: remove clip to scaled ref window in resampling process 275 #define RESAMPLING_FIX 1 ///< Resampling fix -- equal offset check and conformance check 276 #endif 277 #else 278 #define Q0200_CONFORMANCE_BL_SIZE 1 ///< JCTVC-Q0200; use conformance picture size in re-sampling processs 279 #define P0312_VERT_PHASE_ADJ 1 ///< JCTVC-P0312: vertical phase adjustment in re-sampling process (BoG report) 280 #if P0312_VERT_PHASE_ADJ 281 #define Q0120_PHASE_CALCULATION 1 ///< JCTVC-Q0120 phase offset derivation for combination of spatial scalibility and field coding. 282 #endif 283 #endif 228 284 229 285 /// scalability types … … 234 290 AUX_ID = 3, 235 291 }; 292 293 #define WPP_FIX 1 236 294 237 295 /// normative encoder constraints -------- … … 255 313 #define MAX_SUB_STREAMS 1024 256 314 #endif 257 #define Q0074_SEI_COLOR_MAPPING 1 ///< JCTVC-Q0074, SEI Color Mapping258 315 #define LAYERS_NOT_PRESENT_SEI 1 ///< JCTVC-M0043: add layers not present SEI. 259 316 #define N0383_IL_CONSTRAINED_TILE_SETS_SEI 1 260 317 #define Q0189_TMVP_CONSTRAINTS 1 ///< JCTVC-Q0189: indicate constraints on TMVP 261 318 #define Q0247_FRAME_FIELD_INFO 1 ///< JCTVC-Q0247: field_frame_info SEI message 262 263 264 #else 265 #define SYNTAX_OUTPUT 0 319 #define R0247_SEI_ACTIVE 1 ///< JCTVC-R0247: active parameter sets SEI message 320 266 321 #endif // SVC_EXTENSION 322 #define Q0074_COLOUR_REMAPPING_SEI 1 ///< JCTVC-Q0074, JCTVC-R0344: SEI Colour Remapping Information 267 323 268 324 … … 278 334 #define SAO_SGN_FUNC 1 279 335 336 #define TILE_SIZE_CHECK 1 337 280 338 #define FIX1172 1 ///< fix ticket #1172 281 339 … … 292 350 #define MAX_NESTING_NUM_OPS 1024 293 351 #define MAX_NESTING_NUM_LAYER 64 294 352 #if NESTING_SEI_EXTENSIBILITY 353 #define MAX_SEIS_IN_BSP_NESTING 64 354 #endif 295 355 #if SVC_EXTENSION 296 356 #define MAX_VPS_OP_LAYER_SETS_PLUS1 (MAX_LAYERS+1) 297 357 #define MAX_VPS_LAYER_SETS_PLUS1 1024 358 #define MAX_VPS_OUTPUT_LAYER_SETS_PLUS1 1024 298 359 #define MAX_VPS_LAYER_ID_PLUS1 MAX_LAYERS 299 360 #else … … 438 499 typedef double Double; 439 500 typedef float Float; 440 441 501 // ==================================================================================================================== 442 502 // 64-bit integer type
Note: See TracChangeset for help on using the changeset viewer.