Index: /trunk/HTM.xcodeproj/project.pbxproj
===================================================================
--- /trunk/HTM.xcodeproj/project.pbxproj	(revision 77)
+++ /trunk/HTM.xcodeproj/project.pbxproj	(revision 77)
@@ -0,0 +1,1837 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXAggregateTarget section */
+		78C9B17C14DAD3E800989162 /* Package */ = {
+			isa = PBXAggregateTarget;
+			buildConfigurationList = 78C9B17F14DAD3E800989162 /* Build configuration list for PBXAggregateTarget "Package" */;
+			buildPhases = (
+			);
+			dependencies = (
+				7885899D15664EAA00982C12 /* PBXTargetDependency */,
+				78C9B18214DAD3F100989162 /* PBXTargetDependency */,
+				78C9B18414DAD3F100989162 /* PBXTargetDependency */,
+				78C9B18614DAD3F100989162 /* PBXTargetDependency */,
+			);
+			name = Package;
+			productName = Package;
+		};
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+		78C593B5158721A1004401C5 /* ContextModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5931D158720BB004401C5 /* ContextModel.cpp */; };
+		78C593B6158721A1004401C5 /* ContextModel3DBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5931F158720BB004401C5 /* ContextModel3DBuffer.cpp */; };
+		78C593B7158721A1004401C5 /* TComAdaptiveLoopFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59324158720BB004401C5 /* TComAdaptiveLoopFilter.cpp */; };
+		78C593B8158721A1004401C5 /* TComBitStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59327158720BB004401C5 /* TComBitStream.cpp */; };
+		78C593B9158721A1004401C5 /* TComCABACTables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59329158720BB004401C5 /* TComCABACTables.cpp */; };
+		78C593BA158721A1004401C5 /* TComDataCU.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5932B158720BB004401C5 /* TComDataCU.cpp */; };
+		78C593BB158721A1004401C5 /* TComDepthMapGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5932D158720BB004401C5 /* TComDepthMapGenerator.cpp */; };
+		78C593BC158721A1004401C5 /* TComInterpolationFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5932F158720BB004401C5 /* TComInterpolationFilter.cpp */; };
+		78C593BD158721A1004401C5 /* TComLoopFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59332158720BB004401C5 /* TComLoopFilter.cpp */; };
+		78C593BE158721A1004401C5 /* TComMotionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59334158720BB004401C5 /* TComMotionInfo.cpp */; };
+		78C593BF158721A1004401C5 /* TComPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59337158720BB004401C5 /* TComPattern.cpp */; };
+		78C593C0158721A1004401C5 /* TComPic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59339158720BB004401C5 /* TComPic.cpp */; };
+		78C593C1158721A1004401C5 /* TComPicSym.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5933B158720BB004401C5 /* TComPicSym.cpp */; };
+		78C593C2158721A1004401C5 /* TComPicYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5933D158720BB004401C5 /* TComPicYuv.cpp */; };
+		78C593C3158721A1004401C5 /* TComPicYuvMD5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5933F158720BB004401C5 /* TComPicYuvMD5.cpp */; };
+		78C593C4158721A1004401C5 /* TComPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59340158720BB004401C5 /* TComPrediction.cpp */; };
+		78C593C5158721A1004401C5 /* TComRdCost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59342158720BB004401C5 /* TComRdCost.cpp */; };
+		78C593C6158721A1004401C5 /* TComRdCostWeightPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59344158720BB004401C5 /* TComRdCostWeightPrediction.cpp */; };
+		78C593C7158721A1004401C5 /* TComResidualGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59346158720BB004401C5 /* TComResidualGenerator.cpp */; };
+		78C593C8158721A1004401C5 /* TComRom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59348158720BB004401C5 /* TComRom.cpp */; };
+		78C593C9158721A1004401C5 /* TComSampleAdaptiveOffset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5934A158720BB004401C5 /* TComSampleAdaptiveOffset.cpp */; };
+		78C593CA158721A1004401C5 /* TComSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5934C158720BB004401C5 /* TComSlice.cpp */; };
+		78C593CB158721A1004401C5 /* TComTrQuant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5934E158720BB004401C5 /* TComTrQuant.cpp */; };
+		78C593CC158721A1004401C5 /* TComWedgelet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59350158720BB004401C5 /* TComWedgelet.cpp */; };
+		78C593CD158721A1004401C5 /* TComWeightPrediction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59352158720BB004401C5 /* TComWeightPrediction.cpp */; };
+		78C593CE158721A1004401C5 /* TComYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59354158720BB004401C5 /* TComYuv.cpp */; };
+		78C593CF158721AD004401C5 /* program_options_lite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59316158720BB004401C5 /* program_options_lite.cpp */; };
+		78C593D0158721AD004401C5 /* TAppComCamPara.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59318158720BB004401C5 /* TAppComCamPara.cpp */; };
+		78C593D1158721BB004401C5 /* AnnexBread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59358158720BB004401C5 /* AnnexBread.cpp */; };
+		78C593D2158721BB004401C5 /* NALread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5935A158720BB004401C5 /* NALread.cpp */; };
+		78C593D3158721BB004401C5 /* SEIread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5935C158720BB004401C5 /* SEIread.cpp */; };
+		78C593D4158721BB004401C5 /* TDecBinCoderCABAC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5935F158720BB004401C5 /* TDecBinCoderCABAC.cpp */; };
+		78C593D5158721BB004401C5 /* TDecCAVLC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59361158720BB004401C5 /* TDecCAVLC.cpp */; };
+		78C593D6158721BB004401C5 /* TDecCu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59363158720BB004401C5 /* TDecCu.cpp */; };
+		78C593D7158721BB004401C5 /* TDecEntropy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59365158720BB004401C5 /* TDecEntropy.cpp */; };
+		78C593D8158721BB004401C5 /* TDecGop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59367158720BB004401C5 /* TDecGop.cpp */; };
+		78C593D9158721BB004401C5 /* TDecSbac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59369158720BB004401C5 /* TDecSbac.cpp */; };
+		78C593DA158721BB004401C5 /* TDecSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5936B158720BB004401C5 /* TDecSlice.cpp */; };
+		78C593DB158721BB004401C5 /* TDecTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5936D158720BB004401C5 /* TDecTop.cpp */; };
+		78C593DC158721CE004401C5 /* NALwrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59371158720BB004401C5 /* NALwrite.cpp */; };
+		78C593DD158721CE004401C5 /* SEIwrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59373158720BB004401C5 /* SEIwrite.cpp */; };
+		78C593DE158721CE004401C5 /* TEncAdaptiveLoopFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59375158720BB004401C5 /* TEncAdaptiveLoopFilter.cpp */; };
+		78C593DF158721CE004401C5 /* TEncBinCoderCABAC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59379158720BB004401C5 /* TEncBinCoderCABAC.cpp */; };
+		78C593E0158721CE004401C5 /* TEncBinCoderCABACCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5937B158720BB004401C5 /* TEncBinCoderCABACCounter.cpp */; };
+		78C593E1158721CE004401C5 /* TEncCavlc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5937D158720BB004401C5 /* TEncCavlc.cpp */; };
+		78C593E2158721CE004401C5 /* TEncCu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59380158720BB004401C5 /* TEncCu.cpp */; };
+		78C593E3158721CE004401C5 /* TEncEntropy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59382158720BB004401C5 /* TEncEntropy.cpp */; };
+		78C593E4158721CE004401C5 /* TEncGOP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59384158720BB004401C5 /* TEncGOP.cpp */; };
+		78C593E5158721CE004401C5 /* TEncPic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59386158720BB004401C5 /* TEncPic.cpp */; };
+		78C593E6158721CE004401C5 /* TEncPreanalyzer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59388158720BB004401C5 /* TEncPreanalyzer.cpp */; };
+		78C593E7158721CE004401C5 /* TEncSampleAdaptiveOffset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5938A158720BB004401C5 /* TEncSampleAdaptiveOffset.cpp */; };
+		78C593E8158721CE004401C5 /* TEncSbac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5938C158720BB004401C5 /* TEncSbac.cpp */; };
+		78C593E9158721CE004401C5 /* TEncSearch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5938E158720BB004401C5 /* TEncSearch.cpp */; };
+		78C593EA158721CE004401C5 /* TEncSlice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59390158720BB004401C5 /* TEncSlice.cpp */; };
+		78C593EB158721CE004401C5 /* TEncTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59392158720BB004401C5 /* TEncTop.cpp */; };
+		78C593EC158721CE004401C5 /* WeightPredAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59394158720BB004401C5 /* WeightPredAnalysis.cpp */; };
+		78C593ED158721D7004401C5 /* TExtrTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C59397158720BB004401C5 /* TExtrTop.cpp */; };
+		78C593EE158721E2004401C5 /* TRenFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5939A158720BB004401C5 /* TRenFilter.cpp */; };
+		78C593EF158721E2004401C5 /* TRenImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5939C158720BB004401C5 /* TRenImage.cpp */; };
+		78C593F0158721E2004401C5 /* TRenImagePlane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C5939E158720BB004401C5 /* TRenImagePlane.cpp */; };
+		78C593F1158721E2004401C5 /* TRenInterpFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C593A0158720BB004401C5 /* TRenInterpFilter.cpp */; };
+		78C593F2158721E2004401C5 /* TRenModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C593A2158720BB004401C5 /* TRenModel.cpp */; };
+		78C593F3158721E2004401C5 /* TRenModSetupStrParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C593A4158720BB004401C5 /* TRenModSetupStrParser.cpp */; };
+		78C593F4158721E2004401C5 /* TRenSingleModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C593A6158720BB004401C5 /* TRenSingleModel.cpp */; };
+		78C593F5158721E2004401C5 /* TRenTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C593A8158720BB004401C5 /* TRenTop.cpp */; };
+		78C593F6158721E9004401C5 /* TVideoIOYuv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C593AB158720BB004401C5 /* TVideoIOYuv.cpp */; };
+		78C593F7158721F1004401C5 /* encmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592EF158720BB004401C5 /* encmain.cpp */; };
+		78C593F8158721F1004401C5 /* TAppEncCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592F0158720BB004401C5 /* TAppEncCfg.cpp */; };
+		78C593F9158721F1004401C5 /* TAppEncTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592F2158720BB004401C5 /* TAppEncTop.cpp */; };
+		78C593FA158721F6004401C5 /* decmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592E9158720BB004401C5 /* decmain.cpp */; };
+		78C593FB158721F6004401C5 /* TAppDecCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592EA158720BB004401C5 /* TAppDecCfg.cpp */; };
+		78C593FC158721F6004401C5 /* TAppDecTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592EC158720BB004401C5 /* TAppDecTop.cpp */; };
+		78C593FD158721FC004401C5 /* extrmain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592F5158720BB004401C5 /* extrmain.cpp */; };
+		78C593FE158721FC004401C5 /* TAppExtrCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592F6158720BB004401C5 /* TAppExtrCfg.cpp */; };
+		78C593FF158721FC004401C5 /* TAppExtrTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592F8158720BB004401C5 /* TAppExtrTop.cpp */; };
+		78C5940015872201004401C5 /* RendererMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592FB158720BB004401C5 /* RendererMain.cpp */; };
+		78C5940115872201004401C5 /* TAppRendererCfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592FC158720BB004401C5 /* TAppRendererCfg.cpp */; };
+		78C5940215872201004401C5 /* TAppRendererTop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 78C592FE158720BB004401C5 /* TAppRendererTop.cpp */; };
+		78C5940D15872233004401C5 /* libTLibCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767959411AD61BB00421804 /* libTLibCommon.a */; };
+		78C5940E15872233004401C5 /* libTLibEncoder.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767961911AD626F00421804 /* libTLibEncoder.a */; };
+		78C5940F15872233004401C5 /* libTLibVideoIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767964B11AD629200421804 /* libTLibVideoIO.a */; };
+		78C5941015872233004401C5 /* libTLibRenderer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7894E36714890D9A009259F4 /* libTLibRenderer.a */; };
+		78C5941115872233004401C5 /* libTAppCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C593B415872152004401C5 /* libTAppCommon.a */; };
+		78C594121587228A004401C5 /* libmd5.c in Sources */ = {isa = PBXBuildFile; fileRef = 78C59312158720BB004401C5 /* libmd5.c */; };
+		78C5941B158722B7004401C5 /* libTLibCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767959411AD61BB00421804 /* libTLibCommon.a */; };
+		78C5941C158722BA004401C5 /* libTLibDecoder.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 676795F411AD621A00421804 /* libTLibDecoder.a */; };
+		78C5941D158722BC004401C5 /* libTLibVideoIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767964B11AD629200421804 /* libTLibVideoIO.a */; };
+		78C5941E158722C0004401C5 /* libTAppCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C593B415872152004401C5 /* libTAppCommon.a */; };
+		78C5941F158722D4004401C5 /* libmd5.c in Sources */ = {isa = PBXBuildFile; fileRef = 78C59312158720BB004401C5 /* libmd5.c */; };
+		78C59428158722F2004401C5 /* libTLibCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767959411AD61BB00421804 /* libTLibCommon.a */; };
+		78C59429158722F6004401C5 /* libTLibVideoIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767964B11AD629200421804 /* libTLibVideoIO.a */; };
+		78C5942A158722FA004401C5 /* libTAppCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C593B415872152004401C5 /* libTAppCommon.a */; };
+		78C5942B15872300004401C5 /* libTLibRenderer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7894E36714890D9A009259F4 /* libTLibRenderer.a */; };
+		78C5943A1587234F004401C5 /* libTLibCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767959411AD61BB00421804 /* libTLibCommon.a */; };
+		78C5943B15872352004401C5 /* libTLibDecoder.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 676795F411AD621A00421804 /* libTLibDecoder.a */; };
+		78C5943C15872356004401C5 /* libTLibVideoIO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6767964B11AD629200421804 /* libTLibVideoIO.a */; };
+		78C5943D1587235B004401C5 /* libTAppCommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C593B415872152004401C5 /* libTAppCommon.a */; };
+		78C5943E1587235E004401C5 /* libTLibExtractor.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7885897D15664E3D00982C12 /* libTLibExtractor.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		7885899C15664EAA00982C12 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 7885897F15664E6A00982C12;
+			remoteInfo = TAppExtractor;
+		};
+		78C5940315872220004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767959311AD61BB00421804;
+			remoteInfo = TLibCommon;
+		};
+		78C5940515872221004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767961811AD626F00421804;
+			remoteInfo = TLibEncoder;
+		};
+		78C5940715872222004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767964A11AD629200421804;
+			remoteInfo = TLibVideoIO;
+		};
+		78C5940915872226004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 7894E34D14890D9A009259F4;
+			remoteInfo = TLibRenderer;
+		};
+		78C5940B15872228004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 78C593AD15872152004401C5;
+			remoteInfo = TAppCommon;
+		};
+		78C59413158722AE004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767959311AD61BB00421804;
+			remoteInfo = TLibCommon;
+		};
+		78C59415158722AF004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 676795F311AD621A00421804;
+			remoteInfo = TLibDecoder;
+		};
+		78C59417158722B1004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767964A11AD629200421804;
+			remoteInfo = TLibVideoIO;
+		};
+		78C59419158722B3004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 78C593AD15872152004401C5;
+			remoteInfo = TAppCommon;
+		};
+		78C59420158722E9004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767959311AD61BB00421804;
+			remoteInfo = TLibCommon;
+		};
+		78C59422158722EB004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 7894E34D14890D9A009259F4;
+			remoteInfo = TLibRenderer;
+		};
+		78C59424158722ED004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 78C593AD15872152004401C5;
+			remoteInfo = TAppCommon;
+		};
+		78C59426158722EF004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767964A11AD629200421804;
+			remoteInfo = TLibVideoIO;
+		};
+		78C5943015872345004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 7885896E15664E3D00982C12;
+			remoteInfo = TLibExtractor;
+		};
+		78C5943215872347004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767959311AD61BB00421804;
+			remoteInfo = TLibCommon;
+		};
+		78C5943415872348004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 676795F311AD621A00421804;
+			remoteInfo = TLibDecoder;
+		};
+		78C594361587234A004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767964A11AD629200421804;
+			remoteInfo = TLibVideoIO;
+		};
+		78C594381587234B004401C5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 78C593AD15872152004401C5;
+			remoteInfo = TAppCommon;
+		};
+		78C9B18114DAD3F100989162 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6767966911AD635600421804;
+			remoteInfo = TAppEncoder;
+		};
+		78C9B18314DAD3F100989162 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 6782E0DD11AD691A00E8FFB8;
+			remoteInfo = TAppDecoder;
+		};
+		78C9B18514DAD3F100989162 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 7894E37514890DD2009259F4;
+			remoteInfo = TAppRenderer;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		6767959411AD61BB00421804 /* libTLibCommon.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTLibCommon.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		676795F411AD621A00421804 /* libTLibDecoder.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTLibDecoder.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		6767961911AD626F00421804 /* libTLibEncoder.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTLibEncoder.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		6767964B11AD629200421804 /* libTLibVideoIO.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTLibVideoIO.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		6767966A11AD635600421804 /* TAppEncoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TAppEncoder; sourceTree = BUILT_PRODUCTS_DIR; };
+		6782E0DE11AD691A00E8FFB8 /* TAppDecoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TAppDecoder; sourceTree = BUILT_PRODUCTS_DIR; };
+		7885897D15664E3D00982C12 /* libTLibExtractor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTLibExtractor.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		7885899415664E6A00982C12 /* TAppExtractor */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TAppExtractor; sourceTree = BUILT_PRODUCTS_DIR; };
+		7894E36714890D9A009259F4 /* libTLibRenderer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTLibRenderer.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		7894E38A14890DD2009259F4 /* TAppRenderer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TAppRenderer; sourceTree = BUILT_PRODUCTS_DIR; };
+		78C592E9158720BB004401C5 /* decmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = decmain.cpp; sourceTree = "<group>"; };
+		78C592EA158720BB004401C5 /* TAppDecCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppDecCfg.cpp; sourceTree = "<group>"; };
+		78C592EB158720BB004401C5 /* TAppDecCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppDecCfg.h; sourceTree = "<group>"; };
+		78C592EC158720BB004401C5 /* TAppDecTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppDecTop.cpp; sourceTree = "<group>"; };
+		78C592ED158720BB004401C5 /* TAppDecTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppDecTop.h; sourceTree = "<group>"; };
+		78C592EF158720BB004401C5 /* encmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = encmain.cpp; sourceTree = "<group>"; };
+		78C592F0158720BB004401C5 /* TAppEncCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppEncCfg.cpp; sourceTree = "<group>"; };
+		78C592F1158720BB004401C5 /* TAppEncCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppEncCfg.h; sourceTree = "<group>"; };
+		78C592F2158720BB004401C5 /* TAppEncTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppEncTop.cpp; sourceTree = "<group>"; };
+		78C592F3158720BB004401C5 /* TAppEncTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppEncTop.h; sourceTree = "<group>"; };
+		78C592F5158720BB004401C5 /* extrmain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = extrmain.cpp; sourceTree = "<group>"; };
+		78C592F6158720BB004401C5 /* TAppExtrCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppExtrCfg.cpp; sourceTree = "<group>"; };
+		78C592F7158720BB004401C5 /* TAppExtrCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppExtrCfg.h; sourceTree = "<group>"; };
+		78C592F8158720BB004401C5 /* TAppExtrTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppExtrTop.cpp; sourceTree = "<group>"; };
+		78C592F9158720BB004401C5 /* TAppExtrTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppExtrTop.h; sourceTree = "<group>"; };
+		78C592FB158720BB004401C5 /* RendererMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RendererMain.cpp; sourceTree = "<group>"; };
+		78C592FC158720BB004401C5 /* TAppRendererCfg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppRendererCfg.cpp; sourceTree = "<group>"; };
+		78C592FD158720BB004401C5 /* TAppRendererCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppRendererCfg.h; sourceTree = "<group>"; };
+		78C592FE158720BB004401C5 /* TAppRendererTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppRendererTop.cpp; sourceTree = "<group>"; };
+		78C592FF158720BB004401C5 /* TAppRendererTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppRendererTop.h; sourceTree = "<group>"; };
+		78C59301158720BB004401C5 /* annexBbytecount.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = annexBbytecount.cpp; sourceTree = "<group>"; };
+		78C59303158720BB004401C5 /* encode.shl */ = {isa = PBXFileReference; lastKnownFileType = text; path = encode.shl; sourceTree = "<group>"; };
+		78C59304158720BB004401C5 /* encodeCommand.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = encodeCommand.sh; sourceTree = "<group>"; };
+		78C59305158720BB004401C5 /* ExtractBitrates.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractBitrates.cpp; sourceTree = "<group>"; };
+		78C59306158720BB004401C5 /* ExtractBitrates.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtractBitrates.h; sourceTree = "<group>"; };
+		78C59307158720BB004401C5 /* ExtractBitratesMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ExtractBitratesMain.cpp; sourceTree = "<group>"; };
+		78C59308158720BB004401C5 /* GuessLambdaModifiers.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GuessLambdaModifiers.cpp; sourceTree = "<group>"; };
+		78C59309158720BB004401C5 /* GuessLambdaModifiers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GuessLambdaModifiers.h; sourceTree = "<group>"; };
+		78C5930A158720BB004401C5 /* GuessLambdaModifiersMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GuessLambdaModifiersMain.cpp; sourceTree = "<group>"; };
+		78C5930B158720BB004401C5 /* makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = makefile; sourceTree = "<group>"; };
+		78C5930C158720BB004401C5 /* QuickStartGuide.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = QuickStartGuide.pdf; sourceTree = "<group>"; };
+		78C5930D158720BB004401C5 /* RuntimeError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RuntimeError.h; sourceTree = "<group>"; };
+		78C5930E158720BB004401C5 /* targetBitrates.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = targetBitrates.sh; sourceTree = "<group>"; };
+		78C5930F158720BB004401C5 /* convert_NtoMbit_YCbCr.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = convert_NtoMbit_YCbCr.cpp; sourceTree = "<group>"; };
+		78C59312158720BB004401C5 /* libmd5.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = libmd5.c; sourceTree = "<group>"; };
+		78C59313158720BB004401C5 /* libmd5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libmd5.h; sourceTree = "<group>"; };
+		78C59314158720BB004401C5 /* MD5.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MD5.h; sourceTree = "<group>"; };
+		78C59316158720BB004401C5 /* program_options_lite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = program_options_lite.cpp; sourceTree = "<group>"; };
+		78C59317158720BB004401C5 /* program_options_lite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = program_options_lite.h; sourceTree = "<group>"; };
+		78C59318158720BB004401C5 /* TAppComCamPara.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TAppComCamPara.cpp; sourceTree = "<group>"; };
+		78C59319158720BB004401C5 /* TAppComCamPara.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TAppComCamPara.h; sourceTree = "<group>"; };
+		78C5931B158720BB004401C5 /* AccessUnit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccessUnit.h; sourceTree = "<group>"; };
+		78C5931C158720BB004401C5 /* CommonDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonDef.h; sourceTree = "<group>"; };
+		78C5931D158720BB004401C5 /* ContextModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ContextModel.cpp; sourceTree = "<group>"; };
+		78C5931E158720BB004401C5 /* ContextModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContextModel.h; sourceTree = "<group>"; };
+		78C5931F158720BB004401C5 /* ContextModel3DBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ContextModel3DBuffer.cpp; sourceTree = "<group>"; };
+		78C59320158720BB004401C5 /* ContextModel3DBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContextModel3DBuffer.h; sourceTree = "<group>"; };
+		78C59321158720BB004401C5 /* ContextTables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContextTables.h; sourceTree = "<group>"; };
+		78C59322158720BB004401C5 /* NAL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NAL.h; sourceTree = "<group>"; };
+		78C59323158720BB004401C5 /* SEI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEI.h; sourceTree = "<group>"; };
+		78C59324158720BB004401C5 /* TComAdaptiveLoopFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComAdaptiveLoopFilter.cpp; sourceTree = "<group>"; };
+		78C59325158720BB004401C5 /* TComAdaptiveLoopFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComAdaptiveLoopFilter.h; sourceTree = "<group>"; };
+		78C59326158720BB004401C5 /* TComBitCounter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComBitCounter.h; sourceTree = "<group>"; };
+		78C59327158720BB004401C5 /* TComBitStream.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComBitStream.cpp; sourceTree = "<group>"; };
+		78C59328158720BB004401C5 /* TComBitStream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComBitStream.h; sourceTree = "<group>"; };
+		78C59329158720BB004401C5 /* TComCABACTables.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComCABACTables.cpp; sourceTree = "<group>"; };
+		78C5932A158720BB004401C5 /* TComCABACTables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComCABACTables.h; sourceTree = "<group>"; };
+		78C5932B158720BB004401C5 /* TComDataCU.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComDataCU.cpp; sourceTree = "<group>"; };
+		78C5932C158720BB004401C5 /* TComDataCU.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComDataCU.h; sourceTree = "<group>"; };
+		78C5932D158720BB004401C5 /* TComDepthMapGenerator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComDepthMapGenerator.cpp; sourceTree = "<group>"; };
+		78C5932E158720BB004401C5 /* TComDepthMapGenerator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComDepthMapGenerator.h; sourceTree = "<group>"; };
+		78C5932F158720BB004401C5 /* TComInterpolationFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComInterpolationFilter.cpp; sourceTree = "<group>"; };
+		78C59330158720BB004401C5 /* TComInterpolationFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComInterpolationFilter.h; sourceTree = "<group>"; };
+		78C59331158720BB004401C5 /* TComList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComList.h; sourceTree = "<group>"; };
+		78C59332158720BB004401C5 /* TComLoopFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComLoopFilter.cpp; sourceTree = "<group>"; };
+		78C59333158720BB004401C5 /* TComLoopFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComLoopFilter.h; sourceTree = "<group>"; };
+		78C59334158720BB004401C5 /* TComMotionInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComMotionInfo.cpp; sourceTree = "<group>"; };
+		78C59335158720BB004401C5 /* TComMotionInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComMotionInfo.h; sourceTree = "<group>"; };
+		78C59336158720BB004401C5 /* TComMv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComMv.h; sourceTree = "<group>"; };
+		78C59337158720BB004401C5 /* TComPattern.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPattern.cpp; sourceTree = "<group>"; };
+		78C59338158720BB004401C5 /* TComPattern.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPattern.h; sourceTree = "<group>"; };
+		78C59339158720BB004401C5 /* TComPic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPic.cpp; sourceTree = "<group>"; };
+		78C5933A158720BB004401C5 /* TComPic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPic.h; sourceTree = "<group>"; };
+		78C5933B158720BB004401C5 /* TComPicSym.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicSym.cpp; sourceTree = "<group>"; };
+		78C5933C158720BB004401C5 /* TComPicSym.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPicSym.h; sourceTree = "<group>"; };
+		78C5933D158720BB004401C5 /* TComPicYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicYuv.cpp; sourceTree = "<group>"; };
+		78C5933E158720BB004401C5 /* TComPicYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPicYuv.h; sourceTree = "<group>"; };
+		78C5933F158720BB004401C5 /* TComPicYuvMD5.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPicYuvMD5.cpp; sourceTree = "<group>"; };
+		78C59340158720BB004401C5 /* TComPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComPrediction.cpp; sourceTree = "<group>"; };
+		78C59341158720BB004401C5 /* TComPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComPrediction.h; sourceTree = "<group>"; };
+		78C59342158720BB004401C5 /* TComRdCost.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRdCost.cpp; sourceTree = "<group>"; };
+		78C59343158720BB004401C5 /* TComRdCost.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRdCost.h; sourceTree = "<group>"; };
+		78C59344158720BB004401C5 /* TComRdCostWeightPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRdCostWeightPrediction.cpp; sourceTree = "<group>"; };
+		78C59345158720BB004401C5 /* TComRdCostWeightPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRdCostWeightPrediction.h; sourceTree = "<group>"; };
+		78C59346158720BB004401C5 /* TComResidualGenerator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComResidualGenerator.cpp; sourceTree = "<group>"; };
+		78C59347158720BB004401C5 /* TComResidualGenerator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComResidualGenerator.h; sourceTree = "<group>"; };
+		78C59348158720BB004401C5 /* TComRom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComRom.cpp; sourceTree = "<group>"; };
+		78C59349158720BB004401C5 /* TComRom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComRom.h; sourceTree = "<group>"; };
+		78C5934A158720BB004401C5 /* TComSampleAdaptiveOffset.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComSampleAdaptiveOffset.cpp; sourceTree = "<group>"; };
+		78C5934B158720BB004401C5 /* TComSampleAdaptiveOffset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComSampleAdaptiveOffset.h; sourceTree = "<group>"; };
+		78C5934C158720BB004401C5 /* TComSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComSlice.cpp; sourceTree = "<group>"; };
+		78C5934D158720BB004401C5 /* TComSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComSlice.h; sourceTree = "<group>"; };
+		78C5934E158720BB004401C5 /* TComTrQuant.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComTrQuant.cpp; sourceTree = "<group>"; };
+		78C5934F158720BB004401C5 /* TComTrQuant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComTrQuant.h; sourceTree = "<group>"; };
+		78C59350158720BB004401C5 /* TComWedgelet.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComWedgelet.cpp; sourceTree = "<group>"; };
+		78C59351158720BB004401C5 /* TComWedgelet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComWedgelet.h; sourceTree = "<group>"; };
+		78C59352158720BB004401C5 /* TComWeightPrediction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComWeightPrediction.cpp; sourceTree = "<group>"; };
+		78C59353158720BB004401C5 /* TComWeightPrediction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComWeightPrediction.h; sourceTree = "<group>"; };
+		78C59354158720BB004401C5 /* TComYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TComYuv.cpp; sourceTree = "<group>"; };
+		78C59355158720BB004401C5 /* TComYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TComYuv.h; sourceTree = "<group>"; };
+		78C59356158720BB004401C5 /* TypeDef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TypeDef.h; sourceTree = "<group>"; };
+		78C59358158720BB004401C5 /* AnnexBread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AnnexBread.cpp; sourceTree = "<group>"; };
+		78C59359158720BB004401C5 /* AnnexBread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnnexBread.h; sourceTree = "<group>"; };
+		78C5935A158720BB004401C5 /* NALread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NALread.cpp; sourceTree = "<group>"; };
+		78C5935B158720BB004401C5 /* NALread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NALread.h; sourceTree = "<group>"; };
+		78C5935C158720BB004401C5 /* SEIread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEIread.cpp; sourceTree = "<group>"; };
+		78C5935D158720BB004401C5 /* SEIread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEIread.h; sourceTree = "<group>"; };
+		78C5935E158720BB004401C5 /* TDecBinCoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecBinCoder.h; sourceTree = "<group>"; };
+		78C5935F158720BB004401C5 /* TDecBinCoderCABAC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecBinCoderCABAC.cpp; sourceTree = "<group>"; };
+		78C59360158720BB004401C5 /* TDecBinCoderCABAC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecBinCoderCABAC.h; sourceTree = "<group>"; };
+		78C59361158720BB004401C5 /* TDecCAVLC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecCAVLC.cpp; sourceTree = "<group>"; };
+		78C59362158720BB004401C5 /* TDecCAVLC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecCAVLC.h; sourceTree = "<group>"; };
+		78C59363158720BB004401C5 /* TDecCu.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecCu.cpp; sourceTree = "<group>"; };
+		78C59364158720BB004401C5 /* TDecCu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecCu.h; sourceTree = "<group>"; };
+		78C59365158720BB004401C5 /* TDecEntropy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecEntropy.cpp; sourceTree = "<group>"; };
+		78C59366158720BB004401C5 /* TDecEntropy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecEntropy.h; sourceTree = "<group>"; };
+		78C59367158720BB004401C5 /* TDecGop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecGop.cpp; sourceTree = "<group>"; };
+		78C59368158720BB004401C5 /* TDecGop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecGop.h; sourceTree = "<group>"; };
+		78C59369158720BB004401C5 /* TDecSbac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecSbac.cpp; sourceTree = "<group>"; };
+		78C5936A158720BB004401C5 /* TDecSbac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecSbac.h; sourceTree = "<group>"; };
+		78C5936B158720BB004401C5 /* TDecSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecSlice.cpp; sourceTree = "<group>"; };
+		78C5936C158720BB004401C5 /* TDecSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecSlice.h; sourceTree = "<group>"; };
+		78C5936D158720BB004401C5 /* TDecTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TDecTop.cpp; sourceTree = "<group>"; };
+		78C5936E158720BB004401C5 /* TDecTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDecTop.h; sourceTree = "<group>"; };
+		78C59370158720BB004401C5 /* AnnexBwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnnexBwrite.h; sourceTree = "<group>"; };
+		78C59371158720BB004401C5 /* NALwrite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = NALwrite.cpp; sourceTree = "<group>"; };
+		78C59372158720BB004401C5 /* NALwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NALwrite.h; sourceTree = "<group>"; };
+		78C59373158720BB004401C5 /* SEIwrite.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SEIwrite.cpp; sourceTree = "<group>"; };
+		78C59374158720BB004401C5 /* SEIwrite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SEIwrite.h; sourceTree = "<group>"; };
+		78C59375158720BB004401C5 /* TEncAdaptiveLoopFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncAdaptiveLoopFilter.cpp; sourceTree = "<group>"; };
+		78C59376158720BB004401C5 /* TEncAdaptiveLoopFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncAdaptiveLoopFilter.h; sourceTree = "<group>"; };
+		78C59377158720BB004401C5 /* TEncAnalyze.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncAnalyze.h; sourceTree = "<group>"; };
+		78C59378158720BB004401C5 /* TEncBinCoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoder.h; sourceTree = "<group>"; };
+		78C59379158720BB004401C5 /* TEncBinCoderCABAC.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncBinCoderCABAC.cpp; sourceTree = "<group>"; };
+		78C5937A158720BB004401C5 /* TEncBinCoderCABAC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoderCABAC.h; sourceTree = "<group>"; };
+		78C5937B158720BB004401C5 /* TEncBinCoderCABACCounter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncBinCoderCABACCounter.cpp; sourceTree = "<group>"; };
+		78C5937C158720BB004401C5 /* TEncBinCoderCABACCounter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncBinCoderCABACCounter.h; sourceTree = "<group>"; };
+		78C5937D158720BB004401C5 /* TEncCavlc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncCavlc.cpp; sourceTree = "<group>"; };
+		78C5937E158720BB004401C5 /* TEncCavlc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCavlc.h; sourceTree = "<group>"; };
+		78C5937F158720BB004401C5 /* TEncCfg.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCfg.h; sourceTree = "<group>"; };
+		78C59380158720BB004401C5 /* TEncCu.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncCu.cpp; sourceTree = "<group>"; };
+		78C59381158720BB004401C5 /* TEncCu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncCu.h; sourceTree = "<group>"; };
+		78C59382158720BB004401C5 /* TEncEntropy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncEntropy.cpp; sourceTree = "<group>"; };
+		78C59383158720BB004401C5 /* TEncEntropy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncEntropy.h; sourceTree = "<group>"; };
+		78C59384158720BB004401C5 /* TEncGOP.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncGOP.cpp; sourceTree = "<group>"; };
+		78C59385158720BB004401C5 /* TEncGOP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncGOP.h; sourceTree = "<group>"; };
+		78C59386158720BB004401C5 /* TEncPic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncPic.cpp; sourceTree = "<group>"; };
+		78C59387158720BB004401C5 /* TEncPic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncPic.h; sourceTree = "<group>"; };
+		78C59388158720BB004401C5 /* TEncPreanalyzer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncPreanalyzer.cpp; sourceTree = "<group>"; };
+		78C59389158720BB004401C5 /* TEncPreanalyzer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncPreanalyzer.h; sourceTree = "<group>"; };
+		78C5938A158720BB004401C5 /* TEncSampleAdaptiveOffset.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSampleAdaptiveOffset.cpp; sourceTree = "<group>"; };
+		78C5938B158720BB004401C5 /* TEncSampleAdaptiveOffset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSampleAdaptiveOffset.h; sourceTree = "<group>"; };
+		78C5938C158720BB004401C5 /* TEncSbac.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSbac.cpp; sourceTree = "<group>"; };
+		78C5938D158720BB004401C5 /* TEncSbac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSbac.h; sourceTree = "<group>"; };
+		78C5938E158720BB004401C5 /* TEncSearch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSearch.cpp; sourceTree = "<group>"; };
+		78C5938F158720BB004401C5 /* TEncSearch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSearch.h; sourceTree = "<group>"; };
+		78C59390158720BB004401C5 /* TEncSlice.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncSlice.cpp; sourceTree = "<group>"; };
+		78C59391158720BB004401C5 /* TEncSlice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncSlice.h; sourceTree = "<group>"; };
+		78C59392158720BB004401C5 /* TEncTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TEncTop.cpp; sourceTree = "<group>"; };
+		78C59393158720BB004401C5 /* TEncTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TEncTop.h; sourceTree = "<group>"; };
+		78C59394158720BB004401C5 /* WeightPredAnalysis.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WeightPredAnalysis.cpp; sourceTree = "<group>"; };
+		78C59395158720BB004401C5 /* WeightPredAnalysis.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeightPredAnalysis.h; sourceTree = "<group>"; };
+		78C59397158720BB004401C5 /* TExtrTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TExtrTop.cpp; sourceTree = "<group>"; };
+		78C59398158720BB004401C5 /* TExtrTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TExtrTop.h; sourceTree = "<group>"; };
+		78C5939A158720BB004401C5 /* TRenFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenFilter.cpp; sourceTree = "<group>"; };
+		78C5939B158720BB004401C5 /* TRenFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenFilter.h; sourceTree = "<group>"; };
+		78C5939C158720BB004401C5 /* TRenImage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenImage.cpp; sourceTree = "<group>"; };
+		78C5939D158720BB004401C5 /* TRenImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenImage.h; sourceTree = "<group>"; };
+		78C5939E158720BB004401C5 /* TRenImagePlane.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenImagePlane.cpp; sourceTree = "<group>"; };
+		78C5939F158720BB004401C5 /* TRenImagePlane.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenImagePlane.h; sourceTree = "<group>"; };
+		78C593A0158720BB004401C5 /* TRenInterpFilter.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenInterpFilter.cpp; sourceTree = "<group>"; };
+		78C593A1158720BB004401C5 /* TRenInterpFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenInterpFilter.h; sourceTree = "<group>"; };
+		78C593A2158720BB004401C5 /* TRenModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenModel.cpp; sourceTree = "<group>"; };
+		78C593A3158720BB004401C5 /* TRenModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenModel.h; sourceTree = "<group>"; };
+		78C593A4158720BB004401C5 /* TRenModSetupStrParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenModSetupStrParser.cpp; sourceTree = "<group>"; };
+		78C593A5158720BB004401C5 /* TRenModSetupStrParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenModSetupStrParser.h; sourceTree = "<group>"; };
+		78C593A6158720BB004401C5 /* TRenSingleModel.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenSingleModel.cpp; sourceTree = "<group>"; };
+		78C593A7158720BB004401C5 /* TRenSingleModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenSingleModel.h; sourceTree = "<group>"; };
+		78C593A8158720BB004401C5 /* TRenTop.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TRenTop.cpp; sourceTree = "<group>"; };
+		78C593A9158720BB004401C5 /* TRenTop.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRenTop.h; sourceTree = "<group>"; };
+		78C593AB158720BB004401C5 /* TVideoIOYuv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TVideoIOYuv.cpp; sourceTree = "<group>"; };
+		78C593AC158720BB004401C5 /* TVideoIOYuv.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TVideoIOYuv.h; sourceTree = "<group>"; };
+		78C593B415872152004401C5 /* libTAppCommon.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTAppCommon.a; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		6767959211AD61BB00421804 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		676795F211AD621A00421804 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6767961711AD626F00421804 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6767964911AD629200421804 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6767966811AD635600421804 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C5940D15872233004401C5 /* libTLibCommon.a in Frameworks */,
+				78C5940E15872233004401C5 /* libTLibEncoder.a in Frameworks */,
+				78C5940F15872233004401C5 /* libTLibVideoIO.a in Frameworks */,
+				78C5941015872233004401C5 /* libTLibRenderer.a in Frameworks */,
+				78C5941115872233004401C5 /* libTAppCommon.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6782E0DC11AD691A00E8FFB8 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C5941B158722B7004401C5 /* libTLibCommon.a in Frameworks */,
+				78C5941C158722BA004401C5 /* libTLibDecoder.a in Frameworks */,
+				78C5941E158722C0004401C5 /* libTAppCommon.a in Frameworks */,
+				78C5941D158722BC004401C5 /* libTLibVideoIO.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7885897915664E3D00982C12 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7885898C15664E6A00982C12 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C5943A1587234F004401C5 /* libTLibCommon.a in Frameworks */,
+				78C5943B15872352004401C5 /* libTLibDecoder.a in Frameworks */,
+				78C5943C15872356004401C5 /* libTLibVideoIO.a in Frameworks */,
+				78C5943D1587235B004401C5 /* libTAppCommon.a in Frameworks */,
+				78C5943E1587235E004401C5 /* libTLibExtractor.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7894E36314890D9A009259F4 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7894E38214890DD2009259F4 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C59428158722F2004401C5 /* libTLibCommon.a in Frameworks */,
+				78C59429158722F6004401C5 /* libTLibVideoIO.a in Frameworks */,
+				78C5942A158722FA004401C5 /* libTAppCommon.a in Frameworks */,
+				78C5942B15872300004401C5 /* libTLibRenderer.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		78C593B015872152004401C5 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		08FB7794FE84155DC02AAC07 /* Trinity */ = {
+			isa = PBXGroup;
+			children = (
+				08FB7795FE84155DC02AAC07 /* Source */,
+				1AB674ADFE9D54B511CA2CBB /* Products */,
+			);
+			name = Trinity;
+			sourceTree = "<group>";
+		};
+		08FB7795FE84155DC02AAC07 /* Source */ = {
+			isa = PBXGroup;
+			children = (
+				78C592E7158720BB004401C5 /* App */,
+				78C59310158720BB004401C5 /* Lib */,
+			);
+			indentWidth = 2;
+			name = Source;
+			sourceTree = "<group>";
+			tabWidth = 2;
+		};
+		1AB674ADFE9D54B511CA2CBB /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				6767959411AD61BB00421804 /* libTLibCommon.a */,
+				676795F411AD621A00421804 /* libTLibDecoder.a */,
+				6767961911AD626F00421804 /* libTLibEncoder.a */,
+				6767964B11AD629200421804 /* libTLibVideoIO.a */,
+				6767966A11AD635600421804 /* TAppEncoder */,
+				6782E0DE11AD691A00E8FFB8 /* TAppDecoder */,
+				7894E36714890D9A009259F4 /* libTLibRenderer.a */,
+				7894E38A14890DD2009259F4 /* TAppRenderer */,
+				7885897D15664E3D00982C12 /* libTLibExtractor.a */,
+				7885899415664E6A00982C12 /* TAppExtractor */,
+				78C593B415872152004401C5 /* libTAppCommon.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		78C592E7158720BB004401C5 /* App */ = {
+			isa = PBXGroup;
+			children = (
+				78C592E8158720BB004401C5 /* TAppDecoder */,
+				78C592EE158720BB004401C5 /* TAppEncoder */,
+				78C592F4158720BB004401C5 /* TAppExtractor */,
+				78C592FA158720BB004401C5 /* TAppRenderer */,
+				78C59300158720BB004401C5 /* utils */,
+			);
+			name = App;
+			path = source/App;
+			sourceTree = "<group>";
+		};
+		78C592E8158720BB004401C5 /* TAppDecoder */ = {
+			isa = PBXGroup;
+			children = (
+				78C592E9158720BB004401C5 /* decmain.cpp */,
+				78C592EA158720BB004401C5 /* TAppDecCfg.cpp */,
+				78C592EB158720BB004401C5 /* TAppDecCfg.h */,
+				78C592EC158720BB004401C5 /* TAppDecTop.cpp */,
+				78C592ED158720BB004401C5 /* TAppDecTop.h */,
+			);
+			path = TAppDecoder;
+			sourceTree = "<group>";
+		};
+		78C592EE158720BB004401C5 /* TAppEncoder */ = {
+			isa = PBXGroup;
+			children = (
+				78C592EF158720BB004401C5 /* encmain.cpp */,
+				78C592F0158720BB004401C5 /* TAppEncCfg.cpp */,
+				78C592F1158720BB004401C5 /* TAppEncCfg.h */,
+				78C592F2158720BB004401C5 /* TAppEncTop.cpp */,
+				78C592F3158720BB004401C5 /* TAppEncTop.h */,
+			);
+			path = TAppEncoder;
+			sourceTree = "<group>";
+		};
+		78C592F4158720BB004401C5 /* TAppExtractor */ = {
+			isa = PBXGroup;
+			children = (
+				78C592F5158720BB004401C5 /* extrmain.cpp */,
+				78C592F6158720BB004401C5 /* TAppExtrCfg.cpp */,
+				78C592F7158720BB004401C5 /* TAppExtrCfg.h */,
+				78C592F8158720BB004401C5 /* TAppExtrTop.cpp */,
+				78C592F9158720BB004401C5 /* TAppExtrTop.h */,
+			);
+			path = TAppExtractor;
+			sourceTree = "<group>";
+		};
+		78C592FA158720BB004401C5 /* TAppRenderer */ = {
+			isa = PBXGroup;
+			children = (
+				78C592FB158720BB004401C5 /* RendererMain.cpp */,
+				78C592FC158720BB004401C5 /* TAppRendererCfg.cpp */,
+				78C592FD158720BB004401C5 /* TAppRendererCfg.h */,
+				78C592FE158720BB004401C5 /* TAppRendererTop.cpp */,
+				78C592FF158720BB004401C5 /* TAppRendererTop.h */,
+			);
+			path = TAppRenderer;
+			sourceTree = "<group>";
+		};
+		78C59300158720BB004401C5 /* utils */ = {
+			isa = PBXGroup;
+			children = (
+				78C59301158720BB004401C5 /* annexBbytecount.cpp */,
+				78C59302158720BB004401C5 /* BitrateTargeting */,
+				78C5930F158720BB004401C5 /* convert_NtoMbit_YCbCr.cpp */,
+			);
+			path = utils;
+			sourceTree = "<group>";
+		};
+		78C59302158720BB004401C5 /* BitrateTargeting */ = {
+			isa = PBXGroup;
+			children = (
+				78C59303158720BB004401C5 /* encode.shl */,
+				78C59304158720BB004401C5 /* encodeCommand.sh */,
+				78C59305158720BB004401C5 /* ExtractBitrates.cpp */,
+				78C59306158720BB004401C5 /* ExtractBitrates.h */,
+				78C59307158720BB004401C5 /* ExtractBitratesMain.cpp */,
+				78C59308158720BB004401C5 /* GuessLambdaModifiers.cpp */,
+				78C59309158720BB004401C5 /* GuessLambdaModifiers.h */,
+				78C5930A158720BB004401C5 /* GuessLambdaModifiersMain.cpp */,
+				78C5930B158720BB004401C5 /* makefile */,
+				78C5930C158720BB004401C5 /* QuickStartGuide.pdf */,
+				78C5930D158720BB004401C5 /* RuntimeError.h */,
+				78C5930E158720BB004401C5 /* targetBitrates.sh */,
+			);
+			path = BitrateTargeting;
+			sourceTree = "<group>";
+		};
+		78C59310158720BB004401C5 /* Lib */ = {
+			isa = PBXGroup;
+			children = (
+				78C59311158720BB004401C5 /* libmd5 */,
+				78C59315158720BB004401C5 /* TAppCommon */,
+				78C5931A158720BB004401C5 /* TLibCommon */,
+				78C59357158720BB004401C5 /* TLibDecoder */,
+				78C5936F158720BB004401C5 /* TLibEncoder */,
+				78C59396158720BB004401C5 /* TLibExtractor */,
+				78C59399158720BB004401C5 /* TLibRenderer */,
+				78C593AA158720BB004401C5 /* TLibVideoIO */,
+			);
+			name = Lib;
+			path = source/Lib;
+			sourceTree = "<group>";
+		};
+		78C59311158720BB004401C5 /* libmd5 */ = {
+			isa = PBXGroup;
+			children = (
+				78C59312158720BB004401C5 /* libmd5.c */,
+				78C59313158720BB004401C5 /* libmd5.h */,
+				78C59314158720BB004401C5 /* MD5.h */,
+			);
+			path = libmd5;
+			sourceTree = "<group>";
+		};
+		78C59315158720BB004401C5 /* TAppCommon */ = {
+			isa = PBXGroup;
+			children = (
+				78C59316158720BB004401C5 /* program_options_lite.cpp */,
+				78C59317158720BB004401C5 /* program_options_lite.h */,
+				78C59318158720BB004401C5 /* TAppComCamPara.cpp */,
+				78C59319158720BB004401C5 /* TAppComCamPara.h */,
+			);
+			path = TAppCommon;
+			sourceTree = "<group>";
+		};
+		78C5931A158720BB004401C5 /* TLibCommon */ = {
+			isa = PBXGroup;
+			children = (
+				78C5931B158720BB004401C5 /* AccessUnit.h */,
+				78C5931C158720BB004401C5 /* CommonDef.h */,
+				78C5931D158720BB004401C5 /* ContextModel.cpp */,
+				78C5931E158720BB004401C5 /* ContextModel.h */,
+				78C5931F158720BB004401C5 /* ContextModel3DBuffer.cpp */,
+				78C59320158720BB004401C5 /* ContextModel3DBuffer.h */,
+				78C59321158720BB004401C5 /* ContextTables.h */,
+				78C59322158720BB004401C5 /* NAL.h */,
+				78C59323158720BB004401C5 /* SEI.h */,
+				78C59324158720BB004401C5 /* TComAdaptiveLoopFilter.cpp */,
+				78C59325158720BB004401C5 /* TComAdaptiveLoopFilter.h */,
+				78C59326158720BB004401C5 /* TComBitCounter.h */,
+				78C59327158720BB004401C5 /* TComBitStream.cpp */,
+				78C59328158720BB004401C5 /* TComBitStream.h */,
+				78C59329158720BB004401C5 /* TComCABACTables.cpp */,
+				78C5932A158720BB004401C5 /* TComCABACTables.h */,
+				78C5932B158720BB004401C5 /* TComDataCU.cpp */,
+				78C5932C158720BB004401C5 /* TComDataCU.h */,
+				78C5932D158720BB004401C5 /* TComDepthMapGenerator.cpp */,
+				78C5932E158720BB004401C5 /* TComDepthMapGenerator.h */,
+				78C5932F158720BB004401C5 /* TComInterpolationFilter.cpp */,
+				78C59330158720BB004401C5 /* TComInterpolationFilter.h */,
+				78C59331158720BB004401C5 /* TComList.h */,
+				78C59332158720BB004401C5 /* TComLoopFilter.cpp */,
+				78C59333158720BB004401C5 /* TComLoopFilter.h */,
+				78C59334158720BB004401C5 /* TComMotionInfo.cpp */,
+				78C59335158720BB004401C5 /* TComMotionInfo.h */,
+				78C59336158720BB004401C5 /* TComMv.h */,
+				78C59337158720BB004401C5 /* TComPattern.cpp */,
+				78C59338158720BB004401C5 /* TComPattern.h */,
+				78C59339158720BB004401C5 /* TComPic.cpp */,
+				78C5933A158720BB004401C5 /* TComPic.h */,
+				78C5933B158720BB004401C5 /* TComPicSym.cpp */,
+				78C5933C158720BB004401C5 /* TComPicSym.h */,
+				78C5933D158720BB004401C5 /* TComPicYuv.cpp */,
+				78C5933E158720BB004401C5 /* TComPicYuv.h */,
+				78C5933F158720BB004401C5 /* TComPicYuvMD5.cpp */,
+				78C59340158720BB004401C5 /* TComPrediction.cpp */,
+				78C59341158720BB004401C5 /* TComPrediction.h */,
+				78C59342158720BB004401C5 /* TComRdCost.cpp */,
+				78C59343158720BB004401C5 /* TComRdCost.h */,
+				78C59344158720BB004401C5 /* TComRdCostWeightPrediction.cpp */,
+				78C59345158720BB004401C5 /* TComRdCostWeightPrediction.h */,
+				78C59346158720BB004401C5 /* TComResidualGenerator.cpp */,
+				78C59347158720BB004401C5 /* TComResidualGenerator.h */,
+				78C59348158720BB004401C5 /* TComRom.cpp */,
+				78C59349158720BB004401C5 /* TComRom.h */,
+				78C5934A158720BB004401C5 /* TComSampleAdaptiveOffset.cpp */,
+				78C5934B158720BB004401C5 /* TComSampleAdaptiveOffset.h */,
+				78C5934C158720BB004401C5 /* TComSlice.cpp */,
+				78C5934D158720BB004401C5 /* TComSlice.h */,
+				78C5934E158720BB004401C5 /* TComTrQuant.cpp */,
+				78C5934F158720BB004401C5 /* TComTrQuant.h */,
+				78C59350158720BB004401C5 /* TComWedgelet.cpp */,
+				78C59351158720BB004401C5 /* TComWedgelet.h */,
+				78C59352158720BB004401C5 /* TComWeightPrediction.cpp */,
+				78C59353158720BB004401C5 /* TComWeightPrediction.h */,
+				78C59354158720BB004401C5 /* TComYuv.cpp */,
+				78C59355158720BB004401C5 /* TComYuv.h */,
+				78C59356158720BB004401C5 /* TypeDef.h */,
+			);
+			path = TLibCommon;
+			sourceTree = "<group>";
+		};
+		78C59357158720BB004401C5 /* TLibDecoder */ = {
+			isa = PBXGroup;
+			children = (
+				78C59358158720BB004401C5 /* AnnexBread.cpp */,
+				78C59359158720BB004401C5 /* AnnexBread.h */,
+				78C5935A158720BB004401C5 /* NALread.cpp */,
+				78C5935B158720BB004401C5 /* NALread.h */,
+				78C5935C158720BB004401C5 /* SEIread.cpp */,
+				78C5935D158720BB004401C5 /* SEIread.h */,
+				78C5935E158720BB004401C5 /* TDecBinCoder.h */,
+				78C5935F158720BB004401C5 /* TDecBinCoderCABAC.cpp */,
+				78C59360158720BB004401C5 /* TDecBinCoderCABAC.h */,
+				78C59361158720BB004401C5 /* TDecCAVLC.cpp */,
+				78C59362158720BB004401C5 /* TDecCAVLC.h */,
+				78C59363158720BB004401C5 /* TDecCu.cpp */,
+				78C59364158720BB004401C5 /* TDecCu.h */,
+				78C59365158720BB004401C5 /* TDecEntropy.cpp */,
+				78C59366158720BB004401C5 /* TDecEntropy.h */,
+				78C59367158720BB004401C5 /* TDecGop.cpp */,
+				78C59368158720BB004401C5 /* TDecGop.h */,
+				78C59369158720BB004401C5 /* TDecSbac.cpp */,
+				78C5936A158720BB004401C5 /* TDecSbac.h */,
+				78C5936B158720BB004401C5 /* TDecSlice.cpp */,
+				78C5936C158720BB004401C5 /* TDecSlice.h */,
+				78C5936D158720BB004401C5 /* TDecTop.cpp */,
+				78C5936E158720BB004401C5 /* TDecTop.h */,
+			);
+			path = TLibDecoder;
+			sourceTree = "<group>";
+		};
+		78C5936F158720BB004401C5 /* TLibEncoder */ = {
+			isa = PBXGroup;
+			children = (
+				78C59370158720BB004401C5 /* AnnexBwrite.h */,
+				78C59371158720BB004401C5 /* NALwrite.cpp */,
+				78C59372158720BB004401C5 /* NALwrite.h */,
+				78C59373158720BB004401C5 /* SEIwrite.cpp */,
+				78C59374158720BB004401C5 /* SEIwrite.h */,
+				78C59375158720BB004401C5 /* TEncAdaptiveLoopFilter.cpp */,
+				78C59376158720BB004401C5 /* TEncAdaptiveLoopFilter.h */,
+				78C59377158720BB004401C5 /* TEncAnalyze.h */,
+				78C59378158720BB004401C5 /* TEncBinCoder.h */,
+				78C59379158720BB004401C5 /* TEncBinCoderCABAC.cpp */,
+				78C5937A158720BB004401C5 /* TEncBinCoderCABAC.h */,
+				78C5937B158720BB004401C5 /* TEncBinCoderCABACCounter.cpp */,
+				78C5937C158720BB004401C5 /* TEncBinCoderCABACCounter.h */,
+				78C5937D158720BB004401C5 /* TEncCavlc.cpp */,
+				78C5937E158720BB004401C5 /* TEncCavlc.h */,
+				78C5937F158720BB004401C5 /* TEncCfg.h */,
+				78C59380158720BB004401C5 /* TEncCu.cpp */,
+				78C59381158720BB004401C5 /* TEncCu.h */,
+				78C59382158720BB004401C5 /* TEncEntropy.cpp */,
+				78C59383158720BB004401C5 /* TEncEntropy.h */,
+				78C59384158720BB004401C5 /* TEncGOP.cpp */,
+				78C59385158720BB004401C5 /* TEncGOP.h */,
+				78C59386158720BB004401C5 /* TEncPic.cpp */,
+				78C59387158720BB004401C5 /* TEncPic.h */,
+				78C59388158720BB004401C5 /* TEncPreanalyzer.cpp */,
+				78C59389158720BB004401C5 /* TEncPreanalyzer.h */,
+				78C5938A158720BB004401C5 /* TEncSampleAdaptiveOffset.cpp */,
+				78C5938B158720BB004401C5 /* TEncSampleAdaptiveOffset.h */,
+				78C5938C158720BB004401C5 /* TEncSbac.cpp */,
+				78C5938D158720BB004401C5 /* TEncSbac.h */,
+				78C5938E158720BB004401C5 /* TEncSearch.cpp */,
+				78C5938F158720BB004401C5 /* TEncSearch.h */,
+				78C59390158720BB004401C5 /* TEncSlice.cpp */,
+				78C59391158720BB004401C5 /* TEncSlice.h */,
+				78C59392158720BB004401C5 /* TEncTop.cpp */,
+				78C59393158720BB004401C5 /* TEncTop.h */,
+				78C59394158720BB004401C5 /* WeightPredAnalysis.cpp */,
+				78C59395158720BB004401C5 /* WeightPredAnalysis.h */,
+			);
+			path = TLibEncoder;
+			sourceTree = "<group>";
+		};
+		78C59396158720BB004401C5 /* TLibExtractor */ = {
+			isa = PBXGroup;
+			children = (
+				78C59397158720BB004401C5 /* TExtrTop.cpp */,
+				78C59398158720BB004401C5 /* TExtrTop.h */,
+			);
+			path = TLibExtractor;
+			sourceTree = "<group>";
+		};
+		78C59399158720BB004401C5 /* TLibRenderer */ = {
+			isa = PBXGroup;
+			children = (
+				78C5939A158720BB004401C5 /* TRenFilter.cpp */,
+				78C5939B158720BB004401C5 /* TRenFilter.h */,
+				78C5939C158720BB004401C5 /* TRenImage.cpp */,
+				78C5939D158720BB004401C5 /* TRenImage.h */,
+				78C5939E158720BB004401C5 /* TRenImagePlane.cpp */,
+				78C5939F158720BB004401C5 /* TRenImagePlane.h */,
+				78C593A0158720BB004401C5 /* TRenInterpFilter.cpp */,
+				78C593A1158720BB004401C5 /* TRenInterpFilter.h */,
+				78C593A2158720BB004401C5 /* TRenModel.cpp */,
+				78C593A3158720BB004401C5 /* TRenModel.h */,
+				78C593A4158720BB004401C5 /* TRenModSetupStrParser.cpp */,
+				78C593A5158720BB004401C5 /* TRenModSetupStrParser.h */,
+				78C593A6158720BB004401C5 /* TRenSingleModel.cpp */,
+				78C593A7158720BB004401C5 /* TRenSingleModel.h */,
+				78C593A8158720BB004401C5 /* TRenTop.cpp */,
+				78C593A9158720BB004401C5 /* TRenTop.h */,
+			);
+			path = TLibRenderer;
+			sourceTree = "<group>";
+		};
+		78C593AA158720BB004401C5 /* TLibVideoIO */ = {
+			isa = PBXGroup;
+			children = (
+				78C593AB158720BB004401C5 /* TVideoIOYuv.cpp */,
+				78C593AC158720BB004401C5 /* TVideoIOYuv.h */,
+			);
+			path = TLibVideoIO;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		6767959011AD61BB00421804 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		676795F011AD621A00421804 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6767961511AD626F00421804 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6767964711AD629200421804 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7885896F15664E3D00982C12 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7894E34E14890D9A009259F4 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		78C593AE15872152004401C5 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		6767959311AD61BB00421804 /* TLibCommon */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 6767959811AD61D700421804 /* Build configuration list for PBXNativeTarget "TLibCommon" */;
+			buildPhases = (
+				6767959011AD61BB00421804 /* Headers */,
+				6767959111AD61BB00421804 /* Sources */,
+				6767959211AD61BB00421804 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = TLibCommon;
+			productName = TLibCommon;
+			productReference = 6767959411AD61BB00421804 /* libTLibCommon.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		676795F311AD621A00421804 /* TLibDecoder */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 676795F711AD623800421804 /* Build configuration list for PBXNativeTarget "TLibDecoder" */;
+			buildPhases = (
+				676795F011AD621A00421804 /* Headers */,
+				676795F111AD621A00421804 /* Sources */,
+				676795F211AD621A00421804 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = TLibDecoder;
+			productName = TLibDecoder;
+			productReference = 676795F411AD621A00421804 /* libTLibDecoder.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		6767961811AD626F00421804 /* TLibEncoder */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 6767964611AD628100421804 /* Build configuration list for PBXNativeTarget "TLibEncoder" */;
+			buildPhases = (
+				6767961511AD626F00421804 /* Headers */,
+				6767961611AD626F00421804 /* Sources */,
+				6767961711AD626F00421804 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = TLibEncoder;
+			productName = TLibEncoder;
+			productReference = 6767961911AD626F00421804 /* libTLibEncoder.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		6767964A11AD629200421804 /* TLibVideoIO */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 6767964F11AD629700421804 /* Build configuration list for PBXNativeTarget "TLibVideoIO" */;
+			buildPhases = (
+				6767964711AD629200421804 /* Headers */,
+				6767964811AD629200421804 /* Sources */,
+				6767964911AD629200421804 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = TLibVideoIO;
+			productName = TLibVideoIO;
+			productReference = 6767964B11AD629200421804 /* libTLibVideoIO.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		6767966911AD635600421804 /* TAppEncoder */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 6767966E11AD637400421804 /* Build configuration list for PBXNativeTarget "TAppEncoder" */;
+			buildPhases = (
+				6767966711AD635600421804 /* Sources */,
+				6767966811AD635600421804 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				78C5940415872220004401C5 /* PBXTargetDependency */,
+				78C5940615872221004401C5 /* PBXTargetDependency */,
+				78C5940815872222004401C5 /* PBXTargetDependency */,
+				78C5940A15872226004401C5 /* PBXTargetDependency */,
+				78C5940C15872228004401C5 /* PBXTargetDependency */,
+			);
+			name = TAppEncoder;
+			productName = TAppEncoder;
+			productReference = 6767966A11AD635600421804 /* TAppEncoder */;
+			productType = "com.apple.product-type.tool";
+		};
+		6782E0DD11AD691A00E8FFB8 /* TAppDecoder */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 6782E0E611AD692F00E8FFB8 /* Build configuration list for PBXNativeTarget "TAppDecoder" */;
+			buildPhases = (
+				6782E0DB11AD691A00E8FFB8 /* Sources */,
+				6782E0DC11AD691A00E8FFB8 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				78C59414158722AE004401C5 /* PBXTargetDependency */,
+				78C59416158722AF004401C5 /* PBXTargetDependency */,
+				78C59418158722B1004401C5 /* PBXTargetDependency */,
+				78C5941A158722B3004401C5 /* PBXTargetDependency */,
+			);
+			name = TAppDecoder;
+			productName = TAppDecoder;
+			productReference = 6782E0DE11AD691A00E8FFB8 /* TAppDecoder */;
+			productType = "com.apple.product-type.tool";
+		};
+		7885896E15664E3D00982C12 /* TLibExtractor */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 7885897A15664E3D00982C12 /* Build configuration list for PBXNativeTarget "TLibExtractor" */;
+			buildPhases = (
+				7885896F15664E3D00982C12 /* Headers */,
+				7885897015664E3D00982C12 /* Sources */,
+				7885897915664E3D00982C12 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = TLibExtractor;
+			productName = TLibDecoder;
+			productReference = 7885897D15664E3D00982C12 /* libTLibExtractor.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		7885897F15664E6A00982C12 /* TAppExtractor */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 7885899115664E6A00982C12 /* Build configuration list for PBXNativeTarget "TAppExtractor" */;
+			buildPhases = (
+				7885898815664E6A00982C12 /* Sources */,
+				7885898C15664E6A00982C12 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				78C5943115872345004401C5 /* PBXTargetDependency */,
+				78C5943315872347004401C5 /* PBXTargetDependency */,
+				78C594391587234B004401C5 /* PBXTargetDependency */,
+				78C594371587234A004401C5 /* PBXTargetDependency */,
+				78C5943515872348004401C5 /* PBXTargetDependency */,
+			);
+			name = TAppExtractor;
+			productName = TAppDecoder;
+			productReference = 7885899415664E6A00982C12 /* TAppExtractor */;
+			productType = "com.apple.product-type.tool";
+		};
+		7894E34D14890D9A009259F4 /* TLibRenderer */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 7894E36414890D9A009259F4 /* Build configuration list for PBXNativeTarget "TLibRenderer" */;
+			buildPhases = (
+				7894E34E14890D9A009259F4 /* Headers */,
+				7894E35914890D9A009259F4 /* Sources */,
+				7894E36314890D9A009259F4 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = TLibRenderer;
+			productName = TLibDecoder;
+			productReference = 7894E36714890D9A009259F4 /* libTLibRenderer.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		7894E37514890DD2009259F4 /* TAppRenderer */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 7894E38714890DD2009259F4 /* Build configuration list for PBXNativeTarget "TAppRenderer" */;
+			buildPhases = (
+				7894E37E14890DD2009259F4 /* Sources */,
+				7894E38214890DD2009259F4 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				78C59421158722E9004401C5 /* PBXTargetDependency */,
+				78C59423158722EB004401C5 /* PBXTargetDependency */,
+				78C59425158722ED004401C5 /* PBXTargetDependency */,
+				78C59427158722EF004401C5 /* PBXTargetDependency */,
+			);
+			name = TAppRenderer;
+			productName = TAppDecoder;
+			productReference = 7894E38A14890DD2009259F4 /* TAppRenderer */;
+			productType = "com.apple.product-type.tool";
+		};
+		78C593AD15872152004401C5 /* TAppCommon */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 78C593B115872152004401C5 /* Build configuration list for PBXNativeTarget "TAppCommon" */;
+			buildPhases = (
+				78C593AE15872152004401C5 /* Headers */,
+				78C593AF15872152004401C5 /* Sources */,
+				78C593B015872152004401C5 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = TAppCommon;
+			productName = TLibCommon;
+			productReference = 78C593B415872152004401C5 /* libTAppCommon.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		08FB7793FE84155DC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				BuildIndependentTargetsInParallel = YES;
+				LastUpgradeCheck = 0430;
+			};
+			buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "HTM" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+			);
+			mainGroup = 08FB7794FE84155DC02AAC07 /* Trinity */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				6767959311AD61BB00421804 /* TLibCommon */,
+				676795F311AD621A00421804 /* TLibDecoder */,
+				6767961811AD626F00421804 /* TLibEncoder */,
+				6767964A11AD629200421804 /* TLibVideoIO */,
+				7894E34D14890D9A009259F4 /* TLibRenderer */,
+				7885896E15664E3D00982C12 /* TLibExtractor */,
+				78C593AD15872152004401C5 /* TAppCommon */,
+				6767966911AD635600421804 /* TAppEncoder */,
+				6782E0DD11AD691A00E8FFB8 /* TAppDecoder */,
+				7894E37514890DD2009259F4 /* TAppRenderer */,
+				7885897F15664E6A00982C12 /* TAppExtractor */,
+				78C9B17C14DAD3E800989162 /* Package */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		6767959111AD61BB00421804 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593B5158721A1004401C5 /* ContextModel.cpp in Sources */,
+				78C593B6158721A1004401C5 /* ContextModel3DBuffer.cpp in Sources */,
+				78C593B7158721A1004401C5 /* TComAdaptiveLoopFilter.cpp in Sources */,
+				78C593B8158721A1004401C5 /* TComBitStream.cpp in Sources */,
+				78C593B9158721A1004401C5 /* TComCABACTables.cpp in Sources */,
+				78C593BA158721A1004401C5 /* TComDataCU.cpp in Sources */,
+				78C593BB158721A1004401C5 /* TComDepthMapGenerator.cpp in Sources */,
+				78C593BC158721A1004401C5 /* TComInterpolationFilter.cpp in Sources */,
+				78C593BD158721A1004401C5 /* TComLoopFilter.cpp in Sources */,
+				78C593BE158721A1004401C5 /* TComMotionInfo.cpp in Sources */,
+				78C593BF158721A1004401C5 /* TComPattern.cpp in Sources */,
+				78C593C0158721A1004401C5 /* TComPic.cpp in Sources */,
+				78C593C1158721A1004401C5 /* TComPicSym.cpp in Sources */,
+				78C593C2158721A1004401C5 /* TComPicYuv.cpp in Sources */,
+				78C593C3158721A1004401C5 /* TComPicYuvMD5.cpp in Sources */,
+				78C593C4158721A1004401C5 /* TComPrediction.cpp in Sources */,
+				78C593C5158721A1004401C5 /* TComRdCost.cpp in Sources */,
+				78C593C6158721A1004401C5 /* TComRdCostWeightPrediction.cpp in Sources */,
+				78C593C7158721A1004401C5 /* TComResidualGenerator.cpp in Sources */,
+				78C593C8158721A1004401C5 /* TComRom.cpp in Sources */,
+				78C593C9158721A1004401C5 /* TComSampleAdaptiveOffset.cpp in Sources */,
+				78C593CA158721A1004401C5 /* TComSlice.cpp in Sources */,
+				78C593CB158721A1004401C5 /* TComTrQuant.cpp in Sources */,
+				78C593CC158721A1004401C5 /* TComWedgelet.cpp in Sources */,
+				78C593CD158721A1004401C5 /* TComWeightPrediction.cpp in Sources */,
+				78C593CE158721A1004401C5 /* TComYuv.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		676795F111AD621A00421804 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593D1158721BB004401C5 /* AnnexBread.cpp in Sources */,
+				78C593D2158721BB004401C5 /* NALread.cpp in Sources */,
+				78C593D3158721BB004401C5 /* SEIread.cpp in Sources */,
+				78C593D4158721BB004401C5 /* TDecBinCoderCABAC.cpp in Sources */,
+				78C593D5158721BB004401C5 /* TDecCAVLC.cpp in Sources */,
+				78C593D6158721BB004401C5 /* TDecCu.cpp in Sources */,
+				78C593D7158721BB004401C5 /* TDecEntropy.cpp in Sources */,
+				78C593D8158721BB004401C5 /* TDecGop.cpp in Sources */,
+				78C593D9158721BB004401C5 /* TDecSbac.cpp in Sources */,
+				78C593DA158721BB004401C5 /* TDecSlice.cpp in Sources */,
+				78C593DB158721BB004401C5 /* TDecTop.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6767961611AD626F00421804 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593DC158721CE004401C5 /* NALwrite.cpp in Sources */,
+				78C593DD158721CE004401C5 /* SEIwrite.cpp in Sources */,
+				78C593DE158721CE004401C5 /* TEncAdaptiveLoopFilter.cpp in Sources */,
+				78C593DF158721CE004401C5 /* TEncBinCoderCABAC.cpp in Sources */,
+				78C593E0158721CE004401C5 /* TEncBinCoderCABACCounter.cpp in Sources */,
+				78C593E1158721CE004401C5 /* TEncCavlc.cpp in Sources */,
+				78C593E2158721CE004401C5 /* TEncCu.cpp in Sources */,
+				78C593E3158721CE004401C5 /* TEncEntropy.cpp in Sources */,
+				78C593E4158721CE004401C5 /* TEncGOP.cpp in Sources */,
+				78C593E5158721CE004401C5 /* TEncPic.cpp in Sources */,
+				78C593E6158721CE004401C5 /* TEncPreanalyzer.cpp in Sources */,
+				78C593E7158721CE004401C5 /* TEncSampleAdaptiveOffset.cpp in Sources */,
+				78C593E8158721CE004401C5 /* TEncSbac.cpp in Sources */,
+				78C593E9158721CE004401C5 /* TEncSearch.cpp in Sources */,
+				78C593EA158721CE004401C5 /* TEncSlice.cpp in Sources */,
+				78C593EB158721CE004401C5 /* TEncTop.cpp in Sources */,
+				78C593EC158721CE004401C5 /* WeightPredAnalysis.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6767964811AD629200421804 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593F6158721E9004401C5 /* TVideoIOYuv.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6767966711AD635600421804 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593F7158721F1004401C5 /* encmain.cpp in Sources */,
+				78C593F8158721F1004401C5 /* TAppEncCfg.cpp in Sources */,
+				78C593F9158721F1004401C5 /* TAppEncTop.cpp in Sources */,
+				78C594121587228A004401C5 /* libmd5.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		6782E0DB11AD691A00E8FFB8 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593FA158721F6004401C5 /* decmain.cpp in Sources */,
+				78C593FB158721F6004401C5 /* TAppDecCfg.cpp in Sources */,
+				78C593FC158721F6004401C5 /* TAppDecTop.cpp in Sources */,
+				78C5941F158722D4004401C5 /* libmd5.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7885897015664E3D00982C12 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593ED158721D7004401C5 /* TExtrTop.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7885898815664E6A00982C12 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593FD158721FC004401C5 /* extrmain.cpp in Sources */,
+				78C593FE158721FC004401C5 /* TAppExtrCfg.cpp in Sources */,
+				78C593FF158721FC004401C5 /* TAppExtrTop.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7894E35914890D9A009259F4 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593EE158721E2004401C5 /* TRenFilter.cpp in Sources */,
+				78C593EF158721E2004401C5 /* TRenImage.cpp in Sources */,
+				78C593F0158721E2004401C5 /* TRenImagePlane.cpp in Sources */,
+				78C593F1158721E2004401C5 /* TRenInterpFilter.cpp in Sources */,
+				78C593F2158721E2004401C5 /* TRenModel.cpp in Sources */,
+				78C593F3158721E2004401C5 /* TRenModSetupStrParser.cpp in Sources */,
+				78C593F4158721E2004401C5 /* TRenSingleModel.cpp in Sources */,
+				78C593F5158721E2004401C5 /* TRenTop.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		7894E37E14890DD2009259F4 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C5940015872201004401C5 /* RendererMain.cpp in Sources */,
+				78C5940115872201004401C5 /* TAppRendererCfg.cpp in Sources */,
+				78C5940215872201004401C5 /* TAppRendererTop.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		78C593AF15872152004401C5 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				78C593CF158721AD004401C5 /* program_options_lite.cpp in Sources */,
+				78C593D0158721AD004401C5 /* TAppComCamPara.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		7885899D15664EAA00982C12 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 7885897F15664E6A00982C12 /* TAppExtractor */;
+			targetProxy = 7885899C15664EAA00982C12 /* PBXContainerItemProxy */;
+		};
+		78C5940415872220004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767959311AD61BB00421804 /* TLibCommon */;
+			targetProxy = 78C5940315872220004401C5 /* PBXContainerItemProxy */;
+		};
+		78C5940615872221004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767961811AD626F00421804 /* TLibEncoder */;
+			targetProxy = 78C5940515872221004401C5 /* PBXContainerItemProxy */;
+		};
+		78C5940815872222004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767964A11AD629200421804 /* TLibVideoIO */;
+			targetProxy = 78C5940715872222004401C5 /* PBXContainerItemProxy */;
+		};
+		78C5940A15872226004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 7894E34D14890D9A009259F4 /* TLibRenderer */;
+			targetProxy = 78C5940915872226004401C5 /* PBXContainerItemProxy */;
+		};
+		78C5940C15872228004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 78C593AD15872152004401C5 /* TAppCommon */;
+			targetProxy = 78C5940B15872228004401C5 /* PBXContainerItemProxy */;
+		};
+		78C59414158722AE004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767959311AD61BB00421804 /* TLibCommon */;
+			targetProxy = 78C59413158722AE004401C5 /* PBXContainerItemProxy */;
+		};
+		78C59416158722AF004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 676795F311AD621A00421804 /* TLibDecoder */;
+			targetProxy = 78C59415158722AF004401C5 /* PBXContainerItemProxy */;
+		};
+		78C59418158722B1004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767964A11AD629200421804 /* TLibVideoIO */;
+			targetProxy = 78C59417158722B1004401C5 /* PBXContainerItemProxy */;
+		};
+		78C5941A158722B3004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 78C593AD15872152004401C5 /* TAppCommon */;
+			targetProxy = 78C59419158722B3004401C5 /* PBXContainerItemProxy */;
+		};
+		78C59421158722E9004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767959311AD61BB00421804 /* TLibCommon */;
+			targetProxy = 78C59420158722E9004401C5 /* PBXContainerItemProxy */;
+		};
+		78C59423158722EB004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 7894E34D14890D9A009259F4 /* TLibRenderer */;
+			targetProxy = 78C59422158722EB004401C5 /* PBXContainerItemProxy */;
+		};
+		78C59425158722ED004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 78C593AD15872152004401C5 /* TAppCommon */;
+			targetProxy = 78C59424158722ED004401C5 /* PBXContainerItemProxy */;
+		};
+		78C59427158722EF004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767964A11AD629200421804 /* TLibVideoIO */;
+			targetProxy = 78C59426158722EF004401C5 /* PBXContainerItemProxy */;
+		};
+		78C5943115872345004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 7885896E15664E3D00982C12 /* TLibExtractor */;
+			targetProxy = 78C5943015872345004401C5 /* PBXContainerItemProxy */;
+		};
+		78C5943315872347004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767959311AD61BB00421804 /* TLibCommon */;
+			targetProxy = 78C5943215872347004401C5 /* PBXContainerItemProxy */;
+		};
+		78C5943515872348004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 676795F311AD621A00421804 /* TLibDecoder */;
+			targetProxy = 78C5943415872348004401C5 /* PBXContainerItemProxy */;
+		};
+		78C594371587234A004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767964A11AD629200421804 /* TLibVideoIO */;
+			targetProxy = 78C594361587234A004401C5 /* PBXContainerItemProxy */;
+		};
+		78C594391587234B004401C5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 78C593AD15872152004401C5 /* TAppCommon */;
+			targetProxy = 78C594381587234B004401C5 /* PBXContainerItemProxy */;
+		};
+		78C9B18214DAD3F100989162 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6767966911AD635600421804 /* TAppEncoder */;
+			targetProxy = 78C9B18114DAD3F100989162 /* PBXContainerItemProxy */;
+		};
+		78C9B18414DAD3F100989162 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 6782E0DD11AD691A00E8FFB8 /* TAppDecoder */;
+			targetProxy = 78C9B18314DAD3F100989162 /* PBXContainerItemProxy */;
+		};
+		78C9B18614DAD3F100989162 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 7894E37514890DD2009259F4 /* TAppRenderer */;
+			targetProxy = 78C9B18514DAD3F100989162 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+		1DEB923608733DC60010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/source/Lib/";
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = macosx;
+			};
+			name = Debug;
+		};
+		1DEB923708733DC60010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+				GCC_OPTIMIZATION_LEVEL = s;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/source/Lib/";
+				SDKROOT = macosx;
+			};
+			name = Release;
+		};
+		6767959511AD61BC00421804 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibCommon;
+			};
+			name = Debug;
+		};
+		6767959611AD61BC00421804 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibCommon;
+			};
+			name = Release;
+		};
+		676795F511AD621A00421804 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibDecoder;
+			};
+			name = Debug;
+		};
+		676795F611AD621A00421804 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibDecoder;
+			};
+			name = Release;
+		};
+		6767961A11AD626F00421804 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibEncoder;
+			};
+			name = Debug;
+		};
+		6767961B11AD626F00421804 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibEncoder;
+			};
+			name = Release;
+		};
+		6767964C11AD629200421804 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibVideoIO;
+			};
+			name = Debug;
+		};
+		6767964D11AD629200421804 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibVideoIO;
+			};
+			name = Release;
+		};
+		6767966C11AD635600421804 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = TAppEncoder;
+			};
+			name = Debug;
+		};
+		6767966D11AD635600421804 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = TAppEncoder;
+			};
+			name = Release;
+		};
+		6782E0E011AD691B00E8FFB8 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = TAppDecoder;
+			};
+			name = Debug;
+		};
+		6782E0E111AD691B00E8FFB8 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = TAppDecoder;
+			};
+			name = Release;
+		};
+		7885897B15664E3D00982C12 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibExtractor;
+			};
+			name = Debug;
+		};
+		7885897C15664E3D00982C12 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibExtractor;
+			};
+			name = Release;
+		};
+		7885899215664E6A00982C12 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = TAppExtractor;
+			};
+			name = Debug;
+		};
+		7885899315664E6A00982C12 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = TAppExtractor;
+			};
+			name = Release;
+		};
+		7894E36514890D9A009259F4 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibRenderer;
+			};
+			name = Debug;
+		};
+		7894E36614890D9A009259F4 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TLibRenderer;
+			};
+			name = Release;
+		};
+		7894E38814890DD2009259F4 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = TAppRenderer;
+			};
+			name = Debug;
+		};
+		7894E38914890DD2009259F4 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/bin;
+				PRODUCT_NAME = TAppRenderer;
+			};
+			name = Release;
+		};
+		78C593B215872152004401C5 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TAppCommon;
+			};
+			name = Debug;
+		};
+		78C593B315872152004401C5 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				INSTALL_PATH = /usr/local/lib;
+				PRODUCT_NAME = TAppCommon;
+			};
+			name = Release;
+		};
+		78C9B17D14DAD3E800989162 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		78C9B17E14DAD3E800989162 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "HTM" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB923608733DC60010E9CD /* Debug */,
+				1DEB923708733DC60010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		6767959811AD61D700421804 /* Build configuration list for PBXNativeTarget "TLibCommon" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				6767959511AD61BC00421804 /* Debug */,
+				6767959611AD61BC00421804 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		676795F711AD623800421804 /* Build configuration list for PBXNativeTarget "TLibDecoder" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				676795F511AD621A00421804 /* Debug */,
+				676795F611AD621A00421804 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		6767964611AD628100421804 /* Build configuration list for PBXNativeTarget "TLibEncoder" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				6767961A11AD626F00421804 /* Debug */,
+				6767961B11AD626F00421804 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		6767964F11AD629700421804 /* Build configuration list for PBXNativeTarget "TLibVideoIO" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				6767964C11AD629200421804 /* Debug */,
+				6767964D11AD629200421804 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		6767966E11AD637400421804 /* Build configuration list for PBXNativeTarget "TAppEncoder" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				6767966C11AD635600421804 /* Debug */,
+				6767966D11AD635600421804 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		6782E0E611AD692F00E8FFB8 /* Build configuration list for PBXNativeTarget "TAppDecoder" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				6782E0E011AD691B00E8FFB8 /* Debug */,
+				6782E0E111AD691B00E8FFB8 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		7885897A15664E3D00982C12 /* Build configuration list for PBXNativeTarget "TLibExtractor" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				7885897B15664E3D00982C12 /* Debug */,
+				7885897C15664E3D00982C12 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		7885899115664E6A00982C12 /* Build configuration list for PBXNativeTarget "TAppExtractor" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				7885899215664E6A00982C12 /* Debug */,
+				7885899315664E6A00982C12 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		7894E36414890D9A009259F4 /* Build configuration list for PBXNativeTarget "TLibRenderer" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				7894E36514890D9A009259F4 /* Debug */,
+				7894E36614890D9A009259F4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		7894E38714890DD2009259F4 /* Build configuration list for PBXNativeTarget "TAppRenderer" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				7894E38814890DD2009259F4 /* Debug */,
+				7894E38914890DD2009259F4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		78C593B115872152004401C5 /* Build configuration list for PBXNativeTarget "TAppCommon" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				78C593B215872152004401C5 /* Debug */,
+				78C593B315872152004401C5 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		78C9B17F14DAD3E800989162 /* Build configuration list for PBXAggregateTarget "Package" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				78C9B17D14DAD3E800989162 /* Debug */,
+				78C9B17E14DAD3E800989162 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}
Index: /trunk/HTM.xcodeproj/project.xcworkspace/contents.xcworkspacedata
===================================================================
--- /trunk/HTM.xcodeproj/project.xcworkspace/contents.xcworkspacedata	(revision 77)
+++ /trunk/HTM.xcodeproj/project.xcworkspace/contents.xcworkspacedata	(revision 77)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:HTM.xcodeproj">
+   </FileRef>
+</Workspace>
Index: /trunk/build/vc8/TLibCommon_vc8.vcproj
===================================================================
--- /trunk/build/vc8/TLibCommon_vc8.vcproj	(revision 76)
+++ /trunk/build/vc8/TLibCommon_vc8.vcproj	(revision 77)
@@ -357,4 +357,8 @@
 			</File>
 			<File
