Index: /branches/0.2-poznan-univ/build/HM_vc8.sln
===================================================================
--- /branches/0.2-poznan-univ/build/HM_vc8.sln	(revision 10)
+++ /branches/0.2-poznan-univ/build/HM_vc8.sln	(revision 11)
@@ -4,17 +4,18 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppDecoder", "vc8\TAppDecoder_vc8.vcproj", "{A7A515D9-E917-4706-BD5B-57DC6C78D612}"
 	ProjectSection(ProjectDependencies) = postProject
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}
+		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
+		{F8B77A48-AF6C-4746-A89F-B706ABA6AD94} = {F8B77A48-AF6C-4746-A89F-B706ABA6AD94}
+		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
 		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
-		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
-		{F8B77A48-AF6C-4746-A89F-B706ABA6AD94} = {F8B77A48-AF6C-4746-A89F-B706ABA6AD94}
-		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppEncoder", "vc8\TAppEncoder_vc8.vcproj", "{D759E4E1-D33A-4483-B57B-0FD248E022FE}"
 	ProjectSection(ProjectDependencies) = postProject
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
+		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
+		{47E90995-1FC5-4EE4-A94D-AD474169F0E1} = {47E90995-1FC5-4EE4-A94D-AD474169F0E1}
+		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
 		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}
-		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
-		{47E90995-1FC5-4EE4-A94D-AD474169F0E1} = {47E90995-1FC5-4EE4-A94D-AD474169F0E1}
-		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
-		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
 	EndProjectSection
 EndProject
@@ -31,8 +32,8 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppRenderer", "vc8\TAppRenderer_vc8.vcproj", "{CE149235-A923-4BA7-B552-3A02287CD3E4}"
 	ProjectSection(ProjectDependencies) = postProject
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
+		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
+		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
 		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}
-		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
-		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
-		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
 	EndProjectSection
 EndProject
Index: /branches/0.2-poznan-univ/build/HM_vc9.sln
===================================================================
--- /branches/0.2-poznan-univ/build/HM_vc9.sln	(revision 10)
+++ /branches/0.2-poznan-univ/build/HM_vc9.sln	(revision 11)
@@ -4,20 +4,21 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppDecoder", "vc9\TAppDecoder_vc9.vcproj", "{A7A515D9-E917-4706-BD5B-57DC6C78D612}"
 	ProjectSection(ProjectDependencies) = postProject
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}
+		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
 		{F8B77A48-AF6C-4746-A89F-B706ABA6AD94} = {F8B77A48-AF6C-4746-A89F-B706ABA6AD94}
 		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
-		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} = {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppEncoder", "vc9\TAppEncoder_vc9.vcproj", "{D759E4E1-D33A-4483-B57B-0FD248E022FE}"
 	ProjectSection(ProjectDependencies) = postProject
-		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
 		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
 		{47E90995-1FC5-4EE4-A94D-AD474169F0E1} = {47E90995-1FC5-4EE4-A94D-AD474169F0E1}
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} = {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9} = {457993C6-AE2C-4B9B-B5F9-71033279A0B9}
+		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppCommon", "vc9\TAppCommon_vc9.vcproj", "{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppCommon", "vc9\TAppCommon_vc9.vcproj", "{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibCommon", "vc9\TLibCommon_vc9.vcproj", "{78018D78-F890-47E3-A0B7-09D273F0B11D}"
@@ -29,13 +30,13 @@
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibVideoIO", "vc9\TLibVideoIO_vc9.vcproj", "{5280C25A-D316-4BE7-AE50-29D72108624F}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppRenderer", "vc9\TAppRenderer_vc9.vcproj", "{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppRenderer", "vc9\TAppRenderer_vc9.vcproj", "{CE149235-A923-4BA7-B552-3A02287CD3E4}"
 	ProjectSection(ProjectDependencies) = postProject
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
 		{5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F}
 		{78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} = {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9} = {457993C6-AE2C-4B9B-B5F9-71033279A0B9}
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc9\TLibRenderer_vc9.vcproj", "{457993C6-AE2C-4B9B-B5F9-71033279A0B9}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc9\TLibRenderer_vc9.vcproj", "{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}"
 EndProject
 Global
@@ -63,12 +64,12 @@
 		{D759E4E1-D33A-4483-B57B-0FD248E022FE}.Release|x64.ActiveCfg = Release|x64
 		{D759E4E1-D33A-4483-B57B-0FD248E022FE}.Release|x64.Build.0 = Release|x64
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}.Debug|Win32.ActiveCfg = Debug|Win32
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}.Debug|Win32.Build.0 = Debug|Win32
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}.Debug|x64.ActiveCfg = Debug|x64
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}.Debug|x64.Build.0 = Debug|x64
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}.Release|Win32.ActiveCfg = Release|Win32
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}.Release|Win32.Build.0 = Release|Win32
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}.Release|x64.ActiveCfg = Release|x64
-		{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}.Release|x64.Build.0 = Release|x64
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}.Debug|Win32.Build.0 = Debug|Win32
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}.Debug|x64.ActiveCfg = Debug|x64
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}.Debug|x64.Build.0 = Debug|x64
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}.Release|Win32.ActiveCfg = Release|Win32
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}.Release|Win32.Build.0 = Release|Win32
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}.Release|x64.ActiveCfg = Release|x64
+		{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}.Release|x64.Build.0 = Release|x64
 		{78018D78-F890-47E3-A0B7-09D273F0B11D}.Debug|Win32.ActiveCfg = Debug|Win32
 		{78018D78-F890-47E3-A0B7-09D273F0B11D}.Debug|Win32.Build.0 = Debug|Win32
