Changeset 476 in 3DVCSoftware


Ignore:
Timestamp:
18 Jun 2013, 05:16:27 (11 years ago)
Author:
mediatek-htm
Message:

Integration of 3D-HEVC merge related coding tools:
Inter-view motion merge candidate
HHI_INTER_VIEW_MOTION_PRED
SAIT_IMPROV_MOTION_PRED_M24829, improved inter-view motion vector prediction
QC_MRG_CANS_B0048 , JCT3V-B0048, B0086, B0069
OL_DISMV_POS_B0069 , different pos for disparity MV candidate, B0069
MTK_INTERVIEW_MERGE_A0049 , second part
QC_AMVP_MRG_UNIFY_IVCAN_C0051
TEXTURE MERGING CANDIDATE , JCT3V-C0137

Notes: Two configurations are added:
PredDepthMapGen : 1
MultiviewMvPred : 7

From: yiwen.chen@… (MediaTek)

Location:
branches/HTM-DEV-0.3-dev2
Files:
2 added
40 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/build/linux/lib/TLibCommon/makefile

    r324 r476  
    3737                        $(OBJ_DIR)/SEI.o \
    3838                        $(OBJ_DIR)/TComCABACTables.o \
     39                        $(OBJ_DIR)/TComDepthMapGenerator.o \                   
    3940                        $(OBJ_DIR)/TComSampleAdaptiveOffset.o \
    4041                        $(OBJ_DIR)/TComBitStream.o \
  • branches/HTM-DEV-0.3-dev2/build/vc9/TAppDecoder_vc9.vcproj

    r324 r476  
    2222                <Configuration
    2323                        Name="Debug|Win32"
    24                         OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
     24                        OutputDirectory="..\..\bin\"
    2525                        IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
    2626                        ConfigurationType="1"
     
    9292                </Configuration>
    9393                <Configuration
    94                         Name="Debug|x64"
    95                         OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
    96                         IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
    97                         ConfigurationType="1"
    98                         CharacterSet="2"
    99                         >
    100                         <Tool
    101                                 Name="VCPreBuildEventTool"
    102                         />
    103                         <Tool
    104                                 Name="VCCustomBuildTool"
    105                         />
    106                         <Tool
    107                                 Name="VCXMLDataGeneratorTool"
    108                         />
    109                         <Tool
    110                                 Name="VCWebServiceProxyGeneratorTool"
    111                         />
    112                         <Tool
    113                                 Name="VCMIDLTool"
    114                                 TargetEnvironment="3"
    115                         />
    116                         <Tool
    117                                 Name="VCCLCompilerTool"
    118                                 Optimization="0"
    119                                 AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
    120                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
    121                                 MinimalRebuild="true"
    122                                 BasicRuntimeChecks="3"
    123                                 RuntimeLibrary="1"
    124                                 WarningLevel="3"
    125                                 DebugInformationFormat="3"
    126                         />
    127                         <Tool
    128                                 Name="VCManagedResourceCompilerTool"
    129                         />
    130                         <Tool
    131                                 Name="VCResourceCompilerTool"
    132                         />
    133                         <Tool
    134                                 Name="VCPreLinkEventTool"
    135                         />
    136                         <Tool
    137                                 Name="VCLinkerTool"
    138                                 LinkIncremental="2"
    139                                 GenerateDebugInformation="true"
    140                                 SubSystem="1"
    141                                 TargetMachine="17"
    142                         />
    143                         <Tool
    144                                 Name="VCALinkTool"
    145                         />
    146                         <Tool
    147                                 Name="VCManifestTool"
    148                         />
    149                         <Tool
    150                                 Name="VCXDCMakeTool"
    151                         />
    152                         <Tool
    153                                 Name="VCBscMakeTool"
    154                         />
    155                         <Tool
    156                                 Name="VCFxCopTool"
    157                         />
    158                         <Tool
    159                                 Name="VCAppVerifierTool"
    160                         />
    161                         <Tool
    162                                 Name="VCPostBuildEventTool"
    163                         />
    164                 </Configuration>
    165                 <Configuration
    16694                        Name="Release|Win32"
    167                         OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
     95                        OutputDirectory="..\..\bin\"
    16896                        IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
    16997                        ConfigurationType="1"
     
    239167                </Configuration>
    240168                <Configuration
     169                        Name="Debug|x64"
     170                        OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
     171                        IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
     172                        ConfigurationType="1"
     173                        CharacterSet="2"
     174                        >
     175                        <Tool
     176                                Name="VCPreBuildEventTool"
     177                        />
     178                        <Tool
     179                                Name="VCCustomBuildTool"
     180                        />
     181                        <Tool
     182                                Name="VCXMLDataGeneratorTool"
     183                        />
     184                        <Tool
     185                                Name="VCWebServiceProxyGeneratorTool"
     186                        />
     187                        <Tool
     188                                Name="VCMIDLTool"
     189                                TargetEnvironment="3"
     190                        />
     191                        <Tool
     192                                Name="VCCLCompilerTool"
     193                                Optimization="0"
     194                                AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
     195                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
     196                                MinimalRebuild="true"
     197                                BasicRuntimeChecks="3"
     198                                RuntimeLibrary="1"
     199                                WarningLevel="3"
     200                                DebugInformationFormat="3"
     201                        />
     202                        <Tool
     203                                Name="VCManagedResourceCompilerTool"
     204                        />
     205                        <Tool
     206                                Name="VCResourceCompilerTool"
     207                        />
     208                        <Tool
     209                                Name="VCPreLinkEventTool"
     210                        />
     211                        <Tool
     212                                Name="VCLinkerTool"
     213                                LinkIncremental="2"
     214                                GenerateDebugInformation="true"
     215                                SubSystem="1"
     216                                TargetMachine="17"
     217                        />
     218                        <Tool
     219                                Name="VCALinkTool"
     220                        />
     221                        <Tool
     222                                Name="VCManifestTool"
     223                        />
     224                        <Tool
     225                                Name="VCXDCMakeTool"
     226                        />
     227                        <Tool
     228                                Name="VCBscMakeTool"
     229                        />
     230                        <Tool
     231                                Name="VCFxCopTool"
     232                        />
     233                        <Tool
     234                                Name="VCAppVerifierTool"
     235                        />
     236                        <Tool
     237                                Name="VCPostBuildEventTool"
     238                        />
     239                </Configuration>
     240                <Configuration
    241241                        Name="Release|x64"
    242242                        OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
  • branches/HTM-DEV-0.3-dev2/build/vc9/TAppEncoder_vc9.vcproj

    r324 r476  
    22<VisualStudioProject
    33        ProjectType="Visual C++"
    4         Version="9,00"
     4        Version="9.00"
    55        Name="TAppEncoder"
    66        ProjectGUID="{D759E4E1-D33A-4483-B57B-0FD248E022FE}"
     
    2222                <Configuration
    2323                        Name="Debug|Win32"
    24                         OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
     24                        OutputDirectory="..\..\bin\"
    2525                        IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
    2626                        ConfigurationType="1"
     
    9292                </Configuration>
    9393                <Configuration
    94                         Name="Debug|x64"
    95                         OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
    96                         IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
    97                         ConfigurationType="1"
    98                         CharacterSet="2"
    99                         >
    100                         <Tool
    101                                 Name="VCPreBuildEventTool"
    102                         />
    103                         <Tool
    104                                 Name="VCCustomBuildTool"
    105                         />
    106                         <Tool
    107                                 Name="VCXMLDataGeneratorTool"
    108                         />
    109                         <Tool
    110                                 Name="VCWebServiceProxyGeneratorTool"
    111                         />
    112                         <Tool
    113                                 Name="VCMIDLTool"
    114                                 TargetEnvironment="3"
    115                         />
    116                         <Tool
    117                                 Name="VCCLCompilerTool"
    118                                 Optimization="0"
    119                                 AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
    120                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
    121                                 MinimalRebuild="true"
    122                                 BasicRuntimeChecks="3"
    123                                 RuntimeLibrary="1"
    124                                 WarningLevel="3"
    125                                 DebugInformationFormat="3"
    126                         />
    127                         <Tool
    128                                 Name="VCManagedResourceCompilerTool"
    129                         />
    130                         <Tool
    131                                 Name="VCResourceCompilerTool"
    132                         />
    133                         <Tool
    134                                 Name="VCPreLinkEventTool"
    135                         />
    136                         <Tool
    137                                 Name="VCLinkerTool"
    138                                 LinkIncremental="2"
    139                                 GenerateDebugInformation="true"
    140                                 SubSystem="1"
    141                                 TargetMachine="17"
    142                         />
    143                         <Tool
    144                                 Name="VCALinkTool"
    145                         />
    146                         <Tool
    147                                 Name="VCManifestTool"
    148                         />
    149                         <Tool
    150                                 Name="VCXDCMakeTool"
    151                         />
    152                         <Tool
    153                                 Name="VCBscMakeTool"
    154                         />
    155                         <Tool
    156                                 Name="VCFxCopTool"
    157                         />
    158                         <Tool
    159                                 Name="VCAppVerifierTool"
    160                         />
    161                         <Tool
    162                                 Name="VCPostBuildEventTool"
    163                         />
    164                 </Configuration>
    165                 <Configuration
    16694                        Name="Release|Win32"
    167                         OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
     95                        OutputDirectory="..\..\bin\"
    16896                        IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
    16997                        ConfigurationType="1"
     
    239167                </Configuration>
    240168                <Configuration
     169                        Name="Debug|x64"
     170                        OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
     171                        IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
     172                        ConfigurationType="1"
     173                        CharacterSet="2"
     174                        >
     175                        <Tool
     176                                Name="VCPreBuildEventTool"
     177                        />
     178                        <Tool
     179                                Name="VCCustomBuildTool"
     180                        />
     181                        <Tool
     182                                Name="VCXMLDataGeneratorTool"
     183                        />
     184                        <Tool
     185                                Name="VCWebServiceProxyGeneratorTool"
     186                        />
     187                        <Tool
     188                                Name="VCMIDLTool"
     189                                TargetEnvironment="3"
     190                        />
     191                        <Tool
     192                                Name="VCCLCompilerTool"
     193                                Optimization="0"
     194                                AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
     195                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
     196                                MinimalRebuild="true"
     197                                BasicRuntimeChecks="3"
     198                                RuntimeLibrary="1"
     199                                WarningLevel="3"
     200                                DebugInformationFormat="3"
     201                        />
     202                        <Tool
     203                                Name="VCManagedResourceCompilerTool"
     204                        />
     205                        <Tool
     206                                Name="VCResourceCompilerTool"
     207                        />
     208                        <Tool
     209                                Name="VCPreLinkEventTool"
     210                        />
     211                        <Tool
     212                                Name="VCLinkerTool"
     213                                LinkIncremental="2"
     214                                GenerateDebugInformation="true"
     215                                SubSystem="1"
     216                                TargetMachine="17"
     217                        />
     218                        <Tool
     219                                Name="VCALinkTool"
     220                        />
     221                        <Tool
     222                                Name="VCManifestTool"
     223                        />
     224                        <Tool
     225                                Name="VCXDCMakeTool"
     226                        />
     227                        <Tool
     228                                Name="VCBscMakeTool"
     229                        />
     230                        <Tool
     231                                Name="VCFxCopTool"
     232                        />
     233                        <Tool
     234                                Name="VCAppVerifierTool"
     235                        />
     236                        <Tool
     237                                Name="VCPostBuildEventTool"
     238                        />
     239                </Configuration>
     240                <Configuration
    241241                        Name="Release|x64"
    242242                        OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
  • branches/HTM-DEV-0.3-dev2/build/vc9/TLibCommon_vc9.vcproj

    r324 r476  
    22<VisualStudioProject
    33        ProjectType="Visual C++"
    4         Version="9,00"
     4        Version="9.00"
    55        Name="TLibCommon"
    66        ProjectGUID="{78018D78-F890-47E3-A0B7-09D273F0B11D}"
     
    8282                </Configuration>
    8383                <Configuration
    84                         Name="Debug|x64"
    85                         OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
    86                         IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
    87                         ConfigurationType="4"
    88                         CharacterSet="2"
    89                         >
    90                         <Tool
    91                                 Name="VCPreBuildEventTool"
    92                         />
    93                         <Tool
    94                                 Name="VCCustomBuildTool"
    95                         />
    96                         <Tool
    97                                 Name="VCXMLDataGeneratorTool"
    98                         />
    99                         <Tool
    100                                 Name="VCWebServiceProxyGeneratorTool"
    101                         />
    102                         <Tool
    103                                 Name="VCMIDLTool"
    104                                 TargetEnvironment="3"
    105                         />
    106                         <Tool
    107                                 Name="VCCLCompilerTool"
    108                                 Optimization="0"
    109                                 AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
    110                                 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
    111                                 MinimalRebuild="true"
    112                                 BasicRuntimeChecks="3"
    113                                 RuntimeLibrary="1"
    114                                 WarningLevel="3"
    115                                 DebugInformationFormat="3"
    116                         />
    117                         <Tool
    118                                 Name="VCManagedResourceCompilerTool"
    119                         />
    120                         <Tool
    121                                 Name="VCResourceCompilerTool"
    122                         />
    123                         <Tool
    124                                 Name="VCPreLinkEventTool"
    125                         />
    126                         <Tool
    127                                 Name="VCLibrarianTool"
    128                         />
    129                         <Tool
    130                                 Name="VCALinkTool"
    131                         />
    132                         <Tool
    133                                 Name="VCXDCMakeTool"
    134                         />
    135                         <Tool
    136                                 Name="VCBscMakeTool"
    137                         />
    138                         <Tool
    139                                 Name="VCFxCopTool"
    140                         />
    141                         <Tool
    142                                 Name="VCPostBuildEventTool"
    143                         />
    144                 </Configuration>
    145                 <Configuration
    14684                        Name="Release|Win32"
    14785                        OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
     
    209147                </Configuration>
    210148                <Configuration
     149                        Name="Debug|x64"
     150                        OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
     151                        IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
     152                        ConfigurationType="4"
     153                        CharacterSet="2"
     154                        >
     155                        <Tool
     156                                Name="VCPreBuildEventTool"
     157                        />
     158                        <Tool
     159                                Name="VCCustomBuildTool"
     160                        />
     161                        <Tool
     162                                Name="VCXMLDataGeneratorTool"
     163                        />
     164                        <Tool
     165                                Name="VCWebServiceProxyGeneratorTool"
     166                        />
     167                        <Tool
     168                                Name="VCMIDLTool"
     169                                TargetEnvironment="3"
     170                        />
     171                        <Tool
     172                                Name="VCCLCompilerTool"
     173                                Optimization="0"
     174                                AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
     175                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
     176                                MinimalRebuild="true"
     177                                BasicRuntimeChecks="3"
     178                                RuntimeLibrary="1"
     179                                WarningLevel="3"
     180                                DebugInformationFormat="3"
     181                        />
     182                        <Tool
     183                                Name="VCManagedResourceCompilerTool"
     184                        />
     185                        <Tool
     186                                Name="VCResourceCompilerTool"
     187                        />
     188                        <Tool
     189                                Name="VCPreLinkEventTool"
     190                        />
     191                        <Tool
     192                                Name="VCLibrarianTool"
     193                        />
     194                        <Tool
     195                                Name="VCALinkTool"
     196                        />
     197                        <Tool
     198                                Name="VCXDCMakeTool"
     199                        />
     200                        <Tool
     201                                Name="VCBscMakeTool"
     202                        />
     203                        <Tool
     204                                Name="VCFxCopTool"
     205                        />
     206                        <Tool
     207                                Name="VCPostBuildEventTool"
     208                        />
     209                </Configuration>
     210                <Configuration
    211211                        Name="Release|x64"
    212212                        OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
     
    312312                        </File>
    313313                        <File
     314                                RelativePath="..\..\source\Lib\TLibCommon\TComDepthMapGenerator.cpp"
     315                                >
     316                        </File>
     317                        <File
    314318                                RelativePath="..\..\source\Lib\TLibCommon\TComInterpolationFilter.cpp"
    315319                                >
     
    438442                        </File>
    439443                        <File
     444                                RelativePath="..\..\source\Lib\TLibCommon\TComDepthMapGenerator.h"
     445                                >
     446                        </File>
     447                        <File
    440448                                RelativePath="..\..\source\Lib\TLibCommon\TComInterpolationFilter.h"
    441449                                >
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/baseCfg_2view+depth.cfg

    r446 r476  
    195195
    196196#========== multiview coding tools ==========
    197 
     197PredDepthMapGen           : 1                                      # generation of prediction depth maps (0:off, 1:using coded motion data, 2:using coded depth maps)
     198MultiviewMvPred           : 7                                      # usage of prediction depth maps (0:off, 1:for interview, 2:for inter, 4:for merge, X:bit-wise combinations)
    198199
    199200#========== depth coding tools ==========
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/baseCfg_2view.cfg

    r446 r476  
    149149RCForceIntraQP                      : 0                # Rate control: force intra QP to be equal to initial QP
    150150
     151#========== multiview coding tools ==========
     152PredDepthMapGen           : 1                                      # generation of prediction depth maps (0:off, 1:using coded motion data, 2:using coded depth maps)
     153MultiviewMvPred           : 7                                      # usage of prediction depth maps (0:off, 1:for interview, 2:for inter, 4:for merge, X:bit-wise combinations)
     154
    151155### DO NOT ADD ANYTHING BELOW THIS LINE ###
    152156### DO NOT DELETE THE EMPTY LINE BELOW ###
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r446 r476  
    194194
    195195#========== multiview coding tools ==========
     196PredDepthMapGen           : 1                                      # generation of prediction depth maps (0:off, 1:using coded motion data, 2:using coded depth maps)
     197MultiviewMvPred           : 7                                      # usage of prediction depth maps (0:off, 1:for interview, 2:for inter, 4:for merge, X:bit-wise combinations)
    196198
    197199
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/baseCfg_3view.cfg

    r446 r476  
    159159RCForceIntraQP                      : 0                # Rate control: force intra QP to be equal to initial QP
    160160
     161#========== multiview coding tools ==========
     162PredDepthMapGen           : 1                                      # generation of prediction depth maps (0:off, 1:using coded motion data, 2:using coded depth maps)
     163MultiviewMvPred           : 7                                      # usage of prediction depth maps (0:off, 1:for interview, 2:for inter, 4:for merge, X:bit-wise combinations)
    161164### DO NOT ADD ANYTHING BELOW THIS LINE ###
    162165### DO NOT DELETE THE EMPTY LINE BELOW ###
  • branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.cpp

    r456 r476  
    641641    m_tDecTop[ decIdx ] =  new TDecTop;
    642642    m_tDecTop[ decIdx ]->create();
     643#if H_3D_IV_MERGE
     644    m_tDecTop[ decIdx ]->init(this );
     645#else
    643646    m_tDecTop[ decIdx ]->init( );
     647#endif
    644648    m_tDecTop[ decIdx ]->setLayerId( layerId );
    645649    m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
     
    678682}
    679683#endif
     684#if H_3D_IV_MERGE
     685TComPic* TAppDecTop::xGetPicFromView( Int viewIdx, Int poc, Bool isDepth )
     686{
     687  assert( ( viewIdx >= 0 ) );
     688
     689  TComList<TComPic*>* apcListPic = m_tDecTop[ (isDepth ? 1 : 0) + viewIdx * 2 ]->getListPic();
     690
     691  TComPic* pcPic = NULL;
     692  for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ )
     693  {
     694    if( (*it)->getPOC() == poc )
     695    {
     696      pcPic = *it;
     697      break;
     698    }
     699  }
     700  return pcPic;
     701}
     702#endif
     703
    680704//! \}
  • branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.h

    r446 r476  
    4949#include "TAppDecCfg.h"
    5050
     51#if H_3D_IV_MERGE
     52#include "TLibCommon/TComDepthMapGenerator.h"
     53#endif
    5154//! \ingroup TAppDecoder
    5255//! \{
     
    7376    // for output control
    7477  Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
     78
     79#if H_3D_IV_MERGE
     80  Int  m_fcoViewDepthId;
     81  Char m_fcoOrder[MAX_VIEW_NUM*2];
     82#endif
    7583#if H_MV
    7684  Int                             m_pocLastDisplay      [ MAX_NUM_LAYERS ]; ///< last POC in display order
     
    8290  FILE*                           m_pScaleOffsetFile;
    8391  CamParsCollector                m_cCamParsCollector;
     92#if H_3D_IV_MERGE
     93  TComVPSAccess                   m_cVPSAccess;
     94  TComSPSAccess                   m_cSPSAccess;
     95  TComAUPicAccess                 m_cAUPicAccess;
     96#endif
    8497#endif
    8598public:
     
    90103  Void  destroy           (); ///< destroy internal members
    91104  Void  decode            (); ///< main decoding function
    92  
     105
     106#if H_3D_IV_MERGE
     107  TDecTop* getTDecTop     ( Int viewIdx, Bool isDepth );
     108  TComPic*              getPicFromView     ( Int viewIdx, Int poc, bool isDepth ) { return xGetPicFromView( viewIdx, poc, isDepth ); }
     109#endif
     110
     111#if H_3D_IV_MERGE
     112  TComVPSAccess*    getVPSAccess  () { return &m_cVPSAccess;   }
     113  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
     114  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
     115  TDecTop*          getDecTop0    () { return m_tDecTop[0]; }
     116#endif
     117
    93118protected:
    94119  Void  xCreateDecLib     (); ///< create internal classes
    95120  Void  xDestroyDecLib    (); ///< destroy internal classes
    96121  Void  xInitDecLib       (); ///< initialize decoder class
    97  
     122
     123#if H_3D_IV_MERGE
     124  TComPic* xGetPicFromView( Int viewIdx, Int poc, Bool isDepth );
     125#endif
     126
    98127#if H_MV
    99128  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
     
    104133  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file
    105134#endif
     135
    106136  Bool  isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
    107137};
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.cpp

    r446 r476  
    717717
    718718#endif //HHI_VSO
     719
     720#if H_3D_IV_MERGE
     721  ("PredDepthMapGen",  m_uiPredDepthMapGeneration, (UInt)0, "generation of prediction depth maps for motion data prediction" )
     722  ("MultiviewMvPred",  m_uiMultiviewMvPredMode,    (UInt)0, "usage of predicted depth maps" )
     723#endif
    719724#endif //H_3D
    720725  ;
     
    14391444  xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(),   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
    14401445  xConfirmPara    ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5,       "CodedCamParsPrecision must be in range of 0..5" );
     1446#if H_3D_IV_MERGE
     1447  xConfirmPara    ( m_uiPredDepthMapGeneration > 2,                                   "PredDepthMapGen must be less than or equal to 2" );
     1448  xConfirmPara    ( m_uiMultiviewMvPredMode > 7,                                      "MultiviewMvPred must be less than or equal to 7" ); 
     1449  xConfirmPara    ( m_uiMultiviewMvPredMode > 0 && m_uiPredDepthMapGeneration == 0 ,  "MultiviewMvPred > 0 requires PredDepthMapGen > 0" );
     1450#endif
    14411451#if H_3D_VSO
    14421452    if( m_bUseVSO )
     
    22782288  printf("WVSO:%d ", m_bUseWVSO ); 
    22792289#endif
     2290#if H_3D_IV_MERGE
     2291  printf("MultiviewMvPred:%d", m_uiMultiviewMvPredMode);
     2292#endif
    22802293  printf("\n\n"); 
    22812294
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.h

    r446 r476  
    381381  TAppComCamPara m_cCameraData;
    382382  Int       m_iCodedCamParPrecision;                          ///< precision for coding of camera parameters
     383#if H_3D_IV_MERGE
     384  UInt      m_uiMultiviewMvPredMode;   
     385  UInt      m_uiPredDepthMapGeneration;
     386#endif
    383387#if H_3D_VSO
    384388  Char*     m_pchVSOConfig;
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.cpp

    r446 r476  
    128128    m_frameRcvd                 .push_back(0);
    129129    m_acTEncTopList             .push_back(new TEncTop);
     130#if H_3D_IV_MERGE
     131//    m_acTEncDepthTopList        .push_back(new TEncTop);
     132#endif
    130133    m_acTVideoIOYuvInputFileList.push_back(new TVideoIOYuv);
    131134    m_acTVideoIOYuvReconFileList.push_back(new TVideoIOYuv);
    132135    m_picYuvRec                 .push_back(new TComList<TComPicYuv*>) ;
    133 
     136#if H_3D_IV_MERGE
     137    //m_acTEncDepthTopList[iViewIdx]->setFrameRate                    ( m_iFrameRate );
     138    //m_acTEncDepthTopList[iViewIdx]->setFrameSkip                    ( m_FrameSkip );
     139    //m_acTEncDepthTopList[iViewIdx]->setSourceWidth                  ( m_iSourceWidth );
     140    //m_acTEncDepthTopList[iViewIdx]->setSourceHeight                 ( m_iSourceHeight );
     141    //m_acTEncDepthTopList[iViewIdx]->setCroppingMode                 ( m_croppingMode );
     142    //m_acTEncDepthTopList[iViewIdx]->setCropLeft                     ( m_cropLeft );
     143    //m_acTEncDepthTopList[iViewIdx]->setCropRight                    ( m_cropRight );
     144    //m_acTEncDepthTopList[iViewIdx]->setCropTop                      ( m_cropTop );
     145    //m_acTEncDepthTopList[iViewIdx]->setCropBottom                   ( m_cropBottom );
     146    //m_acTEncDepthTopList[iViewIdx]->setFrameToBeEncoded             ( m_iFrameToBeEncoded );
     147    //m_acTEncDepthTopList[iViewIdx]->setViewId                       ( iViewIdx );
     148    //m_acTEncDepthTopList[iViewIdx]->setIsDepth                      ( true );
     149
     150    //m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
     151
     152    //m_acTEncDepthTopList[iViewIdx]->setLayerId                      ( layerId );
     153
     154#endif
    134155    m_ivPicLists.push_back( m_acTEncTopList[ layer ]->getListPic()  );
    135156    TEncTop& m_cTEncTop = *m_acTEncTopList[ layer ];  // It is not a member, but this name helps avoiding code duplication !!!
     
    143164    m_cTEncTop.setIsDepth                      ( isDepth );
    144165    //====== Camera Parameters =========
     166#if H_3D_IV_MERGE
     167      //m_acTEncDepthTopList[iViewIdx]->setCamParPrecision              ( 0 );
     168      //m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader          ( false );
     169      //m_acTEncDepthTopList[iViewIdx]->setCodedScale                   ( 0 );
     170      //m_acTEncDepthTopList[iViewIdx]->setCodedOffset                  ( 0 );
     171#endif
    145172    m_cTEncTop.setCameraParameters             ( &m_cCameraData );     
    146173    m_cTEncTop.setCamParPrecision              ( isDepth ? false : m_cCameraData.getCamParsCodedPrecision  () );
     
    166193    m_cTEncTop.setDWeight                      ( isDepth ? m_iDWeight             : 0     );
    167194#endif // H_3D_VSO
     195#if H_3D_IV_MERGE
     196    m_cTEncTop.setMultiviewMvPredMode          ( m_uiMultiviewMvPredMode     );
     197    m_cTEncTop.setPredDepthMapGeneration       ( m_uiPredDepthMapGeneration );
     198#endif
    168199#endif // H_3D
    169200
     
    189220 
    190221  //====== Coding Structure ========
     222#if H_3D_IV_MERGE
     223      //m_acTEncDepthTopList[iViewIdx]->setIntraPeriod                  ( m_iIntraPeriod );
     224      //m_acTEncDepthTopList[iViewIdx]->setDecodingRefreshType          ( m_iDecodingRefreshType );
     225      //m_acTEncDepthTopList[iViewIdx]->setGOPSize                      ( m_iGOPSize );
     226      //m_acTEncDepthTopList[iViewIdx]->setGopList                      ( m_GOPListsMvc[iViewIdx] );
     227      //m_acTEncDepthTopList[iViewIdx]->setExtraRPSs                    ( m_extraRPSs[iViewIdx] );
     228#endif
    191229  m_cTEncTop.setIntraPeriod                  ( m_iIntraPeriod );
    192230  m_cTEncTop.setDecodingRefreshType          ( m_iDecodingRefreshType );
     
    207245    m_cTEncTop.setNumReorderPics             ( m_numReorderPics[i], i );
    208246    m_cTEncTop.setMaxDecPicBuffering         ( m_maxDecPicBuffering[i], i );
    209   }
     247#if H_3D_IV_MERGE
     248        m_acTEncDepthTopList[iViewIdx]->setNumReorderPics             ( m_numReorderPics[iViewIdx][i], i );
     249        m_acTEncDepthTopList[iViewIdx]->setMaxDecPicBuffering         ( m_maxDecPicBuffering[iViewIdx][i], i );
     250#endif
     251  }
     252#if H_3D_IV_MERGE
     253      m_acTEncDepthTopList[iViewIdx]->setQP                           ( m_aiQP[1] );
     254
     255      m_acTEncDepthTopList[iViewIdx]->setTemporalLayerQPOffset        ( m_aiTLayerQPOffset );
     256      m_acTEncDepthTopList[iViewIdx]->setPad                          ( m_aiPad );
     257
     258      m_acTEncDepthTopList[iViewIdx]->setMaxTempLayer                 ( m_maxTempLayer[iViewIdx] );
     259
     260      m_acTEncDepthTopList[iViewIdx]->setDisInter4x4                  ( m_bDisInter4x4);
     261
     262      m_acTEncDepthTopList[iViewIdx]->setUseNSQT( m_enableNSQT );
     263      m_acTEncDepthTopList[iViewIdx]->setUseAMP( m_enableAMP );
     264#endif
    210265#endif
    211266  for( UInt uiLoop = 0; uiLoop < MAX_TLAYER; ++uiLoop )
    212267  {
    213268    m_cTEncTop.setLambdaModifier( uiLoop, m_adLambdaModifier[ uiLoop ] );
     269#if H_3D_IV_MERGE
     270//        m_acTEncDepthTopList[iViewIdx]->setLambdaModifier( uiLoop, m_adLambdaModifier[ uiLoop ] );
     271#endif
    214272  }
    215273#if H_MV
     
    231289 
    232290  //====== Loop/Deblock Filter ========
     291#if H_3D_IV_MERGE
     292      //m_acTEncDepthTopList[iViewIdx]->setLoopFilterDisable            ( m_abLoopFilterDisable[1]   );
     293      //m_acTEncDepthTopList[iViewIdx]->setLoopFilterOffsetInAPS        ( m_loopFilterOffsetInAPS );
     294      //m_acTEncDepthTopList[iViewIdx]->setLoopFilterBetaOffset         ( m_loopFilterBetaOffsetDiv2  );
     295      //m_acTEncDepthTopList[iViewIdx]->setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
     296      //m_acTEncDepthTopList[iViewIdx]->setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
     297#endif
    233298#if H_MV
    234299  m_cTEncTop.setLoopFilterDisable            ( m_bLoopFilterDisable[layer]);
     
    604669  for(Int layer=0; layer<m_numberOfLayers; layer++)
    605670  {
     671#if H_3D_IV_MERGE
     672    m_acTEncTopList[layer]->init(this );
     673#else
    606674    m_acTEncTopList[layer]->init( );
     675#endif
    607676  }
    608677#else
     
    10321101}
    10331102#endif
     1103#if H_3D_IV_MERGE
     1104TComPic* TAppEncTop::xGetPicFromView( Int viewIdx, Int poc, Bool isDepth )
     1105{
     1106  assert( ( viewIdx >= 0 ) && ( viewIdx < m_iNumberOfViews ) );
     1107
     1108  TComList<TComPic*>* apcListPic =  m_acTEncTopList[(isDepth ? 1 : 0) + viewIdx * 2]->getListPic() ;
     1109
     1110 
     1111
     1112  TComPic* pcPic = NULL;
     1113  for(TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++)
     1114  {
     1115    if( (*it)->getPOC() == poc )
     1116    {
     1117      pcPic = *it ;
     1118      break ;
     1119    }
     1120  }
     1121
     1122  return pcPic;
     1123};
     1124#endif
    10341125//! \}
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.h

    r446 r476  
    4848#if H_3D
    4949#include "../../Lib/TLibRenderer/TRenTop.h"
     50#if H_3D_IV_MERGE
     51#include "TLibCommon/TComDepthMapGenerator.h"
     52#endif
    5053#endif
    5154
     
    8992  TRenModel                   m_cRendererModel;   
    9093#endif
     94
     95#if H_3D_IV_MERGE
     96  TComVPSAccess               m_cVPSAccess;
     97  TComSPSAccess               m_cSPSAccess;
     98  TComAUPicAccess             m_cAUPicAccess;
     99#endif
    91100protected:
    92101  // initialization
     
    114123  void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats);
    115124  void printRateSummary();
    116  
     125#if H_3D_IV_MERGE
     126  TComPic* xGetPicFromView( Int viewIdx, Int iPoc, Bool isDepth );
     127#endif
    117128#if H_MV
    118129  Void xSetLayerIds               ( TComVPS& vps ); 
     
    126137 
    127138  Void        encode      ();                               ///< main encoding function
     139#if H_3D_IV_MERGE
     140  TComPic*              getPicFromView     ( Int viewIdx, Int poc, Bool isDepth ) { return xGetPicFromView( viewIdx, poc, isDepth ); }
     141#endif
    128142#if H_MV
    129143  TEncTop*    getTEncTop( UInt layer ) { return  m_acTEncTopList[layer]; }  ///< return pointer to encoder class for specific layer
    130144#else
    131145  TEncTop&    getTEncTop  ()   { return  m_cTEncTop; }      ///< return encoder class pointer reference
     146#endif
     147
     148#if H_3D_IV_MERGE
     149  TComVPSAccess*    getVPSAccess  () { return &m_cVPSAccess;   }
     150  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
     151  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
    132152#endif
    133153};// END CLASS DEFINITION TAppEncTop
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/CommonDef.h

    r447 r476  
    178178}
    179179
     180#if H_3D_IV_MERGE
     181#define ROFVS( exp )          \
     182{                             \
     183  if( !( exp ) )              \
     184{                           \
     185  return;                   \
     186}                           \
     187}
     188
     189#define ROTVS( exp )          \
     190{                             \
     191  if( ( exp ) )               \
     192{                           \
     193  return;                   \
     194}                           \
     195}
     196
     197#define ROTRS( exp, retVal )  \
     198{                             \
     199  if( ( exp ) )               \
     200{                           \
     201  return retVal;            \
     202}                           \
     203}
     204
     205#define ROFRS( exp, retVal )  \
     206{                             \
     207  if( !( exp ) )              \
     208{                           \
     209  return retVal;            \
     210}                           \
     211}
     212#endif
     213
    180214template <typename T>
    181215__inline T gSign(const T& t)
     
    200234// MERGE
    201235#define MRG_MAX_NUM_CANDS           5
    202 
     236#if H_3D_IV_MERGE
     237#define MRG_MAX_NUM_CANDS_MEM       (MRG_MAX_NUM_CANDS+1) // one extra for inter-view motion prediction
     238#endif
    203239// Reference memory management
    204240#define DYN_REF_FREE                0           ///< dynamic free of reference memories
     
    325361#define STD_CAM_PARAMETERS_PRECISION 5        ///< quarter luma sample accuarcy for derived disparities (as default)
    326362
     363#if H_3D_IV_MERGE
     364#define PDM_USE_FOR_IVIEW                 1
     365#define PDM_USE_FOR_INTER                 2
     366#define PDM_USE_FOR_MERGE                 4
     367
     368#define MAX_VIEW_NUM                      10
     369#define PDM_SUBSAMPLING_EXP               2         // subsampling factor is 2^PDM_SUBSAMPLING_EXP
     370#define PDM_SUB_SAMP_EXP_X(Pdm)           ((Pdm)==1?PDM_SUBSAMPLING_EXP:0)
     371#define PDM_SUB_SAMP_EXP_Y(Pdm)           ((Pdm)==1?PDM_SUBSAMPLING_EXP:0)
     372
     373#define PDM_INTERNAL_CALC_BIT_DEPTH       31        // bit depth for internal calculations (32 - 1 for signed values)
     374#define PDM_BITDEPTH_VIRT_DEPTH           15        // bit depth for virtual depth storage (16 - 1 for signed values)
     375#define PDM_LOG2_MAX_ABS_NORMAL_DISPARITY 8         // maximum absolute normal disparity = 256 (for setting accuracy)
     376#define PDM_VIRT_DEPTH_PRECISION          4         // must be greater than or equal to 2 (since MVs are given in quarter-pel units)
     377
     378#define PDM_INTER_CALC_SHIFT              ( PDM_INTERNAL_CALC_BIT_DEPTH - PDM_BITDEPTH_VIRT_DEPTH )         // avoids overflow
     379#define PDM_LOG4_SCALE_DENOMINATOR        ( PDM_LOG2_MAX_ABS_NORMAL_DISPARITY + PDM_VIRT_DEPTH_PRECISION )  // accuracy of scaling factor
     380#define PDM_OFFSET_SHIFT                  ( PDM_LOG2_MAX_ABS_NORMAL_DISPARITY )                             // accuracy of offset
     381
     382#endif
     383
    327384#endif // end of H_3D
    328385//! \}
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp

    r456 r476  
    4040#include "TComPic.h"
    4141
     42#if H_3D_IV_MERGE
     43#include "TComDepthMapGenerator.h"
     44#endif
    4245//! \ingroup TLibCommon
    4346//! \{
     
    24262429{
    24272430  UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx;
     2431#if H_3D_IV_MERGE
     2432  TComMv cZeroMv;
     2433  Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];
     2434#else
    24282435  Bool abCandIsInter[ MRG_MAX_NUM_CANDS ];
     2436#endif
    24292437  for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui )
    24302438  {
    24312439    abCandIsInter[ui] = false;
     2440#if H_3D_IV_MERGE
     2441    pcMvFieldNeighbours[ ( ui << 1 )     ].setMvField(cZeroMv, NOT_VALID);
     2442    pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID);
     2443#else
    24322444    pcMvFieldNeighbours[ ( ui << 1 )     ].setRefIdx(NOT_VALID);
    24332445    pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID);
     2446#endif
    24342447  }
    24352448  numValidMergeCand = getSlice()->getMaxNumMergeCand();
     
    24442457  deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    24452458  deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
     2459
     2460#if H_3D_IV_MERGE
     2461  Bool bNoPdmMerge   = ( m_pcSlice->getSPS()->getViewIndex() == 0 || ( m_pcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) != PDM_USE_FOR_MERGE );
     2462
     2463  //===== add merge with predicted depth maps =====
     2464  TComMv  acPdmMv       [4];
     2465  Int     aiPdmRefIdx   [4] = {-1, -1, -1, -1};
     2466  Bool    bLeftAvai         = false;
     2467  Int     iPosLeftAbove[2]  = {-1, -1};
     2468
     2469  //Notes from QC: DvMCP related variables. 
     2470  //acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false;
     2471
     2472  DisInfo cDisInfo;
     2473
     2474  cDisInfo.bDV = getDvInfo(uiAbsPartIdx).bDV;
     2475  cDisInfo.m_acNBDV = getDvInfo(uiAbsPartIdx).m_acNBDV;
     2476  cDisInfo.m_aVIdxCan = getDvInfo(uiAbsPartIdx).m_aVIdxCan;
     2477
     2478  if( m_pcSlice->getIsDepth())
     2479  {
     2480    UInt uiPartIdxCenter;
     2481    xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter );   
     2482    TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() );
     2483 
     2484    if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) )
     2485    {
     2486      abCandIsInter[iCount] = true;     
     2487      puhInterDirNeighbours[iCount] = pcTextureCU->getInterDir( uiPartIdxCenter );
     2488      if( ( puhInterDirNeighbours[iCount] & 1 ) == 1 )
     2489      {
     2490        pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
     2491       
     2492        TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv();
     2493
     2494        //Notes from MTK: shoud be aligned with " full-pel mv accuracy for depth maps", currently not supported
     2495        //const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
     2496        //cMvPred+=cAdd;
     2497        //cMvPred>>=2;
     2498        //clipMv(cMvPred);
     2499        //pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx());
     2500        if (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0)
     2501        {
     2502          for (Int i=0; i<getSlice()->getNumRefIdx(REF_PIC_LIST_0); i++)
     2503          {
     2504            if (getSlice()->getRefPOC(REF_PIC_LIST_0, i) == getSlice()->getPOC())
     2505            {
     2506              pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,i);
     2507              break;
     2508            }
     2509          }
     2510        }
     2511
     2512      }
     2513     
     2514      if ( getSlice()->isInterB() )
     2515      {
     2516        if( ( puhInterDirNeighbours[iCount] & 2 ) == 2 )
     2517        {
     2518          pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
     2519          TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv();
     2520
     2521          //Notes from MTK: shoud be aligned with " full-pel mv accuracy for depth maps", currently not supported
     2522          //const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
     2523          //cMvPred+=cAdd;
     2524          //cMvPred>>=2;
     2525          //clipMv(cMvPred);
     2526          //pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx());
     2527          if (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0)
     2528          {
     2529            for (Int i=0; i<getSlice()->getNumRefIdx(REF_PIC_LIST_1); i++)
     2530            {
     2531              if (getSlice()->getRefPOC(REF_PIC_LIST_1, i) == getSlice()->getPOC())
     2532              {
     2533                pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,i);
     2534                break;
     2535              }
     2536            }
     2537          }
     2538
     2539        }
     2540      }
     2541
     2542      if (!((pcMvFieldNeighbours[iCount<<1].getRefIdx()<0 && !getSlice()->isInterB())
     2543        || (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0 && pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0 && getSlice()->isInterB())))
     2544      {
     2545        if ( mrgCandIdx == iCount )
     2546        {
     2547          return;
     2548        }
     2549        iCount ++;
     2550      }
     2551      else
     2552      {
     2553        assert(0);
     2554      }
     2555    }
     2556  }
     2557
     2558  Int iPdmDir[2] = {0, 0};
     2559  getUnifiedMvPredCan(uiPUIdx, REF_PIC_LIST_0, 0, aiPdmRefIdx, acPdmMv, &cDisInfo, iPdmDir, true);
     2560  Int iPdmInterDir;
     2561
     2562  if( iPdmDir[0] && !bNoPdmMerge )
     2563  {
     2564    abCandIsInter        [ iCount ] = true;
     2565    puhInterDirNeighbours[ iCount ] = iPdmDir[0];
     2566    iPdmInterDir                    = iPdmDir[0];
     2567
     2568    if( ( iPdmInterDir & 1 ) == 1 )
     2569    {
     2570      pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] );
     2571    }
     2572
     2573    if( ( iPdmInterDir & 2 ) == 2 )
     2574    {
     2575      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] );
     2576    }
     2577
     2578    if ( mrgCandIdx == iCount )
     2579    {
     2580      return;
     2581    }
     2582    iCount ++;
     2583  } 
     2584#endif
     2585
     2586#if !H_3D_IV_MERGE
    24462587#if H_3D_NBDV //Notes from QC: DvMCP related variables. 
    24472588  //acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false;
     
    24612602  //}
    24622603#endif
     2604#endif
     2605
    24632606  //left
    24642607  UInt uiLeftPartIdx = 0;
     
    24802623      pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    24812624    }
     2625
     2626#if H_3D_IV_MERGE
     2627    Bool bRemoveSpa = false; //pruning to inter-view candidates
     2628    Int  iCnloop    = iCount - 1;
     2629    for(; iCnloop >= 0; iCnloop --)
     2630    {
     2631      if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     2632      {
     2633        bRemoveSpa                      = true;
     2634        abCandIsInter        [ iCount ] = false;
     2635
     2636        //reset to the default value for MC
     2637        puhInterDirNeighbours[iCount]   = 0;
     2638        pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
     2639        pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
     2640        break;
     2641      }
     2642    }
     2643    if(!bRemoveSpa)
     2644    {
     2645      bLeftAvai = true;
     2646      iPosLeftAbove[0] = iCount;
     2647
     2648      if ( mrgCandIdx == iCount )
     2649      {
     2650        return;
     2651      }
     2652      iCount ++;
     2653    }
     2654#else
    24822655    if ( mrgCandIdx == iCount )
    24832656    {
     
    24852658    }
    24862659    iCount ++;
     2660#endif
    24872661  }
    24882662 
     
    25112685      pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
    25122686    }
     2687#if H_3D_IV_MERGE
     2688    Bool bRemoveSpa = false; //pruning to inter-view candidates
     2689    Int  iCnloop    = bLeftAvai? (iCount-2): (iCount-1);
     2690    for(; iCnloop >= 0; iCnloop --)
     2691    {
     2692      if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     2693      {
     2694        bRemoveSpa                      = true;
     2695        abCandIsInter        [ iCount ] = false;
     2696
     2697        //reset to the default value for MC
     2698        puhInterDirNeighbours[iCount]   = 0;
     2699
     2700        pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
     2701        pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
     2702        break;
     2703      }
     2704    }
     2705    if(!bRemoveSpa)
     2706    {
     2707      iPosLeftAbove[1] = iCount;
     2708
     2709      if ( mrgCandIdx == iCount )
     2710      {
     2711        return;
     2712      }
     2713      iCount ++;
     2714    }
     2715#else
    25132716    if ( mrgCandIdx == iCount )
    25142717    {
     
    25162719    }
    25172720    iCount ++;
     2721#endif
    25182722  }
    25192723  // early termination
     
    25522756    return;
    25532757  }
     2758
     2759#if H_3D_IV_MERGE
     2760  if(!bNoPdmMerge && iPdmDir[1] )
     2761  {
     2762    assert(iCount < getSlice()->getMaxNumMergeCand());
     2763    abCandIsInter        [ iCount ] = true;
     2764    puhInterDirNeighbours[ iCount ] = iPdmDir[1];
     2765    if( ( iPdmDir[1] & 1 ) == 1 )
     2766    {
     2767      pcMvFieldNeighbours[ iCount<<1    ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] );
     2768    }
     2769    if( ( iPdmDir[1] & 2 ) == 2 )
     2770    {
     2771      pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] );
     2772    }
     2773
     2774    Bool bRemoveSpa = false; //pruning to A1, B1
     2775    for(Int i = 0; i < 2; i ++)
     2776    {
     2777      Int iCnloop = iPosLeftAbove[i];
     2778      if(iCnloop == -1)
     2779        continue;
     2780      if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
     2781      {
     2782        bRemoveSpa                      = true;
     2783        abCandIsInter        [ iCount ] = false;
     2784        //reset to the default value for MC
     2785        puhInterDirNeighbours[iCount]   = 0;
     2786        pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
     2787        pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
     2788        break;
     2789      }     
     2790    }
     2791    if(!bRemoveSpa)
     2792    {
     2793      if ( mrgCandIdx == iCount )
     2794        return;
     2795      iCount ++;
     2796
     2797      // early termination
     2798      if (iCount == getSlice()->getMaxNumMergeCand())
     2799      {
     2800        return;
     2801      }
     2802    }
     2803  }
     2804#endif
    25542805
    25552806  //left bottom
     
    27172968  if ( getSlice()->isInterB())
    27182969  {
     2970#if H_3D_IV_MERGE
     2971    UInt uiPriorityList0[20] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3,    0, 4, 1, 4, 2, 4, 3, 4 };
     2972    UInt uiPriorityList1[20] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2,    4, 0, 4, 1, 4, 2, 4, 3 };
     2973#else
    27192974    UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3};
    27202975    UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2};
     2976#endif
    27212977
    27222978    for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++)
     
    42464502}
    42474503#endif
     4504
     4505#if H_3D_IV_MERGE
     4506Bool TComDataCU::getUnifiedMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge )
     4507{
     4508  TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator();
     4509  ROFRS( pcDepthMapGenerator, false );
     4510  if (pcDepthMapGenerator->getPdmCandidate(this, uiPartIdx, eRefPicList, iRefIdx, paiPdmRefIdx, pacPdmMv, pDInfo, iPdm, bMerge))
     4511    return true;
     4512  return false;
     4513}
     4514#endif
    42484515//! \}
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.h

    r455 r476  
    434434   
    435435#endif
     436
     437#if H_3D_IV_MERGE
     438  Bool          getUnifiedMvPredCan       ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge );
     439#endif
    436440  // -------------------------------------------------------------------------------------------------------------------
    437441  // member functions for accessing partition information
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComMotionInfo.h

    r455 r476  
    105105  Int getHor   () const { return  m_acMv.getHor(); }
    106106  Int getVer   () const { return  m_acMv.getVer(); }
     107
     108#if H_3D_IV_MERGE
     109  Bool operator== ( const TComMvField& rcMv ) const
     110  {
     111    return (m_acMv.getHor()==rcMv.getHor() && m_acMv.getVer()==rcMv.getVer() && m_iRefIdx == rcMv.getRefIdx());
     112  }
     113#endif
    107114};
    108115
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPic.h

    r455 r476  
    141141  Int           getPOC()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getPOC();  }
    142142  TComDataCU*&  getCU( UInt uiCUAddr )  { return  m_apcPicSym->getCU( uiCUAddr ); }
     143#if H_3D_IV_MERGE
     144  TComSlice*    getCurrSlice()        { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx);  }
     145  TComSPS*      getSPS()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getSPS();  }
     146  TComVPS*      getVPS()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getVPS();  }
     147#endif
    143148 
    144149  TComPicYuv*   getPicYuvOrg()        { return  m_apcPicYuv[0]; }
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPicYuv.cpp

    r446 r476  
    7777  m_iCuHeight       = uiMaxCUHeight;
    7878
     79#if H_3D_IV_MERGE
     80  m_iNumCuInWidth   = m_iPicWidth / m_iCuWidth;
     81  m_iNumCuInWidth  += ( m_iPicWidth % m_iCuWidth ) ? 1 : 0;
     82
     83  m_iBaseUnitWidth  = uiMaxCUWidth  >> uiMaxCUDepth;
     84  m_iBaseUnitHeight = uiMaxCUHeight >> uiMaxCUDepth;
     85#endif
     86
    7987  Int numCuInWidth  = m_iPicWidth  / m_iCuWidth  + (m_iPicWidth  % m_iCuWidth  != 0);
    8088  Int numCuInHeight = m_iPicHeight / m_iCuHeight + (m_iPicHeight % m_iCuHeight != 0);
     
    325333
    326334#if H_3D
     335#if H_3D_IV_MERGE
     336Void
     337TComPicYuv::getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY )
     338{
     339  Int iRastPartIdx    = g_auiZscanToRaster[iAbsZorderIdx];
     340  Int iCuSizeInBases  = m_iCuWidth   / m_iBaseUnitWidth;
     341  Int iCuX            = iCuAddr      % m_iNumCuInWidth;
     342  Int iCuY            = iCuAddr      / m_iNumCuInWidth;
     343  Int iBaseX          = iRastPartIdx % iCuSizeInBases;
     344  Int iBaseY          = iRastPartIdx / iCuSizeInBases;
     345  riX                 = iCuX * m_iCuWidth  + iBaseX * m_iBaseUnitWidth;
     346  riY                 = iCuY * m_iCuHeight + iBaseY * m_iBaseUnitHeight;
     347}
     348
     349Void
     350TComPicYuv::getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx )
     351{
     352  Int iCuX            = iX / m_iCuWidth;
     353  Int iCuY            = iY / m_iCuHeight;
     354  Int iBaseX          = ( iX - iCuX * m_iCuWidth  ) / m_iBaseUnitWidth;
     355  Int iBaseY          = ( iY - iCuY * m_iCuHeight ) / m_iBaseUnitHeight;
     356  Int iCuSizeInBases  = m_iCuWidth                  / m_iBaseUnitWidth;
     357  riCuAddr            = iCuY   * m_iNumCuInWidth + iCuX;
     358  Int iRastPartIdx    = iBaseY * iCuSizeInBases  + iBaseX;
     359  riAbsZorderIdx      = g_auiRasterToZscan[ iRastPartIdx ];
     360}
     361#endif
    327362Void TComPicYuv::setLumaTo( Pel pVal )
    328363{
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPicYuv.h

    r446 r476  
    8888  Bool  m_bIsBorderExtended;
    8989 
     90#if H_3D_IV_MERGE
     91  Int   m_iBaseUnitWidth;       ///< Width of Base Unit (with maximum depth or minimum size, m_iCuWidth >> Max. Depth)
     92  Int   m_iBaseUnitHeight;      ///< Height of Base Unit (with maximum depth or minimum size, m_iCuHeight >> Max. Depth)
     93  Int   m_iNumCuInWidth;
     94#endif
    9095protected:
    9196  Void  xExtendPicCompBorder (Pel* piTxt, Int iStride, Int iWidth, Int iHeight, Int iMarginX, Int iMarginY);
     
    165170  Void  setLumaTo    ( Pel pVal ); 
    166171  Void  setChromaTo  ( Pel pVal ); 
     172#if H_3D_IV_MERGE
     173  // sample to block and block to sample conversion
     174  Void  getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY );
     175  Void  getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx );
     176#endif
    167177#endif
    168178};// END CLASS DEFINITION TComPicYuv
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp

    r446 r476  
    6868, m_iSliceQpDeltaCb               ( 0 )
    6969, m_iSliceQpDeltaCr               ( 0 )
     70#if H_3D_IV_MERGE
     71, m_pcTexturePic                  ( NULL )
     72#endif
    7073, m_iDepth                        ( 0 )
    7174, m_bRefenced                     ( false )
     
    171174 
    172175  m_colRefIdx = 0;
     176#if H_3D_IV_MERGE
     177  m_pcTexturePic = NULL;
     178#endif
    173179  initEqualRef();
    174180#if !L0034_COMBINED_LIST_CLEANUP
     
    185191#endif
    186192
     193#if H_3D_IV_MERGE
     194  m_maxNumMergeCand = MRG_MAX_NUM_CANDS_MEM;
     195#else
    187196  m_maxNumMergeCand = MRG_MAX_NUM_CANDS;
     197#endif
    188198
    189199  m_bFinalized=false;
     
    18471857  }
    18481858}
     1859
     1860#if H_3D_IV_MERGE
     1861Void
     1862TComSPS::setPredDepthMapGeneration( UInt uiViewIndex, Bool bIsDepth, UInt uiPdmGenMode, UInt uiPdmMvPredMode)
     1863{
     1864  AOF( m_uiViewIndex == uiViewIndex );
     1865  AOF( m_bDepth   == bIsDepth );
     1866  AOT( ( uiViewIndex == 0 || bIsDepth ) && uiPdmGenMode );
     1867  AOT( uiPdmMvPredMode && uiPdmGenMode == 0 );
     1868
     1869  m_uiPredDepthMapGeneration = uiPdmGenMode;
     1870  m_uiMultiviewMvPredMode    = uiPdmMvPredMode;
     1871}
     1872#endif
     1873
    18491874const Int TComSPS::m_winUnitX[]={1,2,2,1};
    18501875const Int TComSPS::m_winUnitY[]={1,2,1,1};
     
    19131938  ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) );
    19141939
     1940#if H_3D_IV_MERGE 
     1941  m_uiViewIndex           = uiViewIndex;
     1942  m_bDepth                = false;
     1943#endif
     1944
    19151945  if( !m_bCamParInSliceHeader )
    19161946  {
     
    19241954  }
    19251955}
     1956
     1957#if H_3D_IV_MERGE
     1958Void
     1959TComSPS::initCamParaSPSDepth( UInt uiViewIndex)
     1960
     1961  m_uiCamParPrecision     = 0;
     1962  m_bCamParInSliceHeader  = false;
     1963
     1964  ::memset( m_aaiCodedScale,  0x00, sizeof( m_aaiCodedScale  ) );
     1965  ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) );
     1966
     1967  m_uiViewIndex           = uiViewIndex;
     1968  m_bDepth                = true;
     1969}
     1970#endif
    19261971#endif
    19271972
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h

    r446 r476  
    5353#if H_MV
    5454class TComPicLists;
     55#endif
     56
     57#if H_3D_IV_MERGE
     58class TComDepthMapGenerator;
    5559#endif
    5660// ====================================================================================================================
     
    981985  Int         m_aaiCodedScale [2][MAX_NUM_LAYERS];
    982986  Int         m_aaiCodedOffset[2][MAX_NUM_LAYERS];
     987#if H_3D_IV_MERGE
     988  UInt        m_uiMultiviewMvPredMode;
     989  UInt        m_uiPredDepthMapGeneration;
     990
     991  UInt        m_uiViewIndex;
     992  Bool        m_bDepth;
     993  TComDepthMapGenerator* m_pcDepthMapGenerator;
     994#endif
    983995#endif
    984996public:
     
    11241136  Int* getInvCodedScale      ()  { return m_aaiCodedScale [1]; }
    11251137  Int* getInvCodedOffset     ()  { return m_aaiCodedOffset[1]; }
     1138#if H_3D_IV_MERGE
     1139  Void  initCamParaSPSDepth      ( UInt uiViewIndex);
     1140  UInt  getMultiviewMvPredMode   ()          { return m_uiMultiviewMvPredMode;    }
     1141  UInt  getPredDepthMapGeneration()          { return m_uiPredDepthMapGeneration; }
     1142
     1143  UInt  getViewIndex             ()  { return m_uiViewIndex; }
     1144  Bool  isDepth               ()  { return m_bDepth; }
     1145  Void  setDepthMapGenerator( TComDepthMapGenerator* pcDepthMapGenerator )  { m_pcDepthMapGenerator = pcDepthMapGenerator; }
     1146  TComDepthMapGenerator*  getDepthMapGenerator()                                              { return m_pcDepthMapGenerator; }
     1147  Void setPredDepthMapGeneration( UInt uiViewIndex, Bool bIsDepth, UInt uiPdmGenMode = 0, UInt uiPdmMvPredMode = 0);
     1148#endif
    11261149#endif
    11271150};
     
    14141437#endif
    14151438  Bool        m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1];
     1439#if H_3D_IV_MERGE
     1440  TComPic*    m_pcTexturePic;
     1441#endif
    14161442  Int         m_iDepth;
    14171443 
     
    15441570  TComPic*  getRefPic           ( RefPicList e, Int iRefIdx)    { return  m_apcRefPicList[e][iRefIdx];  }
    15451571  Int       getRefPOC           ( RefPicList e, Int iRefIdx)    { return  m_aiRefPOCList[e][iRefIdx];   }
     1572#if H_3D_IV_MERGE
     1573  TComPic*  getTexturePic       () const                        { return  m_pcTexturePic; }
     1574#endif
    15461575  Int       getDepth            ()                              { return  m_iDepth;                     }
    15471576  UInt      getColFromL0Flag    ()                              { return  m_colFromL0Flag;              }
     
    15941623  Void      setRefPic           ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; }
    15951624  Void      setRefPOC           ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; }
     1625#if H_3D_IV_MERGE
     1626  Void      setTexturePic       ( TComPic *pcTexturePic )       { m_pcTexturePic = pcTexturePic; }
     1627#endif
    15961628  Void      setNumRefIdx        ( RefPicList e, Int i )         { m_aiNumRefIdx[e]    = i;      }
    15971629  Void      setPic              ( TComPic* p )                  { m_pcPic             = p;      }
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h

    r456 r476  
    4242//! \{
    4343
    44 
    4544/////////////////////////////////////////////////////////////////////////////////////////
    4645///////////////////////////////// EXTENSION SELECTION /////////////////////////////////// 
     
    8988                                              // QC_CU_NBDV_D0181
    9089                                              // SEC_DEFAULT_DV_D0112
     90
     91#define H_3D_IV_MERGE                     1   // Inter-view motion merge candidate
     92                                              // HHI_INTER_VIEW_MOTION_PRED
     93                                              // SAIT_IMPROV_MOTION_PRED_M24829, improved inter-view motion vector prediction
     94                                              // QC_MRG_CANS_B0048             , JCT3V-B0048, B0086, B0069
     95                                              // OL_DISMV_POS_B0069            , different pos for disparity MV candidate, B0069
     96                                              // MTK_INTERVIEW_MERGE_A0049     , second part
     97                                              // QC_AMVP_MRG_UNIFY_IVCAN_C0051     
     98                                              // TEXTURE MERGING CANDIDATE     , JCT3V-C0137
     99
    91100#endif
    92101
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r446 r476  
    759759    }
    760760#endif // !H_MV
     761
     762#if H_3D_IV_MERGE
     763    READ_FLAG( uiCode, "base_view_flag" );
     764    if( uiCode )
     765    { // baseview SPS -> set standard values
     766      pcSPS->initCamParaSPS         ( 0 );
     767      pcSPS->setPredDepthMapGeneration( 0, false );
     768    }
     769    else
     770    {
     771      READ_FLAG( uiCode, "depth_flag" );
     772      if( uiCode )
     773      {
     774        READ_UVLC( uiCode, "view_idx" );
     775        pcSPS->initCamParaSPSDepth    ( uiCode );
     776        pcSPS->setPredDepthMapGeneration( uiCode, true );
     777      }
     778      else
     779      {
     780        UInt  uiViewIndex;
     781        READ_UVLC( uiViewIndex, "view_idx" );  uiViewIndex++;
     782        UInt uiPredDepthMapGeneration = 0;
     783        UInt uiMultiviewMvPredMode = 0;
     784
     785        READ_UVLC( uiPredDepthMapGeneration, "Pdm_generation" );
     786        if( uiPredDepthMapGeneration )
     787        {
     788          READ_UVLC( uiMultiviewMvPredMode, "multi_view_mv_pred_mode" );
     789        }
     790
     791        pcSPS->setPredDepthMapGeneration( uiViewIndex, false, uiPredDepthMapGeneration, uiMultiviewMvPredMode);
     792
     793      }
     794    }
     795#endif
    761796  }
    762797}
     
    14141449    {
    14151450      READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
     1451#if H_3D_IV_MERGE
     1452      rpcSlice->setMaxNumMergeCand(((rpcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) == PDM_USE_FOR_MERGE ? MRG_MAX_NUM_CANDS_MEM: MRG_MAX_NUM_CANDS) - uiCode);
     1453#else
    14161454      rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode);
     1455#endif
    14171456    }
    14181457
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCu.cpp

    r455 r476  
    320320    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    321321    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
     322    m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx);
     323#if H_3D_IV_MERGE
     324    TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     325    UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     326#else
    322327    TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    323328    UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
     329#endif
    324330    Int numValidMergeCand = 0;
    325331    for( UInt ui = 0; ui < m_ppcCU[uiDepth]->getSlice()->getMaxNumMergeCand(); ++ui )
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp

    r324 r476  
    156156  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
    157157
     158#if H_3D_IV_MERGE
     159  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     160  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     161#else
    158162  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    159163  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
     164#endif
    160165
    161166  for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
     
    168173  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    169174  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
     175#if H_3D_IV_MERGE
     176  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
     177#endif
    170178  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
    171179  {
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.cpp

    r455 r476  
    8484                   TComLoopFilter*         pcLoopFilter,
    8585                   TComSampleAdaptiveOffset* pcSAO
     86#if H_3D_IV_MERGE
     87                    ,TComDepthMapGenerator*  pcDepthMapGenerator
     88#endif
    8689                   )
    8790{
     
    9396  m_pcLoopFilter          = pcLoopFilter;
    9497  m_pcSAO  = pcSAO;
     98#if H_3D_IV_MERGE
     99  m_pcDepthMapGenerator   = pcDepthMapGenerator;
     100#endif
    95101}
    96102
     
    152158    m_LFCrossSliceBoundaryFlag.push_back( pcSlice->getLFCrossSliceBoundaryFlag());
    153159  }
     160
     161#if H_3D_IV_MERGE
     162  if( uiStartCUAddr == 0 )
     163  {
     164    m_pcDepthMapGenerator->initViewComponent( rpcPic );
     165  }
     166#endif
     167
    154168#if H_3D_NBDV
    155169  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.
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.h

    r324 r476  
    5151#include "TLibCommon/TComSampleAdaptiveOffset.h"
    5252
     53#if H_3D_IV_MERGE
     54#include "TLibCommon/TComDepthMapGenerator.h"
     55#endif
     56
    5357#include "TDecEntropy.h"
    5458#include "TDecSlice.h"
     
    7983  TComLoopFilter*       m_pcLoopFilter;
    8084 
     85#if H_3D_IV_MERGE
     86  TComDepthMapGenerator*  m_pcDepthMapGenerator;
     87#endif
     88
    8189  TComSampleAdaptiveOffset*     m_pcSAO;
    8290  Double                m_dDecTime;
     
    98106                 TComLoopFilter*         pcLoopFilter,
    99107                 TComSampleAdaptiveOffset* pcSAO
     108#if H_3D_IV_MERGE
     109                 ,TComDepthMapGenerator* pcDepthMapGenerator
     110#endif
    100111                 );
    101112  Void  create  ();
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp

    r446 r476  
    3737
    3838#include "NALread.h"
     39#if H_3D_IV_MERGE
     40#include "../../App/TAppDecoder/TAppDecTop.h"
     41#endif
    3942#include "TDecTop.h"
    4043
     
    389392}
    390393
     394#if H_3D_IV_MERGE
     395Void TDecTop::init(TAppDecTop* pcTAppDecTop)
     396#else
    391397Void TDecTop::init()
     398#endif
    392399{
    393400  // initialize ROM
     
    395402  initROM();
    396403#endif
    397   m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO);
     404  m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO
     405#if H_3D_IV_MERGE
     406    , &m_cDepthMapGenerator
     407#endif
     408    );
    398409  m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder );
    399410  m_cEntropyDecoder.init(&m_cPrediction);
     411
     412#if H_3D_IV_MERGE
     413  m_tAppDecTop = pcTAppDecTop;
     414  m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getVPSAccess(), m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() );
     415#endif
    400416}
    401417
     
    754770
    755771    m_cSliceDecoder.create();
     772#if H_3D_IV_MERGE
     773    UInt uiPdm = ( m_apcSlicePilot->getSPS()->getViewIndex() ? m_apcSlicePilot->getSPS()->getPredDepthMapGeneration() : m_tAppDecTop->getSPSAccess()->getPdm() );
     774    m_cDepthMapGenerator.create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(uiPdm), PDM_SUB_SAMP_EXP_Y(uiPdm) );
     775    TComDepthMapGenerator* pcDMG0 = m_tAppDecTop->getDecTop0()->getDepthMapGenerator();
     776    if( m_apcSlicePilot->getSPS()->getViewIndex() == 1 && ( pcDMG0->getSubSampExpX() != PDM_SUB_SAMP_EXP_X(uiPdm) || pcDMG0->getSubSampExpY() != PDM_SUB_SAMP_EXP_Y(uiPdm) ) )
     777    {
     778      pcDMG0->create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(uiPdm), PDM_SUB_SAMP_EXP_Y(uiPdm) );
     779    }
     780#endif
    756781  }
    757782  else
     
    893918#endif
    894919
     920#endif
     921
     922#if H_3D_IV_MERGE
     923    TComPic * const pcTexturePic = m_isDepth ? m_tAppDecTop->getPicFromView(  m_viewIndex, pcSlice->getPOC(), false ) : NULL;
     924    assert( !m_isDepth || pcTexturePic != NULL );
     925    pcSlice->setTexturePic( pcTexturePic );
    895926#endif
    896927    // For generalized B
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.h

    r446 r476  
    4545#include "TLibCommon/TComTrQuant.h"
    4646#include "TLibCommon/SEI.h"
     47#if H_3D_IV_MERGE
     48#include "TLibCommon/TComDepthMapGenerator.h"
     49#endif
    4750
    4851#include "TDecGop.h"
     
    222225  Bool                    m_isDepth;
    223226  CamParsCollector*       m_pcCamParsCollector;
     227#if H_3D_IV_MERGE
     228  TComDepthMapGenerator   m_cDepthMapGenerator;
     229  TAppDecTop*             m_tAppDecTop;
     230#endif
    224231#endif
    225232#endif
     
    234241  void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); }
    235242
     243#if H_3D_IV_MERGE
     244  Void  init(TAppDecTop* pcTAppDecTop);
     245#else
    236246  Void  init();
     247#endif
    237248#if H_MV 
    238249  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
     
    265276  Bool                    getIsDepth            ()               { return m_isDepth;    }
    266277  Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
     278#if H_3D_IV_MERGE
     279  TComDepthMapGenerator*  getDepthMapGenerator  () { return &m_cDepthMapGenerator; }
     280#endif
    267281#endif
    268282#endif
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp

    r446 r476  
    581581  WRITE_FLAG( 0, "sps_extension_flag" );
    582582#endif
     583
     584#if H_3D_IV_MERGE
     585  if( pcSPS->getViewIndex() || pcSPS->isDepth() )
     586  {
     587    WRITE_FLAG( 0, "base_view_flag" );
     588    if( pcSPS->isDepth() )
     589    {
     590      WRITE_FLAG( 1, "depth_flag" );
     591      WRITE_UVLC( pcSPS->getViewIndex(), "view_idx" );
     592    }
     593    else
     594    {
     595      WRITE_FLAG( 0, "depth_flag" );
     596      WRITE_UVLC( pcSPS->getViewIndex() - 1, "view_idx_minus1" );
     597      WRITE_UVLC( pcSPS->getPredDepthMapGeneration(), "Pdm_generation" );
     598      if( pcSPS->getPredDepthMapGeneration() )
     599      {
     600        WRITE_UVLC( pcSPS->getMultiviewMvPredMode(), "multi_view_mv_pred_mode" );
     601      }
     602    }
     603  }
     604  else
     605  {
     606    WRITE_FLAG( 1, "base_view_flag" );   
     607  }
     608#endif
    583609}
    584610
     
    10711097      xCodePredWeightTable( pcSlice );
    10721098    }
     1099#if H_3D_IV_MERGE
     1100    assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS_MEM);
     1101#else
    10731102    assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS);
     1103#endif
    10741104    if (!pcSlice->isIntra())
    10751105    {
     1106#if H_3D_IV_MERGE
     1107      WRITE_UVLC(((pcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) == PDM_USE_FOR_MERGE? MRG_MAX_NUM_CANDS_MEM: MRG_MAX_NUM_CANDS) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
     1108#else
    10761109      WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
     1110#endif
    10771111    }
    10781112    Int iCode = pcSlice->getSliceQp() - ( pcSlice->getPPS()->getPicInitQPMinus26() + 26 );
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCfg.h

    r446 r476  
    375375  TAppComCamPara* m_cameraParameters;
    376376 
     377#if H_3D_IV_MERGE
     378  UInt      m_uiPredDepthMapGeneration;
     379  UInt      m_uiMultiviewMvPredMode;
     380#endif
    377381#if H_3D_VSO
    378382  //====== View Synthesis Optimization ======
     
    926930  Void      setDispCoeff                    ( Double  d )   { m_dDispCoeff  = d; }
    927931#endif // H_3D_VSO
     932#if H_3D_IV_MERGE
     933  Void      setMultiviewMvPredMode              (UInt ui)   { m_uiMultiviewMvPredMode = ui;}
     934  Void      setPredDepthMapGeneration       ( UInt  u )      { m_uiPredDepthMapGeneration   = u; } 
     935
     936  UInt      getMultiviewMvPredMode          ()              { return m_uiMultiviewMvPredMode;}
     937#endif
    928938#endif // H_3D
    929939};
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCu.cpp

    r455 r476  
    12591259{
    12601260  assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE );
     1261#if H_3D_IV_MERGE
     1262  TComMvField  cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     1263  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     1264#else
    12611265  TComMvField  cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    12621266  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
     1267#endif
    12631268  Int numValidMergeCand = 0;
    12641269
     
    12841289  rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
    12851290
     1291#if H_3D_IV_MERGE
     1292  Int mergeCandBuffer[MRG_MAX_NUM_CANDS_MEM];
     1293#else
    12861294  Int mergeCandBuffer[MRG_MAX_NUM_CANDS];
     1295#endif
    12871296  for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui )
    12881297  {
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp

    r455 r476  
    4949#include <time.h>
    5050#include <math.h>
    51 
     51#if H_3D_IV_MERGE
     52#include "../../App/TAppEncoder/TAppEncTop.h"
     53#endif
    5254using namespace std;
    5355//! \ingroup TLibEncoder
     
    107109  m_viewIndex  =   0;
    108110  m_isDepth = false;
     111#if H_3D_IV_MERGE
     112  m_pcDepthMapGenerator = NULL;
     113#endif
    109114#endif
    110115#endif
     
    155160  m_viewIndex            = pcTEncTop->getViewIndex();
    156161  m_isDepth              = pcTEncTop->getIsDepth();
     162#if H_3D_IV_MERGE
     163  m_pcDepthMapGenerator  = pcTEncTop->getDepthMapGenerator();
     164#endif
    157165#endif
    158166#endif
     
    674682#endif
    675683
     684#if H_3D_IV_MERGE
     685    TAppEncTop* tAppEncTop = m_pcEncTop->getEncTop();
     686    TComPic * const pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( getViewIndex(), pcSlice->getPOC(), false ) : NULL;
     687    assert( !m_pcEncTop->getIsDepth() || pcTexturePic != NULL );
     688    pcSlice->setTexturePic( pcTexturePic );
     689#endif
    676690    //  Slice info. refinement
    677691#if H_MV
     
    10281042    m_storedStartCUAddrForEncodingSliceSegment.push_back(nextCUAddr);
    10291043    startCUAddrSliceSegmentIdx++;
     1044
     1045#if H_3D_IV_MERGE
     1046    m_pcDepthMapGenerator->initViewComponent( pcPic );
     1047#endif
     1048
    10301049#if H_3D_NBDV
    10311050      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.
     
    24782497#if ADAPTIVE_QP_SELECTION
    24792498#if H_MV
    2480   printf("Layer %3d   POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits",
     2499  printf("Layer %3d   POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d  bits",
    24812500    pcSlice->getLayerId(),
    24822501    pcSlice->getPOC(),
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.h

    r446 r476  
    5959#include <vector>
    6060
     61#if H_3D_IV_MERGE
     62#include "TLibCommon/TComDepthMapGenerator.h"
     63#endif
    6164//! \ingroup TLibEncoder
    6265//! \{
     
    107110  Int                     m_viewIndex;
    108111  Bool                    m_isDepth;
     112
     113#if H_3D_IV_MERGE
     114  TComDepthMapGenerator*  m_pcDepthMapGenerator;
     115#endif
     116
    109117#endif
    110118#endif
     
    166174 
    167175  TComList<TComPic*>*   getListPic()      { return m_pcListPic; }
    168  
     176#if H_3D_IV_MERGE
     177  TEncTop* getEncTop() { return m_pcEncTop; }
     178#endif
    169179#if !H_MV
    170180  Void  printOutSummary      ( UInt uiNumAllPicCoded );
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSearch.cpp

    r456 r476  
    33153315#endif
    33163316
     3317#if H_3D_IV_MERGE
     3318  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     3319  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     3320#else
    33173321  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    33183322  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
     3323#endif
    33193324  Int numValidMergeCand = 0 ;
    33203325
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.cpp

    r446 r476  
    529529  rpcSlice->setSliceSegmentMode     ( m_pcCfg->getSliceSegmentMode()     );
    530530  rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
     531#if H_3D_IV_MERGE
     532  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()   + ((rpcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) ? 1:0)      );
     533#else
    531534  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
     535#endif
    532536  xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() );
    533537}
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp

    r446 r476  
    119119#endif
    120120  m_cLoopFilter.        create( g_uiMaxCUDepth );
    121  
     121
     122#if H_3D_IV_MERGE
     123  m_cDepthMapGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(m_uiPredDepthMapGeneration), PDM_SUB_SAMP_EXP_Y(m_uiPredDepthMapGeneration) );
     124#endif
     125
    122126#if RATE_CONTROL_LAMBDA_DOMAIN
    123127  if ( m_RCEnableRateControl )
     
    225229  m_cLoopFilter.        destroy();
    226230  m_cRateCtrl.          destroy();
     231
     232#if H_3D_IV_MERGE
     233  m_cDepthMapGenerator. destroy();
     234#endif
    227235  // SBAC RD
    228236  if( m_bUseSBACRD )
     
    284292}
    285293
     294#if H_3D_IV_MERGE
     295Void TEncTop::init( TAppEncTop* pcTAppEncTop)
     296#else
    286297Void TEncTop::init()
     298#endif
    287299{
    288300  // initialize SPS
     
    306318  m_cCuEncoder.   init( this );
    307319 
     320#if H_3D_IV_MERGE
     321  m_pcTAppEncTop = pcTAppEncTop;
     322  m_cDepthMapGenerator.init( (TComPrediction*)this->getPredSearch(), m_pcTAppEncTop->getVPSAccess(), m_pcTAppEncTop->getSPSAccess(), m_pcTAppEncTop->getAUPicAccess() );
     323#endif
     324
    308325  // initialize transform & quantization class
    309326  m_pcCavlcCoder = getCavlcCoder();
     
    658675  {
    659676    m_cSPS.initCamParaSPS           ( m_viewIndex, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
    660   }
     677#if H_3D_IV_MERGE
     678    if( m_viewIndex )
     679    {
     680      m_cSPS.setPredDepthMapGeneration( m_viewIndex, false, m_uiPredDepthMapGeneration, m_uiMultiviewMvPredMode);
     681    }
     682    else
     683    {
     684      m_cSPS.setPredDepthMapGeneration( m_viewIndex, false );
     685    }
     686#endif
     687  }
     688#if H_3D_IV_MERGE
     689  else
     690  {
     691    m_cSPS.initCamParaSPSDepth           ( m_viewIndex);
     692    m_cSPS.setPredDepthMapGeneration( m_viewIndex, true );
     693  }
     694#endif
    661695#endif
    662696}
     
    13001334}
    13011335#endif
     1336
     1337
    13021338//! \}
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.h

    r446 r476  
    5757#include "TEncPreanalyzer.h"
    5858#include "TEncRateCtrl.h"
     59
     60#if H_3D_IV_MERGE
     61#include "TLibCommon/TComDepthMapGenerator.h"
     62#endif
    5963//! \ingroup TLibEncoder
    6064//! \{
     
    6367// Class definition
    6468// ====================================================================================================================
     69
     70#if H_3D_IV_MERGE
     71class TAppEncTop;
     72#endif
    6573
    6674/// encoder class
     
    96104  TEncSlice               m_cSliceEncoder;                ///< slice encoder
    97105  TEncCu                  m_cCuEncoder;                   ///< CU encoder
     106
     107#if H_3D_IV_MERGE
     108  TComDepthMapGenerator   m_cDepthMapGenerator;           ///< depth map generator
     109#endif
     110
    98111  // SPS
    99112  TComSPS                 m_cSPS;                         ///< SPS
     
    119132  TEncBinCABAC*           m_pcRDGoOnBinCodersCABAC;        ///< going on bin coder CABAC for RD stage per substream
    120133
     134#if H_3D_IV_MERGE 
     135  TAppEncTop*             m_pcTAppEncTop;
     136#endif
    121137  // quality control
    122138  TEncPreanalyzer         m_cPreanalyzer;                 ///< image characteristics analyzer for TM5-step3-like adaptive QP
     
    145161  Void      create          ();
    146162  Void      destroy         ();
     163#if H_3D_IV_MERGE
     164  Void      init            ( TAppEncTop* pcTAppEncTop );
     165#else
    147166  Void      init            ();
     167#endif
    148168#if H_MV 
    149169  TComPicLists* getIvPicLists() { return m_ivPicLists; }
     
    185205  TEncSbac*               getRDGoOnSbacCoders   () { return  m_pcRDGoOnSbacCoders;   }
    186206  TEncRateCtrl*           getRateCtrl           () { return &m_cRateCtrl;             }
     207#if H_3D_IV_MERGE
     208  TAppEncTop*             getEncTop             () { return m_pcTAppEncTop; }
     209#endif
    187210  TComSPS*                getSPS                () { return  &m_cSPS;                 }
    188211  TComPPS*                getPPS                () { return  &m_cPPS;                 }
     
    205228  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    206229#endif
     230#if H_3D_IV_MERGE
     231  TComDepthMapGenerator*  getDepthMapGenerator  () { return  &m_cDepthMapGenerator;   }
     232#endif
    207233  // -------------------------------------------------------------------------------------------------------------------
    208234  // encoder function
Note: See TracChangeset for help on using the changeset viewer.