+				RelativePath="..\..\source\Lib\TLibCommon\TComResidualGenerator.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\source\Lib\TLibCommon\TComRom.cpp"
 				>
@@ -499,4 +503,8 @@
 			</File>
 			<File
+				RelativePath="..\..\source\Lib\TLibCommon\TComResidualGenerator.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\source\Lib\TLibCommon\TComRom.h"
 				>
@@ -512,4 +520,8 @@
 			<File
 				RelativePath="..\..\source\Lib\TLibCommon\TComTrQuant.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\source\Lib\TLibCommon\TComWedgelet.h"
 				>
 			</File>
Index: /trunk/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 76)
+++ /trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 77)
@@ -82,5 +82,10 @@
 Void TAppDecTop::decode()
 {
+#if VIDYO_VPS_INTEGRATION
+  increaseNumberOfViews( 0, 0, 0 );
+#else
   increaseNumberOfViews( 1 );
+#endif
+  
 #if SONY_COLPIC_AVAILABILITY
   m_tDecTop[0]->setViewOrderIdx(0);
@@ -140,11 +145,30 @@
     {
       read(nalu, nalUnit);
+#if VIDYO_VPS_INTEGRATION
+      Int viewId = 0;
+      Int depth = 0;
+      
+      if(nalu.m_nalUnitType != NAL_UNIT_VPS || nalu.m_layerId)
+      {
+        // code assumes that the first nal unit is VPS
+        // currently, this is a hack that requires non-first VPSs have non-zero layer_id
+        viewId = getVPSAccess()->getActiveVPS()->getViewId(nalu.m_layerId);
+        depth = getVPSAccess()->getActiveVPS()->getDepthFlag(nalu.m_layerId);
+      }
+      viewDepthId = nalu.m_layerId;   // coding order T0D0T1D1T2D2
+#else
       Int viewId = nalu.m_viewId;
       Int depth = nalu.m_isDepth ? 1 : 0;
       viewDepthId = viewId * 2 + depth;   // coding order T0D0T1D1T2D2
+#endif
+      
       newPicture[viewDepthId] = false;
       if( viewDepthId >= m_tDecTop.size() )      
       {
+#if VIDYO_VPS_INTEGRATION
+        increaseNumberOfViews( viewDepthId, viewId, depth );
+#else
         increaseNumberOfViews( viewDepthId +1 );
+#endif   
       }
       if(m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer)
@@ -392,13 +416,21 @@
   m_pocLastDisplay[viewDepthId] = -MAX_INT;
 }
-
+#if VIDYO_VPS_INTEGRATION
+Void  TAppDecTop::increaseNumberOfViews  ( UInt layerId, UInt viewId, UInt isDepth )
+#else
 Void  TAppDecTop::increaseNumberOfViews  ( Int newNumberOfViewDepth )
-{
+#endif
+{
+#if VIDYO_VPS_INTEGRATION
+  Int newNumberOfViewDepth = layerId + 1;
+#endif
   if ( m_outputBitDepth == 0 )
   {
     m_outputBitDepth = g_uiBitDepth + g_uiBitIncrement;
   }
+#if !VIDYO_VPS_INTEGRATION
   Int viewId = (newNumberOfViewDepth-1)>>1;   // coding order T0D0T1D1T2D2
   Bool isDepth = ((newNumberOfViewDepth % 2) == 0);  // coding order T0D0T1D1T2D2
+#endif
   if( isDepth )
     m_useDepth = true;
Index: /trunk/source/App/TAppDecoder/TAppDecTop.h
===================================================================
--- /trunk/source/App/TAppDecoder/TAppDecTop.h	(revision 76)
+++ /trunk/source/App/TAppDecoder/TAppDecTop.h	(revision 77)
@@ -74,4 +74,7 @@
   CamParsCollector                m_cCamParsCollector;
 #if DEPTH_MAP_GENERATION
+#if VIDYO_VPS_INTEGRATION
+  TComVPSAccess                   m_cVPSAccess;
+#endif
   TComSPSAccess                   m_cSPSAccess;
   TComAUPicAccess                 m_cAUPicAccess;
@@ -85,5 +88,9 @@
   Void  destroy           (); ///< destroy internal members
   Void  decode            (); ///< main decoding function
+#if VIDYO_VPS_INTEGRATION
+  Void  increaseNumberOfViews	(UInt layerId, UInt viewId, UInt isDepth);
+#else
   Void  increaseNumberOfViews	(Int newNumberOfViewDepth);
+#endif
   TDecTop* getTDecTop     ( Int viewId, Bool isDepth );
 
@@ -92,4 +99,7 @@
 
 #if DEPTH_MAP_GENERATION
+#if VIDYO_VPS_INTEGRATION
+  TComVPSAccess*    getVPSAccess  () { return &m_cVPSAccess;   }
+#endif
   TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
   TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
Index: /trunk/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 76)
+++ /trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 77)
@@ -67,4 +67,16 @@
 Void TAppEncTop::xInitLibCfg()
 {
+#if VIDYO_VPS_INTEGRATION
+  UInt layerId = 0;
+  // TODO: fix the assumption here that the temporal structures are all equal across all layers???
+  m_cVPS.setMaxTLayers( m_maxTempLayer[0] );
+  m_cVPS.setMaxLayers( m_iNumberOfViews * (m_bUsingDepthMaps ? 2:1) );
+  for(Int i = 0; i < MAX_TLAYER; i++)
+  {
+    m_cVPS.setNumReorderPics( m_numReorderPics[0][i], i );
+    m_cVPS.setMaxDecPicBuffering( m_maxDecPicBuffering[0][i], i );
+  }
+#endif
+  
   for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++)
   {
@@ -90,4 +102,15 @@
     m_acTEncTopList[iViewIdx]->setIsDepth                      ( false );
     m_acTEncTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
+#if VIDYO_VPS_INTEGRATION
+    layerId = iViewIdx * (m_bUsingDepthMaps ? 2:1);
+    m_acTEncTopList[iViewIdx]->setLayerId                      ( layerId );
+    m_cVPS.setDepthFlag                                        ( false, layerId );
+    m_cVPS.setViewId                                           ( iViewIdx, layerId );
+    m_cVPS.setViewOrderIdx                                     ( m_cCameraData.getViewOrderIndex()[ iViewIdx ], layerId );
+    // TODO: set correct dependentFlag and dependentLayer
+    m_cVPS.setDependentFlag                                    ( iViewIdx ? true:false, layerId );
+    m_cVPS.setDependentLayer                                   ( layerId - (m_bUsingDepthMaps ? 2:1), layerId );
+#endif
+    
     m_acTEncTopList[iViewIdx]->setCamParPrecision              ( m_cCameraData.getCamParsCodedPrecision  () );
     m_acTEncTopList[iViewIdx]->setCamParInSliceHeader          ( m_cCameraData.getVaryingCameraParameters() );
@@ -364,4 +387,13 @@
       m_acTEncDepthTopList[iViewIdx]->setIsDepth                      ( true );
       m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
+#if VIDYO_VPS_INTEGRATION
+      layerId = iViewIdx * 2 + 1;
+      m_acTEncDepthTopList[iViewIdx]->setLayerId                      ( layerId );
+      m_cVPS.setDepthFlag                                             ( true, layerId );
+      m_cVPS.setViewId                                                ( iViewIdx, layerId );
+      m_cVPS.setViewOrderIdx                                          ( m_cCameraData.getViewOrderIndex()[ iViewIdx ], layerId );
+      m_cVPS.setDependentFlag                                         ( true, layerId );
+      m_cVPS.setDependentLayer                                        ( layerId-1, layerId);
+#endif
       m_acTEncDepthTopList[iViewIdx]->setCamParPrecision              ( 0 );
       m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader          ( false );
@@ -1134,4 +1166,7 @@
     case NAL_UNIT_SPS:
     case NAL_UNIT_PPS:
+#if VIDYO_VPS_INTEGRATION
+    case NAL_UNIT_VPS:
+#endif
       m_essentialBytes += *it_stats;
       break;
Index: /trunk/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- /trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 76)
+++ /trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 77)
@@ -80,8 +80,15 @@
 
 #if DEPTH_MAP_GENERATION