@@ -103,20 +104,20 @@
 		{5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.ActiveCfg = Release|x64
 		{5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.Build.0 = Release|x64
-		{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Debug|Win32.ActiveCfg = Debug|Win32
-		{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Debug|Win32.Build.0 = Debug|Win32
-		{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Debug|x64.ActiveCfg = Debug|x64
-		{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Debug|x64.Build.0 = Debug|x64
-		{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Release|Win32.ActiveCfg = Release|Win32
-		{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Release|Win32.Build.0 = Release|Win32
-		{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Release|x64.ActiveCfg = Release|x64
-		{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Release|x64.Build.0 = Release|x64
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Debug|Win32.ActiveCfg = Debug|Win32
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Debug|Win32.Build.0 = Debug|Win32
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Debug|x64.ActiveCfg = Debug|x64
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Debug|x64.Build.0 = Debug|x64
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|Win32.ActiveCfg = Release|Win32
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|Win32.Build.0 = Release|Win32
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|x64.ActiveCfg = Release|x64
-		{457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|x64.Build.0 = Release|x64
+		{CE149235-A923-4BA7-B552-3A02287CD3E4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CE149235-A923-4BA7-B552-3A02287CD3E4}.Debug|Win32.Build.0 = Debug|Win32
+		{CE149235-A923-4BA7-B552-3A02287CD3E4}.Debug|x64.ActiveCfg = Debug|x64
+		{CE149235-A923-4BA7-B552-3A02287CD3E4}.Debug|x64.Build.0 = Debug|x64
+		{CE149235-A923-4BA7-B552-3A02287CD3E4}.Release|Win32.ActiveCfg = Release|Win32
+		{CE149235-A923-4BA7-B552-3A02287CD3E4}.Release|Win32.Build.0 = Release|Win32
+		{CE149235-A923-4BA7-B552-3A02287CD3E4}.Release|x64.ActiveCfg = Release|x64
+		{CE149235-A923-4BA7-B552-3A02287CD3E4}.Release|x64.Build.0 = Release|x64
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Debug|Win32.Build.0 = Debug|Win32
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Debug|x64.ActiveCfg = Debug|x64
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Debug|x64.Build.0 = Debug|x64
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|Win32.ActiveCfg = Release|Win32
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|Win32.Build.0 = Release|Win32
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|x64.ActiveCfg = Release|x64
+		{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|x64.Build.0 = Release|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /branches/0.2-poznan-univ/build/vc9/TAppCommon_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TAppCommon_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TAppCommon_vc9.vcproj	(revision 11)
@@ -4,8 +4,7 @@
 	Version="9.00"
 	Name="TAppCommon"
-	ProjectGUID="{D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}"
+	ProjectGUID="{8783AD3A-A5CA-42B7-AAC4-A07EB845A684}"
 	RootNamespace="TAppCommon"
 	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
 	>
 	<Platforms>
@@ -114,5 +113,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -242,5 +240,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
Index: /branches/0.2-poznan-univ/build/vc9/TAppDecoder_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TAppDecoder_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TAppDecoder_vc9.vcproj	(revision 11)
@@ -7,5 +7,4 @@
 	RootNamespace="TAppDecoder"
 	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
 	>
 	<Platforms>
@@ -88,4 +87,7 @@
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 			/>
@@ -160,4 +162,7 @@
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 			/>
@@ -196,5 +201,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -233,4 +237,7 @@
 			<Tool
 				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
 			/>
 			<Tool
@@ -272,5 +279,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -309,4 +315,7 @@
 			<Tool
 				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
 			/>
 			<Tool
Index: /branches/0.2-poznan-univ/build/vc9/TAppEncoder_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TAppEncoder_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TAppEncoder_vc9.vcproj	(revision 11)
@@ -2,10 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="9,00"
+	Version="9.00"
 	Name="TAppEncoder"
 	ProjectGUID="{D759E4E1-D33A-4483-B57B-0FD248E022FE}"
 	RootNamespace="TAppEncoder"
 	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
 	>
 	<Platforms>
@@ -45,6 +44,6 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
 				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -68,76 +67,4 @@
 				SubSystem="1"
 				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
-			IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
-			ConfigurationType="1"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="2"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				TargetMachine="17"
 			/>
 			<Tool
@@ -192,9 +119,8 @@
 				EnableIntrinsicFunctions="false"
 				FavorSizeOrSpeed="1"
+				PreprocessorDefinitions="WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
 				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
-				PreprocessorDefinitions="WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -215,4 +141,76 @@
 				SubSystem="1"
 				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(SolutionDir)\..\bin\vc9\$(PlatformName)\$(ConfigurationName)\"
+			IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="17"
 			/>
 			<Tool
@@ -268,9 +266,8 @@
 				EnableIntrinsicFunctions="false"
 				FavorSizeOrSpeed="1"
+				PreprocessorDefinitions="WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
 				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
-				PreprocessorDefinitions="WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
Index: /branches/0.2-poznan-univ/build/vc9/TAppRenderer_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TAppRenderer_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TAppRenderer_vc9.vcproj	(revision 11)
@@ -4,8 +4,7 @@
 	Version="9,00"
 	Name="TAppRenderer"
-	ProjectGUID="{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}"
+	ProjectGUID="{CE149235-A923-4BA7-B552-3A02287CD3E4}"
 	RootNamespace="TAppRenderer"
 	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
 	>
 	<Platforms>
@@ -87,4 +86,7 @@
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 			/>
@@ -158,4 +160,7 @@
 			/>
 			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
 				Name="VCPostBuildEventTool"
 			/>
@@ -193,5 +198,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -230,4 +234,7 @@
 			<Tool
 				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
 			/>
 			<Tool
@@ -268,5 +275,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -305,4 +311,7 @@
 			<Tool
 				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
 			/>
 			<Tool
Index: /branches/0.2-poznan-univ/build/vc9/TLibCommon_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TLibCommon_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TLibCommon_vc9.vcproj	(revision 11)
@@ -7,5 +7,4 @@
 	RootNamespace="TLibCommon"
 	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
 	>
 	<Platforms>
@@ -82,66 +81,4 @@
 		</Configuration>
 		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
-			IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
-			ConfigurationType="4"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
 			Name="Release|Win32"
 			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
@@ -176,5 +113,66 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
+			IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
+			ConfigurationType="4"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
+				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -238,9 +236,8 @@
 				EnableIntrinsicFunctions="false"
 				FavorSizeOrSpeed="1"
+				PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_WARNINGS"
 				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
-				PreprocessorDefinitions="WIN32;_LIB;_CRT_SECURE_NO_WARNINGS"
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -522,5 +519,5 @@
 			</File>
 			<File
-				RelativePath="..\..\source\Lib\TLibCommon\TComWeightPrediction.cpp"
+				RelativePath="..\..\source\Lib\TLibCommon\TComWeightPrediction.h"
 				>
 			</File>
Index: /branches/0.2-poznan-univ/build/vc9/TLibDecoder_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TLibDecoder_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TLibDecoder_vc9.vcproj	(revision 11)
@@ -7,5 +7,4 @@
 	RootNamespace="TLibDecoder"
 	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
 	>
 	<Platforms>
@@ -82,4 +81,66 @@
 		</Configuration>
 		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
+			IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
+			ConfigurationType="4"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
+				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
 			Name="Release|Win32"
 			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
@@ -114,67 +175,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
-			IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
-			ConfigurationType="4"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
-				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -242,5 +240,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
Index: /branches/0.2-poznan-univ/build/vc9/TLibEncoder_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TLibEncoder_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TLibEncoder_vc9.vcproj	(revision 11)
@@ -7,5 +7,4 @@
 	RootNamespace="TLibEncoder"
 	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
 	>
 	<Platforms>
@@ -82,4 +81,66 @@
 		</Configuration>
 		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
+			IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
+			ConfigurationType="4"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
+				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
 			Name="Release|Win32"
 			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
@@ -114,67 +175,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
-			IntermediateDirectory="$(SolutionDir)\vc9\$(PlatformName)\$(ConfigurationName)\$(RootNamespace)"
-			ConfigurationType="4"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
-				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -242,5 +240,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
Index: /branches/0.2-poznan-univ/build/vc9/TLibRenderer_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TLibRenderer_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TLibRenderer_vc9.vcproj	(revision 11)
@@ -4,8 +4,7 @@
 	Version="9,00"
 	Name="TLibRenderer"
-	ProjectGUID="{457993C6-AE2C-4B9B-B5F9-71033279A0B9}"
+	ProjectGUID="{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}"
 	RootNamespace="TLibRenderer"
 	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
 	>
 	<Platforms>
@@ -173,5 +172,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -238,5 +236,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
Index: /branches/0.2-poznan-univ/build/vc9/TLibVideoIO_vc9.vcproj
===================================================================
--- /branches/0.2-poznan-univ/build/vc9/TLibVideoIO_vc9.vcproj	(revision 10)
+++ /branches/0.2-poznan-univ/build/vc9/TLibVideoIO_vc9.vcproj	(revision 11)
@@ -114,5 +114,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
@@ -242,5 +241,4 @@
 				StringPooling="true"
 				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
 				DebugInformationFormat="3"
Index: /branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.cpp	(revision 11)
@@ -1339,5 +1339,4 @@
 }
 
-
 Void
 TAppComCamPara::check( Bool bCheckViewRange, Bool bCheckFrameRange )
@@ -1457,4 +1456,30 @@
 }
 
+#if POZNAN_SYNTH
+Bool
+TAppComCamPara::getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft)
+{
+  riNearestViewIdx = 0;
+
+  Bool bDecencdingVN = ( m_aiSortedBaseViews.size() >= 2 && m_aiSortedBaseViews[ 0 ] > m_aiSortedBaseViews[ 1 ] );
+  Int  iFactor       = ( bDecencdingVN ? -1 : 1 );
+
+  if( ( m_aiBaseId2SortedId[iSynthViewIdx] - m_aiBaseId2SortedId[riNearestViewIdx] ) * iFactor  <= 0 )
+  {
+    rbRenderFromLeft = true;
+  }
+  else
+  {
+    rbRenderFromLeft = false;
+  }
+
+  riRelDistToLeft = 128; //Not used for now;
+
+  return true;
+}
+#endif
+
+
+
 Int TAppComCamPara::getRelDistLeft( Int iSynthViewIdx, Int iLeftViewIdx, Int iRightViewIdx )
 {
Index: /branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.h
===================================================================
--- /branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.h	(revision 11)
@@ -182,4 +182,8 @@
   Int                 synthRelNum2Idx           ( Int iRelNum );
   Bool getLeftRightBaseView( Int iSynthViewIdx, Int &riLeftViewIdx, Int &riRightViewIdx, Int &riRelDistToLeft, Bool& rbIsBaseView );
+#if POZNAN_SYNTH
+  Bool getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft);
+#endif
+
   Int                 getRelDistLeft            ( Int iSynthViewIdx, Int   iLeftViewIdx, Int iRightViewIdx );
   UInt                getCurFrameId             ()  { return m_iCurrentFrameId;   }
Index: /branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.cpp	(revision 11)
@@ -163,4 +163,8 @@
     if( eNalUnitType == NAL_UNIT_SPS )
     {
+#if POZNAN_SYNTH
+      if(cComSPS.getViewId()==0 && !cComSPS.isDepth()) // it should be called at first view at the begining of the stream
+        initRenderer(cComSPS);
+#endif
       if( cComSPS.isDepth() && (m_bUsingDepth==false) )  // expected not using depth, but bitstream are using depth
       {                                                     // know from sps
@@ -539,2 +543,75 @@
   return pcRefPic;
 }
+
+#if POZNAN_SYNTH
+Void TAppDecTop::initRenderer(TComSPS &cComSPS)
+{
+  m_cAvailabilityRenderer.init(cComSPS.getWidth(), cComSPS.getHeight(),true,0,LOG2_DISP_PREC_LUT,true, 0,0,0,0,0,6,4,1,0,6 );  //GT: simplest configuration
+}
+//*
+Void TAppDecTop::storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx, Int iCurPoc, Bool bDepth)
+{
+  Int  iLeftViewIdx  = -1;
+  Int  iRightViewIdx = -1;
+  Int  iNearestViewIdx = -1;
+  Bool bIsBaseView;
+  Bool bRenderFromLeft;
+
+  Int iRelDistToLeft = 128;
+  if(iCoddedViewIdx==0) //First on View Coded List
+  {
+    TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, false );
+    return;
+  }
+  iNearestViewIdx = 0;
+  bRenderFromLeft = iCoddedViewOrderIdx>0?true:false;
+  //m_cCamParsCollector.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft);
+
+  m_cAvailabilityRenderer.setShiftLUTs(
+    m_cCamParsCollector.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],
+    m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
+    m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
+    m_cCamParsCollector.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right
+    m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
+    m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
+    iRelDistToLeft
+  );
+
+  TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, bDepth );
+
+  TComPicYuv* pcPicYuvSynthView = pcPic->getPicYuvSynth();
+  TComPicYuv* pcPicYuvAvailView = pcPic->getPicYuvAvail();
+  if(!pcPicYuvSynthView)
+  {
+    pcPic->addSynthesisBuffer();
+    pcPicYuvSynthView = pcPic->getPicYuvSynth();
+  }
+  if(!pcPicYuvAvailView)
+  {
+    pcPic->addAvailabilityBuffer();
+    pcPicYuvAvailView = pcPic->getPicYuvAvail();
+  }
+
+  //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft );
+  m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft );
+
+  pcPicYuvAvailView->setBorderExtension( false );//Needed??
+  pcPicYuvAvailView->extendPicBorder();//Needed??
+
+#if POZNAN_OUTPUT_AVAILABLE_MAP
+  {
+  Char acFilenameBase[1024];
+  ::sprintf( acFilenameBase,  "Available_%s_%s_V%d.yuv", (bDepth ? "Depth":"Tex"),( true ? "Dec" : "Enc" ), iCoddedViewIdx);
+  pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0);
+  }
+#endif
+#if POZNAN_OUTPUT_SYNTH
+  {
+  Char acFilenameBase[1024];
+  ::sprintf( acFilenameBase,  "Synth_%s_%s_V%d.yuv", (bDepth ? "Depth":"Tex"),( true ? "Dec" : "Enc" ), iCoddedViewIdx );
+  pcPicYuvSynthView->dump(acFilenameBase, iCurPoc!=0);
+  }
+#endif
+  
+}
+#endif
Index: /branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.h
===================================================================
--- /branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.h	(revision 11)
@@ -52,4 +52,7 @@
 #include "../../Lib/TLibCommon/TComDepthMapGenerator.h"
 #include "../../Lib/TLibDecoder/TDecTop.h"
+#if POZNAN_SYNTH
+#include "../../Lib/TLibRenderer/TRenTop.h"
+#endif
 #include "TAppDecCfg.h"
 
@@ -87,4 +90,9 @@
 #endif
 
+#if POZNAN_SYNTH
+  TRenTop                         m_cAvailabilityRenderer;
+#endif
+
+
 public:
   TAppDecTop();
@@ -96,4 +104,9 @@
   Void  increaseNumberOfViews	(Int iNewNumberOfViews);
   Void  startUsingDepth() ;
+
+#if POZNAN_SYNTH
+  Void  initRenderer(TComSPS &cComSPS);
+  Void  storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx,Int iCurPoc,Bool bDepth);
+#endif
 
 // GT FIX
Index: /branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp	(revision 11)
@@ -435,4 +435,9 @@
 #endif
 
+#if POZNAN_SYNTH
+  //m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,0,true, 0,0,0,0,0,0,0,1,0,0 );  //GT: simplest configuration
+  m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,LOG2_DISP_PREC_LUT,true, 0,0,0,0,0,6,4,1,0,6 );  //GT: simplest configuration
+#endif
+
 #if HHI_INTERVIEW_SKIP
   m_cUsedPelsRenderer.init(m_iSourceWidth, m_iSourceHeight, true, 0, LOG2_DISP_PREC_LUT, true, 0, 0, 0, 0, 0, 6, 4, 1, 0, 6 );
@@ -692,4 +697,7 @@
     for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ )     // Start encoding
     {
+#if POZNAN_SYNTH
+      xStoreSynthPicsInBuffer(iViewIdx,false);
+#endif
       bool bThisViewContinueReadingPics = bContinueReadingPics[iViewIdx];
       m_acTEncTopList[iViewIdx]->encode( bEos[iViewIdx], m_cListPicYuvRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingPics );
@@ -708,4 +716,7 @@
       if( m_bUsingDepthMaps )
       {
+#if POZNAN_SYNTH
+        xStoreSynthPicsInBuffer(iViewIdx,true);
+#endif
         bool bThisViewContinueReadingDepthPics = bContinueReadingDepthPics[iViewIdx];
         m_acTEncDepthTopList[iViewIdx]->encode( bDepthEos[iViewIdx], m_cListPicYuvDepthRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingDepthPics );
@@ -1177,4 +1188,89 @@
 #endif
 
+#if POZNAN_SYNTH
+Void TAppEncTop::xStoreSynthPicsInBuffer(Int iCoddedViewIdx,Bool bDepth)
+{
+  Int iCurPoc;
+  if(bDepth)
+  {
+    iCurPoc = m_acTEncDepthTopList[ iCoddedViewIdx ]->getNextFrameId();
+    if (!(m_acTEncDepthTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return;
+  }
+  else
+  {
+    iCurPoc = m_acTEncTopList[ iCoddedViewIdx ]->getNextFrameId();
+    if (!(m_acTEncTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return;
+  }
+  
+  Int iNumberOfReferenceViews = 0;
+  UInt iSynthViewIdx;
+  // Get Left and right view
+  Int  iLeftViewIdx  = -1;
+  Int  iRightViewIdx = -1;
+  Int  iNearestViewIdx = -1;
+  Bool bIsBaseView;
+  Bool bRenderFromLeft;
+
+  Int iRelDistToLeft;
+  if(iCoddedViewIdx==0) //First on View Coded List
+  {
+    //TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, false );
+    return;
+  }
+  m_cCameraData.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft);
+
+  m_cAvailabilityRenderer.setShiftLUTs(
+    m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],
+    m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
+    m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
+    m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right
+    m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
+    m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx],
+    iRelDistToLeft
+  );
+    
+
+  TComPicYuv* pcPicYuvERView = new TComPicYuv;
+  pcPicYuvERView->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
+
+  TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, bDepth );
+  pcPic->addSynthesisBuffer();
+  pcPic->addAvailabilityBuffer();
+  TComPicYuv* pcPicYuvSynthView = pcPic->getPicYuvSynth();
+  TComPicYuv* pcPicYuvAvailView = pcPic->getPicYuvAvail();
+  
+  //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft );
+  m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, bDepth )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft );
+      
+  pcPicYuvAvailView->setBorderExtension( false );//Needed??
+  pcPicYuvAvailView->extendPicBorder();//Needed??
+
+  pcPicYuvSynthView->setBorderExtension( false );//Needed??
+  pcPicYuvSynthView->extendPicBorder();//Needed??
+
+  //TComPic* pcPicDepth = xGetPicFromView( iCoddedViewIdx, iCurPoc, true );
+  //pcPicDepth->addAvailabilityBuffer();
+  //pcPicDepth->addSynthesisBuffer();
+  //pcPicYuvAvailView->copyToPic(pcPicDepth->getPicYuvAvail());
+      
+#if POZNAN_OUTPUT_AVAILABLE_MAP
+  {
+  Char acFilenameBase[1024];
+  ::sprintf( acFilenameBase,  "Available_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx );
+  pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0);
+  }
+#endif
+#if POZNAN_OUTPUT_SYNTH
+  {
+  Char acFilenameBase[1024];
+  ::sprintf( acFilenameBase,  "Synth_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx );
+  pcPicYuvERView->dump(acFilenameBase, iCurPoc!=0);
+  }
+#endif
+
+      //Usun pcPicYuvERView i inne bufforki
+}
+#endif
+
 #if HHI_INTERVIEW_SKIP
 Void TAppEncTop::getUsedPelsMap( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedSplsMap )
Index: /branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- /branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.h	(revision 11)
@@ -92,4 +92,8 @@
 #endif
 
+#if POZNAN_SYNTH
+  TRenTop                     m_cAvailabilityRenderer;
+#endif
+
 protected:
   // initialization
@@ -154,5 +158,11 @@
   Void  xStoreVSORefPicsInBuffer();                                                   ///< read in External Ref pic from file and store in buffer
 #endif
-  
+
+
+#if POZNAN_SYNTH
+private:
+  Void  xStoreSynthPicsInBuffer(Int iCoddedViewIdx, Bool bDepth);
+#endif
+
 };// END CLASS DEFINITION TAppEncTop
 
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/CommonDef.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/CommonDef.h	(revision 11)
@@ -58,5 +58,5 @@
 
 #define HM_VERSION        "3.0rc2"                 ///< Current software version
-#define NV_VERSION        "0.2"                   ///< Current software version
+#define NV_VERSION        "0.3"                   ///< Current software version
 
 // ====================================================================================================================
@@ -137,5 +137,4 @@
 #define LOG2_DISP_PREC_LUT   				2		  		///< log2 of disparity precision used in integer disparity LUTs
 
-
 #if ( HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED )
 #define DEPTH_MAP_GENERATION        1
@@ -171,6 +170,11 @@
 #define OUTPUT_RESIDUAL_PICTURES          0         // output residual pictures (for debugging)
 
-#define HHI_MPI_MERGE_POS                     0         // position of mvi in merge list (0..5)
-
+#define HHI_MPI_MERGE_POS                 0           // position of mvi in merge list (0..5)
+
+// ====================================================================================================================
+// POZNAN DEFINE SECTION
+// ====================================================================================================================
+#define POZNAN_OUTPUT_AVAILABLE_MAP       0           // output available map (for debugging)
+#define POZNAN_OUTPUT_SYNTH               0           // output synthesised view (for debugging)
 
 // ====================================================================================================================
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.cpp	(revision 11)
@@ -2711,5 +2711,9 @@
     pcCULeft = NULL;
   }
