Changeset 1274 in 3DVCSoftware


Ignore:
Timestamp:
14 Jul 2015, 12:31:09 (9 years ago)
Author:
tech
Message:

Merged HTM-14.1-update-dev3@1273.

Location:
branches/HTM-14.1-update-dev2
Files:
4 deleted
51 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev2/HTM.xcodeproj/project.pbxproj

    r758 r1274  
    2525
    2626/* Begin PBXBuildFile section */
    27                 7874637E17D5DD900040CFC7 /* encmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462C117D5DD7B0040CFC7 /* encmain.cpp */; };
    28                 7874637F17D5DD900040CFC7 /* TAppEncCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462C217D5DD7B0040CFC7 /* TAppEncCfg.cpp */; };
    29                 7874638017D5DD900040CFC7 /* TAppEncTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462C417D5DD7B0040CFC7 /* TAppEncTop.cpp */; };
    30                 7874638117D5DDA60040CFC7 /* NALwrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874633F17D5DD840040CFC7 /* NALwrite.cpp */; };
    31                 7874638217D5DDA60040CFC7 /* SEIwrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874634117D5DD840040CFC7 /* SEIwrite.cpp */; };
    32                 7874638317D5DDA60040CFC7 /* SyntaxElementWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874634317D5DD840040CFC7 /* SyntaxElementWriter.cpp */; };
    33                 7874638417D5DDA60040CFC7 /* TEncAnalyze.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874634517D5DD840040CFC7 /* TEncAnalyze.cpp */; };
    34                 7874638517D5DDA60040CFC7 /* TEncBinCoderCABAC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874634817D5DD840040CFC7 /* TEncBinCoderCABAC.cpp */; };
    35                 7874638617D5DDA60040CFC7 /* TEncBinCoderCABACCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874634A17D5DD840040CFC7 /* TEncBinCoderCABACCounter.cpp */; };
    36                 7874638717D5DDA60040CFC7 /* TEncCavlc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874634C17D5DD840040CFC7 /* TEncCavlc.cpp */; };
    37                 7874638817D5DDA60040CFC7 /* TEncCu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874634F17D5DD840040CFC7 /* TEncCu.cpp */; };
    38                 7874638917D5DDA60040CFC7 /* TEncEntropy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874635117D5DD840040CFC7 /* TEncEntropy.cpp */; };
    39                 7874638A17D5DDA60040CFC7 /* TEncGOP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874635317D5DD840040CFC7 /* TEncGOP.cpp */; };
    40                 7874638B17D5DDA60040CFC7 /* TEncPic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874635517D5DD840040CFC7 /* TEncPic.cpp */; };
    41                 7874638C17D5DDA60040CFC7 /* TEncPreanalyzer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874635717D5DD840040CFC7 /* TEncPreanalyzer.cpp */; };
    42                 7874638D17D5DDA60040CFC7 /* TEncRateCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874635917D5DD840040CFC7 /* TEncRateCtrl.cpp */; };
    43                 7874638E17D5DDA60040CFC7 /* TEncSampleAdaptiveOffset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874635B17D5DD840040CFC7 /* TEncSampleAdaptiveOffset.cpp */; };
    44                 7874638F17D5DDA60040CFC7 /* TEncSbac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874635D17D5DD840040CFC7 /* TEncSbac.cpp */; };
    45                 7874639017D5DDA60040CFC7 /* TEncSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874635F17D5DD840040CFC7 /* TEncSearch.cpp */; };
    46                 7874639117D5DDA60040CFC7 /* TEncSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874636117D5DD840040CFC7 /* TEncSlice.cpp */; };
    47                 7874639217D5DDA60040CFC7 /* TEncTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874636317D5DD840040CFC7 /* TEncTop.cpp */; };
    48                 7874639317D5DDA60040CFC7 /* WeightPredAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874636517D5DD840040CFC7 /* WeightPredAnalysis.cpp */; };
    49                 7874639417D5DE070040CFC7 /* TComPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874630E17D5DD840040CFC7 /* TComPrediction.cpp */; };
    50                 7874639517D5DE070040CFC7 /* TComRdCost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874631017D5DD840040CFC7 /* TComRdCost.cpp */; };
    51                 7874639617D5DE070040CFC7 /* TComRdCostWeightPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874631217D5DD840040CFC7 /* TComRdCostWeightPrediction.cpp */; };
    52                 7874639717D5DE070040CFC7 /* TComRom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874631417D5DD840040CFC7 /* TComRom.cpp */; };
    53                 7874639817D5DE070040CFC7 /* TComSampleAdaptiveOffset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874631617D5DD840040CFC7 /* TComSampleAdaptiveOffset.cpp */; };
    54                 7874639917D5DE070040CFC7 /* TComSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874631817D5DD840040CFC7 /* TComSlice.cpp */; };
    55                 7874639A17D5DE070040CFC7 /* TComTrQuant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874631A17D5DD840040CFC7 /* TComTrQuant.cpp */; };
    56                 7874639B17D5DE070040CFC7 /* TComWedgelet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874631C17D5DD840040CFC7 /* TComWedgelet.cpp */; };
    57                 7874639C17D5DE070040CFC7 /* TComWeightPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874631E17D5DD840040CFC7 /* TComWeightPrediction.cpp */; };
    58                 7874639D17D5DE070040CFC7 /* TComYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874632017D5DD840040CFC7 /* TComYuv.cpp */; };
    59                 7874639E17D5DE230040CFC7 /* TComMotionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874630217D5DD840040CFC7 /* TComMotionInfo.cpp */; };
    60                 7874639F17D5DE230040CFC7 /* TComPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874630517D5DD840040CFC7 /* TComPattern.cpp */; };
    61                 787463A017D5DE230040CFC7 /* TComPic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874630717D5DD840040CFC7 /* TComPic.cpp */; };
    62                 787463A117D5DE230040CFC7 /* TComPicSym.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874630917D5DD840040CFC7 /* TComPicSym.cpp */; };
    63                 787463A217D5DE230040CFC7 /* TComPicYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874630B17D5DD840040CFC7 /* TComPicYuv.cpp */; };
    64                 787463A317D5DE230040CFC7 /* TComPicYuvMD5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874630D17D5DD840040CFC7 /* TComPicYuvMD5.cpp */; };
    65                 787463A417D5DE400040CFC7 /* TComCABACTables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462F917D5DD840040CFC7 /* TComCABACTables.cpp */; };
    66                 787463A517D5DE400040CFC7 /* TComDataCU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462FB17D5DD840040CFC7 /* TComDataCU.cpp */; };
    67                 787463A617D5DE400040CFC7 /* TComInterpolationFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462FD17D5DD840040CFC7 /* TComInterpolationFilter.cpp */; };
    68                 787463A717D5DE400040CFC7 /* TComLoopFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874630017D5DD840040CFC7 /* TComLoopFilter.cpp */; };
    69                 787463A817D5DE4B0040CFC7 /* TComBitStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462F717D5DD840040CFC7 /* TComBitStream.cpp */; };
    70                 787463A917D5DE640040CFC7 /* ContextModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462EE17D5DD840040CFC7 /* ContextModel.cpp */; };
    71                 787463AA17D5DE640040CFC7 /* ContextModel3DBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462F017D5DD840040CFC7 /* ContextModel3DBuffer.cpp */; };
    72                 787463AB17D5DE640040CFC7 /* SEI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462F417D5DD840040CFC7 /* SEI.cpp */; };
    73                 787463AC17D5DE8A0040CFC7 /* TVideoIOYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874637C17D5DD840040CFC7 /* TVideoIOYuv.cpp */; };
    74                 787463AD17D5DE980040CFC7 /* TRenFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874636B17D5DD840040CFC7 /* TRenFilter.cpp */; };
    75                 787463AE17D5DE980040CFC7 /* TRenImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874636D17D5DD840040CFC7 /* TRenImage.cpp */; };
    76                 787463AF17D5DE980040CFC7 /* TRenImagePlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874636F17D5DD840040CFC7 /* TRenImagePlane.cpp */; };
    77                 787463B017D5DE980040CFC7 /* TRenInterpFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874637117D5DD840040CFC7 /* TRenInterpFilter.cpp */; };
    78                 787463B117D5DE9D0040CFC7 /* TRenModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874637317D5DD840040CFC7 /* TRenModel.cpp */; };
    79                 787463B217D5DE9D0040CFC7 /* TRenModSetupStrParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874637517D5DD840040CFC7 /* TRenModSetupStrParser.cpp */; };
    80                 787463B317D5DE9D0040CFC7 /* TRenSingleModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874637717D5DD840040CFC7 /* TRenSingleModel.cpp */; };
    81                 787463B417D5DE9D0040CFC7 /* TRenTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874637917D5DD840040CFC7 /* TRenTop.cpp */; };
    82                 787463B517D5DEAF0040CFC7 /* program_options_lite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462E717D5DD840040CFC7 /* program_options_lite.cpp */; };
    83                 787463B617D5DEAF0040CFC7 /* TAppComCamPara.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462E917D5DD840040CFC7 /* TAppComCamPara.cpp */; };
    84                 787463B717D5DED40040CFC7 /* libmd5.c in Sources */ = {isa = PBXBuildFile; fileRef = 787462E317D5DD840040CFC7 /* libmd5.c */; };
    85                 787463B817D5DEE80040CFC7 /* AnnexBread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874632417D5DD840040CFC7 /* AnnexBread.cpp */; };
    86                 787463B917D5DEE80040CFC7 /* NALread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874632617D5DD840040CFC7 /* NALread.cpp */; };
    87                 787463BA17D5DEE80040CFC7 /* SEIread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874632817D5DD840040CFC7 /* SEIread.cpp */; };
    88                 787463BB17D5DEE80040CFC7 /* SyntaxElementParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874632A17D5DD840040CFC7 /* SyntaxElementParser.cpp */; };
    89                 787463BC17D5DEE80040CFC7 /* TDecBinCoderCABAC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874632D17D5DD840040CFC7 /* TDecBinCoderCABAC.cpp */; };
    90                 787463BD17D5DEE80040CFC7 /* TDecCAVLC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874632F17D5DD840040CFC7 /* TDecCAVLC.cpp */; };
    91                 787463BE17D5DEE80040CFC7 /* TDecCu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874633117D5DD840040CFC7 /* TDecCu.cpp */; };
    92                 787463BF17D5DEE80040CFC7 /* TDecEntropy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874633317D5DD840040CFC7 /* TDecEntropy.cpp */; };
    93                 787463C017D5DEE80040CFC7 /* TDecGop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874633517D5DD840040CFC7 /* TDecGop.cpp */; };
    94                 787463C117D5DEE80040CFC7 /* TDecSbac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874633717D5DD840040CFC7 /* TDecSbac.cpp */; };
    95                 787463C217D5DEE80040CFC7 /* TDecSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874633917D5DD840040CFC7 /* TDecSlice.cpp */; };
    96                 787463C317D5DEE80040CFC7 /* TDecTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874633B17D5DD840040CFC7 /* TDecTop.cpp */; };
    97                 787463C417D5DEFB0040CFC7 /* decmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462BB17D5DD7B0040CFC7 /* decmain.cpp */; };
    98                 787463C517D5DEFB0040CFC7 /* TAppDecCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462BC17D5DD7B0040CFC7 /* TAppDecCfg.cpp */; };
    99                 787463C617D5DEFB0040CFC7 /* TAppDecTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462BE17D5DD7B0040CFC7 /* TAppDecTop.cpp */; };
    100                 787463C717D5DF080040CFC7 /* extrmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462C717D5DD7B0040CFC7 /* extrmain.cpp */; };
    101                 787463C817D5DF080040CFC7 /* TAppExtrCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462C817D5DD7B0040CFC7 /* TAppExtrCfg.cpp */; };
    102                 787463C917D5DF080040CFC7 /* TAppExtrTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462CA17D5DD7B0040CFC7 /* TAppExtrTop.cpp */; };
    103                 787463CA17D5DF0E0040CFC7 /* RendererMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462CD17D5DD7B0040CFC7 /* RendererMain.cpp */; };
    104                 787463CB17D5DF0E0040CFC7 /* TAppRendererCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462CE17D5DD7B0040CFC7 /* TAppRendererCfg.cpp */; };
    105                 787463CC17D5DF0E0040CFC7 /* TAppRendererTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 787462D017D5DD7B0040CFC7 /* TAppRendererTop.cpp */; };
    106                 787463CD17D5DF220040CFC7 /* TExtrTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7874636817D5DD840040CFC7 /* TExtrTop.cpp */; };
     27                784870741B0B62D10098FD5A /* decmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FA71B0B62C70098FD5A /* decmain.cpp */; };
     28                784870751B0B62D10098FD5A /* TAppDecCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FA81B0B62C70098FD5A /* TAppDecCfg.cpp */; };
     29                784870761B0B62D10098FD5A /* TAppDecTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FAA1B0B62C70098FD5A /* TAppDecTop.cpp */; };
     30                784870771B0B62D80098FD5A /* encmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FAD1B0B62C70098FD5A /* encmain.cpp */; };
     31                784870781B0B62D80098FD5A /* TAppEncCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FAE1B0B62C70098FD5A /* TAppEncCfg.cpp */; };
     32                784870791B0B62D80098FD5A /* TAppEncTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FB01B0B62C70098FD5A /* TAppEncTop.cpp */; };
     33                7848707A1B0B62E10098FD5A /* extrmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FB31B0B62C70098FD5A /* extrmain.cpp */; };
     34                7848707B1B0B62E10098FD5A /* TAppExtrCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FB41B0B62C70098FD5A /* TAppExtrCfg.cpp */; };
     35                7848707C1B0B62E10098FD5A /* TAppExtrTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FB61B0B62C70098FD5A /* TAppExtrTop.cpp */; };
     36                7848707D1B0B62E80098FD5A /* RendererMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FB91B0B62C70098FD5A /* RendererMain.cpp */; };
     37                7848707E1B0B62E80098FD5A /* TAppRendererCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FBA1B0B62C70098FD5A /* TAppRendererCfg.cpp */; };
     38                7848707F1B0B62E80098FD5A /* TAppRendererTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FBC1B0B62C70098FD5A /* TAppRendererTop.cpp */; };
     39                784870801B0B63040098FD5A /* program_options_lite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FD41B0B62C70098FD5A /* program_options_lite.cpp */; };
     40                784870811B0B63040098FD5A /* TAppComCamPara.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FD61B0B62C70098FD5A /* TAppComCamPara.cpp */; };
     41                784870821B0B63230098FD5A /* ContextModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FDB1B0B62C70098FD5A /* ContextModel.cpp */; };
     42                784870831B0B63230098FD5A /* ContextModel3DBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FDD1B0B62C70098FD5A /* ContextModel3DBuffer.cpp */; };
     43                784870841B0B63230098FD5A /* Debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FE01B0B62C70098FD5A /* Debug.cpp */; };
     44                784870851B0B63230098FD5A /* SEI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FE31B0B62C70098FD5A /* SEI.cpp */; };
     45                784870861B0B63230098FD5A /* TComBitStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FE61B0B62C70098FD5A /* TComBitStream.cpp */; };
     46                784870871B0B63230098FD5A /* TComCABACTables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FE81B0B62C70098FD5A /* TComCABACTables.cpp */; };
     47                784870881B0B63230098FD5A /* TComChromaFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FEA1B0B62C70098FD5A /* TComChromaFormat.cpp */; };
     48                784870891B0B63230098FD5A /* TComDataCU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FED1B0B62C70098FD5A /* TComDataCU.cpp */; };
     49                7848708A1B0B63230098FD5A /* TComInterpolationFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FEF1B0B62C70098FD5A /* TComInterpolationFilter.cpp */; };
     50                7848708B1B0B63230098FD5A /* TComLoopFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FF21B0B62C70098FD5A /* TComLoopFilter.cpp */; };
     51                7848708C1B0B63230098FD5A /* TComMotionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FF41B0B62C70098FD5A /* TComMotionInfo.cpp */; };
     52                7848708D1B0B63230098FD5A /* TComPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FF71B0B62C70098FD5A /* TComPattern.cpp */; };
     53                7848708E1B0B63230098FD5A /* TComPic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FF91B0B62C70098FD5A /* TComPic.cpp */; };
     54                7848708F1B0B63230098FD5A /* TComPicSym.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FFB1B0B62C70098FD5A /* TComPicSym.cpp */; };
     55                784870901B0B63230098FD5A /* TComPicYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FFD1B0B62C70098FD5A /* TComPicYuv.cpp */; };
     56                784870911B0B63230098FD5A /* TComPicYuvMD5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78486FFF1B0B62C70098FD5A /* TComPicYuvMD5.cpp */; };
     57                784870921B0B63230098FD5A /* TComPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870001B0B62C70098FD5A /* TComPrediction.cpp */; };
     58                784870931B0B63230098FD5A /* TComRdCost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870021B0B62C70098FD5A /* TComRdCost.cpp */; };
     59                784870941B0B63230098FD5A /* TComRdCostWeightPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870041B0B62C70098FD5A /* TComRdCostWeightPrediction.cpp */; };
     60                784870951B0B63230098FD5A /* TComRom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870071B0B62C70098FD5A /* TComRom.cpp */; };
     61                784870961B0B63230098FD5A /* TComSampleAdaptiveOffset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870091B0B62C70098FD5A /* TComSampleAdaptiveOffset.cpp */; };
     62                784870971B0B63230098FD5A /* TComSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848700B1B0B62C70098FD5A /* TComSlice.cpp */; };
     63                784870981B0B63230098FD5A /* TComTrQuant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848700D1B0B62C70098FD5A /* TComTrQuant.cpp */; };
     64                784870991B0B63230098FD5A /* TComTU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848700F1B0B62C70098FD5A /* TComTU.cpp */; };
     65                7848709A1B0B63230098FD5A /* TComWedgelet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870111B0B62C70098FD5A /* TComWedgelet.cpp */; };
     66                7848709B1B0B63230098FD5A /* TComWeightPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870131B0B62C70098FD5A /* TComWeightPrediction.cpp */; };
     67                7848709C1B0B63230098FD5A /* TComYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870151B0B62C70098FD5A /* TComYuv.cpp */; };
     68                7848709D1B0B63360098FD5A /* AnnexBread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870191B0B62C70098FD5A /* AnnexBread.cpp */; };
     69                7848709E1B0B63360098FD5A /* NALread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848701B1B0B62C70098FD5A /* NALread.cpp */; };
     70                7848709F1B0B63360098FD5A /* SEIread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848701D1B0B62C70098FD5A /* SEIread.cpp */; };
     71                784870A01B0B63360098FD5A /* SyntaxElementParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848701F1B0B62C70098FD5A /* SyntaxElementParser.cpp */; };
     72                784870A11B0B63360098FD5A /* TDecBinCoderCABAC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870221B0B62C70098FD5A /* TDecBinCoderCABAC.cpp */; };
     73                784870A21B0B63360098FD5A /* TDecCAVLC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870241B0B62C70098FD5A /* TDecCAVLC.cpp */; };
     74                784870A31B0B63360098FD5A /* TDecCu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870261B0B62C70098FD5A /* TDecCu.cpp */; };
     75                784870A41B0B63360098FD5A /* TDecEntropy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870281B0B62C70098FD5A /* TDecEntropy.cpp */; };
     76                784870A51B0B63360098FD5A /* TDecGop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848702A1B0B62C70098FD5A /* TDecGop.cpp */; };
     77                784870A61B0B63360098FD5A /* TDecSbac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848702C1B0B62C70098FD5A /* TDecSbac.cpp */; };
     78                784870A71B0B63360098FD5A /* TDecSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848702E1B0B62C70098FD5A /* TDecSlice.cpp */; };
     79                784870A81B0B63360098FD5A /* TDecTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870301B0B62C70098FD5A /* TDecTop.cpp */; };
     80                784870A91B0B634A0098FD5A /* NALwrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870341B0B62C70098FD5A /* NALwrite.cpp */; };
     81                784870AA1B0B634A0098FD5A /* SEIEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870361B0B62C70098FD5A /* SEIEncoder.cpp */; };
     82                784870AB1B0B634A0098FD5A /* SEIwrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870381B0B62C70098FD5A /* SEIwrite.cpp */; };
     83                784870AC1B0B634A0098FD5A /* SyntaxElementWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848703A1B0B62C70098FD5A /* SyntaxElementWriter.cpp */; };
     84                784870AD1B0B634A0098FD5A /* TEncBinCoderCABAC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848703E1B0B62C70098FD5A /* TEncBinCoderCABAC.cpp */; };
     85                784870AE1B0B634A0098FD5A /* TEncBinCoderCABACCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870401B0B62C70098FD5A /* TEncBinCoderCABACCounter.cpp */; };
     86                784870AF1B0B634A0098FD5A /* TEncCavlc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870421B0B62C70098FD5A /* TEncCavlc.cpp */; };
     87                784870B01B0B634A0098FD5A /* TEncCu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870451B0B62C70098FD5A /* TEncCu.cpp */; };
     88                784870B11B0B634A0098FD5A /* TEncEntropy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870471B0B62C70098FD5A /* TEncEntropy.cpp */; };
     89                784870B21B0B634A0098FD5A /* TEncGOP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870491B0B62C70098FD5A /* TEncGOP.cpp */; };
     90                784870B31B0B634A0098FD5A /* TEncPic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848704B1B0B62C70098FD5A /* TEncPic.cpp */; };
     91                784870B41B0B634A0098FD5A /* TEncPreanalyzer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848704D1B0B62C70098FD5A /* TEncPreanalyzer.cpp */; };
     92                784870B51B0B634A0098FD5A /* TEncRateCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848704F1B0B62C70098FD5A /* TEncRateCtrl.cpp */; };
     93                784870B61B0B634A0098FD5A /* TEncSampleAdaptiveOffset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870511B0B62C70098FD5A /* TEncSampleAdaptiveOffset.cpp */; };
     94                784870B71B0B634A0098FD5A /* TEncSbac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870531B0B62C70098FD5A /* TEncSbac.cpp */; };
     95                784870B81B0B634A0098FD5A /* TEncSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870551B0B62C70098FD5A /* TEncSearch.cpp */; };
     96                784870B91B0B634A0098FD5A /* TEncSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870571B0B62C70098FD5A /* TEncSlice.cpp */; };
     97                784870BA1B0B634A0098FD5A /* TEncTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870591B0B62C70098FD5A /* TEncTop.cpp */; };
     98                784870BB1B0B634A0098FD5A /* WeightPredAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848705B1B0B62C70098FD5A /* WeightPredAnalysis.cpp */; };
     99                784870BC1B0B63520098FD5A /* TExtrTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848705E1B0B62C70098FD5A /* TExtrTop.cpp */; };
     100                784870BD1B0B635C0098FD5A /* TRenFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870611B0B62C70098FD5A /* TRenFilter.cpp */; };
     101                784870BE1B0B635C0098FD5A /* TRenImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870631B0B62C70098FD5A /* TRenImage.cpp */; };
     102                784870BF1B0B635C0098FD5A /* TRenImagePlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870651B0B62C70098FD5A /* TRenImagePlane.cpp */; };
     103                784870C01B0B635C0098FD5A /* TRenInterpFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870671B0B62C70098FD5A /* TRenInterpFilter.cpp */; };
     104                784870C11B0B635C0098FD5A /* TRenModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870691B0B62C70098FD5A /* TRenModel.cpp */; };
     105                784870C21B0B635C0098FD5A /* TRenModSetupStrParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848706B1B0B62C70098FD5A /* TRenModSetupStrParser.cpp */; };
     106                784870C31B0B635C0098FD5A /* TRenSingleModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848706D1B0B62C70098FD5A /* TRenSingleModel.cpp */; };
     107                784870C41B0B635C0098FD5A /* TRenTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7848706F1B0B62C70098FD5A /* TRenTop.cpp */; };
     108                784870C51B0B63610098FD5A /* TVideoIOYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 784870721B0B62C70098FD5A /* TVideoIOYuv.cpp */; };
     109                784870C61B0B63740098FD5A /* libmd5.c in Sources */ = {isa = PBXBuildFile; fileRef = 78486FD01B0B62C70098FD5A /* libmd5.c */; };
    107110                78C5940D15872233004401C5 /* libTLibCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767959411AD61BB00421804 /* libTLibCommon.a */; };
    108111                78C5940E15872233004401C5 /* libTLibEncoder.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767961911AD626F00421804 /* libTLibEncoder.a */; };
     
    289292                6767966A11AD635600421804 /* TAppEncoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TAppEncoder; sourceTree = BUILT_PRODUCTS_DIR; };
    290293                6782E0DE11AD691A00E8FFB8 /* TAppDecoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TAppDecoder; sourceTree = BUILT_PRODUCTS_DIR; };
    291                 785E596C17D9AFA8001F6DD1 /* TStatHeader.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TStatHeader.cpp; sourceTree = "<group>"; };
    292                 785E596D17D9AFA8001F6DD1 /* TStatHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TStatHeader.h; sourceTree = "<group>"; };
    293                 785E596E17D9AFA8001F6DD1 /* TStatLayer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TStatLayer.cpp; sourceTree = "<group>"; };
    294                 785E596F17D9AFA8001F6DD1 /* TStatLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TStatLayer.h; sourceTree = "<group>"; };
    295                 785E597017D9AFA8001F6DD1 /* TStatTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TStatTop.cpp; sourceTree = "<group>"; };
    296                 785E597117D9AFA8001F6DD1 /* TStatTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TStatTop.h; sourceTree = "<group>"; };
    297                 787462BB17D5DD7B0040CFC7 /* decmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = decmain.cpp; sourceTree = "<group>"; };
    298                 787462BC17D5DD7B0040CFC7 /* TAppDecCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppDecCfg.cpp; sourceTree = "<group>"; };
    299                 787462BD17D5DD7B0040CFC7 /* TAppDecCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppDecCfg.h; sourceTree = "<group>"; };
    300                 787462BE17D5DD7B0040CFC7 /* TAppDecTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppDecTop.cpp; sourceTree = "<group>"; };
    301                 787462BF17D5DD7B0040CFC7 /* TAppDecTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppDecTop.h; sourceTree = "<group>"; };
    302                 787462C117D5DD7B0040CFC7 /* encmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = encmain.cpp; sourceTree = "<group>"; };
    303                 787462C217D5DD7B0040CFC7 /* TAppEncCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppEncCfg.cpp; sourceTree = "<group>"; };
    304                 787462C317D5DD7B0040CFC7 /* TAppEncCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppEncCfg.h; sourceTree = "<group>"; };
    305                 787462C417D5DD7B0040CFC7 /* TAppEncTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppEncTop.cpp; sourceTree = "<group>"; };
    306                 787462C517D5DD7B0040CFC7 /* TAppEncTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppEncTop.h; sourceTree = "<group>"; };
    307                 787462C717D5DD7B0040CFC7 /* extrmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = extrmain.cpp; sourceTree = "<group>"; };
    308                 787462C817D5DD7B0040CFC7 /* TAppExtrCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppExtrCfg.cpp; sourceTree = "<group>"; };
    309                 787462C917D5DD7B0040CFC7 /* TAppExtrCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppExtrCfg.h; sourceTree = "<group>"; };
    310                 787462CA17D5DD7B0040CFC7 /* TAppExtrTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppExtrTop.cpp; sourceTree = "<group>"; };
    311                 787462CB17D5DD7B0040CFC7 /* TAppExtrTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppExtrTop.h; sourceTree = "<group>"; };
    312                 787462CD17D5DD7B0040CFC7 /* RendererMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RendererMain.cpp; sourceTree = "<group>"; };
    313                 787462CE17D5DD7B0040CFC7 /* TAppRendererCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppRendererCfg.cpp; sourceTree = "<group>"; };
    314                 787462CF17D5DD7B0040CFC7 /* TAppRendererCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppRendererCfg.h; sourceTree = "<group>"; };
    315                 787462D017D5DD7B0040CFC7 /* TAppRendererTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppRendererTop.cpp; sourceTree = "<group>"; };
    316                 787462D117D5DD7B0040CFC7 /* TAppRendererTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppRendererTop.h; sourceTree = "<group>"; };
    317                 787462D317D5DD7B0040CFC7 /* annexBbytecount.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = annexBbytecount.cpp; sourceTree = "<group>"; };
    318                 787462D517D5DD7B0040CFC7 /* encode.shl */ = {isa = PBXFileReference; lastKnownFileType = text; path = encode.shl; sourceTree = "<group>"; };
    319                 787462D617D5DD7B0040CFC7 /* encodeCommand.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = encodeCommand.sh; sourceTree = "<group>"; };
    320                 787462D717D5DD7B0040CFC7 /* ExtractBitrates.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractBitrates.cpp; sourceTree = "<group>"; };
    321                 787462D817D5DD7B0040CFC7 /* ExtractBitrates.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtractBitrates.h; sourceTree = "<group>"; };
    322                 787462D917D5DD7B0040CFC7 /* ExtractBitratesMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractBitratesMain.cpp; sourceTree = "<group>"; };
    323                 787462DA17D5DD7B0040CFC7 /* GuessLambdaModifiers.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GuessLambdaModifiers.cpp; sourceTree = "<group>"; };
    324                 787462DB17D5DD7B0040CFC7 /* GuessLambdaModifiers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GuessLambdaModifiers.h; sourceTree = "<group>"; };
    325                 787462DC17D5DD7B0040CFC7 /* GuessLambdaModifiersMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GuessLambdaModifiersMain.cpp; sourceTree = "<group>"; };
    326                 787462DD17D5DD7B0040CFC7 /* makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = makefile; sourceTree = "<group>"; };
    327                 787462DE17D5DD7B0040CFC7 /* QuickStartGuide.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = QuickStartGuide.pdf; sourceTree = "<group>"; };
    328                 787462DF17D5DD7B0040CFC7 /* RuntimeError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RuntimeError.h; sourceTree = "<group>"; };
    329                 787462E017D5DD7B0040CFC7 /* targetBitrates.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = targetBitrates.sh; sourceTree = "<group>"; };
    330                 787462E117D5DD7B0040CFC7 /* convert_NtoMbit_YCbCr.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = convert_NtoMbit_YCbCr.cpp; sourceTree = "<group>"; };
    331                 787462E317D5DD840040CFC7 /* libmd5.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = libmd5.c; sourceTree = "<group>"; };
    332                 787462E417D5DD840040CFC7 /* libmd5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libmd5.h; sourceTree = "<group>"; };
    333                 787462E517D5DD840040CFC7 /* MD5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MD5.h; sourceTree = "<group>"; };
    334                 787462E717D5DD840040CFC7 /* program_options_lite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = program_options_lite.cpp; sourceTree = "<group>"; };
    335                 787462E817D5DD840040CFC7 /* program_options_lite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = program_options_lite.h; sourceTree = "<group>"; };
    336                 787462E917D5DD840040CFC7 /* TAppComCamPara.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppComCamPara.cpp; sourceTree = "<group>"; };
    337                 787462EA17D5DD840040CFC7 /* TAppComCamPara.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppComCamPara.h; sourceTree = "<group>"; };
    338                 787462EC17D5DD840040CFC7 /* AccessUnit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccessUnit.h; sourceTree = "<group>"; };
    339                 787462ED17D5DD840040CFC7 /* CommonDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonDef.h; sourceTree = "<group>"; };
    340                 787462EE17D5DD840040CFC7 /* ContextModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ContextModel.cpp; sourceTree = "<group>"; };
    341                 787462EF17D5DD840040CFC7 /* ContextModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContextModel.h; sourceTree = "<group>"; };
    342                 787462F017D5DD840040CFC7 /* ContextModel3DBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ContextModel3DBuffer.cpp; sourceTree = "<group>"; };
    343                 787462F117D5DD840040CFC7 /* ContextModel3DBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContextModel3DBuffer.h; sourceTree = "<group>"; };
    344                 787462F217D5DD840040CFC7 /* ContextTables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContextTables.h; sourceTree = "<group>"; };
    345                 787462F317D5DD840040CFC7 /* NAL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAL.h; sourceTree = "<group>"; };
    346                 787462F417D5DD840040CFC7 /* SEI.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEI.cpp; sourceTree = "<group>"; };
    347                 787462F517D5DD840040CFC7 /* SEI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEI.h; sourceTree = "<group>"; };
    348                 787462F617D5DD840040CFC7 /* TComBitCounter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComBitCounter.h; sourceTree = "<group>"; };
    349                 787462F717D5DD840040CFC7 /* TComBitStream.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComBitStream.cpp; sourceTree = "<group>"; };
    350                 787462F817D5DD840040CFC7 /* TComBitStream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComBitStream.h; sourceTree = "<group>"; };
    351                 787462F917D5DD840040CFC7 /* TComCABACTables.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComCABACTables.cpp; sourceTree = "<group>"; };
    352                 787462FA17D5DD840040CFC7 /* TComCABACTables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComCABACTables.h; sourceTree = "<group>"; };
    353                 787462FB17D5DD840040CFC7 /* TComDataCU.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComDataCU.cpp; sourceTree = "<group>"; };
    354                 787462FC17D5DD840040CFC7 /* TComDataCU.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComDataCU.h; sourceTree = "<group>"; };
    355                 787462FD17D5DD840040CFC7 /* TComInterpolationFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComInterpolationFilter.cpp; sourceTree = "<group>"; };
    356                 787462FE17D5DD840040CFC7 /* TComInterpolationFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComInterpolationFilter.h; sourceTree = "<group>"; };
    357                 787462FF17D5DD840040CFC7 /* TComList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComList.h; sourceTree = "<group>"; };
    358                 7874630017D5DD840040CFC7 /* TComLoopFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComLoopFilter.cpp; sourceTree = "<group>"; };
    359                 7874630117D5DD840040CFC7 /* TComLoopFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComLoopFilter.h; sourceTree = "<group>"; };
    360                 7874630217D5DD840040CFC7 /* TComMotionInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComMotionInfo.cpp; sourceTree = "<group>"; };
    361                 7874630317D5DD840040CFC7 /* TComMotionInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComMotionInfo.h; sourceTree = "<group>"; };
    362                 7874630417D5DD840040CFC7 /* TComMv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComMv.h; sourceTree = "<group>"; };
    363                 7874630517D5DD840040CFC7 /* TComPattern.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPattern.cpp; sourceTree = "<group>"; };
    364                 7874630617D5DD840040CFC7 /* TComPattern.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPattern.h; sourceTree = "<group>"; };
    365                 7874630717D5DD840040CFC7 /* TComPic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPic.cpp; sourceTree = "<group>"; };
    366                 7874630817D5DD840040CFC7 /* TComPic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPic.h; sourceTree = "<group>"; };
    367                 7874630917D5DD840040CFC7 /* TComPicSym.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicSym.cpp; sourceTree = "<group>"; };
    368                 7874630A17D5DD840040CFC7 /* TComPicSym.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPicSym.h; sourceTree = "<group>"; };
    369                 7874630B17D5DD840040CFC7 /* TComPicYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicYuv.cpp; sourceTree = "<group>"; };
    370                 7874630C17D5DD840040CFC7 /* TComPicYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPicYuv.h; sourceTree = "<group>"; };
    371                 7874630D17D5DD840040CFC7 /* TComPicYuvMD5.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicYuvMD5.cpp; sourceTree = "<group>"; };
    372                 7874630E17D5DD840040CFC7 /* TComPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPrediction.cpp; sourceTree = "<group>"; };
    373                 7874630F17D5DD840040CFC7 /* TComPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPrediction.h; sourceTree = "<group>"; };
    374                 7874631017D5DD840040CFC7 /* TComRdCost.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRdCost.cpp; sourceTree = "<group>"; };
    375                 7874631117D5DD840040CFC7 /* TComRdCost.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRdCost.h; sourceTree = "<group>"; };
    376                 7874631217D5DD840040CFC7 /* TComRdCostWeightPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRdCostWeightPrediction.cpp; sourceTree = "<group>"; };
    377                 7874631317D5DD840040CFC7 /* TComRdCostWeightPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRdCostWeightPrediction.h; sourceTree = "<group>"; };
    378                 7874631417D5DD840040CFC7 /* TComRom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRom.cpp; sourceTree = "<group>"; };
    379                 7874631517D5DD840040CFC7 /* TComRom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRom.h; sourceTree = "<group>"; };
    380                 7874631617D5DD840040CFC7 /* TComSampleAdaptiveOffset.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComSampleAdaptiveOffset.cpp; sourceTree = "<group>"; };
    381                 7874631717D5DD840040CFC7 /* TComSampleAdaptiveOffset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComSampleAdaptiveOffset.h; sourceTree = "<group>"; };
    382                 7874631817D5DD840040CFC7 /* TComSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComSlice.cpp; sourceTree = "<group>"; };
    383                 7874631917D5DD840040CFC7 /* TComSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComSlice.h; sourceTree = "<group>"; };
    384                 7874631A17D5DD840040CFC7 /* TComTrQuant.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComTrQuant.cpp; sourceTree = "<group>"; };
    385                 7874631B17D5DD840040CFC7 /* TComTrQuant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComTrQuant.h; sourceTree = "<group>"; };
    386                 7874631C17D5DD840040CFC7 /* TComWedgelet.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComWedgelet.cpp; sourceTree = "<group>"; };
    387                 7874631D17D5DD840040CFC7 /* TComWedgelet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComWedgelet.h; sourceTree = "<group>"; };
    388                 7874631E17D5DD840040CFC7 /* TComWeightPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComWeightPrediction.cpp; sourceTree = "<group>"; };
    389                 7874631F17D5DD840040CFC7 /* TComWeightPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComWeightPrediction.h; sourceTree = "<group>"; };
    390                 7874632017D5DD840040CFC7 /* TComYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComYuv.cpp; sourceTree = "<group>"; };
    391                 7874632117D5DD840040CFC7 /* TComYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComYuv.h; sourceTree = "<group>"; };
    392                 7874632217D5DD840040CFC7 /* TypeDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeDef.h; sourceTree = "<group>"; };
    393                 7874632417D5DD840040CFC7 /* AnnexBread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AnnexBread.cpp; sourceTree = "<group>"; };
    394                 7874632517D5DD840040CFC7 /* AnnexBread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnnexBread.h; sourceTree = "<group>"; };
    395                 7874632617D5DD840040CFC7 /* NALread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NALread.cpp; sourceTree = "<group>"; };
    396                 7874632717D5DD840040CFC7 /* NALread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NALread.h; sourceTree = "<group>"; };
    397                 7874632817D5DD840040CFC7 /* SEIread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEIread.cpp; sourceTree = "<group>"; };
    398                 7874632917D5DD840040CFC7 /* SEIread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEIread.h; sourceTree = "<group>"; };
    399                 7874632A17D5DD840040CFC7 /* SyntaxElementParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SyntaxElementParser.cpp; sourceTree = "<group>"; };
    400                 7874632B17D5DD840040CFC7 /* SyntaxElementParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SyntaxElementParser.h; sourceTree = "<group>"; };
    401                 7874632C17D5DD840040CFC7 /* TDecBinCoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecBinCoder.h; sourceTree = "<group>"; };
    402                 7874632D17D5DD840040CFC7 /* TDecBinCoderCABAC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecBinCoderCABAC.cpp; sourceTree = "<group>"; };
    403                 7874632E17D5DD840040CFC7 /* TDecBinCoderCABAC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecBinCoderCABAC.h; sourceTree = "<group>"; };
    404                 7874632F17D5DD840040CFC7 /* TDecCAVLC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecCAVLC.cpp; sourceTree = "<group>"; };
    405                 7874633017D5DD840040CFC7 /* TDecCAVLC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecCAVLC.h; sourceTree = "<group>"; };
    406                 7874633117D5DD840040CFC7 /* TDecCu.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecCu.cpp; sourceTree = "<group>"; };
    407                 7874633217D5DD840040CFC7 /* TDecCu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecCu.h; sourceTree = "<group>"; };
    408                 7874633317D5DD840040CFC7 /* TDecEntropy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecEntropy.cpp; sourceTree = "<group>"; };
    409                 7874633417D5DD840040CFC7 /* TDecEntropy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecEntropy.h; sourceTree = "<group>"; };
    410                 7874633517D5DD840040CFC7 /* TDecGop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecGop.cpp; sourceTree = "<group>"; };
    411                 7874633617D5DD840040CFC7 /* TDecGop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecGop.h; sourceTree = "<group>"; };
    412                 7874633717D5DD840040CFC7 /* TDecSbac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecSbac.cpp; sourceTree = "<group>"; };
    413                 7874633817D5DD840040CFC7 /* TDecSbac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecSbac.h; sourceTree = "<group>"; };
    414                 7874633917D5DD840040CFC7 /* TDecSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecSlice.cpp; sourceTree = "<group>"; };
    415                 7874633A17D5DD840040CFC7 /* TDecSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecSlice.h; sourceTree = "<group>"; };
    416                 7874633B17D5DD840040CFC7 /* TDecTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecTop.cpp; sourceTree = "<group>"; };
    417                 7874633C17D5DD840040CFC7 /* TDecTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecTop.h; sourceTree = "<group>"; };
    418                 7874633E17D5DD840040CFC7 /* AnnexBwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnnexBwrite.h; sourceTree = "<group>"; };
    419                 7874633F17D5DD840040CFC7 /* NALwrite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NALwrite.cpp; sourceTree = "<group>"; };
    420                 7874634017D5DD840040CFC7 /* NALwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NALwrite.h; sourceTree = "<group>"; };
    421                 7874634117D5DD840040CFC7 /* SEIwrite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEIwrite.cpp; sourceTree = "<group>"; };
    422                 7874634217D5DD840040CFC7 /* SEIwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEIwrite.h; sourceTree = "<group>"; };
    423                 7874634317D5DD840040CFC7 /* SyntaxElementWriter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SyntaxElementWriter.cpp; sourceTree = "<group>"; };
    424                 7874634417D5DD840040CFC7 /* SyntaxElementWriter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SyntaxElementWriter.h; sourceTree = "<group>"; };
    425                 7874634517D5DD840040CFC7 /* TEncAnalyze.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncAnalyze.cpp; sourceTree = "<group>"; };
    426                 7874634617D5DD840040CFC7 /* TEncAnalyze.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncAnalyze.h; sourceTree = "<group>"; };
    427                 7874634717D5DD840040CFC7 /* TEncBinCoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoder.h; sourceTree = "<group>"; };
    428                 7874634817D5DD840040CFC7 /* TEncBinCoderCABAC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncBinCoderCABAC.cpp; sourceTree = "<group>"; };
    429                 7874634917D5DD840040CFC7 /* TEncBinCoderCABAC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoderCABAC.h; sourceTree = "<group>"; };
    430                 7874634A17D5DD840040CFC7 /* TEncBinCoderCABACCounter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncBinCoderCABACCounter.cpp; sourceTree = "<group>"; };
    431                 7874634B17D5DD840040CFC7 /* TEncBinCoderCABACCounter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoderCABACCounter.h; sourceTree = "<group>"; };
    432                 7874634C17D5DD840040CFC7 /* TEncCavlc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncCavlc.cpp; sourceTree = "<group>"; };
    433                 7874634D17D5DD840040CFC7 /* TEncCavlc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCavlc.h; sourceTree = "<group>"; };
    434                 7874634E17D5DD840040CFC7 /* TEncCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCfg.h; sourceTree = "<group>"; };
    435                 7874634F17D5DD840040CFC7 /* TEncCu.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncCu.cpp; sourceTree = "<group>"; };
    436                 7874635017D5DD840040CFC7 /* TEncCu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCu.h; sourceTree = "<group>"; };
    437                 7874635117D5DD840040CFC7 /* TEncEntropy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncEntropy.cpp; sourceTree = "<group>"; };
    438                 7874635217D5DD840040CFC7 /* TEncEntropy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncEntropy.h; sourceTree = "<group>"; };
    439                 7874635317D5DD840040CFC7 /* TEncGOP.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncGOP.cpp; sourceTree = "<group>"; };
    440                 7874635417D5DD840040CFC7 /* TEncGOP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncGOP.h; sourceTree = "<group>"; };
    441                 7874635517D5DD840040CFC7 /* TEncPic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncPic.cpp; sourceTree = "<group>"; };
    442                 7874635617D5DD840040CFC7 /* TEncPic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncPic.h; sourceTree = "<group>"; };
    443                 7874635717D5DD840040CFC7 /* TEncPreanalyzer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncPreanalyzer.cpp; sourceTree = "<group>"; };
    444                 7874635817D5DD840040CFC7 /* TEncPreanalyzer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncPreanalyzer.h; sourceTree = "<group>"; };
    445                 7874635917D5DD840040CFC7 /* TEncRateCtrl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncRateCtrl.cpp; sourceTree = "<group>"; };
    446                 7874635A17D5DD840040CFC7 /* TEncRateCtrl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncRateCtrl.h; sourceTree = "<group>"; };
    447                 7874635B17D5DD840040CFC7 /* TEncSampleAdaptiveOffset.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSampleAdaptiveOffset.cpp; sourceTree = "<group>"; };
    448                 7874635C17D5DD840040CFC7 /* TEncSampleAdaptiveOffset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSampleAdaptiveOffset.h; sourceTree = "<group>"; };
    449                 7874635D17D5DD840040CFC7 /* TEncSbac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSbac.cpp; sourceTree = "<group>"; };
    450                 7874635E17D5DD840040CFC7 /* TEncSbac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSbac.h; sourceTree = "<group>"; };
    451                 7874635F17D5DD840040CFC7 /* TEncSearch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSearch.cpp; sourceTree = "<group>"; };
    452                 7874636017D5DD840040CFC7 /* TEncSearch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSearch.h; sourceTree = "<group>"; };
    453                 7874636117D5DD840040CFC7 /* TEncSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSlice.cpp; sourceTree = "<group>"; };
    454                 7874636217D5DD840040CFC7 /* TEncSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSlice.h; sourceTree = "<group>"; };
    455                 7874636317D5DD840040CFC7 /* TEncTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncTop.cpp; sourceTree = "<group>"; };
    456                 7874636417D5DD840040CFC7 /* TEncTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncTop.h; sourceTree = "<group>"; };
    457                 7874636517D5DD840040CFC7 /* WeightPredAnalysis.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WeightPredAnalysis.cpp; sourceTree = "<group>"; };
    458                 7874636617D5DD840040CFC7 /* WeightPredAnalysis.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeightPredAnalysis.h; sourceTree = "<group>"; };
    459                 7874636817D5DD840040CFC7 /* TExtrTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TExtrTop.cpp; sourceTree = "<group>"; };
    460                 7874636917D5DD840040CFC7 /* TExtrTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TExtrTop.h; sourceTree = "<group>"; };
    461                 7874636B17D5DD840040CFC7 /* TRenFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenFilter.cpp; sourceTree = "<group>"; };
    462                 7874636C17D5DD840040CFC7 /* TRenFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenFilter.h; sourceTree = "<group>"; };
    463                 7874636D17D5DD840040CFC7 /* TRenImage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenImage.cpp; sourceTree = "<group>"; };
    464                 7874636E17D5DD840040CFC7 /* TRenImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenImage.h; sourceTree = "<group>"; };
    465                 7874636F17D5DD840040CFC7 /* TRenImagePlane.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenImagePlane.cpp; sourceTree = "<group>"; };
    466                 7874637017D5DD840040CFC7 /* TRenImagePlane.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenImagePlane.h; sourceTree = "<group>"; };
    467                 7874637117D5DD840040CFC7 /* TRenInterpFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenInterpFilter.cpp; sourceTree = "<group>"; };
    468                 7874637217D5DD840040CFC7 /* TRenInterpFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenInterpFilter.h; sourceTree = "<group>"; };
    469                 7874637317D5DD840040CFC7 /* TRenModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenModel.cpp; sourceTree = "<group>"; };
    470                 7874637417D5DD840040CFC7 /* TRenModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenModel.h; sourceTree = "<group>"; };
    471                 7874637517D5DD840040CFC7 /* TRenModSetupStrParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenModSetupStrParser.cpp; sourceTree = "<group>"; };
    472                 7874637617D5DD840040CFC7 /* TRenModSetupStrParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenModSetupStrParser.h; sourceTree = "<group>"; };
    473                 7874637717D5DD840040CFC7 /* TRenSingleModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenSingleModel.cpp; sourceTree = "<group>"; };
    474                 7874637817D5DD840040CFC7 /* TRenSingleModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenSingleModel.h; sourceTree = "<group>"; };
    475                 7874637917D5DD840040CFC7 /* TRenTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenTop.cpp; sourceTree = "<group>"; };
    476                 7874637A17D5DD840040CFC7 /* TRenTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenTop.h; sourceTree = "<group>"; };
    477                 7874637C17D5DD840040CFC7 /* TVideoIOYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TVideoIOYuv.cpp; sourceTree = "<group>"; };
    478                 7874637D17D5DD840040CFC7 /* TVideoIOYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TVideoIOYuv.h; sourceTree = "<group>"; };
     294                78486FA71B0B62C70098FD5A /* decmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = decmain.cpp; sourceTree = "<group>"; };
     295                78486FA81B0B62C70098FD5A /* TAppDecCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppDecCfg.cpp; sourceTree = "<group>"; };
     296                78486FA91B0B62C70098FD5A /* TAppDecCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppDecCfg.h; sourceTree = "<group>"; };
     297                78486FAA1B0B62C70098FD5A /* TAppDecTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppDecTop.cpp; sourceTree = "<group>"; };
     298                78486FAB1B0B62C70098FD5A /* TAppDecTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppDecTop.h; sourceTree = "<group>"; };
     299                78486FAD1B0B62C70098FD5A /* encmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = encmain.cpp; sourceTree = "<group>"; };
     300                78486FAE1B0B62C70098FD5A /* TAppEncCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppEncCfg.cpp; sourceTree = "<group>"; };
     301                78486FAF1B0B62C70098FD5A /* TAppEncCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppEncCfg.h; sourceTree = "<group>"; };
     302                78486FB01B0B62C70098FD5A /* TAppEncTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppEncTop.cpp; sourceTree = "<group>"; };
     303                78486FB11B0B62C70098FD5A /* TAppEncTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppEncTop.h; sourceTree = "<group>"; };
     304                78486FB31B0B62C70098FD5A /* extrmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = extrmain.cpp; sourceTree = "<group>"; };
     305                78486FB41B0B62C70098FD5A /* TAppExtrCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppExtrCfg.cpp; sourceTree = "<group>"; };
     306                78486FB51B0B62C70098FD5A /* TAppExtrCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppExtrCfg.h; sourceTree = "<group>"; };
     307                78486FB61B0B62C70098FD5A /* TAppExtrTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppExtrTop.cpp; sourceTree = "<group>"; };
     308                78486FB71B0B62C70098FD5A /* TAppExtrTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppExtrTop.h; sourceTree = "<group>"; };
     309                78486FB91B0B62C70098FD5A /* RendererMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RendererMain.cpp; sourceTree = "<group>"; };
     310                78486FBA1B0B62C70098FD5A /* TAppRendererCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppRendererCfg.cpp; sourceTree = "<group>"; };
     311                78486FBB1B0B62C70098FD5A /* TAppRendererCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppRendererCfg.h; sourceTree = "<group>"; };
     312                78486FBC1B0B62C70098FD5A /* TAppRendererTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppRendererTop.cpp; sourceTree = "<group>"; };
     313                78486FBD1B0B62C70098FD5A /* TAppRendererTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppRendererTop.h; sourceTree = "<group>"; };
     314                78486FBF1B0B62C70098FD5A /* annexBbytecount.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = annexBbytecount.cpp; sourceTree = "<group>"; };
     315                78486FC11B0B62C70098FD5A /* encode.shl */ = {isa = PBXFileReference; lastKnownFileType = text; path = encode.shl; sourceTree = "<group>"; };
     316                78486FC21B0B62C70098FD5A /* encodeCommand.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = encodeCommand.sh; sourceTree = "<group>"; };
     317                78486FC31B0B62C70098FD5A /* ExtractBitrates.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractBitrates.cpp; sourceTree = "<group>"; };
     318                78486FC41B0B62C70098FD5A /* ExtractBitrates.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtractBitrates.h; sourceTree = "<group>"; };
     319                78486FC51B0B62C70098FD5A /* ExtractBitratesMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractBitratesMain.cpp; sourceTree = "<group>"; };
     320                78486FC61B0B62C70098FD5A /* GuessLambdaModifiers.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GuessLambdaModifiers.cpp; sourceTree = "<group>"; };
     321                78486FC71B0B62C70098FD5A /* GuessLambdaModifiers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GuessLambdaModifiers.h; sourceTree = "<group>"; };
     322                78486FC81B0B62C70098FD5A /* GuessLambdaModifiersMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GuessLambdaModifiersMain.cpp; sourceTree = "<group>"; };
     323                78486FC91B0B62C70098FD5A /* makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = makefile; sourceTree = "<group>"; };
     324                78486FCA1B0B62C70098FD5A /* QuickStartGuide.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = QuickStartGuide.pdf; sourceTree = "<group>"; };
     325                78486FCB1B0B62C70098FD5A /* RuntimeError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RuntimeError.h; sourceTree = "<group>"; };
     326                78486FCC1B0B62C70098FD5A /* targetBitrates.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = targetBitrates.sh; sourceTree = "<group>"; };
     327                78486FCD1B0B62C70098FD5A /* convert_NtoMbit_YCbCr.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = convert_NtoMbit_YCbCr.cpp; sourceTree = "<group>"; };
     328                78486FD01B0B62C70098FD5A /* libmd5.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = libmd5.c; sourceTree = "<group>"; };
     329                78486FD11B0B62C70098FD5A /* libmd5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libmd5.h; sourceTree = "<group>"; };
     330                78486FD21B0B62C70098FD5A /* MD5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MD5.h; sourceTree = "<group>"; };
     331                78486FD41B0B62C70098FD5A /* program_options_lite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = program_options_lite.cpp; sourceTree = "<group>"; };
     332                78486FD51B0B62C70098FD5A /* program_options_lite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = program_options_lite.h; sourceTree = "<group>"; };
     333                78486FD61B0B62C70098FD5A /* TAppComCamPara.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppComCamPara.cpp; sourceTree = "<group>"; };
     334                78486FD71B0B62C70098FD5A /* TAppComCamPara.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppComCamPara.h; sourceTree = "<group>"; };
     335                78486FD91B0B62C70098FD5A /* AccessUnit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccessUnit.h; sourceTree = "<group>"; };
     336                78486FDA1B0B62C70098FD5A /* CommonDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonDef.h; sourceTree = "<group>"; };
     337                78486FDB1B0B62C70098FD5A /* ContextModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ContextModel.cpp; sourceTree = "<group>"; };
     338                78486FDC1B0B62C70098FD5A /* ContextModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContextModel.h; sourceTree = "<group>"; };
     339                78486FDD1B0B62C70098FD5A /* ContextModel3DBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ContextModel3DBuffer.cpp; sourceTree = "<group>"; };
     340                78486FDE1B0B62C70098FD5A /* ContextModel3DBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContextModel3DBuffer.h; sourceTree = "<group>"; };
     341                78486FDF1B0B62C70098FD5A /* ContextTables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ContextTables.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
     342                78486FE01B0B62C70098FD5A /* Debug.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Debug.cpp; sourceTree = "<group>"; };
     343                78486FE11B0B62C70098FD5A /* Debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Debug.h; sourceTree = "<group>"; };
     344                78486FE21B0B62C70098FD5A /* NAL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAL.h; sourceTree = "<group>"; };
     345                78486FE31B0B62C70098FD5A /* SEI.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEI.cpp; sourceTree = "<group>"; };
     346                78486FE41B0B62C70098FD5A /* SEI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEI.h; sourceTree = "<group>"; };
     347                78486FE51B0B62C70098FD5A /* TComBitCounter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComBitCounter.h; sourceTree = "<group>"; };
     348                78486FE61B0B62C70098FD5A /* TComBitStream.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComBitStream.cpp; sourceTree = "<group>"; };
     349                78486FE71B0B62C70098FD5A /* TComBitStream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComBitStream.h; sourceTree = "<group>"; };
     350                78486FE81B0B62C70098FD5A /* TComCABACTables.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComCABACTables.cpp; sourceTree = "<group>"; };
     351                78486FE91B0B62C70098FD5A /* TComCABACTables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComCABACTables.h; sourceTree = "<group>"; };
     352                78486FEA1B0B62C70098FD5A /* TComChromaFormat.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComChromaFormat.cpp; sourceTree = "<group>"; };
     353                78486FEB1B0B62C70098FD5A /* TComChromaFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComChromaFormat.h; sourceTree = "<group>"; };
     354                78486FEC1B0B62C70098FD5A /* TComCodingStatistics.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComCodingStatistics.h; sourceTree = "<group>"; };
     355                78486FED1B0B62C70098FD5A /* TComDataCU.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComDataCU.cpp; sourceTree = "<group>"; };
     356                78486FEE1B0B62C70098FD5A /* TComDataCU.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComDataCU.h; sourceTree = "<group>"; };
     357                78486FEF1B0B62C70098FD5A /* TComInterpolationFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComInterpolationFilter.cpp; sourceTree = "<group>"; };
     358                78486FF01B0B62C70098FD5A /* TComInterpolationFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComInterpolationFilter.h; sourceTree = "<group>"; };
     359                78486FF11B0B62C70098FD5A /* TComList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComList.h; sourceTree = "<group>"; };
     360                78486FF21B0B62C70098FD5A /* TComLoopFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComLoopFilter.cpp; sourceTree = "<group>"; };
     361                78486FF31B0B62C70098FD5A /* TComLoopFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComLoopFilter.h; sourceTree = "<group>"; };
     362                78486FF41B0B62C70098FD5A /* TComMotionInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComMotionInfo.cpp; sourceTree = "<group>"; };
     363                78486FF51B0B62C70098FD5A /* TComMotionInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComMotionInfo.h; sourceTree = "<group>"; };
     364                78486FF61B0B62C70098FD5A /* TComMv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComMv.h; sourceTree = "<group>"; };
     365                78486FF71B0B62C70098FD5A /* TComPattern.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPattern.cpp; sourceTree = "<group>"; };
     366                78486FF81B0B62C70098FD5A /* TComPattern.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPattern.h; sourceTree = "<group>"; };
     367                78486FF91B0B62C70098FD5A /* TComPic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPic.cpp; sourceTree = "<group>"; };
     368                78486FFA1B0B62C70098FD5A /* TComPic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPic.h; sourceTree = "<group>"; };
     369                78486FFB1B0B62C70098FD5A /* TComPicSym.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicSym.cpp; sourceTree = "<group>"; };
     370                78486FFC1B0B62C70098FD5A /* TComPicSym.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPicSym.h; sourceTree = "<group>"; };
     371                78486FFD1B0B62C70098FD5A /* TComPicYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicYuv.cpp; sourceTree = "<group>"; };
     372                78486FFE1B0B62C70098FD5A /* TComPicYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPicYuv.h; sourceTree = "<group>"; };
     373                78486FFF1B0B62C70098FD5A /* TComPicYuvMD5.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicYuvMD5.cpp; sourceTree = "<group>"; };
     374                784870001B0B62C70098FD5A /* TComPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = TComPrediction.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
     375                784870011B0B62C70098FD5A /* TComPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = TComPrediction.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
     376                784870021B0B62C70098FD5A /* TComRdCost.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRdCost.cpp; sourceTree = "<group>"; };
     377                784870031B0B62C70098FD5A /* TComRdCost.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRdCost.h; sourceTree = "<group>"; };
     378                784870041B0B62C70098FD5A /* TComRdCostWeightPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRdCostWeightPrediction.cpp; sourceTree = "<group>"; };
     379                784870051B0B62C70098FD5A /* TComRdCostWeightPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRdCostWeightPrediction.h; sourceTree = "<group>"; };
     380                784870061B0B62C70098FD5A /* TComRectangle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRectangle.h; sourceTree = "<group>"; };
     381                784870071B0B62C70098FD5A /* TComRom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRom.cpp; sourceTree = "<group>"; };
     382                784870081B0B62C70098FD5A /* TComRom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRom.h; sourceTree = "<group>"; };
     383                784870091B0B62C70098FD5A /* TComSampleAdaptiveOffset.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComSampleAdaptiveOffset.cpp; sourceTree = "<group>"; };
     384                7848700A1B0B62C70098FD5A /* TComSampleAdaptiveOffset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComSampleAdaptiveOffset.h; sourceTree = "<group>"; };
     385                7848700B1B0B62C70098FD5A /* TComSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComSlice.cpp; sourceTree = "<group>"; };
     386                7848700C1B0B62C70098FD5A /* TComSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComSlice.h; sourceTree = "<group>"; };
     387                7848700D1B0B62C70098FD5A /* TComTrQuant.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComTrQuant.cpp; sourceTree = "<group>"; };
     388                7848700E1B0B62C70098FD5A /* TComTrQuant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComTrQuant.h; sourceTree = "<group>"; };
     389                7848700F1B0B62C70098FD5A /* TComTU.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComTU.cpp; sourceTree = "<group>"; };
     390                784870101B0B62C70098FD5A /* TComTU.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComTU.h; sourceTree = "<group>"; };
     391                784870111B0B62C70098FD5A /* TComWedgelet.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComWedgelet.cpp; sourceTree = "<group>"; };
     392                784870121B0B62C70098FD5A /* TComWedgelet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComWedgelet.h; sourceTree = "<group>"; };
     393                784870131B0B62C70098FD5A /* TComWeightPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComWeightPrediction.cpp; sourceTree = "<group>"; };
     394                784870141B0B62C70098FD5A /* TComWeightPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComWeightPrediction.h; sourceTree = "<group>"; };
     395                784870151B0B62C70098FD5A /* TComYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComYuv.cpp; sourceTree = "<group>"; };
     396                784870161B0B62C70098FD5A /* TComYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComYuv.h; sourceTree = "<group>"; };
     397                784870171B0B62C70098FD5A /* TypeDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = TypeDef.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
     398                784870191B0B62C70098FD5A /* AnnexBread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AnnexBread.cpp; sourceTree = "<group>"; };
     399                7848701A1B0B62C70098FD5A /* AnnexBread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnnexBread.h; sourceTree = "<group>"; };
     400                7848701B1B0B62C70098FD5A /* NALread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NALread.cpp; sourceTree = "<group>"; };
     401                7848701C1B0B62C70098FD5A /* NALread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NALread.h; sourceTree = "<group>"; };
     402                7848701D1B0B62C70098FD5A /* SEIread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEIread.cpp; sourceTree = "<group>"; };
     403                7848701E1B0B62C70098FD5A /* SEIread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEIread.h; sourceTree = "<group>"; };
     404                7848701F1B0B62C70098FD5A /* SyntaxElementParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SyntaxElementParser.cpp; sourceTree = "<group>"; };
     405                784870201B0B62C70098FD5A /* SyntaxElementParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SyntaxElementParser.h; sourceTree = "<group>"; };
     406                784870211B0B62C70098FD5A /* TDecBinCoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecBinCoder.h; sourceTree = "<group>"; };
     407                784870221B0B62C70098FD5A /* TDecBinCoderCABAC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecBinCoderCABAC.cpp; sourceTree = "<group>"; };
     408                784870231B0B62C70098FD5A /* TDecBinCoderCABAC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecBinCoderCABAC.h; sourceTree = "<group>"; };
     409                784870241B0B62C70098FD5A /* TDecCAVLC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecCAVLC.cpp; sourceTree = "<group>"; };
     410                784870251B0B62C70098FD5A /* TDecCAVLC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecCAVLC.h; sourceTree = "<group>"; };
     411                784870261B0B62C70098FD5A /* TDecCu.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecCu.cpp; sourceTree = "<group>"; };
     412                784870271B0B62C70098FD5A /* TDecCu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecCu.h; sourceTree = "<group>"; };
     413                784870281B0B62C70098FD5A /* TDecEntropy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecEntropy.cpp; sourceTree = "<group>"; };
     414                784870291B0B62C70098FD5A /* TDecEntropy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecEntropy.h; sourceTree = "<group>"; };
     415                7848702A1B0B62C70098FD5A /* TDecGop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecGop.cpp; sourceTree = "<group>"; };
     416                7848702B1B0B62C70098FD5A /* TDecGop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecGop.h; sourceTree = "<group>"; };
     417                7848702C1B0B62C70098FD5A /* TDecSbac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = TDecSbac.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
     418                7848702D1B0B62C70098FD5A /* TDecSbac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = TDecSbac.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
     419                7848702E1B0B62C70098FD5A /* TDecSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecSlice.cpp; sourceTree = "<group>"; };
     420                7848702F1B0B62C70098FD5A /* TDecSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecSlice.h; sourceTree = "<group>"; };
     421                784870301B0B62C70098FD5A /* TDecTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecTop.cpp; sourceTree = "<group>"; };
     422                784870311B0B62C70098FD5A /* TDecTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecTop.h; sourceTree = "<group>"; };
     423                784870331B0B62C70098FD5A /* AnnexBwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnnexBwrite.h; sourceTree = "<group>"; };
     424                784870341B0B62C70098FD5A /* NALwrite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NALwrite.cpp; sourceTree = "<group>"; };
     425                784870351B0B62C70098FD5A /* NALwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NALwrite.h; sourceTree = "<group>"; };
     426                784870361B0B62C70098FD5A /* SEIEncoder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEIEncoder.cpp; sourceTree = "<group>"; };
     427                784870371B0B62C70098FD5A /* SEIEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEIEncoder.h; sourceTree = "<group>"; };
     428                784870381B0B62C70098FD5A /* SEIwrite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEIwrite.cpp; sourceTree = "<group>"; };
     429                784870391B0B62C70098FD5A /* SEIwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEIwrite.h; sourceTree = "<group>"; };
     430                7848703A1B0B62C70098FD5A /* SyntaxElementWriter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SyntaxElementWriter.cpp; sourceTree = "<group>"; };
     431                7848703B1B0B62C70098FD5A /* SyntaxElementWriter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SyntaxElementWriter.h; sourceTree = "<group>"; };
     432                7848703C1B0B62C70098FD5A /* TEncAnalyze.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncAnalyze.h; sourceTree = "<group>"; };
     433                7848703D1B0B62C70098FD5A /* TEncBinCoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoder.h; sourceTree = "<group>"; };
     434                7848703E1B0B62C70098FD5A /* TEncBinCoderCABAC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncBinCoderCABAC.cpp; sourceTree = "<group>"; };
     435                7848703F1B0B62C70098FD5A /* TEncBinCoderCABAC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoderCABAC.h; sourceTree = "<group>"; };
     436                784870401B0B62C70098FD5A /* TEncBinCoderCABACCounter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncBinCoderCABACCounter.cpp; sourceTree = "<group>"; };
     437                784870411B0B62C70098FD5A /* TEncBinCoderCABACCounter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoderCABACCounter.h; sourceTree = "<group>"; };
     438                784870421B0B62C70098FD5A /* TEncCavlc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncCavlc.cpp; sourceTree = "<group>"; };
     439                784870431B0B62C70098FD5A /* TEncCavlc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCavlc.h; sourceTree = "<group>"; };
     440                784870441B0B62C70098FD5A /* TEncCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCfg.h; sourceTree = "<group>"; };
     441                784870451B0B62C70098FD5A /* TEncCu.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncCu.cpp; sourceTree = "<group>"; };
     442                784870461B0B62C70098FD5A /* TEncCu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCu.h; sourceTree = "<group>"; };
     443                784870471B0B62C70098FD5A /* TEncEntropy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncEntropy.cpp; sourceTree = "<group>"; };
     444                784870481B0B62C70098FD5A /* TEncEntropy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncEntropy.h; sourceTree = "<group>"; };
     445                784870491B0B62C70098FD5A /* TEncGOP.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncGOP.cpp; sourceTree = "<group>"; };
     446                7848704A1B0B62C70098FD5A /* TEncGOP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncGOP.h; sourceTree = "<group>"; };
     447                7848704B1B0B62C70098FD5A /* TEncPic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncPic.cpp; sourceTree = "<group>"; };
     448                7848704C1B0B62C70098FD5A /* TEncPic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncPic.h; sourceTree = "<group>"; };
     449                7848704D1B0B62C70098FD5A /* TEncPreanalyzer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncPreanalyzer.cpp; sourceTree = "<group>"; };
     450                7848704E1B0B62C70098FD5A /* TEncPreanalyzer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncPreanalyzer.h; sourceTree = "<group>"; };
     451                7848704F1B0B62C70098FD5A /* TEncRateCtrl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncRateCtrl.cpp; sourceTree = "<group>"; };
     452                784870501B0B62C70098FD5A /* TEncRateCtrl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncRateCtrl.h; sourceTree = "<group>"; };
     453                784870511B0B62C70098FD5A /* TEncSampleAdaptiveOffset.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSampleAdaptiveOffset.cpp; sourceTree = "<group>"; };
     454                784870521B0B62C70098FD5A /* TEncSampleAdaptiveOffset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSampleAdaptiveOffset.h; sourceTree = "<group>"; };
     455                784870531B0B62C70098FD5A /* TEncSbac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = TEncSbac.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
     456                784870541B0B62C70098FD5A /* TEncSbac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = TEncSbac.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
     457                784870551B0B62C70098FD5A /* TEncSearch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = TEncSearch.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
     458                784870561B0B62C70098FD5A /* TEncSearch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = TEncSearch.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
     459                784870571B0B62C70098FD5A /* TEncSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSlice.cpp; sourceTree = "<group>"; };
     460                784870581B0B62C70098FD5A /* TEncSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSlice.h; sourceTree = "<group>"; };
     461                784870591B0B62C70098FD5A /* TEncTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncTop.cpp; sourceTree = "<group>"; };
     462                7848705A1B0B62C70098FD5A /* TEncTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncTop.h; sourceTree = "<group>"; };
     463                7848705B1B0B62C70098FD5A /* WeightPredAnalysis.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WeightPredAnalysis.cpp; sourceTree = "<group>"; };
     464                7848705C1B0B62C70098FD5A /* WeightPredAnalysis.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeightPredAnalysis.h; sourceTree = "<group>"; };
     465                7848705E1B0B62C70098FD5A /* TExtrTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TExtrTop.cpp; sourceTree = "<group>"; };
     466                7848705F1B0B62C70098FD5A /* TExtrTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TExtrTop.h; sourceTree = "<group>"; };
     467                784870611B0B62C70098FD5A /* TRenFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenFilter.cpp; sourceTree = "<group>"; };
     468                784870621B0B62C70098FD5A /* TRenFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenFilter.h; sourceTree = "<group>"; };
     469                784870631B0B62C70098FD5A /* TRenImage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenImage.cpp; sourceTree = "<group>"; };
     470                784870641B0B62C70098FD5A /* TRenImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenImage.h; sourceTree = "<group>"; };
     471                784870651B0B62C70098FD5A /* TRenImagePlane.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenImagePlane.cpp; sourceTree = "<group>"; };
     472                784870661B0B62C70098FD5A /* TRenImagePlane.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenImagePlane.h; sourceTree = "<group>"; };
     473                784870671B0B62C70098FD5A /* TRenInterpFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenInterpFilter.cpp; sourceTree = "<group>"; };
     474                784870681B0B62C70098FD5A /* TRenInterpFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenInterpFilter.h; sourceTree = "<group>"; };
     475                784870691B0B62C70098FD5A /* TRenModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenModel.cpp; sourceTree = "<group>"; };
     476                7848706A1B0B62C70098FD5A /* TRenModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenModel.h; sourceTree = "<group>"; };
     477                7848706B1B0B62C70098FD5A /* TRenModSetupStrParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenModSetupStrParser.cpp; sourceTree = "<group>"; };
     478                7848706C1B0B62C70098FD5A /* TRenModSetupStrParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenModSetupStrParser.h; sourceTree = "<group>"; };
     479                7848706D1B0B62C70098FD5A /* TRenSingleModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenSingleModel.cpp; sourceTree = "<group>"; };
     480                7848706E1B0B62C70098FD5A /* TRenSingleModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenSingleModel.h; sourceTree = "<group>"; };
     481                7848706F1B0B62C70098FD5A /* TRenTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenTop.cpp; sourceTree = "<group>"; };
     482                784870701B0B62C70098FD5A /* TRenTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenTop.h; sourceTree = "<group>"; };
     483                784870721B0B62C70098FD5A /* TVideoIOYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TVideoIOYuv.cpp; sourceTree = "<group>"; };
     484                784870731B0B62C70098FD5A /* TVideoIOYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TVideoIOYuv.h; sourceTree = "<group>"; };
    479485                7885897D15664E3D00982C12 /* libTLibExtractor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTLibExtractor.a; sourceTree = BUILT_PRODUCTS_DIR; };
    480486                7885899415664E6A00982C12 /* TAppExtractor */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TAppExtractor; sourceTree = BUILT_PRODUCTS_DIR; };
     
    595601                        isa = PBXGroup;
    596602                        children = (
    597                                 78C592E7158720BB004401C5 /* App */,
    598                                 78C59310158720BB004401C5 /* Lib */,
     603                                78486FA51B0B62C70098FD5A /* App */,
     604                                78486FCE1B0B62C70098FD5A /* Lib */,
    599605                        );
    600606                        indentWidth = 2;
     
    621627                        sourceTree = "<group>";
    622628                };
    623                 785E596B17D9AFA8001F6DD1 /* TLibStatistics */ = {
     629                78486FA51B0B62C70098FD5A /* App */ = {
    624630                        isa = PBXGroup;
    625631                        children = (
    626                                 785E596C17D9AFA8001F6DD1 /* TStatHeader.cpp */,
    627                                 785E596D17D9AFA8001F6DD1 /* TStatHeader.h */,
    628                                 785E596E17D9AFA8001F6DD1 /* TStatLayer.cpp */,
    629                                 785E596F17D9AFA8001F6DD1 /* TStatLayer.h */,
    630                                 785E597017D9AFA8001F6DD1 /* TStatTop.cpp */,
    631                                 785E597117D9AFA8001F6DD1 /* TStatTop.h */,
    632                         );
    633                         path = TLibStatistics;
    634                         sourceTree = "<group>";
    635                 };
    636                 787462BA17D5DD7B0040CFC7 /* TAppDecoder */ = {
    637                         isa = PBXGroup;
    638                         children = (
    639                                 787462BB17D5DD7B0040CFC7 /* decmain.cpp */,
    640                                 787462BC17D5DD7B0040CFC7 /* TAppDecCfg.cpp */,
    641                                 787462BD17D5DD7B0040CFC7 /* TAppDecCfg.h */,
    642                                 787462BE17D5DD7B0040CFC7 /* TAppDecTop.cpp */,
    643                                 787462BF17D5DD7B0040CFC7 /* TAppDecTop.h */,
    644                         );
    645                         path = TAppDecoder;
    646                         sourceTree = "<group>";
    647                 };
    648                 787462C017D5DD7B0040CFC7 /* TAppEncoder */ = {
    649                         isa = PBXGroup;
    650                         children = (
    651                                 787462C117D5DD7B0040CFC7 /* encmain.cpp */,
    652                                 787462C217D5DD7B0040CFC7 /* TAppEncCfg.cpp */,
    653                                 787462C317D5DD7B0040CFC7 /* TAppEncCfg.h */,
    654                                 787462C417D5DD7B0040CFC7 /* TAppEncTop.cpp */,
    655                                 787462C517D5DD7B0040CFC7 /* TAppEncTop.h */,
    656                         );
    657                         path = TAppEncoder;
    658                         sourceTree = "<group>";
    659                 };
    660                 787462C617D5DD7B0040CFC7 /* TAppExtractor */ = {
    661                         isa = PBXGroup;
    662                         children = (
    663                                 787462C717D5DD7B0040CFC7 /* extrmain.cpp */,
    664                                 787462C817D5DD7B0040CFC7 /* TAppExtrCfg.cpp */,
    665                                 787462C917D5DD7B0040CFC7 /* TAppExtrCfg.h */,
    666                                 787462CA17D5DD7B0040CFC7 /* TAppExtrTop.cpp */,
    667                                 787462CB17D5DD7B0040CFC7 /* TAppExtrTop.h */,
    668                         );
    669                         path = TAppExtractor;
    670                         sourceTree = "<group>";
    671                 };
    672                 787462CC17D5DD7B0040CFC7 /* TAppRenderer */ = {
    673                         isa = PBXGroup;
    674                         children = (
    675                                 787462CD17D5DD7B0040CFC7 /* RendererMain.cpp */,
    676                                 787462CE17D5DD7B0040CFC7 /* TAppRendererCfg.cpp */,
    677                                 787462CF17D5DD7B0040CFC7 /* TAppRendererCfg.h */,
    678                                 787462D017D5DD7B0040CFC7 /* TAppRendererTop.cpp */,
    679                                 787462D117D5DD7B0040CFC7 /* TAppRendererTop.h */,
    680                         );
    681                         path = TAppRenderer;
    682                         sourceTree = "<group>";
    683                 };
    684                 787462D217D5DD7B0040CFC7 /* utils */ = {
    685                         isa = PBXGroup;
    686                         children = (
    687                                 787462D317D5DD7B0040CFC7 /* annexBbytecount.cpp */,
    688                                 787462D417D5DD7B0040CFC7 /* BitrateTargeting */,
    689                                 787462E117D5DD7B0040CFC7 /* convert_NtoMbit_YCbCr.cpp */,
    690                         );
    691                         path = utils;
    692                         sourceTree = "<group>";
    693                 };
    694                 787462D417D5DD7B0040CFC7 /* BitrateTargeting */ = {
    695                         isa = PBXGroup;
    696                         children = (
    697                                 787462D517D5DD7B0040CFC7 /* encode.shl */,
    698                                 787462D617D5DD7B0040CFC7 /* encodeCommand.sh */,
    699                                 787462D717D5DD7B0040CFC7 /* ExtractBitrates.cpp */,
    700                                 787462D817D5DD7B0040CFC7 /* ExtractBitrates.h */,
    701                                 787462D917D5DD7B0040CFC7 /* ExtractBitratesMain.cpp */,
    702                                 787462DA17D5DD7B0040CFC7 /* GuessLambdaModifiers.cpp */,
    703                                 787462DB17D5DD7B0040CFC7 /* GuessLambdaModifiers.h */,
    704                                 787462DC17D5DD7B0040CFC7 /* GuessLambdaModifiersMain.cpp */,
    705                                 787462DD17D5DD7B0040CFC7 /* makefile */,
    706                                 787462DE17D5DD7B0040CFC7 /* QuickStartGuide.pdf */,
    707                                 787462DF17D5DD7B0040CFC7 /* RuntimeError.h */,
    708                                 787462E017D5DD7B0040CFC7 /* targetBitrates.sh */,
    709                         );
    710                         path = BitrateTargeting;
    711                         sourceTree = "<group>";
    712                 };
    713                 787462E217D5DD840040CFC7 /* libmd5 */ = {
    714                         isa = PBXGroup;
    715                         children = (
    716                                 787462E317D5DD840040CFC7 /* libmd5.c */,
    717                                 787462E417D5DD840040CFC7 /* libmd5.h */,
    718                                 787462E517D5DD840040CFC7 /* MD5.h */,
    719                         );
    720                         path = libmd5;
    721                         sourceTree = "<group>";
    722                 };
    723                 787462E617D5DD840040CFC7 /* TAppCommon */ = {
    724                         isa = PBXGroup;
    725                         children = (
    726                                 787462E717D5DD840040CFC7 /* program_options_lite.cpp */,
    727                                 787462E817D5DD840040CFC7 /* program_options_lite.h */,
    728                                 787462E917D5DD840040CFC7 /* TAppComCamPara.cpp */,
    729                                 787462EA17D5DD840040CFC7 /* TAppComCamPara.h */,
    730                         );
    731                         path = TAppCommon;
    732                         sourceTree = "<group>";
    733                 };
    734                 787462EB17D5DD840040CFC7 /* TLibCommon */ = {
    735                         isa = PBXGroup;
    736                         children = (
    737                                 787462EC17D5DD840040CFC7 /* AccessUnit.h */,
    738                                 787462ED17D5DD840040CFC7 /* CommonDef.h */,
    739                                 787462EE17D5DD840040CFC7 /* ContextModel.cpp */,
    740                                 787462EF17D5DD840040CFC7 /* ContextModel.h */,
    741                                 787462F017D5DD840040CFC7 /* ContextModel3DBuffer.cpp */,
    742                                 787462F117D5DD840040CFC7 /* ContextModel3DBuffer.h */,
    743                                 787462F217D5DD840040CFC7 /* ContextTables.h */,
    744                                 787462F317D5DD840040CFC7 /* NAL.h */,
    745                                 787462F417D5DD840040CFC7 /* SEI.cpp */,
    746                                 787462F517D5DD840040CFC7 /* SEI.h */,
    747                                 787462F617D5DD840040CFC7 /* TComBitCounter.h */,
    748                                 787462F717D5DD840040CFC7 /* TComBitStream.cpp */,
    749                                 787462F817D5DD840040CFC7 /* TComBitStream.h */,
    750                                 787462F917D5DD840040CFC7 /* TComCABACTables.cpp */,
    751                                 787462FA17D5DD840040CFC7 /* TComCABACTables.h */,
    752                                 787462FB17D5DD840040CFC7 /* TComDataCU.cpp */,
    753                                 787462FC17D5DD840040CFC7 /* TComDataCU.h */,
    754                                 787462FD17D5DD840040CFC7 /* TComInterpolationFilter.cpp */,
    755                                 787462FE17D5DD840040CFC7 /* TComInterpolationFilter.h */,
    756                                 787462FF17D5DD840040CFC7 /* TComList.h */,
    757                                 7874630017D5DD840040CFC7 /* TComLoopFilter.cpp */,
    758                                 7874630117D5DD840040CFC7 /* TComLoopFilter.h */,
    759                                 7874630217D5DD840040CFC7 /* TComMotionInfo.cpp */,
    760                                 7874630317D5DD840040CFC7 /* TComMotionInfo.h */,
    761                                 7874630417D5DD840040CFC7 /* TComMv.h */,
    762                                 7874630517D5DD840040CFC7 /* TComPattern.cpp */,
    763                                 7874630617D5DD840040CFC7 /* TComPattern.h */,
    764                                 7874630717D5DD840040CFC7 /* TComPic.cpp */,
    765                                 7874630817D5DD840040CFC7 /* TComPic.h */,
    766                                 7874630917D5DD840040CFC7 /* TComPicSym.cpp */,
    767                                 7874630A17D5DD840040CFC7 /* TComPicSym.h */,
    768                                 7874630B17D5DD840040CFC7 /* TComPicYuv.cpp */,
    769                                 7874630C17D5DD840040CFC7 /* TComPicYuv.h */,
    770                                 7874630D17D5DD840040CFC7 /* TComPicYuvMD5.cpp */,
    771                                 7874630E17D5DD840040CFC7 /* TComPrediction.cpp */,
    772                                 7874630F17D5DD840040CFC7 /* TComPrediction.h */,
    773                                 7874631017D5DD840040CFC7 /* TComRdCost.cpp */,
    774                                 7874631117D5DD840040CFC7 /* TComRdCost.h */,
    775                                 7874631217D5DD840040CFC7 /* TComRdCostWeightPrediction.cpp */,
    776                                 7874631317D5DD840040CFC7 /* TComRdCostWeightPrediction.h */,
    777                                 7874631417D5DD840040CFC7 /* TComRom.cpp */,
    778                                 7874631517D5DD840040CFC7 /* TComRom.h */,
    779                                 7874631617D5DD840040CFC7 /* TComSampleAdaptiveOffset.cpp */,
    780                                 7874631717D5DD840040CFC7 /* TComSampleAdaptiveOffset.h */,
    781                                 7874631817D5DD840040CFC7 /* TComSlice.cpp */,
    782                                 7874631917D5DD840040CFC7 /* TComSlice.h */,
    783                                 7874631A17D5DD840040CFC7 /* TComTrQuant.cpp */,
    784                                 7874631B17D5DD840040CFC7 /* TComTrQuant.h */,
    785                                 7874631C17D5DD840040CFC7 /* TComWedgelet.cpp */,
    786                                 7874631D17D5DD840040CFC7 /* TComWedgelet.h */,
    787                                 7874631E17D5DD840040CFC7 /* TComWeightPrediction.cpp */,
    788                                 7874631F17D5DD840040CFC7 /* TComWeightPrediction.h */,
    789                                 7874632017D5DD840040CFC7 /* TComYuv.cpp */,
    790                                 7874632117D5DD840040CFC7 /* TComYuv.h */,
    791                                 7874632217D5DD840040CFC7 /* TypeDef.h */,
    792                         );
    793                         path = TLibCommon;
    794                         sourceTree = "<group>";
    795                 };
    796                 7874632317D5DD840040CFC7 /* TLibDecoder */ = {
    797                         isa = PBXGroup;
    798                         children = (
    799                                 7874632417D5DD840040CFC7 /* AnnexBread.cpp */,
    800                                 7874632517D5DD840040CFC7 /* AnnexBread.h */,
    801                                 7874632617D5DD840040CFC7 /* NALread.cpp */,
    802                                 7874632717D5DD840040CFC7 /* NALread.h */,
    803                                 7874632817D5DD840040CFC7 /* SEIread.cpp */,
    804                                 7874632917D5DD840040CFC7 /* SEIread.h */,
    805                                 7874632A17D5DD840040CFC7 /* SyntaxElementParser.cpp */,
    806                                 7874632B17D5DD840040CFC7 /* SyntaxElementParser.h */,
    807                                 7874632C17D5DD840040CFC7 /* TDecBinCoder.h */,
    808                                 7874632D17D5DD840040CFC7 /* TDecBinCoderCABAC.cpp */,
    809                                 7874632E17D5DD840040CFC7 /* TDecBinCoderCABAC.h */,
    810                                 7874632F17D5DD840040CFC7 /* TDecCAVLC.cpp */,
    811                                 7874633017D5DD840040CFC7 /* TDecCAVLC.h */,
    812                                 7874633117D5DD840040CFC7 /* TDecCu.cpp */,
    813                                 7874633217D5DD840040CFC7 /* TDecCu.h */,
    814                                 7874633317D5DD840040CFC7 /* TDecEntropy.cpp */,
    815                                 7874633417D5DD840040CFC7 /* TDecEntropy.h */,
    816                                 7874633517D5DD840040CFC7 /* TDecGop.cpp */,
    817                                 7874633617D5DD840040CFC7 /* TDecGop.h */,
    818                                 7874633717D5DD840040CFC7 /* TDecSbac.cpp */,
    819                                 7874633817D5DD840040CFC7 /* TDecSbac.h */,
    820                                 7874633917D5DD840040CFC7 /* TDecSlice.cpp */,
    821                                 7874633A17D5DD840040CFC7 /* TDecSlice.h */,
    822                                 7874633B17D5DD840040CFC7 /* TDecTop.cpp */,
    823                                 7874633C17D5DD840040CFC7 /* TDecTop.h */,
    824                         );
    825                         path = TLibDecoder;
    826                         sourceTree = "<group>";
    827                 };
    828                 7874633D17D5DD840040CFC7 /* TLibEncoder */ = {
    829                         isa = PBXGroup;
    830                         children = (
    831                                 7874633E17D5DD840040CFC7 /* AnnexBwrite.h */,
    832                                 7874633F17D5DD840040CFC7 /* NALwrite.cpp */,
    833                                 7874634017D5DD840040CFC7 /* NALwrite.h */,
    834                                 7874634117D5DD840040CFC7 /* SEIwrite.cpp */,
    835                                 7874634217D5DD840040CFC7 /* SEIwrite.h */,
    836                                 7874634317D5DD840040CFC7 /* SyntaxElementWriter.cpp */,
    837                                 7874634417D5DD840040CFC7 /* SyntaxElementWriter.h */,
    838                                 7874634517D5DD840040CFC7 /* TEncAnalyze.cpp */,
    839                                 7874634617D5DD840040CFC7 /* TEncAnalyze.h */,
    840                                 7874634717D5DD840040CFC7 /* TEncBinCoder.h */,
    841                                 7874634817D5DD840040CFC7 /* TEncBinCoderCABAC.cpp */,
    842                                 7874634917D5DD840040CFC7 /* TEncBinCoderCABAC.h */,
    843                                 7874634A17D5DD840040CFC7 /* TEncBinCoderCABACCounter.cpp */,
    844                                 7874634B17D5DD840040CFC7 /* TEncBinCoderCABACCounter.h */,
    845                                 7874634C17D5DD840040CFC7 /* TEncCavlc.cpp */,
    846                                 7874634D17D5DD840040CFC7 /* TEncCavlc.h */,
    847                                 7874634E17D5DD840040CFC7 /* TEncCfg.h */,
    848                                 7874634F17D5DD840040CFC7 /* TEncCu.cpp */,
    849                                 7874635017D5DD840040CFC7 /* TEncCu.h */,
    850                                 7874635117D5DD840040CFC7 /* TEncEntropy.cpp */,
    851                                 7874635217D5DD840040CFC7 /* TEncEntropy.h */,
    852                                 7874635317D5DD840040CFC7 /* TEncGOP.cpp */,
    853                                 7874635417D5DD840040CFC7 /* TEncGOP.h */,
    854                                 7874635517D5DD840040CFC7 /* TEncPic.cpp */,
    855                                 7874635617D5DD840040CFC7 /* TEncPic.h */,
    856                                 7874635717D5DD840040CFC7 /* TEncPreanalyzer.cpp */,
    857                                 7874635817D5DD840040CFC7 /* TEncPreanalyzer.h */,
    858                                 7874635917D5DD840040CFC7 /* TEncRateCtrl.cpp */,
    859                                 7874635A17D5DD840040CFC7 /* TEncRateCtrl.h */,
    860                                 7874635B17D5DD840040CFC7 /* TEncSampleAdaptiveOffset.cpp */,
    861                                 7874635C17D5DD840040CFC7 /* TEncSampleAdaptiveOffset.h */,
    862                                 7874635D17D5DD840040CFC7 /* TEncSbac.cpp */,
    863                                 7874635E17D5DD840040CFC7 /* TEncSbac.h */,
    864                                 7874635F17D5DD840040CFC7 /* TEncSearch.cpp */,
    865                                 7874636017D5DD840040CFC7 /* TEncSearch.h */,
    866                                 7874636117D5DD840040CFC7 /* TEncSlice.cpp */,
    867                                 7874636217D5DD840040CFC7 /* TEncSlice.h */,
    868                                 7874636317D5DD840040CFC7 /* TEncTop.cpp */,
    869                                 7874636417D5DD840040CFC7 /* TEncTop.h */,
    870                                 7874636517D5DD840040CFC7 /* WeightPredAnalysis.cpp */,
    871                                 7874636617D5DD840040CFC7 /* WeightPredAnalysis.h */,
    872                         );
    873                         path = TLibEncoder;
    874                         sourceTree = "<group>";
    875                 };
    876                 7874636717D5DD840040CFC7 /* TLibExtractor */ = {
    877                         isa = PBXGroup;
    878                         children = (
    879                                 7874636817D5DD840040CFC7 /* TExtrTop.cpp */,
    880                                 7874636917D5DD840040CFC7 /* TExtrTop.h */,
    881                         );
    882                         path = TLibExtractor;
    883                         sourceTree = "<group>";
    884                 };
    885                 7874636A17D5DD840040CFC7 /* TLibRenderer */ = {
    886                         isa = PBXGroup;
    887                         children = (
    888                                 7874636B17D5DD840040CFC7 /* TRenFilter.cpp */,
    889                                 7874636C17D5DD840040CFC7 /* TRenFilter.h */,
    890                                 7874636D17D5DD840040CFC7 /* TRenImage.cpp */,
    891                                 7874636E17D5DD840040CFC7 /* TRenImage.h */,
    892                                 7874636F17D5DD840040CFC7 /* TRenImagePlane.cpp */,
    893                                 7874637017D5DD840040CFC7 /* TRenImagePlane.h */,
    894                                 7874637117D5DD840040CFC7 /* TRenInterpFilter.cpp */,
    895                                 7874637217D5DD840040CFC7 /* TRenInterpFilter.h */,
    896                                 7874637317D5DD840040CFC7 /* TRenModel.cpp */,
    897                                 7874637417D5DD840040CFC7 /* TRenModel.h */,
    898                                 7874637517D5DD840040CFC7 /* TRenModSetupStrParser.cpp */,
    899                                 7874637617D5DD840040CFC7 /* TRenModSetupStrParser.h */,
    900                                 7874637717D5DD840040CFC7 /* TRenSingleModel.cpp */,
    901                                 7874637817D5DD840040CFC7 /* TRenSingleModel.h */,
    902                                 7874637917D5DD840040CFC7 /* TRenTop.cpp */,
    903                                 7874637A17D5DD840040CFC7 /* TRenTop.h */,
    904                         );
    905                         path = TLibRenderer;
    906                         sourceTree = "<group>";
    907                 };
    908                 7874637B17D5DD840040CFC7 /* TLibVideoIO */ = {
    909                         isa = PBXGroup;
    910                         children = (
    911                                 7874637C17D5DD840040CFC7 /* TVideoIOYuv.cpp */,
    912                                 7874637D17D5DD840040CFC7 /* TVideoIOYuv.h */,
    913                         );
    914                         path = TLibVideoIO;
    915                         sourceTree = "<group>";
    916                 };
    917                 78C592E7158720BB004401C5 /* App */ = {
    918                         isa = PBXGroup;
    919                         children = (
    920                                 787462BA17D5DD7B0040CFC7 /* TAppDecoder */,
    921                                 787462C017D5DD7B0040CFC7 /* TAppEncoder */,
    922                                 787462C617D5DD7B0040CFC7 /* TAppExtractor */,
    923                                 787462CC17D5DD7B0040CFC7 /* TAppRenderer */,
    924                                 787462D217D5DD7B0040CFC7 /* utils */,
     632                                78486FA61B0B62C70098FD5A /* TAppDecoder */,
     633                                78486FAC1B0B62C70098FD5A /* TAppEncoder */,
     634                                78486FB21B0B62C70098FD5A /* TAppExtractor */,
     635                                78486FB81B0B62C70098FD5A /* TAppRenderer */,
     636                                78486FBE1B0B62C70098FD5A /* utils */,
    925637                        );
    926638                        name = App;
     
    928640                        sourceTree = "<group>";
    929641                };
    930                 78C59310158720BB004401C5 /* Lib */ = {
     642                78486FA61B0B62C70098FD5A /* TAppDecoder */ = {
    931643                        isa = PBXGroup;
    932644                        children = (
    933                                 787462E217D5DD840040CFC7 /* libmd5 */,
    934                                 787462E617D5DD840040CFC7 /* TAppCommon */,
    935                                 787462EB17D5DD840040CFC7 /* TLibCommon */,
    936                                 7874632317D5DD840040CFC7 /* TLibDecoder */,
    937                                 7874633D17D5DD840040CFC7 /* TLibEncoder */,
    938                                 7874636717D5DD840040CFC7 /* TLibExtractor */,
    939                                 7874636A17D5DD840040CFC7 /* TLibRenderer */,
    940                                 7874637B17D5DD840040CFC7 /* TLibVideoIO */,
    941                                 785E596B17D9AFA8001F6DD1 /* TLibStatistics */,
     645                                78486FA71B0B62C70098FD5A /* decmain.cpp */,
     646                                78486FA81B0B62C70098FD5A /* TAppDecCfg.cpp */,
     647                                78486FA91B0B62C70098FD5A /* TAppDecCfg.h */,
     648                                78486FAA1B0B62C70098FD5A /* TAppDecTop.cpp */,
     649                                78486FAB1B0B62C70098FD5A /* TAppDecTop.h */,
     650                        );
     651                        path = TAppDecoder;
     652                        sourceTree = "<group>";
     653                };
     654                78486FAC1B0B62C70098FD5A /* TAppEncoder */ = {
     655                        isa = PBXGroup;
     656                        children = (
     657                                78486FAD1B0B62C70098FD5A /* encmain.cpp */,
     658                                78486FAE1B0B62C70098FD5A /* TAppEncCfg.cpp */,
     659                                78486FAF1B0B62C70098FD5A /* TAppEncCfg.h */,
     660                                78486FB01B0B62C70098FD5A /* TAppEncTop.cpp */,
     661                                78486FB11B0B62C70098FD5A /* TAppEncTop.h */,
     662                        );
     663                        path = TAppEncoder;
     664                        sourceTree = "<group>";
     665                };
     666                78486FB21B0B62C70098FD5A /* TAppExtractor */ = {
     667                        isa = PBXGroup;
     668                        children = (
     669                                78486FB31B0B62C70098FD5A /* extrmain.cpp */,
     670                                78486FB41B0B62C70098FD5A /* TAppExtrCfg.cpp */,
     671                                78486FB51B0B62C70098FD5A /* TAppExtrCfg.h */,
     672                                78486FB61B0B62C70098FD5A /* TAppExtrTop.cpp */,
     673                                78486FB71B0B62C70098FD5A /* TAppExtrTop.h */,
     674                        );
     675                        path = TAppExtractor;
     676                        sourceTree = "<group>";
     677                };
     678                78486FB81B0B62C70098FD5A /* TAppRenderer */ = {
     679                        isa = PBXGroup;
     680                        children = (
     681                                78486FB91B0B62C70098FD5A /* RendererMain.cpp */,
     682                                78486FBA1B0B62C70098FD5A /* TAppRendererCfg.cpp */,
     683                                78486FBB1B0B62C70098FD5A /* TAppRendererCfg.h */,
     684                                78486FBC1B0B62C70098FD5A /* TAppRendererTop.cpp */,
     685                                78486FBD1B0B62C70098FD5A /* TAppRendererTop.h */,
     686                        );
     687                        path = TAppRenderer;
     688                        sourceTree = "<group>";
     689                };
     690                78486FBE1B0B62C70098FD5A /* utils */ = {
     691                        isa = PBXGroup;
     692                        children = (
     693                                78486FBF1B0B62C70098FD5A /* annexBbytecount.cpp */,
     694                                78486FC01B0B62C70098FD5A /* BitrateTargeting */,
     695                                78486FCD1B0B62C70098FD5A /* convert_NtoMbit_YCbCr.cpp */,
     696                        );
     697                        path = utils;
     698                        sourceTree = "<group>";
     699                };
     700                78486FC01B0B62C70098FD5A /* BitrateTargeting */ = {
     701                        isa = PBXGroup;
     702                        children = (
     703                                78486FC11B0B62C70098FD5A /* encode.shl */,
     704                                78486FC21B0B62C70098FD5A /* encodeCommand.sh */,
     705                                78486FC31B0B62C70098FD5A /* ExtractBitrates.cpp */,
     706                                78486FC41B0B62C70098FD5A /* ExtractBitrates.h */,
     707                                78486FC51B0B62C70098FD5A /* ExtractBitratesMain.cpp */,
     708                                78486FC61B0B62C70098FD5A /* GuessLambdaModifiers.cpp */,
     709                                78486FC71B0B62C70098FD5A /* GuessLambdaModifiers.h */,
     710                                78486FC81B0B62C70098FD5A /* GuessLambdaModifiersMain.cpp */,
     711                                78486FC91B0B62C70098FD5A /* makefile */,
     712                                78486FCA1B0B62C70098FD5A /* QuickStartGuide.pdf */,
     713                                78486FCB1B0B62C70098FD5A /* RuntimeError.h */,
     714                                78486FCC1B0B62C70098FD5A /* targetBitrates.sh */,
     715                        );
     716                        path = BitrateTargeting;
     717                        sourceTree = "<group>";
     718                };
     719                78486FCE1B0B62C70098FD5A /* Lib */ = {
     720                        isa = PBXGroup;
     721                        children = (
     722                                78486FCF1B0B62C70098FD5A /* libmd5 */,
     723                                78486FD31B0B62C70098FD5A /* TAppCommon */,
     724                                78486FD81B0B62C70098FD5A /* TLibCommon */,
     725                                784870181B0B62C70098FD5A /* TLibDecoder */,
     726                                784870321B0B62C70098FD5A /* TLibEncoder */,
     727                                7848705D1B0B62C70098FD5A /* TLibExtractor */,
     728                                784870601B0B62C70098FD5A /* TLibRenderer */,
     729                                784870711B0B62C70098FD5A /* TLibVideoIO */,
    942730                        );
    943731                        name = Lib;
    944732                        path = source/Lib;
     733                        sourceTree = "<group>";
     734                };
     735                78486FCF1B0B62C70098FD5A /* libmd5 */ = {
     736                        isa = PBXGroup;
     737                        children = (
     738                                78486FD01B0B62C70098FD5A /* libmd5.c */,
     739                                78486FD11B0B62C70098FD5A /* libmd5.h */,
     740                                78486FD21B0B62C70098FD5A /* MD5.h */,
     741                        );
     742                        path = libmd5;
     743                        sourceTree = "<group>";
     744                };
     745                78486FD31B0B62C70098FD5A /* TAppCommon */ = {
     746                        isa = PBXGroup;
     747                        children = (
     748                                78486FD41B0B62C70098FD5A /* program_options_lite.cpp */,
     749                                78486FD51B0B62C70098FD5A /* program_options_lite.h */,
     750                                78486FD61B0B62C70098FD5A /* TAppComCamPara.cpp */,
     751                                78486FD71B0B62C70098FD5A /* TAppComCamPara.h */,
     752                        );
     753                        path = TAppCommon;
     754                        sourceTree = "<group>";
     755                };
     756                78486FD81B0B62C70098FD5A /* TLibCommon */ = {
     757                        isa = PBXGroup;
     758                        children = (
     759                                78486FD91B0B62C70098FD5A /* AccessUnit.h */,
     760                                78486FDA1B0B62C70098FD5A /* CommonDef.h */,
     761                                78486FDB1B0B62C70098FD5A /* ContextModel.cpp */,
     762                                78486FDC1B0B62C70098FD5A /* ContextModel.h */,
     763                                78486FDD1B0B62C70098FD5A /* ContextModel3DBuffer.cpp */,
     764                                78486FDE1B0B62C70098FD5A /* ContextModel3DBuffer.h */,
     765                                78486FDF1B0B62C70098FD5A /* ContextTables.h */,
     766                                78486FE01B0B62C70098FD5A /* Debug.cpp */,
     767                                78486FE11B0B62C70098FD5A /* Debug.h */,
     768                                78486FE21B0B62C70098FD5A /* NAL.h */,
     769                                78486FE31B0B62C70098FD5A /* SEI.cpp */,
     770                                78486FE41B0B62C70098FD5A /* SEI.h */,
     771                                78486FE51B0B62C70098FD5A /* TComBitCounter.h */,
     772                                78486FE61B0B62C70098FD5A /* TComBitStream.cpp */,
     773                                78486FE71B0B62C70098FD5A /* TComBitStream.h */,
     774                                78486FE81B0B62C70098FD5A /* TComCABACTables.cpp */,
     775                                78486FE91B0B62C70098FD5A /* TComCABACTables.h */,
     776                                78486FEA1B0B62C70098FD5A /* TComChromaFormat.cpp */,
     777                                78486FEB1B0B62C70098FD5A /* TComChromaFormat.h */,
     778                                78486FEC1B0B62C70098FD5A /* TComCodingStatistics.h */,
     779                                78486FED1B0B62C70098FD5A /* TComDataCU.cpp */,
     780                                78486FEE1B0B62C70098FD5A /* TComDataCU.h */,
     781                                78486FEF1B0B62C70098FD5A /* TComInterpolationFilter.cpp */,
     782                                78486FF01B0B62C70098FD5A /* TComInterpolationFilter.h */,
     783                                78486FF11B0B62C70098FD5A /* TComList.h */,
     784                                78486FF21B0B62C70098FD5A /* TComLoopFilter.cpp */,
     785                                78486FF31B0B62C70098FD5A /* TComLoopFilter.h */,
     786                                78486FF41B0B62C70098FD5A /* TComMotionInfo.cpp */,
     787                                78486FF51B0B62C70098FD5A /* TComMotionInfo.h */,
     788                                78486FF61B0B62C70098FD5A /* TComMv.h */,
     789                                78486FF71B0B62C70098FD5A /* TComPattern.cpp */,
     790                                78486FF81B0B62C70098FD5A /* TComPattern.h */,
     791                                78486FF91B0B62C70098FD5A /* TComPic.cpp */,
     792                                78486FFA1B0B62C70098FD5A /* TComPic.h */,
     793                                78486FFB1B0B62C70098FD5A /* TComPicSym.cpp */,
     794                                78486FFC1B0B62C70098FD5A /* TComPicSym.h */,
     795                                78486FFD1B0B62C70098FD5A /* TComPicYuv.cpp */,
     796                                78486FFE1B0B62C70098FD5A /* TComPicYuv.h */,
     797                                78486FFF1B0B62C70098FD5A /* TComPicYuvMD5.cpp */,
     798                                784870001B0B62C70098FD5A /* TComPrediction.cpp */,
     799                                784870011B0B62C70098FD5A /* TComPrediction.h */,
     800                                784870021B0B62C70098FD5A /* TComRdCost.cpp */,
     801                                784870031B0B62C70098FD5A /* TComRdCost.h */,
     802                                784870041B0B62C70098FD5A /* TComRdCostWeightPrediction.cpp */,
     803                                784870051B0B62C70098FD5A /* TComRdCostWeightPrediction.h */,
     804                                784870061B0B62C70098FD5A /* TComRectangle.h */,
     805                                784870071B0B62C70098FD5A /* TComRom.cpp */,
     806                                784870081B0B62C70098FD5A /* TComRom.h */,
     807                                784870091B0B62C70098FD5A /* TComSampleAdaptiveOffset.cpp */,
     808                                7848700A1B0B62C70098FD5A /* TComSampleAdaptiveOffset.h */,
     809                                7848700B1B0B62C70098FD5A /* TComSlice.cpp */,
     810                                7848700C1B0B62C70098FD5A /* TComSlice.h */,
     811                                7848700D1B0B62C70098FD5A /* TComTrQuant.cpp */,
     812                                7848700E1B0B62C70098FD5A /* TComTrQuant.h */,
     813                                7848700F1B0B62C70098FD5A /* TComTU.cpp */,
     814                                784870101B0B62C70098FD5A /* TComTU.h */,
     815                                784870111B0B62C70098FD5A /* TComWedgelet.cpp */,
     816                                784870121B0B62C70098FD5A /* TComWedgelet.h */,
     817                                784870131B0B62C70098FD5A /* TComWeightPrediction.cpp */,
     818                                784870141B0B62C70098FD5A /* TComWeightPrediction.h */,
     819                                784870151B0B62C70098FD5A /* TComYuv.cpp */,
     820                                784870161B0B62C70098FD5A /* TComYuv.h */,
     821                                784870171B0B62C70098FD5A /* TypeDef.h */,
     822                        );
     823                        path = TLibCommon;
     824                        sourceTree = "<group>";
     825                };
     826                784870181B0B62C70098FD5A /* TLibDecoder */ = {
     827                        isa = PBXGroup;
     828                        children = (
     829                                784870191B0B62C70098FD5A /* AnnexBread.cpp */,
     830                                7848701A1B0B62C70098FD5A /* AnnexBread.h */,
     831                                7848701B1B0B62C70098FD5A /* NALread.cpp */,
     832                                7848701C1B0B62C70098FD5A /* NALread.h */,
     833                                7848701D1B0B62C70098FD5A /* SEIread.cpp */,
     834                                7848701E1B0B62C70098FD5A /* SEIread.h */,
     835                                7848701F1B0B62C70098FD5A /* SyntaxElementParser.cpp */,
     836                                784870201B0B62C70098FD5A /* SyntaxElementParser.h */,
     837                                784870211B0B62C70098FD5A /* TDecBinCoder.h */,
     838                                784870221B0B62C70098FD5A /* TDecBinCoderCABAC.cpp */,
     839                                784870231B0B62C70098FD5A /* TDecBinCoderCABAC.h */,
     840                                784870241B0B62C70098FD5A /* TDecCAVLC.cpp */,
     841                                784870251B0B62C70098FD5A /* TDecCAVLC.h */,
     842                                784870261B0B62C70098FD5A /* TDecCu.cpp */,
     843                                784870271B0B62C70098FD5A /* TDecCu.h */,
     844                                784870281B0B62C70098FD5A /* TDecEntropy.cpp */,
     845                                784870291B0B62C70098FD5A /* TDecEntropy.h */,
     846                                7848702A1B0B62C70098FD5A /* TDecGop.cpp */,
     847                                7848702B1B0B62C70098FD5A /* TDecGop.h */,
     848                                7848702C1B0B62C70098FD5A /* TDecSbac.cpp */,
     849                                7848702D1B0B62C70098FD5A /* TDecSbac.h */,
     850                                7848702E1B0B62C70098FD5A /* TDecSlice.cpp */,
     851                                7848702F1B0B62C70098FD5A /* TDecSlice.h */,
     852                                784870301B0B62C70098FD5A /* TDecTop.cpp */,
     853                                784870311B0B62C70098FD5A /* TDecTop.h */,
     854                        );
     855                        path = TLibDecoder;
     856                        sourceTree = "<group>";
     857                };
     858                784870321B0B62C70098FD5A /* TLibEncoder */ = {
     859                        isa = PBXGroup;
     860                        children = (
     861                                784870331B0B62C70098FD5A /* AnnexBwrite.h */,
     862                                784870341B0B62C70098FD5A /* NALwrite.cpp */,
     863                                784870351B0B62C70098FD5A /* NALwrite.h */,
     864                                784870361B0B62C70098FD5A /* SEIEncoder.cpp */,
     865                                784870371B0B62C70098FD5A /* SEIEncoder.h */,
     866                                784870381B0B62C70098FD5A /* SEIwrite.cpp */,
     867                                784870391B0B62C70098FD5A /* SEIwrite.h */,
     868                                7848703A1B0B62C70098FD5A /* SyntaxElementWriter.cpp */,
     869                                7848703B1B0B62C70098FD5A /* SyntaxElementWriter.h */,
     870                                7848703C1B0B62C70098FD5A /* TEncAnalyze.h */,
     871                                7848703D1B0B62C70098FD5A /* TEncBinCoder.h */,
     872                                7848703E1B0B62C70098FD5A /* TEncBinCoderCABAC.cpp */,
     873                                7848703F1B0B62C70098FD5A /* TEncBinCoderCABAC.h */,
     874                                784870401B0B62C70098FD5A /* TEncBinCoderCABACCounter.cpp */,
     875                                784870411B0B62C70098FD5A /* TEncBinCoderCABACCounter.h */,
     876                                784870421B0B62C70098FD5A /* TEncCavlc.cpp */,
     877                                784870431B0B62C70098FD5A /* TEncCavlc.h */,
     878                                784870441B0B62C70098FD5A /* TEncCfg.h */,
     879                                784870451B0B62C70098FD5A /* TEncCu.cpp */,
     880                                784870461B0B62C70098FD5A /* TEncCu.h */,
     881                                784870471B0B62C70098FD5A /* TEncEntropy.cpp */,
     882                                784870481B0B62C70098FD5A /* TEncEntropy.h */,
     883                                784870491B0B62C70098FD5A /* TEncGOP.cpp */,
     884                                7848704A1B0B62C70098FD5A /* TEncGOP.h */,
     885                                7848704B1B0B62C70098FD5A /* TEncPic.cpp */,
     886                                7848704C1B0B62C70098FD5A /* TEncPic.h */,
     887                                7848704D1B0B62C70098FD5A /* TEncPreanalyzer.cpp */,
     888                                7848704E1B0B62C70098FD5A /* TEncPreanalyzer.h */,
     889                                7848704F1B0B62C70098FD5A /* TEncRateCtrl.cpp */,
     890                                784870501B0B62C70098FD5A /* TEncRateCtrl.h */,
     891                                784870511B0B62C70098FD5A /* TEncSampleAdaptiveOffset.cpp */,
     892                                784870521B0B62C70098FD5A /* TEncSampleAdaptiveOffset.h */,
     893                                784870531B0B62C70098FD5A /* TEncSbac.cpp */,
     894                                784870541B0B62C70098FD5A /* TEncSbac.h */,
     895                                784870551B0B62C70098FD5A /* TEncSearch.cpp */,
     896                                784870561B0B62C70098FD5A /* TEncSearch.h */,
     897                                784870571B0B62C70098FD5A /* TEncSlice.cpp */,
     898                                784870581B0B62C70098FD5A /* TEncSlice.h */,
     899                                784870591B0B62C70098FD5A /* TEncTop.cpp */,
     900                                7848705A1B0B62C70098FD5A /* TEncTop.h */,
     901                                7848705B1B0B62C70098FD5A /* WeightPredAnalysis.cpp */,
     902                                7848705C1B0B62C70098FD5A /* WeightPredAnalysis.h */,
     903                        );
     904                        path = TLibEncoder;
     905                        sourceTree = "<group>";
     906                };
     907                7848705D1B0B62C70098FD5A /* TLibExtractor */ = {
     908                        isa = PBXGroup;
     909                        children = (
     910                                7848705E1B0B62C70098FD5A /* TExtrTop.cpp */,
     911                                7848705F1B0B62C70098FD5A /* TExtrTop.h */,
     912                        );
     913                        path = TLibExtractor;
     914                        sourceTree = "<group>";
     915                };
     916                784870601B0B62C70098FD5A /* TLibRenderer */ = {
     917                        isa = PBXGroup;
     918                        children = (
     919                                784870611B0B62C70098FD5A /* TRenFilter.cpp */,
     920                                784870621B0B62C70098FD5A /* TRenFilter.h */,
     921                                784870631B0B62C70098FD5A /* TRenImage.cpp */,
     922                                784870641B0B62C70098FD5A /* TRenImage.h */,
     923                                784870651B0B62C70098FD5A /* TRenImagePlane.cpp */,
     924                                784870661B0B62C70098FD5A /* TRenImagePlane.h */,
     925                                784870671B0B62C70098FD5A /* TRenInterpFilter.cpp */,
     926                                784870681B0B62C70098FD5A /* TRenInterpFilter.h */,
     927                                784870691B0B62C70098FD5A /* TRenModel.cpp */,
     928                                7848706A1B0B62C70098FD5A /* TRenModel.h */,
     929                                7848706B1B0B62C70098FD5A /* TRenModSetupStrParser.cpp */,
     930                                7848706C1B0B62C70098FD5A /* TRenModSetupStrParser.h */,
     931                                7848706D1B0B62C70098FD5A /* TRenSingleModel.cpp */,
     932                                7848706E1B0B62C70098FD5A /* TRenSingleModel.h */,
     933                                7848706F1B0B62C70098FD5A /* TRenTop.cpp */,
     934                                784870701B0B62C70098FD5A /* TRenTop.h */,
     935                        );
     936                        path = TLibRenderer;
     937                        sourceTree = "<group>";
     938                };
     939                784870711B0B62C70098FD5A /* TLibVideoIO */ = {
     940                        isa = PBXGroup;
     941                        children = (
     942                                784870721B0B62C70098FD5A /* TVideoIOYuv.cpp */,
     943                                784870731B0B62C70098FD5A /* TVideoIOYuv.h */,
     944                        );
     945                        path = TLibVideoIO;
    945946                        sourceTree = "<group>";
    946947                };
     
    12081209                        attributes = {
    12091210                                BuildIndependentTargetsInParallel = YES;
    1210                                 LastUpgradeCheck = 0500;
     1211                                LastUpgradeCheck = 0620;
    12111212                        };
    12121213                        buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "HTM" */;
     
    12451246                        buildActionMask = 2147483647;
    12461247                        files = (
    1247                                 7874639417D5DE070040CFC7 /* TComPrediction.cpp in Sources */,
    1248                                 7874639517D5DE070040CFC7 /* TComRdCost.cpp in Sources */,
    1249                                 7874639617D5DE070040CFC7 /* TComRdCostWeightPrediction.cpp in Sources */,
    1250                                 7874639717D5DE070040CFC7 /* TComRom.cpp in Sources */,
    1251                                 7874639817D5DE070040CFC7 /* TComSampleAdaptiveOffset.cpp in Sources */,
    1252                                 7874639917D5DE070040CFC7 /* TComSlice.cpp in Sources */,
    1253                                 7874639A17D5DE070040CFC7 /* TComTrQuant.cpp in Sources */,
    1254                                 7874639B17D5DE070040CFC7 /* TComWedgelet.cpp in Sources */,
    1255                                 7874639C17D5DE070040CFC7 /* TComWeightPrediction.cpp in Sources */,
    1256                                 7874639D17D5DE070040CFC7 /* TComYuv.cpp in Sources */,
    1257                                 7874639E17D5DE230040CFC7 /* TComMotionInfo.cpp in Sources */,
    1258                                 7874639F17D5DE230040CFC7 /* TComPattern.cpp in Sources */,
    1259                                 787463A017D5DE230040CFC7 /* TComPic.cpp in Sources */,
    1260                                 787463A117D5DE230040CFC7 /* TComPicSym.cpp in Sources */,
    1261                                 787463A217D5DE230040CFC7 /* TComPicYuv.cpp in Sources */,
    1262                                 787463A317D5DE230040CFC7 /* TComPicYuvMD5.cpp in Sources */,
    1263                                 787463A417D5DE400040CFC7 /* TComCABACTables.cpp in Sources */,
    1264                                 787463A517D5DE400040CFC7 /* TComDataCU.cpp in Sources */,
    1265                                 787463A617D5DE400040CFC7 /* TComInterpolationFilter.cpp in Sources */,
    1266                                 787463A717D5DE400040CFC7 /* TComLoopFilter.cpp in Sources */,
    1267                                 787463A817D5DE4B0040CFC7 /* TComBitStream.cpp in Sources */,
    1268                                 787463A917D5DE640040CFC7 /* ContextModel.cpp in Sources */,
    1269                                 787463AA17D5DE640040CFC7 /* ContextModel3DBuffer.cpp in Sources */,
    1270                                 787463AB17D5DE640040CFC7 /* SEI.cpp in Sources */,
    1271                                 787463B717D5DED40040CFC7 /* libmd5.c in Sources */,
     1248                                784870871B0B63230098FD5A /* TComCABACTables.cpp in Sources */,
     1249                                7848709C1B0B63230098FD5A /* TComYuv.cpp in Sources */,
     1250                                7848709A1B0B63230098FD5A /* TComWedgelet.cpp in Sources */,
     1251                                784870931B0B63230098FD5A /* TComRdCost.cpp in Sources */,
     1252                                784870881B0B63230098FD5A /* TComChromaFormat.cpp in Sources */,
     1253                                7848708A1B0B63230098FD5A /* TComInterpolationFilter.cpp in Sources */,
     1254                                784870C61B0B63740098FD5A /* libmd5.c in Sources */,
     1255                                7848709B1B0B63230098FD5A /* TComWeightPrediction.cpp in Sources */,
     1256                                784870941B0B63230098FD5A /* TComRdCostWeightPrediction.cpp in Sources */,
     1257                                784870831B0B63230098FD5A /* ContextModel3DBuffer.cpp in Sources */,
     1258                                7848708E1B0B63230098FD5A /* TComPic.cpp in Sources */,
     1259                                784870961B0B63230098FD5A /* TComSampleAdaptiveOffset.cpp in Sources */,
     1260                                784870851B0B63230098FD5A /* SEI.cpp in Sources */,
     1261                                784870971B0B63230098FD5A /* TComSlice.cpp in Sources */,
     1262                                784870981B0B63230098FD5A /* TComTrQuant.cpp in Sources */,
     1263                                7848708D1B0B63230098FD5A /* TComPattern.cpp in Sources */,
     1264                                784870891B0B63230098FD5A /* TComDataCU.cpp in Sources */,
     1265                                7848708B1B0B63230098FD5A /* TComLoopFilter.cpp in Sources */,
     1266                                7848708F1B0B63230098FD5A /* TComPicSym.cpp in Sources */,
     1267                                784870991B0B63230098FD5A /* TComTU.cpp in Sources */,
     1268                                784870861B0B63230098FD5A /* TComBitStream.cpp in Sources */,
     1269                                784870951B0B63230098FD5A /* TComRom.cpp in Sources */,
     1270                                784870911B0B63230098FD5A /* TComPicYuvMD5.cpp in Sources */,
     1271                                784870821B0B63230098FD5A /* ContextModel.cpp in Sources */,
     1272                                784870841B0B63230098FD5A /* Debug.cpp in Sources */,
     1273                                7848708C1B0B63230098FD5A /* TComMotionInfo.cpp in Sources */,
     1274                                784870921B0B63230098FD5A /* TComPrediction.cpp in Sources */,
     1275                                784870901B0B63230098FD5A /* TComPicYuv.cpp in Sources */,
    12721276                        );
    12731277                        runOnlyForDeploymentPostprocessing = 0;
     
    12771281                        buildActionMask = 2147483647;
    12781282                        files = (
    1279                                 787463B817D5DEE80040CFC7 /* AnnexBread.cpp in Sources */,
    1280                                 787463B917D5DEE80040CFC7 /* NALread.cpp in Sources */,
    1281                                 787463BA17D5DEE80040CFC7 /* SEIread.cpp in Sources */,
    1282                                 787463BB17D5DEE80040CFC7 /* SyntaxElementParser.cpp in Sources */,
    1283                                 787463BC17D5DEE80040CFC7 /* TDecBinCoderCABAC.cpp in Sources */,
    1284                                 787463BD17D5DEE80040CFC7 /* TDecCAVLC.cpp in Sources */,
    1285                                 787463BE17D5DEE80040CFC7 /* TDecCu.cpp in Sources */,
    1286                                 787463BF17D5DEE80040CFC7 /* TDecEntropy.cpp in Sources */,
    1287                                 787463C017D5DEE80040CFC7 /* TDecGop.cpp in Sources */,
    1288                                 787463C117D5DEE80040CFC7 /* TDecSbac.cpp in Sources */,
    1289                                 787463C217D5DEE80040CFC7 /* TDecSlice.cpp in Sources */,
    1290                                 787463C317D5DEE80040CFC7 /* TDecTop.cpp in Sources */,
     1283                                784870A61B0B63360098FD5A /* TDecSbac.cpp in Sources */,
     1284                                784870A51B0B63360098FD5A /* TDecGop.cpp in Sources */,
     1285                                7848709F1B0B63360098FD5A /* SEIread.cpp in Sources */,
     1286                                784870A81B0B63360098FD5A /* TDecTop.cpp in Sources */,
     1287                                784870A41B0B63360098FD5A /* TDecEntropy.cpp in Sources */,
     1288                                7848709D1B0B63360098FD5A /* AnnexBread.cpp in Sources */,
     1289                                784870A31B0B63360098FD5A /* TDecCu.cpp in Sources */,
     1290                                784870A01B0B63360098FD5A /* SyntaxElementParser.cpp in Sources */,
     1291                                784870A71B0B63360098FD5A /* TDecSlice.cpp in Sources */,
     1292                                784870A11B0B63360098FD5A /* TDecBinCoderCABAC.cpp in Sources */,
     1293                                7848709E1B0B63360098FD5A /* NALread.cpp in Sources */,
     1294                                784870A21B0B63360098FD5A /* TDecCAVLC.cpp in Sources */,
    12911295                        );
    12921296                        runOnlyForDeploymentPostprocessing = 0;
     
    12961300                        buildActionMask = 2147483647;
    12971301                        files = (
    1298                                 7874638117D5DDA60040CFC7 /* NALwrite.cpp in Sources */,
    1299                                 7874638217D5DDA60040CFC7 /* SEIwrite.cpp in Sources */,
    1300                                 7874638317D5DDA60040CFC7 /* SyntaxElementWriter.cpp in Sources */,
    1301                                 7874638417D5DDA60040CFC7 /* TEncAnalyze.cpp in Sources */,
    1302                                 7874638517D5DDA60040CFC7 /* TEncBinCoderCABAC.cpp in Sources */,
    1303                                 7874638617D5DDA60040CFC7 /* TEncBinCoderCABACCounter.cpp in Sources */,
    1304                                 7874638717D5DDA60040CFC7 /* TEncCavlc.cpp in Sources */,
    1305                                 7874638817D5DDA60040CFC7 /* TEncCu.cpp in Sources */,
    1306                                 7874638917D5DDA60040CFC7 /* TEncEntropy.cpp in Sources */,
    1307                                 7874638A17D5DDA60040CFC7 /* TEncGOP.cpp in Sources */,
    1308                                 7874638B17D5DDA60040CFC7 /* TEncPic.cpp in Sources */,
    1309                                 7874638C17D5DDA60040CFC7 /* TEncPreanalyzer.cpp in Sources */,
    1310                                 7874638D17D5DDA60040CFC7 /* TEncRateCtrl.cpp in Sources */,
    1311                                 7874638E17D5DDA60040CFC7 /* TEncSampleAdaptiveOffset.cpp in Sources */,
    1312                                 7874638F17D5DDA60040CFC7 /* TEncSbac.cpp in Sources */,
    1313                                 7874639017D5DDA60040CFC7 /* TEncSearch.cpp in Sources */,
    1314                                 7874639117D5DDA60040CFC7 /* TEncSlice.cpp in Sources */,
    1315                                 7874639217D5DDA60040CFC7 /* TEncTop.cpp in Sources */,
    1316                                 7874639317D5DDA60040CFC7 /* WeightPredAnalysis.cpp in Sources */,
     1302                                784870AF1B0B634A0098FD5A /* TEncCavlc.cpp in Sources */,
     1303                                784870AD1B0B634A0098FD5A /* TEncBinCoderCABAC.cpp in Sources */,
     1304                                784870B61B0B634A0098FD5A /* TEncSampleAdaptiveOffset.cpp in Sources */,
     1305                                784870B11B0B634A0098FD5A /* TEncEntropy.cpp in Sources */,
     1306                                784870AA1B0B634A0098FD5A /* SEIEncoder.cpp in Sources */,
     1307                                784870B71B0B634A0098FD5A /* TEncSbac.cpp in Sources */,
     1308                                784870A91B0B634A0098FD5A /* NALwrite.cpp in Sources */,
     1309                                784870B51B0B634A0098FD5A /* TEncRateCtrl.cpp in Sources */,
     1310                                784870AE1B0B634A0098FD5A /* TEncBinCoderCABACCounter.cpp in Sources */,
     1311                                784870B31B0B634A0098FD5A /* TEncPic.cpp in Sources */,
     1312                                784870BB1B0B634A0098FD5A /* WeightPredAnalysis.cpp in Sources */,
     1313                                784870B41B0B634A0098FD5A /* TEncPreanalyzer.cpp in Sources */,
     1314                                784870BA1B0B634A0098FD5A /* TEncTop.cpp in Sources */,
     1315                                784870B21B0B634A0098FD5A /* TEncGOP.cpp in Sources */,
     1316                                784870B01B0B634A0098FD5A /* TEncCu.cpp in Sources */,
     1317                                784870AC1B0B634A0098FD5A /* SyntaxElementWriter.cpp in Sources */,
     1318                                784870AB1B0B634A0098FD5A /* SEIwrite.cpp in Sources */,
     1319                                784870B81B0B634A0098FD5A /* TEncSearch.cpp in Sources */,
     1320                                784870B91B0B634A0098FD5A /* TEncSlice.cpp in Sources */,
    13171321                        );
    13181322                        runOnlyForDeploymentPostprocessing = 0;
     
    13221326                        buildActionMask = 2147483647;
    13231327                        files = (
    1324                                 787463AC17D5DE8A0040CFC7 /* TVideoIOYuv.cpp in Sources */,
     1328                                784870C51B0B63610098FD5A /* TVideoIOYuv.cpp in Sources */,
    13251329                        );
    13261330                        runOnlyForDeploymentPostprocessing = 0;
     
    13301334                        buildActionMask = 2147483647;
    13311335                        files = (
    1332                                 7874637E17D5DD900040CFC7 /* encmain.cpp in Sources */,
    1333                                 7874637F17D5DD900040CFC7 /* TAppEncCfg.cpp in Sources */,
    1334                                 7874638017D5DD900040CFC7 /* TAppEncTop.cpp in Sources */,
     1336                                784870781B0B62D80098FD5A /* TAppEncCfg.cpp in Sources */,
     1337                                784870791B0B62D80098FD5A /* TAppEncTop.cpp in Sources */,
     1338                                784870771B0B62D80098FD5A /* encmain.cpp in Sources */,
    13351339                        );
    13361340                        runOnlyForDeploymentPostprocessing = 0;
     
    13401344                        buildActionMask = 2147483647;
    13411345                        files = (
    1342                                 787463C417D5DEFB0040CFC7 /* decmain.cpp in Sources */,
    1343                                 787463C517D5DEFB0040CFC7 /* TAppDecCfg.cpp in Sources */,
    1344                                 787463C617D5DEFB0040CFC7 /* TAppDecTop.cpp in Sources */,
     1346                                784870751B0B62D10098FD5A /* TAppDecCfg.cpp in Sources */,
     1347                                784870741B0B62D10098FD5A /* decmain.cpp in Sources */,
     1348                                784870761B0B62D10098FD5A /* TAppDecTop.cpp in Sources */,
    13451349                        );
    13461350                        runOnlyForDeploymentPostprocessing = 0;
     
    13501354                        buildActionMask = 2147483647;
    13511355                        files = (
    1352                                 787463CD17D5DF220040CFC7 /* TExtrTop.cpp in Sources */,
     1356                                784870BC1B0B63520098FD5A /* TExtrTop.cpp in Sources */,
    13531357                        );
    13541358                        runOnlyForDeploymentPostprocessing = 0;
     
    13581362                        buildActionMask = 2147483647;
    13591363                        files = (
    1360                                 787463C717D5DF080040CFC7 /* extrmain.cpp in Sources */,
    1361                                 787463C817D5DF080040CFC7 /* TAppExtrCfg.cpp in Sources */,
    1362                                 787463C917D5DF080040CFC7 /* TAppExtrTop.cpp in Sources */,
     1364                                7848707B1B0B62E10098FD5A /* TAppExtrCfg.cpp in Sources */,
     1365                                7848707A1B0B62E10098FD5A /* extrmain.cpp in Sources */,
     1366                                7848707C1B0B62E10098FD5A /* TAppExtrTop.cpp in Sources */,
    13631367                        );
    13641368                        runOnlyForDeploymentPostprocessing = 0;
     
    13681372                        buildActionMask = 2147483647;
    13691373                        files = (
    1370                                 787463AD17D5DE980040CFC7 /* TRenFilter.cpp in Sources */,
    1371                                 787463AE17D5DE980040CFC7 /* TRenImage.cpp in Sources */,
    1372                                 787463AF17D5DE980040CFC7 /* TRenImagePlane.cpp in Sources */,
    1373                                 787463B017D5DE980040CFC7 /* TRenInterpFilter.cpp in Sources */,
    1374                                 787463B117D5DE9D0040CFC7 /* TRenModel.cpp in Sources */,
    1375                                 787463B217D5DE9D0040CFC7 /* TRenModSetupStrParser.cpp in Sources */,
    1376                                 787463B317D5DE9D0040CFC7 /* TRenSingleModel.cpp in Sources */,
    1377                                 787463B417D5DE9D0040CFC7 /* TRenTop.cpp in Sources */,
     1374                                784870C41B0B635C0098FD5A /* TRenTop.cpp in Sources */,
     1375                                784870C31B0B635C0098FD5A /* TRenSingleModel.cpp in Sources */,
     1376                                784870BE1B0B635C0098FD5A /* TRenImage.cpp in Sources */,
     1377                                784870C11B0B635C0098FD5A /* TRenModel.cpp in Sources */,
     1378                                784870C21B0B635C0098FD5A /* TRenModSetupStrParser.cpp in Sources */,
     1379                                784870BD1B0B635C0098FD5A /* TRenFilter.cpp in Sources */,
     1380                                784870C01B0B635C0098FD5A /* TRenInterpFilter.cpp in Sources */,
     1381                                784870BF1B0B635C0098FD5A /* TRenImagePlane.cpp in Sources */,
    13781382                        );
    13791383                        runOnlyForDeploymentPostprocessing = 0;
     
    13831387                        buildActionMask = 2147483647;
    13841388                        files = (
    1385                                 787463CA17D5DF0E0040CFC7 /* RendererMain.cpp in Sources */,
    1386                                 787463CB17D5DF0E0040CFC7 /* TAppRendererCfg.cpp in Sources */,
    1387                                 787463CC17D5DF0E0040CFC7 /* TAppRendererTop.cpp in Sources */,
     1389                                7848707E1B0B62E80098FD5A /* TAppRendererCfg.cpp in Sources */,
     1390                                7848707D1B0B62E80098FD5A /* RendererMain.cpp in Sources */,
     1391                                7848707F1B0B62E80098FD5A /* TAppRendererTop.cpp in Sources */,
    13881392                        );
    13891393                        runOnlyForDeploymentPostprocessing = 0;
     
    13931397                        buildActionMask = 2147483647;
    13941398                        files = (
    1395                                 787463B517D5DEAF0040CFC7 /* program_options_lite.cpp in Sources */,
    1396                                 787463B617D5DEAF0040CFC7 /* TAppComCamPara.cpp in Sources */,
     1399                                784870811B0B63040098FD5A /* TAppComCamPara.cpp in Sources */,
     1400                                784870801B0B63040098FD5A /* program_options_lite.cpp in Sources */,
    13971401                        );
    13981402                        runOnlyForDeploymentPostprocessing = 0;
     
    15211525                                GCC_WARN_UNUSED_VARIABLE = YES;
    15221526                                HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/source/Lib/";
    1523                                 MACOSX_DEPLOYMENT_TARGET = 10.7;
    15241527                                ONLY_ACTIVE_ARCH = YES;
    1525                                 SDKROOT = macosx;
     1528                                OTHER_CPLUSPLUSFLAGS = (
     1529                                        "$(OTHER_CFLAGS)",
     1530                                        "-DDEBUG",
     1531                                );
    15261532                        };
    15271533                        name = Debug;
     
    15321538                                GCC_OPTIMIZATION_LEVEL = s;
    15331539                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
    1534                                 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
    15351540                                GCC_WARN_UNUSED_VARIABLE = YES;
    15361541                                HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/source/Lib/";
    1537                                 MACOSX_DEPLOYMENT_TARGET = 10.7;
    1538                                 SDKROOT = macosx;
    15391542                        };
    15401543                        name = Release;
     
    15431546                        isa = XCBuildConfiguration;
    15441547                        buildSettings = {
    1545                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1548                                COMBINE_HIDPI_IMAGES = YES;
    15461549                                INSTALL_PATH = /usr/local/lib;
    15471550                                PRODUCT_NAME = TLibCommon;
     
    15521555                        isa = XCBuildConfiguration;
    15531556                        buildSettings = {
    1554                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1557                                COMBINE_HIDPI_IMAGES = YES;
    15551558                                INSTALL_PATH = /usr/local/lib;
    15561559                                PRODUCT_NAME = TLibCommon;
     
    15611564                        isa = XCBuildConfiguration;
    15621565                        buildSettings = {
    1563                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1566                                COMBINE_HIDPI_IMAGES = YES;
    15641567                                INSTALL_PATH = /usr/local/lib;
    15651568                                PRODUCT_NAME = TLibDecoder;
     
    15701573                        isa = XCBuildConfiguration;
    15711574                        buildSettings = {
    1572                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1575                                COMBINE_HIDPI_IMAGES = YES;
    15731576                                INSTALL_PATH = /usr/local/lib;
    15741577                                PRODUCT_NAME = TLibDecoder;
     
    15791582                        isa = XCBuildConfiguration;
    15801583                        buildSettings = {
    1581                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1584                                COMBINE_HIDPI_IMAGES = YES;
    15821585                                INSTALL_PATH = /usr/local/lib;
    15831586                                PRODUCT_NAME = TLibEncoder;
     
    15881591                        isa = XCBuildConfiguration;
    15891592                        buildSettings = {
    1590                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1593                                COMBINE_HIDPI_IMAGES = YES;
    15911594                                INSTALL_PATH = /usr/local/lib;
    15921595                                PRODUCT_NAME = TLibEncoder;
     
    15971600                        isa = XCBuildConfiguration;
    15981601                        buildSettings = {
    1599                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1602                                COMBINE_HIDPI_IMAGES = YES;
    16001603                                INSTALL_PATH = /usr/local/lib;
    16011604                                PRODUCT_NAME = TLibVideoIO;
     
    16061609                        isa = XCBuildConfiguration;
    16071610                        buildSettings = {
    1608                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1611                                COMBINE_HIDPI_IMAGES = YES;
    16091612                                INSTALL_PATH = /usr/local/lib;
    16101613                                PRODUCT_NAME = TLibVideoIO;
     
    16151618                        isa = XCBuildConfiguration;
    16161619                        buildSettings = {
    1617                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    16181620                                INSTALL_PATH = /usr/local/bin;
    16191621                                PRODUCT_NAME = TAppEncoder;
     
    16241626                        isa = XCBuildConfiguration;
    16251627                        buildSettings = {
    1626                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    16271628                                INSTALL_PATH = /usr/local/bin;
    16281629                                PRODUCT_NAME = TAppEncoder;
     
    16331634                        isa = XCBuildConfiguration;
    16341635                        buildSettings = {
    1635                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    16361636                                INSTALL_PATH = /usr/local/bin;
    16371637                                PRODUCT_NAME = TAppDecoder;
     
    16421642                        isa = XCBuildConfiguration;
    16431643                        buildSettings = {
    1644                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    16451644                                INSTALL_PATH = /usr/local/bin;
    16461645                                PRODUCT_NAME = TAppDecoder;
     
    16511650                        isa = XCBuildConfiguration;
    16521651                        buildSettings = {
    1653                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1652                                COMBINE_HIDPI_IMAGES = YES;
    16541653                                INSTALL_PATH = /usr/local/lib;
    16551654                                PRODUCT_NAME = TLibExtractor;
     
    16601659                        isa = XCBuildConfiguration;
    16611660                        buildSettings = {
    1662                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1661                                COMBINE_HIDPI_IMAGES = YES;
    16631662                                INSTALL_PATH = /usr/local/lib;
    16641663                                PRODUCT_NAME = TLibExtractor;
     
    16691668                        isa = XCBuildConfiguration;
    16701669                        buildSettings = {
    1671                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    16721670                                INSTALL_PATH = /usr/local/bin;
    16731671                                PRODUCT_NAME = TAppExtractor;
     
    16781676                        isa = XCBuildConfiguration;
    16791677                        buildSettings = {
    1680                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    16811678                                INSTALL_PATH = /usr/local/bin;
    16821679                                PRODUCT_NAME = TAppExtractor;
     
    16871684                        isa = XCBuildConfiguration;
    16881685                        buildSettings = {
    1689                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1686                                COMBINE_HIDPI_IMAGES = YES;
    16901687                                INSTALL_PATH = /usr/local/lib;
    16911688                                PRODUCT_NAME = TLibRenderer;
     
    16961693                        isa = XCBuildConfiguration;
    16971694                        buildSettings = {
    1698                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1695                                COMBINE_HIDPI_IMAGES = YES;
    16991696                                INSTALL_PATH = /usr/local/lib;
    17001697                                PRODUCT_NAME = TLibRenderer;
     
    17051702                        isa = XCBuildConfiguration;
    17061703                        buildSettings = {
    1707                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    17081704                                INSTALL_PATH = /usr/local/bin;
    17091705                                PRODUCT_NAME = TAppRenderer;
     
    17141710                        isa = XCBuildConfiguration;
    17151711                        buildSettings = {
    1716                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    17171712                                INSTALL_PATH = /usr/local/bin;
    17181713                                PRODUCT_NAME = TAppRenderer;
     
    17231718                        isa = XCBuildConfiguration;
    17241719                        buildSettings = {
    1725                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1720                                COMBINE_HIDPI_IMAGES = YES;
    17261721                                INSTALL_PATH = /usr/local/lib;
    17271722                                PRODUCT_NAME = TAppCommon;
     
    17321727                        isa = XCBuildConfiguration;
    17331728                        buildSettings = {
    1734                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
     1729                                COMBINE_HIDPI_IMAGES = YES;
    17351730                                INSTALL_PATH = /usr/local/lib;
    17361731                                PRODUCT_NAME = TAppCommon;
     
    17411736                        isa = XCBuildConfiguration;
    17421737                        buildSettings = {
    1743                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    17441738                                PRODUCT_NAME = "$(TARGET_NAME)";
    17451739                        };
     
    17491743                        isa = XCBuildConfiguration;
    17501744                        buildSettings = {
    1751                                 GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
    17521745                                PRODUCT_NAME = "$(TARGET_NAME)";
    17531746                        };
  • branches/HTM-14.1-update-dev2/source/App/TAppEncoder/TAppEncCfg.cpp

    r1200 r1274  
    22872287
    22882288  dimBitOffset[ 0 ] = 0;
    2289   for (Int j = 1; j <= ((Int) m_dimIds.size() - m_splittingFlag ? 1 : 0); j++ )
     2289  for (Int j = 1; j <= (((Int) m_dimIds.size() - m_splittingFlag) ? 1 : 0); j++ )
    22902290  {
    22912291    dimBitOffset[ j ] = dimBitOffset[ j - 1 ] + m_dimensionIdLen[ j - 1];
  • branches/HTM-14.1-update-dev2/source/App/TAppRenderer/TAppRendererCfg.cpp

    r1200 r1274  
    306306
    307307  Int iNumNonNULL;
    308   for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchDepthInputFileList[iNumNonNULL]; iNumNonNULL++);  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
    309   for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchVideoInputFileList[iNumNonNULL]; iNumNonNULL++);  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
     308  for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchDepthInputFileList[iNumNonNULL]; iNumNonNULL++) {};  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
     309  for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchVideoInputFileList[iNumNonNULL]; iNumNonNULL++) {};  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
    310310
    311311
    312312  if ( !m_bSweep )
    313313  {
    314   for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfOutputViews) && m_pchSynthOutputFileList[iNumNonNULL]; iNumNonNULL++); xConfirmPara( iNumNonNULL < m_iNumberOfOutputViews, "Number of SynthOutputFiles must be greater than or equal to number of SynthViewNumbers" );
     314    for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfOutputViews) && m_pchSynthOutputFileList[iNumNonNULL]; iNumNonNULL++) {}; xConfirmPara( iNumNonNULL < m_iNumberOfOutputViews, "Number of SynthOutputFiles must be greater than or equal to number of SynthViewNumbers" );
    315315  }
    316316  else
  • branches/HTM-14.1-update-dev2/source/Lib/TAppCommon/TAppComCamPara.cpp

    r1200 r1274  
    13731373  Int  iSourceViewNum = m_aiBaseViews[ iViewIdx ];
    13741374  Double dBaseLine = 0.0;
    1375   Double dFL1, dCS1, dCP1, dZN1, dZF1;
    1376   Bool bInterpolated;
    1377   double dPos[3];
     1375  Double dFL1 = 1.0, dCS1 = 1.0, dCP1 = 1.0, dZN1 = 1.0, dZF1 = 1.0;
     1376  Bool bInterpolated = false;
     1377  double dPos[3] = {0.0, 0.0, 0.0};
    13781378
    13791379  if( m_iNumberOfBaseViews == 3 )
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/CommonDef.h

    r1200 r1274  
    363363#endif
    364364
    365 #if H_3D_IV_MERGE
     365#if NH_3D_MLC  || NH_3D_ARP
    366366#define MRG_MAX_NUM_CANDS_MEM       (MRG_MAX_NUM_CANDS+1) // one extra for inter-view motion prediction
    367367#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/ContextTables.h

    r1225 r1274  
    162162#define NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX  1
    163163
    164 #if H_3D_ARP
     164#if NH_3D_ARP
    165165#define NUM_ARPW_CTX                  3       ///< number of context models for weighting factor index used by advanced residual prediction
    166166#endif
     
    188188#define NUM_SDC_FLAG_CTX              1      ///< number of context
    189189#endif
    190 #if H_3D_DBBP
     190#if NH_3D_DBBP
    191191#define DBBP_NUM_FLAG_CTX                 1
    192192#endif
     
    542542//! \}
    543543
    544 #if H_3D_ARP
     544#if NH_3D_ARP
    545545static const UChar
    546546INIT_ARPW[3][NUM_ARPW_CTX] =
     
    629629#endif
    630630
    631 #if H_3D_DBBP
     631#if NH_3D_DBBP
    632632static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] =
    633633{
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComCodingStatistics.h

    r1225 r1274  
    8181  STATS__CABAC_BITS__ESCAPE_BITS,
    8282
     83#if NH_3D_DBBP
     84  STATS__CABAC_BITS__DBBP_FLAG,
     85#endif
     86#if NH_3D_ARP
     87  STATS__CABAC_BITS__ARP_FLAG,
     88#endif
    8389  STATS__CABAC_BITS__SAO,
    8490  STATS__CABAC_TRM_BITS,
     
    134140    "CABAC_BITS__SIGN_BIT",
    135141    "CABAC_BITS__ESCAPE_BITS",
     142#if NH_3D_DBBP
     143    "CABAC_BITS__DBBP_FLAG",
     144#endif
    136145    "CABAC_BITS__SAO",
    137146    "CABAC_TRM_BITS",
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComDataCU.cpp

    r1226 r1274  
    125125  m_bDecSubCu          = false;
    126126
    127 #if H_3D_NBDV
     127#if NH_3D_NBDV
    128128  m_pDvInfo              = NULL;
    129129#endif
    130 #if H_3D_VSP
     130#if NH_3D_VSP
    131131  m_piVSPFlag            = NULL;
    132132#endif
    133 #if H_3D_SPIVMP
     133#if NH_3D_SPIVMP
    134134  m_pbSPIVMPFlag         = NULL;
    135135#endif
    136 #if H_3D_ARP
     136#if NH_3D_ARP
    137137  m_puhARPW              = NULL;
    138138#endif
     
    142142#if H_3D_INTER_SDC
    143143#endif
    144 #if H_3D_DBBP
     144#if NH_3D_DBBP
    145145  m_pbDBBPFlag         = NULL;
    146146#endif
     
    185185    m_pbMergeFlag        = (Bool*  )xMalloc(Bool,   uiNumPartition);
    186186    m_puhMergeIndex      = (UChar* )xMalloc(UChar,  uiNumPartition);
    187 #if H_3D_VSP
     187#if NH_3D_VSP
    188188    m_piVSPFlag          = (Char*  )xMalloc(Char,   uiNumPartition);
    189189#endif
    190 #if H_3D_SPIVMP
     190#if NH_3D_SPIVMP
    191191    m_pbSPIVMPFlag       = (Bool*  )xMalloc(Bool,   uiNumPartition);
    192192#endif
     
    208208    }
    209209
    210 #if H_3D_NBDV
     210#if NH_3D_NBDV
    211211    m_pDvInfo            = (DisInfo* )xMalloc(DisInfo,  uiNumPartition);
    212212#endif
     
    249249    }
    250250
    251 #if H_3D_ARP
    252     m_puhARPW            = new UChar[ uiNumPartition];
     251#if NH_3D_ARP
     252    m_puhARPW            = (UChar*  )xMalloc(UChar,   uiNumPartition);
    253253#endif
    254254#if NH_3D_IC
     
    273273#endif
    274274#endif
    275 #if H_3D_DBBP
     275#if NH_3D_DBBP
    276276    m_pbDBBPFlag         = (Bool*  )xMalloc(Bool,   uiNumPartition);
    277277#endif
     
    372372    }
    373373
    374 #if H_3D_VSP
    375     if ( m_piVSPFlag          ) { xFree(m_piVSPFlag);           m_piVSPFlag         = NULL; }
    376 #endif
    377 #if H_3D_SPIVMP
     374#if NH_3D_VSP
     375    if ( m_piVSPFlag )
     376    {
     377      xFree(m_piVSPFlag);
     378      m_piVSPFlag = NULL;
     379    }
     380#endif
     381#if NH_3D_SPIVMP
    378382    if ( m_pbSPIVMPFlag       ) { xFree(m_pbSPIVMPFlag);           m_pbSPIVMPFlag         = NULL; }
    379383#endif
     
    463467      m_acCUMvField[rpl].destroy();
    464468    }
    465 #if H_3D_NBDV
     469#if NH_3D_NBDV
    466470    if ( m_pDvInfo            ) { xFree(m_pDvInfo);             m_pDvInfo           = NULL; }
    467471#endif
    468472
    469473
    470 #if H_3D_ARP
    471     if ( m_puhARPW            ) { delete[] m_puhARPW;           m_puhARPW           = NULL; }
     474#if NH_3D_ARP
     475    if ( m_puhARPW            ) { xFree(m_puhARPW);             m_puhARPW           = NULL; }
    472476#endif
    473477#if NH_3D_IC
     
    493497#endif   
    494498#endif   
    495 #if H_3D_DBBP
     499#if NH_3D_DBBP
    496500    if ( m_pbDBBPFlag         ) { xFree(m_pbDBBPFlag);          m_pbDBBPFlag        = NULL; }
    497501#endif
     
    598602  memset( m_puhHeight         , maxCUHeight,                m_uiNumPartition * sizeof( *m_puhHeight ) );
    599603
    600 #if H_3D_ARP
    601     m_puhARPW   [ui] = pcFrom->getARPW( ui );
    602 #endif
    603604#if NH_3D_IC
    604605  memset( m_pbICFlag          , false,                      m_uiNumPartition * sizeof( *m_pbICFlag ) );
    605606#endif
    606 
    607607  for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    608608  {
     
    623623  memset( m_puhMergeIndex     , 0,                        m_uiNumPartition * sizeof( *m_puhMergeIndex ) );
    624624
    625 #if H_3D_VSP
    626     m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui];
    627 #endif
    628 #if H_3D_SPIVMP
    629     m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui];
     625#if NH_3D_VSP
     626  memset( m_piVSPFlag         , 0,                        m_uiNumPartition * sizeof( *m_piVSPFlag ) );
     627#endif
     628#if NH_3D_SPIVMP
     629  memset( m_pbSPIVMPFlag      , 0,                     m_uiNumPartition * sizeof( *m_pbSPIVMPFlag ) );   
    630630#endif
    631631#if H_3D_DIM_SDC
    632632    m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui];
    633633#endif
    634 #if H_3D_DBBP
    635     m_pbDBBPFlag[ui] = pcFrom->m_pbDBBPFlag[ui];
     634#if NH_3D_DBBP
     635  memset( m_pbDBBPFlag , false, m_uiNumPartition * sizeof( *m_pbDBBPFlag ));
    636636#endif
    637637#if H_3D
     
    639639    memset( m_uiDISType         + firstElement,     0,                    numElements * sizeof( *m_uiDISType) );
    640640#endif
    641 #if H_3D_VSP
    642     memset( m_piVSPFlag         + firstElement, 0,                        numElements * sizeof( *m_piVSPFlag ) );
    643 #endif
    644 #if H_3D_SPIVMP
    645     memset( m_pbSPIVMPFlag      + firstElement, 0,                        numElements * sizeof( *m_pbSPIVMPFlag ) );
    646 #endif
    647641
    648642  for (UInt ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++)
     
    651645  }
    652646
    653 #if H_3D_ARP
    654     memset( m_puhARPW           + firstElement, 0,                        numElements * sizeof( UChar )         );
     647#if NH_3D_ARP
     648  memset( m_puhARPW      ,      0,        m_uiNumPartition * sizeof( *m_puhARPW )         );
    655649#endif
    656650
     
    674668    m_apDmmPredictor[0] = 0;
    675669    m_apDmmPredictor[1] = 0;
    676 #endif
    677 #if H_3D_DBBP
    678     memset( m_pbDBBPFlag        + firstElement, false,                    numElements * sizeof( *m_pbDBBPFlag ) );
    679670#endif
    680671
     
    791782    m_pbMergeFlag[ui]   = 0;
    792783    m_puhMergeIndex[ui] = 0;
    793 #if H_3D_VSP
    794       m_piVSPFlag[ui] = 0;
    795 #endif
    796 #if H_3D_SPIVMP
    797       m_pbSPIVMPFlag[ui] = 0;
     784#if NH_3D_VSP
     785    m_piVSPFlag[ui]    = 0;
     786#endif
     787#if NH_3D_SPIVMP
     788    m_pbSPIVMPFlag[ui] = 0;
    798789#endif
    799790
     
    808799      m_puhCbf[comp][ui] = 0;
    809800    }
    810 #if H_3D_ARP
     801#if NH_3D_ARP
    811802      m_puhARPW[ui] = 0;
    812803#endif
     
    836827      m_apDmmPredictor[1] = 0;
    837828#endif
    838 #if H_3D_DBBP
     829#if NH_3D_DBBP
    839830      m_pbDBBPFlag[ui] = false;
    840831#endif
     
    892883  memset( m_pbMergeFlag,        0, iSizeInBool  );
    893884  memset( m_puhMergeIndex,      0, iSizeInUchar );
    894 #if H_3D_VSP
     885#if NH_3D_VSP
    895886  memset( m_piVSPFlag,          0, sizeof( Char  ) * m_uiNumPartition );
    896887#endif
    897 #if H_3D_SPIVMP
     888#if NH_3D_SPIVMP
    898889  memset( m_pbSPIVMPFlag,       0, sizeof( Bool  ) * m_uiNumPartition );
    899890#endif
     
    914905    memset( m_explicitRdpcmMode[comp],             NUMBER_OF_RDPCM_MODES, iSizeInUchar );
    915906  }
    916 #if H_3D_ARP
    917   memset( m_puhARPW,            0, iSizeInUchar  );
    918 #endif
    919907
    920908  memset( m_puhDepth,     uiDepth, iSizeInUchar );
     
    922910  memset( m_puhHeight,         uhHeight, iSizeInUchar );
    923911  memset( m_pbIPCMFlag,        0, iSizeInBool  );
     912#if NH_3D_ARP
     913  memset( m_puhARPW,           0, iSizeInUchar  );
     914#endif
    924915#if NH_3D_IC
    925916  memset( m_pbICFlag,          0, iSizeInBool  );
     
    945936  m_apDmmPredictor[1] = 0;
    946937#endif
    947 #if H_3D_DBBP
    948   memset( m_pbDBBPFlag,         0, iSizeInBool  );
     938#if NH_3D_DBBP
     939  memset( m_pbDBBPFlag,         0, sizeof(Bool) * m_uiNumPartition  );
    949940#endif
    950941
     
    972963      m_uiDISType[ui]   = pcCU->getDISType(uiPartOffset+ui);
    973964#endif
    974 #if H_3D_VSP
    975       m_piVSPFlag[ui]=pcCU->m_piVSPFlag[uiPartOffset+ui];
    976       m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
    977 #endif
    978 #if H_3D_SPIVMP
    979       m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
    980 #endif
    981 #if H_3D_ARP
     965#if NH_3D_VSP
     966    m_piVSPFlag[ui] = pcCU->m_piVSPFlag[uiPartOffset+ui];
     967    m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
     968#endif
     969#if NH_3D_SPIVMP
     970    m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
     971#endif
     972#if NH_3D_ARP
    982973      m_puhARPW           [ui] = pcCU->getARPW( uiPartOffset+ui );
    983974#endif
     
    1003994#endif
    1004995#endif
    1005 #if H_3D_DBBP
     996#if NH_3D_DBBP
    1006997      m_pbDBBPFlag[ui]=pcCU->m_pbDBBPFlag[uiPartOffset+ui];
    1007998#endif
     
    10741065  m_pePredMode=pcCU->getPredictionMode()  + uiPart;
    10751066  m_CUTransquantBypass  = pcCU->getCUTransquantBypass()+uiPart;
    1076 #if H_3D_NBDV
     1067#if NH_3D_NBDV
    10771068  m_pDvInfo             = pcCU->getDvInfo()           + uiPart;
    10781069#endif
     
    10801071  m_pbMergeFlag         = pcCU->getMergeFlag()        + uiPart;
    10811072  m_puhMergeIndex       = pcCU->getMergeIndex()       + uiPart;
    1082 #if H_3D_VSP
     1073#if NH_3D_VSP
    10831074  m_piVSPFlag           = pcCU->getVSPFlag()          + uiPart;
    10841075#endif
    1085 #if H_3D_SPIVMP
     1076#if NH_3D_SPIVMP
    10861077  m_pbSPIVMPFlag        = pcCU->getSPIVMPFlag()          + uiPart;
    10871078#endif
    1088 #if H_3D_ARP
     1079#if NH_3D_ARP
    10891080  m_puhARPW             = pcCU->getARPW()             + uiPart;
    10901081#endif
     
    11261117#endif 
    11271118#endif 
    1128 #if H_3D_DBBP
     1119#if NH_3D_DBBP
    11291120  m_pbDBBPFlag              = pcCU->getDBBPFlag()         + uiPart;
    11301121#endif
     
    11731164}
    11741165
    1175 #if H_3D_NBDV
     1166#if NH_3D_NBDV
    11761167Void TComDataCU::copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx)
    11771168{
     
    11821173// Copy inter prediction info from the biggest CU
    11831174Void TComDataCU::copyInterPredInfoFrom    ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList
    1184 #if H_3D_NBDV
     1175#if NH_3D_NBDV
    11851176  , Bool bNBDV
    11861177#endif
     
    12131204
    12141205  m_pePartSize         = pcCU->getPartitionSize ()        + uiAbsPartIdx;
    1215 #if H_3D_NBDV
     1206#if NH_3D_NBDV
    12161207  if(bNBDV == true)
    12171208  {
     
    12341225  m_pbMergeFlag        = pcCU->getMergeFlag()             + uiAbsPartIdx;
    12351226  m_puhMergeIndex      = pcCU->getMergeIndex()            + uiAbsPartIdx;
    1236 #if H_3D_VSP
     1227#if NH_3D_VSP
    12371228  m_piVSPFlag          = pcCU->getVSPFlag()               + uiAbsPartIdx;
    12381229  m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
    12391230#endif
    1240 #if H_3D_SPIVMP
     1231#if NH_3D_SPIVMP
    12411232  m_pbSPIVMPFlag       = pcCU->getSPIVMPFlag()            + uiAbsPartIdx;
    12421233#endif
     
    12441235  m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx;
    12451236  m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx;
    1246 #if H_3D_ARP
     1237#if NH_3D_ARP
    12471238  m_puhARPW            = pcCU->getARPW()                  + uiAbsPartIdx;
    12481239#endif   
    1249 #if H_3D_DBBP
     1240#if NH_3D_DBBP
    12501241  m_pbDBBPFlag       = pcCU->getDBBPFlag()              + uiAbsPartIdx;
    12511242#endif
    12521243
    12531244  m_acCUMvField[ eRefPicList ].linkToWithOffset( pcCU->getCUMvField(eRefPicList), uiAbsPartIdx );
    1254 #if H_3D_NBDV
     1245#if NH_3D_NBDV
    12551246  }
    12561247#endif
     
    12921283  memcpy( m_pbMergeFlag         + uiOffset, pcCU->getMergeFlag(),         iSizeInBool  );
    12931284  memcpy( m_puhMergeIndex       + uiOffset, pcCU->getMergeIndex(),        iSizeInUchar );
    1294 #if H_3D_VSP
     1285#if NH_3D_VSP
    12951286  memcpy( m_piVSPFlag           + uiOffset, pcCU->getVSPFlag(),           sizeof( Char ) * uiNumPartition );
    12961287  memcpy( m_pDvInfo             + uiOffset, pcCU->getDvInfo(),            sizeof( *m_pDvInfo ) * uiNumPartition );
    12971288#endif
    1298 #if H_3D_SPIVMP
     1289#if NH_3D_SPIVMP  || NH_3D_DBBP
    12991290  memcpy( m_pbSPIVMPFlag        + uiOffset, pcCU->getSPIVMPFlag(),        sizeof( Bool ) * uiNumPartition );
    13001291#endif
     
    13331324#endif
    13341325#endif
    1335 #if H_3D_DBBP
     1326#if NH_3D_DBBP
    13361327  memcpy( m_pbDBBPFlag          + uiOffset, pcCU->getDBBPFlag(),          iSizeInBool  );
     1328#endif
     1329#if NH_3D_ARP
     1330  memcpy( m_puhARPW             + uiOffset, pcCU->getARPW(),              iSizeInUchar );
    13371331#endif
    13381332
     
    13761370  }
    13771371
    1378 #if H_3D_ARP
    1379   memcpy( m_puhARPW             + uiOffset, pcCU->getARPW(),              iSizeInUchar );
    1380 #endif
    13811372#if NH_3D_IC
    13821373  memcpy( m_pbICFlag            + uiOffset, pcCU->getICFlag(),            iSizeInBool );
     
    14091400
    14101401  memcpy( pCtu->getQP() + m_absZIdxInCtu, m_phQP, sizeInChar  );
    1411 #if H_3D_NBDV
    1412   memcpy( rpcCU->getDvInfo()         + m_uiAbsIdxInLCU, m_pDvInfo,    sizeof(* m_pDvInfo)    * m_uiNumPartition );
     1402#if NH_3D_NBDV
     1403  memcpy( pCtu->getDvInfo() + m_absZIdxInCtu, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition );
    14131404#endif
    14141405
     
    14191410  memcpy( pCtu->getMergeFlag()         + m_absZIdxInCtu, m_pbMergeFlag,         iSizeInBool  );
    14201411  memcpy( pCtu->getMergeIndex()        + m_absZIdxInCtu, m_puhMergeIndex,       iSizeInUchar );
    1421   #if H_3D_VSP
    1422   memcpy( rpcCU->getVSPFlag()           + m_uiAbsIdxInLCU, m_piVSPFlag,           sizeof( Char ) * m_uiNumPartition );
    1423   memcpy( rpcCU->getDvInfo()            + m_uiAbsIdxInLCU, m_pDvInfo,             sizeof( *m_pDvInfo ) * m_uiNumPartition );
    1424 #endif
    1425 #if H_3D_SPIVMP
    1426   memcpy( rpcCU->getSPIVMPFlag()        + m_uiAbsIdxInLCU, m_pbSPIVMPFlag,        sizeof( Bool ) * m_uiNumPartition );
     1412#if NH_3D_VSP
     1413  memcpy( pCtu->getVSPFlag()           + m_absZIdxInCtu, m_piVSPFlag,           sizeof( Char ) * m_uiNumPartition );
     1414#endif
     1415#if NH_3D_DBBP
     1416  memcpy( pCtu->getDvInfo()            + m_absZIdxInCtu, m_pDvInfo,             sizeof( *m_pDvInfo ) * m_uiNumPartition );
     1417#endif
     1418#if NH_3D_SPIVMP
     1419  memcpy( pCtu->getSPIVMPFlag()        + m_absZIdxInCtu, m_pbSPIVMPFlag,        sizeof( Bool ) * m_uiNumPartition );
    14271420#endif
    14281421
     
    14611454#endif
    14621455#endif
    1463 #if H_3D_DBBP
    1464   memcpy( rpcCU->getDBBPFlag()          + m_uiAbsIdxInLCU, m_pbDBBPFlag,          iSizeInBool  );
     1456#if NH_3D_DBBP
     1457  memcpy( pCtu->getDBBPFlag()          + m_absZIdxInCtu, m_pbDBBPFlag,          iSizeInBool  );
     1458#endif
     1459#if NH_3D_ARP
     1460  memcpy( pCtu->getARPW()              + m_absZIdxInCtu, m_puhARPW,             iSizeInUchar );
    14651461#endif
    14661462
     
    14971493  }
    14981494
    1499 #if H_3D_ARP
    1500   memcpy( rpcCU->getARPW()             + m_uiAbsIdxInLCU, m_puhARPW,             iSizeInUchar );
    1501 #endif
    15021495#if NH_3D_IC
    15031496  memcpy( pCtu->getICFlag() + m_absZIdxInCtu, m_pbICFlag, sizeof( *m_pbICFlag ) * m_uiNumPartition );
    15041497#endif
    1505 
    15061498  pCtu->getTotalBins() = m_uiTotalBins;
    15071499}
     
    15121504#endif
    15131505
    1514 #if H_3D_VSP
    1515   memcpy( rpcCU->getVSPFlag()           + uiPartOffset, m_piVSPFlag,           sizeof(Char) * uiQNumPart );
    1516 #endif
    15171506#if H_3D_SPIVMP
    15181507  memcpy( rpcCU->getSPIVMPFlag()        + uiPartOffset, m_pbSPIVMPFlag,        sizeof(Bool) * uiQNumPart );
     
    15351524  memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart);
    15361525#endif
    1537 #endif
    1538 #if H_3D_DBBP
    1539   memcpy( rpcCU->getDBBPFlag()          + uiPartOffset, m_pbDBBPFlag,          iSizeInBool  );
    1540 #endif
    1541 #if H_3D_ARP
    1542   memcpy( rpcCU->getARPW()             + uiPartOffset, m_puhARPW,             iSizeInUchar );
    15431526#endif
    15441527
     
    20932076  return uiCtx;
    20942077}
    2095 #if H_3D_ARP
     2078#if NH_3D_ARP
    20962079UInt TComDataCU::getCTXARPWFlag( UInt uiAbsPartIdx )
    20972080{
     
    21002083  UInt        uiCtx = 0;
    21012084 
    2102   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
     2085  pcTempCU = getPULeft( uiTempPartIdx, m_absZIdxInCtu + uiAbsPartIdx );
    21032086  uiCtx    = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0;
    21042087    return uiCtx;
    21052088}
    21062089#endif
    2107 #if H_3D_DBBP
     2090#if NH_3D_DBBP
    21082091Pel* TComDataCU::getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride)
    21092092{
     2093  const TComSPS* sps = getSlice()->getSPS();
     2094  UInt uiMaxCUWidth = sps->getMaxCUWidth();
     2095  UInt uiMaxCUHeight = sps->getMaxCUHeight();
     2096 
    21102097  // get coded and reconstructed depth view
    21112098  TComPicYuv* depthPicYuv = NULL;
     
    21132100 
    21142101  // DBBP is a texture coding tool
    2115   if( getSlice()->getIsDepth() )
    2116   {
    2117     return NULL;
    2118   } 
     2102  assert( !getSlice()->getIsDepth() );
     2103 
    21192104#if H_3D_FCO
    21202105  TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
     
    21432128    depthPicYuv   = baseDepthPic->getPicYuvRec();
    21442129    depthPicYuv->extendPicBorder();
    2145     uiDepthStride = depthPicYuv->getStride();
     2130    uiDepthStride = depthPicYuv->getStride(COMPONENT_Y);
    21462131   
    2147     Int iBlkX = ( getAddr() % baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ];
    2148     Int iBlkY = ( getAddr() / baseDepthPic->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCU()+uiAbsPartIdx ] ];
     2132    Int iBlkX = ( getCtuRsAddr() % baseDepthPic->getFrameWidthInCtus() ) * uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ getZorderIdxInCtu()+uiAbsPartIdx ] ];
     2133    Int iBlkY = ( getCtuRsAddr() / baseDepthPic->getFrameWidthInCtus() ) * uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ getZorderIdxInCtu()+uiAbsPartIdx ] ];
    21492134   
    2150     Int iPictureWidth  = depthPicYuv->getWidth();
    2151     Int iPictureHeight = depthPicYuv->getHeight();
     2135    Int iPictureWidth  = depthPicYuv->getWidth(COMPONENT_Y);
     2136    Int iPictureHeight = depthPicYuv->getHeight(COMPONENT_Y);
    21522137   
    21532138   
    21542139    Bool depthRefineFlag = false;
    2155 #if H_3D_NBDV_REF
    2156     depthRefineFlag = m_pcSlice->getDepthRefinementFlag(  );
    2157 #endif // H_3D_NBDV_REF
     2140#if NH_3D_NBDV_REF
     2141    depthRefineFlag = m_pcSlice->getDepthRefinementFlag();
     2142#endif // NH_3D_NBDV_REF
    21582143   
    21592144    TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV;
     
    21662151    Int depthPosY = Clip3(0,   iPictureHeight - 1, iBlkY + ((cDv.getVer()+2)>>2));
    21672152   
    2168     pDepthPels = depthPicYuv->getLumaAddr() + depthPosX + depthPosY * uiDepthStride;
     2153    pDepthPels = depthPicYuv->getAddr(COMPONENT_Y) + depthPosX + depthPosY * uiDepthStride;
    21692154  }
    21702155#endif
     
    21782163#endif
    21792164
    2180 #if H_3D_DBBP
     2165#if NH_3D_DBBP
    21812166Void TComDataCU::setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    21822167{
     
    24902475}
    24912476
    2492 #if H_3D_SPIVMP
     2477#if NH_3D_SPIVMP
    24932478Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    24942479{
     
    24972482#endif
    24982483
    2499 #if H_3D_VSP
     2484#if NH_3D_VSP
    25002485Void TComDataCU::setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    25012486{
    25022487  setSubPart<Char>( iVSPFlag, m_piVSPFlag, uiAbsPartIdx, uiDepth, uiPartIdx );
    25032488}
    2504 #if H_3D_VSP
    25052489template<typename T>
    25062490Void TComDataCU::setSubPartT( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx )
    25072491{
    2508   UInt uiCurrPartNumQ = (m_pcPic->getNumPartInCU() >> (2 * uiCUDepth)) >> 2;
     2492  UInt uiCurrPartNumQ = (m_pcPic->getNumPartitionsInCtu() >> (2 * uiCUDepth)) >> 2;
    25092493  switch ( m_pePartSize[ uiCUAddr ] )
    25102494  {
     
    26382622}
    26392623#endif
    2640 #endif
    26412624
    26422625Void TComDataCU::setInterDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
     
    27242707
    27252708// This is for use by a leaf/sub CU object only, with no additional AbsPartIdx
    2726 #if NH_3D_IC
     2709#if NH_3D_IC || NH_3D_VSP
    27272710Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU)
    27282711{
     
    30583041}
    30593042
    3060 #if H_3D_VSP
    3061 
     3043#if NH_3D_VSP
    30623044/** Add a VSP merging candidate
    30633045 * \Inputs
     
    31133095        predFlag[iRefListIdX] = 1;
    31143096        mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i );
    3115 #if H_3D_NBDV
     3097#if NH_3D_NBDV
    31163098        mvVSP[0+iRefListIdX].getMv().setIDVFlag (false);
    31173099#endif
     
    31213103
    31223104  dirVSP = (predFlag[0] | (predFlag[1] << 1));
    3123   m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true, false);
     3105  m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true
     3106#if NH_3D_SPIVMP
     3107    , false
     3108#endif
     3109    );
    31243110  if ( mrgCandIdx == iCount )
    31253111  {
     
    31313117  return false;
    31323118}
    3133 
    3134 #endif
    3135 
    3136 #if H_3D_IV_MERGE
     3119#endif
     3120
     3121#if NH_3D_IV_MERGE
    31373122inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx )
    31383123{
     
    31653150      if(!bRemove)
    31663151      {
    3167 #if H_3D_NBDV
     3152#if NH_3D_NBDV
    31683153        if(iLoop) // For IvMcShift candidate
    31693154        {
     
    31863171
    31873172#endif
    3188 #if H_3D
     3173#if NH_3D_MLC
     3174/** Construct a extended list of merging candidates
     3175 * \param pcMvFieldNeighbours
     3176 * \param puhInterDirNeighbours
     3177 * \param vspFlag
     3178 * \param pbSPIVMPFlag
     3179 * \param numValidMergeCand
     3180 */
    31893181Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    3190 #if H_3D_VSP
     3182#if NH_3D_VSP
    31913183  , Int* vspFlag
    31923184#endif
    3193 #if H_3D_SPIVMP
     3185#if NH_3D_SPIVMP
    31943186  , Bool* pbSPIVMPFlag
    31953187#endif
     
    31973189  )
    31983190{
    3199   if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0))  // for only dependent texture
     3191  if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0))
    32003192  {
    32013193    return;
     
    32133205    extMergeCandList[ui<<1].setMvField(cZeroMv, NOT_VALID);
    32143206    extMergeCandList[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID);
     3207#if NH_3D_VSP
    32153208    vspFlag[ui] = 0;
    3216   }
    3217 
    3218   // add candidates to temporal list
    3219   // insert MPI ... IvShift candidate
     3209#endif
     3210  }
     3211
     3212  // insert MPI ... IvShift candidate to extMergeCandList
    32203213  for (Int i=0; i<=MRG_IVSHIFT; i++)
    32213214  {
    32223215    if (m_mergCands[i].m_bAvailable)
    32233216    {
    3224       m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt, vspFlag, pbSPIVMPFlag);
     3217      m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt
     3218#if NH_3D_VSP
     3219        , vspFlag
     3220#endif
     3221#if NH_3D_SPIVMP
     3222        , pbSPIVMPFlag
     3223#endif
     3224        );
    32253225      iCount++;
    32263226      if (iCount >= getSlice()->getMaxNumMergeCand())
     
    32293229  }
    32303230
    3231   // insert remaining base candidates
    3232   while (iCount < getSlice()->getMaxNumMergeCand() && m_baseListidc < getSlice()->getMaxNumMergeCand())
    3233   {
    3234     uhInterDirNeighboursExt[iCount] = puhInterDirNeighbours[m_baseListidc];
    3235     extMergeCandList[iCount<<1].setMvField(pcMvFieldNeighbours[m_baseListidc<<1].getMv(), pcMvFieldNeighbours[m_baseListidc<<1].getRefIdx());
     3231  Int iCountBase = m_numSpatialCands;
     3232  // insert remaining base candidates to extMergeCandList
     3233  while (iCount < getSlice()->getMaxNumMergeCand() && iCountBase < getSlice()->getMaxNumMergeCand())
     3234  {
     3235    uhInterDirNeighboursExt[iCount] = puhInterDirNeighbours[iCountBase];
     3236    extMergeCandList[iCount<<1].setMvField(pcMvFieldNeighbours[iCountBase<<1].getMv(), pcMvFieldNeighbours[iCountBase<<1].getRefIdx());
    32363237    if ( getSlice()->isInterB() )
    32373238    {
    3238       extMergeCandList[(iCount<<1)+1].setMvField(pcMvFieldNeighbours[(m_baseListidc<<1)+1].getMv(), pcMvFieldNeighbours[(m_baseListidc<<1)+1].getRefIdx());
    3239     }
    3240     m_baseListidc++;
     3239      extMergeCandList[(iCount<<1)+1].setMvField(pcMvFieldNeighbours[(iCountBase<<1)+1].getMv(), pcMvFieldNeighbours[(iCountBase<<1)+1].getRefIdx());
     3240    }
     3241    iCountBase++;
    32413242    iCount++;
    32423243  }
     
    32603261}
    32613262
    3262 /** Constructs a list of merging candidates
     3263
     3264
     3265/** Derive 3D merge candidates
    32633266 * \param uiAbsPartIdx
    32643267 * \param uiPUIdx
    3265  * \param uiDepth
    32663268 * \param pcMvFieldNeighbours
     3269 * \param puhInterDirNeighbours
     3270 * \param pcMvFieldSP
    32673271 * \param puhInterDirNeighbours
    32683272 * \param numValidMergeCand
    32693273 */
    3270 // HM 12.0 based merge candidate list construction
    3271 
    3272 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx )
    3273 {
    3274 
    3275   UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx;
    3276   Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];
     3274Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
     3275#if NH_3D_SPIVMP
     3276      , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
     3277#endif
     3278      , Int& numValidMergeCand, Int mrgCandIdx
     3279)
     3280{
     3281#if NH_3D_IV_MERGE
    32773282  TComMv cZeroMv;
    3278   for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui )
    3279   {
    3280     abCandIsInter[ui] = false;
    3281     pcMvFieldNeighbours[ ( ui << 1 )     ].setMvField(cZeroMv, NOT_VALID);
    3282     pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID);
     3283  TComMvField tmpMV[2]; 
     3284#endif
     3285
     3286  //////////////////////////////////
     3287  //////// GET DISPARITIES  ////////
     3288  //////////////////////////////////
     3289#if NH_3D_IV_MERGE
     3290  DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
     3291  m_cDefaultDisInfo = cDisInfo;
     3292#elif NH_3D_VSP
     3293  // for xAddVspCand()
     3294  DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
     3295#endif
     3296
     3297  if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0))
     3298  {
     3299    return;
    32833300  }
    32843301  numValidMergeCand = getSlice()->getMaxNumMergeCand();
     3302  //////////////////////////////////
     3303  //////// DERIVE LOCATIONS ////////
     3304  //////////////////////////////////
    32853305  // compute the location of the current PU
    32863306  Int xP, yP, nPSW, nPSH;
     
    32883308
    32893309  Int iCount = 0;
    3290 
    32913310  UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB;
    3292   PartSize cCurPS = getPartitionSize( uiAbsPartIdx );
    32933311  deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    32943312  deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
    3295 
    3296   //left
    3297   UInt uiLeftPartIdx = 0;
    3298   TComDataCU* pcCULeft = 0;
    3299   pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB );
    3300   Bool isAvailableA1 = pcCULeft &&
    3301     pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) &&
    3302     !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) &&
    3303     !pcCULeft->isIntra( uiLeftPartIdx ) ;
    3304   if ( isAvailableA1 )
    3305   {
    3306     m_bAvailableFlagA1 = 1;
    3307     abCandIsInter[iCount] = true;
    3308     // get Inter Dir
    3309     puhInterDirNeighbours[iCount] = pcCULeft->getInterDir( uiLeftPartIdx );
    3310     // get Mv from Left
    3311     pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    3312     if ( getSlice()->isInterB() )
    3313     {
    3314       pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    3315     }
    3316 
    3317     iCount ++;
    3318   }
    3319  
    3320   // early termination
    3321   if (iCount == getSlice()->getMaxNumMergeCand())
    3322   {
    3323     return;
    3324   }
    3325   // above
    3326   UInt uiAbovePartIdx = 0;
    3327   TComDataCU* pcCUAbove = 0;
    3328   pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );
    3329   Bool isAvailableB1 = pcCUAbove &&
    3330   pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) &&
    3331   !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) &&
    3332   !pcCUAbove->isIntra( uiAbovePartIdx );
    3333   if ( isAvailableB1 && (!isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) )
    3334   {
    3335     m_bAvailableFlagB1 = 1;
    3336     abCandIsInter[iCount] = true;
    3337     // get Inter Dir
    3338     puhInterDirNeighbours[iCount] = pcCUAbove->getInterDir( uiAbovePartIdx );
    3339     // get Mv from Left
    3340     pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    3341     if ( getSlice()->isInterB() )
    3342     {
    3343       pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    3344     }
    3345     if ( mrgCandIdx == iCount )
    3346     {
    3347       return;
    3348     }
    3349     iCount ++;
    3350   }
    3351   // early termination
    3352   if (iCount == getSlice()->getMaxNumMergeCand())
    3353   {
    3354     return;
    3355   }
    3356 
    3357   // above right
    3358   UInt uiAboveRightPartIdx = 0;
    3359   TComDataCU* pcCUAboveRight = 0;
    3360   pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );
    3361   Bool isAvailableB0 = pcCUAboveRight &&
    3362   pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) &&
    3363   !pcCUAboveRight->isIntra( uiAboveRightPartIdx );
    3364   if ( isAvailableB0 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) )
    3365   {
    3366     m_bAvailableFlagB0 = 1;
    3367     abCandIsInter[iCount] = true;
    3368     // get Inter Dir
    3369     puhInterDirNeighbours[iCount] = pcCUAboveRight->getInterDir( uiAboveRightPartIdx );
    3370     // get Mv from Left
    3371     pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    3372     if ( getSlice()->isInterB() )
    3373     {
    3374       pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    3375     }
    3376     if ( mrgCandIdx == iCount )
    3377     {
    3378       return;
    3379     }
    3380     iCount ++;
    3381   }
    3382   // early termination
    3383   if (iCount == getSlice()->getMaxNumMergeCand())
    3384   {
    3385     return;
    3386   }
    3387 
    3388   //left bottom
    3389   UInt uiLeftBottomPartIdx = 0;
    3390   TComDataCU* pcCULeftBottom = 0;
    3391   pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );
    3392   Bool isAvailableA0 = pcCULeftBottom &&
    3393   pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) &&
    3394   !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ;
    3395   if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) )
    3396   {
    3397     m_bAvailableFlagA0 = 1;
    3398     abCandIsInter[iCount] = true;
    3399     // get Inter Dir
    3400     puhInterDirNeighbours[iCount] = pcCULeftBottom->getInterDir( uiLeftBottomPartIdx );
    3401     // get Mv from Left
    3402     pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    3403     if ( getSlice()->isInterB() )
    3404     {
    3405       pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    3406     }
    3407     if ( mrgCandIdx == iCount )
    3408     {
    3409       return;
    3410     }
    3411     iCount ++;
    3412   }
    3413   // early termination
    3414   if (iCount == getSlice()->getMaxNumMergeCand())
    3415   {
    3416     return;
    3417   }
    3418   // above left
    3419   if( iCount < 4 )
    3420   {
    3421     UInt uiAboveLeftPartIdx = 0;
    3422     TComDataCU* pcCUAboveLeft = 0;
    3423     pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );
    3424     Bool isAvailableB2 = pcCUAboveLeft &&
    3425     pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) &&
    3426     !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx );
    3427     if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) )
    3428         && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) )
    3429     {
    3430       m_bAvailableFlagB2 = 1;
    3431       abCandIsInter[iCount] = true;
    3432       // get Inter Dir
    3433       puhInterDirNeighbours[iCount] = pcCUAboveLeft->getInterDir( uiAboveLeftPartIdx );
    3434       // get Mv from Left
    3435       pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    3436       if ( getSlice()->isInterB() )
    3437       {
    3438         pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    3439       }
    3440       if ( mrgCandIdx == iCount )
    3441       {
    3442         return;
    3443       }
    3444       iCount ++;
    3445     }
    3446   }
    3447   // early termination
    3448   if (iCount == getSlice()->getMaxNumMergeCand())
    3449   {
    3450     return;
    3451   }
    3452   if ( getSlice()->getEnableTMVPFlag())
    3453   {
    3454     //>> MTK colocated-RightBottom
    3455     UInt uiPartIdxRB;
    3456 
    3457     deriveRightBottomIdx( uiPUIdx, uiPartIdxRB ); 
    3458 
    3459     UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
    3460     UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
    3461 
    3462     TComMv cColMv;
    3463     Int iRefIdx;
    3464     Int uiLCUIdx = -1;
    3465 
    3466     if      ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )  // image boundary check
    3467     {
    3468     }
    3469     else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
    3470     {
    3471     }
    3472     else
    3473     {
    3474       if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) &&           // is not at the last column of LCU
    3475         ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row    of LCU
    3476       {
    3477         uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];
    3478         uiLCUIdx = getAddr();
    3479       }
    3480       else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 )           // is not at the last column of LCU But is last row of LCU
    3481       {
    3482         uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ];
    3483       }
    3484       else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
    3485       {
    3486         uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
    3487         uiLCUIdx = getAddr() + 1;
    3488       }
    3489       else //is the right bottom corner of LCU                       
    3490       {
    3491         uiAbsPartAddr = 0;
    3492       }
    3493     }
    3494 
    3495     iRefIdx = 0;
    3496     Bool bExistMV = false;
    3497     UInt uiPartIdxCenter;
    3498     UInt uiCurLCUIdx = getAddr();
    3499     Int dir = 0;
    3500     UInt uiArrayAddr = iCount;
    3501     xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );
    3502     bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_0, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx );
    3503     if( bExistMV == false )
    3504     {
    3505       bExistMV = xGetColMVP( REF_PIC_LIST_0, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx );
    3506     }
    3507     if( bExistMV )
    3508     {
    3509       dir |= 1;
    3510       pcMvFieldNeighbours[ 2 * uiArrayAddr ].setMvField( cColMv, iRefIdx );
    3511     }
    3512 
    3513     if ( getSlice()->isInterB() )
    3514     {
    3515 #if NH_3D_TMVP //to be changed to NH_3D_TMVP in future migration
    3516       iRefIdx = 0;
    3517 #endif
    3518       bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx);
    3519       if( bExistMV == false )
    3520       {
    3521         bExistMV = xGetColMVP( REF_PIC_LIST_1, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx );
    3522       }
    3523       if( bExistMV )
    3524       {
    3525         dir |= 2;
    3526         pcMvFieldNeighbours[ 2 * uiArrayAddr + 1 ].setMvField( cColMv, iRefIdx );
    3527       }
    3528     }
    3529 
    3530     if (dir != 0)
    3531     {
    3532       puhInterDirNeighbours[uiArrayAddr] = dir;
    3533       abCandIsInter[uiArrayAddr] = true;
    3534 #if H_3D_NBDV
    3535       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    3536       pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
    3537 #endif
    3538       if ( mrgCandIdx == iCount )
    3539       {
    3540         return;
    3541       }
    3542       iCount++;
    3543     }
    3544   }
    3545   // early termination
    3546   if (iCount == getSlice()->getMaxNumMergeCand())
    3547   {
    3548     return;
    3549   }
    3550   UInt uiArrayAddr = iCount;
    3551   UInt uiCutoff = uiArrayAddr;
    3552  
    3553   if ( getSlice()->isInterB() && iCount<5)  // JCT3V-F0129 by Qualcomm
    3554   {
    3555     UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3};
    3556     UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2};
    3557 
    3558     for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++)
    3559     {
    3560       Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx];
    3561       if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2))
    3562       {
    3563         abCandIsInter[uiArrayAddr] = true;
    3564         puhInterDirNeighbours[uiArrayAddr] = 3;
    3565 
    3566         // get Mv from cand[i] and cand[j]
    3567         pcMvFieldNeighbours[uiArrayAddr << 1].setMvField(pcMvFieldNeighbours[i<<1].getMv(), pcMvFieldNeighbours[i<<1].getRefIdx());
    3568         pcMvFieldNeighbours[( uiArrayAddr << 1 ) + 1].setMvField(pcMvFieldNeighbours[(j<<1)+1].getMv(), pcMvFieldNeighbours[(j<<1)+1].getRefIdx());
    3569 
    3570         Int iRefPOCL0 = m_pcSlice->getRefPOC( REF_PIC_LIST_0, pcMvFieldNeighbours[(uiArrayAddr<<1)].getRefIdx() );
    3571         Int iRefPOCL1 = m_pcSlice->getRefPOC( REF_PIC_LIST_1, pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getRefIdx() );
    3572         if (iRefPOCL0 == iRefPOCL1 && pcMvFieldNeighbours[(uiArrayAddr<<1)].getMv() == pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getMv())
    3573         {
    3574           abCandIsInter[uiArrayAddr] = false;
    3575         }
    3576         else
    3577         {
    3578           uiArrayAddr++;
    3579         }
    3580       }
    3581     }
    3582   }
    3583   // early termination
    3584   if (uiArrayAddr == getSlice()->getMaxNumMergeCand())
    3585   {
    3586     return;
    3587   }
    3588  
    3589   Int iNumRefIdx = (getSlice()->isInterB()) ? min(m_pcSlice->getNumRefIdx(REF_PIC_LIST_0), m_pcSlice->getNumRefIdx(REF_PIC_LIST_1)) : m_pcSlice->getNumRefIdx(REF_PIC_LIST_0);
    3590   Int r = 0;
    3591   Int refcnt = 0;
    3592   while (uiArrayAddr < getSlice()->getMaxNumMergeCand())
    3593   {
    3594     abCandIsInter[uiArrayAddr] = true;
    3595     puhInterDirNeighbours[uiArrayAddr] = 1;
    3596     pcMvFieldNeighbours[uiArrayAddr << 1].setMvField( TComMv(0, 0), r);
    3597 
    3598     if ( getSlice()->isInterB() )
    3599     {
    3600       puhInterDirNeighbours[uiArrayAddr] = 3;
    3601       pcMvFieldNeighbours[(uiArrayAddr << 1) + 1].setMvField(TComMv(0, 0), r);
    3602     }
    3603     uiArrayAddr++;
    3604     if ( refcnt == iNumRefIdx - 1 )
    3605     {
    3606       r = 0;
    3607     }
    3608     else
    3609     {
    3610       ++r;
    3611       ++refcnt;
    3612     }
    3613   }
    3614  
    3615   numValidMergeCand = uiArrayAddr;
    3616 }
    3617 
    3618 
    3619 
    3620 /** Constructs a list of merging candidates
    3621  * \param uiAbsPartIdx
    3622  * \param uiPUIdx
    3623  * \param uiDepth
    3624  * \param pcMvFieldNeighbours
    3625  * \param puhInterDirNeighbours
    3626  * \param numValidMergeCand
    3627  */
    3628 #if H_3D
    3629 Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    3630 #else
    3631 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    3632 #endif
    3633 #if H_3D_SPIVMP
    3634       , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    3635 #endif
    3636       , Int& numValidMergeCand, Int mrgCandIdx
    3637 )
    3638 {
    3639 #if H_3D_IV_MERGE
    3640   ////////////////////////////
    3641   //////// INIT LISTS ////////
    3642   ////////////////////////////
    3643   TComMv cZeroMv;
    3644 #else
    3645   Bool abCandIsInter[ MRG_MAX_NUM_CANDS ];
    3646 #endif
    3647 #if H_3D
    3648   TComMvField tmpMV[2];
    3649   UChar tmpDir;
    3650 
    3651 
    3652   //////////////////////////////////
    3653   //////// GET DISPARITIES  ////////
    3654   //////////////////////////////////
    3655   DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    3656   m_cDefaultDisInfo = cDisInfo;
    3657 
    3658   if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0))  // current slice is not both dependent view or depth
    3659   {
    3660     return;
    3661   }
    3662 #else
    3663   for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui )
    3664   {
    3665     abCandIsInter[ui] = false;
    3666     pcMvFieldNeighbours[ ( ui << 1 )     ].setRefIdx(NOT_VALID);
    3667     pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID);
    3668   }
    3669 #endif
    3670 
    3671   numValidMergeCand = getSlice()->getMaxNumMergeCand();
    3672 #if H_3D
    3673   //////////////////////////////////
    3674   //////// DERIVE LOCATIONS ////////
    3675   //////////////////////////////////
    3676 #endif
    3677   // compute the location of the current PU
    3678   Int xP, yP, nPSW, nPSH;
    3679   this->getPartPosition(uiPUIdx, xP, yP, nPSW, nPSH);
    3680 
    3681   Int iCount = 0;
    3682 
    3683   UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB;
    3684 #if !H_3D
    3685   PartSize cCurPS = getPartitionSize( uiAbsPartIdx );
    3686 #endif
    3687   deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    3688   deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
    3689 #if H_3D
     3313#if NH_3D_TEXT_MERGE
    36903314  Bool bMPIFlag   = getSlice()->getMpiFlag();
     3315  Int  tmpDir;
     3316#endif
     3317#if NH_3D_IV_MERGE || NH_3D_TEXT_MERGE
    36913318  Bool bIsDepth = getSlice()->getIsDepth();
    3692 #endif 
     3319#endif
    36933320
    36943321#if NH_3D_IC
    36953322  Bool bICFlag = getICFlag(uiAbsPartIdx);
    36963323#endif
    3697 #if H_3D_ARP
     3324#if NH_3D_ARP
    36983325  Bool bARPFlag = getARPW(uiAbsPartIdx) > 0;
    36993326#endif
    3700 #if H_3D_DBBP
     3327#if NH_3D_DBBP
    37013328  Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx);
    37023329  assert(bDBBPFlag == getDBBPFlag(0)); 
    37033330#endif
    37043331
    3705 #if H_3D
    3706 #if H_3D_NBDV
     3332#if NH_3D_NBDV
    37073333  for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 
    37083334  {
    3709     pcMvFieldNeighbours[i<<1    ].getMv().setIDVFlag (false);
    3710     pcMvFieldNeighbours[(i<<1)+1].getMv().setIDVFlag (false);
    3711   }
    3712 #endif
    3713   // Clean version for MCL construction align with WD
    3714   // init mergCands list
     3335    pcMFieldNeighbours[i<<1    ].getMv().setIDVFlag (false);
     3336    pcMFieldNeighbours[(i<<1)+1].getMv().setIDVFlag (false);
     3337  }
     3338#endif
     3339  // init containers
    37153340  for (Int i = 0; i<MRG_IVSHIFT+1; i++)
    3716   {
    37173341    m_mergCands[i].init();
    3718   }
    3719 
    3720   m_baseListidc = 0;
    3721 
     3342
     3343  m_numSpatialCands = 0;
     3344
     3345  //////////////////////////////////
     3346  ///////// GET VSP FLAGS //////////
     3347  //////////////////////////////////
    37223348  //left
    37233349  UInt uiLeftPartIdx = 0;
     
    37273353  if (getAvailableFlagA1())
    37283354  {
    3729     m_mergCands[MRG_A1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]
    3730 #if H_3D_VSP
     3355    m_mergCands[MRG_A1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
     3356#if NH_3D_VSP
    37313357    , (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0
    37323358#if NH_3D_IC
    37333359      && !bICFlag
    37343360#endif
    3735 #if H_3D_ARP
     3361#if NH_3D_ARP
    37363362      && !bARPFlag
    37373363#endif
    3738 #if H_3D_DBBP
     3364#if NH_3D_DBBP
    37393365      && !bDBBPFlag
    37403366#endif
    37413367      )
    37423368#endif
     3369#if NH_3D_SPIVMP
    37433370      , false
     3371#endif
    37443372      );
    3745     m_baseListidc++;
     3373    m_numSpatialCands++;
    37463374  }
    37473375
    37483376  // above
    3749 
    37503377  if (getAvailableFlagB1())
    37513378  {
    3752     m_mergCands[MRG_B1].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]
    3753 #if H_3D_VSP
     3379    m_mergCands[MRG_B1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
     3380#if NH_3D_VSP
    37543381    , false
    37553382#endif
     3383#if NH_3D_SPIVMP
    37563384      , false
     3385#endif
    37573386      );
    3758     m_baseListidc++;
     3387    m_numSpatialCands++;
    37593388  }
    37603389
    37613390  // above right
    3762 
    37633391  if (getAvailableFlagB0())
    37643392  {
    3765     m_mergCands[MRG_B0].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]
    3766 #if H_3D_VSP
    3767     ,
    3768       false
    3769 #endif
     3393    m_mergCands[MRG_B0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
     3394#if NH_3D_VSP
     3395    , false
     3396#endif
     3397#if NH_3D_SPIVMP
    37703398      , false
     3399#endif
    37713400      );
    3772     m_baseListidc++;
     3401    m_numSpatialCands++;
    37733402  }
    37743403
    37753404  // left bottom
    3776 
    37773405  if (getAvailableFlagA0())
    37783406  {
    3779     m_mergCands[MRG_A0].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]
    3780 #if H_3D_VSP
     3407    m_mergCands[MRG_A0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
     3408#if NH_3D_VSP
    37813409    , false
    37823410#endif
     3411#if NH_3D_SPIVMP
    37833412      , false
     3413#endif
    37843414      );
    3785     m_baseListidc++;
     3415    m_numSpatialCands++;
    37863416  }
    37873417
    37883418  // above left
    3789 
    37903419  if (getAvailableFlagB2())
    37913420  {
    3792     m_mergCands[MRG_B2].setCand( &pcMvFieldNeighbours[m_baseListidc<<1], puhInterDirNeighbours[m_baseListidc]
    3793 #if H_3D_VSP
     3421    m_mergCands[MRG_B2].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
     3422#if NH_3D_VSP
    37943423    , false
    37953424#endif
     3425#if NH_3D_SPIVMP
    37963426      , false
     3427#endif
    37973428      );
    3798     m_baseListidc++;
    3799   }
    3800 
    3801 #endif
    3802 
    3803 
    3804 #if H_3D_IV_MERGE
     3429    m_numSpatialCands++;
     3430  }
     3431
     3432
     3433#if NH_3D_TEXT_MERGE
    38053434
    38063435  /////////////////////////////////////////////
     
    38283457
    38293458      this->getPartIndexAndSize( uiPUIdx, uiPartAddr, iWidth, iHeight );
    3830       pcTexRec->getTopLeftSamplePos( this->getAddr(), this->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
     3459      pcTexRec->getTopLeftSamplePos( this->getCtuRsAddr(), this->getZorderIdxInCtu() + uiPartAddr, iCurrPosX, iCurrPosY );
    38313460
    38323461      Int iPUWidth, iPUHeight, iNumPart, iNumPartLine;
     
    38533482
    38543483      Int         iTexPosX, iTexPosY;
     3484#if NH_3D_INTEGER_MV_DEPTH
    38553485      const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    3856 
     3486#endif
    38573487      Int         iCenterPosX = iCurrPosX + ( ( iWidth /  iPUWidth ) >> 1 )  * iPUWidth + ( iPUWidth >> 1 );
    38583488      Int         iCenterPosY = iCurrPosY + ( ( iHeight /  iPUHeight ) >> 1 )  * iPUHeight + (iPUHeight >> 1);
     
    38683498
    38693499      pcTexRec->getCUAddrAndPartIdx( iCenterPosX , iCenterPosY , iTexCenterCUAddr, iTexCenterAbsPartIdx );
    3870       TComDataCU* pcDefaultCU    = pcTexPic->getCU( iTexCenterCUAddr );
     3500      TComDataCU* pcDefaultCU    = pcTexPic->getCtu( iTexCenterCUAddr );
    38713501
    38723502      if( pcDefaultCU->getPredictionMode( iTexCenterAbsPartIdx ) != MODE_INTRA )
     
    38873517              {
    38883518                bSPIVMPFlag = true;
     3519#if NH_3D_INTEGER_MV_DEPTH
    38893520                TComMv cMv = cDefaultMvField.getMv() + cMvRounding;
    38903521                cMv >>= 2;
     3522#else
     3523                TComMv cMv = cDefaultMvField.getMv();
     3524#endif
    38913525                cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ;
    38923526                break;
     
    39133547            iTexPosY     = i + iOffsetY;
    39143548            pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx );
    3915             pcTexCU  = pcTexPic->getCU( iTexCUAddr );
     3549            pcTexCU  = pcTexPic->getCtu( iTexCUAddr );
    39163550
    39173551            if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) )
     
    39253559                if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) )
    39263560                {
     3561#if NH_3D_INTEGER_MV_DEPTH
    39273562                  TComMv cMv = cTexMvField.getMv() + cMvRounding;
    39283563                  cMv >>=2;         
     3564#else
     3565                  TComMv cMv = cTexMvField.getMv();
     3566#endif         
    39293567                  pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef);
    39303568                }
     
    39453583          }
    39463584        }
    3947 #if H_3D
    3948       }
    3949 #endif
     3585      }
    39503586#if H_3D_FCO
    39513587    }
     
    39753611    }
    39763612  }
     3613#endif
     3614
     3615#if NH_3D_IV_MERGE
    39773616  /////////////////////////////////////////////////////////////////
    39783617  //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC  Candidates /////
     
    39923631  if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1)
    39933632  {
     3633#if H_3D_IC
    39943634    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag );
     3635#else
     3636    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, false );
     3637#endif
    39953638  } 
    39963639
     
    40483691        spiMvpFlag = true;
    40493692      }
    4050 #if H_3D_DBBP
     3693#if NH_3D_DBBP
    40513694      spiMvpFlag &= !bDBBPFlag;
    40523695#endif
     
    40693712#endif
    40703713
     3714  iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable;
     3715
     3716#if NH_3D_VSP
     3717  /////////////////////////////////////////////////
     3718  //////// VIEW SYNTHESIS PREDICTION (VSP) ////////
     3719  /////////////////////////////////////////////////
     3720  if (iCount<getSlice()->getMaxNumMergeCand())
     3721  {
     3722    if (
     3723      (!getAvailableFlagA1() || !(pcCULeft->getVSPFlag(uiLeftPartIdx) != 0)) &&
     3724#if NH_3D_IC
     3725      !bICFlag &&
     3726#endif
     3727#if NH_3D_ARP
     3728      !bARPFlag &&
     3729#endif
    40713730#if H_3D
    4072   iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable;
     3731      (nPSW + nPSH > 12) &&
     3732#endif
     3733#if NH_3D_DBBP
     3734      !bDBBPFlag &&
     3735#endif
     3736      xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) )
     3737    {
     3738      return;
     3739    }
     3740
     3741    // early termination
     3742    if (iCount == getSlice()->getMaxNumMergeCand())
     3743    {
     3744      return;
     3745    }
     3746  }
     3747#endif
     3748
     3749  iCount += m_mergCands[MRG_B0].m_bAvailable;
     3750
     3751#if NH_3D_IV_MERGE
     3752  /////////////////////////////////////////////
     3753  //////// INTER VIEW DISP COMP (IvDC) ////////
     3754  /////////////////////////////////////////////
     3755  if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() )
     3756  {
     3757    assert(iCount < getSlice()->getMaxNumMergeCand());
     3758
     3759    tmpMV[0].setMvField( cZeroMv, NOT_VALID );
     3760    tmpMV[1].setMvField( cZeroMv, NOT_VALID );
     3761    if( ( ivCandDir[1] & 1 ) == 1 )
     3762    {
     3763      tmpMV[0].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] );
     3764    }
     3765    if( ( ivCandDir[1] & 2 ) == 2 )
     3766    {
     3767      tmpMV[1].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );
     3768    }
     3769
     3770    Bool bRemoveSpa = false; //pruning to A1, B1
     3771    for(Int i = 0; i < 2; i ++)
     3772    {
     3773      if ( !m_mergCands[MRG_A1+i].m_bAvailable )
     3774      {
     3775        continue;
     3776      }
     3777      if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1])
     3778      {
     3779        bRemoveSpa                      = true;
     3780        break;
     3781      }     
     3782    }
     3783    if(!bRemoveSpa)
     3784    {
     3785#if NH_3D_NBDV
     3786      tmpMV[0].getMv().setIDVFlag (false);
     3787      tmpMV[1].getMv().setIDVFlag (false);
     3788#endif
     3789      m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false);
     3790
     3791      if ( mrgCandIdx == iCount )
     3792        return;
     3793      iCount ++;
     3794
     3795      // early termination
     3796      if (iCount == getSlice()->getMaxNumMergeCand())
     3797      {
     3798        return;
     3799      }
     3800    }
     3801  }
     3802#endif // H_3D_IV_MERGE
     3803
     3804  iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable;
     3805
     3806#if NH_3D_IV_MERGE
     3807  ////////////////////////////////////////////////////
     3808  //////// SHIFTED IV (IvMCShift + IvDCShift) ////////
     3809  ////////////////////////////////////////////////////
     3810  if(  ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() )
     3811  {
     3812    if(xAddIvMRGCand( mrgCandIdx,  iCount, ivCandDir, ivCandMv, ivCandRefIdx ) )
     3813    {
     3814      return;
     3815    }
     3816    //early termination
     3817    if (iCount == getSlice()->getMaxNumMergeCand())
     3818    {
     3819      return;
     3820    }
     3821  }
     3822#endif
     3823}
     3824#endif
     3825
     3826//! Construct a list of merging candidates
     3827Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx )
     3828{
     3829  UInt uiAbsPartAddr = m_absZIdxInCtu + uiAbsPartIdx;
     3830#if NH_3D_MLC
     3831  Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];
    40733832#else
     3833  Bool abCandIsInter[ MRG_MAX_NUM_CANDS ];
     3834#endif
     3835  for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui )
     3836  {
     3837    abCandIsInter[ui] = false;
     3838    pcMvFieldNeighbours[ ( ui << 1 )     ].setRefIdx(NOT_VALID);
     3839    pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID);
     3840  }
     3841  numValidMergeCand = getSlice()->getMaxNumMergeCand();
     3842  // compute the location of the current PU
     3843  Int xP, yP, nPSW, nPSH;
     3844  this->getPartPosition(uiPUIdx, xP, yP, nPSW, nPSH);
     3845
     3846  Int iCount = 0;
     3847
     3848  UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB;
     3849  PartSize cCurPS = getPartitionSize( uiAbsPartIdx );
     3850  deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
     3851  deriveLeftBottomIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
     3852
    40743853  //left
    40753854  UInt uiLeftPartIdx = 0;
    40763855  TComDataCU* pcCULeft = 0;
    40773856  pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB );
     3857
    40783858  Bool isAvailableA1 = pcCULeft &&
    4079     pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) &&
    4080     !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) &&
    4081     !pcCULeft->isIntra( uiLeftPartIdx ) ;
     3859                       pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) &&
     3860                       !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) &&
     3861                       pcCULeft->isInter( uiLeftPartIdx ) ;
     3862
    40823863  if ( isAvailableA1 )
    40833864  {
     3865#if NH_3D_MLC
     3866    m_bAvailableFlagA1 = 1;
     3867#endif
    40843868    abCandIsInter[iCount] = true;
    40853869    // get Inter Dir
     
    40913875      pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    40923876    }
    4093 
    40943877    if ( mrgCandIdx == iCount )
    40953878    {
     
    41003883
    41013884  // early termination
    4102   if (iCount == getSlice()->getMaxNumMergeCand()) 
     3885  if (iCount == getSlice()->getMaxNumMergeCand())
    41033886  {
    41043887    return;
    41053888  }
    4106 
    41073889  // above
    41083890  UInt uiAbovePartIdx = 0;
    41093891  TComDataCU* pcCUAbove = 0;
    41103892  pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );
     3893
    41113894  Bool isAvailableB1 = pcCUAbove &&
    4112     pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) &&
    4113     !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) &&
    4114     !pcCUAbove->isIntra( uiAbovePartIdx );
     3895                       pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) &&
     3896                       !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) &&
     3897                       pcCUAbove->isInter( uiAbovePartIdx );
     3898
    41153899  if ( isAvailableB1 && (!isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) )
    41163900  {
     3901#if NH_3D_MLC
     3902    m_bAvailableFlagB1 = 1;
     3903#endif
    41173904    abCandIsInter[iCount] = true;
    41183905    // get Inter Dir
     
    41243911      pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    41253912    }
    4126 
    41273913    if ( mrgCandIdx == iCount )
    41283914    {
     
    41323918  }
    41333919  // early termination
    4134   if (iCount == getSlice()->getMaxNumMergeCand()) 
     3920  if (iCount == getSlice()->getMaxNumMergeCand())
    41353921  {
    41363922    return;
     
    41413927  TComDataCU* pcCUAboveRight = 0;
    41423928  pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );
     3929
    41433930  Bool isAvailableB0 = pcCUAboveRight &&
    4144     pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) &&
    4145     !pcCUAboveRight->isIntra( uiAboveRightPartIdx );
     3931                       pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) &&
     3932                       pcCUAboveRight->isInter( uiAboveRightPartIdx );
     3933
    41463934  if ( isAvailableB0 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) )
    41473935  {
     3936#if NH_3D_MLC
     3937    m_bAvailableFlagB0 = 1;
     3938#endif
    41483939    abCandIsInter[iCount] = true;
    41493940    // get Inter Dir
     
    41553946      pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    41563947    }
    4157 
    41583948    if ( mrgCandIdx == iCount )
    41593949    {
     
    41633953  }
    41643954  // early termination
    4165   if (iCount == getSlice()->getMaxNumMergeCand()) 
     3955  if (iCount == getSlice()->getMaxNumMergeCand())
    41663956  {
    41673957    return;
    41683958  }
    4169 #endif
    4170 
    4171 
    4172 #if H_3D_VSP
    4173   /////////////////////////////////////////////////
    4174   //////// VIEW SYNTHESIS PREDICTION (VSP) ////////
    4175   /////////////////////////////////////////////////
    4176   if (iCount<getSlice()->getMaxNumMergeCand())
    4177   {
    4178     if (
    4179       (!getAvailableFlagA1() || !(pcCULeft->getVSPFlag(uiLeftPartIdx) != 0)) &&
    4180 #if NH_3D_IC
    4181       !bICFlag &&
    4182 #endif
    4183 #if H_3D_ARP
    4184       !bARPFlag &&
    4185 #endif
    4186 #if H_3D
    4187       (nPSW + nPSH > 12) &&
    4188 #endif
    4189 #if H_3D_DBBP
    4190       !bDBBPFlag &&
    4191 #endif
    4192       xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) )
    4193     {
    4194       return;
    4195     }
    4196 
    4197     // early termination
    4198     if (iCount == getSlice()->getMaxNumMergeCand())
    4199     {
    4200       return;
    4201     }
    4202 #endif
    4203 #if H_3D_VSP
    4204   }
    4205 #endif
    4206 
    4207 #if H_3D
    4208   iCount += m_mergCands[MRG_B0].m_bAvailable;
    4209 #endif
    4210 
    4211 
    4212 #if H_3D_IV_MERGE
    4213   /////////////////////////////////////////////
    4214   //////// INTER VIEW DISP COMP (IvDC) ////////
    4215   /////////////////////////////////////////////
    4216   if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() )
    4217   {
    4218     assert(iCount < getSlice()->getMaxNumMergeCand());
    4219 
    4220     tmpMV[0].setMvField( cZeroMv, NOT_VALID );
    4221     tmpMV[1].setMvField( cZeroMv, NOT_VALID );
    4222     if( ( ivCandDir[1] & 1 ) == 1 )
    4223     {
    4224       tmpMV[0].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] );
    4225     }
    4226     if( ( ivCandDir[1] & 2 ) == 2 )
    4227     {
    4228       tmpMV[1].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );
    4229     }
    4230 
    4231     Bool bRemoveSpa = false; //pruning to A1, B1
    4232     for(Int i = 0; i < 2; i ++)
    4233     {
    4234       if ( !m_mergCands[MRG_A1+i].m_bAvailable )
    4235       {
    4236         continue;
    4237       }
    4238       if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1])
    4239       {
    4240         bRemoveSpa                      = true;
    4241         break;
    4242       }     
    4243     }
    4244     if(!bRemoveSpa)
    4245     {
    4246 #if H_3D_NBDV
    4247       tmpMV[0].getMv().setIDVFlag (false);
    4248       tmpMV[1].getMv().setIDVFlag (false);
    4249 #endif
    4250       m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false);
    4251 
    4252       if ( mrgCandIdx == iCount )
    4253         return;
    4254       iCount ++;
    4255 
    4256       // early termination
    4257       if (iCount == getSlice()->getMaxNumMergeCand())
    4258       {
    4259         return;
    4260       }
    4261     }
    4262   }
    4263 #endif // H_3D_IV_MERGE
    4264 
    4265 
    4266 #if H_3D
    4267   iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable;
    4268 #else
     3959
    42693960  //left bottom
    42703961  UInt uiLeftBottomPartIdx = 0;
    42713962  TComDataCU* pcCULeftBottom = 0;
    42723963  pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );
     3964
    42733965  Bool isAvailableA0 = pcCULeftBottom &&
    4274   pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) &&
    4275   !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ;
     3966                       pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) &&
     3967                       pcCULeftBottom->isInter( uiLeftBottomPartIdx ) ;
     3968
    42763969  if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) )
    42773970  {
     3971#if NH_3D_MLC
     3972    m_bAvailableFlagA0 = 1;
     3973#endif
    42783974    abCandIsInter[iCount] = true;
    42793975    // get Inter Dir
     
    42923988  }
    42933989  // early termination
    4294   if (iCount == getSlice()->getMaxNumMergeCand()) 
     3990  if (iCount == getSlice()->getMaxNumMergeCand())
    42953991  {
    42963992    return;
    42973993  }
    42983994
    4299   // above left 
     3995  // above left
    43003996  if( iCount < 4 )
    43013997  {
     
    43033999    TComDataCU* pcCUAboveLeft = 0;
    43044000    pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );
     4001
    43054002    Bool isAvailableB2 = pcCUAboveLeft &&
    4306     pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) &&
    4307     !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx );
     4003                         pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) &&
     4004                         pcCUAboveLeft->isInter( uiAboveLeftPartIdx );
     4005
    43084006    if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) )
    43094007        && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) )
    43104008    {
     4009#if NH_3D_MLC
     4010      m_bAvailableFlagB2 = 1;
     4011#endif
    43114012      abCandIsInter[iCount] = true;
    43124013      // get Inter Dir
     
    43264027  }
    43274028  // early termination
    4328   if (iCount == getSlice()->getMaxNumMergeCand()) 
     4029  if (iCount == getSlice()->getMaxNumMergeCand())
    43294030  {
    43304031    return;
    43314032  }
    4332 #endif
    4333 
    4334 
    4335 #if H_3D_IV_MERGE
    4336   ////////////////////////////////////////////////////
    4337   //////// SHIFTED IV (IvMCShift + IvDCShift) ////////
    4338   ////////////////////////////////////////////////////
    4339   if(  ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() )
    4340   {
    4341     if(xAddIvMRGCand( mrgCandIdx,  iCount, ivCandDir, ivCandMv, ivCandRefIdx ) )
    4342     {
    4343       return;
    4344     }
    4345     //early termination
    4346     if (iCount == getSlice()->getMaxNumMergeCand())
    4347     {
    4348       return;
    4349     }
    4350   }
    4351 #endif
    4352 #if !H_3D
    4353   if ( getSlice()->getEnableTMVPFlag())
     4033
     4034  if ( getSlice()->getEnableTMVPFlag() )
    43544035  {
    43554036    //>> MTK colocated-RightBottom
    43564037    UInt uiPartIdxRB;
    43574038
    4358     deriveRightBottomIdx( uiPUIdx, uiPartIdxRB ); 
     4039    deriveRightBottomIdx( uiPUIdx, uiPartIdxRB );
    43594040
    43604041    UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
    4361     UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
     4042    const UInt numPartInCtuWidth  = m_pcPic->getNumPartInCtuWidth();
     4043    const UInt numPartInCtuHeight = m_pcPic->getNumPartInCtuHeight();
    43624044
    43634045    TComMv cColMv;
    43644046    Int iRefIdx;
    4365     Int uiLCUIdx = -1;
    4366 
    4367     if      ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )  // image boundary check
    4368     {
    4369     }
    4370     else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
    4371     {
    4372     }
    4373     else
    4374     {
    4375       if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) &&           // is not at the last column of LCU
    4376         ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row    of LCU
    4377       {
    4378         uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];
    4379         uiLCUIdx = getAddr();
    4380       }
    4381       else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 )           // is not at the last column of LCU But is last row of LCU
    4382       {
    4383         uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ];
    4384       }
    4385       else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
     4047    Int ctuRsAddr = -1;
     4048
     4049    if (   ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples () )  // image boundary check
     4050        && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     4051    {
     4052      if ( ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 ) &&           // is not at the last column of CTU
     4053        ( uiAbsPartIdxTmp / numPartInCtuWidth < numPartInCtuHeight - 1 ) )              // is not at the last row    of CTU
     4054      {
     4055        uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + numPartInCtuWidth + 1 ];
     4056        ctuRsAddr = getCtuRsAddr();
     4057      }
     4058      else if ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 )           // is not at the last column of CTU But is last row of CTU
     4059      {
     4060        uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + numPartInCtuWidth + 1) % m_pcPic->getNumPartitionsInCtu() ];
     4061      }
     4062      else if ( uiAbsPartIdxTmp / numPartInCtuWidth < numPartInCtuHeight - 1 )          // is not at the last row of CTU But is last column of CTU
    43864063      {
    43874064        uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
    4388         uiLCUIdx = getAddr() + 1;
    4389       }
    4390       else //is the right bottom corner of LCU                       
     4065        ctuRsAddr = getCtuRsAddr() + 1;
     4066      }
     4067      else //is the right bottom corner of CTU
    43914068      {
    43924069        uiAbsPartAddr = 0;
    43934070      }
    43944071    }
    4395    
    4396    
     4072
    43974073    iRefIdx = 0;
     4074
    43984075    Bool bExistMV = false;
    43994076    UInt uiPartIdxCenter;
    4400     UInt uiCurLCUIdx = getAddr();
    44014077    Int dir = 0;
    44024078    UInt uiArrayAddr = iCount;
    44034079    xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );
    4404     bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_0, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx );
     4080    bExistMV = ctuRsAddr >= 0 && xGetColMVP( REF_PIC_LIST_0, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx );
    44054081    if( bExistMV == false )
    44064082    {
    4407       bExistMV = xGetColMVP( REF_PIC_LIST_0, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx );
     4083      bExistMV = xGetColMVP( REF_PIC_LIST_0, getCtuRsAddr(), uiPartIdxCenter, cColMv, iRefIdx );
    44084084    }
    44094085    if( bExistMV )
     
    44154091    if ( getSlice()->isInterB() )
    44164092    {
    4417       bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx);
     4093#if NH_3D_TMVP
     4094      iRefIdx = 0;
     4095#endif
     4096      bExistMV = ctuRsAddr >= 0 && xGetColMVP( REF_PIC_LIST_1, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx);
    44184097      if( bExistMV == false )
    44194098      {
    4420         bExistMV = xGetColMVP( REF_PIC_LIST_1, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx );
     4099        bExistMV = xGetColMVP( REF_PIC_LIST_1, getCtuRsAddr(), uiPartIdxCenter, cColMv, iRefIdx );
    44214100      }
    44224101      if( bExistMV )
     
    44264105      }
    44274106    }
    4428    
     4107
    44294108    if (dir != 0)
    44304109    {
    44314110      puhInterDirNeighbours[uiArrayAddr] = dir;
    44324111      abCandIsInter[uiArrayAddr] = true;
     4112#if NH_3D_NBDV
     4113      pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
     4114      pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
     4115#endif
     4116
    44334117      if ( mrgCandIdx == iCount )
    44344118      {
     
    44384122    }
    44394123  }
    4440   // early termination 
    4441   if (iCount == getSlice()->getMaxNumMergeCand()) 
     4124  // early termination
     4125  if (iCount == getSlice()->getMaxNumMergeCand())
    44424126  {
    44434127    return;
    44444128  }
     4129
    44454130  UInt uiArrayAddr = iCount;
    44464131  UInt uiCutoff = uiArrayAddr;
    4447    
    4448   if ( getSlice()->isInterB())
    4449   {
    4450     UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3};
    4451     UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2};
     4132
     4133#if NH_3D_MLC
     4134  if ( getSlice()->isInterB() && iCount<5)
     4135#else
     4136  if ( getSlice()->isInterB() )
     4137#endif
     4138  {
     4139    static const UInt NUM_PRIORITY_LIST=12;
     4140    static const UInt uiPriorityList0[NUM_PRIORITY_LIST] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3};
     4141    static const UInt uiPriorityList1[NUM_PRIORITY_LIST] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2};
    44524142
    44534143    for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++)
    44544144    {
    4455       Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx];
     4145      assert(idx<NUM_PRIORITY_LIST);
     4146      Int i = uiPriorityList0[idx];
     4147      Int j = uiPriorityList1[idx];
    44564148      if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2))
    44574149      {
     
    44774169  }
    44784170  // early termination
    4479   if (uiArrayAddr == getSlice()->getMaxNumMergeCand()) 
     4171  if (uiArrayAddr == getSlice()->getMaxNumMergeCand())
    44804172  {
    44814173    return;
    44824174  }
     4175
    44834176  Int iNumRefIdx = (getSlice()->isInterB()) ? min(m_pcSlice->getNumRefIdx(REF_PIC_LIST_0), m_pcSlice->getNumRefIdx(REF_PIC_LIST_1)) : m_pcSlice->getNumRefIdx(REF_PIC_LIST_0);
     4177
    44844178  Int r = 0;
    44854179  Int refcnt = 0;
     
    44964190    }
    44974191    uiArrayAddr++;
     4192
    44984193    if ( refcnt == iNumRefIdx - 1 )
    44994194    {
     
    45064201    }
    45074202  }
    4508 
    45094203  numValidMergeCand = uiArrayAddr;
    4510 #endif
    4511 }
    4512 #else
    4513 
    4514 //! Construct a list of merging candidates
    4515 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx )
    4516 {
    4517   UInt uiAbsPartAddr = m_absZIdxInCtu + uiAbsPartIdx;
    4518   Bool abCandIsInter[ MRG_MAX_NUM_CANDS ];
    4519   for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui )
    4520   {
    4521     abCandIsInter[ui] = false;
    4522     pcMvFieldNeighbours[ ( ui << 1 )     ].setRefIdx(NOT_VALID);
    4523     pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID);
    4524   }
    4525   numValidMergeCand = getSlice()->getMaxNumMergeCand();
    4526   // compute the location of the current PU
    4527   Int xP, yP, nPSW, nPSH;
    4528   this->getPartPosition(uiPUIdx, xP, yP, nPSW, nPSH);
    4529 
    4530   Int iCount = 0;
    4531 
    4532   UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB;
    4533   PartSize cCurPS = getPartitionSize( uiAbsPartIdx );
    4534   deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    4535   deriveLeftBottomIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
    4536 
    4537   //left
    4538   UInt uiLeftPartIdx = 0;
    4539   TComDataCU* pcCULeft = 0;
    4540   pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB );
    4541 
    4542   Bool isAvailableA1 = pcCULeft &&
    4543                        pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) &&
    4544                        !( uiPUIdx == 1 && (cCurPS == SIZE_Nx2N || cCurPS == SIZE_nLx2N || cCurPS == SIZE_nRx2N) ) &&
    4545                        pcCULeft->isInter( uiLeftPartIdx ) ;
    4546 
    4547   if ( isAvailableA1 )
    4548   {
    4549     abCandIsInter[iCount] = true;
    4550     // get Inter Dir
    4551     puhInterDirNeighbours[iCount] = pcCULeft->getInterDir( uiLeftPartIdx );
    4552     // get Mv from Left
    4553     pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    4554     if ( getSlice()->isInterB() )
    4555     {
    4556       pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    4557     }
    4558     if ( mrgCandIdx == iCount )
    4559     {
    4560       return;
    4561     }
    4562     iCount ++;
    4563   }
    4564 
    4565   // early termination
    4566   if (iCount == getSlice()->getMaxNumMergeCand())
    4567   {
    4568     return;
    4569   }
    4570   // above
    4571   UInt uiAbovePartIdx = 0;
    4572   TComDataCU* pcCUAbove = 0;
    4573   pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );
    4574 
    4575   Bool isAvailableB1 = pcCUAbove &&
    4576                        pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) &&
    4577                        !( uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD) ) &&
    4578                        pcCUAbove->isInter( uiAbovePartIdx );
    4579 
    4580   if ( isAvailableB1 && (!isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) )
    4581   {
    4582     abCandIsInter[iCount] = true;
    4583     // get Inter Dir
    4584     puhInterDirNeighbours[iCount] = pcCUAbove->getInterDir( uiAbovePartIdx );
    4585     // get Mv from Left
    4586     pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    4587     if ( getSlice()->isInterB() )
    4588     {
    4589       pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    4590     }
    4591     if ( mrgCandIdx == iCount )
    4592     {
    4593       return;
    4594     }
    4595     iCount ++;
    4596   }
    4597   // early termination
    4598   if (iCount == getSlice()->getMaxNumMergeCand())
    4599   {
    4600     return;
    4601   }
    4602 
    4603   // above right
    4604   UInt uiAboveRightPartIdx = 0;
    4605   TComDataCU* pcCUAboveRight = 0;
    4606   pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );
    4607 
    4608   Bool isAvailableB0 = pcCUAboveRight &&
    4609                        pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) &&
    4610                        pcCUAboveRight->isInter( uiAboveRightPartIdx );
    4611 
    4612   if ( isAvailableB0 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) )
    4613   {
    4614     abCandIsInter[iCount] = true;
    4615     // get Inter Dir
    4616     puhInterDirNeighbours[iCount] = pcCUAboveRight->getInterDir( uiAboveRightPartIdx );
    4617     // get Mv from Left
    4618     pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    4619     if ( getSlice()->isInterB() )
    4620     {
    4621       pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    4622     }
    4623     if ( mrgCandIdx == iCount )
    4624     {
    4625       return;
    4626     }
    4627     iCount ++;
    4628   }
    4629   // early termination
    4630   if (iCount == getSlice()->getMaxNumMergeCand())
    4631   {
    4632     return;
    4633   }
    4634 
    4635   //left bottom
    4636   UInt uiLeftBottomPartIdx = 0;
    4637   TComDataCU* pcCULeftBottom = 0;
    4638   pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );
    4639 
    4640   Bool isAvailableA0 = pcCULeftBottom &&
    4641                        pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) &&
    4642                        pcCULeftBottom->isInter( uiLeftBottomPartIdx ) ;
    4643 
    4644   if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) )
    4645   {
    4646     abCandIsInter[iCount] = true;
    4647     // get Inter Dir
    4648     puhInterDirNeighbours[iCount] = pcCULeftBottom->getInterDir( uiLeftBottomPartIdx );
    4649     // get Mv from Left
    4650     pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    4651     if ( getSlice()->isInterB() )
    4652     {
    4653       pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    4654     }
    4655     if ( mrgCandIdx == iCount )
    4656     {
    4657       return;
    4658     }
    4659     iCount ++;
    4660   }
    4661   // early termination
    4662   if (iCount == getSlice()->getMaxNumMergeCand())
    4663   {
    4664     return;
    4665   }
    4666 
    4667   // above left
    4668   if( iCount < 4 )
    4669   {
    4670     UInt uiAboveLeftPartIdx = 0;
    4671     TComDataCU* pcCUAboveLeft = 0;
    4672     pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );
    4673 
    4674     Bool isAvailableB2 = pcCUAboveLeft &&
    4675                          pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) &&
    4676                          pcCUAboveLeft->isInter( uiAboveLeftPartIdx );
    4677 
    4678     if ( isAvailableB2 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) )
    4679         && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) )
    4680     {
    4681       abCandIsInter[iCount] = true;
    4682       // get Inter Dir
    4683       puhInterDirNeighbours[iCount] = pcCUAboveLeft->getInterDir( uiAboveLeftPartIdx );
    4684       // get Mv from Left
    4685       pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
    4686       if ( getSlice()->isInterB() )
    4687       {
    4688         pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    4689       }
    4690       if ( mrgCandIdx == iCount )
    4691       {
    4692         return;
    4693       }
    4694       iCount ++;
    4695     }
    4696   }
    4697   // early termination
    4698   if (iCount == getSlice()->getMaxNumMergeCand())
    4699   {
    4700     return;
    4701   }
    4702 
    4703   if ( getSlice()->getEnableTMVPFlag() )
    4704   {
    4705     //>> MTK colocated-RightBottom
    4706     UInt uiPartIdxRB;
    4707 
    4708     deriveRightBottomIdx( uiPUIdx, uiPartIdxRB );
    4709 
    4710     UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
    4711     const UInt numPartInCtuWidth  = m_pcPic->getNumPartInCtuWidth();
    4712     const UInt numPartInCtuHeight = m_pcPic->getNumPartInCtuHeight();
    4713 
    4714     TComMv cColMv;
    4715     Int iRefIdx;
    4716     Int ctuRsAddr = -1;
    4717 
    4718     if (   ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth () ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples () )  // image boundary check
    4719         && ( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
    4720     {
    4721       if ( ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 ) &&           // is not at the last column of CTU
    4722         ( uiAbsPartIdxTmp / numPartInCtuWidth < numPartInCtuHeight - 1 ) )              // is not at the last row    of CTU
    4723       {
    4724         uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + numPartInCtuWidth + 1 ];
    4725         ctuRsAddr = getCtuRsAddr();
    4726       }
    4727       else if ( uiAbsPartIdxTmp % numPartInCtuWidth < numPartInCtuWidth - 1 )           // is not at the last column of CTU But is last row of CTU
    4728       {
    4729         uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + numPartInCtuWidth + 1) % m_pcPic->getNumPartitionsInCtu() ];
    4730       }
    4731       else if ( uiAbsPartIdxTmp / numPartInCtuWidth < numPartInCtuHeight - 1 )          // is not at the last row of CTU But is last column of CTU
    4732       {
    4733         uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
    4734         ctuRsAddr = getCtuRsAddr() + 1;
    4735       }
    4736       else //is the right bottom corner of CTU
    4737       {
    4738         uiAbsPartAddr = 0;
    4739       }
    4740     }
    4741 
    4742     iRefIdx = 0;
    4743 
    4744     Bool bExistMV = false;
    4745     UInt uiPartIdxCenter;
    4746     Int dir = 0;
    4747     UInt uiArrayAddr = iCount;
    4748     xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );
    4749     bExistMV = ctuRsAddr >= 0 && xGetColMVP( REF_PIC_LIST_0, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx );
    4750     if( bExistMV == false )
    4751     {
    4752       bExistMV = xGetColMVP( REF_PIC_LIST_0, getCtuRsAddr(), uiPartIdxCenter,  cColMv, iRefIdx );
    4753     }
    4754     if( bExistMV )
    4755     {
    4756       dir |= 1;
    4757       pcMvFieldNeighbours[ 2 * uiArrayAddr ].setMvField( cColMv, iRefIdx );
    4758     }
    4759 
    4760     if ( getSlice()->isInterB() )
    4761     {
    4762 #if NH_3D_TMVP
    4763       iRefIdx =0;
    4764 #endif
    4765       bExistMV = ctuRsAddr >= 0 && xGetColMVP( REF_PIC_LIST_1, ctuRsAddr, uiAbsPartAddr, cColMv, iRefIdx);
    4766       if( bExistMV == false )
    4767       {
    4768         bExistMV = xGetColMVP( REF_PIC_LIST_1, getCtuRsAddr(), uiPartIdxCenter, cColMv, iRefIdx );
    4769       }
    4770       if( bExistMV )
    4771       {
    4772         dir |= 2;
    4773         pcMvFieldNeighbours[ 2 * uiArrayAddr + 1 ].setMvField( cColMv, iRefIdx );
    4774       }
    4775     }
    4776 
    4777     if (dir != 0)
    4778     {
    4779       puhInterDirNeighbours[uiArrayAddr] = dir;
    4780       abCandIsInter[uiArrayAddr] = true;
    4781 
    4782       if ( mrgCandIdx == iCount )
    4783       {
    4784         return;
    4785       }
    4786       iCount++;
    4787     }
    4788   }
    4789   // early termination
    4790   if (iCount == getSlice()->getMaxNumMergeCand())
    4791   {
    4792     return;
    4793   }
    4794 
    4795   UInt uiArrayAddr = iCount;
    4796   UInt uiCutoff = uiArrayAddr;
    4797 
    4798   if ( getSlice()->isInterB() )
    4799   {
    4800     static const UInt NUM_PRIORITY_LIST=12;
    4801     static const UInt uiPriorityList0[NUM_PRIORITY_LIST] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3};
    4802     static const UInt uiPriorityList1[NUM_PRIORITY_LIST] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2};
    4803 
    4804     for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++)
    4805     {
    4806       assert(idx<NUM_PRIORITY_LIST);
    4807       Int i = uiPriorityList0[idx];
    4808       Int j = uiPriorityList1[idx];
    4809       if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2))
    4810       {
    4811         abCandIsInter[uiArrayAddr] = true;
    4812         puhInterDirNeighbours[uiArrayAddr] = 3;
    4813 
    4814         // get Mv from cand[i] and cand[j]
    4815         pcMvFieldNeighbours[uiArrayAddr << 1].setMvField(pcMvFieldNeighbours[i<<1].getMv(), pcMvFieldNeighbours[i<<1].getRefIdx());
    4816         pcMvFieldNeighbours[( uiArrayAddr << 1 ) + 1].setMvField(pcMvFieldNeighbours[(j<<1)+1].getMv(), pcMvFieldNeighbours[(j<<1)+1].getRefIdx());
    4817 
    4818         Int iRefPOCL0 = m_pcSlice->getRefPOC( REF_PIC_LIST_0, pcMvFieldNeighbours[(uiArrayAddr<<1)].getRefIdx() );
    4819         Int iRefPOCL1 = m_pcSlice->getRefPOC( REF_PIC_LIST_1, pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getRefIdx() );
    4820         if (iRefPOCL0 == iRefPOCL1 && pcMvFieldNeighbours[(uiArrayAddr<<1)].getMv() == pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getMv())
    4821         {
    4822           abCandIsInter[uiArrayAddr] = false;
    4823         }
    4824         else
    4825         {
    4826           uiArrayAddr++;
    4827         }
    4828       }
    4829     }
    4830   }
    4831   // early termination
    4832   if (uiArrayAddr == getSlice()->getMaxNumMergeCand())
    4833   {
    4834     return;
    4835   }
    4836 
    4837   Int iNumRefIdx = (getSlice()->isInterB()) ? min(m_pcSlice->getNumRefIdx(REF_PIC_LIST_0), m_pcSlice->getNumRefIdx(REF_PIC_LIST_1)) : m_pcSlice->getNumRefIdx(REF_PIC_LIST_0);
    4838 
    4839   Int r = 0;
    4840   Int refcnt = 0;
    4841   while (uiArrayAddr < getSlice()->getMaxNumMergeCand())
    4842   {
    4843     abCandIsInter[uiArrayAddr] = true;
    4844     puhInterDirNeighbours[uiArrayAddr] = 1;
    4845     pcMvFieldNeighbours[uiArrayAddr << 1].setMvField( TComMv(0, 0), r);
    4846 
    4847     if ( getSlice()->isInterB() )
    4848     {
    4849       puhInterDirNeighbours[uiArrayAddr] = 3;
    4850       pcMvFieldNeighbours[(uiArrayAddr << 1) + 1].setMvField(TComMv(0, 0), r);
    4851     }
    4852     uiArrayAddr++;
    4853 
    4854     if ( refcnt == iNumRefIdx - 1 )
    4855     {
    4856       r = 0;
    4857     }
    4858     else
    4859     {
    4860       ++r;
    4861       ++refcnt;
    4862     }
    4863   }
    4864   numValidMergeCand = uiArrayAddr;
    4865 }
    4866 #endif
     4204}
    48674205
    48684206/** Check whether the current PU and a spatial neighboring PU are in a same ME region.
     
    51224460  UInt partAddr;
    51234461
    5124 #if H_3D_DBBP
     4462#if NH_3D_DBBP
    51254463  if( getDBBPFlag(0) )
    51264464  {
     
    51424480  const TComSPS &sps=*(m_pcSlice->getSPS());
    51434481  Int  iMvShift = 2;
    5144 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     4482#if NH_3D_INTEGER_MV_DEPTH
    51454483  if( getSlice()->getIsDepth() )
    51464484    iMvShift = 0;
     
    56665004#endif
    56675005
    5668 #if H_3D_IV_MERGE
     5006#if NH_3D_IV_MERGE
    56695007Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
    56705008{
     
    56765014    Int iViewIdx = getSlice()->getDefaultRefViewIdx();
    56775015    pDisp->m_aVIdxCan = iViewIdx;
    5678     Int iDisp     = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ];
     5016    Int iDisp     = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 )) ];
    56795017
    56805018    cMv.setHor(iDisp);
     
    57435081}
    57445082#endif
    5745 #if H_3D_NBDV
     5083#if NH_3D_NBDV
    57465084//Notes from QC:
    5747 //TBD#1: DoNBDV related contributions are just partially integrated under the marco of H_3D_NBDV_REF, remove this comment once DoNBDV and BVSP are done
     5085//TBD#1: DoNBDV related contributions are just partially integrated under the marco of NH_3D_NBDV_REF, remove this comment once DoNBDV and BVSP are done
    57485086//TBD#2: set of DvMCP values need to be done as part of inter-view motion prediction process. Remove this comment once merge related integration is done
    57495087//To be checked: Parallel Merge features for NBDV, related to DV_DERIVATION_PARALLEL_B0096 and LGE_IVMP_PARALLEL_MERGE_B0136 are not integrated. The need of these features due to the adoption of CU-based NBDV is not clear. We need confirmation on this, especially by proponents
    57505088Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo
    5751 #if H_3D_NBDV_REF
     5089#if NH_3D_NBDV_REF
    57525090, Bool bDepthRefine
    57535091#endif
     
    57725110    }
    57735111  }
    5774 #if H_3D_NBDV_REF
     5112#if NH_3D_NBDV_REF
    57755113  if( !m_pcSlice->getDepthRefinementFlag( ) )
    57765114  {
     
    57955133    ///*** Derive center position ***
    57965134    UInt uiPartIdxCenter;
    5797     Int  uiLCUIdx   = getAddr();
     5135    Int  uiLCUIdx = getCtuRsAddr();
    57985136    xDeriveCenterIdx(uiPartIdx, uiPartIdxCenter );
    57995137
     
    58225160        pDInfo->m_aVIdxCan  = iTargetViewIdx;
    58235161
    5824 #if H_3D_NBDV_REF
     5162#if NH_3D_NBDV_REF
    58255163        TComPic* picDepth = NULL;   
    58265164#if H_3D_FCO_VSP_DONBDV_E0163
     
    58445182        }
    58455183        pDInfo->m_acDoNBDV  = cColMv;
    5846 #endif //H_3D_NBDV_REF
     5184#endif //NH_3D_NBDV_REF
    58475185        return;
    58485186      }
     
    58585196  bCheckMcpDv = true;
    58595197  if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_LEFT
    5860 #if H_3D_NBDV_REF
     5198#if NH_3D_NBDV_REF
    58615199    , bDepthRefine
    58625200#endif
     
    58685206  if(pcTmpCU != NULL )
    58695207  {
    5870     bCheckMcpDv = ( ( getAddr() - pcTmpCU->getAddr() ) == 0);
     5208    bCheckMcpDv = ( ( getCtuRsAddr() - pcTmpCU->getCtuRsAddr() ) == 0);
    58715209    if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVE
    5872 #if H_3D_NBDV_REF
     5210#if NH_3D_NBDV_REF
    58735211      , bDepthRefine
    58745212#endif
     
    58895227          pDInfo->m_acNBDV = cDispVec;
    58905228          pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ];
    5891 #if H_3D_NBDV_REF
     5229#if NH_3D_NBDV_REF
    58925230#if H_3D_FCO_VSP_DONBDV_E0163
    58935231          TComPic* picDepth  = NULL;
     
    59275265    pDInfo->m_aVIdxCan = getSlice()->getDefaultRefViewIdx();
    59285266
    5929 #if H_3D_NBDV_REF
     5267#if NH_3D_NBDV_REF
    59305268    TComPic* picDepth = NULL;
    59315269#if H_3D_FCO_VSP_DONBDV_E0163
     
    59535291}
    59545292
    5955 #if H_3D_NBDV_REF
     5293#if NH_3D_NBDV_REF
    59565294Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iBlkWidth, Int iBlkHeight, Int* aiShiftLUT )
    59575295{
    5958   Int iPictureWidth  = pcBaseViewDepthPicYuv->getWidth();
    5959   Int iPictureHeight = pcBaseViewDepthPicYuv->getHeight();
    5960  
     5296  Int iPictureWidth  = pcBaseViewDepthPicYuv->getWidth(COMPONENT_Y);
     5297  Int iPictureHeight = pcBaseViewDepthPicYuv->getHeight(COMPONENT_Y);
     5298
    59615299  Int depthStartPosX = Clip3(0,   iPictureWidth - 1,  iBlkX + ((mv->getHor()+2)>>2));
    59625300  Int depthStartPosY = Clip3(0,   iPictureHeight - 1, iBlkY + ((mv->getVer()+2)>>2));
     
    59645302  Int depthEndPosY   = Clip3(0,   iPictureHeight - 1, iBlkY + iBlkHeight - 1 + ((mv->getVer()+2)>>2));
    59655303
    5966   Pel* depthTL  = pcBaseViewDepthPicYuv->getLumaAddr();
    5967   Int depStride =  pcBaseViewDepthPicYuv->getStride();
     5304  Pel* depthTL  = pcBaseViewDepthPicYuv->getAddr(COMPONENT_Y);
     5305  Int depStride =  pcBaseViewDepthPicYuv->getStride(COMPONENT_Y);
    59685306
    59695307  Pel  maxDepthVal = 0;
     
    59805318  if (picDepth)
    59815319  {
    5982     UInt uiAbsPartAddrCurrCU = m_uiAbsIdxInLCU + uiPartAddr;
     5320    UInt uiAbsPartAddrCurrCU = m_absZIdxInCtu + uiPartAddr;
    59835321    Int iWidth, iHeight;
    59845322    getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight ); // The modified value of uiPartAddr won't be used any more
    59855323
    59865324    TComPicYuv* pcBaseViewDepthPicYuv = picDepth->getPicYuvRec();
    5987     Int iBlkX = ( getAddr() % picDepth->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ uiAbsPartAddrCurrCU ] ];
    5988     Int iBlkY = ( getAddr() / picDepth->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ uiAbsPartAddrCurrCU ] ];
     5325    const TComSPS   &sps =*(getSlice()->getSPS());
     5326    Int iBlkX = ( getCtuRsAddr() % picDepth->getFrameWidthInCtus() ) * sps.getMaxCUWidth()  + g_auiRasterToPelX[ g_auiZscanToRaster[ uiAbsPartAddrCurrCU ] ];
     5327    Int iBlkY = ( getCtuRsAddr() / picDepth->getFrameWidthInCtus() ) * sps.getMaxCUHeight() + g_auiRasterToPelY[ g_auiZscanToRaster[ uiAbsPartAddrCurrCU ] ];
    59895328
    59905329    Int* aiShiftLUT = getSlice()->getDepthToDisparityB(refViewIdx );
     
    59945333  }
    59955334}
    5996 #endif //H_3D_NBDV_REF
     5335#endif //NH_3D_NBDV_REF
    59975336
    59985337
    59995338Bool TComDataCU::xCheckSpatialNBDV( TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paIDVInfo, UInt uiMvpDvPos
    6000 #if H_3D_NBDV_REF
     5339#if NH_3D_NBDV_REF
    60015340, Bool bDepthRefine
    60025341#endif
     
    60195358          pNbDvInfo->m_acNBDV = cMvPred;
    60205359          pNbDvInfo->m_aVIdxCan = refViewIdx;
    6021 #if H_3D_NBDV_REF
     5360#if NH_3D_NBDV_REF
    60225361          TComPic* picDepth = NULL;
    60235362          assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC());         
     
    60655404{
    60665405  UInt uiPartIdx = 0;
    6067   UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 
    6068   Int uiLCUIdx = getAddr();
     5406  UInt uiNumPartInCUWidth = m_pcPic->getNumPartInCtuWidth(); 
     5407  Int uiLCUIdx = getCtuRsAddr();
    60695408
    60705409  UInt uiPartIdxRB;
     
    60725411  UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
    60735412
    6074   if (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )
     5413  if (( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() )>= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )
    60755414  {
    60765415    riLCUIdxRBNb  = -1;
    60775416    riPartIdxRBNb = -1;
    60785417  }
    6079   else if(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
     5418  else if(( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() )>= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
    60805419  {
    60815420    riLCUIdxRBNb  = -1;
     
    60855424  {
    60865425    if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) &&           // is not at the last column of LCU
    6087       ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row    of LCU
     5426      ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInCtuHeight() - 1 ) ) // is not at the last row    of LCU
    60885427    {
    60895428      riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];
     
    60955434      riLCUIdxRBNb  = -1;
    60965435    }
    6097     else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
     5436    else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInCtuHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
    60985437    {
    60995438      riPartIdxRBNb = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
     
    61115450Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth )
    61125451{
    6113   UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);
     5452#if NH_3D_VSP // bug fix
     5453  UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1);
     5454  assert(m_pcPic->getNumPartitionsInCtu() ==m_pcPic->getNumPartInCtuWidth()*m_pcPic->getNumPartInCtuHeight());
     5455
     5456#else
     5457  UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1);
     5458#endif
    61145459  for (UInt ui = 0; ui < uiCurrPartNumb; ui++ )
    61155460  {
     
    61175462  }
    61185463}
    6119 #if H_3D_VSP
     5464#if NH_3D_VSP  || NH_3D_DBBP
    61205465Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )
    61215466{
     
    61305475  Int iColViewIdx, iColRefViewIdx;
    61315476  TComPic *pColPic = getSlice()->getRefPic( eRefPicList, refidx);
    6132   TComDataCU *pColCU = pColPic->getCU( uiCUAddr );
     5477  TComDataCU *pColCU = pColPic->getCtu( uiCUAddr );
    61335478  iColViewIdx = pColCU->getSlice()->getViewIndex();
    6134   if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE||pColCU->isIntra(uiPartUnitIdx))
     5479  if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==NUMBER_OF_PART_SIZES||pColCU->isIntra(uiPartUnitIdx))
    61355480  {
    61365481    return false;
     
    61945539
    61955540  Bool depthRefineFlag = false;
    6196 #if H_3D_NBDV_REF
     5541#if NH_3D_NBDV_REF
    61975542  depthRefineFlag = m_pcSlice->getDepthRefinementFlag( );
    6198 #endif // H_3D_NBDV_REF
     5543#endif // NH_3D_NBDV_REF
    61995544
    62005545  TComMv      cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
     
    62505595#endif
    62515596
    6252 #if H_3D_SPIVMP
     5597#if NH_3D_SPIVMP
    62535598Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight)
    62545599{
     
    62675612Void TComDataCU::getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr )
    62685613{
    6269   uiBaseAbsPartIdx += m_uiAbsIdxInLCU;
     5614  uiBaseAbsPartIdx += m_absZIdxInCtu;
    62705615  Int iBasePelX = g_auiRasterToPelX[g_auiZscanToRaster[uiBaseAbsPartIdx]];
    62715616  Int iBasePelY = g_auiRasterToPelY[g_auiZscanToRaster[uiBaseAbsPartIdx]];
    62725617  Int iCurrPelX = iBasePelX + iPartIdx%iNumPartLine * iWidth;
    62735618  Int iCurrPelY = iBasePelY + iPartIdx/iNumPartLine * iHeight;
    6274   Int iCurrRaster = iCurrPelY / getPic()->getMinCUHeight() * getPic()->getNumPartInWidth() + iCurrPelX/getPic()->getMinCUWidth();
     5619  Int iCurrRaster = iCurrPelY / getPic()->getMinCUHeight() * getPic()->getNumPartInCtuWidth() + iCurrPelX/getPic()->getMinCUWidth();
    62755620  ruiPartAddr = g_auiRasterToZscan[iCurrRaster];
    6276   ruiPartAddr -= m_uiAbsIdxInLCU
     5621  ruiPartAddr -= m_absZIdxInCtu
    62775622}
    62785623
    62795624Void TComDataCU::setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight )
    62805625{
    6281   uiAbsPartIdx += getZorderIdxInCU();
     5626  uiAbsPartIdx += getZorderIdxInCtu();
    62825627  Int iStartPelX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIdx]];
    62835628  Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]];
     
    62915636    for (Int j=iStartPelX; j < iEndPelX; j += getPic()->getMinCUWidth())
    62925637    {
    6293       iCurrRaster = i / getPic()->getMinCUHeight() * getPic()->getNumPartInWidth() + j/getPic()->getMinCUWidth();
     5638      iCurrRaster = i / getPic()->getMinCUHeight() * getPic()->getNumPartInCtuWidth() + j/getPic()->getMinCUWidth();
    62945639      uiPartAddr = g_auiRasterToZscan[iCurrRaster];
    6295       uiPartAddr -= getZorderIdxInCU(); 
     5640      uiPartAddr -= getZorderIdxInCtu(); 
    62965641
    62975642      m_puhInterDir[uiPartAddr] = uiDir;
     
    63015646#endif
    63025647
    6303 #if H_3D_IV_MERGE
     5648#if NH_3D_IV_MERGE
    63045649Bool
    63055650TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth           
    6306 #if H_3D_SPIVMP
     5651#if NH_3D_SPIVMP
    63075652, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    63085653#endif
     
    63235668
    63245669  Int  iCurrPosX, iCurrPosY;
    6325   pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
    6326 
    6327 #if !H_3D_SPIVMP
     5670  pcBaseRec->getTopLeftSamplePos( getCtuRsAddr(), getZorderIdxInCtu() + uiPartAddr, iCurrPosX, iCurrPosY );
     5671
     5672#if !NH_3D_SPIVMP
    63285673  iCurrPosX  += ( iWidth  >> 1 );
    63295674  iCurrPosY  += ( iHeight >> 1 );
     
    63315676
    63325677  Bool depthRefineFlag = false;
    6333 #if H_3D_NBDV_REF
     5678#if NH_3D_NBDV_REF
    63345679  depthRefineFlag = m_pcSlice->getDepthRefinementFlag( );
    6335 #endif // H_3D_NBDV_REF
     5680#endif // NH_3D_NBDV_REF
    63365681
    63375682  TComMv      cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
     
    63425687
    63435688  Bool abPdmAvailable[8] =  {false, false, false, false, false, false, false, false};
    6344 #if H_3D_NBDV
     5689#if NH_3D_NBDV
    63455690  for( Int i = 0; i < 8; i++)
    63465691  {
     
    63525697  {
    63535698
    6354 #if H_3D_SPIVMP
     5699#if NH_3D_SPIVMP
    63555700    ////////////////////////////////
    63565701    //////////sub-PU IvMC///////////
     
    63585703    if(!m_pcSlice->getIsDepth())
    63595704    {
     5705#if H_3D_DBBP
    63605706      if (!getDBBPFlag(0))
     5707#else
     5708      if (1)
     5709#endif
    63615710      {
    63625711        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     
    63905739        }
    63915740
    6392         Int iRefCenterPosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
    6393         Int iRefCenterPosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) );
     5741        Int iRefCenterPosX   = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
     5742        Int iRefCenterPosY   = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) );
    63945743
    63955744        pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx );
    6396         TComDataCU* pcDefaultCU    = pcBasePic->getCU( iRefCenterCUAddr );
     5745        TComDataCU* pcDefaultCU    = pcBasePic->getCtu( iRefCenterCUAddr );
    63975746        if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA ))
    63985747        {
     
    64185767                      abPdmAvailable[ uiCurrRefListId ] = true;
    64195768                      TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer());
    6420 #if H_3D_NBDV
    6421 #if H_3D_IV_MERGE
     5769#if NH_3D_NBDV
     5770#if NH_3D_IV_MERGE
    64225771                      if( !bIsDepth )
    64235772                      {
     
    64275776                        cMv.setIDVVer    (cDv.getVer()); 
    64285777                        cMv.setIDVVId    (iViewIndex);
    6429 #if H_3D_IV_MERGE
     5778#if NH_3D_IV_MERGE
    64305779                      }
    64315780#endif
     
    64525801            for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth)
    64535802            {
    6454               iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 ));
    6455               iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 ));
     5803              iBasePosX   = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 ));
     5804              iBasePosY   = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 ));
    64565805
    64575806              pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx );
    6458               pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
     5807              pcBaseCU    = pcBasePic->getCtu( iBaseCUAddr );
    64595808              if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA ))
    64605809              {
     
    65245873    ////////////////////////////////
    65255874
    6526 #if H_3D_SPIVMP
     5875#if NH_3D_SPIVMP
    65275876    if(m_pcSlice->getIsDepth())
    65285877    {
     
    65305879      iCurrPosY  += ( iHeight >> 1 );
    65315880    }
     5881#if H_3D_DBBP
    65325882    for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    65335883#else
     5884    for(Int iLoopCan = ( m_pcSlice->getIsDepth() ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
     5885#endif
     5886#else
    65345887    for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
    65355888#endif
     
    65415894      Int         iBaseAbsPartIdx;
    65425895
    6543       Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth  * 2 );
    6544       Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 );
    6545 
    6546       Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
    6547       Int         iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );
     5896      Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth  * 2);
     5897      Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2);
     5898
     5899      Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
     5900      Int         iBasePosY   = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );
    65485901      pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
    65495902
    6550       TComDataCU* pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
     5903      TComDataCU* pcBaseCU    = pcBasePic->getCtu( iBaseCUAddr );
    65515904      if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA ))
    65525905      {
     
    65755928                    abPdmAvailable[ (uiCurrRefListId + (iLoopCan<<2)) ] = true;
    65765929                    TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
    6577 #if H_3D_NBDV
    6578 #if H_3D_IV_MERGE
     5930#if NH_3D_NBDV
     5931#if NH_3D_IV_MERGE
    65795932                    if( !bIsDepth )
    65805933                    {
     
    65845937                      cMv.setIDVVer    (cDv.getVer()); 
    65855938                      cMv.setIDVVId    (iViewIndex);
    6586 #if H_3D_IV_MERGE
     5939#if NH_3D_IV_MERGE
    65875940                    }
    65885941#endif
     
    66005953      }
    66015954    }
    6602 #if H_3D_SPIVMP
     5955#if NH_3D_SPIVMP
     5956#if H_3D_DBBP
    66035957    for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
     5958#else
     5959    for(Int iLoopCan = ( m_pcSlice->getIsDepth()  ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
     5960#endif
    66045961#else
    66055962    for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
     
    66305987            abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true;
    66315988            paiPdmRefIdx  [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx;
    6632 #if H_3D_NBDV_REF
     5989#if NH_3D_NBDV_REF
    66335990            TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
    66345991#endif
    66355992            cMv.setHor( cMv.getHor() + ioffsetDV );
    6636 #if H_3D_IV_MERGE
     5993#if NH_3D_IV_MERGE
    66375994            if( bIsDepth )
    66385995            {
     
    66556012}
    66566013#endif
    6657 #if H_3D_ARP
     6014#if NH_3D_ARP
    66586015Void TComDataCU::setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth )
    66596016{
    6660   assert( sizeof( *m_puhARPW) == 1 );
    6661   memset( m_puhARPW + uiAbsPartIdx, w, m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ) );
     6017  setSubPart<UChar>( w, m_puhARPW, uiAbsPartIdx, uiDepth, 0 );
    66626018}
    66636019#endif
     
    67286084#endif
    67296085
    6730 #if H_3D_VSP
     6086#if NH_3D_VSP
    67316087Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize )
    67326088{
     
    67846140  TComCUMvField *cuMvField = cu->getCUMvField( refPicList );
    67856141  Int partAddrRasterSubPULine  = g_auiZscanToRaster[ partAddr ];
    6786   Int numPartsLine    = cu->getPic()->getNumPartInWidth();
     6142  Int numPartsLine    = cu->getPic()->getNumPartInCtuWidth();
    67876143
    67886144  Int nTxtPerMvInfoX = 4; // cu->getPic()->getMinCUWidth();
    67896145  Int nTxtPerMvInfoY = 4; // cu->getPic()->getMinCUHeight();
    67906146
    6791   Int refDepStride = picRefDepth->getStride();
     6147  Int refDepStride = picRefDepth->getStride( COMPONENT_Y );
    67926148
    67936149  TComMv tmpMv(0, 0);
     
    67956151
    67966152  Int refDepOffset  = ( (dv->getHor()+2) >> 2 ) + ( (dv->getVer()+2) >> 2 ) * refDepStride;
    6797   Pel *refDepth     = picRefDepth->getLumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr ) + refDepOffset;
     6153  Pel *refDepth     = picRefDepth->getAddr( COMPONENT_Y, cu->getCtuRsAddr(), cu->getZorderIdxInCtu() + partAddr ) + refDepOffset;
    67986154
    67996155  if ((height % 8))
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComDataCU.h

    r1225 r1274  
    5050#include "TComPattern.h"
    5151
    52 #if H_3D_ARP
    53 #include "TComYuv.h"
    54 #endif
    5552#if H_3D
    5653#include <algorithm>
     
    6562static const UInt NUM_MOST_PROBABLE_MODES=3;
    6663
    67 #if H_3D_DBBP
     64#if NH_3D_DBBP
    6865typedef struct _DBBPTmpData
    6966{
     
    167164  Char*         m_apiMVPNum[NUM_REF_PIC_LIST_01];       ///< array of number of possible motion vectors predictors
    168165  Bool*         m_pbIPCMFlag;         ///< array of intra_pcm flags
    169 #if H_3D_NBDV
     166#if NH_3D_NBDV
    170167  DisInfo*      m_pDvInfo;
    171168#endif
    172 #if H_3D_VSP
     169#if NH_3D_VSP
    173170  Char*         m_piVSPFlag;          ///< array of VSP flags to indicate whehter a block uses VSP or not  ///< 0: non-VSP; 1: VSP
    174171#endif
    175 #if H_3D_SPIVMP
     172#if NH_3D_SPIVMP
    176173  Bool*         m_pbSPIVMPFlag;       ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP ///< 0: non-SPIVMP; 1: SPIVMP
    177174#endif
    178 #if H_3D_ARP
     175#if NH_3D_ARP
    179176  UChar*        m_puhARPW;
    180177#endif
     
    193190#endif
    194191#endif
    195 #if H_3D_DBBP
     192#if NH_3D_DBBP
    196193  Bool*         m_pbDBBPFlag;        ///< array of DBBP flags
    197194  DbbpTmpData   m_sDBBPTmpData;
    198195#endif
    199 #if H_3D
     196#if NH_3D_MLC
    200197  Bool          m_bAvailableFlagA1;    ///< A1 available flag
    201198  Bool          m_bAvailableFlagB1;    ///< B1 available flag
     
    220217  UInt          m_uiTotalBins;        ///< sum of partition bins
    221218  Char          m_codedQP;
    222 #if H_3D
    223   DisInfo       m_cDefaultDisInfo;    ///< Default disparity information for initializing
    224 #endif
    225 #if H_3D_IV_MERGE
    226   TComMotionCand  m_mergCands[MRG_IVSHIFT+1];
    227   Int           m_baseListidc;
     219#if NH_3D_MLC
     220  DisInfo         m_cDefaultDisInfo;    ///< Default disparity information for initializing
     221  TComMotionCand  m_mergCands[MRG_IVSHIFT+1];   ///< Motion candidates for merge mode
     222  Int             m_numSpatialCands;
    228223#endif
    229224
     
    235230  Bool          xAddMVPCand           ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
    236231  Bool          xAddMVPCandOrder      ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
    237 #if H_3D_VSP
     232#if NH_3D_VSP
    238233  Bool          xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount);
    239234#endif
    240 #if H_3D_IV_MERGE
     235#if NH_3D_IV_MERGE
    241236  Bool          xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int*   ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx );
    242237#endif
     
    251246
    252247  /// compute scaling factor from POC difference
    253 #if !H_3D_ARP
     248#if !NH_3D_ARP
    254249  Int           xGetDistScaleFactor   ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );
    255250#endif
     
    257252  Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter );
    258253
    259 #if H_3D_VSP
     254#if NH_3D_VSP
    260255  Void xSetMvFieldForVSP  ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize );
    261256#endif
     
    268263  // create / destroy / initialize / copy
    269264  // -------------------------------------------------------------------------------------------------------------------
    270 #if H_3D_ARP
     265#if NH_3D_ARP
     266  /// compute scaling factor from POC difference
    271267  Int           xGetDistScaleFactor   ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );
    272268#endif
     
    282278  Void          initSubCU             ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp );
    283279  Void          setOutsideCUPart      ( UInt uiAbsPartIdx, UInt uiDepth );
    284 #if H_3D_NBDV
    285   Void          copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx);
     280#if NH_3D_NBDV
     281  Void          copyDVInfoFrom        (TComDataCU* pcCU, UInt uiAbsPartIdx);
    286282#endif
    287283
    288284  Void          copySubCU             ( TComDataCU* pcCU, UInt uiPartUnitIdx );
    289285  Void          copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList
    290 #if H_3D_NBDV
     286#if NH_3D_NBDV
    291287  , Bool bNBDV = false
    292288#endif
     
    319315#endif
    320316
     317#if NH_3D_ARP
     318  Void          setSlice              ( TComSlice* pcSlice)     { m_pcSlice = pcSlice;       }
     319  Void          setPic                ( TComDataCU* pcCU  )     { m_pcPic              = pcCU->getPic(); }
     320#endif
    321321  // -------------------------------------------------------------------------------------------------------------------
    322322  // member functions for CU data
     
    329329  Void          setCUTransquantBypassSubParts( Bool flag, UInt uiAbsPartIdx, UInt uiDepth );
    330330
    331 #if H_3D_DBBP
     331#if NH_3D_DBBP
    332332  Pel*          getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride);
    333333#endif
     
    353353  Void          setPredModeSubParts   ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth );
    354354
    355 #if H_3D_DBBP
     355#if NH_3D_DBBP
    356356  Bool*         getDBBPFlag           ()                        { return m_pbDBBPFlag;               }
    357357  Bool          getDBBPFlag           ( UInt uiIdx )            { return m_pbDBBPFlag[uiIdx];        }
     
    454454  template <typename T>
    455455  Void          setSubPart            ( T bParameter, T* pbBaseCtu, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
    456 #if H_3D_VSP
     456#if H_3D_VSP || NH_3D_DBBP
    457457  template<typename T>
    458458  Void          setSubPartT           ( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
     
    480480  Void          setIPCMFlag           (UInt uiIdx, Bool b )     { m_pbIPCMFlag[uiIdx] = b;           }
    481481  Void          setIPCMFlagSubParts   (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth);
    482 #if H_3D_NBDV
     482#if NH_3D_NBDV
    483483  Void          setDvInfoSubParts     ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth );
     484#if H_3D_VSP || NH_3D_DBBP
    484485  Void          setDvInfoSubParts     ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth);
     486#endif
    485487  DisInfo*      getDvInfo             ()                        { return m_pDvInfo;                 }
    486488  DisInfo       getDvInfo             (UInt uiIdx)              { return m_pDvInfo[uiIdx];          }
    487489#endif
    488 #if H_3D_NBDV
     490#if NH_3D_NBDV
    489491  Void          xDeriveRightBottomNbIdx(Int &uiLCUIdxRBNb, Int &uiPartIdxRBNb );
    490492  Bool          xCheckSpatialNBDV (TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paMvpDvInfo,
    491493                                   UInt uiMvpDvPos
    492 #if H_3D_NBDV_REF
     494#if NH_3D_NBDV_REF
    493495  , Bool bDepthRefine = false
    494496#endif
     
    496498  Bool          xGetColDisMV      ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx );
    497499  Void          getDisMvpCandNBDV ( DisInfo* pDInfo
    498 #if H_3D_NBDV_REF
     500#if NH_3D_NBDV_REF
    499501   , Bool bDepthRefine = false
    500502#endif
    501503   );
    502504   
     505#if NH_3D_IV_MERGE
     506  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     507#endif
     508
    503509#if H_3D
    504510  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     
    507513   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
    508514#endif
    509 #if H_3D_NBDV_REF
     515#if NH_3D_NBDV_REF
    510516  Pel           getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT );
    511517  Void          estimateDVFromDM(Int refViewIdx, UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred );
    512 #endif //H_3D_NBDV_REF
     518#endif //NH_3D_NBDV_REF
    513519#endif
    514520#if  H_3D_FAST_TEXTURE_ENCODING
    515521  Void          getIVNStatus       ( UInt uiPartIdx,  DisInfo* pDInfo, Bool& bIVFMerge,  Int& iIVFMaxD);
    516522#endif
    517 #if H_3D_SPIVMP
     523#if NH_3D_SPIVMP
    518524  Void          getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight);
    519525  Void          getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr );
    520526  Void          setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight );
    521527#endif
    522 #if H_3D_IV_MERGE
     528#if NH_3D_IV_MERGE
    523529  Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth           
    524530
    525 #if H_3D_SPIVMP
     531#if NH_3D_SPIVMP
    526532    , TComMvField* pcMFieldSP, UChar* puhInterDirSP
    527533#endif   
     
    529535    );   
    530536#endif
    531 #if H_3D_ARP
     537#if NH_3D_ARP
    532538  UChar*        getARPW            ()                        { return m_puhARPW;               }
    533539  UChar         getARPW            ( UInt uiIdx )            { return m_puhARPW[uiIdx];        }
    534540  Void          setARPW            ( UInt uiIdx, UChar w )   { m_puhARPW[uiIdx] = w;           }
    535541  Void          setARPWSubParts    ( UChar w, UInt uiAbsPartIdx, UInt uiDepth );
    536   Double        getARPWFactor      ( UInt uiIdx );
    537542#endif
    538543#if NH_3D_IC
     
    542547  Void          setICFlagSubParts  ( Bool bICFlag,  UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
    543548  Bool          isICFlagRequired   ( UInt uiAbsPartIdx );
     549  Void          getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false);
     550#elif NH_3D_VSP
    544551  Void          getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false);
    545552#else
     
    654661  Bool          hasEqualMotion              ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx );
    655662
    656 #if H_3D
    657   Bool          getAvailableFlagA1() { return m_bAvailableFlagA1;}
    658   Bool          getAvailableFlagB1() { return m_bAvailableFlagB1;}
    659   Bool          getAvailableFlagB0() { return m_bAvailableFlagB0;}
    660   Bool          getAvailableFlagA0() { return m_bAvailableFlagA0;}
    661   Bool          getAvailableFlagB2() { return m_bAvailableFlagB2;}
     663#if NH_3D_MLC
     664  Bool          getAvailableFlagA1() { return m_bAvailableFlagA1;   }
     665  Bool          getAvailableFlagB1() { return m_bAvailableFlagB1;   }
     666  Bool          getAvailableFlagB0() { return m_bAvailableFlagB0;   }
     667  Bool          getAvailableFlagA0() { return m_bAvailableFlagA0;   }
     668  Bool          getAvailableFlagB2() { return m_bAvailableFlagB2;   }
    662669  Void          initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0;  }
    663670  Void          buildMCL(TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    664 #if H_3D_VSP
     671#if NH_3D_VSP
    665672    , Int* vspFlag
    666673#endif
    667 #if H_3D_SPIVMP
     674#if NH_3D_SPIVMP
    668675    , Bool* pbSPIVMPFlag
    669676#endif
    670677    , Int& numValidMergeCand
    671678    );
    672   Void          getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1);
    673   Void          xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    674 #else
     679  Void          xGetInterMergeCandidates      ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
     680#if NH_3D_SPIVMP
     681  , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
     682#endif
     683  , Int& numValidMergeCand, Int mrgCandIdx = -1 );
     684#endif
    675685  Void          getInterMergeCandidates       ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 );
    676 #endif
    677 #if H_3D_SPIVMP
    678                                             , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    679 #endif
    680 
    681 #if H_3D_VSP
    682 #if H_3D_SPIVMP
     686
     687#if NH_3D_VSP
     688#if NH_3D_SPIVMP
    683689  Bool*         getSPIVMPFlag        ()                        { return m_pbSPIVMPFlag;          }
    684690  Bool          getSPIVMPFlag        ( UInt uiIdx )            { return m_pbSPIVMPFlag[uiIdx];   }
     
    723729  UInt          getCtxSkipFlag                  ( UInt   uiAbsPartIdx                                 );
    724730  UInt          getCtxInterDir                  ( UInt   uiAbsPartIdx                                 );
    725 #if H_3D_ARP
     731#if NH_3D_ARP
    726732  UInt          getCTXARPWFlag                  ( UInt   uiAbsPartIdx                                 );
    727733#endif 
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComInterpolationFilter.cpp

    r1200 r1274  
    7575};
    7676
    77 #if H_3D_ARP
     77#if NH_3D_ARP
    7878const Short TComInterpolationFilter::m_lumaFilterARP[4][NTAPS_LUMA_ARP] =
    7979{
     
    361361 */
    362362Void TComInterpolationFilter::filterHor(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isLast, const ChromaFormat fmt, const Int bitDepth
    363 #if H_3D_ARP
     363#if NH_3D_ARP
    364364    , Bool filterType
    365365#endif
     
    372372  else if (isLuma(compID))
    373373  {
    374 #if H_3D_ARP
     374    assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);
     375#if NH_3D_ARP
    375376    if(filterType)
    376377    {
    377       filterHor<NTAPS_LUMA_ARP>(g_bitDepthY, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilterARP[frac]);
     378      filterHor<NTAPS_LUMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilterARP[frac]);
    378379    }
    379380    else
    380381    {
    381382#endif
    382 
    383     assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);
    384383    filterHor<NTAPS_LUMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac]);
    385 #if H_3D_ARP
     384#if NH_3D_ARP
    386385    }
    387386#endif
     
    392391    const UInt csx = getComponentScaleX(compID, fmt);
    393392    assert(frac >=0 && csx<2 && (frac<<(1-csx)) < CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);
     393#if NH_3D_ARP
     394    if(filterType)
     395    {
     396      filterHor<NTAPS_CHROMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterARP[frac]);
     397    }
     398    else
     399    {
     400#endif
    394401    filterHor<NTAPS_CHROMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilter[frac<<(1-csx)]);
     402#if NH_3D_ARP
     403    }
     404#endif
    395405  }
    396406}
     
    414424 */
    415425Void TComInterpolationFilter::filterVer(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast, const ChromaFormat fmt, const Int bitDepth
    416 #if H_3D_ARP
     426#if NH_3D_ARP
    417427    , Bool filterType
    418428#endif
     
    425435  else if (isLuma(compID))
    426436  {
    427 #if H_3D_ARP
     437    assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);
     438#if NH_3D_ARP
    428439    if(filterType)
    429440    {
    430       filterVer<NTAPS_LUMA_ARP>(g_bitDepthY, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilterARP[frac]);   
     441      filterVer<NTAPS_LUMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilterARP[frac]);   
    431442    }
    432443    else
    433444    {
    434445#endif
    435     assert(frac >= 0 && frac < LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);
    436446    filterVer<NTAPS_LUMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_lumaFilter[frac]);
    437 #if H_3D_ARP
     447#if NH_3D_ARP
    438448    }
    439449#endif
     
    444454    const UInt csy = getComponentScaleY(compID, fmt);
    445455    assert(frac >=0 && csy<2 && (frac<<(1-csy)) < CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS);
     456#if NH_3D_ARP
     457    if(filterType)
     458    {
     459      filterVer<NTAPS_CHROMA_ARP>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterARP[frac]);   
     460    }
     461    else
     462    {
     463#endif
    446464    filterVer<NTAPS_CHROMA>(bitDepth, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilter[frac<<(1-csy)]);
    447   }
    448 }
    449 
    450 #if H_3D_ARP
    451     , Bool filterType
    452 #endif
    453 
    454 #if H_3D_ARP
    455     if(filterType)
    456     {
    457       filterHor<NTAPS_CHROMA_ARP>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isLast, m_chromaFilterARP[frac]);
    458     }
    459     else
    460     {
    461 #endif
    462 #if H_3D_ARP
    463     }
    464 #endif
    465 #if H_3D_ARP
    466     , Bool filterType
    467 #endif
    468 #if H_3D_ARP
    469     if(filterType)
    470     {
    471       filterVer<NTAPS_CHROMA_ARP>(g_bitDepthC, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_chromaFilterARP[frac]);
    472     }
    473     else
    474     {
    475 #endif
    476 #if H_3D_ARP
    477     }
    478 #endif
    479 
    480 
    481 
     465#if NH_3D_ARP
     466    }
     467#endif
     468    }
     469    }
    482470//! \}
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComInterpolationFilter.h

    r1200 r1274  
    4545//! \{
    4646
    47 #if H_3D_ARP
     47#if NH_3D_ARP
    4848#define NTAPS_LUMA_ARP    2 ///< Number of taps for luma
    4949#define NTAPS_CHROMA_ARP  2 ///< Number of taps for chroma
     
    6363  static const TFilterCoeff m_lumaFilter[LUMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_LUMA];     ///< Luma filter taps
    6464  static const TFilterCoeff m_chromaFilter[CHROMA_INTERPOLATION_FILTER_SUB_SAMPLE_POSITIONS][NTAPS_CHROMA]; ///< Chroma filter taps
    65 #if H_3D_ARP
     65#if NH_3D_ARP
    6666  static const Short m_lumaFilterARP  [4][NTAPS_LUMA_ARP];     ///< Luma filter taps for ARP
    6767  static const Short m_chromaFilterARP[8][NTAPS_CHROMA_ARP];   ///< Chroma filter taps for ARP
     
    8383
    8484  Void filterHor(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac,               Bool isLast, const ChromaFormat fmt, const Int bitDepth
    85 #if H_3D_ARP
     85#if NH_3D_ARP
    8686    , Bool filterType = false
    8787#endif
    8888);
    8989  Void filterVer(const ComponentID compID, Pel *src, Int srcStride, Pel *dst, Int dstStride, Int width, Int height, Int frac, Bool isFirst, Bool isLast, const ChromaFormat fmt, const Int bitDepth
    90 #if H_3D_ARP
     90#if NH_3D_ARP
    9191    , Bool filterType = false
    9292#endif
     
    9494};
    9595
    96 #if H_3D_ARP
    97     , Bool filterType = false
    98 #endif
    99 #if H_3D_ARP
    100     , Bool filterType = false
    101 #endif
    102 
    10396//! \}
    10497
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComMotionInfo.cpp

    r1200 r1274  
    4040#include "assert.h"
    4141#include <stdlib.h>
    42 #if H_3D_SPIVMP
     42#if NH_3D_SPIVMP
    4343#include "TComDataCU.h"
    4444#include "TComPic.h"
     
    328328}
    329329
    330 #if H_3D_SPIVMP
     330#if NH_3D_SPIVMP
    331331Void TComCUMvField::setMvFieldSP( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  )
    332332{
    333   uiAbsPartIdx += pcCU->getZorderIdxInCU();
     333  uiAbsPartIdx += pcCU->getZorderIdxInCtu();
    334334  Int iStartPelX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIdx]];
    335335  Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]];
     
    341341    for (Int j=iStartPelX; j < iEndPelX; j += pcCU->getPic()->getMinCUWidth())
    342342    {
    343       Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInWidth() + j/pcCU->getPic()->getMinCUWidth();
     343      Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInCtuWidth() + j/pcCU->getPic()->getMinCUWidth();
    344344      Int uiPartAddr = g_auiRasterToZscan[iCurrRaster];
    345       uiPartAddr -= pcCU->getZorderIdxInCU(); 
     345      uiPartAddr -= pcCU->getZorderIdxInCtu(); 
    346346
    347347      m_pcMv[uiPartAddr] = cMvField.getMv();
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComMotionInfo.h

    r1196 r1274  
    5050// ====================================================================================================================
    5151
    52 #if H_3D_SPIVMP
     52#if NH_3D_SPIVMP
    5353class TComDataCU;
    5454#endif
     
    6060} AMVPInfo;
    6161
    62 #if H_3D_NBDV
     62#if NH_3D_NBDV
    6363typedef struct _DisCand
    6464{
    6565  TComMv m_acNBDV;              // DV from NBDV
    66 #if H_3D_NBDV_REF
     66#if NH_3D_NBDV_REF
    6767  TComMv m_acDoNBDV;            // DV from DoNBDV
    6868#endif 
     
    107107  Int getHor   () const { return  m_acMv.getHor(); }
    108108  Int getVer   () const { return  m_acMv.getVer(); }
    109 #if H_3D_IV_MERGE
     109#if NH_3D_IV_MERGE
    110110  Bool operator== ( const TComMvField& rcMv ) const
    111111  {
     
    167167  Void    setAllRefIdx ( Int iRefIdx,                 PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 );
    168168  Void    setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 );
    169 #if H_3D_SPIVMP
     169#if NH_3D_SPIVMP
    170170  Void    setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  );
    171171#endif
    172 #if H_3D_VSP
     172#if NH_3D_VSP
    173173  Void    setMv         ( Int iIdx, TComMv const & rcMv ) { m_pcMv[iIdx] = rcMv; }
    174174  Void    setRefIdx     ( Int iIdx, Int iRefIdx )         { m_piRefIdx[iIdx] = iRefIdx; }
     
    192192//! \}
    193193
    194 #if H_3D_IV_MERGE
     194#if NH_3D_MLC
     195/// class for container of merge candidate
    195196class TComMotionCand
    196197{
     
    199200  TComMvField           m_cMvField[2];
    200201  UChar                 m_uDir;
    201 #if H_3D_VSP
     202#if NH_3D_VSP
    202203  Int                   m_iVspFlag;
    203 #endif 
     204#endif
     205#if NH_3D_SPIVMP
    204206  Bool                  m_bSPIVMPFlag;
     207#endif
    205208
    206209public:
     
    209212    m_bAvailable = false;
    210213    m_uDir = 0;
    211 #if H_3D_VSP
     214#if NH_3D_VSP
    212215    m_iVspFlag = 0;
    213216#endif
     217#if NH_3D_SPIVMP
    214218    m_bSPIVMPFlag = false;
     219#endif
    215220  }
    216221
     
    226231    m_bAvailable = false;
    227232    m_uDir = 0;
    228 #if H_3D_VSP
     233#if NH_3D_VSP
    229234    m_iVspFlag = 0;
    230235#endif
     236#if NH_3D_SPIVMP
    231237    m_bSPIVMPFlag = false;
     238#endif
    232239    m_cMvField[0].setMvField(cZeroMv, NOT_VALID);
    233240    m_cMvField[1].setMvField(cZeroMv, NOT_VALID);
     
    235242
    236243  Void setCand(TComMvField* pcMvFieldNeighbours, UChar uhInterDirNeighbours
    237 #if H_3D_VSP
     244#if NH_3D_VSP
    238245    , Int vspFlag
    239246#endif
     247#if NH_3D_SPIVMP
    240248    , Bool bSPIVMPFlag
     249#endif
    241250    )
    242251  {
     
    245254    m_cMvField[1] = pcMvFieldNeighbours[1];
    246255    m_uDir = uhInterDirNeighbours;
    247 #if H_3D_VSP
     256#if NH_3D_VSP
    248257    m_iVspFlag = vspFlag;
    249258#endif
     259#if NH_3D_SPIVMP
    250260    m_bSPIVMPFlag = bSPIVMPFlag;
    251   }
    252 
    253 
     261#endif
     262  }
     263 
    254264  Void getCand(Int iCount, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    255 #if H_3D_VSP
     265#if NH_3D_VSP
    256266    , Int* vspFlag
    257267#endif
     268#if NH_3D_SPIVMP
    258269    , Bool* pbSPIVMPFlag
     270#endif
    259271    )
    260272  {
     
    262274    pcMvFieldNeighbours[(iCount<<1) + 1] = m_cMvField[1];
    263275    puhInterDirNeighbours[iCount] = m_uDir;
    264 #if H_3D_VSP
     276#if NH_3D_VSP
    265277    vspFlag[iCount] = m_iVspFlag;
    266278#endif
     279#if NH_3D_SPIVMP
    267280    pbSPIVMPFlag[iCount] = m_bSPIVMPFlag;
     281#endif
    268282  }
    269283};
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComMv.h

    r1200 r1274  
    5757  Short m_iHor;     ///< horizontal component of motion vector
    5858  Short m_iVer;     ///< vertical component of motion vector
    59 #if H_3D_NBDV
     59#if NH_3D_NBDV
    6060  Bool  m_bIDV;       
    6161  Short m_iIDVHor;   
     
    7272  m_iHor(0),
    7373  m_iVer(0)
    74 #if H_3D_NBDV
     74#if NH_3D_NBDV
    7575  , m_bIDV(false)
    7676  , m_iIDVHor(0)
     
    8484  m_iHor(iHor),
    8585  m_iVer(iVer)
    86  #if H_3D_NBDV
     86 #if NH_3D_NBDV
    8787  , m_bIDV(false)
    8888  , m_iIDVHor(0)
     
    101101  Void  setVer    ( Short i )                   { m_iVer = i;                               }
    102102  Void  setZero   ()                            { m_iHor = m_iVer = 0;
    103  #if H_3D_NBDV
     103 #if NH_3D_NBDV
    104104   m_bIDV = false; m_iIDVHor = m_iIDVVer = 0;
    105105   m_iIDVVId = 0;
    106106#endif
    107107 }
    108 #if H_3D_NBDV
     108#if NH_3D_NBDV
    109109  Void   setIDVHor  (Short i)                    {m_iIDVHor = i;}
    110110  Void   setIDVVer  (Short i)                    {m_iIDVVer = i;}
     
    120120  Int   getAbsHor () const { return abs( m_iHor );   }
    121121  Int   getAbsVer () const { return abs( m_iVer );   }
    122 #if H_3D_NBDV
     122#if NH_3D_NBDV
    123123  Short getIDVHor () const { return m_iIDVHor;       }
    124124  Short getIDVVer () const { return m_iIDVVer;       }
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComPic.cpp

    r1256 r1274  
    7878  m_bReduceBitsQTL    = 0;
    7979#endif
    80 #if H_3D_NBDV
     80#if NH_3D_NBDV
    8181  m_iNumDdvCandPics   = 0;
    8282  m_eRapRefList       = REF_PIC_LIST_0;
     
    143143}
    144144#if NH_3D
     145#if NH_3D_ARP
     146Void TComPic::getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx )
     147{
     148  Int iMaxCUWidth   = (Int) ( getPicSym()->getSPS().getMaxCUWidth()  );
     149  Int iMaxCuHeight  = (Int) ( getPicSym()->getSPS().getMaxCUHeight() );
     150
     151  UInt uiMaxTotalCUDepth = getPicSym()->getSPS().getMaxTotalCUDepth();
     152  Int iBaseUnitWidth  = iMaxCUWidth >> uiMaxTotalCUDepth;
     153  Int iBaseUnitHeight = iMaxCUWidth >> uiMaxTotalCUDepth;
     154
     155  Int iNumCuInWidth   = getPicYuvRec()->getWidth(COMPONENT_Y) / iMaxCUWidth;
     156  iNumCuInWidth      += ( getPicYuvRec()->getWidth(COMPONENT_Y) % iMaxCUWidth ) ? 1 : 0;
     157
     158
     159  Int iCuX            = iX / iMaxCUWidth;
     160  Int iCuY            = iY / iMaxCuHeight;
     161  Int iBaseX          = ( iX - iCuX * iMaxCUWidth  ) / iBaseUnitWidth;
     162  Int iBaseY          = ( iY - iCuY * iMaxCuHeight ) / iBaseUnitHeight;
     163  Int iCuSizeInBases  = iMaxCuHeight                 / iBaseUnitWidth;
     164
     165  riCuAddr            = iCuY   * iNumCuInWidth + iCuX;
     166  Int iRastPartIdx    = iBaseY * iCuSizeInBases  + iBaseX;
     167  riAbsZorderIdx      = g_auiRasterToZscan[ iRastPartIdx ];
     168}
     169#endif
    145170Void TComPic::compressMotion(Int scale)
    146171#else
     
    283308  return getPicYuv( layerIdInNuh, poc, recon );
    284309}
    285 #if H_3D_ARP
     310#if NH_3D_ARP
    286311TComList<TComPic*>* TComPicLists::getPicList( Int layerIdInNuh )
    287312{
     
    303328#endif // NH_MV
    304329
    305 #if H_3D_NBDV
    306 Int TComPic::getDisCandRefPictures( Int iColPOC )
     330#if NH_3D_NBDV
     331Int TComPic::getDisCandRefPictures(Int iColPOC)
    307332{
    308333  UInt       uiTempLayerCurr = 7;
     
    310335  UInt       numDdvCandPics  = 0;
    311336
    312   if ( !currSlice->getEnableTMVPFlag() )
     337  if(!currSlice->getEnableTMVPFlag())
     338  {
    313339    return numDdvCandPics;
     340  }
    314341
    315342  numDdvCandPics += 1;
     
    318345  UInt pocDiff = 255;
    319346
    320   for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++)
    321   {
    322     UInt x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag();
    323 
    324     for (UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++)
     347  for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr++)
     348  {
     349    Bool x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag();
     350
     351    for(UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++)
    325352    {
    326353      if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex()
    327         && (x == currSlice->getColFromL0Flag()||currSlice->getRefPOC((RefPicList)x, i)!= iColPOC) && numDdvCandPics!=2)
     354         && (x == currSlice->getColFromL0Flag() || currSlice->getRefPOC((RefPicList)x, i) != iColPOC) && numDdvCandPics != 2)
    328355      {
    329356        TComSlice* refSlice    = currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx());
    330         Bool       bRAP        = (refSlice->getViewIndex() && refSlice->isIRAP())? 1: 0;
     357        Bool       bRAP        = (refSlice->getViewIndex() && refSlice->isIRAP()) ? 1 : 0;
    331358        UInt       uiTempLayer = currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer();
    332359       
    333         if( bRAP )
     360        if(bRAP)
    334361        {
    335362          this->setRapRefIdx(i);
     
    350377  UInt idx = 0;
    351378 
    352   for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++)
    353   {
    354     UInt x = lpNr? currSlice->getColFromL0Flag() : 1-currSlice->getColFromL0Flag();
     379  for(UInt lpNr = 0; lpNr < (currSlice->isInterB() ? 2 : 1); lpNr++)
     380  {
     381    Bool x = lpNr ? currSlice->getColFromL0Flag() : 1 - currSlice->getColFromL0Flag();
    355382   
    356     for (UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++)
     383    for(UInt i = 0; i < currSlice->getNumRefIdx(RefPicList(x)); i++)
    357384    {
    358385      Int iTempPoc = currSlice->getRefPic((RefPicList)x, i)->getPOC();
    359       Int iTempDiff = (iTempPoc > pocCurr) ? (iTempPoc - pocCurr): (pocCurr - iTempPoc);
     386      Int iTempDiff = (iTempPoc > pocCurr) ? (iTempPoc - pocCurr) : (pocCurr - iTempPoc);
    360387     
    361       if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() &&  (x == currSlice->getColFromL0Flag()||currSlice->getRefPOC((RefPicList)x, i)!= iColPOC)
    362         && currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer() == uiTempLayerCurr && pocDiff > iTempDiff)
     388      if(currSlice->getViewIndex() == currSlice->getRefPic((RefPicList)x, i)->getViewIndex() && (x == currSlice->getColFromL0Flag() || currSlice->getRefPOC((RefPicList)x, i) != iColPOC)
     389         && currSlice->getRefPic((RefPicList)x, i)->getSlice(getCurrSliceIdx())->getTLayer() == uiTempLayerCurr && pocDiff > iTempDiff)
    363390      {
    364391        pocDiff = iTempDiff;
     
    369396  }
    370397
    371   if( pocDiff < 255 )
     398  if(pocDiff < 255)
    372399  {
    373400    this->setRapRefIdx(idx);
    374     this->setRapRefList((RefPicList) z );
     401    this->setRapRefList((RefPicList) z);
    375402    numDdvCandPics = 2;
    376403  }
     
    383410  TComSlice* currSlice = getSlice(getCurrSliceIdx());
    384411  const Int numCandPics = this->getNumDdvCandPics();
     412
    385413  for(Int curCandPic = 0; curCandPic < numCandPics; curCandPic++)
    386414  {
    387415    RefPicList eCurRefPicList   = REF_PIC_LIST_0 ;
    388416    Int        curCandPicRefIdx = 0;
    389     if( curCandPic == 0 )
     417    if(curCandPic == 0)
    390418    {
    391       eCurRefPicList   = RefPicList(currSlice->isInterB() ? 1-currSlice->getColFromL0Flag() : 0);
     419      eCurRefPicList   = RefPicList(currSlice->isInterB() ? 1 - currSlice->getColFromL0Flag() : 0);
    392420      curCandPicRefIdx = currSlice->getColRefIdx();
    393421    }
     
    397425      curCandPicRefIdx = this->getRapRefIdx();
    398426    }
    399     TComPic* pcCandColPic = currSlice->getRefPic( eCurRefPicList, curCandPicRefIdx);
    400     TComSlice* pcCandColSlice = pcCandColPic->getSlice(0);// currently only support single slice
     427
     428    TComPic* pcCandColPic = currSlice->getRefPic(eCurRefPicList, curCandPicRefIdx);
     429    TComSlice* pcCandColSlice = pcCandColPic->getSlice(0); // currently only support single slice
    401430
    402431    if(!pcCandColSlice->isIntra())
    403432    {
    404       for( Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2: 1); iColRefDir ++ )
    405       {
    406         for( Int iColRefIdx =0; iColRefIdx < pcCandColSlice->getNumRefIdx(( RefPicList )iColRefDir ); iColRefIdx++)
     433      for(Int iColRefDir = 0; iColRefDir < (pcCandColSlice->isInterB() ? 2 : 1); iColRefDir++)
     434      {
     435        for(Int iColRefIdx = 0; iColRefIdx < pcCandColSlice->getNumRefIdx((RefPicList)iColRefDir); iColRefIdx++)
    407436        {
    408437          m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = false;
    409438          Int iColViewIdx    = pcCandColSlice->getViewIndex();
    410           Int iColRefViewIdx = pcCandColSlice->getRefPic( ( RefPicList )iColRefDir, iColRefIdx)->getViewIndex();
     439          Int iColRefViewIdx = pcCandColSlice->getRefPic((RefPicList)iColRefDir, iColRefIdx)->getViewIndex();
    411440          if(iColViewIdx == iColRefViewIdx)
     441          {
    412442            continue;
    413 
    414           for(Int iCurrRefDir = 0;(iCurrRefDir < (currSlice->isInterB() ? 2: 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false ); iCurrRefDir++)
     443          }
     444
     445          for(Int iCurrRefDir = 0; (iCurrRefDir < (currSlice->isInterB() ? 2 : 1)) && (m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] == false); iCurrRefDir++)
    415446          {
    416             for( Int iCurrRefIdx =0; iCurrRefIdx < currSlice->getNumRefIdx(( RefPicList )iCurrRefDir ); iCurrRefIdx++)
     447            for(Int iCurrRefIdx = 0; iCurrRefIdx < currSlice->getNumRefIdx((RefPicList)iCurrRefDir); iCurrRefIdx++)
    417448            {
    418               if( currSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx )->getViewIndex() == iColRefViewIdx )
     449              if(currSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iColRefViewIdx)
    419450              { 
    420451                m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = true;
     
    428459  }
    429460}
     461
    430462Bool TComPic::isTempIVRefValid(Int currCandPic, Int iColRefDir, Int iColRefIdx)
    431463{
     
    433465}
    434466
    435 Void TComPic::checkTextureRef(  )
     467Void TComPic::checkTextureRef()
    436468{
    437469  TComSlice* pcCurrSlice = getSlice(getCurrSliceIdx());
    438   TComPic* pcTextPic = pcCurrSlice->getTexturePic();
     470  TComPic* pcTextPic = pcCurrSlice->getIvPic(0, getViewIndex());
    439471#if H_3D_FCO
    440472  if ( pcTextPic )
    441473  {
    442474#endif
    443 
    444475    TComSlice* pcTextSlice = pcTextPic->getSlice(0); // currently only support single slice
    445476
    446     for( Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB()? 2:1) ) && !pcTextSlice->isIntra(); iTextRefDir ++ )
    447     {
    448       for( Int iTextRefIdx =0; iTextRefIdx<pcTextSlice->getNumRefIdx(( RefPicList )iTextRefDir ); iTextRefIdx++)
    449       {
    450         Int iTextRefPOC    = pcTextSlice->getRefPOC( ( RefPicList )iTextRefDir, iTextRefIdx);
    451         Int iTextRefViewId = pcTextSlice->getRefPic( ( RefPicList )iTextRefDir, iTextRefIdx)->getViewIndex();
     477    for(Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB() ? 2 :1) ) && !pcTextSlice->isIntra(); iTextRefDir++)
     478    {
     479      for(Int iTextRefIdx =0; iTextRefIdx < pcTextSlice->getNumRefIdx((RefPicList)iTextRefDir); iTextRefIdx++)
     480      {
     481        Int iTextRefPOC    = pcTextSlice->getRefPOC((RefPicList)iTextRefDir, iTextRefIdx);
     482        Int iTextRefViewId = pcTextSlice->getRefPic((RefPicList)iTextRefDir, iTextRefIdx)->getViewIndex();
    452483        m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = -1;
    453484        Int iCurrRefDir = iTextRefDir;
    454         for( Int iCurrRefIdx =0; ( iCurrRefIdx<pcCurrSlice->getNumRefIdx(( RefPicList )iCurrRefDir ) ) && ( m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0 ) ; iCurrRefIdx++)
     485
     486        for(Int iCurrRefIdx = 0; (iCurrRefIdx<pcCurrSlice->getNumRefIdx((RefPicList)iCurrRefDir)) && (m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0); iCurrRefIdx++)
    455487        {
    456           if( pcCurrSlice->getRefPOC( ( RefPicList )iCurrRefDir, iCurrRefIdx ) == iTextRefPOC &&
    457             pcCurrSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId )
     488          if(pcCurrSlice->getRefPOC((RefPicList)iCurrRefDir, iCurrRefIdx ) == iTextRefPOC &&
     489             pcCurrSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId)
    458490          { 
    459491            m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx;
     
    461493        }
    462494      }
    463 
    464495    }
    465496#if H_3D_FCO
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComPic.h

    r1256 r1274  
    9797  Bool                  m_bReduceBitsQTL;
    9898#endif
    99 #if H_3D_NBDV
     99#if NH_3D_NBDV
    100100  UInt        m_uiRapRefIdx;
    101101  RefPicList  m_eRapRefList;
    102102  Int         m_iNumDdvCandPics;
    103   Bool        m_abTIVRINCurrRL  [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists
     103  Bool        m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists
    104104  Int         m_aiTexToDepRef  [2][MAX_NUM_REF];
    105105#endif
     
    182182#endif
    183183#if NH_3D
     184#if NH_3D_ARP
     185  Void          getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx );
     186#endif
    184187  Void          compressMotion(Int scale);
    185188#else   
     
    209212  Void          print( Bool legend );
    210213#endif
    211 #if H_3D_NBDV
     214#if NH_3D_NBDV
    212215  Int           getNumDdvCandPics()                    {return m_iNumDdvCandPics;   }
    213216  Int           getDisCandRefPictures(Int iColPOC);
     
    248251  Void        push_back( TComList<TComPic*>* list ) { m_lists.push_back( list );   }
    249252  Int         size     ()                           { return (Int) m_lists.size(); }
    250 #if H_3D_ARP
     253#if NH_3D_ARP
    251254  TComList<TComPic*>*  getPicList   ( Int layerIdInNuh );
    252255#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComPicYuv.cpp

    r1200 r1274  
    9191  m_iPicHeight        = iPicHeight;
    9292
    93 #if H_3D_IV_MERGE
     93#if NH_3D_IV_MERGE
     94  m_iCuWidth        = uiMaxCUWidth;
     95  m_iCuHeight       = uiMaxCUHeight;
     96
    9497  m_iNumCuInWidth   = m_iPicWidth / m_iCuWidth;
    9598  m_iNumCuInWidth  += ( m_iPicWidth % m_iCuWidth ) ? 1 : 0;
     
    292295  fclose(pFile);
    293296}
    294 #if H_3D
    295 #if H_3D_IV_MERGE
     297#if NH_3D_IV_MERGE
    296298Void
    297299TComPicYuv::getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY )
     
    319321  riAbsZorderIdx      = g_auiRasterToZscan[ iRastPartIdx ];
    320322}
    321 #endif
     323
     324#endif
     325
     326#if H_3D
    322327Void TComPicYuv::setLumaTo( Pel pVal )
    323328{
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComPicYuv.h

    r1200 r1274  
    8080
    8181  Bool  m_bIsBorderExtended;
    82 #if H_3D_IV_MERGE
     82#if NH_3D_IV_MERGE
    8383  Int   m_iBaseUnitWidth;       ///< Width of Base Unit (with maximum depth or minimum size, m_iCuWidth >> Max. Depth)
    8484  Int   m_iBaseUnitHeight;      ///< Height of Base Unit (with maximum depth or minimum size, m_iCuHeight >> Max. Depth)
    8585  Int   m_iNumCuInWidth;
     86  Int   m_iCuWidth;             ///< Width of Coding Unit (CU)
     87  Int   m_iCuHeight;            ///< Height of Coding Unit (CU)
    8688#endif
    8789
     
    168170  Void  setLumaTo    ( Pel pVal ); 
    169171  Void  setChromaTo  ( Pel pVal ); 
    170 #if H_3D_IV_MERGE
     172#if NH_3D_IV_MERGE
    171173  // sample to block and block to sample conversion
    172174  Void  getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY );
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComPrediction.cpp

    r1226 r1274  
    8282    }
    8383  }
    84 #if H_3D_VSP
    85   m_pDepthBlock = (Int*) malloc(MAX_NUM_SPU_W*MAX_NUM_SPU_W*sizeof(Int));
     84#if NH_3D_VSP
     85  m_pDepthBlock = (Int*) malloc(MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH*sizeof(Int));
    8686  if (m_pDepthBlock == NULL)
    8787  {
     
    9494TComPrediction::~TComPrediction()
    9595{
    96 #if H_3D_VSP
     96#if NH_3D_VSP
    9797  if (m_pDepthBlock != NULL)
    9898  {
     
    123123  m_cYuvPredTemp.destroy();
    124124
    125 #if H_3D_ARP
     125#if NH_3D_ARP
    126126  m_acYuvPredBase[0].destroy();
    127127  m_acYuvPredBase[1].destroy();
     
    182182
    183183    m_cYuvPredTemp.create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC );
    184 #if H_3D_ARP
    185     m_acYuvPredBase[0] .create( g_uiMaxCUWidth, g_uiMaxCUHeight );
    186     m_acYuvPredBase[1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight );
    187 #endif
    188 #if H_3D_VSP
    189     m_cYuvDepthOnVsp.create( g_uiMaxCUWidth, g_uiMaxCUHeight );
     184#if NH_3D_ARP
     185    m_acYuvPredBase[0] .create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC );
     186    m_acYuvPredBase[1] .create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC );
     187#endif
     188#if NH_3D_VSP
     189    m_cYuvDepthOnVsp.create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC );
    190190#endif
    191191
     
    648648      Int RefPOCL0 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, pcCU->getCUMvField(REF_PIC_LIST_0)->getRefIdx(PartAddr))->getPOC();
    649649      Int RefPOCL1 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_1, pcCU->getCUMvField(REF_PIC_LIST_1)->getRefIdx(PartAddr))->getPOC();
    650 #if H_3D_ARP
     650#if NH_3D_ARP
    651651      if(!pcCU->getARPW(PartAddr) && RefPOCL0 == RefPOCL1 && pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(PartAddr) == pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(PartAddr))
    652652#else
     
    661661}
    662662
    663 #if H_3D_SPIVMP
     663#if NH_3D_SPIVMP
    664664Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr )
    665665{
     
    670670    pcCU->getSPAbsPartIdx(uiPartAddr, iSPWidth, iSPHeight, i, iNumSPInOneLine, uiSPAddr[i]);
    671671  }
     672#if H_3D_ARP // check this!
    672673  if( pcCU->getARPW( uiPartAddr ) != 0 )
    673674  {
    674675    return;
    675676  }
     677#endif
    676678
    677679  // horizontal sub-PU merge
     
    747749#endif
    748750
    749 #if H_3D_DBBP
     751#if NH_3D_DBBP
    750752PartSize TComPrediction::getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU)
    751753{
     754  const TComSPS* sps = pcCU->getSlice()->getSPS();
     755  UInt uiMaxCUWidth = sps->getMaxCUWidth();
     756  UInt uiMaxCUHeight = sps->getMaxCUHeight();
     757 
    752758  // find virtual partitioning for this CU based on depth block
    753759  // segmentation of texture block --> mask IDs
     
    757763  Int iSumDepth = 0;
    758764  Int iSubSample = 4;
    759   Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth();
    760   Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight();
     765  Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(COMPONENT_Y);
     766  Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(COMPONENT_Y);
    761767  TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag(  ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV;
    762768  if( pcCU->getSlice()->getDepthRefinementFlag(  ) )
     
    764770    cDv.setVer(0);
    765771  }
    766   Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2);
    767   Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2);
     772  Int iBlkX = ( pcCU->getCtuRsAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCtus() ) * uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCtu() ] ]+ ((cDv.getHor()+2)>>2);
     773  Int iBlkY = ( pcCU->getCtuRsAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCtus() ) * uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCtu() ] ]+ ((cDv.getVer()+2)>>2);
    768774 
    769775  UInt t=0;
     
    852858  }
    853859
    854   PartSize matchedPartSize = SIZE_NONE;
     860  PartSize matchedPartSize = NUMBER_OF_PART_SIZES;
    855861
    856862  Int iMaxMatchSum = 0;
     
    867873  }
    868874
    869   AOF( matchedPartSize != SIZE_NONE );
     875  AOF( matchedPartSize != NUMBER_OF_PART_SIZES );
    870876
    871877  return matchedPartSize;
     
    874880Bool TComPrediction::getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU)
    875881{
     882  const TComSPS* sps = pcCU->getSlice()->getSPS();
     883  UInt uiMaxCUWidth = sps->getMaxCUWidth();
     884  UInt uiMaxCUHeight = sps->getMaxCUHeight();
     885 
    876886  // segmentation of texture block --> mask IDs
    877887  Pel*  pDepthBlockStart      = pDepthPels;
     
    885895  iSumDepth  = pDepthPels[ 0 ];
    886896 
    887   Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth();
    888   Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); 
     897  Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(COMPONENT_Y);
     898  Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(COMPONENT_Y); 
    889899  TComMv cDv = pcCU->getSlice()->getDepthRefinementFlag(  ) ? pcCU->getDvInfo(0).m_acDoNBDV : pcCU->getDvInfo(0).m_acNBDV;
    890900  if( pcCU->getSlice()->getDepthRefinementFlag(  ) )
     
    892902    cDv.setVer(0);
    893903  }
    894   Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2);
    895   Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2);
     904  Int iBlkX = ( pcCU->getCtuRsAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCtus() ) * uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCtu() ] ]+ ((cDv.getHor()+2)>>2);
     905  Int iBlkY = ( pcCU->getCtuRsAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCtus() ) * uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCtu() ] ]+ ((cDv.getVer()+2)>>2);
    896906  if (iBlkX>(Int)(iPictureWidth - uiWidth))
    897907  {
     
    10081018}
    10091019
    1010 Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize )
    1011 {
    1012   Pel*  piSrc[2]    = {pInYuv[0]->getLumaAddr(uiPartAddr), pInYuv[1]->getLumaAddr(uiPartAddr)};
    1013   UInt  uiSrcStride = pInYuv[0]->getStride();
    1014   Pel*  piDst       = pOutYuv->getLumaAddr(uiPartAddr);
    1015   UInt  uiDstStride = pOutYuv->getStride();
     1020Void TComPrediction::combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize, Int bitDepthY )
     1021{
     1022  Pel*  piSrc[2]    = {pInYuv[0]->getAddr(COMPONENT_Y, uiPartAddr), pInYuv[1]->getAddr(COMPONENT_Y, uiPartAddr)};
     1023  UInt  uiSrcStride = pInYuv[0]->getStride(COMPONENT_Y);
     1024  Pel*  piDst       = pOutYuv->getAddr(COMPONENT_Y, uiPartAddr);
     1025  UInt  uiDstStride = pOutYuv->getStride(COMPONENT_Y);
    10161026 
    10171027  UInt  uiMaskStride= MAX_CU_SIZE;
     
    10521062        right  = (x==uiWidth-1)  ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1];
    10531063       
    1054         piDst[x] = (l!=r) ? ClipY( Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 )) : tmpTar[y*uiWidth+x];
     1064        piDst[x] = (l!=r) ? ClipBD( Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 ), bitDepthY) : tmpTar[y*uiWidth+x];
    10551065      }
    10561066      piDst     += uiDstStride;
     
    10701080        bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x];
    10711081       
    1072         piDst[x] = (t!=b) ? ClipY( Pel(( top + (tmpTar[y*uiWidth+x] << 1) + bottom ) >> 2 )) : tmpTar[y*uiWidth+x];
     1082        piDst[x] = (t!=b) ? ClipBD( Pel(( top + (tmpTar[y*uiWidth+x] << 1) + bottom ) >> 2 ), bitDepthY) : tmpTar[y*uiWidth+x];
    10731083      }
    10741084      piDst     += uiDstStride;
     
    10831093 
    10841094  // now combine chroma
    1085   Pel*  piSrcU[2]       = { pInYuv[0]->getCbAddr(uiPartAddr), pInYuv[1]->getCbAddr(uiPartAddr) };
    1086   Pel*  piSrcV[2]       = { pInYuv[0]->getCrAddr(uiPartAddr), pInYuv[1]->getCrAddr(uiPartAddr) };
    1087   UInt  uiSrcStrideC    = pInYuv[0]->getCStride();
    1088   Pel*  piDstU          = pOutYuv->getCbAddr(uiPartAddr);
    1089   Pel*  piDstV          = pOutYuv->getCrAddr(uiPartAddr);
    1090   UInt  uiDstStrideC    = pOutYuv->getCStride();
     1095  Pel*  piSrcU[2]       = { pInYuv[0]->getAddr(COMPONENT_Cb, uiPartAddr), pInYuv[1]->getAddr(COMPONENT_Cb, uiPartAddr) };
     1096  Pel*  piSrcV[2]       = { pInYuv[0]->getAddr(COMPONENT_Cr, uiPartAddr), pInYuv[1]->getAddr(COMPONENT_Cr, uiPartAddr) };
     1097  UInt  uiSrcStrideC    = pInYuv[0]->getStride(COMPONENT_Cb);
     1098  Pel*  piDstU          = pOutYuv->getAddr(COMPONENT_Cb, uiPartAddr);
     1099  Pel*  piDstV          = pOutYuv->getAddr(COMPONENT_Cr, uiPartAddr);
     1100  UInt  uiDstStrideC    = pOutYuv->getStride(COMPONENT_Cb);
    10911101  UInt  uiWidthC        = uiWidth >> 1;
    10921102  UInt  uiHeightC       = uiHeight >> 1;
     
    11341144        if (l!=r)
    11351145        {
    1136           filSrcU = ClipC( Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 ));
    1137           filSrcV = ClipC( Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 ));
     1146          filSrcU = ClipBD( Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 ), bitDepthY);
     1147          filSrcV = ClipBD( Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 ), bitDepthY);
    11381148        }
    11391149        else
     
    11671177        if (t!=b)
    11681178        {
    1169           filSrcU = ClipC( Pel(( topU + (tmpTarU[y*uiWidthC+x] << 1) + bottomU ) >> 2 ));
    1170           filSrcV = ClipC( Pel(( topV + (tmpTarV[y*uiWidthC+x] << 1) + bottomV ) >> 2 ));
     1179          filSrcU = ClipBD( Pel(( topU + (tmpTarU[y*uiWidthC+x] << 1) + bottomU ) >> 2 ), bitDepthY);
     1180          filSrcV = ClipBD( Pel(( topV + (tmpTarV[y*uiWidthC+x] << 1) + bottomV ) >> 2 ), bitDepthY);
    11711181        }
    11721182        else
     
    12051215  {
    12061216    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight );
    1207 #if H_3D_VSP
     1217#if NH_3D_VSP
    12081218    if ( pcCU->getVSPFlag(uiPartAddr) == 0)
    12091219    {
    12101220#endif
    1211     if ( eRefPicList != REF_PIC_LIST_X )
    1212     {
    1213       if( pcCU->getSlice()->getPPS()->getUseWP())
    1214       {
    1215         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
     1221      if ( eRefPicList != REF_PIC_LIST_X )
     1222      {
     1223        if( pcCU->getSlice()->getPPS()->getUseWP())
     1224        {
     1225          xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
     1226        }
     1227        else
     1228        {
     1229          xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
     1230        }
     1231        if ( pcCU->getSlice()->getPPS()->getUseWP() )
     1232        {
     1233          xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
     1234        }
    12161235      }
    12171236      else
    12181237      {
    1219         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    1220       }
    1221       if ( pcCU->getSlice()->getPPS()->getUseWP() )
    1222       {
    1223         xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    1224       }
    1225     }
    1226     else
    1227     {
    1228 #if H_3D_SPIVMP
     1238#if NH_3D_SPIVMP
    12291239        if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
    12301240        {
     
    12581268        {
    12591269#endif
     1270          if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
     1271          {
     1272            xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
     1273          }
     1274          else
     1275          {
     1276            xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
     1277          }
     1278#if NH_3D_SPIVMP
     1279        }
     1280#endif
     1281      }
     1282#if NH_3D_VSP
     1283    }
     1284    else
     1285    {
    12601286      if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    12611287      {
    1262         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
     1288        xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
    12631289      }
    12641290      else
    12651291      {
    1266         xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    1267       }
    1268 #if H_3D_SPIVMP
    1269         }
    1270 #endif
    1271     }
    1272 #if H_3D_VSP
     1292        xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
     1293      }
     1294    }
     1295#endif
     1296    return;
     1297  }
     1298
     1299  for ( iPartIdx = 0; iPartIdx < pcCU->getNumPartitions(); iPartIdx++ )
     1300  {
     1301    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight );
     1302
     1303#if NH_3D_VSP
     1304    if ( pcCU->getVSPFlag(uiPartAddr) == 0 )
     1305    {
     1306#endif
     1307    if ( eRefPicList != REF_PIC_LIST_X )
     1308    {
     1309      if( pcCU->getSlice()->getPPS()->getUseWP())
     1310      {
     1311        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
     1312      }
     1313      else
     1314      {
     1315        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
     1316      }
     1317      if ( pcCU->getSlice()->getPPS()->getUseWP() )
     1318      {
     1319        xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
     1320      }
    12731321    }
    12741322    else
    12751323    {
    1276       if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    1277       {
    1278         xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
    1279       }
    1280       else
    1281       {
    1282         xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    1283       }
    1284     }
    1285 #endif
    1286     return;
    1287   }
    1288 
    1289   for ( iPartIdx = 0; iPartIdx < pcCU->getNumPartitions(); iPartIdx++ )
    1290   {
    1291     pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight );
    1292 
    1293 #if H_3D_VSP
    1294     if ( pcCU->getVSPFlag(uiPartAddr) == 0 )
    1295     {
    1296 #endif
    1297     if ( eRefPicList != REF_PIC_LIST_X )
    1298     {
    1299       if( pcCU->getSlice()->getPPS()->getUseWP())
    1300       {
    1301         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
    1302       }
    1303       else
    1304       {
    1305         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    1306       }
    1307       if ( pcCU->getSlice()->getPPS()->getUseWP() )
    1308       {
    1309         xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    1310       }
    1311     }
    1312     else
    1313     {
    1314 #if H_3D_SPIVMP
    1315        if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
     1324#if NH_3D_SPIVMP
     1325      if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
    13161326      {
    13171327        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     
    13431353      {
    13441354#endif
    1345       if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    1346       {
    1347         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
    1348       }
    1349       else
    1350       {
    1351         xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    1352       }
    1353 #if H_3D_SPIVMP
    1354        }
    1355 #endif
    1356     }
    1357 #if H_3D_VSP
     1355        if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
     1356        {
     1357          xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
     1358        }
     1359        else
     1360        {
     1361          xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
     1362        }
     1363#if NH_3D_SPIVMP
     1364      }
     1365#endif
     1366    }
     1367#if NH_3D_VSP
    13581368    }
    13591369    else
     
    13811391  pcCU->checkMvVertRest(cMv, eRefPicList, iRefIdx );
    13821392#endif
    1383 #if H_3D_ARP
    1384   if(pcCU->getARPW( uiPartAddr ) > 0  && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC())
    1385   {
    1386     xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi );
     1393#if NH_3D_ARP
     1394  if(  pcCU->getARPW( uiPartAddr ) > 0 )
     1395  {
     1396    if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC() )
     1397  {
     1398      xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , pcYuvPred , bi );
    13871399  }
    13881400  else
    13891401  {
    1390     if(  pcCU->getARPW( uiPartAddr ) > 0
    1391       && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N
    1392       && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC()
    1393       )
    1394     {
    1395       xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );
     1402      xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, bi );
     1403    }     
    13961404    }
    13971405    else
     
    14041412    Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ) && ( isLuma(compID) || (iWidth > 8) );
    14051413      xPredInterBlk(compID,  pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, pcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID))
    1406 #if H_3D_ARP
     1414#if NH_3D_ARP
    14071415        , false
    14081416#endif
     
    14121420#endif
    14131421  }
    1414 #if H_3D_ARP
    1415     }
    1416   }
    1417 #endif
    1418 }
    1419 
    1420 #if H_3D_VSP
     1422#if NH_3D_ARP
     1423  }
     1424#endif
     1425}
     1426
     1427#if NH_3D_VSP
    14211428Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi )
    14221429{
     
    14391446Void TComPrediction::xPredInterUniSubPU( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU, Int heightSubPU )
    14401447{
    1441   UInt numPartsInLine       = pcCU->getPic()->getNumPartInWidth();
     1448  UInt numPartsInLine       = pcCU->getPic()->getNumPartInCtuWidth();
    14421449  UInt horiNumPartsInSubPU  = widthSubPU >> 2;
    14431450  UInt vertNumPartsInSubPU  = (heightSubPU >> 2) * numPartsInLine;
     
    14551462      pcCU->clipMv(cMv);
    14561463
    1457       xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi );
    1458       xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi );
    1459 
    1460     }
    1461   }
    1462 }
    1463 
    1464 #endif
    1465 
    1466 #if H_3D_ARP
    1467 Void TComPrediction::xPredInterUniARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
    1468 {
    1469   Int         iRefIdx      = pNewMvFiled ? pNewMvFiled->getRefIdx() : pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );           
    1470   TComMv      cMv          = pNewMvFiled ? pNewMvFiled->getMv()     : pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr );
     1464      xPredInterBlk( COMPONENT_Y,  pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) );
     1465      xPredInterBlk( COMPONENT_Cb, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) );
     1466      xPredInterBlk( COMPONENT_Cr, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) );
     1467    }
     1468  }
     1469}
     1470#endif
     1471
     1472#if NH_3D_ARP
     1473//temporal ARP
     1474Void TComPrediction::xPredInterUniARP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi )
     1475{
     1476  Int         iRefIdx      = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );           
     1477  TComMv      cMv          = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr );
    14711478  Bool        bTobeScaled  = false;
    14721479  TComPic* pcPicYuvBaseCol = NULL;
    14731480  TComPic* pcPicYuvBaseRef = NULL;
    14741481
    1475 #if H_3D_NBDV
     1482#if NH_3D_NBDV
    14761483  DisInfo cDistparity;
    14771484  cDistparity.m_acNBDV = pcCU->getDvInfo(0).m_acNBDV;
     
    14821489  UChar dW = pcCU->getARPW ( uiPartAddr );
    14831490
    1484   {
    14851491    Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList);
    1486     if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() )
    1487     {
    1488       bTobeScaled = true;
    1489     }
    1490 
    1491     pcPicYuvBaseCol =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(),                              cDistparity.m_aVIdxCan );
    1492 
    1493     pcPicYuvBaseRef =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan );
    1494 
    1495     if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan))
     1492  if (arpRefIdx < 0 || !pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan))
    14961493    {
    14971494      dW = 0;
     
    15001497    else
    15011498    {
    1502       assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() );
     1499    if( arpRefIdx != iRefIdx )
     1500    {
     1501      bTobeScaled = true;
     1502    }
     1503    pcPicYuvBaseCol =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(),                              cDistparity.m_aVIdxCan );
     1504    pcPicYuvBaseRef =  pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan );
    15031505    }
    15041506
     
    15071509      Int iCurrPOC    = pcCU->getSlice()->getPOC();
    15081510      Int iColRefPOC  = pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx );
    1509       Int iCurrRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList,  0);
     1511    Int iCurrRefPOC = pcCU->getSlice()->getRefPOC( eRefPicList, arpRefIdx );
    15101512      Int iScale = pcCU-> xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iCurrPOC, iColRefPOC);
    15111513      if ( iScale != 4096 )
     
    15131515        cMv = cMv.scaleMv( iScale );
    15141516      }
    1515       iRefIdx = 0;
    1516     }
     1517    iRefIdx = arpRefIdx;
    15171518  }
    15181519
    15191520  pcCU->clipMv(cMv);
    15201521  TComPicYuv* pcPicYuvRef = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec();
    1521   xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true );
    1522   xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), true );
     1522
     1523  for (UInt comp=COMPONENT_Y; comp< rpcYuvPred->getNumberValidComponents(); comp++)
     1524  {
     1525    const ComponentID compID=ComponentID(comp);
     1526    xPredInterBlk  ( compID,  pcCU, pcPicYuvRef, uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 ), pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true );
     1527  }
    15231528
    15241529  if( dW > 0 )
     
    15361541    pcCU->clipMv( cNBDV );
    15371542   
    1538     pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec();
    1539     xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );
    1540     if (iWidth > 8)
    1541       xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, true );
     1543    TComPicYuv* pcPicYuvBaseColRec = pcPicYuvBaseCol->getPicYuvRec();
     1544    TComPicYuv* pcPicYuvBaseRefRec = pcPicYuvBaseRef->getPicYuvRec();
    15421545   
    1543     pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec();
    1544     xPredInterLumaBlk  ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );
    1545  
    1546     if (iWidth > 8)
    1547       xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, true );
     1546    UInt uiCompNum = ( iWidth > 8 ) ? 3: 1;
     1547    for (UInt comp=COMPONENT_Y; comp< uiCompNum; comp++)
     1548    {
     1549      const ComponentID compID=ComponentID(comp);
     1550      xPredInterBlk  ( compID,  pcCU, pcPicYuvBaseColRec, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true );
     1551      xPredInterBlk  ( compID,  pcCU, pcPicYuvBaseRefRec, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true );
     1552    }   
    15481553   
    15491554    pYuvB0->subtractARP( pYuvB0 , pYuvB1 , uiPartAddr , iWidth , iHeight );
     
    15531558      pYuvB0->multiplyARP( uiPartAddr , iWidth , iHeight , dW );
    15541559    }
    1555     rpcYuvPred->addARP( rpcYuvPred , pYuvB0 , uiPartAddr , iWidth , iHeight , !bi );
     1560    rpcYuvPred->addARP( rpcYuvPred , pYuvB0 , uiPartAddr , iWidth , iHeight , !bi, pcCU->getSlice()->getSPS()->getBitDepths() );
    15561561  }
    15571562}
     
    15621567  TComMv      cDMv          = pcCU->getCUMvField( eBaseRefPicList )->getMv( uiPartAddr );
    15631568  TComPic* pcPicYuvBaseCol  = pcCU->getSlice()->getRefPic( eBaseRefPicList, iRefIdx ); 
    1564   TComPicYuv* pcYuvBaseCol  = pcPicYuvBaseCol->getPicYuvRec();
    1565   Int uiLCUAddr,uiAbsPartAddr;
    15661569  Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2  + ((cDMv.getHor() + 2)>>2);
    15671570  Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2);
     
    15691572  irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX);
    15701573  irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 
    1571   pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr);
    1572   TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr );
     1574
     1575  Int uiLCUAddr,uiAbsPartAddr;
     1576  pcPicYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr);
     1577  TComDataCU *pColCU = pcPicYuvBaseCol->getCtu( uiLCUAddr );
    15731578
    15741579  TComPic* pcPicYuvBaseTRef = NULL;
     
    16221627}
    16231628
    1624 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled )
     1629//inter-view ARP
     1630Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi )
    16251631{
    16261632  Int         iRefIdx       = pcCU->getCUMvField( eRefPicList )->getRefIdx( uiPartAddr );           
     
    16351641  Bool bTMVAvai = false;     
    16361642  TComMv cBaseTMV;
    1637   if( pNewMvFiled )
    1638   {
    1639     iRefIdx = pNewMvFiled->getRefIdx();
    1640     cDMv = pNewMvFiled->getMv();
    1641   }
     1643
    16421644  pcCU->clipMv(cTempDMv);
    16431645
    1644   assert(dW > 0);
    1645   if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex()))
    1646   {
    1647     dW = 0;
    1648   }
    1649   Int uiLCUAddr,uiAbsPartAddr;
    16501646  Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2  + ((cDMv.getHor() + 2)>>2);
    16511647  Int irefPUY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[uiPartAddr]] + iHeight/2 + ((cDMv.getVer() + 2)>>2);
     
    16531649  irefPUX = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()-> getPicWidthInLumaSamples()-1, irefPUX);
    16541650  irefPUY = (Int)Clip3<Int>(0, pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples()-1, irefPUY); 
    1655   pcYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr);
    1656   TComDataCU *pColCU = pcPicYuvBaseCol->getCU( uiLCUAddr );
     1651 
     1652  Int uiLCUAddr,uiAbsPartAddr;
     1653  pcPicYuvBaseCol->getCUAddrAndPartIdx( irefPUX, irefPUY, uiLCUAddr, uiAbsPartAddr);
     1654  TComDataCU *pColCU = pcPicYuvBaseCol->getCtu( uiLCUAddr );
    16571655  if( pcCU->getSlice()->isInterB() && !pcCU->getSlice()->getIsDepth() )
    16581656  {
     
    17251723      RefPicList eRefPicListCurr = RefPicList(iList);
    17261724      Int iRef = pColCU->getCUMvField(eRefPicListCurr)->getRefIdx(uiAbsPartAddr);
    1727       if( iRef != -1)
     1725      if( iRef != -1 && pcCU->getSlice()->getArpRefPicAvailable( eRefPicListCurr, pcPicYuvBaseCol->getViewIndex()))
    17281726      {
    17291727        pcPicYuvBaseTRef = pColCU->getSlice()->getRefPic(eRefPicListCurr, iRef); 
     
    17591757  }
    17601758
    1761   xPredInterLumaBlk  ( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ),        bTMVAvai);
    1762   xPredInterChromaBlk( pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ),        bTMVAvai);
    1763 
    1764   if( dW > 0 && bTMVAvai )
    1765   {
     1759  for (UInt comp=COMPONENT_Y; comp< rpcYuvPred->getNumberValidComponents(); comp++)
     1760  {
     1761    const ComponentID compID=ComponentID(comp);
     1762    xPredInterBlk  ( compID,  pcCU, pcYuvBaseCol, uiPartAddr, &cTempDMv, iWidth, iHeight, rpcYuvPred, bi || ( dW > 0 && bTMVAvai ), pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), bTMVAvai );
     1763  }
     1764
     1765  if( dW > 0 )
     1766  {
     1767    assert ( bTMVAvai );
    17661768    TComYuv*    pYuvCurrTRef    = &m_acYuvPredBase[0];
    17671769    TComYuv*    pYuvBaseTRef    = &m_acYuvPredBase[1];
     
    17771779      pYuvCurrTRef->clear(); pYuvBaseTRef->clear();
    17781780    }
    1779     xPredInterLumaBlk  ( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true,   true);
    1780 
    1781     if (iWidth > 8)
    1782       xPredInterChromaBlk( pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true,   true);
    1783 
    1784     xPredInterLumaBlk  ( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, true,   true);
    1785 
    1786     if (iWidth > 8)
    1787       xPredInterChromaBlk( pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv,  iWidth, iHeight, pYuvBaseTRef, true,   true);
     1781
     1782    UInt uiCompNum = ( iWidth > 8 ) ? 3: 1;
     1783    for (UInt comp=COMPONENT_Y; comp< uiCompNum; comp++)
     1784    {
     1785      const ComponentID compID=ComponentID(comp);
     1786      xPredInterBlk  ( compID,  pcCU, pcYuvCurrTref, uiPartAddr, &cBaseTMV, iWidth, iHeight, pYuvCurrTRef, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true );
     1787      xPredInterBlk  ( compID,  pcCU, pcYuvBaseTref, uiPartAddr, &cTempMv, iWidth, iHeight, pYuvBaseTRef, true, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)), true );
     1788    }
    17881789
    17891790    pYuvCurrTRef->subtractARP( pYuvCurrTRef , pYuvBaseTRef , uiPartAddr , iWidth , iHeight ); 
     
    17921793      pYuvCurrTRef->multiplyARP( uiPartAddr , iWidth , iHeight , dW );
    17931794    }
    1794     rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi );
     1795    rpcYuvPred->addARP( rpcYuvPred , pYuvCurrTRef , uiPartAddr , iWidth , iHeight , !bi, pcCU->getSlice()->getSPS()->getBitDepths() );
    17951796  }
    17961797}
     
    18471848}
    18481849
    1849 #if H_3D_VSP
    1850 
     1850#if NH_3D_VSP
    18511851Void TComPrediction::xPredInterBiVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred )
    18521852{
     
    18701870  }
    18711871
    1872   xWeightedAverage( &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred );
    1873 }
    1874 
     1872  xWeightedAverage( &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred, pcCU->getSlice()->getSPS()->getBitDepths() );
     1873}
    18751874#endif
    18761875
     
    18921891
    18931892Void TComPrediction::xPredInterBlk(const ComponentID compID, TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *dstPic, Bool bi, const Int bitDepth
    1894 #if H_3D_ARP
     1893#if NH_3D_ARP
    18951894    , Bool filterType
    18961895#endif
     
    19141913  Int     yFrac  = mv->getVer() & ((1<<shiftVer)-1);
    19151914
    1916 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     1915#if NH_3D_INTEGER_MV_DEPTH
    19171916  if( cu->getSlice()->getIsDepth() )
    19181917  {
    19191918    refOffset = mv->getHor() + mv->getVer() * refStride;
    19201919    ref       = refPic->getAddr(compID, cu->getCtuRsAddr(), cu->getZorderIdxInCtu() + partAddr ) + refOffset;
    1921 
    19221920    xFrac     = 0;
    19231921    yFrac     = 0;
     
    19371935    m_if.filterHor(compID, ref, refStride, dst,  dstStride, cxWidth, cxHeight, xFrac, !bi, chFmt, bitDepth
    19381936#endif
    1939 #if H_3D_ARP
     1937#if NH_3D_ARP
    19401938    , filterType
    19411939#endif
     
    19491947    m_if.filterVer(compID, ref, refStride, dst, dstStride, cxWidth, cxHeight, yFrac, true, !bi, chFmt, bitDepth
    19501948#endif
    1951 #if H_3D_ARP
     1949#if NH_3D_ARP
    19521950    , filterType
    19531951#endif
     
    19621960
    19631961    m_if.filterHor(compID, ref - ((vFilterSize>>1) -1)*refStride, refStride, tmp, tmpStride, cxWidth, cxHeight+vFilterSize-1, xFrac, false,      chFmt, bitDepth
    1964 #if H_3D_ARP
     1962#if NH_3D_ARP
    19651963    , filterType
    19661964#endif
     
    19711969    m_if.filterVer(compID, tmp + ((vFilterSize>>1) -1)*tmpStride, tmpStride, dst, dstStride, cxWidth, cxHeight,               yFrac, false, !bi, chFmt, bitDepth
    19721970#endif
    1973 #if H_3D_ARP
     1971#if NH_3D_ARP
    19741972    , filterType
    19751973#endif
     
    22082206
    22092207  // LLS parameters estimation
     2208
    22102209  Int x = 0, y = 0, xx = 0, xy = 0;
    22112210  Int precShift = std::max(0, bitDepth - 12);
     
    22642263  else
    22652264  {
    2266     xy += xx >> IC_REG_COST_SHIFT;
    2267     xx += xx >> IC_REG_COST_SHIFT;
    2268     Int a1 = ( xy << iCountShift ) - ((y * x) >> precShift);
    2269     Int a2 = ( xx << iCountShift ) - ((x * x) >> precShift);
    2270     const Int iShift = IC_CONST_SHIFT;
    2271     const Int iShiftA2 = 6;
    2272     const Int iAccuracyShift = 15;
    2273     Int iScaleShiftA2 = 0;
    2274     Int iScaleShiftA1 = 0;
     2265  xy += xx >> IC_REG_COST_SHIFT;
     2266  xx += xx >> IC_REG_COST_SHIFT;
     2267  Int a1 = ( xy << iCountShift ) - ((y * x) >> precShift);
     2268  Int a2 = ( xx << iCountShift ) - ((x * x) >> precShift);
     2269  const Int iShift = IC_CONST_SHIFT;
     2270      const Int iShiftA2 = 6;
     2271      const Int iAccuracyShift = 15;
     2272
     2273      Int iScaleShiftA2 = 0;
     2274      Int iScaleShiftA1 = 0;
    22752275    Int a1s;
    22762276    Int a2s;
    2277    
    2278     a1 = Clip3(0, 2*a2, a1);
    2279     iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2;
    2280     iScaleShiftA1 = iScaleShiftA2 - IC_SHIFT_DIFF;
    2281    
    2282     if( iScaleShiftA1 < 0 )
    2283     {
    2284       iScaleShiftA1 = 0;
    2285     }
    2286     if( iScaleShiftA2 < 0 )
    2287     {
    2288       iScaleShiftA2 = 0;
    2289     }
    2290    
    2291     Int iScaleShiftA = iScaleShiftA2 + iAccuracyShift - iShift - iScaleShiftA1;
    2292 
    2293     a2s = a2 >> iScaleShiftA2;
    2294     a1s = a1 >> iScaleShiftA1;
    2295    
    2296     a = a1s * m_uiaShift[ a2s ];
    2297     a = a >> iScaleShiftA;
    2298     b = (  y - ( ( a * x ) >> iShift ) + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift;
    2299   }
    2300 }
     2277
     2278      a1 = Clip3(0, 2*a2, a1);
     2279      iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2;
     2280      iScaleShiftA1 = iScaleShiftA2 - IC_SHIFT_DIFF;
     2281
     2282      if( iScaleShiftA1 < 0 )
     2283      {
     2284        iScaleShiftA1 = 0;
     2285      }
     2286
     2287      if( iScaleShiftA2 < 0 )
     2288      {
     2289        iScaleShiftA2 = 0;
     2290      }
     2291
     2292      Int iScaleShiftA = iScaleShiftA2 + iAccuracyShift - iShift - iScaleShiftA1;
     2293
     2294
     2295      a2s = a2 >> iScaleShiftA2;
     2296
     2297      a1s = a1 >> iScaleShiftA1;
     2298
     2299      a = a1s * m_uiaShift[ a2s ];
     2300      a = a >> iScaleShiftA;
     2301      b = (  y - ( ( a * x ) >> iShift ) + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift;
     2302    }
     2303  }   
    23012304#endif
    23022305
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComPrediction.h

    r1225 r1274  
    4545#include "TComWeightPrediction.h"
    4646
     47#if NH_3D_ARP
     48#include "TComPic.h"
     49#endif
    4750// forward declaration
    4851class TComMv;
     
    7780  TComYuv   m_acYuvPred[NUM_REF_PIC_LIST_01];
    7881  TComYuv   m_cYuvPredTemp;
    79 #if H_3D_ARP
     82#if NH_3D_ARP
    8083  TComYuv   m_acYuvPredBase[2];
    8184#endif
     
    9194#endif
    9295
    93 #if H_3D_VSP
     96#if NH_3D_VSP
    9497  Int*    m_pDepthBlock;         ///< Store a depth block, local variable, to prevent memory allocation every time
    9598  TComYuv m_cYuvDepthOnVsp;
     
    100103
    101104  // motion compensation functions
    102 #if H_3D_ARP
    103   Void xPredInterUniARP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL );
     105#if NH_3D_ARP
     106  Void xPredInterUniARP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi );
     107  Void xPredInterUniARPviewRef  ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi );
    104108  Bool xCheckBiInterviewARP     ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eBaseRefPicList, TComPic*& pcPicYuvCurrTRef, TComMv& cBaseTMV, Int& iCurrTRefPoc );
    105   Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL );
    106109#endif
    107110
    108111  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv* pcYuvPred, Bool bi=false          );
    109112  Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight,                         TComYuv* pcYuvPred          );
    110 #if H_3D_VSP
     113#if NH_3D_VSP
    111114  Void xPredInterUniVSP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false          );
    112115  Void xPredInterBiVSP          ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight,                         TComYuv*& rpcYuvPred );
     
    114117
    115118  Void xPredInterBlk(const ComponentID compID, TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *dstPic, Bool bi, const Int bitDepth
    116 #if H_3D_ARP
     119#if NH_3D_ARP
    117120    , Bool filterType = false
    118121#endif
     
    122125 );
    123126
    124 #if H_3D_ARP
    125     , Bool filterType = false
    126 #endif
    127 #if H_3D_VSP
     127#if NH_3D_VSP
    128128  Void xPredInterUniSubPU        ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 );
    129129#endif
     
    137137  Void xDCPredFiltering( const Pel* pSrc, Int iSrcStride, Pel* pDst, Int iDstStride, Int iWidth, Int iHeight, ChannelType channelType );
    138138  Bool xCheckIdenticalMotion    ( TComDataCU* pcCU, UInt PartAddr);
    139 #if H_3D_SPIVMP
     139#if NH_3D_SPIVMP
    140140  Bool xCheckTwoSPMotion ( TComDataCU* pcCU, UInt PartAddr0, UInt PartAddr1 );
    141141  Void xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr );
     
    184184#endif
    185185 
    186 #if H_3D_DBBP
     186#if NH_3D_DBBP
    187187  PartSize      getPartitionSizeFromDepth(Pel* pDepthPels, UInt uiDepthStride, UInt uiSize, TComDataCU*& pcCU);
    188188  Bool          getSegmentMaskFromDepth( Pel* pDepthPels, UInt uiDepthStride, UInt uiWidth, UInt uiHeight, Bool* pMask, TComDataCU*& pcCU);
    189   Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize );
     189  Void          combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize, Int bitDepthY );
    190190#endif
    191191
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComRdCost.cpp

    r1256 r1274  
    311311  m_bUseEstimatedVSD        = false;
    312312#endif
    313 #if H_3D_DBBP
     313#if NH_3D_DBBP
    314314  m_bUseMask                = false;
    315315#endif
     
    340340  rcDistParam.DistFunc = m_afpDistortFunc[eDFunc + g_aucConvertToBit[ rcDistParam.iCols ] + 1 ];
    341341
    342 #if H_3D_DBBP
     342#if NH_3D_DBBP
    343343  if( m_bUseMask )
    344344  {
     
    397397  }
    398398
    399 #if H_3D_DBBP
     399#if NH_3D_DBBP
    400400  if( m_bUseMask )
    401401  {
     
    446446  }
    447447
    448 #if H_3D_DBBP
     448#if NH_3D_DBBP
    449449  if( m_bUseMask )
    450450  {
     
    468468  rcDP.bitDepth   = bitDepth;
    469469  rcDP.DistFunc   = m_afpDistortFunc[ ( bHadamard ? DF_HADS : DF_SADS ) + g_aucConvertToBit[ iWidth ] + 1 ];
    470 #if H_3D_DBBP
     470#if NH_3D_DBBP
    471471  if( m_bUseMask )
    472472  {
     
    656656// ====================================================================================================================
    657657
    658 #if H_3D_DBBP
     658#if NH_3D_DBBP
    659659// --------------------------------------------------------------------------------------------------------------------
    660660// Masked distortion functions
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComRdCost.h

    r1225 r1274  
    167167#endif
    168168  Int                     m_iCostScale;
    169 #if H_3D_DBBP
     169#if NH_3D_DBBP
    170170  Bool                    m_bUseMask;
    171171#endif
     
    206206  Void    setDistParam( DistParam& rcDP, Int bitDepth, Pel* p1, Int iStride1, Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard = false );
    207207
    208 #if H_3D_DBBP
     208#if NH_3D_DBBP
    209209  Void    setUseMask(Bool b) { m_bUseMask = b; }
    210210#endif
     
    302302  static Distortion xCalcHADs4x4      ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep );
    303303  static Distortion xCalcHADs8x8      ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep );
    304 #if H_3D_DBBP
     304#if NH_3D_DBBP
    305305  static UInt xGetMaskedSSE     ( DistParam* pcDtParam );
    306306  static UInt xGetMaskedSAD     ( DistParam* pcDtParam );
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComRom.cpp

    r1200 r1274  
    564564Bool g_disableNumbering = false;
    565565Bool g_disableHLSTrace = false;
    566 UInt64 g_stopAtCounter       = 937234;
     566UInt64 g_stopAtCounter       = 0;
    567567Bool g_traceCopyBack         = false;
    568568Bool g_decTraceDispDer       = false;
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComSlice.cpp

    r1225 r1274  
    224224    m_aaiCodedScale [i].resize(MAX_NUM_LAYERS);
    225225  }
     226 
    226227#endif
    227228
     
    277278    m_iSliceChromaQpDelta[component] = 0;
    278279  }
    279 #if H_3D_IV_MERGE
     280#if NH_3D_IV_MERGE
    280281  m_maxNumMergeCand = MRG_MAX_NUM_CANDS_MEM;
    281282#else
     
    19951996      m_dimensionId[i][j] = 0;
    19961997    }
    1997 #if H_3D_ARP
     1998#if NH_3D_ARP
    19981999#endif
    19992000  } 
     
    20312032Int TComVPS::scalTypeToScalIdx( ScalabilityType scalType ) const
    20322033{
    2033   assert( scalType >= 0 && scalType <= MAX_NUM_SCALABILITY_TYPES );
    2034   assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMaskFlag( scalType ) );
     2034  assert( (Int)scalType >= 0 && (Int)scalType <= MAX_NUM_SCALABILITY_TYPES );
     2035  assert( (Int)scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMaskFlag( scalType ) );
    20352036  Int scalIdx = 0;
    20362037  for( Int curScalType = 0; curScalType < scalType; curScalType++ )
     
    35843585#endif
    35853586}
    3586 #if H_3D
    3587 Void TComSlice::setDefaultRefView( )
    3588 {
    3589   setDefaultRefViewIdx( -1 );
    3590   setDefaultRefViewIdxAvailableFlag( false );
     3587#if NH_3D_NBDV
     3588Void TComSlice::setDefaultRefView()
     3589{
     3590  setDefaultRefViewIdx(-1);
     3591  setDefaultRefViewIdxAvailableFlag(false);
    35913592
    35923593  Int valid = 0;
    35933594  Int DefaultRefViewIdx = -1;
    3594   for( UInt curViewIdx = 0; curViewIdx < getViewIndex() && valid == 0; curViewIdx++ )
    3595   {
    3596     for( Int iRefListId = 0; ( iRefListId < (isInterB() ? 2 : 1) ) && !isIntra() && valid == 0; iRefListId++ )
    3597     {
    3598       RefPicList eRefPicList = RefPicList( iRefListId );
    3599       Int        iNumRefPics = getNumRefIdx( eRefPicList );
    3600       for( Int i = 0; i < iNumRefPics; i++ )
     3595
     3596  for(UInt curViewIdx = 0; curViewIdx < getViewIndex() && valid == 0; curViewIdx++)
     3597  {
     3598    for(Int iRefListId = 0; (iRefListId < (isInterB() ? 2 : 1)) && !isIntra() && valid == 0; iRefListId++)
     3599    {
     3600      RefPicList eRefPicList = RefPicList(iRefListId);
     3601      Int        iNumRefPics = getNumRefIdx(eRefPicList);
     3602
     3603      for(Int i = 0; i < iNumRefPics; i++)
    36013604      {
    3602         if(getPOC() == getRefPic( eRefPicList, i )->getPOC() && curViewIdx == getRefPic( eRefPicList, i )->getViewIndex())
     3605        if(getPOC() == getRefPic(eRefPicList, i)->getPOC() && curViewIdx == getRefPic(eRefPicList, i)->getViewIndex())
    36033606        {
    36043607          valid = 1;
     
    36093612    }
    36103613  }
    3611   if( valid )
    3612   {
    3613     setDefaultRefViewIdx( DefaultRefViewIdx );
    3614     setDefaultRefViewIdxAvailableFlag( true );   
    3615   }
    3616 }
    3617 #endif
    3618 
    3619 #if H_3D_ARP
     3614
     3615  if(valid)
     3616  {
     3617    setDefaultRefViewIdx(DefaultRefViewIdx);
     3618    setDefaultRefViewIdxAvailableFlag(true);
     3619  }
     3620}
     3621#endif
     3622
     3623#if NH_3D_ARP
    36203624Void TComSlice::setARPStepNum( TComPicLists*ivPicLists )
    36213625{
     
    36843688          m_arpRefPicAvailable[eRefPicList][layerIdInNuh] = false;
    36853689        }
     3690      }
     3691    }
     3692  }
     3693  if( m_nARPStepNum > 1)
     3694  {
     3695    for(Int i = 0; i < getNumActiveRefLayerPics(); i ++ )
     3696    {
     3697      Int  iLayerId = getRefPicLayerId( i );
     3698      Int  iViewIdx =   getVPS()->getViewIndex(iLayerId);
     3699      Bool bIsDepth = ( getVPS()->getDepthId  ( iLayerId ) == 1 );
     3700      if( iViewIdx<getViewIndex() && !bIsDepth )
     3701      {
     3702        setBaseViewRefPicList( ivPicLists->getPicList( iLayerId ), iViewIdx );
    36863703      }
    36873704    }
     
    38443861  setupLUT = setupLUT || getViewSynthesisPredFlag( );
    38453862
    3846 #if H_3D_NBDV_REF
     3863#if NH_3D_NBDV_REF
    38473864  setupLUT = setupLUT || getDepthRefinementFlag( );
    38483865#endif 
    38493866
    3850 #if H_3D_IV_MERGE
     3867#if NH_3D_IV_MERGE
    38513868  setupLUT = setupLUT || ( getIvMvPredFlag() && getIsDepth() );
    38523869#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComSlice.h

    r1256 r1274  
    25942594  Int        m_aiAlterRefIdx   [2];
    25952595#endif
    2596 #if H_3D_ARP
     2596#if NH_3D_ARP
    25972597  Bool       m_arpRefPicAvailable[2][MAX_NUM_LAYERS];
    25982598  TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS];
     
    27062706  Int                         getNumCurCmpLIds( )                      const         { return (Int) m_inCmpRefViewIdcs.size();                       }
    27072707  TComPic*                    getIvPic( Bool depthFlag, Int viewIndex) const         { return  m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ];    }
    2708 #endif                                                                                                                                         
     2708#endif                                                                                                                                               
    27092709#if NH_3D                                                                                                                                             
    27102710  TComPic*                    getTexturePic       ()                                 { return  m_ivPicsCurrPoc[0][ m_viewIndex ];                    }
    2711 #endif                                                                                                                                               
    2712 #if NH_3D_IC
     2711#endif                           
     2712#if NH_3D_IC                                                                                                                                         
    27132713  Void                        setApplyIC( Bool b )                                   { m_bApplyIC = b;                                               }
    27142714  Bool                        getApplyIC()                                           { return m_bApplyIC;                                            }
    2715   Void                        xSetApplyIC();
    2716   Void                        xSetApplyIC(Bool bUseLowLatencyICEnc);
    2717 
     2715  Void                        xSetApplyIC();                                                                                                         
     2716  Void                        xSetApplyIC(Bool bUseLowLatencyICEnc);                                                                                 
    27182717  Void                        setIcSkipParseFlag( Bool b )                           { m_icSkipParseFlag = b;                                        }
    27192718  Bool                        getIcSkipParseFlag()                                   { return m_icSkipParseFlag;                                     }
    27202719#endif                                                                                                                                               
    2721 #if H_3D_ARP                                                                                                                                         
     2720#if NH_3D_ARP                                                                                                                                         
    27222721  Void                        setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx )      { m_pBaseViewRefPicList[iViewIdx] = pListPic; }                 
    27232722  Void                        setARPStepNum( TComPicLists*ivPicLists );                                                                             
     
    29262925  Int                         getAlterRefIdx          ( RefPicList e )               { return  m_aiAlterRefIdx[e];                                   }
    29272926#endif                                                                                                                                               
    2928 #if H_3D_ARP                                                                                                                                         
     2927#if NH_3D_ARP                                                                                                                                         
    29292928  Int                         getFirstTRefIdx        ( RefPicList e )                { return  m_aiFirstTRefIdx[e];                                  }
    29302929  Void                        setFirstTRefIdx        ( RefPicList e, Int i )         { m_aiFirstTRefIdx[e]    = i;                                   }
     
    30743073  Int                         getMpiSubPbSize           ( )                          { return m_mpiSubPbSize           ;                             };
    30753074  Int                         getSubPbSize              ( )                          { return m_subPbSize              ;                             };
     3075#if NH_3D_NBDV
     3076  Int                         getDefaultRefViewIdx()                                 { return m_iDefaultRefViewIdx;                                  }
     3077  Void                        setDefaultRefViewIdx(Int iViewIdx)                     { m_iDefaultRefViewIdx = iViewIdx;                              }
     3078
     3079  Bool                        getDefaultRefViewIdxAvailableFlag()                    { return m_bDefaultRefViewIdxAvailableFlag;                     }
     3080  Void                        setDefaultRefViewIdxAvailableFlag(Bool bViewIdx)       { m_bDefaultRefViewIdxAvailableFlag = bViewIdx;                 }
     3081  Void                        setDefaultRefView( );
     3082#endif
    30763083#endif
    30773084  // Inference
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComYuv.cpp

    r1200 r1274  
    487487}
    488488
    489 #if H_3D_ARP
    490 Void TComYuv::addARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )
    491 {
    492   addARPLuma   ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth   , uiHeight    , bClip );
    493   addARPChroma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1, uiHeight>>1 , bClip );
    494 }
    495 
    496 Void TComYuv::addARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )
     489#if NH_3D_ARP
     490Void TComYuv::addARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths )
     491{
     492  addARPLuma   ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth   , uiHeight    , bClip , clipBitDepths);
     493  addARPChroma ( pcYuvSrc0, pcYuvSrc1, uiAbsPartIdx, uiWidth>>1, uiHeight>>1 , bClip , clipBitDepths);
     494}
     495
     496Void TComYuv::addARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths )
    497497{
    498498  Int x, y;
    499499
    500   Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx );
    501   Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx );
    502   Pel* pDst  = getLumaAddr( uiAbsPartIdx );
    503 
    504   UInt iSrc0Stride = pcYuvSrc0->getStride();
    505   UInt iSrc1Stride = pcYuvSrc1->getStride();
    506   UInt iDstStride  = getStride();
    507   Int iIFshift = IF_INTERNAL_PREC - g_bitDepthY;
     500  Pel* pSrc0 = pcYuvSrc0->getAddr( COMPONENT_Y, uiAbsPartIdx );
     501  Pel* pSrc1 = pcYuvSrc1->getAddr( COMPONENT_Y, uiAbsPartIdx );
     502  Pel* pDst  = getAddr( COMPONENT_Y, uiAbsPartIdx );
     503
     504  UInt iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Y);
     505  UInt iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Y);
     506  UInt iDstStride  = getStride(COMPONENT_Y);
     507  const Int clipbd = clipBitDepths.recon[CHANNEL_TYPE_LUMA];
     508  Int iIFshift = IF_INTERNAL_PREC - clipbd;
    508509  Int iOffSet  = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS;
    509510  for ( y = uiHeight-1; y >= 0; y-- )
     
    514515      if( bClip )
    515516      {
    516         pDst[x] = ClipY( ( pDst[x] + iOffSet ) >> iIFshift );
     517        pDst[x] = Pel(ClipBD<Int>(Int( ( pDst[x] + iOffSet ) >> iIFshift ), clipbd));
    517518      }
    518519    }
     
    523524}
    524525
    525 Void TComYuv::addARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip )
     526Void TComYuv::addARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Bool bClip, const BitDepths &clipBitDepths )
    526527{
    527528  Int x, y;
    528529
    529   Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx );
    530   Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx );
    531   Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx );
    532   Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx );
    533   Pel* pDstU = getCbAddr( uiAbsPartIdx );
    534   Pel* pDstV = getCrAddr( uiAbsPartIdx );
    535 
    536   UInt  iSrc0Stride = pcYuvSrc0->getCStride();
    537   UInt  iSrc1Stride = pcYuvSrc1->getCStride();
    538   UInt  iDstStride  = getCStride();
    539 
    540   Int iIFshift = IF_INTERNAL_PREC - g_bitDepthC;
     530  Pel* pSrcU0 = pcYuvSrc0->getAddr( COMPONENT_Cb, uiAbsPartIdx );
     531  Pel* pSrcU1 = pcYuvSrc1->getAddr( COMPONENT_Cb, uiAbsPartIdx );
     532  Pel* pSrcV0 = pcYuvSrc0->getAddr( COMPONENT_Cr, uiAbsPartIdx );
     533  Pel* pSrcV1 = pcYuvSrc1->getAddr( COMPONENT_Cr, uiAbsPartIdx );
     534  Pel* pDstU = getAddr( COMPONENT_Cb, uiAbsPartIdx );
     535  Pel* pDstV = getAddr( COMPONENT_Cr, uiAbsPartIdx );
     536
     537  UInt  iSrc0StrideCb = pcYuvSrc0->getStride(COMPONENT_Cb);
     538  UInt  iSrc1StrideCb = pcYuvSrc1->getStride(COMPONENT_Cb);
     539  UInt  iDstStrideCb  = getStride(COMPONENT_Cb);
     540
     541  UInt  iSrc0StrideCr = pcYuvSrc0->getStride(COMPONENT_Cr);
     542  UInt  iSrc1StrideCr = pcYuvSrc1->getStride(COMPONENT_Cr);
     543  UInt  iDstStrideCr  = getStride(COMPONENT_Cr);
     544
     545  const Int clipbd = clipBitDepths.recon[CHANNEL_TYPE_CHROMA];
     546  Int iIFshift = IF_INTERNAL_PREC - clipbd;
    541547  Int iOffSet  = ( 1 << ( iIFshift - 1 ) ) + IF_INTERNAL_OFFS;
    542548
     
    549555      if( bClip )
    550556      {
    551         pDstU[x] = ClipC( ( pDstU[x] + iOffSet ) >> iIFshift );
    552         pDstV[x] = ClipC( ( pDstV[x] + iOffSet ) >> iIFshift );
    553       }
    554     }
    555 
     557        pDstU[x] = Pel(ClipBD<Int>( Int( ( pDstU[x] + iOffSet ) >> iIFshift ), clipbd));
     558        pDstV[x] = Pel(ClipBD<Int>( Int( ( pDstV[x] + iOffSet ) >> iIFshift ), clipbd));
     559      }
     560    }
     561
     562    pSrcU0 += iSrc0StrideCb;
     563    pSrcU1 += iSrc1StrideCb;
     564    pSrcV0 += iSrc0StrideCr;
     565    pSrcV1 += iSrc1StrideCr;
     566    pDstU  += iDstStrideCb;
     567    pDstV  += iDstStrideCr;
     568  }
     569}
     570
     571Void TComYuv::subtractARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
     572{
     573  subtractARPLuma  ( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth    , uiHeight    );
     574
     575  if (uiWidth > 8 && pcYuvSrc1->getNumberValidComponents() > 1)
     576  {
     577    subtractARPChroma( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );
     578}
     579}
     580
     581Void TComYuv::subtractARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
     582{
     583  Int x, y;
     584
     585  Pel* pSrc0 = pcYuvSrc0->getAddr(COMPONENT_Y, uiAbsPartIdx );
     586  Pel* pSrc1 = pcYuvSrc1->getAddr(COMPONENT_Y, uiAbsPartIdx );
     587  Pel* pDst  = getAddr           (COMPONENT_Y, uiAbsPartIdx );
     588
     589  Int  iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Y);
     590  Int  iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Y);
     591  Int  iDstStride  = getStride(COMPONENT_Y);
     592  for ( y = uiHeight-1; y >= 0; y-- )
     593  {
     594    for ( x = uiWidth-1; x >= 0; x-- )
     595    {
     596      pDst[x] = pSrc0[x] - pSrc1[x];
     597    }
     598    pSrc0 += iSrc0Stride;
     599    pSrc1 += iSrc1Stride;
     600    pDst  += iDstStride;
     601  }
     602}
     603
     604Void TComYuv::subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
     605{
     606  Int x, y;
     607
     608  Pel* pSrcU0 = pcYuvSrc0->getAddr(COMPONENT_Cb, uiAbsPartIdx );
     609  Pel* pSrcU1 = pcYuvSrc1->getAddr(COMPONENT_Cb, uiAbsPartIdx );
     610  Pel* pSrcV0 = pcYuvSrc0->getAddr(COMPONENT_Cr, uiAbsPartIdx );
     611  Pel* pSrcV1 = pcYuvSrc1->getAddr(COMPONENT_Cr, uiAbsPartIdx );
     612  Pel* pDstU  = getAddr(COMPONENT_Cb, uiAbsPartIdx );
     613  Pel* pDstV  = getAddr(COMPONENT_Cr, uiAbsPartIdx );
     614
     615  Int  iSrc0Stride = pcYuvSrc0->getStride(COMPONENT_Cb);
     616  Int  iSrc1Stride = pcYuvSrc1->getStride(COMPONENT_Cb);
     617  Int  iDstStride  = getStride( COMPONENT_Cb );
     618  for ( y = uiHeight-1; y >= 0; y-- )
     619  {
     620    for ( x = uiWidth-1; x >= 0; x-- )
     621    {
     622      pDstU[x] = pSrcU0[x] - pSrcU1[x];
     623      pDstV[x] = pSrcV0[x] - pSrcV1[x];
     624    }
    556625    pSrcU0 += iSrc0Stride;
    557626    pSrcU1 += iSrc1Stride;
     
    563632}
    564633
    565 Void TComYuv::subtractARP( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
    566 {
    567   subtractARPLuma  ( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth    , uiHeight    );
    568 
    569   if (uiWidth > 8)
    570     subtractARPChroma( pcYuvSrc0, pcYuvSrc1,  uiAbsPartIdx, uiWidth>>1 , uiHeight>>1 );
    571 }
    572 
    573 Void TComYuv::subtractARPLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
    574 {
    575   Int x, y;
    576 
    577   Pel* pSrc0 = pcYuvSrc0->getLumaAddr( uiAbsPartIdx );
    578   Pel* pSrc1 = pcYuvSrc1->getLumaAddr( uiAbsPartIdx );
    579   Pel* pDst  = getLumaAddr( uiAbsPartIdx );
    580 
    581   Int  iSrc0Stride = pcYuvSrc0->getStride();
    582   Int  iSrc1Stride = pcYuvSrc1->getStride();
    583   Int  iDstStride  = getStride();
    584   for ( y = uiHeight-1; y >= 0; y-- )
    585   {
    586     for ( x = uiWidth-1; x >= 0; x-- )
    587     {
    588       pDst[x] = pSrc0[x] - pSrc1[x];
    589     }
    590     pSrc0 += iSrc0Stride;
    591     pSrc1 += iSrc1Stride;
    592     pDst  += iDstStride;
    593   }
    594 }
    595 
    596 Void TComYuv::subtractARPChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight )
    597 {
    598   Int x, y;
    599 
    600   Pel* pSrcU0 = pcYuvSrc0->getCbAddr( uiAbsPartIdx );
    601   Pel* pSrcU1 = pcYuvSrc1->getCbAddr( uiAbsPartIdx );
    602   Pel* pSrcV0 = pcYuvSrc0->getCrAddr( uiAbsPartIdx );
    603   Pel* pSrcV1 = pcYuvSrc1->getCrAddr( uiAbsPartIdx );
    604   Pel* pDstU  = getCbAddr( uiAbsPartIdx );
    605   Pel* pDstV  = getCrAddr( uiAbsPartIdx );
    606 
    607   Int  iSrc0Stride = pcYuvSrc0->getCStride();
    608   Int  iSrc1Stride = pcYuvSrc1->getCStride();
    609   Int  iDstStride  = getCStride();
    610   for ( y = uiHeight-1; y >= 0; y-- )
    611   {
    612     for ( x = uiWidth-1; x >= 0; x-- )
    613     {
    614       pDstU[x] = pSrcU0[x] - pSrcU1[x];
    615       pDstV[x] = pSrcV0[x] - pSrcV1[x];
    616     }
    617     pSrcU0 += iSrc0Stride;
    618     pSrcU1 += iSrc1Stride;
    619     pSrcV0 += iSrc0Stride;
    620     pSrcV1 += iSrc1Stride;
    621     pDstU  += iDstStride;
    622     pDstV  += iDstStride;
    623   }
    624 }
    625 
    626634Void TComYuv::multiplyARP( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW )
    627635{
    628636  multiplyARPLuma( uiAbsPartIdx , uiWidth , uiHeight , dW );
    629637
    630   if (uiWidth > 8)
     638  if ( uiWidth > 8 && getNumberValidComponents() > 1 )
     639  {
    631640    multiplyARPChroma( uiAbsPartIdx , uiWidth >> 1 , uiHeight >> 1 , dW );
     641}
    632642}
    633643
     
    641651Void TComYuv::multiplyARPLuma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW )
    642652{
    643   Pel* pDst  = getLumaAddr( uiAbsPartIdx );
    644   Int  iDstStride  = getStride();
     653  Pel* pDst  = getAddr(COMPONENT_Y, uiAbsPartIdx );
     654  Int  iDstStride  = getStride(COMPONENT_Y);
    645655  for ( Int y = uiHeight-1; y >= 0; y-- )
    646656  {
     
    652662Void TComYuv::multiplyARPChroma( UInt uiAbsPartIdx , UInt uiWidth , UInt uiHeight , UChar dW )
    653663{
    654   Pel* pDstU  = getCbAddr( uiAbsPartIdx );
    655   Pel* pDstV  = getCrAddr( uiAbsPartIdx );
    656 
    657   Int  iDstStride  = getCStride();
     664  Pel* pDstU  = getAddr( COMPONENT_Cb, uiAbsPartIdx );
     665  Pel* pDstV  = getAddr( COMPONENT_Cr, uiAbsPartIdx );
     666
     667  Int  iDstStride  = getStride( COMPONENT_Cb );
    658668  for ( Int y = uiHeight-1; y >= 0; y-- )
    659669  {
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComYuv.h

    r1200 r1274  
    206206#if NH_3D
    207207  Void         addClipPartLuma( Int bitDepth, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
    208 #if H_3D_ARP
    209   Void         addARP                     ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );
    210   Void         addARPLuma                 ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );
    211   Void         addARPChroma               ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip );
     208#if NH_3D_ARP
     209  Void         addARP                     ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths );
     210  Void         addARPLuma                 ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths );
     211  Void         addARPChroma               ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight , Bool bClip, const BitDepths &clipBitDepths );
    212212  Void         subtractARP                ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight );
    213213  Void         subtractARPLuma            ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiAbsPartIdx, UInt uiWidth , UInt uiHeight );
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TypeDef.h

    r1256 r1274  
    7070#if NH_3D
    7171#define NH_3D_VSO                         1
     72#define NH_3D_NBDV                        1
    7273#define NH_3D_TMVP                        1   // QC_TMVP_C0047
    7374                                              // Sony_M23639
     
    9293                                              // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
    9394                                              // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055
     95
     96#define NH_3D_NBDV_REF                    1
     97#define NH_3D_MLC                         1
     98#define NH_3D_VSP                         1
     99#define NH_3D_IV_MERGE                    1
     100#define NH_3D_SPIVMP                      1
     101#define NH_3D_INTEGER_MV_DEPTH            1
     102#define NH_3D_TEXT_MERGE                  1
     103#define NH_3D_DBBP                         1
     104#define BUF_FIX 1
     105#define NH_3D_ARP                         1  // Advanced residual prediction (ARP), JCT3V-D0177
     106                                              // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108
     107                                              // SHARP_ARP_REF_CHECK_F0105        ARP reference picture selection and DPB check
     108                                              // LGE_ARP_CTX_F0161                JCT3V-F0161
     109                                              // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061
     110                                              // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053
     111                                              // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085  Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085
     112                                              // QC_I0051_ARP_SIMP         
     113                                              // SHARP_ARP_CHROMA_I0104     
     114                                              // MTK_I0072_IVARP_SCALING_FIX
     115                                              // SEC_ARP_VIEW_REF_CHECK_J0037    Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1
     116                                              // SEC_ARP_REM_ENC_RESTRICT_K0035    Removal of encoder restriction of ARP, JCT3V-K0035
    94117
    95118#endif
     
    121144                                              // MTK_TEXTURE_MRGCAND_BUGFIX_E0182  Bug fix for TEXTURE MERGING CANDIDATE     , JCT3V-E0182
    122145                                              // LGE_SIMP_DISP_AVAIL_J0041    // Use 2 status for disparity availability - DISP_AVAILABLE and DISP_NONE
    123 #define H_3D_ARP                          1   // Advanced residual prediction (ARP), JCT3V-D0177
    124                                               // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108
    125                                               // SHARP_ARP_REF_CHECK_F0105        ARP reference picture selection and DPB check
    126                                               // LGE_ARP_CTX_F0161                JCT3V-F0161
    127                                               // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061
    128                                               // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053
    129                                               // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085  Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085
    130                                               // QC_I0051_ARP_SIMP         
    131                                               // SHARP_ARP_CHROMA_I0104     
    132                                               // MTK_I0072_IVARP_SCALING_FIX
    133                                               // SEC_ARP_VIEW_REF_CHECK_J0037    Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1
    134                                               // SEC_ARP_REM_ENC_RESTRICT_K0035    Removal of encoder restriction of ARP, JCT3V-K0035
    135146#define H_3D_IC                           1   // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060
    136147                                              // Unifying rounding offset, for IC part, JCT3V-D0135
     
    146157                                              // SEC_IC_NEIGHBOR_CLIP_I0080    // Clipping of neighboring sample position, JCT3V-I0080
    147158                                              // LGE_CHROMA_IC_J0050_J0034
    148 #if H_3D_NBDV
     159#if NH_3D_NBDV
    149160#define H_3D_NBDV_REF                     1   // Depth oriented neighboring block disparity derivation
    150161                                              // MTK_D0156
     
    312323#endif
    313324////   ****** NEIGHBOURING BLOCK-BASED DISPARITY VECTOR  *********
    314 #if H_3D_NBDV
     325#if NH_3D_NBDV
    315326#define DVFROM_LEFT                       0
    316327#define DVFROM_ABOVE                      1
     
    318329#endif
    319330///// ***** ADVANCED INTERVIEW RESIDUAL PREDICTION *********
    320 #if H_3D_ARP
     331#if NH_3D_ARP
    321332#define H_3D_ARP_WFNR                     3
    322333#endif
     
    334345/// GT: Move values which are not flags to CommonDef.h and convert to static int !!
    335346///////////////////////////////////////////////////////////////////////////////////
    336 ///// ***** VIEW SYNTHESIS PREDICTION *********
    337 #if H_3D_VSP
    338 #define H_3D_VSP_BLOCKSIZE                4   // Supported values: 1, 2, and 4
    339 #if H_3D_VSP_BLOCKSIZE == 1
    340 #define H_3D_VSP_CONSTRAINED              1   // Constrained VSP @ 1x1
    341 #else
    342 #define H_3D_VSP_CONSTRAINED              0
    343 #endif
    344 #endif
    345347///// ***** ILLUMATION COMPENSATION *********
    346348#if NH_3D_IC
     
    351353#endif
    352354///// ***** DEPTH BASED BLOCK PARTITIONING *********
    353 #if H_3D_DBBP
     355#if NH_3D_DBBP
    354356#define DBBP_INVALID_SHORT                (-4)
    355357#define DBBP_PACK_MODE               SIZE_2NxN
     
    735737  MD_ABOVE_LEFT         ///< MVP of above left block
    736738};
    737 #if H_3D
     739#if NH_3D_MLC
    738740enum DefaultMergCandOrder
    739741{
     
    748750  MRG_A0,               ///< Left bottom
    749751  MRG_B2,               ///< Above left
    750   MRG_IVSHIFT,          ///< Shifted IVMC of Shifted IVDC. (These are mutually exclusive)
     752  MRG_IVSHIFT,          ///< Shifted IVMC or Shifted IVDC. (These are mutually exclusive)
    751753  MRG_COL               ///< Temporal co-located
    752754};
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1225 r1274  
    18401840  else
    18411841  {
    1842     vpsVui->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 );
     1842    vpsVui->setVpsNumVideoSignalInfoMinus1( (pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag()) ? 0 : 1 );
    18431843  }
    18441844
     
    28052805    {
    28062806      READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
    2807 #if H_3D_IV_MERGE
     2807#if NH_3D_IV_MERGE
    28082808      pcSlice->setMaxNumMergeCand(( ( pcSlice->getMpiFlag() || pcSlice->getIvMvPredFlag() || pcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
    28092809#else
     
    33763376}
    33773377
    3378 #if H_3D_ARP
     3378#if NH_3D_ARP
    33793379Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    33803380{
     
    34003400
    34013401#endif
    3402 #if H_3D_DBBP
     3402#if NH_3D_DBBP
    34033403  Void TDecCavlc::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    34043404  {
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecCAVLC.h

    r1225 r1274  
    117117  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    118118  Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex );
    119 #if H_3D_ARP
     119#if NH_3D_ARP
    120120  Void parseARPW            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    121121#endif
     
    127127  Void  parseSDCFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    128128#endif
    129 #if H_3D_DBBP
     129#if NH_3D_DBBP
    130130  Void  parseDBBPFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    131131#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecCu.cpp

    r1225 r1274  
    5252  m_ppcYuvReco = NULL;
    5353  m_ppcCU      = NULL;
    54 #if H_3D_DBBP
     54#if NH_3D_DBBP
    5555  m_ppcYuvRecoDBBP = NULL;
    5656#endif
     
    8181  m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1];
    8282  m_ppcCU      = new TComDataCU*[m_uiMaxDepth-1];
    83 #if H_3D_DBBP
     83#if NH_3D_DBBP
    8484  m_ppcYuvRecoDBBP = new TComYuv*[m_uiMaxDepth-1];
    8585#endif
     
    9595    m_ppcYuvReco[ui] = new TComYuv;    m_ppcYuvReco[ui]->create( uiWidth, uiHeight, chromaFormatIDC );
    9696    m_ppcCU     [ui] = new TComDataCU; m_ppcCU     [ui]->create( chromaFormatIDC, uiNumPartitions, uiWidth, uiHeight, true, uiMaxWidth >> (m_uiMaxDepth - 1) );
    97 #if H_3D_DBBP
    98     m_ppcYuvRecoDBBP[ui] = new TComYuv;    m_ppcYuvRecoDBBP[ui]->create( uiWidth, uiHeight );
     97#if NH_3D_DBBP
     98    m_ppcYuvRecoDBBP[ui] = new TComYuv;    m_ppcYuvRecoDBBP[ui]->create( uiWidth, uiHeight, chromaFormatIDC );
    9999#endif
    100100}
     
    119119    m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL;
    120120    m_ppcCU     [ui]->destroy(); delete m_ppcCU     [ui]; m_ppcCU     [ui] = NULL;
    121 #if H_3D_DBBP
     121#if NH_3D_DBBP
    122122    m_ppcYuvRecoDBBP[ui]->destroy(); delete m_ppcYuvRecoDBBP[ui]; m_ppcYuvRecoDBBP[ui] = NULL;
    123123#endif
     
    127127  delete [] m_ppcYuvReco; m_ppcYuvReco = NULL;
    128128  delete [] m_ppcCU     ; m_ppcCU      = NULL;
    129 #if H_3D_DBBP
     129#if NH_3D_DBBP
    130130  delete [] m_ppcYuvRecoDBBP; m_ppcYuvRecoDBBP = NULL;
    131131#endif
     
    152152    setIsChromaQpAdjCoded(true);
    153153  }
    154 
     154 
    155155  // start from the top level CU
    156156  xDecodeCU( pCtu, 0, 0, isLastCtuOfSliceSegment);
     
    163163Void TDecCu::decompressCtu( TComDataCU* pCtu )
    164164{
    165 #if !H_3D_IV_MERGE
     165#if !NH_3D_IV_MERGE
    166166  xDecompressCU( pCtu, 0,  0 );
    167167#endif
     
    283283    pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP
    284284  }
    285 #if H_3D_NBDV
     285#if NH_3D_NBDV
    286286  DisInfo DvInfo;
    287287  DvInfo.m_acNBDV.setZero();
    288288  DvInfo.m_aVIdxCan = 0;
    289 #if H_3D_NBDV_REF 
     289#if NH_3D_NBDV_REF 
    290290  DvInfo.m_acDoNBDV.setZero();
    291291#endif
     
    293293if(!pcCU->getSlice()->isIntra())
    294294  {
    295 #if H_3D_ARP && H_3D_IV_MERGE
    296     if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() )
     295#if NH_3D_ARP && NH_3D_IV_MERGE && NH_3D_VSP
     296    if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() )
    297297#else
     298#if NH_3D_IV_MERGE && NH_3D_VSP
     299    if( pcCU->getSlice()->getIvMvPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() )
     300#else
     301#if NH_3D_ARP && NH_3D_VSP
     302    if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() )
     303#else
     304#if NH_3D_VSP
     305    if( pcCU->getSlice()->getViewSynthesisPredFlag() )
     306#else
    298307#if H_3D_ARP
    299     if( pcCU->getSlice()->getVPS()->getUseAdvRP(pcCU->getSlice()->getLayerId()) )
     308    if( pcCU->getSlice()->getIvResPredFlag( ) )
    300309#else
    301310#if H_3D_IV_MERGE
    302311    if( pcCU->getSlice()->getVPS()->getIvMvPredFlag(pcCU->getSlice()->getLayerId()) )
    303312#else
     313#if NH_3D_DBBP
     314    if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )
     315#else
    304316    if (0)
    305317#endif
    306318#endif
    307319#endif
    308     {
    309       m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true );
    310       m_ppcCU[uiDepth]->copyDVInfoFrom( pcCU, uiAbsPartIdx);
     320#endif
     321#endif
     322#endif
     323#endif
     324    {
     325      m_ppcCU[uiDepth]->copyInterPredInfoFrom(pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true);
     326      m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx);
    311327      PartSize ePartTemp = m_ppcCU[uiDepth]->getPartitionSize(0);
    312328      UChar cWidTemp     = m_ppcCU[uiDepth]->getWidth(0);
    313329      UChar cHeightTemp  = m_ppcCU[uiDepth]->getHeight(0);
    314       m_ppcCU[uiDepth]->setWidth  ( 0, pcCU->getSlice()->getSPS()->getMaxCUWidth ()/(1<<uiDepth)  );
    315       m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth)  );
    316       m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
    317 #if H_3D_IV_MERGE
     330      m_ppcCU[uiDepth]->setWidth (0, pcCU->getSlice()->getSPS()->getMaxCUWidth () / (1 << uiDepth));
     331      m_ppcCU[uiDepth]->setHeight(0, pcCU->getSlice()->getSPS()->getMaxCUHeight() / (1 << uiDepth));
     332      m_ppcCU[uiDepth]->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth);     
     333#if NH_3D_IV_MERGE
    318334      if( pcCU->getSlice()->getIsDepth())
    319335      {
     
    323339      {
    324340#endif
    325 #if H_3D_NBDV_REF
     341#if NH_3D_NBDV_REF
    326342      if( pcCU->getSlice()->getDepthBasedBlkPartFlag() )  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
    327343      {
     
    333349        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
    334350      }
    335 #if H_3D_IV_MERGE
     351#if NH_3D_IV_MERGE
    336352      }
    337353#endif
     
    346362      }
    347363#endif
    348 
    349364      pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth);
    350       m_ppcCU[uiDepth]->setPartSizeSubParts( ePartTemp, 0, uiDepth );
    351       m_ppcCU[uiDepth]->setWidth  ( 0, cWidTemp );
    352       m_ppcCU[uiDepth]->setHeight ( 0, cHeightTemp );
     365      m_ppcCU[uiDepth]->setPartSizeSubParts(ePartTemp, 0, uiDepth);
     366      m_ppcCU[uiDepth]->setWidth(0, cWidTemp);
     367      m_ppcCU[uiDepth]->setHeight(0, cHeightTemp);
    353368     }
    354369  }
     
    381396    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    382397    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
    383 #if H_3D_IV_MERGE
     398#if NH_3D_IV_MERGE
    384399    m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx);
     400    TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     401    UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     402#else
     403#if NH_3D_MLC
    385404    TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
    386405    UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     
    389408    UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    390409#endif
     410#endif
    391411    Int numValidMergeCand = 0;
    392412    for( UInt ui = 0; ui < m_ppcCU[uiDepth]->getSlice()->getMaxNumMergeCand(); ++ui )
     
    396416    m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth );
    397417    UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
    398 #if H_3D_ARP
     418#if NH_3D_ARP
    399419    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
    400420#endif
     
    403423#endif
    404424
    405 #if H_3D_VSP
     425
     426#if NH_3D_VSP
    406427    Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    407428    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    408 #if H_3D_SPIVMP
     429#endif
     430#if NH_3D_SPIVMP
    409431    Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    410432    memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    411433    TComMvField*  pcMvFieldSP;
    412434    UChar* puhInterDirSP;
    413     pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
    414     puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
    415 #endif
     435    pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2];
     436    puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()];
     437#endif
     438
     439#if NH_3D_MLC
    416440    m_ppcCU[uiDepth]->initAvailableFlags();
     441#endif
    417442    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     443#if NH_3D_MLC
    418444    m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    419 #if H_3D_SPIVMP
     445#if NH_3D_SPIVMP
    420446      , pcMvFieldSP, puhInterDirSP
    421447#endif
    422448      , numValidMergeCand, uiMergeIndex );
    423449
    424     m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
    425 #if H_3D_SPIVMP
     450    m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     451#if NH_3D_VSP
     452      , vspFlag
     453#endif
     454#if NH_3D_SPIVMP
    426455      , bSPIVMPFlag
    427456#endif
    428457      , numValidMergeCand );
     458#endif
     459#if NH_3D_VSP
    429460    pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    430 #else
    431 #if H_3D
    432     m_ppcCU[uiDepth]->initAvailableFlags();
    433     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    434     m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    435 #else
    436     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    437 #endif
    438 #endif
     461#endif
     462
    439463    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    440464
     
    448472        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    449473        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    450 #if H_3D_VSP
     474#if NH_3D_VSP
    451475        if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 )
    452476        {
     
    481505      }
    482506    }
    483 #if H_3D_SPIVMP
     507#if NH_3D_SPIVMP
    484508    pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    485509    if (bSPIVMPFlag[uiMergeIndex])
     
    506530
    507531    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment );
    508 #if H_3D_IV_MERGE
     532#if NH_3D_IV_MERGE
    509533    xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    510534#endif
     
    531555#endif
    532556      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment );
    533 #if H_3D_IV_MERGE
     557#if NH_3D_IV_MERGE
    534558      xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    535559#endif
     
    551575#endif
    552576  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment );
    553 #if H_3D_IV_MERGE
     577#if NH_3D_IV_MERGE
    554578  xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    555579#endif
     
    574598{
    575599  TComPic* pcPic = pCtu->getPic();
    576 #if !H_3D_IV_MERGE
     600#if !NH_3D_IV_MERGE
    577601  TComSlice * pcSlice = pCtu->getSlice();
    578602  const TComSPS &sps=*(pcSlice->getSPS());
     
    617641  {
    618642    case MODE_INTER:
    619 #if H_3D_DBBP
     643#if NH_3D_DBBP
    620644    if( m_ppcCU[uiDepth]->getDBBPFlag(0) )
    621645    {
     
    637661      }
    638662#endif
    639 #if H_3D_DBBP
     663#if NH_3D_DBBP
    640664    }
    641665#endif
     
    845869#endif
    846870
    847 #if H_3D_DBBP
     871#if NH_3D_DBBP
    848872Void TDecCu::xReconInterDBBP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    849873{
     
    851875  AOF(!pcCU->getSlice()->isIntra());
    852876  PartSize ePartSize = pcCU->getPartitionSize( 0 );
     877 
     878  Int bitDepthY = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);
    853879 
    854880  // get collocated depth block
     
    871897 
    872898  // first, extract the two sets of motion parameters
    873   UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
     899  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4;
    874900  for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ )
    875901  {
     
    877903   
    878904    pDBBPTmpData->auhInterDir[uiSegment] = pcCU->getInterDir(uiPartAddr);
     905    assert( pDBBPTmpData->auhInterDir[uiSegment] == 1 || pDBBPTmpData->auhInterDir[uiSegment] == 2  );  // only uni-prediction allowed
    879906   
    880907    for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     
    884911    }
    885912   
     913#if H_3D
    886914    AOF( pcCU->getARPW(uiPartAddr) == 0 );
    887915    AOF( pcCU->getICFlag(uiPartAddr) == false );
    888916    AOF( pcCU->getSPIVMPFlag(uiPartAddr) == false );
    889917    AOF( pcCU->getVSPFlag(uiPartAddr) == 0 );
     918#endif
    890919  }
    891920 
     
    927956 
    928957  // reconstruct final prediction signal by combining both segments
    929   m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize);
     958  m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize, bitDepthY);
    930959
    931960  // inter recon
    932   xDecodeInterTexture( pcCU, 0, uiDepth );
     961  xDecodeInterTexture( pcCU, uiDepth );
    933962 
    934963  // clip for only non-zero cbp case
    935   if  ( ( pcCU->getCbf( 0, TEXT_LUMA ) ) || ( pcCU->getCbf( 0, TEXT_CHROMA_U ) ) || ( pcCU->getCbf(0, TEXT_CHROMA_V ) ) )
    936   {
    937     m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) );
     964  if  ( ( pcCU->getCbf( 0, COMPONENT_Y ) ) || ( pcCU->getCbf( 0, COMPONENT_Cb ) ) || ( pcCU->getCbf(0, COMPONENT_Cr ) ) )
     965  {
     966    m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ), pcCU->getSlice()->getSPS()->getBitDepths() );
    938967  }
    939968  else
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecCu.h

    r1200 r1274  
    6262  TComDataCU**        m_ppcCU;            ///< CU data array
    6363
    64 #if H_3D_DBBP
     64#if NH_3D_DBBP
    6565  TComYuv**           m_ppcYuvRecoDBBP;
    6666#endif
     
    102102  Void xReconInter              ( TComDataCU* pcCU, UInt uiDepth );
    103103
    104 #if H_3D_DBBP
     104#if NH_3D_DBBP
    105105  Void xReconInterDBBP          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    106106#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1225 r1274  
    105105}
    106106
    107 #if H_3D_ARP
     107#if NH_3D_ARP
    108108Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    109109{
     
    129129  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
    130130
    131 #if H_3D_ARP
     131#if NH_3D_ARP
    132132  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 )
    133133#else
     
    240240  UInt uiNumPU = ( ePartSize == SIZE_2Nx2N ? 1 : ( ePartSize == SIZE_NxN ? 4 : 2 ) );
    241241  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4;
    242 #if H_3D_IV_MERGE
     242//#if H_3D_IV_MERGE
     243#if NH_3D_MLC
    243244  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
    244245  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     
    247248  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    248249#endif
    249 #if H_3D_SPIVMP
     250#if NH_3D_SPIVMP
    250251  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];     
    251   TComMvField*  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
    252   UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
    253 #endif
    254 #if H_3D_IV_MERGE
     252  TComMvField*  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2];
     253  UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()];
     254#endif
     255#if NH_3D_IV_MERGE
    255256  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
    256257#endif
     
    260261  }
    261262  Int numValidMergeCand = 0;
     263#if !NH_3D
    262264  Bool hasMergedCandList = false;
     265#else
     266  Bool isMerged = false;
     267#endif
    263268
    264269  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    265270  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
    266 #if H_3D
     271#if NH_3D
    267272  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
    268273  {
     
    296301
    297302  ////// Parse CUs extension syntax
     303#if NH_3D_DBBP
    298304  decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
    299   decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth );
    300 
    301 #if H_3D_ARP
     305#endif
     306  //decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth );
     307
     308#if NH_3D_ARP
    302309  decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    303310#endif
     
    312319    {
    313320      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    314 #if H_3D_DBBP
     321#if NH_3D_DBBP
    315322      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
    316323#else
     
    321328        if ( !isMerged )
    322329        {
    323 #if H_3D_VSP
     330#if NH_3D_VSP
    324331          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    325332          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    330337          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    331338          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    332 #if H_3D_SPIVMP
     339#if NH_3D_SPIVMP
    333340            , pcMvFieldSP, puhInterDirSP
    334341#endif
    335342            , numValidMergeCand );
    336343          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
    337 #if H_3D_SPIVMP
     344#if NH_3D_SPIVMP
    338345            , bSPIVMPFlag
    339346#endif
    340347            , numValidMergeCand );
    341348          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    342 
    343349#else
    344350#if H_3D
     
    358364      {
    359365        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    360 #if H_3D_VSP
     366#if NH_3D_VSP
    361367        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    362368        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    367373        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    368374        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
    369 #if H_3D_SPIVMP
     375#if NH_3D_SPIVMP
    370376          , pcMvFieldSP, puhInterDirSP
    371377#endif
    372378          ,numValidMergeCand, uiMergeIndex );
    373379        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
    374 #if H_3D_SPIVMP
     380#if NH_3D_SPIVMP
    375381          , bSPIVMPFlag
    376382#endif
     
    398404          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    399405          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    400 #if H_3D_VSP
    401 #if H_3D_DBBP
     406#if NH_3D_VSP
     407#if NH_3D_DBBP
    402408          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
    403409#else
     
    490496        {
    491497          pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set.
     498
     499#if NH_3D_MLC
     500#if NH_3D_VSP
     501          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     502          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     503#endif
     504#if NH_3D_SPIVMP
     505          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     506#endif
     507          pcSubCU->initAvailableFlags();
     508#endif
    492509          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     510#if NH_3D_MLC
     511          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
     512#if NH_3D_SPIVMP
     513            , pcMvFieldSP, puhInterDirSP
     514#endif
     515            , numValidMergeCand );
     516          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     517#if NH_3D_VSP
     518            , vspFlag
     519#endif
     520#if NH_3D_SPIVMP
     521            , bSPIVMPFlag
     522#endif
     523            , numValidMergeCand );
     524#if NH_3D_VSP
     525          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     526#endif
     527#endif
    493528          pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); // restore.
    494529          hasMergedCandList = true;
     
    498533      {
    499534        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     535
     536#if NH_3D_MLC
     537#if NH_3D_VSP
     538        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     539        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     540#endif
     541#if NH_3D_SPIVMP
     542        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     543#endif
     544        pcSubCU->initAvailableFlags();
     545#endif
    500546        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     547#if NH_3D_MLC
     548        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
     549#if NH_3D_SPIVMP
     550          , pcMvFieldSP, puhInterDirSP
     551#endif
     552          ,numValidMergeCand, uiMergeIndex );
     553        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     554#if NH_3D_VSP
     555          , vspFlag
     556#endif
     557#if NH_3D_SPIVMP
     558          , bSPIVMPFlag
     559#endif
     560          ,numValidMergeCand );
     561#if NH_3D_VSP
     562        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     563#endif
     564#endif
    501565      }
    502566
     
    512576          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    513577          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    514 
    515         }
    516       }
     578#if NH_3D_VSP
     579          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
     580          {
     581            if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
     582            {
     583              UInt dummy;
     584              Int vspSize;
     585              Int width, height;
     586              pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
     587              pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
     588              pcCU->setVSPFlag( uiSubPartIdx, vspSize );
     589            }
     590          }
     591#endif
     592        }
     593      }
     594#if NH_3D_SPIVMP
     595      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
     596      if (bSPIVMPFlag[uiMergeIndex] != 0)
     597      {
     598        Int iWidth, iHeight;
     599        UInt uiIdx;
     600        pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
     601
     602        UInt uiSPAddr;
     603
     604        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     605
     606        pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
     607
     608        for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
     609        {
     610          pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
     611          pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
     612          pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
     613          pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
     614        }
     615      }
     616#endif
    517617    }
    518618    else
     
    551651  }
    552652#endif
    553 #if H_3D_SPIVMP
     653#if NH_3D_SPIVMP
    554654  delete[] pcMvFieldSP;
    555655  delete[] puhInterDirSP;
     
    619719}
    620720
    621 #if H_3D
     721#if NH_3D
    622722Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
    623723{
     
    10701170}
    10711171#endif
    1072 #if H_3D_DBBP
     1172#if NH_3D_DBBP
    10731173Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    10741174{
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecEntropy.h

    r1225 r1274  
    8585  virtual Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0;
    8686  virtual Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex ) = 0;
    87 #if H_3D_ARP
     87#if NH_3D_ARP
    8888  virtual Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    8989#endif
     
    9595  virtual Void parseSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9696#endif
    97 #if H_3D_DBBP
     97#if NH_3D_DBBP
    9898  virtual Void parseDBBPFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9999#endif
     
    145145  Void decodeMvdPU        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    146146  Void decodeMVPIdxPU     ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    147 #if H_3D
     147#if NH_3D
    148148  Void decodeMvsAMVP      ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx,
    149149RefPicList eRefList );
     
    174174  Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    175175
    176 #if H_3D_ARP
     176#if NH_3D_ARP
    177177  Void decodeARPW              ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    178178#endif
     
    183183  Void decodeSDCFlag           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    184184#endif
    185 #if H_3D_DBBP
     185#if NH_3D_DBBP
    186186  Void decodeDBBPFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    187187#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecGop.cpp

    r1200 r1274  
    122122  }
    123123
    124 #if H_3D_NBDV
     124#if NH_3D_NBDV
    125125  if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    126126  {
    127     Int iColPoc = pcSlice->getRefPOC(RefPicList(1-pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
    128     rpcPic->setNumDdvCandPics(rpcPic->getDisCandRefPictures(iColPoc));
     127    Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
     128    pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc));
    129129  }
    130130
    131131  if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    132132  {
    133     rpcPic->checkTemporalIVRef();
     133    pcPic->checkTemporalIVRef();
    134134  }
    135135
    136136  if(pcSlice->getIsDepth())
    137137  {
    138     rpcPic->checkTextureRef();
     138    pcPic->checkTextureRef();
    139139  }
    140140#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecSbac.cpp

    r1256 r1274  
    7373, m_cCUMergeFlagExtSCModel                   ( 1,             1,                      NUM_MERGE_FLAG_EXT_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
    7474, m_cCUMergeIdxExtSCModel                    ( 1,             1,                      NUM_MERGE_IDX_EXT_CTX                , m_contextModels + m_numContextModels, m_numContextModels)
    75 #if H_3D_ARP
     75#if NH_3D_ARP
    7676, m_cCUPUARPWSCModel          ( 1,             1,               NUM_ARPW_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
    7777#endif
     
    119119, m_cSDCFlagSCModel                  ( 1,             1,  NUM_SDC_FLAG_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
    120120#endif
    121 #if H_3D_DBBP
     121#if NH_3D_DBBP
    122122, m_cDBBPFlagSCModel             ( 1,             1,                 DBBP_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
    123123#endif
     
    164164  m_cCUMergeFlagExtSCModel.initBuffer             ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
    165165  m_cCUMergeIdxExtSCModel.initBuffer              ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT );
    166 #if H_3D_ARP
     166#if NH_3D_ARP
    167167  m_cCUPUARPWSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_ARPW );
    168168#endif
     
    210210  m_cSDCFlagSCModel.initBuffer            ( sliceType, qp, (UChar*)INIT_SDC_FLAG );
    211211#endif
    212 #if H_3D_DBBP
     212#if NH_3D_DBBP
    213213  m_cDBBPFlagSCModel.initBuffer              ( sliceType, qp, (UChar*)INIT_DBBP_FLAG );
    214214#endif
     
    240240  m_cCUDISFlagSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG );
    241241  m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
    242 #endif
    243 #if H_3D_ARP
    244   m_cCUPUARPWSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_ARPW );
    245242#endif
    246243#if H_3D_DIM
     
    256253#if H_3D_DIM_SDC
    257254  m_cSDCFlagSCModel.initBuffer            ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    258 #endif
    259 #if H_3D_DBBP
    260   m_cDBBPFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );
    261255#endif
    262256
     
    24172411}
    24182412
    2419 #if H_3D_ARP
     2413#if NH_3D_ARP
    24202414Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    24212415{
    2422   UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1;
    24232416  UInt uiW = 0;
    24242417  UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
    24252418  UInt uiCode = 0;
    24262419
    2427   assert ( uiMaxW > 0 );
    2428 
    2429   m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) );
     2420  m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG));
    24302421
    24312422  uiW = uiCode;
    24322423  if( 1 == uiW )   
    24332424  {
    2434     m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) );
     2425    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG));
    24352426    uiW += ( 1 == uiCode ? 1 : 0 );
    24362427  }
     
    25392530#endif
    25402531
    2541 #if H_3D_DBBP
     2532#if NH_3D_DBBP
    25422533Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    25432534{
     
    25472538  UInt uiSymbol = 0;
    25482539 
    2549   m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
     2540  m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__DBBP_FLAG) );
    25502541  DTRACE_CU("dbbp_flag", uiSymbol)
    25512542  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
    25522543  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
    2553   UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
     2544  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4;
    25542545  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth);
    25552546  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecSbac.h

    r1225 r1274  
    121121  Void  parseSDCFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    122122#endif
    123 #if H_3D_DBBP
     123#if NH_3D_DBBP
    124124  Void parseDBBPFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    125125#endif
     
    139139  Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    140140  Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex );
    141 #if H_3D_ARP
     141#if NH_3D_ARP
    142142  Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    143143#endif
     
    190190  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    191191  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
    192 #if H_3D_ARP
     192#if NH_3D_ARP
    193193  ContextModel3DBuffer m_cCUPUARPWSCModel;
    194194#endif
     
    240240  ContextModel3DBuffer m_cSDCFlagSCModel;
    241241#endif
    242 #if H_3D_DBBP
     242#if NH_3D_DBBP
    243243  ContextModel3DBuffer m_cDBBPFlagSCModel;
    244244#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecTop.cpp

    r1225 r1274  
    292292
    293293
    294 #if H_3D_IV_MERGE
     294#if NH_3D_IV_MERGE
    295295Void
    296296CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice )
     
    11491149    pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr);
    11501150    pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true );
    1151 #if H_3D
     1151#if NH_3D_NBDV
    11521152    pcSlice->setDefaultRefView();
    11531153#endif
    1154 #if H_3D_ARP
     1154#if NH_3D_ARP
    11551155    pcSlice->setARPStepNum(m_ivPicLists);
    1156     if( pcSlice->getARPStepNum() > 1 )
    1157     {
    1158       // GT: This seems to be broken, not all nuh_layer_ids are necessarily present
    1159       for(Int iLayerId = 0; iLayerId < nalu.m_nuhLayerId; iLayerId ++ )
    1160       {
    1161         Int  iViewIdx =   pcSlice->getVPS()->getViewIndex(iLayerId);
    1162         Bool bIsDepth = ( pcSlice->getVPS()->getDepthId  ( iLayerId ) == 1 );
    1163         if( iViewIdx<getViewIndex() && !bIsDepth )
    1164         {
    1165           pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );
    1166         }
    1167       }
    1168     }
    11691156#endif
    11701157#else
     
    11741161#if NH_3D
    11751162    pcSlice->checkInCompPredRefLayers();
    1176 #if H_3D_IV_MERGE
     1163#if NH_3D_IV_MERGE
    11771164#if H_3D_FCO
    11781165    //assert( !getIsDepth() );
     
    12711258  }
    12721259
    1273 #if H_3D_IV_MERGE
     1260#if NH_3D_IV_MERGE
    12741261#if H_3D_FCO
    12751262  if( !pcSlice->getIsDepth() && m_pcCamParsCollector )
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecTop.h

    r1200 r1274  
    8181  Int**** getBaseViewShiftLUTI()  { return m_aiBaseViewShiftLUT;   }
    8282
    83 #if H_3D_IV_MERGE
     83#if NH_3D_IV_MERGE
    8484  Void  copyCamParamForSlice( TComSlice* pcSlice );
    8585#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1225 r1274  
    21952195    }
    21962196#endif
    2197 #if H_3D_IV_MERGE
     2197#if NH_3D_IV_MERGE
    21982198    assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS_MEM);
    21992199#else
     
    22022202    if (!pcSlice->isIntra())
    22032203    {
    2204 #if H_3D_IV_MERGE
     2204#if NH_3D_IV_MERGE
    22052205      WRITE_UVLC( ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( ) ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
    22062206#else
     
    25782578}
    25792579
    2580 #if H_3D_ARP
     2580#if NH_3D_ARP
    25812581Void TEncCavlc::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
    25822582{
     
    29012901#endif
    29022902   
    2903 #if H_3D_DBBP
     2903#if NH_3D_DBBP
    29042904Void TEncCavlc::codeDBBPFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    29052905{
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncCavlc.h

    r1225 r1274  
    126126  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    127127  Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    128 #if H_3D_ARP
     128#if NH_3D_ARP
    129129  Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    130130#endif
     
    136136  Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    137137#endif
    138 #if H_3D_DBBP
     138#if NH_3D_DBBP
    139139  Void codeDBBPFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    140140#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncCu.cpp

    r1256 r1274  
    6868  m_ppcTempCU      = new TComDataCU*[m_uhTotalDepth-1];
    6969
    70 #if H_3D_ARP
     70#if NH_3D_ARP
    7171  m_ppcWeightedTempCU = new TComDataCU*[m_uhTotalDepth-1];
    7272#endif
     
    7979  m_ppcRecoYuvTemp = new TComYuv*[m_uhTotalDepth-1];
    8080  m_ppcOrigYuv     = new TComYuv*[m_uhTotalDepth-1];
    81 #if H_3D_DBBP
     81#if NH_3D_DBBP
    8282  m_ppcOrigYuvDBBP = new TComYuv*[m_uhTotalDepth-1];
    8383#endif
     
    9292    m_ppcBestCU[i] = new TComDataCU; m_ppcBestCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
    9393    m_ppcTempCU[i] = new TComDataCU; m_ppcTempCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
    94 #if H_3D_ARP
    95     m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
     94#if NH_3D_ARP
     95    m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( chromaFormat, uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
    9696#endif 
    9797
     
    105105
    106106    m_ppcOrigYuv    [i] = new TComYuv; m_ppcOrigYuv    [i]->create(uiWidth, uiHeight, chromaFormat);
    107 #if H_3D_DBBP
    108     m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight);
     107#if NH_3D_DBBP
     108    m_ppcOrigYuvDBBP[i] = new TComYuv; m_ppcOrigYuvDBBP[i]->create(uiWidth, uiHeight, chromaFormat);
    109109#endif
    110110
     
    146146      m_ppcTempCU[i]->destroy();      delete m_ppcTempCU[i];      m_ppcTempCU[i] = NULL;
    147147    }
    148 #if H_3D_ARP
     148#if NH_3D_ARP
    149149    if(m_ppcWeightedTempCU[i])
    150150    {
     
    180180      m_ppcOrigYuv[i]->destroy();     delete m_ppcOrigYuv[i];     m_ppcOrigYuv[i] = NULL;
    181181    }
    182 #if H_3D_DBBP
     182#if NH_3D_DBBP
    183183    if(m_ppcOrigYuvDBBP[i])
    184184    {
     
    198198  }
    199199
    200 #if H_3D_ARP
     200#if NH_3D_ARP
    201201  if(m_ppcWeightedTempCU)
    202202  {
     
    240240    m_ppcOrigYuv = NULL;
    241241  }
    242 #if H_3D_DBBP
     242#if NH_3D_DBBP
    243243  if(m_ppcOrigYuvDBBP)
    244244  {
     
    280280  m_ppcTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() );
    281281
     282#if NH_3D_ARP
     283  m_ppcWeightedTempCU[0]->initCtu( pCtu->getPic(), pCtu->getCtuRsAddr() );
     284#endif
     285
    282286#if KWU_RC_MADPRED_E0227
    283287  m_LCUPredictionSAD = 0;
     
    441445  Bool    earlyDetectionSkipMode = false;
    442446
    443 #if H_3D_VSP
     447#if NH_3D_NBDV
    444448  DisInfo DvInfo;
    445449  DvInfo.m_acNBDV.setZero();
    446450  DvInfo.m_aVIdxCan = 0;
    447 #if H_3D_NBDV_REF
     451#if NH_3D_NBDV_REF
    448452  DvInfo.m_acDoNBDV.setZero();
    449453#endif
     
    584588#endif
    585589
    586 #if H_3D_NBDV
     590#if NH_3D_NBDV
    587591      if( rpcTempCU->getSlice()->getSliceType() != I_SLICE )
    588592      {
    589 #if H_3D_ARP && H_3D_IV_MERGE
    590         if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() )
     593#if NH_3D_ARP && NH_3D_IV_MERGE && NH_3D_VSP
     594        if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() )
    591595#else
    592 #if H_3D_ARP
    593         if( rpcTempCU->getSlice()->getVPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) )
     596#if NH_3D_IV_MERGE && NH_3D_VSP
     597        if( rpcTempCU->getSlice()->getIvMvPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() )
     598#else
     599#if NH_3D_ARP && NH_3D_VSP
     600        if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() )
     601#else
     602#if NH_3D_VSP
     603        if( rpcTempCU->getSlice()->getViewSynthesisPredFlag() )
     604#else
     605#if NH_3D_ARP
     606        if( rpcTempCU->getSlice()->getIvResPredFlag() )
    594607#else
    595608#if H_3D_IV_MERGE
    596609        if( rpcTempCU->getSlice()->getVPS()->getIvMvPredFlag(rpcTempCU->getSlice()->getLayerId()) )
    597610#else
     611#if NH_3D_DBBP
     612        if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() )
     613#else
    598614        if (0)
     615#endif
     616#endif
     617#endif
     618#endif
    599619#endif
    600620#endif
     
    602622        {
    603623          PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
    604           rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
    605 #if H_3D_IV_MERGE
     624          rpcTempCU->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth);
     625#if NH_3D_IV_MERGE
    606626          if (rpcTempCU->getSlice()->getIsDepth() )
    607627          {
     
    611631          {
    612632#endif
    613 #if H_3D_NBDV_REF
     633#if NH_3D_NBDV_REF
    614634            if( rpcTempCU->getSlice()->getDepthRefinementFlag() )
    615635            {
     
    621641              rpcTempCU->getDisMvpCandNBDV(&DvInfo);
    622642            }
    623 #if H_3D_IV_MERGE
     643#if NH_3D_IV_MERGE
    624644          }
    625645#endif
     
    659679          rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );//by Competition for inter_2Nx2N
    660680#endif
    661 #if H_3D_VSP
    662             rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     681#if NH_3D_VSP  || NH_3D_DBBP
     682          rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    663683#endif
    664684        }
     
    673693
    674694        rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    675 #if H_3D_VSP
    676           rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     695#if NH_3D_VSP  || NH_3D_DBBP
     696        rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    677697#endif
    678698
     
    690710          rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    691711#endif
    692 #if H_3D_VSP
    693             rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    694 #endif
    695 #if H_3D_DBBP
     712#if NH_3D_VSP  || NH_3D_DBBP
     713          rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     714#endif
     715#if NH_3D_DBBP
    696716            if( rpcTempCU->getSlice()->getDepthBasedBlkPartFlag() && rpcTempCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
    697717            {
    698718              xCheckRDCostInterDBBP( rpcBestCU, rpcTempCU, false );
    699719              rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode  );
    700 #if H_3D_VSP
     720#if NH_3D_VSP  || NH_3D_DBBP
    701721              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    702722#endif
     
    780800#endif
    781801              rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    782 #if H_3D_VSP
    783                 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     802#if NH_3D_VSP || NH_3D_DBBP
     803              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    784804#endif
    785805
     
    799819#endif
    800820            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    801 #if H_3D_VSP
     821#if NH_3D_VSP || NH_3D_DBBP
    802822            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    803823#endif
     
    822842
    823843            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    824 #if H_3D_VSP
     844#if NH_3D_VSP || NH_3D_DBBP
    825845            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    826846#endif
     
    861881#endif
    862882                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    863 #if H_3D_VSP
     883#if NH_3D_VSP || NH_3D_DBBP
    864884                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    865885#endif
     
    882902
    883903                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    884 #if H_3D_VSP
     904#if NH_3D_VSP || NH_3D_DBBP
    885905                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    886906#endif
     
    909929
    910930                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    911 #if H_3D_VSP
     931#if NH_3D_VSP || NH_3D_DBBP
    912932                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    913933#endif
     
    929949#endif
    930950                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    931 #if H_3D_VSP
     951#if NH_3D_VSP || NH_3D_DBBP
    932952                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    933953#endif
     
    957977
    958978                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    959 #if H_3D_VSP
     979#if NH_3D_VSP || NH_3D_DBBP
    960980                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    961981#endif
     
    977997#endif
    978998                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    979 #if H_3D_VSP
     999#if NH_3D_VSP || NH_3D_DBBP
    9801000                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    9811001#endif
     
    9971017#endif
    9981018                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    999 #if H_3D_VSP
     1019#if NH_3D_VSP || NH_3D_DBBP
    10001020                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10011021#endif
     
    10181038#endif
    10191039                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1020 #if H_3D_VSP
     1040#if NH_3D_VSP || NH_3D_DBBP
    10211041                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10221042#endif
     
    10341054            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
    10351055            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1036 #if H_3D_VSP
    1037               rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     1056#if NH_3D_VSP || NH_3D_DBBP
     1057            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10381058#endif
    10391059            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
    10401060            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1041 #if H_3D_VSP
    1042               rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     1061#if NH_3D_VSP || NH_3D_DBBP
     1062            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10431063#endif
    10441064#if NH_3D_QTLPC
     
    10491069            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
    10501070            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1051 #if H_3D_VSP
    1052               rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     1071#if NH_3D_VSP || NH_3D_DBBP
     1072            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10531073#endif
    10541074            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
    10551075            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1056 #if H_3D_VSP
    1057               rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     1076#if NH_3D_VSP || NH_3D_DBBP
     1077            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10581078#endif
    10591079#if NH_3D_QTLPC
     
    12701290      DEBUG_STRING_NEW(sTempDebug)
    12711291
     1292#if NH_3D_ARP
     1293      m_ppcWeightedTempCU[uhNextDepth]->setSlice( m_ppcWeightedTempCU[ uiDepth]->getSlice());
     1294      m_ppcWeightedTempCU[uhNextDepth]->setPic  ( m_ppcWeightedTempCU[ uiDepth] );
     1295#endif
    12721296      for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ )
    12731297      {
     
    15751599
    15761600    m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx );
    1577 #if H_3D_ARP
     1601#if NH_3D_ARP
    15781602    m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
    15791603#endif
     
    16121636  // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    16131637  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
    1614 #if H_3D
     1638#if NH_3D_DBBP
    16151639  m_pcEntropyCoder->encodeDBBPFlag( pcCU, uiAbsPartIdx );
    16161640#endif
     
    16181642  m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false );
    16191643#endif 
    1620 #if H_3D_ARP
     1644#if NH_3D_ARP
    16211645  m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
    16221646#endif
     
    17631787{
    17641788  assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE );
    1765 #if H_3D_IV_MERGE
     1789#if NH_3D_MLC
    17661790  TComMvField  cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
    17671791  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     
    17921816#endif
    17931817
    1794 #if H_3D_ARP
     1818#if NH_3D_ARP
    17951819  DisInfo cOrigDisInfo = rpcTempCU->getDvInfo(0);
    17961820#else
     
    17981822
    17991823  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level
    1800 #if H_3D_VSP
    1801 #if !H_3D_ARP
     1824
     1825#if NH_3D_SPIVMP
     1826  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
     1827  memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     1828  TComMvField*  pcMvFieldSP;
     1829  UChar* puhInterDirSP;
     1830  pcMvFieldSP = new TComMvField[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2];
     1831  puhInterDirSP = new UChar[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()];
     1832#endif
     1833
     1834#if NH_3D_VSP
     1835#if !NH_3D_ARP
    18021836  Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    18031837  memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    1804   InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    1805   rpcTempCU->m_bAvailableFlagA1 = 0;
    1806   rpcTempCU->m_bAvailableFlagB1 = 0;
    1807   rpcTempCU->m_bAvailableFlagB0 = 0;
    1808   rpcTempCU->m_bAvailableFlagA0 = 0;
    1809   rpcTempCU->m_bAvailableFlagB2 = 0;
     1838#if NH_3D_MLC
     1839  rpcTempCU->initAvailableFlags();
     1840#endif
    18101841  rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    1811   rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,inheritedVSPDisInfo, numValidMergeCand );
    1812 #endif
    1813 #else
    1814 #if H_3D
    1815   rpcTempCU->m_bAvailableFlagA1 = 0;
    1816   rpcTempCU->m_bAvailableFlagB1 = 0;
    1817   rpcTempCU->m_bAvailableFlagB0 = 0;
    1818   rpcTempCU->m_bAvailableFlagA0 = 0;
    1819   rpcTempCU->m_bAvailableFlagB2 = 0;
    1820   rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    1821   rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
    1822 #else
     1842#if NH_3D_MLC
     1843  rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
     1844#if NH_3D_SPIVMP
     1845    , pcMvFieldSP, puhInterDirSP
     1846#endif
     1847    , numValidMergeCand
     1848    );
     1849
     1850  rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag
     1851#if NH_3D_SPIVMP
     1852    , bSPIVMPFlag
     1853#endif
     1854    , numValidMergeCand
     1855    );
     1856#endif
     1857#endif
     1858#else
     1859#if NH_3D_MLC
     1860  rpcTempCU->initAvailableFlags();
     1861#endif
    18231862  rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
    1824 #endif
    1825 #endif
    1826 #if H_3D_IV_MERGE
     1863#if NH_3D_MLC
     1864  rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
     1865#if H_3D_SPIVMP
     1866    , pcMvFieldSP, puhInterDirSP
     1867#endif
     1868    , numValidMergeCand
     1869    );
     1870#if NH_3D_MLC
     1871  rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours
     1872#if H_3D_SPIVMP
     1873    , bSPIVMPFlag
     1874#endif
     1875    , numValidMergeCand
     1876    );
     1877#endif
     1878#endif
     1879#endif
     1880
     1881#if NH_3D_MLC
    18271882  Int mergeCandBuffer[MRG_MAX_NUM_CANDS_MEM];
    18281883#else
    18291884  Int mergeCandBuffer[MRG_MAX_NUM_CANDS];
    18301885#endif
    1831 #if H_3D_ARP
    1832 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui )
     1886#if NH_3D_MLC
     1887  for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui )
    18331888#else
    18341889  for( UInt ui = 0; ui < numValidMergeCand; ++ui )
    18351890#endif
    1836 
    18371891  {
    18381892    mergeCandBuffer[ui] = 0;
     
    18521906  DEBUG_STRING_NEW(bestStr)
    18531907
    1854 #if H_3D_ARP
     1908#if NH_3D_ARP
    18551909  Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1;
     1910#if H_3D_IC
    18561911  if( nARPWMax < 0 || bICFlag )
     1912#else
     1913  if( nARPWMax < 0 )
     1914#endif
    18571915  {
    18581916    nARPWMax = 0;
     
    18601918  for( Int nARPW=nARPWMax; nARPW >= 0 ; nARPW-- )
    18611919  {
     1920#if NH_3D_IV_MERGE
    18621921    memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS_MEM*sizeof(Int) );
     1922#else
     1923    memset( mergeCandBuffer, 0, MRG_MAX_NUM_CANDS * sizeof(Int) );
     1924#endif
    18631925    rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
    18641926    rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
     
    18671929#endif
    18681930    rpcTempCU->getDvInfo(0) = cOrigDisInfo;
    1869     rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, 0, uhDepth );
     1931    rpcTempCU->setDvInfoSubParts(cOrigDisInfo, 0, uhDepth );
     1932#if NH_3D_VSP
    18701933    Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    18711934    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    1872 #if H_3D_SPIVMP
    1873     Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    1874     memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    1875     TComMvField*  pcMvFieldSP;
    1876     UChar* puhInterDirSP;
    1877     pcMvFieldSP = new TComMvField[rpcTempCU->getPic()->getPicSym()->getNumPartition()*2];
    1878     puhInterDirSP = new UChar[rpcTempCU->getPic()->getPicSym()->getNumPartition()];
    1879 #endif
    1880 #if H_3D
     1935#endif
     1936#if NH_3D
     1937#if NH_3D_MLC
    18811938    rpcTempCU->initAvailableFlags();
     1939#endif
    18821940    rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    18831941    rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
    1884 #if H_3D_SPIVMP
     1942#if NH_3D_SPIVMP
    18851943      , pcMvFieldSP, puhInterDirSP
    18861944#endif
     
    18881946      );
    18891947
    1890     rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag
    1891 #if H_3D_SPIVMP
     1948    rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours
     1949#if NH_3D_VSP
     1950      , vspFlag
     1951#endif
     1952#if NH_3D_SPIVMP
    18921953      , bSPIVMPFlag
    18931954#endif
     
    18961957
    18971958#else
    1898     rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand );
     1959    rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
    18991960#endif
    19001961
     
    19261987          rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth );
    19271988#endif
    1928 #if H_3D_ARP
    1929           rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
    1930 #endif
    19311989          rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth );
    19321990          rpcTempCU->setChromaQpAdjSubParts( bTransquantBypassFlag ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth );
     
    19341992          rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level
    19351993          rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to CTU level
    1936 #if H_3D_VSP
     1994#if NH_3D_ARP
     1995          rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
     1996#endif
     1997
     1998#if NH_3D_VSP
    19371999          rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
    19382000#endif
    1939 #if H_3D_SPIVMP
     2001#if NH_3D_SPIVMP
    19402002          rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth);
    19412003          if (bSPIVMPFlag[uiMergeCand])
     
    19562018          else
    19572019#endif
    1958 #if H_3D_VSP
    19592020          {
     2021#if NH_3D_VSP
    19602022            if ( vspFlag[uiMergeCand] )
    19612023            {
     
    19872049            {
    19882050#endif
    1989           rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to CTU level
    1990           rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    1991           rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    1992 #if H_3D_VSP
     2051            rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to CTU level
     2052            rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
     2053            rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
     2054#if NH_3D_VSP
    19932055            }
     2056#endif
    19942057          }
    1995 #endif
    19962058          // do MC
    19972059          m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
     
    20272089          rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
    20282090#endif
    2029 #if H_3D_VSP // possible bug fix
     2091#if NH_3D_VSP
    20302092          if( rpcTempCU->getSkipFlag(0) )
    20312093          {
     
    21602222  }
    21612223  DEBUG_STRING_APPEND(sDebug, bestStr)
    2162 #if H_3D_SPIVMP
     2224#if NH_3D_ARP
     2225 }
     2226#endif
     2227#if NH_3D_SPIVMP
    21632228 delete[] pcMvFieldSP;
    21642229 delete[] puhInterDirSP;
    21652230#endif
    2166 #if H_3D_ARP
    2167  }
    2168 #endif
    2169 
    21702231}
    21712232
     
    21842245
    21852246  // prior to this, rpcTempCU will have just been reset using rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    2186 #if H_3D
     2247#if H_3D || NH_3D_ARP
    21872248  const Bool bTransquantBypassFlag = rpcTempCU->getCUTransquantBypass(0);
    21882249#endif
     
    21922253#endif
    21932254  UChar uhDepth = rpcTempCU->getDepth( 0 );
    2194 #if H_3D_ARP
     2255#if NH_3D_ARP
    21952256    Bool bFirstTime = true;
    21962257    Int nARPWMax    = rpcTempCU->getSlice()->getARPStepNum() - 1;
     2258#if H_3D_IC
    21972259    if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || rpcTempCU->getICFlag(0) )
     2260#else
     2261    if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N )
     2262#endif
    21982263    {
    21992264      nARPWMax = 0;
     
    22232288  rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
    22242289  rpcTempCU->setChromaQpAdjSubParts( rpcTempCU->getCUTransquantBypass(0) ? 0 : m_cuChromaQpOffsetIdxPlus1, 0, uhDepth );
    2225 #if H_3D_ARP
     2290#if NH_3D_ARP
    22262291      rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
    22272292#endif
    2228 #if H_3D_ARP
     2293#if NH_3D_ARP
    22292294      if( bFirstTime == false && nARPWMax )
    22302295      {
     
    22492314  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] );
    22502315#endif
    2251 #if H_3D_ARP
     2316#if NH_3D_ARP
    22522317        if( nARPWMax )
    22532318        {
     
    22602325  if ( !rpcTempCU->getMergeAMP() )
    22612326  {
    2262 #if H_3D_ARP
     2327#if NH_3D_ARP
    22632328        if( nARPWMax )
    22642329        {
     
    22812346
    22822347  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false DEBUG_STRING_PASS_INTO(sTest) );
    2283 #if H_3D_VSP // possible bug fix
    2284       if( rpcTempCU->getQtRootCbf(0)==0 )
    2285       {
    2286         rpcTempCU->setTrIdxSubParts(0, 0, uhDepth);
    2287       }
     2348#if NH_3D_VSP
     2349  if( rpcTempCU->getQtRootCbf(0)==0 )
     2350  {
     2351    rpcTempCU->setTrIdxSubParts(0, 0, uhDepth);
     2352  }
    22882353#endif
    22892354#if NH_3D_VSO // M4
     
    23772442      }
    23782443#endif
    2379 #if H_3D_ARP
     2444#if NH_3D_ARP
    23802445    }
    23812446#endif
     
    23852450}
    23862451
    2387 #if H_3D_DBBP
     2452#if NH_3D_DBBP
    23882453Void TEncCu::xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment )
    23892454{
    2390   UInt  uiWidth     = pOrigYuv->getWidth ( );
    2391   UInt  uiHeight    = pOrigYuv->getHeight( );
    2392   Pel*  piSrc       = pOrigYuv->getLumaAddr( );
    2393   UInt  uiSrcStride = pOrigYuv->getStride();
    2394   Pel*  piDst       = pOrigYuvTemp->getLumaAddr( );
    2395   UInt  uiDstStride = pOrigYuvTemp->getStride();
     2455  UInt  uiWidth     = pOrigYuv->getWidth (COMPONENT_Y);
     2456  UInt  uiHeight    = pOrigYuv->getHeight(COMPONENT_Y);
     2457  Pel*  piSrc       = pOrigYuv->getAddr(COMPONENT_Y);
     2458  UInt  uiSrcStride = pOrigYuv->getStride(COMPONENT_Y);
     2459  Pel*  piDst       = pOrigYuvTemp->getAddr(COMPONENT_Y);
     2460  UInt  uiDstStride = pOrigYuvTemp->getStride(COMPONENT_Y);
    23962461 
    23972462  UInt  uiMaskStride= MAX_CU_SIZE;
     
    24182483 
    24192484  // now invalidate chroma
    2420   Pel*  piSrcU       = pOrigYuv->getCbAddr();
    2421   Pel*  piSrcV       = pOrigYuv->getCrAddr();
    2422   UInt  uiSrcStrideC = pOrigYuv->getCStride();
    2423   Pel*  piDstU       = pOrigYuvTemp->getCbAddr( );
    2424   Pel*  piDstV       = pOrigYuvTemp->getCrAddr( );
    2425   UInt  uiDstStrideC = pOrigYuvTemp->getCStride();
     2485  Pel*  piSrcU       = pOrigYuv->getAddr(COMPONENT_Cb);
     2486  Pel*  piSrcV       = pOrigYuv->getAddr(COMPONENT_Cr);
     2487  UInt  uiSrcStrideC = pOrigYuv->getStride(COMPONENT_Cb);
     2488  Pel*  piDstU       = pOrigYuvTemp->getAddr(COMPONENT_Cb);
     2489  Pel*  piDstV       = pOrigYuvTemp->getAddr(COMPONENT_Cr);
     2490  UInt  uiDstStrideC = pOrigYuvTemp->getStride(COMPONENT_Cb);
    24262491  pMask = pMaskStart;
    24272492 
     
    24442509  }
    24452510}
    2446 
     2511#endif
     2512
     2513#if H_3D_DIS
    24472514Void TEncCu::xCheckRDCostDIS( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize )
    24482515{
     
    25182585  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
    25192586}
    2520 
     2587#endif
     2588
     2589#if NH_3D_DBBP
    25212590Void TEncCu::xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG )
    25222591{
     
    25402609  AOF( uiWidth == uiHeight );
    25412610 
    2542 #if H_3D_DBBP
    2543   // Is this correct here, was under the macro SEC_DBBP_DISALLOW_8x8_I0078, however the function is related to Single Depth Mode
     2611#if NH_3D_DBBP
    25442612  if(uiWidth <= 8)
    25452613  {
     
    25922660    rpcTempCU->getDBBPTmpData()->eVirtualPartSize = eVirtualPartSize;
    25932661    rpcTempCU->getDBBPTmpData()->uiVirtualPartIndex = uiSegment;
    2594     m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, false, bUseMRG );
     2662    m_pcPredSearch->predInterSearch( rpcTempCU, m_ppcOrigYuvDBBP[uhDepth], apPredYuv[uiSegment], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], false, bUseMRG );
    25952663    m_pcRdCost->setUseMask(false);
    25962664   
     
    26012669    pDBBPTmpData->auhMergeIndex[uiSegment] = rpcTempCU->getMergeIndex(0);
    26022670   
     2671#if NH_3D_VSP
    26032672    AOF( rpcTempCU->getSPIVMPFlag(0) == false );
    26042673    AOF( rpcTempCU->getVSPFlag(0) == 0 );
     2674#endif
    26052675   
    26062676    for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
     
    26212691  rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
    26222692 
    2623   UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMaxCUDepth() - uhDepth ) << 1 ) ) >> 4;
     2693  UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( rpcTempCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uhDepth ) << 1 ) ) >> 4;
    26242694  for( UInt uiSegment = 0; uiSegment < 2; uiSegment++ )
    26252695  {
     
    26472717 
    26482718  // reconstruct final prediction signal by combining both segments
    2649   m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize);
     2719  Int bitDepthY = rpcTempCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);
     2720  m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize, bitDepthY);
    26502721  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false );
    26512722 
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncCu.h

    r1200 r1274  
    6969  TComDataCU**            m_ppcBestCU;      ///< Best CUs in each depth
    7070  TComDataCU**            m_ppcTempCU;      ///< Temporary CUs in each depth
    71 #if H_3D_ARP
     71#if NH_3D_ARP
    7272  TComDataCU**            m_ppcWeightedTempCU;
    7373#endif
     
    8282  TComYuv**               m_ppcOrigYuv;     ///< Original Yuv for each depth
    8383
    84 #if H_3D_DBBP
     84#if NH_3D_DBBP
    8585  TComYuv**               m_ppcOrigYuvDBBP;
    8686#endif
     
    155155  Void  xCheckRDCostInter   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
    156156#endif
    157 #if H_3D_DBBP
     157#if NH_3D_DBBP
    158158  Void  xInvalidateOriginalSegments( TComYuv* pOrigYuv, TComYuv* pOrigYuvTemp, Bool* pMask, UInt uiValidSegment );
    159159  Void  xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false );
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1225 r1274  
    151151Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    152152{
    153 #if H_3D_ARP
     153#if NH_3D_ARP
    154154  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 )
    155155#else
     
    188188#endif
    189189
    190 #if H_3D_ARP
     190#if NH_3D_ARP
    191191Void TEncEntropy::encodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
    192192{
     
    874874
    875875#endif
    876 #if H_3D_DBBP
     876#if NH_3D_DBBP
    877877Void TEncEntropy::encodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    878878{
     879  if( bRD )
     880  {
     881    uiAbsPartIdx = 0;
     882  }
     883 
    879884  if( pcCU->getSlice()->getDepthBasedBlkPartFlag() &&
    880885    ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN ||
     
    883888      pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
    884889  {
    885     if( bRD )
    886     {
    887       uiAbsPartIdx = 0;
    888     }
    889890    m_pcEntropyCoderIf->codeDBBPFlag( pcCU, uiAbsPartIdx );
    890891  }
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncEntropy.h

    r1225 r1274  
    8484  virtual Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8585  virtual Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    86 #if H_3D_ARP
     86#if NH_3D_ARP
    8787  virtual Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8888#endif
     
    9494  virtual Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9595#endif
    96 #if H_3D_DBBP
     96#if NH_3D_DBBP
    9797  virtual Void codeDBBPFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9898#endif
     
    173173  Void encodeMergeFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    174174  Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    175 #if H_3D_ARP
     175#if NH_3D_ARP
    176176  Void encodeARPW         ( TComDataCU* pcCU, UInt uiAbspartIdx );
    177177#endif
     
    183183  Void encodeSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    184184#endif
    185 #if H_3D_DBBP
     185#if NH_3D_DBBP
    186186  Void encodeDBBPFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    187187#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncGOP.cpp

    r1225 r1274  
    14431443    }   
    14441444
    1445 #if H_3D_IV_MERGE
     1445#if NH_3D_IV_MERGE
    14461446    // This needs to be done after initialization of 3D tool parameters.
    14471447    pcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( )   ) ? 1 : 0 ));
     
    14711471    pcSlice->setRefPicList ( rcListPic );
    14721472#endif
    1473 #if H_3D
     1473#if NH_3D_NBDV
    14741474    pcSlice->setDefaultRefView();
    14751475#endif
    1476 #if H_3D_ARP
     1476#if NH_3D_ARP
    14771477    //GT: This seems to be broken when layerId in vps is not equal to layerId in nuh
    14781478    pcSlice->setARPStepNum(m_ivPicLists);
    1479     if(pcSlice->getARPStepNum() > 1)
    1480     {
    1481       for(Int iLayerId = 0; iLayerId < getLayerId(); iLayerId ++ )
    1482       {
    1483         Int  iViewIdx =   pcSlice->getVPS()->getViewIndex(iLayerId);
    1484         Bool bIsDepth = ( pcSlice->getVPS()->getDepthId  ( iLayerId ) == 1 );
    1485         if( iViewIdx<getViewIndex() && !bIsDepth )
    1486         {
    1487           pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );
    1488         }
    1489       }
    1490     }
    14911479#endif
    14921480#if NH_3D_IC
     
    17311719    UInt uiNumSliceSegments = 1;
    17321720
    1733 #if H_3D_NBDV
     1721#if NH_3D_NBDV
    17341722      if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    17351723      {
    1736         Int iColPoc = pcSlice->getRefPOC(RefPicList(1-pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
     1724        Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
    17371725        pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc));
    17381726      }
     
    17431731#endif
    17441732
    1745 #if H_3D_NBDV
     1733#if NH_3D_NBDV
    17461734      if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    17471735      {
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncSbac.cpp

    r1256 r1274  
    6868, m_cCUMergeFlagExtSCModel             ( 1,             1,                      NUM_MERGE_FLAG_EXT_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
    6969, m_cCUMergeIdxExtSCModel              ( 1,             1,                      NUM_MERGE_IDX_EXT_CTX                , m_contextModels + m_numContextModels, m_numContextModels)
    70 #if H_3D_ARP
     70#if NH_3D_ARP
    7171, m_cCUPUARPWSCModel                   ( 1,             1,                      NUM_ARPW_CTX                         , m_contextModels + m_numContextModels, m_numContextModels)
    7272#endif                                                                                                               
     
    114114, m_cSDCFlagSCModel                    ( 1,             1,                       NUM_SDC_FLAG_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
    115115#endif                                                                                                         
    116 #if H_3D_DBBP                                                                                                 
     116#if NH_3D_DBBP
    117117, m_cDBBPFlagSCModel                   ( 1,             1,                       DBBP_NUM_FLAG_CTX                   , m_contextModels + m_numContextModels, m_numContextModels)
    118118#endif
     
    148148  m_cCUMergeFlagExtSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT);
    149149  m_cCUMergeIdxExtSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT);
    150 #if H_3D_ARP
     150#if NH_3D_ARP
    151151  m_cCUPUARPWSCModel.initBuffer                   ( eSliceType, iQp, (UChar*)INIT_ARPW );
    152152#endif
     
    194194  m_cSDCFlagSCModel.initBuffer                    ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    195195#endif                                           
    196 #if H_3D_DBBP                                   
     196#if NH_3D_DBBP
    197197  m_cDBBPFlagSCModel.initBuffer                   ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );
    198198#endif
     
    235235      curCost += m_cCUMergeFlagExtSCModel.calcCost             ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT);
    236236      curCost += m_cCUMergeIdxExtSCModel.calcCost              ( curSliceType, qp, (UChar*)INIT_MERGE_IDX_EXT);
    237 #if H_3D_ARP
     237#if NH_3D_ARP
    238238      curCost += m_cCUPUARPWSCModel.calcCost                   ( curSliceType, qp, (UChar*)INIT_ARPW );
    239239#endif                                                     
     
    244244      curCost += m_cSDCFlagSCModel.calcCost                    ( curSliceType, qp, (UChar*)INIT_SDC_FLAG );
    245245#endif                                                     
    246 #if H_3D_DBBP                                             
     246#if NH_3D_DBBP
    247247      curCost += m_cDBBPFlagSCModel.calcCost                   ( curSliceType, qp, (UChar*)INIT_DBBP_FLAG );
    248248#endif
     
    302302  m_cCUDISTypeSCModel.initBuffer         ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE );
    303303#endif
    304 #if H_3D_ARP
    305   m_cCUPUARPWSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_ARPW );
    306 #endif
    307304#if H_3D_DIM
    308305  m_cDepthIntraModeSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_DEPTH_INTRA_MODE );
     
    317314#if H_3D_DIM_SDC
    318315  m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
    319 #endif
    320 #if H_3D_DBBP
    321   m_cDBBPFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );
    322316#endif
    323317
     
    971965}
    972966
    973 #if H_3D_ARP
     967#if NH_3D_ARP
    974968Void TEncSbac::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
    975969{
     
    26472641#endif
    26482642
    2649 #if H_3D_DBBP
     2643#if NH_3D_DBBP
    26502644Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    26512645{
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncSbac.h

    r1225 r1274  
    140140  Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    141141  Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    142 #if H_3D_ARP
     142#if NH_3D_ARP
    143143  Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    144144#endif
     
    150150  Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    151151#endif
    152 #if H_3D_DBBP
     152#if NH_3D_DBBP
    153153  Void codeDBBPFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    154154#endif
     
    212212  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    213213  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
    214 #if H_3D_ARP
     214#if NH_3D_ARP
    215215  ContextModel3DBuffer m_cCUPUARPWSCModel;
    216216#endif
     
    262262  ContextModel3DBuffer m_cSDCFlagSCModel;
    263263#endif
    264 #if H_3D_DBBP
     264#if NH_3D_DBBP
    265265  ContextModel3DBuffer m_cDBBPFlagSCModel;
    266266#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncSearch.cpp

    r1256 r1274  
    38763876//! estimation of best merge coding
    38773877Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, Distortion& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand
    3878 #if H_3D_VSP
     3878#if NH_3D_VSP
    38793879                                 , Int* vspFlag
    38803880#endif
    3881 #if H_3D_SPIVMP
     3881#if NH_3D_SPIVMP
    38823882                                 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    38833883#endif
     
    38913891  UInt uiDepth = pcCU->getDepth( uiAbsPartIdx );
    38923892
    3893 #if H_3D_DBBP
     3893#if NH_3D_DBBP
    38943894  DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();
    38953895  if( pcCU->getDBBPFlag(0) )
     
    38983898    AOF( iPUIdx == 0 );
    38993899    AOF( pcCU->getPartitionSize(0) == SIZE_2Nx2N );
    3900     AOF( pDBBPTmpData->eVirtualPartSize != SIZE_NONE );
     3900    AOF( pDBBPTmpData->eVirtualPartSize != NUMBER_OF_PART_SIZES );
    39013901   
    39023902    // temporary change of partition size for candidate derivation
     
    39233923
    39243924  PartSize partSize = pcCU->getPartitionSize( 0 );
    3925 #if H_3D_DBBP
     3925#if NH_3D_DBBP
    39263926  if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && partSize != SIZE_2Nx2N && pcCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(0) == false )
    39273927#else
     
    39323932    {
    39333933      pcCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set
    3934 #if H_3D
     3934#if NH_3D_MLC
    39353935      pcCU->initAvailableFlags();
    3936       pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand);
     3936      pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
    39373937      pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
    3938 #if H_3D_SPIVMP
     3938#if NH_3D_SPIVMP
    39393939        , pcMvFieldSP, puhInterDirSP
    39403940#endif
     
    39433943
    39443944      pcCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours
    3945 #if H_3D_VSP
     3945#if NH_3D_VSP
    39463946        , vspFlag
    39473947#endif
    3948 #if H_3D_SPIVMP
     3948#if NH_3D_SPIVMP
    39493949        , pbSPIVMPFlag
    39503950#endif
    3951                                         , numValidMergeCand
     3951        , numValidMergeCand
    39523952        );
    39533953#else
     
    39593959  else
    39603960  {
    3961 #if H_3D
     3961#if NH_3D_MLC
    39623962    pcCU->initAvailableFlags();
    3963     pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand);
     3963    pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    39643964    pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours
    3965 #if H_3D_SPIVMP
     3965#if NH_3D_SPIVMP
    39663966      , pcMvFieldSP, puhInterDirSP
    39673967#endif
     
    39703970
    39713971    pcCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
    3972 #if H_3D_VSP
     3972#if NH_3D_VSP
    39733973      , vspFlag
    39743974#endif
    3975 #if H_3D_SPIVMP
     3975#if NH_3D_SPIVMP
    39763976      , pbSPIVMPFlag
    39773977#endif
    3978                                       , numValidMergeCand
     3978      , numValidMergeCand
    39793979      );
    39803980#else
     
    39853985  xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    39863986
    3987 #if H_3D_DBBP
     3987#if NH_3D_DBBP
    39883988  if( pcCU->getDBBPFlag(0) )
    39893989  {
     
    40084008
    40094009    PartSize ePartSize = pcCU->getPartitionSize( 0 );
    4010 #if H_3D_VSP
     4010#if NH_3D_VSP
    40114011    pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    40124012#endif
    40134013
    4014 #if H_3D_SPIVMP
     4014#if NH_3D_SPIVMP
    40154015    pcCU->setSPIVMPFlagSubParts( pbSPIVMPFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ));
    40164016    if (pbSPIVMPFlag[uiMergeCand])
     
    40314031    else
    40324032#endif
    4033 #if H_3D_VSP
    4034 #if H_3D_DBBP
     4033#if NH_3D_VSP
     4034#if NH_3D_DBBP
    40354035      if ( vspFlag[uiMergeCand] && !pcCU->getDBBPFlag(0) )
    40364036#else
     
    40684068    pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    40694069    pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    4070 #if H_3D_VSP
     4070#if NH_3D_VSP
    40714071      }
    40724072#endif
     
    41794179  Distortion   biPDistTemp = std::numeric_limits<Distortion>::max();
    41804180
    4181 #if H_3D_IV_MERGE
     4181#if NH_3D_IV_MERGE
    41824182  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
    41834183  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     
    42144214
    42154215    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight );
    4216 #if H_3D_VSP
     4216#if NH_3D_VSP
    42174217    pcCU->setVSPFlagSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) );
    42184218#endif
     
    45574557    } // end if bTestNormalMC
    45584558#endif
    4559 #if H_3D_DBBP
     4559#if NH_3D_DBBP
    45604560    // test merge mode for DBBP (2Nx2N)
    45614561    if ( pcCU->getPartitionSize( uiPartAddr ) != SIZE_2Nx2N || pcCU->getDBBPFlag(0) )
     
    45974597      Distortion uiMRGCost = std::numeric_limits<Distortion>::max();
    45984598
    4599 #if H_3D_VSP
     4599#if NH_3D_VSP
    46004600      Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    46014601      memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    46064606      DisInfo OriginalDvInfo = pcCU->getDvInfo(uiAbsPartIdx);
    46074607#endif
    4608 #if H_3D_SPIVMP
     4608#if NH_3D_SPIVMP
    46094609      Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    46104610      memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    46114611      TComMvField*  pcMvFieldSP;
    46124612      UChar* puhInterDirSP;
    4613       pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
    4614       puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
    4615 #endif
    4616       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours
    4617 
    4618 #if H_3D_VSP
     4613      pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2];
     4614      puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()];
     4615#endif
     4616      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand
     4617#if NH_3D_VSP
    46194618                      , vspFlag
    46204619#endif
    4621 #if H_3D_SPIVMP
     4620#if NH_3D_SPIVMP
    46224621                      , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
    46234622#endif
    4624 , numValidMergeCand);
     4623                      );
    46254624
    46264625      if ( uiMRGCost < uiMECost )
     
    46294628        pcCU->setMergeFlagSubParts ( true,          uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    46304629        pcCU->setMergeIndexSubParts( uiMRGIndex,    uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    4631 #if H_3D_VSP
     4630#if NH_3D_VSP
    46324631        pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    46334632#endif
    4634 #if H_3D_SPIVMP
     4633#if NH_3D_SPIVMP
    46354634        pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 
    46364635        if (bSPIVMPFlag[uiMRGIndex]!=0)
     
    46554654        else
    46564655#endif
    4657 #if H_3D_VSP
    4658 #if H_3D_DBBP
     4656#if NH_3D_VSP
     4657#if NH_3D_DBBP
    46594658        if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) )
    46604659#else
     
    46924691        pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );
    46934692        pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
     4693#if NH_3D_VSP
     4694          }
     4695#endif
    46944696#if H_3D
    46954697          }
     
    47054707      else
    47064708      {
    4707 #if H_3D_SPIVMP       
     4709#if NH_3D_SPIVMP       
    47084710        pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47094711#endif
     
    47114713        pcCU->setMergeFlagSubParts( false,        uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47124714        pcCU->setInterDirSubParts ( uiMEInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    4713 #if H_3D_VSP
     4715#if NH_3D_VSP
    47144716        pcCU->setVSPFlagSubParts ( 0,             uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47154717        pcCU->setDvInfoSubParts(OriginalDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     
    47184720        pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMEMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
    47194721      }
    4720 #if H_3D_SPIVMP
     4722#if NH_3D_SPIVMP
    47214723      delete[] pcMvFieldSP;
    47224724      delete[] puhInterDirSP;
     
    47544756  {
    47554757
    4756 #if H_3D_DBBP
     4758#if NH_3D_DBBP
    47574759    DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();
    47584760    if( pcCU->getDBBPFlag(0) )
     
    47614763      AOF( uiPartIdx == 0 );
    47624764      AOF( pcCU->getPartitionSize(0) == SIZE_2Nx2N );
    4763       AOF( pDBBPTmpData->eVirtualPartSize != SIZE_NONE );
     4765      AOF( pDBBPTmpData->eVirtualPartSize != NUMBER_OF_PART_SIZES );
    47644766      AOF( iRoiWidth == iRoiHeight );
    47654767     
     
    47864788
    47874789    pcCU->fillMvpCand( uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pcAMVPInfo );
    4788 #if H_3D_DBBP
     4790#if NH_3D_DBBP
    47894791    if( pcCU->getDBBPFlag(0) )
    47904792    {
     
    50145016  if ( pcCU->getSlice()->testWeightPred() && pcCU->getSlice()->getSliceType()==P_SLICE )
    50155017  {
    5016     xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) );
     5018    xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, true, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA)
     5019#if NH_3D_ARP
     5020      , false //add this for IC, otherwise, it could be removed
     5021#endif
     5022      );
    50175023  }
    50185024  else
    50195025  {
    50205026    xPredInterBlk( COMPONENT_Y, pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA)
    5021 #if H_3D_ARP
     5027#if NH_3D_ARP
    50225028      , false
    50235029#endif
     
    51145120
    51155121  m_pcRdCost->setPredictor  ( *pcMvPred );
    5116 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5122#if NH_3D_INTEGER_MV_DEPTH
    51175123  if( pcCU->getSlice()->getIsDepth() )
    51185124  {
     
    51235129#endif
    51245130    m_pcRdCost->setCostScale  ( 2 );   
    5125 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5131#if NH_3D_INTEGER_MV_DEPTH
    51265132  }
    51275133#endif
     
    51505156
    51515157  m_pcRdCost->getMotionCost( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) );
    5152 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5158#if NH_3D_INTEGER_MV_DEPTH
    51535159  if( ! pcCU->getSlice()->getIsDepth() )
    51545160  {
     
    51635169  rcMv += (cMvHalf <<= 1);
    51645170  rcMv +=  cMvQter;
    5165 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5171#if NH_3D_INTEGER_MV_DEPTH
    51665172  }
    51675173#endif
    51685174
    51695175  UInt uiMvBits = m_pcRdCost->getBits( rcMv.getHor(), rcMv.getVer() );
    5170 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5176#if NH_3D_INTEGER_MV_DEPTH
    51715177  if( pcCU->getSlice()->getIsDepth() )
    51725178  {
     
    51825188{
    51835189  Int  iMvShift = 2;
    5184 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5190#if NH_3D_INTEGER_MV_DEPTH
    51855191  if( pcCU->getSlice()->getIsDepth() )
    51865192  {
     
    53405346  UInt uiSearchRange = m_iSearchRange;
    53415347  pcCU->clipMv( rcMv );
    5342 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5348#if NH_3D_INTEGER_MV_DEPTH
    53435349  if( ! pcCU->getSlice()->getIsDepth() )
    53445350#endif
     
    53605366      TComMv cMv = m_acMvPredictors[index];
    53615367      pcCU->clipMv( cMv );
    5362 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5368#if NH_3D_INTEGER_MV_DEPTH
    53635369      if( ! pcCU->getSlice()->getIsDepth() )
    53645370      {     
    53655371#endif
    53665372        cMv >>= 2;
    5367 #if NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC
     5373#if NH_3D_INTEGER_MV_DEPTH
    53685374      }
    53695375#endif
     
    57885794    m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
    57895795    m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, true );
    5790 #if H_3D_ARP
     5796#if NH_3D_ARP
    57915797    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
    57925798#endif
     
    58845890  const Double zeroCost     = (pcCU->isLosslessCoded( 0 )) ? (nonZeroCost+1) : (m_pcRdCost->calcRdCost( zeroResiBits, zeroDistortion ));
    58855891#endif
    5886 #if H_3D_SPIVMP
    5887     if ( dZeroCost < dCost || pcCU->getQtRootCbf(0)==0)
     5892#if NH_3D_SPIVMP
     5893    if ( zeroCost < nonZeroCost || pcCU->getQtRootCbf(0)==0)
    58885894#else
    58895895  if ( zeroCost < nonZeroCost || !pcCU->getQtRootCbf(0) )
     
    71047110    m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
    71057111    m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, true);
    7106 #if H_3D_ARP
     7112#if NH_3D_ARP
    71077113    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
    71087114#endif
     
    71317137    m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
    71327138#endif
    7133 #if H_3D_ARP
     7139#if NH_3D_ARP
    71347140    m_pcEntropyCoder->encodeARPW( pcCU , 0  );
    71357141#endif
     
    71377143    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    71387144#endif
    7139 #if H_3D
     7145#if NH_3D_DBBP
    71407146    m_pcEntropyCoder->encodeDBBPFlag( pcCU, 0, true );
    71417147#endif
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncSearch.h

    r1200 r1274  
    409409                                    TComMvField* cMvFieldNeighbours,
    410410                                    UChar*       uhInterDirNeighbours,
    411 #if H_3D_VSP
     411                                    Int&         numValidMergeCand
     412#if NH_3D_VSP
    412413                                  , Int* vspFlag
    413414#endif
    414 #if H_3D_SPIVMP
     415#if NH_3D_SPIVMP
    415416                                  , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    416417#endif
    417                                     Int&         numValidMergeCand
    418418                                   );
    419419
  • branches/HTM-14.1-update-dev2/source/Lib/TLibEncoder/TEncSlice.cpp

    r1256 r1274  
    567567  rpcSlice->setSliceSegmentMode     ( m_pcCfg->getSliceSegmentMode()     );
    568568  rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
    569 #if H_3D_IV_MERGE
     569#if NH_3D_IV_MERGE
    570570#else
    571571  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
Note: See TracChangeset for help on using the changeset viewer.