+#if VIDYO_VPS_INTEGRATION
+  TComVPSAccess               m_cVPSAccess;
+#endif
   TComSPSAccess               m_cSPSAccess;
   TComAUPicAccess             m_cAUPicAccess;
 #endif
 
+#if VIDYO_VPS_INTEGRATION
+  TComVPS                     m_cVPS;
+#endif
+  
 #if HHI_VSO
   TRenTop                     m_cRendererTop; 
@@ -131,4 +138,9 @@
 #endif
   
+#if VIDYO_VPS_INTEGRATION
+  TComVPS*          getVPS()  { return &m_cVPS; }
+  TComVPSAccess*    getVPSAccess  () { return &m_cVPSAccess;   }
+#endif
+  
 #if DEPTH_MAP_GENERATION
   TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
Index: /trunk/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- /trunk/source/Lib/TLibCommon/CommonDef.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/CommonDef.h	(revision 77)
@@ -58,5 +58,5 @@
 
 #define HM_VERSION        "6.1"
-#define NV_VERSION        "3.0"                 ///< Current software version
+#define NV_VERSION        "3.1rc1"                 ///< Current software version
 
 // ====================================================================================================================
@@ -138,5 +138,9 @@
 #define PDM_NO_INTER_UPDATE               1         // no update for inter (but not inter-view) predicted blocks
 #define PDM_MERGE_POS                     0         // position of pdm in merge list (0..4)
