Changeset 438 in 3DVCSoftware
- Timestamp:
- 23 May 2013, 15:40:36 (12 years ago)
- Location:
- branches/HTM-DEV-0.2-dev
- Files:
-
- 61 added
- 80 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.2-dev/build/HM_vc10.sln
r324 r438 15 15 EndProject 16 16 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibVideoIO", "vc10\TLibVideoIO_vc10.vcxproj", "{5280C25A-D316-4BE7-AE50-29D72108624F}" 17 EndProject 18 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppRenderer", "vc10\TAppRenderer_vc10.vcxproj", "{3A5A8B26-8CA4-4690-944E-AB78559DE848}" 19 EndProject 20 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc10\TLibRenderer_vc10.vcxproj", "{2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}" 21 EndProject 22 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc10\TLibExtractor_vc10.vcxproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}" 23 EndProject 24 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppExtractor", "vc10\TAppExtractor_vc10.vcxproj", "{F46F95E9-7174-4328-90DD-092450E4DCF6}" 17 25 EndProject 18 26 Global … … 80 88 {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.ActiveCfg = Release|x64 81 89 {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.Build.0 = Release|x64 90 {3A5A8B26-8CA4-4690-944E-AB78559DE848}.Debug|Win32.ActiveCfg = Debug|Win32 91 {3A5A8B26-8CA4-4690-944E-AB78559DE848}.Debug|Win32.Build.0 = Debug|Win32 92 {3A5A8B26-8CA4-4690-944E-AB78559DE848}.Debug|x64.ActiveCfg = Debug|x64 93 {3A5A8B26-8CA4-4690-944E-AB78559DE848}.Debug|x64.Build.0 = Debug|x64 94 {3A5A8B26-8CA4-4690-944E-AB78559DE848}.Release|Win32.ActiveCfg = Release|Win32 95 {3A5A8B26-8CA4-4690-944E-AB78559DE848}.Release|Win32.Build.0 = Release|Win32 96 {3A5A8B26-8CA4-4690-944E-AB78559DE848}.Release|x64.ActiveCfg = Release|x64 97 {3A5A8B26-8CA4-4690-944E-AB78559DE848}.Release|x64.Build.0 = Release|x64 98 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Debug|Win32.ActiveCfg = Debug|Win32 99 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Debug|Win32.Build.0 = Debug|Win32 100 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Debug|x64.ActiveCfg = Debug|x64 101 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Debug|x64.Build.0 = Debug|x64 102 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Release|Win32.ActiveCfg = Release|Win32 103 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Release|Win32.Build.0 = Release|Win32 104 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Release|x64.ActiveCfg = Release|x64 105 {2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}.Release|x64.Build.0 = Release|x64 106 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.ActiveCfg = Debug|Win32 107 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.Build.0 = Debug|Win32 108 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.ActiveCfg = Debug|x64 109 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.Build.0 = Debug|x64 110 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.ActiveCfg = Release|Win32 111 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.Build.0 = Release|Win32 112 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.ActiveCfg = Release|x64 113 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.Build.0 = Release|x64 114 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.ActiveCfg = Debug|Win32 115 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.Build.0 = Debug|Win32 116 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.ActiveCfg = Debug|x64 117 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.Build.0 = Debug|x64 118 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.ActiveCfg = Release|Win32 119 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.Build.0 = Release|Win32 120 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.ActiveCfg = Release|x64 121 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.Build.0 = Release|x64 82 122 EndGlobalSection 83 123 GlobalSection(SolutionProperties) = preSolution -
branches/HTM-DEV-0.2-dev/build/HM_vc8.sln
r324 r438 16 16 {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D} 17 17 {8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684} 18 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A} 18 19 EndProjectSection 19 20 EndProject … … 27 28 EndProject 28 29 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibVideoIO", "vc8\TLibVideoIO_vc8.vcproj", "{5280C25A-D316-4BE7-AE50-29D72108624F}" 30 EndProject 31 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc8\TLibRenderer_vc8.vcproj", "{5E87AD84-AC4F-4336-B4EE-549CA210EE4A}" 32 ProjectSection(ProjectDependencies) = postProject 33 {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D} 34 EndProjectSection 35 EndProject 36 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppRenderer", "vc8\TAppRenderer_vc8.vcproj", "{CE149235-A923-4BA7-B552-3A02287CD3E4}" 37 ProjectSection(ProjectDependencies) = postProject 38 {8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684} 39 {5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F} 40 {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D} 41 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A} 42 EndProjectSection 43 EndProject 44 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc8\TLibExtractor_vc8.vcproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}" 45 EndProject 46 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppExtractor", "vc8\TAppExtractor_vc8.vcproj", "{F46F95E9-7174-4328-90DD-092450E4DCF6}" 47 ProjectSection(ProjectDependencies) = postProject 48 {F8B77A48-AF6C-4746-A89F-B706ABA6AD94} = {F8B77A48-AF6C-4746-A89F-B706ABA6AD94} 49 {27E2C758-E3CE-44CA-A226-83491EC7F798} = {27E2C758-E3CE-44CA-A226-83491EC7F798} 50 {5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F} 51 {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D} 52 {8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684} 53 EndProjectSection 29 54 EndProject 30 55 Global … … 92 117 {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.ActiveCfg = Release|x64 93 118 {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.Build.0 = Release|x64 119 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Debug|Win32.ActiveCfg = Debug|Win32 120 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Debug|Win32.Build.0 = Debug|Win32 121 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Debug|x64.ActiveCfg = Debug|x64 122 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Debug|x64.Build.0 = Debug|x64 123 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|Win32.ActiveCfg = Release|Win32 124 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|Win32.Build.0 = Release|Win32 125 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|x64.ActiveCfg = Release|x64 126 {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}.Release|x64.Build.0 = Release|x64 127 {CE149235-A923-4BA7-B552-3A02287CD3E4}.Debug|Win32.ActiveCfg = Debug|Win32 128 {CE149235-A923-4BA7-B552-3A02287CD3E4}.Debug|Win32.Build.0 = Debug|Win32 129 {CE149235-A923-4BA7-B552-3A02287CD3E4}.Debug|x64.ActiveCfg = Debug|x64 130 {CE149235-A923-4BA7-B552-3A02287CD3E4}.Debug|x64.Build.0 = Debug|x64 131 {CE149235-A923-4BA7-B552-3A02287CD3E4}.Release|Win32.ActiveCfg = Release|Win32 132 {CE149235-A923-4BA7-B552-3A02287CD3E4}.Release|Win32.Build.0 = Release|Win32 133 {CE149235-A923-4BA7-B552-3A02287CD3E4}.Release|x64.ActiveCfg = Release|x64 134 {CE149235-A923-4BA7-B552-3A02287CD3E4}.Release|x64.Build.0 = Release|x64 135 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.ActiveCfg = Debug|Win32 136 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.Build.0 = Debug|Win32 137 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.ActiveCfg = Debug|x64 138 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.Build.0 = Debug|x64 139 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.ActiveCfg = Release|Win32 140 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.Build.0 = Release|Win32 141 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.ActiveCfg = Release|x64 142 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.Build.0 = Release|x64 143 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.ActiveCfg = Debug|Win32 144 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.Build.0 = Debug|Win32 145 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.ActiveCfg = Debug|x64 146 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.Build.0 = Debug|x64 147 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.ActiveCfg = Release|Win32 148 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.Build.0 = Release|Win32 149 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.ActiveCfg = Release|x64 150 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.Build.0 = Release|x64 94 151 EndGlobalSection 95 152 GlobalSection(SolutionProperties) = preSolution -
branches/HTM-DEV-0.2-dev/build/HM_vc9.sln
r324 r438 16 16 {47E90995-1FC5-4EE4-A94D-AD474169F0E1} = {47E90995-1FC5-4EE4-A94D-AD474169F0E1} 17 17 {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} = {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} 18 {457993C6-AE2C-4B9B-B5F9-71033279A0B9} = {457993C6-AE2C-4B9B-B5F9-71033279A0B9} 18 19 EndProjectSection 19 20 EndProject … … 27 28 EndProject 28 29 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibVideoIO", "vc9\TLibVideoIO_vc9.vcproj", "{5280C25A-D316-4BE7-AE50-29D72108624F}" 30 EndProject 31 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc9\TLibRenderer_vc9.vcproj", "{457993C6-AE2C-4B9B-B5F9-71033279A0B9}" 32 ProjectSection(ProjectDependencies) = postProject 33 {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D} 34 EndProjectSection 35 EndProject 36 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppRenderer", "vc9\TAppRenderer_vc9.vcproj", "{ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}" 37 ProjectSection(ProjectDependencies) = postProject 38 {5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F} 39 {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D} 40 {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} = {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} 41 {457993C6-AE2C-4B9B-B5F9-71033279A0B9} = {457993C6-AE2C-4B9B-B5F9-71033279A0B9} 42 EndProjectSection 43 EndProject 44 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc9\TLibExtractor_vc9.vcproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}" 45 EndProject 46 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppExtractor", "vc9\TAppExtractor_vc9.vcproj", "{F46F95E9-7174-4328-90DD-092450E4DCF6}" 47 ProjectSection(ProjectDependencies) = postProject 48 {F8B77A48-AF6C-4746-A89F-B706ABA6AD94} = {F8B77A48-AF6C-4746-A89F-B706ABA6AD94} 49 {27E2C758-E3CE-44CA-A226-83491EC7F798} = {27E2C758-E3CE-44CA-A226-83491EC7F798} 50 {5280C25A-D316-4BE7-AE50-29D72108624F} = {5280C25A-D316-4BE7-AE50-29D72108624F} 51 {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D} 52 {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} = {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} 53 EndProjectSection 29 54 EndProject 30 55 Global … … 92 117 {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.ActiveCfg = Release|x64 93 118 {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.Build.0 = Release|x64 119 {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Debug|Win32.ActiveCfg = Debug|Win32 120 {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Debug|Win32.Build.0 = Debug|Win32 121 {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Debug|x64.ActiveCfg = Debug|x64 122 {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Debug|x64.Build.0 = Debug|x64 123 {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|Win32.ActiveCfg = Release|Win32 124 {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|Win32.Build.0 = Release|Win32 125 {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|x64.ActiveCfg = Release|x64 126 {457993C6-AE2C-4B9B-B5F9-71033279A0B9}.Release|x64.Build.0 = Release|x64 127 {ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Debug|Win32.ActiveCfg = Debug|Win32 128 {ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Debug|Win32.Build.0 = Debug|Win32 129 {ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Debug|x64.ActiveCfg = Debug|x64 130 {ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Debug|x64.Build.0 = Debug|x64 131 {ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Release|Win32.ActiveCfg = Release|Win32 132 {ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Release|Win32.Build.0 = Release|Win32 133 {ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Release|x64.ActiveCfg = Release|x64 134 {ABF5855A-69D4-4579-AC8E-7109DEEFA7F0}.Release|x64.Build.0 = Release|x64 135 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.ActiveCfg = Debug|Win32 136 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|Win32.Build.0 = Debug|Win32 137 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.ActiveCfg = Debug|x64 138 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Debug|x64.Build.0 = Debug|x64 139 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.ActiveCfg = Release|Win32 140 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|Win32.Build.0 = Release|Win32 141 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.ActiveCfg = Release|x64 142 {27E2C758-E3CE-44CA-A226-83491EC7F798}.Release|x64.Build.0 = Release|x64 143 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.ActiveCfg = Debug|Win32 144 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|Win32.Build.0 = Debug|Win32 145 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.ActiveCfg = Debug|x64 146 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Debug|x64.Build.0 = Debug|x64 147 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.ActiveCfg = Release|Win32 148 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|Win32.Build.0 = Release|Win32 149 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.ActiveCfg = Release|x64 150 {F46F95E9-7174-4328-90DD-092450E4DCF6}.Release|x64.Build.0 = Release|x64 94 151 EndGlobalSection 95 152 GlobalSection(SolutionProperties) = preSolution -
branches/HTM-DEV-0.2-dev/build/linux/app/TAppEncoder/makefile
r324 r438 41 41 42 42 43 DYN_DEBUG_LIBS = -lTLibEncoderd -lTLibCommond -lTLibVideoIOd -lTAppCommond 44 DYN_DEBUG_PREREQS = $(LIB_DIR)/libTLibEncoderd.a $(LIB_DIR)/libTLibCommond.a $(LIB_DIR)/libTLibVideoIOd.a $(LIB_DIR)/libTAppCommond.a 45 STAT_DEBUG_LIBS = -lTLibEncoderStaticd -lTLibCommonStaticd -lTLibVideoIOStaticd -lTAppCommonStaticd 46 STAT_DEBUG_PREREQS = $(LIB_DIR)/libTLibEncoderStaticd.a $(LIB_DIR)/libTLibCommonStaticd.a $(LIB_DIR)/libTLibVideoIOStaticd.a $(LIB_DIR)/libTAppCommonStaticd.a 43 DYN_DEBUG_LIBS = -lTLibEncoderd -lTLibCommond -lTLibVideoIOd -lTAppCommond -lTLibRendererd 44 DYN_DEBUG_PREREQS = $(LIB_DIR)/libTLibEncoderd.a $(LIB_DIR)/libTLibCommond.a $(LIB_DIR)/libTLibVideoIOd.a $(LIB_DIR)/libTAppCommond.a $(LIB_DIR)/libTLibRendererd.a 45 STAT_DEBUG_LIBS = -lTLibEncoderStaticd -lTLibCommonStaticd -lTLibVideoIOStaticd -lTAppCommonStaticd -lTLibRendererStaticd 46 STAT_DEBUG_PREREQS = $(LIB_DIR)/libTLibEncoderStaticd.a $(LIB_DIR)/libTLibCommonStaticd.a $(LIB_DIR)/libTLibVideoIOStaticd.a $(LIB_DIR)/libTAppCommonStaticd.a $(LIB_DIR)/libTLibRendererStaticd.a 47 47 48 DYN_RELEASE_LIBS = -lTLibEncoder -lTLibCommon -lTLibVideoIO -lTAppCommon 49 DYN_RELEASE_PREREQS = $(LIB_DIR)/libTLibEncoder.a $(LIB_DIR)/libTLibCommon.a $(LIB_DIR)/libTLibVideoIO.a $(LIB_DIR)/libTAppCommon.a 50 STAT_RELEASE_LIBS = -lTLibEncoderStatic -lTLibCommonStatic -lTLibVideoIOStatic -lTAppCommonStatic 51 STAT_RELEASE_PREREQS = $(LIB_DIR)/libTLibEncoderStatic.a $(LIB_DIR)/libTLibCommonStatic.a $(LIB_DIR)/libTLibVideoIOStatic.a $(LIB_DIR)/libTAppCommonStatic.a 48 DYN_RELEASE_LIBS = -lTLibEncoder -lTLibCommon -lTLibVideoIO -lTAppCommon -lTLibRenderer 49 DYN_RELEASE_PREREQS = $(LIB_DIR)/libTLibEncoder.a $(LIB_DIR)/libTLibCommon.a $(LIB_DIR)/libTLibVideoIO.a $(LIB_DIR)/libTAppCommon.a $(LIB_DIR)/libTLibRenderer.a 50 STAT_RELEASE_LIBS = -lTLibEncoderStatic -lTLibCommonStatic -lTLibVideoIOStatic -lTAppCommonStatic -lTLibRendererStatic 51 STAT_RELEASE_PREREQS = $(LIB_DIR)/libTLibEncoderStatic.a $(LIB_DIR)/libTLibCommonStatic.a $(LIB_DIR)/libTLibVideoIOStatic.a $(LIB_DIR)/libTAppCommonStatic.a $(LIB_DIR)/libTLibRendererStatic.a 52 52 53 53 -
branches/HTM-DEV-0.2-dev/build/linux/lib/TAppCommon/makefile
r324 r438 34 34 OBJS = \ 35 35 $(OBJ_DIR)/program_options_lite.o \ 36 $(OBJ_DIR)/TAppComCamPara.o \ 36 37 37 38 LIBS = -lpthread -
branches/HTM-DEV-0.2-dev/build/linux/makefile
r324 r438 9 9 $(MAKE) -C lib/TLibDecoder MM32=$(M32) 10 10 $(MAKE) -C lib/TLibEncoder MM32=$(M32) 11 $(MAKE) -C lib/TLibRenderer MM32=$(M32) 12 $(MAKE) -C lib/TLibExtractor MM32=$(M32) 11 13 $(MAKE) -C lib/TAppCommon MM32=$(M32) 12 14 $(MAKE) -C app/TAppDecoder MM32=$(M32) 13 15 $(MAKE) -C app/TAppEncoder MM32=$(M32) 16 $(MAKE) -C app/TAppRenderer MM32=$(M32) 17 $(MAKE) -C app/TAppExtractor MM32=$(M32) 14 18 $(MAKE) -C utils/annexBbytecount MM32=$(M32) 15 19 $(MAKE) -C utils/convert_NtoMbit_YCbCr MM32=$(M32) … … 20 24 $(MAKE) -C lib/TLibDecoder debug MM32=$(M32) 21 25 $(MAKE) -C lib/TLibEncoder debug MM32=$(M32) 26 $(MAKE) -C lib/TLibRenderer debug MM32=$(M32) 27 $(MAKE) -C lib/TLibExtractor debug MM32=$(M32) 22 28 $(MAKE) -C lib/TAppCommon debug MM32=$(M32) 23 29 $(MAKE) -C app/TAppDecoder debug MM32=$(M32) 24 30 $(MAKE) -C app/TAppEncoder debug MM32=$(M32) 31 $(MAKE) -C app/TAppRenderer debug MM32=$(M32) 32 $(MAKE) -C app/TAppExtractor debug MM32=$(M32) 25 33 $(MAKE) -C utils/annexBbytecount debug MM32=$(M32) 26 34 $(MAKE) -C utils/convert_NtoMbit_YCbCr debug MM32=$(M32) … … 31 39 $(MAKE) -C lib/TLibDecoder release MM32=$(M32) 32 40 $(MAKE) -C lib/TLibEncoder release MM32=$(M32) 41 $(MAKE) -C lib/TLibRenderer release MM32=$(M32) 42 $(MAKE) -C lib/TLibExtractor release MM32=$(M32) 33 43 $(MAKE) -C lib/TAppCommon release MM32=$(M32) 34 44 $(MAKE) -C app/TAppDecoder release MM32=$(M32) 35 45 $(MAKE) -C app/TAppEncoder release MM32=$(M32) 46 $(MAKE) -C app/TAppRenderer release MM32=$(M32) 47 $(MAKE) -C app/TAppExtractor release MM32=$(M32) 36 48 $(MAKE) -C utils/annexBbytecount release MM32=$(M32) 37 49 $(MAKE) -C utils/convert_NtoMbit_YCbCr release MM32=$(M32) … … 42 54 $(MAKE) -C lib/TLibDecoder clean MM32=$(M32) 43 55 $(MAKE) -C lib/TLibEncoder clean MM32=$(M32) 56 $(MAKE) -C lib/TLibRenderer clean MM32=$(M32) 57 $(MAKE) -C lib/TLibExtractor clean MM32=$(M32) 44 58 $(MAKE) -C lib/TAppCommon clean MM32=$(M32) 45 59 $(MAKE) -C app/TAppDecoder clean MM32=$(M32) 46 60 $(MAKE) -C app/TAppEncoder clean MM32=$(M32) 61 $(MAKE) -C app/TAppRenderer clean MM32=$(M32) 62 $(MAKE) -C app/TAppExtractor clean MM32=$(M32) 47 63 $(MAKE) -C utils/annexBbytecount clean MM32=$(M32) 48 64 $(MAKE) -C utils/convert_NtoMbit_YCbCr clean MM32=$(M32) -
branches/HTM-DEV-0.2-dev/build/vc10/TAppCommon_vc10.vcxproj
r324 r438 145 145 <ItemGroup> 146 146 <ClCompile Include="..\..\source\Lib\TAppCommon\program_options_lite.cpp" /> 147 <ClCompile Include="..\..\source\Lib\TAppCommon\TAppComCamPara.cpp" /> 147 148 </ItemGroup> 148 149 <ItemGroup> 149 150 <ClInclude Include="..\..\source\Lib\TAppCommon\program_options_lite.h" /> 151 <ClInclude Include="..\..\source\Lib\TAppCommon\TAppComCamPara.h" /> 150 152 </ItemGroup> 151 153 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -
branches/HTM-DEV-0.2-dev/build/vc10/TAppEncoder_vc10.vcxproj
r324 r438 189 189 <ReferenceOutputAssembly>false</ReferenceOutputAssembly> 190 190 </ProjectReference> 191 <ProjectReference Include="TLibRenderer_vc10.vcxproj"> 192 <Project>{2b298be6-dff0-4bd2-8f26-395ffe7f9eb4}</Project> 193 <Private>true</Private> 194 <ReferenceOutputAssembly>false</ReferenceOutputAssembly> 195 <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies> 196 <LinkLibraryDependencies>true</LinkLibraryDependencies> 197 <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs> 198 </ProjectReference> 191 199 <ProjectReference Include="TLibVideoIO_vc10.vcxproj"> 192 200 <Project>{5280c25a-d316-4be7-ae50-29d72108624f}</Project> -
branches/HTM-DEV-0.2-dev/build/vc8/TAppCommon_vc8.vcproj
r324 r438 283 283 > 284 284 </File> 285 <File 286 RelativePath="..\..\source\Lib\TAppCommon\TAppComCamPara.cpp" 287 > 288 </File> 285 289 </Filter> 286 290 <Filter … … 290 294 <File 291 295 RelativePath="..\..\source\Lib\TAppCommon\program_options_lite.h" 296 > 297 </File> 298 <File 299 RelativePath="..\..\source\Lib\TAppCommon\TAppComCamPara.h" 292 300 > 293 301 </File> -
branches/HTM-DEV-0.2-dev/build/vc9/TAppCommon_vc9.vcproj
r324 r438 286 286 > 287 287 </File> 288 <File 289 RelativePath="..\..\source\Lib\TAppCommon\TAppComCamPara.cpp" 290 > 291 </File> 288 292 </Filter> 289 293 <Filter … … 293 297 <File 294 298 RelativePath="..\..\source\Lib\TAppCommon\program_options_lite.h" 299 > 300 </File> 301 <File 302 RelativePath="..\..\source\Lib\TAppCommon\TAppComCamPara.h" 295 303 > 296 304 </File> -
branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/baseCfg_2view+depth.cfg
r371 r438 105 105 Frame8_l5: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 -4 2 -1 106 106 107 ListCombination : 1 # Use combined list for uni-prediction in B-slices 108 107 109 #=========== Motion Search ============= 108 110 FastSearch : 1 # 0:Full search 1:TZ search … … 124 126 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 125 127 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) (mc) 126 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 127 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 128 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 128 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 129 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 129 130 130 131 -
branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/baseCfg_2view.cfg
r371 r438 57 57 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 -1 2 -1 58 58 59 ListCombination : 1 # Use combined list for uni-prediction in B-slices 60 59 61 #=========== Motion Search ============= 60 62 FastSearch : 1 # 0:Full search 1:TZ search … … 77 79 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 78 80 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) (mc) 79 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 80 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 81 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 81 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 82 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 82 83 83 84 -
branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/baseCfg_3view+depth.cfg
r371 r438 105 105 Frame8_l5: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 -4 2 -1 106 106 107 ListCombination : 1 # Use combined list for uni-prediction in B-slices 108 107 109 #=========== Motion Search ============= 108 110 FastSearch : 1 # 0:Full search 1:TZ search … … 124 126 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 125 127 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) (mc) 126 LoopFilterBetaOffset_div2 : 0 # base_param: - 6 ~ 6127 LoopFilterTcOffset_div2 : 0 # base_param: - 6 ~ 6128 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 128 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 129 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 130 129 131 130 132 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/baseCfg_3view.cfg
r371 r438 69 69 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 -2 2 -1 70 70 71 ListCombination : 1 # Use combined list for uni-prediction in B-slices 72 71 73 #=========== Motion Search ============= 72 74 FastSearch : 1 # 0:Full search 1:TZ search … … 89 91 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 90 92 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) (mc) 91 LoopFilterBetaOffset_div2 : 0 # base_param: - 6 ~ 692 LoopFilterTcOffset_div2 : 0 # base_param: - 6 ~ 693 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 93 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 94 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 95 94 96 95 97 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/fullCfg.cfg
r371 r438 109 109 Frame8_l5: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 -4 2 -1 110 110 111 ListCombination : 1 # Use combined list for uni-prediction in B-slices 112 111 113 #=========== Motion Search ============= 112 114 FastSearch : 1 # 0:Full search 1:TZ search … … 129 131 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 130 132 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) (mc) 131 LoopFilterBetaOffset_div2 : 0 # base_param: - 6 ~ 6132 LoopFilterTcOffset_div2 : 0 # base_param: - 6 ~ 6133 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 133 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 134 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 135 134 136 135 137 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_intra_main.cfg
r371 r438 39 39 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 40 40 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) 41 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 42 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 43 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 41 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 42 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 44 43 45 44 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_intra_main10.cfg
r371 r438 39 39 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 40 40 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) 41 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 42 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 43 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 41 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 42 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 44 43 45 44 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_lowdelay_P_main.cfg
r371 r438 23 23 Frame3: P 3 3 0.4624 0 0 0 4 4 -1 -3 -7 -11 1 -1 5 0 1 1 1 1 24 24 Frame4: P 4 1 0.578 0 0 0 4 4 -1 -4 -8 -12 1 -1 5 0 1 1 1 1 25 ListCombination : 1 # Use combined list for uni-prediction in B-slices 25 26 26 27 #=========== Motion Search ============= … … 44 45 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 45 46 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) 46 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 47 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 48 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 47 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 48 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 49 49 50 50 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_lowdelay_P_main10.cfg
r371 r438 23 23 Frame3: P 3 3 0.4624 0 0 0 4 4 -1 -3 -7 -11 1 -1 5 0 1 1 1 1 24 24 Frame4: P 4 1 0.578 0 0 0 4 4 -1 -4 -8 -12 1 -1 5 0 1 1 1 1 25 ListCombination : 1 # Use combined list for uni-prediction in B-slices 25 26 26 27 #=========== Motion Search ============= … … 46 47 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 47 48 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) 48 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 49 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 50 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 49 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 50 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 51 51 52 52 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_lowdelay_main.cfg
r371 r438 23 23 Frame3: B 3 3 0.4624 0 0 0 4 4 -1 -3 -7 -11 1 -1 5 0 1 1 1 1 24 24 Frame4: B 4 1 0.578 0 0 0 4 4 -1 -4 -8 -12 1 -1 5 0 1 1 1 1 25 ListCombination : 1 # Use combined list for uni-prediction in B-slices 25 26 26 27 #=========== Motion Search ============= … … 44 45 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 45 46 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) 46 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 47 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 48 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 47 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 48 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 49 49 50 50 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_lowdelay_main10.cfg
r371 r438 23 23 Frame3: B 3 3 0.4624 0 0 0 4 4 -1 -3 -7 -11 1 -1 5 0 1 1 1 1 24 24 Frame4: B 4 1 0.578 0 0 0 4 4 -1 -4 -8 -12 1 -1 5 0 1 1 1 1 25 ListCombination : 1 # Use combined list for uni-prediction in B-slices 25 26 26 27 #=========== Motion Search ============= … … 44 45 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 45 46 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) 46 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 47 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 48 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 47 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 48 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 49 49 50 50 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_randomaccess_main.cfg
r371 r438 27 27 Frame7: B 5 4 0.68 0 0 0 2 4 -1 -5 1 3 1 1 5 1 0 1 1 1 28 28 Frame8: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 29 ListCombination : 1 # Use combined list for uni-prediction in B-slices 29 30 30 31 #=========== Motion Search ============= … … 48 49 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 49 50 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) 50 LoopFilterBetaOffset_div2 : 0 # base_param: - 6 ~ 651 LoopFilterTcOffset_div2 : 0 # base_param: - 6 ~ 652 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 51 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 52 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 53 53 54 54 55 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_randomaccess_main10.cfg
r371 r438 27 27 Frame7: B 5 4 0.68 0 0 0 2 4 -1 -5 1 3 1 1 5 1 0 1 1 1 28 28 Frame8: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 29 ListCombination : 1 # Use combined list for uni-prediction in B-slices 29 30 30 31 #=========== Motion Search ============= … … 48 49 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 49 50 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) 50 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 51 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 52 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 51 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 52 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 53 53 54 54 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/MV-HEVC/baseCfg_2view.cfg
r371 r438 57 57 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 -1 2 -1 58 58 59 ListCombination : 1 # Use combined list for uni-prediction in B-slices 60 59 61 #=========== Motion Search ============= 60 62 FastSearch : 1 # 0:Full search 1:TZ search … … 77 79 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 78 80 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) (mc) 79 LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6 80 LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6 81 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 81 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 82 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 82 83 83 84 -
branches/HTM-DEV-0.2-dev/cfg/MV-HEVC/baseCfg_3view.cfg
r371 r438 69 69 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 -2 2 -1 70 70 71 ListCombination : 1 # Use combined list for uni-prediction in B-slices 72 71 73 #=========== Motion Search ============= 72 74 FastSearch : 1 # 0:Full search 1:TZ search … … 89 91 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 90 92 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) (mc) 91 LoopFilterBetaOffset_div2 : 0 # base_param: - 6 ~ 692 LoopFilterTcOffset_div2 : 0 # base_param: - 6 ~ 693 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 93 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 94 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 95 94 96 95 97 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/cfg/MV-HEVC/fullCfg.cfg
r371 r438 73 73 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 -2 2 -1 74 74 75 ListCombination : 1 # Use combined list for uni-prediction in B-slices 76 75 77 #=========== Motion Search ============= 76 78 FastSearch : 1 # 0:Full search 1:TZ search … … 93 95 LoopFilterOffsetInPPS : 0 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param) 94 96 LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter) (mc) 95 LoopFilterBetaOffset_div2 : 0 # base_param: - 6 ~ 696 LoopFilterTcOffset_div2 : 0 # base_param: - 6 ~ 697 DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream) 97 LoopFilterBetaOffset_div2 : 0 # base_param: -13 ~ 13 98 LoopFilterTcOffset_div2 : 0 # base_param: -13 ~ 13 99 98 100 99 101 #=========== Misc. ============ -
branches/HTM-DEV-0.2-dev/doc/Doxyfile
r362 r438 33 33 # if some version control system is used. 34 34 35 PROJECT_NUMBER = HM-10. 135 PROJECT_NUMBER = HM-10.0 36 36 37 37 # Using the PROJECT_BRIEF tag one can provide an optional one line description -
branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecCfg.cpp
r368 r438 45 45 #include <cassert> 46 46 #endif 47 47 48 #ifdef WIN32 48 49 #define strdup _strdup … … 78 79 ("OutputBitDepth,d", m_outputBitDepthY, 0, "bit depth of YUV output luma component (default: use 0 for native depth)") 79 80 ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)") 81 80 82 #if H_MV 81 83 ("MaxLayerId,-ls", m_maxLayerId, MAX_NUM_LAYER_IDS-1, "Maximum LayerId to be decoded.") 82 84 #endif 85 83 86 ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers") 84 87 ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n" … … 105 108 /* convert std::string to c string for compatability */ 106 109 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 110 107 111 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 108 112 … … 187 191 } 188 192 #endif 193 189 194 //! \} -
branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp
r401 r438 54 54 55 55 TAppDecTop::TAppDecTop() 56 56 57 #if !H_MV 57 58 : m_iPOCLastDisplay(-MAX_INT) … … 59 60 : m_numDecoders( 0 ) 60 61 #endif 62 61 63 { 62 64 ::memset (m_abDecFlag, 0, sizeof (m_abDecFlag)); … … 77 79 m_pchBitstreamFile = NULL; 78 80 } 81 79 82 #if H_MV 80 83 for (Int decIdx = 0; decIdx < m_numDecoders; decIdx++) … … 112 115 poc = -1; 113 116 #endif 117 114 118 TComList<TComPic*>* pcListPic = NULL; 115 119 … … 143 147 Bool firstSlice = true; 144 148 #endif 149 145 150 146 151 while (!!bitstreamFile) … … 151 156 * nal unit. */ 152 157 streampos location = bitstreamFile.tellg(); 153 #if H_MV154 #if ENC_DEC_TRACE155 Int64 symCount = g_nSymbolCounter;156 #endif157 #endif158 158 AnnexBStats stats = AnnexBStats(); 159 159 #if !H_MV 160 160 Bool bPreviousPictureDecoded = false; 161 161 #endif 162 163 162 vector<uint8_t> nalUnit; 164 163 InputNALUnit nalu; … … 251 250 bitstreamFile.seekg(location-streamoff(3)); 252 251 bytestream.reset(); 253 #if H_MV254 #if ENC_DEC_TRACE255 g_nSymbolCounter = symCount;256 #endif257 #endif258 259 252 } 260 253 #if !H_MV … … 283 276 } 284 277 #endif 285 286 278 if( pcListPic ) 287 279 { … … 294 286 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 295 287 if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; } 296 297 288 #if H_MV 298 289 m_tVideoIOYuvReconFile[decIdxLastPic]->open( m_pchReconFiles[decIdxLastPic], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode … … 306 297 if ( bNewPicture && 307 298 #endif 308 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR _W_RADL299 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR 309 300 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP 310 301 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP 311 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA _W_RADL312 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA _W_LP) )302 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLANT 303 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA ) ) 313 304 { 314 305 #if H_MV … … 602 593 } 603 594 604 #if H_MV605 Int TAppDecTop::xGetDecoderIdx( Int layerId, Bool createFlag /*= false */ )606 {607 Int decIdx = -1;608 if ( m_layerIdToDecIdx[ layerId ] != -1 )609 {610 decIdx = m_layerIdToDecIdx[ layerId ];611 }612 else613 {614 assert ( createFlag );615 assert( m_numDecoders < MAX_NUM_LAYERS );616 617 decIdx = m_numDecoders;618 619 // Init decoder620 m_tDecTop[ decIdx ] = new TDecTop;621 m_tDecTop[ decIdx ]->create();622 m_tDecTop[ decIdx ]->init( );623 m_tDecTop[ decIdx ]->setLayerId( layerId );624 m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);625 m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );626 627 // append pic list of new decoder to PicLists628 assert( m_ivPicLists.size() == m_numDecoders );629 m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );630 631 // create recon file related stuff632 Char* pchTempFilename = NULL;633 if ( m_pchReconFile )634 {635 Char buffer[4];636 sprintf(buffer,"_%i", layerId );637 assert ( m_pchReconFile );638 xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );639 assert( m_pchReconFiles.size() == m_numDecoders );640 }641 642 m_pchReconFiles.push_back( pchTempFilename );643 644 m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;645 m_reconOpen [ decIdx ] = false;646 647 // set others648 m_pocLastDisplay [ decIdx ] = -MAX_INT;649 m_layerIdToDecIdx [ layerId ] = decIdx;650 651 m_numDecoders++;652 };653 return decIdx;654 }655 #endif656 595 //! \} -
branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.h
r401 r438 74 74 // for output control 75 75 Bool m_abDecFlag[ MAX_GOP ]; ///< decoded flag in one GOP 76 76 77 #if H_MV 77 78 Int m_pocLastDisplay [ MAX_NUM_LAYERS ]; ///< last POC in display order … … 89 90 Void decode (); ///< main decoding function 90 91 92 91 93 protected: 92 94 Void xCreateDecLib (); ///< create internal classes … … 97 99 Void xWriteOutput ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file 98 100 Void xFlushOutput ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file 99 Int xGetDecoderIdx ( Int layerId, Bool createFlag = false ); 101 Int xGetDecoderIdx ( Int layerId, Bool createFlag = false ) 102 { 103 Int decIdx = -1; 104 if ( m_layerIdToDecIdx[ layerId ] != -1 ) 105 { 106 decIdx = m_layerIdToDecIdx[ layerId ]; 107 } 108 else 109 { 110 assert ( createFlag ); 111 assert( m_numDecoders < MAX_NUM_LAYERS ); 112 113 decIdx = m_numDecoders; 114 115 // Init decoder 116 m_tDecTop[ decIdx ] = new TDecTop; 117 m_tDecTop[ decIdx ]->create(); 118 m_tDecTop[ decIdx ]->init( ); 119 m_tDecTop[ decIdx ]->setLayerId( layerId ); 120 m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 121 m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 122 123 // append pic list of new decoder to PicLists 124 assert( m_ivPicLists.size() == m_numDecoders ); 125 m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() ); 126 127 // create recon file related stuff 128 Char* pchTempFilename = NULL; 129 if ( m_pchReconFile ) 130 { 131 Char buffer[4]; 132 sprintf(buffer,"_%i", layerId ); 133 assert ( m_pchReconFile ); 134 xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename ); 135 assert( m_pchReconFiles.size() == m_numDecoders ); 136 } 137 138 m_pchReconFiles.push_back( pchTempFilename ); 139 140 m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv; 141 m_reconOpen [ decIdx ] = false; 142 143 // set others 144 m_pocLastDisplay [ decIdx ] = -MAX_INT; 145 m_layerIdToDecIdx [ layerId ] = decIdx; 146 147 m_numDecoders++; 148 }; 149 return decIdx; 150 } 100 151 #else 101 152 Void xWriteOutput ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file 102 153 Void xFlushOutput ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file 103 154 #endif 155 104 156 Bool isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet 105 157 }; -
branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r368 r438 79 79 m_aidQP = NULL; 80 80 #endif 81 #if J0149_TONE_MAPPING_SEI82 m_startOfCodedInterval = NULL;83 m_codedPivotValue = NULL;84 m_targetPivotValue = NULL;85 #endif86 81 } 87 82 … … 107 102 delete[] m_aidQP; 108 103 } 109 #endif110 #if J0149_TONE_MAPPING_SEI111 if ( m_startOfCodedInterval )112 {113 delete[] m_startOfCodedInterval;114 m_startOfCodedInterval = NULL;115 }116 if ( m_codedPivotValue )117 {118 delete[] m_codedPivotValue;119 m_codedPivotValue = NULL;120 }121 if ( m_targetPivotValue )122 {123 delete[] m_targetPivotValue;124 m_targetPivotValue = NULL;125 }126 #endif127 #if !H_MV128 104 free(m_pchInputFile); 129 105 #endif 106 130 107 free(m_pchBitstreamFile); 108 131 109 #if H_MV 132 110 for(Int i = 0; i< m_pchReconFileList.size(); i++ ) … … 138 116 free(m_pchReconFile); 139 117 #endif 118 140 119 free(m_pchdQPFile); 141 120 free(m_pColumnWidth); 142 121 free(m_pRowHeight); 143 122 free(m_scalingListFile); 123 144 124 #if H_MV 145 125 for( Int i = 0; i < m_GOPListMvc.size(); i++ ) … … 320 300 string cfg_InputFile; 321 301 #endif 302 322 303 string cfg_BitstreamFile; 304 323 305 #if !H_MV 324 306 string cfg_ReconFile; 325 307 #endif 308 326 309 #if H_MV 327 310 vector<Int> cfg_dimensionLength; … … 333 316 #endif 334 317 #endif 318 335 319 string cfg_dQPFile; 336 320 string cfg_ColumnWidth; 337 321 string cfg_RowHeight; 338 322 string cfg_ScalingListFile; 339 #if J0149_TONE_MAPPING_SEI340 string cfg_startOfCodedInterval;341 string cfg_codedPivotValue;342 string cfg_targetPivotValue;343 #endif344 323 #if SIGNAL_BITRATE_PICRATE_IN_VPS 345 324 string cfg_bitRateInfoPresentFlag; … … 356 335 357 336 // File, I/O and source parameters 337 358 338 #if H_MV 359 339 ("InputFile_%d,i_%d", m_pchInputFileList, (char *) 0 , MAX_NUM_LAYER_IDS , "original Yuv input file name %d") … … 361 341 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") 362 342 #endif 343 363 344 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") 345 364 346 #if H_MV 365 347 ("ReconFile_%d,o_%d", m_pchReconFileList, (char *) 0 , MAX_NUM_LAYER_IDS , "reconstructed Yuv output file name %d") … … 367 349 ("ReconFile,o", cfg_ReconFile, string(""), "Reconstructed YUV output file name") 368 350 #endif 351 369 352 #if H_MV 370 353 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") … … 382 365 ("SplittingFlag", m_splittingFlag , false , "Splitting Flag") 383 366 #endif 367 384 368 ("SourceWidth,-wdt", m_iSourceWidth, 0, "Source picture width") 385 369 ("SourceHeight,-hgt", m_iSourceHeight, 0, "Source picture height") … … 403 387 404 388 // Profile and level 389 405 390 ("Profile", m_profile, Profile::NONE, "Profile to be used when encoding (Incomplete)") 406 391 ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1 (Incomplete)") … … 432 417 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 433 418 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 434 #if !L0034_COMBINED_LIST_CLEANUP435 419 ("ListCombination,-lc", m_bUseLComb, true, "Combined reference list for uni-prediction estimation in B-slices") 436 #endif437 420 // motion options 438 421 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") … … 490 473 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 491 474 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false ) 492 #if L0386_DB_METRIC493 ("DeblockingFilterMetric", m_DeblockingFilterMetric, false )494 #endif495 475 496 476 // Coding tools … … 611 591 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, 0, "Control generation of buffering period SEI messages") 612 592 ("SEIPictureTiming", m_pictureTimingSEIEnabled, 0, "Control generation of picture timing SEI messages") 613 #if J0149_TONE_MAPPING_SEI614 ("SEIToneMappingInfo", m_toneMappingInfoSEIEnabled, false, "Control generation of Tone Mapping SEI messages")615 ("SEIToneMapId", m_toneMapId, 0, "Specifies Id of Tone Mapping SEI message for a given session")616 ("SEIToneMapCancelFlag", m_toneMapCancelFlag, false, "Indicates that Tone Mapping SEI message cancels the persistance or follows")617 ("SEIToneMapPersistenceFlag", m_toneMapPersistenceFlag, true, "Specifies the persistence of the Tone Mapping SEI message")618 ("SEIToneMapCodedDataBitDepth", m_toneMapCodedDataBitDepth, 8, "Specifies Coded Data BitDepth of Tone Mapping SEI messages")619 ("SEIToneMapTargetBitDepth", m_toneMapTargetBitDepth, 8, "Specifies Output BitDepth of Tome mapping function")620 ("SEIToneMapModelId", m_toneMapModelId, 0, "Specifies Model utilized for mapping coded data into target_bit_depth range\n"621 "\t0: linear mapping with clipping\n"622 "\t1: sigmoidal mapping\n"623 "\t2: user-defined table mapping\n"624 "\t3: piece-wise linear mapping\n"625 "\t4: luminance dynamic range information ")626 ("SEIToneMapMinValue", m_toneMapMinValue, 0, "Specifies the minimum value in mode 0")627 ("SEIToneMapMaxValue", m_toneMapMaxValue, 1023, "Specifies the maxmum value in mode 0")628 ("SEIToneMapSigmoidMidpoint", m_sigmoidMidpoint, 512, "Specifies the centre point in mode 1")629 ("SEIToneMapSigmoidWidth", m_sigmoidWidth, 960, "Specifies the distance between 5% and 95% values of the target_bit_depth in mode 1")630 ("SEIToneMapStartOfCodedInterval", cfg_startOfCodedInterval, string(""), "Array of user-defined mapping table")631 ("SEIToneMapNumPivots", m_numPivots, 0, "Specifies the number of pivot points in mode 3")632 ("SEIToneMapCodedPivotValue", cfg_codedPivotValue, string(""), "Array of pivot point")633 ("SEIToneMapTargetPivotValue", cfg_targetPivotValue, string(""), "Array of pivot point")634 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination")635 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO")636 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue")637 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue")638 ("SEIToneMapExposureCompensationValueDenomIdc", m_exposureCompensationValueDenomIdc, 2, "Specifies the denominator of ExposureCompensationValue")639 ("SEIToneMapRefScreenLuminanceWhite", m_refScreenLuminanceWhite, 350, "Specifies reference screen brightness setting in units of candela per square metre")640 ("SEIToneMapExtendedRangeWhiteLevel", m_extendedRangeWhiteLevel, 800, "Indicates the luminance dynamic range")641 ("SEIToneMapNominalBlackLevelLumaCodeValue", m_nominalBlackLevelLumaCodeValue, 16, "Specifies luma sample value of the nominal black level assigned decoded pictures")642 ("SEIToneMapNominalWhiteLevelLumaCodeValue", m_nominalWhiteLevelLumaCodeValue, 235, "Specifies luma sample value of the nominal white level assigned decoded pictures")643 ("SEIToneMapExtendedWhiteLevelLumaCodeValue", m_extendedWhiteLevelLumaCodeValue, 300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures")644 #endif645 593 ("SEIFramePacking", m_framePackingSEIEnabled, 0, "Control generation of frame packing SEI messages") 646 594 ("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n" … … 663 611 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message") 664 612 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.") 665 #if L0208_SOP_DESCRIPTION_SEI666 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages")667 #endif668 #if K0180_SCALABLE_NESTING_SEI669 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages")670 #endif671 613 #if SIGNAL_BITRATE_PICRATE_IN_VPS 672 614 ("BitRatePicRateMaxTLayers", m_bitRatePicRateMaxTLayers, 0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file") … … 719 661 } 720 662 #endif 663 721 664 po::setDefaults(opts); 722 665 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv); … … 738 681 */ 739 682 /* convert std::string to c string for compatability */ 683 740 684 #if !H_MV 741 685 m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str()); 742 686 #endif 687 743 688 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 689 744 690 #if !H_MV 745 691 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 746 692 #endif 693 747 694 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 748 695 … … 808 755 free ( pRowHeight ); 809 756 #endif 757 810 758 #if SIGNAL_BITRATE_PICRATE_IN_VPS 811 759 readBoolString(cfg_bitRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_bitRateInfoPresentFlag, "bit rate info. present flag" ); … … 966 914 m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 967 915 968 #if J0149_TONE_MAPPING_SEI969 if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag )970 {971 Char* pcStartOfCodedInterval = cfg_startOfCodedInterval.empty() ? NULL: strdup(cfg_startOfCodedInterval.c_str());972 Char* pcCodedPivotValue = cfg_codedPivotValue.empty() ? NULL: strdup(cfg_codedPivotValue.c_str());973 Char* pcTargetPivotValue = cfg_targetPivotValue.empty() ? NULL: strdup(cfg_targetPivotValue.c_str());974 if( m_toneMapModelId == 2 && pcStartOfCodedInterval )975 {976 char *startOfCodedInterval;977 UInt num = 1u<< m_toneMapTargetBitDepth;978 m_startOfCodedInterval = new Int[num];979 ::memset( m_startOfCodedInterval, 0, sizeof(Int)*num );980 startOfCodedInterval = strtok(pcStartOfCodedInterval, " .");981 int i = 0;982 while( startOfCodedInterval && ( i < num ) )983 {984 m_startOfCodedInterval[i] = atoi( startOfCodedInterval );985 startOfCodedInterval = strtok(NULL, " .");986 i++;987 }988 }989 else990 {991 m_startOfCodedInterval = NULL;992 }993 if( ( m_toneMapModelId == 3 ) && ( m_numPivots > 0 ) )994 {995 if( pcCodedPivotValue && pcTargetPivotValue )996 {997 char *codedPivotValue;998 char *targetPivotValue;999 m_codedPivotValue = new Int[m_numPivots];1000 m_targetPivotValue = new Int[m_numPivots];1001 ::memset( m_codedPivotValue, 0, sizeof(Int)*( m_numPivots ) );1002 ::memset( m_targetPivotValue, 0, sizeof(Int)*( m_numPivots ) );1003 codedPivotValue = strtok(pcCodedPivotValue, " .");1004 int i=0;1005 while(codedPivotValue&&i<m_numPivots)1006 {1007 m_codedPivotValue[i] = atoi( codedPivotValue );1008 codedPivotValue = strtok(NULL, " .");1009 i++;1010 }1011 i=0;1012 targetPivotValue = strtok(pcTargetPivotValue, " .");1013 while(targetPivotValue&&i<m_numPivots)1014 {1015 m_targetPivotValue[i]= atoi( targetPivotValue );1016 targetPivotValue = strtok(NULL, " .");1017 i++;1018 }1019 }1020 }1021 else1022 {1023 m_codedPivotValue = NULL;1024 m_targetPivotValue = NULL;1025 }1026 }1027 #endif1028 916 // check validity of input parameters 1029 917 xCheckParameter(); … … 1125 1013 xConfirmPara( m_iFrameRate <= 0, "Frame rate must be more than 1" ); 1126 1014 xConfirmPara( m_framesToBeEncoded <= 0, "Total Number Of Frames encoded must be more than 0" ); 1015 1127 1016 #if H_MV 1128 1017 xConfirmPara( m_numberOfLayers > MAX_NUM_LAYER_IDS , "NumberOfLayers must be less than or equal to MAX_NUM_LAYER_IDS"); … … 1137 1026 xConfirmPara( m_scalabilityMask != 1 , "Scalability Mask must be equal to 1. "); 1138 1027 #endif 1139 1028 1140 1029 m_dimIds.push_back( m_viewId ); 1141 1030 #if H_3D … … 1194 1083 1195 1084 #endif 1085 1086 1196 1087 xConfirmPara( m_iGOPSize < 1 , "GOP Size must be greater or equal to 1" ); 1197 1088 xConfirmPara( m_iGOPSize > 1 && m_iGOPSize % 2, "GOP Size must be a multiple of 2, if GOP Size is greater than 1" ); … … 1457 1348 Int* m_numReorderPics = m_numReorderPicsMvc [layer]; // It is not a member, but this name helps avoiding code duplication !!! 1458 1349 #endif 1350 1459 1351 /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure 1460 1352 * This permits the ability to omit a GOP structure specification */ … … 1717 1609 { 1718 1610 m_numReorderPics[i] = 0; 1719 #if L0323_DPB1720 m_maxDecPicBuffering[i] = 1;1721 #else1722 1611 m_maxDecPicBuffering[i] = 0; 1723 #endif1724 1612 } 1725 1613 for(Int i=0; i<m_iGOPSize; i++) 1726 1614 { 1727 #if L0323_DPB1728 if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])1729 #else1730 1615 if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1731 #endif 1732 { 1733 #if L0323_DPB 1734 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1; 1735 #else 1616 { 1736 1617 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics; 1737 #endif1738 1618 } 1739 1619 Int highestDecodingNumberWithLowerPOC = 0; … … 1766 1646 m_numReorderPics[i+1] = m_numReorderPics[i]; 1767 1647 } 1768 #if L0323_DPB1769 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive1770 if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1)1771 {1772 m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1;1773 }1774 #else1775 1648 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive 1776 1649 if(m_numReorderPics[i] > m_maxDecPicBuffering[i]) … … 1778 1651 m_maxDecPicBuffering[i] = m_numReorderPics[i]; 1779 1652 } 1780 #endif1781 1653 // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer 1782 1654 if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i]) … … 1785 1657 } 1786 1658 } 1787 1788 1789 #if L0323_DPB1790 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive1791 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1)1792 {1793 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1;1794 }1795 #else1796 1659 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive 1797 1660 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1]) … … 1799 1662 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1]; 1800 1663 } 1801 #endif1802 1664 1803 1665 if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag) … … 1874 1736 } 1875 1737 } 1876 #if !L0034_COMBINED_LIST_CLEANUP1877 1738 xConfirmPara( m_bUseLComb==false && m_numReorderPics[MAX_TLAYER-1]!=0, "ListCombination can only be 0 in low delay coding (more precisely when L0 and L1 are identical)" ); // Note however this is not the full necessary condition as ref_pic_list_combination_flag can only be 0 if L0 == L1. 1878 #endif1879 1739 xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" ); 1880 1740 xConfirmPara( m_iWaveFrontSubstreams <= 0, "WaveFrontSubstreams must be positive" ); … … 1883 1743 xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n"); 1884 1744 1885 #if J0149_TONE_MAPPING_SEI1886 if (m_toneMappingInfoSEIEnabled)1887 {1888 xConfirmPara( m_toneMapCodedDataBitDepth < 8 || m_toneMapCodedDataBitDepth > 14 , "SEIToneMapCodedDataBitDepth must be in rage 8 to 14");1889 xConfirmPara( m_toneMapTargetBitDepth < 1 || (m_toneMapTargetBitDepth > 16 && m_toneMapTargetBitDepth < 255) , "SEIToneMapTargetBitDepth must be in rage 1 to 16 or equal to 255");1890 xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4");1891 xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0");1892 xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100");1893 xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue");1894 xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue");1895 }1896 #endif1897 1898 1745 #if RATE_CONTROL_LAMBDA_DOMAIN 1899 1746 if ( m_RCEnableRateControl ) … … 1932 1779 } 1933 1780 #endif 1781 1934 1782 #if H_MV 1935 1783 } … … 1979 1827 printf("Input File : %s\n", m_pchInputFile ); 1980 1828 #endif 1829 1981 1830 printf("Bitstream File : %s\n", m_pchBitstreamFile ); 1831 1982 1832 #if H_MV 1983 1833 for( Int layer = 0; layer < m_numberOfLayers; layer++) … … 1988 1838 printf("Reconstruction File : %s\n", m_pchReconFile ); 1989 1839 #endif 1840 1990 1841 #if H_MV 1991 1842 xPrintParaVector( "ViewId", m_viewId ); 1992 1843 #endif 1844 1993 1845 #if H_3D 1994 1846 xPrintParaVector( "DepthFlag", m_depthFlag ); 1995 1847 #endif 1848 1996 1849 #if H_MV 1997 1850 xPrintParaVector( "QP" , m_fQP ); … … 2055 1908 printf("SQP:%d ", m_uiDeltaQpRD ); 2056 1909 printf("ASR:%d ", m_bUseASR ); 2057 #if !L0034_COMBINED_LIST_CLEANUP2058 1910 printf("LComb:%d ", m_bUseLComb ); 2059 #endif2060 1911 printf("FEN:%d ", m_bUseFastEnc ); 2061 1912 printf("ECU:%d ", m_bUseEarlyCU ); -
branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.h
r368 r438 60 60 Char* m_pchInputFile; ///< source file name 61 61 #endif 62 62 63 Char* m_pchBitstreamFile; ///< output bitstream file 64 63 65 #if H_MV 64 66 std::vector<char*> m_pchReconFileList; ///< output reconstruction file names … … 67 69 Char* m_pchReconFile; ///< output reconstruction file 68 70 #endif 71 72 69 73 // VPS specification 70 74 #if H_MV … … 79 83 std::vector<Int> m_dimensionIdLen; ///< Length of scalability dimension s 80 84 #endif 85 86 81 87 Double m_adLambdaModifier[ MAX_TLAYER ]; ///< Lambda modifier array for each temporal layer 82 88 // source specification … … 97 103 Level::Tier m_levelTier; 98 104 Level::Name m_level; 105 99 106 #if L0046_CONSTRAINT_FLAGS 100 107 Bool m_progressiveSourceFlag; … … 117 124 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 118 125 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 119 #if L0323_DPB120 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer121 #else122 126 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of reference pictures needed for decoding 123 127 #endif 124 #endif125 #if !L0034_COMBINED_LIST_CLEANUP126 128 Bool m_bUseLComb; ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421) 127 #endif128 129 Bool m_useTransformSkip; ///< flag for enabling intra transform skipping 129 130 Bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping … … 206 207 Int m_loopFilterTcOffsetDiv2; ///< tc offset for deblocking filter 207 208 Bool m_DeblockingFilterControlPresent; ///< deblocking filter control present flag in PPS 208 #if L0386_DB_METRIC209 Bool m_DeblockingFilterMetric; ///< blockiness metric in encoder210 #endif211 209 212 210 // coding tools (PCM) … … 258 256 Int m_bufferingPeriodSEIEnabled; 259 257 Int m_pictureTimingSEIEnabled; 260 #if J0149_TONE_MAPPING_SEI261 Bool m_toneMappingInfoSEIEnabled;262 Int m_toneMapId;263 Bool m_toneMapCancelFlag;264 Bool m_toneMapPersistenceFlag;265 Int m_toneMapCodedDataBitDepth;266 Int m_toneMapTargetBitDepth;267 Int m_toneMapModelId;268 Int m_toneMapMinValue;269 Int m_toneMapMaxValue;270 Int m_sigmoidMidpoint;271 Int m_sigmoidWidth;272 Int m_numPivots;273 Int m_cameraIsoSpeedIdc;274 Int m_cameraIsoSpeedValue;275 Int m_exposureCompensationValueSignFlag;276 Int m_exposureCompensationValueNumerator;277 Int m_exposureCompensationValueDenomIdc;278 Int m_refScreenLuminanceWhite;279 Int m_extendedRangeWhiteLevel;280 Int m_nominalBlackLevelLumaCodeValue;281 Int m_nominalWhiteLevelLumaCodeValue;282 Int m_extendedWhiteLevelLumaCodeValue;283 Int* m_startOfCodedInterval;284 Int* m_codedPivotValue;285 Int* m_targetPivotValue;286 #endif287 258 Int m_framePackingSEIEnabled; 288 259 Int m_framePackingSEIType; … … 294 265 Int m_gradualDecodingRefreshInfoEnabled; 295 266 Int m_decodingUnitInfoSEIEnabled; 296 #if L0208_SOP_DESCRIPTION_SEI297 Int m_SOPDescriptionSEIEnabled;298 #endif299 #if K0180_SCALABLE_NESTING_SEI300 Int m_scalableNestingSEIEnabled;301 #endif302 267 // weighted prediction 303 268 Bool m_useWeightedPred; ///< Use of weighted prediction in P slices … … 372 337 Void xPrintParameter (); ///< print configuration values 373 338 Void xPrintUsage (); ///< print usage 339 374 340 #if H_MV 375 341 template <typename T> … … 422 388 Int* m_constantPicRateIdc; ///< Indicates constant picture rate idc for various sub-layers 423 389 #endif 390 424 391 #if H_MV 425 392 Int getGOPSize() { return m_iGOPSize; } 426 393 #endif 394 427 395 public: 428 396 TAppEncCfg(); -
branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.cpp
r370 r438 111 111 } 112 112 #endif 113 113 114 #if H_MV 114 115 xSetLayerIds ( vps ); … … 135 136 m_cTEncTop.setIvPicLists ( &m_ivPicLists ); 136 137 #endif 138 137 139 m_cTEncTop.setVPS(&vps); 138 140 139 141 m_cTEncTop.setProfile(m_profile); 140 142 m_cTEncTop.setLevel(m_levelTier, m_level); 143 141 144 #if L0046_CONSTRAINT_FLAGS 142 145 m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag); … … 183 186 m_cTEncTop.setQP ( m_iQP ); 184 187 #endif 185 186 188 m_cTEncTop.setPad ( m_aiPad ); 187 189 188 190 #if H_MV 189 191 m_cTEncTop.setMaxTempLayer ( m_maxTempLayerMvc[layer] ); … … 205 207 m_cTEncTop.setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 206 208 m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 207 #if L0386_DB_METRIC208 m_cTEncTop.setDeblockingFilterMetric ( m_DeblockingFilterMetric );209 #endif210 209 211 210 //====== Motion search ======== … … 227 226 Int lowestQP; 228 227 lowestQP = - 6*(g_bitDepthY - 8); // XXX: check 229 230 228 #if H_MV 231 229 if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layer] == lowestQP) && (m_useLossless == true)) … … 245 243 m_cTEncTop.setUseHADME ( m_bUseHADME ); 246 244 m_cTEncTop.setUseLossless ( m_useLossless ); 247 #if !L0034_COMBINED_LIST_CLEANUP248 245 m_cTEncTop.setUseLComb ( m_bUseLComb ); 249 #endif250 246 #if H_MV 251 247 m_cTEncTop.setdQPs ( m_aidQP[layer] ); … … 325 321 m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 326 322 m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 327 #if J0149_TONE_MAPPING_SEI328 m_cTEncTop.setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled );329 m_cTEncTop.setTMISEIToneMapId ( m_toneMapId );330 m_cTEncTop.setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag );331 m_cTEncTop.setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag );332 m_cTEncTop.setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth );333 m_cTEncTop.setTMISEITargetBitDepth ( m_toneMapTargetBitDepth );334 m_cTEncTop.setTMISEIModelID ( m_toneMapModelId );335 m_cTEncTop.setTMISEIMinValue ( m_toneMapMinValue );336 m_cTEncTop.setTMISEIMaxValue ( m_toneMapMaxValue );337 m_cTEncTop.setTMISEISigmoidMidpoint ( m_sigmoidMidpoint );338 m_cTEncTop.setTMISEISigmoidWidth ( m_sigmoidWidth );339 m_cTEncTop.setTMISEIStartOfCodedInterva ( m_startOfCodedInterval );340 m_cTEncTop.setTMISEINumPivots ( m_numPivots );341 m_cTEncTop.setTMISEICodedPivotValue ( m_codedPivotValue );342 m_cTEncTop.setTMISEITargetPivotValue ( m_targetPivotValue );343 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc );344 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue );345 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag );346 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator );347 m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc );348 m_cTEncTop.setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite );349 m_cTEncTop.setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel );350 m_cTEncTop.setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue );351 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue );352 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue );353 #endif354 323 m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 355 324 m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 361 330 m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 362 331 m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 363 #if L0208_SOP_DESCRIPTION_SEI364 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );365 #endif366 #if K0180_SCALABLE_NESTING_SEI367 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );368 #endif369 332 m_cTEncTop.setUniformSpacingIdr ( m_iUniformSpacingIdr ); 370 333 m_cTEncTop.setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 461 424 } 462 425 #endif 463 #if H_MV 464 } 465 #endif 426 427 #if H_MV 428 } 429 #endif 430 466 431 } 467 432 … … 718 683 } 719 684 #endif 685 720 686 // ==================================================================================================================== 721 687 // Protected member functions … … 728 694 . 729 695 */ 696 730 697 #if H_MV 731 698 Void TAppEncTop::xGetBuffer( TComPicYuv*& rpcPicYuvRec, UInt layer) … … 755 722 756 723 } 724 757 725 #if H_MV 758 726 m_picYuvRec[layer]->pushBack( rpcPicYuvRec ); … … 764 732 Void TAppEncTop::xDeleteBuffer( ) 765 733 { 734 766 735 #if H_MV 767 736 for(Int layer=0; layer<m_picYuvRec.size(); layer++) … … 788 757 } 789 758 #endif 759 790 760 } 791 761 … … 817 787 { 818 788 TComPicYuv* pcPicYuvRec = *(iterPicYuvRec++); 789 819 790 #if H_MV 820 791 if (m_pchReconFileList[layerId]) … … 844 815 } 845 816 #endif 817 846 818 } 847 819 … … 860 832 case NAL_UNIT_CODED_SLICE_TRAIL_R: 861 833 case NAL_UNIT_CODED_SLICE_TRAIL_N: 862 case NAL_UNIT_CODED_SLICE_TLA _R:834 case NAL_UNIT_CODED_SLICE_TLA: 863 835 case NAL_UNIT_CODED_SLICE_TSA_N: 864 836 case NAL_UNIT_CODED_SLICE_STSA_R: 865 837 case NAL_UNIT_CODED_SLICE_STSA_N: 866 case NAL_UNIT_CODED_SLICE_BLA _W_LP:867 case NAL_UNIT_CODED_SLICE_BLA _W_RADL:838 case NAL_UNIT_CODED_SLICE_BLA: 839 case NAL_UNIT_CODED_SLICE_BLANT: 868 840 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 869 case NAL_UNIT_CODED_SLICE_IDR _W_RADL:841 case NAL_UNIT_CODED_SLICE_IDR: 870 842 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 871 843 case NAL_UNIT_CODED_SLICE_CRA: 872 844 case NAL_UNIT_CODED_SLICE_RADL_N: 873 case NAL_UNIT_CODED_SLICE_ RADL_R:845 case NAL_UNIT_CODED_SLICE_DLP: 874 846 case NAL_UNIT_CODED_SLICE_RASL_N: 875 case NAL_UNIT_CODED_SLICE_ RASL_R:847 case NAL_UNIT_CODED_SLICE_TFD: 876 848 case NAL_UNIT_VPS: 877 849 case NAL_UNIT_SPS: … … 889 861 void TAppEncTop::printRateSummary() 890 862 { 863 891 864 #if H_MV 892 865 Double time = (Double) m_frameRcvd[0] / m_iFrameRate; … … 895 868 Double time = (Double) m_iFrameRcvd / m_iFrameRate; 896 869 #endif 870 897 871 printf("Bytes written to file: %u (%.3f kbps)\n", m_totalBytes, 0.008 * m_totalBytes / time); 898 872 #if VERBOSE_RATE … … 963 937 } 964 938 #endif 939 965 940 //! \} -
branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.h
r368 r438 59 59 private: 60 60 // class interface 61 61 62 #if H_MV 62 63 std::vector<TEncTop*> m_acTEncTopList ; ///< encoder class per layer … … 99 100 100 101 // file I/O 102 101 103 #if H_MV 102 104 Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, std::list<AccessUnit>& accessUnits, UInt layerId); ///< write bitstream to file … … 104 106 Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits); ///< write bitstream to file 105 107 #endif 108 106 109 void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats); 107 110 void printRateSummary(); … … 113 116 Int xGetMax( std::vector<Int>& vec); 114 117 #endif 118 115 119 public: 116 120 TAppEncTop(); … … 118 122 119 123 Void encode (); ///< main encoding function 124 120 125 #if H_MV 121 126 TEncTop* getTEncTopLayer(UInt layer) { return m_acTEncTopList[layer]; } ///< return pointer to encoder class for specific layer … … 126 131 TEncTop& getTEncTop () { return m_cTEncTop; } ///< return encoder class pointer reference 127 132 #endif 133 128 134 };// END CLASS DEFINITION TAppEncTop 129 135 -
branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/encmain.cpp
r368 r438 62 62 fprintf( stdout, "HM software: Encoder Version [%s]", NV_VERSION ); 63 63 #endif 64 64 65 fprintf( stdout, NVM_ONOS ); 65 66 fprintf( stdout, NVM_COMPILEDBY ); -
branches/HTM-DEV-0.2-dev/source/Lib/TAppCommon/program_options_lite.h
r368 r438 46 46 #endif 47 47 #endif 48 48 49 //! \ingroup TAppCommon 49 50 //! \{ … … 282 283 } 283 284 #endif 285 284 286 /** Option class for argument handling using a user provided function */ 285 287 struct OptionFunc : public OptionBase … … 380 382 } 381 383 #endif 384 382 385 /** 383 386 * Add option described by name to the parent Options list, -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/CommonDef.h
r403 r438 57 57 58 58 #if H_MV 59 #define NV_VERSION "0. 2" ///< Current software version60 #define HM_VERSION "10. 1" ///<61 #else 62 #define NV_VERSION "10. 1" ///< Current software version59 #define NV_VERSION "0.1" ///< Current software version 60 #define HM_VERSION "10.0" ///< 61 #else 62 #define NV_VERSION "10.0" ///< Current software version 63 63 #endif 64 64 … … 115 115 #define MAX_NUM_REF_PICS 16 ///< max. number of pictures used for reference 116 116 #define MAX_NUM_REF 16 ///< max. number of entries in picture reference list 117 #if !L0034_COMBINED_LIST_CLEANUP118 117 #define MAX_NUM_REF_LC MAX_NUM_REF_PICS // TODO: remove this macro definition (leftover from combined list concept) 119 #endif120 118 121 119 #define MAX_UINT 0xFFFFFFFFU ///< max. value of unsigned 32-bit integer … … 138 136 template <typename T> inline T ClipY(T x) { return std::min<T>(T((1 << g_bitDepthY)-1), std::max<T>( T(0), x)); } 139 137 template <typename T> inline T ClipC(T x) { return std::min<T>(T((1 << g_bitDepthC)-1), std::max<T>( T(0), x)); } 138 139 template <typename T> inline T Clip(T x) { return std::min<T>(T((1 << g_bitDepthY)-1), std::max<T>( T(0), x)); } 140 140 141 141 /** clip a, such that minVal <= a <= maxVal */ … … 168 168 169 169 #endif 170 170 171 171 172 // ==================================================================================================================== … … 215 216 216 217 NAL_UNIT_CODED_SLICE_TSA_N, // 2 217 NAL_UNIT_CODED_SLICE_TLA _R, // 3218 NAL_UNIT_CODED_SLICE_TLA, // 3 // Current name in the spec: TSA_R 218 219 219 220 NAL_UNIT_CODED_SLICE_STSA_N, // 4 … … 221 222 222 223 NAL_UNIT_CODED_SLICE_RADL_N, // 6 223 NAL_UNIT_CODED_SLICE_ RADL_R, // 7224 NAL_UNIT_CODED_SLICE_DLP, // 7 // Current name in the spec: RADL_R 224 225 225 226 NAL_UNIT_CODED_SLICE_RASL_N, // 8 226 NAL_UNIT_CODED_SLICE_ RASL_R, // 9227 228 NAL_UNIT_RESERVED_ VCL_N10,229 NAL_UNIT_RESERVED_ VCL_R11,230 NAL_UNIT_RESERVED_ VCL_N12,231 NAL_UNIT_RESERVED_ VCL_R13,232 NAL_UNIT_RESERVED_ VCL_N14,233 NAL_UNIT_RESERVED_ VCL_R15,234 235 NAL_UNIT_CODED_SLICE_BLA _W_LP, // 16236 NAL_UNIT_CODED_SLICE_BLA _W_RADL, // 17227 NAL_UNIT_CODED_SLICE_TFD, // 9 // Current name in the spec: RASL_R 228 229 NAL_UNIT_RESERVED_10, 230 NAL_UNIT_RESERVED_11, 231 NAL_UNIT_RESERVED_12, 232 NAL_UNIT_RESERVED_13, 233 NAL_UNIT_RESERVED_14, 234 NAL_UNIT_RESERVED_15, 235 236 NAL_UNIT_CODED_SLICE_BLA, // 16 // Current name in the spec: BLA_W_LP 237 NAL_UNIT_CODED_SLICE_BLANT, // 17 // Current name in the spec: BLA_W_DLP 237 238 NAL_UNIT_CODED_SLICE_BLA_N_LP, // 18 238 NAL_UNIT_CODED_SLICE_IDR _W_RADL, // 19239 NAL_UNIT_CODED_SLICE_IDR, // 19 // Current name in the spec: IDR_W_DLP 239 240 NAL_UNIT_CODED_SLICE_IDR_N_LP, // 20 240 241 NAL_UNIT_CODED_SLICE_CRA, // 21 241 NAL_UNIT_RESERVED_ IRAP_VCL22,242 NAL_UNIT_RESERVED_ IRAP_VCL23,243 244 NAL_UNIT_RESERVED_ VCL24,245 NAL_UNIT_RESERVED_ VCL25,246 NAL_UNIT_RESERVED_ VCL26,247 NAL_UNIT_RESERVED_ VCL27,248 NAL_UNIT_RESERVED_ VCL28,249 NAL_UNIT_RESERVED_ VCL29,250 NAL_UNIT_RESERVED_ VCL30,251 NAL_UNIT_RESERVED_ VCL31,242 NAL_UNIT_RESERVED_22, 243 NAL_UNIT_RESERVED_23, 244 245 NAL_UNIT_RESERVED_24, 246 NAL_UNIT_RESERVED_25, 247 NAL_UNIT_RESERVED_26, 248 NAL_UNIT_RESERVED_27, 249 NAL_UNIT_RESERVED_28, 250 NAL_UNIT_RESERVED_29, 251 NAL_UNIT_RESERVED_30, 252 NAL_UNIT_RESERVED_31, 252 253 253 254 NAL_UNIT_VPS, // 32 … … 258 259 NAL_UNIT_EOB, // 37 259 260 NAL_UNIT_FILLER_DATA, // 38 260 NAL_UNIT_ PREFIX_SEI, // 39261 NAL_UNIT_S UFFIX_SEI, // 40262 NAL_UNIT_RESERVED_ NVCL41,263 NAL_UNIT_RESERVED_ NVCL42,264 NAL_UNIT_RESERVED_ NVCL43,265 NAL_UNIT_RESERVED_ NVCL44,266 NAL_UNIT_RESERVED_ NVCL45,267 NAL_UNIT_RESERVED_ NVCL46,268 NAL_UNIT_RESERVED_ NVCL47,261 NAL_UNIT_SEI, // 39 Prefix SEI 262 NAL_UNIT_SEI_SUFFIX, // 40 Suffix SEI 263 NAL_UNIT_RESERVED_41, 264 NAL_UNIT_RESERVED_42, 265 NAL_UNIT_RESERVED_43, 266 NAL_UNIT_RESERVED_44, 267 NAL_UNIT_RESERVED_45, 268 NAL_UNIT_RESERVED_46, 269 NAL_UNIT_RESERVED_47, 269 270 NAL_UNIT_UNSPECIFIED_48, 270 271 NAL_UNIT_UNSPECIFIED_49, -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/NAL.h
r368 r438 47 47 NalUnitType m_nalUnitType; ///< nal_unit_type 48 48 UInt m_temporalId; ///< temporal_id 49 49 50 #if H_MV 50 51 Int m_layerId; ///< layer id … … 79 80 return m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_R 80 81 || m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N 81 || m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA _R82 || m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA 82 83 || m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_N 83 84 || m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_R 84 85 || m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_N 85 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA _W_LP86 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA _W_RADL86 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA 87 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLANT 87 88 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP 88 || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR _W_RADL89 || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR 89 90 || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP 90 91 || m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA 91 92 || m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N 92 || m_nalUnitType == NAL_UNIT_CODED_SLICE_ RADL_R93 || m_nalUnitType == NAL_UNIT_CODED_SLICE_DLP 93 94 || m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N 94 || m_nalUnitType == NAL_UNIT_CODED_SLICE_ RASL_R;95 || m_nalUnitType == NAL_UNIT_CODED_SLICE_TFD; 95 96 } 96 97 #if L0045_NON_NESTED_SEI_RESTRICTIONS 97 98 Bool isSei() 98 99 { 99 return m_nalUnitType == NAL_UNIT_ PREFIX_SEI100 || m_nalUnitType == NAL_UNIT_S UFFIX_SEI;100 return m_nalUnitType == NAL_UNIT_SEI 101 || m_nalUnitType == NAL_UNIT_SEI_SUFFIX; 101 102 } 102 103 -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/SEI.cpp
r362 r438 38 38 #include "CommonDef.h" 39 39 #include "SEI.h" 40 41 #if J0149_TONE_MAPPING_SEI42 //Table D-7 Meaning of camera iso sensitivity indicator and exposure index rating indicator43 Int Table_exp_indicator[32] = {0, 10, 12, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, -1};44 #endif45 40 46 41 SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType) -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/SEI.h
r362 r438 355 355 }; 356 356 357 #if L0208_SOP_DESCRIPTION_SEI358 class SEISOPDescription : public SEI359 {360 public:361 PayloadType payloadType() const { return SOP_DESCRIPTION; }362 363 SEISOPDescription() {}364 virtual ~SEISOPDescription() {}365 366 UInt m_sopSeqParameterSetId;367 UInt m_numPicsInSopMinus1;368 369 UInt m_sopDescVclNaluType[MAX_NUM_PICS_IN_SOP];370 UInt m_sopDescTemporalId[MAX_NUM_PICS_IN_SOP];371 UInt m_sopDescStRpsIdx[MAX_NUM_PICS_IN_SOP];372 Int m_sopDescPocDelta[MAX_NUM_PICS_IN_SOP];373 };374 #endif375 376 #if J0149_TONE_MAPPING_SEI377 class SEIToneMappingInfo : public SEI378 {379 public:380 PayloadType payloadType() const { return TONE_MAPPING_INFO; }381 SEIToneMappingInfo() {}382 virtual ~SEIToneMappingInfo() {}383 384 Int m_toneMapId;385 Bool m_toneMapCancelFlag;386 Bool m_toneMapPersistenceFlag;387 Int m_codedDataBitDepth;388 Int m_targetBitDepth;389 Int m_modelId;390 Int m_minValue;391 Int m_maxValue;392 Int m_sigmoidMidpoint;393 Int m_sigmoidWidth;394 std::vector<Int> m_startOfCodedInterval;395 Int m_numPivots;396 std::vector<Int> m_codedPivotValue;397 std::vector<Int> m_targetPivotValue;398 Int m_cameraIsoSpeedIdc;399 Int m_cameraIsoSpeedValue;400 Int m_exposureCompensationValueSignFlag;401 Int m_exposureCompensationValueNumerator;402 Int m_exposureCompensationValueDenomIdc;403 Int m_refScreenLuminanceWhite;404 Int m_extendedRangeWhiteLevel;405 Int m_nominalBlackLevelLumaCodeValue;406 Int m_nominalWhiteLevelLumaCodeValue;407 Int m_extendedWhiteLevelLumaCodeValue;408 };409 #endif410 411 357 typedef std::list<SEI*> SEIMessages; 412 358 … … 420 366 Void deleteSEIs (SEIMessages &seiList); 421 367 422 #if K0180_SCALABLE_NESTING_SEI423 class SEIScalableNesting : public SEI424 {425 public:426 PayloadType payloadType() const { return SCALABLE_NESTING; }427 428 SEIScalableNesting() {}429 virtual ~SEIScalableNesting()430 {431 if (!m_callerOwnsSEIs)432 {433 deleteSEIs(m_nestedSEIs);434 }435 }436 437 Bool m_bitStreamSubsetFlag;438 Bool m_nestingOpFlag;439 Bool m_defaultOpFlag; //value valid if m_nestingOpFlag != 0440 UInt m_nestingNumOpsMinus1; // -"-441 UInt m_nestingMaxTemporalIdPlus1[MAX_TLAYER]; // -"-442 UInt m_nestingOpIdx[MAX_NESTING_NUM_OPS]; // -"-443 444 Bool m_allLayersFlag; //value valid if m_nestingOpFlag == 0445 UInt m_nestingNoOpMaxTemporalIdPlus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0446 UInt m_nestingNumLayersMinus1; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0447 UChar m_nestingLayerId[MAX_NESTING_NUM_LAYER]; //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0. This can e.g. be a static array of 64 unsigned char values448 449 Bool m_callerOwnsSEIs;450 SEIMessages m_nestedSEIs;451 };452 #endif453 454 368 //! \} -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComBitStream.cpp
r362 r438 177 177 } 178 178 } 179 180 179 Void TComOutputBitstream::writeByteAlignment() 181 180 { … … 183 182 writeAlignZero(); 184 183 } 185 186 Int TComOutputBitstream::countStartCodeEmulations()187 {188 UInt cnt = 0;189 vector<uint8_t>& rbsp = getFIFO();190 for (vector<uint8_t>::iterator it = rbsp.begin(); it != rbsp.end();)191 {192 vector<uint8_t>::iterator found = it;193 do194 {195 // find the next emulated 00 00 {00,01,02,03}196 // NB, end()-1, prevents finding a trailing two byte sequence197 found = search_n(found, rbsp.end()-1, 2, 0);198 found++;199 // if not found, found == end, otherwise found = second zero byte200 if (found == rbsp.end())201 {202 break;203 }204 if (*(++found) <= 3)205 {206 break;207 }208 } while (true);209 it = found;210 if (found != rbsp.end())211 {212 cnt++;213 }214 }215 return cnt;216 }217 218 184 /** 219 185 * read #uiNumberOfBits# from bitstream without updating the bitstream -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComBitStream.h
r362 r438 154 154 Void addSubstream ( TComOutputBitstream* pcSubstream ); 155 155 Void writeByteAlignment(); 156 157 //! returns the number of start code emulations contained in the current buffer158 Int countStartCodeEmulations();159 156 }; 160 157 … … 166 163 { 167 164 std::vector<uint8_t> *m_fifo; /// FIFO for storage of complete bytes 168 std::vector<UInt> m_emulationPreventionByteLocation;169 165 170 166 protected: … … 210 206 UInt getNumBitsRead() { return m_numBitsRead; } 211 207 Void readByteAlignment(); 212 213 Void pushEmulationPreventionByteLocation ( UInt pos ) { m_emulationPreventionByteLocation.push_back( pos ); }214 UInt numEmulationPreventionBytesRead () { return (UInt) m_emulationPreventionByteLocation.size(); }215 std::vector<UInt> getEmulationPreventionByteLocation () { return m_emulationPreventionByteLocation; }216 UInt getEmulationPreventionByteLocation ( UInt idx ) { return m_emulationPreventionByteLocation[ idx ]; }217 Void clearEmulationPreventionByteLocation() { m_emulationPreventionByteLocation.clear(); }218 Void setEmulationPreventionByteLocation ( std::vector<UInt> vec ) { m_emulationPreventionByteLocation = vec; }219 208 }; 220 209 -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComDataCU.cpp
r364 r438 3200 3200 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm(); 3201 3201 Bool bIsNeibRefLongTerm = false; 3202 3202 3203 //--------------- V1 (END) ------------------// 3203 3204 if( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0) -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComLoopFilter.cpp
r362 r438 57 57 // ==================================================================================================================== 58 58 59 const UChar TComLoopFilter::sm_tcTable[54] =59 const UChar tctable_8x8[54] = 60 60 { 61 61 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,8,9,10,11,13,14,16,18,20,22,24 62 62 }; 63 63 64 const UChar TComLoopFilter::sm_betaTable[52] =64 const UChar betatable_8x8[52] = 65 65 { 66 66 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64 … … 585 585 Int iIndexB = Clip3(0, MAX_QP, iQP + (betaOffsetDiv2 << 1)); 586 586 587 Int iTc = sm_tcTable[iIndexTC]*iBitdepthScale;588 Int iBeta = sm_betaTable[iIndexB]*iBitdepthScale;587 Int iTc = tctable_8x8[iIndexTC]*iBitdepthScale; 588 Int iBeta = betatable_8x8[iIndexB]*iBitdepthScale; 589 589 Int iSideThreshold = (iBeta+(iBeta>>1))>>3; 590 590 Int iThrCut = iTc*10; … … 735 735 736 736 Int iIndexTC = Clip3(0, MAX_QP+DEFAULT_INTRA_TC_OFFSET, iQP + DEFAULT_INTRA_TC_OFFSET*(ucBs - 1) + (tcOffsetDiv2 << 1)); 737 Int iTc = sm_tcTable[iIndexTC]*iBitdepthScale;737 Int iTc = tctable_8x8[iIndexTC]*iBitdepthScale; 738 738 739 739 for ( UInt uiStep = 0; uiStep < uiPelsInPartChroma; uiStep++ ) -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComLoopFilter.h
r362 r438 99 99 __inline Int xCalcDQ( Pel* piSrc, Int iOffset); 100 100 101 static const UChar sm_tcTable[54];102 static const UChar sm_betaTable[52];103 104 101 public: 105 102 TComLoopFilter(); … … 114 111 /// picture-level deblocking filter 115 112 Void loopFilterPic( TComPic* pcPic ); 116 117 static Int getBeta( Int qp )118 {119 Int indexB = Clip3( 0, MAX_QP, qp );120 return sm_betaTable[ indexB ];121 }122 113 }; 123 114 -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComPic.cpp
r368 r438 481 481 #endif 482 482 483 484 483 //! \} -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComPic.h
r368 r438 93 93 #endif 94 94 #endif 95 95 96 public: 96 97 TComPic(); … … 115 116 #endif 116 117 #endif 118 117 119 Bool getUsedByCurr() { return m_bUsedByCurr; } 118 120 Void setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; } … … 184 186 Void print( Bool legend ); 185 187 #endif 188 189 190 186 191 /** transfer ownership of seis to this picture */ 187 192 void setSEIs(SEIMessages& seis) { m_SEIs = seis; } -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComPrediction.cpp
r362 r438 83 83 if( m_piYuvExt == NULL ) 84 84 { 85 Int extWidth = MAX_CU_SIZE+ 16;86 Int extHeight = MAX_CU_SIZE+ 1;85 Int extWidth = g_uiMaxCUWidth + 16; 86 Int extHeight = g_uiMaxCUHeight + 1; 87 87 Int i, j; 88 88 for (i = 0; i < 4; i++) … … 94 94 } 95 95 } 96 m_iYuvExtHeight = (( MAX_CU_SIZE+ 2) << 4);97 m_iYuvExtStride = (( MAX_CU_SIZE+ 8) << 4);96 m_iYuvExtHeight = ((g_uiMaxCUHeight + 2) << 4); 97 m_iYuvExtStride = ((g_uiMaxCUWidth + 8) << 4); 98 98 m_piYuvExt = new Int[ m_iYuvExtStride * m_iYuvExtHeight ]; 99 99 100 100 // new structure 101 m_acYuvPred[0] .create( MAX_CU_SIZE, MAX_CU_SIZE);102 m_acYuvPred[1] .create( MAX_CU_SIZE, MAX_CU_SIZE);103 104 m_cYuvPredTemp.create( MAX_CU_SIZE, MAX_CU_SIZE);105 } 106 107 if (m_iLumaRecStride != ( MAX_CU_SIZE>>1) + 1)108 { 109 m_iLumaRecStride = ( MAX_CU_SIZE>>1) + 1;101 m_acYuvPred[0] .create( g_uiMaxCUWidth, g_uiMaxCUHeight ); 102 m_acYuvPred[1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight ); 103 104 m_cYuvPredTemp.create( g_uiMaxCUWidth, g_uiMaxCUHeight ); 105 } 106 107 if (m_iLumaRecStride != (g_uiMaxCUWidth>>1) + 1) 108 { 109 m_iLumaRecStride = (g_uiMaxCUWidth>>1) + 1; 110 110 if (!m_pLumaRecBuffer) 111 111 { -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComRom.cpp
r362 r438 62 62 g_aucConvertToBit[ i ] = c; 63 63 64 // g_auiFrameScanXY[ g_aucConvertToBit[ transformSize ] ]: zigzag scan array for transformSize 64 65 c=2; 65 66 for ( i=0; i<MAX_CU_DEPTH; i++ ) … … 76 77 Void destroyROM() 77 78 { 78 for (Int i=0; i<MAX_CU_DEPTH; i++ ) 79 Int i; 80 81 for ( i=0; i<MAX_CU_DEPTH; i++ ) 79 82 { 80 83 delete[] g_auiSigLastScan[0][i]; -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComSlice.cpp
r396 r438 49 49 , m_iPOC ( 0 ) 50 50 , m_iLastIDR ( 0 ) 51 , m_eNalUnitType ( NAL_UNIT_CODED_SLICE_IDR _W_RADL)51 , m_eNalUnitType ( NAL_UNIT_CODED_SLICE_IDR ) 52 52 , m_eSliceType ( I_SLICE ) 53 53 , m_iSliceQp ( 0 ) … … 60 60 , m_deblockingFilterBetaOffsetDiv2 ( 0 ) 61 61 , m_deblockingFilterTcOffsetDiv2 ( 0 ) 62 #if !L0034_COMBINED_LIST_CLEANUP63 62 , m_bRefPicListModificationFlagLC ( false ) 64 63 , m_bRefPicListCombinationFlag ( false ) 65 #endif66 64 , m_bCheckLDC ( false ) 67 65 , m_iSliceQpDelta ( 0 ) … … 81 79 , m_dLambda ( 0.0 ) 82 80 #endif 83 #if !L0034_COMBINED_LIST_CLEANUP84 81 , m_bNoBackPredFlag ( false ) 85 #endif86 82 , m_uiTLayer ( 0 ) 87 83 , m_bTLayerSwitchingFlag ( false ) … … 115 111 #endif 116 112 { 117 #if L0034_COMBINED_LIST_CLEANUP118 m_aiNumRefIdx[0] = m_aiNumRefIdx[1] = 0;119 #else120 113 m_aiNumRefIdx[0] = m_aiNumRefIdx[1] = m_aiNumRefIdx[2] = 0; 121 #endif122 114 123 115 initEqualRef(); 124 116 125 #if L0034_COMBINED_LIST_CLEANUP126 for ( Int idx = 0; idx < MAX_NUM_REF; idx++ )127 {128 m_list1IdxToList0Idx[idx] = -1;129 }130 #else131 117 for(Int iNumCount = 0; iNumCount < MAX_NUM_REF_LC; iNumCount++) 132 118 { … … 138 124 m_iRefIdxOfL1FromRefIdxOfL0[iNumCount] = -1; 139 125 } 140 #endif141 126 for(Int iNumCount = 0; iNumCount < MAX_NUM_REF; iNumCount++) 142 127 { … … 150 135 #endif 151 136 } 152 resetWpScaling( );137 resetWpScaling(m_weightPredTable); 153 138 initWpAcDcParam(); 154 139 m_saoEnabledFlag = false; … … 171 156 m_colRefIdx = 0; 172 157 initEqualRef(); 173 #if !L0034_COMBINED_LIST_CLEANUP174 158 m_bNoBackPredFlag = false; 175 159 m_bRefPicListCombinationFlag = false; 176 160 m_bRefPicListModificationFlagLC = false; 177 #endif178 161 m_bCheckLDC = false; 179 162 m_iSliceQpDeltaCb = 0; 180 163 m_iSliceQpDeltaCr = 0; 181 164 182 #if !L0034_COMBINED_LIST_CLEANUP183 165 m_aiNumRefIdx[REF_PIC_LIST_C] = 0; 184 #endif185 166 186 167 m_maxNumMergeCand = MRG_MAX_NUM_CANDS; … … 196 177 Bool TComSlice::getRapPicFlag() 197 178 { 198 return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR _W_RADL179 return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR 199 180 || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP 200 181 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 201 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_RADL202 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_LP182 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT 183 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 203 184 || getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA; 204 185 } … … 270 251 271 252 272 TComPic* TComSlice::xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb) 253 TComPic* TComSlice::xGetLongTermRefPic (TComList<TComPic*>& rcListPic, 254 Int poc) 273 255 { 274 256 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 275 257 TComPic* pcPic = *(iterPic); 276 258 TComPic* pcStPic = pcPic; 277 278 Int pocCycle = 1 << getSPS()->getBitsForPOC();279 if (!pocHasMsb)280 {281 poc = poc % pocCycle;282 }283 284 259 while ( iterPic != rcListPic.end() ) 285 260 { 286 261 pcPic = *(iterPic); 287 if (pcPic && pcPic->getPOC()!=this->getPOC() && pcPic->getSlice( 0 )->isReferenced()) 288 { 289 Int picPoc = pcPic->getPOC(); 290 if (!pocHasMsb) 291 { 292 picPoc = picPoc % pocCycle; 293 } 294 295 if (poc == picPoc) 262 if(pcPic && (pcPic->getPOC()%(1<<getSPS()->getBitsForPOC())) == (poc%(1<<getSPS()->getBitsForPOC()))) 296 263 { 297 264 if(pcPic->getIsLongTerm()) … … 305 272 break; 306 273 } 307 }308 274 309 275 iterPic++; 310 276 } 311 312 277 return pcStPic; 313 278 } … … 328 293 } 329 294 330 #if L0034_COMBINED_LIST_CLEANUP331 Void TComSlice::setList1IdxToList0Idx()332 {333 Int idxL0, idxL1;334 for ( idxL1 = 0; idxL1 < getNumRefIdx( REF_PIC_LIST_1 ); idxL1++ )335 {336 m_list1IdxToList0Idx[idxL1] = -1;337 for ( idxL0 = 0; idxL0 < getNumRefIdx( REF_PIC_LIST_0 ); idxL0++ )338 {339 if ( m_apcRefPicList[REF_PIC_LIST_0][idxL0]->getPOC() == m_apcRefPicList[REF_PIC_LIST_1][idxL1]->getPOC() )340 {341 m_list1IdxToList0Idx[idxL1] = idxL0;342 break;343 }344 }345 }346 }347 #else348 295 Void TComSlice::generateCombinedList() 349 296 { … … 418 365 } 419 366 } 420 #endif421 367 422 368 #if H_MV 423 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer , Bool checkNumPocTotalCurr) 424 #else 425 #if FIX1071 426 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr ) 369 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer ) 427 370 #else 428 371 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic ) 429 372 #endif 430 #endif 431 { 432 #if FIX1071 433 if (!checkNumPocTotalCurr) 434 #endif 435 { 436 if (m_eSliceType == I_SLICE) 437 { 438 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 439 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 440 441 return; 442 } 373 { 374 if (m_eSliceType == I_SLICE) 375 { 376 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 377 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 443 378 379 return; 380 } 381 444 382 #if !H_MV 445 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 446 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 447 #endif 448 } 383 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 384 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 385 #endif 449 386 450 387 TComPic* pcRefPic= NULL; … … 473 410 } 474 411 } 475 476 412 for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++) 477 413 { … … 486 422 } 487 423 } 488 489 424 for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--) 490 425 { 491 426 if(m_pcRPS->getUsed(i)) 492 427 { 493 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i) , m_pcRPS->getCheckLTMSBPresent(i));428 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i)); 494 429 pcRefPic->setIsLongTerm(1); 495 430 pcRefPic->getPicYuvRec()->extendPicBorder(); … … 499 434 if(pcRefPic==NULL) 500 435 { 501 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i) , m_pcRPS->getCheckLTMSBPresent(i));436 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i)); 502 437 } 503 438 pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i)); … … 513 448 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 514 449 #endif 515 #if FIX1071 516 if (checkNumPocTotalCurr) 517 { 518 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr: 450 451 { 452 Int cIdx = 0; 453 for ( i=0; i<NumPocStCurr0; i++, cIdx++) 454 { 455 rpsCurrList0[cIdx] = RefPicSetStCurr0[i]; 456 } 457 for ( i=0; i<NumPocStCurr1; i++, cIdx++) 458 { 459 rpsCurrList0[cIdx] = RefPicSetStCurr1[i]; 460 } 461 for ( i=0; i<NumPocLtCurr; i++, cIdx++) 462 { 463 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 464 } 519 465 #if H_MV 520 // – If nuh_layer_id is equal to 0 and the current picture is a BLA picture or a CRA picture, the value of NumPocTotalCurr shall be equal to 0. 521 // – Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. 522 if ( getRapPicFlag() && m_layerId == 0 ) 523 #else 524 // – If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0. 525 // – Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. 526 if (getRapPicFlag()) 527 #endif 528 { 529 assert(numPocTotalCurr == 0); 530 } 531 532 if (m_eSliceType == I_SLICE) 533 { 534 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 535 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 536 537 return; 538 } 539 540 assert(numPocTotalCurr != 0); 541 542 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 543 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 544 } 545 #endif 546 547 Int cIdx = 0; 548 for ( i=0; i<NumPocStCurr0; i++, cIdx++) 549 { 550 rpsCurrList0[cIdx] = RefPicSetStCurr0[i]; 551 } 552 for ( i=0; i<NumPocStCurr1; i++, cIdx++) 553 { 554 rpsCurrList0[cIdx] = RefPicSetStCurr1[i]; 555 } 556 for ( i=0; i<NumPocLtCurr; i++, cIdx++) 557 { 558 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 559 } 560 #if H_MV 561 for ( i=0; i<numDirectRefLayers; i++, cIdx++) 562 { 563 if( cIdx <= MAX_NUM_REF ) 564 { 565 rpsCurrList0[cIdx] = refPicSetInterLayer[i]; 566 } 567 } 568 #endif 466 for ( i=0; i<numDirectRefLayers; i++, cIdx++) 467 { 468 if( cIdx <= MAX_NUM_REF ) 469 { 470 rpsCurrList0[cIdx] = refPicSetInterLayer[i]; 471 } 472 } 473 #endif 474 } 569 475 570 476 if (m_eSliceType==B_SLICE) 571 477 { 572 cIdx = 0;478 Int cIdx = 0; 573 479 for ( i=0; i<NumPocStCurr1; i++, cIdx++) 574 480 { … … 679 585 } 680 586 681 Void TComSlice::checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA , TComList<TComPic *>& rcListPic)587 Void TComSlice::checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA) 682 588 { 683 589 for(Int i = 0; i < pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures(); i++) … … 692 598 if(pocCRA < MAX_UINT && getPOC() > pocCRA) 693 599 { 694 if (!pReferencePictureSet->getCheckLTMSBPresent(i))695 {696 assert(xGetLongTermRefPic(rcListPic, pReferencePictureSet->getPOC(i), false)->getPOC() >= pocCRA);697 }698 else699 {700 600 assert(pReferencePictureSet->getPOC(i) >= pocCRA); 701 601 } 702 602 } 703 } 704 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) // IDR picture found 603 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) // IDR picture found 705 604 { 706 605 pocCRA = getPOC(); … … 712 611 prevRAPisBLA = false; 713 612 } 714 else if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_LP715 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_RADL613 else if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 614 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT 716 615 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) // BLA picture found 717 616 { … … 744 643 Int pocCurr = getPOC(); 745 644 746 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_LP747 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_RADL645 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 646 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT 748 647 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 749 || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR _W_RADL648 || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR 750 649 || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) // IDR or BLA picture 751 650 { … … 759 658 iterPic++; 760 659 } 761 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_LP762 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_RADL660 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 661 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT 763 662 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) 764 663 { … … 774 673 { 775 674 rpcPic = *(iterPic); 776 if (rpcPic->getPOC() != pocCurr && rpcPic->getPOC() != pocCRA) 777 { 778 rpcPic->getSlice(0)->setReferenced(false); 779 } 675 if (rpcPic->getPOC() != pocCurr && rpcPic->getPOC() != pocCRA) rpcPic->getSlice(0)->setReferenced(false); 780 676 iterPic++; 781 677 } … … 811 707 m_deblockingFilterTcOffsetDiv2 = pSrc->m_deblockingFilterTcOffsetDiv2; 812 708 813 #if L0034_COMBINED_LIST_CLEANUP814 for (i = 0; i < 2; i++)815 #else816 709 for (i = 0; i < 3; i++) 817 #endif818 710 { 819 711 m_aiNumRefIdx[i] = pSrc->m_aiNumRefIdx[i]; 820 712 } 821 713 822 #if L0034_COMBINED_LIST_CLEANUP823 for (i = 0; i < MAX_NUM_REF; i++)824 {825 m_list1IdxToList0Idx[i] = pSrc->m_list1IdxToList0Idx[i];826 }827 #else828 714 for (i = 0; i < 2; i++) 829 715 { … … 842 728 m_bRefPicListModificationFlagLC = pSrc->m_bRefPicListModificationFlagLC; 843 729 m_bRefPicListCombinationFlag = pSrc->m_bRefPicListCombinationFlag; 844 #endif845 730 m_bCheckLDC = pSrc->m_bCheckLDC; 846 731 m_iSliceQpDelta = pSrc->m_iSliceQpDelta; … … 900 785 } 901 786 902 #if !L0034_COMBINED_LIST_CLEANUP903 787 m_bNoBackPredFlag = pSrc->m_bNoBackPredFlag; 904 #endif905 788 m_uiTLayer = pSrc->m_uiTLayer; 906 789 m_bTLayerSwitchingFlag = pSrc->m_bTLayerSwitchingFlag; … … 936 819 937 820 Int TComSlice::m_prevPOC = 0; 938 939 821 /** Function for setting the slice's temporal layer ID and corresponding temporal_layer_switching_point_flag. 940 822 * \param uiTLayer Temporal layer ID of the current slice … … 997 879 Int i, isReference; 998 880 881 Int j = 0; 999 882 // loop through all pictures in the reference picture buffer 1000 883 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 1001 884 while ( iterPic != rcListPic.end()) 1002 885 { 886 j++; 1003 887 rpcPic = *(iterPic++); 1004 1005 if(!rpcPic->getSlice( 0 )->isReferenced())1006 {1007 continue;1008 }1009 888 1010 889 isReference = 0; … … 1045 924 { 1046 925 rpcPic->getSlice( 0 )->setReferenced( false ); 1047 rpcPic->setUsedByCurr(0);1048 926 rpcPic->setIsLongTerm(0); 1049 927 } … … 1051 929 assert(rpcPic->getSlice( 0 )->isReferenced()==0||rpcPic->getUsedByCurr()==0||rpcPic->getTLayer()<=this->getTLayer()); 1052 930 //check that pictures of higher or equal temporal layer are not in the RPS if the current picture is a TSA picture 1053 if(this->getNalUnitType() == NAL_UNIT_CODED_SLICE_TLA _R|| this->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N)931 if(this->getNalUnitType() == NAL_UNIT_CODED_SLICE_TLA || this->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N) 1054 932 { 1055 933 assert(rpcPic->getSlice( 0 )->isReferenced()==0||rpcPic->getTLayer()<this->getTLayer()); 1056 934 } 935 1057 936 //check that pictures marked as temporal layer non-reference pictures are not used for reference 1058 937 if(rpcPic->getPicSym()->getSlice(0)->getPOC() != this->getPOC() && rpcPic->getTLayer()==this->getTLayer()) … … 1068 947 { 1069 948 TComPic* rpcPic; 1070 Int i, isAvailable ;949 Int i, isAvailable, j; 1071 950 Int atLeastOneLost = 0; 1072 951 Int atLeastOneRemoved = 0; … … 1077 956 for(i=pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures();i<pReferencePictureSet->getNumberOfPictures();i++) 1078 957 { 958 j = 0; 1079 959 isAvailable = 0; 1080 960 // loop through all pictures in the reference picture buffer … … 1082 962 while ( iterPic != rcListPic.end()) 1083 963 { 964 j++; 1084 965 rpcPic = *(iterPic++); 1085 966 if(pReferencePictureSet->getCheckLTMSBPresent(i)==true) … … 1104 985 while ( iterPic != rcListPic.end()) 1105 986 { 987 j++; 1106 988 rpcPic = *(iterPic++); 1107 989 1108 Int pocCycle = 1 << rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC(); 1109 Int curPoc = rpcPic->getPicSym()->getSlice(0)->getPOC(); 1110 Int refPoc = pReferencePictureSet->getPOC(i); 1111 if (!pReferencePictureSet->getCheckLTMSBPresent(i)) 1112 { 1113 curPoc = curPoc % pocCycle; 1114 refPoc = refPoc % pocCycle; 1115 } 1116 1117 if (rpcPic->getSlice(0)->isReferenced() && curPoc == refPoc) 990 if((rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == (this->getPOC() + pReferencePictureSet->getDeltaPOC(i))%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC()) && rpcPic->getSlice(0)->isReferenced()) 1118 991 { 1119 992 isAvailable = 1; … … 1153 1026 for(i=0;i<pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures();i++) 1154 1027 { 1028 j = 0; 1155 1029 isAvailable = 0; 1156 1030 // loop through all pictures in the reference picture buffer … … 1158 1032 while ( iterPic != rcListPic.end()) 1159 1033 { 1034 j++; 1160 1035 rpcPic = *(iterPic++); 1161 1036 … … 1174 1049 { 1175 1050 if(printErrors) 1176 {1177 1051 printf("\nShort-term reference picture with POC = %3d seems to have been removed or not correctly decoded.", this->getPOC() + pReferencePictureSet->getDeltaPOC(i)); 1178 }1179 1052 atLeastOneRemoved = 1; 1180 1053 } … … 1182 1055 { 1183 1056 if(printErrors) 1184 {1185 1057 printf("\nShort-term reference picture with POC = %3d is lost or not correctly decoded!", this->getPOC() + pReferencePictureSet->getDeltaPOC(i)); 1186 }1187 1058 atLeastOneLost = 1; 1188 1059 iPocLost=this->getPOC() + pReferencePictureSet->getDeltaPOC(i); … … 1330 1201 * \returns Void 1331 1202 */ 1332 Void TComSlice::resetWpScaling( )1203 Void TComSlice::resetWpScaling(wpScalingParam wp[2][MAX_NUM_REF][3]) 1333 1204 { 1334 1205 for ( Int e=0 ; e<2 ; e++ ) … … 1338 1209 for ( Int yuv=0 ; yuv<3 ; yuv++ ) 1339 1210 { 1340 wpScalingParam *pwp = &( m_weightPredTable[e][i][yuv]);1211 wpScalingParam *pwp = &(wp[e][i][yuv]); 1341 1212 pwp->bPresentFlag = false; 1342 1213 pwp->uiLog2WeightDenom = 0; … … 1354 1225 Void TComSlice::initWpScaling() 1355 1226 { 1227 initWpScaling(m_weightPredTable); 1228 } 1229 1230 /** set WP tables 1231 * \param wpScalingParam 1232 * \returns Void 1233 */ 1234 Void TComSlice::initWpScaling(wpScalingParam wp[2][MAX_NUM_REF][3]) 1235 { 1356 1236 for ( Int e=0 ; e<2 ; e++ ) 1357 1237 { … … 1360 1240 for ( Int yuv=0 ; yuv<3 ; yuv++ ) 1361 1241 { 1362 wpScalingParam *pwp = &(m_weightPredTable[e][i][yuv]); 1363 if ( !pwp->bPresentFlag ) 1364 { 1242 wpScalingParam *pwp = &(wp[e][i][yuv]); 1243 if ( !pwp->bPresentFlag ) { 1365 1244 // Inferring values not present : 1366 1245 pwp->iWeight = (1 << pwp->uiLog2WeightDenom); … … 1396 1275 , m_cprmsPresentFlag (NULL) 1397 1276 { 1277 1398 1278 for( Int i = 0; i < MAX_TLAYER; i++) 1399 1279 { 1400 1280 m_numReorderPics[i] = 0; 1401 #if L0323_DPB1402 m_uiMaxDecPicBuffering[i] = 1;1403 #else1404 1281 m_uiMaxDecPicBuffering[i] = 0; 1405 #endif1406 1282 m_uiMaxLatencyIncrease[i] = 0; 1407 1283 } … … 1457 1333 TComVPS::~TComVPS() 1458 1334 { 1459 if( m_hrdParameters != NULL ) delete[]m_hrdParameters;1460 if( m_hrdOpSetIdx != NULL ) delete []m_hrdOpSetIdx;1461 if( m_cprmsPresentFlag != NULL ) delete []m_cprmsPresentFlag;1335 if( m_hrdParameters != NULL ) delete m_hrdParameters; 1336 if( m_hrdOpSetIdx != NULL ) delete m_hrdOpSetIdx; 1337 if( m_cprmsPresentFlag != NULL ) delete m_cprmsPresentFlag; 1462 1338 } 1463 1339 … … 1549 1425 } 1550 1426 #endif 1427 1551 1428 // ------------------------------------------------------------------------------------------------ 1552 1429 // Sequence parameter set (SPS) … … 1561 1438 , m_picWidthInLumaSamples (352) 1562 1439 , m_picHeightInLumaSamples (288) 1563 , m_log2MinCodingBlockSize ( 0)1564 , m_log2DiffMaxMinCodingBlockSize (0)1565 1440 , m_uiMaxCUWidth ( 32) 1566 1441 , m_uiMaxCUHeight ( 32) 1567 1442 , m_uiMaxCUDepth ( 3) 1443 , m_uiMinTrDepth ( 0) 1444 , m_uiMaxTrDepth ( 1) 1568 1445 , m_bLongTermRefsPresent (false) 1569 1446 , m_uiQuadtreeTULog2MaxSize ( 0) … … 1575 1452 , m_pcmLog2MaxSize ( 5) 1576 1453 , m_uiPCMLog2MinSize ( 7) 1577 #if !L0034_COMBINED_LIST_CLEANUP1578 1454 , m_bUseLComb (false) 1579 #endif1580 1455 , m_bitDepthY ( 8) 1581 1456 , m_bitDepthC ( 8) … … 1595 1470 , m_vuiParametersPresentFlag (false) 1596 1471 , m_vuiParameters () 1597 #if H_MV1598 , m_interViewMvVertConstraintFlag (false)1599 #endif1600 1472 { 1601 1473 for ( Int i = 0; i < MAX_TLAYER; i++ ) 1602 1474 { 1603 1475 m_uiMaxLatencyIncrease[i] = 0; 1604 #if L0323_DPB1605 m_uiMaxDecPicBuffering[i] = 1;1606 #else1607 1476 m_uiMaxDecPicBuffering[i] = 0; 1608 #endif1609 1477 m_numReorderPics[i] = 0; 1610 1478 } … … 1625 1493 m_RPSList.create(numRPS); 1626 1494 } 1627 1628 1495 Void TComSPS::setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ) 1629 1496 { … … 1870 1737 return m_POC[bufferNum]; 1871 1738 } 1872 1873 1739 Void TComReferencePictureSet::setPOC(Int bufferNum, Int POC) 1874 1740 { 1875 1741 m_POC[bufferNum] = POC; 1876 1742 } 1877 1878 1743 Bool TComReferencePictureSet::getCheckLTMSBPresent(Int bufferNum) 1879 1744 { 1880 1745 return m_bCheckLTMSB[bufferNum]; 1881 1746 } 1882 1883 1747 Void TComReferencePictureSet::setCheckLTMSBPresent(Int bufferNum, Bool b) 1884 1748 { … … 2148 2012 } 2149 2013 #endif 2014 2150 2015 /** get scaling matrix from RefMatrixID 2151 2016 * \param sizeId size index … … 2157 2022 ::memcpy(getScalingListAddress(sizeId, listId),((listId == refListId)? getScalingListDefaultAddress(sizeId, refListId): getScalingListAddress(sizeId, refListId)),sizeof(Int)*min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId])); 2158 2023 } 2159 2160 2024 /** parse syntax infomation 2161 2025 * \param pchFile syntax infomation … … 2250 2114 m_scalingListCoef[SCALING_LIST_32x32][3] = m_scalingListCoef[SCALING_LIST_32x32][1]; // copy address for 32x32 2251 2115 } 2252 2253 2116 /** destroy quantization matrix array 2254 2117 */ … … 2263 2126 } 2264 2127 } 2265 2266 2128 /** get default address of quantization matrix 2267 2129 * \param sizeId size index … … 2293 2155 return src; 2294 2156 } 2295 2296 2157 /** process of default matrix 2297 2158 * \param sizeId size index … … 2303 2164 setScalingListDC(sizeId,listId,SCALING_LIST_DC); 2304 2165 } 2305 2306 2166 /** check DC value of matrix for default matrix signaling 2307 2167 */ … … 2364 2224 //! activate a PPS and depending on isIDR parameter also SPS and VPS 2365 2225 //! \returns true, if activation is successful 2366 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isI RAP)2226 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIDR) 2367 2227 { 2368 2228 TComPPS *pps = m_ppsMap.getPS(ppsId); … … 2373 2233 // active parameter sets per layer should be used here 2374 2234 #else 2375 if (!isI RAP&& (spsId != m_activeSPSId))2376 { 2377 printf("Warning: tried to activate PPS referring to a inactive SPS at non-I RAP.");2235 if (!isIDR && (spsId != m_activeSPSId)) 2236 { 2237 printf("Warning: tried to activate PPS referring to a inactive SPS at non-IDR."); 2378 2238 return false; 2379 2239 } … … 2383 2243 { 2384 2244 Int vpsId = sps->getVPSId(); 2385 if (!isI RAP&& (vpsId != m_activeVPSId))2386 { 2387 printf("Warning: tried to activate PPS referring to a inactive VPS at non-I RAP.");2245 if (!isIDR && (vpsId != m_activeVPSId)) 2246 { 2247 printf("Warning: tried to activate PPS referring to a inactive VPS at non-IDR."); 2388 2248 return false; 2389 2249 } … … 2444 2304 } 2445 2305 #endif 2306 2446 2307 #if SIGNAL_BITRATE_PICRATE_IN_VPS 2447 2308 TComBitRatePicRateInfo::TComBitRatePicRateInfo() -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComSlice.h
r368 r438 248 248 ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } 249 249 ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } 250 250 251 #if H_MV 251 252 Void copyLevelFrom( TComPTL* source ); … … 535 536 536 537 #endif 538 537 539 public: 538 540 TComVPS(); … … 594 596 TComPTL* getPTL() { return &m_pcPTL; } 595 597 #endif 598 596 599 #if SIGNAL_BITRATE_PICRATE_IN_VPS 597 600 TComBitRatePicRateInfo *getBitratePicrateInfo() { return &m_bitRatePicRateInfo; } … … 600 603 TimingInfo* getTimingInfo() { return &m_timingInfo; } 601 604 #endif 605 602 606 #if H_MV 603 607 Void setAvcBaseLayerFlag( Bool val ) { m_avcBaseLayerFlag = val; } … … 901 905 UInt m_picHeightInLumaSamples; 902 906 903 Int m_log2MinCodingBlockSize;904 Int m_log2DiffMaxMinCodingBlockSize; 907 Window m_conformanceWindow; 908 905 909 UInt m_uiMaxCUWidth; 906 910 UInt m_uiMaxCUHeight; 907 911 UInt m_uiMaxCUDepth; 908 909 Window m_conformanceWindow; 910 912 UInt m_uiMinTrDepth; 913 UInt m_uiMaxTrDepth; 911 914 TComRPSList m_RPSList; 912 915 Bool m_bLongTermRefsPresent; … … 924 927 Bool m_useAMP; 925 928 926 #if !L0034_COMBINED_LIST_CLEANUP927 929 Bool m_bUseLComb; 928 #endif929 930 930 931 // Parameter … … 967 968 static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; 968 969 TComPTL m_pcPTL; 969 #if H_MV970 Bool m_interViewMvVertConstraintFlag;971 #endif972 970 public: 973 971 TComSPS(); … … 1001 999 Bool getUsedByCurrPicLtSPSFlag(Int i) {return m_usedByCurrPicLtSPSFlag[i];} 1002 1000 Void setUsedByCurrPicLtSPSFlag(Int i, Bool x) { m_usedByCurrPicLtSPSFlag[i] = x;} 1003 1004 Int getLog2MinCodingBlockSize() const { return m_log2MinCodingBlockSize; }1005 Void setLog2MinCodingBlockSize(Int val) { m_log2MinCodingBlockSize = val; }1006 Int getLog2DiffMaxMinCodingBlockSize() const { return m_log2DiffMaxMinCodingBlockSize; }1007 Void setLog2DiffMaxMinCodingBlockSize(Int val) { m_log2DiffMaxMinCodingBlockSize = val; }1008 1009 1001 Void setMaxCUWidth ( UInt u ) { m_uiMaxCUWidth = u; } 1010 1002 UInt getMaxCUWidth () { return m_uiMaxCUWidth; } … … 1023 1015 Bool getUseAMP() { return m_useAMP; } 1024 1016 Void setUseAMP( Bool b ) { m_useAMP = b; } 1017 Void setMinTrDepth ( UInt u ) { m_uiMinTrDepth = u; } 1018 UInt getMinTrDepth () { return m_uiMinTrDepth; } 1019 Void setMaxTrDepth ( UInt u ) { m_uiMaxTrDepth = u; } 1020 UInt getMaxTrDepth () { return m_uiMaxTrDepth; } 1025 1021 Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u; } 1026 1022 UInt getQuadtreeTULog2MaxSize() { return m_uiQuadtreeTULog2MaxSize; } … … 1044 1040 1045 1041 // Tool list 1046 #if !L0034_COMBINED_LIST_CLEANUP1047 1042 Void setUseLComb (Bool b) { m_bUseLComb = b; } 1048 1043 Bool getUseLComb () { return m_bUseLComb; } 1049 #endif1050 1044 1051 1045 Bool getUseLossless () { return m_useLossless; } … … 1100 1094 1101 1095 TComPTL* getPTL() { return &m_pcPTL; } 1102 #if H_MV1103 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; }1104 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;}1105 #endif1106 1096 }; 1107 1097 … … 1130 1120 Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } 1131 1121 UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } 1122 1132 1123 #if H_MV 1133 1124 // Why not an listIdx for all members, would avoid code duplication?? … … 1366 1357 Int m_deblockingFilterBetaOffsetDiv2; //< beta offset for deblocking filter 1367 1358 Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter 1368 #if L0034_COMBINED_LIST_CLEANUP 1369 Int m_list1IdxToList0Idx[MAX_NUM_REF]; 1370 Int m_aiNumRefIdx [2]; // for multiple reference of current slice 1371 #else 1359 1372 1360 Int m_aiNumRefIdx [3]; // for multiple reference of current slice 1373 1361 … … 1379 1367 Bool m_bRefPicListModificationFlagLC; 1380 1368 Bool m_bRefPicListCombinationFlag; 1381 #endif1382 1369 1383 1370 Bool m_bCheckLDC; … … 1420 1407 1421 1408 Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; 1422 #if !L0034_COMBINED_LIST_CLEANUP 1409 1423 1410 Bool m_bNoBackPredFlag; 1424 #endif1425 1411 UInt m_uiTLayer; 1426 1412 Bool m_bTLayerSwitchingFlag; … … 1457 1443 1458 1444 Bool m_enableTMVPFlag; 1445 1459 1446 #if H_MV 1460 1447 Int m_layerId; … … 1464 1451 #endif 1465 1452 #endif 1453 1466 1454 public: 1467 1455 TComSlice(); … … 1528 1516 Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } 1529 1517 Int getNumRpsCurrTempList(); 1530 #if L0034_COMBINED_LIST_CLEANUP1531 Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; }1532 #else1533 1518 Int getRefIdxOfLC (RefPicList e, Int iRefIdx) { return m_iRefIdxOfLC[e][iRefIdx]; } 1534 1519 Int getListIdFromIdxOfLC(Int iRefIdx) { return m_eListIdFromIdxOfLC[iRefIdx]; } … … 1540 1525 Bool getRefPicListCombinationFlag() {return m_bRefPicListCombinationFlag;} 1541 1526 Void setRefPicListCombinationFlag(Bool bflag) {m_bRefPicListCombinationFlag=bflag;} 1542 #endif1543 1527 Void setReferenced(Bool b) { m_bRefenced = b; } 1544 1528 Bool isReferenced() { return m_bRefenced; } 1545 1529 Void setPOC ( Int i ) { m_iPOC = i; if(getTLayer()==0) m_prevPOC=i; } 1546 1530 Void setNalUnitType ( NalUnitType e ) { m_eNalUnitType = e; } 1547 NalUnitType getNalUnitType () const{ return m_eNalUnitType; }1531 NalUnitType getNalUnitType () { return m_eNalUnitType; } 1548 1532 Bool getRapPicFlag (); 1549 Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } 1550 Bool isIRAP () const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } 1551 Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA, TComList<TComPic *>& rcListPic); 1533 Bool getIdrPicFlag () { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } 1534 Void checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA); 1552 1535 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic); 1553 1536 Void setSliceType ( SliceType e ) { m_eSliceType = e; } … … 1575 1558 #endif 1576 1559 #if H_MV 1577 Void setRefPicList ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& interLayerRefPicSet , Bool checkNumPocTotalCurr = false ); 1578 #else 1579 #if FIX1071 1580 Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); 1560 Void setRefPicList ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& interLayerRefPicSet ); 1581 1561 #else 1582 1562 Void setRefPicList ( TComList<TComPic*>& rcListPic ); 1583 #endif1584 1563 #endif 1585 1564 Void setRefPOCList (); … … 1615 1594 1616 1595 static Void sortPicList ( TComList<TComPic*>& rcListPic ); 1617 #if L0034_COMBINED_LIST_CLEANUP 1618 Void setList1IdxToList0Idx(); 1619 #else 1596 1620 1597 Bool getNoBackPredFlag() { return m_bNoBackPredFlag; } 1621 1598 Void setNoBackPredFlag( Bool b ) { m_bNoBackPredFlag = b; } 1622 1599 Void generateCombinedList (); 1623 #endif1624 1600 1625 1601 UInt getTLayer () { return m_uiTLayer; } … … 1629 1605 Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); 1630 1606 Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); 1607 1631 1608 #if H_MV 1632 1609 Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ); … … 1637 1614 Void xPrintRefPicList(); 1638 1615 #endif 1616 1639 1617 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); 1640 1618 Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); … … 1677 1655 Void getWpScaling ( RefPicList e, Int iRefIdx, wpScalingParam *&wp); 1678 1656 1679 Void resetWpScaling (); 1657 Void resetWpScaling (wpScalingParam wp[2][MAX_NUM_REF][3]); 1658 Void initWpScaling (wpScalingParam wp[2][MAX_NUM_REF][3]); 1680 1659 Void initWpScaling (); 1681 1660 inline Bool applyWP () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); } … … 1723 1702 #endif 1724 1703 #endif 1704 1725 1705 protected: 1726 1706 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, 1727 1707 Int poc); 1728 TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); 1708 TComPic* xGetLongTermRefPic (TComList<TComPic*>& rcListPic, 1709 Int poc); 1729 1710 #if H_MV 1730 1711 TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); … … 1813 1794 //! activate a PPS and depending on isIDR parameter also SPS and VPS 1814 1795 //! \returns true, if activation is successful 1815 Bool activatePPS(Int ppsId, Bool isI RAP);1796 Bool activatePPS(Int ppsId, Bool isIDR); 1816 1797 1817 1798 TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r362 r438 1986 1986 } 1987 1987 1988 if(pi DstCoeff[minPos] == 32767 || piDstCoeff[minPos] == -32768)1988 if(piQCoef[minPos] == 32767 || piQCoef[minPos] == -32768) 1989 1989 { 1990 1990 finalChange = -1; -
branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TypeDef.h
r368 r438 49 49 #endif 50 50 51 ///// ***** HM 10.1 ********* 52 #define FIX1071 1 ///< Temporary fix for issue #1071 53 54 #define L0208_SOP_DESCRIPTION_SEI 1 ///< L0208: add SOP descrioption SEI 55 #define MAX_NUM_PICS_IN_SOP 1024 56 57 #define K0180_SCALABLE_NESTING_SEI 1 ///JCTVC-K0180 scalable nesting sei message 58 #define MAX_NESTING_NUM_OPS 1024 59 #define MAX_NESTING_NUM_LAYER 64 60 61 #define J0149_TONE_MAPPING_SEI 1 ///< J0149: Tone mapping information SEI 51 ///// ***** HM 10.0 ********* 52 62 53 #define L0363_DU_BIT_RATE 1 ///< L0363: add bit_rate_du_value_minus1 to HRD parameters 63 54 #define L0328_SPLICING 1 ///< L0328: splicing support in HRD … … 84 75 #define SIGNAL_BITRATE_PICRATE_IN_VPS 0 ///< K0125: Signal bit_rate and pic_rate in VPS 85 76 #define L0232_RD_PENALTY 1 ///< L0232: RD-penalty for 32x32 TU for intra in non-intra slices 86 #define L0386_DB_METRIC 1 ///< L0386: non-normative blockiness metric (automatically configures deblocking parameters in bitstream)87 #define L0323_DPB 1 ///< L0323: Specification of active reference indices and decoded picture buffer88 89 #define L0034_COMBINED_LIST_CLEANUP 190 77 91 78 #define MAX_VPS_NUM_HRD_PARAMETERS 1 92 79 #define MAX_VPS_OP_SETS_PLUS1 1024 80 93 81 #if H_MV 94 82 #define MAX_VPS_NUH_LAYER_ID_PLUS1 64 … … 104 92 #define MAX_CPB_CNT 32 ///< Upper bound of (cpb_cnt_minus1 + 1) 105 93 #define MAX_NUM_LAYER_IDS 64 106 #if H_MV107 94 #define MAX_NUM_LAYERS 64 108 #endif109 95 110 96 #define COEF_REMAIN_BIN_REDUCTION 3 ///< indicates the level at which the VLC … … 426 412 REF_PIC_LIST_0 = 0, ///< reference list 0 427 413 REF_PIC_LIST_1 = 1, ///< reference list 1 428 #if !L0034_COMBINED_LIST_CLEANUP429 414 REF_PIC_LIST_C = 2, ///< combined reference list for uni-prediction in B-Slices 430 #endif431 415 REF_PIC_LIST_X = 100 ///< special mark 432 416 }; … … 570 554 #endif 571 555 #endif 556 -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/NALread.cpp
r368 r438 50 50 //! \ingroup TLibDecoder 51 51 //! \{ 52 static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, TComInputBitstream *bitstream,Bool isVclNalUnit)52 static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, Bool isVclNalUnit) 53 53 { 54 54 UInt zeroCount = 0; 55 55 vector<uint8_t>::iterator it_read, it_write; 56 56 57 UInt pos = 0; 58 bitstream->clearEmulationPreventionByteLocation(); 59 for (it_read = it_write = nalUnitBuf.begin(); it_read != nalUnitBuf.end(); it_read++, it_write++, pos++) 57 for (it_read = it_write = nalUnitBuf.begin(); it_read != nalUnitBuf.end(); it_read++, it_write++) 60 58 { 61 59 assert(zeroCount < 2 || *it_read >= 0x03); 62 60 if (zeroCount == 2 && *it_read == 0x03) 63 61 { 64 bitstream->pushEmulationPreventionByteLocation( pos );65 pos++;66 62 it_read++; 67 63 zeroCount = 0; … … 113 109 if ( nalu.m_temporalId ) 114 110 { 115 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA _W_LP116 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA _W_RADL111 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA 112 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLANT 117 113 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_N_LP 118 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR _W_RADL114 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR 119 115 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_N_LP 120 116 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA … … 126 122 else 127 123 { 128 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA _R124 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA 129 125 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N 130 126 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R … … 140 136 /* perform anti-emulation prevention */ 141 137 TComInputBitstream *pcBitstream = new TComInputBitstream(NULL); 142 convertPayloadToRBSP(nalUnitBuf, pcBitstream,(nalUnitBuf[0] & 64) == 0);138 convertPayloadToRBSP(nalUnitBuf, (nalUnitBuf[0] & 64) == 0); 143 139 144 140 nalu.m_Bitstream = new TComInputBitstream(&nalUnitBuf); 145 nalu.m_Bitstream->setEmulationPreventionByteLocation(pcBitstream->getEmulationPreventionByteLocation());146 141 delete pcBitstream; 147 142 readNalUnitHeader(nalu); -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/SEIread.cpp
r362 r438 90 90 fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n"); 91 91 break; 92 #if J0149_TONE_MAPPING_SEI93 case SEI::TONE_MAPPING_INFO:94 fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n");95 break;96 #endif97 #if L0208_SOP_DESCRIPTION_SEI98 case SEI::SOP_DESCRIPTION:99 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");100 break;101 #endif102 #if K0180_SCALABLE_NESTING_SEI103 case SEI::SCALABLE_NESTING:104 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");105 break;106 #endif107 92 default: 108 93 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 169 154 SEI *sei = NULL; 170 155 171 if(nalUnitType == NAL_UNIT_ PREFIX_SEI)156 if(nalUnitType == NAL_UNIT_SEI) 172 157 { 173 158 switch (payloadType) … … 234 219 xParseSEIGradualDecodingRefreshInfo((SEIGradualDecodingRefreshInfo&) *sei, payloadSize); 235 220 break; 236 #if J0149_TONE_MAPPING_SEI237 case SEI::TONE_MAPPING_INFO:238 sei = new SEIToneMappingInfo;239 xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize);240 break;241 #endif242 #if L0208_SOP_DESCRIPTION_SEI243 case SEI::SOP_DESCRIPTION:244 sei = new SEISOPDescription;245 xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize);246 break;247 #endif248 #if K0180_SCALABLE_NESTING_SEI249 case SEI::SCALABLE_NESTING:250 sei = new SEIScalableNesting;251 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);252 break;253 #endif254 221 default: 255 222 for (UInt i = 0; i < payloadSize; i++) … … 317 284 { 318 285 UInt reservedPayloadExtensionData; 319 READ_ FLAG (reservedPayloadExtensionData, "reserved_payload_extension_data");286 READ_CODE (1, reservedPayloadExtensionData, "reserved_payload_extension_data"); 320 287 } 321 288 322 289 UInt dummy; 323 READ_FLAG (dummy, "payload_bit_equal_to_one"); payloadBitsRemaining--; 324 while (payloadBitsRemaining) 325 { 326 READ_FLAG (dummy, "payload_bit_equal_to_zero"); payloadBitsRemaining--; 327 } 290 READ_CODE (1, dummy, "payload_bit_equal_to_one"); 291 READ_CODE (payloadBitsRemaining-1, dummy, "payload_bit_equal_to_zero"); 328 292 } 329 293 … … 668 632 } 669 633 670 #if J0149_TONE_MAPPING_SEI671 Void SEIReader::xParseSEIToneMappingInfo(SEIToneMappingInfo& sei, UInt /*payloadSize*/)672 {673 Int i;674 UInt val;675 READ_UVLC( val, "tone_map_id" ); sei.m_toneMapId = val;676 READ_FLAG( val, "tone_map_cancel_flag" ); sei.m_toneMapCancelFlag = val;677 678 if ( !sei.m_toneMapCancelFlag )679 {680 READ_FLAG( val, "tone_map_persistence_flag" ); sei.m_toneMapPersistenceFlag = val;681 READ_CODE( 8, val, "coded_data_bit_depth" ); sei.m_codedDataBitDepth = val;682 READ_CODE( 8, val, "target_bit_depth" ); sei.m_targetBitDepth = val;683 READ_UVLC( val, "model_id" ); sei.m_modelId = val;684 switch(sei.m_modelId)685 {686 case 0:687 {688 READ_CODE( 32, val, "min_value" ); sei.m_minValue = val;689 READ_CODE( 32, val, "max_value" ); sei.m_maxValue = val;690 break;691 }692 case 1:693 {694 READ_CODE( 32, val, "sigmoid_midpoint" ); sei.m_sigmoidMidpoint = val;695 READ_CODE( 32, val, "sigmoid_width" ); sei.m_sigmoidWidth = val;696 break;697 }698 case 2:699 {700 UInt num = 1u << sei.m_targetBitDepth;701 sei.m_startOfCodedInterval.resize(num+1);702 for(i = 0; i < num; i++)703 {704 READ_CODE( ((( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3), val, "start_of_coded_interval" );705 sei.m_startOfCodedInterval[i] = val;706 }707 sei.m_startOfCodedInterval[num] = 1u << sei.m_codedDataBitDepth;708 break;709 }710 case 3:711 {712 READ_CODE( 16, val, "num_pivots" ); sei.m_numPivots = val;713 sei.m_codedPivotValue.resize(sei.m_numPivots);714 sei.m_targetPivotValue.resize(sei.m_numPivots);715 for(i = 0; i < sei.m_numPivots; i++ )716 {717 READ_CODE( ((( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3), val, "coded_pivot_value" );718 sei.m_codedPivotValue[i] = val;719 READ_CODE( ((( sei.m_targetBitDepth + 7 ) >> 3 ) << 3), val, "target_pivot_value" );720 sei.m_targetPivotValue[i] = val;721 }722 break;723 }724 case 4:725 {726 READ_CODE( 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeedValue = val;727 if( sei.m_cameraIsoSpeedValue == 255) //Extended_ISO728 {729 READ_CODE( 32, val, "camera_iso_speed_value" ); sei.m_cameraIsoSpeedValue = val;730 }731 READ_FLAG( val, "exposure_compensation_value_sign_flag" ); sei.m_exposureCompensationValueSignFlag = val;732 READ_CODE( 16, val, "exposure_compensation_value_numerator" ); sei.m_exposureCompensationValueNumerator = val;733 READ_CODE( 16, val, "exposure_compensation_value_denom_idc" ); sei.m_exposureCompensationValueDenomIdc = val;734 READ_CODE( 32, val, "ref_screen_luminance_white" ); sei.m_refScreenLuminanceWhite = val;735 READ_CODE( 32, val, "extended_range_white_level" ); sei.m_extendedRangeWhiteLevel = val;736 READ_CODE( 16, val, "nominal_black_level_luma_code_value" ); sei.m_nominalBlackLevelLumaCodeValue = val;737 READ_CODE( 16, val, "nominal_white_level_luma_code_value" ); sei.m_nominalWhiteLevelLumaCodeValue= val;738 READ_CODE( 16, val, "extended_white_level_luma_code_value" ); sei.m_extendedWhiteLevelLumaCodeValue = val;739 break;740 }741 default:742 {743 assert(!"Undefined SEIToneMapModelId");744 break;745 }746 }//switch model id747 }// if(!sei.m_toneMapCancelFlag)748 749 xParseByteAlign();750 }751 #endif752 753 #if L0208_SOP_DESCRIPTION_SEI754 Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize)755 {756 Int iCode;757 UInt uiCode;758 759 READ_UVLC( uiCode, "sop_seq_parameter_set_id" ); sei.m_sopSeqParameterSetId = uiCode;760 READ_UVLC( uiCode, "num_pics_in_sop_minus1" ); sei.m_numPicsInSopMinus1 = uiCode;761 for (UInt i = 0; i <= sei.m_numPicsInSopMinus1; i++)762 {763 READ_CODE( 6, uiCode, "sop_desc_vcl_nalu_type" ); sei.m_sopDescVclNaluType[i] = uiCode;764 READ_CODE( 3, sei.m_sopDescTemporalId[i], "sop_desc_temporal_id" ); sei.m_sopDescTemporalId[i] = uiCode;765 if (sei.m_sopDescVclNaluType[i] != NAL_UNIT_CODED_SLICE_IDR_W_RADL && sei.m_sopDescVclNaluType[i] != NAL_UNIT_CODED_SLICE_IDR_N_LP)766 {767 READ_UVLC( sei.m_sopDescStRpsIdx[i], "sop_desc_st_rps_idx" ); sei.m_sopDescStRpsIdx[i] = uiCode;768 }769 if (i > 0)770 {771 READ_SVLC( iCode, "sop_desc_poc_delta" ); sei.m_sopDescPocDelta[i] = iCode;772 }773 }774 775 xParseByteAlign();776 }777 #endif778 779 #if K0180_SCALABLE_NESTING_SEI780 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps)781 {782 UInt uiCode;783 SEIMessages seis;784 785 READ_FLAG( uiCode, "bitstream_subset_flag" ); sei.m_bitStreamSubsetFlag = uiCode;786 READ_FLAG( uiCode, "nesting_op_flag" ); sei.m_nestingOpFlag = uiCode;787 if (sei.m_nestingOpFlag)788 {789 READ_FLAG( uiCode, "default_op_flag" ); sei.m_defaultOpFlag = uiCode;790 READ_UVLC( uiCode, "nesting_num_ops_minus1" ); sei.m_nestingNumOpsMinus1 = uiCode;791 for (UInt i = sei.m_defaultOpFlag; i <= sei.m_nestingNumOpsMinus1; i++)792 {793 READ_CODE( 3, uiCode, "nesting_max_temporal_id_plus1" ); sei.m_nestingMaxTemporalIdPlus1[i] = uiCode;794 READ_UVLC( uiCode, "nesting_op_idx" ); sei.m_nestingOpIdx[i] = uiCode;795 }796 }797 else798 {799 READ_FLAG( uiCode, "all_layers_flag" ); sei.m_allLayersFlag = uiCode;800 if (!sei.m_allLayersFlag)801 {802 READ_CODE( 3, uiCode, "nesting_no_op_max_temporal_id_plus1" ); sei.m_nestingNoOpMaxTemporalIdPlus1 = uiCode;803 READ_UVLC( uiCode, "nesting_num_layers_minus1" ); sei.m_nestingNumLayersMinus1 = uiCode;804 for (UInt i = 0; i <= sei.m_nestingNumLayersMinus1; i++)805 {806 READ_CODE( 6, uiCode, "nesting_layer_id" ); sei.m_nestingLayerId[i] = uiCode;807 }808 }809 }810 811 // byte alignment812 while ( m_pcBitstream->getNumBitsRead() % 8 != 0 )813 {814 UInt code;815 READ_FLAG( code, "nesting_zero_bit" );816 }817 818 sei.m_callerOwnsSEIs = false;819 820 // read nested SEI messages821 do {822 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps);823 } while (m_pcBitstream->getNumBitsLeft() > 8);824 825 }826 #endif827 828 634 Void SEIReader::xParseByteAlign() 829 635 { -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/SEIread.h
r362 r438 70 70 Void xParseSEITemporalLevel0Index (SEITemporalLevel0Index &sei, UInt payloadSize); 71 71 Void xParseSEIGradualDecodingRefreshInfo (SEIGradualDecodingRefreshInfo &sei, UInt payloadSize); 72 #if J0149_TONE_MAPPING_SEI73 Void xParseSEIToneMappingInfo (SEIToneMappingInfo& sei, UInt payloadSize);74 #endif75 #if L0208_SOP_DESCRIPTION_SEI76 Void xParseSEISOPDescription (SEISOPDescription &sei, UInt payloadSize);77 #endif78 #if K0180_SCALABLE_NESTING_SEI79 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps);80 #endif81 72 Void xParseByteAlign(); 82 73 }; -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r401 r438 175 175 } 176 176 177 /** copy SAO parameter 178 * \param dst 179 * \param src 180 */ 181 inline Void copySaoOneLcuParam(SaoLcuParam* dst, SaoLcuParam* src) 182 { 183 Int i; 184 dst->partIdx = src->partIdx; 185 dst->typeIdx = src->typeIdx; 186 if (dst->typeIdx != -1) 187 { 188 dst->subTypeIdx = src->subTypeIdx ; 189 dst->length = src->length; 190 for (i=0;i<dst->length;i++) 191 { 192 dst->offset[i] = src->offset[i]; 193 } 194 } 195 else 196 { 197 dst->length = 0; 198 for (i=0;i<SAO_BO_LEN;i++) 199 { 200 dst->offset[i] = 0; 201 } 202 } 203 } 204 177 205 Void TDecCavlc::parsePPS(TComPPS* pcPPS) 178 206 { … … 372 400 373 401 READ_FLAG( uiCode, "field_seq_flag"); pcVUI->setFieldSeqFlag(uiCode); 402 assert(pcVUI->getFieldSeqFlag() == false); // not supported yet 374 403 375 404 READ_FLAG(uiCode, "frame_field_info_present_flag"); pcVUI->setFrameFieldInfoPresentFlag(uiCode); … … 564 593 565 594 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); 566 pcSPS->setBitDepthY( uiCode + 8 ); 595 g_bitDepthY = 8 + uiCode; 596 pcSPS->setBitDepthY(g_bitDepthY); 567 597 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 568 598 569 599 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 570 pcSPS->setBitDepthC( uiCode + 8 ); 600 g_bitDepthC = 8 + uiCode; 601 pcSPS->setBitDepthC(g_bitDepthC); 571 602 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 572 603 … … 577 608 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 578 609 { 579 #if L0323_DPB580 #if H_MV581 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]");582 #else583 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1");584 #endif585 pcSPS->setMaxDecPicBuffering( uiCode + 1, i);586 #else587 610 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering"); 588 611 pcSPS->setMaxDecPicBuffering( uiCode, i); 589 #endif590 #if H_MV591 READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" );592 #else593 612 READ_UVLC ( uiCode, "sps_num_reorder_pics" ); 594 #endif595 613 pcSPS->setNumReorderPics(uiCode, i); 596 #if H_MV597 READ_UVLC ( uiCode, "sps_max_latency_increase[i]");598 #else599 614 READ_UVLC ( uiCode, "sps_max_latency_increase"); 600 #endif601 615 pcSPS->setMaxLatencyIncrease( uiCode, i ); 602 616 … … 614 628 615 629 READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" ); 616 Int log2MinCUSize = uiCode + 3; 617 pcSPS->setLog2MinCodingBlockSize(log2MinCUSize); 630 UInt log2MinCUSize = uiCode + 3; 618 631 READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" ); 619 pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode); 620 Int maxCUDepthDelta = uiCode; 621 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 622 pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 632 UInt uiMaxCUDepthCorrect = uiCode; 633 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + uiMaxCUDepthCorrect) ); g_uiMaxCUWidth = 1<<(log2MinCUSize + uiMaxCUDepthCorrect); 634 pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + uiMaxCUDepthCorrect) ); g_uiMaxCUHeight = 1<<(log2MinCUSize + uiMaxCUDepthCorrect); 623 635 READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" ); pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 ); 624 636 … … 628 640 READ_UVLC( uiCode, "max_transform_hierarchy_depth_inter" ); pcSPS->setQuadtreeTUMaxDepthInter( uiCode+1 ); 629 641 READ_UVLC( uiCode, "max_transform_hierarchy_depth_intra" ); pcSPS->setQuadtreeTUMaxDepthIntra( uiCode+1 ); 630 631 Int addCuDepth = max (0, log2MinCUSize - (Int)pcSPS->getQuadtreeTULog2MinSize() ); 632 pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth ); 633 642 g_uiAddCUDepth = 0; 643 while( ( pcSPS->getMaxCUWidth() >> uiMaxCUDepthCorrect ) > ( 1 << ( pcSPS->getQuadtreeTULog2MinSize() + g_uiAddCUDepth ) ) ) 644 { 645 g_uiAddCUDepth++; 646 } 647 pcSPS->setMaxCUDepth( uiMaxCUDepthCorrect+g_uiAddCUDepth ); 648 g_uiMaxCUDepth = uiMaxCUDepthCorrect+g_uiAddCUDepth; 649 // BB: these parameters may be removed completly and replaced by the fixed values 650 pcSPS->setMinTrDepth( 0 ); 651 pcSPS->setMaxTrDepth( 1 ); 634 652 READ_FLAG( uiCode, "scaling_list_enabled_flag" ); pcSPS->setScalingListFlag ( uiCode ); 635 653 if(pcSPS->getScalingListFlag()) … … 692 710 if (uiCode) 693 711 { 694 #if H_MV695 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);696 #else697 712 while ( xMoreRbspData() ) 698 713 { 699 714 READ_FLAG( uiCode, "sps_extension_data_flag"); 700 715 } 701 #endif702 716 } 703 717 } … … 706 720 { 707 721 UInt uiCode; 708 722 709 723 READ_CODE( 4, uiCode, "vps_video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 710 724 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); … … 730 744 for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++) 731 745 { 732 #if L0323_DPB733 READ_UVLC( uiCode, "vps_max_dec_pic_buffering_minus1[i]" ); pcVPS->setMaxDecPicBuffering( uiCode + 1, i );734 #else735 746 READ_UVLC( uiCode, "vps_max_dec_pic_buffering[i]" ); pcVPS->setMaxDecPicBuffering( uiCode, i ); 736 #endif737 747 READ_UVLC( uiCode, "vps_num_reorder_pics[i]" ); pcVPS->setNumReorderPics( uiCode, i ); 738 748 READ_UVLC( uiCode, "vps_max_latency_increase[i]" ); pcVPS->setMaxLatencyIncrease( uiCode, i ); … … 1042 1052 iPOCmsb = iPrevPOCmsb; 1043 1053 } 1044 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_LP1045 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_RADL1054 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 1055 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT 1046 1056 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) 1047 1057 { … … 1052 1062 1053 1063 TComReferencePictureSet* rps; 1054 rps = rpcSlice->getLocalRPS();1055 rpcSlice->setRPS(rps);1056 1064 READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" ); 1057 1065 if(uiCode == 0) // use short-term reference picture set explicitly signalled in slice header 1058 1066 { 1067 rps = rpcSlice->getLocalRPS(); 1059 1068 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 1069 rpcSlice->setRPS(rps); 1060 1070 } 1061 1071 else // use reference to short-term reference picture set in PPS … … 1074 1084 uiCode = 0; 1075 1085 } 1076 memcpy(rps,sps->getRPSList()->getReferencePictureSet(uiCode),sizeof(TComReferencePictureSet)); 1086 rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode)); 1087 1088 rps = rpcSlice->getRPS(); 1077 1089 } 1078 1090 if(sps->getLongTermRefsPresent()) … … 1097 1109 rps->setNumberOfLongtermPictures(numOfLtrp); 1098 1110 Int maxPicOrderCntLSB = 1 << rpcSlice->getSPS()->getBitsForPOC(); 1099 Int prev DeltaMSB = 0, deltaPocMSBCycleLT = 0;;1111 Int prevLSB = 0, prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;; 1100 1112 for(Int j=offset+rps->getNumberOfLongtermPictures()-1, k = 0; k < numOfLtrp; j--, k++) 1101 1113 { … … 1124 1136 READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" ); 1125 1137 Bool deltaFlag = false; 1126 // First LTRP || First LTRP from SH 1127 if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) )1138 // First LTRP || First LTRP from SH || curr LSB != prev LSB 1139 if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) || (pocLsbLt != prevLSB) ) 1128 1140 { 1129 1141 deltaFlag = true; … … 1150 1162 rps->setCheckLTMSBPresent(j,false); 1151 1163 } 1164 prevLSB = pocLsbLt; 1152 1165 prevDeltaMSB = deltaPocMSBCycleLT; 1153 1166 } … … 1155 1168 rps->setNumberOfPictures(offset); 1156 1169 } 1157 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_LP1158 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_RADL1170 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 1171 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT 1159 1172 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) 1160 1173 { … … 1216 1229 } 1217 1230 } 1218 // } 1231 // } 1219 1232 TComRefPicListModification* refPicListModification = rpcSlice->getRefPicListModification(); 1220 1221 1233 if(!rpcSlice->isIntra()) 1222 1234 { … … 1389 1401 if(!rpcSlice->getDeblockingFilterDisable()) 1390 1402 { 1391 READ_SVLC( iCode, "slice_beta_offset_div2" ); rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode); 1392 assert(rpcSlice->getDeblockingFilterBetaOffsetDiv2() >= -6 && 1393 rpcSlice->getDeblockingFilterBetaOffsetDiv2() <= 6); 1394 READ_SVLC( iCode, "slice_tc_offset_div2" ); rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode); 1395 assert(rpcSlice->getDeblockingFilterTcOffsetDiv2() >= -6 && 1396 rpcSlice->getDeblockingFilterTcOffsetDiv2() <= 6); 1403 READ_SVLC( iCode, "beta_offset_div2" ); rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode); 1404 READ_SVLC( iCode, "tc_offset_div2" ); rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode); 1397 1405 } 1398 1406 } … … 1426 1434 } 1427 1435 1436 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() ) 1437 { 1428 1438 UInt *entryPointOffset = NULL; 1429 1439 UInt numEntryPointOffsets, offsetLenMinus1; 1430 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() ) 1431 { 1440 1432 1441 READ_UVLC(numEntryPointOffsets, "num_entry_point_offsets"); rpcSlice->setNumEntryPointOffsets ( numEntryPointOffsets ); 1433 1442 if (numEntryPointOffsets>0) … … 1446 1455 #endif 1447 1456 } 1448 }1449 else1450 {1451 rpcSlice->setNumEntryPointOffsets ( 0 );1452 }1453 1454 if(pps->getSliceHeaderExtensionPresentFlag())1455 {1456 READ_UVLC(uiCode,"slice_header_extension_length");1457 for(Int i=0; i<uiCode; i++)1458 {1459 UInt ignore;1460 READ_CODE(8,ignore,"slice_header_extension_data_byte");1461 }1462 }1463 m_pcBitstream->readByteAlignment();1464 1465 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )1466 {1467 Int endOfSliceHeaderLocation = m_pcBitstream->getByteLocation();1468 Int curEntryPointOffset = 0;1469 Int prevEntryPointOffset = 0;1470 for (UInt idx=0; idx<numEntryPointOffsets; idx++)1471 {1472 curEntryPointOffset += entryPointOffset[ idx ];1473 1474 Int emulationPreventionByteCount = 0;1475 for ( UInt curByteIdx = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ )1476 {1477 if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) &&1478 m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) < ( curEntryPointOffset + endOfSliceHeaderLocation ) )1479 {1480 emulationPreventionByteCount++;1481 }1482 }1483 1484 entryPointOffset[ idx ] -= emulationPreventionByteCount;1485 prevEntryPointOffset = curEntryPointOffset;1486 }1487 1457 1488 1458 if ( pps->getTilesEnabledFlag() ) … … 1520 1490 } 1521 1491 } 1522 1492 else 1493 { 1494 rpcSlice->setNumEntryPointOffsets ( 0 ); 1495 } 1496 1497 if(pps->getSliceHeaderExtensionPresentFlag()) 1498 { 1499 READ_UVLC(uiCode,"slice_header_extension_length"); 1500 for(Int i=0; i<uiCode; i++) 1501 { 1502 UInt ignore; 1503 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 1504 } 1505 } 1506 m_pcBitstream->readByteAlignment(); 1523 1507 return; 1524 1508 } … … 1771 1755 // ==================================================================================================================== 1772 1756 1757 1758 /** Parse PCM alignment zero bits. 1759 * \returns Void 1760 */ 1761 Void TDecCavlc::xReadPCMAlignZero( ) 1762 { 1763 UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned(); 1764 1765 if(uiNumberOfBits) 1766 { 1767 UInt uiBits; 1768 UInt uiSymbol; 1769 1770 for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++) 1771 { 1772 xReadFlag( uiSymbol ); 1773 assert( uiSymbol == 0 ); 1774 } 1775 } 1776 } 1777 1778 Void TDecCavlc::xReadUnaryMaxSymbol( UInt& ruiSymbol, UInt uiMaxSymbol ) 1779 { 1780 if (uiMaxSymbol == 0) 1781 { 1782 ruiSymbol = 0; 1783 return; 1784 } 1785 1786 xReadFlag( ruiSymbol ); 1787 1788 if (ruiSymbol == 0 || uiMaxSymbol == 1) 1789 { 1790 return; 1791 } 1792 1793 UInt uiSymbol = 0; 1794 UInt uiCont; 1795 1796 do 1797 { 1798 xReadFlag( uiCont ); 1799 uiSymbol++; 1800 } 1801 while( uiCont && (uiSymbol < uiMaxSymbol-1) ); 1802 1803 if( uiCont && (uiSymbol == uiMaxSymbol-1) ) 1804 { 1805 uiSymbol++; 1806 } 1807 1808 ruiSymbol = uiSymbol; 1809 } 1810 1811 Void TDecCavlc::xReadExGolombLevel( UInt& ruiSymbol ) 1812 { 1813 UInt uiSymbol ; 1814 UInt uiCount = 0; 1815 do 1816 { 1817 xReadFlag( uiSymbol ); 1818 uiCount++; 1819 } 1820 while( uiSymbol && (uiCount != 13)); 1821 1822 ruiSymbol = uiCount-1; 1823 1824 if( uiSymbol ) 1825 { 1826 xReadEpExGolomb( uiSymbol, 0 ); 1827 ruiSymbol += uiSymbol+1; 1828 } 1829 1830 return; 1831 } 1832 1833 Void TDecCavlc::xReadEpExGolomb( UInt& ruiSymbol, UInt uiCount ) 1834 { 1835 UInt uiSymbol = 0; 1836 UInt uiBit = 1; 1837 1838 1839 while( uiBit ) 1840 { 1841 xReadFlag( uiBit ); 1842 uiSymbol += uiBit << uiCount++; 1843 } 1844 1845 uiCount--; 1846 while( uiCount-- ) 1847 { 1848 xReadFlag( uiBit ); 1849 uiSymbol += uiBit << uiCount; 1850 } 1851 1852 ruiSymbol = uiSymbol; 1853 1854 return; 1855 } 1856 1857 UInt TDecCavlc::xGetBit() 1858 { 1859 UInt ruiCode; 1860 m_pcBitstream->read( 1, ruiCode ); 1861 return ruiCode; 1862 } 1863 1864 1773 1865 /** parse explicit wp tables 1774 1866 * \param TComSlice* pcSlice … … 1787 1879 // decode delta_luma_log2_weight_denom : 1788 1880 READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" ); // ue(v): luma_log2_weight_denom 1789 assert( uiLog2WeightDenomLuma <= 7 );1790 1881 if( bChroma ) 1791 1882 { 1792 1883 READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" ); // se(v): delta_chroma_log2_weight_denom 1793 1884 assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)>=0); 1794 assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)<=7);1795 1885 uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma); 1796 1886 } … … 1831 1921 Int iDeltaWeight; 1832 1922 READ_SVLC( iDeltaWeight, "delta_luma_weight_lX" ); // se(v): delta_luma_weight_l0[i] 1833 assert( iDeltaWeight >= -128 );1834 assert( iDeltaWeight <= 127 );1835 1923 wp[0].iWeight = (iDeltaWeight + (1<<wp[0].uiLog2WeightDenom)); 1836 1924 READ_SVLC( wp[0].iOffset, "luma_offset_lX" ); // se(v): luma_offset_l0[i] 1837 assert( wp[0].iOffset >= -128 );1838 assert( wp[0].iOffset <= 127 );1839 1925 } 1840 1926 else … … 1851 1937 Int iDeltaWeight; 1852 1938 READ_SVLC( iDeltaWeight, "delta_chroma_weight_lX" ); // se(v): chroma_weight_l0[i][j] 1853 assert( iDeltaWeight >= -128 );1854 assert( iDeltaWeight <= 127 );1855 1939 wp[j].iWeight = (iDeltaWeight + (1<<wp[1].uiLog2WeightDenom)); 1856 1940 1857 1941 Int iDeltaChroma; 1858 1942 READ_SVLC( iDeltaChroma, "delta_chroma_offset_lX" ); // se(v): delta_chroma_offset_l0[i][j] 1859 assert( iDeltaChroma >= -512 );1860 assert( iDeltaChroma <= 511 );1861 1943 Int pred = ( 128 - ( ( 128*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) ); 1862 1944 wp[j].iOffset = Clip3(-128, 127, (iDeltaChroma + pred) ); -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecCAVLC.h
r362 r438 61 61 62 62 protected: 63 Void xReadEpExGolomb ( UInt& ruiSymbol, UInt uiCount ); 64 Void xReadExGolombLevel ( UInt& ruiSymbol ); 65 Void xReadUnaryMaxSymbol ( UInt& ruiSymbol, UInt uiMaxSymbol ); 66 67 Void xReadPCMAlignZero (); 68 69 UInt xGetBit (); 70 63 71 void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); 72 private: 64 73 65 74 public: -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecGop.cpp
r368 r438 208 208 rpcPic->compressMotion(); 209 209 #endif 210 210 211 Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B'); 211 212 if (!pcSlice->isReferenced()) c += 32; 212 213 213 214 //-- For time output for each slice 215 214 216 #if H_MV 215 217 printf("\nLayer %2d POC %4d TId: %1d ( %c-SLICE, QP%3d ) ", pcSlice->getLayerId(), -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecSlice.h
r362 r438 84 84 Void initCtxMem( UInt i ); 85 85 Void setCtxMem( TDecSbac* sb, Int b ) { CTXMem[b] = sb; } 86 Int getCtxMemSize( ) { return (Int)CTXMem.size(); }87 86 }; 88 87 -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecTop.cpp
r401 r438 42 42 ParameterSetManagerDecoder TDecTop::m_parameterSetManagerDecoder; 43 43 #endif 44 44 45 //! \ingroup TLibDecoder 45 46 //! \{ … … 50 51 m_iMaxRefPicNum = 0; 51 52 #if ENC_DEC_TRACE 52 #if H_MV53 if ( g_hTrace == NULL )54 {55 #endif56 53 g_hTrace = fopen( "TraceDec.txt", "wb" ); 57 54 g_bJustDoIt = g_bEncDecTraceDisable; 58 55 g_nSymbolCounter = 0; 59 #if H_MV60 }61 #endif62 56 #endif 63 57 m_pocCRA = 0; … … 100 94 } 101 95 96 102 97 Void TDecTop::init() 103 98 { … … 106 101 initROM(); 107 102 #endif 103 108 104 m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO); 109 105 m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder ); … … 153 149 } 154 150 155 #if L0323_DPB156 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()); // m_uiMaxDecPicBuffering has the space for the picture currently being decoded157 #else158 151 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded 159 #endif160 152 if (m_cListPic.size() < (UInt)m_iMaxRefPicNum) 161 153 { … … 227 219 rpcListPic = &m_cListPic; 228 220 m_cCuDecoder.destroy(); 221 229 222 #if H_MV 230 223 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 231 224 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); 232 225 #endif 226 233 227 m_bFirstSliceInPicture = true; 234 228 … … 296 290 assert (sps != 0); 297 291 298 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot-> isIRAP()))292 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->getIdrPicFlag())) 299 293 { 300 294 printf ("Parameter set activation failed!"); … … 302 296 } 303 297 304 if( pps->getDependentSliceSegmentsEnabledFlag() )305 {306 Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1;307 308 if (m_cSliceDecoder.getCtxMemSize() != NumCtx)309 {310 m_cSliceDecoder.initCtxMem(NumCtx);311 for ( UInt st = 0; st < NumCtx; st++ )312 {313 TDecSbac* ctx = NULL;314 ctx = new TDecSbac;315 ctx->init( &m_cBinCABAC );316 m_cSliceDecoder.setCtxMem( ctx, st );317 }318 }319 }320 321 298 m_apcSlicePilot->setPPS(pps); 322 299 m_apcSlicePilot->setSPS(sps); 300 323 301 #if H_MV 324 302 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() ); 325 303 #endif 304 326 305 pps->setSPS(sps); 327 306 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1); 328 307 pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) ); 329 308 330 g_bitDepthY = sps->getBitDepthY(); 331 g_bitDepthC = sps->getBitDepthC(); 332 g_uiMaxCUWidth = sps->getMaxCUWidth(); 333 g_uiMaxCUHeight = sps->getMaxCUHeight(); 334 g_uiMaxCUDepth = sps->getMaxCUDepth(); 335 g_uiAddCUDepth = max (0, sps->getLog2MinCodingBlockSize() - (Int)sps->getQuadtreeTULog2MinSize() ); 336 337 for (Int i = 0; i < sps->getLog2DiffMaxMinCodingBlockSize(); i++) 309 for (Int i = 0; i < sps->getMaxCUDepth() - g_uiAddCUDepth; i++) 338 310 { 339 311 sps->setAMPAcc( i, sps->getUseAMP() ); 340 312 } 341 313 342 for (Int i = sps->get Log2DiffMaxMinCodingBlockSize(); i < sps->getMaxCUDepth(); i++)314 for (Int i = sps->getMaxCUDepth() - g_uiAddCUDepth; i < sps->getMaxCUDepth(); i++) 343 315 { 344 316 sps->setAMPAcc( i, 0 ); … … 346 318 347 319 m_cSAO.destroy(); 348 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight());349 m_cLoopFilter. create( sps->getMaxCUDepth());320 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight ); 321 m_cLoopFilter. create( g_uiMaxCUDepth ); 350 322 } 351 323 … … 373 345 374 346 m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType); 375 Bool nonReferenceFlag = (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N || 376 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N || 377 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N || 378 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N || 379 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N); 380 m_apcSlicePilot->setTemporalLayerNonReferenceFlag(nonReferenceFlag); 381 347 if((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N) || 348 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N) || 349 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N)) 350 { 351 m_apcSlicePilot->setTemporalLayerNonReferenceFlag(true); 352 } 382 353 m_apcSlicePilot->setReferenced(true); // Putting this as true ensures that picture is referenced the first time it is in an RPS 383 354 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId); … … 386 357 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 387 358 #endif 359 388 360 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); 389 361 … … 399 371 #endif 400 372 #endif 373 374 if (m_apcSlicePilot->isNextSlice()) 375 { 401 376 // Skip pictures due to random access 402 377 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) … … 409 384 return false; 410 385 } 411 412 //we should only get a different poc for a new picture (with CTU address==0) 413 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && (!m_apcSlicePilot->getSliceCurStartCUAddr()==0)) 414 { 415 printf ("Warning, the first slice of a picture might have been lost!\n"); 416 } 386 } 387 417 388 // exit when a new picture is found 418 if (m_apcSlicePilot->isNextSlice() && (m_apcSlicePilot->getSliceCurStartCUAddr() == 0 && !m_bFirstSliceInPicture) && !m_bFirstSliceInSequence)389 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence) 419 390 { 420 391 if (m_prevPOC >= m_pocRandomAccess) … … 425 396 m_prevPOC = m_apcSlicePilot->getPOC(); 426 397 } 398 427 399 #if H_MV 428 400 if ( newLayerFlag ) … … 431 403 } 432 404 #endif 405 406 433 407 // actual decoding starts here 434 408 xActivateParameterSets(); … … 445 419 xCreateLostPicture(lostPoc-1); 446 420 } 421 447 422 if (m_bFirstSliceInPicture) 448 423 { … … 450 425 m_cPrediction.initTempBuff(); 451 426 m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); 427 452 428 #if H_MV 453 429 m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer ); 454 430 #endif 431 432 455 433 // Get a new picture buffer 456 434 xGetNewPicBuffer (m_apcSlicePilot, pcPic); … … 591 569 #endif 592 570 #endif 571 593 572 if (bNextSlice) 594 573 { 595 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA , m_cListPic);574 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA ); 596 575 // Set reference list 576 597 577 #if H_MV 598 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true ); 599 #else 600 #if FIX1071 601 pcSlice->setRefPicList( m_cListPic, true ); 578 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer ); 602 579 #else 603 580 pcSlice->setRefPicList( m_cListPic ); 604 581 #endif 605 582 606 #endif607 583 // For generalized B 608 584 // note: maybe not existed case (always L0 is copied to L1 if L1 is empty) … … 646 622 //--------------- 647 623 pcSlice->setRefPOCList(); 648 #if !L0034_COMBINED_LIST_CLEANUP649 624 pcSlice->setNoBackPredFlag( false ); 650 625 if ( pcSlice->getSliceType() == B_SLICE ) … … 663 638 } 664 639 } 665 #endif666 640 } 667 641 … … 717 691 m_cEntropyDecoder.decodePPS( pps ); 718 692 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); 693 694 if( pps->getDependentSliceSegmentsEnabledFlag() ) 695 { 696 Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1; 697 m_cSliceDecoder.initCtxMem(NumCtx); 698 for ( UInt st = 0; st < NumCtx; st++ ) 699 { 700 TDecSbac* ctx = NULL; 701 ctx = new TDecSbac; 702 ctx->init( &m_cBinCABAC ); 703 m_cSliceDecoder.setCtxMem( ctx, st ); 704 } 705 } 719 706 } 720 707 721 708 Void TDecTop::xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ) 722 709 { 723 if(nalUnitType == NAL_UNIT_S UFFIX_SEI)710 if(nalUnitType == NAL_UNIT_SEI_SUFFIX) 724 711 { 725 712 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); … … 766 753 return false; 767 754 768 case NAL_UNIT_ PREFIX_SEI:769 case NAL_UNIT_S UFFIX_SEI:755 case NAL_UNIT_SEI: 756 case NAL_UNIT_SEI_SUFFIX: 770 757 xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType ); 771 758 return false; … … 773 760 case NAL_UNIT_CODED_SLICE_TRAIL_R: 774 761 case NAL_UNIT_CODED_SLICE_TRAIL_N: 775 case NAL_UNIT_CODED_SLICE_TLA _R:762 case NAL_UNIT_CODED_SLICE_TLA: 776 763 case NAL_UNIT_CODED_SLICE_TSA_N: 777 764 case NAL_UNIT_CODED_SLICE_STSA_R: 778 765 case NAL_UNIT_CODED_SLICE_STSA_N: 779 case NAL_UNIT_CODED_SLICE_BLA _W_LP:780 case NAL_UNIT_CODED_SLICE_BLA _W_RADL:766 case NAL_UNIT_CODED_SLICE_BLA: 767 case NAL_UNIT_CODED_SLICE_BLANT: 781 768 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 782 case NAL_UNIT_CODED_SLICE_IDR _W_RADL:769 case NAL_UNIT_CODED_SLICE_IDR: 783 770 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 784 771 case NAL_UNIT_CODED_SLICE_CRA: 785 772 case NAL_UNIT_CODED_SLICE_RADL_N: 786 case NAL_UNIT_CODED_SLICE_ RADL_R:773 case NAL_UNIT_CODED_SLICE_DLP: 787 774 case NAL_UNIT_CODED_SLICE_RASL_N: 788 case NAL_UNIT_CODED_SLICE_ RASL_R:775 case NAL_UNIT_CODED_SLICE_TFD: 789 776 #if H_MV 790 777 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag); … … 808 795 Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay) 809 796 { 810 if (m_prevRAPisBLA && m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_ RASL_R|| m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))797 if (m_prevRAPisBLA && m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TFD || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 811 798 { 812 799 iPOCLastDisplay++; … … 839 826 { 840 827 if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA 841 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_LP828 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 842 829 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 843 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA _W_RADL)830 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT ) 844 831 { 845 832 // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT. 846 833 m_pocRandomAccess = m_apcSlicePilot->getPOC(); 847 834 } 848 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR _W_RADL|| m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )835 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 849 836 { 850 837 m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable. … … 862 849 } 863 850 // skip the reordered pictures, if necessary 864 else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_ RASL_R|| m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))851 else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TFD || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 865 852 { 866 853 iPOCLastDisplay++; … … 894 881 895 882 #endif 883 896 884 //! \} -
branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecTop.h
r368 r438 64 64 class TAppDecTop; 65 65 #endif 66 66 67 /// decoder class 67 68 class TDecTop … … 80 81 ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets 81 82 #endif 83 82 84 TComSlice* m_apcSlicePilot; 83 85 … … 140 142 #endif 141 143 144 142 145 #if H_MV 143 146 TComPic* getPic ( Int poc ); … … 155 158 #endif 156 159 #endif 160 157 161 protected: 158 162 Void xGetNewPicBuffer (TComSlice* pcSlice, TComPic*& rpcPic); -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r362 r438 84 84 fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n"); 85 85 break; 86 #if J0149_TONE_MAPPING_SEI87 case SEI::TONE_MAPPING_INFO:88 fprintf( g_hTrace, "=========== Tone Mapping Info SEI message ===========\n");89 break;90 #endif91 #if L0208_SOP_DESCRIPTION_SEI92 case SEI::SOP_DESCRIPTION:93 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");94 break;95 #endif96 #if K0180_SCALABLE_NESTING_SEI97 case SEI::SCALABLE_NESTING:98 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");99 break;100 #endif101 86 default: 102 87 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 106 91 #endif 107 92 108 #if K0180_SCALABLE_NESTING_SEI109 void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps)110 #else111 93 void SEIWriter::xWriteSEIpayloadData(const SEI& sei, TComSPS *sps) 112 #endif113 94 { 114 95 switch (sei.payloadType()) … … 147 128 xWriteSEIGradualDecodingRefreshInfo(*static_cast<const SEIGradualDecodingRefreshInfo*>(&sei)); 148 129 break; 149 #if J0149_TONE_MAPPING_SEI150 case SEI::TONE_MAPPING_INFO:151 xWriteSEIToneMappingInfo(*static_cast<const SEIToneMappingInfo*>(&sei));152 break;153 #endif154 #if L0208_SOP_DESCRIPTION_SEI155 case SEI::SOP_DESCRIPTION:156 xWriteSEISOPDescription(*static_cast<const SEISOPDescription*>(&sei));157 break;158 #endif159 #if K0180_SCALABLE_NESTING_SEI160 case SEI::SCALABLE_NESTING:161 xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps);162 break;163 #endif164 130 default: 165 131 assert(!"Unhandled SEI message"); … … 179 145 setBitstream(&bs_count); 180 146 181 182 #if K0180_SCALABLE_NESTING_SEI183 184 #if ENC_DEC_TRACE185 Bool traceEnable = g_HLSTraceEnable;186 g_HLSTraceEnable = false;187 #endif188 xWriteSEIpayloadData(bs_count, sei, sps);189 #if ENC_DEC_TRACE190 g_HLSTraceEnable = traceEnable;191 #endif192 193 #else194 195 147 #if ENC_DEC_TRACE 196 148 g_HLSTraceEnable = false; … … 200 152 g_HLSTraceEnable = true; 201 153 #endif 202 203 #endif204 205 154 UInt payload_data_num_bits = bs_count.getNumberOfWrittenBits(); 206 155 assert(0 == payload_data_num_bits % 8); … … 209 158 210 159 #if ENC_DEC_TRACE 211 #if K0180_SCALABLE_NESTING_SEI212 if (g_HLSTraceEnable)213 #endif214 160 xTraceSEIHeader(); 215 161 #endif … … 231 177 /* payloadData */ 232 178 #if ENC_DEC_TRACE 233 #if K0180_SCALABLE_NESTING_SEI234 if (g_HLSTraceEnable)235 #endif236 179 xTraceSEIMessageType(sei.payloadType()); 237 180 #endif 238 181 239 #if K0180_SCALABLE_NESTING_SEI240 xWriteSEIpayloadData(bs, sei, sps);241 #else242 182 xWriteSEIpayloadData(sei, sps); 243 #endif244 183 } 245 184 … … 482 421 xWriteByteAlign(); 483 422 } 484 485 #if J0149_TONE_MAPPING_SEI486 Void SEIWriter::xWriteSEIToneMappingInfo(const SEIToneMappingInfo& sei)487 {488 Int i;489 WRITE_UVLC( sei.m_toneMapId, "tone_map_id" );490 WRITE_FLAG( sei.m_toneMapCancelFlag, "tone_map_cancel_flag" );491 if( !sei.m_toneMapCancelFlag )492 {493 WRITE_FLAG( sei.m_toneMapPersistenceFlag, "tone_map_persistence_flag" );494 WRITE_CODE( sei.m_codedDataBitDepth, 8, "coded_data_bit_depth" );495 WRITE_CODE( sei.m_targetBitDepth, 8, "target_bit_depth" );496 WRITE_UVLC( sei.m_modelId, "model_id" );497 switch(sei.m_modelId)498 {499 case 0:500 {501 WRITE_CODE( sei.m_minValue, 32, "min_value" );502 WRITE_CODE( sei.m_maxValue, 32, "max_value" );503 break;504 }505 case 1:506 {507 WRITE_CODE( sei.m_sigmoidMidpoint, 32, "sigmoid_midpoint" );508 WRITE_CODE( sei.m_sigmoidWidth, 32, "sigmoid_width" );509 break;510 }511 case 2:512 {513 UInt num = 1u << sei.m_targetBitDepth;514 for(i = 0; i < num; i++)515 {516 WRITE_CODE( sei.m_startOfCodedInterval[i], (( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3, "start_of_coded_interval" );517 }518 break;519 }520 case 3:521 {522 WRITE_CODE( sei.m_numPivots, 16, "num_pivots" );523 for(i = 0; i < sei.m_numPivots; i++ )524 {525 WRITE_CODE( sei.m_codedPivotValue[i], (( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3, "coded_pivot_value" );526 WRITE_CODE( sei.m_targetPivotValue[i], (( sei.m_targetBitDepth + 7 ) >> 3 ) << 3, "target_pivot_value");527 }528 break;529 }530 case 4:531 {532 WRITE_CODE( sei.m_cameraIsoSpeedIdc, 8, "camera_iso_speed_idc" );533 if( sei.m_cameraIsoSpeedIdc == 255) //Extended_ISO534 {535 WRITE_CODE( sei.m_cameraIsoSpeedValue, 32, "camera_iso_speed_value" );536 }537 WRITE_FLAG( sei.m_exposureCompensationValueSignFlag, "exposure_compensation_value_sign_flag" );538 WRITE_CODE( sei.m_exposureCompensationValueNumerator, 16, "exposure_compensation_value_numerator" );539 WRITE_CODE( sei.m_exposureCompensationValueDenomIdc, 16, "exposure_compensation_value_denom_idc" );540 WRITE_CODE( sei.m_refScreenLuminanceWhite, 32, "ref_screen_luminance_white" );541 WRITE_CODE( sei.m_extendedRangeWhiteLevel, 32, "extended_range_white_level" );542 WRITE_CODE( sei.m_nominalBlackLevelLumaCodeValue, 16, "nominal_black_level_luma_code_value" );543 WRITE_CODE( sei.m_nominalWhiteLevelLumaCodeValue, 16, "nominal_white_level_luma_code_value" );544 WRITE_CODE( sei.m_extendedWhiteLevelLumaCodeValue, 16, "extended_white_level_luma_code_value" );545 break;546 }547 default:548 {549 assert(!"Undefined SEIToneMapModelId");550 break;551 }552 }//switch m_modelId553 }//if(!sei.m_toneMapCancelFlag)554 555 xWriteByteAlign();556 }557 #endif558 559 423 Void SEIWriter::xWriteSEIDisplayOrientation(const SEIDisplayOrientation &sei) 560 424 { … … 591 455 } 592 456 593 #if L0208_SOP_DESCRIPTION_SEI594 Void SEIWriter::xWriteSEISOPDescription(const SEISOPDescription& sei)595 {596 WRITE_UVLC( sei.m_sopSeqParameterSetId, "sop_seq_parameter_set_id" );597 WRITE_UVLC( sei.m_numPicsInSopMinus1, "num_pics_in_sop_minus1" );598 for (UInt i = 0; i <= sei.m_numPicsInSopMinus1; i++)599 {600 WRITE_CODE( sei.m_sopDescVclNaluType[i], 6, "sop_desc_vcl_nalu_type" );601 WRITE_CODE( sei.m_sopDescTemporalId[i], 3, "sop_desc_temporal_id" );602 if (sei.m_sopDescVclNaluType[i] != NAL_UNIT_CODED_SLICE_IDR_W_RADL && sei.m_sopDescVclNaluType[i] != NAL_UNIT_CODED_SLICE_IDR_N_LP)603 {604 WRITE_UVLC( sei.m_sopDescStRpsIdx[i], "sop_desc_st_rps_idx" );605 }606 if (i > 0)607 {608 WRITE_SVLC( sei.m_sopDescPocDelta[i], "sop_desc_poc_delta" );609 }610 }611 612 xWriteByteAlign();613 }614 #endif615 616 #if K0180_SCALABLE_NESTING_SEI617 Void SEIWriter::xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps)618 {619 WRITE_FLAG( sei.m_bitStreamSubsetFlag, "bitstream_subset_flag" );620 WRITE_FLAG( sei.m_nestingOpFlag, "nesting_op_flag " );621 if (sei.m_nestingOpFlag)622 {623 WRITE_FLAG( sei.m_defaultOpFlag, "default_op_flag" );624 WRITE_UVLC( sei.m_nestingNumOpsMinus1, "nesting_num_ops" );625 for (UInt i = (sei.m_defaultOpFlag ? 1 : 0); i <= sei.m_nestingNumOpsMinus1; i++)626 {627 WRITE_CODE( sei.m_nestingNoOpMaxTemporalIdPlus1, 3, "nesting_no_op_max_temporal_id" );628 WRITE_CODE( sei.m_nestingMaxTemporalIdPlus1[i], 3, "nesting_max_temporal_id" );629 WRITE_UVLC( sei.m_nestingOpIdx[i], "nesting_op_idx" );630 }631 }632 else633 {634 WRITE_FLAG( sei.m_allLayersFlag, "all_layers_flag" );635 if (!sei.m_allLayersFlag)636 {637 WRITE_CODE( sei.m_nestingNoOpMaxTemporalIdPlus1, 3, "nesting_no_op_max_temporal_id" );638 WRITE_UVLC( sei.m_nestingNumLayersMinus1, "nesting_num_layers" );639 for (UInt i = 0; i <= sei.m_nestingNumLayersMinus1; i++)640 {641 WRITE_CODE( sei.m_nestingLayerId[i], 6, "nesting_layer_id" );642 }643 }644 }645 646 // byte alignment647 while ( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0 )648 {649 WRITE_FLAG( 0, "nesting_zero_bit" );650 }651 652 // write nested SEI messages653 for (SEIMessages::const_iterator it = sei.m_nestedSEIs.begin(); it != sei.m_nestedSEIs.end(); it++)654 {655 writeSEImessage(bs, *(*it), sps);656 }657 }658 #endif659 660 457 Void SEIWriter::xWriteByteAlign() 661 458 { -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/SEIwrite.h
r362 r438 50 50 51 51 protected: 52 #if K0180_SCALABLE_NESTING_SEI53 Void xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps);54 #else55 52 Void xWriteSEIpayloadData(const SEI& sei, TComSPS *sps); 56 #endif57 53 Void xWriteSEIuserDataUnregistered(const SEIuserDataUnregistered &sei); 58 54 Void xWriteSEIActiveParameterSets(const SEIActiveParameterSets& sei); … … 67 63 Void xWriteSEITemporalLevel0Index(const SEITemporalLevel0Index &sei); 68 64 Void xWriteSEIGradualDecodingRefreshInfo(const SEIGradualDecodingRefreshInfo &sei); 69 #if J0149_TONE_MAPPING_SEI70 Void xWriteSEIToneMappingInfo(const SEIToneMappingInfo& sei);71 #endif72 #if L0208_SOP_DESCRIPTION_SEI73 Void xWriteSEISOPDescription(const SEISOPDescription& sei);74 #endif75 #if K0180_SCALABLE_NESTING_SEI76 Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps);77 #endif78 65 Void xWriteByteAlign(); 79 66 }; -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
r401 r438 185 185 { 186 186 { 187 #if !H_MV188 187 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 189 188 DTRACE_CABAC_T( "\tstate=" ) … … 192 191 DTRACE_CABAC_V( binValue ) 193 192 DTRACE_CABAC_T( "\n" ) 194 #endif195 193 } 196 194 m_uiBinsCoded += m_binCountIncrement; … … 233 231 { 234 232 { 235 #if !H_MV236 233 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 237 234 DTRACE_CABAC_T( "\tEPsymbol=" ) 238 235 DTRACE_CABAC_V( binValue ) 239 236 DTRACE_CABAC_T( "\n" ) 240 #endif241 237 } 242 238 m_uiBinsCoded += m_binCountIncrement; … … 263 259 for ( Int i = 0; i < numBins; i++ ) 264 260 { 265 #if !H_MV266 261 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 267 262 DTRACE_CABAC_T( "\tEPsymbol=" ) 268 263 DTRACE_CABAC_V( ( binValues >> ( numBins - 1 - i ) ) & 1 ) 269 264 DTRACE_CABAC_T( "\n" ) 270 #endif271 265 } 272 266 -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r401 r438 285 285 WRITE_FLAG(pcVUI->getNeutralChromaIndicationFlag(), "neutral_chroma_indication_flag"); 286 286 WRITE_FLAG(pcVUI->getFieldSeqFlag(), "field_seq_flag"); 287 assert(pcVUI->getFieldSeqFlag() == 0); // not currently supported 287 288 WRITE_FLAG(pcVUI->getFrameFieldInfoPresentFlag(), "frame_field_info_present_flag"); 288 289 … … 473 474 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 474 475 { 475 #if L0323_DPB476 WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i) - 1, "sps_max_dec_pic_buffering_minus1[i]" );477 #else478 476 WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i), "sps_max_dec_pic_buffering[i]" ); 479 #endif480 477 WRITE_UVLC( pcSPS->getNumReorderPics(i), "sps_num_reorder_pics[i]" ); 481 478 WRITE_UVLC( pcSPS->getMaxLatencyIncrease(i), "sps_max_latency_increase[i]" ); … … 487 484 assert( pcSPS->getMaxCUWidth() == pcSPS->getMaxCUHeight() ); 488 485 489 WRITE_UVLC( pcSPS->getLog2MinCodingBlockSize() - 3, "log2_min_coding_block_size_minus3" ); 490 WRITE_UVLC( pcSPS->getLog2DiffMaxMinCodingBlockSize(), "log2_diff_max_min_coding_block_size" ); 486 UInt MinCUSize = pcSPS->getMaxCUWidth() >> ( pcSPS->getMaxCUDepth()-g_uiAddCUDepth ); 487 UInt log2MinCUSize = 0; 488 while(MinCUSize > 1) 489 { 490 MinCUSize >>= 1; 491 log2MinCUSize++; 492 } 493 494 WRITE_UVLC( log2MinCUSize - 3, "log2_min_coding_block_size_minus3" ); 495 WRITE_UVLC( pcSPS->getMaxCUDepth()-g_uiAddCUDepth, "log2_diff_max_min_coding_block_size" ); 491 496 WRITE_UVLC( pcSPS->getQuadtreeTULog2MinSize() - 2, "log2_min_transform_block_size_minus2" ); 492 497 WRITE_UVLC( pcSPS->getQuadtreeTULog2MaxSize() - pcSPS->getQuadtreeTULog2MinSize(), "log2_diff_max_min_transform_block_size" ); … … 549 554 } 550 555 551 #if H_MV552 WRITE_FLAG( 1, "sps_extension_flag" );553 554 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" );555 #else556 556 WRITE_FLAG( 0, "sps_extension_flag" ); 557 #endif558 557 } 559 558 … … 570 569 WRITE_FLAG( pcVPS->getTemporalNestingFlag(), "vps_temporal_id_nesting_flag" ); 571 570 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 572 #if H_MV573 571 WRITE_CODE( 0xffff, 16, "vps_extension_offset" ); 574 #else575 WRITE_CODE( 0xffff, 16, "vps_reserved_ffff_16bits" );576 #endif577 572 codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 ); 578 573 #if SIGNAL_BITRATE_PICRATE_IN_VPS … … 583 578 for(UInt i=0; i <= pcVPS->getMaxTLayers()-1; i++) 584 579 { 585 #if L0323_DPB586 WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i) - 1, "vps_max_dec_pic_buffering_minus1[i]" );587 #else588 580 WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i), "vps_max_dec_pic_buffering[i]" ); 589 #endif590 581 WRITE_UVLC( pcVPS->getNumReorderPics(i), "vps_num_reorder_pics[i]" ); 591 582 WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i), "vps_max_latency_increase[i]" ); … … 654 645 } 655 646 #endif 647 656 648 #if H_MV 657 649 WRITE_FLAG( 1, "vps_extension_flag" ); … … 792 784 WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb"); 793 785 TComReferencePictureSet* rps = pcSlice->getRPS(); 794 795 #if FIX1071796 // Deal with bitstream restriction stating that:797 // – If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0.798 // Ideally this process should not be repeated for each slice in a picture799 TComReferencePictureSet altRps;800 Bool useAltRps = false;801 #if H_MV802 if (pcSlice->getRapPicFlag() && ( pcSlice->getLayerId() == 0 ) )803 #else804 if (pcSlice->getRapPicFlag())805 #endif806 {807 for (Int picIdx = 0; !useAltRps && picIdx < rps->getNumberOfPictures(); picIdx++)808 {809 useAltRps = rps->getUsed(picIdx);810 }811 if (useAltRps)812 {813 memcpy(&altRps, rps, sizeof(TComReferencePictureSet));814 rps = &altRps;815 for (Int picIdx = 0; picIdx < rps->getNumberOfPictures(); picIdx++)816 {817 rps->setUsed(picIdx, false);818 }819 }820 }821 822 if(pcSlice->getRPSidx() < 0 || useAltRps)823 #else824 786 if(pcSlice->getRPSidx() < 0) 825 #endif826 787 { 827 788 WRITE_FLAG( 0, "short_term_ref_pic_set_sps_flag"); … … 1406 1367 // ==================================================================================================================== 1407 1368 1369 1370 /** Write PCM alignment bits. 1371 * \returns Void 1372 */ 1373 Void TEncCavlc::xWritePCMAlignZero () 1374 { 1375 m_pcBitIf->writeAlignZero(); 1376 } 1377 1378 Void TEncCavlc::xWriteUnaryMaxSymbol( UInt uiSymbol, UInt uiMaxSymbol ) 1379 { 1380 if (uiMaxSymbol == 0) 1381 { 1382 return; 1383 } 1384 xWriteFlag( uiSymbol ? 1 : 0 ); 1385 if ( uiSymbol == 0 ) 1386 { 1387 return; 1388 } 1389 1390 Bool bCodeLast = ( uiMaxSymbol > uiSymbol ); 1391 1392 while( --uiSymbol ) 1393 { 1394 xWriteFlag( 1 ); 1395 } 1396 if( bCodeLast ) 1397 { 1398 xWriteFlag( 0 ); 1399 } 1400 return; 1401 } 1402 1403 Void TEncCavlc::xWriteExGolombLevel( UInt uiSymbol ) 1404 { 1405 if( uiSymbol ) 1406 { 1407 xWriteFlag( 1 ); 1408 UInt uiCount = 0; 1409 Bool bNoExGo = (uiSymbol < 13); 1410 1411 while( --uiSymbol && ++uiCount < 13 ) 1412 { 1413 xWriteFlag( 1 ); 1414 } 1415 if( bNoExGo ) 1416 { 1417 xWriteFlag( 0 ); 1418 } 1419 else 1420 { 1421 xWriteEpExGolomb( uiSymbol, 0 ); 1422 } 1423 } 1424 else 1425 { 1426 xWriteFlag( 0 ); 1427 } 1428 return; 1429 } 1430 1431 Void TEncCavlc::xWriteEpExGolomb( UInt uiSymbol, UInt uiCount ) 1432 { 1433 while( uiSymbol >= (UInt)(1<<uiCount) ) 1434 { 1435 xWriteFlag( 1 ); 1436 uiSymbol -= 1<<uiCount; 1437 uiCount ++; 1438 } 1439 xWriteFlag( 0 ); 1440 while( uiCount-- ) 1441 { 1442 xWriteFlag( (uiSymbol>>uiCount) & 1 ); 1443 } 1444 return; 1445 } 1446 1408 1447 /** code explicit wp tables 1409 1448 * \param TComSlice* pcSlice -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncCavlc.h
r362 r438 68 68 TComSlice* m_pcSlice; 69 69 UInt m_uiCoeffCost; 70 71 Void xWritePCMAlignZero (); 72 Void xWriteEpExGolomb ( UInt uiSymbol, UInt uiCount ); 73 Void xWriteExGolombLevel ( UInt uiSymbol ); 74 Void xWriteUnaryMaxSymbol ( UInt uiSymbol, UInt uiMaxSymbol ); 70 75 71 76 Void codeShortTermRefPicSet ( TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Bool calledFromSliceHeader, Int idx ); -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncCfg.h
r372 r438 74 74 Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 75 75 #endif 76 76 77 GOPEntry() 77 78 : m_POC(-1) … … 171 172 Int m_loopFilterTcOffsetDiv2; 172 173 Bool m_DeblockingFilterControlPresent; 173 #if L0386_DB_METRIC174 Bool m_DeblockingFilterMetric;175 #endif176 174 Bool m_bUseSAO; 177 175 Int m_maxNumOffsetsPerPic; … … 204 202 Bool m_bUseASR; 205 203 Bool m_bUseHADME; 206 #if !L0034_COMBINED_LIST_CLEANUP207 204 Bool m_bUseLComb; 208 #endif209 205 Bool m_useRDOQ; 210 206 Bool m_useRDOQTS; … … 252 248 Int m_pictureTimingSEIEnabled; 253 249 Int m_recoveryPointSEIEnabled; 254 #if J0149_TONE_MAPPING_SEI255 Bool m_toneMappingInfoSEIEnabled;256 Int m_toneMapId;257 Bool m_toneMapCancelFlag;258 Bool m_toneMapPersistenceFlag;259 Int m_codedDataBitDepth;260 Int m_targetBitDepth;261 Int m_modelId;262 Int m_minValue;263 Int m_maxValue;264 Int m_sigmoidMidpoint;265 Int m_sigmoidWidth;266 Int m_numPivots;267 Int m_cameraIsoSpeedIdc;268 Int m_cameraIsoSpeedValue;269 Int m_exposureCompensationValueSignFlag;270 Int m_exposureCompensationValueNumerator;271 Int m_exposureCompensationValueDenomIdc;272 Int m_refScreenLuminanceWhite;273 Int m_extendedRangeWhiteLevel;274 Int m_nominalBlackLevelLumaCodeValue;275 Int m_nominalWhiteLevelLumaCodeValue;276 Int m_extendedWhiteLevelLumaCodeValue;277 Int* m_startOfCodedInterval;278 Int* m_codedPivotValue;279 Int* m_targetPivotValue;280 #endif281 250 Int m_framePackingSEIEnabled; 282 251 Int m_framePackingSEIType; … … 288 257 Int m_gradualDecodingRefreshInfoEnabled; 289 258 Int m_decodingUnitInfoSEIEnabled; 290 #if L0208_SOP_DESCRIPTION_SEI291 Int m_SOPDescriptionSEIEnabled;292 #endif293 #if K0180_SCALABLE_NESTING_SEI294 Int m_scalableNestingSEIEnabled;295 #endif296 259 //====== Weighted Prediction ======== 297 260 Bool m_useWeightedPred; //< Use of Weighting Prediction (P_SLICE) … … 362 325 #endif 363 326 #endif 327 364 328 public: 365 329 TEncCfg() … … 407 371 #endif 408 372 #endif 373 409 374 //====== Coding Structure ======== 410 375 Void setIntraPeriod ( Int i ) { m_uiIntraPeriod = (UInt)i; } … … 444 409 Void setLoopFilterTcOffset ( Int i ) { m_loopFilterTcOffsetDiv2 = i; } 445 410 Void setDeblockingFilterControlPresent ( Bool b ) { m_DeblockingFilterControlPresent = b; } 446 #if L0386_DB_METRIC447 Void setDeblockingFilterMetric ( Bool b ) { m_DeblockingFilterMetric = b; }448 #endif449 411 450 412 //====== Motion search ======== … … 501 463 Int getLoopFilterTcOffset () { return m_loopFilterTcOffsetDiv2; } 502 464 Bool getDeblockingFilterControlPresent() { return m_DeblockingFilterControlPresent; } 503 #if L0386_DB_METRIC504 Bool getDeblockingFilterMetric () { return m_DeblockingFilterMetric; }505 #endif506 465 507 466 //==== Motion search ======== … … 521 480 Void setUseASR ( Bool b ) { m_bUseASR = b; } 522 481 Void setUseHADME ( Bool b ) { m_bUseHADME = b; } 523 #if !L0034_COMBINED_LIST_CLEANUP524 482 Void setUseLComb ( Bool b ) { m_bUseLComb = b; } 525 #endif526 483 Void setUseRDOQ ( Bool b ) { m_useRDOQ = b; } 527 484 Void setUseRDOQTS ( Bool b ) { m_useRDOQTS = b; } … … 545 502 Bool getUseASR () { return m_bUseASR; } 546 503 Bool getUseHADME () { return m_bUseHADME; } 547 #if !L0034_COMBINED_LIST_CLEANUP548 504 Bool getUseLComb () { return m_bUseLComb; } 549 #endif550 505 Bool getUseRDOQ () { return m_useRDOQ; } 551 506 Bool getUseRDOQTS () { return m_useRDOQTS; } … … 644 599 Void setRecoveryPointSEIEnabled(Int b) { m_recoveryPointSEIEnabled = b; } 645 600 Int getRecoveryPointSEIEnabled() { return m_recoveryPointSEIEnabled; } 646 #if J0149_TONE_MAPPING_SEI647 Void setToneMappingInfoSEIEnabled(Bool b) { m_toneMappingInfoSEIEnabled = b; }648 Bool getToneMappingInfoSEIEnabled() { return m_toneMappingInfoSEIEnabled; }649 Void setTMISEIToneMapId(Int b) { m_toneMapId = b; }650 Int getTMISEIToneMapId() { return m_toneMapId; }651 Void setTMISEIToneMapCancelFlag(Bool b) { m_toneMapCancelFlag=b; }652 Bool getTMISEIToneMapCancelFlag() { return m_toneMapCancelFlag; }653 Void setTMISEIToneMapPersistenceFlag(Bool b) { m_toneMapPersistenceFlag = b; }654 Bool getTMISEIToneMapPersistenceFlag() { return m_toneMapPersistenceFlag; }655 Void setTMISEICodedDataBitDepth(Int b) { m_codedDataBitDepth = b; }656 Int getTMISEICodedDataBitDepth() { return m_codedDataBitDepth; }657 Void setTMISEITargetBitDepth(Int b) { m_targetBitDepth = b; }658 Int getTMISEITargetBitDepth() { return m_targetBitDepth; }659 Void setTMISEIModelID(Int b) { m_modelId = b; }660 Int getTMISEIModelID() { return m_modelId; }661 Void setTMISEIMinValue(Int b) { m_minValue = b; }662 Int getTMISEIMinValue() { return m_minValue; }663 Void setTMISEIMaxValue(Int b) { m_maxValue = b; }664 Int getTMISEIMaxValue() { return m_maxValue; }665 Void setTMISEISigmoidMidpoint(Int b) { m_sigmoidMidpoint = b; }666 Int getTMISEISigmoidMidpoint() { return m_sigmoidMidpoint; }667 Void setTMISEISigmoidWidth(Int b) { m_sigmoidWidth = b; }668 Int getTMISEISigmoidWidth() { return m_sigmoidWidth; }669 Void setTMISEIStartOfCodedInterva( Int* p ) { m_startOfCodedInterval = p; }670 Int* getTMISEIStartOfCodedInterva() { return m_startOfCodedInterval; }671 Void setTMISEINumPivots(Int b) { m_numPivots = b; }672 Int getTMISEINumPivots() { return m_numPivots; }673 Void setTMISEICodedPivotValue( Int* p ) { m_codedPivotValue = p; }674 Int* getTMISEICodedPivotValue() { return m_codedPivotValue; }675 Void setTMISEITargetPivotValue( Int* p ) { m_targetPivotValue = p; }676 Int* getTMISEITargetPivotValue() { return m_targetPivotValue; }677 Void setTMISEICameraIsoSpeedIdc(Int b) { m_cameraIsoSpeedIdc = b; }678 Int getTMISEICameraIsoSpeedIdc() { return m_cameraIsoSpeedIdc; }679 Void setTMISEICameraIsoSpeedValue(Int b) { m_cameraIsoSpeedValue = b; }680 Int getTMISEICameraIsoSpeedValue() { return m_cameraIsoSpeedValue; }681 Void setTMISEIExposureCompensationValueSignFlag(Int b) { m_exposureCompensationValueSignFlag = b; }682 Int getTMISEIExposureCompensationValueSignFlag() { return m_exposureCompensationValueSignFlag; }683 Void setTMISEIExposureCompensationValueNumerator(Int b) { m_exposureCompensationValueNumerator = b; }684 Int getTMISEIExposureCompensationValueNumerator() { return m_exposureCompensationValueNumerator; }685 Void setTMISEIExposureCompensationValueDenomIdc(Int b) { m_exposureCompensationValueDenomIdc =b; }686 Int getTMISEIExposureCompensationValueDenomIdc() { return m_exposureCompensationValueDenomIdc; }687 Void setTMISEIRefScreenLuminanceWhite(Int b) { m_refScreenLuminanceWhite = b; }688 Int getTMISEIRefScreenLuminanceWhite() { return m_refScreenLuminanceWhite; }689 Void setTMISEIExtendedRangeWhiteLevel(Int b) { m_extendedRangeWhiteLevel = b; }690 Int getTMISEIExtendedRangeWhiteLevel() { return m_extendedRangeWhiteLevel; }691 Void setTMISEINominalBlackLevelLumaCodeValue(Int b) { m_nominalBlackLevelLumaCodeValue = b; }692 Int getTMISEINominalBlackLevelLumaCodeValue() { return m_nominalBlackLevelLumaCodeValue; }693 Void setTMISEINominalWhiteLevelLumaCodeValue(Int b) { m_nominalWhiteLevelLumaCodeValue = b; }694 Int getTMISEINominalWhiteLevelLumaCodeValue() { return m_nominalWhiteLevelLumaCodeValue; }695 Void setTMISEIExtendedWhiteLevelLumaCodeValue(Int b) { m_extendedWhiteLevelLumaCodeValue =b; }696 Int getTMISEIExtendedWhiteLevelLumaCodeValue() { return m_extendedWhiteLevelLumaCodeValue; }697 #endif698 601 Void setFramePackingArrangementSEIEnabled(Int b) { m_framePackingSEIEnabled = b; } 699 602 Int getFramePackingArrangementSEIEnabled() { return m_framePackingSEIEnabled; } … … 714 617 Void setDecodingUnitInfoSEIEnabled(Int b) { m_decodingUnitInfoSEIEnabled = b; } 715 618 Int getDecodingUnitInfoSEIEnabled() { return m_decodingUnitInfoSEIEnabled; } 716 #if L0208_SOP_DESCRIPTION_SEI717 Void setSOPDescriptionSEIEnabled(Int b) { m_SOPDescriptionSEIEnabled = b; }718 Int getSOPDescriptionSEIEnabled() { return m_SOPDescriptionSEIEnabled; }719 #endif720 #if K0180_SCALABLE_NESTING_SEI721 Void setScalableNestingSEIEnabled(Int b) { m_scalableNestingSEIEnabled = b; }722 Int getScalableNestingSEIEnabled() { return m_scalableNestingSEIEnabled; }723 #endif724 619 Void setUseWP ( Bool b ) { m_useWeightedPred = b; } 725 620 Void setWPBiPred ( Bool b ) { m_useWeightedBiPred = b; } -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncEntropy.cpp
r401 r438 587 587 if( pcCU->isIntra(uiAbsPartIdx) ) 588 588 { 589 #if !H_MV590 589 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 591 590 DTRACE_CABAC_T( "\tdecodeTransformIdx()\tCUDepth=" ) 592 591 DTRACE_CABAC_V( uiDepth ) 593 592 DTRACE_CABAC_T( "\n" ) 594 #endif595 593 } 596 594 else -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r401 r438 96 96 #if L0045_NON_NESTED_SEI_RESTRICTIONS 97 97 xResetNonNestedSEIPresentFlags(); 98 #if K0180_SCALABLE_NESTING_SEI 99 xResetNestedSEIPresentFlags(); 100 #endif 101 #endif 98 #endif 99 102 100 #if H_MV 103 101 m_layerId = 0; … … 108 106 #endif 109 107 #endif 108 110 109 return; 111 110 } … … 212 211 } 213 212 214 #if J0149_TONE_MAPPING_SEI215 SEIToneMappingInfo* TEncGOP::xCreateSEIToneMappingInfo()216 {217 SEIToneMappingInfo *seiToneMappingInfo = new SEIToneMappingInfo();218 seiToneMappingInfo->m_toneMapId = m_pcCfg->getTMISEIToneMapId();219 seiToneMappingInfo->m_toneMapCancelFlag = m_pcCfg->getTMISEIToneMapCancelFlag();220 seiToneMappingInfo->m_toneMapPersistenceFlag = m_pcCfg->getTMISEIToneMapPersistenceFlag();221 222 seiToneMappingInfo->m_codedDataBitDepth = m_pcCfg->getTMISEICodedDataBitDepth();223 assert(seiToneMappingInfo->m_codedDataBitDepth >= 8 && seiToneMappingInfo->m_codedDataBitDepth <= 14);224 seiToneMappingInfo->m_targetBitDepth = m_pcCfg->getTMISEITargetBitDepth();225 assert( (seiToneMappingInfo->m_targetBitDepth >= 1 && seiToneMappingInfo->m_targetBitDepth <= 17) || (seiToneMappingInfo->m_targetBitDepth == 255) );226 seiToneMappingInfo->m_modelId = m_pcCfg->getTMISEIModelID();227 assert(seiToneMappingInfo->m_modelId >=0 &&seiToneMappingInfo->m_modelId<=4);228 229 switch( seiToneMappingInfo->m_modelId)230 {231 case 0:232 {233 seiToneMappingInfo->m_minValue = m_pcCfg->getTMISEIMinValue();234 seiToneMappingInfo->m_maxValue = m_pcCfg->getTMISEIMaxValue();235 break;236 }237 case 1:238 {239 seiToneMappingInfo->m_sigmoidMidpoint = m_pcCfg->getTMISEISigmoidMidpoint();240 seiToneMappingInfo->m_sigmoidWidth = m_pcCfg->getTMISEISigmoidWidth();241 break;242 }243 case 2:244 {245 UInt num = 1u<<(seiToneMappingInfo->m_targetBitDepth);246 seiToneMappingInfo->m_startOfCodedInterval.resize(num);247 Int* ptmp = m_pcCfg->getTMISEIStartOfCodedInterva();248 if(ptmp)249 {250 for(int i=0; i<num;i++)251 {252 seiToneMappingInfo->m_startOfCodedInterval[i] = ptmp[i];253 }254 }255 break;256 }257 case 3:258 {259 seiToneMappingInfo->m_numPivots = m_pcCfg->getTMISEINumPivots();260 seiToneMappingInfo->m_codedPivotValue.resize(seiToneMappingInfo->m_numPivots);261 seiToneMappingInfo->m_targetPivotValue.resize(seiToneMappingInfo->m_numPivots);262 Int* ptmpcoded = m_pcCfg->getTMISEICodedPivotValue();263 Int* ptmptarget = m_pcCfg->getTMISEITargetPivotValue();264 if(ptmpcoded&&ptmptarget)265 {266 for(int i=0; i<(seiToneMappingInfo->m_numPivots);i++)267 {268 seiToneMappingInfo->m_codedPivotValue[i]=ptmpcoded[i];269 seiToneMappingInfo->m_targetPivotValue[i]=ptmptarget[i];270 }271 }272 break;273 }274 case 4:275 {276 seiToneMappingInfo->m_cameraIsoSpeedIdc = m_pcCfg->getTMISEICameraIsoSpeedIdc();277 seiToneMappingInfo->m_cameraIsoSpeedValue = m_pcCfg->getTMISEICameraIsoSpeedValue();278 assert( seiToneMappingInfo->m_cameraIsoSpeedValue !=0 );279 seiToneMappingInfo->m_exposureCompensationValueSignFlag = m_pcCfg->getTMISEIExposureCompensationValueSignFlag();280 seiToneMappingInfo->m_exposureCompensationValueNumerator = m_pcCfg->getTMISEIExposureCompensationValueNumerator();281 seiToneMappingInfo->m_exposureCompensationValueDenomIdc = m_pcCfg->getTMISEIExposureCompensationValueDenomIdc();282 seiToneMappingInfo->m_refScreenLuminanceWhite = m_pcCfg->getTMISEIRefScreenLuminanceWhite();283 seiToneMappingInfo->m_extendedRangeWhiteLevel = m_pcCfg->getTMISEIExtendedRangeWhiteLevel();284 assert( seiToneMappingInfo->m_extendedRangeWhiteLevel >= 100 );285 seiToneMappingInfo->m_nominalBlackLevelLumaCodeValue = m_pcCfg->getTMISEINominalBlackLevelLumaCodeValue();286 seiToneMappingInfo->m_nominalWhiteLevelLumaCodeValue = m_pcCfg->getTMISEINominalWhiteLevelLumaCodeValue();287 assert( seiToneMappingInfo->m_nominalWhiteLevelLumaCodeValue > seiToneMappingInfo->m_nominalBlackLevelLumaCodeValue );288 seiToneMappingInfo->m_extendedWhiteLevelLumaCodeValue = m_pcCfg->getTMISEIExtendedWhiteLevelLumaCodeValue();289 assert( seiToneMappingInfo->m_extendedWhiteLevelLumaCodeValue >= seiToneMappingInfo->m_nominalWhiteLevelLumaCodeValue );290 break;291 }292 default:293 {294 assert(!"Undefined SEIToneMapModelId");295 break;296 }297 }298 return seiToneMappingInfo;299 }300 #endif301 213 Void TEncGOP::xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps) 302 214 { 303 OutputNALUnit nalu(NAL_UNIT_ PREFIX_SEI);215 OutputNALUnit nalu(NAL_UNIT_SEI); 304 216 305 217 if(m_pcCfg->getActiveParameterSetsSEIEnabled()) … … 322 234 SEIFramePacking *sei = xCreateSEIFramePacking (); 323 235 324 nalu = NALUnit(NAL_UNIT_ PREFIX_SEI);236 nalu = NALUnit(NAL_UNIT_SEI); 325 237 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 326 238 m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps); … … 333 245 SEIDisplayOrientation *sei = xCreateSEIDisplayOrientation(); 334 246 335 nalu = NALUnit(NAL_UNIT_ PREFIX_SEI);247 nalu = NALUnit(NAL_UNIT_SEI); 336 248 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 337 249 m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps); … … 340 252 delete sei; 341 253 } 342 #if J0149_TONE_MAPPING_SEI343 if(m_pcCfg->getToneMappingInfoSEIEnabled())344 {345 SEIToneMappingInfo *sei = xCreateSEIToneMappingInfo ();346 347 nalu = NALUnit(NAL_UNIT_PREFIX_SEI);348 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);349 m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps);350 writeRBSPTrailingBits(nalu.m_Bitstream);351 accessUnit.push_back(new NALUnitEBSP(nalu));352 delete sei;353 }354 #endif355 254 } 356 255 … … 358 257 // Public member functions 359 258 // ==================================================================================================================== 259 360 260 #if H_MV 361 261 Void TEncGOP::initGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP) … … 365 265 } 366 266 #endif 267 367 268 #if H_MV 368 269 Void TEncGOP::compressPicInGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, Int iGOPid) … … 374 275 TComPicYuv* pcPicYuvRecOut; 375 276 TComSlice* pcSlice; 376 TComOutputBitstream *pcBitstreamRedirect; 377 pcBitstreamRedirect = new TComOutputBitstream; 277 TComOutputBitstream* pcBitstreamRedirect = new TComOutputBitstream; 378 278 AccessUnit::iterator itLocationToPushSliceHeaderNALU; // used to store location where NALU containing slice header is to be inserted 379 279 UInt uiOneBitstreamPerSliceLength = 0; … … 386 286 m_iNumPicCoded = 0; 387 287 #endif 288 388 289 SEIPictureTiming pictureTimingSEI; 389 #if L0208_SOP_DESCRIPTION_SEI390 Bool writeSOP = m_pcCfg->getSOPDescriptionSEIEnabled();391 #endif392 #if K0180_SCALABLE_NESTING_SEI393 // Initialize Scalable Nesting SEI with single layer values394 SEIScalableNesting scalableNestingSEI;395 scalableNestingSEI.m_bitStreamSubsetFlag = 1; // If the nested SEI messages are picture buffereing SEI mesages, picure timing SEI messages or sub-picture timing SEI messages, bitstream_subset_flag shall be equal to 1396 scalableNestingSEI.m_nestingOpFlag = 0;397 scalableNestingSEI.m_nestingNumOpsMinus1 = 0; //nesting_num_ops_minus1398 scalableNestingSEI.m_allLayersFlag = 0;399 scalableNestingSEI.m_nestingNoOpMaxTemporalIdPlus1 = 6 + 1; //nesting_no_op_max_temporal_id_plus1400 scalableNestingSEI.m_nestingNumLayersMinus1 = 1 - 1; //nesting_num_layers_minus1401 scalableNestingSEI.m_nestingLayerId[0] = 0;402 scalableNestingSEI.m_callerOwnsSEIs = true;403 #endif404 290 #if L0044_DU_DPB_OUTPUT_DELAY_HRD 405 291 Int picSptDpbOutputDuDelay = 0; … … 408 294 UInt *accumNalsDU = NULL; 409 295 SEIDecodingUnitInfo decodingUnitInfoSEI; 296 410 297 #if !H_MV 411 298 for ( Int iGOPid=0; iGOPid < m_iGopSize; iGOPid++ ) 412 299 #endif 300 413 301 { 414 302 UInt uiColDir = 1; … … 469 357 if(pocCurr>=m_pcCfg->getFramesToBeEncoded()) 470 358 { 359 471 360 #if H_MV 472 361 delete pcBitstreamRedirect; … … 475 364 continue; 476 365 #endif 477 } 478 479 if( getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 366 367 } 368 369 if( getNalUnitType(pocCurr) == NAL_UNIT_CODED_SLICE_IDR || getNalUnitType(pocCurr) == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 480 370 { 481 371 m_iLastIDR = pocCurr; … … 495 385 pcSlice->setLastIDR(m_iLastIDR); 496 386 pcSlice->setSliceIdx(0); 387 497 388 #if H_MV 498 389 pcPic ->setLayerId ( getLayerId() ); … … 506 397 #endif 507 398 #endif 399 508 400 //set default slice level flag to the same as SPS level flag 509 401 pcSlice->setLFCrossSliceBoundaryFlag( pcSlice->getPPS()->getLoopFilterAcrossSlicesEnabledFlag() ); … … 545 437 #if H_MV 546 438 // Set the nal unit type 547 pcSlice->setNalUnitType(getNalUnitType(pocCurr , m_iLastIDR));439 pcSlice->setNalUnitType(getNalUnitType(pocCurr)); 548 440 if( pcSlice->getSliceType() == B_SLICE ) 549 441 { … … 559 451 } 560 452 // Set the nal unit type 561 pcSlice->setNalUnitType(getNalUnitType(pocCurr , m_iLastIDR));562 #endif 563 if(pcSlice->get TemporalLayerNonReferenceFlag())564 { 565 if(pcSlice->get NalUnitType()==NAL_UNIT_CODED_SLICE_TRAIL_R)453 pcSlice->setNalUnitType(getNalUnitType(pocCurr)); 454 #endif 455 if(pcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_TRAIL_R) 456 { 457 if(pcSlice->getTemporalLayerNonReferenceFlag()) 566 458 { 567 459 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TRAIL_N); 568 }569 if(pcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_RADL_R)570 {571 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_RADL_N);572 }573 if(pcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_RASL_R)574 {575 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_RASL_N);576 460 } 577 461 } … … 598 482 else 599 483 { 600 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TLA _R);484 pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TLA); 601 485 } 602 486 } … … 684 568 } 685 569 #endif 686 #if !L0034_COMBINED_LIST_CLEANUP 570 687 571 if (pcSlice->getSliceType() != B_SLICE || !pcSlice->getSPS()->getUseLComb()) 688 572 { … … 696 580 pcSlice->setNumRefIdx(REF_PIC_LIST_C, pcSlice->getNumRefIdx(REF_PIC_LIST_0)); 697 581 } 698 #endif699 582 700 583 if (pcSlice->getSliceType() == B_SLICE) … … 722 605 pcSlice->setCheckLDC(bLowDelay); 723 606 } 724 else725 {726 pcSlice->setCheckLDC(true);727 }728 607 729 608 uiColDir = 1-uiColDir; … … 732 611 pcSlice->setRefPOCList(); 733 612 734 #if L0034_COMBINED_LIST_CLEANUP735 pcSlice->setList1IdxToList0Idx();736 #else737 613 pcSlice->setNoBackPredFlag( false ); 738 614 if ( pcSlice->getSliceType() == B_SLICE && !pcSlice->getRefPicListCombinationFlag()) … … 758 634 } 759 635 pcSlice->generateCombinedList(); 760 #endif761 636 762 637 if (m_pcEncTop->getTMVPModeId() == 2) … … 1064 939 Bool bLFCrossTileBoundary = pcSlice->getPPS()->getLoopFilterAcrossTilesEnabledFlag(); 1065 940 m_pcLoopFilter->setCfg(bLFCrossTileBoundary); 1066 #if L0386_DB_METRIC1067 if ( m_pcCfg->getDeblockingFilterMetric() )1068 {1069 dblMetric(pcPic, uiNumSlices);1070 }1071 #endif1072 941 m_pcLoopFilter->loopFilterPic( pcPic ); 1073 942 … … 1168 1037 } 1169 1038 1170 #if L0208_SOP_DESCRIPTION_SEI1171 if (writeSOP) // write SOP description SEI (if enabled) at the beginning of GOP1172 {1173 Int SOPcurrPOC = pocCurr;1174 1175 OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);1176 m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);1177 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);1178 1179 SEISOPDescription SOPDescriptionSEI;1180 SOPDescriptionSEI.m_sopSeqParameterSetId = pcSlice->getSPS()->getSPSId();1181 1182 UInt i = 0;1183 UInt prevEntryId = iGOPid;1184 for (j = iGOPid; j < m_iGopSize; j++)1185 {1186 Int deltaPOC = m_pcCfg->getGOPEntry(j).m_POC - m_pcCfg->getGOPEntry(prevEntryId).m_POC;1187 if ((SOPcurrPOC + deltaPOC) < m_pcCfg->getFramesToBeEncoded())1188 {1189 SOPcurrPOC += deltaPOC;1190 SOPDescriptionSEI.m_sopDescVclNaluType[i] = getNalUnitType(SOPcurrPOC, m_iLastIDR);1191 SOPDescriptionSEI.m_sopDescTemporalId[i] = m_pcCfg->getGOPEntry(j).m_temporalId;1192 SOPDescriptionSEI.m_sopDescStRpsIdx[i] = m_pcEncTop->getReferencePictureSetIdxForSOP(pcSlice, SOPcurrPOC, j);1193 SOPDescriptionSEI.m_sopDescPocDelta[i] = deltaPOC;1194 1195 prevEntryId = j;1196 i++;1197 }1198 }1199 1200 SOPDescriptionSEI.m_numPicsInSopMinus1 = i - 1;1201 1202 m_seiWriter.writeSEImessage( nalu.m_Bitstream, SOPDescriptionSEI, pcSlice->getSPS());1203 writeRBSPTrailingBits(nalu.m_Bitstream);1204 accessUnit.push_back(new NALUnitEBSP(nalu));1205 1206 writeSOP = false;1207 }1208 #endif1209 1210 1039 if( ( m_pcCfg->getPictureTimingSEIEnabled() || m_pcCfg->getDecodingUnitInfoSEIEnabled() ) && 1211 1040 ( pcSlice->getSPS()->getVuiParametersPresentFlag() ) && … … 1253 1082 || ( pcSlice->getSPS()->getVuiParameters()->getHrdParameters()->getVclHrdParametersPresentFlag() ) ) ) 1254 1083 { 1255 OutputNALUnit nalu(NAL_UNIT_ PREFIX_SEI);1084 OutputNALUnit nalu(NAL_UNIT_SEI); 1256 1085 m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice); 1257 1086 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); … … 1294 1123 writeRBSPTrailingBits(nalu.m_Bitstream); 1295 1124 #if L0045_NON_NESTED_SEI_RESTRICTIONS 1296 {1297 1125 UInt seiPositionInAu = xGetFirstSeiLocation(accessUnit); 1298 1126 UInt offsetPosition = m_activeParameterSetSEIPresentInAU; // Insert BP SEI after APS SEI … … 1304 1132 accessUnit.insert(it, new NALUnitEBSP(nalu)); 1305 1133 m_bufferingPeriodSEIPresentInAU = true; 1306 }1307 1134 #else 1308 1135 accessUnit.push_back(new NALUnitEBSP(nalu)); 1309 1136 #endif 1310 1137 1311 #if K0180_SCALABLE_NESTING_SEI1312 if (m_pcCfg->getScalableNestingSEIEnabled())1313 {1314 OutputNALUnit naluTmp(NAL_UNIT_PREFIX_SEI);1315 m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);1316 m_pcEntropyCoder->setBitstream(&naluTmp.m_Bitstream);1317 scalableNestingSEI.m_nestedSEIs.clear();1318 scalableNestingSEI.m_nestedSEIs.push_back(&sei_buffering_period);1319 m_seiWriter.writeSEImessage( naluTmp.m_Bitstream, scalableNestingSEI, pcSlice->getSPS());1320 writeRBSPTrailingBits(naluTmp.m_Bitstream);1321 #if L0045_NON_NESTED_SEI_RESTRICTIONS1322 UInt seiPositionInAu = xGetFirstSeiLocation(accessUnit);1323 UInt offsetPosition = m_activeParameterSetSEIPresentInAU + m_bufferingPeriodSEIPresentInAU + m_pictureTimingSEIPresentInAU; // Insert BP SEI after non-nested APS, BP and PT SEIs1324 AccessUnit::iterator it;1325 for(j = 0, it = accessUnit.begin(); j < seiPositionInAu + offsetPosition; j++)1326 {1327 it++;1328 }1329 accessUnit.insert(it, new NALUnitEBSP(naluTmp));1330 m_nestedBufferingPeriodSEIPresentInAU = true;1331 #else1332 accessUnit.push_back(new NALUnitEBSP(naluTmp));1333 #endif1334 }1335 #endif1336 1337 1138 m_lastBPSEI = m_totalCoded; 1338 1139 m_cpbRemovalDelay = 0; … … 1344 1145 { 1345 1146 // Gradual decoding refresh SEI 1346 OutputNALUnit nalu(NAL_UNIT_ PREFIX_SEI);1147 OutputNALUnit nalu(NAL_UNIT_SEI); 1347 1148 m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice); 1348 1149 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); … … 1356 1157 } 1357 1158 // Recovery point SEI 1358 OutputNALUnit nalu(NAL_UNIT_ PREFIX_SEI);1159 OutputNALUnit nalu(NAL_UNIT_SEI); 1359 1160 m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice); 1360 1161 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); … … 1547 1348 1548 1349 pcSlice->setTileOffstForMultES( uiOneBitstreamPerSliceLength ); 1350 if (!sliceSegment) 1351 { 1549 1352 pcSlice->setTileLocationCount ( 0 ); 1550 m_pcSliceEncoder->encodeSlice(pcPic, pcSubstreamsOut); 1353 m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info. 1354 } 1355 else 1356 { 1357 m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info. 1358 } 1551 1359 1552 1360 { … … 1580 1388 if (ui+1 < pcSlice->getPPS()->getNumSubstreams()) 1581 1389 { 1582 puiSubstreamSizes[ui] = pcSubstreamsOut[ui].getNumberOfWrittenBits() + (pcSubstreamsOut[ui].countStartCodeEmulations()<<3);1390 puiSubstreamSizes[ui] = pcSubstreamsOut[ui].getNumberOfWrittenBits(); 1583 1391 } 1584 1392 } … … 1612 1420 // If current NALU is the last NALU of slice and a NALU was buffered, then (a) Write current NALU (b) Update an write buffered NALU at approproate location in NALU list. 1613 1421 Bool bNALUAlignedWrittenToList = false; // used to ensure current NALU is not written more than once to the NALU list. 1614 x AttachSliceDataToNalUnit(nalu, pcBitstreamRedirect);1422 xWriteTileLocationToSliceHeader(nalu, pcBitstreamRedirect, pcSlice); 1615 1423 accessUnit.push_back(new NALUnitEBSP(nalu)); 1616 1424 #if RATE_CONTROL_LAMBDA_DOMAIN … … 1640 1448 { 1641 1449 UInt numRBSPBytes_nal = UInt((*it)->m_nalUnitData.str().size()); 1642 if ((*it)->m_nalUnitType != NAL_UNIT_ PREFIX_SEI && (*it)->m_nalUnitType != NAL_UNIT_SUFFIX_SEI)1450 if ((*it)->m_nalUnitType != NAL_UNIT_SEI && (*it)->m_nalUnitType != NAL_UNIT_SEI_SUFFIX) 1643 1451 { 1644 1452 numRBSPBytes += numRBSPBytes_nal; … … 1710 1518 pcPic->compressMotion(); 1711 1519 #endif 1520 1712 1521 #if H_MV 1713 1522 m_pocLastCoded = pcPic->getPOC(); … … 1740 1549 digestStr = digestToString(sei_recon_picture_digest.digest, 4); 1741 1550 } 1742 OutputNALUnit nalu(NAL_UNIT_S UFFIX_SEI, pcSlice->getTLayer());1551 OutputNALUnit nalu(NAL_UNIT_SEI_SUFFIX, pcSlice->getTLayer()); 1743 1552 1744 1553 /* write the SEI messages */ … … 1764 1573 sei_temporal_level0_index.rapIdx = m_rapIdx; 1765 1574 1766 OutputNALUnit nalu(NAL_UNIT_ PREFIX_SEI);1575 OutputNALUnit nalu(NAL_UNIT_SEI); 1767 1576 1768 1577 /* write the SEI messages */ … … 1904 1713 if( m_pcCfg->getPictureTimingSEIEnabled() ) 1905 1714 { 1906 { 1907 OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI, pcSlice->getTLayer()); 1715 OutputNALUnit nalu(NAL_UNIT_SEI, pcSlice->getTLayer()); 1908 1716 m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice); 1909 1717 m_seiWriter.writeSEImessage(nalu.m_Bitstream, pictureTimingSEI, pcSlice->getSPS()); … … 1925 1733 #endif 1926 1734 } 1927 #if K0180_SCALABLE_NESTING_SEI1928 if ( m_pcCfg->getScalableNestingSEIEnabled() ) // put picture timing SEI into scalable nesting SEI1929 {1930 OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI, pcSlice->getTLayer());1931 m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);1932 scalableNestingSEI.m_nestedSEIs.clear();1933 scalableNestingSEI.m_nestedSEIs.push_back(&pictureTimingSEI);1934 m_seiWriter.writeSEImessage(nalu.m_Bitstream, scalableNestingSEI, pcSlice->getSPS());1935 writeRBSPTrailingBits(nalu.m_Bitstream);1936 #if L0045_NON_NESTED_SEI_RESTRICTIONS1937 UInt seiPositionInAu = xGetFirstSeiLocation(accessUnit);1938 UInt offsetPosition = m_activeParameterSetSEIPresentInAU1939 + m_bufferingPeriodSEIPresentInAU + m_pictureTimingSEIPresentInAU + m_nestedBufferingPeriodSEIPresentInAU; // Insert PT SEI after APS and BP SEI1940 AccessUnit::iterator it;1941 for(j = 0, it = accessUnit.begin(); j < seiPositionInAu + offsetPosition; j++)1942 {1943 it++;1944 }1945 accessUnit.insert(it, new NALUnitEBSP(nalu));1946 m_nestedPictureTimingSEIPresentInAU = true;1947 #else1948 AccessUnit::iterator it = find_if(accessUnit.begin(), accessUnit.end(), mem_fun(&NALUnit::isSlice));1949 accessUnit.insert(it, new NALUnitEBSP(nalu));1950 #endif1951 }1952 #endif1953 1954 }1955 1735 if( m_pcCfg->getDecodingUnitInfoSEIEnabled() && hrd->getSubPicCpbParamsPresentFlag() ) 1956 1736 { … … 1958 1738 for( Int i = 0; i < ( pictureTimingSEI.m_numDecodingUnitsMinus1 + 1 ); i ++ ) 1959 1739 { 1960 OutputNALUnit nalu(NAL_UNIT_ PREFIX_SEI, pcSlice->getTLayer());1740 OutputNALUnit nalu(NAL_UNIT_SEI, pcSlice->getTLayer()); 1961 1741 1962 1742 SEIDecodingUnitInfo tempSEI; … … 2006 1786 break; 2007 1787 } 2008 if ((*it)->m_nalUnitType != NAL_UNIT_ PREFIX_SEI && (*it)->m_nalUnitType != NAL_UNIT_SUFFIX_SEI)1788 if ((*it)->m_nalUnitType != NAL_UNIT_SEI && (*it)->m_nalUnitType != NAL_UNIT_SEI_SUFFIX) 2009 1789 { 2010 1790 ctr++; … … 2017 1797 #if L0045_NON_NESTED_SEI_RESTRICTIONS 2018 1798 xResetNonNestedSEIPresentFlags(); 2019 #if K0180_SCALABLE_NESTING_SEI2020 xResetNestedSEIPresentFlags();2021 #endif2022 1799 #endif 2023 1800 pcPic->getPicYuvRec()->copyToPic(pcPicYuvRecOut); … … 2052 1829 assert ( m_iNumPicCoded == iNumPicRcvd ); 2053 1830 #endif 1831 2054 1832 } 2055 1833 … … 2245 2023 case NAL_UNIT_CODED_SLICE_TRAIL_R: return "TRAIL_R"; 2246 2024 case NAL_UNIT_CODED_SLICE_TRAIL_N: return "TRAIL_N"; 2247 case NAL_UNIT_CODED_SLICE_TLA _R: return "TLA_R";2025 case NAL_UNIT_CODED_SLICE_TLA: return "TLA"; 2248 2026 case NAL_UNIT_CODED_SLICE_TSA_N: return "TSA_N"; 2249 2027 case NAL_UNIT_CODED_SLICE_STSA_R: return "STSA_R"; 2250 2028 case NAL_UNIT_CODED_SLICE_STSA_N: return "STSA_N"; 2251 case NAL_UNIT_CODED_SLICE_BLA _W_LP: return "BLA_W_LP";2252 case NAL_UNIT_CODED_SLICE_BLA _W_RADL: return "BLA_W_RADL";2029 case NAL_UNIT_CODED_SLICE_BLA: return "BLA"; 2030 case NAL_UNIT_CODED_SLICE_BLANT: return "BLANT"; 2253 2031 case NAL_UNIT_CODED_SLICE_BLA_N_LP: return "BLA_N_LP"; 2254 case NAL_UNIT_CODED_SLICE_IDR _W_RADL: return "IDR_W_RADL";2032 case NAL_UNIT_CODED_SLICE_IDR: return "IDR"; 2255 2033 case NAL_UNIT_CODED_SLICE_IDR_N_LP: return "IDR_N_LP"; 2256 2034 case NAL_UNIT_CODED_SLICE_CRA: return "CRA"; 2257 case NAL_UNIT_CODED_SLICE_ RADL_R: return "RADL_R";2258 case NAL_UNIT_CODED_SLICE_ RASL_R: return "RASL_R";2035 case NAL_UNIT_CODED_SLICE_DLP: return "DLP"; 2036 case NAL_UNIT_CODED_SLICE_TFD: return "TFD"; 2259 2037 case NAL_UNIT_VPS: return "VPS"; 2260 2038 case NAL_UNIT_SPS: return "SPS"; … … 2264 2042 case NAL_UNIT_EOB: return "EOB"; 2265 2043 case NAL_UNIT_FILLER_DATA: return "FILLER"; 2266 case NAL_UNIT_PREFIX_SEI: return "SEI"; 2267 case NAL_UNIT_SUFFIX_SEI: return "SEI"; 2044 case NAL_UNIT_SEI: return "SEI"; 2268 2045 default: return "UNK"; 2269 2046 } … … 2356 2133 printf("*** %6s numBytesInNALunit: %u\n", nalUnitTypeToString((*it)->m_nalUnitType), numRBSPBytes_nal); 2357 2134 #endif 2358 if ((*it)->m_nalUnitType != NAL_UNIT_ PREFIX_SEI && (*it)->m_nalUnitType != NAL_UNIT_SUFFIX_SEI)2135 if ((*it)->m_nalUnitType != NAL_UNIT_SEI && (*it)->m_nalUnitType != NAL_UNIT_SEI_SUFFIX) 2359 2136 { 2360 2137 numRBSPBytes += numRBSPBytes_nal; … … 2366 2143 2367 2144 //===== add PSNR ===== 2145 2368 2146 #if H_MV 2369 2147 m_pcEncTop->getAnalyzeAll()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); … … 2371 2149 m_gcAnalyzeAll.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2372 2150 #endif 2151 2373 2152 TComSlice* pcSlice = pcPic->getSlice(0); 2374 2153 if (pcSlice->isIntra()) 2375 2154 { 2155 2376 2156 #if H_MV 2377 2157 m_pcEncTop->getAnalyzeI()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); … … 2379 2159 m_gcAnalyzeI.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2380 2160 #endif 2161 2381 2162 } 2382 2163 if (pcSlice->isInterP()) 2383 2164 { 2165 2384 2166 #if H_MV 2385 2167 m_pcEncTop->getAnalyzeP()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); … … 2387 2169 m_gcAnalyzeP.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2388 2170 #endif 2171 2389 2172 } 2390 2173 if (pcSlice->isInterB()) 2391 2174 { 2175 2392 2176 #if H_MV 2393 2177 m_pcEncTop->getAnalyzeB()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); … … 2395 2179 m_gcAnalyzeB.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits); 2396 2180 #endif 2181 2397 2182 } 2398 2183 … … 2401 2186 2402 2187 #if ADAPTIVE_QP_SELECTION 2188 2403 2189 #if H_MV 2404 2190 printf("Layer %3d POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits", … … 2419 2205 uibits ); 2420 2206 #endif 2207 2421 2208 #else 2209 2422 2210 #if H_MV 2423 2211 printf("Layer %3d POC %4d TId: %1d ( %c-SLICE, QP %d ) %10d bits", … … 2436 2224 uibits ); 2437 2225 #endif 2226 2438 2227 #endif 2439 2228 … … 2468 2257 * This function checks the configuration and returns the appropriate nal_unit_type for the picture. 2469 2258 */ 2470 NalUnitType TEncGOP::getNalUnitType(Int pocCurr , Int lastIDR)2259 NalUnitType TEncGOP::getNalUnitType(Int pocCurr) 2471 2260 { 2472 2261 if (pocCurr == 0) 2473 2262 { 2474 return NAL_UNIT_CODED_SLICE_IDR _W_RADL;2263 return NAL_UNIT_CODED_SLICE_IDR; 2475 2264 } 2476 2265 if (pocCurr % m_pcCfg->getIntraPeriod() == 0) … … 2482 2271 else if (m_pcCfg->getDecodingRefreshType() == 2) 2483 2272 { 2484 return NAL_UNIT_CODED_SLICE_IDR _W_RADL;2273 return NAL_UNIT_CODED_SLICE_IDR; 2485 2274 } 2486 2275 } … … 2494 2283 // controlling the reference pictures used for encoding that leading picture. Such a leading 2495 2284 // picture need not be marked as a TFD picture. 2496 return NAL_UNIT_CODED_SLICE_RASL_R; 2497 } 2498 } 2499 if (lastIDR>0) 2500 { 2501 if (pocCurr < lastIDR) 2502 { 2503 return NAL_UNIT_CODED_SLICE_RADL_R; 2285 return NAL_UNIT_CODED_SLICE_TFD; 2504 2286 } 2505 2287 } … … 2552 2334 } 2553 2335 2554 /** Attaches the input bitstream to the stream in the output NAL unit 2555 Updates rNalu to contain concatenated bitstream. rpcBitstreamRedirect is cleared at the end of this function call. 2556 * \param codedSliceData contains the coded slice data (bitstream) to be concatenated to rNalu 2557 * \param rNalu target NAL unit 2336 /** Determine the difference between consecutive tile sizes (in bytes) and writes it to bistream rNalu [slice header] 2337 * \param rpcBitstreamRedirect contains the bitstream to be concatenated to rNalu. rpcBitstreamRedirect contains slice payload. rpcSlice contains tile location information. 2338 * \returns Updates rNalu to contain concatenated bitstream. rpcBitstreamRedirect is cleared at the end of this function call. 2558 2339 */ 2559 Void TEncGOP::x AttachSliceDataToNalUnit (OutputNALUnit& rNalu, TComOutputBitstream*& codedSliceData)2340 Void TEncGOP::xWriteTileLocationToSliceHeader (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect, TComSlice*& rpcSlice) 2560 2341 { 2561 2342 // Byte-align … … 2563 2344 2564 2345 // Perform bitstream concatenation 2565 if (codedSliceData->getNumberOfWrittenBits() > 0) 2566 { 2567 rNalu.m_Bitstream.addSubstream(codedSliceData); 2346 if (rpcBitstreamRedirect->getNumberOfWrittenBits() > 0) 2347 { 2348 UInt uiBitCount = rpcBitstreamRedirect->getNumberOfWrittenBits(); 2349 if (rpcBitstreamRedirect->getByteStreamLength()>0) 2350 { 2351 UChar *pucStart = reinterpret_cast<UChar*>(rpcBitstreamRedirect->getByteStream()); 2352 UInt uiWriteByteCount = 0; 2353 while (uiWriteByteCount < (uiBitCount >> 3) ) 2354 { 2355 UInt uiBits = (*pucStart); 2356 rNalu.m_Bitstream.write(uiBits, 8); 2357 pucStart++; 2358 uiWriteByteCount++; 2359 } 2360 } 2361 UInt uiBitsHeld = (uiBitCount & 0x07); 2362 for (UInt uiIdx=0; uiIdx < uiBitsHeld; uiIdx++) 2363 { 2364 rNalu.m_Bitstream.write((rpcBitstreamRedirect->getHeldBits() & (1 << (7-uiIdx))) >> (7-uiIdx), 1); 2365 } 2568 2366 } 2569 2367 2570 2368 m_pcEntropyCoder->setBitstream(&rNalu.m_Bitstream); 2571 2369 2572 codedSliceData->clear(); 2370 delete rpcBitstreamRedirect; 2371 rpcBitstreamRedirect = new TComOutputBitstream; 2573 2372 } 2574 2373 … … 2695 2494 } 2696 2495 } 2697 // assert(it != accessUnit.end()); // Triggers with some legit configurations 2496 assert(it != accessUnit.end()); 2698 2497 return seiStartPos; 2699 2498 } 2700 2499 #endif 2701 2500 2702 #if L0386_DB_METRIC2703 Void TEncGOP::dblMetric( TComPic* pcPic, UInt uiNumSlices )2704 {2705 TComPicYuv* pcPicYuvRec = pcPic->getPicYuvRec();2706 Pel* Rec = pcPicYuvRec->getLumaAddr( 0 );2707 Pel* tempRec = Rec;2708 Int stride = pcPicYuvRec->getStride();2709 UInt log2maxTB = pcPic->getSlice(0)->getSPS()->getQuadtreeTULog2MaxSize();2710 UInt maxTBsize = (1<<log2maxTB);2711 const UInt minBlockArtSize = 8;2712 const UInt picWidth = pcPicYuvRec->getWidth();2713 const UInt picHeight = pcPicYuvRec->getHeight();2714 const UInt noCol = (picWidth>>log2maxTB);2715 const UInt noRows = (picHeight>>log2maxTB);2716 UInt64 *colSAD = (UInt64*)malloc(noCol*sizeof(UInt64));2717 UInt64 *rowSAD = (UInt64*)malloc(noRows*sizeof(UInt64));2718 UInt colIdx = 0;2719 UInt rowIdx = 0;2720 Pel p0, p1, p2, q0, q1, q2;2721 2722 Int qp = pcPic->getSlice(0)->getSliceQp();2723 Int bitdepthScale = 1 << (g_bitDepthY-8);2724 Int beta = TComLoopFilter::getBeta( qp ) * bitdepthScale;2725 const Int thr2 = (beta>>2);2726 const Int thr1 = 2*bitdepthScale;2727 UInt a = 0;2728 2729 memset(colSAD, 0, noCol*sizeof(UInt64));2730 memset(rowSAD, 0, noRows*sizeof(UInt64));2731 2732 if (maxTBsize > minBlockArtSize)2733 {2734 // Analyze vertical artifact edges2735 for(Int c = maxTBsize; c < picWidth; c += maxTBsize)2736 {2737 for(Int r = 0; r < picHeight; r++)2738 {2739 p2 = Rec[c-3];2740 p1 = Rec[c-2];2741 p0 = Rec[c-1];2742 q0 = Rec[c];2743 q1 = Rec[c+1];2744 q2 = Rec[c+2];2745 a = ((abs(p2-(p1<<1)+p0)+abs(q0-(q1<<1)+q2))<<1);2746 if ( thr1 < a && a < thr2)2747 {2748 colSAD[colIdx] += abs(p0 - q0);2749 }2750 Rec += stride;2751 }2752 colIdx++;2753 Rec = tempRec;2754 }2755 2756 // Analyze horizontal artifact edges2757 for(Int r = maxTBsize; r < picHeight; r += maxTBsize)2758 {2759 for(Int c = 0; c < picWidth; c++)2760 {2761 p2 = Rec[c + (r-3)*stride];2762 p1 = Rec[c + (r-2)*stride];2763 p0 = Rec[c + (r-1)*stride];2764 q0 = Rec[c + r*stride];2765 q1 = Rec[c + (r+1)*stride];2766 q2 = Rec[c + (r+2)*stride];2767 a = ((abs(p2-(p1<<1)+p0)+abs(q0-(q1<<1)+q2))<<1);2768 if (thr1 < a && a < thr2)2769 {2770 rowSAD[rowIdx] += abs(p0 - q0);2771 }2772 }2773 rowIdx++;2774 }2775 }2776 2777 UInt64 colSADsum = 0;2778 UInt64 rowSADsum = 0;2779 for(Int c = 0; c < noCol-1; c++)2780 {2781 colSADsum += colSAD[c];2782 }2783 for(Int r = 0; r < noRows-1; r++)2784 {2785 rowSADsum += rowSAD[r];2786 }2787 2788 colSADsum <<= 10;2789 rowSADsum <<= 10;2790 colSADsum /= (noCol-1);2791 colSADsum /= picHeight;2792 rowSADsum /= (noRows-1);2793 rowSADsum /= picWidth;2794 2795 UInt64 avgSAD = ((colSADsum + rowSADsum)>>1);2796 avgSAD >>= (g_bitDepthY-8);2797 2798 if ( avgSAD > 2048 )2799 {2800 avgSAD >>= 9;2801 Int offset = Clip3(2,6,(Int)avgSAD);2802 for (Int i=0; i<uiNumSlices; i++)2803 {2804 pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(true);2805 pcPic->getSlice(i)->setDeblockingFilterDisable(false);2806 pcPic->getSlice(i)->setDeblockingFilterBetaOffsetDiv2( offset );2807 pcPic->getSlice(i)->setDeblockingFilterTcOffsetDiv2( offset );2808 }2809 }2810 else2811 {2812 for (Int i=0; i<uiNumSlices; i++)2813 {2814 pcPic->getSlice(i)->setDeblockingFilterOverrideFlag(false);2815 pcPic->getSlice(i)->setDeblockingFilterDisable( pcPic->getSlice(i)->getPPS()->getPicDisableDeblockingFilterFlag() );2816 pcPic->getSlice(i)->setDeblockingFilterBetaOffsetDiv2( pcPic->getSlice(i)->getPPS()->getDeblockingFilterBetaOffsetDiv2() );2817 pcPic->getSlice(i)->setDeblockingFilterTcOffsetDiv2( pcPic->getSlice(i)->getPPS()->getDeblockingFilterTcOffsetDiv2() );2818 }2819 }2820 2821 free(colSAD);2822 free(rowSAD);2823 }2824 #endif2825 2501 #if H_MV 2826 2502 Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid ) … … 2846 2522 { 2847 2523 Int numModifications = 0; 2848 2524 2849 2525 for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 2850 2526 { … … 2853 2529 2854 2530 // set inter-view modifications 2855 Bool isModified = false;2856 Int tempList[16];2857 for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; }2858 2859 2531 if( (maxRefListSize > 1) && (numModifications > 0) ) 2860 2532 { 2533 refPicListModification->setRefPicListModificationFlagL( li, true ); 2534 Int tempList[16]; 2535 for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; } 2536 2537 Bool isModified = false; 2861 2538 for( Int k = 0; k < ge.m_numInterViewRefPics; k++ ) 2862 2539 { … … 2877 2554 } 2878 2555 } 2879 } 2880 2881 refPicListModification->setRefPicListModificationFlagL( li, isModified ); 2882 2883 if( isModified ) 2884 { 2885 Int temporalRefIdx = 0; 2886 for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ ) 2887 { 2888 if( tempList[i] >= 0 ) 2889 { 2890 refPicListModification->setRefPicSetIdxL( li, i, tempList[i] ); 2891 } 2892 else 2893 { 2894 refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx ); 2895 temporalRefIdx++; 2896 } 2897 } 2898 } 2556 if( isModified ) 2557 { 2558 Int temporalRefIdx = 0; 2559 for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ ) 2560 { 2561 if( tempList[i] >= 0 ) 2562 { 2563 refPicListModification->setRefPicSetIdxL( li, i, tempList[i] ); 2564 } 2565 else 2566 { 2567 refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx ); 2568 temporalRefIdx++; 2569 } 2570 } 2571 } 2572 else 2573 { 2574 refPicListModification->setRefPicListModificationFlagL( li, false ); 2575 } 2576 } 2899 2577 } 2900 2578 } 2901 2579 #endif 2580 2902 2581 //! \} -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncGOP.h
r368 r438 108 108 #endif 109 109 #endif 110 110 111 //--Adaptive Loop filter 111 112 TEncSampleAdaptiveOffset* m_pcSAO; … … 131 132 Bool m_bufferingPeriodSEIPresentInAU; 132 133 Bool m_pictureTimingSEIPresentInAU; 133 #if K0180_SCALABLE_NESTING_SEI134 Bool m_nestedBufferingPeriodSEIPresentInAU;135 Bool m_nestedPictureTimingSEIPresentInAU;136 #endif137 134 #endif 138 135 public: … … 144 141 145 142 Void init ( TEncTop* pcTEncTop ); 143 146 144 #if H_MV 147 145 Void initGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP); … … 150 148 Void compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRec, std::list<AccessUnit>& accessUnitsInGOP ); 151 149 #endif 152 Void xAttachSliceDataToNalUnit (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect); 150 151 Void xWriteTileLocationToSliceHeader (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect, TComSlice*& rpcSlice); 153 152 154 153 #if H_MV … … 168 167 Void printOutSummary ( UInt uiNumAllPicCoded ); 169 168 #endif 169 170 170 Void preLoopFilterPicAll ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits ); 171 171 172 172 TEncSlice* getSliceEncoder() { return m_pcSliceEncoder; } 173 NalUnitType getNalUnitType( Int pocCurr , Int lastIdr);173 NalUnitType getNalUnitType( Int pocCurr ); 174 174 Void arrangeLongtermPicturesInRPS(TComSlice *, TComList<TComPic*>& ); 175 175 protected: … … 189 189 SEIFramePacking* xCreateSEIFramePacking(); 190 190 SEIDisplayOrientation* xCreateSEIDisplayOrientation(); 191 192 #if J0149_TONE_MAPPING_SEI193 SEIToneMappingInfo* xCreateSEIToneMappingInfo();194 #endif195 191 196 192 Void xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps); … … 203 199 m_pictureTimingSEIPresentInAU = false; 204 200 } 205 #if K0180_SCALABLE_NESTING_SEI 206 Void xResetNestedSEIPresentFlags() 207 { 208 m_nestedBufferingPeriodSEIPresentInAU = false; 209 m_nestedPictureTimingSEIPresentInAU = false; 210 } 211 #endif 212 #endif 201 #endif 202 213 203 #if H_MV 214 204 Void xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid ); 215 205 #endif 216 #if L0386_DB_METRIC 217 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); 218 #endif 206 219 207 };// END CLASS DEFINITION TEncGOP 220 208 -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
r362 r438 1677 1677 #endif 1678 1678 { 1679 #if SAO_CHROMA_LAMBDA 1680 m_dLambdaLuma = dLambdaLuma; 1681 m_dLambdaChroma = dLambdaChroma; 1682 #else 1683 m_dLambdaLuma = dLambda; 1684 m_dLambdaChroma = dLambda; 1685 #endif 1686 1679 1687 if(m_bUseNIF) 1680 1688 { -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h
r362 r438 57 57 { 58 58 private: 59 Double m_dLambdaLuma; 60 Double m_dLambdaChroma; 61 59 62 TEncEntropy* m_pcEntropyCoder; 60 63 TEncSbac*** m_pppcRDSbacCoder; ///< for CABAC -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSbac.h
r362 r438 109 109 Void xWriteEpExGolomb ( UInt uiSymbol, UInt uiCount ); 110 110 Void xWriteCoefRemainExGolomb ( UInt symbol, UInt &rParam ); 111 Void xWriteTerminatingBit ( UInt uiBit ); 111 112 112 113 Void xCopyFrom ( TEncSbac* pSrc ); -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r362 r438 3209 3209 UInt uiBitsTempL0[MAX_NUM_REF]; 3210 3210 3211 #if L0034_COMBINED_LIST_CLEANUP3212 TComMv mvValidList1;3213 Int refIdxValidList1 = 0;3214 UInt bitsValidList1 = MAX_UINT;3215 UInt costValidList1 = MAX_UINT;3216 #endif3217 3218 3211 xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits); 3219 3212 … … 3262 3255 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdx[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 3263 3256 #if ZERO_MVD_EST 3264 #if L0034_COMBINED_LIST_CLEANUP3265 if ( iRefList == 0 || pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) < 0 )3266 #else3267 3257 if ((iRefList != 1 || !pcCU->getSlice()->getNoBackPredFlag()) && 3268 3258 (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) <= 0 || pcCU->getSlice()->getRefIdxOfLC(eRefPicList, iRefIdxTemp)>=0)) 3269 #endif3270 3259 { 3271 3260 uiZeroMvdBitsTemp = uiBitsTemp; … … 3287 3276 3288 3277 #if GPB_SIMPLE_UNI 3289 #if L0034_COMBINED_LIST_CLEANUP3290 if ( iRefList == 1 ) // list 13291 {3292 if ( pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) >= 0 )3293 {3294 cMvTemp[1][iRefIdxTemp] = cMvTemp[0][pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )];3295 uiCostTemp = uiCostTempL0[pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )];3296 /*first subtract the bit-rate part of the cost of the other list*/3297 uiCostTemp -= m_pcRdCost->getCost( uiBitsTempL0[pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )] );3298 /*correct the bit-rate part of the current ref*/3299 m_pcRdCost->setPredictor ( cMvPred[iRefList][iRefIdxTemp] );3300 uiBitsTemp += m_pcRdCost->getBits( cMvTemp[1][iRefIdxTemp].getHor(), cMvTemp[1][iRefIdxTemp].getVer() );3301 /*calculate the correct cost*/3302 uiCostTemp += m_pcRdCost->getCost( uiBitsTemp );3303 }3304 else3305 {3306 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp );3307 }3308 }3309 else3310 {3311 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp );3312 }3313 #else3314 3278 if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0) 3315 3279 { … … 3353 3317 } 3354 3318 } 3355 #endif3356 3319 #else 3357 3320 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp ); … … 3360 3323 xCheckBestMVP(pcCU, eRefPicList, cMvTemp[iRefList][iRefIdxTemp], cMvPred[iRefList][iRefIdxTemp], aaiMvpIdx[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp); 3361 3324 3362 #if L0034_COMBINED_LIST_CLEANUP3363 if ( iRefList == 0 )3364 {3365 uiCostTempL0[iRefIdxTemp] = uiCostTemp;3366 uiBitsTempL0[iRefIdxTemp] = uiBitsTemp;3367 }3368 if ( uiCostTemp < uiCost[iRefList] )3369 {3370 uiCost[iRefList] = uiCostTemp;3371 uiBits[iRefList] = uiBitsTemp; // storing for bi-prediction3372 3373 // set motion3374 cMv[iRefList] = cMvTemp[iRefList][iRefIdxTemp];3375 iRefIdx[iRefList] = iRefIdxTemp;3376 }3377 3378 if ( iRefList == 1 && uiCostTemp < costValidList1 && pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) < 0 )3379 {3380 costValidList1 = uiCostTemp;3381 bitsValidList1 = uiBitsTemp;3382 3383 // set motion3384 mvValidList1 = cMvTemp[iRefList][iRefIdxTemp];3385 refIdxValidList1 = iRefIdxTemp;3386 }3387 #else3388 3325 if(pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && !pcCU->getSlice()->getNoBackPredFlag()) 3389 3326 { … … 3435 3372 } 3436 3373 } 3437 #endif3438 3374 } 3439 3375 } … … 3499 3435 3500 3436 Int iRefList = iIter % 2; 3501 #if L0034_COMBINED_LIST_CLEANUP3502 if ( m_pcEncCfg->getUseFastEnc() )3503 {3504 if( uiCost[0] <= uiCost[1] )3505 {3506 iRefList = 1;3507 }3508 else3509 {3510 iRefList = 0;3511 }3512 }3513 else if ( iIter == 0 )3514 {3515 iRefList = 0;3516 }3517 if ( iIter == 0 && !pcCU->getSlice()->getMvdL1ZeroFlag())3518 {3519 pcCU->getCUMvField(RefPicList(1-iRefList))->setAllMv( cMv[1-iRefList], ePartSize, uiPartAddr, 0, iPartIdx );3520 pcCU->getCUMvField(RefPicList(1-iRefList))->setAllRefIdx( iRefIdx[1-iRefList], ePartSize, uiPartAddr, 0, iPartIdx );3521 TComYuv* pcYuvPred = &m_acYuvPred[1-iRefList];3522 motionCompensation ( pcCU, pcYuvPred, RefPicList(1-iRefList), iPartIdx );3523 }3524 #else3525 3437 if ( m_pcEncCfg->getUseFastEnc() && (pcCU->getSlice()->getNoBackPredFlag() || (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(0)==0 )) ) 3526 3438 { 3527 3439 iRefList = 1; 3528 3440 } 3529 #endif3530 3441 RefPicList eRefPicList = ( iRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0 ); 3531 3442 … … 3662 3573 UInt uiMEBits = 0; 3663 3574 // Set Motion Field_ 3664 #if L0034_COMBINED_LIST_CLEANUP3665 cMv[1] = mvValidList1;3666 iRefIdx[1] = refIdxValidList1;3667 uiBits[1] = bitsValidList1;3668 uiCost[1] = costValidList1;3669 #else3670 3575 if ( pcCU->getSlice()->getNoBackPredFlag() || (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(0)==0 ) ) 3671 3576 { 3672 3577 uiCost[1] = MAX_UINT; 3673 3578 } 3674 #endif3675 3579 #if AMP_MRG 3676 3580 if (bTestNormalMC) … … 4618 4522 while( pcCU->getWidth(0) > (pcCU->getSlice()->getSPS()->getMaxTrSize()<<uiTrLevel) ) uiTrLevel++; 4619 4523 } 4620 UInt uiMaxTrMode = 1+ uiTrLevel;4524 UInt uiMaxTrMode = pcCU->getSlice()->getSPS()->getMaxTrDepth() + uiTrLevel; 4621 4525 4622 4526 while((uiWidth>>uiMaxTrMode) < (g_uiMaxCUWidth>>g_uiMaxCUDepth)) uiMaxTrMode--; -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r368 r438 414 414 eSliceType = (pocLast == 0 || pocCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 415 415 #endif 416 417 416 rpcSlice->setSliceType ( eSliceType ); 418 417 #endif … … 439 438 #endif 440 439 441 #if L0386_DB_METRIC442 if ( m_pcCfg->getDeblockingFilterMetric() )443 {444 rpcSlice->setDeblockingFilterOverrideFlag(true);445 rpcSlice->setDeblockingFilterDisable(false);446 rpcSlice->setDeblockingFilterBetaOffsetDiv2( 0 );447 rpcSlice->setDeblockingFilterTcOffsetDiv2( 0 );448 } else449 #endif450 440 if (rpcSlice->getPPS()->getDeblockingFilterControlPresentFlag()) 451 441 { … … 1233 1223 \retval rpcBitstream bitstream class 1234 1224 */ 1235 Void TEncSlice::encodeSlice ( TComPic*& rpcPic, TComOutputBitstream* pc Substreams )1225 Void TEncSlice::encodeSlice ( TComPic*& rpcPic, TComOutputBitstream* pcBitstream, TComOutputBitstream* pcSubstreams ) 1236 1226 { 1237 1227 UInt uiCUAddr; … … 1413 1403 } 1414 1404 { 1415 UInt numStartCodeEmulations = pcSubstreams[uiSubStrm].countStartCodeEmulations(); 1405 UInt uiCounter = 0; 1406 vector<uint8_t>& rbsp = pcSubstreams[uiSubStrm].getFIFO(); 1407 for (vector<uint8_t>::iterator it = rbsp.begin(); it != rbsp.end();) 1408 { 1409 /* 1) find the next emulated 00 00 {00,01,02,03} 1410 * 2a) if not found, write all remaining bytes out, stop. 1411 * 2b) otherwise, write all non-emulated bytes out 1412 * 3) insert emulation_prevention_three_byte 1413 */ 1414 vector<uint8_t>::iterator found = it; 1415 do 1416 { 1417 /* NB, end()-1, prevents finding a trailing two byte sequence */ 1418 found = search_n(found, rbsp.end()-1, 2, 0); 1419 found++; 1420 /* if not found, found == end, otherwise found = second zero byte */ 1421 if (found == rbsp.end()) 1422 { 1423 break; 1424 } 1425 if (*(++found) <= 3) 1426 { 1427 break; 1428 } 1429 } while (true); 1430 it = found; 1431 if (found != rbsp.end()) 1432 { 1433 it++; 1434 uiCounter++; 1435 } 1436 } 1437 1416 1438 UInt uiAccumulatedSubstreamLength = 0; 1417 1439 for (Int iSubstrmIdx=0; iSubstrmIdx < iNumSubstreams; iSubstrmIdx++) … … 1421 1443 // add bits coded in previous dependent slices + bits coded so far 1422 1444 // add number of emulation prevention byte count in the tile 1423 pcSlice->addTileLocation( ((pcSlice->getTileOffstForMultES() + uiAccumulatedSubstreamLength - uiBitsOriginallyInSubstreams) >> 3) + numStartCodeEmulations);1445 pcSlice->addTileLocation( ((pcSlice->getTileOffstForMultES() + uiAccumulatedSubstreamLength - uiBitsOriginallyInSubstreams) >> 3) + uiCounter ); 1424 1446 } 1425 1447 } -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSlice.h
r362 r438 122 122 Void precompressSlice ( TComPic*& rpcPic ); ///< precompress slice for multi-loop opt. 123 123 Void compressSlice ( TComPic*& rpcPic ); ///< analysis stage of slice 124 Void encodeSlice ( TComPic*& rpcPic, TComOutputBitstream* pcSubstreams );124 Void encodeSlice ( TComPic*& rpcPic, TComOutputBitstream* rpcBitstream, TComOutputBitstream* pcSubstreams ); 125 125 126 126 // misc. functions -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncTop.cpp
r368 r438 81 81 m_pcBitCounters = NULL; 82 82 m_pcRdCosts = NULL; 83 83 84 #if H_MV 84 85 m_ivPicLists = NULL; … … 95 96 Void TEncTop::create () 96 97 { 98 97 99 #if !H_MV 98 100 // initialize global variables … … 286 288 Void TEncTop::init() 287 289 { 290 288 291 // initialize SPS 289 292 xInitSPS(); … … 345 348 } 346 349 #endif 350 347 351 Void TEncTop::deletePicBuffer() 348 352 { … … 371 375 \retval iNumEncoded number of encoded pictures 372 376 */ 377 Void TEncTop::encode(Bool flush, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded 373 378 #if H_MV 374 Void TEncTop::encode(Bool flush, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded , Int gopId ) 375 { 376 #else 377 Void TEncTop::encode(Bool flush, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded ) 378 { 379 #endif 379 , Int gopId 380 #endif 381 ) 382 { 383 380 384 #if H_3D 381 385 TComPic* picLastCoded = getPic( getGOPEncoder()->getPocLastCoded() ); … … 385 389 } 386 390 #endif 391 387 392 #if H_MV 388 393 if( gopId == 0) … … 438 443 m_iNumPicRcvd = 0; 439 444 m_uiNumAllPicCoded += iNumEncoded; 445 440 446 #if H_MV 441 447 } 442 448 #endif 449 443 450 } 444 451 … … 540 547 m_cSPS.setMaxCUHeight ( g_uiMaxCUHeight ); 541 548 m_cSPS.setMaxCUDepth ( g_uiMaxCUDepth ); 542 543 Int minCUSize = m_cSPS.getMaxCUWidth() >> ( m_cSPS.getMaxCUDepth()-g_uiAddCUDepth ); 544 Int log2MinCUSize = 0; 545 while(minCUSize > 1) 546 { 547 minCUSize >>= 1; 548 log2MinCUSize++; 549 } 550 551 m_cSPS.setLog2MinCodingBlockSize(log2MinCUSize); 552 m_cSPS.setLog2DiffMaxMinCodingBlockSize(m_cSPS.getMaxCUDepth()-g_uiAddCUDepth); 549 m_cSPS.setMinTrDepth ( 0 ); 550 m_cSPS.setMaxTrDepth ( 1 ); 553 551 554 552 m_cSPS.setPCMLog2MinSize (m_uiPCMLog2MinSize); … … 565 563 566 564 m_cSPS.setMaxTrSize ( 1 << m_uiQuadtreeTULog2MaxSize ); 567 #if !L0034_COMBINED_LIST_CLEANUP 565 568 566 m_cSPS.setUseLComb ( m_bUseLComb ); 569 #endif570 567 571 568 Int i; … … 719 716 m_cPPS.setOutputFlagPresentFlag( false ); 720 717 m_cPPS.setSignHideFlag(getSignHideFlag()); 721 #if L0386_DB_METRIC722 if ( getDeblockingFilterMetric() )723 {724 m_cPPS.setDeblockingFilterControlPresentFlag (true);725 m_cPPS.setDeblockingFilterOverrideEnabledFlag(true);726 m_cPPS.setPicDisableDeblockingFilterFlag(false);727 m_cPPS.setDeblockingFilterBetaOffsetDiv2(0);728 m_cPPS.setDeblockingFilterTcOffsetDiv2(0);729 }730 else731 {732 718 m_cPPS.setDeblockingFilterControlPresentFlag (m_DeblockingFilterControlPresent ); 733 }734 #else735 m_cPPS.setDeblockingFilterControlPresentFlag (m_DeblockingFilterControlPresent );736 #endif737 719 m_cPPS.setLog2ParallelMergeLevelMinus2 (m_log2ParallelMergeLevelMinus2 ); 738 720 m_cPPS.setCabacInitPresentFlag(CABAC_INIT_PRESENT_FLAG); … … 1006 988 } 1007 989 #endif 1008 1009 } 1010 1011 #if L0208_SOP_DESCRIPTION_SEI 1012 Int TEncTop::getReferencePictureSetIdxForSOP(TComSlice* slice, Int POCCurr, Int GOPid ) 1013 { 1014 int rpsIdx = GOPid; 1015 1016 for(Int extraNum=m_iGOPSize; extraNum<m_extraRPSs+m_iGOPSize; extraNum++) 1017 { 1018 if(m_uiIntraPeriod > 0 && getDecodingRefreshType() > 0) 1019 { 1020 Int POCIndex = POCCurr%m_uiIntraPeriod; 1021 if(POCIndex == 0) 1022 { 1023 POCIndex = m_uiIntraPeriod; 1024 } 1025 if(POCIndex == m_GOPList[extraNum].m_POC) 1026 { 1027 rpsIdx = extraNum; 1028 } 1029 } 1030 else 1031 { 1032 if(POCCurr==m_GOPList[extraNum].m_POC) 1033 { 1034 rpsIdx = extraNum; 1035 } 1036 } 1037 } 1038 1039 return rpsIdx; 1040 } 1041 #endif 990 } 1042 991 1043 992 Void TEncTop::xInitPPSforTiles() … … 1120 1069 } 1121 1070 } 1071 1122 1072 #if H_MV 1123 1073 Void TEncTop::printSummary( Int numAllPicCoded ) … … 1182 1132 } 1183 1133 #endif 1134 1184 1135 //! \} -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncTop.h
r368 r438 63 63 // Class definition 64 64 // ==================================================================================================================== 65 66 65 67 66 68 /// encoder class … … 131 133 TEncAnalyze m_cAnalyzeB; 132 134 #endif 135 133 136 protected: 134 137 Void xGetNewPicBuffer ( TComPic*& rpcPic ); ///< get picture buffer which will be processed … … 145 148 Void create (); 146 149 Void destroy (); 150 147 151 Void init (); 152 148 153 #if H_MV 149 154 TComPicLists* getIvPicLists() { return m_ivPicLists; } 150 155 #endif 156 151 157 Void deletePicBuffer (); 152 158 … … 156 162 Void initNewPic(TComPicYuv* pcPicYuvOrg); 157 163 #endif 164 158 165 // ------------------------------------------------------------------------------------------------------------------- 159 166 // member access functions … … 188 195 TComPPS* getPPS () { return &m_cPPS; } 189 196 Void selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid ); 190 #if L0208_SOP_DESCRIPTION_SEI191 Int getReferencePictureSetIdxForSOP(TComSlice* slice, Int POCCurr, Int GOPid );192 #endif193 197 TComScalingList* getScalingList () { return &m_scalingList; } 198 194 199 #if H_MV 195 200 TEncAnalyze* getAnalyzeAll () { return &m_cAnalyzeAll; } … … 205 210 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 206 211 #endif 212 213 207 214 // ------------------------------------------------------------------------------------------------------------------- 208 215 // encoder function … … 210 217 211 218 /// encode several number of pictures until end-of-sequence 212 #if H_MV213 Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded , Int gopId );214 #else215 219 Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, 216 std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded ); 217 #endif 218 219 #if H_MV 220 Void printSummary ( Int numAllPicCoded ); 220 std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded 221 #if H_MV 222 , Int gopId 223 #endif 224 ); 225 226 #if H_MV 227 void printSummary ( Int numAllPicCoded ); 221 228 #else 222 229 void printSummary() { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded); } 223 230 #endif 231 224 232 }; 225 233 -
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r362 r438 235 235 Int offset = (Int)( ((currDC<<log2Denom) - ((Int64)weight * refDC) + (Int64)realOffset) >> realLog2Denom ); 236 236 237 // Chroma offset range limi tation237 // Chroma offset range limination 238 238 if(comp) 239 239 { 240 Int pred = ( 128 - ( ( 128*weight)>>(log2Denom) ) ); 240 Int shift = 1 << (g_bitDepthC - 1); 241 Int pred = ( shift - ( ( shift*weight)>>(log2Denom) ) ); 241 242 Int deltaOffset = Clip3( -512, 511, (offset - pred) ); // signed 10bit 242 243 offset = Clip3( -128, 127, (deltaOffset + pred) ); // signed 8bit 243 }244 // Luma offset range limitation245 else246 {247 offset = Clip3( -128, 127, offset);248 244 } 249 245
Note: See TracChangeset for help on using the changeset viewer.