Ignore:
Timestamp:
12 Jan 2014, 04:39:11 (10 years ago)
Author:
tech
Message:

Cleanup part 4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r766 r767  
    215215}
    216216
    217 #if DLT_DIFF_CODING_IN_PPS
     217#if H_3D
    218218Void TDecCavlc::parsePPS(TComPPS* pcPPS, TComVPS* pcVPS )
    219219#else
     
    368368  if (uiCode)
    369369  {
    370 #if DLT_DIFF_CODING_IN_PPS
     370#if H_3D
    371371    parsePPSExtension( pcPPS, pcVPS );
    372372    READ_FLAG( uiCode, "pps_extension2_flag");
     
    378378        READ_FLAG( uiCode, "pps_extension_data_flag");
    379379      }
    380 #if DLT_DIFF_CODING_IN_PPS
    381     }
    382 #endif
    383   }
    384 }
    385 
    386 #if DLT_DIFF_CODING_IN_PPS
     380#if H_3D
     381    }
     382#endif
     383  }
     384}
     385
     386#if H_3D
    387387Void TDecCavlc::parsePPSExtension( TComPPS* pcPPS, TComVPS* pcVPS )
    388388{
     389  //Ed.(GT): pcVPS should not be used here. Needs to be fixed.
    389390  UInt uiCode = 0;
    390391  TComDLT* pcDLT = new TComDLT;
     
    10051006  }
    10061007#endif
    1007 
    1008 #if !CAM_HLS_F0136_F0045_F0082
    1009   UInt uiCamParPrecision = 0;
    1010   Bool bCamParSlice      = false;
    1011   if ( !depthFlag )
    1012   {     
    1013     READ_UVLC( uiCamParPrecision, "cp_precision" );
    1014     READ_FLAG( uiCode, "cp_in_slice_header_flag" );    bCamParSlice = ( uiCode == 1 );
    1015     if( !bCamParSlice )
    1016     {       
    1017       for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
    1018       {
    1019         Int iCode;
    1020         READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
    1021         READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
    1022         READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
    1023         READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
    1024       }
    1025     }
    1026   }
    1027   pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
    1028 #endif
    10291008}
    10301009#endif
     
    11321111#if H_3D
    11331112      m_pcBitstream->readOutTrailingBits();
    1134 #if CAM_HLS_F0136_F0045_F0082
    11351113      pcVPS->createCamPars(pcVPS->getNumViews());
    1136 #endif
    11371114      parseVPSExtension2( pcVPS );   
    11381115      READ_FLAG( uiCode,  "vps_extension3_flag" );
     
    17421719        READ_FLAG( uiCode, "vps_depth_modes_flag[i]" );             pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );
    17431720        //          READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPreFlag     ( i, uiCode == 1 ? true : false );
    1744 #if H_3D_DIM_DLT
    1745 #if !DLT_DIFF_CODING_IN_PPS
    1746         if( pcVPS->getVpsDepthModesFlag( i ) )
    1747         {
    1748           READ_FLAG( uiCode, "dlt_flag[i]" );                       pcVPS->setUseDLTFlag( i, uiCode == 1 ? true : false );
    1749         }
    1750         if( pcVPS->getUseDLTFlag( i ) )
    1751         {
    1752           // decode mapping
    1753           UInt uiNumDepthValues;
    1754           // parse number of values in DLT
    1755           READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]");
    1756 
    1757           // parse actual DLT values
    1758           Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int));
    1759           for(Int d=0; d<uiNumDepthValues; d++)
    1760           {
    1761             READ_UVLC(uiCode, "dlt_depth_value[i][d]");
    1762             aiIdx2DepthValue[d] = (Int)uiCode;
    1763           }
    1764 
    1765           pcVPS->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
    1766 
    1767           // clean memory
    1768           free(aiIdx2DepthValue);
    1769         }
    1770 #endif
    1771 #endif
    17721721#if H_3D_INTER_SDC
    17731722            READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
     
    17761725    }
    17771726  }
    1778 #if CAM_HLS_F0136_F0045_F0082
     1727
    17791728  UInt uiCamParPrecision = 0;
    17801729  Bool bCamParSlice      = false;
     
    18021751    }
    18031752  }
    1804 #endif
     1753
    18051754  READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    18061755}
     
    24622411  }
    24632412
    2464 #if CAM_HLS_F0044
    2465 #if CAM_HLS_F0136_F0045_F0082
     2413#if H_3D
    24662414  if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
    2467 #else
    2468   if( rpcSlice->getSPS()->hasCamParInSliceHeader() )
    2469 #endif
    24702415  {
    24712416    UInt uiViewIndex = rpcSlice->getViewIndex();
     
    24792424    rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
    24802425  }
    2481 
    24822426#endif
    24832427
     
    24852429  {
    24862430    READ_UVLC(uiCode,"slice_header_extension_length");
    2487 #if H_3D && !CAM_HLS_F0044
    2488 #if CAM_HLS_F0136_F0045_F0082
    2489     if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() )  && !rpcSlice->getIsDepth() )
    2490 #else
    2491     if( rpcSlice->getSPS()->hasCamParInSliceHeader() )
    2492 #endif
    2493     {
    2494       UInt uiViewIndex = rpcSlice->getViewIndex();
    2495       for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )
    2496       {
    2497         READ_SVLC( iCode, "cp_scale" );                m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;
    2498         READ_SVLC( iCode, "cp_off" );                  m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;
    2499         READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];
    2500         READ_SVLC( iCode, "cp_inv_off_plus_off" );     m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];
    2501       }
    2502       rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );
    2503     }
    2504 
    2505     READ_FLAG(uiCode,"slice_segment_header_extension2_flag");
    2506     if ( uiCode )
    2507     {   
    2508       READ_UVLC(uiCode,"slice_header_extension2_length");
    2509       for(Int i=0; i<uiCode; i++)
    2510       {
    2511         UInt ignore;
    2512         READ_CODE(8,ignore,"slice_header_extension2_data_byte");
    2513       }
    2514     }
    2515   }
    2516 #else
     2431
    25172432    for(Int i=0; i<uiCode; i++)
    25182433    {
     
    25212436    }
    25222437  }
    2523 #endif
     2438
    25242439  m_pcBitstream->readByteAlignment();
    25252440
Note: See TracChangeset for help on using the changeset viewer.