+#if SAIT_IMPROV_MOTION_PRED_M24829
+#define PDM_AMVP_POS                      0         // position of pdm in amvp list  (0..3)
+#else
 #define PDM_AMVP_POS                      2         // position of pdm in amvp list  (0..3)
+#endif
 #define PDM_OUTPUT_PRED_DEPTH_MAP         0         // output prediction depth map (for debugging)
 
@@ -168,4 +172,11 @@
 #define LOG2_DISP_PREC_LUT   				2		  		///< log2 of disparity precision used in integer disparity LUTs
 
+// ====================================================================================================================
+// VPS constants
+// ====================================================================================================================
+#if VIDYO_VPS_INTEGRATION
+#define MAX_LAYER_NUM                     MAX_VIEW_NUM
+#define VPS_EXTENSION_TYPE_MULTI_VIEW     0
+#endif
 
 // ====================================================================================================================
@@ -483,5 +494,9 @@
   NAL_UNIT_RESERVED_23,
   NAL_UNIT_UNSPECIFIED_24,
+#if VIDYO_VPS_INTEGRATION
+	NAL_UNIT_VPS,
+#else
   NAL_UNIT_UNSPECIFIED_25,
+#endif
   NAL_UNIT_UNSPECIFIED_26,
   NAL_UNIT_UNSPECIFIED_27,
