Changeset 1081 in 3DVCSoftware


Ignore:
Timestamp:
22 Oct 2014, 01:32:55 (10 years ago)
Author:
tech
Message:

Update to HTM-15.0

Location:
branches/HTM-12.1-dev0
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/encoder_intra_main.cfg

    r872 r1081  
    1919#======== Coding Structure =============
    2020IntraPeriod                   : 1           # Period of I-Frame ( -1 = only first)
    21 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CDR, 2:IDR
     21DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    2222GOPSize                       : 1           # GOP Size (number of B slice = GOPSize-1)
    2323#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures
     
    7777
    7878#============ Tiles ================
    79 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     79TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    8080                                                       # 1: the column and row boundaries are distributed uniformly
    81 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    82 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    83 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    84 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     81NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     82TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     83NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     84TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    8585
    8686LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/encoder_intra_main10.cfg

    r872 r1081  
    1919#======== Coding Structure =============
    2020IntraPeriod                   : 1           # Period of I-Frame ( -1 = only first)
    21 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CDR, 2:IDR
     21DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    2222GOPSize                       : 1           # GOP Size (number of B slice = GOPSize-1)
    2323#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures 
     
    7777
    7878#============ Tiles ================
    79 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     79TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    8080                                                       # 1: the column and row boundaries are distributed uniformly
    81 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    82 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    83 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    84 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     81NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     82TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     83NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     84TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    8585
    8686LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/encoder_lowdelay_P_main.cfg

    r872 r1081  
    1919#======== Coding Structure =============
    2020IntraPeriod                   : -1          # Period of I-Frame ( -1 = only first)
    21 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CDR, 2:IDR
     21DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    2222GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
    2323#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs
     
    8282
    8383#============ Tiles ================
    84 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     84TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    8585                                                       # 1: the column and row boundaries are distributed uniformly
    86 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    87 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    88 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    89 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     86NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     87TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     88NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     89TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    9090
    9191LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/encoder_lowdelay_P_main10.cfg

    r872 r1081  
    1919#======== Coding Structure =============
    2020IntraPeriod                   : -1          # Period of I-Frame ( -1 = only first)
    21 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CDR, 2:IDR
     21DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    2222GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
    2323#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs
     
    8282
    8383#============ Tiles ================
    84 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     84TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    8585                                                       # 1: the column and row boundaries are distributed uniformly
    86 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    87 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    88 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    89 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     86NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     87TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     88NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     89TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    9090
    9191LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/encoder_lowdelay_main.cfg

    r872 r1081  
    1919#======== Coding Structure =============
    2020IntraPeriod                   : -1          # Period of I-Frame ( -1 = only first)
    21 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CDR, 2:IDR
     21DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    2222GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
    2323#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs
     
    8282
    8383#============ Tiles ================
    84 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     84TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    8585                                                       # 1: the column and row boundaries are distributed uniformly
    86 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    87 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    88 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    89 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     86NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     87TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     88NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     89TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    9090
    9191LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/encoder_lowdelay_main10.cfg

    r872 r1081  
    1919#======== Coding Structure =============
    2020IntraPeriod                   : -1          # Period of I-Frame ( -1 = only first)
    21 DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CDR, 2:IDR
     21DecodingRefreshType           : 0           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    2222GOPSize                       : 4           # GOP Size (number of B slice = GOPSize-1)
    2323#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2  temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs
     
    8282
    8383#============ Tiles ================
    84 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     84TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    8585                                                       # 1: the column and row boundaries are distributed uniformly
    86 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    87 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    88 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    89 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     86NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     87TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     88NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     89TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    9090
    9191LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/encoder_randomaccess_main.cfg

    r872 r1081  
    1919#======== Coding Structure =============
    2020IntraPeriod                   : 32          # Period of I-Frame ( -1 = only first)
    21 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
     21DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    2222GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
    2323#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs
     
    2525Frame2:  B    4   2        0.3536   0            0              0           2                3         -4 -6  4               1       4        5         1 1 0 0 1
    2626Frame3:  B    2   3        0.3536   0            0              0           2                4         -2 -4  2 6             1       2        4         1 1 1 1 
    27 Frame4:  B    1   4        0.68     0            0              0           2                4         -1  1  3 7             1       1        5         1 0 1 1 1
    28 Frame5:  B    3   4        0.68     0            0              0           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
     27Frame4:  B    1   4        0.68     0            0              1           2                4         -1  1  3 7             1       1        5         1 0 1 1 1
     28Frame5:  B    3   4        0.68     0            0              1           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
    2929Frame6:  B    6   3        0.3536   0            0              0           2                4         -2 -4 -6 2             1      -3        5         1 1 1 1 0
    30 Frame7:  B    5   4        0.68     0            0              0           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1 
    31 Frame8:  B    7   4        0.68     0            0              0           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
     30Frame7:  B    5   4        0.68     0            0              1           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1 
     31Frame8:  B    7   4        0.68     0            0              1           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
    3232
    3333#=========== Motion Search =============
     
    8686
    8787#============ Tiles ================
    88 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     88TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    8989                                                       # 1: the column and row boundaries are distributed uniformly
    90 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    91 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    92 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    93 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     90NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     91TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     92NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     93TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    9494
    9595LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/encoder_randomaccess_main10.cfg

    r872 r1081  
    1919#======== Coding Structure =============
    2020IntraPeriod                   : 32          # Period of I-Frame ( -1 = only first)
    21 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
     21DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    2222GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
    2323#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs
     
    2525Frame2:  B    4   2        0.3536   0            0              0           2                3         -4 -6  4               1       4        5         1 1 0 0 1
    2626Frame3:  B    2   3        0.3536   0            0              0           2                4         -2 -4  2 6             1       2        4         1 1 1 1 
    27 Frame4:  B    1   4        0.68     0            0              0           2                4         -1  1  3 7             1       1        5         1 0 1 1 1
    28 Frame5:  B    3   4        0.68     0            0              0           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
     27Frame4:  B    1   4        0.68     0            0              1           2                4         -1  1  3 7             1       1        5         1 0 1 1 1
     28Frame5:  B    3   4        0.68     0            0              1           2                4         -1 -3  1 5             1      -2        5         1 1 1 1 0
    2929Frame6:  B    6   3        0.3536   0            0              0           2                4         -2 -4 -6 2             1      -3        5         1 1 1 1 0
    30 Frame7:  B    5   4        0.68     0            0              0           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1 
    31 Frame8:  B    7   4        0.68     0            0              0           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
     30Frame7:  B    5   4        0.68     0            0              1           2                4         -1 -5  1 3             1       1        5         1 0 1 1 1 
     31Frame8:  B    7   4        0.68     0            0              1           2                4         -1 -3 -7 1             1      -2        5         1 1 1 1 0
    3232
    3333#=========== Motion Search =============
     
    8686
    8787#============ Tiles ================
    88 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     88TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    8989                                                       # 1: the column and row boundaries are distributed uniformly
    90 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    91 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    92 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    93 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     90NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     91TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     92NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     93TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    9494
    9595LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/cfg/HEVC/HM/misc/encoder_randomaccess_field_coding.cfg

    r872 r1081  
    3636#======== Coding Structure =============
    3737IntraPeriod                   : 32          # Period of I-Frame ( -1 = only first)
    38 DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CDR, 2:IDR
     38DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
    3939GOPSize                       : 16          # GOP Size (number of B slice = GOPSize-1)
    4040
     
    113113
    114114#============ Tiles ================
    115 UniformSpacingIdc                   : 0                # 0: the column boundaries are indicated by ColumnWidth array, the row boundaries are indicated by RowHeight array
     115TileUniformSpacing                  : 0                # 0: the column boundaries are indicated by TileColumnWidth array, the row boundaries are indicated by TileRowHeight array
    116116                                                       # 1: the column and row boundaries are distributed uniformly
    117 NumTileColumnsMinus1                : 0                # Number of columns in a picture minus 1
    118 ColumnWidthArray                    : 2 3              # Array containing ColumnWidth values in units of LCU (from left to right in picture)   
    119 NumTileRowsMinus1                   : 0                # Number of rows in a picture minus 1
    120 RowHeightArray                      : 2                # Array containing RowHeight values in units of LCU (from top to bottom in picture)
     117NumTileColumnsMinus1                : 0                # Number of tile columns in a picture minus 1
     118TileColumnWidthArray                : 2 3              # Array containing tile column width values in units of CTU (from left to right in picture)   
     119NumTileRowsMinus1                   : 0                # Number of tile rows in a picture minus 1
     120TileRowHeightArray                  : 2                # Array containing tile row height values in units of CTU (from top to bottom in picture)
    121121
    122122LFCrossTileBoundaryFlag           : 1                  # In-loop filtering is across or not across tile boundary.
  • branches/HTM-12.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r1079 r1081  
    7272#endif
    7373, m_pchdQPFile()
    74 , m_pColumnWidth()
    75 , m_pRowHeight()
    7674, m_scalingListFile()
    7775{
     
    139137#endif
    140138  free(m_pchdQPFile);
    141   free(m_pColumnWidth);
    142   free(m_pRowHeight);
    143139  free(m_scalingListFile);
    144140#if H_MV
     
    344340#endif
    345341  string cfg_dQPFile;
    346   string cfg_ColumnWidth;
    347   string cfg_RowHeight;
     342  string cfgColumnWidth;
     343  string cfgRowHeight;
    348344  string cfg_ScalingListFile;
    349345  string cfg_startOfCodedInterval;
     
    420416  ("OutputBitDepthC",       m_outputBitDepthC,   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
    421417  ("InternalBitDepthC",     m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
    422   ("ConformanceMode",       m_conformanceMode,     0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance")
     418  ("ConformanceMode",       m_conformanceWindowMode,  0, "Deprecated alias of ConformanceWindowMode")
     419  ("ConformanceWindowMode", m_conformanceWindowMode,  0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance")
    423420  ("HorizontalPadding,-pdx",m_aiPad[0],            0, "Horizontal source padding for conformance window mode 2")
    424421  ("VerticalPadding,-pdy",  m_aiPad[1],            0, "Vertical source padding for conformance window mode 2")
    425   ("ConfLeft",              m_confLeft,            0, "Left offset for window conformance mode 3")
    426   ("ConfRight",             m_confRight,           0, "Right offset for window conformance mode 3")
    427   ("ConfTop",               m_confTop,             0, "Top offset for window conformance mode 3")
    428   ("ConfBottom",            m_confBottom,          0, "Bottom offset for window conformance mode 3")
     422  ("ConfLeft",              m_confWinLeft,            0, "Deprecated alias of ConfWinLeft")
     423  ("ConfRight",             m_confWinRight,           0, "Deprecated alias of ConfWinRight")
     424  ("ConfTop",               m_confWinTop,             0, "Deprecated alias of ConfWinTop")
     425  ("ConfBottom",            m_confWinBottom,          0, "Deprecated alias of ConfWinBottom")
     426  ("ConfWinLeft",           m_confWinLeft,            0, "Left offset for window conformance mode 3")
     427  ("ConfWinRight",          m_confWinRight,           0, "Right offset for window conformance mode 3")
     428  ("ConfWinTop",            m_confWinTop,             0, "Top offset for window conformance mode 3")
     429  ("ConfWinBottom",         m_confWinBottom,          0, "Bottom offset for window conformance mode 3")
    429430  ("FrameRate,-fr",         m_iFrameRate,          0, "Frame rate")
    430431  ("FrameSkip,-fs",         m_FrameSkip,          0u, "Number of frames to skip at start of input YUV")
     
    583584  ("WeightedPredB,-wpB",          m_useWeightedBiPred,             false,      "Use weighted (bidirectional) prediction in B slices")
    584585  ("Log2ParallelMergeLevel",      m_log2ParallelMergeLevel,     2u,          "Parallel merge estimation region")
    585   ("UniformSpacingIdc",           m_iUniformSpacingIdr,            0,          "Indicates if the column and row boundaries are distributed uniformly")
    586   ("NumTileColumnsMinus1",        m_iNumColumnsMinus1,             0,          "Number of columns in a picture minus 1")
    587   ("ColumnWidthArray",            cfg_ColumnWidth,                 string(""), "Array containing ColumnWidth values in units of LCU")
    588   ("NumTileRowsMinus1",           m_iNumRowsMinus1,                0,          "Number of rows in a picture minus 1")
    589   ("RowHeightArray",              cfg_RowHeight,                   string(""), "Array containing RowHeight values in units of LCU")
     586
     587  //deprecated copies of renamed tile parameters
     588  ("UniformSpacingIdc",           m_tileUniformSpacingFlag,        false,      "deprecated alias of TileUniformSpacing")
     589  ("ColumnWidthArray",            cfgColumnWidth,                  string(""), "deprecated alias of TileColumnWidthArray")
     590  ("RowHeightArray",              cfgRowHeight,                    string(""), "deprecated alias of TileRowHeightArray")
     591
     592  ("TileUniformSpacing",          m_tileUniformSpacingFlag,        false,      "Indicates that tile columns and rows are distributed uniformly")
     593  ("NumTileColumnsMinus1",        m_numTileColumnsMinus1,          0,          "Number of tile columns in a picture minus 1")
     594  ("NumTileRowsMinus1",           m_numTileRowsMinus1,             0,          "Number of rows in a picture minus 1")
     595  ("TileColumnWidthArray",        cfgColumnWidth,                  string(""), "Array containing tile column width values in units of LCU")
     596  ("TileRowHeightArray",          cfgRowHeight,                    string(""), "Array containing tile row height values in units of LCU")
    590597  ("LFCrossTileBoundaryFlag",      m_bLFCrossTileBoundaryFlag,             true,          "1: cross-tile-boundary loop filtering. 0:non-cross-tile-boundary loop filtering")
    591598  ("WaveFrontSynchro",            m_iWaveFrontSynchro,             0,          "0: no synchro; 1 synchro with TR; 2 TRR etc")
     
    669676  ("ColourDescriptionPresent",       m_colourDescriptionPresentFlag,       false, "Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present")
    670677  ("ColourPrimaries",                m_colourPrimaries,                        2, "Indicates chromaticity coordinates of the source primaries")
    671   ("TransferCharateristics",         m_transferCharacteristics,                2, "Indicates the opto-electronic transfer characteristics of the source")
     678  ("TransferCharacteristics",        m_transferCharacteristics,                2, "Indicates the opto-electronic transfer characteristics of the source")
    672679  ("MatrixCoefficients",             m_matrixCoefficients,                     2, "Describes the matrix coefficients used in deriving luma and chroma from RGB primaries")
    673680  ("ChromaLocInfoPresent",           m_chromaLocInfoPresentFlag,           false, "Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present")
     
    889896  m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());
    890897 
    891   Char* pColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str());
    892   Char* pRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str());
    893   if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 )
    894   {
    895     char *columnWidth;
     898  Char* pColumnWidth = cfgColumnWidth.empty() ? NULL: strdup(cfgColumnWidth.c_str());
     899  Char* pRowHeight = cfgRowHeight.empty() ? NULL : strdup(cfgRowHeight.c_str());
     900
     901  if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 )
     902  {
     903    char *str;
    896904    int  i=0;
    897     m_pColumnWidth = new UInt[m_iNumColumnsMinus1];
    898     columnWidth = strtok(pColumnWidth, " ,-");
    899     while(columnWidth!=NULL)
    900     {
    901       if( i>=m_iNumColumnsMinus1 )
     905    m_tileColumnWidth.resize( m_numTileColumnsMinus1 );
     906    str = strtok(pColumnWidth, " ,-");
     907    while(str!=NULL)
     908    {
     909      if( i >= m_numTileColumnsMinus1 )
    902910      {
    903911        printf( "The number of columns whose width are defined is larger than the allowed number of columns.\n" );
    904912        exit( EXIT_FAILURE );
    905913      }
    906       *( m_pColumnWidth + i ) = atoi( columnWidth );
    907       columnWidth = strtok(NULL, " ,-");
     914      m_tileColumnWidth[i] = atoi( str );
     915      str = strtok(NULL, " ,-");
    908916      i++;
    909917    }
    910     if( i<m_iNumColumnsMinus1 )
     918    if( i < m_numTileColumnsMinus1 )
    911919    {
    912920      printf( "The width of some columns is not defined.\n" );
     
    916924  else
    917925  {
    918     m_pColumnWidth = NULL;
    919   }
    920 
    921   if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 )
    922   {
    923     char *rowHeight;
     926    m_tileColumnWidth.clear();
     927  }
     928
     929  if( !m_tileUniformSpacingFlag && m_numTileRowsMinus1 > 0 )
     930  {
     931    char *str;
    924932    int  i=0;
    925     m_pRowHeight = new UInt[m_iNumRowsMinus1];
    926     rowHeight = strtok(pRowHeight, " ,-");
    927     while(rowHeight!=NULL)
    928     {
    929       if( i>=m_iNumRowsMinus1 )
     933    m_tileRowHeight.resize(m_numTileRowsMinus1);
     934    str = strtok(pRowHeight, " ,-");
     935    while(str!=NULL)
     936    {
     937      if( i>=m_numTileRowsMinus1 )
    930938      {
    931939        printf( "The number of rows whose height are defined is larger than the allowed number of rows.\n" );
    932940        exit( EXIT_FAILURE );
    933941      }
    934       *( m_pRowHeight + i ) = atoi( rowHeight );
    935       rowHeight = strtok(NULL, " ,-");
     942      m_tileRowHeight[i] = atoi( str );
     943      str = strtok(NULL, " ,-");
    936944      i++;
    937945    }
    938     if( i<m_iNumRowsMinus1 )
     946    if( i < m_numTileRowsMinus1 )
    939947    {
    940948      printf( "The height of some rows is not defined.\n" );
     
    944952  else
    945953  {
    946     m_pRowHeight = NULL;
     954    m_tileRowHeight.clear();
    947955  }
    948956#if H_MV
     
    960968
    961969  // TODO:ChromaFmt assumes 4:2:0 below
    962   switch (m_conformanceMode)
     970  switch (m_conformanceWindowMode)
    963971  {
    964972  case 0:
    965973    {
    966974      // no conformance or padding
    967       m_confLeft = m_confRight = m_confTop = m_confBottom = 0;
     975      m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0;
    968976      m_aiPad[1] = m_aiPad[0] = 0;
    969977      break;
     
    975983      if (m_iSourceWidth % minCuSize)
    976984      {
    977         m_aiPad[0] = m_confRight  = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;
    978         m_iSourceWidth  += m_confRight;
     985        m_aiPad[0] = m_confWinRight  = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;
     986        m_iSourceWidth  += m_confWinRight;
    979987      }
    980988      if (m_iSourceHeight % minCuSize)
    981989      {
    982         m_aiPad[1] = m_confBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight;
    983         m_iSourceHeight += m_confBottom;
     990        m_aiPad[1] = m_confWinBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight;
     991        m_iSourceHeight += m_confWinBottom;
    984992        if ( m_isField )
    985993        {
    986           m_iSourceHeightOrg += m_confBottom << 1;
    987           m_aiPad[1] = m_confBottom << 1;
     994          m_iSourceHeightOrg += m_confWinBottom << 1;
     995          m_aiPad[1] = m_confWinBottom << 1;
    988996        }
    989997      }
     
    10051013      m_iSourceWidth  += m_aiPad[0];
    10061014      m_iSourceHeight += m_aiPad[1];
    1007       m_confRight  = m_aiPad[0];
    1008       m_confBottom = m_aiPad[1];
     1015      m_confWinRight  = m_aiPad[0];
     1016      m_confWinBottom = m_aiPad[1];
    10091017      break;
    10101018    }
     
    10121020    {
    10131021      // conformance
    1014       if ((m_confLeft == 0) && (m_confRight == 0) && (m_confTop == 0) && (m_confBottom == 0))
     1022      if ((m_confWinLeft == 0) && (m_confWinRight == 0) && (m_confWinTop == 0) && (m_confWinBottom == 0))
    10151023      {
    10161024        fprintf(stderr, "Warning: Conformance window enabled, but all conformance window parameters set to zero\n");
     
    16801688  }
    16811689 
    1682   Bool tileFlag = (m_iNumColumnsMinus1 > 0 || m_iNumRowsMinus1 > 0 );
     1690  Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 );
    16831691  xConfirmPara( tileFlag && m_iWaveFrontSynchro,            "Tile and Wavefront can not be applied together");
    16841692
     
    16901698  xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling");
    16911699
    1692   xConfirmPara( m_confLeft   % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling");
    1693   xConfirmPara( m_confRight  % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling");
    1694   xConfirmPara( m_confTop    % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling");
    1695   xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling");
     1700  xConfirmPara( m_confWinLeft   % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling");
     1701  xConfirmPara( m_confWinRight  % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling");
     1702  xConfirmPara( m_confWinTop    % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling");
     1703  xConfirmPara( m_confWinBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling");
     1704
     1705  xConfirmPara( m_defaultDisplayWindowFlag && !m_vuiParametersPresentFlag, "VUI needs to be enabled for default display window");
     1706
     1707  if (m_defaultDisplayWindowFlag)
     1708  {
     1709    xConfirmPara( m_defDispWinLeftOffset   % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left default display window offset must be an integer multiple of the specified chroma subsampling");
     1710    xConfirmPara( m_defDispWinRightOffset  % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right default display window offset must be an integer multiple of the specified chroma subsampling");
     1711    xConfirmPara( m_defDispWinTopOffset    % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top default display window offset must be an integer multiple of the specified chroma subsampling");
     1712    xConfirmPara( m_defDispWinBottomOffset % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom default display window offset must be an integer multiple of the specified chroma subsampling");
     1713  }
    16961714
    16971715#if H_3D
     
    22132231      Int widthInCU = (m_iSourceWidth % m_uiMaxCUWidth) ? m_iSourceWidth/m_uiMaxCUWidth + 1: m_iSourceWidth/m_uiMaxCUWidth;
    22142232      Int heightInCU = (m_iSourceHeight % m_uiMaxCUHeight) ? m_iSourceHeight/m_uiMaxCUHeight + 1: m_iSourceHeight/m_uiMaxCUHeight;
    2215       if(m_iUniformSpacingIdr)
    2216       {
    2217         maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_iNumColumnsMinus1)/(m_iNumColumnsMinus1+1));
    2218         maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_iNumRowsMinus1)/(m_iNumRowsMinus1+1));
     2233      if(m_tileUniformSpacingFlag)
     2234      {
     2235        maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_numTileColumnsMinus1)/(m_numTileColumnsMinus1+1));
     2236        maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_numTileRowsMinus1)/(m_numTileRowsMinus1+1));
    22192237        // if only the last tile-row is one treeblock higher than the others
    22202238        // the maxTileHeight becomes smaller if the last row of treeblocks has lower height than the others
    2221         if(!((heightInCU-1)%(m_iNumRowsMinus1+1)))
     2239        if(!((heightInCU-1)%(m_numTileRowsMinus1+1)))
    22222240        {
    22232241          maxTileHeight = maxTileHeight - m_uiMaxCUHeight + (m_iSourceHeight % m_uiMaxCUHeight);
     
    22252243        // if only the last tile-column is one treeblock wider than the others
    22262244        // the maxTileWidth becomes smaller if the last column of treeblocks has lower width than the others   
    2227         if(!((widthInCU-1)%(m_iNumColumnsMinus1+1)))
     2245        if(!((widthInCU-1)%(m_numTileColumnsMinus1+1)))
    22282246        {
    22292247          maxTileWidth = maxTileWidth - m_uiMaxCUWidth + (m_iSourceWidth % m_uiMaxCUWidth);
     
    22322250      else // not uniform spacing
    22332251      {
    2234         if(m_iNumColumnsMinus1<1)
     2252        if(m_numTileColumnsMinus1<1)
    22352253        {
    22362254          maxTileWidth = m_iSourceWidth;
     
    22392257        {
    22402258          Int accColumnWidth = 0;
    2241           for(Int col=0; col<(m_iNumColumnsMinus1); col++)
     2259          for(Int col=0; col<(m_numTileColumnsMinus1); col++)
    22422260          {
    2243             maxTileWidth = m_pColumnWidth[col]>maxTileWidth ? m_pColumnWidth[col]:maxTileWidth;
    2244             accColumnWidth += m_pColumnWidth[col];
     2261            maxTileWidth = m_tileColumnWidth[col]>maxTileWidth ? m_tileColumnWidth[col]:maxTileWidth;
     2262            accColumnWidth += m_tileColumnWidth[col];
    22452263          }
    22462264          maxTileWidth = (widthInCU-accColumnWidth)>maxTileWidth ? m_uiMaxCUWidth*(widthInCU-accColumnWidth):m_uiMaxCUWidth*maxTileWidth;
    22472265        }
    2248         if(m_iNumRowsMinus1<1)
     2266        if(m_numTileRowsMinus1<1)
    22492267        {
    22502268          maxTileHeight = m_iSourceHeight;
     
    22532271        {
    22542272          Int accRowHeight = 0;
    2255           for(Int row=0; row<(m_iNumRowsMinus1); row++)
     2273          for(Int row=0; row<(m_numTileRowsMinus1); row++)
    22562274          {
    2257             maxTileHeight = m_pRowHeight[row]>maxTileHeight ? m_pRowHeight[row]:maxTileHeight;
    2258             accRowHeight += m_pRowHeight[row];
     2275            maxTileHeight = m_tileRowHeight[row]>maxTileHeight ? m_tileRowHeight[row]:maxTileHeight;
     2276            accRowHeight += m_tileRowHeight[row];
    22592277          }
    22602278          maxTileHeight = (heightInCU-accRowHeight)>maxTileHeight ? m_uiMaxCUHeight*(heightInCU-accRowHeight):m_uiMaxCUHeight*maxTileHeight;
     
    24292447  xPrintParaVector( "SAO"              , m_bUseSAO            );
    24302448#endif
    2431   printf("Real     Format              : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate );
     2449  printf("Real     Format              : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate );
    24322450  printf("Internal Format              : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
    24332451  if (m_isField)
  • branches/HTM-12.1-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r1076 r1081  
    4343#include "TLibEncoder/TEncCfg.h"
    4444#include <sstream>
     45#include <vector>
    4546#if H_3D
    4647#include "TAppCommon/TAppComCamPara.h"
     
    172173  bool      m_isTopFieldFirst;
    173174 
    174   Int       m_conformanceMode;
    175   Int       m_confLeft;
    176   Int       m_confRight;
    177   Int       m_confTop;
    178   Int       m_confBottom;
     175  Int       m_conformanceWindowMode;
     176  Int       m_confWinLeft;
     177  Int       m_confWinRight;
     178  Int       m_confWinTop;
     179  Int       m_confWinBottom;
    179180  Int       m_framesToBeEncoded;                              ///< number of encoded frames
    180181  Int       m_aiPad[2];                                       ///< number of padded pixels for width and height
     
    324325  Bool      m_bLFCrossSliceBoundaryFlag;  ///< 1: filter across slice boundaries 0: do not filter across slice boundaries
    325326  Bool      m_bLFCrossTileBoundaryFlag;   ///< 1: filter across tile boundaries  0: do not filter across tile boundaries
    326   Int       m_iUniformSpacingIdr;
    327   Int       m_iNumColumnsMinus1;
    328   Char*     m_pchColumnWidth;
    329   Int       m_iNumRowsMinus1;
    330   Char*     m_pchRowHeight;
    331   UInt*     m_pColumnWidth;
    332   UInt*     m_pRowHeight;
     327  Bool      m_tileUniformSpacingFlag;
     328  Int       m_numTileColumnsMinus1;
     329  Int       m_numTileRowsMinus1;
     330  std::vector<Int> m_tileColumnWidth;
     331  std::vector<Int> m_tileRowHeight;
    333332  Int       m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current.
    334333  Int       m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles).
  • branches/HTM-12.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r1076 r1081  
    281281  m_cTEncTop.setSourceWidth                  ( m_iSourceWidth );
    282282  m_cTEncTop.setSourceHeight                 ( m_iSourceHeight );
    283   m_cTEncTop.setConformanceWindow            ( m_confLeft, m_confRight, m_confTop, m_confBottom );
     283  m_cTEncTop.setConformanceWindow            ( m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );
    284284  m_cTEncTop.setFramesToBeEncoded            ( m_framesToBeEncoded );
    285285 
     
    489489  }
    490490#endif
    491   m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    492   m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
    493   m_cTEncTop.setNumRowsMinus1              ( m_iNumRowsMinus1 );
    494   if(m_iUniformSpacingIdr==0)
    495   {
    496     m_cTEncTop.setColumnWidth              ( m_pColumnWidth );
    497     m_cTEncTop.setRowHeight                ( m_pRowHeight );
     491  m_cTEncTop.setTileUniformSpacingFlag     ( m_tileUniformSpacingFlag );
     492  m_cTEncTop.setNumColumnsMinus1           ( m_numTileColumnsMinus1 );
     493  m_cTEncTop.setNumRowsMinus1              ( m_numTileRowsMinus1 );
     494  if(!m_tileUniformSpacingFlag)
     495  {
     496    m_cTEncTop.setColumnWidth              ( m_tileColumnWidth );
     497    m_cTEncTop.setRowHeight                ( m_tileRowHeight );
    498498  }
    499499  m_cTEncTop.xCheckGSParameters();
    500   Int uiTilesCount          = (m_iNumRowsMinus1+1) * (m_iNumColumnsMinus1+1);
     500  Int uiTilesCount          = (m_numTileRowsMinus1+1) * (m_numTileColumnsMinus1+1);
    501501  if(uiTilesCount == 1)
    502502  {
     
    603603  m_cTEncTop.setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled );
    604604  m_cTEncTop.setVuiParametersPresentFlag( m_vuiParametersPresentFlag );
     605  m_cTEncTop.setAspectRatioInfoPresentFlag( m_aspectRatioInfoPresentFlag);
    605606  m_cTEncTop.setAspectRatioIdc( m_aspectRatioIdc );
    606607  m_cTEncTop.setSarWidth( m_sarWidth );
     
    10871088      if (m_pchReconFileList[layerId])
    10881089      {
     1090#if H_MV_ALIGN_HM_15
     1091        m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst );
     1092#else
    10891093        m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confLeft, m_confRight, m_confTop, m_confBottom, m_isTopFieldFirst );
     1094#endif
    10901095      }
    10911096    }
     
    11041109      if (m_pchReconFile)
    11051110      {
    1106         m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confLeft, m_confRight, m_confTop, m_confBottom, m_isTopFieldFirst );
     1111        m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst );
    11071112      }
    11081113
     
    11401145      if (m_pchReconFileList[layerId])
    11411146      {
     1147#if H_MV_ALIGN_HM_15
     1148        m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );
     1149#else
    11421150        m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom );
     1151#endif
    11431152      }   
    11441153    }
     
    11561165      if (m_pchReconFile)
    11571166      {
    1158         m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom );
     1167        m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );
    11591168      }
    11601169
     
    16121621
    16131622  repFormat->setConformanceWindowVpsFlag( true );
     1623#if H_MV_ALIGN_HM_15
     1624  repFormat->setConfWinVpsLeftOffset    ( m_confWinLeft   / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );
     1625  repFormat->setConfWinVpsRightOffset   ( m_confWinRight  / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() )  );
     1626  repFormat->setConfWinVpsTopOffset     ( m_confWinTop    / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() )  );
     1627  repFormat->setConfWinVpsBottomOffset  ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );
     1628#else
    16141629  repFormat->setConfWinVpsLeftOffset    ( m_confLeft   / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) );
    16151630  repFormat->setConfWinVpsRightOffset   ( m_confRight  / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() )  );
    16161631  repFormat->setConfWinVpsTopOffset     ( m_confTop    / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() )  );
    16171632  repFormat->setConfWinVpsBottomOffset  ( m_confBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) );
    1618 
     1633#endif
    16191634  assert( vps.getRepFormat( 0 ) == NULL );
    16201635  vps.setRepFormat( 0 , repFormat );
  • branches/HTM-12.1-dev0/source/Lib/TLibCommon/CommonDef.h

    r1067 r1081  
    6161#if H_MV
    6262#define NV_VERSION        "12.1"                ///< Current software version
    63 #define HM_VERSION        "14.0"                ///<
     63#define HM_VERSION        "15.0"                ///<
    6464#else
    6565#define NV_VERSION        "14.0"                 ///< Current software version
  • branches/HTM-12.1-dev0/source/Lib/TLibCommon/SEI.h

    r964 r1081  
    161161  UInt m_bpSeqParameterSetId;
    162162  Bool m_rapCpbParamsPresentFlag;
    163   Bool m_cpbDelayOffset;
    164   Bool m_dpbDelayOffset;
     163  UInt m_cpbDelayOffset;
     164  UInt m_dpbDelayOffset;
    165165  UInt m_initialCpbRemovalDelay         [MAX_CPB_CNT][2];
    166166  UInt m_initialCpbRemovalDelayOffset   [MAX_CPB_CNT][2];
  • branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComPicSym.cpp

    r872 r1081  
    3838#include "TComPicSym.h"
    3939#include "TComSampleAdaptiveOffset.h"
     40#include "TComSlice.h"
    4041
    4142//! \ingroup TLibCommon
     
    6364,m_iNumColumnsMinus1 (0)
    6465,m_iNumRowsMinus1(0)
    65 ,m_apcTComTile(NULL)
    6666,m_puiCUOrderMap(0)
    6767,m_puiTileIdxMap(NULL)
     
    101101    delete [] m_apcTComSlice;
    102102  }
    103   m_apcTComSlice      = new TComSlice*[m_uiNumCUsInFrame*m_uiNumPartitions]; 
     103  m_apcTComSlice      = new TComSlice*[m_uiNumCUsInFrame];
    104104  m_apcTComSlice[0]   = new TComSlice;
    105105  m_uiNumAllocatedSlice = 1;
     
    148148  m_apcTComDataCU = NULL;
    149149
    150   for(Int i = 0; i < (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ )
    151   {
    152     delete m_apcTComTile[i];
    153   }
    154   delete [] m_apcTComTile;
    155 
    156   m_apcTComTile = NULL;
    157 
    158150  delete [] m_puiCUOrderMap;
    159151  m_puiCUOrderMap = NULL;
     
    173165Void TComPicSym::allocateNewSlice()
    174166{
     167  assert ((m_uiNumAllocatedSlice + 1) <= m_uiNumCUsInFrame);
    175168  m_apcTComSlice[m_uiNumAllocatedSlice ++] = new TComSlice;
    176169  if (m_uiNumAllocatedSlice>=2)
     
    201194}
    202195
    203 Void TComPicSym::xCreateTComTileArray()
    204 {
    205   m_apcTComTile = new TComTile*[(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1)];
    206   for( UInt i=0; i<(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ )
    207   {
    208     m_apcTComTile[i] = new TComTile;
    209   }
    210 }
    211 
    212 Void TComPicSym::xInitTiles()
    213 {
    214   UInt  uiTileIdx;
    215   UInt  uiColumnIdx = 0;
    216   UInt  uiRowIdx = 0;
    217   UInt  uiRightEdgePosInCU;
    218   UInt  uiBottomEdgePosInCU;
    219   Int   i, j;
     196Void TComPicSym::initTiles(TComPPS *pps)
     197{
     198  //set NumColumnsMinus1 and NumRowsMinus1
     199  setNumColumnsMinus1( pps->getNumTileColumnsMinus1() );
     200  setNumRowsMinus1( pps->getTileNumRowsMinus1() );
     201
     202  const Int numCols = pps->getNumTileColumnsMinus1() + 1;
     203  const Int numRows = pps->getTileNumRowsMinus1() + 1;
     204  const Int numTiles = numRows * numCols;
     205
     206  // allocate memory for tile parameters
     207  m_tileParameters.resize(numTiles);
     208
     209  if( pps->getTileUniformSpacingFlag() )
     210  {
     211    //set width and height for each (uniform) tile
     212    for(Int row=0; row < numRows; row++)
     213    {
     214      for(Int col=0; col < numCols; col++)
     215      {
     216        const Int tileIdx = row * numCols + col;
     217        m_tileParameters[tileIdx].setTileWidth( (col+1)*getFrameWidthInCU()/numCols
     218                                              - (col*getFrameWidthInCU())/numCols );
     219        m_tileParameters[tileIdx].setTileHeight( (row+1)*getFrameHeightInCU()/numRows
     220                                               - (row*getFrameHeightInCU())/numRows );
     221      }
     222    }
     223  }
     224  else
     225  {
     226    //set the width for each tile
     227    for(Int row=0; row < numRows; row++)
     228    {
     229      Int cumulativeTileWidth = 0;
     230      for(Int col=0; col < getNumColumnsMinus1(); col++)
     231  {
     232  }
     233      m_tileParameters[row * numCols + getNumColumnsMinus1()].setTileWidth( getFrameWidthInCU()-cumulativeTileWidth );
     234}
     235
     236    //set the height for each tile
     237    for(Int col=0; col < numCols; col++)
     238{
     239      Int cumulativeTileHeight = 0;
     240      for(Int row=0; row < getNumRowsMinus1(); row++)
     241      {
     242        m_tileParameters[row * numCols + col].setTileHeight( pps->getTileRowHeight(row) );
     243        cumulativeTileHeight += pps->getTileRowHeight(row);
     244      }
     245      m_tileParameters[getNumRowsMinus1() * numCols + col].setTileHeight( getFrameHeightInCU()-cumulativeTileHeight );
     246    }
     247  }
     248
     249#if TILE_SIZE_CHECK
     250  Int minWidth  = 1;
     251  Int minHeight = 1;
     252  const Int profileIdc = pps->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc();
     253  if (  profileIdc == Profile::MAIN || profileIdc == Profile::MAIN10)
     254  {
     255    if (pps->getTilesEnabledFlag())
     256    {
     257      minHeight = 64  / g_uiMaxCUHeight;
     258      minWidth  = 256 / g_uiMaxCUWidth;
     259    }
     260  }
     261  for(Int row=0; row < numRows; row++)
     262  {
     263    for(Int col=0; col < numCols; col++)
     264    {
     265      const Int tileIdx = row * numCols + col;
     266      assert (m_tileParameters[tileIdx].getTileWidth() >= minWidth);
     267      assert (m_tileParameters[tileIdx].getTileHeight() >= minHeight);
     268    }
     269  }
     270#endif
    220271
    221272  //initialize each tile of the current picture
    222   for( uiRowIdx=0; uiRowIdx < m_iNumRowsMinus1+1; uiRowIdx++ )
    223   {
    224     for( uiColumnIdx=0; uiColumnIdx < m_iNumColumnsMinus1+1; uiColumnIdx++ )
    225     {
    226       uiTileIdx = uiRowIdx * (m_iNumColumnsMinus1+1) + uiColumnIdx;
     273  for( Int row=0; row < numRows; row++ )
     274  {
     275    for( Int col=0; col < numCols; col++ )
     276    {
     277      const Int tileIdx = row * numCols + col;
    227278
    228279      //initialize the RightEdgePosInCU for each tile
    229       uiRightEdgePosInCU = 0;
    230       for( i=0; i <= uiColumnIdx; i++ )
    231       {
    232         uiRightEdgePosInCU += this->getTComTile(uiRowIdx * (m_iNumColumnsMinus1+1) + i)->getTileWidth();
    233       }
    234       this->getTComTile(uiTileIdx)->setRightEdgePosInCU(uiRightEdgePosInCU-1);
     280      Int rightEdgePosInCTU = 0;
     281      for( Int i=0; i <= col; i++ )
     282      {
     283        rightEdgePosInCTU += m_tileParameters[row * numCols + i].getTileWidth();
     284      }
     285      m_tileParameters[tileIdx].setRightEdgePosInCU(rightEdgePosInCTU-1);
    235286
    236287      //initialize the BottomEdgePosInCU for each tile
    237       uiBottomEdgePosInCU = 0;
    238       for( i=0; i <= uiRowIdx; i++ )
    239       {
    240         uiBottomEdgePosInCU += this->getTComTile(i * (m_iNumColumnsMinus1+1) + uiColumnIdx)->getTileHeight();
    241       }
    242       this->getTComTile(uiTileIdx)->setBottomEdgePosInCU(uiBottomEdgePosInCU-1);
     288      Int bottomEdgePosInCTU = 0;
     289      for( Int i=0; i <= row; i++ )
     290      {
     291        bottomEdgePosInCTU += m_tileParameters[i * numCols + col].getTileHeight();
     292      }
     293      m_tileParameters[tileIdx].setBottomEdgePosInCU(bottomEdgePosInCTU-1);
    243294
    244295      //initialize the FirstCUAddr for each tile
    245       this->getTComTile(uiTileIdx)->setFirstCUAddr( (this->getTComTile(uiTileIdx)->getBottomEdgePosInCU() - this->getTComTile(uiTileIdx)->getTileHeight() +1)*m_uiWidthInCU +
    246         this->getTComTile(uiTileIdx)->getRightEdgePosInCU() - this->getTComTile(uiTileIdx)->getTileWidth() + 1);
    247     }
    248   }
     296      m_tileParameters[tileIdx].setFirstCUAddr( (m_tileParameters[tileIdx].getBottomEdgePosInCU() - m_tileParameters[tileIdx].getTileHeight() + 1) * getFrameWidthInCU() +
     297                                                 m_tileParameters[tileIdx].getRightEdgePosInCU() - m_tileParameters[tileIdx].getTileWidth() + 1);
     298    }
     299  }
     300
     301  Int  columnIdx = 0;
     302  Int  rowIdx = 0;
    249303
    250304  //initialize the TileIdxMap
    251   for( i=0; i<m_uiNumCUsInFrame; i++)
    252   {
    253     for(j=0; j < m_iNumColumnsMinus1+1; j++)
    254     {
    255       if(i % m_uiWidthInCU <= this->getTComTile(j)->getRightEdgePosInCU())
    256       {
    257         uiColumnIdx = j;
    258         j = m_iNumColumnsMinus1+1;
    259       }
    260     }
    261     for(j=0; j < m_iNumRowsMinus1+1; j++)
    262     {
    263       if(i/m_uiWidthInCU <= this->getTComTile(j*(m_iNumColumnsMinus1 + 1))->getBottomEdgePosInCU())
    264       {
    265         uiRowIdx = j;
    266         j = m_iNumRowsMinus1 + 1;
    267       }
    268     }
    269     m_puiTileIdxMap[i] = uiRowIdx * (m_iNumColumnsMinus1 + 1) + uiColumnIdx;
     305  for( Int i=0; i<m_uiNumCUsInFrame; i++)
     306  {
     307    for( Int col=0; col < numCols; col++)
     308    {
     309      if(i % getFrameWidthInCU() <= m_tileParameters[col].getRightEdgePosInCU())
     310      {
     311        columnIdx = col;
     312        break;
     313      }
     314    }
     315    for(Int row=0; row < numRows; row++)
     316    {
     317      if(i / getFrameWidthInCU() <= m_tileParameters[row*numCols].getBottomEdgePosInCU())
     318      {
     319        rowIdx = row;
     320        break;
     321      }
     322    }
     323    m_puiTileIdxMap[i] = rowIdx * numCols + columnIdx;
    270324  }
    271325
     
    417471
    418472TComTile::TComTile()
     473: m_uiTileWidth         (0)
     474, m_uiTileHeight        (0)
     475, m_uiRightEdgePosInCU  (0)
     476, m_uiBottomEdgePosInCU (0)
     477, m_uiFirstCUAddr       (0)
     478
    419479{
    420480}
  • branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComPicSym.h

    r872 r1081  
    4545#include "TComDataCU.h"
    4646class TComSampleAdaptiveOffset;
     47class TComPPS;
    4748
    4849//! \ingroup TLibCommon
     
    102103  Int           m_iNumColumnsMinus1;
    103104  Int           m_iNumRowsMinus1;
    104   TComTile**    m_apcTComTile;
     105  std::vector<TComTile> m_tileParameters;
    105106  UInt*         m_puiCUOrderMap;       //the map of LCU raster scan address relative to LCU encoding order
    106107  UInt*         m_puiTileIdxMap;       //the map of the tile index relative to LCU raster scan address
     
    133134  Int          getNumRowsMinus1()                                    { return m_iNumRowsMinus1; }
    134135  Int          getNumTiles()                                         { return (m_iNumRowsMinus1+1)*(m_iNumColumnsMinus1+1); }
    135   TComTile*    getTComTile  ( UInt tileIdx )                         { return *(m_apcTComTile + tileIdx); }
     136  TComTile*    getTComTile  ( UInt tileIdx )                         { return &(m_tileParameters[tileIdx]); }
    136137  Void         setCUOrderMap( Int encCUOrder, Int cuAddr )           { *(m_puiCUOrderMap + encCUOrder) = cuAddr; }
    137138  UInt         getCUOrderMap( Int encCUOrder )                       { return *(m_puiCUOrderMap + (encCUOrder>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : encCUOrder)); }
     
    141142  UInt         getPicSCUEncOrder( UInt SCUAddr );
    142143  UInt         getPicSCUAddr( UInt SCUEncOrder );
    143   Void         xCreateTComTileArray();
    144   Void         xInitTiles();
     144  Void         initTiles(TComPPS *pps);
    145145  UInt         xCalculateNxtCUAddr( UInt uiCurrCUAddr );
    146146  SAOBlkParam* getSAOBlkParam() { return m_saoBlkParams;}
  • branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.cpp

    r1078 r1081  
    28732873, m_entropyCodingSyncEnabledFlag   (false)
    28742874, m_loopFilterAcrossTilesEnabledFlag  (true)
    2875 , m_uniformSpacingFlag           (0)
    2876 , m_iNumColumnsMinus1            (0)
    2877 , m_puiColumnWidth               (NULL)
    2878 , m_iNumRowsMinus1               (0)
    2879 , m_puiRowHeight                 (NULL)
    2880 , m_iNumSubstreams             (1)
     2875, m_uniformSpacingFlag           (false)
     2876, m_numTileColumnsMinus1         (0)
     2877, m_numTileRowsMinus1            (0)
     2878, m_numSubstreams               (1)
    28812879, m_signHideFlag(0)
    28822880, m_cabacInitPresentFlag        (false)
     
    29112909TComPPS::~TComPPS()
    29122910{
    2913   if( m_iNumColumnsMinus1 > 0 && m_uniformSpacingFlag == 0 )
    2914   {
    2915     if (m_puiColumnWidth) delete [] m_puiColumnWidth;
    2916     m_puiColumnWidth = NULL;
    2917   }
    2918   if( m_iNumRowsMinus1 > 0 && m_uniformSpacingFlag == 0 )
    2919   {
    2920     if (m_puiRowHeight) delete [] m_puiRowHeight;
    2921     m_puiRowHeight = NULL;
    2922   }
    29232911  delete m_scalingList;
    29242912}
  • branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.h

    r1076 r1081  
    19701970 
    19711971  Bool     m_loopFilterAcrossTilesEnabledFlag;
    1972   Int      m_uniformSpacingFlag;
    1973   Int      m_iNumColumnsMinus1;
    1974   UInt*    m_puiColumnWidth;
    1975   Int      m_iNumRowsMinus1;
    1976   UInt*    m_puiRowHeight;
    1977 
    1978   Int      m_iNumSubstreams;
     1972  Bool             m_uniformSpacingFlag;
     1973  Int              m_numTileColumnsMinus1;
     1974  Int              m_numTileRowsMinus1;
     1975  std::vector<Int> m_tileColumnWidth;
     1976  std::vector<Int> m_tileRowHeight;
     1977
     1978  Int      m_numSubstreams;
    19791979
    19801980  Int      m_signHideFlag;
     
    20732073  Bool    getDependentSliceSegmentsEnabledFlag() const     { return m_dependentSliceSegmentsEnabledFlag; }
    20742074  Void    setDependentSliceSegmentsEnabledFlag(Bool val)   { m_dependentSliceSegmentsEnabledFlag = val; }
    2075   Bool    getTilesEnabledFlag() const                      { return m_tilesEnabledFlag; }
    2076   Void    setTilesEnabledFlag(Bool val)                    { m_tilesEnabledFlag = val; }
    20772075  Bool    getEntropyCodingSyncEnabledFlag() const          { return m_entropyCodingSyncEnabledFlag; }
    20782076  Void    setEntropyCodingSyncEnabledFlag(Bool val)        { m_entropyCodingSyncEnabledFlag = val; }
    2079   Void     setUniformSpacingFlag            ( Bool b )          { m_uniformSpacingFlag = b; }
    2080   Bool     getUniformSpacingFlag            ()                  { return m_uniformSpacingFlag; }
    2081   Void     setNumColumnsMinus1              ( Int i )           { m_iNumColumnsMinus1 = i; }
    2082   Int      getNumColumnsMinus1              ()                  { return m_iNumColumnsMinus1; }
    2083   Void     setColumnWidth ( UInt* columnWidth )
    2084   {
    2085     if( m_uniformSpacingFlag == 0 && m_iNumColumnsMinus1 > 0 )
    2086     {
    2087       m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ];
    2088 
    2089       for(Int i=0; i<m_iNumColumnsMinus1; i++)
    2090       {
    2091         m_puiColumnWidth[i] = columnWidth[i];
    2092       }
    2093     }
    2094   }
    2095   UInt     getColumnWidth  (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); }
    2096   Void     setNumRowsMinus1( Int i )        { m_iNumRowsMinus1 = i; }
    2097   Int      getNumRowsMinus1()               { return m_iNumRowsMinus1; }
    2098   Void     setRowHeight    ( UInt* rowHeight )
    2099   {
    2100     if( m_uniformSpacingFlag == 0 && m_iNumRowsMinus1 > 0 )
    2101     {
    2102       m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ];
    2103 
    2104       for(Int i=0; i<m_iNumRowsMinus1; i++)
    2105       {
    2106         m_puiRowHeight[i] = rowHeight[i];
    2107       }
    2108     }
    2109   }
    2110   UInt     getRowHeight           (UInt rowIdx)    { return *( m_puiRowHeight + rowIdx ); }
    2111   Void     setNumSubstreams(Int iNumSubstreams)               { m_iNumSubstreams = iNumSubstreams; }
    2112   Int      getNumSubstreams()                                 { return m_iNumSubstreams; }
     2077
     2078  Void     setTilesEnabledFlag       (Bool val)                             { m_tilesEnabledFlag = val; }
     2079  Bool     getTilesEnabledFlag       () const                               { return m_tilesEnabledFlag; }
     2080  Void     setTileUniformSpacingFlag (Bool b)                               { m_uniformSpacingFlag = b; }
     2081  Bool     getTileUniformSpacingFlag () const                               { return m_uniformSpacingFlag; }
     2082  Void     setNumTileColumnsMinus1   (Int i)                                { m_numTileColumnsMinus1 = i; }
     2083  Int      getNumTileColumnsMinus1   () const                               { return m_numTileColumnsMinus1; }
     2084  Void     setTileColumnWidth        (const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; }
     2085  UInt     getTileColumnWidth        (UInt columnIdx) const                 { return  m_tileColumnWidth[columnIdx]; }
     2086  Void     setNumTileRowsMinus1      (Int i)                                { m_numTileRowsMinus1 = i; }
     2087  Int      getTileNumRowsMinus1      () const                               { return m_numTileRowsMinus1; }
     2088  Void     setTileRowHeight          (const std::vector<Int>& rowHeight)    { m_tileRowHeight = rowHeight;  }
     2089  UInt     getTileRowHeight          (UInt rowIdx) const                    { return m_tileRowHeight[rowIdx]; }
     2090
     2091  Void     setNumSubstreams    (Int numSubstreams)                     { m_numSubstreams = numSubstreams; }
     2092  Int      getNumSubstreams    ()                                      { return m_numSubstreams; }
    21132093
    21142094  Void      setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; }
  • branches/HTM-12.1-dev0/source/Lib/TLibCommon/TypeDef.h

    r1078 r1081  
    369369#define H_MV_HLS_PTL_LIMITS                  0
    370370#define H_MV_HLS7_GEN                        0  // General changes (not tested)
    371 
     371#define H_MV_ALIGN_HM_15                     1 
    372372
    373373// POC
     
    418418#define SAO_SGN_FUNC 1
    419419
     420#define TILE_SIZE_CHECK 1
     421
    420422#define FIX1172 1 ///< fix ticket #1172
    421423
     
    433435#define MAX_NESTING_NUM_LAYER       64
    434436
     437#if H_MV
    435438#define MAX_VPS_NUM_HRD_PARAMETERS                1024
     439#else
     440#define MAX_VPS_NUM_HRD_PARAMETERS                1
     441#endif
    436442#if H_MV
    437443#define MAX_NUM_SUB_LAYERS                        7
  • branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1079 r1081  
    292292  if( pcPPS->getTilesEnabledFlag() )
    293293  {
    294     READ_UVLC ( uiCode, "num_tile_columns_minus1" );                pcPPS->setNumColumnsMinus1( uiCode ); 
    295     READ_UVLC ( uiCode, "num_tile_rows_minus1" );                   pcPPS->setNumRowsMinus1( uiCode ); 
    296     READ_FLAG ( uiCode, "uniform_spacing_flag" );                   pcPPS->setUniformSpacingFlag( uiCode );
    297 
    298     if( !pcPPS->getUniformSpacingFlag())
    299     {
    300       UInt* columnWidth = (UInt*)malloc(pcPPS->getNumColumnsMinus1()*sizeof(UInt));
    301       for(UInt i=0; i<pcPPS->getNumColumnsMinus1(); i++)
     294    READ_UVLC ( uiCode, "num_tile_columns_minus1" );                pcPPS->setNumTileColumnsMinus1( uiCode ); 
     295    READ_UVLC ( uiCode, "num_tile_rows_minus1" );                   pcPPS->setNumTileRowsMinus1( uiCode ); 
     296    READ_FLAG ( uiCode, "uniform_spacing_flag" );                   pcPPS->setTileUniformSpacingFlag( uiCode == 1 );
     297
     298    if( !pcPPS->getTileUniformSpacingFlag())
     299    {
     300      std::vector<Int> columnWidth(pcPPS->getNumTileColumnsMinus1());
     301      for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++)
    302302      {
    303303        READ_UVLC( uiCode, "column_width_minus1" ); 
    304304        columnWidth[i] = uiCode+1;
    305305      }
    306       pcPPS->setColumnWidth(columnWidth);
    307       free(columnWidth);
    308 
    309       UInt* rowHeight = (UInt*)malloc(pcPPS->getNumRowsMinus1()*sizeof(UInt));
    310       for(UInt i=0; i<pcPPS->getNumRowsMinus1(); i++)
     306      pcPPS->setTileColumnWidth(columnWidth);
     307
     308      std::vector<Int> rowHeight (pcPPS->getTileNumRowsMinus1());
     309      for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++)
    311310      {
    312311        READ_UVLC( uiCode, "row_height_minus1" );
    313312        rowHeight[i] = uiCode + 1;
    314313      }
    315       pcPPS->setRowHeight(rowHeight);
    316       free(rowHeight); 
    317     }
    318 
    319     if(pcPPS->getNumColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0)
     314      pcPPS->setTileRowHeight(rowHeight);
     315    }
     316
     317    if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0)
    320318    {
    321319      READ_FLAG ( uiCode, "loop_filter_across_tiles_enabled_flag" );   pcPPS->setLoopFilterAcrossTilesEnabledFlag( uiCode ? true : false );
     
    11341132        READ_FLAG( uiCode, "cprms_present_flag[i]" );              pcVPS->setCprmsPresentFlag( uiCode == 1 ? true : false, i );
    11351133      }
     1134      else
     1135      {
     1136        pcVPS->setCprmsPresentFlag( true, i );
     1137      }
     1138
    11361139      parseHrdParameters(pcVPS->getHrdParameters(i), pcVPS->getCprmsPresentFlag( i ), pcVPS->getMaxTLayers() - 1);
    11371140    }
  • branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp

    r1079 r1081  
    727727#endif
    728728  pps->setSPS(sps);
    729   pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1);
     729  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1);
    730730  pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) );
    731731
     
    10241024  Bool bNextSlice     = pcSlice->isNextSlice();
    10251025
    1026   UInt uiCummulativeTileWidth;
    1027   UInt uiCummulativeTileHeight;
    1028   UInt i, j, p;
    1029 
    1030   //set NumColumnsMins1 and NumRowsMinus1
    1031   pcPic->getPicSym()->setNumColumnsMinus1( pcSlice->getPPS()->getNumColumnsMinus1() );
    1032   pcPic->getPicSym()->setNumRowsMinus1( pcSlice->getPPS()->getNumRowsMinus1() );
    1033 
    1034   //create the TComTileArray
    1035   pcPic->getPicSym()->xCreateTComTileArray();
    1036 
    1037   if( pcSlice->getPPS()->getUniformSpacingFlag() )
    1038   {
    1039     //set the width for each tile
    1040     for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++)
    1041     {
    1042       for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1()+1; p++)
    1043       {
    1044         pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )->
    1045           setTileWidth( (p+1)*pcPic->getPicSym()->getFrameWidthInCU()/(pcPic->getPicSym()->getNumColumnsMinus1()+1)
    1046           - (p*pcPic->getPicSym()->getFrameWidthInCU())/(pcPic->getPicSym()->getNumColumnsMinus1()+1) );
    1047       }
    1048     }
    1049 
    1050     //set the height for each tile
    1051     for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++)
    1052     {
    1053       for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1()+1; p++)
    1054       {
    1055         pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )->
    1056           setTileHeight( (p+1)*pcPic->getPicSym()->getFrameHeightInCU()/(pcPic->getPicSym()->getNumRowsMinus1()+1)
    1057           - (p*pcPic->getPicSym()->getFrameHeightInCU())/(pcPic->getPicSym()->getNumRowsMinus1()+1) );   
    1058       }
    1059     }
    1060   }
    1061   else
    1062   {
    1063     //set the width for each tile
    1064     for(j=0; j < pcSlice->getPPS()->getNumRowsMinus1()+1; j++)
    1065     {
    1066       uiCummulativeTileWidth = 0;
    1067       for(i=0; i < pcSlice->getPPS()->getNumColumnsMinus1(); i++)
    1068       {
    1069         pcPic->getPicSym()->getTComTile(j * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + i)->setTileWidth( pcSlice->getPPS()->getColumnWidth(i) );
    1070         uiCummulativeTileWidth += pcSlice->getPPS()->getColumnWidth(i);
    1071       }
    1072       pcPic->getPicSym()->getTComTile(j * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + i)->setTileWidth( pcPic->getPicSym()->getFrameWidthInCU()-uiCummulativeTileWidth );
    1073     }
    1074 
    1075     //set the height for each tile
    1076     for(j=0; j < pcSlice->getPPS()->getNumColumnsMinus1()+1; j++)
    1077     {
    1078       uiCummulativeTileHeight = 0;
    1079       for(i=0; i < pcSlice->getPPS()->getNumRowsMinus1(); i++)
    1080       {
    1081         pcPic->getPicSym()->getTComTile(i * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcSlice->getPPS()->getRowHeight(i) );
    1082         uiCummulativeTileHeight += pcSlice->getPPS()->getRowHeight(i);
    1083       }
    1084       pcPic->getPicSym()->getTComTile(i * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcPic->getPicSym()->getFrameHeightInCU()-uiCummulativeTileHeight );
    1085     }
    1086   }
    1087 
    1088   pcPic->getPicSym()->xInitTiles();
     1026  UInt i;
     1027  pcPic->getPicSym()->initTiles(pcSlice->getPPS());
    10891028
    10901029  //generate the Coding Order Map and Inverse Coding Order Map
  • branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1079 r1081  
    210210  if( pcPPS->getTilesEnabledFlag() )
    211211  {
    212     WRITE_UVLC( pcPPS->getNumColumnsMinus1(),                                    "num_tile_columns_minus1" );
    213     WRITE_UVLC( pcPPS->getNumRowsMinus1(),                                       "num_tile_rows_minus1" );
    214     WRITE_FLAG( pcPPS->getUniformSpacingFlag(),                                  "uniform_spacing_flag" );
    215     if( pcPPS->getUniformSpacingFlag() == 0 )
    216     {
    217       for(UInt i=0; i<pcPPS->getNumColumnsMinus1(); i++)
    218       {
    219         WRITE_UVLC( pcPPS->getColumnWidth(i)-1,                                  "column_width_minus1" );
    220       }
    221       for(UInt i=0; i<pcPPS->getNumRowsMinus1(); i++)
    222       {
    223         WRITE_UVLC( pcPPS->getRowHeight(i)-1,                                    "row_height_minus1" );
    224       }
    225     }
    226     if(pcPPS->getNumColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0)
     212    WRITE_UVLC( pcPPS->getNumTileColumnsMinus1(),                                    "num_tile_columns_minus1" );
     213    WRITE_UVLC( pcPPS->getTileNumRowsMinus1(),                                       "num_tile_rows_minus1" );
     214    WRITE_FLAG( pcPPS->getTileUniformSpacingFlag(),                                  "uniform_spacing_flag" );
     215    if( !pcPPS->getTileUniformSpacingFlag() )
     216    {
     217      for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++)
     218      {
     219        WRITE_UVLC( pcPPS->getTileColumnWidth(i)-1,                                  "column_width_minus1" );
     220      }
     221      for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++)
     222      {
     223        WRITE_UVLC( pcPPS->getTileRowHeight(i)-1,                                    "row_height_minus1" );
     224      }
     225    }
     226    if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0)
    227227    {
    228228      WRITE_FLAG( pcPPS->getLoopFilterAcrossTilesEnabledFlag()?1 : 0,          "loop_filter_across_tiles_enabled_flag");
     
    528528  if( defaultDisplayWindow.getWindowEnabledFlag() )
    529529  {
    530     WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset(),      "def_disp_win_left_offset");
    531     WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset(),    "def_disp_win_right_offset");
    532     WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset(),      "def_disp_win_top_offset");
    533     WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset(),    "def_disp_win_bottom_offset");
     530    WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset()  / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc()), "def_disp_win_left_offset");
     531    WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc()), "def_disp_win_right_offset");
     532    WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset()   / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc()), "def_disp_win_top_offset");
     533    WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset()/ TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc()), "def_disp_win_bottom_offset");
    534534  }
    535535  TimingInfo *timingInfo = pcVUI->getTimingInfo();
  • branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCfg.h

    r1074 r1081  
    124124  Int       m_iSourceWidth;
    125125  Int       m_iSourceHeight;
    126   Int       m_conformanceMode;
    127126  Window    m_conformanceWindow;
    128127  Int       m_framesToBeEncoded;
     
    229228  Bool      m_bPCMFilterDisableFlag;
    230229  Bool      m_loopFilterAcrossTilesEnabledFlag;
    231   Int       m_iUniformSpacingIdr;
     230  Bool      m_tileUniformSpacingFlag;
    232231  Int       m_iNumColumnsMinus1;
    233   UInt*     m_puiColumnWidth;
    234232  Int       m_iNumRowsMinus1;
    235   UInt*     m_puiRowHeight;
     233  std::vector<Int> m_tileColumnWidth;
     234  std::vector<Int> m_tileRowHeight;
    236235
    237236  Int       m_iWaveFrontSynchro;
     
    430429public:
    431430  TEncCfg()
    432   : m_puiColumnWidth()
    433   , m_puiRowHeight()
     431  : m_tileColumnWidth()
     432  , m_tileRowHeight()
    434433#if H_MV
    435434  , m_layerId(-1)
     
    445444
    446445  virtual ~TEncCfg()
    447   {
    448     delete[] m_puiColumnWidth;
    449     delete[] m_puiRowHeight;
    450   }
     446  {}
    451447 
    452448  Void setProfile(Profile::Name profile) { m_profile = profile; }
     
    671667  Void  setLFCrossTileBoundaryFlag               ( Bool   val  )       { m_loopFilterAcrossTilesEnabledFlag = val; }
    672668  Bool  getLFCrossTileBoundaryFlag               ()                    { return m_loopFilterAcrossTilesEnabledFlag;   }
    673   Void  setUniformSpacingIdr           ( Int i )           { m_iUniformSpacingIdr = i; }
    674   Int   getUniformSpacingIdr           ()                  { return m_iUniformSpacingIdr; }
     669  Void  setTileUniformSpacingFlag      ( Bool b )          { m_tileUniformSpacingFlag = b; }
     670  Bool  getTileUniformSpacingFlag      ()                  { return m_tileUniformSpacingFlag; }
    675671  Void  setNumColumnsMinus1            ( Int i )           { m_iNumColumnsMinus1 = i; }
    676672  Int   getNumColumnsMinus1            ()                  { return m_iNumColumnsMinus1; }
    677   Void  setColumnWidth ( UInt* columnWidth )
    678   {
    679     if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 )
    680     {
    681       Int  m_iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth;
    682       m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ];
    683 
    684       for(Int i=0; i<m_iNumColumnsMinus1; i++)
    685       {
    686         m_puiColumnWidth[i] = columnWidth[i];
    687         printf("col: m_iWidthInCU= %4d i=%4d width= %4d\n",m_iWidthInCU,i,m_puiColumnWidth[i]); //AFU
    688       }
    689     }
    690   }
    691   UInt  getColumnWidth                 ( UInt columnidx )  { return *( m_puiColumnWidth + columnidx ); }
     673  Void  setColumnWidth ( const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; }
     674  UInt  getColumnWidth                 ( UInt columnIdx )      { return m_tileColumnWidth[columnIdx]; }
    692675  Void  setNumRowsMinus1               ( Int i )           { m_iNumRowsMinus1 = i; }
    693676  Int   getNumRowsMinus1               ()                  { return m_iNumRowsMinus1; }
    694   Void  setRowHeight (UInt* rowHeight)
    695   {
    696     if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 )
    697     {
    698       Int  m_iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight;
    699       m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ];
    700 
    701       for(Int i=0; i<m_iNumRowsMinus1; i++)
    702       {
    703         m_puiRowHeight[i] = rowHeight[i];
    704         printf("row: m_iHeightInCU=%4d i=%4d height=%4d\n",m_iHeightInCU,i,m_puiRowHeight[i]); //AFU
    705       }
    706     }
    707   }
    708   UInt  getRowHeight                   ( UInt rowIdx )     { return *( m_puiRowHeight + rowIdx ); }
     677  Void  setRowHeight ( const std::vector<Int>& rowHeight)      { m_tileRowHeight = rowHeight; }
     678  UInt  getRowHeight                   ( UInt rowIdx )         { return m_tileRowHeight[rowIdx]; }
    709679  Void  xCheckGSParameters();
    710680  Void  setWaveFrontSynchro(Int iWaveFrontSynchro)       { m_iWaveFrontSynchro = iWaveFrontSynchro; }
  • branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp

    r1074 r1081  
    395395Void TEncGOP::initGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP)
    396396{
     397#if H_MV_ALIGN_HM_15
     398  xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut, false );
     399#else
    397400  xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut );
     401#endif
    398402  m_iNumPicCoded = 0;
    399403}
     
    12281232    UInt uiRealEndAddress = uiExternalAddress*pcPic->getNumPartInCU()+uiInternalAddress;
    12291233
    1230     UInt uiCummulativeTileWidth;
    1231     UInt uiCummulativeTileHeight;
    12321234    Int  p, j;
    12331235    UInt uiEncCUAddr;
    12341236
    1235     //set NumColumnsMinus1 and NumRowsMinus1
    1236     pcPic->getPicSym()->setNumColumnsMinus1( pcSlice->getPPS()->getNumColumnsMinus1() );
    1237     pcPic->getPicSym()->setNumRowsMinus1( pcSlice->getPPS()->getNumRowsMinus1() );
    1238 
    1239     //create the TComTileArray
    1240     pcPic->getPicSym()->xCreateTComTileArray();
    1241 
    1242     if( pcSlice->getPPS()->getUniformSpacingFlag() == 1 )
    1243     {
    1244       //set the width for each tile
    1245       for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++)
    1246       {
    1247         for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1()+1; p++)
    1248         {
    1249           pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )->
    1250             setTileWidth( (p+1)*pcPic->getPicSym()->getFrameWidthInCU()/(pcPic->getPicSym()->getNumColumnsMinus1()+1)
    1251             - (p*pcPic->getPicSym()->getFrameWidthInCU())/(pcPic->getPicSym()->getNumColumnsMinus1()+1) );
    1252         }
    1253       }
    1254 
    1255       //set the height for each tile
    1256       for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++)
    1257       {
    1258         for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1()+1; p++)
    1259         {
    1260           pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )->
    1261             setTileHeight( (p+1)*pcPic->getPicSym()->getFrameHeightInCU()/(pcPic->getPicSym()->getNumRowsMinus1()+1)
    1262             - (p*pcPic->getPicSym()->getFrameHeightInCU())/(pcPic->getPicSym()->getNumRowsMinus1()+1) );   
    1263         }
    1264       }
    1265     }
    1266     else
    1267     {
    1268       //set the width for each tile
    1269       for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++)
    1270       {
    1271         uiCummulativeTileWidth = 0;
    1272         for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1(); p++)
    1273         {
    1274           pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )->setTileWidth( pcSlice->getPPS()->getColumnWidth(p) );
    1275           uiCummulativeTileWidth += pcSlice->getPPS()->getColumnWidth(p);
    1276         }
    1277         pcPic->getPicSym()->getTComTile(j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p)->setTileWidth( pcPic->getPicSym()->getFrameWidthInCU()-uiCummulativeTileWidth );
    1278       }
    1279 
    1280       //set the height for each tile
    1281       for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++)
    1282       {
    1283         uiCummulativeTileHeight = 0;
    1284         for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1(); p++)
    1285         {
    1286           pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )->setTileHeight( pcSlice->getPPS()->getRowHeight(p) );
    1287           uiCummulativeTileHeight += pcSlice->getPPS()->getRowHeight(p);
    1288         }
    1289         pcPic->getPicSym()->getTComTile(p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcPic->getPicSym()->getFrameHeightInCU()-uiCummulativeTileHeight );
    1290       }
    1291     }
    1292     //intialize each tile of the current picture
    1293     pcPic->getPicSym()->xInitTiles();
     1237    pcPic->getPicSym()->initTiles(pcSlice->getPPS());
    12941238
    12951239    // Allocate some coders, now we know how many tiles there are.
     
    18141758
    18151759#if SETTING_NO_OUT_PIC_PRIOR
     1760          pcSlice->setNoRaslOutputFlag(false);
    18161761          if (pcSlice->isIRAP())
    18171762          {
     
    18211766            }
    18221767            //the inference for NoOutputPriorPicsFlag
     1768            // KJS: This cannot happen at the encoder
    18231769            if (!m_bFirst && pcSlice->isIRAP() && pcSlice->getNoRaslOutputFlag())
    18241770            {
     
    24922438  assert (m_iGopSize > 0);
    24932439 
    2494   return;
    2495 }
    2496 
    2497 Void TEncGOP::xInitGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut )
    2498 {
    2499   assert( iNumPicRcvd > 0 );
    2500   //  Exception for the first frame
    2501   if ( iPOCLast == 0 )
    2502   {
    2503     m_iGopSize    = 1;
    2504   }
    2505   else
    2506     m_iGopSize    = m_pcCfg->getGOPSize();
    2507  
    2508   assert (m_iGopSize > 0);
    2509 
    25102440  return;
    25112441}
  • branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncGOP.h

    r1074 r1081  
    200200
    201201  Void xInitGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, bool isField );
    202   Void  xInitGOP          ( Int iPOC, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut );
    203202  Void  xGetBuffer        ( TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Int iNumPicRcvd, Int iTimeOffset, TComPic*& rpcPic, TComPicYuv*& rpcPicYuvRecOut, Int pocCurr, bool isField );
    204203 
  • branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp

    r1074 r1081  
    63296329    if( bCodeChroma )
    63306330    {
     6331      m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
     6332      m_pcEntropyCoder->resetBits();
    63316333        m_pcEntropyCoder->encodeQtCbf   ( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrMode );
    63326334      m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrU, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_U );
    6333       uiSingleBitsU = m_pcEntropyCoder->getNumberOfWrittenBits() - uiSingleBitsY;
     6335      uiSingleBitsU = m_pcEntropyCoder->getNumberOfWrittenBits();
    63346336     
     6337      m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
     6338      m_pcEntropyCoder->resetBits();
    63356339        m_pcEntropyCoder->encodeQtCbf   ( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrMode );
    63366340      m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrV, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_V );
    6337       uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits() - ( uiSingleBitsY + uiSingleBitsU );
     6341      uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits();
    63386342    }
    63396343   
     
    64166420        const Double singleCostY = m_pcRdCost->calcRdCost( uiSingleBitsY, uiNonzeroDistY );
    64176421#endif
     6422        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
     6423
    64186424        m_pcEntropyCoder->resetBits();
    64196425        m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_LUMA,     uiTrMode );
     
    64496455    else if( checkTransformSkipY )
    64506456    {
     6457      m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    64516458      m_pcEntropyCoder->resetBits();
    64526459      m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_LUMA, uiTrMode );
     
    65056512        {
    65066513          const Double dSingleCostU = m_pcRdCost->calcRdCost( uiSingleBitsU, uiNonzeroDistU );
     6514          m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    65076515          m_pcEntropyCoder->resetBits();
    65086516          m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_U,     uiTrMode );
     
    65306538      else if( checkTransformSkipUV )
    65316539      {
     6540        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    65326541        m_pcEntropyCoder->resetBits();
    65336542        m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_U, uiTrMode );
     
    65746583        {
    65756584          const Double dSingleCostV = m_pcRdCost->calcRdCost( uiSingleBitsV, uiNonzeroDistV );
     6585          m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    65766586          m_pcEntropyCoder->resetBits();
    65776587          m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_V,     uiTrMode );
     
    65996609      else if( checkTransformSkipUV )
    66006610      {
     6611        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
    66016612        m_pcEntropyCoder->resetBits();
    66026613        m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_V, uiTrMode );
     
    67956806      pcCU->setCbfSubParts( uiAbsSumTransformSkipV ? uiSetCbf : 0, TEXT_CHROMA_V, uiAbsPartIdx, pcCU->getDepth(0)+uiTrModeC );
    67966807
    6797       m_pcEntropyCoder->resetBits();
    67986808      uiSingleBitsU = 0;
    67996809      uiSingleBitsV = 0;
     
    68016811      if( uiAbsSumTransformSkipU )
    68026812      {
     6813        m_pcEntropyCoder->resetBits();
    68036814        m_pcEntropyCoder->encodeQtCbf   ( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrMode );
    68046815        m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrU, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_U );
     
    68436854      if( uiAbsSumTransformSkipV )
    68446855      {
     6856        m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] );
     6857        m_pcEntropyCoder->resetBits();
    68456858        m_pcEntropyCoder->encodeQtCbf   ( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrMode );
    68466859        m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrV, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_V );
    6847         uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits() - uiSingleBitsU;
     6860        uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits();
    68486861
    68496862        curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();
  • branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp

    r1076 r1081  
    854854  {
    855855    TComVUI* pcVUI = m_cSPS.getVuiParameters();
    856     pcVUI->setAspectRatioInfoPresentFlag(getAspectRatioIdc() != -1);
     856    pcVUI->setAspectRatioInfoPresentFlag(getAspectRatioInfoPresentFlag());
    857857    pcVUI->setAspectRatioIdc(getAspectRatioIdc());
    858858    pcVUI->setSarWidth(getSarWidth());
     
    12881288Void  TEncTop::xInitPPSforTiles()
    12891289{
    1290   m_cPPS.setUniformSpacingFlag( m_iUniformSpacingIdr );
    1291   m_cPPS.setNumColumnsMinus1( m_iNumColumnsMinus1 );
    1292   m_cPPS.setNumRowsMinus1( m_iNumRowsMinus1 );
    1293   if( m_iUniformSpacingIdr == 0 )
    1294   {
    1295     m_cPPS.setColumnWidth( m_puiColumnWidth );
    1296     m_cPPS.setRowHeight( m_puiRowHeight );
     1290  m_cPPS.setTileUniformSpacingFlag( m_tileUniformSpacingFlag );
     1291  m_cPPS.setNumTileColumnsMinus1( m_iNumColumnsMinus1 );
     1292  m_cPPS.setNumTileRowsMinus1( m_iNumRowsMinus1 );
     1293  if( !m_tileUniformSpacingFlag )
     1294  {
     1295    m_cPPS.setTileColumnWidth( m_tileColumnWidth );
     1296    m_cPPS.setTileRowHeight( m_tileRowHeight );
    12971297  }
    12981298  m_cPPS.setLoopFilterAcrossTilesEnabledFlag( m_loopFilterAcrossTilesEnabledFlag );
    12991299
    13001300  // # substreams is "per tile" when tiles are independent.
    1301   if (m_iWaveFrontSynchro
    1302     )
     1301  if (m_iWaveFrontSynchro )
    13031302  {
    13041303    m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1));
     
    13261325  }
    13271326
    1328   if( m_iNumColumnsMinus1 && m_iUniformSpacingIdr==0 )
     1327  if( m_iNumColumnsMinus1 && !m_tileUniformSpacingFlag )
    13291328  {
    13301329    for(Int i=0; i<m_iNumColumnsMinus1; i++)
    13311330    {
    1332       uiCummulativeColumnWidth += m_puiColumnWidth[i];
     1331      uiCummulativeColumnWidth += m_tileColumnWidth[i];
    13331332    }
    13341333
     
    13531352  }
    13541353
    1355   if( m_iNumRowsMinus1 && m_iUniformSpacingIdr==0 )
     1354  if( m_iNumRowsMinus1 && !m_tileUniformSpacingFlag )
    13561355  {
    13571356    for(Int i=0; i<m_iNumRowsMinus1; i++)
    1358       uiCummulativeRowHeight += m_puiRowHeight[i];
     1357      uiCummulativeRowHeight += m_tileRowHeight[i];
    13591358
    13601359    if( uiCummulativeRowHeight >= iHeightInCU )
  • branches/HTM-12.1-dev0/source/Lib/TLibVideoIO/TVideoIOYuv.cpp

    r872 r1081  
    470470  Bool retval = true;
    471471
     472  if ((width==0)||(height==0))
     473  {
     474    printf ("\nWarning: writing %d x %d luma sample output picture!", width, height);
     475  }
     476
    472477  if (m_bitDepthShiftY != 0 || m_bitDepthShiftC != 0)
    473478  {
     
    563568 
    564569  Bool retval = true;
     570 
     571  if ((width==0)||(height==0))
     572  {
     573    printf ("\nWarning: writing %d x %d luma sample output picture!", width, height);
     574  }
    565575 
    566576  if (m_bitDepthShiftY != 0 || m_bitDepthShiftC != 0)
Note: See TracChangeset for help on using the changeset viewer.