-  if( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx ) )
+  if( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx ) 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+    && !pcCULeft->isCUSkiped( uiLeftPartIdx )
+#endif
+  )
   {
     abCandIsInter[uiLeftAddr] = true;
@@ -2737,5 +2741,9 @@
     pcCUAbove = NULL;
   }
-  if ( pcCUAbove && !pcCUAbove->isIntra( uiAbovePartIdx ) )
+  if ( pcCUAbove && !pcCUAbove->isIntra( uiAbovePartIdx ) 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+    && !pcCUAbove->isCUSkiped( uiAbovePartIdx )
+#endif
+  )
   {
     abCandIsInter[uiAboveAddr] = true;
@@ -3271,5 +3279,9 @@
   if( uiIter == 0 )
   {
-    if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) )
+    if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+       && !pcCorner->isCUSkiped( uiCornerPUIdx )
+#endif
+    )
     {
       rbValidCand = true;
@@ -3306,5 +3318,9 @@
   else
   {
-    if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) )
+    if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+       && !pcCorner->isCUSkiped( uiCornerPUIdx )
+#endif
+    )
     {
       rbValidCand = true;
@@ -4425,4 +4441,9 @@
   if (pColCU->isIntra(uiPartIdxCenter))
     return false;
+
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  if (pColCU->isSkipped(uiPartIdxCenter))
+    return false;
+#endif
   
   if( m_pcSlice->getRefPic(eRefPicList, iRefIdx)->getViewIdx() != m_pcSlice->getViewIdx() )
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDataCU.h	(revision 11)
@@ -529,4 +529,7 @@
   Bool          isIntra   ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; }
   Bool          isSkipped ( UInt uiPartIdx );                                                     ///< SKIP (no residual)
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  Bool          isCUSkiped( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_SYNTH; }
+#endif
   
   // -------------------------------------------------------------------------------------------------------------------
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDepthMapGenerator.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComDepthMapGenerator.cpp	(revision 11)
@@ -971,4 +971,10 @@
     xInterPredictCUDepthMap( pcSubCU, pcSubDM );
     break;
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  case MODE_SYNTH:
+    //What to do? Need Fix!
+    xIntraPredictCUDepthMap( pcSubCU, pcSubDM );
+    break;
+#endif
   default:
     AOT( true );
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComLoopFilter.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComLoopFilter.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComLoopFilter.cpp	(revision 11)
@@ -444,11 +444,19 @@
   
   //-- Set BS for Intra MB : BS = 4 or 3
-  if ( pcCUP->isIntra(uiPartP) || pcCUQ->isIntra(uiPartQ) )
+  if ( pcCUP->isIntra(uiPartP) || pcCUQ->isIntra(uiPartQ) 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+     || pcCUP->isCUSkiped(uiPartP) || pcCUQ->isCUSkiped(uiPartQ) 
+#endif
+  )
   {
     uiBs = bAtCUBoundary ? 4 : 3;   // Intra MB && MB boundary
   }
-  
+
   //-- Set BS for not Intra MB : BS = 2 or 1 or 0
-  if ( !pcCUP->isIntra(uiPartP) && !pcCUQ->isIntra(uiPartQ) )
+  if ( !pcCUP->isIntra(uiPartP) && !pcCUQ->isIntra(uiPartQ) 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+     && !pcCUP->isCUSkiped(uiPartP) && !pcCUQ->isCUSkiped(uiPartQ) 
+#endif
+  )
   {
     if ( pcCUQ->getCbf( uiPartQ, TEXT_LUMA, pcCUQ->getTransformIdx(uiPartQ)) != 0 || pcCUP->getCbf( uiPartP, TEXT_LUMA, pcCUP->getTransformIdx(uiPartP) ) != 0)
@@ -527,5 +535,12 @@
     }   // enf of "if( one of BCBP == 0 )"
   }   // enf of "if( not Intra )"
-  
+
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU //if one of the block is CUSkipped dont use loop filter
+  if ( pcCUP->isCUSkiped(uiPartP) || pcCUQ->isCUSkiped(uiPartQ))
+  {
+    uiBs = 0;
+  }
+#endif
+
   m_aapucBS[iDir][0][uiAbsPartIdx] = uiBs;
   if ( bAtCUBoundary || bAtCUHalf )
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.cpp	(revision 11)
@@ -50,4 +50,10 @@
   m_apcPicYuv[0]      = NULL;
   m_apcPicYuv[1]      = NULL;
+#if POZNAN_AVAIL_MAP
+  m_apcPicYuvAvail     = NULL;
+#endif
+#if POZNAN_SYNTH_VIEW
+  m_apcPicYuvSynth     = NULL;
+#endif
 #if DEPTH_MAP_GENERATION
   m_pcPredDepthMap    = NULL;
@@ -116,4 +122,21 @@
     m_apcPicYuv[1]  = NULL;
   }
+#if POZNAN_AVAIL_MAP
+  if (m_apcPicYuvAvail)
+  {
+    m_apcPicYuvAvail->destroy();
+    delete m_apcPicYuvAvail;
+    m_apcPicYuvAvail  = NULL;
+  }
+#endif
+
+#if POZNAN_SYNTH_VIEW
+  if (m_apcPicYuvSynth)
+  {
+    m_apcPicYuvSynth->destroy();
+    delete m_apcPicYuvSynth;
+    m_apcPicYuvSynth  = NULL;
+  }
+#endif
   
 #if DEPTH_MAP_GENERATION
@@ -193,4 +216,36 @@
 }
 
+#if POZNAN_AVAIL_MAP
+Void
+TComPic::addAvailabilityBuffer()
+{
+  AOT( m_apcPicYuvAvail );
+  AOF( m_apcPicYuv[1] );
+  Int   iWidth        = m_apcPicYuv[1]->getWidth      ();
+  Int   iHeight       = m_apcPicYuv[1]->getHeight     ();
+  UInt  uiMaxCuWidth  = m_apcPicYuv[1]->getMaxCuWidth ();
+  UInt  uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight();
+  UInt  uiMaxCuDepth  = m_apcPicYuv[1]->getMaxCuDepth ();
+  m_apcPicYuvAvail      = new TComPicYuv;
+  m_apcPicYuvAvail      ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
+}
+#endif
+
+#if POZNAN_SYNTH_VIEW
+Void
+TComPic::addSynthesisBuffer()
+{
+  AOT( m_apcPicYuvSynth );
+  AOF( m_apcPicYuv[1] );
+  Int   iWidth        = m_apcPicYuv[1]->getWidth      ();
+  Int   iHeight       = m_apcPicYuv[1]->getHeight     ();
+  UInt  uiMaxCuWidth  = m_apcPicYuv[1]->getMaxCuWidth ();
+  UInt  uiMaxCuHeight = m_apcPicYuv[1]->getMaxCuHeight();
+  UInt  uiMaxCuDepth  = m_apcPicYuv[1]->getMaxCuDepth ();
+  m_apcPicYuvSynth      = new TComPicYuv;
+  m_apcPicYuvSynth      ->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth );
+}
+#endif
+
 #if PARALLEL_MERGED_DEBLK
 Void
