Changeset 854 in 3DVCSoftware


Ignore:
Timestamp:
13 Feb 2014, 22:58:51 (11 years ago)
Author:
tech
Message:

Integrated following MV-HEVC HLS 7 items:

H_MV_HLS7_GEN Stub for further integrations (not tested)
H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
Output layer sets, various

(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.
(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.
(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).

H_MV_HLS_7_HRD_P0156_7 (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
H_MV_HLS_7_VPS_P0048_14
(VPS/P0048/profile_ref_minus1 rem) #14 Remove profile_ref_minus1 from the VPS extension, from JCTVC-P0048
H_MV_HLS_7_VPS_P0076_15 (VPS/P0076/video signal info move) #15 Move video signal information syntax structure earlier in the VPS VUI.
H_MV_HLS_7_SPS_P0155_16_32
(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.
H_MV_HLS_7_GEN_P0166_PPS_EXTENSION (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
H_MV_HLS_7_FIX_SET_DPB_SIZE
Fix derivation dpb size parameters
H_MV_HLS_7_RESERVED_FLAGS Added flags

(SPS/P0312/SHVC reserved flag) The flag will be used for the syntax vert_phase_position_enable_flag in SHVC draft
(VPS/O0215/SHVC reserved flag): this flag will be used for the syntax cross_layer_phase_alignment_flag in SHVC draft.
(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.

H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO Discard VPS with nuh_layer_Id > 0
H_MV_HLS_7_MISC_P0130_EOS
(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.
H_MV_HLS_7_MISC_P0182_13 (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.
H_MV_HLS_7_MISC_P0068_21
(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.
H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG Fix inference of cross_layer_irap_aligned_flag
H_MV_HLS_7_MISC_P0079_18
(MISC/P0079/NumActiveRefLayerPics) #18 Modification of derivation of variable NumActiveRefLayerPics.

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  
    3030#======== VPS/ Layer sets ================
    3131VpsNumLayerSets               : 3           # Number of layer sets   
    32 LayerIdsInSet_0               : 0           # LayerIds in vps of layer set
    33 LayerIdsInSet_1               : 0 1         # LayerIds in vps of layer set
    34 LayerIdsInSet_2               : 0 1 2 3     # LayerIds in vps of layer set
     32LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set
     33LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set
     34LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set
    3535
    36 DefaultOneTargetOutputLayerFlag: 0          # Output highest layer of layer sets by default
    37 OutputLayerSetIdx             : 2           # Indices of layer sets used as additional output layer sets
    38 LayerIdsInAddOutputLayerSet_0 : 2 3         # LayerIds in vps of additional output layers
     36DefaultTargetOutputLayerIdc   : 0           # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     37OutputLayerSetIdx             : 2           # Indices of layer sets used to derive additional output layer sets
     38LayerIdsInAddOutputLayerSet_0 : 2 3         # Indices in VPS of output layers in additional output layer set
    3939ProfileLevelTierIdx           : 0 0 0 0     # Indices to profile level tier (TBD)
    4040
    4141#======== VPS / Dependencies ================
    42 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    43 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
    44 DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
     42DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     43DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
     44DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers
    4545
    4646DependencyTypes_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  
    3434#======== VPS/ Layer sets ================
    3535VpsNumLayerSets               : 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
     36LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set
     37LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set
     38LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set
     39LayerIdsInSet_3               : 0 1 4 5     # Indices in VPS of layers in layer set
     40LayerIdsInSet_4               : 0 1 2 3 4 5 # Indices in VPS of layers in layer set
     41
     42DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     43OutputLayerSetIdx             : 2 3          # Indices of layer sets used to derive additional output layer sets
     44LayerIdsInAddOutputLayerSet_0 : 2 3          # Indices in VPS of additional output layers
     45LayerIdsInAddOutputLayerSet_1 : 4 5          # Indices in VPS of additional output layers
    4646ProfileLevelTierIdx           : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
    4747
    4848#======== VPS / Dependencies ================
    49 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    50 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
    51 DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
    52 DirectRefLayers_4             : 0           # LayerIds in vps of direct reference layers
    53 DirectRefLayers_5             : 1           # LayerIds in vps of direct reference layers
     49DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     50DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
     51DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers
     52DirectRefLayers_4             : 0           # Indices in VPS of direct reference layers
     53DirectRefLayers_5             : 1           # Indices in VPS of direct reference layers
    5454
    5555DependencyTypes_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  
    3434#======== VPS/ Layer sets ================
    3535VpsNumLayerSets               : 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
     36LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set
     37LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set
     38LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set
     39LayerIdsInSet_3               : 0 1 4 5     # Indices in VPS of layers in layer set
     40LayerIdsInSet_4               : 0 1 2 3 4 5 # Indices in VPS of layers in layer set
     41
     42DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     43OutputLayerSetIdx             : 2 3          # Indices of layer sets used to derive additional output layer sets
     44LayerIdsInAddOutputLayerSet_0 : 2 3          # Indices in VPS of additional output layers
     45LayerIdsInAddOutputLayerSet_1 : 4 5          # Indices in VPS of additional output layers
    4646ProfileLevelTierIdx           : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
    4747
    4848#======== VPS / Dependencies ================
    49 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    50 DirectRefLayers_2             : 1           # LayerIds in vps of direct reference layers
    51 DirectRefLayers_3             : 0           # LayerIds in vps of direct reference layers
    52 DirectRefLayers_4             : 1           # LayerIds in vps of direct reference layers
    53 DirectRefLayers_5             : 0           # LayerIds in vps of direct reference layers
     49DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     50DirectRefLayers_2             : 1           # Indices in VPS of direct reference layers
     51DirectRefLayers_3             : 0           # Indices in VPS of direct reference layers
     52DirectRefLayers_4             : 1           # Indices in VPS of direct reference layers
     53DirectRefLayers_5             : 0           # Indices in VPS of direct reference layers
    5454
    5555DependencyTypes_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  
    1212#======== VPS/ Layer sets ================
    1313VpsNumLayerSets               : 4           # Number of layer sets   
    14 LayerIdsInSet_0               : 0           # LayerIds in vps of layer set
    15 LayerIdsInSet_1               : 0 1         # LayerIds in vps of layer set
    16 LayerIdsInSet_2               : 0 1 2 3     # LayerIds in vps of layer set
    17 LayerIdsInSet_3               : 0 1 2 3 4 5 # LayerIds in vps of layer set
     14LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set
     15LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set
     16LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set
     17LayerIdsInSet_3               : 0 1 2 3 4 5 # Indices in VPS of layers in layer set
    1818
    19 DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
    20 OutputLayerSetIdx             : 2 3          # Indices of layer sets used as additional output layer sets
    21 LayerIdsInAddOutputLayerSet_0 : 2 3          # LayerIds of additional output layers
    22 LayerIdsInAddOutputLayerSet_1 : 4 5          # LayerIds of additional output layers
     19DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     20OutputLayerSetIdx             : 2 3          # Indices of layer sets used to derive additional output layer sets
     21LayerIdsInAddOutputLayerSet_0 : 2 3          # Indices in VPS of additional output layers
     22LayerIdsInAddOutputLayerSet_1 : 4 5          # Indices in VPS of additional output layers
    2323ProfileLevelTierIdx           : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
    2424
    2525#======== VPS / Dependencies ================
    26 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    27 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
    28 DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
    29 DirectRefLayers_4             : 0 2         # LayerIds in vps of direct reference layers
    30 DirectRefLayers_5             : 1 3         # LayerIds in vps of direct reference layers
     26DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     27DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
     28DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers
     29DirectRefLayers_4             : 0 2         # Indices in VPS of direct reference layers
     30DirectRefLayers_5             : 1 3         # Indices in VPS of direct reference layers
    3131
    3232DependencyTypes_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  
    1313LayerIdsInSet_2               : 0 1 2        # LayerIdcs in vps of layer set
    1414
    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
     15DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     16OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     17LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set
     18LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set
    1919ProfileLevelTierIdx           : 0 0 0 0 0    # Indices to profile level tier (TBD)
    2020
    2121#======== VPS / Dependencies ================
    22 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
    23 DirectRefLayers_2             : 0 1         # LayerIds in vps of direct reference layers
     22DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
     23DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers
    2424DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    2525DependencyTypes_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  
    33#======== VPS/ Layer sets ================
    44VpsNumLayerSets               : 4           # Number of layer sets   
    5 LayerIdsInSet_0               : 0           # LayerIds in vps of layer set
    6 LayerIdsInSet_1               : 0 1         # LayerIds in vps of layer set
    7 LayerIdsInSet_2               : 0 1 2 3     # LayerIds in vps of layer set
    8 LayerIdsInSet_3               : 0 1 2 3 4 5 # LayerIds in vps of layer set
     5LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set
     6LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set
     7LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set
     8LayerIdsInSet_3               : 0 1 2 3 4 5 # Indices in VPS of layers in layer set
    99
    10 DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
    11 OutputLayerSetIdx             : 2 3          # Indices of layer sets used as additional output layer sets
    12 LayerIdsInAddOutputLayerSet_0 : 2 3          # LayerIds of additional output layers
    13 LayerIdsInAddOutputLayerSet_1 : 4 5          # LayerIds of additional output layers
     10DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     11OutputLayerSetIdx             : 2 3          # Indices of layer sets used to derive additional output layer sets
     12LayerIdsInAddOutputLayerSet_0 : 2 3          # Indices in VPS of additional output layers
     13LayerIdsInAddOutputLayerSet_1 : 4 5          # Indices in VPS of additional output layers
    1414ProfileLevelTierIdx           : 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
    1515
    1616#======== VPS / Dependencies ================
    17 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    18 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
    19 DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
    20 DirectRefLayers_4             : 0 2         # LayerIds in vps of direct reference layers
    21 DirectRefLayers_5             : 1 3         # LayerIds in vps of direct reference layers
     17DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     18DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
     19DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers
     20DirectRefLayers_4             : 0 2         # Indices in VPS of direct reference layers
     21DirectRefLayers_5             : 1 3         # Indices in VPS of direct reference layers
    2222
    2323DependencyTypes_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  
    11#======== VPS / Layer sets ================
    22VpsNumLayerSets               : 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
     3LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set
     4LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set
    55
    6 DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
    7 OutputLayerSetIdx             : 1            # Indices of layer sets used as additional output layer sets
    8 LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds in vps of additional output layers
     6DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     7OutputLayerSetIdx             : 1            # Indices of layer sets used to derive additional output layer sets
     8LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set
    99ProfileLevelTierIdx           : 0 0 0        # Indices to profile level tier (TBD)
    1010
    1111#======== VPS / Dependencies ================
    12 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    13 DirectRefLayers_2             :             # LayerIds in vps of direct reference layers
     12DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     13DirectRefLayers_2             :             # Indices in VPS of direct reference layers
    1414DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    1515DependencyTypes_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  
    11#======== VPS/ Layer sets ================
    22VpsNumLayerSets               : 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 1 2 3     # LayerIds in vps of layer set
    6 LayerIdsInSet_3               : 0 1 2 3 4 5 # LayerIds in vps of layer set
     3LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set
     4LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set
     5LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set
     6LayerIdsInSet_3               : 0 1 2 3 4 5 # Indices in VPS of layers in layer set
    77
    8 DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
    9 OutputLayerSetIdx             : 2 3          # Indices of layer sets used as additional output layer sets
    10 LayerIdsInAddOutputLayerSet_0 : 2 3          # LayerIds of additional output layers
    11 LayerIdsInAddOutputLayerSet_1 : 4 5          # LayerIds of additional output layers
     8DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     9OutputLayerSetIdx             : 2 3          # Indices of layer sets used to derive additional output layer sets
     10LayerIdsInAddOutputLayerSet_0 : 2 3          # Indices in VPS of additional output layers
     11LayerIdsInAddOutputLayerSet_1 : 4 5          # Indices in VPS of additional output layers
    1212ProfileLevelTierIdx           : 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
    1313
    1414#======== VPS / Dependencies ================
    15 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    16 DirectRefLayers_2             :             # LayerIds in vps of direct reference layers
    17 DirectRefLayers_3             :             # LayerIds in vps of direct reference layers
    18 DirectRefLayers_4             :             # LayerIds in vps of direct reference layers
    19 DirectRefLayers_5             :             # LayerIds in vps of direct reference layers
     15DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     16DirectRefLayers_2             :             # Indices in VPS of direct reference layers
     17DirectRefLayers_3             :             # Indices in VPS of direct reference layers
     18DirectRefLayers_4             :             # Indices in VPS of direct reference layers
     19DirectRefLayers_5             :             # Indices in VPS of direct reference layers
    2020
    2121DependencyTypes_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  
    11#======== VPS / Layer sets ================
    22VpsNumLayerSets               : 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
     3LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set
     4LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set
     5LayerIdsInSet_2               : 0 2          # Indices in VPS of layers in layer set
     6LayerIdsInSet_3               : 0 1 2        # Indices in VPS of layers in layer set
    77
    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
     8DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     9OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     10LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set
     11LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set
    1212ProfileLevelTierIdx           : 0 0 0 0 0 0  # Indices to profile level tier (TBD)
    1313
    1414#======== VPS / Dependencies ================
    15 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    16 DirectRefLayers_2             :             # LayerIds in vps of direct reference layers
     15DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     16DirectRefLayers_2             :             # Indices in VPS of direct reference layers
    1717DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    1818DependencyTypes_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  
    3434#======== VPS/ Layer sets ================
    3535VpsNumLayerSets               : 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
     36LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set
     37LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set
     38LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set
     39LayerIdsInSet_3               : 0 1 4 5     # Indices in VPS of layers in layer set
     40LayerIdsInSet_4               : 0 1 2 3 4 5 # Indices in VPS of layers in layer set
     41
     42DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     43OutputLayerSetIdx             : 2 3          # Indices of layer sets used to derive additional output layer sets
     44LayerIdsInAddOutputLayerSet_0 : 2 3          # Indices in VPS of additional output layers
     45LayerIdsInAddOutputLayerSet_1 : 4 5          # Indices in VPS of additional output layers
    4646ProfileLevelTierIdx           : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
    4747
    4848#======== VPS / Dependencies ================
    49 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    50 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
    51 DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
    52 DirectRefLayers_4             : 0           # LayerIds in vps of direct reference layers
    53 DirectRefLayers_5             : 1           # LayerIds in vps of direct reference layers
     49DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     50DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
     51DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers
     52DirectRefLayers_4             : 0           # Indices in VPS of direct reference layers
     53DirectRefLayers_5             : 1           # Indices in VPS of direct reference layers
    5454
    5555DependencyTypes_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  
    3434LayerIdsInSet_2               : 0 1 2 3     # LayerIds in vps of layer set
    3535
    36 DefaultOneTargetOutputLayerFlag: 0          # Output highest layer of layer sets by default
     36DefaultTargetOutputLayerIdc: 0          # Output highest layer of layer sets by default
    3737OutputLayerSetIdx             : 2           # Indices of layer sets used as additional output layer sets
    3838LayerIdsInAddOutputLayerSet_0 : 2 3         # LayerIds in vps of additional output layers
     
    4040
    4141#======== VPS / Dependencies ================
    42 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    43 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
    44 DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
     42DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     43DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
     44DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers
    4545
    4646DependencyTypes_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  
    2626#======== VPS/ Layer sets ================
    2727VpsNumLayerSets               : 2            # Number of layer sets   
    28 LayerIdsInSet_0               : 0            # LayerIds in vps of layer set
    29 LayerIdsInSet_1               : 0 1          # LayerIds in vps of layer set
     28LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     29LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 3
    3030
    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
     31DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     32
     33OutputLayerSetIdx             : 1            # Indices of layer sets used to derive additional output layer sets
     34LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
     35
     36ProfileLevelTierIdx           : 0 0 0        # Indices to profile level tier (TBD)
    3537
    3638#======== VPS / Dependencies ================
    37 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
     39DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
    3840DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    3941
  • branches/HTM-10.0-dev0/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r852 r854  
    3434#======== VPS/ Layer sets ================
    3535VpsNumLayerSets               : 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
     36LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set 0
     37LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set 1
     38LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set 2
     39LayerIdsInSet_3               : 0 1 4 5     # Indices in VPS of layers in layer set 3
     40LayerIdsInSet_4               : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 4
     41
     42DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     43OutputLayerSetIdx             : 2 3          # Indices of layer sets used to derive additional output layer sets
     44LayerIdsInAddOutputLayerSet_0 : 2 3          # Indices in VPS of output layers in additional output layer set 0
     45LayerIdsInAddOutputLayerSet_1 : 4 5          # Indices in VPS of output layers in additional output layer set 1
     46
    4647ProfileLevelTierIdx           : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
    4748
    4849#======== VPS / Dependencies ================
    49 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    50 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
    51 DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
    52 DirectRefLayers_4             : 0           # LayerIds in vps of direct reference layers
    53 DirectRefLayers_5             : 1           # LayerIds in vps of direct reference layers
     50DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     51DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
     52DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers
     53DirectRefLayers_4             : 0           # Indices in VPS of direct reference layers
     54DirectRefLayers_5             : 1           # Indices in VPS of direct reference layers
    5455
    5556DependencyTypes_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  
    2727#======== VPS / Layer sets ================
    2828VpsNumLayerSets               : 4            # Number of layer sets   
    29 LayerIdsInSet_0               : 0            # LayerIds in vps of layer set
    30 LayerIdsInSet_1               : 0 1          # LayerIds in vps of layer set
    31 LayerIdsInSet_2               : 0 2          # LayerIds in vps of layer set
    32 LayerIdsInSet_3               : 0 1 2        # LayerIds in vps of layer set
     29LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     30LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 1
     31LayerIdsInSet_2               : 0 2          # Indices in VPS of layers in layer set 2
     32LayerIdsInSet_3               : 0 1 2        # Indices in VPS of layers in layer set 3
    3333
    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
     34DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     35
     36OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     37LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
     38LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
     39
    3840ProfileLevelTierIdx           : 0 0 0 0 0 0   # Indices to profile level tier (TBD)
    3941
    4042#======== VPS / Dependencies ================
    41 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
    42 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
     43DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
     44DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
    4345DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    4446DependencyTypes_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  
    3636ViewId                        : 1 0 2       # ViewId per ViewOrderIndex (m)
    3737
    38 #======== VPS/ Layer sets ================
    3938VpsNumLayerSets               : 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
     39LayerIdsInSet_0               : 0           # Indices in VPS of layers in layer set 0
     40LayerIdsInSet_1               : 0 1         # Indices in VPS of layers in layer set 1
     41LayerIdsInSet_2               : 0 1 2 3     # Indices in VPS of layers in layer set 2
     42LayerIdsInSet_3               : 0 1 4 5     # Indices in VPS of layers in layer set 3
     43LayerIdsInSet_4               : 0 1 2 3 4 5 # Indices in VPS of layers in layer set 4
     44
     45DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     46
     47LayerIdsInDefOutputLayerSet_0 :              # Indices in VPS of output layers in layer set 0 (when DefaultTargetOutputLayerIdc is equal to 2)
     48LayerIdsInDefOutputLayerSet_1 :              # Indices in VPS of output layers in layer set 1 (when DefaultTargetOutputLayerIdc is equal to 2)
     49LayerIdsInDefOutputLayerSet_2 :              # Indices in VPS of output layers in layer set 2 (when DefaultTargetOutputLayerIdc is equal to 2)
     50LayerIdsInDefOutputLayerSet_3 :              # Indices in VPS of output layers in layer set 3 (when DefaultTargetOutputLayerIdc is equal to 2)
     51LayerIdsInDefOutputLayerSet_4 :              # Indices in VPS of output layers in layer set 4 (when DefaultTargetOutputLayerIdc is equal to 2)
     52
     53
     54OutputLayerSetIdx             : 2 3          # Indices of layer sets used to derive additional output layer sets
     55LayerIdsInAddOutputLayerSet_0 : 2 3          # Indices in VPS of output layers in additional output layer set 0
     56LayerIdsInAddOutputLayerSet_1 : 4 5          # Indices in VPS of output layers in additional output layer set 1
     57
    5058ProfileLevelTierIdx           : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
    5159
    5260#======== VPS / Dependencies ================
    53 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    54 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
    55 DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
    56 DirectRefLayers_4             : 0           # LayerIds in vps of direct reference layers
    57 DirectRefLayers_5             : 1           # LayerIds in vps of direct reference layers
     61DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     62DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
     63DirectRefLayers_3             : 1           # Indices in VPS of direct reference layers
     64DirectRefLayers_4             : 0           # Indices in VPS of direct reference layers
     65DirectRefLayers_5             : 1           # Indices in VPS of direct reference layers
    5866
    5967DependencyTypes_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  
    99#======== VPS / Layer sets ================
    1010VpsNumLayerSets               : 3            # Number of layer sets   
    11 LayerIdsInSet_0               : 0            # LayerIdcs in vps of layer set
    12 LayerIdsInSet_1               : 0 1          # LayerIdcs in vps of layer set
    13 LayerIdsInSet_2               : 0 1 2        # LayerIdcs in vps of layer set
     11LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     12LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 1
     13LayerIdsInSet_2               : 0 1 2        # Indices in VPS of layers in layer set 2
    1414
    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
     15DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     16OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     17LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
     18LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
     19
    1920ProfileLevelTierIdx           : 0 0 0 0 0    # Indices to profile level tier (TBD)
    2021
    2122#======== VPS / Dependencies ================
    22 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
    23 DirectRefLayers_2             : 0 1         # LayerIds in vps of direct reference layers
     23DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
     24DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers
    2425DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    2526DependencyTypes_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  
    33#======== VPS / Layer sets ================
    44VpsNumLayerSets               : 4            # Number of layer sets   
    5 LayerIdsInSet_0               : 0            # LayerIds in vps of layer set
    6 LayerIdsInSet_1               : 0 1          # LayerIds in vps of layer set
    7 LayerIdsInSet_2               : 0 2          # LayerIds in vps of layer set
    8 LayerIdsInSet_3               : 0 1 2        # LayerIds in vps of layer set
     5LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     6LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 1
     7LayerIdsInSet_2               : 0 2          # Indices in VPS of layers in layer set 2
     8LayerIdsInSet_3               : 0 1 2        # Indices in VPS of layers in layer set 3
    99
    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
     10DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     11OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     12LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
     13LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
     14
    1415ProfileLevelTierIdx           : 0 0 0 0 0 0  # Indices to profile level tier (TBD)
    1516
    1617#======== VPS / Dependencies ================
    17 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
    18 DirectRefLayers_2             : 0 1         # LayerIds in vps of direct reference layers
     18DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
     19DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers
    1920DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    2021DependencyTypes_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  
    11#======== VPS / Layer sets ================
    22VpsNumLayerSets               : 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
     3LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     4LayerIdsInSet_1               : 1            # Indices in VPS of layers in layer set 0
     5LayerIdsInSet_2               : 2            # Indices in VPS of layers in layer set 0
     6LayerIdsInSet_3               : 0 1          # Indices in VPS of layers in layer set 1
     7LayerIdsInSet_4               : 0 2          # Indices in VPS of layers in layer set 2
     8LayerIdsInSet_5               : 1 2          # Indices in VPS of layers in layer set 2
     9LayerIdsInSet_6               : 0 1 2        # Indices in VPS of layers in layer set 3
    710
    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)
     11DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     12
     13OutputLayerSetIdx             :              # Indices of layer sets used to derive additional output layer sets
     14
    1315
    1416#======== VPS / Dependencies ================
    15 DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
    16 DirectRefLayers_2             :             # LayerIds in vps of direct reference layers
     17DirectRefLayers_1             :             # Indices in VPS of direct reference layers
     18DirectRefLayers_2             :             # Indices in VPS of direct reference layers
    1719DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    1820DependencyTypes_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  
    33#======== VPS / Layer sets ================
    44VpsNumLayerSets               : 4            # Number of layer sets   
    5 LayerIdsInSet_0               : 0            # LayerIds in vps of layer set
    6 LayerIdsInSet_1               : 0 1          # LayerIds in vps of layer set
    7 LayerIdsInSet_2               : 0 2          # LayerIds in vps of layer set
    8 LayerIdsInSet_3               : 0 1 2        # LayerIds in vps of layer set
     5LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     6LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 1
     7LayerIdsInSet_2               : 0 2          # Indices in VPS of layers in layer set 2
     8LayerIdsInSet_3               : 0 1 2        # Indices in VPS of layers in layer set 3
    99
    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
     10DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     11OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     12LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
     13LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
     14
    1415ProfileLevelTierIdx           : 0 0 0 0 0 0  # Indices to profile level tier (TBD)
    1516
    1617#======== VPS / Dependencies ================
    17 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
    18 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
     18DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
     19DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
    1920DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    2021DependencyTypes_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  
    99#======== VPS / Layer sets ================
    1010VpsNumLayerSets               : 3            # Number of layer sets   
    11 LayerIdsInSet_0               : 0            # LayerIdcs in vps of layer set
    12 LayerIdsInSet_1               : 0 1          # LayerIdcs in vps of layer set
    13 LayerIdsInSet_2               : 0 1 2        # LayerIdcs in vps of layer set
     11LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     12LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 1
     13LayerIdsInSet_3               : 0 1 2        # Indices in VPS of layers in layer set 3
    1414
    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
     15DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     16OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     17LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
     18LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
    1919ProfileLevelTierIdx           : 0 0 0 0 0    # Indices to profile level tier (TBD)
    2020
    2121#======== VPS / Dependencies ================
    22 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
    23 DirectRefLayers_2             : 0 1         # LayerIds in vps of direct reference layers
     22DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
     23DirectRefLayers_2             : 0 1         # Indices in VPS of direct reference layers
    2424DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    2525DependencyTypes_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  
    2525#======== VPS/ Layer sets ================
    2626VpsNumLayerSets               : 2            # Number of layer sets   
    27 LayerIdsInSet_0               : 0            # LayerIds in vps of Layer set
    28 LayerIdsInSet_1               : 0 1          # LayerIds in vps of Layer set
     27LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     28LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 3
    2929
    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
     30DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     31
     32OutputLayerSetIdx             : 1            # Indices of layer sets used to derive additional output layer sets
     33LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
    3334ProfileLevelTierIdx           : 0 0 0        # Indices to profile level tier (TBD)
    3435
    3536#======== VPS / Dependencies ================
    36 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
     37DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
    3738DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    3839
  • branches/HTM-10.0-dev0/cfg/MV-HEVC/baseCfg_3view.cfg

    r852 r854  
    2727#======== VPS / Layer sets ================
    2828VpsNumLayerSets               : 4            # Number of layer sets   
    29 LayerIdsInSet_0               : 0            # LayerIds in vps of layer set
    30 LayerIdsInSet_1               : 0 1          # LayerIds in vps of layer set
    31 LayerIdsInSet_2               : 0 2          # LayerIds in vps of layer set
    32 LayerIdsInSet_3               : 0 1 2        # LayerIds in vps of layer set
     29LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     30LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 1
     31LayerIdsInSet_2               : 0 2          # Indices in VPS of layers in layer set 2
     32LayerIdsInSet_3               : 0 1 2        # Indices in VPS of layers in layer set 3
    3333
    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
     34DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     35
     36OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     37LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
     38LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
     39
    3840ProfileLevelTierIdx           : 0 0 0 0 0 0  # Indices to profile level tier (TBD)
    3941
    4042#======== VPS / Dependencies ================
    41 DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
    42 DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
     43DirectRefLayers_1             : 0           # Indices in VPS of direct reference layers
     44DirectRefLayers_2             : 0           # Indices in VPS of direct reference layers
    4345DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    4446DependencyTypes_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  
    3131#======== VPS/ Layer sets ================
    3232VpsNumLayerSets               : 4            # Number of layer sets   
    33 LayerIdsInSet_0               : 0            # LayerIds of Layer set
    34 LayerIdsInSet_1               : 0 1          # LayerIds of Layer set
    35 LayerIdsInSet_2               : 0 2          # LayerIds of Layer set
    36 LayerIdsInSet_3               : 0 1 2        # LayerIds of Layer set
     33LayerIdsInSet_0               : 0            # Indices in VPS of layers in layer set 0
     34LayerIdsInSet_1               : 0 1          # Indices in VPS of layers in layer set 1
     35LayerIdsInSet_2               : 0 2          # Indices in VPS of layers in layer set 2
     36LayerIdsInSet_3               : 0 1 2        # Indices in VPS of layers in layer set 3
    3737
    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
     38DefaultTargetOutputLayerIdc   : 0            # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet
     39LayerIdsInDefOutputLayerSet_0 :              # Indices in VPS of output layers in layer set 0 (when DefaultTargetOutputLayerIdc is equal to 2)
     40LayerIdsInDefOutputLayerSet_1 :              # Indices in VPS of output layers in layer set 1 (when DefaultTargetOutputLayerIdc is equal to 2)
     41LayerIdsInDefOutputLayerSet_2 :              # Indices in VPS of output layers in layer set 2 (when DefaultTargetOutputLayerIdc is equal to 2)
     42LayerIdsInDefOutputLayerSet_3 :              # Indices in VPS of output layers in layer set 3 (when DefaultTargetOutputLayerIdc is equal to 2)
     43
     44
     45OutputLayerSetIdx             : 1 2          # Indices of layer sets used to derive additional output layer sets
     46LayerIdsInAddOutputLayerSet_0 : 1            # Indices in VPS of output layers in additional output layer set 0
     47LayerIdsInAddOutputLayerSet_1 : 2            # Indices in VPS of output layers in additional output layer set 1
     48
     49
    4250ProfileLevelTierIdx           : 0 0 0 0      # Indices to profile level tier (TBD)
    43 
    4451#======== Unit definition ================
    4552MaxCUWidth                    : 64          # Maximum coding unit width in pixel
  • branches/HTM-10.0-dev0/source/App/TAppDecoder/TAppDecTop.cpp

    r852 r854  
    140140    AOF( m_pScaleOffsetFile );
    141141  }
     142#if !FIX_CAM_PARS_COLLECTOR
    142143  m_cCamParsCollector.init( m_pScaleOffsetFile );
     144#endif
    143145#endif
    144146  InputByteStream bytestream(bitstreamFile);
     
    207209      read(nalu, nalUnit);
    208210#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
    209221      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 )
     222#endif
    210223      {
    211224        bNewPicture = false;
     
    235248          }
    236249
     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
    237257          m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx );
    238258        }
     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
    239269        bNewPicture       = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag;
    240270        if ( nalu.isSlice() && firstSlice && !sliceSkippedFlag )       
  • branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r852 r854  
    388388  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
    389389  ("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
    390393  ("DefaultOneTargetOutputLayerFlag"  , m_defaultOneTargetOutputLayerIdc  , 0, "Output highest layer of layer sets by default")
     394#endif
    391395  ("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
    392401  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 
     402#endif
    393403  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
    394404 
     
    604614
    605615  // DBP Size
     616#if !H_MV_HLS_7_FIX_SET_DPB_SIZE
    606617  ("SubLayerFlagInfoPresentFlag",  m_subLayerFlagInfoPresentFlag , false                                           , "SubLayerFlagInfoPresentFlag")
     618#endif
    607619  // VPS VUI
    608620  ("VpsVuiPresentFlag"           , m_vpsVuiPresentFlag           , false                                           , "VpsVuiPresentFlag           ")
    609621  ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false                                           , "CrossLayerPicTypeAlignedFlag")  // Could actually be derived by the encoder
    610622  ("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
    611626  ("BitRatePresentVpsFlag"       , m_bitRatePresentVpsFlag       , false                                           , "BitRatePresentVpsFlag       ")
    612627  ("PicRatePresentVpsFlag"       , m_picRatePresentVpsFlag       , false                                           , "PicRatePresentVpsFlag       ")
     
    14081423  }
    14091424
     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
    14101457  xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" );
     1458#endif
    14111459  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" );
    14121460
  • branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r852 r854  
    8989  Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
    9090  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
    9194  Int                    m_defaultOneTargetOutputLayerIdc;    ///< Output highest layer of layer sets by default when equal to 1
     95#endif
    9296  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
    9397  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
    94101  std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
    95102 
     
    99106
    100107  // DBP Size
     108#if !H_MV_HLS_7_FIX_SET_DPB_SIZE
    101109  Bool m_subLayerFlagInfoPresentFlag;
     110#endif
    102111
    103112  // VPS VUI
     
    105114  Bool m_crossLayerPicTypeAlignedFlag;
    106115  Bool m_crossLayerIrapAlignedFlag;
     116#if H_MV_HLS_7_MISC_P0068_21
     117  Bool m_allLayersIdrAlignedFlag;
     118#endif
    107119  Bool m_bitRatePresentVpsFlag;
    108120  Bool m_picRatePresentVpsFlag;
  • branches/HTM-10.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r852 r854  
    127127  xSetRepFormat            ( vps );
    128128  xSetLayerSets            ( vps );
     129#if H_MV_HLS_7_FIX_SET_DPB_SIZE
     130  xSetDpbSize              ( vps );
     131#endif
    129132  xSetVPSVUI               ( vps );
    130133#if H_3D
     
    14911494}
    14921495
     1496#if H_MV_HLS_7_FIX_SET_DPB_SIZE
     1497Void 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
    14931567Void TAppEncTop::xSetDpbSize                ( TComVPS& vps )
    14941568{
     
    15031577    std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );
    15041578    dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag );
    1505 
    15061579    if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) )
    15071580    {
     
    15461619  } 
    15471620}
    1548 
     1621#endif
    15491622
    15501623Void TAppEncTop::xSetLayerSets( TComVPS& vps )
     
    15521625  // Layer sets
    15531626  vps.setVpsNumLayerSetsMinus1   ( m_vpsNumLayerSets - 1 );
     1627#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    15541628  vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );
     1629#endif
    15551630   
    15561631  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     
    15691644  Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size();
    15701645  // 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
    15711651  vps.setDefaultOneTargetOutputLayerIdc   ( m_defaultOneTargetOutputLayerIdc );
    15721652  vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
    15731653  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
    15771707  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++)
    15781708  {
     
    16121742  }
    16131743  vps.deriveTargetLayerIdLists();
     1744#endif
    16141745}
    16151746
     
    16181749  vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag );
    16191750
     1751#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
     1752  TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
     1753  assert( pcVPSVUI );
     1754#endif
     1755
    16201756  if ( m_vpsVuiPresentFlag )
    16211757  {
     1758#if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
    16221759    TComVPSVUI* pcVPSVUI = vps.getVPSVUI(  );
    16231760
    16241761    assert( pcVPSVUI );
    1625 
     1762#endif
    16261763
    16271764    // All this stuff could actually be derived by the encoder,
     
    16301767    pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag );
    16311768    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( m_crossLayerIrapAlignedFlag    );
    1632 
     1769#if H_MV_HLS_7_MISC_P0068_21
     1770    pcVPSVUI->setAllLayersIdrAlignedFlag     ( m_allLayersIdrAlignedFlag      );
     1771#endif
    16331772    pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag );
    16341773    pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag );
     
    16361775    if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    16371776    {
     1777#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1778      for( Int i = 0; i  <=  vps.getVpsNumLayerSetsMinus1(); i++ )
     1779#else
    16381780      for( Int i = 0; i  <=  vps.getVpsNumberLayerSetsMinus1(); i++ )
     1781#endif
    16391782      {
    16401783        for( Int j = 0; j  <=  vps.getMaxTLayers(); j++ )
     
    17541897    pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD
    17551898  }
     1899#if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG
     1900  else
     1901  {
     1902    pcVPSVUI->setCrossLayerIrapAlignedFlag   ( false   );
     1903  }
     1904#endif
    17561905}
    17571906#endif
  • branches/HTM-10.0-dev0/source/Lib/TLibCommon/CommonDef.h

    r852 r854  
    6060
    6161#if H_MV
    62 #define NV_VERSION        "10.0"                ///< Current software version
     62#define NV_VERSION        "10.0"              ///< Current software version
    6363#define HM_VERSION        "13.0"                ///<
    6464#else
  • branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComRom.h

    r852 r854  
    219219 extern UInt64 g_stopAtCounter;         // Counter to set breakpoint.
    220220 extern Bool   g_traceCopyBack;         // Output samples on copy back 
    221  extern Bool   g_decTraceDispDer;       // Trace derived disparity vectors (decoder only)
     221 extern Bool   g_decTraceDispDer; // Trace derived disparity vectors (decoder only)
    222222 extern Bool   g_decTraceMvFromMerge;   // Trace motion vectors obtained from merge (decoder only)
    223223 extern Bool   g_stopAtPos;             // Stop at position
     
    230230#define DTRACE_PU_S(x)             writeToTraceFile( x,   g_tracePU );
    231231#define DTRACE_TU_S(x)             writeToTraceFile( x,   g_traceTU );
     232
    232233
    233234 Void           writeToTraceFile( const Char* symbolName, Int val, Bool doIt );
  • branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp

    r852 r854  
    4141#include <stdio.h>
    4242#include <math.h>
     43
    4344//! \ingroup TLibCommon
    4445//! \{
  • branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComSlice.cpp

    r852 r854  
    103103, m_isDepth                       (false)
    104104#endif
     105#if !H_MV_HLS7_GEN
    105106, m_pocResetFlag                  (false)
     107#endif
    106108#if H_MV
    107109, m_crossLayerBlaFlag             (false)
     
    10321034#if H_MV
    10331035  // Additional slice header syntax elements
     1036#if !H_MV_HLS7_GEN
    10341037  m_pocResetFlag               = pSrc->m_pocResetFlag;
     1038#endif
    10351039  m_discardableFlag            = pSrc->m_discardableFlag;
    10361040  m_interLayerPredEnabledFlag  = pSrc->m_interLayerPredEnabledFlag;
     
    17071711    }
    17081712  }
    1709 
     1713#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    17101714  m_vpsNumberLayerSetsMinus1     = -1;
     1715#endif
    17111716  m_vpsNumProfileTierLevelMinus1 = -1;
    17121717   
     1718#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    17131719  for ( Int i = 0; i < MAX_VPS_PROFILE_TIER_LEVEL; i++)
    17141720  {
     1721#if !H_MV_HLS_7_VPS_P0048_14
    17151722    m_profileRefMinus1[ i ] = -1;
     1723#endif
    17161724  }
    17171725   
     
    17191727  m_numAddOutputLayerSetsMinus1        = -1;   
    17201728  m_defaultOneTargetOutputLayerIdc     = 0;
     1729#else
     1730  m_numAddOutputLayerSets              = -1;   
     1731  m_defaultTargetOutputLayerIdc     = 0;
     1732#endif
    17211733 
    17221734  for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++)
     
    17281740      m_outputLayerFlag[i][j] = false;
    17291741    }
    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
    17311747  m_altOutputLayerFlag       = false;
     1748#endif
    17321749  m_maxOneActiveRefLayerFlag = false;
    17331750  m_directDepTypeLenMinus2   = 0;         
     
    17351752
    17361753  m_avcBaseLayerFlag = false;
     1754#if !H_MV_HLS7_GEN
    17371755  m_vpsVuiOffset     = 0;
     1756#endif
    17381757  m_splittingFlag    = false;
    17391758 
     
    17491768  {
    17501769    m_vpsProfilePresentFlag   [i] = false;
     1770#if !H_MV_HLS_7_VPS_P0048_14
    17511771    m_profileRefMinus1[i] = 0;
     1772#endif
    17521773    m_outputLayerSetIdxMinus1       [i] = 0;
    17531774    for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ )
     
    20602081Int    TComVPS::getNumOutputLayerSets()
    20612082{
     2083#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     2084  return getNumAddOutputLayerSets() + getVpsNumLayerSetsMinus1() + 1;
     2085#else
    20622086  Int numOutputLayerSets = getVpsNumberLayerSetsMinus1( ) + 1;
    20632087  if ( getMoreOutputLayerSetsThanDefaultFlag( ) )
     
    20662090}
    20672091  return numOutputLayerSets;
     2092#endif
    20682093}
    20692094
     
    21132138}
    21142139
    2115 Void TComVPS::deriveTargetLayerIdLists()
     2140#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     2141Void TComVPS::initTargetLayerIdLists()
    21162142{
    21172143  m_targetDecLayerIdLists.resize( getNumOutputLayerSets() );
    21182144  m_targetOptLayerIdLists.resize( getNumOutputLayerSets() );
     2145}
     2146
     2147Void 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
     2161Void TComVPS::deriveTargetLayerIdLists()
     2162{
     2163  m_targetDecLayerIdLists.resize( getNumOutputLayerSets() );
     2164  m_targetOptLayerIdLists.resize( getNumOutputLayerSets() );
    21192165
    21202166  for (Int targetOptLayerSetIdx = 0; targetOptLayerSetIdx < getNumOutputLayerSets(); targetOptLayerSetIdx++ )
     
    21332179  }
    21342180}
     2181#endif
     2182
    21352183#endif // H_MV
    21362184
     
    23852433{
    23862434  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
    23872443}
    23882444
     
    29032959    // Consider to check here:
    29042960    // "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
    29052964  }
    29062965}
     
    30773136  Int numActiveRefLayerPics;
    30783137
     3138#if H_MV_HLS_7_MISC_P0079_18
     3139  if( getLayerId() == 0 || getNumRefLayerPics() ==  0 )
     3140#else
    30793141  if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerId() ) ==  0 )
     3142#endif
    30803143  {
    30813144    numActiveRefLayerPics = 0;
     
    30913154  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 )
    30923155  {
     3156#if H_MV_HLS_7_MISC_P0079_18
     3157    numActiveRefLayerPics = 1;
     3158#else
    30933159    numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0;
     3160#endif
    30943161  }
    30953162  else
     
    37493816{
    37503817  m_crossLayerIrapAlignedFlag = true;
     3818#if H_MV_HLS_7_MISC_P0068_21
     3819  m_allLayersIdrAlignedFlag   = false;
     3820#endif
    37513821  m_bitRatePresentVpsFlag = false;
    37523822  m_picRatePresentVpsFlag = false;
     
    37753845      m_minHorizontalCtuOffsetPlus1 [i][j] = -1;
    37763846    }
     3847#if H_MV_HLS_7_MISC_P0182_13
     3848    m_baseLayerParameterSetCompatibilityFlag[i] = false;
     3849#endif
    37773850  }
    37783851  for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ )
  • branches/HTM-10.0-dev0/source/Lib/TLibCommon/TComSlice.h

    r852 r854  
    473473  Bool m_crossLayerPicTypeAlignedFlag;
    474474  Bool m_crossLayerIrapAlignedFlag;
     475#if H_MV_HLS_7_MISC_P0068_21
     476  Bool m_allLayersIdrAlignedFlag;
     477#endif
    475478  Bool m_bitRatePresentVpsFlag;
    476479  Bool m_picRatePresentVpsFlag;
     
    481484  Int  m_constantPicRateIdc          [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER];
    482485  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
    483492  Bool m_tilesNotInUseFlag;
    484493  Bool m_tilesInUseFlag              [MAX_NUM_LAYERS];
     
    491500  Bool m_ctuBasedOffsetEnabledFlag   [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    492501  Int  m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
     502#if !H_MV_HLS_7_VPS_P0076_15
    493503  Bool m_videoSignalInfoIdxPresentFlag;
    494504  Int  m_vpsNumVideoSignalInfoMinus1;
    495505  TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO];   
    496506  Int  m_vpsVideoSignalInfoIdx       [MAX_NUM_VIDEO_SIGNAL_INFO];
     507#endif
    497508  Bool m_vpsVuiBspHrdPresentFlag;
    498509  TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters;
     510#if H_MV_HLS_7_MISC_P0182_13
     511  Bool m_baseLayerParameterSetCompatibilityFlag[MAX_NUM_LAYERS];
     512#endif
    499513
    500514public:
     
    507521  Bool getCrossLayerIrapAlignedFlag(  ) { return m_crossLayerIrapAlignedFlag; }
    508522
     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
    509528  Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; }
    510529  Bool getBitRatePresentVpsFlag(  ) { return m_bitRatePresentVpsFlag; }
     
    531550  Int  getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; }
    532551
     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
    533566  Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; }
    534567  Bool getTilesNotInUseFlag(  ) { return m_tilesNotInUseFlag; }
     
    560593  Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int  val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; }
    561594  Int  getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; }
    562 
     595#if !H_MV_HLS_7_VPS_P0076_15
    563596  Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; }
    564597  Bool getVideoSignalInfoIdxPresentFlag(  ) { return m_videoSignalInfoIdxPresentFlag; }
     
    572605  Void setVpsVideoSignalInfoIdx( Int i, Int  val ) { m_vpsVideoSignalInfoIdx[i] = val; }
    573606  Int  getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; }
    574 
     607#endif
    575608  Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; }
    576609  Bool getVpsVuiBspHrdPresentFlag(  ) { return m_vpsVuiBspHrdPresentFlag; }
     
    578611  Void setVpsVuiBspHrdParameters( TComVpsVuiBspHrdParameters* val) {  m_vpsVuiBspHrdParameters = val; }
    579612  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
    580634};
    581635
     
    626680  Int   m_maxVpsDecPicBufferingMinus1[MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYER_IDS][MAX_TLAYER];;
    627681  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
    628685  Int   m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER];
    629686
     
    660717  Void setMaxVpsNumReorderPics( Int i, Int j, Int  val ) { m_maxVpsNumReorderPics[i][j] = val; }
    661718  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
    663723  Void setMaxVpsLatencyIncreasePlus1( Int i, Int j, Int  val ) { m_maxVpsLatencyIncreasePlus1[i][j] = val; }
    664724  Int  getMaxVpsLatencyIncreasePlus1( Int i, Int j ) { return m_maxVpsLatencyIncreasePlus1[i][j]; }
     
    708768  /// VPS EXTENSION SYNTAX ELEMENTS
    709769  Bool        m_avcBaseLayerFlag;
     770#if !H_MV_HLS7_GEN
    710771  Int         m_vpsVuiOffset;
     772#endif
    711773  Bool        m_splittingFlag;
    712774  Bool        m_scalabilityMaskFlag          [MAX_NUM_SCALABILITY_TYPES];
     
    724786  Int         m_maxTidIlRefPicsPlus1     [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    725787  Bool        m_allRefLayersActiveFlag;
     788#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    726789  Int         m_vpsNumberLayerSetsMinus1;
     790#endif
    727791  Int         m_vpsNumProfileTierLevelMinus1;   
    728792  Bool        m_vpsProfilePresentFlag    [MAX_VPS_OP_SETS_PLUS1];
     793
     794#if !H_MV_HLS_7_VPS_P0048_14
    729795  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 
    730801  Bool        m_moreOutputLayerSetsThanDefaultFlag;
    731802  Int         m_numAddOutputLayerSetsMinus1;   
    732803  Int         m_defaultOneTargetOutputLayerIdc;
     804#endif
     805
    733806  Int         m_outputLayerSetIdxMinus1  [MAX_VPS_OUTPUTLAYER_SETS]; 
    734807  Bool        m_outputLayerFlag          [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1];
    735808  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
    736812  Bool        m_altOutputLayerFlag;
     813#endif
    737814  Bool        m_repFormatIdxPresentFlag;
    738815  Int         m_vpsNumRepFormatsMinus1;
     
    740817  TComRepFormat* m_repFormat             [MAX_NUM_LAYERS];
    741818  Bool        m_maxOneActiveRefLayerFlag;       
     819#if H_MV_HLS7_GEN
     820  Bool        m_vpsPocLsbAlignedFlag;
     821#endif
    742822  Bool        m_pocLsbNotPresentFlag     [MAX_NUM_LAYERS];
    743823
     
    746826  Bool        m_defaultDirectDependencyFlag;
    747827  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
    748833  Bool        m_vpsVuiPresentFlag;
    749834  TComVPSVUI* m_vpsVUI;
     835#if !H_MV_HLS7_GEN
    750836  Int         m_directDependencyType     [MAX_NUM_LAYERS] [MAX_NUM_LAYERS];
     837#endif
    751838
    752839  // VPS EXTENSION SEMANTICS VARIABLES
     
    886973  Bool    getAvcBaseLayerFlag()                                            { return m_avcBaseLayerFlag; }
    887974
     975#if !H_MV_HLS7_GEN
    888976  Void    setVpsVuiOffset( Int  val )                                      { m_vpsVuiOffset = val; }
    889977  Int     getVpsVuiOffset(  )                                              { return m_vpsVuiOffset; }
     978#endif
    890979
    891980  Void    setSplittingFlag( Bool val )                                     { m_splittingFlag = val;  }
     
    9291018  Void    setAllRefLayersActiveFlag( Bool flag )                           { m_allRefLayersActiveFlag = flag; }
    9301019  Bool    getAllRefLayersActiveFlag(  )                                    { return m_allRefLayersActiveFlag; }
     1020 
     1021#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    9311022  Void    setVpsNumberLayerSetsMinus1( Int val )                           { m_vpsNumberLayerSetsMinus1 = val;  }
    9321023  Int     getVpsNumberLayerSetsMinus1( )                                   { return m_vpsNumberLayerSetsMinus1; }
     1024#endif
    9331025 
    9341026  Void    setVpsNumProfileTierLevelMinus1( Int val )                       { m_vpsNumProfileTierLevelMinus1 = val;  }
     
    9381030  Bool    getVpsProfilePresentFlag( Int idx )                              { return m_vpsProfilePresentFlag[idx]; }
    9391031
     1032#if !H_MV_HLS_7_VPS_P0048_14
    9401033  Void    setProfileRefMinus1( Int profileTierLevelIdx, Int val )          { m_profileRefMinus1[ profileTierLevelIdx ] = val;  }
    9411034  Int     getProfileRefMinus1( Int profileTierLevelIdx )                   { return m_profileRefMinus1[ profileTierLevelIdx ]; }
    9421035  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
    9431039  Void    setMoreOutputLayerSetsThanDefaultFlag( Bool flag )               { m_moreOutputLayerSetsThanDefaultFlag = flag; }
    9441040  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
    9461047  Void    setNumAddOutputLayerSetsMinus1( Int val )                        { m_numAddOutputLayerSetsMinus1 = val; }
    9471048  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
    9491055  Void    setDefaultOneTargetOutputLayerIdc( Int  val )                    { m_defaultOneTargetOutputLayerIdc = val; }
    9501056  Int     getDefaultOneTargetOutputLayerIdc(  )                            { return m_defaultOneTargetOutputLayerIdc; }
    9511057  Void    checkDefaultOneTargetOutputLayerIdc( )                           { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); }
     1058#endif
    9521059 
    9531060  Void    setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val )        { m_outputLayerSetIdxMinus1[ outLayerSetIdx ]  = val; }
     
    9561063  Void    setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag )       { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; }
    9571064  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
    9581094  Bool    inferOutputLayerFlag( Int layerSetIdx, Int i )                   { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1  ) ));  }
     1095#endif
    9591096
    9601097  Void    setProfileLevelTierIdx( Int outLayerSetIdx, Int val )            { m_profileLevelTierIdx[ outLayerSetIdx ] = val; }
    9611098  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
    9621104  Void    setAltOutputLayerFlag( Bool flag )                               { m_altOutputLayerFlag = flag; }
    9631105  Bool    getAltOutputLayerFlag(  )                                        { return m_altOutputLayerFlag; }
     1106#endif
    9641107
    9651108  Void    setRepFormatIdxPresentFlag( Bool flag )                          { m_repFormatIdxPresentFlag = flag; }
     
    9771120  Bool    getMaxOneActiveRefLayerFlag( )                                   { return m_maxOneActiveRefLayerFlag; }
    9781121
     1122#if H_MV_HLS7_GEN
     1123  Void    setVpsPocLsbAlignedFlag( Bool flag )                             { m_vpsPocLsbAlignedFlag = flag; }
     1124  Bool    getVpsPocLsbAlignedFlag(  )                                      { return m_vpsPocLsbAlignedFlag; }
     1125#endif
     1126
    9791127  Void    setDpbSize( TComDpbSize* val )                                   { assert( m_dpbSize != 0 ); m_dpbSize = val; }
    9801128  TComDpbSize* getDpbSize( )                                               { return m_dpbSize;}
     
    9921140  Void    setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; }
    9931141  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
    9941148  Void    setVpsVuiPresentFlag( Bool flag )                                { m_vpsVuiPresentFlag = flag; }
    9951149  Bool    getVpsVuiPresentFlag(  )                                         { return m_vpsVuiPresentFlag; }
     
    10211175  Bool    isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh );   
    10221176  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
    10231190  Void    deriveTargetLayerIdLists();
    10241191  std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx )     { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; };
    10251192  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
    10271208
    10281209  // inference
     
    10491230  UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
    10501231  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
    10511235  Bool hasCamParInSliceHeader( Int viewIndex )  { return m_bCamParInSliceHeader[viewIndex]; }
    10521236  Void setHasCamParInSliceHeader( Int viewIndex, Bool b )  { m_bCamParInSliceHeader[viewIndex] = b; }
     
    17531937  Bool m_ppsInferScalingListFlag;
    17541938  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
    17551946#endif
    17561947
     
    18942085  Void setPpsScalingListRefLayerId( Int  val ) { m_ppsScalingListRefLayerId = val; }
    18952086  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
    18962098#endif
    18972099};
     
    20302232
    20312233// Additional slice header syntax elements
     2234#if !H_MV_HLS7_GEN
    20322235  Bool       m_pocResetFlag;
     2236#endif
    20332237  Bool       m_crossLayerBlaFlag;
    20342238  Bool       m_discardableFlag;
     
    20362240  Int        m_numInterLayerRefPicsMinus1;
    20372241  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
    20382254  Int        m_aaiCodedScale [2][MAX_NUM_LAYERS];
    20392255  Int        m_aaiCodedOffset[2][MAX_NUM_LAYERS];
     2256#endif
    20402257#if H_3D_TMVP
    20412258  Int        m_aiAlterRefIdx   [2];
     
    23632580  }
    23642581
     2582#if !H_MV_HLS7_GEN
    23652583  Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; }
    23662584  Bool getPocResetFlag(  ) { return m_pocResetFlag; }
     2585#endif
    23672586
    23682587  Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; }
     
    23772596  Void setInterLayerPredLayerIdc( Int i, Int  val ) { m_interLayerPredLayerIdc[i] = val; }
    23782597  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
    23792622
    23802623  // Additional variables derived in slice header semantics
     
    23952638  Void     setRefPicSetInterLayer       ( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1);
    23962639  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
    23992646#if MTK_DDD_G0063
    24002647  Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int  iCodedScale,Int  iCodedOffset, Int iBaseViewIdx );
  • branches/HTM-10.0-dev0/source/Lib/TLibCommon/TypeDef.h

    r852 r854  
    327327///////////////////////////////////   HTM-10.1 Integrations //////////////////////////////
    328328/////////////////////////////////////////////////////////////////////////////////////////
    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!
    330379#if H_3D
    331380#define H_3D_FIX_G0148_BRACE              1
     
    857906#if H_MV
    858907
     908#if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION
     909enum 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
    859922  enum PsExtensionTypes
    860923  {
  • branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r852 r854  
    366366
    367367  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
    368409  if (uiCode)
    369410  {
     
    382423#endif
    383424  }
     425#endif
    384426}
    385427
     
    807849  assert(uiCode <= 12);
    808850
     851#if H_MV_HLS_7_SPS_P0155_16_32
     852  if ( pcSPS->getLayerId() == 0 )
     853  { 
     854#endif
    809855  UInt subLayerOrderingInfoPresentFlag;
    810856  READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag");
     
    842888    }
    843889  }
     890#if H_MV_HLS_7_SPS_P0155_16_32
     891  }
     892#endif
    844893
    845894  READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" );
     
    10041053    READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode );
    10051054    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
    10061058  }
    10071059}
     
    10391091  READ_FLAG(     uiCode,  "vps_temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
    10401092  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    1041 #if H_MV
     1093
     1094
     1095#if H_MV && !H_MV_HLS7_GEN
    10421096  READ_CODE( 16, uiCode,  "vps_extension_offset" );               
    10431097#else
     
    11541208  UInt uiCode;
    11551209  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() )
    11571213  { 
    11581214  READ_CODE( 16, uiCode, "vps_vui_offset" );                      pcVPS->setVpsVuiOffset( uiCode );
    11591215  }
     1216#endif
    11601217
    11611218  READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
     
    12331290  if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
    12341291  {
    1235     for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )
     1292    for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
    12361293    {
    12371294      READ_CODE( 3, uiCode, "sub_layers_vps_max_minus1" ); pcVPS->setSubLayersVpsMaxMinus1( i, uiCode );   
     
    12421299  else
    12431300  {
    1244     for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )
     1301    for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
    12451302    {
    12461303      pcVPS->setSubLayersVpsMaxMinus1( i, pcVPS->getMaxTLayers( ) - 1);   
     
    12641321
    12651322  READ_FLAG( uiCode, "all_ref_layers_active_flag" );             pcVPS->setAllRefLayersActiveFlag( uiCode == 1 );
     1323#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    12661324  READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1"      );  pcVPS->setVpsNumberLayerSetsMinus1    ( uiCode );
     1325#endif
     1326
     1327#if !H_MV_HLS7_GEN
    12671328  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
    12691332  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    12701333  {
    12711334    READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
     1335#if !H_MV_HLS_7_VPS_P0048_14
    12721336    if( !pcVPS->getVpsProfilePresentFlag( i ) )
    12731337    {
     
    12751339      pcVPS->checkProfileRefMinus1( i );     
    12761340    }
     1341#endif
    12771342    parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
    12781343    if( !pcVPS->getVpsProfilePresentFlag( i ) )
    12791344    {
    12801345      TComPTL temp = *pcVPS->getPTL( i );
     1346#if H_MV_HLS_7_VPS_P0048_14
     1347      *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 );
     1348#else
    12811349      *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );
     1350#endif
    12821351      pcVPS->getPTL( i )->copyLevelFrom( &temp );
    12831352    }
    12841353  }
    12851354
     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
    12861364  Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
    12871365
     
    12991377    pcVPS->checkDefaultOneTargetOutputLayerIdc();
    13001378  } 
     1379#endif
    13011380
    13021381  pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 ));
    13031382  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
    13041390  for( Int i = 1; i < numOutputLayerSets; i++ )
    13051391  {
    13061392    if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
     1393#endif
    13071394    {       
    13081395      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
    13091415      for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
    13101416      {
     
    13201426      }
    13211427    }
    1322 
     1428#endif
    13231429    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    13241430    {     
    13251431      READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" );   pcVPS->setProfileLevelTierIdx( i , uiCode );
    13261432    }
     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
    13271441  }
    13281442  if( pcVPS->getMaxLayersMinus1() > 0 )
     
    13301444    READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );
    13311445  }
     1446#endif
     1447
     1448#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    13321449  pcVPS->deriveTargetLayerIdLists();
     1450#endif
     1451
    13331452  READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );
    13341453  if ( pcVPS->getRepFormatIdxPresentFlag() )
    13351454  {
     1455#if H_MV_HLS7_GEN
     1456    READ_UVLC( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
     1457#else
    13361458    READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );
     1459#endif
    13371460  }
    13381461
     
    13581481
    13591482  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
    13601486  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    13611487  {
     
    13661492  }
    13671493
     1494#if H_MV_HLS_7_RESERVED_FLAGS
     1495  READ_FLAG( uiCode, "vps_reserved_zero_flag" );
     1496#endif
    13681497  parseDpbSize( pcVPS );
    13691498
     
    13941523  } 
    13951524
     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
    13961534  READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" );
    1397 
     1535#endif
    13981536  if( pcVPS->getVpsVuiPresentFlag() )
    13991537  {
     
    14011539    parseVPSVUI( pcVPS );
    14021540  }     
     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
    14031548
    14041549  pcVPS->checkVPSExtensionSyntax();
     
    14481593    READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 );
    14491594  }
     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
    14501601  READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 );
    14511602  READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 );
    14521603  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    14531604  {
     1605#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1606    for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
     1607#else
    14541608    for( Int i = 0; i  <=  pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
     1609#endif
    14551610    {
    14561611      for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
     
    14771632    }
    14781633  }
     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
    14791670
    14801671  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 );
     
    15131704  }
    15141705
     1706#if H_MV_HLS_7_RESERVED_FLAGS
     1707  READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" );
     1708#endif
     1709
    15151710  READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 );
    15161711
     
    15341729  }
    15351730
     1731#if !H_MV_HLS_7_VPS_P0076_15
    15361732  READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );
    15371733  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     
    15671763    }
    15681764  }
     1765#endif
    15691766  READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 );
    15701767  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
     
    15721769    parseVpsVuiBspHrdParameters( pcVPS );
    15731770}
     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
    15741780}
    15751781
     
    16501856  { 
    16511857    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
    16531861    for( Int j = 0; j  <=  vps->getMaxTLayers() - 1 ; j++ )
     1862#endif
    16541863    { 
    16551864      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    16591868      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    16601869      { 
     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
    16611873        for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
     1874#endif
    16621875        {
    16631876          READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );
    16641877        }
    16651878        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
    16661888        READ_UVLC( uiCode, "max_vps_latency_increase_plus1" ); dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode );
    16671889      }
     
    17041926#if H_3D_SPIVMP
    17051927#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);
    17071929#else
    17081930        READ_UVLC (uiCode, "log2_sub_PU_size_minus2");     pcVPS->setSubPULog2Size(i, uiCode+2);
     
    17611983  for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)
    17621984  {
     1985#if FIX_CAM_PARS_COLLECTOR
     1986    pcVPS->setCamParPresent         ( viewIndex, false );
     1987    pcVPS->setHasCamParInSliceHeader( viewIndex, false );
     1988#endif
    17631989    READ_FLAG( uiCode, "cp_present_flag[i]" );                  bCamParPresentFlag = ( uiCode == 1);
    17641990    if ( bCamParPresentFlag )
     
    18902116    rpcSlice->checkCrossLayerBlaFlag( );
    18912117
     2118#if !H_MV_HLS7_GEN
    18922119    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
    18932120    {
     
    18952122      READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );
    18962123    }
     2124#endif
    18972125
    18982126    for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++)   
     
    24922720  if(pps->getSliceHeaderExtensionPresentFlag())
    24932721  {
     2722#if !H_MV_HLS7_GEN   
    24942723    READ_UVLC(uiCode,"slice_header_extension_length");
    2495 
    24962724    for(Int i=0; i<uiCode; i++)
    24972725    {
     
    25002728    }
    25012729  }
     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
    25022777
    25032778  m_pcBitstream->readByteAlignment();
  • branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r852 r854  
    3737
    3838#include "TDecCu.h"
     39
    3940//! \ingroup TLibDecoder
    4041//! \{
     
    638639 
    639640  m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth );
    640 
     641 
    641642#if H_MV_ENC_DEC_TRAC
    642643#if ENC_DEC_TRACE
     
    927928  }
    928929#endif
    929 
     930 
    930931#if H_3D && UPDATE_HM13
    931932  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  
    4343#include "libmd5/MD5.h"
    4444#include "TLibCommon/SEI.h"
     45
    4546#include <time.h>
    4647
  • branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecTop.cpp

    r852 r854  
    5151  m_aaiCodedOffset         = new Int* [ MAX_NUM_LAYERS ];
    5252  m_aaiCodedScale          = new Int* [ MAX_NUM_LAYERS ];
     53#if !FIX_CAM_PARS_COLLECTOR
    5354  m_aiViewId               = new Int  [ MAX_NUM_LAYERS ];
    5455
    5556  m_bViewReceived          = new Bool [ MAX_NUM_LAYERS ];
     57#endif
    5658  for( UInt uiId = 0; uiId < MAX_NUM_LAYERS; uiId++ )
    5759  {
     
    6365  m_iLog2Precision   = LOG2_DISP_PREC_LUT;
    6466  m_uiBitDepthForLUT = 8; // fixed
     67#if FIX_CAM_PARS_COLLECTOR
     68  m_receivedIdc = NULL;
     69  m_vps         = NULL;
     70#endif
    6571}
    6672
     
    7480  delete [] m_aaiCodedOffset;
    7581  delete [] m_aaiCodedScale;
     82#if !FIX_CAM_PARS_COLLECTOR
    7683  delete [] m_aiViewId; 
    7784  delete [] m_bViewReceived;
     85#endif
    7886
    7987  xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 );
    8088  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
     96Void
     97CamParsCollector::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
     147Void
     148CamParsCollector::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
    83162Void
    84163CamParsCollector::init( FILE* pCodedScaleOffsetFile )
     
    92171  m_uiMaxViewIndex             = 0;
    93172}
     173#endif
     174
     175
    94176
    95177Void
     
    124206  CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT)
    125207{
     208#if FIX_CAM_PARS_COLLECTOR
     209  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
     210#else
    126211  Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
     212#endif
    127213  Int     iLog2DivChroma = iLog2DivLuma + 1;
    128214
     
    166252}
    167253
     254#if !FIX_CAM_PARS_COLLECTOR
    168255Void
    169256CamParsCollector::setSlice( TComSlice* pcSlice )
     
    284371}
    285372
     373#else
     374Void
     375CamParsCollector::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
    286445#if H_3D_IV_MERGE
    287446Void
     
    295454#endif
    296455
     456#if !FIX_CAM_PARS_COLLECTOR
    297457Bool
    298458CamParsCollector::xIsComplete()
     
    307467  return true;
    308468}
     469#endif
    309470
    310471Void
     
    313474  if( m_pCodedScaleOffsetFile )
    314475  {
     476#if FIX_CAM_PARS_COLLECTOR
     477    if( iPOC == m_firstReceivedPoc )
     478#else
    315479    if( iPOC == 0 )
     480#endif
    316481    {
    317482      fprintf( m_pCodedScaleOffsetFile, "#  ViewIndex       ViewId\n" );
    318483      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );
     484#if FIX_CAM_PARS_COLLECTOR
    319485      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
    320486      {
     487        fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) );
     488#else       
     489      for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )
     490      {
    321491        fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_aiViewId[ uiViewIndex ] );
     492#endif
    322493      }
    323494      fprintf( m_pCodedScaleOffsetFile, "\n\n");
     
    325496      fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );
    326497    }
     498#if FIX_CAM_PARS_COLLECTOR
     499    if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime  )
     500#else
    327501    if( iPOC == 0 || m_bCamParsVaryOverTime )
     502#endif
    328503    {
    329504      Int iS = iPOC;
     
    335510          if( uiViewIndex != uiBaseIndex )
    336511          {
     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
    337519            fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",
    338520              iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_uiCamParsCodedPrecision );
     521#endif
     522
    339523          }
    340524        }
     
    457641  for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++)
    458642  {
     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
    459646    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
    462667  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer());     // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
     668#endif
    463669  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
    464670  {
  • branches/HTM-10.0-dev0/source/Lib/TLibDecoder/TDecTop.h

    r852 r854  
    7171  ~CamParsCollector ();
    7272
     73#if FIX_CAM_PARS_COLLECTOR
     74  Void  init        ( FILE* pCodedScaleOffsetFile, TComVPS* vps );
     75#else
    7376  Void  init        ( FILE* pCodedScaleOffsetFile );
     77#endif
     78
    7479  Void  uninit      ();
    7580  Void  setSlice    ( TComSlice* pcSlice );
     
    8590  Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];}
    8691  Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];}
    87   UInt getCamParsCodedPrecision(){ return m_uiCamParsCodedPrecision; }
     92  UInt getCamParsCodedPrecision(){ return m_vps->getCamParPrecision(); }
    8893#endif
    8994
    9095private:
     96#if FIX_CAM_PARS_COLLECTOR
     97  Void xResetReceivedIdc( Bool overWriteFlag );
     98#else
    9199  Bool  xIsComplete ();
     100#endif
    92101  Void  xOutput     ( Int iPOC );
    93102
     
    98107  Int**   m_aaiCodedOffset;
    99108  Int**   m_aaiCodedScale;
     109 
     110#if !FIX_CAM_PARS_COLLECTOR
    100111  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
    102122  Bool*   m_bViewReceived;
    103123  UInt    m_uiCamParsCodedPrecision;
     124#endif
    104125  Bool    m_bCamParsVaryOverTime;
     126#if !FIX_CAM_PARS_COLLECTOR
    105127  Int     m_iLastViewIndex;
    106128  Int     m_iLastPOC;
    107129  UInt    m_uiMaxViewIndex;
     130#endif
    108131
    109132
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r852 r854  
    279279  WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag");
    280280
     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
    281313#if !H_3D
    282314  WRITE_FLAG( 0, "pps_extension_flag" );
     
    285317  codePPSExtension( pcPPS );
    286318  WRITE_FLAG( 0, "pps_extension2_flag" );
     319#endif
    287320#endif
    288321}
     
    433466            else
    434467            {
    435               WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[layerId]");    // num_entry
     468              WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[i]");    // num_entry
    436469
    437470#if !H_3D_DELTA_DLT
     
    699732#endif
    700733  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
    702738  const Bool subLayerOrderingInfoPresentFlag = 1;
    703739  WRITE_FLAG(subLayerOrderingInfoPresentFlag,       "sps_sub_layer_ordering_info_present_flag");
     
    712748    }
    713749  }
     750#if H_MV_HLS_7_SPS_P0155_16_32
     751  }
     752#endif
     753
    714754  assert( pcSPS->getMaxCUWidth() == pcSPS->getMaxCUHeight() );
    715755 
     
    838878    WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" );
    839879    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
    840883  }
    841884}
     
    868911  WRITE_FLAG( pcVPS->getTemporalNestingFlag(),                "vps_temporal_id_nesting_flag" );
    869912  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    870 #if H_MV
     913#if H_MV && !H_MV_HLS7_GEN
    871914  WRITE_CODE( 0xffff,                              16,        "vps_extension_offset" );
    872915#else
     
    9701013{
    9711014  WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0,          "avc_base_layer_flag" );
     1015#if !H_MV_HLS7_GEN
    9721016  WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );
    9731017  if ( pcVPS->getVpsVuiPresentFlag() )
     
    9751019  WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16,                 "vps_vui_offset" );  // TBD
    9761020  }
     1021#endif
     1022
    9771023  WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0,             "splitting_flag" );
    9781024 
     
    10491095  if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() )
    10501096  {
    1051     for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )
     1097    for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
    10521098    {
    10531099      WRITE_CODE( pcVPS->getSubLayersVpsMaxMinus1( i ), 3, "sub_layers_vps_max_minus1" );
     
    10571103  else
    10581104  {
    1059     for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )
     1105    for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )
    10601106    {
    10611107      assert( pcVPS->getSubLayersVpsMaxMinus1( i ) + 1 == pcVPS->getMaxTLayers( ) );   
     
    10791125
    10801126  WRITE_FLAG( pcVPS->getAllRefLayersActiveFlag( ) ? 1 : 0 , "all_ref_layers_active_flag" );
     1127#if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
    10811128  WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( )    , 10,    "vps_number_layer_sets_minus1"      );
     1129#endif
     1130
     1131#if !H_MV_HLS7_GEN
    10821132  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
    10831136
    10841137  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
    10851138  {
    10861139    WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" );
     1140#if !H_MV_HLS_7_VPS_P0048_14
    10871141    if( !pcVPS->getVpsProfilePresentFlag( i ) )
    10881142    {   
     
    10901144      pcVPS->checkProfileRefMinus1( i );     
    10911145    }
     1146#endif
    10921147    codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );
    10931148  }
    10941149
     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
    10951163  Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
    10961164
     
    11081176    pcVPS->checkDefaultOneTargetOutputLayerIdc();
    11091177  } 
     1178#endif
    11101179
    11111180  assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 ));
    11121181  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
    11131189  for( Int i = 1; i < numOutputLayerSets; i++ )
    11141190  {
    11151191    if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
     1192#endif
    11161193    {     
    11171194      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
    11181214      for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ )
    11191215      {
     
    11291225      }
    11301226    }
    1131 
     1227#endif
    11321228    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
    11331229    {     
    11341230      WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" );   
    11351231    }
     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
    11361239  }
    11371240
     
    11401243    WRITE_FLAG( pcVPS->getAltOutputLayerFlag( ) ? 1 : 0 , "alt_output_layer_flag" );
    11411244  }
     1245#endif
     1246
     1247
     1248
     1249
    11421250
    11431251  WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" );
    11441252  if ( pcVPS->getRepFormatIdxPresentFlag() )
    11451253  {
     1254#if H_MV_HLS7_GEN
     1255    WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" );
     1256#else
    11461257    WRITE_CODE( pcVPS->getVpsNumRepFormatsMinus1( ), 4, "vps_num_rep_formats_minus1" );
     1258#endif
    11471259  }
    11481260
     
    11661278
    11671279  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
    11681283  for( Int i = 1; i  <=  pcVPS->getMaxLayersMinus1(); i++ )
    11691284  {
     
    11731288    }
    11741289  }
     1290#if H_MV_HLS_7_RESERVED_FLAGS
     1291  WRITE_FLAG( 0, "vps_reserved_zero_flag" );
     1292#endif
    11751293  codeDpbSize( pcVPS );
    11761294
     
    12021320    }
    12031321  } 
     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 
    12041327    WRITE_FLAG ( 0,                                      "vps_shvc_reserved_zero_flag" );
    1205 
     1328#endif
    12061329    if( pcVPS->getVpsVuiPresentFlag() )
    12071330    {
     
    12091332      codeVPSVUI( pcVPS );
    12101333    }     
     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
    12111341}
    12121342Void TEncCavlc::codeVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo )
     
    12281358  { 
    12291359    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
    12311363    for( Int j = 0; j  <=  vps->getMaxTLayers() - 1 ; j++ )
     1364#endif
    12321365    { 
    12331366      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     
    12371370      if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) )
    12381371      { 
     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
    12391375        for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   // Preliminary fix does not match with spec
     1376#endif
    12401377        {
    12411378          WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );
    12421379        }
    12431380        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
    12441390        WRITE_UVLC( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ), "max_vps_latency_increase_plus1" );
    12451391      }
     
    12481394        if ( j > 0 )
    12491395        {
     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
    12501399          for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )   
     1400#endif
    12511401          {
    12521402            assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) );
     
    13001450    WRITE_FLAG( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" );
    13011451  }
    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
    13031458  WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" );
    13041459  WRITE_FLAG( pcVPSVUI->getPicRatePresentVpsFlag( ) ? 1 : 0 , "pic_rate_present_vps_flag" );
    13051460  if( pcVPSVUI->getBitRatePresentVpsFlag( )  ||  pcVPSVUI->getPicRatePresentVpsFlag( ) )
    13061461  {
     1462#if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27
     1463    for( Int i = 0; i  <=  pcVPS->getVpsNumLayerSetsMinus1(); i++ )
     1464#else
    13071465    for( Int i = 0; i  <=  pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
     1466#endif
    13081467    {
    13091468      for( Int j = 0; j  <=  pcVPS->getMaxTLayers(); j++ )
     
    13311490  }
    13321491
     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
    13331527  WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" );
    13341528  if( !pcVPSVUI->getTilesNotInUseFlag() )
     
    13651559    }
    13661560  }
     1561#if H_MV_HLS_7_RESERVED_FLAGS
     1562  WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" );
     1563#endif
    13671564  WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" );
    13681565
     
    13851582    }
    13861583  }
     1584
     1585#if !H_MV_HLS_7_VPS_P0076_15
    13871586  WRITE_FLAG( pcVPSVUI->getVideoSignalInfoIdxPresentFlag( ) ? 1 : 0 , "video_signal_info_idx_present_flag" );
    13881587  if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )
     
    14171616    }
    14181617  }
     1618#endif
    14191619  WRITE_FLAG( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ? 1 : 0 , "vps_vui_bsp_hrd_present_flag" );
    14201620  if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) )
     
    14221622    codeVpsVuiBspHrdParameters( pcVPS );
    14231623  }
    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
    14251635Void TEncCavlc::codeVpsVuiBspHrdParameters( TComVPS* pcVPS )
    14261636{
     
    16381848    }
    16391849    pcSlice->checkCrossLayerBlaFlag( );
    1640 
     1850#if !H_MV_HLS7_GEN
    16411851    if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )
    16421852    {
     
    16441854      WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" );
    16451855    }
     1856#endif
    16461857
    16471858
     
    20232234#endif
    20242235
     2236#if !H_MV_HLS7_GEN
    20252237#if PPS_FIX_DEPTH
    20262238  if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag() || pcSlice->getIsDepth() )
     
    20312243    WRITE_UVLC(0,"slice_header_extension_length");
    20322244  }
     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
    20332293}
    20342294
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r852 r854  
    4040#include "TEncCu.h"
    4141#include "TEncAnalyze.h"
     42
    4243#include <cmath>
    4344#include <algorithm>
     
    421422  // get Original YUV data from picture
    422423  m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
    423  
     424
    424425#if H_3D_QTLPC 
    425426  Bool    bTrySplit     = true;
     
    11981199        if(bInSlice && ( pcSubBestPartCU->getCUPelX() < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( pcSubBestPartCU->getCUPelY() < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
    11991200        {
    1200           if ( 0 == uiPartUnitIdx) //initialize RD with previous depth buffer
    1201           {
    1202             m_pppcRDSbacCoder[uhNextDepth][CI_CURR_BEST]->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]);
    1203           }
    1204           else
    1205           {
    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            }
    12081209
    12091210#if AMP_ENC_SPEEDUP
     
    12361237
    12371238        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        }
    12401241#if H_3D_VSO // M10
    12411242      if ( m_pcRdCost->getUseVSO() )
     
    12431244      else
    12441245#endif
    1245         rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     1246      rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    12461247
    12471248      if( (g_uiMaxCUWidth>>uiDepth) == rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() && rpcTempCU->getSlice()->getPPS()->getUseDQP())
     
    12511252        {
    12521253          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 ) ) )
    12541255          {
    12551256            hasResidual = true;
     
    12731274          m_pcEntropyCoder->encodeQP( rpcTempCU, uiTargetPartIdx, false );
    12741275          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();
    12761277#if H_3D_VSO // M11
    12771278          if ( m_pcRdCost->getUseLambdaScaleVSO())         
     
    12791280          else
    12801281#endif
    1281             rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     1282          rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    12821283#endif
    12831284
     
    12921293      }
    12931294
    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]);
    12951296      Bool isEndOfSlice        = rpcBestCU->getSlice()->getSliceMode()==FIXED_NUMBER_OF_BYTES
    1296         && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceArgument()<<3);
     1297                                 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceArgument()<<3);
    12971298      Bool isEndOfSliceSegment = rpcBestCU->getSlice()->getSliceSegmentMode()==FIXED_NUMBER_OF_BYTES
    1298         && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceSegmentArgument()<<3);
     1299                                 && (rpcBestCU->getTotalBits()>rpcBestCU->getSlice()->getSliceSegmentArgument()<<3);
    12991300      if(isEndOfSlice||isEndOfSliceSegment)
    13001301      {
     
    13031304      xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth);                                  // RD compare current larger prediction
    13041305    }                                                                                  // with sub partitioned prediction.
    1305   }
     1306    }
    13061307
    13071308#if H_3D_VSO // M12
     
    17861787#endif
    17871788#if H_3D_ARP
    1788   for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui )
    1789 #else
    1790   for( UInt ui = 0; ui < numValidMergeCand; ++ui )
     1789for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui )
     1790#else
     1791for( UInt ui = 0; ui < numValidMergeCand; ++ui )
    17911792#endif
    17921793  {
     
    18611862#endif
    18621863
    1863     for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual )
    1864     {
    1865       for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
    1866       {     
     1864  for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual )
     1865  {
     1866    for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
     1867    {     
    18671868#if H_3D_IC
    18681869        if( rpcTempCU->getSlice()->getApplyIC() && rpcTempCU->getSlice()->getIcSkipParseFlag() )
     
    18761877        if(!(uiNoResidual==1 && mergeCandBuffer[uiMergeCand]==1))
    18771878        {
    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 )
    18791899          {
    1880             // set MC parameters
    1881             rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth ); // interprets depth relative to LCU level
    1882             rpcTempCU->setCUTransquantBypassSubParts( bTransquantBypassFlag,     0, uhDepth );
    1883             rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
    1884 #if H_3D_IC
    1885             rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth );
    1886 #endif
    1887 #if H_3D_ARP
    1888             rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
    1889 #endif
    1890             rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to LCU level
    1891             rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to LCU level
    1892 #if H_3D_VSP
    1893             rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
    1894             rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );
    1895 #endif
    1896 #if MTK_DDD_G0063
    1897             if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand )
    1898             {
    18991900              rpcTempCU->setUseDDD( true, 0, 0, uhDepth );
    19001901              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 );
    19011939            }
    19021940            else
    19031941            {
    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
    19051943            }
    1906 #endif
    1907 #if H_3D_SPIVMP
    1908             rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth);
    1909             if (bSPIVMPFlag[uiMergeCand])
     1944            if( uhInterDirNeighbours[ uiMergeCand ] & 0x02 )
    19101945            {
    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 );
    19231948            }
    19241949            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
    19261961#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++ )
    19272011            {
    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                 else
    1940                 {
    1941                   rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    1942                 }
    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                 else
    1949                 {
    1950                   rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    1951                 }
    1952                 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level
    1953               }
    1954               else
    1955               {
    1956 #endif
    1957                 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level
    1958                 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    1959                 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    1960 #if NTT_STORE_SPDV_VSP_G0148
    1961               }
    1962             }
    1963 #endif
    1964             // do MC
    1965             m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
    1966             // estimate residual and encode everything
    1967 #if H_3D_VSO //M2
    1968             if( m_pcRdCost->getUseRenModel() )
    1969             { //Reset
    1970               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 #endif
    1977             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 0
    1989               mergeCandBuffer[uiMergeCand] = 1;
    1990             }
    1991 
    1992             rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
    1993 #if NTT_STORE_SPDV_VSP_G0148 // possible bug fix
    1994             if( rpcTempCU->getSkipFlag(0) )
    1995             {
    1996               rpcTempCU->setTrIdxSubParts(0, 0, uhDepth);
    1997             }
    1998 #endif
    1999 #if H_3D_INTER_SDC
    2000             TComDataCU *rpcTempCUPre = rpcTempCU;
    2001 #endif
    2002             Int orgQP = rpcTempCU->getQP( 0 );
    2003             xCheckDQP( rpcTempCU );
    2004             xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
    2005 #if H_3D_INTER_SDC
    2006             if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual )
    2007             {
    2008 #if SEC_INTER_SDC_G0101
    2009               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 //M2
    2020                 if( m_pcRdCost->getUseRenModel() )
    2021                 { //Reset
    2022                   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 #endif
    2029                 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 #else
    20412012              if( rpcTempCU != rpcTempCUPre )
    20422013              {
     
    20612032                ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],
    20622033                m_ppcResiYuvTemp[uhDepth],
    2063                 m_ppcRecoYuvTemp[uhDepth],
     2034                m_ppcRecoYuvTemp[uhDepth],
     2035                uiOffest,
    20642036                uhDepth );
    20652037
    20662038              xCheckDQP( rpcTempCU );
    20672039              xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );
    2068 #endif
    20692040            }
    2070 #endif
    2071             rpcTempCU->initEstData( uhDepth, orgQP, bTransquantBypassFlag );
    2072 
    2073             if( m_pcEncCfg->getUseFastDecisionForMerge() && !bestIsSkip )
     2041#else
     2042            if( rpcTempCU != rpcTempCUPre )
    20742043            {
     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      {
    20752076#if H_3D_INTER_SDC
    2076               if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) )
    2077               {
    2078                 bestIsSkip = !rpcBestCU->getSDCFlag( 0 ) && ( rpcBestCU->getQtRootCbf(0) == 0 );
    2079               }
    2080               else
    2081               {
    2082 #endif
    2083                 bestIsSkip = rpcBestCU->getQtRootCbf(0) == 0;
     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;
    20842085#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;
    20882112          }
    20892113        }
    2090       }
    2091 
    2092       if(uiNoResidual == 0 && m_pcEncCfg->getUseEarlySkipDetection())
    2093       {
    2094         if(rpcBestCU->getQtRootCbf( 0 ) == 0)
     2114
     2115        if(absoulte_MV == 0)
    20952116        {
    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;
    21192118        }
    21202119      }
    21212120    }
     2121  }
     2122 }
    21222123#if H_3D_SPIVMP
    2123     delete[] pcMvFieldSP;
    2124     delete[] puhInterDirSP;
     2124 delete[] pcMvFieldSP;
     2125 delete[] puhInterDirSP;
    21252126#endif
    21262127#if H_3D_ARP
    2127   }
     2128 }
    21282129#endif
    21292130}
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncGOP.cpp

    r852 r854  
    4949#include <time.h>
    5050#include <math.h>
     51
    5152using namespace std;
    5253//! \ingroup TLibEncoder
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp

    r852 r854  
    4141#include <stdio.h>
    4242#include <math.h>
     43
    4344//! \ingroup TLibEncoder
    4445//! \{
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r852 r854  
    39503950        pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    39513951        pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
     3952
    39523953#if NTT_STORE_SPDV_VSP_G0148
    39533954      }
     
    40424043  m_cYuvPredTemp.clear();
    40434044  rpcPredYuv->clear();
    4044 
     4045 
    40454046  if ( !bUseRes )
    40464047  {
    40474048    rpcResiYuv->clear();
    40484049  }
    4049 
     4050 
    40504051  rpcRecoYuv->clear();
    4051 
     4052 
    40524053  TComMv        cMvSrchRngLT;
    40534054  TComMv        cMvSrchRngRB;
    4054 
     4055 
    40554056  TComMv        cMvZero;
    40564057  TComMv        TempMv; //kolya
    4057 
     4058 
    40584059  TComMv        cMv[2];
    40594060  TComMv        cMvBi[2];
    40604061  TComMv        cMvTemp[2][33];
    4061 
     4062 
    40624063  Int           iNumPart    = pcCU->getNumPartInter();
    40634064  Int           iNumPredDir = pcCU->getSlice()->isInterP() ? 1 : 2;
    4064 
     4065 
    40654066  TComMv        cMvPred[2][33];
    4066 
     4067 
    40674068  TComMv        cMvPredBi[2][33];
    40684069  Int           aaiMvpIdxBi[2][33];
    4069 
     4070 
    40704071  Int           aaiMvpIdx[2][33];
    40714072  Int           aaiMvpNum[2][33];
    4072 
     4073 
    40734074  AMVPInfo aacAMVPInfo[2][33];
    4074 
     4075 
    40754076  Int           iRefIdx[2]={0,0}; //If un-initialized, may cause SEGV in bi-directional prediction iterative stage.
    40764077  Int           iRefIdxBi[2];
    4077 
     4078 
    40784079  UInt          uiPartAddr;
    40794080  Int           iRoiWidth, iRoiHeight;
    4080 
     4081 
    40814082  UInt          uiMbBits[3] = {1, 1, 0};
    4082 
     4083 
    40834084  UInt          uiLastMode = 0;
    40844085  Int           iRefStart, iRefEnd;
    4085 
     4086 
    40864087  PartSize      ePartSize = pcCU->getPartitionSize( 0 );
    40874088
     
    41104111    UInt          uiCostBi  =   MAX_UINT;
    41114112    UInt          uiCostTemp;
    4112 
     4113   
    41134114    UInt          uiBits[3];
    41144115    UInt          uiBitsTemp;
     
    41354136
    41364137    xGetBlkBits( ePartSize, pcCU->getSlice()->isInterP(), iPartIdx, uiLastMode, uiMbBits);
    4137 
     4138   
    41384139    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight );
    41394140
     
    41414142    pcCU->setVSPFlagSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) );
    41424143#endif
    4143 
     4144   
    41444145#if AMP_MRG
    41454146    Bool bTestNormalMC = true;
     
    41524153      bTestNormalMC = false;
    41534154    }
    4154 
     4155   
    41554156    if (bTestNormalMC)
    41564157    {
    41574158#endif
    41584159
    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        }
    41624348        RefPicList  eRefPicList = ( iRefList ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
    41634349
    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];
    41674364          if ( pcCU->getSlice()->getNumRefIdx(eRefPicList) > 1 )
    41684365          {
     
    41704367            if ( iRefIdxTemp == pcCU->getSlice()->getNumRefIdx(eRefPicList)-1 ) uiBitsTemp--;
    41714368          }
     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)
    41724414#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++)
    41814440          {
    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 );
    41974450            if (uiZeroMvdCostTemp < uiZeroMvdCost)
    41984451            {
    41994452              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;
    42264459            }
    42274460          }
    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    }
    44634464#endif
    44644465
     
    44764477    pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    44774478    pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    4478 
     4479   
    44794480    UInt uiMEBits = 0;
    44804481    // Set Motion Field_
     
    44884489#endif
    44894490#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];
    45354531      }
    45364532      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;
    45644565          pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMv( cMv[0], ePartSize, uiPartAddr, 0, iPartIdx );
    45654566          pcCU->getCUMvField(REF_PIC_LIST_0)->setAllRefIdx( iRefIdx[0], ePartSize, uiPartAddr, 0, iPartIdx );
    4566           TempMv = cMv[0] - cMvPred[0][iRefIdx[0]];
    4567           pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvd    ( TempMv,                 ePartSize, uiPartAddr, 0, iPartIdx );
    4568           pcCU->setInterDirSubParts( 1, uiPartAddr, iPartIdx, pcCU->getDepth(0) );
    4569 
    4570           pcCU->setMVPIdxSubParts( aaiMvpIdx[0][iRefIdx[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    4571           pcCU->setMVPNumSubParts( aaiMvpNum[0][iRefIdx[0]], REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    4572 
    4573           uiMEBits = uiBits[0];
    4574         }
    4575         else
    4576         {
    4577           uiLastMode = 1;
     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;
    45784579          pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMv( cMv[1], ePartSize, uiPartAddr, 0, iPartIdx );
    45794580          pcCU->getCUMvField(REF_PIC_LIST_1)->setAllRefIdx( iRefIdx[1], ePartSize, uiPartAddr, 0, iPartIdx );
    4580           TempMv = cMv[1] - cMvPred[1][iRefIdx[1]];
    4581           pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd    ( TempMv,                 ePartSize, uiPartAddr, 0, iPartIdx );
    4582           pcCU->setInterDirSubParts( 2, uiPartAddr, iPartIdx, pcCU->getDepth(0) );
    4583 
    4584           pcCU->setMVPIdxSubParts( aaiMvpIdx[1][iRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    4585           pcCU->setMVPNumSubParts( aaiMvpNum[1][iRefIdx[1]], REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    4586 
    4587           uiMEBits = uiBits[1];
    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    }
    45894590#if AMP_MRG
    45904591    } // end if bTestNormalMC
     
    46494650      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours
    46504651#if H_3D_VSP
    4651         , vspFlag
    4652         , inheritedVSPDisInfo
     4652                      , vspFlag
     4653                      , inheritedVSPDisInfo
    46534654#endif
    46544655#if H_3D_SPIVMP
    4655         , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
     4656                      , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
    46564657#endif
    4657         , numValidMergeCand
    4658         );
     4658                      , numValidMergeCand
     4659                      );
    46594660      if ( uiMRGCost < uiMECost )
    46604661      {
     
    46694670        if( uiMRGIndex == pcCU->getUseDDDCandIdx() )
    46704671        {
    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 ) );
    46754676        }
    46764677        else
    46774678        {
    4678           pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4679            pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    46794680        }
    46804681#endif
     
    47044705#if NTT_STORE_SPDV_VSP_G0148
    47054706#if H_3D_DBBP
    4706           if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) )
     4707        if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) )
    47074708#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 )
    47104717          {
    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 );
    47344720          }
    47354721          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
    47364737#if H_3D_FIX_G0148_BRACE
    47374738          {
    47384739#endif
    47394740#endif
    4740             pcCU->setInterDirSubParts  ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4741          pcCU->setInterDirSubParts  ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47414742            pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );
    47424743            pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
     
    47444745          }
    47454746#endif
    4746           pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvd    ( cMvZero,            ePartSize, uiPartAddr, 0, iPartIdx );
    4747           pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvd    ( cMvZero,            ePartSize, uiPartAddr, 0, iPartIdx );
    4748 
    4749           pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    4750           pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    4751           pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    4752           pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
     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));
    47534754      }
    47544755      else
     
    47674768        pcCU->setDvInfoSubParts(OriginalDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47684769#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        }
    47724773#if H_3D_SPIVMP
    47734774      delete[] pcMvFieldSP;
     
    47784779    //  MC
    47794780    motionCompensation ( pcCU, rpcPredYuv, REF_PIC_LIST_X, iPartIdx );
    4780 
     4781   
    47814782  } //  end of for ( Int iPartIdx = 0; iPartIdx < iNumPart; iPartIdx++ )
    47824783
     
    58035804      dCostBest        = dCost;
    58045805      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      }
    58075808#if H_3D_VSO // M21
    58085809    if( m_pcRdCost->getUseRenModel() && !m_pcRdCost->getUseEstimatedVSD() )
  • branches/HTM-10.0-dev0/source/Lib/TLibEncoder/TEncTop.cpp

    r852 r854  
    668668  m_cSPS.setLayerId( getLayerId() );
    669669#endif
     670#if H_MV_HLS_7_VPS_P0048_14
     671 // Code below needs to be moved to VPS
     672#endif
    670673  ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
    671674  profileTierLevel.setLevelIdc(m_level);
     
    828831  m_cPPS.setPPSId( getLayerIdInVps() );
    829832  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
    831844#if H_3D
    832845  m_cPPS.setDLT( getDLT() );
Note: See TracChangeset for help on using the changeset viewer.