Opened 6 years ago Closed 6 years ago #1497 closed defect (invalid)bugs on handling tile parameters in parseCfg()
Description
==Summery== if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 ) { > if (cfg_ColumnWidth.values.size() > m_numTileColumnsMinus1) { printf( "The number of columns whose width are defined is larger than the allowed number of columns.\n" ); exit( EXIT_FAILURE ); } > else if (cfg_ColumnWidth.values.size() < m_numTileColumnsMinus1) { printf( "The width of some columns is not defined.\n" ); exit( EXIT_FAILURE ); } else { > m_tileColumnWidth.resize(m_numTileColumnsMinus1); for(UInt i=0; i<cfg_ColumnWidth.values.size(); i++) { m_tileColumnWidth[i]=cfg_ColumnWidth.values[i]; } } }
===Possible solution=== if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 ) { > if (cfg_ColumnWidth.values.size() > (m_numTileColumnsMinus1+1)) { printf( "The number of columns whose width are defined is larger than the allowed number of columns.\n" ); exit( EXIT_FAILURE ); } > else if (cfg_ColumnWidth.values.size() < (m_numTileColumnsMinus1+1)) { printf( "The width of some columns is not defined.\n" ); exit( EXIT_FAILURE ); } else { > m_tileColumnWidth.resize(m_numTileColumnsMinus1+1); for(UInt i=0; i<cfg_ColumnWidth.values.size(); i++) { m_tileColumnWidth[i]=cfg_ColumnWidth.values[i]; } } }
==Bugs Location 2== > for(Int i=0; i<m_iNumColumnsMinus1; i++) { uiCummulativeColumnWidth += m_tileColumnWidth[i]; } > if( uiCummulativeColumnWidth >= iWidthInCU ) { printf( "The width of the column is too large.\n" ); exit( EXIT_FAILURE ); }
===Possible solution=== > for(Int i=0; i<(m_iNumColumnsMinus1+1); i++) { uiCummulativeColumnWidth += m_tileColumnWidth[i]; } > if( uiCummulativeColumnWidth > iWidthInCU ) { printf( "The width of the column is too large.\n" ); exit( EXIT_FAILURE ); } Change History (1)comment:1 Changed 6 years ago by ksuehring
Note: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber, Participant
|
There is no need to specify the last row or column, because the encoder can automatically use the space between the last specified tile border and the image border for the last tile, e.g.
So for two tiles you only need one tile border.