@@ -284,4 +339,30 @@
 }
 
+#if POZNAN_AVAIL_MAP
+Void
+TComPic::removeAvailabilityBuffer()
+{
+  if( m_apcPicYuvAvail )
+  {
+    m_apcPicYuvAvail->destroy();
+    delete m_apcPicYuvAvail;
+    m_apcPicYuvAvail  = NULL;
+  }
+}
+#endif
+
+#if POZNAN_SYNTH_VIEW
+Void
+TComPic::removeSynthesisBuffer()
+{
+  if( m_apcPicYuvSynth )
+  {
+    m_apcPicYuvSynth->destroy();
+    delete m_apcPicYuvSynth;
+    m_apcPicYuvSynth  = NULL;
+  }
+}
+#endif
+
 #if PARALLEL_MERGED_DEBLK
 Void
@@ -349,2 +430,58 @@
 #endif
 
+#if POZNAN_AVAIL_MAP
+Void TComPic::checkSynthesisAvailability( TComDataCU*& rpcCU, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied )
+{ 
+  rpbCUSynthesied[0] = true;
+  rpbCUSynthesied[1] = true;
+  rpbCUSynthesied[2] = true;
+  rpbCUSynthesied[3] = true;
+
+  if (!getPicYuvAvail())
+  {
+    rpbCUSynthesied[0] = false;
+    rpbCUSynthesied[1] = false;
+    rpbCUSynthesied[2] = false;
+    rpbCUSynthesied[3] = false;
+    return;    
+  }
+  
+  Int x, y;
+  Bool bAvailable = true;
+  Pel* pAvail  = getPicYuvAvail()->getLumaAddr ( iCuAddr, uiAbsZorderIdx );
+  Int CUHeight = g_uiMaxCUHeight >> uiPartDepth; //rpcCU->getHeight(uiAbsZorderIdx);
+  Int CUWidth  = g_uiMaxCUWidth  >> uiPartDepth; //rpcCU->getWidth(uiAbsZorderIdx);
+  
+  Int  iStride  = getPicYuvAvail()->getStride();
+  for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- )
+  {
+    for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- )
+    {
+      rpbCUSynthesied[0] &= (pAvail[x] != 0);
+    }
+    for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- )
+    {
+      rpbCUSynthesied[1] &= (pAvail[x] != 0);
+    }
+    pAvail += iStride;
+  }
+  //for ( y = CUHeight - 1; y >= ((CUHeight) >> 1); y-- )
+  for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- ) //Owieczka
+  {
+    for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- )
+    {
+      rpbCUSynthesied[2] &= (pAvail[x] != 0);
+    }
+    for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- )
+    {
+      rpbCUSynthesied[3] &= (pAvail[x] != 0);
+    }
+    pAvail += iStride;
+  }
+
+  //rpbCUSynthesied[0] = !rpbCUSynthesied[0];
+  //rpbCUSynthesied[1] = !rpbCUSynthesied[1];
+  //rpbCUSynthesied[2] = !rpbCUSynthesied[2];
+  //rpbCUSynthesied[3] = !rpbCUSynthesied[3];
+}
+#endif
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComPic.h	(revision 11)
@@ -61,4 +61,13 @@
 
   TComPicYuv*           m_apcPicYuv[2];           //  Texture,  0:org / 1:rec
+
+#if POZNAN_AVAIL_MAP
+  TComPicYuv*           m_apcPicYuvAvail;         //  Availability Map - Does the given pixel can be synthesised in receiver
+#endif
+
+#if POZNAN_SYNTH_VIEW
+  TComPicYuv*           m_apcPicYuvSynth;         //  Sythesied image
+#endif
+
 #if DEPTH_MAP_GENERATION
   TComPicYuv*           m_pcPredDepthMap;         //  estimated depth map
@@ -126,4 +135,12 @@
   TComPicYuv*   getPicYuvOrg()        { return  m_apcPicYuv[0]; }
   TComPicYuv*   getPicYuvRec()        { return  m_apcPicYuv[1]; }
+
+#if POZNAN_AVAIL_MAP
+  TComPicYuv*   getPicYuvAvail()      { return  m_apcPicYuvAvail; } //Owieczka - returns available map from other pic image
+#endif
+
+#if POZNAN_SYNTH_VIEW
+  TComPicYuv*   getPicYuvSynth()      { return  m_apcPicYuvSynth; } //Owieczka - returns synth form other pic in image
+#endif
 
 #if DEPTH_MAP_GENERATION
@@ -196,4 +213,10 @@
 
   Void          addOriginalBuffer       ();
+#if POZNAN_AVAIL_MAP
+  Void          addAvailabilityBuffer   ();
+#endif
+#if POZNAN_SYNTH_VIEW
+  Void          addSynthesisBuffer      ();
+#endif
 #if PARALLEL_MERGED_DEBLK
   Void          addDeblockBuffer        ();
@@ -214,4 +237,10 @@
 
   Void          removeOriginalBuffer    ();
+#if POZNAN_SYNTH_VIEW
+  Void          removeSynthesisBuffer   ();
+#endif
+#if POZNAN_AVAIL_MAP
+  Void          removeAvailabilityBuffer();
+#endif
 #if PARALLEL_MERGED_DEBLK
   Void          removeDeblockBuffer     ();
@@ -228,4 +257,8 @@
 #if HHI_INTERVIEW_SKIP
   Void          removeUsedPelsMapBuffer ();
+#endif
+
+#if POZNAN_AVAIL_MAP
+  Void          checkSynthesisAvailability(  TComDataCU*& rpcBestCU, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied);
 #endif
 
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComResidualGenerator.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComResidualGenerator.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComResidualGenerator.cpp	(revision 11)
@@ -306,4 +306,9 @@
     xSetRecResidualInterCU( pcSubCU, pcSubRes );
     break;
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  case MODE_SYNTH:
+    xSetRecResidualIntraCU( pcSubCU, pcSubRes ); //MayBe it should be seperate function
+    break;
+#endif
   default:
     AOT( true );
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.cpp	(revision 11)
@@ -676,5 +676,7 @@
   // AMVP parameter
   ::memset( m_aeAMVPMode, 0, sizeof( m_aeAMVPMode ) );
+#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
   m_bUseDMM = false;
+#endif
 }
 
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TComSlice.h	(revision 11)
@@ -452,5 +452,5 @@
 
   Void      setSPS          ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; }
-  TComSPS*  getSPS          () { return m_pcSPS; }
+                                                                                               TComSPS*  getSPS          () { return m_pcSPS; }
 
   Void      setPPS          ( TComPPS* pcPPS ) { m_pcPPS = pcPPS; }
Index: /branches/0.2-poznan-univ/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibCommon/TypeDef.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibCommon/TypeDef.h	(revision 11)
@@ -61,4 +61,20 @@
 //<<<<< HHI 3DV tools <<<<<
 
+//<<<<< Poznan 3DV tools <<<<<<
+#define POZNAN_CU_SKIP              1 //Poznan Cu Skip
+#define POZNAN_CU_SYNTH             1 //Poznan Cu Synth
+
+#define POZNAN_AVAIL_MAP            1 //Creates Availibity buffers in all needed classes
+
+#define POZNAN_SYNTH_VIEW           1 //Creates view synthesis buffers in all needed classes
+#define POZNAN_SYNTH_DEPTH          1
+
+#define POZNAN_SYNTH                1 //Creates aligned synthesis classes in encoder and decoder
+
+#define POZNAN_ENCODE_ONLY_DISOCCLUDED_CU          1 //Poznan CU Skip
+#define POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS     1 //Fills not sended CUs with synthesized data
+
+#define POZNAN_CU_SKIP_PSNR         1 //Poznan Cu Skip Display psnr of the codded CU only
+//<<<<< Poznan 3DV tools <<<<<<
 
 ////////////////////////////
@@ -575,4 +591,7 @@
   MODE_INTER,           ///< inter-prediction mode
   MODE_INTRA,           ///< intra-prediction mode
+#if POZNAN_CU_SKIP
+  MODE_SYNTH,           ///< synth-mode
+#endif
   MODE_NONE = 15
 };
Index: /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 11)
@@ -285,6 +285,6 @@
         for( UInt uiBaseId = 0; uiBaseId < uiViewId; uiBaseId++ )
         {
-          xReadSvlc( iCode );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode;
-          xReadSvlc( iCode );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode;
+          xReadSvlc( iCode );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode; //printf("SPS Scale: %d\n",iCode);
+          xReadSvlc( iCode );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode; //printf("SPS Offset: %d\n",iCode);
           xReadSvlc( iCode );   m_aaiTempScale [ uiViewId ][ uiBaseId ] = iCode - m_aaiTempScale [ uiBaseId ][ uiViewId ];
           xReadSvlc( iCode );   m_aaiTempOffset[ uiViewId ][ uiBaseId ] = iCode - m_aaiTempOffset[ uiBaseId ][ uiViewId ];
@@ -517,6 +517,6 @@
       for( UInt uiBaseId = 0; uiBaseId < uiViewId; uiBaseId++ )
       {
-        xReadSvlc( iCode );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode;
-        xReadSvlc( iCode );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode;
+        xReadSvlc( iCode );   m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode; printf("Scale: %d\n",iCode);
+        xReadSvlc( iCode );   m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode; printf("Offset: %d\n",iCode);
         xReadSvlc( iCode );   m_aaiTempScale [ uiViewId ][ uiBaseId ] = iCode - m_aaiTempScale [ uiBaseId ][ uiViewId ];
         xReadSvlc( iCode );   m_aaiTempOffset[ uiViewId ][ uiBaseId ] = iCode - m_aaiTempOffset[ uiBaseId ][ uiViewId ];
Index: /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp	(revision 11)
@@ -49,4 +49,10 @@
   m_ppcYuvReco    = NULL;
   m_ppcYuvResPred = NULL;
+#if POZNAN_AVAIL_MAP
+  m_ppcYuvAvail   = NULL;
+#endif
+#if POZNAN_SYNTH_VIEW
+  m_ppcYuvSynth   = NULL;
+#endif
   m_ppcCU         = NULL;
 }
@@ -75,4 +81,10 @@
   m_ppcYuvReco    = new TComYuv*    [m_uiMaxDepth-1];
   m_ppcYuvResPred = new TComYuv*    [m_uiMaxDepth-1];
+#if POZNAN_AVAIL_MAP
+  m_ppcYuvAvail   = new TComYuv*    [m_uiMaxDepth-1];
+#endif
+#if POZNAN_SYNTH_VIEW
+  m_ppcYuvSynth   = new TComYuv*    [m_uiMaxDepth-1];
+#endif
   m_ppcCU         = new TComDataCU* [m_uiMaxDepth-1];
   
@@ -87,4 +99,11 @@
     m_ppcYuvReco   [ui] = new TComYuv;    m_ppcYuvReco   [ui]->create( uiWidth, uiHeight );
     m_ppcYuvResPred[ui] = new TComYuv;    m_ppcYuvResPred[ui]->create( uiWidth, uiHeight );
+#if POZNAN_AVAIL_MAP
+    m_ppcYuvAvail  [ui] = new TComYuv;    m_ppcYuvAvail  [ui]->create( uiWidth, uiHeight );
+#endif
+#if POZNAN_SYNTH_VIEW
+    m_ppcYuvSynth  [ui] = new TComYuv;    m_ppcYuvSynth  [ui]->create( uiWidth, uiHeight );
+#endif
+
     m_ppcCU        [ui] = new TComDataCU; m_ppcCU        [ui]->create( uiNumPartitions, uiWidth, uiHeight, true );
   }
