Changeset 1124 in 3DVCSoftware for trunk/source/Lib/TLibDecoder


Ignore:
Timestamp:
10 Nov 2014, 12:22:20 (10 years ago)
Author:
tech
Message:

Merged branch 12.2-dev0@1123

Location:
trunk/source/Lib/TLibDecoder
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1084 r1124  
    721721}
    722722
     723#if HHI_TOOL_PARAMETERS_I2_J0107
     724Void TDecCavlc::parseSPS(TComSPS* pcSPS)
     725#else
    723726#if H_3D
    724727Void TDecCavlc::parseSPS(TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
    725728#else
    726729Void TDecCavlc::parseSPS(TComSPS* pcSPS)
     730#endif
    727731#endif
    728732{
     
    993997  if ( pcSPS->getSps3dExtensionFlag() )
    994998  {
     999#if HHI_TOOL_PARAMETERS_I2_J0107
     1000    parseSPS3dExtension( pcSPS );
     1001#else
    9951002    parseSPSExtension2( pcSPS, viewIndex, depthFlag  );
     1003#endif
    9961004  }
    9971005
     
    10201028
    10211029#if H_3D
     1030#if HHI_TOOL_PARAMETERS_I2_J0107
     1031Void TDecCavlc::parseSPS3dExtension( TComSPS* pcSPS )
     1032{
     1033  TComSps3dExtension* sps3dExt = pcSPS->getSps3dExtension();
     1034  UInt uiCode;
     1035  for( Int d = 0; d  <=  1; d++ )
     1036  {
     1037    READ_FLAG( uiCode, "iv_mv_pred_flag" ); sps3dExt->setIvMvPredFlag( d, uiCode == 1 );
     1038    READ_FLAG( uiCode, "iv_mv_scaling_flag" ); sps3dExt->setIvMvScalingFlag( d, uiCode == 1 );
     1039    if( d  ==  0 )
     1040    {
     1041      READ_UVLC( uiCode, "log2_sub_pb_size_minus3" ); sps3dExt->setLog2SubPbSizeMinus3( d, uiCode );
     1042      READ_FLAG( uiCode, "iv_res_pred_flag" ); sps3dExt->setIvResPredFlag( d, uiCode == 1 );
     1043      READ_FLAG( uiCode, "depth_refinement_flag" ); sps3dExt->setDepthRefinementFlag( d, uiCode == 1 );
     1044      READ_FLAG( uiCode, "view_synthesis_pred_flag" ); sps3dExt->setViewSynthesisPredFlag( d, uiCode == 1 );
     1045      READ_FLAG( uiCode, "depth_based_blk_part_flag" ); sps3dExt->setDepthBasedBlkPartFlag( d, uiCode == 1 );
     1046    }
     1047    else
     1048    {
     1049      READ_FLAG( uiCode, "mpi_flag" ); sps3dExt->setMpiFlag( d, uiCode == 1 );
     1050      READ_UVLC( uiCode, "log2_mpi_sub_pb_size_minus3" ); sps3dExt->setLog2MpiSubPbSizeMinus3( d, uiCode );
     1051      READ_FLAG( uiCode, "intra_contour_flag" ); sps3dExt->setIntraContourFlag( d, uiCode == 1 );
     1052      READ_FLAG( uiCode, "intra_sdc_wedge_flag" ); sps3dExt->setIntraSdcWedgeFlag( d, uiCode == 1 );
     1053      READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 );
     1054      READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 );
     1055      READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 );
     1056    }
     1057  }
     1058}
     1059#else
    10221060Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )
    10231061{
    10241062
    10251063}
     1064#endif
    10261065#endif
    10271066
     
    10321071  READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );
    10331072  READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );
     1073#if H_MV_HLS_FIX
     1074
     1075  UInt numRefLocOffsets;;
     1076  READ_UVLC( numRefLocOffsets, "num_ref_loc_offsets" );
     1077
     1078  // All of the following stuff is not needed, but allowed to be present.
     1079  for (Int i = 0; i < numRefLocOffsets; i++ )
     1080  {
     1081    Int   iCode = 0;
     1082    READ_CODE( 6, uiCode, "ref_loc_offset_layer_id" );
     1083    READ_FLAG( uiCode, "scaled_ref_layer_offset_present_flag" );
     1084
     1085    if (uiCode)
     1086    {   
     1087      READ_SVLC( iCode, "scaled_ref_layer_left_offset" );   
     1088      READ_SVLC( iCode, "scaled_ref_layer_top_offset" );   
     1089      READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); 
     1090      READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" );
     1091    }
     1092
     1093    READ_FLAG( uiCode, "ref_region_offset_present_flag" ); 
     1094    if (uiCode)
     1095    {   
     1096      READ_SVLC( iCode, "ref_region_left_offset" );     
     1097      READ_SVLC( iCode, "ref_region_top_offset" );     
     1098      READ_SVLC( iCode, "ref_region_right_offset" );   
     1099      READ_SVLC( iCode, "ref_region_bottom_offset" );   
     1100    }
     1101
     1102    READ_FLAG( uiCode, "resample_phase_set_present_flag" );
     1103    if (uiCode)
     1104    {     
     1105      READ_UVLC( uiCode, "phase_hor_luma" );             
     1106      READ_UVLC( uiCode, "phase_ver_luma" );             
     1107      READ_UVLC( uiCode, "phase_hor_chroma_plus8" );     
     1108      READ_UVLC( uiCode, "phase_ver_chroma_plus8" );     
     1109    }
     1110  }
     1111  READ_FLAG( uiCode, "colour_mapping_enabled_flag" );   
     1112  // This is required to equal to 0 for Multiview Main profile.
     1113  assert( uiCode == 0 );
     1114#else
    10341115  READ_UVLC( uiCode, "num_ref_loc_offsets" ); assert( uiCode == 0 );
     1116#endif
    10351117}
    10361118
     
    11551237    {
    11561238#if H_3D
     1239#if HHI_VPS_3D_EXTENSION_I3_J0107
     1240      READ_FLAG( uiCode,  "vps_3d_extension_flag" );
     1241      if ( uiCode )
     1242      {
     1243        m_pcBitstream->readOutTrailingBits();
     1244        pcVPS->createCamPars(pcVPS->getNumViews());
     1245        parseVPS3dExtension( pcVPS );   
     1246      }
     1247      READ_FLAG( uiCode,  "vps_extension3_flag" );
     1248      if (uiCode)
     1249      {     
     1250#else
    11571251      m_pcBitstream->readOutTrailingBits();
    11581252      pcVPS->createCamPars(pcVPS->getNumViews());
     
    11621256      {     
    11631257#endif
     1258#endif
    11641259#endif 
    11651260        while ( xMoreRbspData() )
     
    12341329    }
    12351330  }
     1331
     1332#if H_MV_FIX_NUM_VIEWS
     1333  pcVPS->initNumViews();
     1334#endif
    12361335
    12371336  READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode );
     
    13421441  for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ )
    13431442  {
     1443#if H_MV_HLS_FIX
     1444    if( pcVPS->getNumLayerSets() > 2 && i >= pcVPS->getNumLayerSets( ) )   
     1445#else
    13441446    if( i >= pcVPS->getNumLayerSets( ) )   
     1447#endif
    13451448    {       
    13461449      READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );
     
    14131516
    14141517  READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 );
    1415 #if H_MV_HLS7_GEN
     1518
     1519#if H_MV_HLS7_GEN || H_MV_HLS_FIX
    14161520  READ_FLAG( uiCode, "vps_poc_lsb_aligned_flag" ); pcVPS->setVpsPocLsbAlignedFlag( uiCode == 1 );
    14171521#endif
     
    14631567    parseVPSVUI( pcVPS );
    14641568  }     
     1569#if H_MV_HLS_FIX
     1570  else
     1571#endif
    14651572  {
    14661573    TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( );
     
    18381945
    18391946#if H_3D
     1947#if HHI_VPS_3D_EXTENSION_I3_J0107
     1948Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS )
     1949#else
    18401950Void TDecCavlc::parseVPSExtension2( TComVPS* pcVPS )
     1951#endif
    18411952{
    18421953  UInt uiCode;
     1954
     1955#if !HHI_TOOL_PARAMETERS_I2_J0107
    18431956  for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )
    18441957  {
     
    19032016            READ_FLAG( uiCode, "depth_inter_SDC_flag" );              pcVPS->setInterSDCFlag( i, uiCode ? true : false );
    19042017#endif
    1905       }
    1906     }
    1907   }
     2018#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
     2019        READ_FLAG( uiCode, "single_depth_mode_flag[i]"); pcVPS->setSingleDepthModeFlag( i, uiCode == 1 ? true : false );       
     2020#endif
     2021      }
     2022    }
     2023  }
     2024#endif
    19082025
    19092026  UInt uiCamParPrecision = 0;
     
    19122029
    19132030  READ_UVLC( uiCamParPrecision, "cp_precision" );
     2031#if HHI_VIEW_ID_LIST_I5_J0107
     2032  for (Int n = 1; n < pcVPS->getNumViews(); n++)
     2033  {
     2034    Int viewIndex = pcVPS->getViewOIdxList( n );
     2035#else
    19142036  for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)
    19152037  {
     2038#endif
    19162039    pcVPS->setCamParPresent         ( viewIndex, false );
    19172040    pcVPS->setHasCamParInSliceHeader( viewIndex, false );
     
    19222045      if ( !bCamParSlice )
    19232046      {
    1924         for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
    1925         {
     2047#if HHI_VIEW_ID_LIST_I5_J0107
     2048        for( UInt m = 0; m < n; n++ )
     2049        {
     2050          Int uiBaseIndex = pcVPS->getViewOIdxList ( m );
    19262051          Int iCode;
    19272052          READ_SVLC( iCode, "vps_cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
     
    19322057      }
    19332058      pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
     2059#else
     2060        for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )
     2061        {
     2062          Int iCode;
     2063          READ_SVLC( iCode, "vps_cp_scale" );                m_aaiTempScale  [ uiBaseIndex ][ viewIndex ]   = iCode;
     2064          READ_SVLC( iCode, "vps_cp_off" );                  m_aaiTempOffset [ uiBaseIndex ][ viewIndex ]   = iCode;
     2065          READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale  [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];
     2066          READ_SVLC( iCode, "vps_cp_inv_off_plus_off" );     m_aaiTempOffset [ viewIndex   ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];
     2067        }
     2068      }
     2069      pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );
     2070#endif
    19342071    }
    19352072  }
     
    19942131#endif
    19952132  rpcSlice->setSPS(sps);
     2133#if HHI_TOOL_PARAMETERS_I2_J0107
     2134#if H_3D
     2135  rpcSlice->init3dToolParameters();
     2136#endif
     2137#endif
    19962138  rpcSlice->setPPS(pps);
    19972139  if( pps->getDependentSliceSegmentsEnabledFlag() && ( !firstSliceSegmentInPic ))
     
    20652207    rpcSlice->checkCrossLayerBlaFlag( );
    20662208
    2067 #if !H_MV_HLS7_GEN
     2209#if !H_MV_HLS7_GEN && !H_MV_HLS_FIX
    20682210    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
    20692211    {
     
    23502492    Bool interLayerPredLayerIdcPresentFlag = false;
    23512493    Int layerId       = rpcSlice->getLayerId();
     2494#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
     2495#if H_3D
     2496    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumRefListLayers( layerId ) > 0 )
     2497#else
    23522498    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
     2499#endif
     2500#else
     2501    if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 )
     2502#endif
    23532503    {   
    23542504      READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 );
     2505#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
     2506#if H_3D
     2507      if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumRefListLayers( layerId ) > 1 )
     2508#else
    23552509      if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
     2510#endif
     2511#else
     2512      if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 )
     2513#endif
    23562514      {           
    23572515        if( !vps->getMaxOneActiveRefLayerFlag()) 
     
    23592517          READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode );
    23602518        }
     2519#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
     2520#if H_3D
     2521        if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumRefListLayers( layerId ) )
     2522#else
    23612523        if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
     2524#endif
     2525#else
     2526        if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) )
     2527#endif
    23622528        {
    23632529          interLayerPredLayerIdcPresentFlag = true;
     
    25452711    }
    25462712#if H_3D_IC
     2713#if HHI_DEPENDENCY_SIGNALLING_I1_J0107
     2714    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )
     2715#else
    25472716    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 )
     2717#endif
    25482718    {
    25492719      UInt uiCodeTmp = 0;
     
    25592729    }
    25602730#endif
     2731#if !MTK_SINGLE_DEPTH_VPS_FLAG_J0060
    25612732#if H_3D_SINGLE_DEPTH
    25622733    if(rpcSlice->getIsDepth())
     
    25672738    }
    25682739#endif
     2740#endif
    25692741    if (!rpcSlice->isIntra())
    25702742    {
    25712743      READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
    25722744#if H_3D_IV_MERGE
     2745#if HHI_TOOL_PARAMETERS_I2_J0107
     2746#if ALGIN_J0107_J0059
     2747      rpcSlice->setMaxNumMergeCand(( ( rpcSlice->getMpiFlag() || rpcSlice->getIvMvPredFlag() || rpcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
     2748#else
     2749      rpcSlice->setMaxNumMergeCand(( ( rpcSlice->getMpiFlag() || rpcSlice->getIvMvPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
     2750#endif
     2751#else
    25732752      if(rpcSlice->getIsDepth())
    25742753      {
     
    25802759      {
    25812760        Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;
     2761#if MTK_MRG_LIST_SIZE_CLEANUP_J0059
     2762        Bool vspFlag = rpcSlice->getVPS()->getViewSynthesisPredFlag( rpcSlice->getLayerIdInVps() ) ;
     2763        rpcSlice->setMaxNumMergeCand(( ivMvPredFlag || vspFlag? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
     2764#else
    25822765        rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
    2583       }
    2584 
     2766#endif
     2767      }
     2768#endif
    25852769#else
    25862770      rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode);
     
    27422926
    27432927    // Derive the value of PocMs8bValRequiredFlag
     2928#if !H_MV_HLS_FIX
    27442929    rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag()
    27452930                                          /* || TODO related to vps_poc_lsb_aligned_flag */
    27462931                                          );
    2747 
     2932#endif
     2933
     2934#if H_MV_HLS_FIX
     2935    if( !rpcSlice->getPocMsbValRequiredFlag() && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() )
     2936#else
    27482937    if( !rpcSlice->getPocMsbValRequiredFlag() /* TODO &&  rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ )
     2938#endif
    27492939    {
    27502940      READ_FLAG( uiCode, "poc_msb_val_present_flag" ); rpcSlice->setPocMsbValPresentFlag( uiCode == 1 );
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r1084 r1124  
    9090#endif
    9191#if H_3D
     92#if HHI_VPS_3D_EXTENSION_I3_J0107
     93  Void  parseVPS3dExtension  ( TComVPS* pcVPS );
     94#else
    9295  Void  parseVPSExtension2  ( TComVPS* pcVPS );
     96#endif
     97#if HHI_TOOL_PARAMETERS_I2_J0107
     98  Void  parseSPS3dExtension ( TComSPS* pcSPS );
     99  Void  parseSPS            ( TComSPS* pcSPS );
     100#else
    93101  Void  parseSPSExtension2  ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
    94102  Void  parseSPS            ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag );
     103#endif 
    95104#else
    96105  Void  parseSPS            ( TComSPS* pcSPS );
  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r1084 r1124  
    291291  DTRACE_CU_S("=========== coding_unit ===========\n")
    292292#endif
    293 
    294 
     293#if !LGE_DDD_REMOVAL_J0042_J0030
    295294#if H_3D_DDD
    296295      pcCU->setUseDDD( false, uiAbsPartIdx, uiDepth );
     296#endif
    297297#endif
    298298
     
    315315  {
    316316#if H_3D_ARP && H_3D_IV_MERGE
     317#if HHI_TOOL_PARAMETERS_I2_J0107
     318    if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() )
     319#else
    317320    if( pcCU->getSlice()->getVPS()->getUseAdvRP( pcCU->getSlice()->getLayerId() ) || pcCU->getSlice()->getVPS()->getIvMvPredFlag( pcCU->getSlice()->getLayerId() ))
     321#endif
    318322#else
    319323#if H_3D_ARP
     
    345349#endif
    346350#if H_3D_NBDV_REF
     351#if HHI_TOOL_PARAMETERS_I2_J0107
     352      if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
     353#else
    347354      if(pcCU->getSlice()->getVPS()->getDepthRefinementFlag( pcCU->getSlice()->getLayerIdInVps() ))  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
     355#endif
    348356      {
    349357        DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);
     
    452460#endif
    453461    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    454 
     462#if !LGE_DDD_REMOVAL_J0042_J0030
    455463#if H_3D_DDD
    456464    if( uiMergeIndex == m_ppcCU[uiDepth]->getUseDDDCandIdx() )
     
    460468        pcCU->setDDDepthSubParts( m_ppcCU[uiDepth]->getDDTmpDepth(),uiAbsPartIdx, 0, uiDepth );
    461469    }
     470#endif
    462471#endif
    463472
     
    735744  //construction of depth candidates
    736745  Pel testDepth;
     746#if SINGLE_DEPTH_SIMP_J0115
     747  Pel DepthNeighbours[2];
     748#else
    737749  Pel DepthNeighbours[5];
     750#endif
    738751  Int index =0;
     752#if SINGLE_DEPTH_SIMP_J0115
     753  for( Int i = 0; (i < 2) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
     754#else
    739755  for( Int i = 0; (i < 5) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ )
     756#endif
    740757  {
    741758    if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i))
     
    745762    DepthNeighbours[index]=testDepth;
    746763    index++;
     764#if !SINGLE_DEPTH_SIMP_J0115
    747765    for(Int j=0;j<index-1;j++)
    748766    {
     
    753771     }
    754772    }
     773#endif
    755774  }
    756775
     
    10631082    }
    10641083  }
    1065  
     1084
    10661085  TextType  eText             = ( uiChromaId > 0 ? TEXT_CHROMA_V : TEXT_CHROMA_U );
    10671086  UInt      uiWidth           = pcCU     ->getWidth   ( 0 ) >> ( uiTrDepth + 1 );
     
    10711090  Pel*      piPred            = ( uiChromaId > 0 ? pcPredYuv->getCrAddr( uiAbsPartIdx ) : pcPredYuv->getCbAddr( uiAbsPartIdx ) );
    10721091  Pel*      piResi            = ( uiChromaId > 0 ? pcResiYuv->getCrAddr( uiAbsPartIdx ) : pcResiYuv->getCbAddr( uiAbsPartIdx ) );
    1073  
     1092
    10741093  UInt      uiNumCoeffInc     = ( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() * pcCU->getSlice()->getSPS()->getMaxCUHeight() ) >> ( pcCU->getSlice()->getSPS()->getMaxCUDepth() << 1 ) ) >> 2;
    10751094  TCoeff*   pcCoeff           = ( uiChromaId > 0 ? pcCU->getCoeffCr() : pcCU->getCoeffCb() ) + ( uiNumCoeffInc * uiAbsPartIdx );
    1076  
     1095
    10771096  UInt      uiChromaPredMode  = pcCU->getChromaIntraDir( 0 );
    1078  
     1097
    10791098  UInt      uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
    10801099  Pel*      piRecIPred        = ( uiChromaId > 0 ? pcCU->getPic()->getPicYuvRec()->getCrAddr( pcCU->getAddr(), uiZOrder ) : pcCU->getPic()->getPicYuvRec()->getCbAddr( pcCU->getAddr(), uiZOrder ) );
     
    10871106
    10881107  pcCU->getPattern()->initAdiPatternChroma( pcCU, uiAbsPartIdx, uiTrDepth,
    1089                                            m_pcPrediction->getPredicBuf       (),
    1090                                            m_pcPrediction->getPredicBufWidth  (),
    1091                                            m_pcPrediction->getPredicBufHeight (),
    1092                                            bAboveAvail, bLeftAvail );
     1108    m_pcPrediction->getPredicBuf       (),
     1109    m_pcPrediction->getPredicBufWidth  (),
     1110    m_pcPrediction->getPredicBufHeight (),
     1111    bAboveAvail, bLeftAvail );
    10931112  Int* pPatChroma   = ( uiChromaId > 0 ? pcCU->getPattern()->getAdiCrBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ) : pcCU->getPattern()->getAdiCbBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ) );
    1094  
     1113
    10951114  //===== get prediction signal =====
    10961115  {
     
    11071126  if ( pcCU->getCbf( uiAbsPartIdx, eText, uiTrDepth ) )
    11081127  {
    1109   //===== inverse transform =====
    1110   Int curChromaQpOffset;
    1111   if(eText == TEXT_CHROMA_U)
    1112   {
    1113     curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCbQpOffset() + pcCU->getSlice()->getSliceQpDeltaCb();
    1114   }
    1115   else
    1116   {
    1117     curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();
    1118   }
    1119   m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset );
    1120 
    1121   Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText];
     1128    //===== inverse transform =====
     1129    Int curChromaQpOffset;
     1130    if(eText == TEXT_CHROMA_U)
     1131    {
     1132      curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCbQpOffset() + pcCU->getSlice()->getSliceQpDeltaCb();
     1133    }
     1134    else
     1135    {
     1136      curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();
     1137    }
     1138    m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset );
     1139
     1140    Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText];
    11221141    assert(scalingListType < SCALING_LIST_NUM);
    1123   m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkipChroma );
    1124 
    1125   //===== reconstruction =====
    1126   Pel* pPred      = piPred;
    1127   Pel* pResi      = piResi;
    1128   Pel* pReco      = piReco;
    1129   Pel* pRecIPred  = piRecIPred;
    1130   for( UInt uiY = 0; uiY < uiHeight; uiY++ )
    1131   {
    1132     for( UInt uiX = 0; uiX < uiWidth; uiX++ )
    1133     {
    1134       pReco    [ uiX ] = ClipC( pPred[ uiX ] + pResi[ uiX ] );
    1135       pRecIPred[ uiX ] = pReco[ uiX ];
    1136     }
    1137     pPred     += uiStride;
    1138     pResi     += uiStride;
    1139     pReco     += uiStride;
    1140     pRecIPred += uiRecIPredStride;
    1141   }
    1142 }
     1142    m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkipChroma );
     1143
     1144    //===== reconstruction =====
     1145    Pel* pPred      = piPred;
     1146    Pel* pResi      = piResi;
     1147    Pel* pReco      = piReco;
     1148    Pel* pRecIPred  = piRecIPred;
     1149    for( UInt uiY = 0; uiY < uiHeight; uiY++ )
     1150    {
     1151      for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     1152      {
     1153        pReco    [ uiX ] = ClipC( pPred[ uiX ] + pResi[ uiX ] );
     1154        pRecIPred[ uiX ] = pReco[ uiX ];
     1155      }
     1156      pPred     += uiStride;
     1157      pResi     += uiStride;
     1158      pReco     += uiStride;
     1159      pRecIPred += uiRecIPredStride;
     1160    }
     1161  }
    11431162  else
    11441163  {
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1084 r1124  
    5555Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    5656{
     57  if( !pcCU->getSlice()->getIntraSingleFlag() )
     58  {
     59    return;
     60  } 
     61#if ALIGN_J0060_J0107
     62#else
    5763  if ( !pcCU->getSlice()->getIsDepth() )
    5864  {
    5965    return;
    6066  }
     67#if MTK_SINGLE_DEPTH_VPS_FLAG_J0060
     68  if(!pcCU->getSlice()->getVPS()->getSingleDepthModeFlag(pcCU->getSlice()->getLayerIdInVps()))
     69  {
     70     return;
     71  }
     72#else
    6173  if(!pcCU->getSlice()->getApplySingleDepthMode())
    6274  {
    6375     return;
    6476  }
     77#endif
     78#endif
     79
    6580  m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
    6681}
     
    152167 
    153168#if H_3D_DBBP
     169#if SEC_DBBP_VIEW_REF_CHECK_J0037
     170  #if HHI_TOOL_PARAMETERS_I2_J0107
     171if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
     172#else
     173if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
     174#endif
     175#else
    154176  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
     177#endif
    155178  {
    156179    decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
     
    337360      }
    338361      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    339 
     362#if !LGE_DDD_REMOVAL_J0042_J0030
    340363#if H_3D_DDD
    341364      if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() )
     
    349372          pcCU->setUseDDD( false, uiSubPartIdx, uiPartIdx, uiDepth );
    350373      }
     374#endif
    351375#endif
    352376
     
    828852  pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
    829853
     854#if HHI_TOOL_PARAMETERS_I2_J0107
     855  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) ||
     856    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getIntraSdcWedgeFlag() ) )
     857#else
    830858  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) ||
    831859    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) )
     860#endif
    832861  {
    833862    return;
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r1084 r1124  
    6666
    6767  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
     68#if HHI_TOOL_PARAMETERS_I2_J0107
     69  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
     70#else
    6871#if H_3D
    6972  virtual Void  parseSPS                  ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag  )                    = 0;
    7073#else
    7174  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
     75#endif
    7276#endif
    7377#if H_3D
     
    157161  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    158162  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
     163#if HHI_TOOL_PARAMETERS_I2_J0107
     164  Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
     165#else
    159166#if H_3D
    160167  Void    decodeSPS                   ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag )    { m_pcEntropyDecoderIf->parseSPS(pcSPS, viewIndex, depthFlag );                    }
    161168#else
    162169  Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
     170#endif
    163171#endif
    164172#if H_3D
  • trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r1084 r1124  
    702702  Bool bParseSplitFlag    = true;
    703703
     704 
     705#if HHI_TOOL_PARAMETERS_I2_J0107
     706  Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
     707#else
    704708  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
    705709  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
     710#endif
    706711  TComPic *pcTexture      = pcCU->getSlice()->getTexturePic();
    707712  Bool bDepthMapDetect    = (pcTexture != NULL);
     
    756761#if H_3D_QTLPC
    757762  Bool bParsePartSize    = true;
     763 
     764#if HHI_TOOL_PARAMETERS_I2_J0107
     765  Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
     766#else
    758767  TComVPS *vps           = pcCU->getPic()->getSlice(0)->getVPS();
    759768  Bool    bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId());
     769#endif
    760770  TComPic *pcTexture     = pcCU->getSlice()->getTexturePic();
    761771  Bool bDepthMapDetect   = (pcTexture != NULL);
     
    982992  {
    983993#if H_3D_DIM
     994#if HHI_TOOL_PARAMETERS_I2_J0107
     995    if( pcCU->getSlice()->getIntraSdcWedgeFlag() || pcCU->getSlice()->getIntraContourFlag() )
     996#else
    984997    if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() )
     998#endif
    985999    {
    9861000      parseIntraDepth( pcCU, absPartIdx+partOffset*j, depth );
     
    10961110      UInt uiTabIdx = 0;
    10971111      xParseDmm1WedgeIdx( uiTabIdx, g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );
     1112
     1113#if MTK_J0033
     1114      assert( uiTabIdx < g_dmmWedgeLists[ g_aucConvertToBit[ pcCU->getDMM1BasePatternWidth( pcCU->getWidth( absPartIdx ) )]].size());
     1115#endif
     1116
    10981117      pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth );
    10991118    } break;
     
    11241143  if( uiIsDimMode )
    11251144  {
     1145#if HHI_TOOL_PARAMETERS_I2_J0107
     1146    if( pcCU->getSlice()->getIntraSdcWedgeFlag() && pcCU->getSlice()->getIntraContourFlag() )
     1147#else
    11261148    if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag() )
     1149#endif
    11271150    {
    11281151      m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );
     
    11361159      }
    11371160    }
     1161#if HHI_TOOL_PARAMETERS_I2_J0107
     1162    else if ( pcCU->getSlice()->getIntraSdcWedgeFlag() )
     1163#else
    11381164    else if ( pcCU->getSlice()->getVpsDepthModesFlag() )
     1165#endif
    11391166    {
    11401167      pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth );
    11411168    }
     1169#if HHI_TOOL_PARAMETERS_I2_J0107
     1170    else if( pcCU->getSlice()->getIntraContourFlag() )
     1171#else
    11421172    else if( pcCU->getSlice()->getIVPFlag() )
     1173#endif
    11431174    {
    11441175      pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth );
     
    21202151Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    21212152{
     2153#if HHI_TOOL_PARAMETERS_I2_J0107
     2154  AOF( pcCU->getSlice()->getDepthBasedBlkPartFlag() );
     2155#else
    21222156  AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
     2157#endif
    21232158  AOF( !pcCU->getSlice()->getIsDepth() );
    21242159 
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r1084 r1124  
    7676  Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
    7777  Void  parseVPS                  ( TComVPS* /*pcVPS*/ ) {}
     78#if HHI_TOOL_PARAMETERS_I2_J0107
     79  Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
     80#else
    7881#if H_3D
    7982  Void  parseSPS                  ( TComSPS* /*pcSPS*/ , Int /*viewIndex*/, Bool /*depthFlag*/ ) {}
    8083#else
    8184  Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
     85#endif
    8286#endif
    8387#if H_3D
  • trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r976 r1124  
    280280      iNumSubstreamsPerTile = 1;
    281281    }
     282#if LGE_DEFAULT_DV_J0046 && !SEC_ARP_VIEW_REF_CHECK_J0037 && !SEC_DBBP_VIEW_REF_CHECK_J0037
     283    pcSlice->setDefaultRefViewIdx( -1 );
     284    pcSlice->setDefaultRefViewIdxAvailableFlag( false );
     285
     286    Int valid = 0;
     287    Int viewIndex = 0;
     288    for( UInt uiBId = 0; uiBId < pcSlice->getViewIndex() && valid==0; uiBId++ )
     289    {
     290        UInt        uiBaseId    = uiBId;
     291        TComPic*    pcBasePic   = pcSlice->getIvPic( false, uiBaseId );
     292        for( Int iRefListId = 0; ( iRefListId < (pcSlice->isInterB()? 2:1) ) && !pcSlice->isIntra() && valid==0; iRefListId++ )
     293        {
     294            RefPicList  eRefPicListTest = RefPicList( iRefListId );
     295            Int         iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ;
     296            for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )
     297            {
     298                if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC()
     299                    && pcBasePic->getViewIndex() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewIndex())
     300                {
     301                    valid=1;
     302                    viewIndex = uiBaseId;
     303                    break;
     304                }
     305            }
     306        }
     307    }
     308    if( valid )
     309    {
     310        pcSlice->setDefaultRefViewIdx( viewIndex );
     311        pcSlice->setDefaultRefViewIdxAvailableFlag( true );   
     312    }
     313#endif
    282314
    283315    if ( (iCUAddr == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr()) && // 1st in tile.
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r1084 r1124  
    726726
    727727#endif
     728#if HHI_TOOL_PARAMETERS_I2_J0107
     729#if H_3D
     730  m_apcSlicePilot->init3dToolParameters();
     731#endif
     732#endif
    728733  pps->setSPS(sps);
    729734  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1);
     
    10821087    pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr);
    10831088    pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true );
     1089
     1090#if SEC_ARP_VIEW_REF_CHECK_J0037 || SEC_DBBP_VIEW_REF_CHECK_J0037
     1091    pcSlice->setDefaultRefView();
     1092#endif
     1093
    10841094#if H_3D_ARP
    10851095    pcSlice->setARPStepNum(m_ivPicLists);
     
    12341244  TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 );
    12351245  assert( vps != 0 );
     1246#if HHI_TOOL_PARAMETERS_I2_J0107
     1247  m_cEntropyDecoder.decodeSPS( sps );
     1248#else
    12361249  m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) );
     1250#endif
    12371251#else
    12381252  m_cEntropyDecoder.decodeSPS( sps );
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r976 r1124  
    8383#endif
    8484
     85#if !LGE_DDD_REMOVAL_J0042_J0030
    8586#if H_3D_DDD
    8687  Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];}
    8788  Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];}
    8889  UInt getCamParsCodedPrecision(){ return m_vps->getCamParPrecision(); }
     90#endif
    8991#endif
    9092
Note: See TracChangeset for help on using the changeset viewer.