Index: /trunk/source/Lib/TLibCommon/NAL.h
===================================================================
--- /trunk/source/Lib/TLibCommon/NAL.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/NAL.h	(revision 77)
@@ -51,4 +51,8 @@
   NalRefIdc   m_nalRefIDC;   ///< nal_ref_idc
 #endif
+#if VIDYO_VPS_INTEGRATION
+	unsigned    m_layerId;
+  unsigned    m_temporalId;  ///< temporal_id
+#else
   Int         m_viewId;      ///< view_id
   Bool        m_isDepth;     ///< is_depth
@@ -56,4 +60,5 @@
 #if !H0388
   bool        m_OutputFlag;  ///< output_flag
+#endif
 #endif
 
@@ -64,11 +69,19 @@
     NalUnitType nalUnitType,
     Bool        nalRefFlag,
+#if !VIDYO_VPS_INTEGRATION    
     Int         viewId,
     Bool        isDepth,
-    Int         temporalId = 0)
+#else
+    unsigned    layerId,
+#endif
+    unsigned       temporalId = 0)
     :m_nalUnitType (nalUnitType)
     ,m_nalRefFlag  (nalRefFlag)
+#if !VIDYO_VPS_INTEGRATION
     ,m_viewId      (viewId)
     ,m_isDepth     (isDepth)
+#else
+    ,m_layerId     (layerId)
+#endif
     ,m_temporalId  (temporalId)
   {}
@@ -83,6 +96,10 @@
     m_nalUnitType = nalUnitType;
     m_nalRefIDC   = nalRefIDC;
+#if !VIDYO_VPS_INTEGRATION
     m_viewId      = viewId;
     m_isDepth     = isDepth;
+#else
+		m_layerId = layerId;
+#endif
     m_temporalId  = temporalID;
   }
@@ -92,6 +109,10 @@
     NalUnitType  nalUnitType,
     NalRefIdc    nalRefIDC,
+#if !VIDYO_VPS_INTEGRATION    
     Int          viewId,
     Bool         isDepth,
+#else
+    unsigned         layerId,
+#endif
     unsigned     temporalID = 0,
     bool         outputFlag = true)
@@ -99,6 +120,10 @@
     m_nalUnitType = nalUnitType;
     m_nalRefIDC   = nalRefIDC;
+#if !VIDYO_VPS_INTEGRATION
     m_viewId      = viewId;
     m_isDepth     = isDepth;
+#else
+		m_layerId = layerId;
+#endif
     m_temporalId  = temporalID;
     m_OutputFlag  = outputFlag;
Index: /trunk/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComDataCU.cpp	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComDataCU.cpp	(revision 77)
@@ -2883,4 +2883,48 @@
 }
 
+#if LG_RESTRICTEDRESPRED_M24766
+Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU)
+{
+	UInt uiNumPartition  = bLCU ? (getWidth(uiAbsPartIdx)*getHeight(uiAbsPartIdx) >> 4) : m_uiNumPartition;
+	UInt uiTmpAbsPartIdx = bLCU ? uiAbsPartIdx : 0;
+
+	switch ( m_pePartSize[uiTmpAbsPartIdx] )
+	{
+	case SIZE_2NxN:
+		riWidth = getWidth(uiTmpAbsPartIdx);      riHeight = getHeight(uiTmpAbsPartIdx) >> 1; ruiPartAddr = ( uiPartIdx == 0 )? 0 : uiNumPartition >> 1;
+		break;
+	case SIZE_Nx2N:
+		riWidth = getWidth(uiTmpAbsPartIdx) >> 1; riHeight = getHeight(uiTmpAbsPartIdx);      ruiPartAddr = ( uiPartIdx == 0 )? 0 : uiNumPartition >> 2;
+		break;
+	case SIZE_NxN:
+		riWidth = getWidth(uiTmpAbsPartIdx) >> 1; riHeight = getHeight(uiTmpAbsPartIdx) >> 1; ruiPartAddr = ( uiNumPartition >> 2 ) * uiPartIdx;
+		break;
+	case SIZE_2NxnU:
+		riWidth     = getWidth(uiTmpAbsPartIdx);
+		riHeight    = ( uiPartIdx == 0 ) ?  getHeight(uiTmpAbsPartIdx) >> 2 : ( getHeight(uiTmpAbsPartIdx) >> 2 ) + ( getHeight(uiTmpAbsPartIdx) >> 1 );
+		ruiPartAddr = ( uiPartIdx == 0 ) ? 0 : uiNumPartition >> 3;
+		break;
+	case SIZE_2NxnD:
+		riWidth     = getWidth(uiTmpAbsPartIdx);
+		riHeight    = ( uiPartIdx == 0 ) ?  ( getHeight(uiTmpAbsPartIdx) >> 2 ) + ( getHeight(uiTmpAbsPartIdx) >> 1 ) : getHeight(uiTmpAbsPartIdx) >> 2;
+		ruiPartAddr = ( uiPartIdx == 0 ) ? 0 : (uiNumPartition >> 1) + (uiNumPartition >> 3);
+		break;
+	case SIZE_nLx2N:
+		riWidth     = ( uiPartIdx == 0 ) ? getWidth(uiTmpAbsPartIdx) >> 2 : ( getWidth(uiTmpAbsPartIdx) >> 2 ) + ( getWidth(uiTmpAbsPartIdx) >> 1 );
+		riHeight    = getHeight(uiTmpAbsPartIdx);
+		ruiPartAddr = ( uiPartIdx == 0 ) ? 0 : uiNumPartition >> 4;
+		break;
+	case SIZE_nRx2N:
+		riWidth     = ( uiPartIdx == 0 ) ? ( getWidth(uiTmpAbsPartIdx) >> 2 ) + ( getWidth(uiTmpAbsPartIdx) >> 1 ) : getWidth(uiTmpAbsPartIdx) >> 2;
+		riHeight    = getHeight(uiTmpAbsPartIdx);
+		ruiPartAddr = ( uiPartIdx == 0 ) ? 0 : (uiNumPartition >> 2) + (uiNumPartition >> 4);
+		break;
+	default:
+		assert ( m_pePartSize[0] == SIZE_2Nx2N );
+		riWidth = getWidth(uiTmpAbsPartIdx);      riHeight = getHeight(uiTmpAbsPartIdx);      ruiPartAddr = 0;
+		break;
+	}
+}
+#else
 Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight )
 {
@@ -2922,5 +2966,74 @@
   }
 }
-
+#endif
+
+#if LG_RESTRICTEDRESPRED_M24766
+Int TComDataCU::getResiPredMode(UInt uiPartAddr)
+{
+	Int iAddResiShift = -1;
+
+	for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++)
+	{
+		RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
+		Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr);
+		if(iBestRefIdx >= 0 && getSlice()->getViewId() == getSlice()->getRefViewId(eRefList, iBestRefIdx))
+			iAddResiShift++;
+	}
+
+	return iAddResiShift;
+}
+
+Void TComDataCU::getPUResiPredShift(Int *iPUResiPredShift, UInt uiAbsPartIndex)
+{
+	UInt uiPartSize = getPartitionSize(uiAbsPartIndex);
+	UInt uiPartAddr;
+	Int iWidth, iHeight;
+	Int iAddResiShift;
+
+	if(uiPartSize == SIZE_2Nx2N)
+	{
+		iAddResiShift = getResiPredMode(uiAbsPartIndex);
+		for(UInt i = 0; i < 4; i++)
+			iPUResiPredShift[i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiAbsPartIndex) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
+		return;
+	}
+
+	if(uiPartSize == SIZE_2NxN || uiPartSize == SIZE_2NxnU || uiPartSize == SIZE_2NxnD)
+	{
+		for(UInt i = 0; i < 2; i++)
+		{
+			getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);
+			uiPartAddr += uiAbsPartIndex;
+			iAddResiShift = getResiPredMode(uiPartAddr);
+			iPUResiPredShift[2*i] = iPUResiPredShift[2*i+1] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
+		}
+		return;
+	}
+
+	if(uiPartSize == SIZE_Nx2N || uiPartSize == SIZE_nLx2N || uiPartSize == SIZE_nRx2N)
+	{
+		for(UInt i = 0; i < 2; i++)
+		{
+			getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);
+			uiPartAddr += uiAbsPartIndex;
+			iAddResiShift = getResiPredMode(uiPartAddr);
+			iPUResiPredShift[i] = iPUResiPredShift[2+i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
+		}
+		return;
+	}
+
+	if(uiPartSize == SIZE_NxN)
+	{
+		for(UInt i = 0; i < 4; i++)
+		{
+			getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIndex, true);
+			uiPartAddr += uiAbsPartIndex;
+			iAddResiShift = getResiPredMode(uiPartAddr);
+			iPUResiPredShift[i] = (getSlice()->getPPS()->getUseWP() || getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
+		}
+	}
+
+}
+#endif
 
 Void TComDataCU::getMvField ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList, TComMvField& rcMvField )
@@ -4723,4 +4836,20 @@
   Int iNeibRefPOC;
 
+#if HHI_FIX
+  if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 )
+  {
+    iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );
+    if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )
+      return false;
+    if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List//
+    {
+      TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
+
+      clipMv(cMvPred);
+      pInfo->m_acMvCand[ pInfo->iN++] = cMvPred;
+      return true;
+    }
+  }
+#endif
   //---------------  V1 (END) ------------------//
   if( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0)
@@ -4851,5 +4980,9 @@
   iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx();
 #else
+#if HHI_FIX
+  if( pColCU->getSlice()->getRefViewId( eColRefPicList, iColRefIdx ) != pColCU->getSlice()->getViewId() )
+#else
   if( pColCU->getSlice()->getRefViewId( eColRefPicList, iColRefIdx ) != m_pcSlice->getRefPic( eRefPicList, riRefIdx )->getViewId() )
+#endif
   {
     return false;
@@ -4867,4 +5000,8 @@
   else if((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC))
     iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx);
+#if HHI_FIX //GT: fix reported by Sony
+  else
+    return false; 
+#endif
 #else
   iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC);
@@ -5839,9 +5976,17 @@
 #if HHI_INTER_VIEW_RESIDUAL_PRED
 Bool
-TComDataCU::getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv )
+TComDataCU::getResidualSamples( UInt uiPartIdx, 
+#if QC_SIMPLIFIEDIVRP_M24938
+  Bool bRecon ,
+#endif
+  TComYuv* pcYuv )
 {
   TComResidualGenerator*  pcResidualGenerator = m_pcSlice->getSPS()->getResidualGenerator();
   ROFRS( pcResidualGenerator, false );
-  return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv );
+  return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+    , bRecon 
+#endif
+    );
 }
 #endif
Index: /trunk/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComDataCU.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComDataCU.h	(revision 77)
@@ -521,11 +521,22 @@
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED
-  Bool          getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv = 0 );
+  Bool          getResidualSamples( UInt uiPartIdx, 
+#if QC_SIMPLIFIEDIVRP_M24938
+    Bool bRecon ,
+#endif
+    TComYuv* pcYuv = 0 );
 #endif
   // -------------------------------------------------------------------------------------------------------------------
   // member functions for accessing partition information
   // -------------------------------------------------------------------------------------------------------------------
-  
+#if LG_RESTRICTEDRESPRED_M24766
+  Void          getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false);
+#else
   Void          getPartIndexAndSize   ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight );
+#endif
+#if LG_RESTRICTEDRESPRED_M24766
+  Int           getResiPredMode(UInt uiPartAddr);
+  Void          getPUResiPredShift (Int *iPUPredResiShift, UInt uiAbsPartIndex);
+#endif
   UChar         getNumPartInter       ();
   Bool          isFirstAbsZorderIdxInDepth (UInt uiAbsPartIdx, UInt uiDepth);
Index: /trunk/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComDepthMapGenerator.cpp	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComDepthMapGenerator.cpp	(revision 77)
@@ -122,6 +122,11 @@
 }
 
+#if VIDYO_VPS_INTEGRATION
+Void
+TComDepthMapGenerator::init( TComPrediction* pcPrediction, TComVPSAccess* pcVPSAccess, TComSPSAccess* pcSPSAccess, TComAUPicAccess* pcAUPicAccess )
+#else
 Void
 TComDepthMapGenerator::init( TComPrediction* pcPrediction, TComSPSAccess* pcSPSAccess, TComAUPicAccess* pcAUPicAccess )
+#endif
 {
   AOF( pcPrediction  );
@@ -130,4 +135,7 @@
   uninit();
   m_pcPrediction  = pcPrediction;
+#if VIDYO_VPS_INTEGRATION
+  m_pcVPSAccess   = pcVPSAccess;
+#endif
   m_pcSPSAccess   = pcSPSAccess;
   m_pcAUPicAccess = pcAUPicAccess;
@@ -157,4 +165,7 @@
 
   // update SPS list and AU pic list and set depth map generator in SPS
+#if VIDYO_VPS_INTEGRATION
+  m_pcVPSAccess  ->addVPS( pcPic->getVPS() );
+#endif
   m_pcSPSAccess  ->addSPS( pcPic->getSPS() );
   m_pcAUPicAccess->addPic( pcPic );
@@ -1467,7 +1478,27 @@
   Int           iCurrPosY;
   pcPredDepthMap->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
+#if SAIT_IMPROV_MOTION_PRED_M24829 // max disparity within PU
+  Int DiWidth  = iCurrPosX+(iWidth  >> m_uiSubSampExpX);
+  Int DiHeight = iCurrPosY+(iHeight >> m_uiSubSampExpY);
+  Int maxDepth = MIN_INT;
+
+  for(Int y=iCurrPosY; y<DiHeight ;y++)
+  {
+    for(Int x=iCurrPosX; x<DiWidth; x++)
+    {
+      if(piPredDepthMap[ x + y * iCurrStride ] > maxDepth)
+      {
+        maxDepth = piPredDepthMap[ x + y * iCurrStride ];
+      }
+    }
+  }
+  iCurrPosX  += ( ( iWidth  >> m_uiSubSampExpX ) - 1 ) >> 1;
+  iCurrPosY  += ( ( iHeight >> m_uiSubSampExpY ) - 1 ) >> 1;
+  riPrdDepth  = maxDepth;
+#else
   iCurrPosX  += ( ( iWidth  >> m_uiSubSampExpX ) - 1 ) >> 1;
   iCurrPosY  += ( ( iHeight >> m_uiSubSampExpY ) - 1 ) >> 1;
   riPrdDepth  = piPredDepthMap[ iCurrPosX + iCurrPosY * iCurrStride ];
+#endif
   if( piPosX )
   {
Index: /trunk/source/Lib/TLibCommon/TComDepthMapGenerator.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComDepthMapGenerator.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComDepthMapGenerator.h	(revision 77)
@@ -50,5 +50,21 @@
 
 #if DEPTH_MAP_GENERATION
-
+#if VIDYO_VPS_INTEGRATION
+class TComVPSAccess // would be better to have a real VPS buffer
+{
+public:
+  TComVPSAccess ()  { clear(); }
+  ~TComVPSAccess()  {}
+
+  Void      clear   ()                                { ::memset( m_aacVPS, 0x00, sizeof( m_aacVPS ) ); m_uiActiceVPSId = 0;}
+  Void      addVPS  ( TComVPS* pcVPS )                { m_aacVPS[ pcVPS->getVPSId() ] = pcVPS; }
+  TComVPS*  getVPS  ( UInt uiVPSId )                  { return m_aacVPS[ uiVPSId ]; }
+  TComVPS*  getActiveVPS  ( )                         { return m_aacVPS[ m_uiActiceVPSId ]; }
+  Void      setActiveVPSId  ( UInt activeVPSId )      { m_uiActiceVPSId = activeVPSId; }
+private:
+  TComVPS*  m_aacVPS[ MAX_NUM_VPS ];
+  UInt      m_uiActiceVPSId;
+};
+#endif
 
 class TComSPSAccess // would be better to have a real SPS buffer
@@ -113,4 +129,7 @@
   Void  destroy               ();
 
+#if VIDYO_VPS_INTEGRATION
+  Void  init( TComPrediction* pcPrediction, TComVPSAccess* pcVPSAccess, TComSPSAccess* pcSPSAccess, TComAUPicAccess* pcAUPicAccess );
+#endif
   Void  init                  ( TComPrediction* pcPrediction, TComSPSAccess* pcSPSAccess, TComAUPicAccess* pcAUPicAccess );
   Void  uninit                ();
@@ -136,4 +155,7 @@
 
   TComPrediction*   getPrediction ()  { return m_pcPrediction;  }
+#if VIDYO_VPS_INTEGRATION
+  TComVPSAccess*    getVPSAccess  ()  { return m_pcVPSAccess;   }
+#endif
   TComSPSAccess*    getSPSAccess  ()  { return m_pcSPSAccess;   }
   TComAUPicAccess*  getAUPicAccess()  { return m_pcAUPicAccess; }
@@ -198,4 +220,7 @@
   Bool              m_bDecoder;
   TComPrediction*   m_pcPrediction;
+#if VIDYO_VPS_INTEGRATION
+  TComVPSAccess*    m_pcVPSAccess;
+#endif
   TComSPSAccess*    m_pcSPSAccess;
   TComAUPicAccess*  m_pcAUPicAccess;
Index: /trunk/source/Lib/TLibCommon/TComPic.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComPic.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComPic.h	(revision 77)
@@ -120,4 +120,7 @@
   TComSlice*    getSlice(Int i)       { return  m_apcPicSym->getSlice(i);  }
   TComSlice*    getCurrSlice()        { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx);  }
+#if VIDYO_VPS_INTEGRATION
+  TComVPS*      getVPS()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getVPS();  }
+#endif
   TComSPS*      getSPS()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getSPS();  }
   Int           getPOC()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getPOC();  }
Index: /trunk/source/Lib/TLibCommon/TComResidualGenerator.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComResidualGenerator.cpp	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComResidualGenerator.cpp	(revision 77)
@@ -221,5 +221,9 @@
 
 Bool
-TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv )
+TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+  , Bool bRecon
+#endif
+  )
 {
   AOF(  pcCU );
@@ -231,9 +235,17 @@
   iBlkHeight  = pcCU->getHeight ( 0 );
   pcCU->getPic()->getPicYuvRec()->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iXPos, iYPos );
-  return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv );
+  return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+    , bRecon
+#endif
+    );
 }
   
 Bool
-TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv )
+TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+  , Bool bRecon
+#endif
+  )
 {
   UInt  uiBaseViewId  = m_pcDepthMapGenerator->getBaseViewId( 0 );
@@ -243,7 +255,47 @@
     pcYuv = m_ppcYuvTmp[1];
   }
-  xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv );
+#if QC_SIMPLIFIEDIVRP_M24938
+  UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos;
+#endif
+  xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+    , &uiXPosInRefView , &uiYPosInRefView , bRecon
+#endif
+    );
+
+#if QC_SIMPLIFIEDIVRP_M24938
+  return xIsNonZeroByCBF( uiBaseViewId , uiXPosInRefView , uiYPosInRefView , uiBlkWidth , uiBlkHeight );
+#else
   return xIsNonZero( pcYuv, uiBlkWidth, uiBlkHeight );
-}
+#endif
+}
+
+#if QC_SIMPLIFIEDIVRP_M24938
+Bool TComResidualGenerator::xIsNonZeroByCBF( UInt uiBaseViewId , UInt uiXPos , UInt uiYPos, UInt uiBlkWidth , UInt uiBlkHeight )
+{
+  TComPic* pcBasePic   = m_pcAUPicAccess->getPic( uiBaseViewId );
+  const Int nMaxPicX = pcBasePic->getSPS()->getPicWidthInLumaSamples() - 1;
+  const Int nMaxPicY = pcBasePic->getSPS()->getPicHeightInLumaSamples() - 1;
+  for( UInt y = 0 ; y < uiBlkHeight ; y +=4 )
+  {
+    for( UInt x = 0 ; x <= uiBlkWidth ; x += 4 )
+    {      // to cover both the mapped CU and the 1-pixel-right-shifted mapped CU
+      Int iCuAddr = 0, iAbsZorderIdx = 0;
+      pcBasePic->getPicYuvRec()->getCUAddrAndPartIdx( Min( uiXPos + x , nMaxPicX ) , Min( uiYPos + y , nMaxPicY ) , iCuAddr , iAbsZorderIdx );
+      TComDataCU *pCUInRefView = pcBasePic->getCU( iCuAddr );
+      if( pCUInRefView->isIntra( iAbsZorderIdx ) )
+        // no inter-view residual pred from a intra CU
+        continue;
+      UInt uiTempTrDepth = pCUInRefView->getTransformIdx( iAbsZorderIdx );
+      if( pCUInRefView->getCbf( iAbsZorderIdx , TEXT_LUMA , uiTempTrDepth )
+        || pCUInRefView->getCbf( iAbsZorderIdx , TEXT_CHROMA_U , uiTempTrDepth )
+        || pCUInRefView->getCbf( iAbsZorderIdx , TEXT_CHROMA_V , uiTempTrDepth ) )
+        return( true );
+}
+  }
+
+  return( false );
+}
+#endif
 
 
@@ -335,4 +387,7 @@
   Pel*    pRes      = pcCUResidual->getLumaAddr();
   UInt    uiLumaTrMode, uiChromaTrMode;
+#if LG_RESTRICTEDRESPRED_M24766
+  Int     iPUPredResiShift[4];
+#endif
   pcCU->convertTransIdx             ( 0, pcCU->getTransformIdx( 0 ), uiLumaTrMode, uiChromaTrMode );
 #if H0736_AVC_STYLE_QP_RANGE
@@ -361,7 +416,16 @@
   {
     AOF( pcCU->getResPredAvail( 0 ) );
-    Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvTmp[0] );
+    Bool bOK = pcCU->getResidualSamples( 0, 
+#if QC_SIMPLIFIEDIVRP_M24938
+      true,
+#endif
+      m_ppcYuvTmp[0] );
     AOF( bOK );
+#if LG_RESTRICTEDRESPRED_M24766
+	pcCU->getPUResiPredShift(iPUPredResiShift, 0);
+	pcCUResidual->add(iPUPredResiShift, pcCU->getPartitionSize(0), m_ppcYuvTmp[0], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
+#else
     pcCUResidual->add( m_ppcYuvTmp[0], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
+#endif
   }
 
@@ -423,5 +487,9 @@
 
 Void  
-TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv )
+TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+  , UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon
+#endif
+  )
 {
   //===== set and check some basic variables =====
@@ -456,4 +524,14 @@
   Pel*          pSrcSamplesY= pcBaseRes->getLumaAddr ( 0 ) + uiYPos * iSrcStrideY;
   Pel*          pDesSamplesY= pcYuv    ->getLumaAddr ();
+
+#if QC_SIMPLIFIEDIVRP_M24938
+  if( puiXPosInRefView != NULL )
+    *puiXPosInRefView = Max( 0, Min( iYMaxPosX, iYRefPosX0 ) );
+  if( puiYPosInRefView != NULL )
+    *puiYPosInRefView = uiYPos;
+  if( bRecon == false )
+    return;
+#endif
+
   for(   Int iY = 0; iY < iYHeight; iY++, pSrcSamplesY += iSrcStrideY, pDesSamplesY += iDesStrideY )
   {
Index: /trunk/source/Lib/TLibCommon/TComResidualGenerator.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComResidualGenerator.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComResidualGenerator.h	(revision 77)
@@ -69,6 +69,14 @@
   Void  setRecResidualPic     ( TComPic*      pcPic );
 
-  Bool  getResidualSamples    ( TComDataCU*   pcCU,  UInt uiPUIdx, TComYuv* pcYuv );
-  Bool  getResidualSamples    ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv );
+  Bool  getResidualSamples    ( TComDataCU*   pcCU,  UInt uiPUIdx, TComYuv* pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+    , Bool bRecon
+#endif
+    );
+  Bool  getResidualSamples    ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+    , Bool bRecon
+#endif
+    );
 
 private:
