Index: branches/HTM-DEV-0.2-dev/build/linux/app/TAppRenderer/makefile
===================================================================
--- branches/HTM-DEV-0.2-dev/build/linux/app/TAppRenderer/makefile	(revision 438)
+++ branches/HTM-DEV-0.2-dev/build/linux/app/TAppRenderer/makefile	(revision 446)
@@ -4,5 +4,5 @@
 # set directories to your wanted values
 SRC_DIR				= ../../../../source/App/TAppRenderer
-INC_DIR				= ../../../../source/App
+INC_DIR				= ../../../../source/Lib
 LIB_DIR				= ../../../../lib
 BIN_DIR				= ../../../../bin
Index: branches/HTM-DEV-0.2-dev/build/linux/common/makefile.base
===================================================================
--- branches/HTM-DEV-0.2-dev/build/linux/common/makefile.base	(revision 438)
+++ branches/HTM-DEV-0.2-dev/build/linux/common/makefile.base	(revision 446)
@@ -47,5 +47,5 @@
 # default cpp flags for all configurations
 #CPPFLAGS          = -Wall -fPIC $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS)
-CPPFLAGS          = -fPIC $(DEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -Werror
+CPPFLAGS          = -fPIC $(DEFS) $(ADDDEFS) -I$(CURDIR)/$(INC_DIR) $(USER_INC_DIRS) -Wall -Wshadow -Wno-sign-compare -Werror
 
 ########## 
Index: branches/HTM-DEV-0.2-dev/build/linux/makefile
===================================================================
--- branches/HTM-DEV-0.2-dev/build/linux/makefile	(revision 438)
+++ branches/HTM-DEV-0.2-dev/build/linux/makefile	(revision 446)
@@ -1,51 +1,56 @@
 ### enforce 32-bit build : 1=yes, 0=no
 M32?= 0
+HEVC_EXT?= ''
  
 export M32
 
+ifneq ($(HEVC_EXT), '')
+ADDDEFS = -DHEVC_EXT=$(HEVC_EXT)
+endif
+
 all:
-	$(MAKE) -C lib/TLibVideoIO 	MM32=$(M32)
-	$(MAKE) -C lib/TLibCommon 	MM32=$(M32)
-	$(MAKE) -C lib/TLibDecoder 	MM32=$(M32)
-	$(MAKE) -C lib/TLibEncoder 	MM32=$(M32)
-	$(MAKE) -C lib/TLibRenderer  MM32=$(M32)
-	$(MAKE) -C lib/TLibExtractor  MM32=$(M32)
-	$(MAKE) -C lib/TAppCommon       MM32=$(M32)
-	$(MAKE) -C app/TAppDecoder      MM32=$(M32)
-	$(MAKE) -C app/TAppEncoder      MM32=$(M32)
-	$(MAKE) -C app/TAppRenderer     MM32=$(M32)
-	$(MAKE) -C app/TAppExtractor    MM32=$(M32)
-	$(MAKE) -C utils/annexBbytecount       MM32=$(M32)
-	$(MAKE) -C utils/convert_NtoMbit_YCbCr MM32=$(M32)
+	$(MAKE) -C lib/TLibVideoIO 	MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibCommon 	MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibDecoder 	MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibEncoder 	MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibRenderer  MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibExtractor  MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TAppCommon       MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppDecoder      MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppEncoder      MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppRenderer     MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppExtractor    MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C utils/annexBbytecount       MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C utils/convert_NtoMbit_YCbCr MM32=$(M32) ADDDEFS=$(ADDDEFS)
 
 debug:
-	$(MAKE) -C lib/TLibVideoIO 	debug MM32=$(M32)
-	$(MAKE) -C lib/TLibCommon 	debug MM32=$(M32)
-	$(MAKE) -C lib/TLibDecoder 	debug MM32=$(M32)
-	$(MAKE) -C lib/TLibEncoder 	debug MM32=$(M32)
-	$(MAKE) -C lib/TLibRenderer  debug	MM32=$(M32)
-	$(MAKE) -C lib/TLibExtractor  debug	MM32=$(M32)
-	$(MAKE) -C lib/TAppCommon       debug MM32=$(M32)
-	$(MAKE) -C app/TAppDecoder      debug MM32=$(M32)
-	$(MAKE) -C app/TAppEncoder      debug MM32=$(M32)
-	$(MAKE) -C app/TAppRenderer     debug MM32=$(M32)
-	$(MAKE) -C app/TAppExtractor    debug MM32=$(M32)
-	$(MAKE) -C utils/annexBbytecount       debug MM32=$(M32)
-	$(MAKE) -C utils/convert_NtoMbit_YCbCr debug MM32=$(M32)
+	$(MAKE) -C lib/TLibVideoIO 	debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibCommon 	debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibDecoder 	debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibEncoder 	debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibRenderer  debug	MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibExtractor  debug	MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TAppCommon       debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppDecoder      debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppEncoder      debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppRenderer     debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppExtractor    debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C utils/annexBbytecount       debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C utils/convert_NtoMbit_YCbCr debug MM32=$(M32) ADDDEFS=$(ADDDEFS)
 
 release:
-	$(MAKE) -C lib/TLibVideoIO 	release MM32=$(M32)
-	$(MAKE) -C lib/TLibCommon 	release MM32=$(M32)
-	$(MAKE) -C lib/TLibDecoder 	release MM32=$(M32)
-	$(MAKE) -C lib/TLibEncoder 	release MM32=$(M32)
-	$(MAKE) -C lib/TLibRenderer  release MM32=$(M32)
-	$(MAKE) -C lib/TLibExtractor  release MM32=$(M32)
-	$(MAKE) -C lib/TAppCommon       release MM32=$(M32)
-	$(MAKE) -C app/TAppDecoder      release MM32=$(M32)
-	$(MAKE) -C app/TAppEncoder      release MM32=$(M32)
-	$(MAKE) -C app/TAppRenderer    release MM32=$(M32)	
-	$(MAKE) -C app/TAppExtractor    release MM32=$(M32)	
-	$(MAKE) -C utils/annexBbytecount       release MM32=$(M32)
-	$(MAKE) -C utils/convert_NtoMbit_YCbCr release MM32=$(M32)
+	$(MAKE) -C lib/TLibVideoIO 	release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibCommon 	release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibDecoder 	release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibEncoder 	release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibRenderer  release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TLibExtractor  release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C lib/TAppCommon       release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppDecoder      release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppEncoder      release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppRenderer    release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C app/TAppExtractor    release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C utils/annexBbytecount       release MM32=$(M32) ADDDEFS=$(ADDDEFS)
+	$(MAKE) -C utils/convert_NtoMbit_YCbCr release MM32=$(M32) ADDDEFS=$(ADDDEFS)
 
 clean:
Index: branches/HTM-DEV-0.2-dev/build/vc9/TAppExtractor_vc9.vcproj
===================================================================
--- branches/HTM-DEV-0.2-dev/build/vc9/TAppExtractor_vc9.vcproj	(revision 438)
+++ branches/HTM-DEV-0.2-dev/build/vc9/TAppExtractor_vc9.vcproj	(revision 446)
@@ -45,5 +45,5 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
+				AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
 				MinimalRebuild="true"
@@ -68,4 +68,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"
+				AdditionalIncludeDirectories="&quot;$(SolutionDir)\source\Lib&quot;;&quot;$(SolutionDir)\..\source\Lib\&quot;;&quot;$(SolutionDir)\..\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
@@ -120,5 +192,5 @@
 				EnableIntrinsicFunctions="false"
 				FavorSizeOrSpeed="1"
-				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
+				AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
 				PreprocessorDefinitions="WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
 				StringPooling="true"
@@ -143,76 +215,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"
-				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,6 +268,6 @@
 				EnableIntrinsicFunctions="false"
 				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories="$(SolutionDir)\..\source\Lib\;$(SolutionDir)\..\compat\msvc"
 				PreprocessorDefinitions="WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
-				AdditionalIncludeDirectories="&quot;..\..\compat\msvc&quot;"
 				StringPooling="true"
 				RuntimeLibrary="0"