@@ -106,4 +125,10 @@
     m_ppcYuvReco   [ui]->destroy(); delete m_ppcYuvReco   [ui]; m_ppcYuvReco   [ui] = NULL;
     m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL;
+#if POZNAN_AVAIL_MAP
+    m_ppcYuvAvail  [ui]->destroy(); delete m_ppcYuvAvail  [ui]; m_ppcYuvAvail  [ui] = NULL;
+#endif
+#if POZNAN_SYNTH_VIEW
+    m_ppcYuvSynth  [ui]->destroy(); delete m_ppcYuvSynth  [ui]; m_ppcYuvSynth  [ui] = NULL;
+#endif
     m_ppcCU        [ui]->destroy(); delete m_ppcCU        [ui]; m_ppcCU        [ui] = NULL;
   }
@@ -112,4 +137,11 @@
   delete [] m_ppcYuvReco;    m_ppcYuvReco    = NULL;
   delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL;
+#if POZNAN_AVAIL_MAP
+  delete [] m_ppcYuvAvail;   m_ppcYuvAvail   = NULL;
+#endif
+#if POZNAN_SYNTH_VIEW
+  delete [] m_ppcYuvSynth;   m_ppcYuvSynth   = NULL;
+#endif
+
   delete [] m_ppcCU;         m_ppcCU         = NULL;
 }
@@ -184,4 +216,44 @@
 {
   TComPic* pcPic = pcCU->getPic();
+
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  Bool bWholeCUCanBeSynthesized = false;
+  Bool bOneSubCUCanNotBeSynthesied = false;
+  Bool bSubCUCanBeSynthesized[4];
+  Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized;
+  pcPic->checkSynthesisAvailability(pcCU, pcCU->getAddr(), uiAbsPartIdx, uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH
+  Int  iSubCUCanNotBeSynthesized = 0;
+  Int  iSubCUCanBeSynthesizedCnt = 0;
+  for(Int i = 0; i < 4; i++)
+  {
+    if (!bSubCUCanBeSynthesized[i])
+    {
+      iSubCUCanNotBeSynthesized = i;
+    }
+    else
+    {
+      iSubCUCanBeSynthesizedCnt ++;
+    }
+  }
+  if(iSubCUCanBeSynthesizedCnt == 4)
+  {
+    bWholeCUCanBeSynthesized = true;
+  }
+  else if(iSubCUCanBeSynthesizedCnt == 3)
+  {
+    bOneSubCUCanNotBeSynthesied = true;
+  }
+
+  if(bWholeCUCanBeSynthesized)
+  {
+    pcCU->setPredModeSubParts( MODE_SYNTH, uiAbsPartIdx, uiDepth );
+    pcCU->setDepthSubParts( uiDepth, uiAbsPartIdx );
+    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
+    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
+    //pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth );
+    return;    
+  }
+#endif
+
   UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
   UInt uiQNumParts      = uiCurNumParts>>2;
@@ -195,4 +267,11 @@
   if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) )
   {
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+    if(bOneSubCUCanNotBeSynthesied && (uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )) // KUBA SYNTH check if CU has 3 synthesied subCU - no split flag is send in that case and CU split is assumed
+    {
+      pcCU->setDepthSubParts( uiDepth + 1, uiAbsPartIdx );
+    }
+    else 
+#endif
 #if HHI_MPI
     if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
@@ -367,4 +446,10 @@
 {
   TComPic* pcPic = pcCU->getPic();
+#if POZNAN_SYNTH_VIEW
+  if(pcPic->getPicYuvSynth())  m_ppcYuvSynth[uiDepth]->copyFromPicYuv( pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx );
+#endif
+#if POZNAN_AVAIL_MAP
+  if(pcPic->getPicYuvAvail())  m_ppcYuvAvail[uiDepth]->copyFromPicYuv( pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx );
+#endif
   
   Bool bBoundary = false;
@@ -411,4 +496,15 @@
       xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
       break;
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+    case MODE_SYNTH:
+    //  break;
+#if POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS
+      m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx);
+#else
+      m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx); //Poprawiæ
+#endif
+      //m_ppcYuvReco[uiDepth]->clear();
+      break;
+#endif
     default:
       assert(0);
Index: /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecCu.h	(revision 11)
@@ -61,4 +61,10 @@
   TComYuv**           m_ppcYuvReco;       ///< array of prediction & reconstruction buffer
   TComYuv**           m_ppcYuvResPred;    ///< residual prediction buffer
+#if POZNAN_AVAIL_MAP
+  TComYuv**           m_ppcYuvAvail;      ///< array of available map buffer
+#endif
+#if POZNAN_SYNTH_VIEW
+  TComYuv**           m_ppcYuvSynth;      ///< array of synth buffer
+#endif
   TComDataCU**        m_ppcCU;            ///< CU data array
   
Index: /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp	(revision 11)
@@ -53,4 +53,10 @@
     m_aaiCodedScale       [ uiId ] = new Int [ MAX_NUMBER_VIEWS ];
   }
+#if POZNAN_SYNTH
+  xCreateLUTs   ( (UInt)MAX_NUMBER_VIEWS, (UInt)MAX_NUMBER_VIEWS,  m_adBaseViewShiftLUT,  m_aiBaseViewShiftLUT);
+
+  m_iLog2Precision   = LOG2_DISP_PREC_LUT;
+  m_uiBitDepthForLUT = 8; //fixed
+#endif
 }
 
@@ -66,4 +72,9 @@
   delete [] m_aiViewOrderIndex;
   delete [] m_aiViewReceived;
+
+#if POZNAN_SYNTH
+  xDeleteArray( m_adBaseViewShiftLUT,        MAX_NUMBER_VIEWS, MAX_NUMBER_VIEWS,  2 );
+  xDeleteArray( m_aiBaseViewShiftLUT,        MAX_NUMBER_VIEWS, MAX_NUMBER_VIEWS,  2 );
+#endif
 }
 
@@ -79,4 +90,126 @@
   m_uiMaxViewId             = 0;
 }
+
+#if POZNAN_SYNTH
+/*
+Void
+CamParsCollector::initLUT(TComSPS &cComSPS)
+{
+    //===== create arrays =====
+  //xCreateLUTs   ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_adBaseViewShiftLUT,  m_aiBaseViewShiftLUT,  m_adBaseViewShiftParameter,  m_aiBaseViewShiftParameter  );
+  
+  
+  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiCodedScale           );
+  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiCodedOffset          );
+  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiScaleAndOffsetSet    );
+  //xInit2dArray  ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiScaleAndOffsetSet, 0 );
+
+  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiPdmScaleNomDelta     );
+  //xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiPdmOffset            );
+
+  //===== init disparity to virtual depth conversion parameters =====
+  //xSetPdmConversionParams();
+
+  //===== init arrays for first frame =====
+  //xSetShiftParametersAndLUT( m_uiFirstFrameId );
+}//*/
+
+Void
+CamParsCollector::xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT)
+{
+  //AOF( m_uiBitDepthForLUT == 8 );
+  //AOF(radLUT == NULL && raiLUT == NULL );
+
+  uiNumberSourceViews = Max( 1, uiNumberSourceViews );
+  uiNumberTargetViews = Max( 1, uiNumberTargetViews );
+
+  radLUT         = new Double***[ uiNumberSourceViews ];
+  raiLUT         = new Int   ***[ uiNumberSourceViews ];
+
+  for( UInt uiSourceView = 0; uiSourceView < uiNumberSourceViews; uiSourceView++ )
+  {
+    radLUT        [ uiSourceView ] = new Double**[ uiNumberTargetViews ];
+    raiLUT        [ uiSourceView ] = new Int   **[ uiNumberTargetViews ];
+
+    for( UInt uiTargetView = 0; uiTargetView < uiNumberTargetViews; uiTargetView++ )
+    {
+      radLUT        [ uiSourceView ][ uiTargetView ]      = new Double*[ 2 ];
+      radLUT        [ uiSourceView ][ uiTargetView ][ 0 ] = new Double [ 257 ];
+      radLUT        [ uiSourceView ][ uiTargetView ][ 1 ] = new Double [ 257 ];
+
+      raiLUT        [ uiSourceView ][ uiTargetView ]      = new Int*   [ 2 ];
+      raiLUT        [ uiSourceView ][ uiTargetView ][ 0 ] = new Int    [ 257 ];
+      raiLUT        [ uiSourceView ][ uiTargetView ][ 1 ] = new Int    [ 257 ];
+    }
+  }
+}
+
+Void 
+CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
+{
+  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
+  Int     iLog2DivChroma = iLog2DivLuma + 1;
+
+  iOffset <<= m_uiBitDepthForLUT;
+
+  Double dScale  = (Double) iScale  / (( Double ) ( 1 << iLog2DivLuma ));
+  Double dOffset = (Double) iOffset / (( Double ) ( 1 << iLog2DivLuma ));
+
+  // offsets including rounding offsets
+  Int64 iOffsetLuma   = iOffset + ( ( 1 << iLog2DivLuma   ) >> 1 );
+  Int64 iOffsetChroma = iOffset + ( ( 1 << iLog2DivChroma ) >> 1 );
+
+  for( UInt uiDepthValue = 0; uiDepthValue < 256; uiDepthValue++ )
+  {
+    // real-valued look-up tables
+    Double  dShiftLuma      = ( (Double)uiDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision );
+    Double  dShiftChroma    = dShiftLuma / 2;
+    radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = dShiftLuma;
+    radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = dShiftChroma;
+
+    // integer-valued look-up tables
+    Int64   iTempScale      = (Int64)uiDepthValue * iScale;
+    Int64   iTestScale      = ( iTempScale + iOffset       );   // for checking accuracy of camera parameters
+    Int64   iShiftLuma      = ( iTempScale + iOffsetLuma   ) >> iLog2DivLuma;
+    Int64   iShiftChroma    = ( iTempScale + iOffsetChroma ) >> iLog2DivChroma;
+    raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = (Int)iShiftLuma;
+    raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = (Int)iShiftChroma;
+
+    // maximum deviation
+    //dMaxDispDev     = Max( dMaxDispDev,    fabs( Double( (Int) iTestScale   ) - dShiftLuma * Double( 1 << iLog2DivLuma ) ) / Double( 1 << iLog2DivLuma ) );
+    //dMaxRndDispDvL  = Max( dMaxRndDispDvL, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) );
+    //dMaxRndDispDvC  = Max( dMaxRndDispDvC, fabs( Double( (Int) iShiftChroma ) - dShiftChroma ) );
+  }
+
+  radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ];
+  radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ];
+  raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ];
+  raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ];
+}
+
+Bool
+CamParsCollector::getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft)
+{
+  /*
+  riNearestViewIdx = 0;
+
+  Bool bDecencdingVN = ( m_aiSortedBaseViews.size() >= 2 && m_aiSortedBaseViews[ 0 ] > m_aiSortedBaseViews[ 1 ] );
+  Int  iFactor       = ( bDecencdingVN ? -1 : 1 );
+
+  if( ( m_aiBaseId2SortedId[iSynthViewIdx] - m_aiBaseId2SortedId[riNearestViewIdx] ) * iFactor  <= 0 )
+  {
+    rbRenderFromLeft = true;
+  }
+  else
+  {
+    rbRenderFromLeft = false;
+  }
+
+  riRelDistToLeft = 128; //Not used for now;
+//*/
+  return true;
+}
+
+#endif
 
 Void