@@ -80,6 +88,13 @@
   Void  xClearResidual        (                      TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight );
 
-  Void  xSetPredResidualBlock ( TComPic*      pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv );
+  Void  xSetPredResidualBlock ( TComPic*      pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 
+#if QC_SIMPLIFIEDIVRP_M24938
+    , UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon
+#endif
+    );
   Bool  xIsNonZero            ( TComYuv*      pcYuv, UInt uiBlkWidth, UInt uiBlkHeight );
+#if QC_SIMPLIFIEDIVRP_M24938
+  Bool  xIsNonZeroByCBF       ( UInt uiBaseViewId , UInt uiXPos , UInt uiYPos, UInt uiBlkWidth , UInt uiBlkHeight );
+#endif
 
   Void  xDumpResidual         ( TComPic*      pcPic, char* pFilenameBase );
Index: /trunk/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComRom.cpp	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComRom.cpp	(revision 77)
@@ -1188,6 +1188,6 @@
   assert( uiWidth == uiHeight );
 
-  UChar    uhStartX,    uhStartY,    uhEndX,    uhEndY;
-  Int   iStepStartX, iStepStartY, iStepEndX, iStepEndY;
+  UChar    uhStartX = 0,    uhStartY = 0,    uhEndX = 0,    uhEndY = 0;
+  Int   iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0;
 
   UInt uiBlockSize = 0;
Index: /trunk/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComSlice.cpp	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComSlice.cpp	(revision 77)
@@ -1305,4 +1305,40 @@
 }
 
+// ------------------------------------------------------------------------------------------------
+// Video parameter set (VPS)
+// ------------------------------------------------------------------------------------------------
+#if VIDYO_VPS_INTEGRATION
+TComVPS::TComVPS()
+: m_VPSId                     (  0)
+, m_uiMaxTLayers              (  1)
+, m_uiMaxLayers               (  1)
+, m_bTemporalIdNestingFlag    (false)
+, m_uiExtensionType           (  0)
+{
+  for( Int i = 0; i < MAX_LAYER_NUM; i++)
+  {
+    m_uiDependentLayer[i] = i? i-1: 0;
+    m_bDependentFlag[i] = false;
+    m_uiViewId[i] = 0;
+    m_bDepthFlag[i] = 0;
+    m_iViewOrderIdx[i] = 0;
+  }
+  
+  for( Int i = 0; i < MAX_TLAYER; i++)
+  {
+    m_numReorderPics[i] = 0;
+    m_uiMaxDecPicBuffering[i] = 0; 
+    m_uiMaxLatencyIncrease[i] = 0;
+  }
+}
+
+TComVPS::~TComVPS()
+{
+	
+	
+}
+
+#endif
+
 
 // ------------------------------------------------------------------------------------------------
@@ -1311,5 +1347,10 @@
 
 TComSPS::TComSPS()
+#if VIDYO_VPS_INTEGRATION
+: m_VPSId                     (  0)
+, m_SPSId                     (  0)
+#else
 : m_SPSId                     (  0)
+#endif
 , m_ProfileIdc                (  0)
 , m_LevelIdc                  (  0)
@@ -2155,4 +2196,7 @@
 , m_ppsMap(MAX_NUM_PPS)
 , m_apsMap(MAX_NUM_APS)
+#if VIDYO_VPS_INTEGRATION
+, m_vpsMap(MAX_NUM_VPS)
+#endif
 {
 }
Index: /trunk/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComSlice.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComSlice.h	(revision 77)
@@ -144,8 +144,81 @@
 #endif
 
+#if VIDYO_VPS_INTEGRATION
+/// VPS class
+
+class TComVPS
+{
+private:
+  Int         m_VPSId;
+	UInt				m_uiMaxTLayers;
+	UInt				m_uiMaxLayers;
+	Bool				m_bTemporalIdNestingFlag;
+
+	UInt        m_uiExtensionType;
+  
+  Bool        m_bDependentFlag[MAX_LAYER_NUM];
+  UInt        m_uiViewId[MAX_LAYER_NUM];
+  Bool        m_bDepthFlag[MAX_LAYER_NUM];
+  Int         m_iViewOrderIdx[MAX_LAYER_NUM];
+  UInt        m_uiDependentLayer[MAX_LAYER_NUM];
+
+  UInt        m_numReorderPics[MAX_TLAYER];
+  UInt        m_uiMaxDecPicBuffering[MAX_TLAYER]; 
+  UInt        m_uiMaxLatencyIncrease[MAX_TLAYER];
+  
+public:
+  TComVPS();
+  virtual ~TComVPS();
+	
+  Int     getVPSId       ()                   { return m_VPSId;          }
+  Void    setVPSId       (Int i)              { m_VPSId = i;             }
+	
+  UInt    getMaxTLayers  ()                   { return m_uiMaxTLayers;   }
+  Void    setMaxTLayers  (UInt t)             { m_uiMaxTLayers = t; }
+    
+  UInt    getMaxLayers   ()                   { return m_uiMaxLayers;   }
+	Void    setMaxLayers   (UInt l)             { m_uiMaxLayers = l; }
+	
+  Bool    getTemporalNestingFlag   ()         { return m_uiMaxLayers;   }
+	Void    setTemporalNestingFlag   (UInt t)   { m_bTemporalIdNestingFlag = t; }
+  
+  Void    setExtensionType(UInt v)                     { m_uiExtensionType = v;    }
+  UInt    getExtensionType()                             { return m_uiExtensionType; }
+  
+  Void    setDependentFlag(Bool d, UInt layer)              { m_bDependentFlag[layer] = d;    }
+  Bool    getDependentFlag(UInt layer)                      { return m_bDependentFlag[layer]; }
+
+  Void    setViewId(UInt v, UInt layer)                     { m_uiViewId[layer] = v;    }
+  UInt    getViewId(UInt layer)                             { return m_uiViewId[layer]; }
+  
+  Void    setDepthFlag(Bool d, UInt layer)                  { m_bDepthFlag[layer] = d;    }
+  Bool    getDepthFlag(UInt layer)                          { return m_bDepthFlag[layer]; }
+
+  Void    setViewOrderIdx(Int v, UInt layer)                { m_iViewOrderIdx[layer] = v;    }
+  Int     getViewOrderIdx(UInt layer)                       { return m_iViewOrderIdx[layer]; }
+  
+  Void    setDependentLayer(UInt v, UInt layer)                     { m_uiDependentLayer[layer] = v;    }
+  UInt    getDependentLayer(UInt layer)                             { return m_uiDependentLayer[layer]; }
+  
+  Void    setNumReorderPics(UInt v, UInt tLayer)                { m_numReorderPics[tLayer] = v;    }
+  UInt    getNumReorderPics(UInt tLayer)                        { return m_numReorderPics[tLayer]; }
+  
+  Void    setMaxDecPicBuffering(UInt v, UInt tLayer)          { m_uiMaxDecPicBuffering[tLayer] = v;    }
+  UInt    getMaxDecPicBuffering(UInt tLayer)                  { return m_uiMaxDecPicBuffering[tLayer]; }
+  
+  Void    setMaxLatencyIncrease(UInt v, UInt tLayer)                { m_uiMaxLatencyIncrease[tLayer] = v;    }
+  UInt    getMaxLatencyIncrease(UInt tLayer)                        { return m_uiMaxLatencyIncrease[tLayer]; }
+  
+};
+
+#endif
+
 /// SPS class
 class TComSPS
 {
 private:
+#if VIDYO_VPS_INTEGRATION
+	Int					m_VPSId;
+#endif
   Int         m_SPSId;
   Int         m_ProfileIdc;
@@ -305,5 +378,8 @@
   TComSPS();
   virtual ~TComSPS();
-
+#if VIDYO_VPS_INTEGRATION
+	Int  getVPSId       ()         { return m_VPSId;          }
+  Void setVPSId       (Int i)    { m_VPSId = i;             }
+#endif
   Int  getSPSId       ()         { return m_SPSId;          }
   Void setSPSId       (Int i)    { m_SPSId = i;             }
@@ -1109,4 +1185,7 @@
   
   // access channel
+#if VIDYO_VPS_INTEGRATION
+  TComVPS*    m_pcVPS;
+#endif
   TComSPS*    m_pcSPS;
   TComPPS*    m_pcPPS;
@@ -1193,5 +1272,8 @@
   Void      initTiles();
 
-  
+#if VIDYO_VPS_INTEGRATION
+  Void      setVPS          ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; }
+  TComVPS*  getVPS          () { return m_pcVPS; }
+#endif
   Void      setSPS          ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; }
   TComSPS*  getSPS          () { return m_pcSPS; }
@@ -1538,5 +1620,11 @@
   ParameterSetManager();
   virtual ~ParameterSetManager();
-
+#if VIDYO_VPS_INTEGRATION
+  //! store video parameter set and take ownership of it 
+  Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); };
+  //! get pointer to existing video parameter set  
+  TComVPS* getVPS(Int vpsId)  { return m_vpsMap.getPS(vpsId); };
+  TComVPS* getFirstVPS()      { return m_vpsMap.getFirstPS(); };
+#endif
   //! store sequence parameter set and take ownership of it 
   Void storeSPS(TComSPS *sps) { m_spsMap.storePS( sps->getSPSId(), sps); };
@@ -1560,4 +1648,7 @@
   ParameterSetMap<TComPPS> m_ppsMap; 
   ParameterSetMap<TComAPS> m_apsMap; 
+#if VIDYO_VPS_INTEGRATION
+  ParameterSetMap<TComVPS> m_vpsMap; 
+#endif
 };
 
Index: /trunk/source/Lib/TLibCommon/TComYuv.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComYuv.cpp	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComYuv.cpp	(revision 77)
@@ -392,5 +392,12 @@
 }
 
-
+#if LG_RESTRICTEDRESPRED_M24766
+Void
+TComYuv::add(Int *iPUResiPredShift, PartSize uhPartitionSize,  TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
+{
+	addLuma   (iPUResiPredShift, uhPartitionSize, pcYuvAdd, iWidth,    iHeight,    bSubtract );
+	addChroma (iPUResiPredShift, uhPartitionSize, pcYuvAdd, iWidth>>1, iHeight>>1, bSubtract );
+}
+#else
 Void
 TComYuv::add( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
@@ -399,7 +406,40 @@
   addChroma ( pcYuvAdd, iWidth>>1, iHeight>>1, bSubtract );
 }
-
+#endif
+
+#if LG_RESTRICTEDRESPRED_M24766
+void
+TComYuv::getPUXYOffset(PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset)
+{
+	switch(uhPartitionSize)
+	{	  
+	case SIZE_2NxN:
+		iXOffset = iWidth;      iYOffset = iHeight >> 1;   break;
+	case SIZE_2NxnU:
+		iXOffset = iWidth;      iYOffset = iHeight >> 2;   break;
+	case SIZE_2NxnD: 
+		iXOffset = iWidth;      iYOffset = (iHeight >> 1) + (iHeight >> 2);   break;
+	case SIZE_Nx2N:
+		iXOffset = iWidth >> 1; iYOffset = iHeight; break;
+	case SIZE_nLx2N:
+		iXOffset = iWidth >> 2; iYOffset = iHeight; break;
+	case SIZE_nRx2N:
+		iXOffset = (iWidth >> 1) + (iWidth >> 2); iYOffset = iHeight; break;
+	case SIZE_NxN:
+		iXOffset = iWidth >> 1; iYOffset = iHeight >> 1;  break;
+	default:
+		assert(uhPartitionSize == SIZE_2Nx2N);
+		iXOffset = iWidth; 	  iYOffset = iHeight;	  break;
+	}
+}
+#endif
+
+#if LG_RESTRICTEDRESPRED_M24766
+Void 
+TComYuv::addLuma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
+#else
 Void
 TComYuv::addLuma( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
+#endif
 {
   Int   iScale      = ( bSubtract ? -1 : 1 );
@@ -408,4 +448,48 @@
   Pel*  pAddSamples = pcYuvAdd->getLumaAddr();
   Pel*  pDstSamples = getLumaAddr();
+
+#if LG_RESTRICTEDRESPRED_M24766
+  Int iXOffset, iYOffset;
+
+  getPUXYOffset(uhPartitionSize, iWidth, iHeight, iXOffset, iYOffset);
+
+  for( Int iY = 0; iY < iYOffset; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride )
+  {
+	  if(iPUResiPredShift[0] >= 0)
+	  {
+		  for( Int iX = 0; iX < iXOffset; iX++ )
+		  {
+			  pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[0]);
+		  }
+	  }
+
+	  if(iPUResiPredShift[1] >= 0)
+	  {
+		  for( Int iX = iXOffset; iX < iWidth; iX++ )
+		  {
+			  pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[1]);
+		  }
+	  }
+  }
+
+  for( Int iY = iYOffset; iY < iHeight; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride )
+  {
+	  if(iPUResiPredShift[2] >= 0)
+	  {
+		  for( Int iX = 0; iX < iXOffset; iX++ )
+		  {
+			  pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[2]);
+		  }
+	  }
+
+	  if(iPUResiPredShift[3] >= 0)
+	  {
+		  for( Int iX = iXOffset; iX < iWidth; iX++ )
+		  {
+			  pDstSamples[iX] += iScale * (pAddSamples[iX] >> iPUResiPredShift[3]);
+		  }
+	  }
+  }
+#else
   for( Int iY = 0; iY < iHeight; iY++, pDstSamples += iDstStride, pAddSamples += iAddStride )
   {
@@ -415,8 +499,14 @@
     }
   }
-}
-
+#endif
+}
+
+#if LG_RESTRICTEDRESPRED_M24766
+Void 
+TComYuv::addChroma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
+#else
 Void
 TComYuv::addChroma( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
+#endif
 {
   Int   iScale        = ( bSubtract ? -1 : 1 );
@@ -427,4 +517,54 @@
   Pel*  pDstSamplesCb = getCbAddr();
   Pel*  pDstSamplesCr = getCrAddr();
+
+#if LG_RESTRICTEDRESPRED_M24766
+  Int iXOffset, iYOffset;
+ 
+  getPUXYOffset(uhPartitionSize, iWidth, iHeight, iXOffset, iYOffset);
+
+  for( Int iY = 0; iY < iYOffset; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride,
+	  pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride  )
+  {
+	  if(iPUResiPredShift[0] >= 0)
+	  {
+		  for( Int iX = 0; iX < iXOffset; iX++ )
+		  {
+			  pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[0]);
+			  pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[0]);
+		  }
+	  }
+
+	  if(iPUResiPredShift[1] >= 0)
+	  {
+		  for( Int iX = iXOffset; iX < iWidth; iX++ )
+		  {
+			  pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[1]);
+			  pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[1]);
+		  }
+	  }
+  }
+
+  for( Int iY = iYOffset; iY < iHeight; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride,
+	  pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride  )
+  {
+	  if(iPUResiPredShift[2] >= 0)
+	  {
+		  for( Int iX = 0; iX < iXOffset; iX++ )
+		  {
+			  pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[2]);
+			  pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[2]);
+		  }
+	  }
+
+	  if(iPUResiPredShift[3] >= 0)
+	  {
+		  for( Int iX = iXOffset; iX < iWidth; iX++ )
+		  {
+			  pDstSamplesCb[iX] += iScale * (pAddSamplesCb[iX] >> iPUResiPredShift[3]);
+			  pDstSamplesCr[iX] += iScale * (pAddSamplesCr[iX] >> iPUResiPredShift[3]);
+		  }
+	  }
+  }
+#else
   for( Int iY = 0; iY < iHeight; iY++, pDstSamplesCb += iDstStride, pAddSamplesCb += iAddStride,
                                        pDstSamplesCr += iDstStride, pAddSamplesCr += iAddStride  )
@@ -436,4 +576,5 @@
     }
   }
+#endif
 }
 
@@ -535,4 +676,11 @@
 }
 
+#if LG_RESTRICTEDRESPRED_M24766
+Void TComYuv::subtract(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
+{
+	subtractLuma  (iPUResiPredShift, uhPartitionSize, pcYuvSrc0, pcYuvSrc1,  uiTrUnitIdx, uiPartSize    );
+	subtractChroma(iPUResiPredShift, uhPartitionSize, pcYuvSrc0, pcYuvSrc1,  uiTrUnitIdx, uiPartSize>>1 );
+}
+#else
 Void TComYuv::subtract( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
 {
@@ -540,6 +688,11 @@
   subtractChroma( pcYuvSrc0, pcYuvSrc1,  uiTrUnitIdx, uiPartSize>>1 );
 }
-
+#endif
+
+#if LG_RESTRICTEDRESPRED_M24766
+Void TComYuv::subtractLuma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
+#else
 Void TComYuv::subtractLuma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
+#endif
 {
   Int x, y;
@@ -552,4 +705,55 @@
   Int  iSrc1Stride = pcYuvSrc1->getStride();
   Int  iDstStride  = getStride();
+
+#if LG_RESTRICTEDRESPRED_M24766
+  Int iXOffset, iYOffset;
+
+  getPUXYOffset(uhPartitionSize, uiPartSize, uiPartSize, iXOffset, iYOffset);
+
+  for ( y = uiPartSize-1; y >= iYOffset; y-- )
+  {
+	  if(iPUResiPredShift[3] >= 0)
+	  {
+		  for ( x = uiPartSize-1; x >= iXOffset; x-- )
+		  {
+			  pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[3]);
+		  }
+	  }
+
+	  if(iPUResiPredShift[2] >= 0)
+	  {
+		  for ( x = iXOffset-1; x >= 0; x-- )
+		  {
+			  pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[2]);
+		  }
+	  }
+	  pSrc0 += iSrc0Stride;
+	  pSrc1 += iSrc1Stride;
+	  pDst  += iDstStride;
+  }
+
+  for ( y = iYOffset-1; y >= 0; y-- )
+  {
+	  if(iPUResiPredShift[1] >= 0)
+	  {
+		  for ( x = uiPartSize-1; x >= iXOffset; x-- )
+		  {
+			  pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[3]);
+		  }
+	  }
+
+	  if(iPUResiPredShift[0] >= 0)
+	  {
+		  for ( x = iXOffset-1; x >= 0; x-- )
+		  {
+			  pDst[x] = pSrc0[x] - (pSrc1[x] >> iPUResiPredShift[2]);
+		  }
+	  }
+	  pSrc0 += iSrc0Stride;
+	  pSrc1 += iSrc1Stride;
+	  pDst  += iDstStride;
+  }
+
+#else
   for ( y = uiPartSize-1; y >= 0; y-- )
   {
@@ -562,7 +766,12 @@
     pDst  += iDstStride;
   }
-}
-
+#endif
+}
+
+#if LG_RESTRICTEDRESPRED_M24766
+Void TComYuv::subtractChroma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
+#else
 Void TComYuv::subtractChroma( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
+#endif
 {
   Int x, y;
@@ -578,4 +787,63 @@
   Int  iSrc1Stride = pcYuvSrc1->getCStride();
   Int  iDstStride  = getCStride();
+#if LG_RESTRICTEDRESPRED_M24766
+  Int iXOffset, iYOffset;
+ 
+  getPUXYOffset(uhPartitionSize, uiPartSize, uiPartSize, iXOffset, iYOffset);
+
+  for ( y = uiPartSize-1; y >= iYOffset; y-- )
+  {
+	  if(iPUResiPredShift[3] >= 0)
+	  {
+		  for ( x = uiPartSize-1; x >= iXOffset; x-- )
+		  {
+			  pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[3]);
+			  pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[3]);
+		  }
+	  }
+
+	  if(iPUResiPredShift[2] >= 0)
+	  {
+		  for ( x = iXOffset-1; x >= 0; x-- )
+		  {
+			  pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[2]);
+			  pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[2]);
+		  }
+	  }
+	  pSrcU0 += iSrc0Stride;
+	  pSrcU1 += iSrc1Stride;
+	  pSrcV0 += iSrc0Stride;
+	  pSrcV1 += iSrc1Stride;
+	  pDstU  += iDstStride;
+	  pDstV  += iDstStride;
+  }
+
+  for ( y = iYOffset-1; y >= 0; y-- )
+  {
+	  if(iPUResiPredShift[1] >= 0)
+	  {
+		  for ( x = uiPartSize-1; x >= iXOffset; x-- )
+		  {
+			  pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[1]);
+			  pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[1]);
+		  }
+	  }
+
+	  if(iPUResiPredShift[0] >= 0)
+	  {
+		  for ( x = iXOffset-1; x >= 0; x-- )
+		  {
+			  pDstU[x] = pSrcU0[x] - (pSrcU1[x]>>iPUResiPredShift[0]);
+			  pDstV[x] = pSrcV0[x] - (pSrcV1[x]>>iPUResiPredShift[0]);
+		  }
+	  }
+	  pSrcU0 += iSrc0Stride;
+	  pSrcU1 += iSrc1Stride;
+	  pSrcV0 += iSrc0Stride;
+	  pSrcV1 += iSrc1Stride;
+	  pDstU  += iDstStride;
+	  pDstV  += iDstStride;
+  }
+#else
   for ( y = uiPartSize-1; y >= 0; y-- )
   {
@@ -592,4 +860,5 @@
     pDstV  += iDstStride;
   }
+#endif
 }
 
Index: /trunk/source/Lib/TLibCommon/TComYuv.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComYuv.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TComYuv.h	(revision 77)
@@ -146,9 +146,14 @@
   Void    addClipPartLuma   ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); //GT
 
-  
+#if LG_RESTRICTEDRESPRED_M24766
   //  pcYuvSrc0 - pcYuvSrc1 -> m_apiBuf
+  Void    subtract          (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
+  Void    subtractLuma      (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
+  Void    subtractChroma    (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
+#else
   Void    subtract          ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
   Void    subtractLuma      ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
   Void    subtractChroma    ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
+#endif
   
   //  (pcYuvSrc0 + pcYuvSrc1)/2 for YUV partition
@@ -161,8 +166,14 @@
   //   Remove High frequency
   Void    removeHighFreq    ( TComYuv* pcYuvSrc, UInt uiPartIdx, UInt uiWidht, UInt uiHeight );
-  
+#if LG_RESTRICTEDRESPRED_M24766
+  void	  getPUXYOffset     (PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset);
+  Void    add               (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract = false );
+  Void    addLuma           (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );
+  Void    addChroma         (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );
+#else
   Void    add               ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract = false );
   Void    addLuma           ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );
   Void    addChroma         ( TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract );
+#endif
 
   Void    clip              ( Int iWidth, Int iHeight );
Index: /trunk/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TypeDef.h	(revision 76)
+++ /trunk/source/Lib/TLibCommon/TypeDef.h	(revision 77)
@@ -46,8 +46,11 @@
 #define HHI_INTER_VIEW_MOTION_PRED        1   // inter-view motion parameter prediction
 #define HHI_INTER_VIEW_RESIDUAL_PRED      1   // inter-view residual prediction
+#define HHI_FIX                           1   // inter-view prediction and other fixes
 
 #define HHI_VSO                           1
 #define HHI_VSO_LS_TABLE                  1
 #define HHI_VSO_DIST_INT                  1
+#define HHI_VSO_SYNTH_DIST_OUT            0
+#define HHI_VSO_COLOR_PLANES              1
 
 #define HHI_INTERVIEW_SKIP                1
@@ -67,6 +70,17 @@
 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC   1   // full-pel mv accuracy for depth maps
 
-
-
+#if HHI_INTER_VIEW_MOTION_PRED
+#define SAIT_IMPROV_MOTION_PRED_M24829  1   // improved inter-view motion vector prediction
+#else
+#define SAIT_IMPROV_MOTION_PRED_M24829  0   
+#endif 
+
+#if HHI_INTER_VIEW_RESIDUAL_PRED
+#define LG_RESTRICTEDRESPRED_M24766     1   // restricted inter-view residual prediction
+#define QC_SIMPLIFIEDIVRP_M24938        1
+#else
+#define LG_RESTRICTEDRESPRED_M24766     0
+#define QC_SIMPLIFIEDIVRP_M24938        0
+#endif
 
 
@@ -344,4 +358,13 @@
 #define COMPLETE_SLICES_IN_TILE     1 // Among the constraints between slices and tiles, all slices within a tile shall be complete (JCTVC-H0348/JCTVC-H0463) for SliceMode 1&2
 #define WPP_SIMPLIFICATION          1 // JCTVC-H0349/JCTVC-0517
+
+// ====================================================================================================================
+// VPS INTEGRATION
+// ====================================================================================================================
+#define VIDYO_VPS_INTEGRATION       1
+#if VIDYO_VPS_INTEGRATION
+#define MAX_NUM_VPS 10
+#endif
+
 // ====================================================================================================================
 // Basic type redefinition
@@ -751,5 +774,4 @@
 };
 
