Changeset 1351 in 3DVCSoftware


Ignore:
Timestamp:
14 Oct 2015, 14:40:25 (9 years ago)
Author:
nict-htm
Message:

FIX: Decode value: FocalLengthX/Y, PrincipalPointX/Y, Trans

Location:
branches/HTM-15.1-dev0-NICT/source/Lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.1-dev0-NICT/source/Lib/TLibCommon/SEI.cpp

    r1349 r1351  
    15541554};
    15551555
     1556UInt SEIAlternativeDepthInfo::getManGvdFocalLengthXLen       ( Int i, int j ) const
     1557{
     1558  return xGetSyntaxElementLen( m_expGvdFocalLengthX[i][j], m_precGvdFocalLength, m_manGvdFocalLengthX[i][j]  );
     1559};
     1560
     1561UInt SEIAlternativeDepthInfo::getManGvdFocalLengthYLen       ( Int i, int j ) const
     1562{
     1563  return xGetSyntaxElementLen( m_expGvdFocalLengthY[i][j], m_precGvdFocalLength, m_manGvdFocalLengthY[i][j]  );
     1564};
     1565
     1566UInt SEIAlternativeDepthInfo::getManGvdPrincipalPointXLen    ( Int i, int j ) const
     1567{
     1568  return xGetSyntaxElementLen( m_expGvdPrincipalPointX[i][j], m_precGvdPrincipalPoint, m_manGvdPrincipalPointX[i][j]  );
     1569};
     1570
     1571UInt SEIAlternativeDepthInfo::getManGvdPrincipalPointYLen    ( Int i, int j ) const
     1572{
     1573  return xGetSyntaxElementLen( m_expGvdPrincipalPointY[i][j], m_precGvdPrincipalPoint, m_manGvdPrincipalPointY[i][j]  );
     1574};
     1575
     1576UInt SEIAlternativeDepthInfo::getManGvdRLen                  ( Int i, int j, int k ) const
     1577{
     1578  return xGetSyntaxElementLen( m_expGvdR[i][j][k], m_precGvdRotationParam, m_manGvdR[i][j][k] );
     1579};
     1580
     1581UInt SEIAlternativeDepthInfo::getManGvdTXLen                 ( Int i, int j ) const
     1582{
     1583  return xGetSyntaxElementLen( m_expGvdTX[i][j], m_precGvdTranslationParam, m_manGvdTX[i][j]  );
     1584};
     1585
     1586UInt SEIAlternativeDepthInfo::xGetSyntaxElementLen( Int expo, Int prec, Int val ) const
     1587{
     1588  UInt len;
     1589  if( expo == 0 )
     1590  {
     1591    len = std::max(0, prec - 30 );
     1592  }
     1593  else
     1594  {
     1595    len = std::max( 0, expo + prec - 31 );
     1596  }
     1597
     1598#if DEBUG_NH_3D_SEI
     1599  printf("DEBUG: SEIAlternativeDepthInfo::xGetSyntaxElementLen(): val: %d, len %u\n", val, len);
    15561600#endif
     1601  assert( val >= 0 );
     1602  assert( val <= ( ( 1 << len )- 1) );
     1603  return len;
     1604}
    15571605
    15581606#endif
     1607
     1608#endif
  • branches/HTM-15.1-dev0-NICT/source/Lib/TLibCommon/SEI.h

    r1349 r1351  
    11501150  Void setupFromCfgFile( const Char*      cfgFile );
    11511151  Bool checkCfg        ( const TComSlice* slice   );
     1152
     1153  UInt getManGvdFocalLengthXLen       ( Int i, Int j ) const;
     1154  UInt getManGvdFocalLengthYLen       ( Int i, Int j ) const;
     1155  UInt getManGvdPrincipalPointXLen    ( Int i, Int j ) const;
     1156  UInt getManGvdPrincipalPointYLen    ( Int i, Int j ) const;
     1157  UInt getManGvdRLen                  ( Int i, int j, int k ) const;
     1158  UInt getManGvdTXLen                 ( Int i, Int j ) const;
     1159  UInt xGetSyntaxElementLen           ( Int expo, Int prec, Int val ) const;
    11521160
    11531161  Void resizeArrays( )
  • branches/HTM-15.1-dev0-NICT/source/Lib/TLibDecoder/SEIread.cpp

    r1349 r1351  
    17451745          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_focal_length_x" ); sei.m_signGvdFocalLengthX[i][j] = (code == 1);
    17461746          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_focal_length_x" ); sei.m_expGvdFocalLengthX[i][j] = code;
    1747           sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdFocalLength, code, "man_gvd_focal_length_x" ); sei.m_manGvdFocalLengthX[i][j] = code;
     1747          //sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdFocalLength, code, "man_gvd_focal_length_x" ); sei.m_manGvdFocalLengthX[i][j] = code;
     1748          sei_read_code( pDecodedMessageOutputStream, sei.getManGvdFocalLengthXLen(i,j), code, "man_gvd_focal_length_x" ); sei.m_manGvdFocalLengthX[i][j] = code;
    17481749          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_focal_length_y" ); sei.m_signGvdFocalLengthY[i][j] = (code == 1);
    17491750          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_focal_length_y" ); sei.m_expGvdFocalLengthY[i][j] = code;
    1750           sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdFocalLength, code, "man_gvd_focal_length_y" ); sei.m_manGvdFocalLengthY[i][j] = code;
     1751          //sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdFocalLength, code, "man_gvd_focal_length_y" ); sei.m_manGvdFocalLengthY[i][j] = code;
     1752          sei_read_code( pDecodedMessageOutputStream, sei.getManGvdFocalLengthYLen(i,j), code, "man_gvd_focal_length_y" ); sei.m_manGvdFocalLengthY[i][j] = code;
    17511753          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_principal_point_x" ); sei.m_signGvdPrincipalPointX[i][j] = (code == 1);
    17521754          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_principal_point_x" ); sei.m_expGvdPrincipalPointX[i][j] = code;
    1753           sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdPrincipalPoint, code, "man_gvd_principal_point_x" ); sei.m_manGvdPrincipalPointX[i][j] = code;
     1755          //sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdPrincipalPoint, code, "man_gvd_principal_point_x" ); sei.m_manGvdPrincipalPointX[i][j] = code;
     1756          sei_read_code( pDecodedMessageOutputStream, sei.getManGvdPrincipalPointXLen(i,j), code, "man_gvd_principal_point_x" ); sei.m_manGvdPrincipalPointX[i][j] = code;
    17541757          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_principal_point_y" ); sei.m_signGvdPrincipalPointY[i][j] = (code == 1);
    17551758          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_principal_point_y" ); sei.m_expGvdPrincipalPointY[i][j] = code;
    1756           sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdPrincipalPoint, code, "man_gvd_principal_point_y" ); sei.m_manGvdPrincipalPointY[i][j] = code;
     1759          //sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdPrincipalPoint, code, "man_gvd_principal_point_y" ); sei.m_manGvdPrincipalPointY[i][j] = code;
     1760          sei_read_code( pDecodedMessageOutputStream, sei.getManGvdPrincipalPointYLen(i,j), code, "man_gvd_principal_point_y" ); sei.m_manGvdPrincipalPointY[i][j] = code;
     1761#if DEBUG_NH_3D_SEI
     1762          printf("manLEN_gvd_focal_length_x     : sei.getManGvdFocalLengthXLen(%d,%d): %u\n", i, j, sei.getManGvdFocalLengthXLen(i,j));
     1763          printf("manLEN_gvd_focal_length_y     : sei.getManGvdFocalLengthYLen(%d,%d): %u\n", i, j, sei.getManGvdFocalLengthYLen(i,j));
     1764          printf("manLEN_gvd_principal_point_x  : sei.getManGvdPrincipalPointXLen(%d,%d): %u\n", i, j, sei.getManGvdPrincipalPointXLen(i,j));
     1765          printf("manLEN_gvd_principal_point_x  : sei.getManGvdPrincipalPointYLen(%d,%d): %u\n", i, j, sei.getManGvdPrincipalPointYLen(i,j));
     1766#endif
    17571767        }
    17581768        if( sei.m_rotationGvdFlag )
     
    17631773            sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_r" ); sei.m_expGvdR[i][j][k] = code;
    17641774            sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdRotationParam, code, "man_gvd_r" ); sei.m_manGvdR[i][j][k] = code;
     1775            //sei_read_code( pDecodedMessageOutputStream, sei.getManGvdRLen(i,j,k), code, "man_gvd_r" ); sei.m_manGvdR[i][j][k] = code;
    17651776          }
    17661777        }
    17671778        if( sei.m_translationGvdFlag )
    17681779        {
    1769 #if NH_MV_SEI_TBD
    17701780          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_t_x" ); sei.m_signGvdTX[i][j] = (code == 1);
    17711781          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_t_x" ); sei.m_expGvdTX[i][j] = code;
    1772           sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdTranslationParam, code, "man_gvd_t_x" ); sei.m_manGvdTX[i][j] = code;
     1782          //sei_read_code( pDecodedMessageOutputStream, sei.m_precGvdTranslationParam, code, "man_gvd_t_x" ); sei.m_manGvdTX[i][j] = code;
     1783          sei_read_code( pDecodedMessageOutputStream, sei.getManGvdTXLen(i,j), code, "man_gvd_t_x" ); sei.m_manGvdTX[i][j] = code;
     1784#if DEBUG_NH_3D_SEI
     1785          printf("manLEN_gvd_t_x                : sei.getManGvdTXLen(%d,%d): %u\n", i, j, sei.getManGvdTXLen(i,j));
    17731786#endif
    17741787        }
  • branches/HTM-15.1-dev0-NICT/source/Lib/TLibEncoder/SEIwrite.cpp

    r1349 r1351  
    13851385          printf("exp_gvd_focal_length_x        : sei.m_expGvdFocalLengthX[%d][%d]: %u\n", i, j, sei.m_expGvdFocalLengthX[i][j]);
    13861386          printf("man_gvd_focal_length_x        : sei.m_manGvdFocalLengthX[%d][%d]: %u\n", i, j, sei.m_manGvdFocalLengthX[i][j]);
     1387          printf("manLEN_gvd_focal_length_x     : sei.getManGvdFocalLengthXLen(%d,%d): %u\n", i, j, sei.getManGvdFocalLengthXLen(i,j));
    13871388          printf("sign_gvd_focal_length_y       : sei.m_signGvdFocalLengthY[%d][%d]: %u\n", i, j, sei.m_signGvdFocalLengthY[i][j]);
    13881389          printf("exp_gvd_focal_length_y        : sei.m_expGvdFocalLengthY[%d][%d]: %u\n", i, j, sei.m_expGvdFocalLengthY[i][j]);
    13891390          printf("man_gvd_focal_length_y        : sei.m_manGvdFocalLengthY[%d][%d]: %u\n", i, j, sei.m_manGvdFocalLengthY[i][j]);
     1391          printf("manLEN_gvd_focal_length_y     : sei.getManGvdFocalLengthYLen(%d,%d): %u\n", i, j, sei.getManGvdFocalLengthYLen(i,j));
    13901392          printf("sign_gvd_principal_point_x    : sei.m_signGvdPrincipalPointX[%d][%d]: %u\n", i, j, sei.m_signGvdPrincipalPointX[i][j]);
    13911393          printf("exp_gvd_principal_point_x     : sei.m_expGvdPrincipalPointX[%d][%d]: %u\n", i, j, sei.m_expGvdPrincipalPointX[i][j]);
    13921394          printf("man_gvd_principal_point_x     : sei.m_manGvdPrincipalPointX[%d][%d]: %u\n", i, j, sei.m_manGvdPrincipalPointX[i][j]);
     1395          printf("manLEN_gvd_principal_point_x  : sei.getManGvdPrincipalPointXLen(%d,%d): %u\n", i, j, sei.getManGvdPrincipalPointXLen(i,j));
    13931396          printf("sign_gvd_principal_point_y    : sei.m_signGvdPrincipalPointY[%d][%d]: %u\n", i, j, sei.m_signGvdPrincipalPointY[i][j]);
    13941397          printf("exp_gvd_principal_point_y     : sei.m_expGvdPrincipalPointY[%d][%d]: %u\n", i, j, sei.m_expGvdPrincipalPointY[i][j]);
    13951398          printf("man_gvd_principal_point_y     : sei.m_manGvdPrincipalPointY[%d][%d]: %u\n", i, j, sei.m_manGvdPrincipalPointY[i][j]);
     1399          printf("manLEN_gvd_principal_point_x  : sei.getManGvdPrincipalPointYLen(%d,%d): %u\n", i, j, sei.getManGvdPrincipalPointYLen(i,j));
    13961400#endif
    13971401          WRITE_FLAG( ( sei.m_signGvdFocalLengthX[i][j] ? 1 : 0 ), "sign_gvd_focal_length_x" );
    13981402          WRITE_CODE( sei.m_expGvdFocalLengthX[i][j], 6, "exp_gvd_focal_length_x" );
    1399           WRITE_CODE( sei.m_manGvdFocalLengthX[i][j], sei.m_precGvdFocalLength, "man_gvd_focal_length_x" );
     1403          //WRITE_CODE( sei.m_manGvdFocalLengthX[i][j], sei.m_precGvdFocalLength, "man_gvd_focal_length_x" );
     1404          WRITE_CODE( sei.m_manGvdFocalLengthX[i][j], sei.getManGvdFocalLengthXLen(i,j), "man_gvd_focal_length_x" );
    14001405          WRITE_FLAG( ( sei.m_signGvdFocalLengthY[i][j] ? 1 : 0 ), "sign_gvd_focal_length_y" );
    14011406          WRITE_CODE( sei.m_expGvdFocalLengthY[i][j], 6, "exp_gvd_focal_length_y" );
    1402           WRITE_CODE( sei.m_manGvdFocalLengthY[i][j], sei.m_precGvdFocalLength, "man_gvd_focal_length_y" );
     1407          //WRITE_CODE( sei.m_manGvdFocalLengthY[i][j], sei.m_precGvdFocalLength, "man_gvd_focal_length_y" );
     1408          WRITE_CODE( sei.m_manGvdFocalLengthY[i][j], sei.getManGvdFocalLengthYLen(i,j), "man_gvd_focal_length_y" );
    14031409          WRITE_FLAG( ( sei.m_signGvdPrincipalPointX[i][j] ? 1 : 0 ), "sign_gvd_principal_point_x" );
    14041410          WRITE_CODE( sei.m_expGvdPrincipalPointX[i][j], 6, "exp_gvd_principal_point_x" );
    1405           WRITE_CODE( sei.m_manGvdPrincipalPointX[i][j], sei.m_precGvdPrincipalPoint, "man_gvd_principal_point_x" );
     1411          //WRITE_CODE( sei.m_manGvdPrincipalPointX[i][j], sei.m_precGvdPrincipalPoint, "man_gvd_principal_point_x" );
     1412          WRITE_CODE( sei.m_manGvdPrincipalPointX[i][j], sei.getManGvdPrincipalPointXLen(i,j), "man_gvd_principal_point_x" );
    14061413          WRITE_FLAG( ( sei.m_signGvdPrincipalPointY[i][j] ? 1 : 0 ), "sign_gvd_principal_point_y" );
    14071414          WRITE_CODE( sei.m_expGvdPrincipalPointY[i][j], 6, "exp_gvd_principal_point_y" );
    1408           WRITE_CODE( sei.m_manGvdPrincipalPointY[i][j], sei.m_precGvdPrincipalPoint, "man_gvd_principal_point_y" );
     1415          //WRITE_CODE( sei.m_manGvdPrincipalPointY[i][j], sei.m_precGvdPrincipalPoint, "man_gvd_principal_point_y" );
     1416          WRITE_CODE( sei.m_manGvdPrincipalPointY[i][j], sei.getManGvdPrincipalPointYLen(i,j), "man_gvd_principal_point_y" );
    14091417        }
    14101418        if( sei.m_rotationGvdFlag )
     
    14161424            printf("exp_gvd_r                     : sei.m_expGvdR[%d][%d][%d]: %u\n", i, j, k, sei.m_expGvdR[i][j][k]);
    14171425            printf("man_gvd_r                     : sei.m_manGvdR[%d][%d][%d]: %u\n", i, j, k, sei.m_manGvdR[i][j][k]);
     1426            printf("manLEN_gvd_r                  : sei.getManGvdRLen(%d,%d,%d): %u\n", i, j, k, sei.getManGvdRLen(i,j,k));
    14181427#endif
    14191428            WRITE_FLAG( ( sei.m_signGvdR[i][j][k] ? 1 : 0 ), "sign_gvd_r" );
    14201429            WRITE_CODE( sei.m_expGvdR[i][j][k], 6, "exp_gvd_r" );
    1421             WRITE_CODE( sei.m_manGvdR[i][j][k], sei.m_precGvdTranslationParam, "man_gvd_r" );
     1430            WRITE_CODE( sei.m_manGvdR[i][j][k], sei.m_precGvdRotationParam, "man_gvd_r" );
     1431            //WRITE_CODE( sei.m_manGvdR[i][j][k], sei.getManGvdRLen(i,j,k), "man_gvd_r" );
    14221432          }
    14231433        }
     
    14281438          printf("exp_gvd_t_x                   : sei.m_expGvdTX[%d][%d]: %u\n", i, j, sei.m_expGvdTX[i][j]);
    14291439          printf("man_gvd_t_x                   : sei.m_manGvdTX[%d][%d]: %u\n", i, j, sei.m_manGvdTX[i][j]);
     1440          printf("manLEN_gvd_t_x                : sei.getManGvdTXLen(%d,%d): %u\n", i, j, sei.getManGvdTXLen(i,j));
    14301441#endif
    14311442          WRITE_FLAG( ( sei.m_signGvdTX[i][j] ? 1 : 0 ), "sign_gvd_t_x" );
    14321443          WRITE_CODE( sei.m_expGvdTX[i][j], 6, "exp_gvd_t_x" );
    1433           WRITE_CODE( sei.m_manGvdTX[i][j], sei.m_numConstituentViewsGvdMinus1, "man_gvd_t_x" );
     1444          //WRITE_CODE( sei.m_manGvdTX[i][j], sei.m_precGvdTranslationParam, "man_gvd_t_x" );
     1445          WRITE_CODE( sei.m_manGvdTX[i][j], sei.getManGvdTXLen(i,j), "man_gvd_t_x" );
    14341446        }
    14351447      }
Note: See TracChangeset for help on using the changeset viewer.