Changeset 1213 in SHVCSoftware
- Timestamp:
- 8 Jul 2015, 23:18:57 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.cpp
r1212 r1213 285 285 rYUVP.U = sPred.U + ( deltaU << m_nResQuanBit ); 286 286 rYUVP.V = sPred.V + ( deltaV << m_nResQuanBit ); 287 #if R0150_CGS_SIGNAL_CONSTRAINTS 287 288 288 // LUT coefficients are less than 12-bit 289 289 assert( -2048 <= rYUVP.Y && rYUVP.Y <= 2047 ); 290 290 assert( -2048 <= rYUVP.U && rYUVP.U <= 2047 ); 291 291 assert( -2048 <= rYUVP.V && rYUVP.V <= 2047 ); 292 #endif293 292 } 294 293 … … 413 412 #endif 414 413 415 #if R0150_CGS_SIGNAL_CONSTRAINTS416 414 Bool TCom3DAsymLUT::isRefLayer( UInt uiRefLayerId ) 417 415 { … … 428 426 return( bIsRefLayer ); 429 427 } 430 #endif431 428 432 429 #if R0164_CGS_LUT_BUGFIX_CHECK -
branches/SHM-dev/source/Lib/TLibCommon/TCom3DAsymLUT.h
r1212 r1213 4 4 5 5 #include "TypeDef.h" 6 #if R0150_CGS_SIGNAL_CONSTRAINTS 6 7 #if CGS_3D_ASYMLUT 7 8 #include <cassert> 8 9 #include <vector> 9 #endif10 11 #if CGS_3D_ASYMLUT12 10 13 11 typedef struct _SYUVP … … 29 27 virtual ~TCom3DAsymLUT(); 30 28 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 ); 29 virtual Void create( Int nMaxOctantDepth, Int nInputBitDepth, Int nInputBitDepthC, Int nOutputBitDepth, Int nOutputBitDepthC, Int nMaxYPartNumLog2, Int nAdaptCThresholdU, Int nAdaptCThresholdV ); 36 30 virtual Void destroy(); 37 31 … … 51 45 Int getMaxYPartNumLog2() { return m_nMaxYPartNumLog2; } 52 46 Int getCurYPartNumLog2() { return m_nCurYPartNumLog2; } 53 #if R0150_CGS_SIGNAL_CONSTRAINTS 47 54 48 Void addRefLayerId( UInt uiRefLayerId ) 55 49 { … … 60 54 UInt getRefLayerId( UInt n ) { assert( n < m_vRefLayerId.size() ); return m_vRefLayerId[n]; } 61 55 Bool isRefLayer( UInt uiRefLayerId ); 62 #endif 56 63 57 #if R0151_CGS_3D_ASYMLUT_IMPROVE 64 58 Void setAdaptChromaThresholdU( Int n ) { m_nAdaptCThresholdU = n; } … … 113 107 SCuboid *** m_pCuboid; 114 108 const static Int m_nVertexIdxOffset[4][3]; 115 #if R0150_CGS_SIGNAL_CONSTRAINTS116 109 std::vector<UInt> m_vRefLayerId; 117 #endif118 110 #if R0151_CGS_3D_ASYMLUT_IMPROVE 119 111 Int m_nAdaptCThresholdU; -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1212 r1213 58 58 #if CGS_3D_ASYMLUT 59 59 #define CGS_GCC_NO_VECTORIZATION 1 60 #define R0150_CGS_SIGNAL_CONSTRAINTS 1 ///< JCTVC-R0150: CGS signaling improvement and constraints61 60 #define R0151_CGS_3D_ASYMLUT_IMPROVE 1 ///< JCTVC-R0151: Non-uniform chroma partitioning and improved LUT coefficient coding 62 61 #define R0164_CGS_LUT_BUGFIX 1 ///< JCTVC-R0164: Bug fix with LUT syntax -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1212 r1213 3506 3506 Void TDecCavlc::xParse3DAsymLUT( TCom3DAsymLUT * pc3DAsymLUT ) 3507 3507 { 3508 #if R0150_CGS_SIGNAL_CONSTRAINTS3509 3508 UInt uiNumRefLayersM1; 3510 3509 READ_UVLC( uiNumRefLayersM1 , "num_cm_ref_layers_minus1" ); … … 3516 3515 pc3DAsymLUT->addRefLayerId( uiRefLayerId ); 3517 3516 } 3518 #endif 3517 3519 3518 UInt uiCurOctantDepth , uiCurPartNumLog2 , uiInputBitDepthM8 , uiOutputBitDepthM8 , uiResQaunBit; 3520 3519 #if R0300_CGS_RES_COEFF_CODING … … 3523 3522 READ_CODE( 2 , uiCurOctantDepth , "cm_octant_depth" ); 3524 3523 READ_CODE( 2 , uiCurPartNumLog2 , "cm_y_part_num_log2" ); 3525 #if R0150_CGS_SIGNAL_CONSTRAINTS 3524 3526 3525 UInt uiChromaInputBitDepthM8 , uiChromaOutputBitDepthM8; 3526 3527 3527 READ_UVLC( uiInputBitDepthM8 , "cm_input_luma_bit_depth_minus8" ); 3528 3528 READ_UVLC( uiChromaInputBitDepthM8 , "cm_input_chroma_bit_depth_minus8" ); 3529 3529 READ_UVLC( uiOutputBitDepthM8 , "cm_output_luma_bit_depth_minus8" ); 3530 3530 READ_UVLC( uiChromaOutputBitDepthM8 , "cm_output_chroma_bit_depth_minus8" ); 3531 #else3532 READ_CODE( 3 , uiInputBitDepthM8 , "cm_input_bit_depth_minus8" );3533 Int iInputBitDepthCDelta;3534 READ_SVLC(iInputBitDepthCDelta, "cm_input_bit_depth_chroma delta");3535 READ_CODE( 3 , uiOutputBitDepthM8 , "cm_output_bit_depth_minus8" );3536 Int iOutputBitDepthCDelta;3537 READ_SVLC(iOutputBitDepthCDelta, "cm_output_bit_depth_chroma_delta");3538 #endif3539 3531 READ_CODE( 2 , uiResQaunBit , "cm_res_quant_bit" ); 3540 3532 #if R0300_CGS_RES_COEFF_CODING … … 3544 3536 3545 3537 #if R0151_CGS_3D_ASYMLUT_IMPROVE 3546 #if R0150_CGS_SIGNAL_CONSTRAINTS3547 3538 Int nAdaptCThresholdU = 1 << ( uiChromaInputBitDepthM8 + 8 - 1 ); 3548 3539 Int nAdaptCThresholdV = 1 << ( uiChromaInputBitDepthM8 + 8 - 1 ); 3549 #else 3550 Int nAdaptCThresholdU = 1 << ( uiInputBitDepthM8 + 8 + iInputBitDepthCDelta - 1 ); 3551 Int nAdaptCThresholdV = 1 << ( uiInputBitDepthM8 + 8 + iInputBitDepthCDelta - 1 ); 3552 #endif 3540 3553 3541 if( uiCurOctantDepth == 1 ) 3554 3542 { … … 3562 3550 pc3DAsymLUT->destroy(); 3563 3551 pc3DAsymLUT->create( uiCurOctantDepth , uiInputBitDepthM8 + 8 , 3564 #if R0150_CGS_SIGNAL_CONSTRAINTS3565 3552 uiChromaInputBitDepthM8 + 8 , 3566 #else3567 uiInputBitDepthM8 + 8 + iInputBitDepthCDelta,3568 #endif3569 3553 uiOutputBitDepthM8 + 8 , 3570 #if R0150_CGS_SIGNAL_CONSTRAINTS3571 3554 uiChromaOutputBitDepthM8 + 8 , 3572 #else3573 uiOutputBitDepthM8 + 8 + iOutputBitDepthCDelta ,3574 #endif3575 3555 uiCurPartNumLog2 3576 3556 #if R0151_CGS_3D_ASYMLUT_IMPROVE -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1212 r1213 1636 1636 #if CGS_3D_ASYMLUT 1637 1637 TComPicYuv* pBaseColRec = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(); 1638 if( pcSlice->getPPS()->getCGSFlag() 1639 #if R0150_CGS_SIGNAL_CONSTRAINTS 1640 && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ) 1641 #endif 1642 ) 1643 { 1644 #if R0150_CGS_SIGNAL_CONSTRAINTS 1638 if( pcSlice->getPPS()->getCGSFlag() && m_c3DAsymLUTPPS.isRefLayer( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ) ) 1639 { 1645 1640 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepthY() == m_c3DAsymLUTPPS.getInputBitDepthY() ); 1646 1641 assert( pcSlice->getBaseColPic( refLayerIdc )->getSlice( 0 )->getBitDepthC() == m_c3DAsymLUTPPS.getInputBitDepthC() ); 1647 1642 assert( pcSlice->getBitDepthY() >= m_c3DAsymLUTPPS.getOutputBitDepthY() ); 1648 1643 assert( pcSlice->getBitDepthY() >= m_c3DAsymLUTPPS.getOutputBitDepthC() ); 1649 #endif 1650 if( !m_pColorMappedPic)1644 1645 if( !m_pColorMappedPic ) 1651 1646 { 1652 1647 initAsymLut(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)); 1653 1648 } 1649 1654 1650 m_c3DAsymLUTPPS.colorMapping( pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), m_pColorMappedPic ); 1655 1651 pBaseColRec = m_pColorMappedPic; 1656 1652 } 1657 1653 #endif 1654 1658 1655 if( m_pcPic->isSpatialEnhLayer(refLayerIdc) ) 1659 1656 { -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1212 r1213 2470 2470 Void TEncCavlc::xCode3DAsymLUT( TCom3DAsymLUT * pc3DAsymLUT ) 2471 2471 { 2472 #if R0150_CGS_SIGNAL_CONSTRAINTS2473 2472 UInt uiNumRefLayers = ( UInt )pc3DAsymLUT->getRefLayerNum(); 2474 2473 WRITE_UVLC( uiNumRefLayers - 1 , "num_cm_ref_layers_minus1" ); … … 2477 2476 WRITE_CODE( pc3DAsymLUT->getRefLayerId( i ) , 6 , "cm_ref_layer_id" ); 2478 2477 } 2479 #endif 2478 2480 2479 assert( pc3DAsymLUT->getCurOctantDepth() < 4 ); 2481 2480 WRITE_CODE( pc3DAsymLUT->getCurOctantDepth() , 2 , "cm_octant_depth" ); … … 2483 2482 WRITE_CODE( pc3DAsymLUT->getCurYPartNumLog2() , 2 , "cm_y_part_num_log2" ); 2484 2483 assert( pc3DAsymLUT->getInputBitDepthY() < 16 ); 2485 #if R0150_CGS_SIGNAL_CONSTRAINTS 2484 2486 2485 WRITE_UVLC( pc3DAsymLUT->getInputBitDepthY() - 8 , "cm_input_luma_bit_depth_minus8" ); 2487 2486 WRITE_UVLC( pc3DAsymLUT->getInputBitDepthC() - 8 , "cm_input_chroma_bit_depth_minus8" ); 2488 2487 WRITE_UVLC( pc3DAsymLUT->getOutputBitDepthY() - 8 , "cm_output_luma_bit_depth_minus8" ); 2489 2488 WRITE_UVLC( pc3DAsymLUT->getOutputBitDepthC() - 8 , "cm_output_chroma_bit_depth_minus8" ); 2490 #else 2491 WRITE_CODE( pc3DAsymLUT->getInputBitDepthY() - 8 , 3 , "cm_input_bit_depth_minus8" ); 2492 WRITE_SVLC(pc3DAsymLUT->getInputBitDepthC()-pc3DAsymLUT->getInputBitDepthY(), "cm_input_bit_depth_chroma delta"); 2493 assert( pc3DAsymLUT->getOutputBitDepthY() < 16 ); 2494 WRITE_CODE( pc3DAsymLUT->getOutputBitDepthY() - 8 , 3 , "cm_output_bit_depth_minus8" ); 2495 WRITE_SVLC(pc3DAsymLUT->getOutputBitDepthC()-pc3DAsymLUT->getOutputBitDepthY(), "cm_output_bit_depth_chroma_delta"); 2496 #endif 2489 2497 2490 assert( pc3DAsymLUT->getResQuantBit() < 4 ); 2498 2491 WRITE_CODE( pc3DAsymLUT->getResQuantBit() , 2 , "cm_res_quant_bit" ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1212 r1213 1398 1398 if( pcSlice->getPPS()->getCGSFlag() ) 1399 1399 { 1400 #if R0150_CGS_SIGNAL_CONSTRAINTS1401 1400 // all reference layers are currently taken as CGS reference layers 1402 1401 m_Enc3DAsymLUTPPS.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ); 1403 1402 m_Enc3DAsymLUTPicUpdate.addRefLayerId( pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc) ); 1404 #endif 1405 if( g_posScalingFactor[refLayerIdc][0] < (1<<16) || g_posScalingFactor[refLayerIdc][1] < (1<<16)) //if(pcPic->isSpatialEnhLayer(refLayerIdc))1403 1404 if( g_posScalingFactor[refLayerIdc][0] < (1<<16) || g_posScalingFactor[refLayerIdc][1] < (1<<16) ) //if(pcPic->isSpatialEnhLayer(refLayerIdc)) 1406 1405 { 1407 //downsampling ;1406 //downsampling 1408 1407 downScalePic(pcPic->getPicYuvOrg(), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg()); 1409 //pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg()->dump("ds.yuv", true, true);1408 1410 1409 m_Enc3DAsymLUTPPS.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg()); 1411 1410 m_Enc3DAsymLUTPicUpdate.setDsOrigPic(pcSlice->getBaseColPic(refLayerIdc)->getPicYuvOrg());
Note: See TracChangeset for help on using the changeset viewer.