-
 //! \}
 
Index: /trunk/source/Lib/TLibDecoder/NALread.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/NALread.cpp	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/NALread.cpp	(revision 77)
@@ -136,7 +136,10 @@
  //  unsigned reserved_one_5bits = bs.read(5);
  //  assert(reserved_one_5bits == 1);
+#if VIDYO_VPS_INTEGRATION
+  nalu.m_layerId  = bs.read(5) - 1;
+#else
   nalu.m_viewId   = bs.read(4)-1;
   nalu.m_isDepth  = bs.read(1);
-
+#endif
 #if H0566_TLA
   if ( nalu.m_temporalId )
@@ -159,4 +162,7 @@
     {
       nalu.m_temporalId = bs.read(3);
+#if VIDYO_VPS_INTEGRATION
+      nalu.m_layerId    = bs.read(5) - 1;
+#else
       nalu.m_OutputFlag = bs.read(1);
   //    unsigned reserved_one_4bits = bs.read(4);
@@ -164,4 +170,5 @@
       nalu.m_viewId   = bs.read(3)-1;
       nalu.m_isDepth  = bs.read(1);
+#endif
 
 #if H0566_TLA
Index: /trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 77)
@@ -1339,4 +1339,55 @@
 }
 
+#if VIDYO_VPS_INTEGRATION
+Void TDecCavlc::parseVPS(TComVPS* pcVPS)
+{
+  UInt  uiCode;
+  Int   iCode;
+  
+  READ_CODE( 3, uiCode, "max_temporal_layers_minus1" );   pcVPS->setMaxTLayers( uiCode + 1 );
+  READ_CODE( 5, uiCode, "max_layers_minus1" );            pcVPS->setMaxLayers( uiCode + 1 );
+  READ_FLAG( uiCode,  "temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
+  READ_UVLC( uiCode,  "video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
+  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
+  {
+    READ_UVLC( uiCode,  "max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
+    READ_UVLC( uiCode,  "num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
+    READ_UVLC( uiCode,  "max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
+  }
+  
+  READ_CODE( 1, uiCode, "bit_equal_to_one" );             assert( uiCode );
+  
+  if( pcVPS->getMaxLayers() - 1 > 0 )
+  {
+    READ_UVLC( uiCode,  "extension_type" );               pcVPS->setExtensionType( uiCode );
+    
+    pcVPS->setViewOrderIdx( 0, 0 );
+    pcVPS->setViewId( 0, 0 );
+    pcVPS->setDepthFlag( 0, 0 );
+    for(UInt i = 1; i <= pcVPS->getMaxLayers()-1; i++)
+    {
+      READ_FLAG( uiCode, "dependent_flag[i]" );           pcVPS->setDependentFlag( uiCode ? true:false, i);
+      if( pcVPS->getDependentFlag(i) )
+      {
+        READ_UVLC( uiCode,  "delta_reference_layer_id_minus1[i]" ); pcVPS->setDependentLayer( i - uiCode + 1, i );
+        if( pcVPS->getExtensionType() == VPS_EXTENSION_TYPE_MULTI_VIEW )
+        {
+          READ_UVLC( uiCode,  "view_id[i]" );             pcVPS->setViewId( uiCode, i );
+          READ_FLAG( uiCode,  "depth_flag[i]" );          pcVPS->setDepthFlag( uiCode ? true:false, i ); 
+          READ_SVLC( iCode,  "view_order_idx[i]" );       pcVPS->setViewOrderIdx( iCode, i );
+        }
+        
+      }
+    }
+  }
+  
+  READ_FLAG( uiCode,  "vps_extension_flag" );          assert(!uiCode);
+  //future extensions go here..
+  
+  return;
+}
+
+#endif
+
 #if HHI_MPI
 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth)
@@ -1356,4 +1407,7 @@
   READ_CODE( 8,  uiCode, "level_idc" );                          pcSPS->setLevelIdc( uiCode );
   READ_UVLC(     uiCode, "seq_parameter_set_id" );               pcSPS->setSPSId( uiCode );
+#if VIDYO_VPS_INTEGRATION
+  READ_UVLC(     uiCode, "video_parameter_set_id" );             pcSPS->setVPSId( uiCode );
+#endif
   READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
   READ_CODE( 3,  uiCode, "max_temporal_layers_minus1" );         pcSPS->setMaxTLayers( uiCode+1 );
@@ -1837,5 +1891,9 @@
       rpcSlice->setPOC( iPOCmsb+iPOClsb );
 
+#if HHI_FIX
+      if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && rpcSlice->getPOC() == 0 )
+#else
       if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV ) 
+#endif
       {
         TComReferencePictureSet* rps = rpcSlice->getLocalRPS();
Index: /trunk/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 77)
@@ -113,4 +113,7 @@
   Void  parseQtRootCbf      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf );
 
+#if VIDYO_VPS_INTEGRATION
+  Void  parseVPS            ( TComVPS* pcVPS );
+#endif
 #if HHI_MPI
   Void  parseSPS            ( TComSPS* pcSPS, Bool bIsDepth );
Index: /trunk/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 77)
@@ -636,7 +636,17 @@
   {
     AOF( pcCU->getResPredAvail( 0 ) );
-    Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvResPred[uiDepth] );
+    Bool bOK = pcCU->getResidualSamples( 0, 
+#if QC_SIMPLIFIEDIVRP_M24938
+      true,
+#endif
+      m_ppcYuvResPred[uiDepth] );
     AOF( bOK );
+#if LG_RESTRICTEDRESPRED_M24766
+	Int iPUResiPredShift[4];
+	pcCU->getPUResiPredShift(iPUResiPredShift, 0);
+	m_ppcYuvReco[uiDepth]->add(iPUResiPredShift, pcCU->getPartitionSize(0), m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
+#else
     m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
+#endif
   }
 #endif
Index: /trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 77)
@@ -98,5 +98,9 @@
   if( bResPredAllowed )
   {
-    bResPredAvailable       = pcSubCU->getResidualSamples( uiPUIdx );
+    bResPredAvailable       = pcSubCU->getResidualSamples( uiPUIdx 
+#if QC_SIMPLIFIEDIVRP_M24938
+      , false
+#endif
+      );
   }
 
@@ -104,4 +108,9 @@
   if( bResPredAvailable )
   {
+#if LG_RESTRICTEDRESPRED_M24766
+	  Int iPUResiPredShift[4];
+	  pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx);
+	  if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0  || iPUResiPredShift[2] >= 0  || iPUResiPredShift[3] >= 0 )
+#endif
     m_pcEntropyDecoderIf->parseResPredFlag( pcCU, bResPredFlag, uiAbsPartIdx, uiDepth );
   }
Index: /trunk/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecEntropy.h	(revision 77)
@@ -71,4 +71,7 @@
 #endif
 
+#if VIDYO_VPS_INTEGRATION
+  virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
+#endif
 #if HHI_MPI
   virtual Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth )                       = 0;
@@ -163,4 +166,8 @@
   Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
 
+#if VIDYO_VPS_INTEGRATION
+  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
+#endif
+  
 #if HHI_MPI
   Void    decodeSPS                   ( TComSPS* pcSPS, Bool bIsDepth ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, bIsDepth); }
Index: /trunk/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 77)
@@ -87,4 +87,7 @@
   Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
   
+#if VIDYO_VPS_INTEGRATION
+  Void  parseVPS                  ( TComVPS* pcVPS )  {}
+#endif
 #if HHI_MPI
   Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth ) {}
Index: /trunk/source/Lib/TLibDecoder/TDecSlice.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 77)
@@ -446,4 +446,7 @@
 , m_ppsBuffer(16)
 , m_apsBuffer(64)
+#if VIDYO_VPS_INTEGRATION 
+, m_vpsBuffer(16)
+#endif
 {
 
@@ -454,4 +457,18 @@
 
 }
+
+#if VIDYO_VPS_INTEGRATION
+TComVPS* ParameterSetManagerDecoder::getPrefetchedVPS  (Int vpsId)
+{
+  if (m_vpsBuffer.getPS(vpsId) != NULL )
+  {
+    return m_vpsBuffer.getPS(vpsId);
+  }
+  else
+  {
+    return getVPS(vpsId);
+  }
+}
+#endif
 
 TComSPS* ParameterSetManagerDecoder::getPrefetchedSPS  (Int spsId)
@@ -496,4 +513,7 @@
   m_ppsMap.mergePSList(m_ppsBuffer);
   m_spsMap.mergePSList(m_spsBuffer);
+#if VIDYO_VPS_INTEGRATION
+  m_vpsMap.mergePSList(m_vpsBuffer);
+#endif
 }
 
Index: /trunk/source/Lib/TLibDecoder/TDecSlice.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecSlice.h	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecSlice.h	(revision 77)
@@ -96,5 +96,8 @@
   Void     storePrefetchedAPS(TComAPS *aps)  { m_apsBuffer.storePS( aps->getAPSID(), aps); };
   TComAPS* getPrefetchedAPS  (Int apsId);
-
+#if VIDYO_VPS_INTEGRATION
+  Void     storePrefetchedVPS(TComVPS *vps)  { m_vpsBuffer.storePS( vps->getVPSId(), vps); };
+  TComVPS* getPrefetchedVPS  (Int vpsId);
+#endif
   Void     applyPrefetchedPS();
 
@@ -103,4 +106,7 @@
   ParameterSetMap<TComPPS> m_ppsBuffer; 
   ParameterSetMap<TComAPS> m_apsBuffer; 
+#if VIDYO_VPS_INTEGRATION
+	ParameterSetMap<TComVPS> m_vpsBuffer;
+#endif
 };
 
Index: /trunk/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 77)
@@ -319,5 +319,9 @@
   m_tAppDecTop = pcTAppDecTop;
 #if DEPTH_MAP_GENERATION
+#if VIDYO_VPS_INTEGRATION
+  m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getVPSAccess(), m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() );
+#else
   m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() );
+#endif
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED
@@ -571,7 +575,16 @@
   TComSPS *sps = m_parameterSetManagerDecoder.getSPS(pps->getSPSId());
   assert (sps != 0);
-
+#if VIDYO_VPS_INTEGRATION
+  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
+  assert (vps != 0);
+  if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA )
+    // VPS can only be activated on IDR or CRA...
+    getTAppDecTop()->getVPSAccess()->setActiveVPSId( sps->getVPSId() );
+#endif
   m_apcSlicePilot->setPPS(pps);
   m_apcSlicePilot->setSPS(sps);
+#if VIDYO_VPS_INTEGRATION
+  m_apcSlicePilot->setVPS(vps);
+#endif
   pps->setSPS(sps);
 
@@ -613,4 +626,7 @@
   m_apcSlicePilot->setPPS(m_parameterSetManagerDecoder.getPrefetchedPPS(0));
   m_apcSlicePilot->setSPS(m_parameterSetManagerDecoder.getPrefetchedSPS(0));
+#if VIDYO_VPS_INTEGRATION
+  m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
+#endif
   m_apcSlicePilot->initTiles();
 
@@ -629,6 +645,12 @@
   if( m_bFirstSliceInPicture )
   {
+#if VIDYO_VPS_INTEGRATION
+    if( m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId) == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
+    else { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, m_apcSlicePilot->getVPS()->getDepthFlag(nalu.m_layerId) )->getNalUnitTypeBaseView(); }
+#else
     if( nalu.m_viewId == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
     else                     { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, nalu.m_isDepth )->getNalUnitTypeBaseView(); }
+#endif
+    
     m_apcSlicePilot->setNalUnitTypeBaseViewMvc( m_nalUnitTypeBaseView );
   }
@@ -929,9 +951,18 @@
 
     // Set reference list 
+#if VIDYO_VPS_INTEGRATION
+    pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) );
+    pcSlice->setIsDepth( pcSlice->getVPS()->getDepthFlag(nalu.m_layerId) );
+#else
     pcSlice->setViewId(m_viewId);
     pcSlice->setIsDepth(m_isDepth);
+#endif
 
 #if SONY_COLPIC_AVAILABILITY
+#if VIDYO_VPS_INTEGRATION
+    pcSlice->setViewOrderIdx( pcSlice->getVPS()->getViewOrderIdx(nalu.m_layerId) );
+#else
     pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() );
+#endif
 #endif
 
@@ -1051,4 +1082,14 @@
 }
 
+#if VIDYO_VPS_INTEGRATION
+Void TDecTop::xDecodeVPS()
+{
+  TComVPS* vps = new TComVPS();
+  
+  m_cEntropyDecoder.decodeVPS( vps );
+  m_parameterSetManagerDecoder.storePrefetchedVPS(vps);  
+  getTAppDecTop()->getVPSAccess()->addVPS( vps );
+}
+#endif
 
 Void TDecTop::xDecodeSPS()
@@ -1114,4 +1155,9 @@
   switch (nalu.m_nalUnitType)
   {
+#if VIDYO_VPS_INTEGRATION
+    case NAL_UNIT_VPS:
+      xDecodeVPS();
+      return false;
+#endif
     case NAL_UNIT_SPS:
       xDecodeSPS();
Index: /trunk/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 76)
+++ /trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 77)
@@ -208,4 +208,7 @@
   Bool      xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay);
 #endif
+#if VIDYO_VPS_INTEGRATION
+	Void      xDecodeVPS();
+#endif
   Void      xDecodeSPS();
   Void      xDecodePPS();
Index: /trunk/source/Lib/TLibEncoder/NALwrite.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/NALwrite.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/NALwrite.cpp	(revision 77)
@@ -64,4 +64,8 @@
 #endif
 
+#if VIDYO_VPS_INTEGRATION
+  bsNALUHeader.write(nalu.m_temporalId, 3); // temporal_id
+  bsNALUHeader.write(nalu.m_layerId + 1, 5); // layer_id_plus1
+#else
 #if H0388
   bsNALUHeader.write(nalu.m_temporalId, 3); // temporal_id
@@ -90,4 +94,6 @@
   }
 #endif
+#endif
+  
   out.write(bsNALUHeader.getByteStream(), bsNALUHeader.getByteStreamLength());
 
@@ -201,10 +207,17 @@
   naluDest.m_nalRefIDC   = naluSrc.m_nalRefIDC;
 #endif
+#if !VIDYO_VPS_INTEGRATION
   naluDest.m_viewId      = naluSrc.m_viewId;
   naluDest.m_isDepth     = naluSrc.m_isDepth;
+#endif
   naluDest.m_temporalId  = naluSrc.m_temporalId;
+#if VIDYO_VPS_INTEGRATION
+  naluDest.m_layerId = naluSrc.m_layerId;
+#else
+  
 #if !H0388
   naluDest.m_OutputFlag  = naluSrc.m_OutputFlag;
 #endif
+#endif
   naluDest.m_Bitstream   = naluSrc.m_Bitstream;
 }
Index: /trunk/source/Lib/TLibEncoder/NALwrite.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/NALwrite.h	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/NALwrite.h	(revision 77)
@@ -62,11 +62,23 @@
     NalRefIdc nalRefIDC,
 #endif
+#if VIDYO_VPS_INTEGRATION
+    unsigned layerId,
+#else
     Int viewId,
     Bool isDepth,
+#endif
     unsigned temporalID = 0)
 #if NAL_REF_FLAG
+#if VIDYO_VPS_INTEGRATION
+  : NALUnit(nalUnitType, nalRefFlag, layerId, temporalID)
+#else
   : NALUnit(nalUnitType, nalRefFlag, viewId, isDepth, temporalID)
+#endif
+#else
+#if VIDYO_VPS_INTEGRATION
+  : NALUnit(nalUnitType, nalRefIDC, layerId, temporalID)
 #else
   : NALUnit(nalUnitType, nalRefIDC, viewId, isDepth, temporalID)
+#endif
 #endif
   , m_Bitstream()
Index: /trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 77)
@@ -375,4 +375,49 @@
 }
 
+#if VIDYO_VPS_INTEGRATION
+Void TEncCavlc::codeVPS( TComVPS* pcVPS )
+{
+	WRITE_CODE( pcVPS->getMaxTLayers() - 1,     3,        "max_temporal_layers_minus1" );
+  WRITE_CODE( pcVPS->getMaxLayers() - 1,      5,        "max_layers_minus1" );
+  WRITE_FLAG( pcVPS->getTemporalNestingFlag() - 1,      "temporal_id_nesting_flag" );
+  WRITE_UVLC( pcVPS->getVPSId(),                        "video_parameter_set_id" );
+  for(UInt i=0; i <= pcVPS->getMaxTLayers()-1; i++)
+  {
+    WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i),           "max_dec_pic_buffering[i]" );
+    WRITE_UVLC( pcVPS->getNumReorderPics(i),               "num_reorder_pics[i]" );
+    WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i),           "max_latency_increase[i]" );
+  }
+  
+  WRITE_CODE( 1,      1,        "bit_equal_to_one" );
+  
+  if( pcVPS->getMaxLayers() - 1 > 0 )
+  {
+    WRITE_UVLC( pcVPS->getExtensionType(),                        "extension_type" );
+    
+    for(UInt i=1; i <= pcVPS->getMaxLayers()-1; i++)
+    {
+      WRITE_FLAG( pcVPS->getDependentFlag(i),                     "dependent_flag[i]" );
+      if( pcVPS->getDependentFlag(i) )
+      {
+        WRITE_UVLC( i - pcVPS->getDependentLayer(i) - 1,          "delta_reference_layer_id_minus1[i]" );
+        if( pcVPS->getExtensionType() == VPS_EXTENSION_TYPE_MULTI_VIEW )
+        {
+          WRITE_UVLC( pcVPS->getViewId(i),                        "view_id[i]" );
+          WRITE_FLAG( pcVPS->getDepthFlag(i),                     "depth_flag[i]" );
+          WRITE_SVLC( pcVPS->getViewOrderIdx(i),                  "view_order_idx[i]" );
+        }
+        
+      }
+    }
+  }
+  
+  WRITE_FLAG( 0,                     "vps_extension_flag" );
+  
+  //future extensions here..
+  
+  return;
+}
+#endif
+
 #if HHI_MPI
 Void TEncCavlc::codeSPS( TComSPS* pcSPS, Bool bIsDepth )
@@ -388,4 +433,7 @@
   WRITE_CODE( pcSPS->getLevelIdc (),       8,       "level_idc" );
   WRITE_UVLC( pcSPS->getSPSId (),                   "seq_parameter_set_id" );
+#if VIDYO_VPS_INTEGRATION
+  WRITE_UVLC( pcSPS->getVPSId (),                   "video_parameter_set_id" );
+#endif
   WRITE_UVLC( pcSPS->getChromaFormatIdc (),         "chroma_format_idc" );
   WRITE_CODE( pcSPS->getMaxTLayers() - 1,  3,       "max_temporal_layers_minus1" );
@@ -727,6 +775,6 @@
     {
       WRITE_CODE( (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC()))%(1<<pcSlice->getSPS()->getBitsForPOC()), pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb");
-
-      if( pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_IDV )
+#if HHI_FIX
+      if( pcSlice->getPOC() == 0 && pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_IDV )
       {
         TComReferencePictureSet* rps = pcSlice->getRPS();
@@ -799,4 +847,78 @@
         }
       }
+      if( pcSlice->getPOC() != 0 )
+#else
+      if( pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_IDV )
+#endif
+      {
+        TComReferencePictureSet* rps = pcSlice->getRPS();
+        if(pcSlice->getRPSidx() < 0)
+        {
+          WRITE_FLAG( 0, "short_term_ref_pic_set_sps_flag");
+#if RPS_IN_SPS
+          codeShortTermRefPicSet(pcSlice->getSPS(), rps);
+#else
+          codeShortTermRefPicSet(pcSlice->getPPS(), rps);
+#endif
+        }
+        else
+        {
+          WRITE_FLAG( 1, "short_term_ref_pic_set_sps_flag");
+          WRITE_UVLC( pcSlice->getRPSidx(), "short_term_ref_pic_set_idx" );
+        }
+#if RPS_IN_SPS
+        if(pcSlice->getSPS()->getLongTermRefsPresent())
+#else
+        if(pcSlice->getPPS()->getLongTermRefsPresent())
+#endif
+        {
+          WRITE_UVLC( rps->getNumberOfLongtermPictures(), "num_long_term_pics");
+          Int maxPocLsb = 1<<pcSlice->getSPS()->getBitsForPOC();
+          Int prev = 0;
+#if LTRP_MULT
+          Int prevDeltaPocLt=0;
+          Int currDeltaPocLt=0;
+#endif
+          for(Int i=rps->getNumberOfPictures()-1 ; i > rps->getNumberOfPictures()-rps->getNumberOfLongtermPictures()-1; i--)
+          {
+            WRITE_UVLC((maxPocLsb-rps->getDeltaPOC(i)+prev)%maxPocLsb, "delta_poc_lsb_lt");
+          
+#if LTRP_MULT
+            currDeltaPocLt=((maxPocLsb-rps->getDeltaPOC(i)+prev)%maxPocLsb)+prevDeltaPocLt;
+
+            Int deltaMsbCycle=0;
+            if( (i==(rps->getNumberOfPictures()-1)) )
+            {
+              deltaMsbCycle=((-rps->getDeltaPOC(i))/maxPocLsb)-1;
+            }
+            else if( prevDeltaPocLt!=currDeltaPocLt )
+            {
+              deltaMsbCycle=((-rps->getDeltaPOC(i))/maxPocLsb)-1;
+              if( ((prevDeltaPocLt==maxPocLsb-1) && (currDeltaPocLt==maxPocLsb+1)) ||  ((prevDeltaPocLt==maxPocLsb-2) && (currDeltaPocLt==maxPocLsb)))
+              {
+                deltaMsbCycle=deltaMsbCycle-1;
+              }
+            }
+            else
+            {
+              deltaMsbCycle=((rps->getDeltaPOC(i+1)-rps->getDeltaPOC(i))/maxPocLsb)-1;
+            }
+
+            if(deltaMsbCycle>=0)
+            {
+              WRITE_FLAG( 1, "delta_poc_msb_present_flag");
+              WRITE_UVLC(deltaMsbCycle, "delta_poc_msb_cycle_lt_minus1");
+            }
+            else
+            {
+              WRITE_FLAG( 0, "delta_poc_msb_present_flag");
+            }
+            prevDeltaPocLt=currDeltaPocLt;
+#endif
+            prev = rps->getDeltaPOC(i);
+            WRITE_FLAG( rps->getUsed(i), "used_by_curr_pic_lt_flag"); 
+          }
+        }
+      }
     }
 
Index: /trunk/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCavlc.h	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncCavlc.h	(revision 77)
@@ -114,4 +114,8 @@
   UInt  getCoeffCost          ()                { return  m_uiCoeffCost;  }
   
+#if VIDYO_VPS_INTEGRATION
+  Void  codeVPS                 ( TComVPS* pcVPS );
+#endif
+
 #if HHI_MPI
   Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth );
Index: /trunk/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncCfg.h	(revision 77)
@@ -290,4 +290,8 @@
 #endif
 
