Changeset 438 in 3DVCSoftware


Ignore:
Timestamp:
23 May 2013, 15:40:36 (12 years ago)
Author:
tech
Message:

Integrated 3D encoder control, camera parameters, renderer and MV fixes.

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  
    1515EndProject
    1616Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibVideoIO", "vc10\TLibVideoIO_vc10.vcxproj", "{5280C25A-D316-4BE7-AE50-29D72108624F}"
     17EndProject
     18Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppRenderer", "vc10\TAppRenderer_vc10.vcxproj", "{3A5A8B26-8CA4-4690-944E-AB78559DE848}"
     19EndProject
     20Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibRenderer", "vc10\TLibRenderer_vc10.vcxproj", "{2B298BE6-DFF0-4BD2-8F26-395FFE7F9EB4}"
     21EndProject
     22Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc10\TLibExtractor_vc10.vcxproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}"
     23EndProject
     24Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAppExtractor", "vc10\TAppExtractor_vc10.vcxproj", "{F46F95E9-7174-4328-90DD-092450E4DCF6}"
    1725EndProject
    1826Global
     
    8088                {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.ActiveCfg = Release|x64
    8189                {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
    82122        EndGlobalSection
    83123        GlobalSection(SolutionProperties) = preSolution
  • branches/HTM-DEV-0.2-dev/build/HM_vc8.sln

    r324 r438  
    1616                {78018D78-F890-47E3-A0B7-09D273F0B11D} = {78018D78-F890-47E3-A0B7-09D273F0B11D}
    1717                {8783AD3A-A5CA-42B7-AAC4-A07EB845A684} = {8783AD3A-A5CA-42B7-AAC4-A07EB845A684}
     18                {5E87AD84-AC4F-4336-B4EE-549CA210EE4A} = {5E87AD84-AC4F-4336-B4EE-549CA210EE4A}
    1819        EndProjectSection
    1920EndProject
     
    2728EndProject
    2829Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibVideoIO", "vc8\TLibVideoIO_vc8.vcproj", "{5280C25A-D316-4BE7-AE50-29D72108624F}"
     30EndProject
     31Project("{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
     35EndProject
     36Project("{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
     43EndProject
     44Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc8\TLibExtractor_vc8.vcproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}"
     45EndProject
     46Project("{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
    2954EndProject
    3055Global
     
    92117                {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.ActiveCfg = Release|x64
    93118                {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
    94151        EndGlobalSection
    95152        GlobalSection(SolutionProperties) = preSolution
  • branches/HTM-DEV-0.2-dev/build/HM_vc9.sln

    r324 r438  
    1616                {47E90995-1FC5-4EE4-A94D-AD474169F0E1} = {47E90995-1FC5-4EE4-A94D-AD474169F0E1}
    1717                {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5} = {D1E8A1C2-15DB-4C94-80E8-4F70CF0A2DC5}
     18                {457993C6-AE2C-4B9B-B5F9-71033279A0B9} = {457993C6-AE2C-4B9B-B5F9-71033279A0B9}
    1819        EndProjectSection
    1920EndProject
     
    2728EndProject
    2829Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibVideoIO", "vc9\TLibVideoIO_vc9.vcproj", "{5280C25A-D316-4BE7-AE50-29D72108624F}"
     30EndProject
     31Project("{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
     35EndProject
     36Project("{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
     43EndProject
     44Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLibExtractor", "vc9\TLibExtractor_vc9.vcproj", "{27E2C758-E3CE-44CA-A226-83491EC7F798}"
     45EndProject
     46Project("{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
    2954EndProject
    3055Global
     
    92117                {5280C25A-D316-4BE7-AE50-29D72108624F}.Release|x64.ActiveCfg = Release|x64
    93118                {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
    94151        EndGlobalSection
    95152        GlobalSection(SolutionProperties) = preSolution
  • branches/HTM-DEV-0.2-dev/build/linux/app/TAppEncoder/makefile

    r324 r438  
    4141
    4242
    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
     43DYN_DEBUG_LIBS          = -lTLibEncoderd -lTLibCommond -lTLibVideoIOd -lTAppCommond -lTLibRendererd
     44DYN_DEBUG_PREREQS               = $(LIB_DIR)/libTLibEncoderd.a $(LIB_DIR)/libTLibCommond.a $(LIB_DIR)/libTLibVideoIOd.a $(LIB_DIR)/libTAppCommond.a $(LIB_DIR)/libTLibRendererd.a
     45STAT_DEBUG_LIBS         = -lTLibEncoderStaticd -lTLibCommonStaticd -lTLibVideoIOStaticd -lTAppCommonStaticd -lTLibRendererStaticd
     46STAT_DEBUG_PREREQS              = $(LIB_DIR)/libTLibEncoderStaticd.a $(LIB_DIR)/libTLibCommonStaticd.a $(LIB_DIR)/libTLibVideoIOStaticd.a $(LIB_DIR)/libTAppCommonStaticd.a $(LIB_DIR)/libTLibRendererStaticd.a
    4747
    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
     48DYN_RELEASE_LIBS        = -lTLibEncoder -lTLibCommon -lTLibVideoIO -lTAppCommon -lTLibRenderer
     49DYN_RELEASE_PREREQS     = $(LIB_DIR)/libTLibEncoder.a $(LIB_DIR)/libTLibCommon.a $(LIB_DIR)/libTLibVideoIO.a $(LIB_DIR)/libTAppCommon.a $(LIB_DIR)/libTLibRenderer.a
     50STAT_RELEASE_LIBS       = -lTLibEncoderStatic -lTLibCommonStatic -lTLibVideoIOStatic -lTAppCommonStatic -lTLibRendererStatic
     51STAT_RELEASE_PREREQS    = $(LIB_DIR)/libTLibEncoderStatic.a $(LIB_DIR)/libTLibCommonStatic.a $(LIB_DIR)/libTLibVideoIOStatic.a $(LIB_DIR)/libTAppCommonStatic.a $(LIB_DIR)/libTLibRendererStatic.a
    5252
    5353
  • branches/HTM-DEV-0.2-dev/build/linux/lib/TAppCommon/makefile

    r324 r438  
    3434OBJS            = \
    3535                        $(OBJ_DIR)/program_options_lite.o \
     36                        $(OBJ_DIR)/TAppComCamPara.o \
    3637
    3738LIBS                            = -lpthread
  • branches/HTM-DEV-0.2-dev/build/linux/makefile

    r324 r438  
    99        $(MAKE) -C lib/TLibDecoder      MM32=$(M32)
    1010        $(MAKE) -C lib/TLibEncoder      MM32=$(M32)
     11        $(MAKE) -C lib/TLibRenderer  MM32=$(M32)
     12        $(MAKE) -C lib/TLibExtractor  MM32=$(M32)
    1113        $(MAKE) -C lib/TAppCommon       MM32=$(M32)
    1214        $(MAKE) -C app/TAppDecoder      MM32=$(M32)
    1315        $(MAKE) -C app/TAppEncoder      MM32=$(M32)
     16        $(MAKE) -C app/TAppRenderer     MM32=$(M32)
     17        $(MAKE) -C app/TAppExtractor    MM32=$(M32)
    1418        $(MAKE) -C utils/annexBbytecount       MM32=$(M32)
    1519        $(MAKE) -C utils/convert_NtoMbit_YCbCr MM32=$(M32)
     
    2024        $(MAKE) -C lib/TLibDecoder      debug MM32=$(M32)
    2125        $(MAKE) -C lib/TLibEncoder      debug MM32=$(M32)
     26        $(MAKE) -C lib/TLibRenderer  debug      MM32=$(M32)
     27        $(MAKE) -C lib/TLibExtractor  debug     MM32=$(M32)
    2228        $(MAKE) -C lib/TAppCommon       debug MM32=$(M32)
    2329        $(MAKE) -C app/TAppDecoder      debug MM32=$(M32)
    2430        $(MAKE) -C app/TAppEncoder      debug MM32=$(M32)
     31        $(MAKE) -C app/TAppRenderer     debug MM32=$(M32)
     32        $(MAKE) -C app/TAppExtractor    debug MM32=$(M32)
    2533        $(MAKE) -C utils/annexBbytecount       debug MM32=$(M32)
    2634        $(MAKE) -C utils/convert_NtoMbit_YCbCr debug MM32=$(M32)
     
    3139        $(MAKE) -C lib/TLibDecoder      release MM32=$(M32)
    3240        $(MAKE) -C lib/TLibEncoder      release MM32=$(M32)
     41        $(MAKE) -C lib/TLibRenderer  release MM32=$(M32)
     42        $(MAKE) -C lib/TLibExtractor  release MM32=$(M32)
    3343        $(MAKE) -C lib/TAppCommon       release MM32=$(M32)
    3444        $(MAKE) -C app/TAppDecoder      release MM32=$(M32)
    3545        $(MAKE) -C app/TAppEncoder      release MM32=$(M32)
     46        $(MAKE) -C app/TAppRenderer    release MM32=$(M32)     
     47        $(MAKE) -C app/TAppExtractor    release MM32=$(M32)     
    3648        $(MAKE) -C utils/annexBbytecount       release MM32=$(M32)
    3749        $(MAKE) -C utils/convert_NtoMbit_YCbCr release MM32=$(M32)
     
    4254        $(MAKE) -C lib/TLibDecoder      clean MM32=$(M32)
    4355        $(MAKE) -C lib/TLibEncoder      clean MM32=$(M32)
     56        $(MAKE) -C lib/TLibRenderer  clean MM32=$(M32)
     57        $(MAKE) -C lib/TLibExtractor  clean MM32=$(M32)
    4458        $(MAKE) -C lib/TAppCommon       clean MM32=$(M32)
    4559        $(MAKE) -C app/TAppDecoder      clean MM32=$(M32)
    4660        $(MAKE) -C app/TAppEncoder      clean MM32=$(M32)
     61        $(MAKE) -C app/TAppRenderer    clean MM32=$(M32)       
     62        $(MAKE) -C app/TAppExtractor    clean MM32=$(M32)       
    4763        $(MAKE) -C utils/annexBbytecount       clean MM32=$(M32)
    4864        $(MAKE) -C utils/convert_NtoMbit_YCbCr clean MM32=$(M32)
  • branches/HTM-DEV-0.2-dev/build/vc10/TAppCommon_vc10.vcxproj

    r324 r438  
    145145  <ItemGroup>
    146146    <ClCompile Include="..\..\source\Lib\TAppCommon\program_options_lite.cpp" />
     147    <ClCompile Include="..\..\source\Lib\TAppCommon\TAppComCamPara.cpp" />
    147148  </ItemGroup>
    148149  <ItemGroup>
    149150    <ClInclude Include="..\..\source\Lib\TAppCommon\program_options_lite.h" />
     151    <ClInclude Include="..\..\source\Lib\TAppCommon\TAppComCamPara.h" />
    150152  </ItemGroup>
    151153  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  • branches/HTM-DEV-0.2-dev/build/vc10/TAppEncoder_vc10.vcxproj

    r324 r438  
    189189      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
    190190    </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>
    191199    <ProjectReference Include="TLibVideoIO_vc10.vcxproj">
    192200      <Project>{5280c25a-d316-4be7-ae50-29d72108624f}</Project>
  • branches/HTM-DEV-0.2-dev/build/vc8/TAppCommon_vc8.vcproj

    r324 r438  
    283283                                >
    284284                        </File>
     285                        <File
     286                                RelativePath="..\..\source\Lib\TAppCommon\TAppComCamPara.cpp"
     287                                >
     288                        </File>
    285289                </Filter>
    286290                <Filter
     
    290294                        <File
    291295                                RelativePath="..\..\source\Lib\TAppCommon\program_options_lite.h"
     296                                >
     297                        </File>
     298                        <File
     299                                RelativePath="..\..\source\Lib\TAppCommon\TAppComCamPara.h"
    292300                                >
    293301                        </File>
  • branches/HTM-DEV-0.2-dev/build/vc9/TAppCommon_vc9.vcproj

    r324 r438  
    286286                                >
    287287                        </File>
     288                        <File
     289                                RelativePath="..\..\source\Lib\TAppCommon\TAppComCamPara.cpp"
     290                                >
     291                        </File>
    288292                </Filter>
    289293                <Filter
     
    293297                        <File
    294298                                RelativePath="..\..\source\Lib\TAppCommon\program_options_lite.h"
     299                                >
     300                        </File>
     301                        <File
     302                                RelativePath="..\..\source\Lib\TAppCommon\TAppComCamPara.h"
    295303                                >
    296304                        </File>
  • branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/baseCfg_2view+depth.cfg

    r371 r438  
    105105Frame8_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 
    106106
     107ListCombination               : 1           # Use combined list for uni-prediction in B-slices
     108
    107109#=========== Motion Search =============
    108110FastSearch                    : 1           # 0:Full search  1:TZ search
     
    124126LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    125127LoopFilterDisable             : 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)
     128LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     129LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    129130
    130131
  • branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/baseCfg_2view.cfg

    r371 r438  
    5757Frame8_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
    5858
     59ListCombination               : 1           # Use combined list for uni-prediction in B-slices
     60
    5961#=========== Motion Search =============
    6062FastSearch                    : 1           # 0:Full search  1:TZ search
     
    7779LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    7880LoopFilterDisable             : 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)
     81LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     82LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    8283
    8384
  • branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r371 r438  
    105105Frame8_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 
    106106
     107ListCombination               : 1           # Use combined list for uni-prediction in B-slices
     108
    107109#=========== Motion Search =============
    108110FastSearch                    : 1           # 0:Full search  1:TZ search
     
    124126LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    125127LoopFilterDisable             : 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)
     128LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     129LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
     130
    129131
    130132#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/baseCfg_3view.cfg

    r371 r438  
    6969Frame8_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
    7070
     71ListCombination               : 1           # Use combined list for uni-prediction in B-slices
     72
    7173#=========== Motion Search =============
    7274FastSearch                    : 1           # 0:Full search  1:TZ search
     
    8991LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    9092LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter) (mc)
    91 LoopFilterBetaOffset_div2     : 0           # base_param: -6 ~ 6
    92 LoopFilterTcOffset_div2       : 0           # base_param: -6 ~ 6
    93 DeblockingFilterMetric        : 0           # blockiness metric (automatically configures deblocking parameters in bitstream)
     93LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     94LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
     95
    9496
    9597#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/3D-HEVC/fullCfg.cfg

    r371 r438  
    109109Frame8_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 
    110110
     111ListCombination               : 1           # Use combined list for uni-prediction in B-slices
     112
    111113#=========== Motion Search =============
    112114FastSearch                    : 1           # 0:Full search  1:TZ search
     
    129131LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    130132LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter) (mc)
    131 LoopFilterBetaOffset_div2     : 0           # base_param: -6 ~ 6
    132 LoopFilterTcOffset_div2       : 0           # base_param: -6 ~ 6
    133 DeblockingFilterMetric        : 0           # blockiness metric (automatically configures deblocking parameters in bitstream)
     133LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     134LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
     135
    134136
    135137#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_intra_main.cfg

    r371 r438  
    3939LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    4040LoopFilterDisable             : 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)
     41LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     42LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    4443
    4544#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_intra_main10.cfg

    r371 r438  
    3939LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    4040LoopFilterDisable             : 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)
     41LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     42LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    4443
    4544#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_lowdelay_P_main.cfg

    r371 r438  
    2323Frame3:  P    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1           
    2424Frame4:  P    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
     25ListCombination               : 1           # Use combined list for uni-prediction in B-slices
    2526
    2627#=========== Motion Search =============
     
    4445LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    4546LoopFilterDisable             : 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)
     47LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     48LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    4949
    5050#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_lowdelay_P_main10.cfg

    r371 r438  
    2323Frame3:  P    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1           
    2424Frame4:  P    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
     25ListCombination               : 1           # Use combined list for uni-prediction in B-slices
    2526
    2627#=========== Motion Search =============
     
    4647LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    4748LoopFilterDisable             : 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)
     49LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     50LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    5151
    5252#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_lowdelay_main.cfg

    r371 r438  
    2323Frame3:  B    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1           
    2424Frame4:  B    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
     25ListCombination               : 1           # Use combined list for uni-prediction in B-slices
    2526
    2627#=========== Motion Search =============
     
    4445LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    4546LoopFilterDisable             : 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)
     47LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     48LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    4949
    5050#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_lowdelay_main10.cfg

    r371 r438  
    2323Frame3:  B    3   3        0.4624   0            0               0           4                4         -1 -3 -7 -11       1      -1       5         0 1 1 1 1           
    2424Frame4:  B    4   1        0.578    0            0               0           4                4         -1 -4 -8 -12       1      -1       5         0 1 1 1 1
     25ListCombination               : 1           # Use combined list for uni-prediction in B-slices
    2526
    2627#=========== Motion Search =============
     
    4445LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    4546LoopFilterDisable             : 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)
     47LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     48LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    4949
    5050#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_randomaccess_main.cfg

    r371 r438  
    2727Frame7:  B    5   4        0.68     0            0              0           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1 
    2828Frame8:  B    7   4        0.68     0            0              0           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
     29ListCombination               : 1           # Use combined list for uni-prediction in B-slices
    2930
    3031#=========== Motion Search =============
     
    4849LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    4950LoopFilterDisable             : 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)
     51LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     52LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
     53
    5354
    5455#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/HEVC/HM/encoder_randomaccess_main10.cfg

    r371 r438  
    2727Frame7:  B    5   4        0.68     0            0              0           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1 
    2828Frame8:  B    7   4        0.68     0            0              0           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
     29ListCombination               : 1           # Use combined list for uni-prediction in B-slices
    2930
    3031#=========== Motion Search =============
     
    4849LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    4950LoopFilterDisable             : 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)
     51LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     52LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    5353
    5454#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/MV-HEVC/baseCfg_2view.cfg

    r371 r438  
    5757Frame8_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
    5858
     59ListCombination               : 1           # Use combined list for uni-prediction in B-slices
     60
    5961#=========== Motion Search =============
    6062FastSearch                    : 1           # 0:Full search  1:TZ search
     
    7779LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    7880LoopFilterDisable             : 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)
     81LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     82LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
    8283
    8384
  • branches/HTM-DEV-0.2-dev/cfg/MV-HEVC/baseCfg_3view.cfg

    r371 r438  
    6969Frame8_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
    7070
     71ListCombination               : 1           # Use combined list for uni-prediction in B-slices
     72
    7173#=========== Motion Search =============
    7274FastSearch                    : 1           # 0:Full search  1:TZ search
     
    8991LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    9092LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter) (mc)
    91 LoopFilterBetaOffset_div2     : 0           # base_param: -6 ~ 6
    92 LoopFilterTcOffset_div2       : 0           # base_param: -6 ~ 6
    93 DeblockingFilterMetric        : 0           # blockiness metric (automatically configures deblocking parameters in bitstream)
     93LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     94LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
     95
    9496
    9597#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/cfg/MV-HEVC/fullCfg.cfg

    r371 r438  
    7373Frame8_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
    7474
     75ListCombination               : 1           # Use combined list for uni-prediction in B-slices
     76
    7577#=========== Motion Search =============
    7678FastSearch                    : 1           # 0:Full search  1:TZ search
     
    9395LoopFilterOffsetInPPS         : 0           # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1=constant params in PPS, param = base_param)
    9496LoopFilterDisable             : 0           # Disable deblocking filter (0=Filter, 1=No Filter) (mc)
    95 LoopFilterBetaOffset_div2     : 0           # base_param: -6 ~ 6
    96 LoopFilterTcOffset_div2       : 0           # base_param: -6 ~ 6
    97 DeblockingFilterMetric        : 0           # blockiness metric (automatically configures deblocking parameters in bitstream)
     97LoopFilterBetaOffset_div2     : 0           # base_param: -13 ~ 13
     98LoopFilterTcOffset_div2       : 0           # base_param: -13 ~ 13
     99
    98100
    99101#=========== Misc. ============
  • branches/HTM-DEV-0.2-dev/doc/Doxyfile

    r362 r438  
    3333# if some version control system is used.
    3434
    35 PROJECT_NUMBER         = HM-10.1
     35PROJECT_NUMBER         = HM-10.0
    3636
    3737# 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  
    4545#include <cassert>
    4646#endif
     47
    4748#ifdef WIN32
    4849#define strdup _strdup
     
    7879  ("OutputBitDepth,d", m_outputBitDepthY, 0, "bit depth of YUV output luma component (default: use 0 for native depth)")
    7980  ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)")
     81
    8082#if H_MV
    8183  ("MaxLayerId,-ls", m_maxLayerId, MAX_NUM_LAYER_IDS-1, "Maximum LayerId to be decoded.")
    8284#endif
     85
    8386  ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers")
    8487  ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n"
     
    105108  /* convert std::string to c string for compatability */
    106109  m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
     110
    107111  m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
    108112
     
    187191}
    188192#endif
     193
    189194//! \}
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r401 r438  
    5454
    5555TAppDecTop::TAppDecTop()
     56
    5657#if !H_MV
    5758: m_iPOCLastDisplay(-MAX_INT)
     
    5960: m_numDecoders( 0 )
    6061#endif
     62
    6163{
    6264  ::memset (m_abDecFlag, 0, sizeof (m_abDecFlag));
     
    7779    m_pchBitstreamFile = NULL;
    7880  }
     81
    7982#if H_MV
    8083  for (Int decIdx = 0; decIdx < m_numDecoders; decIdx++)
     
    112115  poc = -1;
    113116#endif
     117
    114118  TComList<TComPic*>* pcListPic = NULL;
    115119
     
    143147  Bool firstSlice        = true;
    144148#endif
     149
    145150 
    146151  while (!!bitstreamFile)
     
    151156     * nal unit. */
    152157    streampos location = bitstreamFile.tellg();
    153 #if H_MV
    154 #if ENC_DEC_TRACE
    155     Int64 symCount = g_nSymbolCounter;
    156 #endif
    157 #endif
    158158    AnnexBStats stats = AnnexBStats();
    159159#if !H_MV
    160160    Bool bPreviousPictureDecoded = false;
    161161#endif
    162 
    163162    vector<uint8_t> nalUnit;
    164163    InputNALUnit nalu;
     
    251250          bitstreamFile.seekg(location-streamoff(3));
    252251          bytestream.reset();
    253 #if H_MV
    254 #if ENC_DEC_TRACE
    255           g_nSymbolCounter = symCount;
    256 #endif
    257 #endif
    258 
    259252        }
    260253#if !H_MV
     
    283276    }
    284277#endif
    285 
    286278    if( pcListPic )
    287279    {
     
    294286        if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; }
    295287        if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; }
    296 
    297288#if H_MV
    298289        m_tVideoIOYuvReconFile[decIdxLastPic]->open( m_pchReconFiles[decIdxLastPic], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode
     
    306297      if ( bNewPicture &&
    307298#endif
    308            (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
     299           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR
    309300            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
    310301            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
    311             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL
    312             || 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 ) )
    313304      {
    314305#if H_MV
     
    602593}
    603594
    604 #if H_MV
    605 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   else
    613   {     
    614     assert ( createFlag );
    615     assert( m_numDecoders < MAX_NUM_LAYERS );
    616 
    617     decIdx = m_numDecoders;
    618 
    619     // Init decoder
    620     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 PicLists
    628     assert( m_ivPicLists.size() == m_numDecoders );
    629     m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
    630 
    631     // create recon file related stuff     
    632     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 others
    648     m_pocLastDisplay      [ decIdx ] = -MAX_INT;
    649     m_layerIdToDecIdx     [ layerId ] = decIdx;
    650 
    651     m_numDecoders++;
    652   };
    653   return decIdx;
    654 }
    655 #endif
    656595//! \}
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.h

    r401 r438  
    7474  // for output control
    7575  Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
     76
    7677#if H_MV
    7778  Int                             m_pocLastDisplay      [ MAX_NUM_LAYERS ]; ///< last POC in display order
     
    8990  Void  decode            (); ///< main decoding function
    9091 
     92
    9193protected:
    9294  Void  xCreateDecLib     (); ///< create internal classes
     
    9799  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
    98100  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  }
    100151#else
    101152  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file
    102153  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file
    103154#endif
     155
    104156  Bool  isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
    105157};
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r368 r438  
    7979  m_aidQP = NULL;
    8080#endif
    81 #if J0149_TONE_MAPPING_SEI
    82   m_startOfCodedInterval = NULL;
    83   m_codedPivotValue = NULL;
    84   m_targetPivotValue = NULL;
    85 #endif
    8681}
    8782
     
    107102    delete[] m_aidQP;
    108103  }
    109 #endif
    110 #if J0149_TONE_MAPPING_SEI
    111   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 #endif
    127 #if !H_MV
    128104  free(m_pchInputFile);
    129105#endif
     106
    130107  free(m_pchBitstreamFile);
     108
    131109#if H_MV
    132110  for(Int i = 0; i< m_pchReconFileList.size(); i++ )
     
    138116  free(m_pchReconFile);
    139117#endif
     118
    140119  free(m_pchdQPFile);
    141120  free(m_pColumnWidth);
    142121  free(m_pRowHeight);
    143122  free(m_scalingListFile);
     123
    144124#if H_MV
    145125  for( Int i = 0; i < m_GOPListMvc.size(); i++ )
     
    320300  string cfg_InputFile;
    321301#endif
     302
    322303  string cfg_BitstreamFile;
     304
    323305#if !H_MV
    324306  string cfg_ReconFile;
    325307#endif
     308
    326309#if H_MV
    327310  vector<Int>   cfg_dimensionLength;
     
    333316#endif
    334317#endif
     318
    335319  string cfg_dQPFile;
    336320  string cfg_ColumnWidth;
    337321  string cfg_RowHeight;
    338322  string cfg_ScalingListFile;
    339 #if J0149_TONE_MAPPING_SEI
    340   string cfg_startOfCodedInterval;
    341   string cfg_codedPivotValue;
    342   string cfg_targetPivotValue;
    343 #endif
    344323#if SIGNAL_BITRATE_PICRATE_IN_VPS
    345324  string cfg_bitRateInfoPresentFlag;
     
    356335 
    357336  // File, I/O and source parameters
     337
    358338#if H_MV
    359339  ("InputFile_%d,i_%d",       m_pchInputFileList,       (char *) 0 , MAX_NUM_LAYER_IDS , "original Yuv input file name %d")
     
    361341  ("InputFile,i",           cfg_InputFile,     string(""), "Original YUV input file name")
    362342#endif
     343
    363344  ("BitstreamFile,b",       cfg_BitstreamFile, string(""), "Bitstream output file name")
     345
    364346#if H_MV
    365347  ("ReconFile_%d,o_%d",       m_pchReconFileList,       (char *) 0 , MAX_NUM_LAYER_IDS , "reconstructed Yuv output file name %d")
     
    367349  ("ReconFile,o",           cfg_ReconFile,     string(""), "Reconstructed YUV output file name")
    368350#endif
     351
    369352#if H_MV
    370353  ("NumberOfLayers",        m_numberOfLayers     , 1,                     "Number of layers")
     
    382365  ("SplittingFlag",         m_splittingFlag      , false                , "Splitting Flag")   
    383366#endif
     367
    384368  ("SourceWidth,-wdt",      m_iSourceWidth,        0, "Source picture width")
    385369  ("SourceHeight,-hgt",     m_iSourceHeight,       0, "Source picture height")
     
    403387
    404388  // Profile and level
     389
    405390  ("Profile", m_profile,   Profile::NONE, "Profile to be used when encoding (Incomplete)")
    406391  ("Level",   m_level,     Level::NONE,   "Level limit to be used, eg 5.1 (Incomplete)")
     
    432417  ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR)")
    433418  ("GOPSize,g",               m_iGOPSize,                   1, "GOP size of temporal structure")
    434 #if !L0034_COMBINED_LIST_CLEANUP
    435419  ("ListCombination,-lc",     m_bUseLComb,               true, "Combined reference list for uni-prediction estimation in B-slices")
    436 #endif
    437420  // motion options
    438421  ("FastSearch",              m_iFastSearch,                1, "0:Full search  1:Diamond  2:PMVFAST")
     
    490473  ("LoopFilterTcOffset_div2",        m_loopFilterTcOffsetDiv2,             0 )
    491474  ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false )
    492 #if L0386_DB_METRIC
    493   ("DeblockingFilterMetric",         m_DeblockingFilterMetric,         false )
    494 #endif
    495475
    496476  // Coding tools
     
    611591  ("SEIBufferingPeriod",             m_bufferingPeriodSEIEnabled,              0, "Control generation of buffering period SEI messages")
    612592  ("SEIPictureTiming",               m_pictureTimingSEIEnabled,                0, "Control generation of picture timing SEI messages")
    613 #if J0149_TONE_MAPPING_SEI
    614   ("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 #endif
    645593  ("SEIFramePacking",                m_framePackingSEIEnabled,                 0, "Control generation of frame packing SEI messages")
    646594  ("SEIFramePackingType",            m_framePackingSEIType,                    0, "Define frame packing arrangement\n"
     
    663611  ("SEIGradualDecodingRefreshInfo",  m_gradualDecodingRefreshInfoEnabled,      0, "Control generation of gradual decoding refresh information SEI message")
    664612  ("SEIDecodingUnitInfo",             m_decodingUnitInfoSEIEnabled,                       0, "Control generation of decoding unit information SEI message.")
    665 #if L0208_SOP_DESCRIPTION_SEI
    666   ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
    667 #endif
    668 #if K0180_SCALABLE_NESTING_SEI
    669   ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
    670 #endif
    671613#if SIGNAL_BITRATE_PICRATE_IN_VPS
    672614  ("BitRatePicRateMaxTLayers",   m_bitRatePicRateMaxTLayers,           0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file")
     
    719661  }
    720662#endif
     663
    721664  po::setDefaults(opts);
    722665  const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv);
     
    738681   */
    739682  /* convert std::string to c string for compatability */
     683
    740684#if !H_MV
    741685  m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str());
    742686#endif
     687
    743688  m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
     689
    744690#if !H_MV
    745691  m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
    746692#endif
     693
    747694  m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());
    748695 
     
    808755  free ( pRowHeight   );
    809756#endif
     757
    810758#if SIGNAL_BITRATE_PICRATE_IN_VPS
    811759  readBoolString(cfg_bitRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_bitRateInfoPresentFlag, "bit rate info. present flag" );
     
    966914  m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;
    967915
    968 #if J0149_TONE_MAPPING_SEI
    969   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     else
    990     {
    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     else
    1022     {
    1023       m_codedPivotValue = NULL;
    1024       m_targetPivotValue = NULL;
    1025     }
    1026   }
    1027 #endif
    1028916  // check validity of input parameters
    1029917  xCheckParameter();
     
    11251013  xConfirmPara( m_iFrameRate <= 0,                                                          "Frame rate must be more than 1" );
    11261014  xConfirmPara( m_framesToBeEncoded <= 0,                                                   "Total Number Of Frames encoded must be more than 0" );
     1015
    11271016#if H_MV
    11281017  xConfirmPara( m_numberOfLayers > MAX_NUM_LAYER_IDS ,                                      "NumberOfLayers must be less than or equal to MAX_NUM_LAYER_IDS");
     
    11371026  xConfirmPara( m_scalabilityMask != 1 , "Scalability Mask must be equal to 1. ");
    11381027#endif
    1139  
     1028  
    11401029  m_dimIds.push_back( m_viewId );
    11411030#if H_3D
     
    11941083
    11951084#endif
     1085
     1086
    11961087  xConfirmPara( m_iGOPSize < 1 ,                                                            "GOP Size must be greater or equal to 1" );
    11971088  xConfirmPara( m_iGOPSize > 1 &&  m_iGOPSize % 2,                                          "GOP Size must be a multiple of 2, if GOP Size is greater than 1" );
     
    14571348      Int*      m_numReorderPics     = m_numReorderPicsMvc    [layer]; // It is not a member, but this name helps avoiding code duplication !!!
    14581349#endif
     1350
    14591351  /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure
    14601352   * This permits the ability to omit a GOP structure specification */
     
    17171609  {
    17181610    m_numReorderPics[i] = 0;
    1719 #if L0323_DPB
    1720     m_maxDecPicBuffering[i] = 1;
    1721 #else
    17221611    m_maxDecPicBuffering[i] = 0;
    1723 #endif
    17241612  }
    17251613  for(Int i=0; i<m_iGOPSize; i++)
    17261614  {
    1727 #if L0323_DPB
    1728     if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])
    1729 #else
    17301615    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    {
    17361617      m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics;
    1737 #endif
    17381618    }
    17391619    Int highestDecodingNumberWithLowerPOC = 0;
     
    17661646      m_numReorderPics[i+1] = m_numReorderPics[i];
    17671647    }
    1768 #if L0323_DPB
    1769     // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive
    1770     if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1)
    1771     {
    1772       m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1;
    1773     }
    1774 #else
    17751648    // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
    17761649    if(m_numReorderPics[i] > m_maxDecPicBuffering[i])
     
    17781651      m_maxDecPicBuffering[i] = m_numReorderPics[i];
    17791652    }
    1780 #endif
    17811653    // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer
    17821654    if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i])
     
    17851657    }
    17861658  }
    1787 
    1788 
    1789 #if L0323_DPB
    1790   // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] -  1, inclusive
    1791   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 #else
    17961659  // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
    17971660  if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1])
     
    17991662    m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1];
    18001663  }
    1801 #endif
    18021664
    18031665  if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag)
     
    18741736    }
    18751737  }
    1876 #if !L0034_COMBINED_LIST_CLEANUP
    18771738  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 #endif
    18791739  xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" );
    18801740  xConfirmPara( m_iWaveFrontSubstreams <= 0, "WaveFrontSubstreams must be positive" );
     
    18831743  xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n");
    18841744
    1885 #if J0149_TONE_MAPPING_SEI
    1886   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 #endif
    1897 
    18981745#if RATE_CONTROL_LAMBDA_DOMAIN
    18991746  if ( m_RCEnableRateControl )
     
    19321779  }
    19331780#endif
     1781
    19341782#if H_MV
    19351783  }
     
    19791827  printf("Input          File          : %s\n", m_pchInputFile          );
    19801828#endif
     1829
    19811830  printf("Bitstream      File          : %s\n", m_pchBitstreamFile      );
     1831
    19821832#if H_MV
    19831833  for( Int layer = 0; layer < m_numberOfLayers; layer++)
     
    19881838  printf("Reconstruction File          : %s\n", m_pchReconFile          );
    19891839#endif
     1840
    19901841#if H_MV
    19911842 xPrintParaVector( "ViewId", m_viewId );
    19921843#endif
     1844
    19931845#if H_3D
    19941846 xPrintParaVector( "DepthFlag", m_depthFlag );
    19951847#endif
     1848
    19961849#if H_MV 
    19971850  xPrintParaVector( "QP"               , m_fQP                );
     
    20551908  printf("SQP:%d ", m_uiDeltaQpRD         );
    20561909  printf("ASR:%d ", m_bUseASR             );
    2057 #if !L0034_COMBINED_LIST_CLEANUP
    20581910  printf("LComb:%d ", m_bUseLComb         );
    2059 #endif
    20601911  printf("FEN:%d ", m_bUseFastEnc         );
    20611912  printf("ECU:%d ", m_bUseEarlyCU         );
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.h

    r368 r438  
    6060  Char*     m_pchInputFile;                                   ///< source file name
    6161#endif
     62
    6263  Char*     m_pchBitstreamFile;                               ///< output bitstream file
     64
    6365#if H_MV
    6466  std::vector<char*>     m_pchReconFileList;                  ///< output reconstruction file names
     
    6769  Char*     m_pchReconFile;                                   ///< output reconstruction file
    6870#endif
     71
     72
    6973  // VPS specification
    7074#if H_MV
     
    7983  std::vector<Int>       m_dimensionIdLen;                   ///< Length of scalability dimension s
    8084#endif
     85
     86
    8187  Double    m_adLambdaModifier[ MAX_TLAYER ];                 ///< Lambda modifier array for each temporal layer
    8288  // source specification
     
    97103  Level::Tier   m_levelTier;
    98104  Level::Name   m_level;
     105
    99106#if L0046_CONSTRAINT_FLAGS
    100107  Bool m_progressiveSourceFlag;
     
    117124  GOPEntry  m_GOPList[MAX_GOP];                               ///< the coding structure entries from the config file
    118125  Int       m_numReorderPics[MAX_TLAYER];                     ///< total number of reorder pictures
    119 #if L0323_DPB
    120   Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of pictures in the decoded picture buffer
    121 #else
    122126  Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of reference pictures needed for decoding
    123127#endif
    124 #endif
    125 #if !L0034_COMBINED_LIST_CLEANUP
    126128  Bool      m_bUseLComb;                                      ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421)
    127 #endif
    128129  Bool      m_useTransformSkip;                               ///< flag for enabling intra transform skipping
    129130  Bool      m_useTransformSkipFast;                           ///< flag for enabling fast intra transform skipping
     
    206207  Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
    207208  Bool      m_DeblockingFilterControlPresent;                 ///< deblocking filter control present flag in PPS
    208 #if L0386_DB_METRIC
    209   Bool      m_DeblockingFilterMetric;                         ///< blockiness metric in encoder
    210 #endif
    211209 
    212210  // coding tools (PCM)
     
    258256  Int       m_bufferingPeriodSEIEnabled;
    259257  Int       m_pictureTimingSEIEnabled;
    260 #if J0149_TONE_MAPPING_SEI
    261   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 #endif
    287258  Int       m_framePackingSEIEnabled;
    288259  Int       m_framePackingSEIType;
     
    294265  Int       m_gradualDecodingRefreshInfoEnabled;
    295266  Int       m_decodingUnitInfoSEIEnabled;
    296 #if L0208_SOP_DESCRIPTION_SEI
    297   Int       m_SOPDescriptionSEIEnabled;
    298 #endif
    299 #if K0180_SCALABLE_NESTING_SEI
    300   Int       m_scalableNestingSEIEnabled;
    301 #endif
    302267  // weighted prediction
    303268  Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
     
    372337  Void  xPrintParameter ();                                   ///< print configuration values
    373338  Void  xPrintUsage     ();                                   ///< print usage
     339
    374340#if H_MV
    375341  template <typename T>
     
    422388  Int*      m_constantPicRateIdc;                                ///< Indicates constant picture rate idc for various sub-layers
    423389#endif
     390 
    424391#if H_MV
    425392  Int   getGOPSize() { return m_iGOPSize; }
    426393#endif
     394
    427395public:
    428396  TAppEncCfg();
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r370 r438  
    111111  }
    112112#endif
     113
    113114#if H_MV
    114115  xSetLayerIds             ( vps );   
     
    135136    m_cTEncTop.setIvPicLists  ( &m_ivPicLists );
    136137#endif
     138
    137139  m_cTEncTop.setVPS(&vps);
    138140
    139141  m_cTEncTop.setProfile(m_profile);
    140142  m_cTEncTop.setLevel(m_levelTier, m_level);
     143
    141144#if L0046_CONSTRAINT_FLAGS
    142145  m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag);
     
    183186  m_cTEncTop.setQP                           ( m_iQP );
    184187#endif
    185 
    186188  m_cTEncTop.setPad                          ( m_aiPad );
    187 
     189   
    188190#if H_MV
    189191  m_cTEncTop.setMaxTempLayer                 ( m_maxTempLayerMvc[layer] );
     
    205207  m_cTEncTop.setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
    206208  m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
    207 #if L0386_DB_METRIC
    208   m_cTEncTop.setDeblockingFilterMetric       ( m_DeblockingFilterMetric );
    209 #endif
    210209
    211210  //====== Motion search ========
     
    227226  Int lowestQP;
    228227  lowestQP =  - 6*(g_bitDepthY - 8); // XXX: check
    229 
    230228#if H_MV
    231229  if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layer] == lowestQP) && (m_useLossless == true))
     
    245243  m_cTEncTop.setUseHADME                     ( m_bUseHADME    );
    246244  m_cTEncTop.setUseLossless                  ( m_useLossless );
    247 #if !L0034_COMBINED_LIST_CLEANUP
    248245  m_cTEncTop.setUseLComb                     ( m_bUseLComb    );
    249 #endif
    250246#if H_MV
    251247  m_cTEncTop.setdQPs                         ( m_aidQP[layer]   );
     
    325321  m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled );
    326322  m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled );
    327 #if J0149_TONE_MAPPING_SEI
    328   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 #endif
    354323  m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled );
    355324  m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType );
     
    361330  m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled );
    362331  m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled );
    363 #if L0208_SOP_DESCRIPTION_SEI
    364   m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
    365 #endif
    366 #if K0180_SCALABLE_NESTING_SEI
    367   m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
    368 #endif
    369332  m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    370333  m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
     
    461424  }
    462425#endif
    463 #if H_MV
    464   }
    465 #endif
     426
     427#if H_MV
     428  }
     429#endif
     430
    466431}
    467432
     
    718683}
    719684#endif
     685
    720686// ====================================================================================================================
    721687// Protected member functions
     
    728694 .
    729695 */
     696
    730697#if H_MV
    731698Void TAppEncTop::xGetBuffer( TComPicYuv*& rpcPicYuvRec, UInt layer)
     
    755722
    756723  }
     724
    757725#if H_MV
    758726  m_picYuvRec[layer]->pushBack( rpcPicYuvRec );
     
    764732Void TAppEncTop::xDeleteBuffer( )
    765733{
     734
    766735#if H_MV
    767736  for(Int layer=0; layer<m_picYuvRec.size(); layer++)
     
    788757  }
    789758#endif 
     759
    790760}
    791761
     
    817787  {
    818788    TComPicYuv*  pcPicYuvRec  = *(iterPicYuvRec++);
     789
    819790#if H_MV
    820791      if (m_pchReconFileList[layerId])
     
    844815  }
    845816#endif
     817
    846818}
    847819
     
    860832    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    861833    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    862     case NAL_UNIT_CODED_SLICE_TLA_R:
     834    case NAL_UNIT_CODED_SLICE_TLA:
    863835    case NAL_UNIT_CODED_SLICE_TSA_N:
    864836    case NAL_UNIT_CODED_SLICE_STSA_R:
    865837    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:
    868840    case NAL_UNIT_CODED_SLICE_BLA_N_LP:
    869     case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
     841    case NAL_UNIT_CODED_SLICE_IDR:
    870842    case NAL_UNIT_CODED_SLICE_IDR_N_LP:
    871843    case NAL_UNIT_CODED_SLICE_CRA:
    872844    case NAL_UNIT_CODED_SLICE_RADL_N:
    873     case NAL_UNIT_CODED_SLICE_RADL_R:
     845    case NAL_UNIT_CODED_SLICE_DLP:
    874846    case NAL_UNIT_CODED_SLICE_RASL_N:
    875     case NAL_UNIT_CODED_SLICE_RASL_R:
     847    case NAL_UNIT_CODED_SLICE_TFD:
    876848    case NAL_UNIT_VPS:
    877849    case NAL_UNIT_SPS:
     
    889861void TAppEncTop::printRateSummary()
    890862{
     863
    891864#if H_MV
    892865  Double time = (Double) m_frameRcvd[0] / m_iFrameRate;
     
    895868  Double time = (Double) m_iFrameRcvd / m_iFrameRate;
    896869#endif
     870
    897871  printf("Bytes written to file: %u (%.3f kbps)\n", m_totalBytes, 0.008 * m_totalBytes / time);
    898872#if VERBOSE_RATE
     
    963937}
    964938#endif
     939
    965940//! \}
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.h

    r368 r438  
    5959private:
    6060  // class interface
     61
    6162#if H_MV
    6263  std::vector<TEncTop*>      m_acTEncTopList ;              ///< encoder class per layer
     
    99100 
    100101  // file I/O
     102
    101103#if H_MV
    102104  Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, std::list<AccessUnit>& accessUnits, UInt layerId); ///< write bitstream to file
     
    104106  Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits); ///< write bitstream to file
    105107#endif
     108
    106109  void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats);
    107110  void printRateSummary();
     
    113116  Int  xGetMax( std::vector<Int>& vec);
    114117#endif
     118
    115119public:
    116120  TAppEncTop();
     
    118122 
    119123  Void        encode      ();                               ///< main encoding function
     124
    120125#if H_MV
    121126  TEncTop*    getTEncTopLayer(UInt layer) { return  m_acTEncTopList[layer]; }  ///< return pointer to encoder class for specific layer
     
    126131  TEncTop&    getTEncTop  ()   { return  m_cTEncTop; }      ///< return encoder class pointer reference
    127132#endif
     133
    128134};// END CLASS DEFINITION TAppEncTop
    129135
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/encmain.cpp

    r368 r438  
    6262  fprintf( stdout, "HM software: Encoder Version [%s]", NV_VERSION );
    6363#endif
     64
    6465  fprintf( stdout, NVM_ONOS );
    6566  fprintf( stdout, NVM_COMPILEDBY );
  • branches/HTM-DEV-0.2-dev/source/Lib/TAppCommon/program_options_lite.h

    r368 r438  
    4646#endif
    4747#endif
     48
    4849//! \ingroup TAppCommon
    4950//! \{
     
    282283    }
    283284#endif
     285
    284286    /** Option class for argument handling using a user provided function */
    285287    struct OptionFunc : public OptionBase
     
    380382      }
    381383#endif
     384
    382385      /**
    383386       * Add option described by name to the parent Options list,
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/CommonDef.h

    r403 r438  
    5757
    5858#if H_MV
    59 #define NV_VERSION        "0.2"                 ///< Current software version
    60 #define HM_VERSION        "10.1"                ///<
    61 #else
    62 #define NV_VERSION        "10.1"                 ///< Current software version
     59#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
    6363#endif
    6464
     
    115115#define MAX_NUM_REF_PICS            16          ///< max. number of pictures used for reference
    116116#define MAX_NUM_REF                 16          ///< max. number of entries in picture reference list
    117 #if !L0034_COMBINED_LIST_CLEANUP
    118117#define MAX_NUM_REF_LC              MAX_NUM_REF_PICS  // TODO: remove this macro definition (leftover from combined list concept)
    119 #endif
    120118
    121119#define MAX_UINT                    0xFFFFFFFFU ///< max. value of unsigned 32-bit integer
     
    138136template <typename T> inline T ClipY(T x) { return std::min<T>(T((1 << g_bitDepthY)-1), std::max<T>( T(0), x)); }
    139137template <typename T> inline T ClipC(T x) { return std::min<T>(T((1 << g_bitDepthC)-1), std::max<T>( T(0), x)); }
     138
     139template <typename T> inline T Clip(T x) { return std::min<T>(T((1 << g_bitDepthY)-1), std::max<T>( T(0), x)); }
    140140
    141141/** clip a, such that minVal <= a <= maxVal */
     
    168168
    169169#endif
     170
    170171
    171172// ====================================================================================================================
     
    215216 
    216217  NAL_UNIT_CODED_SLICE_TSA_N,     // 2
    217   NAL_UNIT_CODED_SLICE_TLA_R,       // 3
     218  NAL_UNIT_CODED_SLICE_TLA,       // 3   // Current name in the spec: TSA_R
    218219 
    219220  NAL_UNIT_CODED_SLICE_STSA_N,    // 4
     
    221222
    222223  NAL_UNIT_CODED_SLICE_RADL_N,    // 6
    223   NAL_UNIT_CODED_SLICE_RADL_R,      // 7
     224  NAL_UNIT_CODED_SLICE_DLP,       // 7 // Current name in the spec: RADL_R
    224225 
    225226  NAL_UNIT_CODED_SLICE_RASL_N,    // 8
    226   NAL_UNIT_CODED_SLICE_RASL_R,      // 9
    227 
    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,    // 16
    236   NAL_UNIT_CODED_SLICE_BLA_W_RADL,  // 17
     227  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
    237238  NAL_UNIT_CODED_SLICE_BLA_N_LP,  // 18
    238   NAL_UNIT_CODED_SLICE_IDR_W_RADL,  // 19
     239  NAL_UNIT_CODED_SLICE_IDR,       // 19  // Current name in the spec: IDR_W_DLP
    239240  NAL_UNIT_CODED_SLICE_IDR_N_LP,  // 20
    240241  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,
    252253
    253254  NAL_UNIT_VPS,                   // 32
     
    258259  NAL_UNIT_EOB,                   // 37
    259260  NAL_UNIT_FILLER_DATA,           // 38
    260   NAL_UNIT_PREFIX_SEI,              // 39
    261   NAL_UNIT_SUFFIX_SEI,              // 40
    262   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,
    269270  NAL_UNIT_UNSPECIFIED_48,
    270271  NAL_UNIT_UNSPECIFIED_49,
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/NAL.h

    r368 r438  
    4747  NalUnitType m_nalUnitType; ///< nal_unit_type
    4848  UInt        m_temporalId;  ///< temporal_id
     49
    4950#if H_MV
    5051  Int         m_layerId;     ///< layer id
     
    7980    return m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_R
    8081        || m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N
    81         || m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA_R
     82        || m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA
    8283        || m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_N
    8384        || m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_R
    8485        || m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_N
    85         || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP
    86         || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     86        || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA
     87        || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLANT
    8788        || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
    88         || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
     89        || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR
    8990        || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
    9091        || m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA
    9192        || m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N
    92         || m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_R
     93        || m_nalUnitType == NAL_UNIT_CODED_SLICE_DLP
    9394        || 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;
    9596  }
    9697#if L0045_NON_NESTED_SEI_RESTRICTIONS
    9798  Bool isSei()
    9899  {
    99     return m_nalUnitType == NAL_UNIT_PREFIX_SEI
    100         || m_nalUnitType == NAL_UNIT_SUFFIX_SEI;
     100    return m_nalUnitType == NAL_UNIT_SEI
     101        || m_nalUnitType == NAL_UNIT_SEI_SUFFIX;
    101102  }
    102103
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/SEI.cpp

    r362 r438  
    3838#include "CommonDef.h"
    3939#include "SEI.h"
    40 
    41 #if J0149_TONE_MAPPING_SEI
    42 //Table D-7 Meaning of camera iso sensitivity indicator and exposure index rating indicator
    43 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 #endif
    4540
    4641SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType)
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/SEI.h

    r362 r438  
    355355};
    356356
    357 #if L0208_SOP_DESCRIPTION_SEI
    358 class SEISOPDescription : public SEI
    359 {
    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 #endif
    375 
    376 #if J0149_TONE_MAPPING_SEI
    377 class SEIToneMappingInfo : public SEI
    378 {
    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 #endif
    410 
    411357typedef std::list<SEI*> SEIMessages;
    412358
     
    420366Void deleteSEIs (SEIMessages &seiList);
    421367
    422 #if K0180_SCALABLE_NESTING_SEI
    423 class SEIScalableNesting : public SEI
    424 {
    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 != 0
    440   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 == 0
    445   UInt  m_nestingNoOpMaxTemporalIdPlus1;             //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0
    446   UInt  m_nestingNumLayersMinus1;                    //value valid if m_nestingOpFlag == 0 and m_allLayersFlag == 0
    447   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 values
    448 
    449   Bool  m_callerOwnsSEIs;
    450   SEIMessages m_nestedSEIs;
    451 };
    452 #endif
    453 
    454368//! \}
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComBitStream.cpp

    r362 r438  
    177177  }
    178178}
    179 
    180179Void TComOutputBitstream::writeByteAlignment()
    181180{
     
    183182  writeAlignZero();
    184183}
    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     do
    194     {
    195       // find the next emulated 00 00 {00,01,02,03}
    196       // NB, end()-1, prevents finding a trailing two byte sequence
    197       found = search_n(found, rbsp.end()-1, 2, 0);
    198       found++;
    199       // if not found, found == end, otherwise found = second zero byte
    200       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 
    218184/**
    219185 * read #uiNumberOfBits# from bitstream without updating the bitstream
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComBitStream.h

    r362 r438  
    154154  Void          addSubstream    ( TComOutputBitstream* pcSubstream );
    155155  Void writeByteAlignment();
    156 
    157   //! returns the number of start code emulations contained in the current buffer
    158   Int countStartCodeEmulations();
    159156};
    160157
     
    166163{
    167164  std::vector<uint8_t> *m_fifo; /// FIFO for storage of complete bytes
    168   std::vector<UInt> m_emulationPreventionByteLocation;
    169165
    170166protected:
     
    210206  UInt  getNumBitsRead() { return m_numBitsRead; }
    211207  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;            }
    219208};
    220209
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r364 r438  
    32003200  Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm();
    32013201  Bool bIsNeibRefLongTerm = false;
     3202
    32023203  //---------------  V1 (END) ------------------//
    32033204  if( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0)
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComLoopFilter.cpp

    r362 r438  
    5757// ====================================================================================================================
    5858
    59 const UChar TComLoopFilter::sm_tcTable[54] =
     59const UChar tctable_8x8[54] =
    6060{
    6161  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
    6262};
    6363
    64 const UChar TComLoopFilter::sm_betaTable[52] =
     64const UChar betatable_8x8[52] =
    6565{
    6666  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
     
    585585      Int iIndexB = Clip3(0, MAX_QP, iQP + (betaOffsetDiv2 << 1));
    586586     
    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;
    589589      Int iSideThreshold = (iBeta+(iBeta>>1))>>3;
    590590      Int iThrCut = iTc*10;
     
    735735
    736736        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;
    738738
    739739        for ( UInt uiStep = 0; uiStep < uiPelsInPartChroma; uiStep++ )
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComLoopFilter.h

    r362 r438  
    9999  __inline Int xCalcDQ( Pel* piSrc, Int iOffset);
    100100 
    101   static const UChar sm_tcTable[54];
    102   static const UChar sm_betaTable[52];
    103 
    104101public:
    105102  TComLoopFilter();
     
    114111  /// picture-level deblocking filter
    115112  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   }
    122113};
    123114
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComPic.cpp

    r368 r438  
    481481#endif
    482482
    483 
    484483//! \}
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComPic.h

    r368 r438  
    9393#endif
    9494#endif
     95
    9596public:
    9697  TComPic();
     
    115116#endif
    116117#endif
     118
    117119  Bool          getUsedByCurr()             { return m_bUsedByCurr; }
    118120  Void          setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; }
     
    184186  Void          print( Bool legend );
    185187#endif
     188
     189
     190
    186191  /** transfer ownership of seis to this picture */
    187192  void setSEIs(SEIMessages& seis) { m_SEIs = seis; }
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r362 r438  
    8383  if( m_piYuvExt == NULL )
    8484  {
    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;
    8787    Int i, j;
    8888    for (i = 0; i < 4; i++)
     
    9494      }
    9595    }
    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);
    9898    m_piYuvExt = new Int[ m_iYuvExtStride * m_iYuvExtHeight ];
    9999
    100100    // 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;
    110110    if (!m_pLumaRecBuffer)
    111111    {
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComRom.cpp

    r362 r438  
    6262  g_aucConvertToBit[ i ] = c;
    6363 
     64  // g_auiFrameScanXY[ g_aucConvertToBit[ transformSize ] ]: zigzag scan array for transformSize
    6465  c=2;
    6566  for ( i=0; i<MAX_CU_DEPTH; i++ )
     
    7677Void destroyROM()
    7778{
    78   for (Int i=0; i<MAX_CU_DEPTH; i++ )
     79  Int i;
     80 
     81  for ( i=0; i<MAX_CU_DEPTH; i++ )
    7982  {
    8083    delete[] g_auiSigLastScan[0][i];
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComSlice.cpp

    r396 r438  
    4949, m_iPOC                          ( 0 )
    5050, m_iLastIDR                      ( 0 )
    51 , m_eNalUnitType                  ( NAL_UNIT_CODED_SLICE_IDR_W_RADL )
     51, m_eNalUnitType                  ( NAL_UNIT_CODED_SLICE_IDR )
    5252, m_eSliceType                    ( I_SLICE )
    5353, m_iSliceQp                      ( 0 )
     
    6060, m_deblockingFilterBetaOffsetDiv2 ( 0 )
    6161, m_deblockingFilterTcOffsetDiv2   ( 0 )
    62 #if !L0034_COMBINED_LIST_CLEANUP
    6362, m_bRefPicListModificationFlagLC ( false )
    6463, m_bRefPicListCombinationFlag    ( false )
    65 #endif
    6664, m_bCheckLDC                     ( false )
    6765, m_iSliceQpDelta                 ( 0 )
     
    8179, m_dLambda                       ( 0.0 )
    8280#endif
    83 #if !L0034_COMBINED_LIST_CLEANUP
    8481, m_bNoBackPredFlag               ( false )
    85 #endif
    8682, m_uiTLayer                      ( 0 )
    8783, m_bTLayerSwitchingFlag          ( false )
     
    115111#endif
    116112{
    117 #if L0034_COMBINED_LIST_CLEANUP
    118   m_aiNumRefIdx[0] = m_aiNumRefIdx[1] = 0;
    119 #else
    120113  m_aiNumRefIdx[0] = m_aiNumRefIdx[1] = m_aiNumRefIdx[2] = 0;
    121 #endif
    122114 
    123115  initEqualRef();
    124116 
    125 #if L0034_COMBINED_LIST_CLEANUP
    126   for ( Int idx = 0; idx < MAX_NUM_REF; idx++ )
    127   {
    128     m_list1IdxToList0Idx[idx] = -1;
    129   }
    130 #else
    131117  for(Int iNumCount = 0; iNumCount < MAX_NUM_REF_LC; iNumCount++)
    132118  {
     
    138124    m_iRefIdxOfL1FromRefIdxOfL0[iNumCount] = -1;
    139125  }   
    140 #endif
    141126  for(Int iNumCount = 0; iNumCount < MAX_NUM_REF; iNumCount++)
    142127  {
     
    150135#endif
    151136  }
    152   resetWpScaling();
     137  resetWpScaling(m_weightPredTable);
    153138  initWpAcDcParam();
    154139  m_saoEnabledFlag = false;
     
    171156  m_colRefIdx = 0;
    172157  initEqualRef();
    173 #if !L0034_COMBINED_LIST_CLEANUP
    174158  m_bNoBackPredFlag = false;
    175159  m_bRefPicListCombinationFlag = false;
    176160  m_bRefPicListModificationFlagLC = false;
    177 #endif
    178161  m_bCheckLDC = false;
    179162  m_iSliceQpDeltaCb = 0;
    180163  m_iSliceQpDeltaCr = 0;
    181164
    182 #if !L0034_COMBINED_LIST_CLEANUP
    183165  m_aiNumRefIdx[REF_PIC_LIST_C]      = 0;
    184 #endif
    185166
    186167  m_maxNumMergeCand = MRG_MAX_NUM_CANDS;
     
    196177Bool TComSlice::getRapPicFlag()
    197178{
    198   return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL
     179  return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR
    199180      || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP
    200181      || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP
    201       || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
    202       || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
     182      || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
     183      || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
    203184      || getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA;
    204185}
     
    270251
    271252
    272 TComPic* TComSlice::xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb)
     253TComPic* TComSlice::xGetLongTermRefPic (TComList<TComPic*>& rcListPic,
     254                                        Int                 poc)
    273255{
    274256  TComList<TComPic*>::iterator  iterPic = rcListPic.begin(); 
    275257  TComPic*                      pcPic = *(iterPic);
    276258  TComPic*                      pcStPic = pcPic;
    277  
    278   Int pocCycle = 1 << getSPS()->getBitsForPOC();
    279   if (!pocHasMsb)
    280   {
    281     poc = poc % pocCycle;
    282   }
    283  
    284259  while ( iterPic != rcListPic.end() )
    285260  {
    286261    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())))
    296263    {
    297264      if(pcPic->getIsLongTerm())
     
    305272      break;
    306273    }
    307     }
    308274
    309275    iterPic++;
    310276  }
    311  
    312277  return  pcStPic;
    313278}
     
    328293}
    329294
    330 #if L0034_COMBINED_LIST_CLEANUP
    331 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 #else
    348295Void TComSlice::generateCombinedList()
    349296{
     
    418365  }
    419366}
    420 #endif
    421367
    422368#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 )
     369Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer )
    427370#else
    428371Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic )
    429372#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 ));
    443378   
     379    return;
     380  }
     381 
    444382#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
    449386
    450387  TComPic*  pcRefPic= NULL;
     
    473410    }
    474411  }
    475  
    476412  for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++)
    477413  {
     
    486422    }
    487423  }
    488  
    489424  for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--)
    490425  {
    491426    if(m_pcRPS->getUsed(i))
    492427    {
    493       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
     428      pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i));
    494429      pcRefPic->setIsLongTerm(1);
    495430      pcRefPic->getPicYuvRec()->extendPicBorder();
     
    499434    if(pcRefPic==NULL)
    500435    {
    501       pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i));
     436      pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i));
    502437    }
    503438    pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i)); 
     
    513448  Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;
    514449#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    }
    519465#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  }
    569475
    570476  if (m_eSliceType==B_SLICE)
    571477  {
    572     cIdx = 0;
     478    Int cIdx = 0;
    573479    for ( i=0; i<NumPocStCurr1; i++, cIdx++)
    574480    {
     
    679585}
    680586
    681 Void TComSlice::checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA, TComList<TComPic *>& rcListPic)
     587Void TComSlice::checkCRA(TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, Bool& prevRAPisBLA)
    682588{
    683589  for(Int i = 0; i < pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures(); i++)
     
    692598    if(pocCRA < MAX_UINT && getPOC() > pocCRA)
    693599    {
    694       if (!pReferencePictureSet->getCheckLTMSBPresent(i))
    695       {
    696         assert(xGetLongTermRefPic(rcListPic, pReferencePictureSet->getPOC(i), false)->getPOC() >= pocCRA);
    697       }
    698       else
    699       {
    700600      assert(pReferencePictureSet->getPOC(i) >= pocCRA);
    701601    }
    702602  }
    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
    705604  {
    706605    pocCRA = getPOC();
     
    712611    prevRAPisBLA = false;
    713612  }
    714   else if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    715          || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     613  else if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
     614         || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
    716615         || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) // BLA picture found
    717616  {
     
    744643  Int pocCurr = getPOC();
    745644
    746   if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    747     || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     645  if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
     646    || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
    748647    || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP
    749     || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL
     648    || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR
    750649    || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )  // IDR or BLA picture
    751650  {
     
    759658      iterPic++;
    760659    }
    761     if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    762       || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     660    if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
     661      || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
    763662      || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
    764663    {
     
    774673      {
    775674        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);
    780676        iterPic++;
    781677      }
     
    811707  m_deblockingFilterTcOffsetDiv2 = pSrc->m_deblockingFilterTcOffsetDiv2;
    812708 
    813 #if L0034_COMBINED_LIST_CLEANUP
    814   for (i = 0; i < 2; i++)
    815 #else
    816709  for (i = 0; i < 3; i++)
    817 #endif
    818710  {
    819711    m_aiNumRefIdx[i]     = pSrc->m_aiNumRefIdx[i];
    820712  }
    821713
    822 #if L0034_COMBINED_LIST_CLEANUP
    823   for (i = 0; i < MAX_NUM_REF; i++)
    824   {
    825     m_list1IdxToList0Idx[i] = pSrc->m_list1IdxToList0Idx[i];
    826   }
    827 #else
    828714  for (i = 0; i < 2; i++)
    829715  {
     
    842728  m_bRefPicListModificationFlagLC = pSrc->m_bRefPicListModificationFlagLC;
    843729  m_bRefPicListCombinationFlag    = pSrc->m_bRefPicListCombinationFlag;
    844 #endif
    845730  m_bCheckLDC             = pSrc->m_bCheckLDC;
    846731  m_iSliceQpDelta        = pSrc->m_iSliceQpDelta;
     
    900785  }
    901786
    902 #if !L0034_COMBINED_LIST_CLEANUP
    903787  m_bNoBackPredFlag      = pSrc->m_bNoBackPredFlag;
    904 #endif
    905788  m_uiTLayer                      = pSrc->m_uiTLayer;
    906789  m_bTLayerSwitchingFlag          = pSrc->m_bTLayerSwitchingFlag;
     
    936819
    937820Int TComSlice::m_prevPOC = 0;
    938 
    939821/** Function for setting the slice's temporal layer ID and corresponding temporal_layer_switching_point_flag.
    940822 * \param uiTLayer Temporal layer ID of the current slice
     
    997879  Int i, isReference;
    998880
     881  Int j = 0;
    999882  // loop through all pictures in the reference picture buffer
    1000883  TComList<TComPic*>::iterator iterPic = rcListPic.begin();
    1001884  while ( iterPic != rcListPic.end())
    1002885  {
     886    j++;
    1003887    rpcPic = *(iterPic++);
    1004 
    1005     if(!rpcPic->getSlice( 0 )->isReferenced())
    1006     {
    1007       continue;
    1008     }
    1009888
    1010889    isReference = 0;
     
    1045924    {           
    1046925      rpcPic->getSlice( 0 )->setReferenced( false );   
    1047       rpcPic->setUsedByCurr(0);
    1048926      rpcPic->setIsLongTerm(0);
    1049927    }
     
    1051929    assert(rpcPic->getSlice( 0 )->isReferenced()==0||rpcPic->getUsedByCurr()==0||rpcPic->getTLayer()<=this->getTLayer());
    1052930    //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)
    1054932    {
    1055933      assert(rpcPic->getSlice( 0 )->isReferenced()==0||rpcPic->getTLayer()<this->getTLayer());
    1056934    }
     935
    1057936    //check that pictures marked as temporal layer non-reference pictures are not used for reference
    1058937    if(rpcPic->getPicSym()->getSlice(0)->getPOC() != this->getPOC() && rpcPic->getTLayer()==this->getTLayer())
     
    1068947{
    1069948  TComPic* rpcPic;
    1070   Int i, isAvailable;
     949  Int i, isAvailable, j;
    1071950  Int atLeastOneLost = 0;
    1072951  Int atLeastOneRemoved = 0;
     
    1077956  for(i=pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures();i<pReferencePictureSet->getNumberOfPictures();i++)
    1078957  {
     958    j = 0;
    1079959    isAvailable = 0;
    1080960    // loop through all pictures in the reference picture buffer
     
    1082962    while ( iterPic != rcListPic.end())
    1083963    {
     964      j++;
    1084965      rpcPic = *(iterPic++);
    1085966      if(pReferencePictureSet->getCheckLTMSBPresent(i)==true)
     
    1104985      while ( iterPic != rcListPic.end())
    1105986      {
     987        j++;
    1106988        rpcPic = *(iterPic++);
    1107989
    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())
    1118991        {
    1119992          isAvailable = 1;
     
    11531026  for(i=0;i<pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures();i++)
    11541027  {
     1028    j = 0;
    11551029    isAvailable = 0;
    11561030    // loop through all pictures in the reference picture buffer
     
    11581032    while ( iterPic != rcListPic.end())
    11591033    {
     1034      j++;
    11601035      rpcPic = *(iterPic++);
    11611036
     
    11741049        {
    11751050          if(printErrors)
    1176           {
    11771051            printf("\nShort-term reference picture with POC = %3d seems to have been removed or not correctly decoded.", this->getPOC() + pReferencePictureSet->getDeltaPOC(i));
    1178           }
    11791052          atLeastOneRemoved = 1;
    11801053        }
     
    11821055        {
    11831056          if(printErrors)
    1184           {
    11851057            printf("\nShort-term reference picture with POC = %3d is lost or not correctly decoded!", this->getPOC() + pReferencePictureSet->getDeltaPOC(i));
    1186           }
    11871058          atLeastOneLost = 1;
    11881059          iPocLost=this->getPOC() + pReferencePictureSet->getDeltaPOC(i);
     
    13301201 * \returns Void
    13311202 */
    1332 Void  TComSlice::resetWpScaling()
     1203Void  TComSlice::resetWpScaling(wpScalingParam  wp[2][MAX_NUM_REF][3])
    13331204{
    13341205  for ( Int e=0 ; e<2 ; e++ )
     
    13381209      for ( Int yuv=0 ; yuv<3 ; yuv++ )
    13391210      {
    1340         wpScalingParam  *pwp = &(m_weightPredTable[e][i][yuv]);
     1211        wpScalingParam  *pwp = &(wp[e][i][yuv]);
    13411212        pwp->bPresentFlag      = false;
    13421213        pwp->uiLog2WeightDenom = 0;
     
    13541225Void  TComSlice::initWpScaling()
    13551226{
     1227  initWpScaling(m_weightPredTable);
     1228}
     1229
     1230/** set WP tables
     1231 * \param wpScalingParam
     1232 * \returns Void
     1233 */
     1234Void  TComSlice::initWpScaling(wpScalingParam  wp[2][MAX_NUM_REF][3])
     1235{
    13561236  for ( Int e=0 ; e<2 ; e++ )
    13571237  {
     
    13601240      for ( Int yuv=0 ; yuv<3 ; yuv++ )
    13611241      {
    1362         wpScalingParam  *pwp = &(m_weightPredTable[e][i][yuv]);
    1363         if ( !pwp->bPresentFlag )
    1364         {
     1242        wpScalingParam  *pwp = &(wp[e][i][yuv]);
     1243        if ( !pwp->bPresentFlag ) {
    13651244          // Inferring values not present :
    13661245          pwp->iWeight = (1 << pwp->uiLog2WeightDenom);
     
    13961275, m_cprmsPresentFlag          (NULL)
    13971276{
     1277
    13981278  for( Int i = 0; i < MAX_TLAYER; i++)
    13991279  {
    14001280    m_numReorderPics[i] = 0;
    1401 #if L0323_DPB
    1402     m_uiMaxDecPicBuffering[i] = 1;
    1403 #else
    14041281    m_uiMaxDecPicBuffering[i] = 0;
    1405 #endif
    14061282    m_uiMaxLatencyIncrease[i] = 0;
    14071283  }
     
    14571333TComVPS::~TComVPS()
    14581334{
    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;
    14621338}
    14631339
     
    15491425}
    15501426#endif
     1427
    15511428// ------------------------------------------------------------------------------------------------
    15521429// Sequence parameter set (SPS)
     
    15611438, m_picWidthInLumaSamples     (352)
    15621439, m_picHeightInLumaSamples    (288)
    1563 , m_log2MinCodingBlockSize    (  0)
    1564 , m_log2DiffMaxMinCodingBlockSize (0)
    15651440, m_uiMaxCUWidth              ( 32)
    15661441, m_uiMaxCUHeight             ( 32)
    15671442, m_uiMaxCUDepth              (  3)
     1443, m_uiMinTrDepth              (  0)
     1444, m_uiMaxTrDepth              (  1)
    15681445, m_bLongTermRefsPresent      (false)
    15691446, m_uiQuadtreeTULog2MaxSize   (  0)
     
    15751452, m_pcmLog2MaxSize            (  5)
    15761453, m_uiPCMLog2MinSize          (  7)
    1577 #if !L0034_COMBINED_LIST_CLEANUP
    15781454, m_bUseLComb                 (false)
    1579 #endif
    15801455, m_bitDepthY                 (  8)
    15811456, m_bitDepthC                 (  8)
     
    15951470, m_vuiParametersPresentFlag  (false)
    15961471, m_vuiParameters             ()
    1597 #if H_MV
    1598 , m_interViewMvVertConstraintFlag (false)
    1599 #endif
    16001472{
    16011473  for ( Int i = 0; i < MAX_TLAYER; i++ )
    16021474  {
    16031475    m_uiMaxLatencyIncrease[i] = 0;
    1604 #if L0323_DPB
    1605     m_uiMaxDecPicBuffering[i] = 1;
    1606 #else
    16071476    m_uiMaxDecPicBuffering[i] = 0;
    1608 #endif
    16091477    m_numReorderPics[i]       = 0;
    16101478  }
     
    16251493  m_RPSList.create(numRPS);
    16261494}
    1627 
    16281495Void TComSPS::setHrdParameters( UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess )
    16291496{
     
    18701737  return m_POC[bufferNum];
    18711738}
    1872 
    18731739Void TComReferencePictureSet::setPOC(Int bufferNum, Int POC)
    18741740{
    18751741  m_POC[bufferNum] = POC;
    18761742}
    1877 
    18781743Bool TComReferencePictureSet::getCheckLTMSBPresent(Int bufferNum)
    18791744{
    18801745  return m_bCheckLTMSB[bufferNum];
    18811746}
    1882 
    18831747Void TComReferencePictureSet::setCheckLTMSBPresent(Int bufferNum, Bool b)
    18841748{
     
    21482012}
    21492013#endif
     2014
    21502015/** get scaling matrix from RefMatrixID
    21512016 * \param sizeId size index
     
    21572022  ::memcpy(getScalingListAddress(sizeId, listId),((listId == refListId)? getScalingListDefaultAddress(sizeId, refListId): getScalingListAddress(sizeId, refListId)),sizeof(Int)*min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]));
    21582023}
    2159 
    21602024/** parse syntax infomation
    21612025 *  \param pchFile syntax infomation
     
    22502114  m_scalingListCoef[SCALING_LIST_32x32][3] = m_scalingListCoef[SCALING_LIST_32x32][1]; // copy address for 32x32
    22512115}
    2252 
    22532116/** destroy quantization matrix array
    22542117 */
     
    22632126  }
    22642127}
    2265 
    22662128/** get default address of quantization matrix
    22672129 * \param sizeId size index
     
    22932155  return src;
    22942156}
    2295 
    22962157/** process of default matrix
    22972158 * \param sizeId size index
     
    23032164  setScalingListDC(sizeId,listId,SCALING_LIST_DC);
    23042165}
    2305 
    23062166/** check DC value of matrix for default matrix signaling
    23072167 */
     
    23642224//! activate a PPS and depending on isIDR parameter also SPS and VPS
    23652225//! \returns true, if activation is successful
    2366 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIRAP)
     2226Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIDR)
    23672227{
    23682228  TComPPS *pps = m_ppsMap.getPS(ppsId);
     
    23732233    // active parameter sets per layer should be used here
    23742234#else
    2375     if (!isIRAP && (spsId != m_activeSPSId))
    2376     {
    2377       printf("Warning: tried to activate PPS referring to a inactive SPS at non-IRAP.");
     2235    if (!isIDR && (spsId != m_activeSPSId))
     2236    {
     2237      printf("Warning: tried to activate PPS referring to a inactive SPS at non-IDR.");
    23782238      return false;
    23792239    }
     
    23832243    {
    23842244      Int vpsId = sps->getVPSId();
    2385       if (!isIRAP && (vpsId != m_activeVPSId))
    2386       {
    2387         printf("Warning: tried to activate PPS referring to a inactive VPS at non-IRAP.");
     2245      if (!isIDR && (vpsId != m_activeVPSId))
     2246      {
     2247        printf("Warning: tried to activate PPS referring to a inactive VPS at non-IDR.");
    23882248        return false;
    23892249      }
     
    24442304}
    24452305#endif
     2306
    24462307#if SIGNAL_BITRATE_PICRATE_IN_VPS
    24472308TComBitRatePicRateInfo::TComBitRatePicRateInfo()
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComSlice.h

    r368 r438  
    248248  ProfileTierLevel* getGeneralPTL()  { return &m_generalPTL; }
    249249  ProfileTierLevel* getSubLayerPTL(Int i)  { return &m_subLayerPTL[i]; }
     250
    250251#if H_MV
    251252  Void copyLevelFrom( TComPTL* source );
     
    535536
    536537#endif
     538
    537539public:
    538540  TComVPS();
     
    594596  TComPTL* getPTL() { return &m_pcPTL; }
    595597#endif
     598
    596599#if SIGNAL_BITRATE_PICRATE_IN_VPS
    597600  TComBitRatePicRateInfo *getBitratePicrateInfo() { return &m_bitRatePicRateInfo; }
     
    600603  TimingInfo* getTimingInfo() { return &m_timingInfo; }
    601604#endif
     605
    602606#if H_MV
    603607  Void    setAvcBaseLayerFlag( Bool val )                                  { m_avcBaseLayerFlag = val;  }
     
    901905  UInt        m_picHeightInLumaSamples;
    902906 
    903   Int         m_log2MinCodingBlockSize;
    904   Int         m_log2DiffMaxMinCodingBlockSize;
     907  Window      m_conformanceWindow;
     908
    905909  UInt        m_uiMaxCUWidth;
    906910  UInt        m_uiMaxCUHeight;
    907911  UInt        m_uiMaxCUDepth;
    908 
    909   Window      m_conformanceWindow;
    910 
     912  UInt        m_uiMinTrDepth;
     913  UInt        m_uiMaxTrDepth;
    911914  TComRPSList m_RPSList;
    912915  Bool        m_bLongTermRefsPresent;
     
    924927  Bool        m_useAMP;
    925928
    926 #if !L0034_COMBINED_LIST_CLEANUP
    927929  Bool        m_bUseLComb;
    928 #endif
    929930 
    930931  // Parameter
     
    967968  static const Int   m_winUnitY[MAX_CHROMA_FORMAT_IDC+1];
    968969  TComPTL     m_pcPTL;
    969 #if H_MV
    970   Bool        m_interViewMvVertConstraintFlag;
    971 #endif
    972970public:
    973971  TComSPS();
     
    1001999  Bool getUsedByCurrPicLtSPSFlag(Int i)        {return m_usedByCurrPicLtSPSFlag[i];}
    10021000  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 
    10091001  Void setMaxCUWidth  ( UInt u ) { m_uiMaxCUWidth = u;      }
    10101002  UInt getMaxCUWidth  ()         { return  m_uiMaxCUWidth;  }
     
    10231015  Bool getUseAMP() { return m_useAMP; }
    10241016  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;  }
    10251021  Void setQuadtreeTULog2MaxSize( UInt u ) { m_uiQuadtreeTULog2MaxSize = u;    }
    10261022  UInt getQuadtreeTULog2MaxSize()         { return m_uiQuadtreeTULog2MaxSize; }
     
    10441040 
    10451041  // Tool list
    1046 #if !L0034_COMBINED_LIST_CLEANUP
    10471042  Void setUseLComb    (Bool b)   { m_bUseLComb = b;         }
    10481043  Bool getUseLComb    ()         { return m_bUseLComb;      }
    1049 #endif
    10501044
    10511045  Bool getUseLossless ()         { return m_useLossless; }
     
    11001094
    11011095  TComPTL* getPTL()     { return &m_pcPTL; }
    1102 #if H_MV
    1103   Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; }
    1104   Bool getInterViewMvVertConstraintFlag()         { return m_interViewMvVertConstraintFlag;}
    1105 #endif
    11061096};
    11071097
     
    11301120  Void       setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; }
    11311121  UInt       getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; }
     1122
    11321123#if H_MV
    11331124  // Why not an listIdx for all members, would avoid code duplication??
     
    13661357  Int         m_deblockingFilterBetaOffsetDiv2;    //< beta offset for deblocking filter
    13671358  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 
    13721360  Int         m_aiNumRefIdx   [3];    //  for multiple reference of current slice
    13731361
     
    13791367  Bool        m_bRefPicListModificationFlagLC;
    13801368  Bool        m_bRefPicListCombinationFlag;
    1381 #endif
    13821369
    13831370  Bool        m_bCheckLDC;
     
    14201407
    14211408  Bool        m_abEqualRef  [2][MAX_NUM_REF][MAX_NUM_REF];
    1422 #if !L0034_COMBINED_LIST_CLEANUP
     1409 
    14231410  Bool        m_bNoBackPredFlag;
    1424 #endif
    14251411  UInt        m_uiTLayer;
    14261412  Bool        m_bTLayerSwitchingFlag;
     
    14571443
    14581444  Bool       m_enableTMVPFlag;
     1445
    14591446#if H_MV
    14601447  Int        m_layerId;
     
    14641451#endif
    14651452#endif
     1453
    14661454public:
    14671455  TComSlice();
     
    15281516  Bool      getMvdL1ZeroFlag ()                                  { return m_bLMvdL1Zero;    }
    15291517  Int       getNumRpsCurrTempList();
    1530 #if L0034_COMBINED_LIST_CLEANUP
    1531   Int       getList1IdxToList0Idx ( Int list1Idx )               { return m_list1IdxToList0Idx[list1Idx]; }
    1532 #else
    15331518  Int       getRefIdxOfLC       (RefPicList e, Int iRefIdx)     { return m_iRefIdxOfLC[e][iRefIdx];           }
    15341519  Int       getListIdFromIdxOfLC(Int iRefIdx)                   { return m_eListIdFromIdxOfLC[iRefIdx];       }
     
    15401525  Bool      getRefPicListCombinationFlag()                      {return m_bRefPicListCombinationFlag;}
    15411526  Void      setRefPicListCombinationFlag(Bool bflag)            {m_bRefPicListCombinationFlag=bflag;}   
    1542 #endif
    15431527  Void      setReferenced(Bool b)                               { m_bRefenced = b; }
    15441528  Bool      isReferenced()                                      { return m_bRefenced; }
    15451529  Void      setPOC              ( Int i )                       { m_iPOC              = i; if(getTLayer()==0) m_prevPOC=i; }
    15461530  Void      setNalUnitType      ( NalUnitType e )               { m_eNalUnitType      = e;      }
    1547   NalUnitType getNalUnitType    () const                        { return m_eNalUnitType;        }
     1531  NalUnitType getNalUnitType    ()                              { return m_eNalUnitType;        }
    15481532  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);
    15521535  Void      decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic);
    15531536  Void      setSliceType        ( SliceType e )                 { m_eSliceType        = e;      }
     
    15751558#endif
    15761559#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 );
    15811561#else
    15821562  Void      setRefPicList       ( TComList<TComPic*>& rcListPic );
    1583 #endif
    15841563#endif
    15851564  Void      setRefPOCList       ();
     
    16151594 
    16161595  static Void      sortPicList         ( TComList<TComPic*>& rcListPic );
    1617 #if L0034_COMBINED_LIST_CLEANUP
    1618   Void setList1IdxToList0Idx();
    1619 #else
     1596 
    16201597  Bool getNoBackPredFlag() { return m_bNoBackPredFlag; }
    16211598  Void setNoBackPredFlag( Bool b ) { m_bNoBackPredFlag = b; }
    16221599  Void generateCombinedList       ();
    1623 #endif
    16241600
    16251601  UInt getTLayer             ()                            { return m_uiTLayer;                      }
     
    16291605  Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum );
    16301606  Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList);
     1607
    16311608#if H_MV
    16321609  Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer );
     
    16371614  Void xPrintRefPicList();
    16381615#endif
     1616
    16391617  Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic );
    16401618  Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic );
     
    16771655  Void  getWpScaling    ( RefPicList e, Int iRefIdx, wpScalingParam *&wp);
    16781656
    1679   Void  resetWpScaling  ();
     1657  Void  resetWpScaling  (wpScalingParam  wp[2][MAX_NUM_REF][3]);
     1658  Void  initWpScaling    (wpScalingParam  wp[2][MAX_NUM_REF][3]);
    16801659  Void  initWpScaling   ();
    16811660  inline Bool applyWP   () { return( (m_eSliceType==P_SLICE && m_pcPPS->getUseWP()) || (m_eSliceType==B_SLICE && m_pcPPS->getWPBiPred()) ); }
     
    17231702#endif
    17241703#endif
     1704
    17251705protected:
    17261706  TComPic*  xGetRefPic  (TComList<TComPic*>& rcListPic,
    17271707                         Int                 poc);
    1728 TComPic*  xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb);
     1708  TComPic*  xGetLongTermRefPic  (TComList<TComPic*>& rcListPic,
     1709                         Int                 poc);
    17291710#if H_MV
    17301711  TComPic*  xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId );
     
    18131794  //! activate a PPS and depending on isIDR parameter also SPS and VPS
    18141795  //! \returns true, if activation is successful
    1815   Bool activatePPS(Int ppsId, Bool isIRAP);
     1796  Bool activatePPS(Int ppsId, Bool isIDR);
    18161797
    18171798  TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); };
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TComTrQuant.cpp

    r362 r438  
    19861986          }
    19871987         
    1988           if(piDstCoeff[minPos] == 32767 || piDstCoeff[minPos] == -32768)
     1988          if(piQCoef[minPos] == 32767 || piQCoef[minPos] == -32768)
    19891989          {
    19901990            finalChange = -1;
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibCommon/TypeDef.h

    r368 r438  
    4949#endif
    5050
    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
    6253#define L0363_DU_BIT_RATE             1 ///< L0363: add bit_rate_du_value_minus1 to HRD parameters
    6354#define L0328_SPLICING                1 ///< L0328: splicing support in HRD
     
    8475#define SIGNAL_BITRATE_PICRATE_IN_VPS               0  ///< K0125: Signal bit_rate and pic_rate in VPS
    8576#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 buffer
    88 
    89 #define L0034_COMBINED_LIST_CLEANUP 1
    9077
    9178#define MAX_VPS_NUM_HRD_PARAMETERS                1
    9279#define MAX_VPS_OP_SETS_PLUS1                     1024
     80
    9381#if H_MV
    9482#define MAX_VPS_NUH_LAYER_ID_PLUS1  64
     
    10492#define MAX_CPB_CNT                     32  ///< Upper bound of (cpb_cnt_minus1 + 1)
    10593#define MAX_NUM_LAYER_IDS               64
    106 #if H_MV
    10794#define MAX_NUM_LAYERS                  64
    108 #endif
    10995
    11096#define COEF_REMAIN_BIN_REDUCTION        3 ///< indicates the level at which the VLC
     
    426412  REF_PIC_LIST_0 = 0,   ///< reference list 0
    427413  REF_PIC_LIST_1 = 1,   ///< reference list 1
    428 #if !L0034_COMBINED_LIST_CLEANUP
    429414  REF_PIC_LIST_C = 2,   ///< combined reference list for uni-prediction in B-Slices
    430 #endif
    431415  REF_PIC_LIST_X = 100  ///< special mark
    432416};
     
    570554#endif
    571555#endif
     556
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/NALread.cpp

    r368 r438  
    5050//! \ingroup TLibDecoder
    5151//! \{
    52 static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, TComInputBitstream *bitstream, Bool isVclNalUnit)
     52static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, Bool isVclNalUnit)
    5353{
    5454  UInt zeroCount = 0;
    5555  vector<uint8_t>::iterator it_read, it_write;
    5656
    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++)
    6058  {
    6159    assert(zeroCount < 2 || *it_read >= 0x03);
    6260    if (zeroCount == 2 && *it_read == 0x03)
    6361    {
    64       bitstream->pushEmulationPreventionByteLocation( pos );
    65       pos++;
    6662      it_read++;
    6763      zeroCount = 0;
     
    113109  if ( nalu.m_temporalId )
    114110  {
    115     assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_LP
    116          && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_RADL
     111    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA
     112         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLANT
    117113         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_N_LP
    118          && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_W_RADL
     114         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR
    119115         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_N_LP
    120116         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA
     
    126122  else
    127123  {
    128     assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA_R
     124    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA
    129125         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N
    130126         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R
     
    140136  /* perform anti-emulation prevention */
    141137  TComInputBitstream *pcBitstream = new TComInputBitstream(NULL);
    142   convertPayloadToRBSP(nalUnitBuf, pcBitstream, (nalUnitBuf[0] & 64) == 0);
     138  convertPayloadToRBSP(nalUnitBuf, (nalUnitBuf[0] & 64) == 0);
    143139 
    144140  nalu.m_Bitstream = new TComInputBitstream(&nalUnitBuf);
    145   nalu.m_Bitstream->setEmulationPreventionByteLocation(pcBitstream->getEmulationPreventionByteLocation());
    146141  delete pcBitstream;
    147142  readNalUnitHeader(nalu);
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/SEIread.cpp

    r362 r438  
    9090    fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n");
    9191    break;
    92 #if J0149_TONE_MAPPING_SEI
    93   case SEI::TONE_MAPPING_INFO:
    94     fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n");
    95     break;
    96 #endif
    97 #if L0208_SOP_DESCRIPTION_SEI
    98   case SEI::SOP_DESCRIPTION:
    99     fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");
    100     break;
    101 #endif
    102 #if K0180_SCALABLE_NESTING_SEI
    103   case SEI::SCALABLE_NESTING:
    104     fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    105     break;
    106 #endif
    10792  default:
    10893    fprintf( g_hTrace, "=========== Unknown SEI message ===========\n");
     
    169154  SEI *sei = NULL;
    170155
    171   if(nalUnitType == NAL_UNIT_PREFIX_SEI)
     156  if(nalUnitType == NAL_UNIT_SEI)
    172157  {
    173158    switch (payloadType)
     
    234219      xParseSEIGradualDecodingRefreshInfo((SEIGradualDecodingRefreshInfo&) *sei, payloadSize);
    235220      break;
    236 #if J0149_TONE_MAPPING_SEI
    237     case SEI::TONE_MAPPING_INFO:
    238       sei = new SEIToneMappingInfo;
    239       xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize);
    240       break;
    241 #endif
    242 #if L0208_SOP_DESCRIPTION_SEI
    243     case SEI::SOP_DESCRIPTION:
    244       sei = new SEISOPDescription;
    245       xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize);
    246       break;
    247 #endif
    248 #if K0180_SCALABLE_NESTING_SEI
    249     case SEI::SCALABLE_NESTING:
    250       sei = new SEIScalableNesting;
    251       xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);
    252       break;
    253 #endif
    254221    default:
    255222      for (UInt i = 0; i < payloadSize; i++)
     
    317284    {
    318285      UInt reservedPayloadExtensionData;
    319       READ_FLAG (reservedPayloadExtensionData, "reserved_payload_extension_data");
     286      READ_CODE (1, reservedPayloadExtensionData, "reserved_payload_extension_data");
    320287    }
    321288
    322289    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");
    328292  }
    329293
     
    668632}
    669633
    670 #if J0149_TONE_MAPPING_SEI
    671 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_ISO
    728         {
    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 id
    747   }// if(!sei.m_toneMapCancelFlag)
    748 
    749   xParseByteAlign();
    750 }
    751 #endif
    752 
    753 #if L0208_SOP_DESCRIPTION_SEI
    754 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 #endif
    778 
    779 #if K0180_SCALABLE_NESTING_SEI
    780 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   else
    798   {
    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 alignment
    812   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 messages
    821   do {
    822     xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps);
    823   } while (m_pcBitstream->getNumBitsLeft() > 8);
    824 
    825 }
    826 #endif
    827 
    828634Void SEIReader::xParseByteAlign()
    829635{
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/SEIread.h

    r362 r438  
    7070  Void xParseSEITemporalLevel0Index   (SEITemporalLevel0Index &sei, UInt payloadSize);
    7171  Void xParseSEIGradualDecodingRefreshInfo (SEIGradualDecodingRefreshInfo &sei, UInt payloadSize);
    72 #if J0149_TONE_MAPPING_SEI
    73   Void xParseSEIToneMappingInfo       (SEIToneMappingInfo& sei, UInt payloadSize);
    74 #endif
    75 #if L0208_SOP_DESCRIPTION_SEI
    76   Void xParseSEISOPDescription        (SEISOPDescription &sei, UInt payloadSize);
    77 #endif
    78 #if K0180_SCALABLE_NESTING_SEI
    79   Void xParseSEIScalableNesting       (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps);
    80 #endif
    8172  Void xParseByteAlign();
    8273};
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r401 r438  
    175175}
    176176
     177/** copy SAO parameter
     178* \param dst 
     179* \param src
     180*/
     181inline 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
    177205Void TDecCavlc::parsePPS(TComPPS* pcPPS)
    178206{
     
    372400
    373401  READ_FLAG(     uiCode, "field_seq_flag");                           pcVUI->setFieldSeqFlag(uiCode);
     402  assert(pcVUI->getFieldSeqFlag() == false);        // not supported yet
    374403
    375404  READ_FLAG(uiCode, "frame_field_info_present_flag");                 pcVUI->setFrameFieldInfoPresentFlag(uiCode);
     
    564593
    565594  READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
    566   pcSPS->setBitDepthY( uiCode + 8 );
     595  g_bitDepthY = 8 + uiCode;
     596  pcSPS->setBitDepthY(g_bitDepthY);
    567597  pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
    568598
    569599  READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
    570   pcSPS->setBitDepthC( uiCode + 8 );
     600  g_bitDepthC = 8 + uiCode;
     601  pcSPS->setBitDepthC(g_bitDepthC);
    571602  pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    572603
     
    577608  for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    578609  {
    579 #if L0323_DPB
    580 #if H_MV
    581     READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]");
    582 #else
    583     READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1");
    584 #endif
    585     pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
    586 #else
    587610    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering");
    588611    pcSPS->setMaxDecPicBuffering( uiCode, i);
    589 #endif
    590 #if H_MV
    591     READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" );
    592 #else
    593612    READ_UVLC ( uiCode, "sps_num_reorder_pics" );
    594 #endif
    595613    pcSPS->setNumReorderPics(uiCode, i);
    596 #if H_MV
    597     READ_UVLC ( uiCode, "sps_max_latency_increase[i]");
    598 #else
    599614    READ_UVLC ( uiCode, "sps_max_latency_increase");
    600 #endif
    601615    pcSPS->setMaxLatencyIncrease( uiCode, i );
    602616
     
    614628
    615629  READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" );
    616   Int log2MinCUSize = uiCode + 3;
    617   pcSPS->setLog2MinCodingBlockSize(log2MinCUSize);
     630  UInt log2MinCUSize = uiCode + 3;
    618631  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);
    623635  READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" );   pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 );
    624636
     
    628640  READ_UVLC( uiCode, "max_transform_hierarchy_depth_inter" );    pcSPS->setQuadtreeTUMaxDepthInter( uiCode+1 );
    629641  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 );
    634652  READ_FLAG( uiCode, "scaling_list_enabled_flag" );                 pcSPS->setScalingListFlag ( uiCode );
    635653  if(pcSPS->getScalingListFlag())
     
    692710  if (uiCode)
    693711  {
    694 #if H_MV
    695     READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
    696 #else
    697712    while ( xMoreRbspData() )
    698713    {
    699714      READ_FLAG( uiCode, "sps_extension_data_flag");
    700715    }
    701 #endif
    702716  }
    703717}
     
    706720{
    707721  UInt  uiCode;
    708    
     722 
    709723  READ_CODE( 4,  uiCode,  "vps_video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
    710724  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     
    730744  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
    731745  {
    732 #if L0323_DPB
    733     READ_UVLC( uiCode,  "vps_max_dec_pic_buffering_minus1[i]" );     pcVPS->setMaxDecPicBuffering( uiCode + 1, i );
    734 #else
    735746    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
    736 #endif
    737747    READ_UVLC( uiCode,  "vps_num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
    738748    READ_UVLC( uiCode,  "vps_max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
     
    10421052        iPOCmsb = iPrevPOCmsb;
    10431053      }
    1044       if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    1045         || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     1054      if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
     1055        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
    10461056        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
    10471057      {
     
    10521062
    10531063      TComReferencePictureSet* rps;
    1054       rps = rpcSlice->getLocalRPS();
    1055       rpcSlice->setRPS(rps);
    10561064      READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" );
    10571065      if(uiCode == 0) // use short-term reference picture set explicitly signalled in slice header
    10581066      {
     1067        rps = rpcSlice->getLocalRPS();
    10591068        parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets());
     1069        rpcSlice->setRPS(rps);
    10601070      }
    10611071      else // use reference to short-term reference picture set in PPS
     
    10741084          uiCode = 0;
    10751085        }
    1076         memcpy(rps,sps->getRPSList()->getReferencePictureSet(uiCode),sizeof(TComReferencePictureSet));
     1086        rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode));
     1087
     1088        rps = rpcSlice->getRPS();
    10771089      }
    10781090      if(sps->getLongTermRefsPresent())
     
    10971109        rps->setNumberOfLongtermPictures(numOfLtrp);
    10981110        Int maxPicOrderCntLSB = 1 << rpcSlice->getSPS()->getBitsForPOC();
    1099         Int prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;;
     1111        Int prevLSB = 0, prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;;
    11001112        for(Int j=offset+rps->getNumberOfLongtermPictures()-1, k = 0; k < numOfLtrp; j--, k++)
    11011113        {
     
    11241136            READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" );
    11251137            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) )
    11281140            {
    11291141              deltaFlag = true;
     
    11501162            rps->setCheckLTMSBPresent(j,false); 
    11511163          }
     1164          prevLSB = pocLsbLt;
    11521165          prevDeltaMSB = deltaPocMSBCycleLT;
    11531166        }
     
    11551168        rps->setNumberOfPictures(offset);       
    11561169      } 
    1157       if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    1158         || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     1170      if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
     1171        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
    11591172        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
    11601173      {
     
    12161229      }
    12171230    }
    1218     // } 
     1231    // }
    12191232    TComRefPicListModification* refPicListModification = rpcSlice->getRefPicListModification();
    1220 
    12211233    if(!rpcSlice->isIntra())
    12221234    {
     
    13891401        if(!rpcSlice->getDeblockingFilterDisable())
    13901402        {
    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);
    13971405        }
    13981406      }
     
    14261434  }
    14271435 
     1436  if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )
     1437  {
    14281438    UInt *entryPointOffset          = NULL;
    14291439    UInt numEntryPointOffsets, offsetLenMinus1;
    1430   if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )
    1431   {
     1440
    14321441    READ_UVLC(numEntryPointOffsets, "num_entry_point_offsets"); rpcSlice->setNumEntryPointOffsets ( numEntryPointOffsets );
    14331442    if (numEntryPointOffsets>0)
     
    14461455#endif
    14471456    }
    1448   }
    1449   else
    1450   {
    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     }
    14871457
    14881458    if ( pps->getTilesEnabledFlag() )
     
    15201490    }
    15211491  }
    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();
    15231507  return;
    15241508}
     
    17711755// ====================================================================================================================
    17721756
     1757
     1758/** Parse PCM alignment zero bits.
     1759* \returns Void
     1760*/
     1761Void 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
     1778Void 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
     1811Void 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
     1833Void 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
     1857UInt TDecCavlc::xGetBit()
     1858{
     1859  UInt ruiCode;
     1860  m_pcBitstream->read( 1, ruiCode );
     1861  return ruiCode;
     1862}
     1863
     1864
    17731865/** parse explicit wp tables
    17741866* \param TComSlice* pcSlice
     
    17871879  // decode delta_luma_log2_weight_denom :
    17881880  READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" );     // ue(v): luma_log2_weight_denom
    1789   assert( uiLog2WeightDenomLuma <= 7 );
    17901881  if( bChroma )
    17911882  {
    17921883    READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" );     // se(v): delta_chroma_log2_weight_denom
    17931884    assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)>=0);
    1794     assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)<=7);
    17951885    uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma);
    17961886  }
     
    18311921        Int iDeltaWeight;
    18321922        READ_SVLC( iDeltaWeight, "delta_luma_weight_lX" );  // se(v): delta_luma_weight_l0[i]
    1833         assert( iDeltaWeight >= -128 );
    1834         assert( iDeltaWeight <=  127 );
    18351923        wp[0].iWeight = (iDeltaWeight + (1<<wp[0].uiLog2WeightDenom));
    18361924        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 );
    18391925      }
    18401926      else
     
    18511937            Int iDeltaWeight;
    18521938            READ_SVLC( iDeltaWeight, "delta_chroma_weight_lX" );  // se(v): chroma_weight_l0[i][j]
    1853             assert( iDeltaWeight >= -128 );
    1854             assert( iDeltaWeight <=  127 );
    18551939            wp[j].iWeight = (iDeltaWeight + (1<<wp[1].uiLog2WeightDenom));
    18561940
    18571941            Int iDeltaChroma;
    18581942            READ_SVLC( iDeltaChroma, "delta_chroma_offset_lX" );  // se(v): delta_chroma_offset_l0[i][j]
    1859             assert( iDeltaChroma >= -512 );
    1860             assert( iDeltaChroma <=  511 );
    18611943            Int pred = ( 128 - ( ( 128*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) );
    18621944            wp[j].iOffset = Clip3(-128, 127, (iDeltaChroma + pred) );
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r362 r438  
    6161 
    6262protected:
     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 
    6371  void  parseShortTermRefPicSet            (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx);
     72private:
    6473 
    6574public:
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecGop.cpp

    r368 r438  
    208208  rpcPic->compressMotion();
    209209#endif
     210
    210211  Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');
    211212  if (!pcSlice->isReferenced()) c += 32;
    212213
    213214  //-- For time output for each slice
     215
    214216#if H_MV
    215217  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  
    8484  Void      initCtxMem(  UInt i );
    8585  Void      setCtxMem( TDecSbac* sb, Int b )   { CTXMem[b] = sb; }
    86   Int       getCtxMemSize( )                   { return (Int)CTXMem.size(); }
    8786};
    8887
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r401 r438  
    4242ParameterSetManagerDecoder TDecTop::m_parameterSetManagerDecoder;
    4343#endif
     44
    4445//! \ingroup TLibDecoder
    4546//! \{
     
    5051  m_iMaxRefPicNum = 0;
    5152#if ENC_DEC_TRACE
    52 #if H_MV
    53   if ( g_hTrace == NULL )
    54   {
    55 #endif
    5653  g_hTrace = fopen( "TraceDec.txt", "wb" );
    5754  g_bJustDoIt = g_bEncDecTraceDisable;
    5855  g_nSymbolCounter = 0;
    59 #if H_MV
    60   }
    61 #endif
    6256#endif
    6357  m_pocCRA = 0;
     
    10094}
    10195
     96
    10297Void TDecTop::init()
    10398{
     
    106101  initROM();
    107102#endif
     103
    108104  m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO);
    109105  m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder );
     
    153149  }
    154150
    155 #if L0323_DPB
    156   m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer());     // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
    157 #else
    158151  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded
    159 #endif
    160152  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
    161153  {
     
    227219  rpcListPic          = &m_cListPic; 
    228220  m_cCuDecoder.destroy();       
     221
    229222#if H_MV
    230223  TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 
    231224  TComSlice::markIvRefPicsAsUnused   ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc );
    232225#endif
     226
    233227  m_bFirstSliceInPicture  = true;
    234228
     
    296290  assert (sps != 0);
    297291
    298   if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))
     292  if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->getIdrPicFlag()))
    299293  {
    300294    printf ("Parameter set activation failed!");
     
    302296  }
    303297
    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 
    321298  m_apcSlicePilot->setPPS(pps);
    322299  m_apcSlicePilot->setSPS(sps);
     300
    323301#if H_MV
    324302  m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );
    325303#endif
     304
    326305  pps->setSPS(sps);
    327306  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1);
    328307  pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) );
    329308
    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++)
    338310  {
    339311    sps->setAMPAcc( i, sps->getUseAMP() );
    340312  }
    341313
    342   for (Int i = sps->getLog2DiffMaxMinCodingBlockSize(); i < sps->getMaxCUDepth(); i++)
     314  for (Int i = sps->getMaxCUDepth() - g_uiAddCUDepth; i < sps->getMaxCUDepth(); i++)
    343315  {
    344316    sps->setAMPAcc( i, 0 );
     
    346318
    347319  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 );
    350322}
    351323
     
    373345
    374346  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  }
    382353  m_apcSlicePilot->setReferenced(true); // Putting this as true ensures that picture is referenced the first time it is in an RPS
    383354  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
     
    386357  m_apcSlicePilot->setLayerId( nalu.m_layerId );
    387358#endif
     359
    388360  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder);
    389361
     
    399371#endif
    400372#endif
     373
     374  if (m_apcSlicePilot->isNextSlice())
     375  {
    401376    // Skip pictures due to random access
    402377    if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
     
    409384      return false;
    410385    }
    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
    417388  // 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)
    419390  {
    420391    if (m_prevPOC >= m_pocRandomAccess)
     
    425396    m_prevPOC = m_apcSlicePilot->getPOC();
    426397  }
     398
    427399#if H_MV
    428400  if ( newLayerFlag )
     
    431403  }
    432404#endif
     405
     406
    433407  // actual decoding starts here
    434408  xActivateParameterSets();
     
    445419    xCreateLostPicture(lostPoc-1);
    446420  }
     421
    447422  if (m_bFirstSliceInPicture)
    448423  {
     
    450425    m_cPrediction.initTempBuff();
    451426    m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS());
     427   
    452428#if H_MV
    453429    m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );
    454430#endif
     431
     432
    455433    //  Get a new picture buffer
    456434    xGetNewPicBuffer (m_apcSlicePilot, pcPic);
     
    591569#endif
    592570#endif
     571
    593572  if (bNextSlice)
    594573  {
    595     pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic );
     574    pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA );
    596575    // Set reference list
     576
    597577#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 );   
    602579#else
    603580    pcSlice->setRefPicList( m_cListPic );
    604581#endif
    605582
    606 #endif
    607583    // For generalized B
    608584    // note: maybe not existed case (always L0 is copied to L1 if L1 is empty)
     
    646622    //---------------
    647623    pcSlice->setRefPOCList();
    648 #if !L0034_COMBINED_LIST_CLEANUP
    649624    pcSlice->setNoBackPredFlag( false );
    650625    if ( pcSlice->getSliceType() == B_SLICE )
     
    663638      }
    664639    }
    665 #endif
    666640  }
    667641
     
    717691  m_cEntropyDecoder.decodePPS( pps );
    718692  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  }
    719706}
    720707
    721708Void TDecTop::xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType )
    722709{
    723   if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
     710  if(nalUnitType == NAL_UNIT_SEI_SUFFIX)
    724711  {
    725712    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     
    766753      return false;
    767754     
    768     case NAL_UNIT_PREFIX_SEI:
    769     case NAL_UNIT_SUFFIX_SEI:
     755    case NAL_UNIT_SEI:
     756    case NAL_UNIT_SEI_SUFFIX:
    770757      xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType );
    771758      return false;
     
    773760    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    774761    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    775     case NAL_UNIT_CODED_SLICE_TLA_R:
     762    case NAL_UNIT_CODED_SLICE_TLA:
    776763    case NAL_UNIT_CODED_SLICE_TSA_N:
    777764    case NAL_UNIT_CODED_SLICE_STSA_R:
    778765    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:
    781768    case NAL_UNIT_CODED_SLICE_BLA_N_LP:
    782     case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
     769    case NAL_UNIT_CODED_SLICE_IDR:
    783770    case NAL_UNIT_CODED_SLICE_IDR_N_LP:
    784771    case NAL_UNIT_CODED_SLICE_CRA:
    785772    case NAL_UNIT_CODED_SLICE_RADL_N:
    786     case NAL_UNIT_CODED_SLICE_RADL_R:
     773    case NAL_UNIT_CODED_SLICE_DLP:
    787774    case NAL_UNIT_CODED_SLICE_RASL_N:
    788     case NAL_UNIT_CODED_SLICE_RASL_R:
     775    case NAL_UNIT_CODED_SLICE_TFD:
    789776#if H_MV
    790777      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);
     
    808795Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay)
    809796{
    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))
    811798  {
    812799    iPOCLastDisplay++;
     
    839826  {
    840827    if (   m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA
    841         || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
     828        || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
    842829        || 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 )
    844831    {
    845832      // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT.
    846833      m_pocRandomAccess = m_apcSlicePilot->getPOC();
    847834    }
    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 )
    849836    {
    850837      m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.
     
    862849  }
    863850  // 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))
    865852  {
    866853    iPOCLastDisplay++;
     
    894881
    895882#endif
     883
    896884//! \}
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibDecoder/TDecTop.h

    r368 r438  
    6464class TAppDecTop;
    6565#endif
     66
    6667/// decoder class
    6768class TDecTop
     
    8081  ParameterSetManagerDecoder m_parameterSetManagerDecoder;  // storage for parameter sets
    8182#endif
     83
    8284  TComSlice*              m_apcSlicePilot;
    8385 
     
    140142#endif
    141143 
     144
    142145#if H_MV   
    143146  TComPic*                getPic                ( Int poc );
     
    155158#endif
    156159#endif
     160 
    157161protected:
    158162  Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/SEIwrite.cpp

    r362 r438  
    8484    fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n");
    8585    break;
    86 #if J0149_TONE_MAPPING_SEI
    87   case SEI::TONE_MAPPING_INFO:
    88     fprintf( g_hTrace, "=========== Tone Mapping Info SEI message ===========\n");
    89     break;
    90 #endif
    91 #if L0208_SOP_DESCRIPTION_SEI
    92   case SEI::SOP_DESCRIPTION:
    93     fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");
    94     break;
    95 #endif
    96 #if K0180_SCALABLE_NESTING_SEI
    97   case SEI::SCALABLE_NESTING:
    98     fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    99     break;
    100 #endif
    10186  default:
    10287    fprintf( g_hTrace, "=========== Unknown SEI message ===========\n");
     
    10691#endif
    10792
    108 #if K0180_SCALABLE_NESTING_SEI
    109 void SEIWriter::xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps)
    110 #else
    11193void SEIWriter::xWriteSEIpayloadData(const SEI& sei, TComSPS *sps)
    112 #endif
    11394{
    11495  switch (sei.payloadType())
     
    147128    xWriteSEIGradualDecodingRefreshInfo(*static_cast<const SEIGradualDecodingRefreshInfo*>(&sei));
    148129    break;
    149 #if J0149_TONE_MAPPING_SEI
    150   case SEI::TONE_MAPPING_INFO:
    151     xWriteSEIToneMappingInfo(*static_cast<const SEIToneMappingInfo*>(&sei));
    152     break;
    153 #endif
    154 #if L0208_SOP_DESCRIPTION_SEI
    155   case SEI::SOP_DESCRIPTION:
    156     xWriteSEISOPDescription(*static_cast<const SEISOPDescription*>(&sei));
    157     break;
    158 #endif
    159 #if K0180_SCALABLE_NESTING_SEI
    160   case SEI::SCALABLE_NESTING:
    161     xWriteSEIScalableNesting(bs, *static_cast<const SEIScalableNesting*>(&sei), sps);
    162     break;
    163 #endif
    164130  default:
    165131    assert(!"Unhandled SEI message");
     
    179145  setBitstream(&bs_count);
    180146
    181 
    182 #if K0180_SCALABLE_NESTING_SEI
    183 
    184 #if ENC_DEC_TRACE
    185   Bool traceEnable = g_HLSTraceEnable;
    186   g_HLSTraceEnable = false;
    187 #endif
    188   xWriteSEIpayloadData(bs_count, sei, sps);
    189 #if ENC_DEC_TRACE
    190   g_HLSTraceEnable = traceEnable;
    191 #endif
    192 
    193 #else
    194 
    195147#if ENC_DEC_TRACE
    196148  g_HLSTraceEnable = false;
     
    200152  g_HLSTraceEnable = true;
    201153#endif
    202 
    203 #endif
    204 
    205154  UInt payload_data_num_bits = bs_count.getNumberOfWrittenBits();
    206155  assert(0 == payload_data_num_bits % 8);
     
    209158
    210159#if ENC_DEC_TRACE
    211 #if K0180_SCALABLE_NESTING_SEI
    212   if (g_HLSTraceEnable)
    213 #endif
    214160  xTraceSEIHeader();
    215161#endif
     
    231177  /* payloadData */
    232178#if ENC_DEC_TRACE
    233 #if K0180_SCALABLE_NESTING_SEI
    234   if (g_HLSTraceEnable)
    235 #endif
    236179  xTraceSEIMessageType(sei.payloadType());
    237180#endif
    238181
    239 #if K0180_SCALABLE_NESTING_SEI
    240   xWriteSEIpayloadData(bs, sei, sps);
    241 #else
    242182  xWriteSEIpayloadData(sei, sps);
    243 #endif
    244183}
    245184
     
    482421  xWriteByteAlign();
    483422}
    484 
    485 #if J0149_TONE_MAPPING_SEI
    486 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_ISO
    534         {
    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_modelId
    553   }//if(!sei.m_toneMapCancelFlag)
    554 
    555   xWriteByteAlign();
    556 }
    557 #endif
    558 
    559423Void SEIWriter::xWriteSEIDisplayOrientation(const SEIDisplayOrientation &sei)
    560424{
     
    591455}
    592456
    593 #if L0208_SOP_DESCRIPTION_SEI
    594 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 #endif
    615 
    616 #if K0180_SCALABLE_NESTING_SEI
    617 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   else
    633   {
    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 alignment
    647   while ( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0 )
    648   {
    649     WRITE_FLAG( 0, "nesting_zero_bit" );
    650   }
    651 
    652   // write nested SEI messages
    653   for (SEIMessages::const_iterator it = sei.m_nestedSEIs.begin(); it != sei.m_nestedSEIs.end(); it++)
    654   {
    655     writeSEImessage(bs, *(*it), sps);
    656   }
    657 }
    658 #endif
    659 
    660457Void SEIWriter::xWriteByteAlign()
    661458{
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/SEIwrite.h

    r362 r438  
    5050
    5151protected:
    52 #if K0180_SCALABLE_NESTING_SEI
    53   Void xWriteSEIpayloadData(TComBitIf& bs, const SEI& sei, TComSPS *sps);
    54 #else
    5552  Void xWriteSEIpayloadData(const SEI& sei, TComSPS *sps);
    56 #endif
    5753  Void xWriteSEIuserDataUnregistered(const SEIuserDataUnregistered &sei);
    5854  Void xWriteSEIActiveParameterSets(const SEIActiveParameterSets& sei);
     
    6763  Void xWriteSEITemporalLevel0Index(const SEITemporalLevel0Index &sei);
    6864  Void xWriteSEIGradualDecodingRefreshInfo(const SEIGradualDecodingRefreshInfo &sei);
    69 #if J0149_TONE_MAPPING_SEI
    70   Void xWriteSEIToneMappingInfo(const SEIToneMappingInfo& sei);
    71 #endif
    72 #if L0208_SOP_DESCRIPTION_SEI
    73   Void xWriteSEISOPDescription(const SEISOPDescription& sei);
    74 #endif
    75 #if K0180_SCALABLE_NESTING_SEI
    76   Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, TComSPS *sps);
    77 #endif
    7865  Void xWriteByteAlign();
    7966};
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp

    r401 r438  
    185185{
    186186  {
    187 #if !H_MV
    188187    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    189188    DTRACE_CABAC_T( "\tstate=" )
     
    192191    DTRACE_CABAC_V( binValue )
    193192    DTRACE_CABAC_T( "\n" )
    194 #endif
    195193  }
    196194  m_uiBinsCoded += m_binCountIncrement;
     
    233231{
    234232  {
    235 #if !H_MV
    236233    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    237234    DTRACE_CABAC_T( "\tEPsymbol=" )
    238235    DTRACE_CABAC_V( binValue )
    239236    DTRACE_CABAC_T( "\n" )
    240 #endif
    241237  }
    242238  m_uiBinsCoded += m_binCountIncrement;
     
    263259  for ( Int i = 0; i < numBins; i++ )
    264260  {
    265 #if !H_MV
    266261    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    267262    DTRACE_CABAC_T( "\tEPsymbol=" )
    268263    DTRACE_CABAC_V( ( binValues >> ( numBins - 1 - i ) ) & 1 )
    269264    DTRACE_CABAC_T( "\n" )
    270 #endif
    271265  }
    272266 
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r401 r438  
    285285  WRITE_FLAG(pcVUI->getNeutralChromaIndicationFlag(),           "neutral_chroma_indication_flag");
    286286  WRITE_FLAG(pcVUI->getFieldSeqFlag(),                          "field_seq_flag");
     287  assert(pcVUI->getFieldSeqFlag() == 0);                        // not currently supported
    287288  WRITE_FLAG(pcVUI->getFrameFieldInfoPresentFlag(),             "frame_field_info_present_flag");
    288289
     
    473474  for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    474475  {
    475 #if L0323_DPB
    476     WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i) - 1,       "sps_max_dec_pic_buffering_minus1[i]" );
    477 #else
    478476    WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i),           "sps_max_dec_pic_buffering[i]" );
    479 #endif
    480477    WRITE_UVLC( pcSPS->getNumReorderPics(i),               "sps_num_reorder_pics[i]" );
    481478    WRITE_UVLC( pcSPS->getMaxLatencyIncrease(i),           "sps_max_latency_increase[i]" );
     
    487484  assert( pcSPS->getMaxCUWidth() == pcSPS->getMaxCUHeight() );
    488485 
    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" );
    491496  WRITE_UVLC( pcSPS->getQuadtreeTULog2MinSize() - 2,                                 "log2_min_transform_block_size_minus2" );
    492497  WRITE_UVLC( pcSPS->getQuadtreeTULog2MaxSize() - pcSPS->getQuadtreeTULog2MinSize(), "log2_diff_max_min_transform_block_size" );
     
    549554  }
    550555
    551 #if H_MV
    552   WRITE_FLAG( 1, "sps_extension_flag" );
    553 
    554   WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" );
    555 #else
    556556  WRITE_FLAG( 0, "sps_extension_flag" );
    557 #endif
    558557}
    559558
     
    570569  WRITE_FLAG( pcVPS->getTemporalNestingFlag(),                "vps_temporal_id_nesting_flag" );
    571570  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    572 #if H_MV
    573571  WRITE_CODE( 0xffff,                              16,        "vps_extension_offset" );
    574 #else
    575   WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
    576 #endif
    577572  codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 );
    578573#if SIGNAL_BITRATE_PICRATE_IN_VPS
     
    583578  for(UInt i=0; i <= pcVPS->getMaxTLayers()-1; i++)
    584579  {
    585 #if L0323_DPB
    586     WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i) - 1,       "vps_max_dec_pic_buffering_minus1[i]" );
    587 #else
    588580    WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i),           "vps_max_dec_pic_buffering[i]" );
    589 #endif
    590581    WRITE_UVLC( pcVPS->getNumReorderPics(i),               "vps_num_reorder_pics[i]" );
    591582    WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i),           "vps_max_latency_increase[i]" );
     
    654645  }
    655646#endif
     647
    656648#if H_MV
    657649  WRITE_FLAG( 1,                                             "vps_extension_flag" );
     
    792784      WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb");
    793785      TComReferencePictureSet* rps = pcSlice->getRPS();
    794      
    795 #if FIX1071
    796       // 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 picture
    799       TComReferencePictureSet altRps;
    800       Bool useAltRps = false;
    801 #if H_MV
    802       if (pcSlice->getRapPicFlag() && ( pcSlice->getLayerId() == 0 ) )
    803 #else
    804       if (pcSlice->getRapPicFlag())
    805 #endif
    806       {
    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 #else
    824786      if(pcSlice->getRPSidx() < 0)
    825 #endif
    826787      {
    827788        WRITE_FLAG( 0, "short_term_ref_pic_set_sps_flag");
     
    14061367// ====================================================================================================================
    14071368
     1369
     1370/** Write PCM alignment bits.
     1371 * \returns Void
     1372 */
     1373Void  TEncCavlc::xWritePCMAlignZero    ()
     1374{
     1375  m_pcBitIf->writeAlignZero();
     1376}
     1377
     1378Void 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
     1403Void 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
     1431Void 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
    14081447/** code explicit wp tables
    14091448 * \param TComSlice* pcSlice
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncCavlc.h

    r362 r438  
    6868  TComSlice*    m_pcSlice;
    6969  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 );
    7075
    7176  Void codeShortTermRefPicSet              ( TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Bool calledFromSliceHeader, Int idx );
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncCfg.h

    r372 r438  
    7474  Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 
    7575#endif
     76
    7677  GOPEntry()
    7778  : m_POC(-1)
     
    171172  Int       m_loopFilterTcOffsetDiv2;
    172173  Bool      m_DeblockingFilterControlPresent;
    173 #if L0386_DB_METRIC
    174   Bool      m_DeblockingFilterMetric;
    175 #endif
    176174  Bool      m_bUseSAO;
    177175  Int       m_maxNumOffsetsPerPic;
     
    204202  Bool      m_bUseASR;
    205203  Bool      m_bUseHADME;
    206 #if !L0034_COMBINED_LIST_CLEANUP
    207204  Bool      m_bUseLComb;
    208 #endif
    209205  Bool      m_useRDOQ;
    210206  Bool      m_useRDOQTS;
     
    252248  Int       m_pictureTimingSEIEnabled;
    253249  Int       m_recoveryPointSEIEnabled;
    254 #if J0149_TONE_MAPPING_SEI
    255   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 #endif
    281250  Int       m_framePackingSEIEnabled;
    282251  Int       m_framePackingSEIType;
     
    288257  Int       m_gradualDecodingRefreshInfoEnabled;
    289258  Int       m_decodingUnitInfoSEIEnabled;
    290 #if L0208_SOP_DESCRIPTION_SEI
    291   Int       m_SOPDescriptionSEIEnabled;
    292 #endif
    293 #if K0180_SCALABLE_NESTING_SEI
    294   Int       m_scalableNestingSEIEnabled;
    295 #endif
    296259  //====== Weighted Prediction ========
    297260  Bool      m_useWeightedPred;       //< Use of Weighting Prediction (P_SLICE)
     
    362325#endif
    363326#endif
     327
    364328public:
    365329  TEncCfg()
     
    407371#endif
    408372#endif
     373
    409374  //====== Coding Structure ========
    410375  Void      setIntraPeriod                  ( Int   i )      { m_uiIntraPeriod = (UInt)i; }
     
    444409  Void      setLoopFilterTcOffset           ( Int   i )      { m_loopFilterTcOffsetDiv2    = i; }
    445410  Void      setDeblockingFilterControlPresent ( Bool b ) { m_DeblockingFilterControlPresent = b; }
    446 #if L0386_DB_METRIC
    447   Void      setDeblockingFilterMetric       ( Bool  b )      { m_DeblockingFilterMetric = b; }
    448 #endif
    449411
    450412  //====== Motion search ========
     
    501463  Int       getLoopFilterTcOffset           ()      { return m_loopFilterTcOffsetDiv2; }
    502464  Bool      getDeblockingFilterControlPresent()  { return  m_DeblockingFilterControlPresent; }
    503 #if L0386_DB_METRIC
    504   Bool      getDeblockingFilterMetric       ()      { return m_DeblockingFilterMetric; }
    505 #endif
    506465
    507466  //==== Motion search ========
     
    521480  Void      setUseASR                       ( Bool  b )     { m_bUseASR     = b; }
    522481  Void      setUseHADME                     ( Bool  b )     { m_bUseHADME   = b; }
    523 #if !L0034_COMBINED_LIST_CLEANUP
    524482  Void      setUseLComb                     ( Bool  b )     { m_bUseLComb   = b; }
    525 #endif
    526483  Void      setUseRDOQ                      ( Bool  b )     { m_useRDOQ    = b; }
    527484  Void      setUseRDOQTS                    ( Bool  b )     { m_useRDOQTS  = b; }
     
    545502  Bool      getUseASR                       ()      { return m_bUseASR;     }
    546503  Bool      getUseHADME                     ()      { return m_bUseHADME;   }
    547 #if !L0034_COMBINED_LIST_CLEANUP
    548504  Bool      getUseLComb                     ()      { return m_bUseLComb;   }
    549 #endif
    550505  Bool      getUseRDOQ                      ()      { return m_useRDOQ;    }
    551506  Bool      getUseRDOQTS                    ()      { return m_useRDOQTS;  }
     
    644599  Void  setRecoveryPointSEIEnabled(Int b)                { m_recoveryPointSEIEnabled = b; }
    645600  Int   getRecoveryPointSEIEnabled()                     { return m_recoveryPointSEIEnabled; }
    646 #if J0149_TONE_MAPPING_SEI
    647   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 #endif
    698601  Void  setFramePackingArrangementSEIEnabled(Int b)      { m_framePackingSEIEnabled = b; }
    699602  Int   getFramePackingArrangementSEIEnabled()           { return m_framePackingSEIEnabled; }
     
    714617  Void  setDecodingUnitInfoSEIEnabled(Int b)                { m_decodingUnitInfoSEIEnabled = b;    }
    715618  Int   getDecodingUnitInfoSEIEnabled()                     { return m_decodingUnitInfoSEIEnabled; }
    716 #if L0208_SOP_DESCRIPTION_SEI
    717   Void  setSOPDescriptionSEIEnabled(Int b)                { m_SOPDescriptionSEIEnabled = b; }
    718   Int   getSOPDescriptionSEIEnabled()                     { return m_SOPDescriptionSEIEnabled; }
    719 #endif
    720 #if K0180_SCALABLE_NESTING_SEI
    721   Void  setScalableNestingSEIEnabled(Int b)                { m_scalableNestingSEIEnabled = b; }
    722   Int   getScalableNestingSEIEnabled()                     { return m_scalableNestingSEIEnabled; }
    723 #endif
    724619  Void      setUseWP               ( Bool b )    { m_useWeightedPred   = b;    }
    725620  Void      setWPBiPred            ( Bool b )    { m_useWeightedBiPred = b;    }
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncEntropy.cpp

    r401 r438  
    587587  if( pcCU->isIntra(uiAbsPartIdx) )
    588588  {
    589 #if !H_MV
    590589    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    591590    DTRACE_CABAC_T( "\tdecodeTransformIdx()\tCUDepth=" )
    592591    DTRACE_CABAC_V( uiDepth )
    593592    DTRACE_CABAC_T( "\n" )
    594 #endif
    595593  }
    596594  else
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r401 r438  
    9696#if L0045_NON_NESTED_SEI_RESTRICTIONS
    9797  xResetNonNestedSEIPresentFlags();
    98 #if K0180_SCALABLE_NESTING_SEI
    99   xResetNestedSEIPresentFlags();
    100 #endif
    101 #endif
     98#endif
     99
    102100#if H_MV
    103101  m_layerId      = 0;
     
    108106#endif
    109107#endif
     108
    110109  return;
    111110}
     
    212211}
    213212
    214 #if J0149_TONE_MAPPING_SEI
    215 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 #endif
    301213Void TEncGOP::xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps)
    302214{
    303   OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
     215  OutputNALUnit nalu(NAL_UNIT_SEI);
    304216
    305217  if(m_pcCfg->getActiveParameterSetsSEIEnabled())
     
    322234    SEIFramePacking *sei = xCreateSEIFramePacking ();
    323235
    324     nalu = NALUnit(NAL_UNIT_PREFIX_SEI);
     236    nalu = NALUnit(NAL_UNIT_SEI);
    325237    m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
    326238    m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps);
     
    333245    SEIDisplayOrientation *sei = xCreateSEIDisplayOrientation();
    334246
    335     nalu = NALUnit(NAL_UNIT_PREFIX_SEI);
     247    nalu = NALUnit(NAL_UNIT_SEI);
    336248    m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
    337249    m_seiWriter.writeSEImessage(nalu.m_Bitstream, *sei, sps);
     
    340252    delete sei;
    341253  }
    342 #if J0149_TONE_MAPPING_SEI
    343   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 #endif
    355254}
    356255
     
    358257// Public member functions
    359258// ====================================================================================================================
     259
    360260#if H_MV
    361261Void TEncGOP::initGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP)
     
    365265}
    366266#endif
     267
    367268#if H_MV
    368269Void TEncGOP::compressPicInGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, Int iGOPid)
     
    374275  TComPicYuv*     pcPicYuvRecOut;
    375276  TComSlice*      pcSlice;
    376   TComOutputBitstream  *pcBitstreamRedirect;
    377   pcBitstreamRedirect = new TComOutputBitstream;
     277  TComOutputBitstream* pcBitstreamRedirect = new TComOutputBitstream;
    378278  AccessUnit::iterator  itLocationToPushSliceHeaderNALU; // used to store location where NALU containing slice header is to be inserted
    379279  UInt                  uiOneBitstreamPerSliceLength = 0;
     
    386286  m_iNumPicCoded = 0;
    387287#endif
     288
    388289  SEIPictureTiming pictureTimingSEI;
    389 #if L0208_SOP_DESCRIPTION_SEI
    390   Bool writeSOP = m_pcCfg->getSOPDescriptionSEIEnabled();
    391 #endif
    392 #if K0180_SCALABLE_NESTING_SEI
    393   // Initialize Scalable Nesting SEI with single layer values
    394   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 1
    396   scalableNestingSEI.m_nestingOpFlag                 = 0;
    397   scalableNestingSEI.m_nestingNumOpsMinus1           = 0;      //nesting_num_ops_minus1
    398   scalableNestingSEI.m_allLayersFlag                 = 0;
    399   scalableNestingSEI.m_nestingNoOpMaxTemporalIdPlus1 = 6 + 1;  //nesting_no_op_max_temporal_id_plus1
    400   scalableNestingSEI.m_nestingNumLayersMinus1        = 1 - 1;  //nesting_num_layers_minus1
    401   scalableNestingSEI.m_nestingLayerId[0]             = 0;
    402   scalableNestingSEI.m_callerOwnsSEIs                = true;
    403 #endif
    404290#if L0044_DU_DPB_OUTPUT_DELAY_HRD
    405291  Int picSptDpbOutputDuDelay = 0;
     
    408294  UInt *accumNalsDU = NULL;
    409295  SEIDecodingUnitInfo decodingUnitInfoSEI;
     296
    410297#if !H_MV
    411298  for ( Int iGOPid=0; iGOPid < m_iGopSize; iGOPid++ )
    412299#endif
     300
    413301  {
    414302    UInt uiColDir = 1;
     
    469357    if(pocCurr>=m_pcCfg->getFramesToBeEncoded())
    470358    {
     359
    471360#if H_MV
    472361      delete pcBitstreamRedirect;
     
    475364      continue;
    476365#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 )
    480370    {
    481371      m_iLastIDR = pocCurr;
     
    495385    pcSlice->setLastIDR(m_iLastIDR);
    496386    pcSlice->setSliceIdx(0);
     387
    497388#if H_MV
    498389    pcPic  ->setLayerId     ( getLayerId() );
     
    506397#endif
    507398#endif
     399
    508400    //set default slice level flag to the same as SPS level flag
    509401    pcSlice->setLFCrossSliceBoundaryFlag(  pcSlice->getPPS()->getLoopFilterAcrossSlicesEnabledFlag()  );
     
    545437#if H_MV
    546438    // Set the nal unit type
    547     pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR));
     439    pcSlice->setNalUnitType(getNalUnitType(pocCurr));
    548440    if( pcSlice->getSliceType() == B_SLICE )
    549441    {
     
    559451    }
    560452    // Set the nal unit type
    561     pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR));
    562 #endif
    563     if(pcSlice->getTemporalLayerNonReferenceFlag())
    564     {
    565       if(pcSlice->getNalUnitType()==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())
    566458      {
    567459        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);
    576460      }
    577461    }
     
    598482        else
    599483        {
    600           pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TLA_R);
     484          pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_TLA);
    601485        }
    602486      }
     
    684568    }
    685569#endif
    686 #if !L0034_COMBINED_LIST_CLEANUP
     570
    687571    if (pcSlice->getSliceType() != B_SLICE || !pcSlice->getSPS()->getUseLComb())
    688572    {
     
    696580      pcSlice->setNumRefIdx(REF_PIC_LIST_C, pcSlice->getNumRefIdx(REF_PIC_LIST_0));
    697581    }
    698 #endif
    699582
    700583    if (pcSlice->getSliceType() == B_SLICE)
     
    722605      pcSlice->setCheckLDC(bLowDelay); 
    723606    }
    724     else
    725     {
    726       pcSlice->setCheckLDC(true); 
    727     }
    728607
    729608    uiColDir = 1-uiColDir;
     
    732611    pcSlice->setRefPOCList();
    733612
    734 #if L0034_COMBINED_LIST_CLEANUP
    735     pcSlice->setList1IdxToList0Idx();
    736 #else
    737613    pcSlice->setNoBackPredFlag( false );
    738614    if ( pcSlice->getSliceType() == B_SLICE && !pcSlice->getRefPicListCombinationFlag())
     
    758634    }
    759635    pcSlice->generateCombinedList();
    760 #endif
    761636
    762637    if (m_pcEncTop->getTMVPModeId() == 2)
     
    1064939    Bool bLFCrossTileBoundary = pcSlice->getPPS()->getLoopFilterAcrossTilesEnabledFlag();
    1065940    m_pcLoopFilter->setCfg(bLFCrossTileBoundary);
    1066 #if L0386_DB_METRIC
    1067     if ( m_pcCfg->getDeblockingFilterMetric() )
    1068     {
    1069       dblMetric(pcPic, uiNumSlices);
    1070     }
    1071 #endif
    1072941    m_pcLoopFilter->loopFilterPic( pcPic );
    1073942
     
    11681037    }
    11691038
    1170 #if L0208_SOP_DESCRIPTION_SEI
    1171     if (writeSOP) // write SOP description SEI (if enabled) at the beginning of GOP
    1172     {
    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 #endif
    1209 
    12101039    if( ( m_pcCfg->getPictureTimingSEIEnabled() || m_pcCfg->getDecodingUnitInfoSEIEnabled() ) &&
    12111040        ( pcSlice->getSPS()->getVuiParametersPresentFlag() ) &&
     
    12531082       || ( pcSlice->getSPS()->getVuiParameters()->getHrdParameters()->getVclHrdParametersPresentFlag() ) ) )
    12541083    {
    1255       OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
     1084      OutputNALUnit nalu(NAL_UNIT_SEI);
    12561085      m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
    12571086      m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
     
    12941123      writeRBSPTrailingBits(nalu.m_Bitstream);
    12951124#if L0045_NON_NESTED_SEI_RESTRICTIONS
    1296       {
    12971125      UInt seiPositionInAu = xGetFirstSeiLocation(accessUnit);
    12981126      UInt offsetPosition = m_activeParameterSetSEIPresentInAU;   // Insert BP SEI after APS SEI
     
    13041132      accessUnit.insert(it, new NALUnitEBSP(nalu));
    13051133      m_bufferingPeriodSEIPresentInAU = true;
    1306       }
    13071134#else
    13081135      accessUnit.push_back(new NALUnitEBSP(nalu));
    13091136#endif
    13101137
    1311 #if K0180_SCALABLE_NESTING_SEI
    1312       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_RESTRICTIONS
    1322         UInt seiPositionInAu = xGetFirstSeiLocation(accessUnit);
    1323         UInt offsetPosition = m_activeParameterSetSEIPresentInAU + m_bufferingPeriodSEIPresentInAU + m_pictureTimingSEIPresentInAU;   // Insert BP SEI after non-nested APS, BP and PT SEIs
    1324         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 #else
    1332         accessUnit.push_back(new NALUnitEBSP(naluTmp));
    1333 #endif
    1334       }
    1335 #endif
    1336 
    13371138      m_lastBPSEI = m_totalCoded;
    13381139      m_cpbRemovalDelay = 0;
     
    13441145      {
    13451146        // Gradual decoding refresh SEI
    1346         OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
     1147        OutputNALUnit nalu(NAL_UNIT_SEI);
    13471148        m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
    13481149        m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
     
    13561157      }
    13571158    // Recovery point SEI
    1358       OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
     1159      OutputNALUnit nalu(NAL_UNIT_SEI);
    13591160      m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
    13601161      m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
     
    15471348
    15481349          pcSlice->setTileOffstForMultES( uiOneBitstreamPerSliceLength );
     1350          if (!sliceSegment)
     1351          {
    15491352            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          }
    15511359
    15521360          {
     
    15801388              if (ui+1 < pcSlice->getPPS()->getNumSubstreams())
    15811389              {
    1582                 puiSubstreamSizes[ui] = pcSubstreamsOut[ui].getNumberOfWrittenBits() + (pcSubstreamsOut[ui].countStartCodeEmulations()<<3);
     1390                puiSubstreamSizes[ui] = pcSubstreamsOut[ui].getNumberOfWrittenBits();
    15831391              }
    15841392            }
     
    16121420          // 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.
    16131421          Bool bNALUAlignedWrittenToList    = false; // used to ensure current NALU is not written more than once to the NALU list.
    1614           xAttachSliceDataToNalUnit(nalu, pcBitstreamRedirect);
     1422          xWriteTileLocationToSliceHeader(nalu, pcBitstreamRedirect, pcSlice);
    16151423          accessUnit.push_back(new NALUnitEBSP(nalu));
    16161424#if RATE_CONTROL_LAMBDA_DOMAIN
     
    16401448            {
    16411449              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)
    16431451              {
    16441452                numRBSPBytes += numRBSPBytes_nal;
     
    17101518      pcPic->compressMotion();
    17111519#endif
     1520
    17121521#if H_MV
    17131522      m_pocLastCoded = pcPic->getPOC();
     
    17401549          digestStr = digestToString(sei_recon_picture_digest.digest, 4);
    17411550        }
    1742         OutputNALUnit nalu(NAL_UNIT_SUFFIX_SEI, pcSlice->getTLayer());
     1551        OutputNALUnit nalu(NAL_UNIT_SEI_SUFFIX, pcSlice->getTLayer());
    17431552
    17441553        /* write the SEI messages */
     
    17641573        sei_temporal_level0_index.rapIdx = m_rapIdx;
    17651574
    1766         OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
     1575        OutputNALUnit nalu(NAL_UNIT_SEI);
    17671576
    17681577        /* write the SEI messages */
     
    19041713        if( m_pcCfg->getPictureTimingSEIEnabled() )
    19051714        {
    1906           {
    1907             OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI, pcSlice->getTLayer());
     1715          OutputNALUnit nalu(NAL_UNIT_SEI, pcSlice->getTLayer());
    19081716          m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
    19091717          m_seiWriter.writeSEImessage(nalu.m_Bitstream, pictureTimingSEI, pcSlice->getSPS());
     
    19251733#endif
    19261734        }
    1927 #if K0180_SCALABLE_NESTING_SEI
    1928           if ( m_pcCfg->getScalableNestingSEIEnabled() ) // put picture timing SEI into scalable nesting SEI
    1929           {
    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_RESTRICTIONS
    1937             UInt seiPositionInAu = xGetFirstSeiLocation(accessUnit);
    1938             UInt offsetPosition = m_activeParameterSetSEIPresentInAU
    1939               + m_bufferingPeriodSEIPresentInAU + m_pictureTimingSEIPresentInAU + m_nestedBufferingPeriodSEIPresentInAU;    // Insert PT SEI after APS and BP SEI
    1940             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 #else
    1948             AccessUnit::iterator it = find_if(accessUnit.begin(), accessUnit.end(), mem_fun(&NALUnit::isSlice));
    1949             accessUnit.insert(it, new NALUnitEBSP(nalu));
    1950 #endif
    1951           }
    1952 #endif
    1953 
    1954         }
    19551735        if( m_pcCfg->getDecodingUnitInfoSEIEnabled() && hrd->getSubPicCpbParamsPresentFlag() )
    19561736        {             
     
    19581738          for( Int i = 0; i < ( pictureTimingSEI.m_numDecodingUnitsMinus1 + 1 ); i ++ )
    19591739          {
    1960             OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI, pcSlice->getTLayer());
     1740            OutputNALUnit nalu(NAL_UNIT_SEI, pcSlice->getTLayer());
    19611741
    19621742            SEIDecodingUnitInfo tempSEI;
     
    20061786                  break;
    20071787                }
    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)
    20091789                {
    20101790                  ctr++;
     
    20171797#if L0045_NON_NESTED_SEI_RESTRICTIONS
    20181798      xResetNonNestedSEIPresentFlags();
    2019 #if K0180_SCALABLE_NESTING_SEI
    2020       xResetNestedSEIPresentFlags();
    2021 #endif
    20221799#endif
    20231800      pcPic->getPicYuvRec()->copyToPic(pcPicYuvRecOut);
     
    20521829  assert ( m_iNumPicCoded == iNumPicRcvd );
    20531830#endif
     1831
    20541832}
    20551833
     
    22452023    case NAL_UNIT_CODED_SLICE_TRAIL_R: return "TRAIL_R";
    22462024    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";
    22482026    case NAL_UNIT_CODED_SLICE_TSA_N: return "TSA_N";
    22492027    case NAL_UNIT_CODED_SLICE_STSA_R: return "STSA_R";
    22502028    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";
    22532031    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";
    22552033    case NAL_UNIT_CODED_SLICE_IDR_N_LP: return "IDR_N_LP";
    22562034    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";
    22592037    case NAL_UNIT_VPS: return "VPS";
    22602038    case NAL_UNIT_SPS: return "SPS";
     
    22642042    case NAL_UNIT_EOB: return "EOB";
    22652043    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";
    22682045    default: return "UNK";
    22692046  }
     
    23562133    printf("*** %6s numBytesInNALunit: %u\n", nalUnitTypeToString((*it)->m_nalUnitType), numRBSPBytes_nal);
    23572134#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)
    23592136    {
    23602137      numRBSPBytes += numRBSPBytes_nal;
     
    23662143
    23672144  //===== add PSNR =====
     2145
    23682146#if H_MV
    23692147  m_pcEncTop->getAnalyzeAll()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
     
    23712149  m_gcAnalyzeAll.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
    23722150#endif
     2151
    23732152  TComSlice*  pcSlice = pcPic->getSlice(0);
    23742153  if (pcSlice->isIntra())
    23752154  {
     2155
    23762156#if H_MV
    23772157    m_pcEncTop->getAnalyzeI()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
     
    23792159    m_gcAnalyzeI.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
    23802160#endif
     2161
    23812162  }
    23822163  if (pcSlice->isInterP())
    23832164  {
     2165
    23842166#if H_MV
    23852167    m_pcEncTop->getAnalyzeP()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
     
    23872169    m_gcAnalyzeP.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
    23882170#endif
     2171
    23892172  }
    23902173  if (pcSlice->isInterB())
    23912174  {
     2175
    23922176#if H_MV
    23932177    m_pcEncTop->getAnalyzeB()->addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
     
    23952179    m_gcAnalyzeB.addResult (dYPSNR, dUPSNR, dVPSNR, (Double)uibits);
    23962180#endif
     2181
    23972182  }
    23982183
     
    24012186
    24022187#if ADAPTIVE_QP_SELECTION
     2188
    24032189#if H_MV
    24042190  printf("Layer %3d   POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits",
     
    24192205         uibits );
    24202206#endif
     2207
    24212208#else
     2209
    24222210#if H_MV
    24232211  printf("Layer %3d   POC %4d TId: %1d ( %c-SLICE, QP %d ) %10d bits",
     
    24362224         uibits );
    24372225#endif
     2226
    24382227#endif
    24392228
     
    24682257 * This function checks the configuration and returns the appropriate nal_unit_type for the picture.
    24692258 */
    2470 NalUnitType TEncGOP::getNalUnitType(Int pocCurr, Int lastIDR)
     2259NalUnitType TEncGOP::getNalUnitType(Int pocCurr)
    24712260{
    24722261  if (pocCurr == 0)
    24732262  {
    2474     return NAL_UNIT_CODED_SLICE_IDR_W_RADL;
     2263    return NAL_UNIT_CODED_SLICE_IDR;
    24752264  }
    24762265  if (pocCurr % m_pcCfg->getIntraPeriod() == 0)
     
    24822271    else if (m_pcCfg->getDecodingRefreshType() == 2)
    24832272    {
    2484       return NAL_UNIT_CODED_SLICE_IDR_W_RADL;
     2273      return NAL_UNIT_CODED_SLICE_IDR;
    24852274    }
    24862275  }
     
    24942283      // controlling the reference pictures used for encoding that leading picture. Such a leading
    24952284      // 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;
    25042286    }
    25052287  }
     
    25522334}
    25532335
    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.
    25582339 */
    2559 Void TEncGOP::xAttachSliceDataToNalUnit (OutputNALUnit& rNalu, TComOutputBitstream*& codedSliceData)
     2340Void TEncGOP::xWriteTileLocationToSliceHeader (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect, TComSlice*& rpcSlice)
    25602341{
    25612342  // Byte-align
     
    25632344
    25642345  // 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    }         
    25682366  }
    25692367
    25702368  m_pcEntropyCoder->setBitstream(&rNalu.m_Bitstream);
    25712369
    2572   codedSliceData->clear();
     2370  delete rpcBitstreamRedirect;
     2371  rpcBitstreamRedirect = new TComOutputBitstream;
    25732372}
    25742373
     
    26952494     }               
    26962495  }
    2697 //  assert(it != accessUnit.end());  // Triggers with some legit configurations
     2496  assert(it != accessUnit.end());
    26982497  return seiStartPos;
    26992498}
    27002499#endif
    27012500
    2702 #if L0386_DB_METRIC
    2703 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 edges
    2735     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 edges
    2757     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   else
    2811   {
    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 #endif
    28252501#if H_MV
    28262502Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid )
     
    28462522  {
    28472523    Int numModifications = 0;
    2848 
     2524   
    28492525    for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
    28502526    {
     
    28532529
    28542530    // set inter-view modifications
    2855     Bool isModified = false;
    2856     Int tempList[16];
    2857     for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; }
    2858 
    28592531    if( (maxRefListSize > 1) && (numModifications > 0) )
    28602532    {
     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;
    28612538      for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
    28622539      {
     
    28772554        }
    28782555      }
    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    }
    28992577  }
    29002578}
    29012579#endif
     2580
    29022581//! \}
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncGOP.h

    r368 r438  
    108108#endif
    109109#endif
     110
    110111  //--Adaptive Loop filter
    111112  TEncSampleAdaptiveOffset*  m_pcSAO;
     
    131132  Bool                    m_bufferingPeriodSEIPresentInAU;
    132133  Bool                    m_pictureTimingSEIPresentInAU;
    133 #if K0180_SCALABLE_NESTING_SEI
    134   Bool                    m_nestedBufferingPeriodSEIPresentInAU;
    135   Bool                    m_nestedPictureTimingSEIPresentInAU;
    136 #endif
    137134#endif
    138135public:
     
    144141 
    145142  Void  init        ( TEncTop* pcTEncTop );
     143
    146144#if H_MV
    147145  Void  initGOP     ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP);
     
    150148  Void  compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRec, std::list<AccessUnit>& accessUnitsInGOP );
    151149#endif
    152   Void  xAttachSliceDataToNalUnit (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect);
     150
     151  Void xWriteTileLocationToSliceHeader (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect, TComSlice*& rpcSlice);
    153152
    154153#if H_MV
     
    168167  Void  printOutSummary      ( UInt uiNumAllPicCoded );
    169168#endif
     169
    170170  Void  preLoopFilterPicAll  ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits );
    171171 
    172172  TEncSlice*  getSliceEncoder()   { return m_pcSliceEncoder; }
    173   NalUnitType getNalUnitType( Int pocCurr, Int lastIdr );
     173  NalUnitType getNalUnitType( Int pocCurr );
    174174  Void arrangeLongtermPicturesInRPS(TComSlice *, TComList<TComPic*>& );
    175175protected:
     
    189189  SEIFramePacking*        xCreateSEIFramePacking();
    190190  SEIDisplayOrientation*  xCreateSEIDisplayOrientation();
    191 
    192 #if J0149_TONE_MAPPING_SEI
    193   SEIToneMappingInfo*     xCreateSEIToneMappingInfo();
    194 #endif
    195191
    196192  Void xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps);
     
    203199    m_pictureTimingSEIPresentInAU      = false;
    204200  }
    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
    213203#if H_MV
    214204   Void  xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid );
    215205#endif
    216 #if L0386_DB_METRIC
    217   Void dblMetric( TComPic* pcPic, UInt uiNumSlices );
    218 #endif
     206
    219207};// END CLASS DEFINITION TEncGOP
    220208
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp

    r362 r438  
    16771677#endif
    16781678{
     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
    16791687  if(m_bUseNIF)
    16801688  {
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h

    r362 r438  
    5757{
    5858private:
     59  Double            m_dLambdaLuma;
     60  Double            m_dLambdaChroma;
     61
    5962  TEncEntropy*      m_pcEntropyCoder;
    6063  TEncSbac***       m_pppcRDSbacCoder;              ///< for CABAC
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSbac.h

    r362 r438  
    109109  Void  xWriteEpExGolomb     ( UInt uiSymbol, UInt uiCount );
    110110  Void  xWriteCoefRemainExGolomb ( UInt symbol, UInt &rParam );
     111  Void  xWriteTerminatingBit ( UInt uiBit );
    111112 
    112113  Void  xCopyFrom            ( TEncSbac* pSrc );
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r362 r438  
    32093209    UInt          uiBitsTempL0[MAX_NUM_REF];
    32103210
    3211 #if L0034_COMBINED_LIST_CLEANUP
    3212     TComMv        mvValidList1;
    3213     Int           refIdxValidList1 = 0;
    3214     UInt          bitsValidList1 = MAX_UINT;
    3215     UInt          costValidList1 = MAX_UINT;
    3216 #endif
    3217 
    32183211    xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits);
    32193212   
     
    32623255        uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdx[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS];
    32633256#if ZERO_MVD_EST
    3264 #if L0034_COMBINED_LIST_CLEANUP
    3265         if ( iRefList == 0 || pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) < 0 )
    3266 #else
    32673257        if ((iRefList != 1 || !pcCU->getSlice()->getNoBackPredFlag()) &&
    32683258            (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) <= 0 || pcCU->getSlice()->getRefIdxOfLC(eRefPicList, iRefIdxTemp)>=0))
    3269 #endif
    32703259        {
    32713260          uiZeroMvdBitsTemp = uiBitsTemp;
     
    32873276       
    32883277#if GPB_SIMPLE_UNI
    3289 #if L0034_COMBINED_LIST_CLEANUP
    3290         if ( iRefList == 1 )    // list 1
    3291         {
    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           else
    3305           {
    3306             xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp );
    3307           }
    3308         }
    3309         else
    3310         {
    3311           xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp );
    3312         }
    3313 #else
    33143278        if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0)
    33153279        {
     
    33533317          }       
    33543318        }
    3355 #endif
    33563319#else
    33573320        xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp );
     
    33603323        xCheckBestMVP(pcCU, eRefPicList, cMvTemp[iRefList][iRefIdxTemp], cMvPred[iRefList][iRefIdxTemp], aaiMvpIdx[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp);
    33613324
    3362 #if L0034_COMBINED_LIST_CLEANUP
    3363         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-prediction
    3372 
    3373           // set motion
    3374           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 motion
    3384           mvValidList1     = cMvTemp[iRefList][iRefIdxTemp];
    3385           refIdxValidList1 = iRefIdxTemp;
    3386         }
    3387 #else
    33883325        if(pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && !pcCU->getSlice()->getNoBackPredFlag())
    33893326        {
     
    34353372            }
    34363373          }
    3437 #endif
    34383374      }
    34393375    }
     
    34993435       
    35003436        Int         iRefList    = iIter % 2;
    3501 #if L0034_COMBINED_LIST_CLEANUP
    3502         if ( m_pcEncCfg->getUseFastEnc() )
    3503         {
    3504           if( uiCost[0] <= uiCost[1] )
    3505           {
    3506             iRefList = 1;
    3507           }
    3508           else
    3509           {
    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 #else
    35253437        if ( m_pcEncCfg->getUseFastEnc() && (pcCU->getSlice()->getNoBackPredFlag() || (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(0)==0 )) )
    35263438        {
    35273439          iRefList = 1;
    35283440        }
    3529 #endif
    35303441        RefPicList  eRefPicList = ( iRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
    35313442
     
    36623573    UInt uiMEBits = 0;
    36633574    // Set Motion Field_
    3664 #if L0034_COMBINED_LIST_CLEANUP
    3665     cMv[1] = mvValidList1;
    3666     iRefIdx[1] = refIdxValidList1;
    3667     uiBits[1] = bitsValidList1;
    3668     uiCost[1] = costValidList1;
    3669 #else
    36703575    if ( pcCU->getSlice()->getNoBackPredFlag() || (pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_C) > 0 && pcCU->getSlice()->getRefIdxOfL0FromRefIdxOfL1(0)==0 ) )
    36713576    {
    36723577      uiCost[1] = MAX_UINT;
    36733578    }
    3674 #endif
    36753579#if AMP_MRG
    36763580    if (bTestNormalMC)
     
    46184522    while( pcCU->getWidth(0) > (pcCU->getSlice()->getSPS()->getMaxTrSize()<<uiTrLevel) ) uiTrLevel++;
    46194523  }
    4620   UInt uiMaxTrMode = 1 + uiTrLevel;
     4524  UInt uiMaxTrMode = pcCU->getSlice()->getSPS()->getMaxTrDepth() + uiTrLevel;
    46214525 
    46224526  while((uiWidth>>uiMaxTrMode) < (g_uiMaxCUWidth>>g_uiMaxCUDepth)) uiMaxTrMode--;
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r368 r438  
    414414  eSliceType = (pocLast == 0 || pocCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType;
    415415#endif
    416 
    417416  rpcSlice->setSliceType        ( eSliceType );
    418417#endif
     
    439438#endif
    440439
    441 #if L0386_DB_METRIC
    442   if ( m_pcCfg->getDeblockingFilterMetric() )
    443   {
    444     rpcSlice->setDeblockingFilterOverrideFlag(true);
    445     rpcSlice->setDeblockingFilterDisable(false);
    446     rpcSlice->setDeblockingFilterBetaOffsetDiv2( 0 );
    447     rpcSlice->setDeblockingFilterTcOffsetDiv2( 0 );
    448   } else
    449 #endif
    450440  if (rpcSlice->getPPS()->getDeblockingFilterControlPresentFlag())
    451441  {
     
    12331223 \retval rpcBitstream  bitstream class
    12341224 */
    1235 Void TEncSlice::encodeSlice   ( TComPic*& rpcPic, TComOutputBitstream* pcSubstreams )
     1225Void TEncSlice::encodeSlice   ( TComPic*& rpcPic, TComOutputBitstream* pcBitstream, TComOutputBitstream* pcSubstreams )
    12361226{
    12371227  UInt       uiCUAddr;
     
    14131403      }
    14141404      {
    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       
    14161438        UInt uiAccumulatedSubstreamLength = 0;
    14171439        for (Int iSubstrmIdx=0; iSubstrmIdx < iNumSubstreams; iSubstrmIdx++)
     
    14211443        // add bits coded in previous dependent slices + bits coded so far
    14221444        // 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 );
    14241446      }
    14251447    }
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncSlice.h

    r362 r438  
    122122  Void    precompressSlice    ( TComPic*& rpcPic                                );      ///< precompress slice for multi-loop opt.
    123123  Void    compressSlice       ( TComPic*& rpcPic                                );      ///< analysis stage of slice
    124   Void    encodeSlice         ( TComPic*& rpcPic, TComOutputBitstream* pcSubstreams  );
     124  Void    encodeSlice         ( TComPic*& rpcPic, TComOutputBitstream* rpcBitstream, TComOutputBitstream* pcSubstreams  );
    125125 
    126126  // misc. functions
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r368 r438  
    8181  m_pcBitCounters          = NULL;
    8282  m_pcRdCosts              = NULL;
     83
    8384#if H_MV
    8485  m_ivPicLists = NULL;
     
    9596Void TEncTop::create ()
    9697{
     98
    9799#if !H_MV
    98100  // initialize global variables
     
    286288Void TEncTop::init()
    287289{
     290
    288291  // initialize SPS
    289292  xInitSPS();
     
    345348}
    346349#endif
     350
    347351Void TEncTop::deletePicBuffer()
    348352{
     
    371375 \retval  iNumEncoded         number of encoded pictures
    372376 */
     377Void TEncTop::encode(Bool flush, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded
    373378#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
    380384#if H_3D
    381385  TComPic* picLastCoded = getPic( getGOPEncoder()->getPocLastCoded() );
     
    385389  }
    386390#endif
     391
    387392#if H_MV
    388393  if( gopId == 0)
     
    438443  m_iNumPicRcvd       = 0;
    439444  m_uiNumAllPicCoded += iNumEncoded;
     445
    440446#if H_MV
    441447}
    442448#endif
     449
    443450}
    444451
     
    540547  m_cSPS.setMaxCUHeight   ( g_uiMaxCUHeight     );
    541548  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                   );
    553551 
    554552  m_cSPS.setPCMLog2MinSize (m_uiPCMLog2MinSize);
     
    565563
    566564  m_cSPS.setMaxTrSize   ( 1 << m_uiQuadtreeTULog2MaxSize );
    567 #if !L0034_COMBINED_LIST_CLEANUP
     565 
    568566  m_cSPS.setUseLComb    ( m_bUseLComb           );
    569 #endif
    570567 
    571568  Int i;
     
    719716  m_cPPS.setOutputFlagPresentFlag( false );
    720717  m_cPPS.setSignHideFlag(getSignHideFlag());
    721 #if L0386_DB_METRIC
    722   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   else
    731   {
    732718  m_cPPS.setDeblockingFilterControlPresentFlag (m_DeblockingFilterControlPresent );
    733   }
    734 #else
    735   m_cPPS.setDeblockingFilterControlPresentFlag (m_DeblockingFilterControlPresent );
    736 #endif
    737719  m_cPPS.setLog2ParallelMergeLevelMinus2   (m_log2ParallelMergeLevelMinus2 );
    738720  m_cPPS.setCabacInitPresentFlag(CABAC_INIT_PRESENT_FLAG);
     
    1006988  }
    1007989#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}
    1042991
    1043992Void  TEncTop::xInitPPSforTiles()
     
    11201069  }
    11211070}
     1071
    11221072#if H_MV
    11231073Void TEncTop::printSummary( Int numAllPicCoded )
     
    11821132}
    11831133#endif
     1134
    11841135//! \}
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/TEncTop.h

    r368 r438  
    6363// Class definition
    6464// ====================================================================================================================
     65
     66
    6567
    6668/// encoder class
     
    131133  TEncAnalyze             m_cAnalyzeB; 
    132134#endif
     135
    133136protected:
    134137  Void  xGetNewPicBuffer  ( TComPic*& rpcPic );           ///< get picture buffer which will be processed
     
    145148  Void      create          ();
    146149  Void      destroy         ();
     150
    147151  Void      init            ();
     152
    148153#if H_MV 
    149154  TComPicLists* getIvPicLists() { return m_ivPicLists; }
    150155#endif
     156
    151157  Void      deletePicBuffer ();
    152158
     
    156162  Void      initNewPic(TComPicYuv* pcPicYuvOrg);
    157163#endif
     164
    158165  // -------------------------------------------------------------------------------------------------------------------
    159166  // member access functions
     
    188195  TComPPS*                getPPS                () { return  &m_cPPS;                 }
    189196  Void selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid );
    190 #if L0208_SOP_DESCRIPTION_SEI
    191   Int getReferencePictureSetIdxForSOP(TComSlice* slice, Int POCCurr, Int GOPid );
    192 #endif
    193197  TComScalingList*        getScalingList        () { return  &m_scalingList;         }
     198
    194199#if H_MV
    195200  TEncAnalyze*            getAnalyzeAll         () { return &m_cAnalyzeAll; }
     
    205210  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    206211#endif
     212
     213
    207214  // -------------------------------------------------------------------------------------------------------------------
    208215  // encoder function
     
    210217
    211218  /// encode several number of pictures until end-of-sequence
    212 #if H_MV
    213   Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded  , Int gopId  ); 
    214 #else
    215219  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 );
    221228#else
    222229  void printSummary() { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded); }
    223230#endif
     231
    224232};
    225233
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp

    r362 r438  
    235235        Int offset = (Int)( ((currDC<<log2Denom) - ((Int64)weight * refDC) + (Int64)realOffset) >> realLog2Denom );
    236236
    237         // Chroma offset range limitation
     237        // Chroma offset range limination
    238238        if(comp)
    239239        {
    240           Int pred = ( 128 - ( ( 128*weight)>>(log2Denom) ) );
     240          Int shift = 1 << (g_bitDepthC - 1);
     241          Int pred = ( shift - ( ( shift*weight)>>(log2Denom) ) );
    241242          Int deltaOffset = Clip3( -512, 511, (offset - pred) );    // signed 10bit
    242243          offset = Clip3( -128, 127, (deltaOffset + pred) );        // signed 8bit
    243         }
    244         // Luma offset range limitation
    245         else
    246         {
    247           offset = Clip3( -128, 127, offset);
    248244        }
    249245
Note: See TracChangeset for help on using the changeset viewer.