Changeset 534 in 3DVCSoftware


Ignore:
Timestamp:
13 Jul 2013, 10:26:41 (11 years ago)
Author:
tech
Message:

MergeMerged tags/HTM-DEV-1.0.

Location:
branches/HTM-DEV-0.3-dev2
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/baseCfg_2view+depth.cfg

    r532 r534  
    2626LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    2727SplittingFlag                 : 0           # Splitting Flag
     28
     29#======== VPS/ Layer sets ================
     30VpsNumLayerSets               : 3           # Number of layer sets   
     31LayerIdsInSet_0               : 0           # LayerIds in vps of layer set
     32LayerIdsInSet_1               : 0 1         # LayerIds in vps of layer set
     33LayerIdsInSet_2               : 0 1 2 3     # LayerIds in vps of layer set
     34
     35DefaultOneTargetOutputLayerFlag: 0          # Output highest layer of layer sets by default
     36OutputLayerSetIdx             : 2           # Indices of layer sets used as additional output layer sets
     37LayerIdsInAddOutputLayerSet_0 : 2 3         # LayerIds in vps of additional output layers
     38ProfileLevelTierIdx           : 0 0 0 0     # Indices to profile level tier (TBD)
     39
     40#======== VPS / Dependencies ================
     41DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
     42DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
     43DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
     44
     45DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     46DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     47DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    2848
    2949#========== Camera parameters ==========
     
    4666DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
    4767GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
     68
     69#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
     70#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     collocatedRefLayerIdx
    4871Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
    4972Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
     
    6588Frame8_l1:  B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0             
    6689
    67 FrameI_l2:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -2                 0                  -1 
    68 Frame1_l2:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -2                 1                  -1 
    69 Frame2_l2:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -2                 1                  -1 
    70 Frame3_l2:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -2                 1                  -1 
    71 Frame4_l2:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -2                 1                  -1 
    72 Frame5_l2:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    73 Frame6_l2:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -2                 2                  -1 
    74 Frame7_l2:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -2                 2                  -1 
    75 Frame8_l2:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    76 
    77 FrameI_l3:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -2                 0                  -1 
    78 Frame1_l3:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -2                 1                  -1 
    79 Frame2_l3:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -2                 1                  -1 
    80 Frame3_l3:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -2                 1                  -1 
    81 Frame4_l3:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -2                 1                  -1 
    82 Frame5_l3:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    83 Frame6_l3:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -2                 2                  -1 
    84 Frame7_l3:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -2                 2                  -1 
    85 Frame8_l3:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
     90FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     91Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     92Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     93Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     94Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     95Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     96Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     97Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     98Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     99
     100FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     101Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     102Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     103Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     104Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     105Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     106Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     107Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     108Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
    86109
    87110#=========== Motion Search =============
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/baseCfg_2view.cfg

    r532 r534  
    2323SplittingFlag                 : 0           # Splitting Flag
    2424
     25#======== VPS/ Layer sets ================
     26VpsNumLayerSets               : 2            # Number of layer sets   
     27LayerIdsInSet_0               : 0            # LayerIds in vps of layer set
     28LayerIdsInSet_1               : 0 1          # LayerIds in vps of layer set
     29
     30DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     31OutputLayerSetIdx             : 1            # Indices of layer sets used as additional output layer sets
     32LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds in vps of additional output layers
     33ProfileLevelTierIdx           : 0 0 0        # Indices to profile level tier (TBD) per output layer set
     34
     35#======== VPS / Dependencies ================
     36DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
     37DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    2538
    2639#========== Camera parameters ==========
     
    4356DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
    4457GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
    45 #         Type  POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs #IL_ref_pics IL reference pics IL ref list pos L0      L1
     58
     59
     60#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
     61#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     collocatedRefLayerIdx
    4662Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
    4763Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
     
    5369Frame8:     B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0
    5470   
    55 FrameI_l1:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -1                 0                  -1
    56 Frame1_l1:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -1                 1                  -1
    57 Frame2_l1:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -1                 1                  -1
    58 Frame3_l1:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -1                 1                  -1
    59 Frame4_l1:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -1                 1                  -1
    60 Frame5_l1:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -1                 2                  -1
    61 Frame6_l1:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -1                 2                  -1
    62 Frame7_l1:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -1                 2                  -1
    63 Frame8_l1:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -1                 2                  -1
     71FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0          0          -1        -1
     72Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0          1          -1        -1
     73Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0          1          -1        -1
     74Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0          1          -1        -1
     75Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0          1          -1        -1
     76Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0          2          -1        -1
     77Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0          2          -1        -1
     78Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0          2          -1        -1
     79Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0          2          -1        -1
    6480
    6581#=========== Motion Search =============
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r532 r534  
    3030LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    3131SplittingFlag                 : 0           # Splitting Flag
     32
     33#======== VPS/ Layer sets ================
     34VpsNumLayerSets               : 5           # Number of layer sets   
     35LayerIdsInSet_0               : 0           # LayerIds in vps of layer set
     36LayerIdsInSet_1               : 0 1         # LayerIds in vps of layer set
     37LayerIdsInSet_2               : 0 1 2 3     # LayerIds in vps of layer set
     38LayerIdsInSet_3               : 0 1 4 5     # LayerIds in vps of layer set
     39LayerIdsInSet_4               : 0 1 2 3 4 5 # LayerIds in vps of layer set
     40
     41DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     42OutputLayerSetIdx             : 2 3          # Indices of layer sets used as additional output layer sets
     43LayerIdsInAddOutputLayerSet_0 : 2 3          # LayerIds of additional output layers
     44LayerIdsInAddOutputLayerSet_1 : 4 5          # LayerIds of additional output layers
     45ProfileLevelTierIdx           : 0 0 0 0 0 0 0 0 # Indices to profile level tier (TBD)
     46
     47#======== VPS / Dependencies ================
     48DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
     49DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
     50DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
     51DirectRefLayers_4             : 0           # LayerIds in vps of direct reference layers
     52DirectRefLayers_5             : 1           # LayerIds in vps of direct reference layers
     53
     54DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     55DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     56DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     57DependencyTypes_4             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     58DependencyTypes_5             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    3259
    3360#========== Camera parameters ==========
     
    5077DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
    5178GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
     79
     80#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
     81#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     collocatedRefLayerIdx
    5282Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
    5383Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
     
    6999Frame8_l1:  B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0             
    70100
    71 FrameI_l2:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -2                 0                  -1 
    72 Frame1_l2:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -2                 1                  -1 
    73 Frame2_l2:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -2                 1                  -1 
    74 Frame3_l2:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -2                 1                  -1 
    75 Frame4_l2:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -2                 1                  -1 
    76 Frame5_l2:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    77 Frame6_l2:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -2                 2                  -1 
    78 Frame7_l2:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -2                 2                  -1 
    79 Frame8_l2:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    80 
    81 FrameI_l3:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -2                 0                  -1 
    82 Frame1_l3:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -2                 1                  -1 
    83 Frame2_l3:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -2                 1                  -1 
    84 Frame3_l3:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -2                 1                  -1 
    85 Frame4_l3:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -2                 1                  -1 
    86 Frame5_l3:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    87 Frame6_l3:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -2                 2                  -1 
    88 Frame7_l3:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -2                 2                  -1 
    89 Frame8_l3:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    90 
    91 FrameI_l4:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -4                 0                  -1 
    92 Frame1_l4:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -4                 1                  -1 
    93 Frame2_l4:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -4                 1                  -1 
    94 Frame3_l4:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -4                 1                  -1 
    95 Frame4_l4:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -4                 1                  -1 
    96 Frame5_l4:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -4                 2                  -1 
    97 Frame6_l4:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -4                 2                  -1 
    98 Frame7_l4:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -4                 2                  -1 
    99 Frame8_l4:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -4                 2                  -1 
    100 
    101 FrameI_l5:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -4                 0                  -1 
    102 Frame1_l5:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -4                 1                  -1 
    103 Frame2_l5:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -4                 1                  -1 
    104 Frame3_l5:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -4                 1                  -1 
    105 Frame4_l5:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -4                 1                  -1 
    106 Frame5_l5:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -4                 2                  -1 
    107 Frame6_l5:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -4                 2                  -1 
    108 Frame7_l5:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -4                 2                  -1 
    109 Frame8_l5:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -4                 2                  -1 
     101FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     102Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     103Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     104Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     105Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     106Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     107Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     108Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     109Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     110
     111FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     112Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     113Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     114Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     115Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     116Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     117Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     118Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     119Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     120
     121FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     122Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     123Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     124Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     125Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     126Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     127Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     128Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     129Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     130
     131FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     132Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     133Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     134Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     135Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     136Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     137Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     138Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     139Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
    110140
    111141#=========== Motion Search =============
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/baseCfg_3view.cfg

    r532 r534  
    2424SplittingFlag                 : 0           # Splitting Flag
    2525
     26#======== VPS / Layer sets ================
     27VpsNumLayerSets               : 4            # Number of layer sets   
     28LayerIdsInSet_0               : 0            # LayerIds in vps of layer set
     29LayerIdsInSet_1               : 0 1          # LayerIds in vps of layer set
     30LayerIdsInSet_2               : 0 2          # LayerIds in vps of layer set
     31LayerIdsInSet_3               : 0 1 2        # LayerIds in vps of layer set
     32
     33DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     34OutputLayerSetIdx             : 1 2          # Indices of layer sets used as additional output layer sets
     35LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds in vps of additional output layers
     36LayerIdsInAddOutputLayerSet_1 : 2            # LayerIds in vps of additional output layers
     37ProfileLevelTierIdx           : 0 0 0 0 0 0   # Indices to profile level tier (TBD)
     38
     39#======== VPS / Dependencies ================
     40DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
     41DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
     42DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     43DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     44
    2645#========== Camera parameters ==========
    2746CameraParameterFile           : cam_pars.txt  # camera parameter file
     
    4362DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
    4463GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
    45 #         Type  POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs #IL_ref_pics IL reference pics IL ref list pos L0      L1
     64
     65#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
     66#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     collocatedRefLayerIdx
     67
    4668Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
    4769Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
     
    5375Frame8:     B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0
    5476   
    55 FrameI_l1:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -1                 0                  -1
    56 Frame1_l1:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -1                 1                  -1
    57 Frame2_l1:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -1                 1                  -1
    58 Frame3_l1:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -1                 1                  -1
    59 Frame4_l1:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -1                 1                  -1
    60 Frame5_l1:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -1                 2                  -1
    61 Frame6_l1:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -1                 2                  -1
    62 Frame7_l1:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -1                 2                  -1
    63 Frame8_l1:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -1                 2                  -1
     77FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1        -1
     78Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        -1
     79Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        -1
     80Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        -1
     81Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        -1
     82Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        -1
     83Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        -1
     84Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        -1
     85Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        -1
    6486
    65 FrameI_l2:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -2                 0                  -1
    66 Frame1_l2:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -2                 1                  -1
    67 Frame2_l2:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -2                 1                  -1
    68 Frame3_l2:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -2                 1                  -1
    69 Frame4_l2:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -2                 1                  -1
    70 Frame5_l2:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -2                 2                  -1
    71 Frame6_l2:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -2                 2                  -1
    72 Frame7_l2:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -2                 2                  -1
    73 Frame8_l2:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -2                 2                  -1
     87FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1        -1
     88Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        -1
     89Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        -1
     90Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        -1
     91Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        -1
     92Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        -1
     93Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        -1
     94Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        -1
     95Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        -1
    7496
    7597#=========== Motion Search =============
  • branches/HTM-DEV-0.3-dev2/cfg/3D-HEVC/fullCfg.cfg

    r532 r534  
    3434LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    3535SplittingFlag                 : 0           # Splitting Flag
     36
     37#======== VPS/ Layer sets ================
     38VpsNumLayerSets               : 5           # Number of layer sets   
     39LayerIdsInSet_0               : 0           # LayerIds in vps of layer set
     40LayerIdsInSet_1               : 0 1         # LayerIds in vps of layer set
     41LayerIdsInSet_2               : 0 1 2 3     # LayerIds in vps of layer set
     42LayerIdsInSet_3               : 0 1 4 5     # LayerIds in vps of layer set
     43LayerIdsInSet_4               : 0 1 2 3 4 5 # LayerIds in vps of layer set
     44
     45DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     46OutputLayerSetIdx             : 2 3          # Indices of layer sets used as additional output layer sets
     47LayerIdsInAddOutputLayerSet_0 : 2 3          # LayerIds of additional output layers
     48LayerIdsInAddOutputLayerSet_1 : 4 5          # LayerIds of additional output layers
     49ProfileLevelTierIdx           : 0 0 0 0 0 0  # Indices to profile level tier (TBD)
     50
     51#======== VPS / Dependencies ================
     52DirectRefLayers_1             :             # LayerIds in vps of direct reference layers
     53DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
     54DirectRefLayers_3             : 1           # LayerIds in vps of direct reference layers
     55DirectRefLayers_4             : 0           # LayerIds in vps of direct reference layers
     56DirectRefLayers_5             : 1           # LayerIds in vps of direct reference layers
     57
     58DependencyTypes_1             :             # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     59DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     60DependencyTypes_3             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     61DependencyTypes_4             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     62DependencyTypes_5             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
    3663
    3764#========== Camera parameters ==========
     
    5582DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
    5683GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
     84
     85#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
     86#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     collocatedRefLayerIdx
    5787Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
    5888Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
     
    74104Frame8_l1:  B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0             
    75105
    76 FrameI_l2:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -2                 0                  -1 
    77 Frame1_l2:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -2                 1                  -1 
    78 Frame2_l2:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -2                 1                  -1 
    79 Frame3_l2:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -2                 1                  -1 
    80 Frame4_l2:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -2                 1                  -1 
    81 Frame5_l2:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    82 Frame6_l2:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -2                 2                  -1 
    83 Frame7_l2:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -2                 2                  -1 
    84 Frame8_l2:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    85 
    86 FrameI_l3:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -2                 0                  -1 
    87 Frame1_l3:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -2                 1                  -1 
    88 Frame2_l3:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -2                 1                  -1 
    89 Frame3_l3:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -2                 1                  -1 
    90 Frame4_l3:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -2                 1                  -1 
    91 Frame5_l3:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    92 Frame6_l3:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -2                 2                  -1 
    93 Frame7_l3:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -2                 2                  -1 
    94 Frame8_l3:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -2                 2                  -1 
    95 
    96 FrameI_l4:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -4                 0                  -1 
    97 Frame1_l4:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -4                 1                  -1 
    98 Frame2_l4:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -4                 1                  -1 
    99 Frame3_l4:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -4                 1                  -1 
    100 Frame4_l4:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -4                 1                  -1 
    101 Frame5_l4:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -4                 2                  -1 
    102 Frame6_l4:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -4                 2                  -1 
    103 Frame7_l4:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -4                 2                  -1 
    104 Frame8_l4:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -4                 2                  -1 
    105 
    106 FrameI_l5:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -4                 0                  -1 
    107 Frame1_l5:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -4                 1                  -1 
    108 Frame2_l5:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -4                 1                  -1 
    109 Frame3_l5:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -4                 1                  -1 
    110 Frame4_l5:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -4                 1                  -1 
    111 Frame5_l5:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -4                 2                  -1 
    112 Frame6_l5:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -4                 2                  -1 
    113 Frame7_l5:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -4                 2                  -1 
    114 Frame8_l5:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -4                 2                  -1 
     106FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     107Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     108Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     109Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     110Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     111Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     112Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     113Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     114Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     115
     116FrameI_l3:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     117Frame1_l3:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     118Frame2_l3:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     119Frame3_l3:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     120Frame4_l3:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     121Frame5_l3:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     122Frame6_l3:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     123Frame7_l3:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     124Frame8_l3:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     125
     126FrameI_l4:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     127Frame1_l4:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     128Frame2_l4:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     129Frame3_l4:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     130Frame4_l4:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     131Frame5_l4:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     132Frame6_l4:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     133Frame7_l4:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     134Frame8_l4:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     135
     136FrameI_l5:  P    0     3     0.442    0        0        0        1      0                        0                                 1            0         0          -1        -1 
     137Frame1_l5:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                 1            0         1          -1        -1 
     138Frame2_l5:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1       1            0         1          -1        -1 
     139Frame3_l5:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1         1            0         1          -1        -1 
     140Frame4_l5:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1       1            0         1          -1        -1 
     141Frame5_l5:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
     142Frame6_l5:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0       1            0         2          -1        -1 
     143Frame7_l5:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1       1            0         2          -1        -1 
     144Frame8_l5:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0       1            0         2          -1        -1 
    115145
    116146#=========== Motion Search =============
  • branches/HTM-DEV-0.3-dev2/cfg/MV-HEVC/baseCfg_2view.cfg

    r446 r534  
    2222SplittingFlag                 : 0           # Splitting Flag
    2323
     24#======== VPS/ Layer sets ================
     25VpsNumLayerSets               : 2            # Number of layer sets   
     26LayerIdsInSet_0               : 0            # LayerIds in vps of Layer set
     27LayerIdsInSet_1               : 0 1          # LayerIds in vps of Layer set
     28
     29DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     30OutputLayerSetIdx             : 1            # Indices of layer sets used as additional output layer sets
     31LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds in vps of additional output layers
     32ProfileLevelTierIdx           : 0 0 0        # Indices to profile level tier (TBD)
     33
     34#======== VPS / Dependencies ================
     35DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
     36DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     37
    2438#======== Unit definition ================
    2539MaxCUWidth                    : 64          # Maximum coding unit width in pixel
     
    3751DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
    3852GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
    39 #         Type  POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs #IL_ref_pics IL reference pics IL ref list pos L0      L1
     53
     54#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
     55#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     collocatedRefLayerIdx
    4056Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
    4157Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
     
    4763Frame8:     B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0
    4864   
    49 FrameI_l1:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -1                 0                  -1
    50 Frame1_l1:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -1                 1                  -1
    51 Frame2_l1:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -1                 1                  -1
    52 Frame3_l1:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -1                 1                  -1
    53 Frame4_l1:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -1                 1                  -1
    54 Frame5_l1:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -1                 2                  -1
    55 Frame6_l1:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -1                 2                  -1
    56 Frame7_l1:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -1                 2                  -1
    57 Frame8_l1:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -1                 2                  -1
     65FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0          0          -1        -1
     66Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0          1          -1        -1
     67Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0          1          -1        -1
     68Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0          1          -1        -1
     69Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0          1          -1        -1
     70Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0          2          -1        -1
     71Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0          2          -1        -1
     72Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0          2          -1        -1
     73Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0          2          -1        -1
    5874
    5975#=========== Motion Search =============
  • branches/HTM-DEV-0.3-dev2/cfg/MV-HEVC/baseCfg_3view.cfg

    r446 r534  
    2424SplittingFlag                 : 0           # Splitting Flag
    2525
     26#======== VPS / Layer sets ================
     27VpsNumLayerSets               : 4            # Number of layer sets   
     28LayerIdsInSet_0               : 0            # LayerIds in vps of layer set
     29LayerIdsInSet_1               : 0 1          # LayerIds in vps of layer set
     30LayerIdsInSet_2               : 0 2          # LayerIds in vps of layer set
     31LayerIdsInSet_3               : 0 1 2        # LayerIds in vps of layer set
     32
     33DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     34OutputLayerSetIdx             : 1 2          # Indices of layer sets used as additional output layer sets
     35LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds in vps of additional output layers
     36LayerIdsInAddOutputLayerSet_1 : 2            # LayerIds in vps of additional output layers
     37ProfileLevelTierIdx           : 0 0 0 0 0 0  # Indices to profile level tier (TBD)
     38
     39#======== VPS / Dependencies ================
     40DirectRefLayers_1             : 0           # LayerIds in vps of direct reference layers
     41DirectRefLayers_2             : 0           # LayerIds in vps of direct reference layers
     42DependencyTypes_1             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     43DependencyTypes_2             : 2           # Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion
     44
    2645#======== Unit definition ================
    2746MaxCUWidth                    : 64          # Maximum coding unit width in pixel
     
    3958DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
    4059GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
    41 #         Type  POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs #IL_ref_pics IL reference pics IL ref list pos L0      L1
     60
     61#                           QPfactor      betaOffsetDiv2   #ref_pics_active  reference pictures     deltaRPS     reference idcs          ilPredLayerIdc       refLayerPicPosIl_L1
     62#         Type  POC QPoffset     tcOffsetDiv2      temporal_id      #ref_pics                 predict     #ref_idcs        #ActiveRefLayerPics     refLayerPicPosIl_L0     collocatedRefLayerIdx
     63
    4264Frame1:     B    8     1        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          0
    4365Frame2:     B    4     2        0.3536   0            0              0           2                3         -4 -6  4           1       4        5         1 1 0 0 1       0
     
    4971Frame8:     B    7     4        0.68     0            0              0           2                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       0
    5072   
    51 FrameI_l1:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -1                 0                  -1
    52 Frame1_l1:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -1                 1                  -1
    53 Frame2_l1:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -1                 1                  -1
    54 Frame3_l1:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -1                 1                  -1
    55 Frame4_l1:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -1                 1                  -1
    56 Frame5_l1:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -1                 2                  -1
    57 Frame6_l1:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -1                 2                  -1
    58 Frame7_l1:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -1                 2                  -1
    59 Frame8_l1:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -1                 2                  -1
     73FrameI_l1:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1        -1
     74Frame1_l1:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        -1
     75Frame2_l1:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        -1
     76Frame3_l1:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        -1
     77Frame4_l1:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        -1
     78Frame5_l1:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        -1
     79Frame6_l1:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        -1
     80Frame7_l1:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        -1
     81Frame8_l1:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        -1
    6082
    61 FrameI_l2:  P    0     3        0.442    0            0              0           1                0                            0                                          1             -2                 0                  -1
    62 Frame1_l2:  B    8     4        0.442    0            0              0           4                4         -8 -10 -12 -16     0                                          1             -2                 1                  -1
    63 Frame2_l2:  B    4     5        0.3536   0            0              0           3                3         -4 -6  4           1       4        5         1 1 0 0 1       1             -2                 1                  -1
    64 Frame3_l2:  B    2     6        0.3536   0            0              0           3                4         -2 -4  2 6         1       2        4         1 1 1 1         1             -2                 1                  -1
    65 Frame4_l2:  B    1     7        0.68     0            0              0           3                4         -1  1  3 7         1       1        5         1 0 1 1 1       1             -2                 1                  -1
    66 Frame5_l2:  B    3     7        0.68     0            0              0           3                4         -1 -3  1 5         1      -2        5         1 1 1 1 0       1             -2                 2                  -1
    67 Frame6_l2:  B    6     6        0.3536   0            0              0           3                4         -2 -4 -6 2         1      -3        5         1 1 1 1 0       1             -2                 2                  -1
    68 Frame7_l2:  B    5     7        0.68     0            0              0           3                4         -1 -5  1 3         1       1        5         1 0 1 1 1       1             -2                 2                  -1
    69 Frame8_l2:  B    7     7        0.68     0            0              0           3                4         -1 -3 -7 1         1      -2        5         1 1 1 1 0       1             -2                 2                  -1
     83FrameI_l2:  P    0     3     0.442    0        0        0        1      0                        0                                   1          0         0          -1        -1
     84Frame1_l2:  B    8     4     0.442    0        0        0        4      4     -8 -10 -12 -16     0                                   1          0         1          -1        -1
     85Frame2_l2:  B    4     5     0.3536   0        0        0        3      3     -4 -6  4           1     4     5     1 1 0 0 1         1          0         1          -1        -1
     86Frame3_l2:  B    2     6     0.3536   0        0        0        3      4     -2 -4  2 6         1     2     4     1 1 1 1           1          0         1          -1        -1
     87Frame4_l2:  B    1     7     0.68     0        0        0        3      4     -1  1  3 7         1     1     5     1 0 1 1 1         1          0         1          -1        -1
     88Frame5_l2:  B    3     7     0.68     0        0        0        3      4     -1 -3  1 5         1    -2     5     1 1 1 1 0         1          0         2          -1        -1
     89Frame6_l2:  B    6     6     0.3536   0        0        0        3      4     -2 -4 -6 2         1    -3     5     1 1 1 1 0         1          0         2          -1        -1
     90Frame7_l2:  B    5     7     0.68     0        0        0        3      4     -1 -5  1 3         1     1     5     1 0 1 1 1         1          0         2          -1        -1
     91Frame8_l2:  B    7     7     0.68     0        0        0        3      4     -1 -3 -7 1         1    -2     5     1 1 1 1 0         1          0         2          -1        -1
    7092
    7193#=========== Motion Search =============
  • branches/HTM-DEV-0.3-dev2/cfg/MV-HEVC/fullCfg.cfg

    r446 r534  
    2727LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    2828SplittingFlag                 : 0           # Splitting Flag
     29
     30#======== VPS/ Layer sets ================
     31VpsNumLayerSets               : 4            # Number of layer sets   
     32LayerIdsInSet_0               : 0            # LayerIds of Layer set
     33LayerIdsInSet_1               : 0 1          # LayerIds of Layer set
     34LayerIdsInSet_2               : 0 2          # LayerIds of Layer set
     35LayerIdsInSet_3               : 0 1 2        # LayerIds of Layer set
     36
     37DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     38OutputLayerSetIdx             : 1 2          # Indices of layer sets used as additional output layer sets
     39LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     40LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     41ProfileLevelTierIdx           : 0 0 0 0      # Indices to profile level tier (TBD)
    2942
    3043#======== Unit definition ================
  • branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.cpp

    r531 r534  
    150150  Bool recon_opened = false; // reconstruction file not yet opened. (must be performed after SPS is seen)
    151151#else
     152#if H_3D
    152153  Int  pocCurrPic        = -MAX_INT;     
    153154  Int  pocLastPic        = -MAX_INT;   
     155#endif
    154156
    155157  Int  layerIdCurrPic    = 0;
     
    187189    Bool newSliceDiffPoc   = false;
    188190    Bool newSliceDiffLayer = false;
     191#if H_3D
    189192    Bool allLayersDecoded  = false;     
     193#endif
    190194#endif
    191195    if (nalUnit.empty())
     
    222226        {
    223227          layerIdCurrPic = nalu.m_layerId;
     228#if H_3D
    224229          pocCurrPic     = m_tDecTop[decIdx]->getCurrPoc();
     230#endif
    225231          decIdxCurrPic  = decIdx;
    226232          firstSlice     = false;
     
    230236        {
    231237          layerIdCurrPic    = nalu.m_layerId;
    232          
     238#if H_3D         
    233239          pocLastPic        = pocCurrPic;
    234240          pocCurrPic        = m_tDecTop[decIdx]->getCurrPoc();
    235          
     241#endif         
    236242          decIdxLastPic     = decIdxCurrPic;
    237243          decIdxCurrPic     = decIdx;
    238 
     244#if H_3D
    239245          allLayersDecoded = ( pocCurrPic != pocLastPic );
     246#endif
    240247        }
    241248
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.cpp

    r532 r534  
    215215#endif
    216216#if H_MV
    217   in>>entry.m_numInterViewRefPics;
    218   for( Int i = 0; i < entry.m_numInterViewRefPics; i++ )
    219   {
    220     in>>entry.m_interViewRefs[i];
    221   }
    222   for( Int i = 0; i < entry.m_numInterViewRefPics; i++ )
     217  in>>entry.m_numActiveRefLayerPics;
     218  for( Int i = 0; i < entry.m_numActiveRefLayerPics; i++ )
     219  {
     220    in>>entry.m_interLayerPredLayerIdc[i];
     221  }
     222  for( Int i = 0; i < entry.m_numActiveRefLayerPics; i++ )
    223223  {
    224224    in>>entry.m_interViewRefPosL[0][i];
    225225  }
    226   for( Int i = 0; i < entry.m_numInterViewRefPics; i++ )
     226  for( Int i = 0; i < entry.m_numActiveRefLayerPics; i++ )
    227227  {
    228228    in>>entry.m_interViewRefPosL[1][i];
     229  }
     230  if (entry.m_numActiveRefLayerPics > 0 )
     231  {
     232    in>>entry.m_collocatedRefLayerIdx;
    229233  }
    230234#endif
     
    398402  ("LayerIdInNuh",          m_layerIdInNuh       , std::vector<Int>(1,0), "LayerId in Nuh")
    399403  ("SplittingFlag",         m_splittingFlag      , false                , "Splitting Flag")   
     404
     405  // Layer Sets + Output Layer Sets + Profile Tier Level
     406  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
     407  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
     408  ("DefaultOneTargetOutputLayerFlag", m_defaultOneTargetOutputLayerFlag,  false , "Output highest layer of layer sets by default")     
     409  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 
     410  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 
     411  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
     412 
     413  // Layer dependencies
     414  ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIds of direct reference layers")
     415  ("DependencyTypes_%d",    m_dependencyTypes    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion")
    400416#endif
    401417  ("SourceWidth,-wdt",      m_iSourceWidth,        0, "Source picture width")
     
    756772        cOSS<<"Frame"<<i;
    757773        opts.addOptions()( cOSS.str(), m_GOPListMvc[k][i-1], GOPEntry() );
     774        if ( i != 1 )
     775        {
     776          opts.opt_list.back()->opt->opt_duplicate = true;
     777        }       
    758778      }
    759779    }
     
    762782      std::ostringstream cOSS1;
    763783      cOSS1<<"FrameI"<<"_l"<<k;
     784
    764785      opts.addOptions()(cOSS1.str(), m_GOPListMvc[k][MAX_GOP], GOPEntry());
     786      if ( k > 1 )
     787      {
     788        opts.opt_list.back()->opt->opt_duplicate = true;
     789      }       
     790
    765791
    766792      for( Int i = 1; i < MAX_GOP + 1; i++ )
     
    769795        cOSS2<<"Frame"<<i<<"_l"<<k;
    770796        opts.addOptions()(cOSS2.str(), m_GOPListMvc[k][i-1], GOPEntry());
     797        if ( i != 1 || k > 0 )
     798        {
     799          opts.opt_list.back()->opt->opt_duplicate = true;
     800        }       
    771801      }
    772802    }
     
    13111341#endif
    13121342
    1313   xConfirmPara(  m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. "   );
    1314 
    1315  for( Int dim = 0; dim < m_dimIds.size(); dim++ )
     1343  xConfirmPara(  m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. "   );   Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1];
     1344
     1345  dimBitOffset[ 0 ] = 0;
     1346  for (Int j = 1; j <= ((Int) m_dimIds.size() - m_splittingFlag ? 1 : 0); j++ )
    13161347 {
    1317    xConfirmPara( m_dimIds[dim].size() < m_numberOfLayers,  "DimensionId must be given for all layers and all dimensions. ");   
    1318    xConfirmPara( ( dim != viewDimPosition ) &&  (m_dimIds[dim][0] != 0), "DimensionId of layer 0 must be 0. " );
    1319    xConfirmPara( m_dimensionIdLen[dim] < 1 || m_dimensionIdLen[dim] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " );
     1348    dimBitOffset[ j ] = dimBitOffset[ j - 1 ] + m_dimensionIdLen[ j - 1];
     1349  }
     1350
     1351  if ( m_splittingFlag )
     1352  {
     1353    dimBitOffset[ (Int) m_dimIds.size() ] = 6;
     1354  }
     1355 
     1356  for( Int j = 0; j < m_dimIds.size(); j++ )
     1357  {   
     1358    xConfirmPara( m_dimIds[j].size() < m_numberOfLayers,  "DimensionId must be given for all layers and all dimensions. ");   
     1359    xConfirmPara( ( j != viewDimPosition ) &&  (m_dimIds[j][0] != 0), "DimensionId of layer 0 must be 0. " );
     1360    xConfirmPara( m_dimensionIdLen[j] < 1 || m_dimensionIdLen[j] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " );
     1361     
     1362
    13201363   for( Int i = 1; i < m_numberOfLayers; i++ )
    13211364   {     
    1322      xConfirmPara(  ( m_dimIds[dim][i] < 0 ) || ( m_dimIds[dim][i] > ( ( 1 << m_dimensionIdLen[dim] ) - 1 ) )   , "DimensionId shall be in the range of 0 to 2^DimensionIdLen - 1. " );
     1365      xConfirmPara(  ( m_dimIds[j][i] < 0 ) || ( m_dimIds[j][i] > ( ( 1 << m_dimensionIdLen[j] ) - 1 ) )   , "DimensionId shall be in the range of 0 to 2^DimensionIdLen - 1. " );
     1366      if ( m_splittingFlag )
     1367      {
     1368        Int layerIdInNuh = (m_layerIdInNuh.size()!=1) ? m_layerIdInNuh[i] :  i;
     1369        xConfirmPara( ( ( layerIdInNuh & ( (1 << dimBitOffset[ j + 1 ] ) - 1) ) >> dimBitOffset[ j ] )  != m_dimIds[j][ i ]  , "When Splitting Flag is equal to 1 dimension ids shall match values derived from layer ids. ");
     1370      }
    13231371   }
    13241372 }
     
    13611409 }
    13621410
     1411  /// Layer sets
     1412  xConfirmPara( m_vpsNumLayerSets < 0 || m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025") ;
     1413  for( Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     1414  {
     1415    if (lsIdx == 0)
     1416    {
     1417      xConfirmPara( m_layerIdsInSets[lsIdx].size() != 1 || m_layerIdsInSets[lsIdx][0] != 0 , "0-th layer shall only include layer 0. ");
     1418    }
     1419    for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ )
     1420    {
     1421      xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than 64" );
     1422    }
     1423  }
     1424
     1425  // Output layer sets
     1426  xConfirmPara( m_outputLayerSetIdx.size() > 1024, "The number of output layer set indices must be less than 1025.") ;
     1427  for (Int lsIdx = 0; lsIdx < m_outputLayerSetIdx.size(); lsIdx++)
     1428  {   
     1429    Int refLayerSetIdx = m_outputLayerSetIdx[ lsIdx ];
     1430    xConfirmPara(  refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets." );
     1431
     1432    for (Int i = 0; i < m_layerIdsInAddOutputLayerSet[ lsIdx ].size(); i++)
     1433    {
     1434      Bool isAlsoInLayerSet = false;
     1435      for (Int j = 0; j < m_layerIdsInSets[ refLayerSetIdx ].size(); j++ )
     1436      {
     1437        if ( m_layerIdsInSets[ refLayerSetIdx ][ j ] == m_layerIdsInAddOutputLayerSet[ lsIdx ][ i ] )
     1438        {
     1439          isAlsoInLayerSet = true;
     1440          break;
     1441        }       
     1442      }
     1443      xConfirmPara( !isAlsoInLayerSet, "All output layers of a output layer set be included in corresponding layer set.");
     1444    }
     1445  }
     1446  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" );
     1447
     1448  // Layer Dependencies 
     1449  for (Int i = 0; i < m_numberOfLayers; i++ )
     1450  {
     1451    xConfirmPara( (i == 0)  && m_directRefLayers[0].size() != 0, "Layer 0 shall not have reference layers." );
     1452    xConfirmPara( m_directRefLayers[i].size() != m_dependencyTypes[ i ].size(), "Each reference layer shall have a reference type." );
     1453    for (Int j = 0; j < m_directRefLayers[i].size(); j++)
     1454    {
     1455      xConfirmPara( m_directRefLayers[i][j] < 0 || m_directRefLayers[i][j] >= i , "Reference layer id shall be greater than or equal to 0 and less than dependent layer id");
     1456      xConfirmPara( m_dependencyTypes[i][j] < 0 || m_dependencyTypes[i][j] >  2 , "Dependency type shall be greater than or equal to 0 and less than 3");
     1457    }       
     1458  } 
    13631459#endif
    13641460  xConfirmPara( m_iGOPSize < 1 ,                                                            "GOP Size must be greater or equal to 1" );
     
    15181614  for( Int i = 0; i < MAX_GOP; i++ )
    15191615  {
    1520     if( m_GOPListMvc[0][i].m_numInterViewRefPics != 0 )
     1616    if( m_GOPListMvc[0][i].m_numActiveRefLayerPics != 0 )
    15211617    {
    15221618      printf( "\nError: Frame%d inter_layer refs not available in layer 0\n", i );
     
    15301626  if( m_numberOfLayers > 1 )
    15311627  {
    1532     for( Int k = 1; k < m_numberOfLayers; k++ )
     1628    for( Int layer = 1; layer < m_numberOfLayers; layer++ )
    15331629    {
    15341630      for( Int i = 0; i < MAX_GOP+1; i++ )
    15351631      {
    1536         for( Int j = 0; j < m_GOPListMvc[k][i].m_numInterViewRefPics; j++ )
     1632        GOPEntry gopEntry = m_GOPListMvc[layer][i]; 
     1633        for( Int j = 0; j < gopEntry.m_numActiveRefLayerPics; j++ )
    15371634        {
    1538           Int iAbsViewId = m_GOPListMvc[k][i].m_interViewRefs[j] + k;
    1539           if( iAbsViewId < 0 || iAbsViewId >= k )
     1635          Int ilPredLayerIdc = gopEntry.m_interLayerPredLayerIdc[j];
     1636          if( ilPredLayerIdc < 0 || ilPredLayerIdc >= m_directRefLayers[layer].size() )
    15401637          {
    1541             printf( "\nError: inter-layer ref pic %d is not available for Frame%d_l%d\n", m_GOPListMvc[k][i].m_interViewRefs[j], i, k );
     1638            printf( "\nError: inter-layer ref idc %d is not available for Frame%d_l%d\n", gopEntry.m_interLayerPredLayerIdc[j], i, layer );
    15421639            bErrorIvpEnhV = true;
    15431640          }
    1544           if( m_GOPListMvc[k][i].m_interViewRefPosL[0][j] < -1 || m_GOPListMvc[k][i].m_interViewRefPosL[0][j] > m_GOPListMvc[k][i].m_numRefPicsActive )
     1641          if( gopEntry.m_interViewRefPosL[0][j] < -1 || gopEntry.m_interViewRefPosL[0][j] > gopEntry.m_numRefPicsActive )
    15451642          {
    1546             printf( "\nError: inter-layer ref pos %d on L0 is not available for Frame%d_l%d\n", m_GOPListMvc[k][i].m_interViewRefPosL[0][j], i, k );
     1643            printf( "\nError: inter-layer ref pos %d on L0 is not available for Frame%d_l%d\n", gopEntry.m_interViewRefPosL[0][j], i, layer );
    15471644            bErrorIvpEnhV = true;
    15481645          }
    1549           if( m_GOPListMvc[k][i].m_interViewRefPosL[1][j] < -1  || m_GOPListMvc[k][i].m_interViewRefPosL[1][j] > m_GOPListMvc[k][i].m_numRefPicsActive )
     1646          if( gopEntry.m_interViewRefPosL[1][j] < -1  || gopEntry.m_interViewRefPosL[1][j] > gopEntry.m_numRefPicsActive )
    15501647          {
    1551             printf( "\nError: inter-layer ref pos %d on L1 is not available for Frame%d_l%d\n", m_GOPListMvc[k][i].m_interViewRefPosL[1][j], i, k );
     1648            printf( "\nError: inter-layer ref pos %d on L1 is not available for Frame%d_l%d\n", gopEntry.m_interViewRefPosL[1][j], i, layer );
    15521649            bErrorIvpEnhV = true;
    15531650          }
     
    15551652        if( i == MAX_GOP ) // inter-view refs at I pic position in base view
    15561653        {
    1557           if( m_GOPListMvc[k][MAX_GOP].m_sliceType != 'B' && m_GOPListMvc[k][MAX_GOP].m_sliceType != 'P' && m_GOPListMvc[k][MAX_GOP].m_sliceType != 'I' )
     1654          if( gopEntry.m_sliceType != 'B' && gopEntry.m_sliceType != 'P' && gopEntry.m_sliceType != 'I' )
    15581655          {
    1559             printf( "\nError: slice type of FrameI_l%d must be equal to B or P or I\n", k );
     1656            printf( "\nError: slice type of FrameI_l%d must be equal to B or P or I\n", layer );
    15601657            bErrorIvpEnhV = true;
    15611658          }
    15621659
    1563           if( m_GOPListMvc[k][MAX_GOP].m_POC != 0 )
     1660          if( gopEntry.m_POC != 0 )
    15641661          {
    1565             printf( "\nError: POC %d not possible for FrameI_l%d, must be 0\n", m_GOPListMvc[k][MAX_GOP].m_POC, k );
     1662            printf( "\nError: POC %d not possible for FrameI_l%d, must be 0\n", gopEntry.m_POC, layer );
    15661663            bErrorIvpEnhV = true;
    15671664          }
    15681665
    1569           if( m_GOPListMvc[k][MAX_GOP].m_temporalId != 0 )
     1666          if( gopEntry.m_temporalId != 0 )
    15701667          {
    1571             printf( "\nWarning: Temporal id of FrameI_l%d must be 0 (cp. I-frame in base layer)\n", k );
    1572             m_GOPListMvc[k][MAX_GOP].m_temporalId = 0;
     1668            printf( "\nWarning: Temporal id of FrameI_l%d must be 0 (cp. I-frame in base layer)\n", layer );
     1669            gopEntry.m_temporalId = 0;
    15731670          }
    15741671
    1575           if( m_GOPListMvc[k][MAX_GOP].m_numRefPics != 0 )
     1672          if( gopEntry.m_numRefPics != 0 )
    15761673          {
    1577             printf( "\nWarning: temporal references not possible for FrameI_l%d\n", k );
    1578             for( Int j = 0; j < m_GOPListMvc[k][MAX_GOP].m_numRefPics; j++ )
     1674            printf( "\nWarning: temporal references not possible for FrameI_l%d\n", layer );
     1675            for( Int j = 0; j < m_GOPListMvc[layer][MAX_GOP].m_numRefPics; j++ )
    15791676            {
    1580               m_GOPListMvc[k][MAX_GOP].m_referencePics[j] = 0;
     1677              gopEntry.m_referencePics[j] = 0;
    15811678            }
    1582             m_GOPListMvc[k][MAX_GOP].m_numRefPics = 0;
     1679            gopEntry.m_numRefPics = 0;
    15831680          }
    15841681
    1585           if( m_GOPListMvc[k][MAX_GOP].m_interRPSPrediction )
     1682          if( gopEntry.m_interRPSPrediction )
    15861683          {
    1587             printf( "\nError: inter RPS prediction not possible for FrameI_l%d, must be 0\n", k );
     1684            printf( "\nError: inter RPS prediction not possible for FrameI_l%d, must be 0\n", layer );
    15881685            bErrorIvpEnhV = true;
    15891686          }
    15901687
    1591           if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'I' && m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics != 0 )
     1688          if( gopEntry.m_sliceType == 'I' && gopEntry.m_numActiveRefLayerPics != 0 )
    15921689          {
    1593             printf( "\nError: inter-layer prediction not possible for FrameI_l%d with slice type I, #IL_ref_pics must be 0\n", k );
     1690            printf( "\nError: inter-layer prediction not possible for FrameI_l%d with slice type I, #IL_ref_pics must be 0\n", layer );
    15941691            bErrorIvpEnhV = true;
    15951692          }
    15961693
    1597           if( m_GOPListMvc[k][MAX_GOP].m_numRefPicsActive > m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics )
     1694          if( gopEntry.m_numRefPicsActive > gopEntry.m_numActiveRefLayerPics )
    15981695          {
    1599             m_GOPListMvc[k][MAX_GOP].m_numRefPicsActive = m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics;
     1696            gopEntry.m_numRefPicsActive = gopEntry.m_numActiveRefLayerPics;
    16001697          }
    16011698
    1602           if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'P' )
     1699          if( gopEntry.m_sliceType == 'P' )
    16031700          {
    1604             if( m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics < 1 )
     1701            if( gopEntry.m_numActiveRefLayerPics < 1 )
    16051702            {
    1606               printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type P\n", k );
     1703              printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type P\n", layer );
    16071704              bErrorIvpEnhV = true;
    16081705            }
    16091706            else
    16101707            {
    1611               for( Int j = 0; j < m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics; j++ )
     1708              for( Int j = 0; j < gopEntry.m_numActiveRefLayerPics; j++ )
    16121709              {
    1613                 if( m_GOPListMvc[k][MAX_GOP].m_interViewRefPosL[1][j] != -1 )
     1710                if( gopEntry.m_interViewRefPosL[1][j] != -1 )
    16141711                {
    1615                   printf( "\nError: inter-layer ref pos %d on L1 not possible for FrameI_l%d with slice type P\n", m_GOPListMvc[k][MAX_GOP].m_interViewRefPosL[1][j], k );
     1712                  printf( "\nError: inter-layer ref pos %d on L1 not possible for FrameI_l%d with slice type P\n", gopEntry.m_interViewRefPosL[1][j], layer );
    16161713                  bErrorIvpEnhV = true;
    16171714                }
     
    16201717          }
    16211718
    1622           if( m_GOPListMvc[k][MAX_GOP].m_sliceType == 'B' && m_GOPListMvc[k][MAX_GOP].m_numInterViewRefPics < 1 )
     1719          if( gopEntry.m_sliceType == 'B' && gopEntry.m_numActiveRefLayerPics < 1 )
    16231720          {
    1624             printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type B\n", k );
     1721            printf( "\nError: #IL_ref_pics must be at least one for FrameI_l%d with slice type B\n", layer );
    16251722            bErrorIvpEnhV = true;
    16261723          }
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.h

    r532 r534  
    8686  Int                    m_scalabilityMask;                   ///< Mask indicating scalabilities, 1: texture; 3: texture + depth                                                               
    8787  std::vector<Int>       m_dimensionIdLen;                    ///< Length of scalability dimension s
     88 
     89// layer sets   
     90  Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
     91  std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds in vps of layer set
     92  Bool                   m_defaultOneTargetOutputLayerFlag;   ///< Output highest layer of layer sets by default 
     93  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
     94  std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
     95  std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
     96 
     97  // Dependencies
     98  std::vector< std::vector<Int> > m_directRefLayers;          ///< LayerIds of direct reference layers
     99  std::vector< std::vector<Int> > m_dependencyTypes;          ///< Dependency types of direct reference layers
     100
    88101#if H_3D_IV_MERGE
    89102  Bool                   m_ivMvPredFlag;                      ///< Interview motion vector prediction
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.cpp

    r532 r534  
    118118  xSetLayerIds             ( vps );   
    119119  xSetDimensionIdAndLength ( vps );
    120   xSetDirectDependencyFlags( vps );
     120  xSetDependencies( vps );
     121  xSetProfileTierLevel     ( vps );
     122  xSetLayerSets            ( vps );
    121123#if H_3D
    122124  vps.initViewIndex();
     
    10791081}
    10801082
    1081 Void TAppEncTop::xSetDirectDependencyFlags( TComVPS& vps )
    1082 {
    1083   for( Int layer = 0; layer < m_numberOfLayers; layer++ )
    1084   {
    1085     if( m_GOPListMvc[layer][MAX_GOP].m_POC == -1 )
    1086     {
    1087       continue;
    1088     }
    1089     for( Int i = 0; i < getGOPSize()+1; i++ )
    1090     {
    1091       GOPEntry ge = ( i < getGOPSize() ) ? m_GOPListMvc[layer][i] : m_GOPListMvc[layer][MAX_GOP];
    1092       for( Int j = 0; j < ge.m_numInterViewRefPics; j++ )
     1083Void TAppEncTop::xSetDependencies( TComVPS& vps )
     1084{
     1085  // Direct dependency flags + dependency types
     1086  for( Int depLayer = 1; depLayer < MAX_NUM_LAYERS; depLayer++ )
     1087  {
     1088    for( Int refLayer = 0; refLayer < MAX_NUM_LAYERS; refLayer++ )
     1089    {
     1090      vps.setDirectDependencyFlag( depLayer, refLayer, false);
     1091      vps.setDirectDependencyType( depLayer, refLayer,    -1 );
     1092    }
     1093    }
     1094  for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ )
     1095  {
     1096    Int numRefLayers = (Int) m_directRefLayers[depLayer].size();
     1097    assert(  numRefLayers == (Int) m_dependencyTypes[depLayer].size() );
     1098    for( Int i = 0; i < numRefLayers; i++ )
     1099    {
     1100      Int refLayer = m_directRefLayers[depLayer][i];
     1101      vps.setDirectDependencyFlag( depLayer, refLayer, true);
     1102      vps.setDirectDependencyType( depLayer, refLayer,m_dependencyTypes[depLayer][i]);
     1103    }
     1104  }
     1105
     1106  // Max temporal id for inter layer reference pictures
     1107  for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++)
     1108    {
     1109    Int maxTid = -1;
     1110    for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++)
    10931111      {
    1094         Int interLayerRef = layer + ge.m_interViewRefs[j];
    1095         vps.setDirectDependencyFlag( layer, interLayerRef, true );
     1112      for( Int i = 0; i < getGOPSize(); i++ )
     1113      {       
     1114        GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][i];
     1115        GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][i];
     1116       
     1117        for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++)
     1118        {       
     1119          if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps )
     1120          {
     1121            maxTid = std::max( maxTid, geRef.m_temporalId );
     1122          }
     1123        }
    10961124      }
    10971125    }
    1098   }
    1099 
    1100   vps.checkVPSExtensionSyntax();
    1101   vps.calcIvRefLayers();
    1102 }
     1126    vps.setMaxTidIlRefPicPlus1( refLayerIdInVps, maxTid + 1 );
     1127  }
     1128
     1129  // Max one active ref layer flag
     1130  Bool maxOneActiveRefLayerFlag = true; 
     1131  for ( Int currLayerIdInVps = 1; currLayerIdInVps < m_numberOfLayers && maxOneActiveRefLayerFlag; currLayerIdInVps++)
     1132  {
     1133    for( Int i = 0; i < ( getGOPSize() + 1) && maxOneActiveRefLayerFlag; i++ )
     1134    {       
     1135      GOPEntry ge =  m_GOPListMvc[currLayerIdInVps][ ( i < getGOPSize()  ? i : MAX_GOP ) ];
     1136      maxOneActiveRefLayerFlag =  maxOneActiveRefLayerFlag && (ge.m_numActiveRefLayerPics <= 1);
     1137    }           
     1138}
     1139
     1140  vps.setMaxOneActiveRefLayerFlag( maxOneActiveRefLayerFlag );
     1141  vps.setRefLayers();
     1142};
    11031143
    11041144Void TAppEncTop::xSetLayerIds( TComVPS& vps )
     
    11091149  Int  maxNuhLayerId = nuhLayerIdPresentFlag ? xGetMax( m_layerIdInNuh ) : ( m_numberOfLayers - 1 ) ;
    11101150
    1111   vps.setMaxNuhLayerId( maxNuhLayerId );
     1151  vps.setVpsMaxLayerId( maxNuhLayerId );
    11121152  vps.setVpsNuhLayerIdPresentFlag( nuhLayerIdPresentFlag );
    11131153
     
    11251165    maxVec = max( vec[i], maxVec );
    11261166  return maxVec;
     1167}
     1168
     1169Void TAppEncTop::xSetProfileTierLevel( TComVPS& vps )
     1170{
     1171  const Int vpsNumProfileTierLevelMinus1 = 0; //TBD
     1172  vps.setVpsNumProfileTierLevelMinus1( vpsNumProfileTierLevelMinus1 );
     1173 
     1174  for (Int i = 0; i <= vps.getVpsNumProfileTierLevelMinus1(); i++ )
     1175  {
     1176    vps.setVpsProfilePresentFlag( i, true );
     1177  }
     1178}
     1179
     1180
     1181Void TAppEncTop::xSetLayerSets( TComVPS& vps )
     1182{   
     1183  // Layer sets
     1184  vps.setVpsNumLayerSetsMinus1   ( m_vpsNumLayerSets - 1 );
     1185  vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() );
     1186   
     1187  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     1188  {
     1189    for( Int layerId = 0; layerId < MAX_NUM_LAYER_IDS; layerId++ )
     1190    {
     1191      vps.setLayerIdIncludedFlag( false, lsIdx, layerId );
     1192    }
     1193    for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++)
     1194    {       
     1195      vps.setLayerIdIncludedFlag( true, lsIdx, vps.getLayerIdInNuh( m_layerIdsInSets[lsIdx][i] ) );
     1196    }
     1197  }
     1198
     1199  Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size();
     1200  // Additional output layer sets + profileLevelTierIdx
     1201  vps.setDefaultOneTargetOutputLayerFlag   ( m_defaultOneTargetOutputLayerFlag );
     1202  vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
     1203  vps.setNumAddOutputLayerSetsMinus1       ( numAddOuputLayerSets - 1        );
     1204
     1205  for (Int lsIdx = 1; lsIdx < m_vpsNumLayerSets; lsIdx++)
     1206  {
     1207    vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] );
     1208  }
     1209
     1210  for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ )
     1211  {
     1212    vps.setProfileLevelTierIdx( m_vpsNumLayerSets + addOutLs, m_profileLevelTierIdx[ addOutLs ] );
     1213
     1214    Int refLayerSetIdx = m_outputLayerSetIdx[ addOutLs ];     
     1215    vps.setOutputLayerSetIdxMinus1( m_vpsNumLayerSets + addOutLs, refLayerSetIdx - 1 );
     1216
     1217    for (Int i = 0; i < m_layerIdsInSets[ refLayerSetIdx].size(); i++ )
     1218    {
     1219      Bool outputLayerFlag = false;
     1220      for (Int j = 0; j < m_layerIdsInAddOutputLayerSet[ addOutLs ].size(); j++ )
     1221      {
     1222        if (  m_layerIdsInAddOutputLayerSet[addOutLs][ j ] == m_layerIdsInSets[ refLayerSetIdx][ i ] )
     1223        {
     1224          outputLayerFlag = true;
     1225          break;
     1226        }
     1227      }
     1228      vps.setOutputLayerFlag( m_vpsNumLayerSets + addOutLs, i, outputLayerFlag );       
     1229    }
     1230  }
    11271231}
    11281232#endif
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.h

    r531 r534  
    118118  Void xSetLayerIds               ( TComVPS& vps ); 
    119119  Void xSetDimensionIdAndLength   ( TComVPS& vps );
    120   Void xSetDirectDependencyFlags  ( TComVPS& vps );
     120  Void xSetDependencies           ( TComVPS& vps );
     121  Void xSetLayerSets              ( TComVPS& vps );
     122  Void xSetProfileTierLevel       ( TComVPS& vps );
    121123  Int  xGetMax( std::vector<Int>& vec);
    122124#endif
  • branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/program_options_lite.cpp

    r324 r534  
    3939#include <map>
    4040#include "program_options_lite.h"
    41 
     41#include  "../TLibCommon/TypeDef.h"
    4242using namespace std;
    4343
     
    146146      for(Options::NamesPtrList::iterator it = opts.opt_list.begin(); it != opts.opt_list.end(); it++)
    147147      {
     148#if H_MV
     149        if  ( (*it)->opt->opt_duplicate ) continue;
     150#endif
    148151        ostringstream line(ios_base::out);
    149152        doHelpOpt(line, **it, pad_short);
     
    161164      for(Options::NamesPtrList::iterator it = opts.opt_list.begin(); it != opts.opt_list.end(); it++)
    162165      {
     166#if H_MV
     167        if  ( (*it)->opt->opt_duplicate ) continue;
     168#endif
    163169        ostringstream line(ios_base::out);
    164170        line << "  ";
  • branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/program_options_lite.h

    r446 r534  
    3636#include <list>
    3737#include <map>
     38#include  "../TLibCommon/TypeDef.h"
    3839
    3940#if H_MV
     
    8586    struct OptionBase
    8687    {
     88#if H_MV     
     89      OptionBase(const std::string& name, const std::string& desc, bool duplicate = false)
     90        : opt_string(name), opt_desc(desc), opt_duplicate(duplicate)
     91#else
    8792      OptionBase(const std::string& name, const std::string& desc)
    8893      : opt_string(name), opt_desc(desc)
     94#endif
    8995      {};
    9096     
     
    98104      std::string opt_string;
    99105      std::string opt_desc;
     106#if H_MV
     107      bool        opt_duplicate;
     108#endif
    100109    };
    101110   
     
    104113    struct Option : public OptionBase
    105114    {
     115#if H_MV
     116      Option(const std::string& name, T& storage, T default_val, const std::string& desc, bool duplicate = false)
     117        : OptionBase(name, desc, duplicate), opt_storage(storage), opt_default_val(default_val)
     118#else
    106119      Option(const std::string& name, T& storage, T default_val, const std::string& desc)
    107120      : OptionBase(name, desc), opt_storage(storage), opt_default_val(default_val)
     121#endif
    108122      {}
    109123     
     
    362376      {
    363377        std::string cNameBuffer;
    364         std::string cDescriptionBuffer;
     378        std::string cDescBuffer;
    365379
    366380        cNameBuffer       .resize( name.size() + 10 );
    367         cDescriptionBuffer.resize( desc.size() + 10 );
     381        cDescBuffer.resize( desc.size() + 10 );
    368382
    369383        storage.resize(uiMaxNum);
    370384        for ( unsigned int uiK = 0; uiK < uiMaxNum; uiK++ )
    371385        {
     386          Bool duplicate = (uiK != 0);
    372387          // isn't there are sprintf function for string??
    373388          sprintf((char*) cNameBuffer.c_str()       ,name.c_str(),uiK,uiK);
    374           sprintf((char*) cDescriptionBuffer.c_str(),desc.c_str(),uiK,uiK);
    375 
    376           parent.addOption(new Option<T>( cNameBuffer, (storage[uiK]), default_val, cDescriptionBuffer ));
     389
     390          if ( !duplicate )
     391          {         
     392            sprintf((char*) cDescBuffer.c_str(),desc.c_str(),uiK,uiK);
     393          }
     394
     395          cNameBuffer.resize( std::strlen(cNameBuffer.c_str()) ); 
     396          cDescBuffer.resize( std::strlen(cDescBuffer.c_str()) );
     397         
     398
     399          parent.addOption(new Option<T>( cNameBuffer, (storage[uiK]), default_val, cDescBuffer, duplicate ));
    377400        }
    378401
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp

    r532 r534  
    43214321
    43224322  // use coldir.
     4323#if H_MV
     4324  TComPic *pColPic; 
     4325  if (getSlice()->getAltCollocatedIndicationFlag() )
     4326  {
     4327    pColPic = getSlice()->getPicFromRefPicSetInterLayer( getSlice()->getActiveMotionPredRefLayerId( getSlice()->getCollocatedRefLayerIdx() ));
     4328  }
     4329  else
     4330  {
     4331    pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 
     4332  } 
     4333#else
    43234334  TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());
     4335#endif
    43244336  TComDataCU *pColCU = pColPic->getCU( uiCUAddr );
    43254337  if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE)
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp

    r532 r534  
    108108, m_enableTMVPFlag                ( true )
    109109#if H_MV
     110, m_refPicSetInterLayer           ( NULL )
    110111, m_layerId                       (0)
    111112, m_viewId                        (0)
     
    114115, m_isDepth                       (false)
    115116#endif
     117, m_discardableFlag               (false)
     118, m_interLayerPredEnabledFlag     (false)
     119, m_numInterLayerRefPicsMinus1    (0)
     120, m_interLayerSamplePredOnlyFlag  (false)
     121, m_altCollocatedIndicationFlag   (0)
     122, m_collocatedRefLayerIdx         (0)
    116123#if H_3D_IC
    117124, m_bApplyIC                      ( false )
     
    162169  initWpAcDcParam();
    163170  m_saoEnabledFlag = false;
     171#if H_MV
     172  for (Int i = 0; i < MAX_NUM_LAYERS; i++ )
     173  {
     174   m_interLayerPredLayerIdc[ i ] = 0;
     175  }
     176#endif
    164177}
    165178
     
    492505  UInt NumPocStCurr1 = 0;
    493506  UInt NumPocLtCurr = 0;
    494 #if H_MV
    495   Int numDirectRefLayers  = getVPS()->getNumDirectRefLayers( getLayerIdInVps() );
    496   assert( numDirectRefLayers == refPicSetInterLayer.size() );
    497 #endif
    498507  Int i;
    499508  for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++)
     
    544553  TComPic*  rpsCurrList1[MAX_NUM_REF+1];
    545554#if H_MV
    546   Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + numDirectRefLayers;
     555  Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr;
     556  assert( numPocInterCurr == 0 || getInterRefEnabledInRPLFlag() );
     557  Int numPocTotalCurr = numPocInterCurr + getNumActiveRefLayerPics( );
    547558  assert( numPocTotalCurr == getNumRpsCurrTempList() );
    548559#else
     
    582593
    583594  Int cIdx = 0;
     595#if H_MV
     596  if ( getInterRefEnabledInRPLFlag() )
     597  { 
     598#endif
    584599  for ( i=0; i<NumPocStCurr0; i++, cIdx++)
    585600  {
     
    595610  }
    596611#if H_MV
    597   for ( i=0; i<numDirectRefLayers;  i++, cIdx++)
    598   {
    599     if( cIdx <= MAX_NUM_REF )
    600     {
     612  }
     613  for ( i=0; i < getNumActiveRefLayerPics( );  i++, cIdx++)
     614    {
     615    assert( cIdx < MAX_NUM_REF );   
    601616      rpsCurrList0[cIdx] = refPicSetInterLayer[i];
    602617    }
    603   }
    604618#endif
    605619
     
    607621  {
    608622    cIdx = 0;
     623#if H_MV
     624    if ( getInterRefEnabledInRPLFlag() )
     625    { 
     626#endif
    609627    for ( i=0; i<NumPocStCurr1; i++, cIdx++)
    610628    {
     
    620638    }
    621639#if H_MV
    622     for ( i=0; i<numDirectRefLayers;  i++, cIdx++)
    623     {
    624       if( cIdx <= MAX_NUM_REF )
    625       {
     640    }
     641    for ( i=0; i < getNumActiveRefLayerPics( );  i++, cIdx++)
     642      {
     643      assert( cIdx < MAX_NUM_REF );   
    626644        rpsCurrList1[cIdx] = refPicSetInterLayer[i];
    627645      }
    628     }
    629646#endif
    630647  }
    631648
    632649  ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm));
     650
     651#if H_MV
     652  Int numPocSt = NumPocStCurr0 + NumPocStCurr1;
     653  assert(  getInterRefEnabledInRPLFlag( ) || numPocSt == 0 );
     654
     655  for (Int li = 0; li < 2; li++)
     656  {
     657    if ( m_eSliceType == P_SLICE && li == 1 )
     658    {
     659      m_aiNumRefIdx[1] = 0;
     660      ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1]));
     661    }
     662    else
     663    {
     664      for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[ li ] - 1 ); rIdx ++)
     665      {
     666        Bool listModified             =                m_RefPicListModification.getRefPicListModificationFlagL( li );
     667        Int orgIdx                    = listModified ? m_RefPicListModification.getRefPicSetIdxL(li, rIdx) : (rIdx % numPocTotalCurr);
     668
     669        m_apcRefPicList    [li][rIdx] = ( li == 0 )  ? rpsCurrList0[ orgIdx  ] : rpsCurrList1[ orgIdx  ];
     670        m_bIsUsedAsLongTerm[li][rIdx] = ( orgIdx >= numPocSt ) ;
     671      }
     672    }
     673  }
     674#else
    633675
    634676  for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[0]-1); rIdx ++)
     
    652694    }
    653695  }
     696#endif
    654697}
    655698
     
    687730  }
    688731#if H_MV
    689   numRpsCurrTempList = numRpsCurrTempList + getVPS()->getNumDirectRefLayers( getLayerIdInVps() );
     732  assert( ( numRpsCurrTempList == 0 ) || getInterRefEnabledInRPLFlag() );
     733  numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics();
    690734#endif
    691735  return numRpsCurrTempList;
     
    10221066  m_enableTMVPFlag                = pSrc->m_enableTMVPFlag;
    10231067  m_maxNumMergeCand               = pSrc->m_maxNumMergeCand;
     1068
     1069#if H_MV
     1070  // Additional slice header syntax elements
     1071  m_discardableFlag            = pSrc->m_discardableFlag;
     1072  m_interLayerPredEnabledFlag  = pSrc->m_interLayerPredEnabledFlag;
     1073  m_numInterLayerRefPicsMinus1 = pSrc->m_numInterLayerRefPicsMinus1;
     1074
     1075  for (Int layer = 0; layer < MAX_NUM_LAYERS; layer++ )
     1076  {
     1077    m_interLayerPredLayerIdc[ layer ] = pSrc->m_interLayerPredLayerIdc[ layer ];
     1078  }
     1079 
     1080  m_interLayerSamplePredOnlyFlag = pSrc->m_interLayerSamplePredOnlyFlag;
     1081  m_altCollocatedIndicationFlag  = pSrc->m_altCollocatedIndicationFlag ;   
     1082  m_collocatedRefLayerIdx        = pSrc->m_collocatedRefLayerIdx       ;
     1083  m_numActiveMotionPredRefLayers = pSrc->m_numActiveMotionPredRefLayers;
     1084
     1085  for (Int layer = 0; layer < MAX_NUM_LAYER_IDS; layer++)
     1086  {   
     1087    m_interLayerPredLayerIdc[layer] = pSrc->m_interLayerPredLayerIdc[layer];
     1088  }
     1089#endif
    10241090#if H_3D_IC
    10251091  m_bApplyIC = pSrc->m_bApplyIC;
     
    14891555, m_numHrdParameters          (  0)
    14901556#if H_MV
    1491 , m_maxNuhLayerId             (  0)
     1557, m_maxLayerId             (  0)
    14921558#else
    14931559, m_maxNuhReservedZeroLayerId (  0)
     
    15081574  }
    15091575#if H_MV
     1576  for (Int lsIdx = 0; lsIdx < MAX_VPS_OP_SETS_PLUS1; lsIdx++ )
     1577  { 
     1578    for( Int layerId = 0; layerId < MAX_VPS_NUH_LAYER_ID_PLUS1; layerId++ )
     1579    {
     1580      m_layerIdIncludedFlag[lsIdx][layerId] = false;
     1581    }
     1582  }
     1583
     1584  m_vpsNumberLayerSetsMinus1     = -1;
     1585  m_vpsNumProfileTierLevelMinus1 = -1;
     1586   
     1587  for ( Int i = 0; i < MAX_VPS_PROFILE_TIER_LEVEL; i++)
     1588  {
     1589    m_profileRefMinus1[ i ] = -1;
     1590  }
     1591   
     1592  m_moreOutputLayerSetsThanDefaultFlag = false;   
     1593  m_numAddOutputLayerSetsMinus1        = -1;   
     1594  m_defaultOneTargetOutputLayerFlag    = false;
     1595 
     1596  for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++)
     1597  {
     1598    m_outputLayerSetIdxMinus1[i]  = -1;
     1599    m_profileLevelTierIdx[i]      = 0;
     1600    for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++)
     1601    {
     1602      m_outputLayerFlag[i][j] = false;
     1603    }
     1604  }
     1605 
     1606  m_maxOneActiveRefLayerFlag = false;
     1607  m_directDepTypeLenMinus2   = 0;         
     1608 
     1609
    15101610  m_avcBaseLayerFlag = false;
    15111611  m_splittingFlag    = false;
     
    15181618
    15191619  m_vpsNuhLayerIdPresentFlag = false;
    1520   m_numOutputLayerSets       = 0;
    15211620
    15221621  for( Int i = 0; i < MAX_VPS_OP_SETS_PLUS1; i++ )
    15231622  {
    15241623    m_vpsProfilePresentFlag   [i] = false;
    1525     m_profileLayerSetRefMinus1[i] = 0;
    1526     m_outputLayerSetIdx       [i] = 0;
     1624    m_profileRefMinus1[i] = 0;
     1625    m_outputLayerSetIdxMinus1       [i] = 0;
    15271626    for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ )
    15281627    {
     
    15401639    m_layerIdInNuh      [i] = ( i == 0 ) ? 0 : -1;
    15411640    m_numDirectRefLayers[i] = 0;
     1641    m_maxTidIlRefPicPlus1[i] = -1;
    15421642#if H_3D
    15431643    m_viewIndex         [i] = -1;
     
    15661666    {
    15671667      m_directDependencyFlag[i][j] = false;
     1668      m_directDependencyType[i][j] = -1;
    15681669      m_refLayerId[i][j]           = -1;
    15691670    }
     
    16861787Bool TComVPS::checkVPSExtensionSyntax()
    16871788{
    1688   // check splitting flag constraint
    1689   if ( getSplittingFlag() )
    1690   {
    1691     // Derive dimBitOffset[j]
    1692     Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1];
    1693     Int numScalabilityTypes = getNumScalabilityTypes();
    1694     dimBitOffset[0] = 0;
    1695 
    1696     for (Int type = 1; type <= numScalabilityTypes; type++ )
    1697     {
    1698       dimBitOffset[ type ] = 0;
    1699       for (Int dimIdx = 0; dimIdx <= type - 1; dimIdx++)
    1700         dimBitOffset[ type ] += ( getDimensionIdLen( dimIdx ) );
    1701     }
    1702 
    1703     for (Int type = 0; type < getNumScalabilityTypes(); type++ )
    1704     {
    1705       for( Int layer = 1; layer < getMaxLayers(); layer++ )
    1706       {
    1707         assert( getDimensionId( layer, type ) == ( ( getLayerIdInNuh( layer ) & ( (1 << dimBitOffset[ type + 1 ] ) - 1) ) >> dimBitOffset[ type ] ) );
    1708       };
    1709   };
    1710   }
    1711 
    17121789  for( Int layer = 1; layer < getMaxLayers(); layer++ )
    17131790  {
     
    17371814}
    17381815
    1739 
    1740 
    17411816Void TComVPS::setScalabilityMask( UInt val )
    17421817{
     
    17451820}
    17461821
    1747 Void TComVPS::calcIvRefLayers()
    1748 {
    1749   for( Int i = 1; i <= getMaxLayers(); i++ )
     1822Void TComVPS::setRefLayers()
     1823{
     1824  for( Int i = 0; i < MAX_NUM_LAYERS; i++ )
    17501825  {
     1826    m_numSamplePredRefLayers[ i ] = 0;
     1827    m_numMotionPredRefLayers[ i ] = 0;
    17511828    m_numDirectRefLayers[ i ] = 0;
     1829    for( Int j = 0; j < MAX_NUM_LAYERS; j++ ) {
     1830      m_samplePredEnabledFlag[ i ][ j ] = 0;
     1831      m_motionPredEnabledFlag[ i ][ j ] = 0;
     1832      m_refLayerId[ i ][ j ] = 0;
     1833      m_samplePredRefLayerId[ i ][ j ] = 0;
     1834      m_motionPredRefLayerId[ i ][ j ] = 0;
     1835    }
     1836  }
     1837
     1838  for( Int i = 1; i  <= getMaxLayers()- 1; i++ )
     1839  {
     1840    for( Int j = 0; j < i; j++ )
     1841    {
     1842      if( getDirectDependencyFlag(i,j) )
     1843      {
     1844        m_refLayerId[ i ][m_numDirectRefLayers[ i ]++ ] = getLayerIdInNuh( j );
     1845
     1846        m_samplePredEnabledFlag [ i ][ j ]  = ( (   getDirectDependencyType( i , j ) + 1 ) & 1 ) == 1;
     1847        m_numSamplePredRefLayers[ i ]      += m_samplePredEnabledFlag [ i ][ j ] ? 1 : 0;
     1848        m_motionPredEnabledFlag [ i ][ j ]  = ( ( ( getDirectDependencyType( i , j ) + 1 ) & 2 ) >> 1 ) == 1;
     1849        m_numMotionPredRefLayers[ i ]      += m_motionPredEnabledFlag  [ i][ j ] ? 1 : 0;
     1850      }
     1851    }
     1852  }
     1853
     1854  for( Int i = 1, mIdx = 0, sIdx = 0; i <= getMaxLayers()- 1; i++ )
     1855  {   
    17521856    for( Int j = 0 ; j < i; j++ )
    1753       if( m_directDependencyFlag[ i ][ j ])
    1754         m_refLayerId[ i ][ m_numDirectRefLayers[ i ]++ ] = m_layerIdInNuh[ j ];   
     1857    {
     1858      if( m_motionPredEnabledFlag[ i ][ j ] )
     1859      {
     1860        m_motionPredRefLayerId[ i ][ mIdx++ ] = getLayerIdInNuh( j );
     1861      }
     1862     
     1863      if( m_samplePredEnabledFlag[ i ][ j ] )
     1864      {
     1865        m_samplePredRefLayerId[ i ][ sIdx++ ] = getLayerIdInNuh( j );
     1866      }
     1867    }
    17551868  }
    17561869}
     
    18141927  return getLayerIdInNuh( foundlayerId );
    18151928}
     1929
    18161930#endif // H_3D
     1931
     1932Int TComVPS::xCeilLog2( Int val )
     1933{
     1934  assert( val > 0 );
     1935  Int ceilLog2 = 0;
     1936  while( val > ( 1 << ceilLog2 ) ) ceilLog2++;
     1937  return ceilLog2;
     1938}
     1939
     1940
     1941Int TComVPS::xGetDimBitOffset( Int j )
     1942{
     1943  Int dimBitOffset = 0;
     1944  if ( getSplittingFlag() && j == getNumScalabilityTypes() )
     1945  {
     1946     dimBitOffset = 6;
     1947  }
     1948  else
     1949  {
     1950    for (Int dimIdx = 0; dimIdx <= j-1; dimIdx++)
     1951    {
     1952      dimBitOffset += getDimensionIdLen( dimIdx );
     1953    }
     1954  }
     1955  return dimBitOffset;
     1956}
     1957
     1958Int TComVPS::inferDimensionId( Int i, Int j )
     1959{
     1960    return ( ( getLayerIdInNuh( i ) & ( (1 << xGetDimBitOffset( j + 1 ) ) - 1) ) >> xGetDimBitOffset( j ) );
     1961}
     1962
     1963Int TComVPS::inferLastDimsionIdLenMinus1()
     1964{
     1965  return ( 5 - xGetDimBitOffset( getNumScalabilityTypes() - 1 ) );
     1966}
     1967
     1968Int TComVPS::getNumLayersInIdList( Int lsIdx )
     1969{
     1970  assert( lsIdx >= 0 );
     1971  assert( lsIdx <= getVpsNumLayerSetsMinus1() );
     1972  Int numLayersInIdList = 0;
     1973  for (Int layerId = 0; layerId < getVpsMaxLayerId(); layerId++ )
     1974  {
     1975    numLayersInIdList += ( getLayerIdIncludedFlag( lsIdx, layerId ) );
     1976  }
     1977  return numLayersInIdList;
     1978}
    18171979#endif // H_MV
    18181980
     
    18652027#if H_MV
    18662028, m_interViewMvVertConstraintFlag (false)
     2029, m_numIlpRestrictedRefLayers ( 0 )
     2030
    18672031#endif
    18682032#if H_3D
     
    18832047  ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps));
    18842048  ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag));
     2049#if H_MV
     2050  for (Int i = 0; i < MAX_NUM_LAYERS; i++ )
     2051  {
     2052    m_minSpatialSegmentOffsetPlus1[ i ] = 0;
     2053    m_ctuBasedOffsetEnabledFlag   [ i ] = false;
     2054    m_minHorizontalCtuOffsetPlus1 [ i ] = 0;
     2055  }
     2056#endif
    18852057}
    18862058
     
    23612533  refPicSetInterLayer.clear();
    23622534
    2363   for( Int i = 0; i < getVPS()->getNumDirectRefLayers( getLayerIdInVps() ); i++ )
    2364   {
    2365     Int layerIdRef = getVPS()->getRefLayerId( getLayerIdInVps(), i );
     2535  for( Int i = 0; i < getNumActiveRefLayerPics(); i++ )
     2536  {
     2537    Int layerIdRef = getRefPicLayerId( i );
    23662538    TComPic* picRef = ivPicLists->getPic( layerIdRef, getPOC() ) ;
    23672539    assert ( picRef != 0 );
     
    23712543    picRef->getSlice(0)->setReferenced( true );       
    23722544
     2545    // Consider to check here:
     2546    // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer that is a RASL picture. "
    23732547    refPicSetInterLayer.push_back( picRef );
    23742548  }
     
    24412615    }
    24422616  }
     2617}
     2618Int TComSlice::xCeilLog2( Int val )
     2619{
     2620  assert( val > 0 );
     2621  Int ceilLog2 = 0;
     2622  while( val > ( 1 << ceilLog2 ) ) ceilLog2++;
     2623  return ceilLog2;
     2624}
     2625
     2626Void TComSlice::markCurrPic( TComPic* currPic )
     2627{
     2628  if ( !currPic->getSlice(0)->getDiscardableFlag() )
     2629  {
     2630    currPic->getSlice(0)->setReferenced( true ) ;
     2631    currPic->setIsLongTerm( false );
     2632  }
     2633  else
     2634  {
     2635    currPic->getSlice(0)->setReferenced( false ) ;
     2636  }
     2637}
     2638
     2639Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer )
     2640{
     2641  m_refPicSetInterLayer = refPicSetInterLayer;
     2642}
     2643
     2644TComPic* TComSlice::getPicFromRefPicSetInterLayer( Int layerId )
     2645{
     2646  assert( m_refPicSetInterLayer != 0 );
     2647  assert( (*m_refPicSetInterLayer).size() == getNumActiveRefLayerPics() );
     2648  TComPic* pcPic = NULL;
     2649  for ( Int i = 0; i < getNumActiveRefLayerPics(); i++ )
     2650  {
     2651    if ((*m_refPicSetInterLayer)[ i ]->getLayerId() == layerId)
     2652    {
     2653      pcPic = (*m_refPicSetInterLayer)[ i ];
     2654    }
     2655  }
     2656  assert(pcPic != NULL);
     2657  return pcPic;
     2658}
     2659
     2660Int TComSlice::getNumActiveRefLayerPics()
     2661{
     2662  Int numActiveRefLayerPics;
     2663
     2664  if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) ==  0 || !getInterLayerPredEnabledFlag() )
     2665  {
     2666    numActiveRefLayerPics = 0;
     2667  }
     2668  else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 1 )
     2669  {
     2670    numActiveRefLayerPics = 1;
     2671  }
     2672  else
     2673  {
     2674    numActiveRefLayerPics = getNumInterLayerRefPicsMinus1() + 1;
     2675  }
     2676  return numActiveRefLayerPics;
     2677}
     2678
     2679Int TComSlice::getRefPicLayerId( Int i )
     2680{
     2681  return getVPS()->getRefLayerId( getLayerIdInVps(), getInterLayerPredLayerIdc( i ) );
     2682}
     2683
     2684Void TComSlice::setActiveMotionPredRefLayers()
     2685{
     2686  Int j = 0;
     2687  for( Int i = 0; i < getNumActiveRefLayerPics(); i++)
     2688  {
     2689    if( getVPS()->getMotionPredEnabledFlag( getLayerIdInVps(), getInterLayerPredLayerIdc( i ))  )
     2690    {
     2691      m_activeMotionPredRefLayerId[ j++ ] = getVPS()->getRefLayerId( getLayerIdInVps(), i );
     2692    }
     2693  }
     2694  m_numActiveMotionPredRefLayers = j;
     2695
     2696  // Consider incorporating bitstream conformance tests on derived variables here.
     2697}
     2698
     2699Bool TComSlice::getInterRefEnabledInRPLFlag()
     2700{
     2701  Bool interRefEnabledInRPLFlag;
     2702  if ( getVPS()->getNumSamplePredRefLayers( getLayerIdInVps() ) > 0 && getNumActiveRefLayerPics() > 0 )
     2703  {
     2704    interRefEnabledInRPLFlag = !getInterLayerSamplePredOnlyFlag();
     2705  }
     2706  else
     2707  {
     2708    interRefEnabledInRPLFlag = 1;
     2709  }
     2710  return interRefEnabledInRPLFlag;
    24432711}
    24442712#if H_3D_ARP
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h

    r532 r534  
    487487  UInt        m_numHrdParameters;
    488488#if H_MV
    489   UInt        m_maxNuhLayerId;
     489  UInt        m_maxLayerId;
    490490#else
    491491  UInt        m_maxNuhReservedZeroLayerId;
     
    494494  UInt*       m_hrdOpSetIdx;
    495495  Bool*       m_cprmsPresentFlag;
    496   UInt        m_numOpSets;
    497 #if H_MV
     496#if H_MV
     497  UInt        m_vpsNumLayerSetsMinus1;
    498498  Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1];
    499499#else
     500  UInt        m_numOpSets;
    500501  Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1];
    501502#endif
     
    514515
    515516#if H_MV
     517  /// VPS EXTENSION SYNTAX ELEMENTS
    516518  Bool        m_avcBaseLayerFlag;
    517519  Bool        m_splittingFlag;
     
    520522  Bool        m_vpsNuhLayerIdPresentFlag;
    521523  Int         m_layerIdInNuh             [MAX_NUM_LAYER_IDS];
     524  Int         m_dimensionId              [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 
     525  Bool        m_directDependencyFlag     [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];
     526  Int         m_maxTidIlRefPicPlus1      [MAX_NUM_LAYERS];
     527  Int         m_vpsNumberLayerSetsMinus1;
     528  Int         m_vpsNumProfileTierLevelMinus1;   
     529  Bool        m_vpsProfilePresentFlag    [MAX_VPS_OP_SETS_PLUS1];
     530  Int         m_profileRefMinus1         [MAX_VPS_PROFILE_TIER_LEVEL];
     531  Bool        m_moreOutputLayerSetsThanDefaultFlag;
     532  Int         m_numAddOutputLayerSetsMinus1;   
     533  Bool        m_defaultOneTargetOutputLayerFlag;
     534  Int         m_outputLayerSetIdxMinus1  [MAX_VPS_OUTPUTLAYER_SETS]; 
     535  Bool        m_outputLayerFlag          [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1];
     536  Int         m_profileLevelTierIdx      [MAX_VPS_OUTPUTLAYER_SETS ];
     537  Bool        m_maxOneActiveRefLayerFlag;       
     538  Int         m_directDepTypeLenMinus2;         
     539  Int         m_directDependencyType     [MAX_NUM_LAYERS] [MAX_NUM_LAYERS];
     540
     541  // VPS EXTENSION SEMANTICS VARIABLES
    522542  Int         m_layerIdInVps             [MAX_NUM_LAYERS   ];
    523   Int         m_dimensionId              [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 
     543
     544  Int         m_numDirectRefLayers       [MAX_NUM_LAYERS];
     545  Int         m_refLayerId               [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 
     546
     547  Int         m_numSamplePredRefLayers   [MAX_NUM_LAYERS];
     548  Bool        m_samplePredEnabledFlag    [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
     549  Int         m_samplePredRefLayerId     [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
     550
     551  Int         m_numMotionPredRefLayers   [MAX_NUM_LAYERS];
     552  Bool        m_motionPredEnabledFlag    [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
     553  Int         m_motionPredRefLayerId     [MAX_NUM_LAYERS][MAX_NUM_LAYERS];
    524554#if H_3D
    525555  Int         m_viewIndex                [MAX_NUM_LAYERS   ];
     556#endif
     557
     558  Int         xCeilLog2       ( Int val );
     559  Int         xGetDimBitOffset( Int j );
     560 
    526561#if H_3D_ARP
    527562  UInt        m_uiUseAdvResPred          [MAX_NUM_LAYERS   ];
     
    549584  Bool        m_ivMvScalingFlag;
    550585#endif
    551 
    552 #endif
    553 
    554  
    555   Bool        m_vpsProfilePresentFlag    [MAX_VPS_OP_SETS_PLUS1];
    556   Int         m_profileLayerSetRefMinus1 [MAX_VPS_OP_SETS_PLUS1];
    557   Int         m_numOutputLayerSets;
    558   Int         m_outputLayerSetIdx        [MAX_VPS_OP_SETS_PLUS1];
    559   Bool        m_outputLayerFlag          [MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1];
    560   Bool        m_directDependencyFlag     [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS];
    561 
    562   Int         m_numDirectRefLayers       [ MAX_NUM_LAYERS ];
    563   Int         m_refLayerId               [ MAX_NUM_LAYERS ][MAX_NUM_LAYERS]; 
    564586
    565587#endif
     
    606628
    607629#if H_MV
    608   UInt    getMaxNuhLayerId()                                    { return m_maxNuhLayerId; }
    609   Void    setMaxNuhLayerId(UInt v)                              { m_maxNuhLayerId = v;    }
     630  UInt    getVpsMaxLayerId()                                    { return m_maxLayerId; }
     631  Void    setVpsMaxLayerId(UInt v)                              { m_maxLayerId = v;    }
     632
     633  UInt    getVpsNumLayerSetsMinus1()                            { return m_vpsNumLayerSetsMinus1; }
     634  Void    setVpsNumLayerSetsMinus1(UInt v)                      { m_vpsNumLayerSetsMinus1 = v;    }
    610635#else
    611636  UInt    getMaxNuhReservedZeroLayerId()                        { return m_maxNuhReservedZeroLayerId; }
    612637  Void    setMaxNuhReservedZeroLayerId(UInt v)                  { m_maxNuhReservedZeroLayerId = v;    }
    613 #endif
    614638
    615639  UInt    getMaxOpSets()                                        { return m_numOpSets; }
    616640  Void    setMaxOpSets(UInt v)                                  { m_numOpSets = v;    }
     641#endif
    617642  Bool    getLayerIdIncludedFlag(UInt opsIdx, UInt id)          { return m_layerIdIncludedFlag[opsIdx][id]; }
    618643  Void    setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)  { m_layerIdIncludedFlag[opsIdx][id] = v;    }
     
    652677  Int     getLayerIdInNuh( Int layerIdInVps )                              { assert( m_layerIdInNuh[layerIdInVps] >= 0 ); return m_layerIdInNuh[layerIdInVps]; }
    653678
     679  Bool    nuhLayerIdIncluded( Int layerIdinNuh )                           { return ( m_layerIdInVps[ layerIdinNuh ] > 0 );  }
     680
     681  Void    setDimensionId( Int layerIdInVps, Int scalIdx, Int val )         { m_dimensionId[layerIdInVps][scalIdx] = val;  }
     682  Int     getDimensionId( Int layerIdInVps, Int scalIdx )                  { return m_dimensionId[layerIdInVps][scalIdx]; }
     683
     684  Void    setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val;  }
     685  Bool    getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps )           { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; }
     686
     687  Void    setMaxTidIlRefPicPlus1( Int layerIdInVps, Int val )              { m_maxTidIlRefPicPlus1[ layerIdInVps ] = val;  }
     688  Int     getMaxTidIlRefPicPlus1( Int layerIdInVps )                       { return m_maxTidIlRefPicPlus1[ layerIdInVps ]; }
     689 
     690  Void    setVpsNumberLayerSetsMinus1( Int val )                           { m_vpsNumberLayerSetsMinus1 = val;  }
     691  Int     getVpsNumberLayerSetsMinus1( )                                   { return m_vpsNumberLayerSetsMinus1; }
     692 
     693  Void    setVpsNumProfileTierLevelMinus1( Int val )                       { m_vpsNumProfileTierLevelMinus1 = val;  }
     694  Int     getVpsNumProfileTierLevelMinus1( )                               { return m_vpsNumProfileTierLevelMinus1; }
     695 
     696  Void    setVpsProfilePresentFlag( Int idx, Bool val )                    { m_vpsProfilePresentFlag[idx] = val;  }
     697  Bool    getVpsProfilePresentFlag( Int idx )                              { return m_vpsProfilePresentFlag[idx]; }
     698
     699  Void    setProfileRefMinus1( Int profileTierLevelIdx, Int val )          { m_profileRefMinus1[ profileTierLevelIdx ] = val;  }
     700  Int     getProfileRefMinus1( Int profileTierLevelIdx )                   { return m_profileRefMinus1[ profileTierLevelIdx ]; }
     701
     702  Void    setMoreOutputLayerSetsThanDefaultFlag( Bool flag )               { m_moreOutputLayerSetsThanDefaultFlag = flag; }
     703  Bool    getMoreOutputLayerSetsThanDefaultFlag()                          { return m_moreOutputLayerSetsThanDefaultFlag; }
     704 
     705  Void    setNumAddOutputLayerSetsMinus1( Int val )                        { m_numAddOutputLayerSetsMinus1 = val; }
     706  Int     getNumAddOutputLayerSetsMinus1( )                                { return m_numAddOutputLayerSetsMinus1; }
     707 
     708  Void    setDefaultOneTargetOutputLayerFlag( Bool flag )                  { m_defaultOneTargetOutputLayerFlag = flag; }
     709  Bool    getDefaultOneTargetOutputLayerFlag( )                            { return m_defaultOneTargetOutputLayerFlag; }
     710 
     711  Void    setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val )        { m_outputLayerSetIdxMinus1[ outLayerSetIdx ]  = val; }
     712  Int     getOutputLayerSetIdxMinus1( Int outLayerSetIdx )                 { return m_outputLayerSetIdxMinus1[ outLayerSetIdx ]; }
     713
     714  Void    setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag )       { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; }
     715  Bool    getOutputLayerFlag( Int outLayerSetIdx, Int i )                  { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; }
     716
     717  Void    setProfileLevelTierIdx( Int outLayerSetIdx, Int val )            { m_profileLevelTierIdx[ outLayerSetIdx  = val ]; }
     718  Int     getProfileLevelTierIdx( Int outLayerSetIdx )                     { return m_profileLevelTierIdx[ outLayerSetIdx ]; }
     719
     720  Void    setMaxOneActiveRefLayerFlag( Bool flag)                          { m_maxOneActiveRefLayerFlag = flag; }
     721  Bool    getMaxOneActiveRefLayerFlag( )                                   { return m_maxOneActiveRefLayerFlag; }
     722
     723  Void    setDirectDepTypeLenMinus2( Int val)                              { m_directDepTypeLenMinus2 = val; }
     724  Int     getDirectDepTypeLenMinus2( )                                     { return m_directDepTypeLenMinus2; }
     725
     726  Void    setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; }
     727  Int     getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps)   { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; }
     728
     729
     730  // VPS EXTENSION SEMANTICS VARIABLES
    654731  Void    setLayerIdInVps( Int layerIdInNuh, Int val )                     { m_layerIdInVps[layerIdInNuh] = val;  }
    655732  Int     getLayerIdInVps( Int layerIdInNuh )                              { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; }
    656733
    657   Bool    nuhLayerIdIncluded( Int layerIdinNuh )                           { return ( m_layerIdInVps[ layerIdinNuh ] > 0 );  }
    658 
    659   Void    setDimensionId( Int layerIdInVps, Int scalIdx, Int val )         { m_dimensionId[layerIdInVps][scalIdx] = val;  }
    660   Int     getDimensionId( Int layerIdInVps, Int scalIdx )                  { return m_dimensionId[layerIdInVps][scalIdx]; }
    661 
    662734  Int     getScalabilityId ( Int layerIdInVps, ScalabilityType scalType );
    663 
    664735  Int     getViewId  ( Int layerIdInVps )                                  { return getScalabilityId( layerIdInVps, VIEW_ID  ); }
     736
     737  Void    setRefLayers();
     738
     739  Int     getNumDirectRefLayers( Int layerIdInVps )          { return m_numDirectRefLayers[ layerIdInVps ];  };                               
     740  Int     getRefLayerId        ( Int layerIdInVps, Int idx );;
     741 
     742  Int     getNumSamplePredRefLayers( Int layerIdInVps )          { return m_numSamplePredRefLayers[layerIdInVps]; }
     743  Bool    getSamplePredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_samplePredEnabledFlag [layerIdInVps][idx]; }
     744  Int     getSamplePredRefLayerId  ( Int layerIdInVps, Int idx ) { return m_samplePredRefLayerId  [layerIdInVps][idx]; }
     745
     746  Int     getNumMotionPredRefLayers( Int layerIdInVps )          { return m_numMotionPredRefLayers[layerIdInVps]; }
     747  Bool    getMotionPredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_motionPredEnabledFlag [layerIdInVps][idx]; }
     748  Int     getMotionPredRefLayerId  ( Int layerIdInVps, Int idx ) { return m_motionPredRefLayerId  [layerIdInVps][idx]; }
     749
     750  Bool    checkVPSExtensionSyntax();
     751  Int     scalTypeToScalIdx   ( ScalabilityType scalType );
     752
     753  Int     getProfileLevelTierIdxLen() { return xCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };       
     754  Int     getNumLayersInIdList              ( Int lsIdx );;
     755
     756  // inference
     757  Int     inferDimensionId     ( Int i, Int j );
     758  Int     inferLastDimsionIdLenMinus1();
     759
    665760#if H_3D 
    666761  Void    initViewIndex();
    667762  Int     getViewIndex    ( Int layerIdInVps )                             { return m_viewIndex[ layerIdInVps ]; }   
    668763  Int     getDepthId      ( Int layerIdInVps )                             { return getScalabilityId( layerIdInVps, DEPTH_ID ); }
    669   Int     getLayerIdInNuh( Int viewIndex, Bool depthFlag ); 
     764  Int     getLayerIdInNuh( Int viewIndex, Bool depthFlag );   
     765
    670766#if H_3D_ARP
    671767  UInt    getUseAdvRP  ( Int layerIdInVps )                                { return m_uiUseAdvResPred[layerIdInVps];    }
     
    703799  Void    setIvMvScalingFlag   ( Bool b )                 { m_ivMvScalingFlag = b;    } 
    704800#endif
    705 #endif
    706 
    707   Void    setVpsProfilePresentFlag( Int layerSet, Bool val )               { m_vpsProfilePresentFlag[layerSet] = val;  }
    708   Bool    getVpsProfilePresentFlag( Int layerSet )                         { return m_vpsProfilePresentFlag[layerSet]; }
    709 
    710   Void    setProfileLayerSetRefMinus1( Int layerSet, Int val )             { m_profileLayerSetRefMinus1[layerSet] = val;  }
    711   Bool    getProfileLayerSetRefMinus1( Int layerSet )                      { return m_profileLayerSetRefMinus1[layerSet]; }
    712 
    713   Void    setNumOutputLayerSets( Int val )                                 { m_numOutputLayerSets = val;  }
    714   Int     getNumOutputLayerSets()                                          { return m_numOutputLayerSets; }
    715 
    716   Void    setOutputLayerSetIdx( Int layerSet, Int val )                    { m_outputLayerSetIdx[layerSet] = val;  }
    717   Int     getOutputLayerSetIdx( Int layerSet )                             { return m_outputLayerSetIdx[layerSet]; }
    718 
    719   Void    setOutputLayerFlag( Int layerSet, Int layer, Bool val )          { m_outputLayerFlag[layerSet][layer] = val;  }
    720   Bool    getOutputLayerFlag( Int layerSet, Int layer )                    { return m_outputLayerFlag[layerSet][layer]; }
    721 
    722   Void    setDirectDependencyFlag( Int layerHigh, Int layerLow, Bool val ) { m_directDependencyFlag[layerHigh][layerLow] = val;  }
    723   Bool    getDirectDependencyFlag( Int layerHigh, Int layerLow )           { return m_directDependencyFlag[layerHigh][layerLow]; }
    724 
    725   Void    calcIvRefLayers();
    726 
    727   Int     getNumDirectRefLayers( Int layerIdInVps )          { return m_numDirectRefLayers[ layerIdInVps ];  };                               
    728   Int     getRefLayerId        ( Int layerIdInVps, Int idx );;
    729  
    730   Bool    checkVPSExtensionSyntax();
    731   Int     scalTypeToScalIdx   ( ScalabilityType scalType );
     801
     802#endif 
    732803#endif
    733804};
     
    813884  Int  m_numTicksPocDiffOneMinus1;
    814885#endif
    815 
     886#if H_MV
     887  Bool m_tileBoundariesAlignedFlag;
     888#endif
    816889public:
    817890  TComVUI()
     
    849922    ,m_numTicksPocDiffOneMinus1(0)
    850923#endif
     924#if H_MV
     925    ,m_tileBoundariesAlignedFlag(true)
     926#endif
    851927  {}
    852928
     
    9501026  Int  getNumTicksPocDiffOneMinus1() {return m_numTicksPocDiffOneMinus1;}
    9511027  Void setNumTicksPocDiffOneMinus1(Int x) { m_numTicksPocDiffOneMinus1 = x;}
     1028#endif
     1029#if H_MV
     1030  Bool getTileBoundariesAlignedFlag(  ) { return m_tileBoundariesAlignedFlag; }
     1031  Void setTileBoundariesAlignedFlag( Bool flag ) { m_tileBoundariesAlignedFlag = flag; }
    9521032#endif
    9531033};
     
    10351115#if H_MV
    10361116  Bool        m_interViewMvVertConstraintFlag;
     1117  Int         m_numIlpRestrictedRefLayers        ;
     1118  Int         m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS];
     1119  Bool        m_ctuBasedOffsetEnabledFlag   [MAX_NUM_LAYERS];
     1120  Int         m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS];
    10371121#endif
    10381122#if H_3D
     
    10411125  Int         m_aaiCodedScale [2][MAX_NUM_LAYERS];
    10421126  Int         m_aaiCodedOffset[2][MAX_NUM_LAYERS];
     1127#endif
     1128#if H_MV
     1129  Int         m_layerId;
    10431130#endif
    10441131public:
     
    11751262  Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; }
    11761263  Bool getInterViewMvVertConstraintFlag()         { return m_interViewMvVertConstraintFlag;}
     1264
     1265  ////  sps_extension_vui_parameters( )
     1266  Void setNumIlpRestrictedRefLayers   ( Int val )        { m_numIlpRestrictedRefLayers         = val;}
     1267  Int  getNumIlpRestrictedRefLayers   ( )                { return m_numIlpRestrictedRefLayers        ;}
     1268 
     1269  Void setMinSpatialSegmentOffsetPlus1( Int i, Int val ) { m_minSpatialSegmentOffsetPlus1[ i ] = val;}
     1270  Int  getMinSpatialSegmentOffsetPlus1( Int i )          { return m_minSpatialSegmentOffsetPlus1[ i ];}
     1271 
     1272  Void setCtuBasedOffsetEnabledFlag   ( Int i, Bool flag ) { m_ctuBasedOffsetEnabledFlag   [ i ] = flag;}
     1273  Bool getCtuBasedOffsetEnabledFlag   ( Int i )            { return m_ctuBasedOffsetEnabledFlag   [ i ];}
     1274
     1275  Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val )   { m_minHorizontalCtuOffsetPlus1 [ i ] = val;}
     1276  Int  getMinHorizontalCtuOffsetPlus1 ( Int i )            { return m_minHorizontalCtuOffsetPlus1 [ i ];}
    11771277#endif
    11781278#if H_3D
     
    11851285  Int* getInvCodedOffset     ()  { return m_aaiCodedOffset[1]; }
    11861286#endif
     1287#if H_MV
     1288  Int  getLayerId            ()           { return m_layerId; }
     1289  Void setLayerId            ( Int val )  { m_layerId = val; }
     1290#endif
     1291
    11871292};
    11881293
     
    12131318#if H_MV
    12141319  // Why not an listIdx for all members, would avoid code duplication??
    1215   Void       setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; };
    1216   Void       setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0  ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1 ) = flag;  }; 
     1320  Void       setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; }
     1321  UInt       getRefPicSetIdxL(UInt li, UInt idx ) { return ( li == 0 ) ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ; }
     1322  Void       setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0  ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1 ) = flag;  }
     1323  Bool       getRefPicListModificationFlagL(UInt li ) { return ( li== 0) ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1; }
    12171324#endif
    12181325};
     
    15391646  Bool       m_enableTMVPFlag;
    15401647#if H_MV
     1648  std::vector<TComPic*>* m_refPicSetInterLayer;
    15411649  Int        m_layerId;
    15421650  Int        m_viewId;
     
    15651673#endif
    15661674#endif
     1675#if H_MV
     1676// Additional slice header syntax elements
     1677  Bool       m_discardableFlag;
     1678  Bool       m_interLayerPredEnabledFlag;
     1679  Int        m_numInterLayerRefPicsMinus1;
     1680  Int        m_interLayerPredLayerIdc       [MAX_NUM_LAYERS];
     1681  Bool       m_interLayerSamplePredOnlyFlag;
     1682  Bool       m_altCollocatedIndicationFlag;
     1683  Int        m_collocatedRefLayerIdx;
     1684// Additional slice header semantics variables
     1685  Int        m_numActiveMotionPredRefLayers;
     1686  Int        m_activeMotionPredRefLayerId   [ MAX_NUM_LAYER_IDS ];
     1687
     1688#endif
     1689
    15671690public:
    15681691  TComSlice();
     
    17571880  Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer );
    17581881  static Void markIvRefPicsAsShortTerm    ( std::vector<TComPic*> refPicSetInterLayer );
     1882  static Void markCurrPic                 ( TComPic* currPic );;
    17591883  static Void markIvRefPicsAsUnused       ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc  );
    17601884
     
    18731997
    18741998#endif
     1999#if H_MV
     2000// Additional slice header syntax elements
     2001Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; }
     2002Bool getDiscardableFlag(  ) { return m_discardableFlag; }
     2003
     2004Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; }
     2005Bool getInterLayerPredEnabledFlag(  ) { return m_interLayerPredEnabledFlag; }
     2006
     2007Void setNumInterLayerRefPicsMinus1( Int  val ) { m_numInterLayerRefPicsMinus1 = val; }
     2008Int  getNumInterLayerRefPicsMinus1(  ) { return m_numInterLayerRefPicsMinus1; }
     2009
     2010Void setInterLayerPredLayerIdc( Int i, Int  val ) { m_interLayerPredLayerIdc[i] = val; }
     2011Int  getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; }
     2012
     2013Void setInterLayerSamplePredOnlyFlag( Bool flag ) { m_interLayerSamplePredOnlyFlag = flag; }
     2014Bool getInterLayerSamplePredOnlyFlag(  ) { return m_interLayerSamplePredOnlyFlag; }
     2015
     2016Void setAltCollocatedIndicationFlag( Bool flag ) { m_altCollocatedIndicationFlag = flag; }
     2017Bool getAltCollocatedIndicationFlag(  ) { return m_altCollocatedIndicationFlag; }
     2018
     2019Void setCollocatedRefLayerIdx( Int  val ) { m_collocatedRefLayerIdx = val; }
     2020Int  getCollocatedRefLayerIdx(  ) { return m_collocatedRefLayerIdx; }
     2021
     2022// Additional variables derived in slice header semantics
     2023Int  getNumInterLayerRefPicsMinus1Len( ) { return xCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerIdInVps() )); }
     2024Int  getInterLayerPredLayerIdcLen    ( ) { return xCeilLog2(  getVPS()->getNumDirectRefLayers( getLayerIdInVps() )); }
     2025
     2026Int  getNumActiveRefLayerPics( );
     2027Int  getRefPicLayerId               ( Int i );
     2028
     2029Void setActiveMotionPredRefLayers   ( );
     2030
     2031Int  getNumActiveMotionPredRefLayers(  )      { return m_numActiveMotionPredRefLayers; }
     2032Int  getActiveMotionPredRefLayerId  ( Int i ) { return m_activeMotionPredRefLayerId[i]; }
     2033
     2034Bool getInterRefEnabledInRPLFlag( );
     2035
     2036Void     setRefPicSetInterLayer       ( std::vector<TComPic*>* m_refPicSetInterLayer );
     2037TComPic* getPicFromRefPicSetInterLayer( Int layerId );
     2038
     2039#endif
    18752040
    18762041protected:
     
    18792044TComPic*  xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb);
    18802045#if H_MV
     2046  Int       xCeilLog2( Int val );
    18812047  TComPic*  xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); 
    18822048#endif
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h

    r532 r534  
    260260#if H_MV
    261261#define MAX_NUM_LAYERS                  64
     262#define MAX_VPS_PROFILE_TIER_LEVEL      64
     263#define MAX_VPS_ADD_OUTPUT_LAYER_SETS   1024
     264#define MAX_VPS_OUTPUTLAYER_SETS        ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 )
    262265#endif
    263266
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r532 r534  
    456456  {
    457457    READ_FLAG(   uiCode, "tiles_fixed_structure_flag");               pcVUI->setTilesFixedStructureFlag(uiCode);
     458#if H_MV
     459    if ( pcSPS->getLayerId() > 0 )
     460    {
     461      READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 );
     462    }
     463#endif
    458464    READ_FLAG(   uiCode, "motion_vectors_over_pic_boundaries_flag");  pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode);
    459465    READ_FLAG(   uiCode, "restricted_ref_pic_lists_flag");            pcVUI->setRestrictedRefPicListsFlag(uiCode);
     
    577583  UInt  uiCode;
    578584  READ_CODE( 4,  uiCode, "sps_video_parameter_set_id");          pcSPS->setVPSId        ( uiCode );
     585#if H_MV
     586  if ( pcSPS->getLayerId() == 0 )
     587  {
     588#endif
    579589  READ_CODE( 3,  uiCode, "sps_max_sub_layers_minus1" );          pcSPS->setMaxTLayers   ( uiCode+1 );
    580590  READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" );               pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );
     
    584594    assert( uiCode == 1 );
    585595  }
    586  
    587596  parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
     597#if H_MV
     598  }
     599#endif
    588600  READ_UVLC(     uiCode, "sps_seq_parameter_set_id" );           pcSPS->setSPSId( uiCode );
    589601  READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
     
    743755#else
    744756    READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" );    pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);
     757    ////   sps_extension_vui_parameters( )
     758    if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )
     759    { 
     760      READ_UVLC( uiCode, "num_ilp_restricted_ref_layers" ); pcSPS->setNumIlpRestrictedRefLayers( uiCode );
     761      for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )
     762      { 
     763        READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcSPS->setMinSpatialSegmentOffsetPlus1( i, uiCode );
     764        if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )
     765        { 
     766          READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[ i ]"); pcSPS->setCtuBasedOffsetEnabledFlag(i, uiCode == 1 );
     767          if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) ) 
     768          {
     769            READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[ i ]"); pcSPS->setMinHorizontalCtuOffsetPlus1( i, uiCode );
     770          }
     771        } 
     772      } 
     773    } 
     774
     775    ////   sps_extension_vui_parameters( ) END
     776    READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" );
    745777    READ_FLAG( uiCode, "sps_extension2_flag");
    746778    if ( uiCode )
     
    752784      }
    753785#else
     786     
    754787      UInt uiCamParPrecision = 0;
    755788      Bool bCamParSlice      = false;
     
    834867  assert( pcVPS->getNumHrdParameters() < MAX_VPS_OP_SETS_PLUS1 );
    835868#if H_MV
    836   assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
    837   READ_CODE( 6, uiCode, "vps_max_nuh_layer_id" );   pcVPS->setMaxNuhLayerId( uiCode );
     869  assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
     870  READ_CODE( 6, uiCode, "vps_max_layer_id" );   pcVPS->setVpsMaxLayerId( uiCode );
     871
     872  READ_UVLC(    uiCode, "vps_max_num_layer_sets_minus1" );               pcVPS->setVpsNumLayerSetsMinus1( uiCode );
     873  for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ )
     874  {
     875    for( UInt i = 0; i <= pcVPS->getVpsMaxLayerId(); i ++ )
    838876#else
    839877  assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
    840878  READ_CODE( 6, uiCode, "vps_max_nuh_reserved_zero_layer_id" );   pcVPS->setMaxNuhReservedZeroLayerId( uiCode );
    841 #endif
     879
    842880  READ_UVLC(    uiCode, "vps_max_op_sets_minus1" );               pcVPS->setMaxOpSets( uiCode + 1 );
    843881  for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ )
    844882  {
    845883    // Operation point set
    846 #if H_MV
    847     for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ )
    848 #else
    849884    for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ )
    850885#endif
     
    893928    READ_FLAG( uiCode, "splitting_flag" );                          pcVPS->setSplittingFlag( uiCode == 1 ? true : false );
    894929
    895     // Parse scalability_mask[i]   
    896930    for( Int sIdx = 0; sIdx < MAX_NUM_SCALABILITY_TYPES; sIdx++ )
    897931    {
     
    899933    }
    900934
    901     Int numScalabilityTypes = pcVPS->getNumScalabilityTypes();
    902 
    903     // Parse dimension_id_len_minus1[j]   
    904     for( Int sIdx = 0; sIdx < numScalabilityTypes; sIdx++ )
     935    for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ )
    905936    {
    906937        READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" );       pcVPS->setDimensionIdLen( sIdx, uiCode + 1 );
    907938    }
    908939
    909     // vps_nuh_layer_id_present_flag
     940    if ( pcVPS->getSplittingFlag() )
     941      {
     942      pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1, pcVPS->inferLastDimsionIdLenMinus1() );       
     943      }
     944
    910945    READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" );           pcVPS->setVpsNuhLayerIdPresentFlag( uiCode == 1 ? true : false );
    911946
    912     // parse layer_id_in_nuh[i] and derive LayerIdInVps
    913     // already updated to JCT3V-D0220
    914     for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ )
    915     {
    916       UInt layerIdInNuh;
    917       if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( layer != 0 ) )
    918       {
    919         READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" );                layerIdInNuh = uiCode;
     947    for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )
     948    {
     949      if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) )
     950      {
     951        READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" );                pcVPS->setLayerIdInNuh( i, uiCode );
    920952      }
    921953      else
    922954      {
    923         layerIdInNuh = layer;
    924       }     
    925 
    926       pcVPS->setLayerIdInNuh( layer, layerIdInNuh );
    927       pcVPS->setLayerIdInVps( layerIdInNuh, layer );
    928 
    929       // parse dimension_id[i][j]
    930       for( Int sIdx = 0; sIdx < numScalabilityTypes; sIdx++ )
    931       {
    932           READ_CODE( pcVPS->getDimensionIdLen( sIdx ), uiCode, "dimension_id[i][j]" );  pcVPS->setDimensionId( layer, sIdx, uiCode );
    933       }
    934     }
    935 
    936     for( Int layerSet = 1; layerSet <= pcVPS->getMaxOpSets() - 1; layerSet++ )
    937     {
    938       READ_FLAG(  uiCode, "vps_profile_present_flag[lsIdx]" );    pcVPS->setVpsProfilePresentFlag( layerSet, uiCode == 1 ? true : false );
    939       if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
    940       {
    941         READ_UVLC( uiCode, "profile_layer_set_ref_minus1[lsIdx]" ); pcVPS->setProfileLayerSetRefMinus1( layerSet, uiCode );
    942       }
    943 
    944       parsePTL ( pcVPS->getPTL( layerSet ), pcVPS->getVpsProfilePresentFlag( layerSet ), pcVPS->getMaxTLayers()-1);
    945       if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
    946       {
    947         TComPTL temp = *pcVPS->getPTL( layerSet );
    948         *pcVPS->getPTL( layerSet ) = *pcVPS->getPTL( pcVPS->getProfileLayerSetRefMinus1( layerSet ) + 1 );
    949         pcVPS->getPTL( layerSet )->copyLevelFrom( &temp );
    950       }
    951     }
    952 
    953     READ_UVLC( uiCode, "num_output_layer_sets" );                  pcVPS->setNumOutputLayerSets( uiCode );
     955        pcVPS->setLayerIdInNuh( i, i );;
     956    }
     957
     958      pcVPS->setLayerIdInVps( pcVPS->getLayerIdInNuh( i ), i );
    954959   
    955     for( Int layerSet = 0; layerSet < pcVPS->getNumOutputLayerSets(); layerSet++ )
    956     {
    957       READ_UVLC( uiCode, "output_layer_set_idx[i]" );              pcVPS->setOutputLayerSetIdx( layerSet, uiCode );
    958       for( Int layer = 0; layer <= pcVPS->getMaxNuhLayerId(); layer++ )
    959       {
    960         if( pcVPS->getLayerIdIncludedFlag( pcVPS->getOutputLayerSetIdx( layerSet ), layer ) == true )
    961         {
    962           READ_FLAG( uiCode, "output_layer_flag" );                 pcVPS->setOutputLayerFlag( layerSet, layer, uiCode == 1 ? true : false );
    963         }
    964       }
    965     }
     960      for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ )
     961    {
     962        if ( !pcVPS->getSplittingFlag() )
     963      {
     964          READ_CODE( pcVPS->getDimensionIdLen( j ), uiCode, "dimension_id[i][j]" );  pcVPS->setDimensionId( i, j, uiCode );
     965        }
     966        else
     967        {
     968          pcVPS->setDimensionId( i, j, pcVPS->inferDimensionId( i, j)  );
     969        }
     970      }
     971    }
     972
    966973
    967974    for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
     
    972979      }
    973980    }
    974    
     981
     982    for( Int i = 0; i < pcVPS->getMaxLayers() - 1; i++ )
     983    {
     984      READ_CODE( 3, uiCode,       "max_tid_il_ref_pics_plus1[i]" );      pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );
     985    }
     986
     987    READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1"      );  pcVPS->setVpsNumberLayerSetsMinus1    ( uiCode );
     988    READ_CODE( 6,  uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );
     989
     990    for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
     991    {
     992      READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
     993      if( !pcVPS->getVpsProfilePresentFlag( i ) )
     994      {
     995        READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );
     996      }
     997      parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);
     998      if( !pcVPS->getVpsProfilePresentFlag( i ) )
     999      {
     1000        TComPTL temp = *pcVPS->getPTL( i );
     1001        *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );
     1002        pcVPS->getPTL( i )->copyLevelFrom( &temp );
     1003      }
     1004    }
     1005
     1006    Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
     1007
     1008    READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );
     1009
     1010    if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
     1011    {
     1012      READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1"      ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );
     1013      numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);
     1014    }
     1015
     1016    if( numOutputLayerSets > 1)
     1017    {
     1018      READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag(  uiCode == 1);
     1019    } 
     1020
     1021    for( Int i = 1; i < numOutputLayerSets; i++ )
     1022    {
     1023      if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
     1024      {       
     1025        READ_UVLC( uiCode,      "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );
     1026        for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )
     1027        {
     1028          READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 );
     1029        }       
     1030      }
     1031      if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
     1032      {     
     1033        READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" );   pcVPS->setProfileLevelTierIdx( i , uiCode );
     1034      }
     1035    }
     1036
     1037    READ_FLAG( uiCode , "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag( uiCode == 1 );
     1038    READ_UVLC( uiCode,  "direct_dep_type_len_minus2"); pcVPS->setDirectDepTypeLenMinus2 ( uiCode );
     1039
     1040    for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
     1041    {
     1042      for( Int j = 0; j < i; j++ )
     1043      {
     1044        if (pcVPS->getDirectDependencyFlag( i, j) )
     1045        {       
     1046          READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2,  uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode);
     1047        }
     1048      }
     1049    }
     1050
     1051    READ_FLAG ( uiCode,                    "vps_shvc_reserved_zero_flag" );
     1052
     1053#if H_3D   
    9751054    READ_FLAG( uiCode,  "vps_extension2_flag" );
    9761055    if (uiCode)
    9771056    {
    978 #if H_3D
    9791057      m_pcBitstream->readOutTrailingBits();
    9801058
     
    10391117      }
    10401118      READ_FLAG( uiCode, "iv_mv_scaling_flag");                       pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );
    1041 #else
    1042       while ( xMoreRbspData() )
    1043       {
    1044         READ_FLAG( uiCode, "vps_extension2_data_flag");
    1045       }
    10461119#endif
    10471120    }
     
    10491122    pcVPS->checkVPSExtensionSyntax();
    10501123
    1051     pcVPS->calcIvRefLayers();
     1124    pcVPS->setRefLayers();
    10521125
    10531126#else
     
    11471220  if(!rpcSlice->getDependentSliceSegmentFlag())
    11481221  {
     1222#if H_MV   
     1223    if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )
     1224    {
     1225      READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );
     1226    }
     1227
     1228    for (Int i = 1; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)   
     1229#else
    11491230    for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     1231#endif     
    11501232    {
    11511233      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
     
    11751257      rps->setNumberOfPictures(0);
    11761258      rpcSlice->setRPS(rps);
     1259#if H_MV
     1260      rpcSlice->setEnableTMVPFlag(false);
     1261#endif
    11771262    }
    11781263    else
     
    13321417      }
    13331418    }
     1419#if H_MV
     1420    Int layerIdInVps       = rpcSlice->getLayerIdInVps();
     1421    if( rpcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 )
     1422    {   
     1423      READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 );
     1424      if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerIdInVps ) > 1 )
     1425      {           
     1426        if( !vps->getMaxOneActiveRefLayerFlag()) 
     1427        {
     1428          READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode );
     1429        }
     1430        for( Int i = 0; i < rpcSlice->getNumActiveRefLayerPics(); i++ )   
     1431        {
     1432          READ_CODE( rpcSlice->getInterLayerPredLayerIdcLen( ), uiCode, "inter_layer_pred_layer_idc" ); rpcSlice->setInterLayerPredLayerIdc( i, uiCode );
     1433        }
     1434      } 
     1435    }
     1436
     1437    rpcSlice->setActiveMotionPredRefLayers( );
     1438
     1439    if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0  &&  rpcSlice->getNumActiveRefLayerPics() > 0 )
     1440    {
     1441      READ_FLAG( uiCode, "inter_layer_sample_pred_only_flag" ); rpcSlice->setInterLayerSamplePredOnlyFlag( uiCode == 1 );
     1442    }
     1443
     1444#endif
    13341445    if(sps->getUseSAO())
    13351446    {
     
    14721583    if ( rpcSlice->getEnableTMVPFlag() )
    14731584    {
     1585#if H_MV
     1586      if( rpcSlice->getLayerId() > 0 && rpcSlice->getNumActiveMotionPredRefLayers() > 0 )
     1587      {
     1588        READ_FLAG( uiCode, "alt_collocated_indication_flag" ); rpcSlice->setAltCollocatedIndicationFlag( uiCode == 1 );
     1589      }
     1590
     1591      if( rpcSlice->getAltCollocatedIndicationFlag() && rpcSlice->getNumActiveMotionPredRefLayers() > 1 )
     1592      {         
     1593        READ_UVLC( uiCode, "collocated_ref_layer_idx" ); rpcSlice->setCollocatedRefLayerIdx( uiCode );
     1594      }     
     1595      else
     1596      {
     1597#endif
    14741598      if ( rpcSlice->getSliceType() == B_SLICE )
    14751599      {
     
    14931617        rpcSlice->setColRefIdx(0);
    14941618      }
     1619#if H_MV
     1620      }
     1621#endif
    14951622    }
    14961623    if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) )
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp

    r532 r534  
    5252  m_aaiCodedScale          = new Int* [ MAX_NUM_LAYERS ];
    5353  m_aiViewId               = new Int  [ MAX_NUM_LAYERS ];
    54 #if !H_3D_FIX 
    55   m_aiLayerIdx             = new Int  [ MAX_NUM_LAYERS ];
    56 #endif
    5754
    5855  m_bViewReceived          = new Bool [ MAX_NUM_LAYERS ];
     
    520517#if H_MV
    521518  TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 
     519  TComSlice::markCurrPic( pcPic );
    522520  TComSlice::markIvRefPicsAsUnused   ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc );
    523521#endif
     
    675673
    676674#if H_MV
     675  m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer );
    677676  m_apcSlicePilot->setLayerId( nalu.m_layerId );
    678677#endif
     
    10361035{
    10371036  TComSPS* sps = new TComSPS();
     1037#if H_MV
     1038  sps->setLayerId( getLayerId() );
     1039#endif
    10381040#if H_3D
    10391041  // Preliminary fix. assuming that all sps refer to the same SPS.
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp

    r533 r534  
    338338  {
    339339    WRITE_FLAG(pcVUI->getTilesFixedStructureFlag(),             "tiles_fixed_structure_flag");
     340#if H_MV
     341    if ( pcSPS->getLayerId() > 0 )
     342    {
     343      WRITE_FLAG( pcVUI->getTileBoundariesAlignedFlag( ) ? 1 : 0 , "tile_boundaries_aligned_flag" );
     344    }
     345#endif
    340346    WRITE_FLAG(pcVUI->getMotionVectorsOverPicBoundariesFlag(),  "motion_vectors_over_pic_boundaries_flag");
    341347    WRITE_FLAG(pcVUI->getRestrictedRefPicListsFlag(),           "restricted_ref_pic_lists_flag");
     
    452458#endif
    453459  WRITE_CODE( pcSPS->getVPSId (),          4,       "sps_video_parameter_set_id" );
     460#if H_MV
     461  if ( pcSPS->getLayerId() == 0 )
     462  {
     463#endif
    454464  WRITE_CODE( pcSPS->getMaxTLayers() - 1,  3,       "sps_max_sub_layers_minus1" );
    455465  WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0,                             "sps_temporal_id_nesting_flag" );
    456466  codePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
     467#if H_MV
     468}
     469#endif
    457470  WRITE_UVLC( pcSPS->getSPSId (),                   "sps_seq_parameter_set_id" );
    458471  WRITE_UVLC( pcSPS->getChromaFormatIdc (),         "chroma_format_idc" );
     
    565578  WRITE_FLAG( 1, "sps_extension_flag" );
    566579  WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" );
     580  ////   sps_extension_vui_parameters( )
     581  if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )
     582  { 
     583    WRITE_UVLC( pcSPS->getNumIlpRestrictedRefLayers( ),           "num_ilp_restricted_ref_layers" );
     584    for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )
     585    { 
     586      WRITE_UVLC( pcSPS->getMinSpatialSegmentOffsetPlus1( i ),    "min_spatial_segment_offset_plus1" );
     587      if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )
     588      { 
     589        WRITE_FLAG( pcSPS->getCtuBasedOffsetEnabledFlag( i ),      "ctu_based_offset_enabled_flag[ i ]");
     590        if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) ) 
     591        {
     592          WRITE_UVLC( pcSPS->getMinHorizontalCtuOffsetPlus1( i ), "min_horizontal_ctu_offset_plus1[ i ]");
     593        }
     594      } 
     595    } 
     596  } 
     597  ////   sps_extension_vui_parameters( ) END
     598  WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" );
    567599#if !H_3D
    568600  WRITE_FLAG( 0, "sps_extension2_flag" );
     
    632664  assert( pcVPS->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS );
    633665#if H_MV
    634   assert( pcVPS->getMaxNuhLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
    635   WRITE_CODE( pcVPS->getMaxNuhLayerId(), 6,                 "vps_max_nuh_layer_id" );
     666  assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
     667  WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6,                 "vps_max_layer_id" ); 
     668 
     669  WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(),  "vps_max_num_layer_sets_minus1" );
     670  for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ )
     671  {
     672    // Operation point set
     673    for( UInt i = 0; i <= pcVPS->getVpsMaxLayerId(); i ++ )
     674    {
    636675#else
    637676  assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
    638677  WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6,     "vps_max_nuh_reserved_zero_layer_id" );
    639 #endif
     678
    640679  pcVPS->setMaxOpSets(1);
    641680  WRITE_UVLC( pcVPS->getMaxOpSets() - 1,                    "vps_max_op_sets_minus1" );
     
    643682  {
    644683    // Operation point set
    645 #if H_MV
    646     for( UInt i = 0; i <= pcVPS->getMaxNuhLayerId(); i ++ )
    647 #else
    648684    for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ )
    649 #endif
    650685    {
    651686      // Only applicable for version 1
    652687      pcVPS->setLayerIdIncludedFlag( true, opsIdx, i );
     688#endif
    653689      WRITE_FLAG( pcVPS->getLayerIdIncludedFlag( opsIdx, i ) ? 1 : 0, "layer_id_included_flag[opsIdx][i]" );
    654690    }
     
    701737  }
    702738
    703   for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ); sIdx++ )
     739  for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ )
    704740  {
    705741    WRITE_CODE( pcVPS->getDimensionIdLen( sIdx ) - 1 , 3,    "dimension_id_len_minus1[j]");   
    706742  }
    707743
     744  if ( pcVPS->getSplittingFlag() )
     745  { // Ignore old dimension id length
     746    pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1 ,pcVPS->inferLastDimsionIdLenMinus1() + 1 );       
     747  }   
     748
     749
    708750  WRITE_FLAG( pcVPS->getVpsNuhLayerIdPresentFlag() ? 1 : 0,  "vps_nuh_layer_id_present_flag");
    709751
    710   // already updated to JCT3V-D0220
    711   for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ )
    712   {
    713     if ( ( layer != 0 ) && pcVPS->getVpsNuhLayerIdPresentFlag() )
    714       WRITE_CODE( pcVPS->getLayerIdInNuh( layer ), 6,          "layer_id_in_nuh[i]");
    715     for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes() ; sIdx++ )
     752  for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )
     753  {
     754    if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) )
    716755    {     
    717       WRITE_CODE( pcVPS->getDimensionId( layer, sIdx ), pcVPS->getDimensionIdLen( sIdx ), "dimension_id[i][j]");     
    718     }
    719   }
    720 
    721   for( Int layerSet = 1; layerSet <= pcVPS->getMaxOpSets() - 1; layerSet++ )
    722   {
    723     WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( layerSet ) ? 1 : 0, "vps_profile_present_flag[lsIdx]" );
    724     if( pcVPS->getVpsProfilePresentFlag( layerSet ) == false )
    725     {
    726       WRITE_UVLC( pcVPS->getProfileLayerSetRefMinus1( layerSet ), "profile_layer_set_ref_minus1[lsIdx]" );
    727     }
    728     codePTL( pcVPS->getPTL( layerSet ), pcVPS->getVpsProfilePresentFlag( layerSet ), pcVPS->getMaxTLayers() - 1 );
    729   }
    730 
    731   WRITE_UVLC( pcVPS->getNumOutputLayerSets(),                "num_output_layer_sets" );
    732 
    733   for( Int layerSet = 0; layerSet < pcVPS->getNumOutputLayerSets(); layerSet++ )
    734   {
    735     WRITE_UVLC( pcVPS->getOutputLayerSetIdx( layerSet ),      "output_layer_set_idx[i]" );
    736     for( Int layer = 0; layer <= pcVPS->getMaxNuhLayerId(); layer++ )
    737     {
    738       if( pcVPS->getLayerIdIncludedFlag( pcVPS->getOutputLayerSetIdx( layerSet ), layer ) == true )
    739       {
    740         WRITE_FLAG( pcVPS->getOutputLayerFlag( layerSet, layer ) ? 1 : 0, "output_layer_flag" );
     756      WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6,          "layer_id_in_nuh[i]");
     757  }
     758    else
     759    {
     760      assert( pcVPS->getLayerIdInNuh( i ) == i );
     761  }
     762
     763    assert(  pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i );
     764
     765    for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ )
     766  {
     767      if ( !pcVPS->getSplittingFlag() )
     768    {
     769        WRITE_CODE( pcVPS->getDimensionId( i, j ), pcVPS->getDimensionIdLen( j ), "dimension_id[i][j]");     
     770      }
     771      else
     772      {
     773        assert( pcVPS->getDimensionId( i, j ) ==  pcVPS->inferDimensionId( i, j )  );
    741774      }
    742775    }
     
    750783    }
    751784  }
     785
     786  for( Int i = 0; i < pcVPS->getMaxLayers() - 1; i++ )
     787  {
     788    WRITE_CODE( pcVPS->getMaxTidIlRefPicPlus1( i ), 3,       "max_tid_il_ref_pics_plus1[i]" );
     789  }
     790
     791  WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( )    , 10,    "vps_number_layer_sets_minus1"      );
     792  WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6,     "vps_num_profile_tier_level_minus1" );
     793
     794  for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )
     795  {
     796    WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" );
     797    if( !pcVPS->getVpsProfilePresentFlag( i ) )
     798    {   
     799      WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" );
     800    }
     801    codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 );
     802  }
     803
     804  Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;
     805
     806  WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" );
     807
     808  if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )
     809  {
     810    WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( )    , 10,    "num_add_output_layer_sets_minus1"      );
     811    numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1 );
     812  }
     813
     814  if( numOutputLayerSets > 1)
     815  {
     816    WRITE_FLAG( pcVPS->getDefaultOneTargetOutputLayerFlag( ) ? 1 : 0, "default_one_target_output_layer_flag" );
     817  } 
     818
     819  for( Int i = 1; i < numOutputLayerSets; i++ )
     820  {
     821    if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )
     822    {     
     823      WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ),      "output_layer_set_idx_minus1[i]" );
     824      for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ )
     825      {
     826        WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" );
     827      }     
     828    }
     829    if ( pcVPS->getProfileLevelTierIdxLen()  > 0 )
     830    {     
     831      WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" );   
     832    }
     833  }
     834
     835  WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" );
     836  WRITE_UVLC( pcVPS->getDirectDepTypeLenMinus2 ( ),         "direct_dep_type_len_minus2");
     837
     838    for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )
     839    {
     840      for( Int j = 0; j < i; j++ )
     841      {
     842        if (pcVPS->getDirectDependencyFlag( i, j) )
     843        {       
     844          assert ( pcVPS->getDirectDependencyType( i, j ) != -1 );
     845          WRITE_CODE( pcVPS->getDirectDependencyType( i, j ),pcVPS->getDirectDepTypeLenMinus2( ) + 2,  "direct_dependency_type[i][j]" );
     846        }
     847      }
     848    }
     849
     850    WRITE_FLAG ( 0,                    "vps_shvc_reserved_zero_flag" );
     851
    752852#if H_3D_GEN 
    753853  WRITE_FLAG( 1,                                             "vps_extension2_flag" );
     
    811911Void TEncCavlc::codeSliceHeader         ( TComSlice* pcSlice )
    812912{
     913#if H_MV
     914  TComVPS* vps = pcSlice->getVPS();
     915#endif
    813916#if ENC_DEC_TRACE 
    814917  xTraceSliceHeader (pcSlice);
     
    853956  if ( !pcSlice->getDependentSliceSegmentFlag() )
    854957  {
     958#if H_MV   
     959    if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )
     960    {
     961      WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" );
     962    }
     963
     964    for (Int i = 1; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)   
     965#else
    855966    for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     967#endif
    856968    {
    857969      assert(!!"slice_reserved_undetermined_flag[]");
     
    10161128      }
    10171129    }
     1130#if H_MV
     1131    Int layerIdInVps       = pcSlice->getLayerIdInVps();
     1132    if( pcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 )
     1133    {   
     1134      WRITE_FLAG( pcSlice->getInterLayerPredEnabledFlag( ) ? 1 : 0 , "inter_layer_pred_enabled_flag" );
     1135      if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerIdInVps ) > 1 )
     1136      {           
     1137        if( !vps->getMaxOneActiveRefLayerFlag()) 
     1138        {
     1139          WRITE_CODE( pcSlice->getNumInterLayerRefPicsMinus1( ), pcSlice->getNumInterLayerRefPicsMinus1Len( ), "num_inter_layer_ref_pics_minus1" );
     1140        }
     1141        for( Int i = 0; i < pcSlice->getNumActiveRefLayerPics(); i++ )   
     1142        {
     1143          WRITE_CODE( pcSlice->getInterLayerPredLayerIdc( i ), pcSlice->getInterLayerPredLayerIdcLen( ), "inter_layer_pred_layer_idc" );
     1144        }
     1145      } 
     1146    }
     1147
     1148    if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0  &&  pcSlice->getNumActiveRefLayerPics() > 0 )
     1149    {
     1150      WRITE_FLAG( pcSlice->getInterLayerSamplePredOnlyFlag( ) ? 1 : 0 , "inter_layer_sample_pred_only_flag" );
     1151    }
     1152
     1153#endif
    10181154    if(pcSlice->getSPS()->getUseSAO())
    10191155    {
     
    11231259    if ( pcSlice->getEnableTMVPFlag() )
    11241260    {
     1261#if H_MV
     1262      if( pcSlice->getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 )
     1263      {
     1264        WRITE_FLAG( pcSlice->getAltCollocatedIndicationFlag( ) ? 1 : 0 , "alt_collocated_indication_flag" );
     1265      }
     1266      if( pcSlice->getAltCollocatedIndicationFlag() && pcSlice->getNumActiveMotionPredRefLayers() > 1 )
     1267      {         
     1268        WRITE_UVLC( pcSlice->getCollocatedRefLayerIdx( ), "collocated_ref_layer_idx" );
     1269      }     
     1270      else
     1271      {
     1272#endif
    11251273      if ( pcSlice->getSliceType() == B_SLICE )
    11261274      {
     
    11351283      }
    11361284    }
     1285#if H_MV
     1286    }
     1287#endif
    11371288    if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) )
    11381289    {
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCfg.h

    r532 r534  
    7474  Int m_refIdc[MAX_NUM_REF_PICS+1];
    7575#if H_MV
    76   Int m_numInterViewRefPics;
    77   Int m_interViewRefs    [MAX_NUM_REF_PICS];
     76  Int m_numActiveRefLayerPics;
     77  Int m_interLayerPredLayerIdc [MAX_NUM_REF_PICS];
    7878  Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 
     79  Int m_collocatedRefLayerIdx;
    7980#endif
    8081  GOPEntry()
     
    9394  , m_numRefIdc(0)
    9495#if H_MV
    95   , m_numInterViewRefPics(0)
     96  , m_numActiveRefLayerPics(0)
     97  , m_collocatedRefLayerIdx(-1)
    9698#endif
    9799  {
     
    100102    ::memset( m_refIdc,        0, sizeof(m_refIdc) );
    101103#if H_MV
    102     ::memset( m_interViewRefs,   0, sizeof(m_interViewRefs) );
     104    ::memset( m_interLayerPredLayerIdc,   0, sizeof(m_interLayerPredLayerIdc) );
    103105    ::memset( m_interViewRefPosL[0], -1, sizeof(m_interViewRefPosL[0]) );
    104106    ::memset( m_interViewRefPosL[1], -1, sizeof(m_interViewRefPosL[1]) );
     
    429431  , m_viewIndex(-1)
    430432  , m_isDepth(false)
     433  , m_bUseVSO(false)
    431434#endif
    432435#endif
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp

    r532 r534  
    502502    pcSlice->setSliceIdx(0);
    503503#if H_MV
     504    pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer );
    504505    pcPic  ->setLayerId     ( getLayerId()   );
    505506    pcPic  ->setViewId      ( getViewId()    );   
     
    669670    refPicListModification->setRefPicListModificationFlagL1(0);
    670671#if H_MV
     672    if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )
     673    {
     674      pcSlice->setDiscardableFlag           ( false );     
     675    }   
     676
     677    TComVPS*           vps = pcSlice->getVPS();
     678    Int       layerIdInVps = vps    ->getLayerIdInVps( getLayerId());
     679    Int numDirectRefLayers = vps    ->getNumDirectRefLayers( layerIdInVps );
     680    GOPEntry gopEntry      = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid );     
     681   
     682    if ( getLayerId() > 0 && numDirectRefLayers > 0 )
     683    {         
     684      pcSlice->setInterLayerPredEnabledFlag ( gopEntry.m_numActiveRefLayerPics > 0 );     
     685      if ( pcSlice->getInterLayerPredEnabledFlag() && numDirectRefLayers > 1 )
     686      {
     687        if ( !vps->getMaxOneActiveRefLayerFlag() )
     688        {   
     689          pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 );
     690        }
     691        for (Int i = 0; i < gopEntry.m_numActiveRefLayerPics; i++ )
     692        {
     693          pcSlice->setInterLayerPredLayerIdc( i, gopEntry.m_interLayerPredLayerIdc[ i ] );
     694        }
     695      }
     696    }
     697    assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics );
     698   
     699    if ( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && pcSlice->getNumActiveRefLayerPics() > 0)
     700    {
     701      pcSlice->setInterLayerSamplePredOnlyFlag( gopEntry.m_numRefPics == 0 );
     702    }   
     703
    671704    pcSlice->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );
    672     pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
    673     pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
    674     xSetRefPicListModificationsMvc( pcSlice, pocCurr, iGOPid );   
     705    pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
     706    pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
     707
     708    xSetRefPicListModificationsMv( pcSlice, iGOPid );   
     709
     710    pcSlice->setActiveMotionPredRefLayers( );
     711
     712    if ( getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 && pcSlice->getEnableTMVPFlag() &&
     713        ( pcSlice->getSliceType() == B_SLICE || pcSlice->getSliceType() == P_SLICE ))
     714    {
     715      pcSlice->setAltCollocatedIndicationFlag( gopEntry.m_collocatedRefLayerIdx >= 0 );
     716      if ( pcSlice->getNumActiveRefLayerPics() && pcSlice->getNumActiveMotionPredRefLayers() > 0 )
     717      {
     718        pcSlice->setCollocatedRefLayerIdx( gopEntry.m_collocatedRefLayerIdx );
     719      }
     720    }
     721
    675722#else
    676723    pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures()));
     
    827874      pcSlice->setEnableTMVPFlag(0);
    828875    }
    829 
    830876#if H_MV
    831877    if( pcSlice->getIdrPicFlag() )
     
    21202166      TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 
    21212167      std::vector<Int> temp;
     2168      TComSlice::markCurrPic( pcPic );
    21222169      TComSlice::markIvRefPicsAsUnused   ( m_ivPicLists, temp, pcPic->getSlice(0)->getVPS(), m_layerId, pcPic->getPOC() );
    21232170#endif
     
    29502997#endif
    29512998#if H_MV
    2952 Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid )
     2999Void TEncGOP::xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid )
    29533000{
    2954   TComVPS* vps = pcSlice->getVPS();
    29553001  Int layer    = pcSlice->getLayerIdInVps( );
    29563002 
    2957   if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || vps->getNumDirectRefLayers( layer ) == 0 )
     3003  if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || pcSlice->getNumActiveRefLayerPics() == 0 )
    29583004  {
    29593005    return;
     
    29623008  // analyze inter-view modifications
    29633009  GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( layer > 0) ) ? MAX_GOP : iGOPid );
    2964 
    2965   TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();
     3010  assert( ge.m_numActiveRefLayerPics == pcSlice->getNumActiveRefLayerPics() );
    29663011 
    29673012  Int maxRefListSize  = pcSlice->getNumRpsCurrTempList();
    2968   Int numTemporalRefs = maxRefListSize - vps->getNumDirectRefLayers( layer );
    2969 
     3013  Int numTemporalRefs = maxRefListSize - pcSlice->getNumActiveRefLayerPics();
    29703014
    29713015  for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L1
    29723016  {
    2973     Int numModifications = 0;
    2974    
    2975     for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
    2976     {
    2977       numModifications +=  ( ge.m_interViewRefPosL[li][k] >= 0 ) ? 1 : 0;
    2978     }
    2979 
    2980     // set inter-view modifications
     3017    // set inter-view modifications   
     3018    Int tempList[16];
     3019    for( Int k = 0; k < 16; k++ )
     3020    {
     3021      tempList[ k ] = -1;
     3022    }
     3023
    29813024    Bool isModified = false;
    2982       Int tempList[16];
    2983       for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; }
    2984 
    2985     if( (maxRefListSize > 1) && (numModifications > 0) )
    2986     {
    2987       for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
    2988       {
    2989         if( ge.m_interViewRefPosL[li][k] >= 0 )
    2990         {
    2991           Int orgIdx    = numTemporalRefs;
     3025    if ( maxRefListSize > 1 )
     3026    {
     3027      for( Int k = 0, orgIdx = numTemporalRefs; k < ge.m_numActiveRefLayerPics; k++, orgIdx++ )
     3028      {
    29923029          Int targetIdx = ge.m_interViewRefPosL[ li ][ k ];
    2993           for( Int idx = 0; idx < vps->getNumDirectRefLayers( layer ); idx++ )
    2994           {           
    2995             Int refLayer  = vps->getLayerIdInVps( vps->getRefLayerId( layer, idx ) );         
    2996             if( ( layer + ge.m_interViewRefs[ k ]) == refLayer )
     3030
     3031        isModified = ( targetIdx != orgIdx ) && ( targetIdx >= 0  );
     3032        if ( isModified )
    29973033            {
     3034          assert( tempList[ targetIdx ] == -1 ); // Assert when two inter layer reference pictures are sorted to the same position
    29983035              tempList[ targetIdx ] = orgIdx;             
    2999               isModified = ( targetIdx != orgIdx  );
    3000             }
    3001             orgIdx++;
    3002           }
    3003         }
    3004       }
    3005     }
    3006 
     3036        }
     3037      }
     3038    }
     3039
     3040    TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification();
    30073041    refPicListModification->setRefPicListModificationFlagL( li, isModified ); 
    30083042
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.h

    r479 r534  
    221221#endif
    222222#if H_MV
    223    Void  xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid );
     223   Void  xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid );
    224224#endif
    225225#if L0386_DB_METRIC
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp

    r532 r534  
    525525#if H_MV
    526526  m_cSPS.setSPSId( getLayerIdInVps() );
     527  m_cSPS.setLayerId( getLayerId() );
    527528#endif
    528529  ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
     
    746747  m_cPPS.setWPBiPred( m_useWeightedBiPred );
    747748  m_cPPS.setOutputFlagPresentFlag( false );
     749#if H_MV
     750  m_cPPS.setNumExtraSliceHeaderBits( 1 );
     751#endif
    748752  m_cPPS.setSignHideFlag(getSignHideFlag());
    749753#if L0386_DB_METRIC
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibExtractor/TExtrTop.cpp

    r499 r534  
    101101{
    102102  rcVpsInfoHandle << "MaxLayers = "     << m_cVPS.getMaxLayers()     << std::endl;
    103   rcVpsInfoHandle << "MaxNuhLayerId = " << m_cVPS.getMaxNuhLayerId() << std::endl;
     103  rcVpsInfoHandle << "MaxNuhLayerId = " << m_cVPS.getVpsMaxLayerId() << std::endl;
    104104 
    105105  for ( Int layerIdxInVps = 0; layerIdxInVps < m_cVPS.getMaxLayers(); layerIdxInVps++ )
Note: See TracChangeset for help on using the changeset viewer.