+#if VIDYO_VPS_INTEGRATION
+  UInt     m_layerId;
+#endif
+  
   Int      m_viewId;
   Bool     m_isDepth;
@@ -765,4 +769,8 @@
   Int       getTSIG()                            { return m_signHidingThreshold; }
 #endif
+#if VIDYO_VPS_INTEGRATION
+  Void      setLayerId             ( UInt layerId )   { m_layerId = layerId; }
+  UInt      getLayerId             ()               { return m_layerId; }
+#endif
 
   Void      setViewId             ( Int viewId )   { m_viewId = viewId; }
Index: /trunk/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncCu.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncCu.cpp	(revision 77)
@@ -604,5 +604,9 @@
         if( bResPredAllowed )
         {
-          bResPredAvailable       = rpcBestCU->getResidualSamples( 0, m_ppcResPredTmp[uiDepth] );
+          bResPredAvailable       = rpcBestCU->getResidualSamples( 0, 
+#if QC_SIMPLIFIEDIVRP_M24938
+            true ,
+#endif
+            m_ppcResPredTmp[uiDepth] );
         }
 
@@ -698,5 +702,9 @@
         if( bResPredAllowed )
         {
-          bResPredAvailable       = rpcBestCU->getResidualSamples( 0, m_ppcResPredTmp[uiDepth] );
+          bResPredAvailable       = rpcBestCU->getResidualSamples( 0, 
+#if QC_SIMPLIFIEDIVRP_M24938
+            true,
+#endif
+            m_ppcResPredTmp[uiDepth] );
         }
 
@@ -1903,4 +1911,5 @@
   
 #if HHI_INTER_VIEW_RESIDUAL_PRED
+#if !LG_RESTRICTEDRESPRED_M24766
   if( rpcTempCU->getResPredFlag( 0 ) )
   { // subtract residual prediction from original in motion search
@@ -1908,9 +1917,14 @@
   }
 #endif
+#endif
 
 #if AMP_MRG
   rpcTempCU->setMergeAMP (true);
   #if HHI_INTERVIEW_SKIP
+#if LG_RESTRICTEDRESPRED_M24766
+  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG  );
+#else
   m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG  );
+#endif
 #else
   m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], false, bUseMRG );
@@ -1925,8 +1939,10 @@
 
 #if HHI_INTER_VIEW_RESIDUAL_PRED
+#if !LG_RESTRICTEDRESPRED_M24766
   if( rpcTempCU->getResPredFlag( 0 ) )
   { // add residual prediction to original again
     m_ppcOrigYuv[uhDepth]->add( m_ppcResPredTmp [uhDepth], rpcTempCU->getWidth( 0 ), rpcTempCU->getHeight( 0 ) );
   }
+#endif
 #endif
 
Index: /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 77)
@@ -121,4 +121,16 @@
 }
 
+#if VIDYO_VPS_INTEGRATION
+Void TEncEntropy::encodeVPS( TComVPS* pcVPS )
+{
+  m_pcEntropyCoderIf->codeVPS( pcVPS );
+  return;
+}
+#endif
+
+#if VIDYO_VPS_INTEGRATION
+Void  codeVPS                 ( TComVPS* pcVPS );
+#endif
+
 #if HHI_MPI
 Void TEncEntropy::encodeSPS( TComSPS* pcSPS, Bool bIsDepth )
@@ -471,5 +483,9 @@
   ROTVS( pcCU->isIntra           ( uiAbsPartIdx )              );
   ROFVS( pcCU->getResPredAvail   ( uiAbsPartIdx )              );
-
+#if LG_RESTRICTEDRESPRED_M24766
+  Int iPUResiPredShift[4];
+  pcCU->getPUResiPredShift(iPUResiPredShift, uiAbsPartIdx);
+  if(iPUResiPredShift[0] >= 0 || iPUResiPredShift[1] >= 0  || iPUResiPredShift[2] >= 0  || iPUResiPredShift[3] >= 0 )
+#endif
   // encode flag
   m_pcEntropyCoderIf->codeResPredFlag( pcCU, uiAbsPartIdx );
Index: /trunk/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncEntropy.h	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncEntropy.h	(revision 77)
@@ -76,4 +76,8 @@
   virtual UInt  getCoeffCost          ()                = 0;
 
+#if VIDYO_VPS_INTEGRATION
+	virtual Void  codeVPS                 ( TComVPS* pcVPS )                                      = 0;
+#endif
+	
 #if HHI_MPI
   virtual Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth )                       = 0;
@@ -229,4 +233,7 @@
   
 public:
+#if VIDYO_VPS_INTEGRATION
+	Void encodeVPS               ( TComVPS* pcVPS);
+#endif
   // SPS
 #if HHI_MPI
Index: /trunk/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 77)
@@ -246,5 +246,9 @@
 
       std::vector<TComAPS>& vAPS = m_pcEncTop->getAPS();
+#if VIDYO_VPS_INTEGRATION
+    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getEncTop()->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
+#else
       m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
+#endif
       pcSlice->setLastIDR(m_iLastIDR);
       pcSlice->setSliceIdx(0);
@@ -809,6 +813,19 @@
       if ( m_bSeqFirst )
       {
+#if VIDYO_VPS_INTEGRATION
+        {
+          OutputNALUnit nalu(NAL_UNIT_VPS, true, m_pcEncTop->getLayerId());
+          m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
+          m_pcEntropyCoder->encodeVPS(m_pcEncTop->getEncTop()->getVPS());
+          writeRBSPTrailingBits(nalu.m_Bitstream);
+          accessUnit.push_back(new NALUnitEBSP(nalu));
+        }
+#endif
 #if NAL_REF_FLAG
+#if VIDYO_VPS_INTEGRATION
+        OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getLayerId());
+#else
         OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
+#endif
 #else
         OutputNALUnit nalu(NAL_UNIT_SPS, NAL_REF_IDC_PRIORITY_HIGHEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
@@ -827,5 +844,9 @@
 
 #if NAL_REF_FLAG
+#if VIDYO_VPS_INTEGRATION 
+        nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId());
+#else
         nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
+#endif
 #else
         nalu = NALUnit(NAL_UNIT_PPS, NAL_REF_IDC_PRIORITY_HIGHEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
@@ -954,11 +975,28 @@
 #if H0388
 #if NAL_REF_FLAG
-        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(), m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() );
-#else
-        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced() ? NAL_REF_IDC_PRIORITY_HIGHEST: NAL_REF_IDC_PRIORITY_LOWEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() );
-#endif
-#else
-        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced() ? NAL_REF_IDC_PRIORITY_HIGHEST: NAL_REF_IDC_PRIORITY_LOWEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer(), true);
-#endif
+        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(),
+#if !VIDYO_VPS_INTEGRATION
+                           m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() );
+#else
+                           m_pcEncTop->getLayerId(), pcSlice->getTLayer() );
+#endif
+#else
+        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced() ? NAL_REF_IDC_PRIORITY_HIGHEST: NAL_REF_IDC_PRIORITY_LOWEST, 
+#if !VIDYO_VPS_INTEGRATION
+                           m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() );
+#else
+                           m_pcEncTop->getLayerId(), pcSlice->getTLayer() );
+#endif
+#endif
+#else
+        OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced() ? NAL_REF_IDC_PRIORITY_HIGHEST: NAL_REF_IDC_PRIORITY_LOWEST, 
+#if !VIDYO_VPS_INTEGRATION
+                           m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer(), true );
+#else
+                           m_pcEncTop->getLayerId(), pcSlice->getTLayer(), true );
+#endif
+
+#endif
+            
         Bool bEntropySlice = (!pcSlice->isNextSlice());
         if (!bEntropySlice)
@@ -1414,5 +1452,9 @@
           {
 #if NAL_REF_FLAG
+#if VIDYO_VPS_INTEGRATION
+            OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getLayerId());
+#else
             OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
+#endif
 #else
             OutputNALUnit nalu(NAL_UNIT_APS, NAL_REF_IDC_PRIORITY_HIGHEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
@@ -1476,5 +1518,9 @@
 
 #if NAL_REF_FLAG
+#if VIDYO_VPS_INTEGRATION
+        OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getLayerId());
+#else
         OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
+#endif
 #else
         OutputNALUnit nalu(NAL_UNIT_SEI, NAL_REF_IDC_PRIORITY_LOWEST, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth());
@@ -1962,4 +2008,5 @@
   
 #if HHI_VSO
+#if HHI_VSO_SYNTH_DIST_OUT
   if ( m_pcRdCost->getUseRenModel() )
   {
@@ -1975,4 +2022,5 @@
   }
   else
+#endif
 #endif
   {
Index: /trunk/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 77)
@@ -342,4 +342,12 @@
 }
 
+#if VIDYO_VPS_INTEGRATION
+Void TEncSbac::codeVPS( TComVPS* pcVPS )
+{
+	assert (0);
+  return;
+}
+#endif
+
 #if HHI_MPI
 Void TEncSbac::codeSPS( TComSPS* pcSPS, Bool bIsDepth )
Index: /trunk/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSbac.h	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncSbac.h	(revision 77)
@@ -98,4 +98,8 @@
   //--SBAC RD
 
+#if VIDYO_VPS_INTEGRATION
+  Void  codeVPS                 ( TComVPS* pcVPS );
+#endif
+	
 #if HHI_MPI
   Void  codeSPS                 ( TComSPS* pcSPS, Bool bIsDepth );
Index: /trunk/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 77)
@@ -2505,5 +2505,9 @@
 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand )
 #else
+#if LG_RESTRICTEDRESPRED_M24766
+Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
+#else
 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
+#endif
 #endif
 {
@@ -2553,5 +2557,8 @@
   const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 );
 #endif
-
+#if LG_RESTRICTEDRESPRED_M24766
+  Int iPUResiPredShift[4];
+  Int iLastAddResiShift = -1000;
+#endif
   ruiCost = MAX_UINT;
   for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
@@ -2565,5 +2572,33 @@
       pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
       pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
-
+#if LG_RESTRICTEDRESPRED_M24766
+	  Int iAddResiShift;
+	  UInt uiPartAddr;
+	  Int iRoiWidth, iRoiHeight;
+
+	  pcCU->getPartIndexAndSize( iPUIdx, uiPartAddr, iRoiWidth, iRoiHeight );
+	  iAddResiShift = pcCU->getResiPredMode(uiPartAddr);
+	  iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || pcCU->getInterDir(uiPartAddr) != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1 - iAddResiShift : -1);
+
+	  if( pcCU->getResPredFlag( 0 ))
+	  { // subtract residual prediction from original in motion search
+		  if(iLastAddResiShift != iAddResiShift)
+		  {
+			  //add subtracted residual last time
+			  if(iLastAddResiShift >= 0)
+			  {
+				  iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;
+				  pcYuvOrg->add(iPUResiPredShift, ePartSize, rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
+			  }
+			  //subtract residual
+			  if(iAddResiShift >= 0)
+			  {
+				  iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iAddResiShift;
+				  pcYuvOrg->add(iPUResiPredShift, ePartSize, rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );
+			  }
+			  iLastAddResiShift = iAddResiShift;
+		  }
+	  }
+#endif
       xGetInterPredictionError( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() );
       uiBitsCand = uiMergeCand + 1;
@@ -2587,4 +2622,11 @@
     }
   }
+#if LG_RESTRICTEDRESPRED_M24766
+  if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
+  {
+	  iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;
+	  pcYuvOrg->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
+  }
+#endif
 }
 
@@ -2599,5 +2641,9 @@
  */
 #if AMP_MRG
+#if LG_RESTRICTEDRESPRED_M24766
+Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG )
+#else
 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG )
+#endif
 #else
 Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes )
@@ -2702,5 +2748,7 @@
     for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT;
     UInt          uiBitsTempL0[MAX_NUM_REF];
-
+#if LG_RESTRICTEDRESPRED_M24766
+	Int iPUResiPredShift[4] = {0, 0, 0, 0};
+#endif
     xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits);
     
@@ -2718,5 +2766,7 @@
     {
 #endif
-
+#if LG_RESTRICTEDRESPRED_M24766
+		Bool bLastResiFlag = false;
+#endif
     //  Uni-directional prediction
     for ( Int iRefList = 0; iRefList < iNumPredDir; iRefList++ )
@@ -2726,4 +2776,21 @@
       for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ )
       {
+#if LG_RESTRICTEDRESPRED_M24766
+		  if( pcCU->getResPredFlag( 0 ))
+		  {
+			  if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp))
+			  { // subtract residual prediction from original in motion search
+				  if(!bLastResiFlag)
+					  pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );
+				  bLastResiFlag = true;
+			  }
+			  else
+			  {
+				  if(bLastResiFlag)
+					  pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
+				  bLastResiFlag = false;
+			  }
+		  }
+#endif
         uiBitsTemp = uiMbBits[iRefList];
         if ( pcCU->getSlice()->getNumRefIdx(eRefPicList) > 1 )
@@ -2889,8 +2956,16 @@
       }
     }
+#if LG_RESTRICTEDRESPRED_M24766
+	if( pcCU->getResPredFlag( 0 ) && bLastResiFlag)
+	{ // subtract residual prediction from original in motion search
+		pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
+	}
+#endif
     //  Bi-directional prediction
     if ( pcCU->getSlice()->isInterB() )
     {
-      
+#if LG_RESTRICTEDRESPRED_M24766
+		Int iLastAddResiShift = -1000;
+#endif
       cMvBi[0] = cMv[0];            cMvBi[1] = cMv[1];
       iRefIdxBi[0] = iRefIdx[0];    iRefIdxBi[1] = iRefIdx[1];
@@ -2994,4 +3069,35 @@
 #else
           uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS];
+#endif
+#if LG_RESTRICTEDRESPRED_M24766
+		  Int iAddResiShift = -1, iPredFrom = 0;
+		  Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr);
+
+		  iPredFrom = iBestRefIdx >= 0 ? 3 : 1;
+		  if(iBestRefIdx >= 0 && pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx))
+			  iAddResiShift++;
+		  if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp))
+			  iAddResiShift++;
+		  iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || iPredFrom != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
+
+		  if( pcCU->getResPredFlag( 0 ) )
+		  {
+			  if(iLastAddResiShift != iAddResiShift)
+			  {
+				  //add substracted residual last time
+				  if(iLastAddResiShift >= 0 )
+				  {
+					  iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;
+					  pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
+				  }
+				  //substract residual
+				  if(iAddResiShift >= 0)
+				  {
+					  iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iAddResiShift;
+					  pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true );
+				  }
+				  iLastAddResiShift = iAddResiShift;
+			  }
+		  }
 #endif
           // call ME
@@ -3049,4 +3155,11 @@
         }
       } // for loop-iter
+#if LG_RESTRICTEDRESPRED_M24766
+	  if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
+	  {
+		  iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = iLastAddResiShift;
+		  pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
+	  }
+#endif
     } // if (B_SLICE)
 #if ZERO_MVD_EST
@@ -3255,6 +3368,21 @@
       if (bTestNormalMC)
       {
+#if LG_RESTRICTEDRESPRED_M24766
+		  Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr);
+		  iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \
+			  (pcCU->getSlice()->getPPS()->getUseWP() || pcCU->getInterDir(uiPartAddr) != 3)? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1);
+		  if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)
+		  {
+			  pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ), true);
+		  }
+#endif
         xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() );
         uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits );
+#if LG_RESTRICTEDRESPRED_M24766
+		if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)
+		{
+			pcOrgYuv->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcResiPredYuv, pcCU->getWidth( 0 ), pcCU->getHeight( 0 ));
+		}
+#endif
       }
 #else
@@ -3274,5 +3402,9 @@
       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
 #else
+#if LG_RESTRICTEDRESPRED_M24766
+      xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
+#else
       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
+#endif
 #endif
       if ( uiMRGCost < uiMECost )
@@ -4116,5 +4248,7 @@
   UInt      uiWidth      = pcCU->getWidth ( 0 );
   UInt      uiHeight     = pcCU->getHeight( 0 );
-  
+#if LG_RESTRICTEDRESPRED_M24766
+  Int       iPUResiPredShift[4];
+#endif
   //  No residual coding : SKIP mode
   if ( ePredMode == MODE_SKIP && bSkipRes )
@@ -4128,5 +4262,10 @@
     if( pcCU->getResPredFlag( 0 ) )
     {
+#if LG_RESTRICTEDRESPRED_M24766
+		pcCU->getPUResiPredShift(iPUResiPredShift, 0);
+		rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResPrd, uiWidth, uiHeight );
+#else
       rpcYuvRec->add( rpcYuvResPrd, uiWidth, uiHeight );
+#endif
       rpcYuvRec->clip( uiWidth, uiHeight );
     }
@@ -4237,10 +4376,20 @@
   else
   {
+#if LG_RESTRICTEDRESPRED_M24766
+	  iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;
+	  rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth );
+#else
   rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth );
+#endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED
     // subtract residual prediction
     if( pcCU->getResPredFlag( 0 ) )
     {
+#if LG_RESTRICTEDRESPRED_M24766
+		pcCU->getPUResiPredShift(iPUResiPredShift, 0);
+		rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResi, rpcYuvResPrd, 0, uiWidth );
+#else
       rpcYuvResi->subtract( rpcYuvResi, rpcYuvResPrd, 0, uiWidth );
+#endif
     }
 #endif
@@ -4456,6 +4605,13 @@
   {
     pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );
+#if LG_RESTRICTEDRESPRED_M24766
+	pcCU->getPUResiPredShift(iPUResiPredShift, 0);
+	rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResPrd,   uiWidth, uiHeight );
+	iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;
+    rpcYuvRec->add(iPUResiPredShift, pcCU->getPartitionSize(0), rpcYuvResiBest, uiWidth, uiHeight );
+#else
     rpcYuvRec->add( rpcYuvResPrd,   uiWidth, uiHeight );
     rpcYuvRec->add( rpcYuvResiBest, uiWidth, uiHeight );
+#endif
     rpcYuvRec->clip( uiWidth, uiHeight );
   }
Index: /trunk/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSearch.h	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncSearch.h	(revision 77)
@@ -188,4 +188,7 @@
   Void predInterSearch          ( TComDataCU* pcCU,
                                   TComYuv*    pcOrgYuv,
+#if LG_RESTRICTEDRESPRED_M24766
+								  TComYuv*     rpcResiPredYuv,
+#endif
                                   TComYuv*&   rpcPredYuv,
                                   TComYuv*&   rpcResiYuv,
@@ -440,4 +443,7 @@
   Void xMergeEstimation           ( TComDataCU*     pcCU,
                                     TComYuv*        pcYuvOrg,
+#if LG_RESTRICTEDRESPRED_M24766
+									TComYuv*        rpcResiPredYuv, 
+#endif
                                     Int             iPartIdx,
                                     UInt&           uiInterDir,
Index: /trunk/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 77)
@@ -161,5 +161,9 @@
  \param pPPS          PPS associated with the slice
  */
+#if VIDYO_VPS_INTEGRATION
+Void TEncSlice::initEncSlice( TComPic* pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS * pVPS, TComSPS* pSPS, TComPPS *pPPS )
+#else
 Void TEncSlice::initEncSlice( TComPic* pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS )
+#endif
 {
   Double dQP;
@@ -167,4 +171,7 @@
   
   rpcSlice = pcPic->getSlice(0);
+#if VIDYO_VPS_INTEGRATION
+  rpcSlice->setVPS( pVPS );
+#endif
   rpcSlice->setSPS( pSPS );
   rpcSlice->setPPS( pPPS );
Index: /trunk/source/Lib/TLibEncoder/TEncSlice.h
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSlice.h	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncSlice.h	(revision 77)
@@ -110,6 +110,9 @@
   
   /// preparation of slice encoding (reference marking, QP and lambda)
+#if VIDYO_VPS_INTEGRATION
+  Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS );
+#else
   Void    initEncSlice        ( TComPic*  pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS );
-
+#endif
   // compress and encode slice
   Void    precompressSlice    ( TComPic*& rpcPic                                );      ///< precompress slice for multi-loop opt.
Index: /trunk/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 76)
+++ /trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 77)
@@ -348,5 +348,9 @@
 
 #if DEPTH_MAP_GENERATION
+#if VIDYO_VPS_INTEGRATION
+  m_cDepthMapGenerator.init( (TComPrediction*)this->getPredSearch(), m_pcTAppEncTop->getVPSAccess(), m_pcTAppEncTop->getSPSAccess(), m_pcTAppEncTop->getAUPicAccess() );
+#else
   m_cDepthMapGenerator.init( (TComPrediction*)this->getPredSearch(), m_pcTAppEncTop->getSPSAccess(), m_pcTAppEncTop->getAUPicAccess() );
+#endif
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED
@@ -977,5 +981,9 @@
 Void TEncTop::selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid,TComList<TComPic*>& listPic )
 {
+#if HHI_FIX
+  if( slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && POCCurr == 0 )
+#else
   if( slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV )
+#endif
   {
     TComReferencePictureSet* rps = slice->getLocalRPS();
Index: /trunk/source/Lib/TLibExtractor/TExtrTop.cpp
===================================================================
--- /trunk/source/Lib/TLibExtractor/TExtrTop.cpp	(revision 76)
+++ /trunk/source/Lib/TLibExtractor/TExtrTop.cpp	(revision 77)
@@ -55,10 +55,23 @@
 Bool TExtrTop::extract( InputNALUnit& nalu, std::set<UInt>& rsuiExtractLayerIds )
 {
+#if VIDYO_VPS_INTEGRATION
+	//extraction now has to be done using layer_id
+  UInt uiLayerId = nalu.m_layerId;
+#else
   UInt uiLayerId = xGetLayerId( nalu.m_viewId, nalu.m_isDepth );
-
+#endif
   // Initialize entropy decoder
   m_cEntropyDecoder.setEntropyDecoder( &m_cCavlcDecoder );
   m_cEntropyDecoder.setBitstream     ( nalu.m_Bitstream );
   
+#if VIDYO_VPS_INTEGRATION
+  if ( nalu.m_nalUnitType == NAL_UNIT_VPS )
+  {
+    // a hack for now assuming there's only one VPS in the bitstream
+    m_cEntropyDecoder.decodeVPS( &m_cVPS );
+      
+  }
+#endif
+
   if ( nalu.m_nalUnitType == NAL_UNIT_SPS )
   {
@@ -69,5 +82,9 @@
 #endif
 #if HHI_MPI
+#if VIDYO_VPS_INTEGRATION
+     m_cEntropyDecoder.decodeSPS( &cSPS, m_cVPS.getDepthFlag(uiLayerId) );
+#else
      m_cEntropyDecoder.decodeSPS( &cSPS, nalu.m_isDepth );
+#endif
 #else
      m_cEntropyDecoder.decodeSPS( &cSPS );
Index: /trunk/source/Lib/TLibExtractor/TExtrTop.h
===================================================================
--- /trunk/source/Lib/TLibExtractor/TExtrTop.h	(revision 76)
+++ /trunk/source/Lib/TLibExtractor/TExtrTop.h	(revision 77)
@@ -54,4 +54,7 @@
 {
 private:
+#if VIDYO_VPS_INTEGRATION
+  TComVPS                 m_cVPS;
+#endif
    std::list<TComSPS>      m_acSPSBuffer;
 
Index: /trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
===================================================================
--- /trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp	(revision 76)
+++ /trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp	(revision 77)
@@ -214,5 +214,8 @@
   AOT( (ppiShiftLutLeft  == NULL) && (m_iMode == 0 || m_iMode == 2) );
   AOT( (ppiShiftLutRight == NULL) && (m_iMode == 1 || m_iMode == 2) );
+#if HHI_FIX
+#else
   AOT( pcOrgVideo != NULL && bKeepReference );
+#endif
 
   m_appiShiftLut[0] = ppiShiftLutLeft;
@@ -222,5 +225,9 @@
   m_pcPicYuvRef = pcOrgVideo;
 
+#if HHI_FIX
+  if ( pcOrgVideo && !bKeepReference )
+#else
   if ( pcOrgVideo )
+#endif
   {
     TRenFilter::copy(             pcOrgVideo->getLumaAddr(), pcOrgVideo->getStride() , m_iWidth,      m_iHeight,      m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]);