@@ -161,4 +294,8 @@
         m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedScale () [ uiBaseId ];
         m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedOffset() [ uiBaseId ];
+#if POZNAN_SYNTH
+        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+#endif
       }
       else
@@ -168,4 +305,8 @@
         m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getSPS()->getInvCodedScale () [ uiBaseId ];
         m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseId ];
+#if POZNAN_SYNTH
+        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+#endif
       }
     }
@@ -182,4 +323,8 @@
         m_aaiCodedScale [ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedScale () [ uiBaseId ];
         m_aaiCodedOffset[ uiViewId ][ uiBaseId ]  = pcSlice->getInvCodedOffset() [ uiBaseId ];
+#if POZNAN_SYNTH
+        xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+        xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT);
+#endif
       }
     }
@@ -458,4 +603,10 @@
 #if HHI_INTERVIEW_SKIP
     pcPic->removeUsedPelsMapBuffer();
+#endif
+#if POZNAN_AVAIL_MAP
+    pcPic->removeAvailabilityBuffer();
+#endif
+#if POZNAN_SYNTH_VIEW
+    pcPic->removeSynthesisBuffer();
 #endif
   }
@@ -724,4 +875,13 @@
 #endif
 
+#if POZNAN_SYNTH
+      if( m_pcCamParsCollector)
+      {
+        m_pcCamParsCollector->setSlice( pcSlice );
+      }
+      //if(!getIsDepth())
+      getDecTop()->storeSynthPicsInBuffer(pcSlice->getViewIdx(),pcSlice->getSPS()->getViewOrderIdx(),pcSlice->getPOC(),getIsDepth());
+#endif
+
       //  Decode a picture
       m_cGopDecoder.decompressGop ( bEos, pcBitstream, pcPic, false );
Index: /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecTop.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibDecoder/TDecTop.h	(revision 11)
@@ -71,4 +71,13 @@
   Void  uninit      ();
   Void  setSlice    ( TComSlice* pcSlice );
+#if POZNAN_SYNTH
+  Double****          getBaseViewShiftLUTD      ()  { return m_adBaseViewShiftLUT;   }
+  Int****             getBaseViewShiftLUTI      ()  { return m_aiBaseViewShiftLUT;   }
+
+  Int**               getBaseViewOffsetI        ()  { return m_aaiCodedOffset;   }
+  Int**               getBaseViewScaleI         ()  { return m_aaiCodedScale;   }
+
+  Bool                getNearestBaseView        ( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft);
+#endif
 
 private:
@@ -89,5 +98,81 @@
   Int     m_iLastPOC;
   UInt    m_uiMaxViewId;
-};
+
+#if POZNAN_SYNTH
+
+  UInt    m_uiBitDepthForLUT;
+  UInt    m_iLog2Precision;
+  UInt    m_uiInputBitDepth;
+
+  // look-up tables
+  Double****          m_adBaseViewShiftLUT;										///< Disparity LUT
+  Int****             m_aiBaseViewShiftLUT;									  ///< Disparity LUT
+
+  Void xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT);
+  Void xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT);
+
+  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 );
+  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize1, UInt uiSize2 );
+  template<class T> Void  xDeleteArray  ( T*& rpt, UInt uiSize );
+#endif
+};
+
+#if POZNAN_SYNTH
+  template <class T>
+Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 )
+{
+  if( rpt )
+  {
+    for( UInt uiK = 0; uiK < uiSize1; uiK++ )
+    {
+      for( UInt uiL = 0; uiL < uiSize2; uiL++ )
+      {
+        for( UInt uiM = 0; uiM < uiSize3; uiM++ )
+        {
+          delete[] rpt[ uiK ][ uiL ][ uiM ];
+        }
+        delete[] rpt[ uiK ][ uiL ];
+      }
+      delete[] rpt[ uiK ];
+    }
+    delete[] rpt;
+  }
+  rpt = NULL;
+};
+
+
+template <class T>
+Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2 )
+{
+  if( rpt )
+  {
+    for( UInt uiK = 0; uiK < uiSize1; uiK++ )
+    {
+      for( UInt uiL = 0; uiL < uiSize2; uiL++ )
+      {
+        delete[] rpt[ uiK ][ uiL ];
+      }
+      delete[] rpt[ uiK ];
+    }
+    delete[] rpt;
+  }
+  rpt = NULL;
+};
+
+
+template <class T>
+Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize )
+{
+  if( rpt )
+  {
+    for( UInt uiK = 0; uiK < uiSize; uiK++ )
+    {
+      delete[] rpt[ uiK ];
+    }
+    delete[] rpt;
+  }
+  rpt = NULL;
+};
+#endif
 
 
Index: /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 11)
@@ -353,6 +353,7 @@
         for( UInt uiId = 0; uiId < pcSPS->getViewId(); uiId++ )
         {
-          xWriteSvlc( pcSPS->getCodedScale    ()[ uiId ] );
-          xWriteSvlc( pcSPS->getCodedOffset   ()[ uiId ] );
+          //printf("From ViewID %d To ViewID: %d\n",pcSPS->getViewId(),uiId);
+          xWriteSvlc( pcSPS->getCodedScale    ()[ uiId ] ); //printf("SPS Scale: %d\n",pcSPS->getCodedScale    ()[ uiId ]);
+          xWriteSvlc( pcSPS->getCodedOffset   ()[ uiId ] ); //printf("SPS Offset: %d\n", pcSPS->getCodedOffset   ()[ uiId ]);
           xWriteSvlc( pcSPS->getInvCodedScale ()[ uiId ] + pcSPS->getCodedScale ()[ uiId ] );
           xWriteSvlc( pcSPS->getInvCodedOffset()[ uiId ] + pcSPS->getCodedOffset()[ uiId ] );
@@ -531,6 +532,7 @@
       for( UInt uiId = 0; uiId < pcSlice->getSPS()->getViewId(); uiId++ )
       {
-        xWriteSvlc( pcSlice->getCodedScale    ()[ uiId ] );
-        xWriteSvlc( pcSlice->getCodedOffset   ()[ uiId ] );
+        printf("From ViewID %d To ViewID: %d\n",pcSlice->getSPS()->getViewId(),uiId);
+        xWriteSvlc( pcSlice->getCodedScale    ()[ uiId ] ); printf("Slice Scale: %d\n",pcSlice->getCodedScale    ()[ uiId ]);
+        xWriteSvlc( pcSlice->getCodedOffset   ()[ uiId ] ); printf("Slice Offset: %d\n", pcSlice->getCodedOffset   ()[ uiId ]);
         xWriteSvlc( pcSlice->getInvCodedScale ()[ uiId ] + pcSlice->getCodedScale ()[ uiId ] );
         xWriteSvlc( pcSlice->getInvCodedOffset()[ uiId ] + pcSlice->getCodedOffset()[ uiId ] );
Index: /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.cpp	(revision 11)
@@ -67,4 +67,11 @@
   m_ppcOrigYuv     = new TComYuv*[m_uhTotalDepth-1];
   m_ppcResPredTmp  = new TComYuv*[m_uhTotalDepth-1];
+#if POZNAN_AVAIL_MAP
+  m_ppcAvailYuv    = new TComYuv*[m_uhTotalDepth-1];
+#endif
+#if POZNAN_SYNTH_VIEW
+  m_ppcSynthYuv    = new TComYuv*[m_uhTotalDepth-1];
+#endif
+  
 
 #if HHI_MPI
@@ -93,4 +100,12 @@
     m_ppcOrigYuv    [i] = new TComYuv; m_ppcOrigYuv    [i]->create(uiWidth, uiHeight);
 
+#if POZNAN_AVAIL_MAP
+    m_ppcAvailYuv   [i] = new TComYuv; m_ppcAvailYuv    [i]->create(uiWidth, uiHeight);
+#endif
+#if POZNAN_SYNTH_VIEW
+    m_ppcSynthYuv   [i] = new TComYuv; m_ppcSynthYuv    [i]->create(uiWidth, uiHeight);
+#endif
+
+
     m_ppcResPredTmp [i] = new TComYuv; m_ppcResPredTmp [i]->create(uiWidth, uiHeight);
   }
@@ -150,6 +165,18 @@
     if(m_ppcOrigYuv[i])
     {
-      m_ppcOrigYuv[i]->destroy();     delete m_ppcOrigYuv[i];     m_ppcOrigYuv[i] = NULL;
-    }
+      m_ppcOrigYuv[i]->destroy();     delete m_ppcOrigYuv[i];     m_ppcOrigYuv[i]     = NULL;
+    }
+#if POZNAN_AVAIL_MAP
+    if(m_ppcAvailYuv[i])
+    {
+      m_ppcAvailYuv[i]->destroy();    delete m_ppcAvailYuv[i];    m_ppcAvailYuv[i]    = NULL;
+    }
+#endif
+#if POZNAN_SYNTH_VIEW
+    if(m_ppcSynthYuv[i])
+    {
+      m_ppcSynthYuv[i]->destroy();    delete m_ppcSynthYuv[i];    m_ppcSynthYuv[i]    = NULL;
+    }
+#endif
     if(m_ppcResPredTmp[i])
     {
@@ -203,4 +230,18 @@
     m_ppcOrigYuv = NULL;
   }
