Opened 6 years ago

Closed 6 years ago

#1497 closed defect (invalid)

bugs on handling tile parameters in parseCfg()

Reported by: vulcano Owned by:
Priority: minor Milestone: HM-next
Component: HM Version: HM-16.14
Keywords: Cc: ksuehring, davidf, karlsharman, jct-vc@…

Description

==Summery==
We found out that the Encoder config file parser could not correctly handling the size of tile columns or rows array configuration.
Revision 4974
==Bugs Location 1==
source\App\TAppEncoder\TAppEncCfg.cpp:1279~1330
*Problem: While try to catch unexpected tile columns/rows array configuration, there should be using m_numTileColumns/RowsMinus1 +1 instead of m_numTileColumns/RowsMinus1.
===Original Source-code===

  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==
source\Lib\TLibEncoder\TEncCfg.cpp:1336~1375
*Problem :While try to catch over-sized tile columns/rows array configuration, The for loop to add up the ColumnWidth/RowHeight should be repeated m_iNumRowsMinus1+1 times. The uiCummulativeRowHeight need to be equal with iHeightInCU.
===Original Source-code===

> 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

  • Resolution set to invalid
  • Status changed from new to closed

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.

  --------------------
  |        |         |
  |        |         |
  --------------------
           ^         ^
           |         |
    This is required |
                   image border 

So for two tiles you only need one tile border.

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

  • David Flynn(Subscriber)
  • jct-vc@…(Subscriber)
  • Karl Sharman(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)
  • Tianyu Dong(Reporter)