Changeset 852 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon
- Timestamp:
- 5 Aug 2014, 01:37:56 (11 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.cpp
r826 r852 17 17 m_pCuboid = NULL; 18 18 m_nResQuanBit = 0; 19 #if R0164_CGS_LUT_BUGFIX 19 #if R0164_CGS_LUT_BUGFIX_CHECK 20 20 m_pCuboidExplicit = NULL; 21 m_pCuboidFilled = NULL; 21 22 #endif 22 23 } … … 60 61 xAllocate3DArray( m_pCuboid , m_nYSize , m_nUSize , m_nVSize ); 61 62 62 #if R0164_CGS_LUT_BUGFIX 63 #if R0164_CGS_LUT_BUGFIX_CHECK 63 64 xAllocate3DArray( m_pCuboidExplicit , m_nYSize , m_nUSize , m_nVSize ); 65 xAllocate3DArray( m_pCuboidFilled , m_nYSize , m_nUSize , m_nVSize ); 64 66 #endif 65 67 } … … 68 70 { 69 71 xFree3DArray( m_pCuboid ); 70 #if R0164_CGS_LUT_BUGFIX 71 xFree3DArray( m_pCuboidExplicit ); 72 #if R0164_CGS_LUT_BUGFIX_CHECK 73 xFree3DArray( m_pCuboidExplicit ); 74 xFree3DArray( m_pCuboidFilled ); 72 75 #endif 73 76 } … … 345 348 } 346 349 347 #if R0164_CGS_LUT_BUGFIX 350 #if R0164_CGS_LUT_BUGFIX_CHECK 348 351 Void TCom3DAsymLUT::xInitCuboids( ) 349 352 { … … 356 359 { 357 360 m_pCuboidExplicit[yIdx][uIdx][vIdx] = false; 361 m_pCuboidFilled[yIdx][uIdx][vIdx] = false; 358 362 } 359 363 } … … 361 365 } 362 366 363 Void TCom3DAsymLUT::xCuboids ExplicitCheck( Int yIdx , Int uIdx , Int vIdx )364 { 365 if ( m_pCuboid Explicit[yIdx][uIdx][vIdx] == false )367 Void TCom3DAsymLUT::xCuboidsFilledCheck( Int yIdx , Int uIdx , Int vIdx ) 368 { 369 if ( m_pCuboidFilled[yIdx][uIdx][vIdx] == false ) 366 370 { 367 371 if( yIdx > 0) 368 assert ( m_pCuboid Explicit[yIdx-1][uIdx][vIdx] );372 assert ( m_pCuboidFilled[yIdx-1][uIdx][vIdx] ); 369 373 370 374 for ( Int nVertexIdx=0 ; nVertexIdx<4 ; nVertexIdx++ ) 371 375 m_pCuboid[yIdx][uIdx][vIdx].P[nVertexIdx] = yIdx == 0 ? xGetCuboidVertexPredA( yIdx , uIdx , vIdx , nVertexIdx ): xGetCuboidVertexPredAll( yIdx , uIdx , vIdx , nVertexIdx ); 372 376 373 m_pCuboid Explicit[yIdx][uIdx][vIdx] = true ;374 } 375 } 376 377 378 Void TCom3DAsymLUT::xCuboids ExplicitCheck( Bool bDecode )377 m_pCuboidFilled[yIdx][uIdx][vIdx] = true ; 378 } 379 } 380 381 382 Void TCom3DAsymLUT::xCuboidsFilledCheck( Bool bDecode ) 379 383 { 380 384 Int ySize = 1 << ( getCurOctantDepth() + getCurYPartNumLog2() ); … … 388 392 { 389 393 if ( bDecode ) 390 xCuboids ExplicitCheck( yIdx , uIdx , vIdx );391 392 assert( m_pCuboid Explicit[yIdx][uIdx][vIdx] );394 xCuboidsFilledCheck( yIdx , uIdx , vIdx ); 395 396 assert( m_pCuboidFilled[yIdx][uIdx][vIdx] ); 393 397 } 394 398 } … … 415 419 #endif 416 420 417 #endif 418 421 #if R0164_CGS_LUT_BUGFIX_CHECK 422 Void TCom3DAsymLUT::display( Bool bFilled ) 423 { 424 Int ySize = 1 << ( getCurOctantDepth() + getCurYPartNumLog2() ); 425 Int uSize = 1 << getCurOctantDepth(); 426 Int vSize = 1 << getCurOctantDepth(); 427 Int vIdx=0; 428 429 printf("\n"); 430 printf("3DLut Explicit flag:\n"); 431 for( Int uIdx = 0 ; uIdx < uSize ; uIdx++ ) 432 { 433 for( Int yIdx = 0 ; yIdx < ySize ; yIdx++ ) 434 { 435 printf("%d\t", m_pCuboidExplicit[yIdx][uIdx][vIdx] ); 436 } 437 printf("\n"); 438 } 439 440 printf("3DLut values (explicit):\n"); 441 for( Int uIdx = 0 ; uIdx < uSize ; uIdx++ ) 442 { 443 for( Int yIdx = 0 ; yIdx < ySize ; yIdx++ ) 444 { 445 if ( m_pCuboidExplicit[yIdx][uIdx][vIdx] ) printf("%d\t", m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 446 else printf("?\t", m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 447 } 448 printf("\n"); 449 } 450 451 printf("3DLut values (all):\n"); 452 for( Int uIdx = 0 ; uIdx < uSize ; uIdx++ ) 453 { 454 for( Int yIdx = 0 ; yIdx < ySize ; yIdx++ ) 455 { 456 if ( bFilled ) { 457 if ( m_pCuboidFilled[yIdx][uIdx][vIdx] ) printf("%d\t" , m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 458 else printf("unk\t" , m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 459 } 460 else 461 printf("%d\t" , m_pCuboid[yIdx][uIdx][vIdx].P[0].Y ); 462 } 463 printf("\n"); 464 } 465 466 } 467 #endif 468 469 #endif 470 -
branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h
r826 r852 74 74 SYUVP getCuboidVertexResTree( Int yIdx , Int uIdx , Int vIdx , Int nVertexIdx ); 75 75 Void setCuboidVertexResTree( Int yIdx , Int uIdx , Int vIdx , Int nVertexIdx , Int deltaY , Int deltaU , Int deltaV ); 76 #if R0164_CGS_LUT_BUGFIX 76 #if R0164_CGS_LUT_BUGFIX_CHECK 77 77 Void xInitCuboids( ); 78 Void xCuboidsExplicitCheck( Int yIdx , Int uIdx , Int vIdx ); 79 Void xCuboidsExplicitCheck( Bool bDecode ); 80 Void xSetExplicit( Int yIdx , Int uIdx , Int vIdx ) { m_pCuboidExplicit[yIdx][uIdx][vIdx] = true ;} 78 Void xCuboidsFilledCheck( Int yIdx , Int uIdx , Int vIdx ); 79 Void xCuboidsFilledCheck( Bool bDecode ); 80 Void display( Bool bFilled=true ); 81 Void xSetExplicit( Int yIdx , Int uIdx , Int vIdx ) { m_pCuboidExplicit[yIdx][uIdx][vIdx] = true ; xSetFilled(yIdx,uIdx,vIdx); } 82 Void xSetFilled( Int yIdx , Int uIdx , Int vIdx ) { m_pCuboidFilled[yIdx][uIdx][vIdx] = true ; } 81 83 #endif 82 84 … … 114 116 Int m_nAdaptCThresholdV; 115 117 #endif 116 #if R0164_CGS_LUT_BUGFIX 118 #if R0164_CGS_LUT_BUGFIX_CHECK 117 119 Bool *** m_pCuboidExplicit; 120 Bool *** m_pCuboidFilled; 118 121 #endif 119 122 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r851 r852 103 103 #define R0151_CGS_3D_ASYMLUT_IMPROVE 1 ///< JCTVC-R0151: Non-uniform chroma partitioning and improved LUT coefficient coding 104 104 #define R0164_CGS_LUT_BUGFIX 1 ///< JCTVC-R0164: Bug fix with LUT syntax 105 #define R0164_CGS_LUT_BUGFIX_CHECK 0 ///< JCTVC-R0164: Add traces explicitly/non-explicitly encoded vertices and check if 3DLUT is correctly filled 105 106 #define R0179_CGS_SIZE_8x1x1 1 ///< JCTVC-R0179: allow CGS LUT size to be 8x1x1 as well 106 107 #define R0300_CGS_RES_COEFF_CODING 1 ///< JCTVC-R0300: improved residual coefficient coding for R0151
Note: See TracChangeset for help on using the changeset viewer.