+#if POZNAN_AVAIL_MAP
+  if(m_ppcAvailYuv)
+  {
+    delete [] m_ppcAvailYuv;
+    m_ppcAvailYuv = NULL;
+  }
+#endif
+#if POZNAN_SYNTH_VIEW
+  if(m_ppcSynthYuv)
+  {
+    delete [] m_ppcSynthYuv;
+    m_ppcSynthYuv = NULL;
+  }
+#endif
   if(m_ppcResPredTmp)
   {
@@ -426,5 +467,39 @@
   // get Original YUV data from picture
   m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
-
+#if POZNAN_AVAIL_MAP
+  if (pcPic->getPicYuvAvail())  m_ppcAvailYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvAvail(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
+#endif  
+#if POZNAN_SYNTH_VIEW
+  if (pcPic->getPicYuvSynth())  m_ppcSynthYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvSynth(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
+#endif
+
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  Bool bWholeCUCanBeSynthesized = false;
+  Bool bOneSubCUCanNotBeSynthesied = false;
+  Bool bSubCUCanBeSynthesized[4];
+  Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized;
+  pcPic->checkSynthesisAvailability(rpcBestCU, rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU(), uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH
+  Int  iSubCUCanNotBeSynthesized = 0;
+  Int  iSubCUCanBeSynthesizedCnt = 0;
+  for(Int i = 0; i < 4; i++)
+  {
+    if (!bSubCUCanBeSynthesized[i])
+    {
+      iSubCUCanNotBeSynthesized = i;
+    }
+    else
+    {
+      iSubCUCanBeSynthesizedCnt ++;
+    }
+  }
+  if(iSubCUCanBeSynthesizedCnt == 4)
+  {
+    bWholeCUCanBeSynthesized = true;
+  }
+  else if(iSubCUCanBeSynthesizedCnt == 3)
+  {
+    bOneSubCUCanNotBeSynthesied = true;
+  }
+#endif
   // variables for fast encoder decision
   TComDataCU* pcTempCU;
@@ -493,4 +568,158 @@
   if( ( uiRPelX < rpcBestCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < rpcBestCU->getSlice()->getSPS()->getHeight() ) )
   {
+    // do CU Skip
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+    if(bWholeCUCanBeSynthesized)
+    {
+      rpcBestCU->getTotalCost() = 0;       // Cost of synthesised CU is zero
+      rpcBestCU->getTotalBits() = 0;       // Cost of synthesised CU is zero
+      rpcBestCU->getTotalDistortion() = 0; // Distortion of synthesised CU is zero
+      rpcBestCU->setPredModeSubParts( MODE_SYNTH,      0, uiDepth );
+      rpcBestCU->setPartSizeSubParts( SIZE_2Nx2N,      0, uiDepth );
+#if POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS
+      m_ppcRecoYuvBest[uiDepth]->copyFromPicYuv(pcPic->getPicYuvSynth(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU()); // First copy synthesis YUV part to CU encoder reconstruction YUV structure
+#else
+      m_ppcRecoYuvBest[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU()); // First copy synthesis YUV part to CU encoder reconstruction YUV structure
+#endif
+      UInt uiInitTrDepth  = rpcBestCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1;
+      rpcBestCU->copyToPic(uiDepth, 0, uiInitTrDepth); 
+      xCopyYuv2Pic( rpcBestCU->getPic(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU(), uiDepth );   // Next copy it to reconstruction YUV buffer in coded picture
+      assert( rpcBestCU->getPartitionSize ( 0 ) != SIZE_NONE  ); //Not needed any more ??
+      assert( rpcBestCU->getPredictionMode( 0 ) != MODE_NONE  );
+      assert( rpcBestCU->getTotalCost     (   ) != MAX_DOUBLE );
+
+      #if HHI_VSO//??
+      if( m_pcRdCost->getUseRenModel() )
+      {
+        UInt  uiWidth     = rpcBestCU->getWidth ( 0 );
+        UInt  uiHeight    = rpcBestCU->getHeight( 0 );
+        Pel*  piSrc       = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 );
+        UInt  uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride();
+        m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
+      }
+      #endif
+      return;
+    }
+    else if (bOneSubCUCanNotBeSynthesied && (uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )) // If only one from subCU can not be synthesised than force NxN split but donot signal it in the stream
+    {
+      //printf("CUSkip - OneCanNotBe %d %d %d\n",rpcBestCU->getCUPelX(),rpcBestCU->getCUPelY(),rpcBestCU->getWidth());
+      // further split !!!!go to line 866!!!
+#if HHI_VSO
+    // reset Model
+    if( m_pcRdCost->getUseRenModel() )
+    {
+      UInt  uiWidth     = m_ppcBestCU[uiDepth]->getWidth ( 0 );
+      UInt  uiHeight    = m_ppcBestCU[uiDepth]->getHeight( 0 );
+      Pel*  piSrc       = m_ppcOrigYuv[uiDepth]->getLumaAddr( 0 );
+      UInt  uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride();
+      m_pcRdCost->setRenModelData( m_ppcBestCU[uiDepth], 0, piSrc, uiSrcStride, uiWidth, uiHeight );
+    }
+#endif
+
+      UChar       uhNextDepth         = uiDepth + 1;
+      TComDataCU* pcSubBestPartCU     = m_ppcBestCU[uhNextDepth];
+      TComDataCU* pcSubTempPartCU     = m_ppcTempCU[uhNextDepth];
+      
+      for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ ) //UInt uiPartUnitIdx = iSubCUNotSynthesied;
+      {
+        pcSubBestPartCU->initSubCU( rpcBestCU, uiPartUnitIdx, uhNextDepth );           // clear sub partition datas or init.
+        pcSubTempPartCU->initSubCU( rpcBestCU, uiPartUnitIdx, uhNextDepth );           // clear sub partition datas or init.
+//        pcSubBestPartCU->setLastCodedQP( rpcBestCU->getLastCodedQP() );
+//        pcSubTempPartCU->setLastCodedQP( rpcBestCU->getLastCodedQP() );
+        
+        if( ( pcSubBestPartCU->getCUPelX() < pcSubBestPartCU->getSlice()->getSPS()->getWidth() ) && ( pcSubBestPartCU->getCUPelY() < pcSubBestPartCU->getSlice()->getSPS()->getHeight() ) )
+        {
+          if( m_bUseSBACRD )
+          {
+            if ( 0 == uiPartUnitIdx) //initialize RD with previous depth buffer
+            {
+              m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]);
+            }
+            else
+            {
+              m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]);
+            }
+          }
+          
+          xCompressCU( pcSubBestPartCU, pcSubTempPartCU, uhNextDepth ); //Compress SubCU's
+          
+#if HHI_VSO
+          if( m_pcRdCost->getUseRenModel() )
+          {
+            UInt  uiWidth     = pcSubBestPartCU->getWidth ( 0 );
+            UInt  uiHeight    = pcSubBestPartCU->getHeight( 0 );
+            Pel*  piSrc       = m_ppcRecoYuvBest[pcSubBestPartCU->getDepth(0)]->getLumaAddr( 0 );
+            UInt  uiSrcStride = m_ppcRecoYuvBest[pcSubBestPartCU->getDepth(0)]->getStride();
+            m_pcRdCost->setRenModelData( pcSubBestPartCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
+          }
+#endif
+          rpcTempCU->copyPartFrom( pcSubBestPartCU, uiPartUnitIdx, uhNextDepth );         // Keep best part data to current temporary data.
+          xCopyYuv2Tmp( pcSubBestPartCU->getTotalNumPart()*uiPartUnitIdx, uhNextDepth );
+        }
+      }
+
+      if( !bBoundary )
+      {
+        m_pcEntropyCoder->resetBits();
+        m_pcEntropyCoder->encodeSplitFlag( rpcTempCU, 0, uiDepth, true );
+
+        rpcTempCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits
+      }
+
+#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE
+      if( bFullyRenderedSec )
+      {
+        m_pcRdCost->setLambdaScale( m_pcEncCfg->getInterViewSkipLambdaScale() );
+      }
+      else
+      {
+        m_pcRdCost->setLambdaScale( 1 );
+      }
+#endif
+#if HHI_VSO
+      if ( m_pcRdCost->getUseLambdaScaleVSO())
+      {
+        rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
+      }
+      else
+#endif
+      {
+        rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
+      }    
+
+      if( m_bUseSBACRD )
+      {
+        m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
+      }
+      //Copy Tmp to Best
+      xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth );  //Roznica z naszym koder                                          // RD compare current larger prediction
+
+#if HHI_VSO
+      if( m_pcRdCost->getUseRenModel() )
+      {
+        UInt  uiWidth     = rpcBestCU->getWidth ( 0 );
+        UInt  uiHeight    = rpcBestCU->getHeight( 0 );
+        Pel*  piSrc       = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 );
+        UInt  uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride();
+        m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
+      }
+#endif
+      //Copy result to pic
+      rpcBestCU->copyToPic(uiDepth);                                                     // Copy Best data to Picture for next partition prediction.
+      
+      if( bBoundary )
+        return;
+
+      xCopyYuv2Pic( rpcBestCU->getPic(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU(), uiDepth );   // Copy Yuv data to picture Yuv
+      
+      // Assert if Best prediction mode is NONE
+      // Selected mode's RD-cost must be not MAX_DOUBLE.
+      assert( rpcBestCU->getPartitionSize ( 0 ) != SIZE_NONE  ); //Not needed any more?
+      assert( rpcBestCU->getPredictionMode( 0 ) != MODE_NONE  );
+      assert( rpcBestCU->getTotalCost     (   ) != MAX_DOUBLE );
+      return;
+    }
+#endif
+
     // do inter modes
     if( rpcBestCU->getSlice()->getSliceType() != I_SLICE )
@@ -836,4 +1065,9 @@
   TComPic* pcPic = pcCU->getPic();
 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  if( pcCU->isCUSkiped( uiAbsPartIdx ) && uiDepth == pcCU->getDepth( uiAbsPartIdx )) //If CU Skiped no information is coded into stream
+    return;
+#endif
+
   Bool bBoundary = false;
   UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
@@ -842,6 +1076,30 @@
   UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+  Bool bDontSendSplitFlag = false;
+  if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < (g_uiMaxCUDepth-g_uiAddCUDepth) ) ) || bBoundary ) //check if CU has 3 synthesied subCU - no split flag is send in that case
+  {
+    UInt uiQNumParts = ( pcPic->getNumPartInCU() >> (uiDepth<<1) )>>2;
+    Int iCUSkipCounter = 0;
+    UInt uiAbsPartIdxTmp = uiAbsPartIdx;
+    for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++, uiAbsPartIdxTmp+=uiQNumParts )
+    {
+      if(pcCU->isCUSkiped(uiAbsPartIdxTmp) && (pcCU->getDepth( uiAbsPartIdxTmp ) == uiDepth + 1) )
+      {
+        iCUSkipCounter++;
+      }
+    } 
+    if(iCUSkipCounter == 3)
+    {
+      bDontSendSplitFlag = true;
+    }
+  }
+#endif
+
   if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) )
   {
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+    if(!bDontSendSplitFlag)
+#endif
 #if HHI_MPI
     if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
@@ -1412,5 +1670,9 @@
     for( UInt ui = 0; ui < rpcTempCU->getTotalNumPart(); ui++ )
     {
-      if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui ) )
+      if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui ) 
+#if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU
+        || pcTextureCU->isCUSkiped( rpcTempCU->getZorderIdxInCU() + ui )
+#endif
+      )
       {
         return;
Index: /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.h	(revision 11)
@@ -78,5 +78,11 @@
   TComYuv**               m_ppcOrigYuv;     ///< Original Yuv for each depth
   TComYuv**               m_ppcResPredTmp;  ///< Temporary residual prediction for each depth
-  
+#if POZNAN_AVAIL_MAP
+  TComYuv**               m_ppcAvailYuv;    ///< Avaiability map for each depth  
+#endif
+#if POZNAN_SYNTH_VIEW
+  TComYuv**               m_ppcSynthYuv;    ///< Synthetized Yuv for each depth
+#endif
+
   //  Data : encoder control
   Int                     m_iQp;            ///< Last QP
Index: /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 11)
@@ -799,4 +799,10 @@
   Pel*  pOrg    = pcPic ->getPicYuvOrg()->getLumaAddr();
   Pel*  pRec    = pcPicD->getLumaAddr();
+#if POZNAN_CU_SKIP_PSNR
+  Pel*  pAvail  = NULL;
+  if(pcPic ->getPicYuvAvail())
+    pAvail  = pcPic ->getPicYuvAvail()->getLumaAddr();
+  UInt64 iPixelsCnt = 0;
+#endif
   Int   iStride = pcPicD->getStride();
 
@@ -813,13 +819,38 @@
   Double fRefValueC = fRefValueY / 4.0;
 
