Changeset 854 in 3DVCSoftware
- Timestamp:
- 13 Feb 2014, 22:58:51 (11 years ago)
- Location:
- branches/HTM-10.0-dev0
- Files:
-
- 1 added
- 1 deleted
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/allintra/baseCfg_2view+depth_AllIntra.cfg
r852 r854 30 30 #======== VPS/ Layer sets ================ 31 31 VpsNumLayerSets : 3 # Number of layer sets 32 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set33 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set34 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps oflayer set32 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 33 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 34 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 35 35 36 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default37 OutputLayerSetIdx : 2 # Indices of layer sets used asadditional output layer sets38 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIds in vps of additional output layers36 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 37 OutputLayerSetIdx : 2 # Indices of layer sets used to derive additional output layer sets 38 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of output layers in additional output layer set 39 39 ProfileLevelTierIdx : 0 0 0 0 # Indices to profile level tier (TBD) 40 40 41 41 #======== VPS / Dependencies ================ 42 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers43 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers44 DirectRefLayers_3 : 1 # LayerIds in vpsof direct reference layers42 DirectRefLayers_1 : # Indices in VPS of direct reference layers 43 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 44 DirectRefLayers_3 : 1 # Indices in VPS of direct reference layers 45 45 46 46 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/allintra/baseCfg_3view+depth_AllIntra.cfg
r852 r854 34 34 #======== VPS/ Layer sets ================ 35 35 VpsNumLayerSets : 5 # Number of layer sets 36 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set37 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set38 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps oflayer set39 LayerIdsInSet_3 : 0 1 4 5 # LayerIds in vps oflayer set40 LayerIdsInSet_4 : 0 1 2 3 4 5 # LayerIds in vps oflayer set41 42 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default43 OutputLayerSetIdx : 2 3 # Indices of layer sets used asadditional output layer sets44 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIdsof additional output layers45 LayerIdsInAddOutputLayerSet_1 : 4 5 # LayerIdsof additional output layers36 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 37 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 38 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 39 LayerIdsInSet_3 : 0 1 4 5 # Indices in VPS of layers in layer set 40 LayerIdsInSet_4 : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 41 42 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 43 OutputLayerSetIdx : 2 3 # Indices of layer sets used to derive additional output layer sets 44 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of additional output layers 45 LayerIdsInAddOutputLayerSet_1 : 4 5 # Indices in VPS of additional output layers 46 46 ProfileLevelTierIdx : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD) 47 47 48 48 #======== VPS / Dependencies ================ 49 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers50 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers51 DirectRefLayers_3 : 1 # LayerIds in vpsof direct reference layers52 DirectRefLayers_4 : 0 # LayerIds in vpsof direct reference layers53 DirectRefLayers_5 : 1 # LayerIds in vpsof direct reference layers49 DirectRefLayers_1 : # Indices in VPS of direct reference layers 50 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 51 DirectRefLayers_3 : 1 # Indices in VPS of direct reference layers 52 DirectRefLayers_4 : 0 # Indices in VPS of direct reference layers 53 DirectRefLayers_5 : 1 # Indices in VPS of direct reference layers 54 54 55 55 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/fco/baseCfg_3view+depth.cfg
r852 r854 34 34 #======== VPS/ Layer sets ================ 35 35 VpsNumLayerSets : 5 # Number of layer sets 36 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set37 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set38 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps oflayer set39 LayerIdsInSet_3 : 0 1 4 5 # LayerIds in vps oflayer set40 LayerIdsInSet_4 : 0 1 2 3 4 5 # LayerIds in vps oflayer set41 42 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default43 OutputLayerSetIdx : 2 3 # Indices of layer sets used asadditional output layer sets44 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIdsof additional output layers45 LayerIdsInAddOutputLayerSet_1 : 4 5 # LayerIdsof additional output layers36 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 37 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 38 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 39 LayerIdsInSet_3 : 0 1 4 5 # Indices in VPS of layers in layer set 40 LayerIdsInSet_4 : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 41 42 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 43 OutputLayerSetIdx : 2 3 # Indices of layer sets used to derive additional output layer sets 44 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of additional output layers 45 LayerIdsInAddOutputLayerSet_1 : 4 5 # Indices in VPS of additional output layers 46 46 ProfileLevelTierIdx : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD) 47 47 48 48 #======== VPS / Dependencies ================ 49 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers50 DirectRefLayers_2 : 1 # LayerIds in vpsof direct reference layers51 DirectRefLayers_3 : 0 # LayerIds in vpsof direct reference layers52 DirectRefLayers_4 : 1 # LayerIds in vpsof direct reference layers53 DirectRefLayers_5 : 0 # LayerIds in vpsof direct reference layers49 DirectRefLayers_1 : # Indices in VPS of direct reference layers 50 DirectRefLayers_2 : 1 # Indices in VPS of direct reference layers 51 DirectRefLayers_3 : 0 # Indices in VPS of direct reference layers 52 DirectRefLayers_4 : 1 # Indices in VPS of direct reference layers 53 DirectRefLayers_5 : 0 # Indices in VPS of direct reference layers 54 54 55 55 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view+depth.cfg
r725 r854 12 12 #======== VPS/ Layer sets ================ 13 13 VpsNumLayerSets : 4 # Number of layer sets 14 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set15 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set16 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps oflayer set17 LayerIdsInSet_3 : 0 1 2 3 4 5 # LayerIds in vps oflayer set14 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 15 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 16 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 17 LayerIdsInSet_3 : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 18 18 19 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default20 OutputLayerSetIdx : 2 3 # Indices of layer sets used asadditional output layer sets21 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIdsof additional output layers22 LayerIdsInAddOutputLayerSet_1 : 4 5 # LayerIdsof additional output layers19 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 20 OutputLayerSetIdx : 2 3 # Indices of layer sets used to derive additional output layer sets 21 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of additional output layers 22 LayerIdsInAddOutputLayerSet_1 : 4 5 # Indices in VPS of additional output layers 23 23 ProfileLevelTierIdx : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD) 24 24 25 25 #======== VPS / Dependencies ================ 26 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers27 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers28 DirectRefLayers_3 : 1 # LayerIds in vpsof direct reference layers29 DirectRefLayers_4 : 0 2 # LayerIds in vpsof direct reference layers30 DirectRefLayers_5 : 1 3 # LayerIds in vpsof direct reference layers26 DirectRefLayers_1 : # Indices in VPS of direct reference layers 27 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 28 DirectRefLayers_3 : 1 # Indices in VPS of direct reference layers 29 DirectRefLayers_4 : 0 2 # Indices in VPS of direct reference layers 30 DirectRefLayers_5 : 1 3 # Indices in VPS of direct reference layers 31 31 32 32 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/ibp/gopCfg_IBP_3view.cfg
r655 r854 13 13 LayerIdsInSet_2 : 0 1 2 # LayerIdcs in vps of layer set 14 14 15 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default16 OutputLayerSetIdx : 1 2 # Indices of layer sets used asadditional output layer sets17 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers18 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers15 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 16 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 17 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 18 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 19 19 ProfileLevelTierIdx : 0 0 0 0 0 # Indices to profile level tier (TBD) 20 20 21 21 #======== VPS / Dependencies ================ 22 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers23 DirectRefLayers_2 : 0 1 # LayerIds in vpsof direct reference layers22 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 23 DirectRefLayers_2 : 0 1 # Indices in VPS of direct reference layers 24 24 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 25 25 DependencyTypes_2 : 2 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/misc/gopCfg_ILP_on_IRAP_3view+depth.cfg
r655 r854 3 3 #======== VPS/ Layer sets ================ 4 4 VpsNumLayerSets : 4 # Number of layer sets 5 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set6 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set7 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps oflayer set8 LayerIdsInSet_3 : 0 1 2 3 4 5 # LayerIds in vps oflayer set5 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 6 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 7 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 8 LayerIdsInSet_3 : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 9 9 10 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default11 OutputLayerSetIdx : 2 3 # Indices of layer sets used asadditional output layer sets12 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIdsof additional output layers13 LayerIdsInAddOutputLayerSet_1 : 4 5 # LayerIdsof additional output layers10 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 11 OutputLayerSetIdx : 2 3 # Indices of layer sets used to derive additional output layer sets 12 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of additional output layers 13 LayerIdsInAddOutputLayerSet_1 : 4 5 # Indices in VPS of additional output layers 14 14 ProfileLevelTierIdx : 0 0 0 0 0 0 0 # Indices to profile level tier (TBD) 15 15 16 16 #======== VPS / Dependencies ================ 17 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers18 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers19 DirectRefLayers_3 : 1 # LayerIds in vpsof direct reference layers20 DirectRefLayers_4 : 0 2 # LayerIds in vpsof direct reference layers21 DirectRefLayers_5 : 1 3 # LayerIds in vpsof direct reference layers17 DirectRefLayers_1 : # Indices in VPS of direct reference layers 18 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 19 DirectRefLayers_3 : 1 # Indices in VPS of direct reference layers 20 DirectRefLayers_4 : 0 2 # Indices in VPS of direct reference layers 21 DirectRefLayers_5 : 1 3 # Indices in VPS of direct reference layers 22 22 23 23 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_2view.cfg
r655 r854 1 1 #======== VPS / Layer sets ================ 2 2 VpsNumLayerSets : 4 # Number of layer sets 3 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set4 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set3 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 4 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 5 5 6 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default7 OutputLayerSetIdx : 1 # Indices of layer sets used asadditional output layer sets8 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers6 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 7 OutputLayerSetIdx : 1 # Indices of layer sets used to derive additional output layer sets 8 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 9 9 ProfileLevelTierIdx : 0 0 0 # Indices to profile level tier (TBD) 10 10 11 11 #======== VPS / Dependencies ================ 12 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers13 DirectRefLayers_2 : # LayerIds in vpsof direct reference layers12 DirectRefLayers_1 : # Indices in VPS of direct reference layers 13 DirectRefLayers_2 : # Indices in VPS of direct reference layers 14 14 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 15 15 DependencyTypes_2 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view+depth.cfg
r655 r854 1 1 #======== VPS/ Layer sets ================ 2 2 VpsNumLayerSets : 4 # Number of layer sets 3 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set4 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set5 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps oflayer set6 LayerIdsInSet_3 : 0 1 2 3 4 5 # LayerIds in vps oflayer set3 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 4 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 5 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 6 LayerIdsInSet_3 : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 7 7 8 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default9 OutputLayerSetIdx : 2 3 # Indices of layer sets used asadditional output layer sets10 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIdsof additional output layers11 LayerIdsInAddOutputLayerSet_1 : 4 5 # LayerIdsof additional output layers8 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 9 OutputLayerSetIdx : 2 3 # Indices of layer sets used to derive additional output layer sets 10 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of additional output layers 11 LayerIdsInAddOutputLayerSet_1 : 4 5 # Indices in VPS of additional output layers 12 12 ProfileLevelTierIdx : 0 0 0 0 0 0 0 # Indices to profile level tier (TBD) 13 13 14 14 #======== VPS / Dependencies ================ 15 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers16 DirectRefLayers_2 : # LayerIds in vpsof direct reference layers17 DirectRefLayers_3 : # LayerIds in vpsof direct reference layers18 DirectRefLayers_4 : # LayerIds in vpsof direct reference layers19 DirectRefLayers_5 : # LayerIds in vpsof direct reference layers15 DirectRefLayers_1 : # Indices in VPS of direct reference layers 16 DirectRefLayers_2 : # Indices in VPS of direct reference layers 17 DirectRefLayers_3 : # Indices in VPS of direct reference layers 18 DirectRefLayers_4 : # Indices in VPS of direct reference layers 19 DirectRefLayers_5 : # Indices in VPS of direct reference layers 20 20 21 21 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/misc/gopCfg_NoIv_3view.cfg
r655 r854 1 1 #======== VPS / Layer sets ================ 2 2 VpsNumLayerSets : 4 # Number of layer sets 3 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set4 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set5 LayerIdsInSet_2 : 0 2 # LayerIds in vps oflayer set6 LayerIdsInSet_3 : 0 1 2 # LayerIds in vps oflayer set3 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 4 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 5 LayerIdsInSet_2 : 0 2 # Indices in VPS of layers in layer set 6 LayerIdsInSet_3 : 0 1 2 # Indices in VPS of layers in layer set 7 7 8 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default9 OutputLayerSetIdx : 1 2 # Indices of layer sets used asadditional output layer sets10 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers11 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers8 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 9 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 10 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 11 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 12 12 ProfileLevelTierIdx : 0 0 0 0 0 0 # Indices to profile level tier (TBD) 13 13 14 14 #======== VPS / Dependencies ================ 15 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers16 DirectRefLayers_2 : # LayerIds in vpsof direct reference layers15 DirectRefLayers_1 : # Indices in VPS of direct reference layers 16 DirectRefLayers_2 : # Indices in VPS of direct reference layers 17 17 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 18 18 DependencyTypes_2 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/NonCTC/rc/baseCfg_3view+depth_rate_control.cfg
r852 r854 34 34 #======== VPS/ Layer sets ================ 35 35 VpsNumLayerSets : 5 # Number of layer sets 36 LayerIdsInSet_0 : 0 # LayerIds in vps oflayer set37 LayerIdsInSet_1 : 0 1 # LayerIds in vps oflayer set38 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps oflayer set39 LayerIdsInSet_3 : 0 1 4 5 # LayerIds in vps oflayer set40 LayerIdsInSet_4 : 0 1 2 3 4 5 # LayerIds in vps oflayer set41 42 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default43 OutputLayerSetIdx : 2 3 # Indices of layer sets used asadditional output layer sets44 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIdsof additional output layers45 LayerIdsInAddOutputLayerSet_1 : 4 5 # LayerIdsof additional output layers36 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 37 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 38 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 39 LayerIdsInSet_3 : 0 1 4 5 # Indices in VPS of layers in layer set 40 LayerIdsInSet_4 : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 41 42 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 43 OutputLayerSetIdx : 2 3 # Indices of layer sets used to derive additional output layer sets 44 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of additional output layers 45 LayerIdsInAddOutputLayerSet_1 : 4 5 # Indices in VPS of additional output layers 46 46 ProfileLevelTierIdx : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD) 47 47 48 48 #======== VPS / Dependencies ================ 49 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers50 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers51 DirectRefLayers_3 : 1 # LayerIds in vpsof direct reference layers52 DirectRefLayers_4 : 0 # LayerIds in vpsof direct reference layers53 DirectRefLayers_5 : 1 # LayerIds in vpsof direct reference layers49 DirectRefLayers_1 : # Indices in VPS of direct reference layers 50 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 51 DirectRefLayers_3 : 1 # Indices in VPS of direct reference layers 52 DirectRefLayers_4 : 0 # Indices in VPS of direct reference layers 53 DirectRefLayers_5 : 1 # Indices in VPS of direct reference layers 54 54 55 55 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/baseCfg_2view+depth.cfg
r852 r854 34 34 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps of layer set 35 35 36 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default36 DefaultTargetOutputLayerIdc: 0 # Output highest layer of layer sets by default 37 37 OutputLayerSetIdx : 2 # Indices of layer sets used as additional output layer sets 38 38 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIds in vps of additional output layers … … 40 40 41 41 #======== VPS / Dependencies ================ 42 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers43 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers44 DirectRefLayers_3 : 1 # LayerIds in vpsof direct reference layers42 DirectRefLayers_1 : # Indices in VPS of direct reference layers 43 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 44 DirectRefLayers_3 : 1 # Indices in VPS of direct reference layers 45 45 46 46 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/baseCfg_2view.cfg
r852 r854 26 26 #======== VPS/ Layer sets ================ 27 27 VpsNumLayerSets : 2 # Number of layer sets 28 LayerIdsInSet_0 : 0 # LayerIds in vps of layer set29 LayerIdsInSet_1 : 0 1 # LayerIds in vps of layer set28 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 29 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 3 30 30 31 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 32 OutputLayerSetIdx : 1 # Indices of layer sets used as additional output layer sets 33 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers 34 ProfileLevelTierIdx : 0 0 0 # Indices to profile level tier (TBD) per output layer set 31 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 32 33 OutputLayerSetIdx : 1 # Indices of layer sets used to derive additional output layer sets 34 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 35 36 ProfileLevelTierIdx : 0 0 0 # Indices to profile level tier (TBD) 35 37 36 38 #======== VPS / Dependencies ================ 37 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers39 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 38 40 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 39 41 -
branches/HTM-10.0-dev0/cfg/3D-HEVC/baseCfg_3view+depth.cfg
r852 r854 34 34 #======== VPS/ Layer sets ================ 35 35 VpsNumLayerSets : 5 # Number of layer sets 36 LayerIdsInSet_0 : 0 # LayerIds in vps of layer set 37 LayerIdsInSet_1 : 0 1 # LayerIds in vps of layer set 38 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps of layer set 39 LayerIdsInSet_3 : 0 1 4 5 # LayerIds in vps of layer set 40 LayerIdsInSet_4 : 0 1 2 3 4 5 # LayerIds in vps of layer set 41 42 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 43 OutputLayerSetIdx : 2 3 # Indices of layer sets used as additional output layer sets 44 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIds of additional output layers 45 LayerIdsInAddOutputLayerSet_1 : 4 5 # LayerIds of additional output layers 36 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 37 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 38 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 2 39 LayerIdsInSet_3 : 0 1 4 5 # Indices in VPS of layers in layer set 3 40 LayerIdsInSet_4 : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 4 41 42 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 43 OutputLayerSetIdx : 2 3 # Indices of layer sets used to derive additional output layer sets 44 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of output layers in additional output layer set 0 45 LayerIdsInAddOutputLayerSet_1 : 4 5 # Indices in VPS of output layers in additional output layer set 1 46 46 47 ProfileLevelTierIdx : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD) 47 48 48 49 #======== VPS / Dependencies ================ 49 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers50 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers51 DirectRefLayers_3 : 1 # LayerIds in vpsof direct reference layers52 DirectRefLayers_4 : 0 # LayerIds in vpsof direct reference layers53 DirectRefLayers_5 : 1 # LayerIds in vpsof direct reference layers50 DirectRefLayers_1 : # Indices in VPS of direct reference layers 51 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 52 DirectRefLayers_3 : 1 # Indices in VPS of direct reference layers 53 DirectRefLayers_4 : 0 # Indices in VPS of direct reference layers 54 DirectRefLayers_5 : 1 # Indices in VPS of direct reference layers 54 55 55 56 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/baseCfg_3view.cfg
r852 r854 27 27 #======== VPS / Layer sets ================ 28 28 VpsNumLayerSets : 4 # Number of layer sets 29 LayerIdsInSet_0 : 0 # LayerIds in vps of layer set30 LayerIdsInSet_1 : 0 1 # LayerIds in vps of layer set31 LayerIdsInSet_2 : 0 2 # LayerIds in vps of layer set32 LayerIdsInSet_3 : 0 1 2 # LayerIds in vps of layer set29 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 30 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 31 LayerIdsInSet_2 : 0 2 # Indices in VPS of layers in layer set 2 32 LayerIdsInSet_3 : 0 1 2 # Indices in VPS of layers in layer set 3 33 33 34 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 35 OutputLayerSetIdx : 1 2 # Indices of layer sets used as additional output layer sets 36 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers 37 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers 34 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 35 36 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 37 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 38 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 1 39 38 40 ProfileLevelTierIdx : 0 0 0 0 0 0 # Indices to profile level tier (TBD) 39 41 40 42 #======== VPS / Dependencies ================ 41 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers42 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers43 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 44 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 43 45 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 44 46 DependencyTypes_2 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/3D-HEVC/fullCfg.cfg
r852 r854 36 36 ViewId : 1 0 2 # ViewId per ViewOrderIndex (m) 37 37 38 #======== VPS/ Layer sets ================39 38 VpsNumLayerSets : 5 # Number of layer sets 40 LayerIdsInSet_0 : 0 # LayerIds in vps of layer set 41 LayerIdsInSet_1 : 0 1 # LayerIds in vps of layer set 42 LayerIdsInSet_2 : 0 1 2 3 # LayerIds in vps of layer set 43 LayerIdsInSet_3 : 0 1 4 5 # LayerIds in vps of layer set 44 LayerIdsInSet_4 : 0 1 2 3 4 5 # LayerIds in vps of layer set 45 46 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 47 OutputLayerSetIdx : 2 3 # Indices of layer sets used as additional output layer sets 48 LayerIdsInAddOutputLayerSet_0 : 2 3 # LayerIds of additional output layers 49 LayerIdsInAddOutputLayerSet_1 : 4 5 # LayerIds of additional output layers 39 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 40 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 41 LayerIdsInSet_2 : 0 1 2 3 # Indices in VPS of layers in layer set 2 42 LayerIdsInSet_3 : 0 1 4 5 # Indices in VPS of layers in layer set 3 43 LayerIdsInSet_4 : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 4 44 45 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 46 47 LayerIdsInDefOutputLayerSet_0 : # Indices in VPS of output layers in layer set 0 (when DefaultTargetOutputLayerIdc is equal to 2) 48 LayerIdsInDefOutputLayerSet_1 : # Indices in VPS of output layers in layer set 1 (when DefaultTargetOutputLayerIdc is equal to 2) 49 LayerIdsInDefOutputLayerSet_2 : # Indices in VPS of output layers in layer set 2 (when DefaultTargetOutputLayerIdc is equal to 2) 50 LayerIdsInDefOutputLayerSet_3 : # Indices in VPS of output layers in layer set 3 (when DefaultTargetOutputLayerIdc is equal to 2) 51 LayerIdsInDefOutputLayerSet_4 : # Indices in VPS of output layers in layer set 4 (when DefaultTargetOutputLayerIdc is equal to 2) 52 53 54 OutputLayerSetIdx : 2 3 # Indices of layer sets used to derive additional output layer sets 55 LayerIdsInAddOutputLayerSet_0 : 2 3 # Indices in VPS of output layers in additional output layer set 0 56 LayerIdsInAddOutputLayerSet_1 : 4 5 # Indices in VPS of output layers in additional output layer set 1 57 50 58 ProfileLevelTierIdx : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD) 51 59 52 60 #======== VPS / Dependencies ================ 53 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers54 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers55 DirectRefLayers_3 : 1 # LayerIds in vpsof direct reference layers56 DirectRefLayers_4 : 0 # LayerIds in vpsof direct reference layers57 DirectRefLayers_5 : 1 # LayerIds in vpsof direct reference layers61 DirectRefLayers_1 : # Indices in VPS of direct reference layers 62 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 63 DirectRefLayers_3 : 1 # Indices in VPS of direct reference layers 64 DirectRefLayers_4 : 0 # Indices in VPS of direct reference layers 65 DirectRefLayers_5 : 1 # Indices in VPS of direct reference layers 58 66 59 67 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/MV-HEVC/NonCTC/gopCfg_IBP_3view.cfg
r622 r854 9 9 #======== VPS / Layer sets ================ 10 10 VpsNumLayerSets : 3 # Number of layer sets 11 LayerIdsInSet_0 : 0 # LayerIdcs in vps of layer set12 LayerIdsInSet_1 : 0 1 # LayerIdcs in vps of layer set13 LayerIdsInSet_2 : 0 1 2 # LayerIdcs in vps of layer set11 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 12 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 13 LayerIdsInSet_2 : 0 1 2 # Indices in VPS of layers in layer set 2 14 14 15 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 16 OutputLayerSetIdx : 1 2 # Indices of layer sets used as additional output layer sets 17 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers 18 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers 15 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 16 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 17 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 18 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 1 19 19 20 ProfileLevelTierIdx : 0 0 0 0 0 # Indices to profile level tier (TBD) 20 21 21 22 #======== VPS / Dependencies ================ 22 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers23 DirectRefLayers_2 : 0 1 # LayerIds in vpsof direct reference layers23 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 24 DirectRefLayers_2 : 0 1 # Indices in VPS of direct reference layers 24 25 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 25 26 DependencyTypes_2 : 2 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/MV-HEVC/NonCTC/gopCfg_IPB_on_IRAP_3view.cfg
r622 r854 3 3 #======== VPS / Layer sets ================ 4 4 VpsNumLayerSets : 4 # Number of layer sets 5 LayerIdsInSet_0 : 0 # LayerIds in vps of layer set6 LayerIdsInSet_1 : 0 1 # LayerIds in vps of layer set7 LayerIdsInSet_2 : 0 2 # LayerIds in vps of layer set8 LayerIdsInSet_3 : 0 1 2 # LayerIds in vps of layer set5 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 6 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 7 LayerIdsInSet_2 : 0 2 # Indices in VPS of layers in layer set 2 8 LayerIdsInSet_3 : 0 1 2 # Indices in VPS of layers in layer set 3 9 9 10 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 11 OutputLayerSetIdx : 1 2 # Indices of layer sets used as additional output layer sets 12 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers 13 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers 10 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 11 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 12 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 13 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 1 14 14 15 ProfileLevelTierIdx : 0 0 0 0 0 0 # Indices to profile level tier (TBD) 15 16 16 17 #======== VPS / Dependencies ================ 17 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers18 DirectRefLayers_2 : 0 1 # LayerIds in vpsof direct reference layers18 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 19 DirectRefLayers_2 : 0 1 # Indices in VPS of direct reference layers 19 20 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 20 21 DependencyTypes_2 : 2 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/MV-HEVC/NonCTC/gopCfg_NoIv_3view.cfg
r622 r854 1 1 #======== VPS / Layer sets ================ 2 2 VpsNumLayerSets : 4 # Number of layer sets 3 LayerIdsInSet_0 : 0 # LayerIds in vps of layer set 4 LayerIdsInSet_1 : 0 1 # LayerIds in vps of layer set 5 LayerIdsInSet_2 : 0 2 # LayerIds in vps of layer set 6 LayerIdsInSet_3 : 0 1 2 # LayerIds in vps of layer set 3 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 4 LayerIdsInSet_1 : 1 # Indices in VPS of layers in layer set 0 5 LayerIdsInSet_2 : 2 # Indices in VPS of layers in layer set 0 6 LayerIdsInSet_3 : 0 1 # Indices in VPS of layers in layer set 1 7 LayerIdsInSet_4 : 0 2 # Indices in VPS of layers in layer set 2 8 LayerIdsInSet_5 : 1 2 # Indices in VPS of layers in layer set 2 9 LayerIdsInSet_6 : 0 1 2 # Indices in VPS of layers in layer set 3 7 10 8 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 9 OutputLayerSetIdx : 1 2 # Indices of layer sets used as additional output layer sets 10 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers 11 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers 12 ProfileLevelTierIdx : 0 0 0 0 0 0 # Indices to profile level tier (TBD) 11 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 12 13 OutputLayerSetIdx : # Indices of layer sets used to derive additional output layer sets 14 13 15 14 16 #======== VPS / Dependencies ================ 15 DirectRefLayers_1 : # LayerIds in vpsof direct reference layers16 DirectRefLayers_2 : # LayerIds in vpsof direct reference layers17 DirectRefLayers_1 : # Indices in VPS of direct reference layers 18 DirectRefLayers_2 : # Indices in VPS of direct reference layers 17 19 DependencyTypes_1 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 18 20 DependencyTypes_2 : # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/MV-HEVC/NonCTC/gopCfg_PIP_on_IRAP_3view.cfg
r622 r854 3 3 #======== VPS / Layer sets ================ 4 4 VpsNumLayerSets : 4 # Number of layer sets 5 LayerIdsInSet_0 : 0 # LayerIds in vps of layer set6 LayerIdsInSet_1 : 0 1 # LayerIds in vps of layer set7 LayerIdsInSet_2 : 0 2 # LayerIds in vps of layer set8 LayerIdsInSet_3 : 0 1 2 # LayerIds in vps of layer set5 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 6 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 7 LayerIdsInSet_2 : 0 2 # Indices in VPS of layers in layer set 2 8 LayerIdsInSet_3 : 0 1 2 # Indices in VPS of layers in layer set 3 9 9 10 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 11 OutputLayerSetIdx : 1 2 # Indices of layer sets used as additional output layer sets 12 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers 13 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers 10 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 11 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 12 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 13 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 1 14 14 15 ProfileLevelTierIdx : 0 0 0 0 0 0 # Indices to profile level tier (TBD) 15 16 16 17 #======== VPS / Dependencies ================ 17 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers18 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers18 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 19 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 19 20 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 20 21 DependencyTypes_2 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/MV-HEVC/NonCTC/layerwise_startup_IBP_3view.cfg
r738 r854 9 9 #======== VPS / Layer sets ================ 10 10 VpsNumLayerSets : 3 # Number of layer sets 11 LayerIdsInSet_0 : 0 # LayerIdcs in vps of layer set12 LayerIdsInSet_1 : 0 1 # LayerIdcs in vps of layer set13 LayerIdsInSet_ 2 : 0 1 2 # LayerIdcs in vps of layer set11 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 12 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 13 LayerIdsInSet_3 : 0 1 2 # Indices in VPS of layers in layer set 3 14 14 15 Default OneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default16 OutputLayerSetIdx : 1 2 # Indices of layer sets used asadditional output layer sets17 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers18 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers15 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 16 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 17 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 18 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 1 19 19 ProfileLevelTierIdx : 0 0 0 0 0 # Indices to profile level tier (TBD) 20 20 21 21 #======== VPS / Dependencies ================ 22 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers23 DirectRefLayers_2 : 0 1 # LayerIds in vpsof direct reference layers22 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 23 DirectRefLayers_2 : 0 1 # Indices in VPS of direct reference layers 24 24 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 25 25 DependencyTypes_2 : 2 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/MV-HEVC/baseCfg_2view.cfg
r852 r854 25 25 #======== VPS/ Layer sets ================ 26 26 VpsNumLayerSets : 2 # Number of layer sets 27 LayerIdsInSet_0 : 0 # LayerIds in vps of Layer set28 LayerIdsInSet_1 : 0 1 # LayerIds in vps of Layer set27 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 28 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 3 29 29 30 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 31 OutputLayerSetIdx : 1 # Indices of layer sets used as additional output layer sets 32 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers 30 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 31 32 OutputLayerSetIdx : 1 # Indices of layer sets used to derive additional output layer sets 33 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 33 34 ProfileLevelTierIdx : 0 0 0 # Indices to profile level tier (TBD) 34 35 35 36 #======== VPS / Dependencies ================ 36 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers37 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 37 38 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 38 39 -
branches/HTM-10.0-dev0/cfg/MV-HEVC/baseCfg_3view.cfg
r852 r854 27 27 #======== VPS / Layer sets ================ 28 28 VpsNumLayerSets : 4 # Number of layer sets 29 LayerIdsInSet_0 : 0 # LayerIds in vps of layer set30 LayerIdsInSet_1 : 0 1 # LayerIds in vps of layer set31 LayerIdsInSet_2 : 0 2 # LayerIds in vps of layer set32 LayerIdsInSet_3 : 0 1 2 # LayerIds in vps of layer set29 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 30 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 31 LayerIdsInSet_2 : 0 2 # Indices in VPS of layers in layer set 2 32 LayerIdsInSet_3 : 0 1 2 # Indices in VPS of layers in layer set 3 33 33 34 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 35 OutputLayerSetIdx : 1 2 # Indices of layer sets used as additional output layer sets 36 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds in vps of additional output layers 37 LayerIdsInAddOutputLayerSet_1 : 2 # LayerIds in vps of additional output layers 34 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 35 36 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 37 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 38 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 1 39 38 40 ProfileLevelTierIdx : 0 0 0 0 0 0 # Indices to profile level tier (TBD) 39 41 40 42 #======== VPS / Dependencies ================ 41 DirectRefLayers_1 : 0 # LayerIds in vpsof direct reference layers42 DirectRefLayers_2 : 0 # LayerIds in vpsof direct reference layers43 DirectRefLayers_1 : 0 # Indices in VPS of direct reference layers 44 DirectRefLayers_2 : 0 # Indices in VPS of direct reference layers 43 45 DependencyTypes_1 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion 44 46 DependencyTypes_2 : 2 # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion -
branches/HTM-10.0-dev0/cfg/MV-HEVC/fullCfg.cfg
r852 r854 31 31 #======== VPS/ Layer sets ================ 32 32 VpsNumLayerSets : 4 # Number of layer sets 33 LayerIdsInSet_0 : 0 # LayerIds of Layer set34 LayerIdsInSet_1 : 0 1 # LayerIds of Layer set35 LayerIdsInSet_2 : 0 2 # LayerIds of Layer set36 LayerIdsInSet_3 : 0 1 2 # LayerIds of Layer set33 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 34 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 35 LayerIdsInSet_2 : 0 2 # Indices in VPS of layers in layer set 2 36 LayerIdsInSet_3 : 0 1 2 # Indices in VPS of layers in layer set 3 37 37 38 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default 39 OutputLayerSetIdx : 1 2 # Indices of layer sets used as additional output layer sets 40 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds of additional output layers 41 LayerIdsInAddOutputLayerSet_0 : 1 # LayerIds of additional output layers 38 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet 39 LayerIdsInDefOutputLayerSet_0 : # Indices in VPS of output layers in layer set 0 (when DefaultTargetOutputLayerIdc is equal to 2) 40 LayerIdsInDefOutputLayerSet_1 : # Indices in VPS of output layers in layer set 1 (when DefaultTargetOutputLayerIdc is equal to 2) 41 LayerIdsInDefOutputLayerSet_2 : # Indices in VPS of output layers in layer set 2 (when DefaultTargetOutputLayerIdc is equal to 2) 42 LayerIdsInDefOutputLayerSet_3 : # Indices in VPS of output layers in layer set 3 (when DefaultTargetOutputLayerIdc is equal to 2) 43 44 45 OutputLayerSetIdx : 1 2 # Indices of layer sets used to derive additional output layer sets 46 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 47 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 1 48 49 42 50 ProfileLevelTierIdx : 0 0 0 0 # Indices to profile level tier (TBD) 43 44 51 #======== Unit definition ================ 45 52 MaxCUWidth : 64 # Maximum coding unit width in pixel -
branches/HTM-10.0-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r852 r854 140 140 AOF( m_pScaleOffsetFile ); 141 141 } 142 #if !FIX_CAM_PARS_COLLECTOR 142 143 m_cCamParsCollector.init( m_pScaleOffsetFile ); 144 #endif 143 145 #endif 144 146 InputByteStream bytestream(bitstreamFile); … … 207 209 read(nalu, nalUnit); 208 210 #if H_MV 211 #if H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO 212 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) 213 || !isNaluWithinTargetDecLayerIdSet(&nalu) 214 || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 215 || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0) 216 #if H_MV_HLS_7_MISC_P0130_EOS 217 || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0) 218 #endif 219 ) 220 #else 209 221 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 ) 222 #endif 210 223 { 211 224 bNewPicture = false; … … 235 248 } 236 249 250 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 251 if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() ) 252 { 253 fprintf(stderr, "\ntarget output layer set index must be in the range of 0 to %d, inclusive \n", vps->getNumOutputLayerSets() - 1 ); 254 exit(EXIT_FAILURE); 255 } 256 #endif 237 257 m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 238 258 } 259 260 #if FIX_CAM_PARS_COLLECTOR 261 #if H_3D 262 if (nalu.m_nalUnitType == NAL_UNIT_VPS ) 263 { 264 265 m_cCamParsCollector.init( m_pScaleOffsetFile, m_tDecTop[decIdx]->getPrefetchedVPS() ); 266 } 267 #endif 268 #endif 239 269 bNewPicture = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag; 240 270 if ( nalu.isSlice() && firstSlice && !sliceSkippedFlag ) -
branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r852 r854 388 388 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 389 389 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 390 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 391 ("DefaultTargetOutputLayerIdc" , m_defaultTargetOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 392 #else 390 393 ("DefaultOneTargetOutputLayerFlag" , m_defaultOneTargetOutputLayerIdc , 0, "Output highest layer of layer sets by default") 394 #endif 391 395 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 396 397 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 398 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 399 ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 400 #else 392 401 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 402 #endif 393 403 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 394 404 … … 604 614 605 615 // DBP Size 616 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE 606 617 ("SubLayerFlagInfoPresentFlag", m_subLayerFlagInfoPresentFlag , false , "SubLayerFlagInfoPresentFlag") 618 #endif 607 619 // VPS VUI 608 620 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 609 621 ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false , "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder 610 622 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 623 #if H_MV_HLS_7_MISC_P0068_21 624 ("AllLayersIdrAlignedFlag" , m_allLayersIdrAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 625 #endif 611 626 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 612 627 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") … … 1408 1423 } 1409 1424 1425 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1426 xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 1427 1428 if( m_defaultTargetOutputLayerIdc != 2 ) 1429 { 1430 Bool anyDefaultOutputFlag = false; 1431 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1432 { 1433 anyDefaultOutputFlag = anyDefaultOutputFlag || ( m_layerIdsInDefOutputLayerSet[lsIdx].size() != 0 ); 1434 } 1435 printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" ); 1436 } 1437 else 1438 { 1439 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1440 { 1441 for (Int i = 0; i < m_layerIdsInDefOutputLayerSet[ lsIdx ].size(); i++) 1442 { 1443 Bool inLayerSetFlag = false; 1444 for (Int j = 0; j < m_layerIdsInSets[ lsIdx].size(); j++ ) 1445 { 1446 if ( m_layerIdsInSets[ lsIdx ][ j ] == m_layerIdsInDefOutputLayerSet[ lsIdx ][ i ] ) 1447 { 1448 inLayerSetFlag = true; 1449 break; 1450 } 1451 } 1452 xConfirmPara( !inLayerSetFlag, "All output layers of a output layer set must be included in corresponding layer set."); 1453 } 1454 } 1455 } 1456 #else 1410 1457 xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" ); 1458 #endif 1411 1459 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1412 1460 -
branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncCfg.h
r852 r854 89 89 Int m_vpsNumLayerSets; ///< Number of layer sets 90 90 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 91 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 92 Int m_defaultTargetOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 93 #else 91 94 Int m_defaultOneTargetOutputLayerIdc; ///< Output highest layer of layer sets by default when equal to 1 95 #endif 92 96 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 93 97 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers 98 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 99 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 100 #endif 94 101 std::vector<Int> m_profileLevelTierIdx; ///< Indices of of profile level tier 95 102 … … 99 106 100 107 // DBP Size 108 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE 101 109 Bool m_subLayerFlagInfoPresentFlag; 110 #endif 102 111 103 112 // VPS VUI … … 105 114 Bool m_crossLayerPicTypeAlignedFlag; 106 115 Bool m_crossLayerIrapAlignedFlag; 116 #if H_MV_HLS_7_MISC_P0068_21 117 Bool m_allLayersIdrAlignedFlag; 118 #endif 107 119 Bool m_bitRatePresentVpsFlag; 108 120 Bool m_picRatePresentVpsFlag; -
branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r852 r854 127 127 xSetRepFormat ( vps ); 128 128 xSetLayerSets ( vps ); 129 #if H_MV_HLS_7_FIX_SET_DPB_SIZE 130 xSetDpbSize ( vps ); 131 #endif 129 132 xSetVPSVUI ( vps ); 130 133 #if H_3D … … 1491 1494 } 1492 1495 1496 #if H_MV_HLS_7_FIX_SET_DPB_SIZE 1497 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1498 { 1499 // These settings need to be verified 1500 1501 TComDpbSize* dpbSize = vps.getDpbSize(); 1502 1503 assert ( dpbSize != 0 ); 1504 1505 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ ) 1506 { 1507 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1508 Bool subLayerFlagInfoPresentFlag = false; 1509 1510 #if H_MV_HLS_7_HRD_P0156_7 1511 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1512 #else 1513 for( Int j = 0; j <= vps.getMaxTLayers() - 1 ; j++ ) 1514 #endif 1515 { 1516 Bool subLayerDpbInfoPresentFlag = false; 1517 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1518 assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 1519 for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ ) 1520 #else 1521 assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() ); 1522 for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1523 #endif 1524 { 1525 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); 1526 #if H_MV_HLS7_GEN 1527 // TBD. Some derivation based on output layer set might be added here. 1528 #endif 1529 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1530 if ( j > 0 ) 1531 { 1532 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) ); 1533 } 1534 } 1535 1536 Int maxNumReorderPics = MIN_INT; 1537 for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ ) 1538 { 1539 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] ); 1540 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] ); 1541 } 1542 assert( maxNumReorderPics != MIN_INT ); 1543 1544 dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics ); 1545 if ( j > 0 ) 1546 { 1547 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsNumReorderPics( i, j ) != dpbSize->getMaxVpsNumReorderPics( i, j - 1 ) ); 1548 } 1549 1550 // To Be Done ! 1551 // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, xx ); 1552 if ( j > 0 ) 1553 { 1554 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ) != dpbSize->getMaxVpsLatencyIncreasePlus1( i, j - 1 ) ); 1555 } 1556 1557 if( j > 0 ) 1558 { 1559 dpbSize->setSubLayerDpbInfoPresentFlag( i, j, subLayerDpbInfoPresentFlag ); 1560 subLayerFlagInfoPresentFlag = subLayerFlagInfoPresentFlag || subLayerDpbInfoPresentFlag; 1561 } 1562 } 1563 dpbSize->setSubLayerFlagInfoPresentFlag( i, subLayerFlagInfoPresentFlag ); 1564 } 1565 } 1566 #else 1493 1567 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1494 1568 { … … 1503 1577 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1504 1578 dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag ); 1505 1506 1579 if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ) 1507 1580 { … … 1546 1619 } 1547 1620 } 1548 1621 #endif 1549 1622 1550 1623 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1552 1625 // Layer sets 1553 1626 vps.setVpsNumLayerSetsMinus1 ( m_vpsNumLayerSets - 1 ); 1627 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1554 1628 vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() ); 1629 #endif 1555 1630 1556 1631 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) … … 1569 1644 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1570 1645 // Additional output layer sets + profileLevelTierIdx 1646 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1647 vps.setDefaultTargetOutputLayerIdc ( m_defaultTargetOutputLayerIdc ); 1648 vps.setNumAddOutputLayerSets ( numAddOuputLayerSets ); 1649 vps.initTargetLayerIdLists(); 1650 #else 1571 1651 vps.setDefaultOneTargetOutputLayerIdc ( m_defaultOneTargetOutputLayerIdc ); 1572 1652 vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets != 0 ); 1573 1653 vps.setNumAddOutputLayerSetsMinus1 ( numAddOuputLayerSets - 1 ); 1574 1575 1576 1654 #endif 1655 1656 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1657 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++) 1658 { 1659 Int addOutLsIdx = olsIdx - m_vpsNumLayerSets; 1660 1661 vps.setOutputLayerSetIdxMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 1662 1663 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps.getLayerSetIdxForOutputLayerSet( olsIdx ) ]; 1664 1665 if (vps.getDefaultTargetOutputLayerIdc() == 2 || addOutLsIdx >= 0 ) 1666 { 1667 for ( Int i = 0; i < layerIdList.size(); i++) 1668 { 1669 vps.setOutputLayerFlag( olsIdx, i, ( olsIdx == 0 && i == 0 ) ? vps.inferOutputLayerFlag(olsIdx, i ) : false ); // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred for this case ! 1670 } 1671 1672 std::vector<Int>& outLayerIdList = ( addOutLsIdx >= 0 ) ? m_layerIdsInAddOutputLayerSet[addOutLsIdx] : m_layerIdsInDefOutputLayerSet[olsIdx]; 1673 1674 Bool outputLayerInLayerSetFlag = false; 1675 for (Int j = 0; j < outLayerIdList.size(); j++) 1676 { 1677 for (Int i = 0; i < layerIdList.size(); i++ ) 1678 { 1679 if ( layerIdList[ i ] == outLayerIdList[ j ] ) 1680 { 1681 vps.setOutputLayerFlag( olsIdx, i, true ); 1682 outputLayerInLayerSetFlag = true; 1683 break; 1684 } 1685 } 1686 assert( outputLayerInLayerSetFlag ); // The output layer is not not in the layer set. 1687 } 1688 } 1689 else 1690 { 1691 for ( Int i = 0; i < layerIdList.size(); i++) 1692 { 1693 vps.setOutputLayerFlag( olsIdx, i, vps.inferOutputLayerFlag( olsIdx, i ) ); 1694 } 1695 } 1696 1697 vps.deriveTargetLayerIdList( olsIdx ); 1698 1699 if ( olsIdx > 0 ) 1700 { 1701 vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] ); 1702 } 1703 1704 vps.setAltOutputLayerFlag( olsIdx , false); 1705 } 1706 #else 1577 1707 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1578 1708 { … … 1612 1742 } 1613 1743 vps.deriveTargetLayerIdLists(); 1744 #endif 1614 1745 } 1615 1746 … … 1618 1749 vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag ); 1619 1750 1751 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1752 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( ); 1753 assert( pcVPSVUI ); 1754 #endif 1755 1620 1756 if ( m_vpsVuiPresentFlag ) 1621 1757 { 1758 #if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1622 1759 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( ); 1623 1760 1624 1761 assert( pcVPSVUI ); 1625 1762 #endif 1626 1763 1627 1764 // All this stuff could actually be derived by the encoder, … … 1630 1767 pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag ); 1631 1768 pcVPSVUI->setCrossLayerIrapAlignedFlag ( m_crossLayerIrapAlignedFlag ); 1632 1769 #if H_MV_HLS_7_MISC_P0068_21 1770 pcVPSVUI->setAllLayersIdrAlignedFlag ( m_allLayersIdrAlignedFlag ); 1771 #endif 1633 1772 pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag ); 1634 1773 pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag ); … … 1636 1775 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1637 1776 { 1777 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1778 for( Int i = 0; i <= vps.getVpsNumLayerSetsMinus1(); i++ ) 1779 #else 1638 1780 for( Int i = 0; i <= vps.getVpsNumberLayerSetsMinus1(); i++ ) 1781 #endif 1639 1782 { 1640 1783 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) … … 1754 1897 pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD 1755 1898 } 1899 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1900 else 1901 { 1902 pcVPSVUI->setCrossLayerIrapAlignedFlag ( false ); 1903 } 1904 #endif 1756 1905 } 1757 1906 #endif -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/CommonDef.h
r852 r854 60 60 61 61 #if H_MV 62 #define NV_VERSION "10.0" 62 #define NV_VERSION "10.0" ///< Current software version 63 63 #define HM_VERSION "13.0" ///< 64 64 #else -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComRom.h
r852 r854 219 219 extern UInt64 g_stopAtCounter; // Counter to set breakpoint. 220 220 extern Bool g_traceCopyBack; // Output samples on copy back 221 extern Bool g_decTraceDispDer; 221 extern Bool g_decTraceDispDer; // Trace derived disparity vectors (decoder only) 222 222 extern Bool g_decTraceMvFromMerge; // Trace motion vectors obtained from merge (decoder only) 223 223 extern Bool g_stopAtPos; // Stop at position … … 230 230 #define DTRACE_PU_S(x) writeToTraceFile( x, g_tracePU ); 231 231 #define DTRACE_TU_S(x) writeToTraceFile( x, g_traceTU ); 232 232 233 233 234 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ); -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r852 r854 41 41 #include <stdio.h> 42 42 #include <math.h> 43 43 44 //! \ingroup TLibCommon 44 45 //! \{ -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComSlice.cpp
r852 r854 103 103 , m_isDepth (false) 104 104 #endif 105 #if !H_MV_HLS7_GEN 105 106 , m_pocResetFlag (false) 107 #endif 106 108 #if H_MV 107 109 , m_crossLayerBlaFlag (false) … … 1032 1034 #if H_MV 1033 1035 // Additional slice header syntax elements 1036 #if !H_MV_HLS7_GEN 1034 1037 m_pocResetFlag = pSrc->m_pocResetFlag; 1038 #endif 1035 1039 m_discardableFlag = pSrc->m_discardableFlag; 1036 1040 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; … … 1707 1711 } 1708 1712 } 1709 1713 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1710 1714 m_vpsNumberLayerSetsMinus1 = -1; 1715 #endif 1711 1716 m_vpsNumProfileTierLevelMinus1 = -1; 1712 1717 1718 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1713 1719 for ( Int i = 0; i < MAX_VPS_PROFILE_TIER_LEVEL; i++) 1714 1720 { 1721 #if !H_MV_HLS_7_VPS_P0048_14 1715 1722 m_profileRefMinus1[ i ] = -1; 1723 #endif 1716 1724 } 1717 1725 … … 1719 1727 m_numAddOutputLayerSetsMinus1 = -1; 1720 1728 m_defaultOneTargetOutputLayerIdc = 0; 1729 #else 1730 m_numAddOutputLayerSets = -1; 1731 m_defaultTargetOutputLayerIdc = 0; 1732 #endif 1721 1733 1722 1734 for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++) … … 1728 1740 m_outputLayerFlag[i][j] = false; 1729 1741 } 1730 } 1742 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1743 m_altOutputLayerFlag[ i ] = false; 1744 #endif 1745 } 1746 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1731 1747 m_altOutputLayerFlag = false; 1748 #endif 1732 1749 m_maxOneActiveRefLayerFlag = false; 1733 1750 m_directDepTypeLenMinus2 = 0; … … 1735 1752 1736 1753 m_avcBaseLayerFlag = false; 1754 #if !H_MV_HLS7_GEN 1737 1755 m_vpsVuiOffset = 0; 1756 #endif 1738 1757 m_splittingFlag = false; 1739 1758 … … 1749 1768 { 1750 1769 m_vpsProfilePresentFlag [i] = false; 1770 #if !H_MV_HLS_7_VPS_P0048_14 1751 1771 m_profileRefMinus1[i] = 0; 1772 #endif 1752 1773 m_outputLayerSetIdxMinus1 [i] = 0; 1753 1774 for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ ) … … 2060 2081 Int TComVPS::getNumOutputLayerSets() 2061 2082 { 2083 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 2084 return getNumAddOutputLayerSets() + getVpsNumLayerSetsMinus1() + 1; 2085 #else 2062 2086 Int numOutputLayerSets = getVpsNumberLayerSetsMinus1( ) + 1; 2063 2087 if ( getMoreOutputLayerSetsThanDefaultFlag( ) ) … … 2066 2090 } 2067 2091 return numOutputLayerSets; 2092 #endif 2068 2093 } 2069 2094 … … 2113 2138 } 2114 2139 2115 Void TComVPS::deriveTargetLayerIdLists() 2140 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 2141 Void TComVPS::initTargetLayerIdLists() 2116 2142 { 2117 2143 m_targetDecLayerIdLists.resize( getNumOutputLayerSets() ); 2118 2144 m_targetOptLayerIdLists.resize( getNumOutputLayerSets() ); 2145 } 2146 2147 Void TComVPS::deriveTargetLayerIdList( Int i ) 2148 { 2149 Int lsIdx = getLayerSetIdxForOutputLayerSet( i ); 2150 2151 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2152 { 2153 m_targetDecLayerIdLists[i].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 2154 if( getOutputLayerFlag( i, j )) 2155 { 2156 m_targetOptLayerIdLists[i].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 2157 } 2158 } 2159 } 2160 #else 2161 Void TComVPS::deriveTargetLayerIdLists() 2162 { 2163 m_targetDecLayerIdLists.resize( getNumOutputLayerSets() ); 2164 m_targetOptLayerIdLists.resize( getNumOutputLayerSets() ); 2119 2165 2120 2166 for (Int targetOptLayerSetIdx = 0; targetOptLayerSetIdx < getNumOutputLayerSets(); targetOptLayerSetIdx++ ) … … 2133 2179 } 2134 2180 } 2181 #endif 2182 2135 2183 #endif // H_MV 2136 2184 … … 2385 2433 { 2386 2434 m_scalingList = new TComScalingList; 2435 2436 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 2437 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ ) 2438 { 2439 m_ppsExtensionTypeFlag[ i ] = false; 2440 } 2441 #endif 2442 2387 2443 } 2388 2444 … … 2903 2959 // Consider to check here: 2904 2960 // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer0 and RefPicSetInterLayer1 that is a RASL picture. " 2961 #if H_MV_HLS7_GEN 2962 // "There shall be no picture that has discardable_flag equal to 1 in RefPicSetInterLayer0 or RefPicSetInterLayer1". 2963 #endif 2905 2964 } 2906 2965 } … … 3077 3136 Int numActiveRefLayerPics; 3078 3137 3138 #if H_MV_HLS_7_MISC_P0079_18 3139 if( getLayerId() == 0 || getNumRefLayerPics() == 0 ) 3140 #else 3079 3141 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerId() ) == 0 ) 3142 #endif 3080 3143 { 3081 3144 numActiveRefLayerPics = 0; … … 3091 3154 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 ) 3092 3155 { 3156 #if H_MV_HLS_7_MISC_P0079_18 3157 numActiveRefLayerPics = 1; 3158 #else 3093 3159 numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0; 3160 #endif 3094 3161 } 3095 3162 else … … 3749 3816 { 3750 3817 m_crossLayerIrapAlignedFlag = true; 3818 #if H_MV_HLS_7_MISC_P0068_21 3819 m_allLayersIdrAlignedFlag = false; 3820 #endif 3751 3821 m_bitRatePresentVpsFlag = false; 3752 3822 m_picRatePresentVpsFlag = false; … … 3775 3845 m_minHorizontalCtuOffsetPlus1 [i][j] = -1; 3776 3846 } 3847 #if H_MV_HLS_7_MISC_P0182_13 3848 m_baseLayerParameterSetCompatibilityFlag[i] = false; 3849 #endif 3777 3850 } 3778 3851 for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ ) -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComSlice.h
r852 r854 473 473 Bool m_crossLayerPicTypeAlignedFlag; 474 474 Bool m_crossLayerIrapAlignedFlag; 475 #if H_MV_HLS_7_MISC_P0068_21 476 Bool m_allLayersIdrAlignedFlag; 477 #endif 475 478 Bool m_bitRatePresentVpsFlag; 476 479 Bool m_picRatePresentVpsFlag; … … 481 484 Int m_constantPicRateIdc [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 482 485 Int m_avgPicRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 486 #if H_MV_HLS_7_VPS_P0076_15 487 Bool m_videoSignalInfoIdxPresentFlag; 488 Int m_vpsNumVideoSignalInfoMinus1; 489 TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO]; 490 Int m_vpsVideoSignalInfoIdx [MAX_NUM_VIDEO_SIGNAL_INFO]; 491 #endif 483 492 Bool m_tilesNotInUseFlag; 484 493 Bool m_tilesInUseFlag [MAX_NUM_LAYERS]; … … 491 500 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 492 501 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 502 #if !H_MV_HLS_7_VPS_P0076_15 493 503 Bool m_videoSignalInfoIdxPresentFlag; 494 504 Int m_vpsNumVideoSignalInfoMinus1; 495 505 TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO]; 496 506 Int m_vpsVideoSignalInfoIdx [MAX_NUM_VIDEO_SIGNAL_INFO]; 507 #endif 497 508 Bool m_vpsVuiBspHrdPresentFlag; 498 509 TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters; 510 #if H_MV_HLS_7_MISC_P0182_13 511 Bool m_baseLayerParameterSetCompatibilityFlag[MAX_NUM_LAYERS]; 512 #endif 499 513 500 514 public: … … 507 521 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } 508 522 523 #if H_MV_HLS_7_MISC_P0068_21 524 Void setAllLayersIdrAlignedFlag( Bool flag ) { m_allLayersIdrAlignedFlag = flag; } 525 Bool getAllLayersIdrAlignedFlag( ) { return m_allLayersIdrAlignedFlag; } 526 #endif 527 509 528 Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } 510 529 Bool getBitRatePresentVpsFlag( ) { return m_bitRatePresentVpsFlag; } … … 531 550 Int getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; } 532 551 552 #if H_MV_HLS_7_VPS_P0076_15 553 Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } 554 Bool getVideoSignalInfoIdxPresentFlag( ) { return m_videoSignalInfoIdxPresentFlag; } 555 556 Void setVideoSignalInfo( Int i, TComVideoSignalInfo* val ) { m_videoSignalInfo[i] = val; } 557 TComVideoSignalInfo* getVideoSignalInfo( Int i ) { return m_videoSignalInfo[i]; } 558 559 Void setVpsNumVideoSignalInfoMinus1( Int val ) { m_vpsNumVideoSignalInfoMinus1 = val; } 560 Int getVpsNumVideoSignalInfoMinus1( ) { return m_vpsNumVideoSignalInfoMinus1; } 561 562 Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } 563 Int getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } 564 #endif 565 533 566 Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; } 534 567 Bool getTilesNotInUseFlag( ) { return m_tilesNotInUseFlag; } … … 560 593 Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; } 561 594 Int getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; } 562 595 #if !H_MV_HLS_7_VPS_P0076_15 563 596 Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } 564 597 Bool getVideoSignalInfoIdxPresentFlag( ) { return m_videoSignalInfoIdxPresentFlag; } … … 572 605 Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } 573 606 Int getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } 574 607 #endif 575 608 Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; } 576 609 Bool getVpsVuiBspHrdPresentFlag( ) { return m_vpsVuiBspHrdPresentFlag; } … … 578 611 Void setVpsVuiBspHrdParameters( TComVpsVuiBspHrdParameters* val) { m_vpsVuiBspHrdParameters = val; } 579 612 TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters( ) { return m_vpsVuiBspHrdParameters; } 613 614 #if H_MV_HLS_7_MISC_P0182_13 615 Void setBaseLayerParameterSetCompatibilityFlag( Int i, Bool flag ) { m_baseLayerParameterSetCompatibilityFlag[i] = flag; } 616 Bool getBaseLayerParameterSetCompatibilityFlag( Int i ) { return m_baseLayerParameterSetCompatibilityFlag[i]; } 617 #endif 618 619 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 620 Void inferVpsVui( Bool encoderFlag ) 621 { 622 // inference of syntax elements that differ from default inference (as done in constructor), when VPS VUI is not present 623 if (!encoderFlag ) 624 { 625 setCrossLayerIrapAlignedFlag( false ); 626 } 627 else 628 { 629 assert( !getCrossLayerIrapAlignedFlag() ); 630 } 631 632 } 633 #endif 580 634 }; 581 635 … … 626 680 Int m_maxVpsDecPicBufferingMinus1[MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYER_IDS][MAX_TLAYER];; 627 681 Int m_maxVpsNumReorderPics [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; 682 #if H_MV_HLS7_GEN 683 Int m_maxVpsLayerDecPicBuffMinus1[TO_BE_SPECIFIED][TO_BE_SPECIFIED][TO_BE_SPECIFIED]; 684 #endif 628 685 Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; 629 686 … … 660 717 Void setMaxVpsNumReorderPics( Int i, Int j, Int val ) { m_maxVpsNumReorderPics[i][j] = val; } 661 718 Int getMaxVpsNumReorderPics( Int i, Int j ) { return m_maxVpsNumReorderPics[i][j]; } 662 719 #if H_MV_HLS7_GEN 720 Void setMaxVpsLayerDecPicBuffMinus1( Int i, Int k, Int j, Int val ) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = val; } 721 Int getMaxVpsLayerDecPicBuffMinus1( Int i, Int k, Int j ) { return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; } 722 #endif 663 723 Void setMaxVpsLatencyIncreasePlus1( Int i, Int j, Int val ) { m_maxVpsLatencyIncreasePlus1[i][j] = val; } 664 724 Int getMaxVpsLatencyIncreasePlus1( Int i, Int j ) { return m_maxVpsLatencyIncreasePlus1[i][j]; } … … 708 768 /// VPS EXTENSION SYNTAX ELEMENTS 709 769 Bool m_avcBaseLayerFlag; 770 #if !H_MV_HLS7_GEN 710 771 Int m_vpsVuiOffset; 772 #endif 711 773 Bool m_splittingFlag; 712 774 Bool m_scalabilityMaskFlag [MAX_NUM_SCALABILITY_TYPES]; … … 724 786 Int m_maxTidIlRefPicsPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 725 787 Bool m_allRefLayersActiveFlag; 788 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 726 789 Int m_vpsNumberLayerSetsMinus1; 790 #endif 727 791 Int m_vpsNumProfileTierLevelMinus1; 728 792 Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; 793 794 #if !H_MV_HLS_7_VPS_P0048_14 729 795 Int m_profileRefMinus1 [MAX_VPS_PROFILE_TIER_LEVEL]; 796 #endif 797 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 798 Int m_numAddOutputLayerSets; 799 Int m_defaultTargetOutputLayerIdc; 800 #else 730 801 Bool m_moreOutputLayerSetsThanDefaultFlag; 731 802 Int m_numAddOutputLayerSetsMinus1; 732 803 Int m_defaultOneTargetOutputLayerIdc; 804 #endif 805 733 806 Int m_outputLayerSetIdxMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 734 807 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 735 808 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 809 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 810 Bool m_altOutputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS]; 811 #else 736 812 Bool m_altOutputLayerFlag; 813 #endif 737 814 Bool m_repFormatIdxPresentFlag; 738 815 Int m_vpsNumRepFormatsMinus1; … … 740 817 TComRepFormat* m_repFormat [MAX_NUM_LAYERS]; 741 818 Bool m_maxOneActiveRefLayerFlag; 819 #if H_MV_HLS7_GEN 820 Bool m_vpsPocLsbAlignedFlag; 821 #endif 742 822 Bool m_pocLsbNotPresentFlag [MAX_NUM_LAYERS]; 743 823 … … 746 826 Bool m_defaultDirectDependencyFlag; 747 827 Int m_defaultDirectDependencyType; 828 829 #if H_MV_HLS7_GEN 830 Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; 831 Int m_vpsNonVuiExtensionLength; 832 #endif 748 833 Bool m_vpsVuiPresentFlag; 749 834 TComVPSVUI* m_vpsVUI; 835 #if !H_MV_HLS7_GEN 750 836 Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; 837 #endif 751 838 752 839 // VPS EXTENSION SEMANTICS VARIABLES … … 886 973 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 887 974 975 #if !H_MV_HLS7_GEN 888 976 Void setVpsVuiOffset( Int val ) { m_vpsVuiOffset = val; } 889 977 Int getVpsVuiOffset( ) { return m_vpsVuiOffset; } 978 #endif 890 979 891 980 Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } … … 929 1018 Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } 930 1019 Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } 1020 1021 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 931 1022 Void setVpsNumberLayerSetsMinus1( Int val ) { m_vpsNumberLayerSetsMinus1 = val; } 932 1023 Int getVpsNumberLayerSetsMinus1( ) { return m_vpsNumberLayerSetsMinus1; } 1024 #endif 933 1025 934 1026 Void setVpsNumProfileTierLevelMinus1( Int val ) { m_vpsNumProfileTierLevelMinus1 = val; } … … 938 1030 Bool getVpsProfilePresentFlag( Int idx ) { return m_vpsProfilePresentFlag[idx]; } 939 1031 1032 #if !H_MV_HLS_7_VPS_P0048_14 940 1033 Void setProfileRefMinus1( Int profileTierLevelIdx, Int val ) { m_profileRefMinus1[ profileTierLevelIdx ] = val; } 941 1034 Int getProfileRefMinus1( Int profileTierLevelIdx ) { return m_profileRefMinus1[ profileTierLevelIdx ]; } 942 1035 Void checkProfileRefMinus1( Int i ) { assert( getProfileRefMinus1( i ) + 1 <= i ); }; // The value of profile_ref_minus1[ i ] + 1 shall be less than or equal to i. 1036 #endif 1037 1038 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 943 1039 Void setMoreOutputLayerSetsThanDefaultFlag( Bool flag ) { m_moreOutputLayerSetsThanDefaultFlag = flag; } 944 1040 Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag; } 945 1041 #endif 1042 1043 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1044 Void setNumAddOutputLayerSets( Int val ) { m_numAddOutputLayerSets = val; } 1045 Int getNumAddOutputLayerSets( ) { return m_numAddOutputLayerSets; } 1046 #else 946 1047 Void setNumAddOutputLayerSetsMinus1( Int val ) { m_numAddOutputLayerSetsMinus1 = val; } 947 1048 Int getNumAddOutputLayerSetsMinus1( ) { return m_numAddOutputLayerSetsMinus1; } 948 1049 #endif 1050 1051 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1052 Void setDefaultTargetOutputLayerIdc( Int val ) { m_defaultTargetOutputLayerIdc = val; } 1053 Int getDefaultTargetOutputLayerIdc( ) { return m_defaultTargetOutputLayerIdc; } 1054 #else 949 1055 Void setDefaultOneTargetOutputLayerIdc( Int val ) { m_defaultOneTargetOutputLayerIdc = val; } 950 1056 Int getDefaultOneTargetOutputLayerIdc( ) { return m_defaultOneTargetOutputLayerIdc; } 951 1057 Void checkDefaultOneTargetOutputLayerIdc( ) { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); } 1058 #endif 952 1059 953 1060 Void setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val ) { m_outputLayerSetIdxMinus1[ outLayerSetIdx ] = val; } … … 956 1063 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } 957 1064 Bool getOutputLayerFlag( Int outLayerSetIdx, Int i ) { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } 1065 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1066 Bool inferOutputLayerFlag( Int i, Int j ) 1067 { 1068 Bool outputLayerFlag; 1069 switch ( getDefaultTargetOutputLayerIdc( ) ) 1070 { 1071 case 0: 1072 outputLayerFlag = true; 1073 break; 1074 case 1: 1075 outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 ); 1076 break; 1077 case 2: 1078 if ( i == 0 && j == 0) 1079 { 1080 outputLayerFlag = true; // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred. 1081 } 1082 else 1083 { 1084 assert( 0 ); 1085 } 1086 break; 1087 default: 1088 assert( 0 ); 1089 break; 1090 } 1091 return outputLayerFlag; 1092 } 1093 #else 958 1094 Bool inferOutputLayerFlag( Int layerSetIdx, Int i ) { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1 ) )); } 1095 #endif 959 1096 960 1097 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx ] = val; } 961 1098 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 1099 1100 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1101 Void setAltOutputLayerFlag( Int i, Bool flag ) { m_altOutputLayerFlag[i] = flag; } 1102 Bool getAltOutputLayerFlag( Int i ) { return m_altOutputLayerFlag[i]; } 1103 #else 962 1104 Void setAltOutputLayerFlag( Bool flag ) { m_altOutputLayerFlag = flag; } 963 1105 Bool getAltOutputLayerFlag( ) { return m_altOutputLayerFlag; } 1106 #endif 964 1107 965 1108 Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } … … 977 1120 Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } 978 1121 1122 #if H_MV_HLS7_GEN 1123 Void setVpsPocLsbAlignedFlag( Bool flag ) { m_vpsPocLsbAlignedFlag = flag; } 1124 Bool getVpsPocLsbAlignedFlag( ) { return m_vpsPocLsbAlignedFlag; } 1125 #endif 1126 979 1127 Void setDpbSize( TComDpbSize* val ) { assert( m_dpbSize != 0 ); m_dpbSize = val; } 980 1128 TComDpbSize* getDpbSize( ) { return m_dpbSize;} … … 992 1140 Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 993 1141 Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } 1142 1143 #if H_MV_HLS7_GEN 1144 Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } 1145 Int getVpsNonVuiExtensionLength( ) { return m_vpsNonVuiExtensionLength; } 1146 #endif 1147 994 1148 Void setVpsVuiPresentFlag( Bool flag ) { m_vpsVuiPresentFlag = flag; } 995 1149 Bool getVpsVuiPresentFlag( ) { return m_vpsVuiPresentFlag; } … … 1021 1175 Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ); 1022 1176 Void deriveLayerSetLayerIdList(); 1177 1178 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1179 Int getLayerSetIdxForOutputLayerSet( Int i ) { return ( i <= getVpsNumLayerSetsMinus1() ) ? i : getOutputLayerSetIdxMinus1( i ) + 1 ; }; 1180 1181 Void initTargetLayerIdLists ( ); 1182 Void deriveTargetLayerIdList ( Int i ); 1183 1184 std::vector<Int> getTargetDecLayerIdList( Int targetDecLayerSetIdx ) { return m_targetDecLayerIdLists[targetDecLayerSetIdx]; }; 1185 std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) { return m_targetOptLayerIdLists[targetOptLayerSetIdx]; }; 1186 1187 Int getNumOutputLayersInOutputLayerSet( Int i ) { return (Int) getTargetOptLayerIdList( i ).size(); }; 1188 Int getOlsHighestOutputLayerId( Int i ) { return getTargetOptLayerIdList( i ).back(); }; 1189 #else 1023 1190 Void deriveTargetLayerIdLists(); 1024 1191 std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 1025 1192 std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 1026 1193 #endif 1194 1195 #if H_MV_HLS_7_HRD_P0156_7 1196 Int getMaxSubLayersInLayerSetMinus1( Int i ) 1197 { 1198 Int maxSLMinus1 = 0; 1199 Int optLsIdx = getLayerSetIdxForOutputLayerSet( i ); 1200 for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ ) 1201 { 1202 Int lId = m_layerSetLayerIdList[optLsIdx][k]; 1203 maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) )); 1204 } 1205 return maxSLMinus1; 1206 } 1207 #endif 1027 1208 1028 1209 // inference … … 1049 1230 UInt getCamParPrecision () { return m_uiCamParPrecision; } 1050 1231 Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; } 1232 #if FIX_CAM_PARS_COLLECTOR 1233 Void setCamParPresent ( Int viewIndex, Bool val ) { m_bCamParPresent[viewIndex] = val; } 1234 #endif 1051 1235 Bool hasCamParInSliceHeader( Int viewIndex ) { return m_bCamParInSliceHeader[viewIndex]; } 1052 1236 Void setHasCamParInSliceHeader( Int viewIndex, Bool b ) { m_bCamParInSliceHeader[viewIndex] = b; } … … 1753 1937 Bool m_ppsInferScalingListFlag; 1754 1938 Int m_ppsScalingListRefLayerId; 1939 1940 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 1941 Bool m_ppsExtensionTypeFlag[PS_EX_T_MAX_NUM]; 1942 #endif 1943 #if H_MV_HLS7_GEN 1944 Bool m_pocResetInfoPresentFlag; 1945 #endif 1755 1946 #endif 1756 1947 … … 1894 2085 Void setPpsScalingListRefLayerId( Int val ) { m_ppsScalingListRefLayerId = val; } 1895 2086 Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } 2087 2088 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 2089 Void setPpsExtensionTypeFlag( Int i, Bool flag ) { m_ppsExtensionTypeFlag[i] = flag; } 2090 Bool getPpsExtensionTypeFlag( Int i ) { return m_ppsExtensionTypeFlag[i]; } 2091 #endif 2092 2093 #if H_MV_HLS7_GEN 2094 Void setPocResetInfoPresentFlag( Bool flag ) { m_pocResetInfoPresentFlag = flag; } 2095 Bool getPocResetInfoPresentFlag( ) { return m_pocResetInfoPresentFlag; } 2096 #endif 2097 1896 2098 #endif 1897 2099 }; … … 2030 2232 2031 2233 // Additional slice header syntax elements 2234 #if !H_MV_HLS7_GEN 2032 2235 Bool m_pocResetFlag; 2236 #endif 2033 2237 Bool m_crossLayerBlaFlag; 2034 2238 Bool m_discardableFlag; … … 2036 2240 Int m_numInterLayerRefPicsMinus1; 2037 2241 Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; 2242 2243 #if H_MV_HLS7_GEN 2244 Int m_sliceSegmentHeaderExtensionLength; 2245 Int m_pocResetIdc; 2246 Int m_pocResetPeriodId; 2247 Bool m_fullPocResetFlag; 2248 Int m_pocLsbVal; 2249 Bool m_pocMsbValPresentFlag; 2250 Int m_pocMsbVal; 2251 #endif 2252 2253 #if H_3D 2038 2254 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 2039 2255 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; 2256 #endif 2040 2257 #if H_3D_TMVP 2041 2258 Int m_aiAlterRefIdx [2]; … … 2363 2580 } 2364 2581 2582 #if !H_MV_HLS7_GEN 2365 2583 Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } 2366 2584 Bool getPocResetFlag( ) { return m_pocResetFlag; } 2585 #endif 2367 2586 2368 2587 Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } … … 2377 2596 Void setInterLayerPredLayerIdc( Int i, Int val ) { m_interLayerPredLayerIdc[i] = val; } 2378 2597 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 2598 2599 #if H_MV_HLS7_GEN 2600 Void setSliceSegmentHeaderExtensionLength( Int val ) { m_sliceSegmentHeaderExtensionLength = val; } 2601 Int getSliceSegmentHeaderExtensionLength( ) { return m_sliceSegmentHeaderExtensionLength; } 2602 2603 Void setPocResetIdc( Int val ) { m_pocResetIdc = val; } 2604 Int getPocResetIdc( ) { return m_pocResetIdc; } 2605 2606 Void setPocResetPeriodId( Int val ) { m_pocResetPeriodId = val; } 2607 Int getPocResetPeriodId( ) { return m_pocResetPeriodId; } 2608 2609 Void setFullPocResetFlag( Bool flag ) { m_fullPocResetFlag = flag; } 2610 Bool getFullPocResetFlag( ) { return m_fullPocResetFlag; } 2611 2612 Void setPocLsbVal( Int val ) { m_pocLsbVal = val; } 2613 Int getPocLsbVal( ) { return m_pocLsbVal; } 2614 2615 Void setPocMsbValPresentFlag( Bool flag ) { m_pocMsbValPresentFlag = flag; } 2616 Bool getPocMsbValPresentFlag( ) { return m_pocMsbValPresentFlag; } 2617 2618 Void setPocMsbVal( Int val ) { m_pocMsbVal = val; } 2619 Int getPocMsbVal( ) { return m_pocMsbVal; } 2620 2621 #endif 2379 2622 2380 2623 // Additional variables derived in slice header semantics … … 2395 2638 Void setRefPicSetInterLayer ( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1); 2396 2639 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2397 #endif 2398 2640 2641 #if H_MV_HLS7_GEN 2642 Bool getPocMsbValRequiredFlag( ) { return }; 2643 UInt getPocLsbValLen() { return getSPS->getBitsForPOC(); }; //log2_max_pic_order_cnt_lsb_minus4 + 4 2644 #endif 2645 #endif 2399 2646 #if MTK_DDD_G0063 2400 2647 Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); -
branches/HTM-10.0-dev0/source/Lib/TLibCommon/TypeDef.h
r852 r854 327 327 /////////////////////////////////// HTM-10.1 Integrations ////////////////////////////// 328 328 ///////////////////////////////////////////////////////////////////////////////////////// 329 #define UPDATE_HM13 1 329 330 331 // TBD 332 333 // #define H_MV_HLS_7_ED_FIX_P0130_34 0 // (ED.FIX/P0130/il ref pic set no reference pic) #34 For proposal 5, delegated to editors 334 // #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 335 // #define H_MV_HLS_7_VPS_P0306_22 0 // (VPS/P0306/ue(v) coded syntax elements) #22 Several minor modifications to the VPS syntax, consistent with eliminating the previous intention to avoid ue(v) parsing in the VPS 336 // #define H_MV_HLS_7_SEI_P0133_28 0 // (SEI/P0133/Recovery point SEI) #28 Decision: Adopt change to recover point semantics only (-v3) 337 // #define H_MV_HLS_7_VPS_P0125_24 0 // (VPS/P0125/VPS extension offset ) #24 Decision: Keep it as a reserved FFFF value. 338 // #define H_MV_HLS_7_VPS_P0307_23 0 // (VPS/P0307/VPS VUI extension) #23 Decision: Adopt modification in P0307. 339 // #define H_MV_HLS_7_POC_P0041_3 0 // (POC/P0041/POC reset) #3 It was remarked that we should require each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. This was agreed. Decision: Adopt (with constraint for discardable_flag as described above) 340 // #define H_MV_HLS_7_POC_P0041_FIXES 0 // (POC/P0041/Fixes) For each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. 341 // #define H_MV_HLS_7_SEI_P0204_26 0 // (SEI/P0204/sub-bitstream SEI) #26 Add sub-bitstream property SEI message. Decision: Adopt 342 // #define H_MV_HLS_7_MISC_P0130_20 0 // (MISC/P0130/discardable not in inter-layer RPS) #20 Add constraint restricting pictures marked as discardable from being present in the temporal or inter-layer RPS, 343 344 345 // #define H_MV_HLS_7_SEI_P0123_25 0 // (SEI/P0123/Alpha channel info) #25 Add alpha channel information SEI message Decision: Adopt. Constrain the bit depth indicated to be equal to the coded bit depth of the aux picture. 346 // #define H_MV_HLS_7_VPS_P0300_27 0 // Output part only. (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt. 347 // #define H_MV_HLS_7_POC_P0056_4 0 // (POC/P0056/layer tree poc) #4 Proposal 1: If the POC reset approach is adopted as the basis for multi-layer POC derivation, it is proposed to derive the POC anchor picture from the previous TID0 picture (that is not a RASL picture, a RADL picture or a sub-layer non-reference picture and not with discardable_flag equal to 1) of the current layer or any of its reference layer. This is asserted to improve loss resilience and reduce bit rate overhead. Decision: Adopt Proposal 1 (with the suggested modifications with text provided as P0297). 348 // #define H_MV_HLS_7_HRD_P0138_6 0 // (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections. 349 350 351 352 353 354 #define H_MV_HLS7_GEN 0 // General changes (not tested) 355 #define H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1 // Output layer sets, various 356 // (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt. 357 // (VPS/P0156/Num of output_layer_flag) #10 Proposal 3: The output_layer_flag[ i ][ j ] is signalled for j equal to 0 to NumLayersInIdList[ lsIdx ] inclusive. It was remarked that we might be able to just assume that the top layer is always output; however, this was not entirely clear , so the safe thing to do may be to also send the flag for this layer. 358 // (VPS/P0295/Default output layer sets) #5 Discussion from (P0110). Decision: Three-state approach (text in P0295, decoder shall allow 3 to be present and shall treat 3 the same as the value 2). 359 360 361 #define H_MV_HLS_7_HRD_P0156_7 1 // (HRD/P0156/MaxSubLayersInLayerSetMinus1) #7 Proposal 1: signal, in the VPS extension, the DPB parameters for an output layer set for sub-DPBs only up to the maximum temporal sub-layers in the corresponding layer set 362 #define H_MV_HLS_7_VPS_P0048_14 1 // (VPS/P0048/profile_ref_minus1 rem) #14 Remove profile_ref_minus1 from the VPS extension, from JCTVC-P0048 363 #define H_MV_HLS_7_VPS_P0076_15 1 // (VPS/P0076/video signal info move) #15 Move video signal information syntax structure earlier in the VPS VUI. 364 #define H_MV_HLS_7_SPS_P0155_16_32 1 // (SPS/P0155/sps_sub_layer_ordering_info) #16, #32 Not signal the sps_max_num_reorder_pics[], sps_max_latency_increase_plus1[], and sps_max_dec_pic_buffering_minus1[] syntax elements in the SPS when nuh_layer_id > 0. 365 #define H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 1 // (GEN/P0166/pps_extension) #17 Add PPS extension type flags for conditional presence of syntax extensions per extension type, aligned with the SPS extension type flags, from JCTVC-P0166. Further align the SPS extension type flags syntax between RExt and MV-HEVC/SHVC 366 #define H_MV_HLS_7_FIX_SET_DPB_SIZE 1 // Fix derivation dpb size parameters 367 #define H_MV_HLS_7_RESERVED_FLAGS 1 // Added flags 368 // (SPS/P0312/SHVC reserved flag) The flag will be used for the syntax vert_phase_position_enable_flag in SHVC draft 369 // (VPS/O0215/SHVC reserved flag): this flag will be used for the syntax cross_layer_phase_alignment_flag in SHVC draft. 370 // (VPS VUI/O0199,P0312/SHVC reserved flags) the 3 reserved bits will be used for the syntaxes single_layer_for_non_irap_flag, higher_layer_irap_skip_flag and vert_phase_position_not_in_use_flag in SHVC draft. 371 #define H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO 1 // Discard VPS with nuh_layer_Id > 0 372 #define H_MV_HLS_7_MISC_P0130_EOS 1 // (MISC/P0130/EOS NAL layer id) #19 Require that end of bitstream NAL unit shall have nuh_layer_id equal to 0, from JCTVC-P0130. Decoders shall allow an end of bitstream NAL unit with nuh_layer_id > 0 to be present, and shall ignore the NAL unit. 373 #define H_MV_HLS_7_MISC_P0182_13 1 // (MISC/P0182/BL PS Compatibility flag) #13 Define the flag (in VPS VUI) with the proposed semantics, without specifying an associated extraction process. Editors to select the position in the VPS VUI. 374 #define H_MV_HLS_7_MISC_P0068_21 1 // (MISC/P0068/all irap idr flag) #21 Add flag in VUI to indicate that all IRAP pictures are IDRs and that all layer pictures in an AU are IDR aligned, from JCTVC-P0068 proposal 1. 375 #define H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1 // Fix inference of cross_layer_irap_aligned_flag 376 #define H_MV_HLS_7_MISC_P0079_18 1 // (MISC/P0079/NumActiveRefLayerPics) #18 Modification of derivation of variable NumActiveRefLayerPics. 377 #define FIX_CAM_PARS_COLLECTOR 1 378 #define UPDATE_HM13 1 // Only some parts in H_3D parts are marked! 330 379 #if H_3D 331 380 #define H_3D_FIX_G0148_BRACE 1 … … 857 906 #if H_MV 858 907 908 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 909 enum PpsExtensionTypes 910 { 911 PPS_EX_T_MV = 0, 912 #if H_3D 913 PPS_EX_T_3D = 3, 914 #endif 915 PPS_EX_T_ESC = 7, 916 PPS_EX_T_MAX_NUM = 8 917 }; 918 919 //Below for sps, would be good if this could be aligned 920 #endif 921 859 922 enum PsExtensionTypes 860 923 { -
branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r852 r854 366 366 367 367 READ_FLAG( uiCode, "pps_extension_flag"); 368 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 369 if (uiCode) 370 { 371 #if H_MV 372 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 373 { 374 READ_FLAG( uiCode, "pps_extension_type_flag" ); pcPPS->setPpsExtensionTypeFlag( i, uiCode == 1 ); 375 #if H_3D 376 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC ); 377 #else 378 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC ); 379 #endif 380 } 381 382 383 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 384 { 385 #if H_MV_HLS7_GEN 386 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 387 #endif 388 } 389 390 #if H_3D 391 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC 392 { 393 parsePPSExtension( pcPPS, pcVPS ); 394 } 395 #endif 396 397 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_ESC ) ) 398 { 399 #endif 400 while ( xMoreRbspData() ) 401 { 402 READ_FLAG( uiCode, "pps_extension_data_flag"); 403 } 404 #if H_MV 405 } 406 #endif 407 } 408 #else 368 409 if (uiCode) 369 410 { … … 382 423 #endif 383 424 } 425 #endif 384 426 } 385 427 … … 807 849 assert(uiCode <= 12); 808 850 851 #if H_MV_HLS_7_SPS_P0155_16_32 852 if ( pcSPS->getLayerId() == 0 ) 853 { 854 #endif 809 855 UInt subLayerOrderingInfoPresentFlag; 810 856 READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); … … 842 888 } 843 889 } 890 #if H_MV_HLS_7_SPS_P0155_16_32 891 } 892 #endif 844 893 845 894 READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" ); … … 1004 1053 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode ); 1005 1054 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode ); 1055 #if H_MV_HLS_7_RESERVED_FLAGS 1056 READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" ); 1057 #endif 1006 1058 } 1007 1059 } … … 1039 1091 READ_FLAG( uiCode, "vps_temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 1040 1092 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 1041 #if H_MV 1093 1094 1095 #if H_MV && !H_MV_HLS7_GEN 1042 1096 READ_CODE( 16, uiCode, "vps_extension_offset" ); 1043 1097 #else … … 1154 1208 UInt uiCode; 1155 1209 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1156 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); if ( pcVPS->getVpsVuiPresentFlag() ) 1210 #if !H_MV_HLS7_GEN 1211 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); 1212 if ( pcVPS->getVpsVuiPresentFlag() ) 1157 1213 { 1158 1214 READ_CODE( 16, uiCode, "vps_vui_offset" ); pcVPS->setVpsVuiOffset( uiCode ); 1159 1215 } 1216 #endif 1160 1217 1161 1218 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1233 1290 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) 1234 1291 { 1235 for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )1292 for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1236 1293 { 1237 1294 READ_CODE( 3, uiCode, "sub_layers_vps_max_minus1" ); pcVPS->setSubLayersVpsMaxMinus1( i, uiCode ); … … 1242 1299 else 1243 1300 { 1244 for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )1301 for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1245 1302 { 1246 1303 pcVPS->setSubLayersVpsMaxMinus1( i, pcVPS->getMaxTLayers( ) - 1); … … 1264 1321 1265 1322 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); pcVPS->setAllRefLayersActiveFlag( uiCode == 1 ); 1323 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1266 1324 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); pcVPS->setVpsNumberLayerSetsMinus1 ( uiCode ); 1325 #endif 1326 1327 #if !H_MV_HLS7_GEN 1267 1328 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1268 1329 #else 1330 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1331 #endif 1269 1332 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1270 1333 { 1271 1334 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1335 #if !H_MV_HLS_7_VPS_P0048_14 1272 1336 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1273 1337 { … … 1275 1339 pcVPS->checkProfileRefMinus1( i ); 1276 1340 } 1341 #endif 1277 1342 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1278 1343 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1279 1344 { 1280 1345 TComPTL temp = *pcVPS->getPTL( i ); 1346 #if H_MV_HLS_7_VPS_P0048_14 1347 *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 ); 1348 #else 1281 1349 *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 ); 1350 #endif 1282 1351 pcVPS->getPTL( i )->copyLevelFrom( &temp ); 1283 1352 } 1284 1353 } 1285 1354 1355 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1356 READ_UVLC( uiCode, "num_add_output_layer_sets" ); pcVPS->setNumAddOutputLayerSets( uiCode ); 1357 pcVPS->initTargetLayerIdLists( ); 1358 if( pcVPS->getNumOutputLayerSets() > 1) 1359 { 1360 READ_CODE( 2, uiCode, "default_target_output_layer_idc" ); pcVPS->setDefaultTargetOutputLayerIdc( std::min( uiCode, (UInt) 2 ) ); 1361 } 1362 1363 #else 1286 1364 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 1287 1365 … … 1299 1377 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1300 1378 } 1379 #endif 1301 1380 1302 1381 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1303 1382 pcVPS->setOutputLayerSetIdxMinus1(0, -1); 1383 1384 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1385 pcVPS->deriveTargetLayerIdList( 0 ); 1386 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1387 { 1388 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1389 #else 1304 1390 for( Int i = 1; i < numOutputLayerSets; i++ ) 1305 1391 { 1306 1392 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) ) 1393 #endif 1307 1394 { 1308 1395 READ_UVLC( uiCode, "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode ); 1396 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1397 } 1398 1399 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultTargetOutputLayerIdc() == 2 ) 1400 { 1401 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ); j++ ) 1402 { 1403 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 ); 1404 } 1405 } 1406 else 1407 { 1408 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ); j++ ) 1409 { 1410 pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j )); 1411 } 1412 } 1413 pcVPS->deriveTargetLayerIdList( i ); 1414 #else 1309 1415 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ ) 1310 1416 { … … 1320 1426 } 1321 1427 } 1322 1428 #endif 1323 1429 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1324 1430 { 1325 1431 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1326 1432 } 1433 1434 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1435 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1436 { 1437 READ_FLAG( uiCode, "alt_output_layer_flag[ i ]" ); pcVPS->setAltOutputLayerFlag( i, uiCode == 1 ); 1438 } 1439 } 1440 #else 1327 1441 } 1328 1442 if( pcVPS->getMaxLayersMinus1() > 0 ) … … 1330 1444 READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 ); 1331 1445 } 1446 #endif 1447 1448 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1332 1449 pcVPS->deriveTargetLayerIdLists(); 1450 #endif 1451 1333 1452 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1334 1453 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1335 1454 { 1455 #if H_MV_HLS7_GEN 1456 READ_UVLC( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1457 #else 1336 1458 READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1459 #endif 1337 1460 } 1338 1461 … … 1358 1481 1359 1482 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 1483 #if H_MV_HLS7_GEN 1484 READ_FLAG( uiCode, "vps_poc_lsb_aligned_flag" ); pcVPS->setVpsPocLsbAlignedFlag( uiCode == 1 ); 1485 #endif 1360 1486 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1361 1487 { … … 1366 1492 } 1367 1493 1494 #if H_MV_HLS_7_RESERVED_FLAGS 1495 READ_FLAG( uiCode, "vps_reserved_zero_flag" ); 1496 #endif 1368 1497 parseDpbSize( pcVPS ); 1369 1498 … … 1394 1523 } 1395 1524 1525 #if H_MV_HLS7_GEN 1526 READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode ); 1527 for ( Int i = 1; i < pcVPS->getVpsNonVuiExtensionLength(); i++ ) 1528 { 1529 READ_CODE( 8, uiCode, "vps_non_vui_extension_data_byte" ); 1530 } 1531 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); if ( pcVPS->getVpsVuiPresentFlag() ) 1532 #endif 1533 #if !H_MV_HLS_7_RESERVED_FLAGS 1396 1534 READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" ); 1397 1535 #endif 1398 1536 if( pcVPS->getVpsVuiPresentFlag() ) 1399 1537 { … … 1401 1539 parseVPSVUI( pcVPS ); 1402 1540 } 1541 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1542 { 1543 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1544 assert( pcVPSVUI ); 1545 pcVPSVUI->inferVpsVui( false ); 1546 } 1547 #endif 1403 1548 1404 1549 pcVPS->checkVPSExtensionSyntax(); … … 1448 1593 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1449 1594 } 1595 #if H_MV_HLS_7_MISC_P0068_21 1596 if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ) 1597 { 1598 READ_FLAG( uiCode, "all_layers_idr_aligned_flag" ); pcVPSVUI->setAllLayersIdrAlignedFlag( uiCode == 1 ); 1599 } 1600 #endif 1450 1601 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 ); 1451 1602 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 ); 1452 1603 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1453 1604 { 1605 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1606 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1607 #else 1454 1608 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ ) 1609 #endif 1455 1610 { 1456 1611 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) … … 1477 1632 } 1478 1633 } 1634 1635 #if H_MV_HLS_7_VPS_P0076_15 1636 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1637 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) 1638 { 1639 READ_CODE( 4, uiCode, "vps_num_video_signal_info_minus1" ); pcVPSVUI->setVpsNumVideoSignalInfoMinus1( uiCode ); 1640 } 1641 else 1642 { 1643 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1644 } 1645 1646 for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ ) 1647 { 1648 assert( pcVPSVUI->getVideoSignalInfo( i ) == NULL ); 1649 TComVideoSignalInfo* curVideoSignalInfo = new TComVideoSignalInfo(); 1650 parseVideoSignalInfo( curVideoSignalInfo ); 1651 pcVPSVUI->setVideoSignalInfo(i, curVideoSignalInfo ); 1652 } 1653 1654 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1655 { 1656 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1657 { 1658 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode ); 1659 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() ); 1660 } 1661 } 1662 else 1663 { 1664 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1665 { 1666 pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ); 1667 } 1668 } 1669 #endif 1479 1670 1480 1671 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); … … 1513 1704 } 1514 1705 1706 #if H_MV_HLS_7_RESERVED_FLAGS 1707 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 1708 #endif 1709 1515 1710 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1516 1711 … … 1534 1729 } 1535 1730 1731 #if !H_MV_HLS_7_VPS_P0076_15 1536 1732 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1537 1733 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1567 1763 } 1568 1764 } 1765 #endif 1569 1766 READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 ); 1570 1767 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1572 1769 parseVpsVuiBspHrdParameters( pcVPS ); 1573 1770 } 1771 #if H_MV_HLS_7_MISC_P0182_13 1772 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1773 { 1774 if( pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i )) == 0 ) 1775 { 1776 READ_FLAG( uiCode, "base_layer_parameter_set_compatibility_flag" ); pcVPSVUI->setBaseLayerParameterSetCompatibilityFlag( i, uiCode == 1 ); 1777 } 1778 } 1779 #endif 1574 1780 } 1575 1781 … … 1650 1856 { 1651 1857 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 ); 1652 1858 #if H_MV_HLS_7_HRD_P0156_7 1859 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1860 #else 1653 1861 for( Int j = 0; j <= vps->getMaxTLayers() - 1 ; j++ ) 1862 #endif 1654 1863 { 1655 1864 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1659 1868 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1660 1869 { 1870 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1871 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1872 #else 1661 1873 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1874 #endif 1662 1875 { 1663 1876 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1664 1877 } 1665 1878 READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode ); 1879 #if H_MV_HLS7_GEN 1880 if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) ) 1881 { 1882 for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1883 { 1884 READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1" ); dpbSize->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode ); 1885 } 1886 } 1887 #endif 1666 1888 READ_UVLC( uiCode, "max_vps_latency_increase_plus1" ); dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode ); 1667 1889 } … … 1704 1926 #if H_3D_SPIVMP 1705 1927 #if SEC_SPIVMP_MCP_SIZE_G0077 1706 READ_UVLC (uiCode, "log2_sub_PU_size_minus3 "); pcVPS->setSubPULog2Size(i, uiCode+3);1928 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); 1707 1929 #else 1708 1930 READ_UVLC (uiCode, "log2_sub_PU_size_minus2"); pcVPS->setSubPULog2Size(i, uiCode+2); … … 1761 1983 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++) 1762 1984 { 1985 #if FIX_CAM_PARS_COLLECTOR 1986 pcVPS->setCamParPresent ( viewIndex, false ); 1987 pcVPS->setHasCamParInSliceHeader( viewIndex, false ); 1988 #endif 1763 1989 READ_FLAG( uiCode, "cp_present_flag[i]" ); bCamParPresentFlag = ( uiCode == 1); 1764 1990 if ( bCamParPresentFlag ) … … 1890 2116 rpcSlice->checkCrossLayerBlaFlag( ); 1891 2117 2118 #if !H_MV_HLS7_GEN 1892 2119 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1893 2120 { … … 1895 2122 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 ); 1896 2123 } 2124 #endif 1897 2125 1898 2126 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) … … 2492 2720 if(pps->getSliceHeaderExtensionPresentFlag()) 2493 2721 { 2722 #if !H_MV_HLS7_GEN 2494 2723 READ_UVLC(uiCode,"slice_header_extension_length"); 2495 2496 2724 for(Int i=0; i<uiCode; i++) 2497 2725 { … … 2500 2728 } 2501 2729 } 2730 #else 2731 #if H_MV 2732 READ_UVLC( uiCode, "slice_segment_header_extension_length" ); rpcSlice->setSliceSegmentHeaderExtensionLength( uiCode ); 2733 UInt posFollSliceSegHeaderExtLen = m_pcBitstream->getNumBitsRead(); 2734 2735 if( rpcSlice->getPPS()->getPocResetInfoPresentFlag() ) 2736 { 2737 READ_CODE( 2, uiCode, "poc_reset_idc" ); rpcSlice->setPocResetIdc( uiCode ); 2738 } 2739 2740 if( rpcSlice->getPocResetIdc() != 0 ) 2741 { 2742 READ_CODE( 6, uiCode, "poc_reset_period_id" ); rpcSlice->setPocResetPeriodId( uiCode ); 2743 } 2744 2745 if( rpcSlice->getPocResetIdc() == 3 ) 2746 { 2747 READ_FLAG( uiCode, "full_poc_reset_flag" ); rpcSlice->setFullPocResetFlag( uiCode == 1 ); 2748 READ_CODE( rpcSlice->getPocLsbValLen() , uiCode, "poc_lsb_val" ); rpcSlice->setPocLsbVal( uiCode ); 2749 } 2750 2751 if( !rpcSlice->getPocMsbValRequiredFlag() && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() ) 2752 { 2753 READ_FLAG( uiCode, "poc_msb_val_present_flag" ); rpcSlice->setPocMsbValPresentFlag( uiCode == 1 ); 2754 } 2755 2756 if( rpcSlice->getPocMsbValPresentFlag() ) 2757 { 2758 READ_UVLC( uiCode, "poc_msb_val" ); rpcSlice->setPocMsbVal( uiCode ); 2759 } 2760 2761 while( ( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) < rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2762 { 2763 READ_FLAG( uiCode, "slice_segment_header_extension_data_bit" ); 2764 } 2765 assert( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) == rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2766 #else 2767 READ_UVLC( uiCode, "slice_header_extension_length" ); 2768 for(Int i=0; i<uiCode; i++) 2769 { 2770 UInt ignore; 2771 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 2772 } 2773 } 2774 #endif 2775 #endif 2776 2502 2777 2503 2778 m_pcBitstream->readByteAlignment(); -
branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r852 r854 37 37 38 38 #include "TDecCu.h" 39 39 40 //! \ingroup TLibDecoder 40 41 //! \{ … … 638 639 639 640 m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth ); 640 641 641 642 #if H_MV_ENC_DEC_TRAC 642 643 #if ENC_DEC_TRACE … … 927 928 } 928 929 #endif 929 930 930 931 #if H_3D && UPDATE_HM13 931 932 Bool useDltFlag = (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()); -
branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecGop.cpp
r852 r854 43 43 #include "libmd5/MD5.h" 44 44 #include "TLibCommon/SEI.h" 45 45 46 #include <time.h> 46 47 -
branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r852 r854 51 51 m_aaiCodedOffset = new Int* [ MAX_NUM_LAYERS ]; 52 52 m_aaiCodedScale = new Int* [ MAX_NUM_LAYERS ]; 53 #if !FIX_CAM_PARS_COLLECTOR 53 54 m_aiViewId = new Int [ MAX_NUM_LAYERS ]; 54 55 55 56 m_bViewReceived = new Bool [ MAX_NUM_LAYERS ]; 57 #endif 56 58 for( UInt uiId = 0; uiId < MAX_NUM_LAYERS; uiId++ ) 57 59 { … … 63 65 m_iLog2Precision = LOG2_DISP_PREC_LUT; 64 66 m_uiBitDepthForLUT = 8; // fixed 67 #if FIX_CAM_PARS_COLLECTOR 68 m_receivedIdc = NULL; 69 m_vps = NULL; 70 #endif 65 71 } 66 72 … … 74 80 delete [] m_aaiCodedOffset; 75 81 delete [] m_aaiCodedScale; 82 #if !FIX_CAM_PARS_COLLECTOR 76 83 delete [] m_aiViewId; 77 84 delete [] m_bViewReceived; 85 #endif 78 86 79 87 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 80 88 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 81 } 82 89 #if FIX_CAM_PARS_COLLECTOR 90 xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 ); 91 #endif 92 } 93 94 95 #if FIX_CAM_PARS_COLLECTOR 96 Void 97 CamParsCollector::init( FILE* pCodedScaleOffsetFile, TComVPS* vps) 98 { 99 assert( !isInitialized() ); // Only one initialization currently supported 100 m_bInitialized = true; 101 m_vps = vps; 102 m_bCamParsVaryOverTime = false; 103 m_pCodedScaleOffsetFile = pCodedScaleOffsetFile; 104 m_lastPoc = -1; 105 m_firstReceivedPoc = -2; 106 107 m_uiMaxViewIndex = -1; 108 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) 109 { 110 Int curViewIdx = m_vps->getViewIndex( m_vps->getLayerIdInNuh( i )); 111 m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->hasCamParInSliceHeader( curViewIdx ); 112 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx ) ; 113 } 114 115 assert( m_receivedIdc == NULL ); 116 m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1]; 117 for (Int i = 0; i <= m_uiMaxViewIndex; i++) 118 { 119 m_receivedIdc[i] = new Int[ m_uiMaxViewIndex + 1 ]; 120 } 121 122 xResetReceivedIdc( true ); 123 124 for (Int viewIndex = 0; viewIndex <= m_uiMaxViewIndex ; viewIndex++ ) 125 { 126 if (m_vps->getCamParPresent( viewIndex ) ) 127 { 128 if( !m_vps->hasCamParInSliceHeader( viewIndex ) ) 129 { 130 for (Int baseViewIndex = 0; baseViewIndex < viewIndex ; baseViewIndex++ ) 131 { 132 m_receivedIdc [ baseViewIndex ][ viewIndex ] = -1; 133 m_aaiCodedScale [ baseViewIndex ][ viewIndex ] = m_vps->getCodedScale (viewIndex) [ baseViewIndex ]; 134 m_aaiCodedOffset[ baseViewIndex ][ viewIndex ] = m_vps->getCodedOffset (viewIndex) [ baseViewIndex ]; 135 136 m_receivedIdc [ viewIndex ][ baseViewIndex ] = -1; 137 m_aaiCodedScale [ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedScale (viewIndex) [ baseViewIndex ]; 138 m_aaiCodedOffset[ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedOffset(viewIndex) [ baseViewIndex ]; 139 xInitLUTs( baseViewIndex, viewIndex, m_aaiCodedScale[ baseViewIndex ][ viewIndex ], m_aaiCodedOffset[ baseViewIndex ][ viewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 140 xInitLUTs( viewIndex, baseViewIndex, m_aaiCodedScale[ viewIndex ][ baseViewIndex ], m_aaiCodedOffset[ viewIndex ][ baseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 141 } 142 } 143 } 144 } 145 } 146 147 Void 148 CamParsCollector::xResetReceivedIdc( Bool overWriteFlag ) 149 { 150 for (Int i = 0; i <= m_uiMaxViewIndex; i++) 151 { 152 for (Int j = 0; j <= m_uiMaxViewIndex; j++) 153 { 154 if ( overWriteFlag || ( m_receivedIdc[i][j] != -1 ) ) 155 { 156 m_receivedIdc[i][j] = 0; 157 } 158 } 159 } 160 } 161 #else 83 162 Void 84 163 CamParsCollector::init( FILE* pCodedScaleOffsetFile ) … … 92 171 m_uiMaxViewIndex = 0; 93 172 } 173 #endif 174 175 94 176 95 177 Void … … 124 206 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 125 207 { 208 #if FIX_CAM_PARS_COLLECTOR 209 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 210 #else 126 211 Int iLog2DivLuma = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 212 #endif 127 213 Int iLog2DivChroma = iLog2DivLuma + 1; 128 214 … … 166 252 } 167 253 254 #if !FIX_CAM_PARS_COLLECTOR 168 255 Void 169 256 CamParsCollector::setSlice( TComSlice* pcSlice ) … … 284 371 } 285 372 373 #else 374 Void 375 CamParsCollector::setSlice( TComSlice* pcSlice ) 376 { 377 if( pcSlice == 0 ) 378 { 379 xOutput( m_lastPoc ); 380 return; 381 } 382 383 if ( pcSlice->getIsDepth()) 384 { 385 return; 386 } 387 388 Int curPoc = pcSlice->getPOC(); 389 if( m_firstReceivedPoc == -2 ) 390 { 391 m_firstReceivedPoc = curPoc; 392 } 393 394 Bool newPocFlag = ( m_lastPoc != curPoc ); 395 396 if ( newPocFlag ) 397 { 398 if( m_lastPoc != -1 ) 399 { 400 xOutput( m_lastPoc ); 401 } 402 403 xResetReceivedIdc( false ); 404 m_lastPoc = pcSlice->getPOC(); 405 } 406 407 UInt uiViewIndex = pcSlice->getViewIndex(); 408 if( m_vps->getCamParPresent( uiViewIndex ) ) 409 { 410 if( m_vps->hasCamParInSliceHeader( uiViewIndex ) ) // check consistency of slice parameters here 411 { 412 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ ) 413 { 414 if ( m_receivedIdc[ uiViewIndex ][ uiBaseViewIndex ] != 0 ) 415 { 416 AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] ); 417 AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] ); 418 } 419 else 420 { 421 m_receivedIdc [ uiViewIndex ][ uiBaseViewIndex ] = 1; 422 m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] = pcSlice->getInvCodedScale () [ uiBaseViewIndex ]; 423 m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] = pcSlice->getInvCodedOffset() [ uiBaseViewIndex ]; 424 xInitLUTs( uiViewIndex, uiBaseViewIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseViewIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 425 } 426 if ( m_receivedIdc[ uiBaseViewIndex ][ uiViewIndex ] != 0 ) 427 { 428 AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale () [ uiBaseViewIndex ] ); 429 AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset () [ uiBaseViewIndex ] ); 430 } 431 else 432 { 433 m_receivedIdc [ uiBaseViewIndex ][ uiViewIndex ] = 1; 434 m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] = pcSlice->getCodedScale () [ uiBaseViewIndex ]; 435 m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] = pcSlice->getCodedOffset () [ uiBaseViewIndex ]; 436 xInitLUTs( uiBaseViewIndex, uiViewIndex, m_aaiCodedScale[ uiBaseViewIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 437 } 438 } 439 } 440 } 441 } 442 #endif 443 444 286 445 #if H_3D_IV_MERGE 287 446 Void … … 295 454 #endif 296 455 456 #if !FIX_CAM_PARS_COLLECTOR 297 457 Bool 298 458 CamParsCollector::xIsComplete() … … 307 467 return true; 308 468 } 469 #endif 309 470 310 471 Void … … 313 474 if( m_pCodedScaleOffsetFile ) 314 475 { 476 #if FIX_CAM_PARS_COLLECTOR 477 if( iPOC == m_firstReceivedPoc ) 478 #else 315 479 if( iPOC == 0 ) 480 #endif 316 481 { 317 482 fprintf( m_pCodedScaleOffsetFile, "# ViewIndex ViewId\n" ); 318 483 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" ); 484 #if FIX_CAM_PARS_COLLECTOR 319 485 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ ) 320 486 { 487 fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) ); 488 #else 489 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ ) 490 { 321 491 fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_aiViewId[ uiViewIndex ] ); 492 #endif 322 493 } 323 494 fprintf( m_pCodedScaleOffsetFile, "\n\n"); … … 325 496 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" ); 326 497 } 498 #if FIX_CAM_PARS_COLLECTOR 499 if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime ) 500 #else 327 501 if( iPOC == 0 || m_bCamParsVaryOverTime ) 502 #endif 328 503 { 329 504 Int iS = iPOC; … … 335 510 if( uiViewIndex != uiBaseIndex ) 336 511 { 512 #if FIX_CAM_PARS_COLLECTOR 513 if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 ) 514 { 515 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 516 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() ); 517 } 518 #else 337 519 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 338 520 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_uiCamParsCodedPrecision ); 521 #endif 522 339 523 } 340 524 } … … 457 641 for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) 458 642 { 643 #if H_MV_HLS_7_SPS_P0155_16_32 644 numReorderPics[temporalLayer] = ( getLayerId() == 0 ) ? pcSlice->getSPS()->getNumReorderPics(temporalLayer) : pcSlice->getVPS()->getNumReorderPics(temporalLayer); 645 #else 459 646 numReorderPics[temporalLayer] = pcSlice->getSPS()->getNumReorderPics(temporalLayer); 460 } 461 647 #endif 648 } 649 #if H_MV_HLS_7_SPS_P0155_16_32 650 if ( getLayerId() == 0 ) 651 { 652 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer()); 653 } 654 else 655 { 656 m_iMaxRefPicNum = pcSlice->getVPS()->getMaxDecPicBuffering(pcSlice->getTLayer()); 657 #if H_MV_HLS7_GEN 658 TComVPS* vps = pcSlice->getVPS(); 659 TComDpbSize* dpbSize = vps->getDpbSize(); 660 Int lsIdx = vps->getLayerSetIdxForOutputLayerSet( getTargetOutputLayerSetIdx()); // Is this correct, seems to be missing in spec? 661 Int layerIdx = vps->getIdxInLayerSet ( lsIdx, getLayerId() ); 662 Int subDpbIdx = dpbSize->getSubDpbAssigned( lsIdx, layerIdx ); 663 m_iMaxRefPicNum = dpbSize->getMaxVpsDecPicBufferingMinus1(getTargetOutputLayerSetIdx(), subDpbIdx , vps->getSubLayersVpsMaxMinus1( vps->getLayerIdInVps( getLayerId() ) ) + 1 ) + 1 ; 664 #endif 665 } 666 #else 462 667 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer()); // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 668 #endif 463 669 if (m_cListPic.size() < (UInt)m_iMaxRefPicNum) 464 670 { -
branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecTop.h
r852 r854 71 71 ~CamParsCollector (); 72 72 73 #if FIX_CAM_PARS_COLLECTOR 74 Void init ( FILE* pCodedScaleOffsetFile, TComVPS* vps ); 75 #else 73 76 Void init ( FILE* pCodedScaleOffsetFile ); 77 #endif 78 74 79 Void uninit (); 75 80 Void setSlice ( TComSlice* pcSlice ); … … 85 90 Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];} 86 91 Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];} 87 UInt getCamParsCodedPrecision(){ return m_ uiCamParsCodedPrecision; }92 UInt getCamParsCodedPrecision(){ return m_vps->getCamParPrecision(); } 88 93 #endif 89 94 90 95 private: 96 #if FIX_CAM_PARS_COLLECTOR 97 Void xResetReceivedIdc( Bool overWriteFlag ); 98 #else 91 99 Bool xIsComplete (); 100 #endif 92 101 Void xOutput ( Int iPOC ); 93 102 … … 98 107 Int** m_aaiCodedOffset; 99 108 Int** m_aaiCodedScale; 109 110 #if !FIX_CAM_PARS_COLLECTOR 100 111 Int* m_aiViewId; 101 112 #else 113 TComVPS* m_vps; 114 Int** m_receivedIdc; 115 Int m_uiMaxViewIndex; 116 Int m_lastPoc; 117 Int m_firstReceivedPoc; 118 #endif 119 120 121 #if !FIX_CAM_PARS_COLLECTOR 102 122 Bool* m_bViewReceived; 103 123 UInt m_uiCamParsCodedPrecision; 124 #endif 104 125 Bool m_bCamParsVaryOverTime; 126 #if !FIX_CAM_PARS_COLLECTOR 105 127 Int m_iLastViewIndex; 106 128 Int m_iLastPOC; 107 129 UInt m_uiMaxViewIndex; 130 #endif 108 131 109 132 -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r852 r854 279 279 WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); 280 280 281 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 282 #if !H_MV 283 WRITE_FLAG( 0, "pps_extension_flag" ); 284 #else 285 WRITE_FLAG( 1, "pps_extension_flag" ); 286 287 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 288 { 289 WRITE_FLAG( pcPPS->getPpsExtensionTypeFlag( i ) ? 1 : 0 , "pps_extension_type_flag" ); 290 #if H_3D 291 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC ); 292 #else 293 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC ); 294 #endif 295 } 296 297 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 298 { 299 #if H_MV_HLS7_GEN 300 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 301 #endif 302 } 303 304 #if H_3D 305 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC 306 { 307 codePPSExtension( pcPPS ); 308 } 309 #endif 310 311 #endif 312 #else 281 313 #if !H_3D 282 314 WRITE_FLAG( 0, "pps_extension_flag" ); … … 285 317 codePPSExtension( pcPPS ); 286 318 WRITE_FLAG( 0, "pps_extension2_flag" ); 319 #endif 287 320 #endif 288 321 } … … 433 466 else 434 467 { 435 WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[ layerId]"); // num_entry468 WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[i]"); // num_entry 436 469 437 470 #if !H_3D_DELTA_DLT … … 699 732 #endif 700 733 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 701 734 #if H_MV_HLS_7_SPS_P0155_16_32 735 if ( pcSPS->getLayerId() == 0 ) 736 { 737 #endif 702 738 const Bool subLayerOrderingInfoPresentFlag = 1; 703 739 WRITE_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); … … 712 748 } 713 749 } 750 #if H_MV_HLS_7_SPS_P0155_16_32 751 } 752 #endif 753 714 754 assert( pcSPS->getMaxCUWidth() == pcSPS->getMaxCUHeight() ); 715 755 … … 838 878 WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" ); 839 879 WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" ); 880 #if H_MV_HLS_7_RESERVED_FLAGS 881 WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" ); 882 #endif 840 883 } 841 884 } … … 868 911 WRITE_FLAG( pcVPS->getTemporalNestingFlag(), "vps_temporal_id_nesting_flag" ); 869 912 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 870 #if H_MV 913 #if H_MV && !H_MV_HLS7_GEN 871 914 WRITE_CODE( 0xffff, 16, "vps_extension_offset" ); 872 915 #else … … 970 1013 { 971 1014 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1015 #if !H_MV_HLS7_GEN 972 1016 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 973 1017 if ( pcVPS->getVpsVuiPresentFlag() ) … … 975 1019 WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16, "vps_vui_offset" ); // TBD 976 1020 } 1021 #endif 1022 977 1023 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 978 1024 … … 1049 1095 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) 1050 1096 { 1051 for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )1097 for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1052 1098 { 1053 1099 WRITE_CODE( pcVPS->getSubLayersVpsMaxMinus1( i ), 3, "sub_layers_vps_max_minus1" ); … … 1057 1103 else 1058 1104 { 1059 for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )1105 for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1060 1106 { 1061 1107 assert( pcVPS->getSubLayersVpsMaxMinus1( i ) + 1 == pcVPS->getMaxTLayers( ) ); … … 1079 1125 1080 1126 WRITE_FLAG( pcVPS->getAllRefLayersActiveFlag( ) ? 1 : 0 , "all_ref_layers_active_flag" ); 1127 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1081 1128 WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( ) , 10, "vps_number_layer_sets_minus1" ); 1129 #endif 1130 1131 #if !H_MV_HLS7_GEN 1082 1132 WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6, "vps_num_profile_tier_level_minus1" ); 1133 #else 1134 WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" ); 1135 #endif 1083 1136 1084 1137 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1085 1138 { 1086 1139 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 1140 #if !H_MV_HLS_7_VPS_P0048_14 1087 1141 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1088 1142 { … … 1090 1144 pcVPS->checkProfileRefMinus1( i ); 1091 1145 } 1146 #endif 1092 1147 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1093 1148 } 1094 1149 1150 1151 1152 1153 1154 1155 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1156 WRITE_UVLC( pcVPS->getNumAddOutputLayerSets( ), "num_add_output_layer_sets" ); 1157 1158 if( pcVPS->getNumOutputLayerSets() > 1) 1159 { 1160 WRITE_CODE( pcVPS->getDefaultTargetOutputLayerIdc( ), 2, "default_target_output_layer_idc" ); 1161 } 1162 #else 1095 1163 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 1096 1164 … … 1108 1176 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1109 1177 } 1178 #endif 1110 1179 1111 1180 assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); 1112 1181 assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 ); 1182 1183 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1184 1185 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1186 { 1187 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1188 #else 1113 1189 for( Int i = 1; i < numOutputLayerSets; i++ ) 1114 1190 { 1115 1191 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) ) 1192 #endif 1116 1193 { 1117 1194 WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" ); 1195 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1196 } 1197 1198 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultTargetOutputLayerIdc() == 2 ) 1199 { 1200 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ); j++ ) 1201 { 1202 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" ); 1203 } 1204 } 1205 else 1206 { 1207 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ) - 1; j++ ) 1208 { 1209 assert( pcVPS->getOutputLayerFlag( i , j ) == pcVPS->inferOutputLayerFlag( i, j )); 1210 } 1211 } 1212 1213 #else 1118 1214 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ ) 1119 1215 { … … 1129 1225 } 1130 1226 } 1131 1227 #endif 1132 1228 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1133 1229 { 1134 1230 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 1135 1231 } 1232 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1233 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1234 { 1235 WRITE_FLAG( pcVPS->getAltOutputLayerFlag( i ) ? 1 : 0 , "alt_output_layer_flag[ i ]" ); 1236 } 1237 } 1238 #else 1136 1239 } 1137 1240 … … 1140 1243 WRITE_FLAG( pcVPS->getAltOutputLayerFlag( ) ? 1 : 0 , "alt_output_layer_flag" ); 1141 1244 } 1245 #endif 1246 1247 1248 1249 1142 1250 1143 1251 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1144 1252 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1145 1253 { 1254 #if H_MV_HLS7_GEN 1255 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" ); 1256 #else 1146 1257 WRITE_CODE( pcVPS->getVpsNumRepFormatsMinus1( ), 4, "vps_num_rep_formats_minus1" ); 1258 #endif 1147 1259 } 1148 1260 … … 1166 1278 1167 1279 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); 1280 #if H_MV_HLS7_GEN 1281 WRITE_FLAG( pcVPS->getVpsPocLsbAlignedFlag( ) ? 1 : 0 , "vps_poc_lsb_aligned_flag" ); 1282 #endif 1168 1283 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1169 1284 { … … 1173 1288 } 1174 1289 } 1290 #if H_MV_HLS_7_RESERVED_FLAGS 1291 WRITE_FLAG( 0, "vps_reserved_zero_flag" ); 1292 #endif 1175 1293 codeDpbSize( pcVPS ); 1176 1294 … … 1202 1320 } 1203 1321 } 1322 #if H_MV_HLS7_GEN 1323 WRITE_UVLC( 0, "vps_non_vui_extension_length" ); 1324 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1325 #endif 1326 #if !H_MV_HLS_7_RESERVED_FLAGS 1204 1327 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" ); 1205 1328 #endif 1206 1329 if( pcVPS->getVpsVuiPresentFlag() ) 1207 1330 { … … 1209 1332 codeVPSVUI( pcVPS ); 1210 1333 } 1334 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1335 { 1336 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1337 assert( pcVPSVUI ); 1338 pcVPSVUI->inferVpsVui( true ); 1339 } 1340 #endif 1211 1341 } 1212 1342 Void TEncCavlc::codeVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) … … 1228 1358 { 1229 1359 WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" ); 1230 1360 #if H_MV_HLS_7_HRD_P0156_7 1361 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1362 #else 1231 1363 for( Int j = 0; j <= vps->getMaxTLayers() - 1 ; j++ ) 1364 #endif 1232 1365 { 1233 1366 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1237 1370 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1238 1371 { 1372 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1373 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1374 #else 1239 1375 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) // Preliminary fix does not match with spec 1376 #endif 1240 1377 { 1241 1378 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" ); 1242 1379 } 1243 1380 WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" ); 1381 #if H_MV_HLS7_GEN 1382 if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) ) 1383 { 1384 for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1385 { 1386 WRITE_UVLC( dpbSize->getMaxVpsLayerDecPicBuffMinus1( i, k, j ), "max_vps_layer_dec_pic_buff_minus1" ); 1387 } 1388 } 1389 #endif 1244 1390 WRITE_UVLC( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ), "max_vps_latency_increase_plus1" ); 1245 1391 } … … 1248 1394 if ( j > 0 ) 1249 1395 { 1396 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1397 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1398 #else 1250 1399 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1400 #endif 1251 1401 { 1252 1402 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1300 1450 WRITE_FLAG( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1301 1451 } 1302 1452 #if H_MV_HLS_7_MISC_P0068_21 1453 if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ) 1454 { 1455 WRITE_FLAG( pcVPSVUI->getAllLayersIdrAlignedFlag( ) ? 1 : 0 , "all_layers_idr_aligned_flag" ); 1456 } 1457 #endif 1303 1458 WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" ); 1304 1459 WRITE_FLAG( pcVPSVUI->getPicRatePresentVpsFlag( ) ? 1 : 0 , "pic_rate_present_vps_flag" ); 1305 1460 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1306 1461 { 1462 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1463 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1464 #else 1307 1465 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ ) 1466 #endif 1308 1467 { 1309 1468 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) … … 1331 1490 } 1332 1491 1492 #if H_MV_HLS_7_VPS_P0076_15 1493 WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" ); 1494 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) 1495 { 1496 WRITE_CODE( pcVPSVUI->getVpsNumVideoSignalInfoMinus1( ), 4, "vps_num_video_signal_info_minus1" ); 1497 } 1498 else 1499 { 1500 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1501 } 1502 1503 for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ ) 1504 { 1505 assert( pcVPSVUI->getVideoSignalInfo( i ) != NULL ); 1506 TComVideoSignalInfo* curVideoSignalInfo = pcVPSVUI->getVideoSignalInfo( i ); 1507 codeVideoSignalInfo( curVideoSignalInfo ); 1508 1509 } 1510 1511 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1512 { 1513 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1514 { 1515 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" ); 1516 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() ); 1517 } 1518 } 1519 else 1520 { 1521 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1522 { 1523 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) ); 1524 } 1525 } 1526 #endif 1333 1527 WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" ); 1334 1528 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1365 1559 } 1366 1560 } 1561 #if H_MV_HLS_7_RESERVED_FLAGS 1562 WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" ); 1563 #endif 1367 1564 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1368 1565 … … 1385 1582 } 1386 1583 } 1584 1585 #if !H_MV_HLS_7_VPS_P0076_15 1387 1586 WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" ); 1388 1587 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1417 1616 } 1418 1617 } 1618 #endif 1419 1619 WRITE_FLAG( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ? 1 : 0 , "vps_vui_bsp_hrd_present_flag" ); 1420 1620 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1422 1622 codeVpsVuiBspHrdParameters( pcVPS ); 1423 1623 } 1424 } 1624 #if H_MV_HLS_7_MISC_P0182_13 1625 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1626 { 1627 if( pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i )) == 0 ) 1628 { 1629 WRITE_FLAG( pcVPSVUI->getBaseLayerParameterSetCompatibilityFlag( i ) ? 1 : 0 , "base_layer_parameter_set_compatibility_flag" ); 1630 } 1631 } 1632 #endif 1633 } 1634 1425 1635 Void TEncCavlc::codeVpsVuiBspHrdParameters( TComVPS* pcVPS ) 1426 1636 { … … 1638 1848 } 1639 1849 pcSlice->checkCrossLayerBlaFlag( ); 1640 1850 #if !H_MV_HLS7_GEN 1641 1851 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1642 1852 { … … 1644 1854 WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" ); 1645 1855 } 1856 #endif 1646 1857 1647 1858 … … 2023 2234 #endif 2024 2235 2236 #if !H_MV_HLS7_GEN 2025 2237 #if PPS_FIX_DEPTH 2026 2238 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag() || pcSlice->getIsDepth() ) … … 2031 2243 WRITE_UVLC(0,"slice_header_extension_length"); 2032 2244 } 2245 #endif 2246 2247 #if H_MV_HLS7_GEN 2248 #if !H_MV 2249 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 2250 { 2251 WRITE_UVLC(0,"slice_header_extension_length"); 2252 } 2253 #else 2254 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 2255 { 2256 WRITE_UVLC( pcSlice->getSliceSegmentHeaderExtensionLength( ), "slice_segment_header_extension_length" ); 2257 UInt posFollSliceSegHeaderExtLen = m_pcBitIf->getNumberOfWrittenBits(); 2258 if( pcSlice->getPPS()->getPocResetInfoPresentFlag() ) 2259 { 2260 WRITE_CODE( pcSlice->getPocResetIdc( ), 2, "poc_reset_idc" ); 2261 } 2262 2263 if( pcSlice->getPocResetIdc() != 0 ) 2264 { 2265 WRITE_CODE( pcSlice->getPocResetPeriodId( ), 6, "poc_reset_period_id" ); 2266 } 2267 2268 if( pcSlice->getPocResetIdc() == 3 ) 2269 { 2270 WRITE_FLAG( pcSlice->getFullPocResetFlag( ) ? 1 : 0 , "full_poc_reset_flag" ); 2271 WRITE_CODE( pcSlice->getPocLsbVal( ), getPocLsbValLen ), "poc_lsb_val" ); 2272 } 2273 2274 if( !pcSlice->getPocMsbValRequiredFlag() && pcSlice->getVPS()->getVpsPocLsbAlignedFlag() ) 2275 { 2276 WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" ); 2277 } 2278 2279 if( pcSlice->getPocMsbValPresentFlag() ) 2280 { 2281 WRITE_UVLC( pcSlice->getPocMsbVal( ), "poc_msb_val" ); 2282 } 2283 2284 while( ( m_pcBitIf->getNumberOfWrittenBits() - posFollSliceSegHeaderExtLen ) < pcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2285 { 2286 WRITE_FLAG( 0, "slice_segment_header_extension_data_bit" ); 2287 } 2288 2289 assert( m_pcBitIf->getNumberOfWrittenBits() - posFollSliceSegHeaderExtLen ) == pcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2290 #endif 2291 2292 #endif 2033 2293 } 2034 2294 -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r852 r854 40 40 #include "TEncCu.h" 41 41 #include "TEncAnalyze.h" 42 42 43 #include <cmath> 43 44 #include <algorithm> … … 421 422 // get Original YUV data from picture 422 423 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); 423 424 424 425 #if H_3D_QTLPC 425 426 Bool bTrySplit = true; … … 1198 1199 if(bInSlice && ( pcSubBestPartCU->getCUPelX() < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 1199 1200 { 1200 if ( 0 == uiPartUnitIdx) //initialize RD with previous depth buffer1201 {1202 m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]);1203 }1204 else1205 {1206 m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]);1207 }1201 if ( 0 == uiPartUnitIdx) //initialize RD with previous depth buffer 1202 { 1203 m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]); 1204 } 1205 else 1206 { 1207 m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]); 1208 } 1208 1209 1209 1210 #if AMP_ENC_SPEEDUP … … 1236 1237 1237 1238 rpcTempCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // split bits 1238 rpcTempCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();1239 }1239 rpcTempCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); 1240 } 1240 1241 #if H_3D_VSO // M10 1241 1242 if ( m_pcRdCost->getUseVSO() ) … … 1243 1244 else 1244 1245 #endif 1245 1246 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1246 1247 1247 1248 if( (g_uiMaxCUWidth>>uiDepth) == rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() && rpcTempCU->getSlice()->getPPS()->getUseDQP()) … … 1251 1252 { 1252 1253 if( ( pcPic->getCU( rpcTempCU->getAddr() )->getSliceSegmentStartCU(uiBlkIdx+rpcTempCU->getZorderIdxInCU()) == rpcTempCU->getSlice()->getSliceSegmentCurStartCUAddr() ) && 1253 ( rpcTempCU->getCbf( uiBlkIdx, TEXT_LUMA ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_U ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_V ) ) )1254 ( rpcTempCU->getCbf( uiBlkIdx, TEXT_LUMA ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_U ) || rpcTempCU->getCbf( uiBlkIdx, TEXT_CHROMA_V ) ) ) 1254 1255 { 1255 1256 hasResidual = true; … … 1273 1274 m_pcEntropyCoder->encodeQP( rpcTempCU, uiTargetPartIdx, false ); 1274 1275 rpcTempCU->getTotalBits() += m_pcEntropyCoder->getNumberOfWrittenBits(); // dQP bits 1275 rpcTempCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();1276 rpcTempCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded(); 1276 1277 #if H_3D_VSO // M11 1277 1278 if ( m_pcRdCost->getUseLambdaScaleVSO()) … … 1279 1280 else 1280 1281 #endif 1281 1282 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1282 1283 #endif 1283 1284 … … 1292 1293 } 1293 1294 1294 m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);1295 m_pppcRDSbacCoder[uhNextDepth][CI_NEXT_BEST]->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 1295 1296 Bool isEndOfSlice = rpcBestCU->getSlice()->getSliceMode()==FIXED_NUMBER_OF_BYTES 1296 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceArgument()<<3);1297 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceArgument()<<3); 1297 1298 Bool isEndOfSliceSegment = rpcBestCU->getSlice()->getSliceSegmentMode()==FIXED_NUMBER_OF_BYTES 1298 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceSegmentArgument()<<3);1299 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceSegmentArgument()<<3); 1299 1300 if(isEndOfSlice||isEndOfSliceSegment) 1300 1301 { … … 1303 1304 xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth); // RD compare current larger prediction 1304 1305 } // with sub partitioned prediction. 1305 }1306 } 1306 1307 1307 1308 #if H_3D_VSO // M12 … … 1786 1787 #endif 1787 1788 #if H_3D_ARP 1788 1789 #else 1790 1789 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui ) 1790 #else 1791 for( UInt ui = 0; ui < numValidMergeCand; ++ui ) 1791 1792 #endif 1792 1793 { … … 1861 1862 #endif 1862 1863 1863 1864 1865 1866 1864 for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual ) 1865 { 1866 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) 1867 { 1867 1868 #if H_3D_IC 1868 1869 if( rpcTempCU->getSlice()->getApplyIC() && rpcTempCU->getSlice()->getIcSkipParseFlag() ) … … 1876 1877 if(!(uiNoResidual==1 && mergeCandBuffer[uiMergeCand]==1)) 1877 1878 { 1878 if( !(bestIsSkip && uiNoResidual == 0) ) 1879 if( !(bestIsSkip && uiNoResidual == 0) ) 1880 { 1881 // set MC parameters 1882 rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth ); // interprets depth relative to LCU level 1883 rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth ); 1884 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level 1885 #if H_3D_IC 1886 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth ); 1887 #endif 1888 #if H_3D_ARP 1889 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth ); 1890 #endif 1891 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to LCU level 1892 rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to LCU level 1893 #if H_3D_VSP 1894 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); 1895 rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth ); 1896 #endif 1897 #if MTK_DDD_G0063 1898 if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand ) 1879 1899 { 1880 // set MC parameters1881 rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth ); // interprets depth relative to LCU level1882 rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag, 0, uhDepth );1883 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level1884 #if H_3D_IC1885 rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth );1886 #endif1887 #if H_3D_ARP1888 rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );1889 #endif1890 rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to LCU level1891 rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to LCU level1892 #if H_3D_VSP1893 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );1894 rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );1895 #endif1896 #if MTK_DDD_G00631897 if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand )1898 {1899 1900 rpcTempCU->setUseDDD( true, 0, 0, uhDepth ); 1900 1901 rpcTempCU->setDDDepthSubParts( ucDDDepth, 0, 0, uhDepth ); 1902 } 1903 else 1904 { 1905 rpcTempCU->setUseDDD( false, 0, 0, uhDepth ); 1906 } 1907 #endif 1908 #if H_3D_SPIVMP 1909 rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth); 1910 if (bSPIVMPFlag[uiMergeCand]) 1911 { 1912 UInt uiSPAddr; 1913 Int iWidth = rpcTempCU->getWidth(0); 1914 Int iHeight = rpcTempCU->getHeight(0); 1915 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 1916 rpcTempCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 1917 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 1918 { 1919 rpcTempCU->getSPAbsPartIdx(0, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 1920 rpcTempCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight); 1921 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(rpcTempCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 1922 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(rpcTempCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 1923 } 1924 } 1925 else 1926 #endif 1927 #if NTT_STORE_SPDV_VSP_G0148 1928 { 1929 if ( vspFlag[uiMergeCand] ) 1930 { 1931 UInt partAddr; 1932 Int vspSize; 1933 Int width, height; 1934 rpcTempCU->getPartIndexAndSize( 0, partAddr, width, height ); 1935 if( uhInterDirNeighbours[ uiMergeCand ] & 0x01 ) 1936 { 1937 rpcTempCU->setMvFieldPUForVSP( rpcTempCU, partAddr, width, height, REF_PIC_LIST_0, cMvFieldNeighbours[ 2*uiMergeCand + 0 ].getRefIdx(), vspSize ); 1938 rpcTempCU->setVSPFlag( partAddr, vspSize ); 1901 1939 } 1902 1940 else 1903 1941 { 1904 rpcTempCU-> setUseDDD( false, 0, 0, uhDepth );1942 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1905 1943 } 1906 #endif 1907 #if H_3D_SPIVMP 1908 rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth); 1909 if (bSPIVMPFlag[uiMergeCand]) 1944 if( uhInterDirNeighbours[ uiMergeCand ] & 0x02 ) 1910 1945 { 1911 UInt uiSPAddr; 1912 Int iWidth = rpcTempCU->getWidth(0); 1913 Int iHeight = rpcTempCU->getHeight(0); 1914 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 1915 rpcTempCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 1916 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 1917 { 1918 rpcTempCU->getSPAbsPartIdx(0, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 1919 rpcTempCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight); 1920 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(rpcTempCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 1921 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(rpcTempCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 1922 } 1946 rpcTempCU->setMvFieldPUForVSP( rpcTempCU, partAddr, width, height, REF_PIC_LIST_1 , cMvFieldNeighbours[ 2*uiMergeCand + 1 ].getRefIdx(), vspSize ); 1947 rpcTempCU->setVSPFlag( partAddr, vspSize ); 1923 1948 } 1924 1949 else 1925 #endif 1950 { 1951 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1952 } 1953 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level 1954 } 1955 else 1956 { 1957 #endif 1958 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level 1959 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1960 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level 1926 1961 #if NTT_STORE_SPDV_VSP_G0148 1962 } 1963 } 1964 #endif 1965 // do MC 1966 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 1967 // estimate residual and encode everything 1968 #if H_3D_VSO //M2 1969 if( m_pcRdCost->getUseRenModel() ) 1970 { //Reset 1971 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth (); 1972 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight (); 1973 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr (); 1974 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride (); 1975 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1976 } 1977 #endif 1978 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, 1979 m_ppcOrigYuv [uhDepth], 1980 m_ppcPredYuvTemp[uhDepth], 1981 m_ppcResiYuvTemp[uhDepth], 1982 m_ppcResiYuvBest[uhDepth], 1983 m_ppcRecoYuvTemp[uhDepth], 1984 (uiNoResidual? true:false)); 1985 1986 1987 if ( uiNoResidual == 0 && rpcTempCU->getQtRootCbf(0) == 0 ) 1988 { 1989 // If no residual when allowing for one, then set mark to not try case where residual is forced to 0 1990 mergeCandBuffer[uiMergeCand] = 1; 1991 } 1992 1993 rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth ); 1994 #if NTT_STORE_SPDV_VSP_G0148 // possible bug fix 1995 if( rpcTempCU->getSkipFlag(0) ) 1996 { 1997 rpcTempCU->setTrIdxSubParts(0, 0, uhDepth); 1998 } 1999 #endif 2000 #if H_3D_INTER_SDC 2001 TComDataCU *rpcTempCUPre = rpcTempCU; 2002 #endif 2003 Int orgQP = rpcTempCU->getQP( 0 ); 2004 xCheckDQP( rpcTempCU ); 2005 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth); 2006 #if H_3D_INTER_SDC 2007 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual ) 2008 { 2009 #if SEC_INTER_SDC_G0101 2010 for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ ) 1927 2011 { 1928 if ( vspFlag[uiMergeCand] )1929 {1930 UInt partAddr;1931 Int vspSize;1932 Int width, height;1933 rpcTempCU->getPartIndexAndSize( 0, partAddr, width, height );1934 if( uhInterDirNeighbours[ uiMergeCand ] & 0x01 )1935 {1936 rpcTempCU->setMvFieldPUForVSP( rpcTempCU, partAddr, width, height, REF_PIC_LIST_0, cMvFieldNeighbours[ 2*uiMergeCand + 0 ].getRefIdx(), vspSize );1937 rpcTempCU->setVSPFlag( partAddr, vspSize );1938 }1939 else1940 {1941 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level1942 }1943 if( uhInterDirNeighbours[ uiMergeCand ] & 0x02 )1944 {1945 rpcTempCU->setMvFieldPUForVSP( rpcTempCU, partAddr, width, height, REF_PIC_LIST_1 , cMvFieldNeighbours[ 2*uiMergeCand + 1 ].getRefIdx(), vspSize );1946 rpcTempCU->setVSPFlag( partAddr, vspSize );1947 }1948 else1949 {1950 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level1951 }1952 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level1953 }1954 else1955 {1956 #endif1957 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level1958 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level1959 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level1960 #if NTT_STORE_SPDV_VSP_G01481961 }1962 }1963 #endif1964 // do MC1965 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );1966 // estimate residual and encode everything1967 #if H_3D_VSO //M21968 if( m_pcRdCost->getUseRenModel() )1969 { //Reset1970 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth ();1971 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight ();1972 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr ();1973 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride ();1974 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );1975 }1976 #endif1977 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU,1978 m_ppcOrigYuv [uhDepth],1979 m_ppcPredYuvTemp[uhDepth],1980 m_ppcResiYuvTemp[uhDepth],1981 m_ppcResiYuvBest[uhDepth],1982 m_ppcRecoYuvTemp[uhDepth],1983 (uiNoResidual? true:false));1984 1985 1986 if ( uiNoResidual == 0 && rpcTempCU->getQtRootCbf(0) == 0 )1987 {1988 // If no residual when allowing for one, then set mark to not try case where residual is forced to 01989 mergeCandBuffer[uiMergeCand] = 1;1990 }1991 1992 rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );1993 #if NTT_STORE_SPDV_VSP_G0148 // possible bug fix1994 if( rpcTempCU->getSkipFlag(0) )1995 {1996 rpcTempCU->setTrIdxSubParts(0, 0, uhDepth);1997 }1998 #endif1999 #if H_3D_INTER_SDC2000 TComDataCU *rpcTempCUPre = rpcTempCU;2001 #endif2002 Int orgQP = rpcTempCU->getQP( 0 );2003 xCheckDQP( rpcTempCU );2004 xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);2005 #if H_3D_INTER_SDC2006 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual )2007 {2008 #if SEC_INTER_SDC_G01012009 for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )2010 {2011 if( rpcTempCU != rpcTempCUPre )2012 {2013 rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag );2014 rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth );2015 }2016 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );2017 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );2018 rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth );2019 #if H_3D_VSO //M22020 if( m_pcRdCost->getUseRenModel() )2021 { //Reset2022 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth ();2023 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight ();2024 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr ();2025 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride ();2026 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );2027 }2028 #endif2029 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU,2030 m_ppcOrigYuv[uhDepth],2031 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],2032 m_ppcResiYuvTemp[uhDepth],2033 m_ppcRecoYuvTemp[uhDepth],2034 uiOffest,2035 uhDepth );2036 2037 xCheckDQP( rpcTempCU );2038 xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );2039 }2040 #else2041 2012 if( rpcTempCU != rpcTempCUPre ) 2042 2013 { … … 2061 2032 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 2062 2033 m_ppcResiYuvTemp[uhDepth], 2063 m_ppcRecoYuvTemp[uhDepth], 2034 m_ppcRecoYuvTemp[uhDepth], 2035 uiOffest, 2064 2036 uhDepth ); 2065 2037 2066 2038 xCheckDQP( rpcTempCU ); 2067 2039 xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth ); 2068 #endif2069 2040 } 2070 #endif 2071 rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag ); 2072 2073 if( m_pcEncCfg->getUseFastDecisionForMerge() && !bestIsSkip ) 2041 #else 2042 if( rpcTempCU != rpcTempCUPre ) 2074 2043 { 2044 rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag ); 2045 rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth ); 2046 } 2047 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2048 rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth ); 2049 rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth ); 2050 #if H_3D_VSO //M2 2051 if( m_pcRdCost->getUseRenModel() ) 2052 { //Reset 2053 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth (); 2054 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight (); 2055 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr (); 2056 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride (); 2057 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2058 } 2059 #endif 2060 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 2061 m_ppcOrigYuv[uhDepth], 2062 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 2063 m_ppcResiYuvTemp[uhDepth], 2064 m_ppcRecoYuvTemp[uhDepth], 2065 uhDepth ); 2066 2067 xCheckDQP( rpcTempCU ); 2068 xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth ); 2069 #endif 2070 } 2071 #endif 2072 rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag ); 2073 2074 if( m_pcEncCfg->getUseFastDecisionForMerge() && !bestIsSkip ) 2075 { 2075 2076 #if H_3D_INTER_SDC 2076 2077 2078 2079 2080 2081 2082 #endif 2083 2077 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) ) 2078 { 2079 bestIsSkip = !rpcBestCU->getSDCFlag( 0 ) && ( rpcBestCU->getQtRootCbf(0) == 0 ); 2080 } 2081 else 2082 { 2083 #endif 2084 bestIsSkip = rpcBestCU->getQtRootCbf(0) == 0; 2084 2085 #if H_3D_INTER_SDC 2085 } 2086 #endif 2087 } 2086 } 2087 #endif 2088 } 2089 } 2090 } 2091 } 2092 2093 if(uiNoResidual == 0 && m_pcEncCfg->getUseEarlySkipDetection()) 2094 { 2095 if(rpcBestCU->getQtRootCbf( 0 ) == 0) 2096 { 2097 if( rpcBestCU->getMergeFlag( 0 )) 2098 { 2099 *earlyDetectionSkipMode = true; 2100 } 2101 else 2102 { 2103 Int absoulte_MV=0; 2104 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 2105 { 2106 if ( rpcBestCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 2107 { 2108 TComCUMvField* pcCUMvField = rpcBestCU->getCUMvField(RefPicList( uiRefListIdx )); 2109 Int iHor = pcCUMvField->getMvd( 0 ).getAbsHor(); 2110 Int iVer = pcCUMvField->getMvd( 0 ).getAbsVer(); 2111 absoulte_MV+=iHor+iVer; 2088 2112 } 2089 2113 } 2090 } 2091 2092 if(uiNoResidual == 0 && m_pcEncCfg->getUseEarlySkipDetection()) 2093 { 2094 if(rpcBestCU->getQtRootCbf( 0 ) == 0) 2114 2115 if(absoulte_MV == 0) 2095 2116 { 2096 if( rpcBestCU->getMergeFlag( 0 )) 2097 { 2098 *earlyDetectionSkipMode = true; 2099 } 2100 else 2101 { 2102 Int absoulte_MV=0; 2103 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 2104 { 2105 if ( rpcBestCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 2106 { 2107 TComCUMvField* pcCUMvField = rpcBestCU->getCUMvField(RefPicList( uiRefListIdx )); 2108 Int iHor = pcCUMvField->getMvd( 0 ).getAbsHor(); 2109 Int iVer = pcCUMvField->getMvd( 0 ).getAbsVer(); 2110 absoulte_MV+=iHor+iVer; 2111 } 2112 } 2113 2114 if(absoulte_MV == 0) 2115 { 2116 *earlyDetectionSkipMode = true; 2117 } 2118 } 2117 *earlyDetectionSkipMode = true; 2119 2118 } 2120 2119 } 2121 2120 } 2121 } 2122 } 2122 2123 #if H_3D_SPIVMP 2123 2124 2124 delete[] pcMvFieldSP; 2125 delete[] puhInterDirSP; 2125 2126 #endif 2126 2127 #if H_3D_ARP 2127 2128 } 2128 2129 #endif 2129 2130 } -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r852 r854 49 49 #include <time.h> 50 50 #include <math.h> 51 51 52 using namespace std; 52 53 //! \ingroup TLibEncoder -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
r852 r854 41 41 #include <stdio.h> 42 42 #include <math.h> 43 43 44 //! \ingroup TLibEncoder 44 45 //! \{ -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r852 r854 3950 3950 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx ); 3951 3951 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx ); 3952 3952 3953 #if NTT_STORE_SPDV_VSP_G0148 3953 3954 } … … 4042 4043 m_cYuvPredTemp.clear(); 4043 4044 rpcPredYuv->clear(); 4044 4045 4045 4046 if ( !bUseRes ) 4046 4047 { 4047 4048 rpcResiYuv->clear(); 4048 4049 } 4049 4050 4050 4051 rpcRecoYuv->clear(); 4051 4052 4052 4053 TComMv cMvSrchRngLT; 4053 4054 TComMv cMvSrchRngRB; 4054 4055 4055 4056 TComMv cMvZero; 4056 4057 TComMv TempMv; //kolya 4057 4058 4058 4059 TComMv cMv[2]; 4059 4060 TComMv cMvBi[2]; 4060 4061 TComMv cMvTemp[2][33]; 4061 4062 4062 4063 Int iNumPart = pcCU->getNumPartInter(); 4063 4064 Int iNumPredDir = pcCU->getSlice()->isInterP() ? 1 : 2; 4064 4065 4065 4066 TComMv cMvPred[2][33]; 4066 4067 4067 4068 TComMv cMvPredBi[2][33]; 4068 4069 Int aaiMvpIdxBi[2][33]; 4069 4070 4070 4071 Int aaiMvpIdx[2][33]; 4071 4072 Int aaiMvpNum[2][33]; 4072 4073 4073 4074 AMVPInfo aacAMVPInfo[2][33]; 4074 4075 4075 4076 Int iRefIdx[2]={0,0}; //If un-initialized, may cause SEGV in bi-directional prediction iterative stage. 4076 4077 Int iRefIdxBi[2]; 4077 4078 4078 4079 UInt uiPartAddr; 4079 4080 Int iRoiWidth, iRoiHeight; 4080 4081 4081 4082 UInt uiMbBits[3] = {1, 1, 0}; 4082 4083 4083 4084 UInt uiLastMode = 0; 4084 4085 Int iRefStart, iRefEnd; 4085 4086 4086 4087 PartSize ePartSize = pcCU->getPartitionSize( 0 ); 4087 4088 … … 4110 4111 UInt uiCostBi = MAX_UINT; 4111 4112 UInt uiCostTemp; 4112 4113 4113 4114 UInt uiBits[3]; 4114 4115 UInt uiBitsTemp; … … 4135 4136 4136 4137 xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits); 4137 4138 4138 4139 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight ); 4139 4140 … … 4141 4142 pcCU->setVSPFlagSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) ); 4142 4143 #endif 4143 4144 4144 4145 #if AMP_MRG 4145 4146 Bool bTestNormalMC = true; … … 4152 4153 bTestNormalMC = false; 4153 4154 } 4154 4155 4155 4156 if (bTestNormalMC) 4156 4157 { 4157 4158 #endif 4158 4159 4159 // Uni-directional prediction 4160 for ( Int iRefList = 0; iRefList < iNumPredDir; iRefList++ ) 4161 { 4160 // Uni-directional prediction 4161 for ( Int iRefList = 0; iRefList < iNumPredDir; iRefList++ ) 4162 { 4163 RefPicList eRefPicList = ( iRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0 ); 4164 4165 for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ ) 4166 { 4167 uiBitsTemp = uiMbBits[iRefList]; 4168 if ( pcCU->getSlice()->getNumRefIdx(eRefPicList) > 1 ) 4169 { 4170 uiBitsTemp += iRefIdxTemp+1; 4171 if ( iRefIdxTemp == pcCU->getSlice()->getNumRefIdx(eRefPicList)-1 ) uiBitsTemp--; 4172 } 4173 #if ZERO_MVD_EST 4174 xEstimateMvPredAMVP( pcCU, pcOrgYuv, iPartIdx, eRefPicList, iRefIdxTemp, cMvPred[iRefList][iRefIdxTemp], false, &biPDistTemp, &uiZeroMvdDistTemp); 4175 #else 4176 xEstimateMvPredAMVP( pcCU, pcOrgYuv, iPartIdx, eRefPicList, iRefIdxTemp, cMvPred[iRefList][iRefIdxTemp], false, &biPDistTemp); 4177 #endif 4178 aaiMvpIdx[iRefList][iRefIdxTemp] = pcCU->getMVPIdx(eRefPicList, uiPartAddr); 4179 aaiMvpNum[iRefList][iRefIdxTemp] = pcCU->getMVPNum(eRefPicList, uiPartAddr); 4180 4181 if(pcCU->getSlice()->getMvdL1ZeroFlag() && iRefList==1 && biPDistTemp < bestBiPDist) 4182 { 4183 bestBiPDist = biPDistTemp; 4184 bestBiPMvpL1 = aaiMvpIdx[iRefList][iRefIdxTemp]; 4185 bestBiPRefIdxL1 = iRefIdxTemp; 4186 } 4187 4188 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdx[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 4189 #if ZERO_MVD_EST 4190 if ( iRefList == 0 || pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) < 0 ) 4191 { 4192 uiZeroMvdBitsTemp = uiBitsTemp; 4193 uiZeroMvdBitsTemp += 2; //zero mvd bits 4194 4195 m_pcRdCost->getMotionCost( 1, 0 ); 4196 uiZeroMvdCostTemp = uiZeroMvdDistTemp + m_pcRdCost->getCost(uiZeroMvdBitsTemp); 4197 4198 if (uiZeroMvdCostTemp < uiZeroMvdCost) 4199 { 4200 uiZeroMvdCost = uiZeroMvdCostTemp; 4201 iZeroMvdDir = iRefList + 1; 4202 aiZeroMvdRefIdx[iRefList] = iRefIdxTemp; 4203 aiZeroMvdMvpIdx[iRefList] = aaiMvpIdx[iRefList][iRefIdxTemp]; 4204 auiZeroMvdBits[iRefList] = uiZeroMvdBitsTemp; 4205 } 4206 } 4207 #endif 4208 4209 #if GPB_SIMPLE_UNI 4210 if ( iRefList == 1 ) // list 1 4211 { 4212 if ( pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) >= 0 ) 4213 { 4214 cMvTemp[1][iRefIdxTemp] = cMvTemp[0][pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )]; 4215 uiCostTemp = uiCostTempL0[pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )]; 4216 /*first subtract the bit-rate part of the cost of the other list*/ 4217 uiCostTemp -= m_pcRdCost->getCost( uiBitsTempL0[pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )] ); 4218 /*correct the bit-rate part of the current ref*/ 4219 m_pcRdCost->setPredictor ( cMvPred[iRefList][iRefIdxTemp] ); 4220 uiBitsTemp += m_pcRdCost->getBits( cMvTemp[1][iRefIdxTemp].getHor(), cMvTemp[1][iRefIdxTemp].getVer() ); 4221 /*calculate the correct cost*/ 4222 uiCostTemp += m_pcRdCost->getCost( uiBitsTemp ); 4223 } 4224 else 4225 { 4226 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp ); 4227 } 4228 } 4229 else 4230 { 4231 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp ); 4232 } 4233 #else 4234 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp ); 4235 #endif 4236 xCopyAMVPInfo(pcCU->getCUMvField(eRefPicList)->getAMVPInfo(), &aacAMVPInfo[iRefList][iRefIdxTemp]); // must always be done ( also when AMVP_MODE = AM_NONE ) 4237 xCheckBestMVP(pcCU, eRefPicList, cMvTemp[iRefList][iRefIdxTemp], cMvPred[iRefList][iRefIdxTemp], aaiMvpIdx[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp); 4238 4239 if ( iRefList == 0 ) 4240 { 4241 uiCostTempL0[iRefIdxTemp] = uiCostTemp; 4242 uiBitsTempL0[iRefIdxTemp] = uiBitsTemp; 4243 } 4244 if ( uiCostTemp < uiCost[iRefList] ) 4245 { 4246 uiCost[iRefList] = uiCostTemp; 4247 uiBits[iRefList] = uiBitsTemp; // storing for bi-prediction 4248 4249 // set motion 4250 cMv[iRefList] = cMvTemp[iRefList][iRefIdxTemp]; 4251 iRefIdx[iRefList] = iRefIdxTemp; 4252 } 4253 4254 if ( iRefList == 1 && uiCostTemp < costValidList1 && pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) < 0 ) 4255 { 4256 costValidList1 = uiCostTemp; 4257 bitsValidList1 = uiBitsTemp; 4258 4259 // set motion 4260 mvValidList1 = cMvTemp[iRefList][iRefIdxTemp]; 4261 refIdxValidList1 = iRefIdxTemp; 4262 } 4263 } 4264 } 4265 // Bi-directional prediction 4266 if ( (pcCU->getSlice()->isInterB()) && (pcCU->isBipredRestriction(iPartIdx) == false) ) 4267 { 4268 4269 cMvBi[0] = cMv[0]; cMvBi[1] = cMv[1]; 4270 iRefIdxBi[0] = iRefIdx[0]; iRefIdxBi[1] = iRefIdx[1]; 4271 4272 ::memcpy(cMvPredBi, cMvPred, sizeof(cMvPred)); 4273 ::memcpy(aaiMvpIdxBi, aaiMvpIdx, sizeof(aaiMvpIdx)); 4274 4275 UInt uiMotBits[2]; 4276 4277 if(pcCU->getSlice()->getMvdL1ZeroFlag()) 4278 { 4279 xCopyAMVPInfo(&aacAMVPInfo[1][bestBiPRefIdxL1], pcCU->getCUMvField(REF_PIC_LIST_1)->getAMVPInfo()); 4280 pcCU->setMVPIdxSubParts( bestBiPMvpL1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4281 aaiMvpIdxBi[1][bestBiPRefIdxL1] = bestBiPMvpL1; 4282 cMvPredBi[1][bestBiPRefIdxL1] = pcCU->getCUMvField(REF_PIC_LIST_1)->getAMVPInfo()->m_acMvCand[bestBiPMvpL1]; 4283 4284 cMvBi[1] = cMvPredBi[1][bestBiPRefIdxL1]; 4285 iRefIdxBi[1] = bestBiPRefIdxL1; 4286 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( cMvBi[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4287 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( iRefIdxBi[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4288 TComYuv* pcYuvPred = &m_acYuvPred[1]; 4289 motionCompensation( pcCU, pcYuvPred, REF_PIC_LIST_1, iPartIdx ); 4290 4291 uiMotBits[0] = uiBits[0] - uiMbBits[0]; 4292 uiMotBits[1] = uiMbBits[1]; 4293 4294 if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1) > 1 ) 4295 { 4296 uiMotBits[1] += bestBiPRefIdxL1+1; 4297 if ( bestBiPRefIdxL1 == pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1)-1 ) uiMotBits[1]--; 4298 } 4299 4300 uiMotBits[1] += m_auiMVPIdxCost[aaiMvpIdxBi[1][bestBiPRefIdxL1]][AMVP_MAX_NUM_CANDS]; 4301 4302 uiBits[2] = uiMbBits[2] + uiMotBits[0] + uiMotBits[1]; 4303 4304 cMvTemp[1][bestBiPRefIdxL1] = cMvBi[1]; 4305 } 4306 else 4307 { 4308 uiMotBits[0] = uiBits[0] - uiMbBits[0]; 4309 uiMotBits[1] = uiBits[1] - uiMbBits[1]; 4310 uiBits[2] = uiMbBits[2] + uiMotBits[0] + uiMotBits[1]; 4311 } 4312 4313 // 4-times iteration (default) 4314 Int iNumIter = 4; 4315 4316 // fast encoder setting: only one iteration 4317 if ( m_pcEncCfg->getUseFastEnc() || pcCU->getSlice()->getMvdL1ZeroFlag()) 4318 { 4319 iNumIter = 1; 4320 } 4321 4322 for ( Int iIter = 0; iIter < iNumIter; iIter++ ) 4323 { 4324 4325 Int iRefList = iIter % 2; 4326 if ( m_pcEncCfg->getUseFastEnc() ) 4327 { 4328 if( uiCost[0] <= uiCost[1] ) 4329 { 4330 iRefList = 1; 4331 } 4332 else 4333 { 4334 iRefList = 0; 4335 } 4336 } 4337 else if ( iIter == 0 ) 4338 { 4339 iRefList = 0; 4340 } 4341 if ( iIter == 0 && !pcCU->getSlice()->getMvdL1ZeroFlag()) 4342 { 4343 pcCU->getCUMvField(RefPicList(1-iRefList))->setAllMv( cMv[1-iRefList], ePartSize, uiPartAddr, 0, iPartIdx ); 4344 pcCU->getCUMvField(RefPicList(1-iRefList))->setAllRefIdx( iRefIdx[1-iRefList], ePartSize, uiPartAddr, 0, iPartIdx ); 4345 TComYuv* pcYuvPred = &m_acYuvPred[1-iRefList]; 4346 motionCompensation ( pcCU, pcYuvPred, RefPicList(1-iRefList), iPartIdx ); 4347 } 4162 4348 RefPicList eRefPicList = ( iRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0 ); 4163 4349 4164 for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ ) 4165 { 4166 uiBitsTemp = uiMbBits[iRefList]; 4350 if(pcCU->getSlice()->getMvdL1ZeroFlag()) 4351 { 4352 iRefList = 0; 4353 eRefPicList = REF_PIC_LIST_0; 4354 } 4355 4356 Bool bChanged = false; 4357 4358 iRefStart = 0; 4359 iRefEnd = pcCU->getSlice()->getNumRefIdx(eRefPicList)-1; 4360 4361 for ( Int iRefIdxTemp = iRefStart; iRefIdxTemp <= iRefEnd; iRefIdxTemp++ ) 4362 { 4363 uiBitsTemp = uiMbBits[2] + uiMotBits[1-iRefList]; 4167 4364 if ( pcCU->getSlice()->getNumRefIdx(eRefPicList) > 1 ) 4168 4365 { … … 4170 4367 if ( iRefIdxTemp == pcCU->getSlice()->getNumRefIdx(eRefPicList)-1 ) uiBitsTemp--; 4171 4368 } 4369 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 4370 // call ME 4371 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPredBi[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp, true ); 4372 xCopyAMVPInfo(&aacAMVPInfo[iRefList][iRefIdxTemp], pcCU->getCUMvField(eRefPicList)->getAMVPInfo()); 4373 xCheckBestMVP(pcCU, eRefPicList, cMvTemp[iRefList][iRefIdxTemp], cMvPredBi[iRefList][iRefIdxTemp], aaiMvpIdxBi[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp); 4374 4375 if ( uiCostTemp < uiCostBi ) 4376 { 4377 bChanged = true; 4378 4379 cMvBi[iRefList] = cMvTemp[iRefList][iRefIdxTemp]; 4380 iRefIdxBi[iRefList] = iRefIdxTemp; 4381 4382 uiCostBi = uiCostTemp; 4383 uiMotBits[iRefList] = uiBitsTemp - uiMbBits[2] - uiMotBits[1-iRefList]; 4384 uiBits[2] = uiBitsTemp; 4385 4386 if(iNumIter!=1) 4387 { 4388 // Set motion 4389 pcCU->getCUMvField( eRefPicList )->setAllMv( cMvBi[iRefList], ePartSize, uiPartAddr, 0, iPartIdx ); 4390 pcCU->getCUMvField( eRefPicList )->setAllRefIdx( iRefIdxBi[iRefList], ePartSize, uiPartAddr, 0, iPartIdx ); 4391 4392 TComYuv* pcYuvPred = &m_acYuvPred[iRefList]; 4393 motionCompensation( pcCU, pcYuvPred, eRefPicList, iPartIdx ); 4394 } 4395 } 4396 } // for loop-iRefIdxTemp 4397 4398 if ( !bChanged ) 4399 { 4400 if ( uiCostBi <= uiCost[0] && uiCostBi <= uiCost[1] ) 4401 { 4402 xCopyAMVPInfo(&aacAMVPInfo[0][iRefIdxBi[0]], pcCU->getCUMvField(REF_PIC_LIST_0)->getAMVPInfo()); 4403 xCheckBestMVP(pcCU, REF_PIC_LIST_0, cMvBi[0], cMvPredBi[0][iRefIdxBi[0]], aaiMvpIdxBi[0][iRefIdxBi[0]], uiBits[2], uiCostBi); 4404 if(!pcCU->getSlice()->getMvdL1ZeroFlag()) 4405 { 4406 xCopyAMVPInfo(&aacAMVPInfo[1][iRefIdxBi[1]], pcCU->getCUMvField(REF_PIC_LIST_1)->getAMVPInfo()); 4407 xCheckBestMVP(pcCU, REF_PIC_LIST_1, cMvBi[1], cMvPredBi[1][iRefIdxBi[1]], aaiMvpIdxBi[1][iRefIdxBi[1]], uiBits[2], uiCostBi); 4408 } 4409 } 4410 break; 4411 } 4412 } // for loop-iter 4413 } // if (B_SLICE) 4172 4414 #if ZERO_MVD_EST 4173 xEstimateMvPredAMVP( pcCU, pcOrgYuv, iPartIdx, eRefPicList, iRefIdxTemp, cMvPred[iRefList][iRefIdxTemp], false, &biPDistTemp, &uiZeroMvdDistTemp); 4174 #else 4175 xEstimateMvPredAMVP( pcCU, pcOrgYuv, iPartIdx, eRefPicList, iRefIdxTemp, cMvPred[iRefList][iRefIdxTemp], false, &biPDistTemp); 4176 #endif 4177 aaiMvpIdx[iRefList][iRefIdxTemp] = pcCU->getMVPIdx(eRefPicList, uiPartAddr); 4178 aaiMvpNum[iRefList][iRefIdxTemp] = pcCU->getMVPNum(eRefPicList, uiPartAddr); 4179 4180 if(pcCU->getSlice()->getMvdL1ZeroFlag() && iRefList==1 && biPDistTemp < bestBiPDist) 4415 if ( (pcCU->getSlice()->isInterB()) && (pcCU->isBipredRestriction(iPartIdx) == false) ) 4416 { 4417 m_pcRdCost->getMotionCost( 1, 0 ); 4418 4419 for ( Int iL0RefIdxTemp = 0; iL0RefIdxTemp <= pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_0)-1; iL0RefIdxTemp++ ) 4420 for ( Int iL1RefIdxTemp = 0; iL1RefIdxTemp <= pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1)-1; iL1RefIdxTemp++ ) 4421 { 4422 UInt uiRefIdxBitsTemp = 0; 4423 if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_0) > 1 ) 4424 { 4425 uiRefIdxBitsTemp += iL0RefIdxTemp+1; 4426 if ( iL0RefIdxTemp == pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_0)-1 ) uiRefIdxBitsTemp--; 4427 } 4428 if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1) > 1 ) 4429 { 4430 uiRefIdxBitsTemp += iL1RefIdxTemp+1; 4431 if ( iL1RefIdxTemp == pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1)-1 ) uiRefIdxBitsTemp--; 4432 } 4433 4434 Int iL0MVPIdx = 0; 4435 Int iL1MVPIdx = 0; 4436 4437 for (iL0MVPIdx = 0; iL0MVPIdx < aaiMvpNum[0][iL0RefIdxTemp]; iL0MVPIdx++) 4438 { 4439 for (iL1MVPIdx = 0; iL1MVPIdx < aaiMvpNum[1][iL1RefIdxTemp]; iL1MVPIdx++) 4181 4440 { 4182 bestBiPDist = biPDistTemp; 4183 bestBiPMvpL1 = aaiMvpIdx[iRefList][iRefIdxTemp]; 4184 bestBiPRefIdxL1 = iRefIdxTemp; 4185 } 4186 4187 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdx[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 4188 #if ZERO_MVD_EST 4189 if ( iRefList == 0 || pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) < 0 ) 4190 { 4191 uiZeroMvdBitsTemp = uiBitsTemp; 4192 uiZeroMvdBitsTemp += 2; //zero mvd bits 4193 4194 m_pcRdCost->getMotionCost( 1, 0 ); 4195 uiZeroMvdCostTemp = uiZeroMvdDistTemp + m_pcRdCost->getCost(uiZeroMvdBitsTemp); 4196 4441 uiZeroMvdBitsTemp = uiRefIdxBitsTemp; 4442 uiZeroMvdBitsTemp += uiMbBits[2]; 4443 uiZeroMvdBitsTemp += m_auiMVPIdxCost[iL0MVPIdx][aaiMvpNum[0][iL0RefIdxTemp]] + m_auiMVPIdxCost[iL1MVPIdx][aaiMvpNum[1][iL1RefIdxTemp]]; 4444 uiZeroMvdBitsTemp += 4; //zero mvd for both directions 4445 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( aacAMVPInfo[0][iL0RefIdxTemp].m_acMvCand[iL0MVPIdx], iL0RefIdxTemp, ePartSize, uiPartAddr, iPartIdx, 0 ); 4446 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( aacAMVPInfo[1][iL1RefIdxTemp].m_acMvCand[iL1MVPIdx], iL1RefIdxTemp, ePartSize, uiPartAddr, iPartIdx, 0 ); 4447 4448 xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiZeroMvdDistTemp, m_pcEncCfg->getUseHADME() ); 4449 uiZeroMvdCostTemp = uiZeroMvdDistTemp + m_pcRdCost->getCost( uiZeroMvdBitsTemp ); 4197 4450 if (uiZeroMvdCostTemp < uiZeroMvdCost) 4198 4451 { 4199 4452 uiZeroMvdCost = uiZeroMvdCostTemp; 4200 iZeroMvdDir = iRefList + 1; 4201 aiZeroMvdRefIdx[iRefList] = iRefIdxTemp; 4202 aiZeroMvdMvpIdx[iRefList] = aaiMvpIdx[iRefList][iRefIdxTemp]; 4203 auiZeroMvdBits[iRefList] = uiZeroMvdBitsTemp; 4204 } 4205 } 4206 #endif 4207 4208 #if GPB_SIMPLE_UNI 4209 if ( iRefList == 1 ) // list 1 4210 { 4211 if ( pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) >= 0 ) 4212 { 4213 cMvTemp[1][iRefIdxTemp] = cMvTemp[0][pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )]; 4214 uiCostTemp = uiCostTempL0[pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )]; 4215 /*first subtract the bit-rate part of the cost of the other list*/ 4216 uiCostTemp -= m_pcRdCost->getCost( uiBitsTempL0[pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp )] ); 4217 /*correct the bit-rate part of the current ref*/ 4218 m_pcRdCost->setPredictor ( cMvPred[iRefList][iRefIdxTemp] ); 4219 uiBitsTemp += m_pcRdCost->getBits( cMvTemp[1][iRefIdxTemp].getHor(), cMvTemp[1][iRefIdxTemp].getVer() ); 4220 /*calculate the correct cost*/ 4221 uiCostTemp += m_pcRdCost->getCost( uiBitsTemp ); 4222 } 4223 else 4224 { 4225 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp ); 4453 iZeroMvdDir = 3; 4454 aiZeroMvdMvpIdx[0] = iL0MVPIdx; 4455 aiZeroMvdMvpIdx[1] = iL1MVPIdx; 4456 aiZeroMvdRefIdx[0] = iL0RefIdxTemp; 4457 aiZeroMvdRefIdx[1] = iL1RefIdxTemp; 4458 auiZeroMvdBits[2] = uiZeroMvdBitsTemp; 4226 4459 } 4227 4460 } 4228 else 4229 { 4230 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp ); 4231 } 4232 #else 4233 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPred[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp ); 4234 #endif 4235 xCopyAMVPInfo(pcCU->getCUMvField(eRefPicList)->getAMVPInfo(), &aacAMVPInfo[iRefList][iRefIdxTemp]); // must always be done ( also when AMVP_MODE = AM_NONE ) 4236 xCheckBestMVP(pcCU, eRefPicList, cMvTemp[iRefList][iRefIdxTemp], cMvPred[iRefList][iRefIdxTemp], aaiMvpIdx[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp); 4237 4238 if ( iRefList == 0 ) 4239 { 4240 uiCostTempL0[iRefIdxTemp] = uiCostTemp; 4241 uiBitsTempL0[iRefIdxTemp] = uiBitsTemp; 4242 } 4243 if ( uiCostTemp < uiCost[iRefList] ) 4244 { 4245 uiCost[iRefList] = uiCostTemp; 4246 uiBits[iRefList] = uiBitsTemp; // storing for bi-prediction 4247 4248 // set motion 4249 cMv[iRefList] = cMvTemp[iRefList][iRefIdxTemp]; 4250 iRefIdx[iRefList] = iRefIdxTemp; 4251 } 4252 4253 if ( iRefList == 1 && uiCostTemp < costValidList1 && pcCU->getSlice()->getList1IdxToList0Idx( iRefIdxTemp ) < 0 ) 4254 { 4255 costValidList1 = uiCostTemp; 4256 bitsValidList1 = uiBitsTemp; 4257 4258 // set motion 4259 mvValidList1 = cMvTemp[iRefList][iRefIdxTemp]; 4260 refIdxValidList1 = iRefIdxTemp; 4261 } 4262 } 4263 } 4264 // Bi-directional prediction 4265 if ( (pcCU->getSlice()->isInterB()) && (pcCU->isBipredRestriction(iPartIdx) == false) ) 4266 { 4267 4268 cMvBi[0] = cMv[0]; cMvBi[1] = cMv[1]; 4269 iRefIdxBi[0] = iRefIdx[0]; iRefIdxBi[1] = iRefIdx[1]; 4270 4271 ::memcpy(cMvPredBi, cMvPred, sizeof(cMvPred)); 4272 ::memcpy(aaiMvpIdxBi, aaiMvpIdx, sizeof(aaiMvpIdx)); 4273 4274 UInt uiMotBits[2]; 4275 4276 if(pcCU->getSlice()->getMvdL1ZeroFlag()) 4277 { 4278 xCopyAMVPInfo(&aacAMVPInfo[1][bestBiPRefIdxL1], pcCU->getCUMvField(REF_PIC_LIST_1)->getAMVPInfo()); 4279 pcCU->setMVPIdxSubParts( bestBiPMvpL1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4280 aaiMvpIdxBi[1][bestBiPRefIdxL1] = bestBiPMvpL1; 4281 cMvPredBi[1][bestBiPRefIdxL1] = pcCU->getCUMvField(REF_PIC_LIST_1)->getAMVPInfo()->m_acMvCand[bestBiPMvpL1]; 4282 4283 cMvBi[1] = cMvPredBi[1][bestBiPRefIdxL1]; 4284 iRefIdxBi[1] = bestBiPRefIdxL1; 4285 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( cMvBi[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4286 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( iRefIdxBi[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4287 TComYuv* pcYuvPred = &m_acYuvPred[1]; 4288 motionCompensation( pcCU, pcYuvPred, REF_PIC_LIST_1, iPartIdx ); 4289 4290 uiMotBits[0] = uiBits[0] - uiMbBits[0]; 4291 uiMotBits[1] = uiMbBits[1]; 4292 4293 if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1) > 1 ) 4294 { 4295 uiMotBits[1] += bestBiPRefIdxL1+1; 4296 if ( bestBiPRefIdxL1 == pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1)-1 ) uiMotBits[1]--; 4297 } 4298 4299 uiMotBits[1] += m_auiMVPIdxCost[aaiMvpIdxBi[1][bestBiPRefIdxL1]][AMVP_MAX_NUM_CANDS]; 4300 4301 uiBits[2] = uiMbBits[2] + uiMotBits[0] + uiMotBits[1]; 4302 4303 cMvTemp[1][bestBiPRefIdxL1] = cMvBi[1]; 4304 } 4305 else 4306 { 4307 uiMotBits[0] = uiBits[0] - uiMbBits[0]; 4308 uiMotBits[1] = uiBits[1] - uiMbBits[1]; 4309 uiBits[2] = uiMbBits[2] + uiMotBits[0] + uiMotBits[1]; 4310 } 4311 4312 // 4-times iteration (default) 4313 Int iNumIter = 4; 4314 4315 // fast encoder setting: only one iteration 4316 if ( m_pcEncCfg->getUseFastEnc() || pcCU->getSlice()->getMvdL1ZeroFlag()) 4317 { 4318 iNumIter = 1; 4319 } 4320 4321 for ( Int iIter = 0; iIter < iNumIter; iIter++ ) 4322 { 4323 4324 Int iRefList = iIter % 2; 4325 if ( m_pcEncCfg->getUseFastEnc() ) 4326 { 4327 if( uiCost[0] <= uiCost[1] ) 4328 { 4329 iRefList = 1; 4330 } 4331 else 4332 { 4333 iRefList = 0; 4334 } 4335 } 4336 else if ( iIter == 0 ) 4337 { 4338 iRefList = 0; 4339 } 4340 if ( iIter == 0 && !pcCU->getSlice()->getMvdL1ZeroFlag()) 4341 { 4342 pcCU->getCUMvField(RefPicList(1-iRefList))->setAllMv( cMv[1-iRefList], ePartSize, uiPartAddr, 0, iPartIdx ); 4343 pcCU->getCUMvField(RefPicList(1-iRefList))->setAllRefIdx( iRefIdx[1-iRefList], ePartSize, uiPartAddr, 0, iPartIdx ); 4344 TComYuv* pcYuvPred = &m_acYuvPred[1-iRefList]; 4345 motionCompensation ( pcCU, pcYuvPred, RefPicList(1-iRefList), iPartIdx ); 4346 } 4347 RefPicList eRefPicList = ( iRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0 ); 4348 4349 if(pcCU->getSlice()->getMvdL1ZeroFlag()) 4350 { 4351 iRefList = 0; 4352 eRefPicList = REF_PIC_LIST_0; 4353 } 4354 4355 Bool bChanged = false; 4356 4357 iRefStart = 0; 4358 iRefEnd = pcCU->getSlice()->getNumRefIdx(eRefPicList)-1; 4359 4360 for ( Int iRefIdxTemp = iRefStart; iRefIdxTemp <= iRefEnd; iRefIdxTemp++ ) 4361 { 4362 uiBitsTemp = uiMbBits[2] + uiMotBits[1-iRefList]; 4363 if ( pcCU->getSlice()->getNumRefIdx(eRefPicList) > 1 ) 4364 { 4365 uiBitsTemp += iRefIdxTemp+1; 4366 if ( iRefIdxTemp == pcCU->getSlice()->getNumRefIdx(eRefPicList)-1 ) uiBitsTemp--; 4367 } 4368 uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS]; 4369 // call ME 4370 xMotionEstimation ( pcCU, pcOrgYuv, iPartIdx, eRefPicList, &cMvPredBi[iRefList][iRefIdxTemp], iRefIdxTemp, cMvTemp[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp, true ); 4371 xCopyAMVPInfo(&aacAMVPInfo[iRefList][iRefIdxTemp], pcCU->getCUMvField(eRefPicList)->getAMVPInfo()); 4372 xCheckBestMVP(pcCU, eRefPicList, cMvTemp[iRefList][iRefIdxTemp], cMvPredBi[iRefList][iRefIdxTemp], aaiMvpIdxBi[iRefList][iRefIdxTemp], uiBitsTemp, uiCostTemp); 4373 4374 if ( uiCostTemp < uiCostBi ) 4375 { 4376 bChanged = true; 4377 4378 cMvBi[iRefList] = cMvTemp[iRefList][iRefIdxTemp]; 4379 iRefIdxBi[iRefList] = iRefIdxTemp; 4380 4381 uiCostBi = uiCostTemp; 4382 uiMotBits[iRefList] = uiBitsTemp - uiMbBits[2] - uiMotBits[1-iRefList]; 4383 uiBits[2] = uiBitsTemp; 4384 4385 if(iNumIter!=1) 4386 { 4387 // Set motion 4388 pcCU->getCUMvField( eRefPicList )->setAllMv( cMvBi[iRefList], ePartSize, uiPartAddr, 0, iPartIdx ); 4389 pcCU->getCUMvField( eRefPicList )->setAllRefIdx( iRefIdxBi[iRefList], ePartSize, uiPartAddr, 0, iPartIdx ); 4390 4391 TComYuv* pcYuvPred = &m_acYuvPred[iRefList]; 4392 motionCompensation( pcCU, pcYuvPred, eRefPicList, iPartIdx ); 4393 } 4394 } 4395 } // for loop-iRefIdxTemp 4396 4397 if ( !bChanged ) 4398 { 4399 if ( uiCostBi <= uiCost[0] && uiCostBi <= uiCost[1] ) 4400 { 4401 xCopyAMVPInfo(&aacAMVPInfo[0][iRefIdxBi[0]], pcCU->getCUMvField(REF_PIC_LIST_0)->getAMVPInfo()); 4402 xCheckBestMVP(pcCU, REF_PIC_LIST_0, cMvBi[0], cMvPredBi[0][iRefIdxBi[0]], aaiMvpIdxBi[0][iRefIdxBi[0]], uiBits[2], uiCostBi); 4403 if(!pcCU->getSlice()->getMvdL1ZeroFlag()) 4404 { 4405 xCopyAMVPInfo(&aacAMVPInfo[1][iRefIdxBi[1]], pcCU->getCUMvField(REF_PIC_LIST_1)->getAMVPInfo()); 4406 xCheckBestMVP(pcCU, REF_PIC_LIST_1, cMvBi[1], cMvPredBi[1][iRefIdxBi[1]], aaiMvpIdxBi[1][iRefIdxBi[1]], uiBits[2], uiCostBi); 4407 } 4408 } 4409 break; 4410 } 4411 } // for loop-iter 4412 } // if (B_SLICE) 4413 #if ZERO_MVD_EST 4414 if ( (pcCU->getSlice()->isInterB()) && (pcCU->isBipredRestriction(iPartIdx) == false) ) 4415 { 4416 m_pcRdCost->getMotionCost( 1, 0 ); 4417 4418 for ( Int iL0RefIdxTemp = 0; iL0RefIdxTemp <= pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_0)-1; iL0RefIdxTemp++ ) 4419 for ( Int iL1RefIdxTemp = 0; iL1RefIdxTemp <= pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1)-1; iL1RefIdxTemp++ ) 4420 { 4421 UInt uiRefIdxBitsTemp = 0; 4422 if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_0) > 1 ) 4423 { 4424 uiRefIdxBitsTemp += iL0RefIdxTemp+1; 4425 if ( iL0RefIdxTemp == pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_0)-1 ) uiRefIdxBitsTemp--; 4426 } 4427 if ( pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1) > 1 ) 4428 { 4429 uiRefIdxBitsTemp += iL1RefIdxTemp+1; 4430 if ( iL1RefIdxTemp == pcCU->getSlice()->getNumRefIdx(REF_PIC_LIST_1)-1 ) uiRefIdxBitsTemp--; 4431 } 4432 4433 Int iL0MVPIdx = 0; 4434 Int iL1MVPIdx = 0; 4435 4436 for (iL0MVPIdx = 0; iL0MVPIdx < aaiMvpNum[0][iL0RefIdxTemp]; iL0MVPIdx++) 4437 { 4438 for (iL1MVPIdx = 0; iL1MVPIdx < aaiMvpNum[1][iL1RefIdxTemp]; iL1MVPIdx++) 4439 { 4440 uiZeroMvdBitsTemp = uiRefIdxBitsTemp; 4441 uiZeroMvdBitsTemp += uiMbBits[2]; 4442 uiZeroMvdBitsTemp += m_auiMVPIdxCost[iL0MVPIdx][aaiMvpNum[0][iL0RefIdxTemp]] + m_auiMVPIdxCost[iL1MVPIdx][aaiMvpNum[1][iL1RefIdxTemp]]; 4443 uiZeroMvdBitsTemp += 4; //zero mvd for both directions 4444 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( aacAMVPInfo[0][iL0RefIdxTemp].m_acMvCand[iL0MVPIdx], iL0RefIdxTemp, ePartSize, uiPartAddr, iPartIdx, 0 ); 4445 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( aacAMVPInfo[1][iL1RefIdxTemp].m_acMvCand[iL1MVPIdx], iL1RefIdxTemp, ePartSize, uiPartAddr, iPartIdx, 0 ); 4446 4447 xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiZeroMvdDistTemp, m_pcEncCfg->getUseHADME() ); 4448 uiZeroMvdCostTemp = uiZeroMvdDistTemp + m_pcRdCost->getCost( uiZeroMvdBitsTemp ); 4449 if (uiZeroMvdCostTemp < uiZeroMvdCost) 4450 { 4451 uiZeroMvdCost = uiZeroMvdCostTemp; 4452 iZeroMvdDir = 3; 4453 aiZeroMvdMvpIdx[0] = iL0MVPIdx; 4454 aiZeroMvdMvpIdx[1] = iL1MVPIdx; 4455 aiZeroMvdRefIdx[0] = iL0RefIdxTemp; 4456 aiZeroMvdRefIdx[1] = iL1RefIdxTemp; 4457 auiZeroMvdBits[2] = uiZeroMvdBitsTemp; 4458 } 4459 } 4460 } 4461 } 4462 } 4461 } 4462 } 4463 } 4463 4464 #endif 4464 4465 … … 4476 4477 pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4477 4478 pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4478 4479 4479 4480 UInt uiMEBits = 0; 4480 4481 // Set Motion Field_ … … 4488 4489 #endif 4489 4490 #if ZERO_MVD_EST 4490 if (uiZeroMvdCost <= uiCostBi && uiZeroMvdCost <= uiCost[0] && uiZeroMvdCost <= uiCost[1]) 4491 { 4492 if (iZeroMvdDir == 3) 4493 { 4494 uiLastMode = 2; 4495 4496 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( aacAMVPInfo[0][aiZeroMvdRefIdx[0]].m_acMvCand[aiZeroMvdMvpIdx[0]], aiZeroMvdRefIdx[0], ePartSize, uiPartAddr, iPartIdx, 0 ); 4497 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( aacAMVPInfo[1][aiZeroMvdRefIdx[1]].m_acMvCand[aiZeroMvdMvpIdx[1]], aiZeroMvdRefIdx[1], ePartSize, uiPartAddr, iPartIdx, 0 ); 4498 4499 pcCU->setInterDirSubParts( 3, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4500 4501 pcCU->setMVPIdxSubParts( aiZeroMvdMvpIdx[0], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4502 pcCU->setMVPNumSubParts( aaiMvpNum[0][aiZeroMvdRefIdx[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4503 pcCU->setMVPIdxSubParts( aiZeroMvdMvpIdx[1], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4504 pcCU->setMVPNumSubParts( aaiMvpNum[1][aiZeroMvdRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4505 uiMEBits = auiZeroMvdBits[2]; 4506 } 4507 else if (iZeroMvdDir == 1) 4508 { 4509 uiLastMode = 0; 4510 4511 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( aacAMVPInfo[0][aiZeroMvdRefIdx[0]].m_acMvCand[aiZeroMvdMvpIdx[0]], aiZeroMvdRefIdx[0], ePartSize, uiPartAddr, iPartIdx, 0 ); 4512 4513 pcCU->setInterDirSubParts( 1, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4514 4515 pcCU->setMVPIdxSubParts( aiZeroMvdMvpIdx[0], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4516 pcCU->setMVPNumSubParts( aaiMvpNum[0][aiZeroMvdRefIdx[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4517 uiMEBits = auiZeroMvdBits[0]; 4518 } 4519 else if (iZeroMvdDir == 2) 4520 { 4521 uiLastMode = 1; 4522 4523 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( aacAMVPInfo[1][aiZeroMvdRefIdx[1]].m_acMvCand[aiZeroMvdMvpIdx[1]], aiZeroMvdRefIdx[1], ePartSize, uiPartAddr, iPartIdx, 0 ); 4524 4525 pcCU->setInterDirSubParts( 2, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4526 4527 pcCU->setMVPIdxSubParts( aiZeroMvdMvpIdx[1], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4528 pcCU->setMVPNumSubParts( aaiMvpNum[1][aiZeroMvdRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4529 uiMEBits = auiZeroMvdBits[1]; 4530 } 4531 else 4532 { 4533 assert(0); 4534 } 4491 if (uiZeroMvdCost <= uiCostBi && uiZeroMvdCost <= uiCost[0] && uiZeroMvdCost <= uiCost[1]) 4492 { 4493 if (iZeroMvdDir == 3) 4494 { 4495 uiLastMode = 2; 4496 4497 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( aacAMVPInfo[0][aiZeroMvdRefIdx[0]].m_acMvCand[aiZeroMvdMvpIdx[0]], aiZeroMvdRefIdx[0], ePartSize, uiPartAddr, iPartIdx, 0 ); 4498 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( aacAMVPInfo[1][aiZeroMvdRefIdx[1]].m_acMvCand[aiZeroMvdMvpIdx[1]], aiZeroMvdRefIdx[1], ePartSize, uiPartAddr, iPartIdx, 0 ); 4499 4500 pcCU->setInterDirSubParts( 3, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4501 4502 pcCU->setMVPIdxSubParts( aiZeroMvdMvpIdx[0], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4503 pcCU->setMVPNumSubParts( aaiMvpNum[0][aiZeroMvdRefIdx[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4504 pcCU->setMVPIdxSubParts( aiZeroMvdMvpIdx[1], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4505 pcCU->setMVPNumSubParts( aaiMvpNum[1][aiZeroMvdRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4506 uiMEBits = auiZeroMvdBits[2]; 4507 } 4508 else if (iZeroMvdDir == 1) 4509 { 4510 uiLastMode = 0; 4511 4512 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( aacAMVPInfo[0][aiZeroMvdRefIdx[0]].m_acMvCand[aiZeroMvdMvpIdx[0]], aiZeroMvdRefIdx[0], ePartSize, uiPartAddr, iPartIdx, 0 ); 4513 4514 pcCU->setInterDirSubParts( 1, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4515 4516 pcCU->setMVPIdxSubParts( aiZeroMvdMvpIdx[0], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4517 pcCU->setMVPNumSubParts( aaiMvpNum[0][aiZeroMvdRefIdx[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4518 uiMEBits = auiZeroMvdBits[0]; 4519 } 4520 else if (iZeroMvdDir == 2) 4521 { 4522 uiLastMode = 1; 4523 4524 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( aacAMVPInfo[1][aiZeroMvdRefIdx[1]].m_acMvCand[aiZeroMvdMvpIdx[1]], aiZeroMvdRefIdx[1], ePartSize, uiPartAddr, iPartIdx, 0 ); 4525 4526 pcCU->setInterDirSubParts( 2, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4527 4528 pcCU->setMVPIdxSubParts( aiZeroMvdMvpIdx[1], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4529 pcCU->setMVPNumSubParts( aaiMvpNum[1][aiZeroMvdRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4530 uiMEBits = auiZeroMvdBits[1]; 4535 4531 } 4536 4532 else 4537 #endif 4538 if ( uiCostBi <= uiCost[0] && uiCostBi <= uiCost[1]) 4539 { 4540 uiLastMode = 2; 4541 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMv( cMvBi[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4542 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllRefIdx( iRefIdxBi[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4543 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMv( cMvBi[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4544 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllRefIdx( iRefIdxBi[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4545 4546 TempMv = cMvBi[0] - cMvPredBi[0][iRefIdxBi[0]]; 4547 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx ); 4548 4549 TempMv = cMvBi[1] - cMvPredBi[1][iRefIdxBi[1]]; 4550 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx ); 4551 4552 pcCU->setInterDirSubParts( 3, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4553 4554 pcCU->setMVPIdxSubParts( aaiMvpIdxBi[0][iRefIdxBi[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4555 pcCU->setMVPNumSubParts( aaiMvpNum[0][iRefIdxBi[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4556 pcCU->setMVPIdxSubParts( aaiMvpIdxBi[1][iRefIdxBi[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4557 pcCU->setMVPNumSubParts( aaiMvpNum[1][iRefIdxBi[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4558 4559 uiMEBits = uiBits[2]; 4560 } 4561 else if ( uiCost[0] <= uiCost[1] ) 4562 { 4563 uiLastMode = 0; 4533 { 4534 assert(0); 4535 } 4536 } 4537 else 4538 #endif 4539 if ( uiCostBi <= uiCost[0] && uiCostBi <= uiCost[1]) 4540 { 4541 uiLastMode = 2; 4542 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMv( cMvBi[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4543 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllRefIdx( iRefIdxBi[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4544 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMv( cMvBi[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4545 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllRefIdx( iRefIdxBi[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4546 4547 TempMv = cMvBi[0] - cMvPredBi[0][iRefIdxBi[0]]; 4548 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx ); 4549 4550 TempMv = cMvBi[1] - cMvPredBi[1][iRefIdxBi[1]]; 4551 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx ); 4552 4553 pcCU->setInterDirSubParts( 3, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4554 4555 pcCU->setMVPIdxSubParts( aaiMvpIdxBi[0][iRefIdxBi[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4556 pcCU->setMVPNumSubParts( aaiMvpNum[0][iRefIdxBi[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4557 pcCU->setMVPIdxSubParts( aaiMvpIdxBi[1][iRefIdxBi[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4558 pcCU->setMVPNumSubParts( aaiMvpNum[1][iRefIdxBi[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4559 4560 uiMEBits = uiBits[2]; 4561 } 4562 else if ( uiCost[0] <= uiCost[1] ) 4563 { 4564 uiLastMode = 0; 4564 4565 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMv( cMv[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4565 4566 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllRefIdx( iRefIdx[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4566 4567 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx );4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4567 TempMv = cMv[0] - cMvPred[0][iRefIdx[0]]; 4568 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx ); 4569 pcCU->setInterDirSubParts( 1, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4570 4571 pcCU->setMVPIdxSubParts( aaiMvpIdx[0][iRefIdx[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4572 pcCU->setMVPNumSubParts( aaiMvpNum[0][iRefIdx[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4573 4574 uiMEBits = uiBits[0]; 4575 } 4576 else 4577 { 4578 uiLastMode = 1; 4578 4579 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMv( cMv[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4579 4580 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllRefIdx( iRefIdx[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4580 4581 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx );4582 4583 4584 4585 4586 4587 4588 4581 TempMv = cMv[1] - cMvPred[1][iRefIdx[1]]; 4582 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd ( TempMv, ePartSize, uiPartAddr, 0, iPartIdx ); 4583 pcCU->setInterDirSubParts( 2, uiPartAddr, iPartIdx, pcCU->getDepth(0) ); 4584 4585 pcCU->setMVPIdxSubParts( aaiMvpIdx[1][iRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4586 pcCU->setMVPNumSubParts( aaiMvpNum[1][iRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4587 4588 uiMEBits = uiBits[1]; 4589 } 4589 4590 #if AMP_MRG 4590 4591 } // end if bTestNormalMC … … 4649 4650 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours 4650 4651 #if H_3D_VSP 4651 , vspFlag4652 , inheritedVSPDisInfo4652 , vspFlag 4653 , inheritedVSPDisInfo 4653 4654 #endif 4654 4655 #if H_3D_SPIVMP 4655 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP4656 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 4656 4657 #endif 4657 , numValidMergeCand4658 );4658 , numValidMergeCand 4659 ); 4659 4660 if ( uiMRGCost < uiMECost ) 4660 4661 { … … 4669 4670 if( uiMRGIndex == pcCU->getUseDDDCandIdx() ) 4670 4671 { 4671 assert( vspFlag[uiMRGIndex] == 0 );4672 assert( bSPIVMPFlag[uiMRGIndex] == 0 );4673 pcCU->setUseDDD( true, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );4674 pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );4672 assert( vspFlag[uiMRGIndex] == 0 ); 4673 assert( bSPIVMPFlag[uiMRGIndex] == 0 ); 4674 pcCU->setUseDDD( true, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4675 pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4675 4676 } 4676 4677 else 4677 4678 { 4678 pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );4679 pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4679 4680 } 4680 4681 #endif … … 4704 4705 #if NTT_STORE_SPDV_VSP_G0148 4705 4706 #if H_3D_DBBP 4706 4707 if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) ) 4707 4708 #else 4708 if ( vspFlag[uiMRGIndex] ) 4709 #endif 4709 if ( vspFlag[uiMRGIndex] ) 4710 #endif 4711 { 4712 UInt partAddrTemp; 4713 Int vspSize; 4714 Int width, height; 4715 pcCU->getPartIndexAndSize( iPartIdx, partAddrTemp, width, height ); // true or pcCU->getTotalNumPart()==256 4716 if( uiMRGInterDir & 0x01 ) 4710 4717 { 4711 UInt partAddrTemp; 4712 Int vspSize; 4713 Int width, height; 4714 pcCU->getPartIndexAndSize( iPartIdx, partAddrTemp, width, height ); // true or pcCU->getTotalNumPart()==256 4715 if( uiMRGInterDir & 0x01 ) 4716 { 4717 pcCU->setMvFieldPUForVSP( pcCU, partAddrTemp, width, height, REF_PIC_LIST_0, cMRGMvField[0].getRefIdx(), vspSize ); 4718 pcCU->setVSPFlag( partAddrTemp, vspSize ); 4719 } 4720 else 4721 { 4722 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4723 } 4724 if( uiMRGInterDir & 0x02 ) 4725 { 4726 pcCU->setMvFieldPUForVSP( pcCU, partAddrTemp, width, height, REF_PIC_LIST_1, cMRGMvField[1].getRefIdx(), vspSize ); 4727 pcCU->setVSPFlag( partAddrTemp, vspSize ); 4728 } 4729 else 4730 { 4731 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4732 } 4733 pcCU->setInterDirSubParts ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4718 pcCU->setMvFieldPUForVSP( pcCU, partAddrTemp, width, height, REF_PIC_LIST_0, cMRGMvField[0].getRefIdx(), vspSize ); 4719 pcCU->setVSPFlag( partAddrTemp, vspSize ); 4734 4720 } 4735 4721 else 4722 { 4723 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4724 } 4725 if( uiMRGInterDir & 0x02 ) 4726 { 4727 pcCU->setMvFieldPUForVSP( pcCU, partAddrTemp, width, height, REF_PIC_LIST_1, cMRGMvField[1].getRefIdx(), vspSize ); 4728 pcCU->setVSPFlag( partAddrTemp, vspSize ); 4729 } 4730 else 4731 { 4732 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4733 } 4734 pcCU->setInterDirSubParts ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4735 } 4736 else 4736 4737 #if H_3D_FIX_G0148_BRACE 4737 4738 { 4738 4739 #endif 4739 4740 #endif 4740 4741 pcCU->setInterDirSubParts ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4741 4742 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4742 4743 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx ); … … 4744 4745 } 4745 4746 #endif 4746 4747 4748 4749 4750 4751 4752 4747 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvd ( cMvZero, ePartSize, uiPartAddr, 0, iPartIdx ); 4748 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd ( cMvZero, ePartSize, uiPartAddr, 0, iPartIdx ); 4749 4750 pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4751 pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4752 pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4753 pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr)); 4753 4754 } 4754 4755 else … … 4767 4768 pcCU->setDvInfoSubParts(OriginalDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4768 4769 #endif 4769 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMEMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );4770 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMEMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );4771 }4770 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMEMvField[0], ePartSize, uiPartAddr, 0, iPartIdx ); 4771 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMEMvField[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4772 } 4772 4773 #if H_3D_SPIVMP 4773 4774 delete[] pcMvFieldSP; … … 4778 4779 // MC 4779 4780 motionCompensation ( pcCU, rpcPredYuv, REF_PIC_LIST_X, iPartIdx ); 4780 4781 4781 4782 } // end of for ( Int iPartIdx = 0; iPartIdx < iNumPart; iPartIdx++ ) 4782 4783 … … 5803 5804 dCostBest = dCost; 5804 5805 qpBest = qp; 5805 m_pcRDGoOnSbacCoder->store( m_pppcRDSbacCoder[ pcCU->getDepth( 0 ) ][ CI_TEMP_BEST ] );5806 }5806 m_pcRDGoOnSbacCoder->store( m_pppcRDSbacCoder[ pcCU->getDepth( 0 ) ][ CI_TEMP_BEST ] ); 5807 } 5807 5808 #if H_3D_VSO // M21 5808 5809 if( m_pcRdCost->getUseRenModel() && !m_pcRdCost->getUseEstimatedVSD() ) -
branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r852 r854 668 668 m_cSPS.setLayerId( getLayerId() ); 669 669 #endif 670 #if H_MV_HLS_7_VPS_P0048_14 671 // Code below needs to be moved to VPS 672 #endif 670 673 ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL(); 671 674 profileTierLevel.setLevelIdc(m_level); … … 828 831 m_cPPS.setPPSId( getLayerIdInVps() ); 829 832 m_cPPS.setSPSId( getLayerIdInVps() ); 830 #endif 833 834 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 835 #if H_MV 836 m_cPPS.setPpsExtensionTypeFlag ( PPS_EX_T_MV ,true ); 837 #if H_3D 838 m_cPPS.setPpsExtensionTypeFlag ( PPS_EX_T_3D ,true ); 839 #endif 840 #endif 841 #endif 842 #endif 843 831 844 #if H_3D 832 845 m_cPPS.setDLT( getDLT() );
Note: See TracChangeset for help on using the changeset viewer.