Changeset 852 in SHVCSoftware
- Timestamp:
- 5 Aug 2014, 01:37:56 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 5 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 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r851 r852 4154 4154 pc3DAsymLUT->setResQuantBit( uiResQaunBit ); 4155 4155 4156 #if R0164_CGS_LUT_BUGFIX 4156 #if R0164_CGS_LUT_BUGFIX_CHECK 4157 4157 pc3DAsymLUT->xInitCuboids(); 4158 4158 #endif 4159 4159 xParse3DAsymLUTOctant( pc3DAsymLUT , 0 , 0 , 0 , 0 , 1 << pc3DAsymLUT->getCurOctantDepth() ); 4160 4160 #if R0164_CGS_LUT_BUGFIX 4161 pc3DAsymLUT->xCuboidsExplicitCheck( true ); 4161 #if R0164_CGS_LUT_BUGFIX_CHECK 4162 printf("============= Before 'xCuboidsFilledCheck()': ================\n"); 4163 pc3DAsymLUT->display(); 4164 pc3DAsymLUT->xCuboidsFilledCheck( false ); 4165 printf("============= After 'xCuboidsFilledCheck()': =================\n"); 4166 pc3DAsymLUT->display(); 4167 #endif 4162 4168 #endif 4163 4169 } … … 4219 4225 #if R0164_CGS_LUT_BUGFIX 4220 4226 pc3DAsymLUT->setCuboidVertexResTree( yIdx + (l<<shift) , uIdx , vIdx , nVertexIdx , deltaY , deltaU , deltaV ); 4227 for (Int m = 1; m < (1<<shift); m++) { 4228 pc3DAsymLUT->setCuboidVertexResTree( yIdx + (l<<shift) + m , uIdx , vIdx , nVertexIdx , 0 , 0 , 0 ); 4229 #if R0164_CGS_LUT_BUGFIX_CHECK 4230 pc3DAsymLUT->xSetFilled( yIdx + (l<<shift) + m , uIdx , vIdx ); 4231 #endif 4232 } 4221 4233 #else 4222 4234 pc3DAsymLUT->setCuboidVertexResTree( yIdx + l , uIdx , vIdx , nVertexIdx , deltaY , deltaU , deltaV ); 4223 4235 #endif 4224 4236 } 4237 #if R0164_CGS_LUT_BUGFIX_CHECK 4238 pc3DAsymLUT->xSetExplicit( yIdx + (l<<shift) , uIdx , vIdx ); 4239 #endif 4240 } 4225 4241 #if R0164_CGS_LUT_BUGFIX 4226 pc3DAsymLUT->xSetExplicit( yIdx + (l<<shift) , uIdx , vIdx ); 4227 #endif 4228 } 4242 for ( Int u=0 ; u<nLength ; u++ ) { 4243 for ( Int v=0 ; v<nLength ; v++ ) { 4244 if ( u!=0 || v!=0 ) { 4245 for ( Int y=0 ; y<nLength*nYPartNum ; y++ ) { 4246 for( Int nVertexIdx = 0 ; nVertexIdx < 4 ; nVertexIdx++ ) 4247 { 4248 pc3DAsymLUT->setCuboidVertexResTree( yIdx + y , uIdx + u , vIdx + v , nVertexIdx , 0 , 0 , 0 ); 4249 #if R0164_CGS_LUT_BUGFIX_CHECK 4250 pc3DAsymLUT->xSetFilled( yIdx + y , uIdx + u , vIdx + v ); 4251 #endif 4252 } 4253 } 4254 } 4255 } 4256 } 4257 #endif 4229 4258 } 4230 4259 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r850 r852 2874 2874 #endif 2875 2875 2876 #if R0164_CGS_LUT_BUGFIX 2876 #if R0164_CGS_LUT_BUGFIX_CHECK 2877 2877 pc3DAsymLUT->xInitCuboids(); 2878 2878 #endif 2879 2879 xCode3DAsymLUTOctant( pc3DAsymLUT , 0 , 0 , 0 , 0 , 1 << pc3DAsymLUT->getCurOctantDepth() ); 2880 #if R0164_CGS_LUT_BUGFIX 2881 pc3DAsymLUT->xCuboidsExplicitCheck( false ); 2880 #if R0164_CGS_LUT_BUGFIX_CHECK 2881 xCuboidsFilledCheck( false ); 2882 pc3DAsymLUT->display( false ); 2882 2883 #endif 2883 2884 } … … 2942 2943 } 2943 2944 } 2944 #if R0164_CGS_LUT_BUGFIX 2945 #if R0164_CGS_LUT_BUGFIX_CHECK 2945 2946 pc3DAsymLUT->xSetExplicit( yIdx + (l<<shift) , uIdx , vIdx ); 2946 2947 #endif
Note: See TracChangeset for help on using the changeset viewer.