-  for( y = 0; y < iHeight; y++ )
-  {
-    for( x = 0; x < iWidth; x++ )
-    {
-      Int iDiff = (Int)( pOrg[x] - pRec[x] );
-      uiSSDY   += iDiff * iDiff;
-    }
-    pOrg += iStride;
-    pRec += iStride;
+#if POZNAN_CU_SKIP_PSNR
+  if(pAvail)
+  {
+    for( y = 0; y < iHeight; y++ )
+    {
+      for( x = 0; x < iWidth; x++ )
+      {
+        if(pAvail[x]==0) //If pixel was codded
+        {
+          Int iDiff = (Int)( pOrg[x] - pRec[x] );
+          uiSSDY   += iDiff * iDiff;
+          iPixelsCnt++;
+        }
+      }
+      pOrg += iStride;
+      pRec += iStride;
+      pAvail+=iStride;
+    }
+    
+    fRefValueY = (double) maxval * maxval * iPixelsCnt;
+  }
+  else
+#endif
+  {
+    for( y = 0; y < iHeight; y++ )
+    {
+      for( x = 0; x < iWidth; x++ )
+      {
+        Int iDiff = (Int)( pOrg[x] - pRec[x] );
+        uiSSDY   += iDiff * iDiff;
+      }
+      pOrg += iStride;
+      pRec += iStride;
+    }
   }
 
@@ -837,37 +868,93 @@
 #endif
   {
-  iHeight >>= 1;
-  iWidth  >>= 1;
-  iStride >>= 1;
-  pOrg  = pcPic ->getPicYuvOrg()->getCbAddr();
-  pRec  = pcPicD->getCbAddr();
-
-  for( y = 0; y < iHeight; y++ )
-  {
-    for( x = 0; x < iWidth; x++ )
-    {
-      Int iDiff = (Int)( pOrg[x] - pRec[x] );
-      uiSSDU   += iDiff * iDiff;
-    }
-    pOrg += iStride;
-    pRec += iStride;
-  }
-
-  pOrg  = pcPic ->getPicYuvOrg()->getCrAddr();
-  pRec  = pcPicD->getCrAddr();
-
-  for( y = 0; y < iHeight; y++ )
-  {
-    for( x = 0; x < iWidth; x++ )
-    {
-      Int iDiff = (Int)( pOrg[x] - pRec[x] );
-      uiSSDV   += iDiff * iDiff;
-    }
-    pOrg += iStride;
-    pRec += iStride;
-  }
-  dYPSNR            = ( uiSSDY ? 10.0 * log10( fRefValueY / (Double)uiSSDY ) : 99.99 );
-  dUPSNR            = ( uiSSDU ? 10.0 * log10( fRefValueC / (Double)uiSSDU ) : 99.99 );
-  dVPSNR            = ( uiSSDV ? 10.0 * log10( fRefValueC / (Double)uiSSDV ) : 99.99 );
+#if POZNAN_CU_SKIP_PSNR
+    if(pAvail)
+    {
+      iHeight >>= 1;
+      iWidth  >>= 1;
+      iStride >>= 1;
+    
+      pOrg  = pcPic ->getPicYuvOrg()->getCbAddr();
+      pRec  = pcPicD->getCbAddr();
+      pAvail  = pcPic ->getPicYuvAvail()->getLumaAddr();
+      iPixelsCnt = 0;
+
+      for( y = 0; y < iHeight; y++ )
+      {
+        for( x = 0; x < iWidth; x++ )
+        {
+          if(pAvail[x<<1]==0||pAvail[(x<<1)+1]==0||
+             pAvail[(x+iStride)<<1]==0||pAvail[((x+iStride)<<1)+1]==0) //If pixel was codded
+          {
+            Int iDiff = (Int)( pOrg[x] - pRec[x] );
+            uiSSDU   += iDiff * iDiff;
+            iPixelsCnt++;
+          }
+        }
+        pOrg += iStride;
+        pRec += iStride;
+        pAvail+= (iStride<<2);
+      }
+      
+      fRefValueC = (double) maxval * maxval * iPixelsCnt;
+
+      pOrg  = pcPic ->getPicYuvOrg()->getCrAddr();
+      pRec  = pcPicD->getCrAddr();
+      pAvail  = pcPic ->getPicYuvAvail()->getLumaAddr();
+      for( y = 0; y < iHeight; y++ )
+      {
+        for( x = 0; x < iWidth; x++ )
+        {
+          if(pAvail[x<<1]==0||pAvail[(x<<1)+1]==0||
+             pAvail[(x+iStride)<<1]==0||pAvail[((x+iStride)<<1)+1]==0) //If pixel was codded
+          {
+            Int iDiff = (Int)( pOrg[x] - pRec[x] );
+            uiSSDV   += iDiff * iDiff;
+          }
+        }
+        pOrg += iStride;
+        pRec += iStride;
+        pAvail+= iStride<<2;
+      }
+    }
+    else
+#endif
+    {
+      iHeight >>= 1;
+      iWidth  >>= 1;
+      iStride >>= 1;
+
+      pOrg  = pcPic ->getPicYuvOrg()->getCbAddr();
+      pRec  = pcPicD->getCbAddr();
+
+      for( y = 0; y < iHeight; y++ )
+      {
+        for( x = 0; x < iWidth; x++ )
+        {
+          Int iDiff = (Int)( pOrg[x] - pRec[x] );
+          uiSSDU   += iDiff * iDiff;
+        }
+        pOrg += iStride;
+        pRec += iStride;
+      }
+
+      pOrg  = pcPic ->getPicYuvOrg()->getCrAddr();
+      pRec  = pcPicD->getCrAddr();
+
+      for( y = 0; y < iHeight; y++ )
+      {
+        for( x = 0; x < iWidth; x++ )
+        {
+          Int iDiff = (Int)( pOrg[x] - pRec[x] );
+          uiSSDV   += iDiff * iDiff;
+        }
+        pOrg += iStride;
+        pRec += iStride;
+      }
+    }
+
+    dYPSNR            = ( uiSSDY ? 10.0 * log10( fRefValueY / (Double)uiSSDY ) : 99.99 );
+    dUPSNR            = ( uiSSDU ? 10.0 * log10( fRefValueC / (Double)uiSSDU ) : 99.99 );
+    dVPSNR            = ( uiSSDV ? 10.0 * log10( fRefValueC / (Double)uiSSDV ) : 99.99 );
   }
   // fix: total bits should consider slice size bits (32bit)
Index: /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncTop.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncTop.cpp	(revision 11)
@@ -416,4 +416,10 @@
   {
     pcPic->removeOriginalBuffer   ();
+#if POZNAN_AVAIL_MAP
+    pcPic->removeAvailabilityBuffer();
+#endif
+#if POZNAN_SYNTH_VIEW
+    pcPic->removeSynthesisBuffer();
+#endif
 #if HHI_INTER_VIEW_MOTION_PRED
     pcPic->removeOrgDepthMapBuffer();
Index: /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenModel.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenModel.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenModel.cpp	(revision 11)
@@ -523,4 +523,12 @@
     Int iTargetStride = m_aiCurDepthStrides[ m_iCurrentView ];
     TRenFilter::copy( piNewData, iStride, iWidth, iHeight,  m_apiCurDepthPel[ m_iCurrentView ] + iStartPosY * iTargetStride + iStartPosX, iTargetStride );
+
+    {
+      printf("%d %d\n",iStartPosX,iStartPosY);
+      TComPicYuv mapPic;
+      mapPic.create( 1920, 1088, 64, 64, 3 );
+      TRenFilter::copy( m_apiCurDepthPel[ m_iCurrentView ], iTargetStride, 1920,1088, mapPic.getLumaAddr(), mapPic.getStride());
+      mapPic.dump("VSO_1920x1088.yuv",true);
+    }
   }
   else
Index: /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenTop.cpp
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenTop.cpp	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenTop.cpp	(revision 11)
@@ -266,8 +266,7 @@
   PelImage cInputDepth ( pcPicYuvDepth    , true);
   PelImage cOutputImage( pcPicYuvSynthOut );
-
+    
   m_pcOutputImage->init();
   m_pcFilled     ->assign(REN_IS_HOLE);
-
   xPreProcessDepth ( &cInputDepth,  &cInputDepth);
   xConvertInputData( &cInputImage, &cInputDepth, m_pcInputImage, m_pcInputDepth, !bRenderFromLeft );
@@ -279,4 +278,33 @@
   xCutMargin        ( &cOutputImage );
 };
+
+#if POZNAN_SYNTH
+Void TRenTop::extrapolateAvailabilityView( TComPicYuv* pcPicYuvVideo, TComPicYuv* pcPicYuvDepth, TComPicYuv* pcPicYuvSynthOut, TComPicYuv* pcPicYuvAvailOut, Bool bRenderFromLeft )
+{
+  AOF( m_bExtrapolate );
+  AOF( bRenderFromLeft ? m_ppiShiftLUTLeft || m_ppdShiftLUTLeft : m_ppiShiftLUTRight || m_ppdShiftLUTRight );
+  AOF( m_auiInputResolution[0] == pcPicYuvVideo->getWidth ());
+  AOF( m_auiInputResolution[1] == pcPicYuvVideo->getHeight());
+
+  PelImage cInputImage ( pcPicYuvVideo    );
+  PelImage cInputDepth ( pcPicYuvDepth    , true);
+  PelImage cOutputImage( pcPicYuvSynthOut );
+  PelImage cFillImage( pcPicYuvAvailOut );
+    
+  m_pcOutputImage->init();
+  m_pcFilled     ->assign(REN_IS_HOLE);
+  
+  xPreProcessDepth ( &cInputDepth,  &cInputDepth);
+  xConvertInputData( &cInputImage, &cInputDepth, m_pcInputImage, m_pcInputDepth, !bRenderFromLeft );
+  xShiftPixels(m_pcInputImage, m_pcInputDepth, m_pcOutputImage, &cFillImage, bRenderFromLeft);
+  xRemBoundaryNoise ( m_pcOutputImage, &cFillImage, m_pcOutputImage, bRenderFromLeft); // Erode
+  xFillHoles        ( m_pcOutputImage, &cFillImage, m_pcOutputImage, bRenderFromLeft);
+  xConvertOutputData( m_pcOutputImage, &cOutputImage, !bRenderFromLeft );
+  if (!bRenderFromLeft)  TRenFilter::mirrorHor( &cFillImage );
+  //xConvertOutputData( m_pcFilled, &cFillImage, !bRenderFromLeft );
+  xPostProcessImage (&cOutputImage, &cOutputImage);
+  xCutMargin        ( &cOutputImage );
+};
+#endif
 
 Void TRenTop::getUsedSamplesMap( TComPicYuv* pcPicYuvDepth, TComPicYuv* pcUsedSampleMap, Bool bRenderFromLeft )
Index: /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenTop.h
===================================================================
--- /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenTop.h	(revision 10)
+++ /branches/0.2-poznan-univ/source/Lib/TLibRenderer/TRenTop.h	(revision 11)
@@ -109,4 +109,13 @@
                            Int         iBlendMode,
                            Int         iSimEnhBaseView );
+
+#if POZNAN_SYNTH
+  Void extrapolateAvailabilityView   
+                         ( TComPicYuv* pcPicYuvVideo, 
+                           TComPicYuv* pcPicYuvDepth, 
+                           TComPicYuv* pcPicYuvSynthOut, 
+                           TComPicYuv* pcPicYuvAvailOut, 
+                           Bool bRenderFromLeft );
+#endif
   // Tools
   Void getUsedSamplesMap ( TComPicYuv* pcPicYuvDepth,
