- Timestamp:
- 6 Sep 2013, 03:13:05 (11 years ago)
- Location:
- branches/SHM-3.1-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r382 r385 1615 1615 , m_defaultOneTargetOutputLayerFlag (false) 1616 1616 #endif 1617 #if VPS_VUI_BITRATE_PICRATE 1618 , m_bitRatePresentVpsFlag (false) 1619 , m_picRatePresentVpsFlag (false) 1620 #endif 1617 1621 { 1618 1622 for( Int i = 0; i < MAX_TLAYER; i++) … … 1680 1684 ::memset(m_ctuBasedOffsetEnabledFlag, 0, sizeof(m_ctuBasedOffsetEnabledFlag)); 1681 1685 ::memset(m_minHorizontalCtuOffsetPlus1, 0, sizeof(m_minHorizontalCtuOffsetPlus1)); 1686 #endif 1687 #if VPS_VUI_BITRATE_PICRATE 1688 ::memset(m_bitRatePresentFlag, 0, sizeof(m_bitRatePresentFlag)); 1689 ::memset(m_picRatePresentFlag, 0, sizeof(m_picRatePresentFlag)); 1690 ::memset(m_avgBitRate , 0, sizeof(m_avgBitRate) ); 1691 ::memset(m_maxBitRate , 0, sizeof(m_maxBitRate) ); 1692 ::memset(m_constPicRateIdc , 0, sizeof(m_constPicRateIdc) ); 1693 ::memset(m_avgPicRate , 0, sizeof(m_avgPicRate) ); 1682 1694 #endif 1683 1695 } -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.h
r382 r385 509 509 Int m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 510 510 #endif 511 #if VPS_VUI_BITRATE_PICRATE 512 Bool m_bitRatePresentVpsFlag; 513 Bool m_picRatePresentVpsFlag; 514 Bool m_bitRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 515 Bool m_picRatePresentFlag [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 516 Int m_avgBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 517 Int m_maxBitRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 518 Int m_constPicRateIdc [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 519 Int m_avgPicRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 520 #endif 511 521 public: 512 522 TComVPS(); … … 697 707 Void setMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId, Int val ) { m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId] = val;} 698 708 #endif 699 709 #if VPS_VUI_BITRATE_PICRATE 710 Bool getBitRatePresentVpsFlag() { return m_bitRatePresentVpsFlag; } 711 Void setBitRatePresentVpsFlag(Bool x) { m_bitRatePresentVpsFlag = x; } 712 Bool getPicRatePresentVpsFlag() { return m_picRatePresentVpsFlag; } 713 Void setPicRatePresentVpsFlag(Bool x) { m_picRatePresentVpsFlag = x; } 714 715 Bool getBitRatePresentFlag(Int i, Int j) { return m_bitRatePresentFlag[i][j]; } 716 Void setBitRatePresentFlag(Int i, Int j, Bool x) { m_bitRatePresentFlag[i][j] = x; } 717 Bool getPicRatePresentFlag(Int i, Int j) { return m_picRatePresentFlag[i][j]; } 718 Void setPicRatePresentFlag(Int i, Int j, Bool x) { m_picRatePresentFlag[i][j] = x; } 719 720 Int getAvgBitRate(Int i, Int j) { return m_avgBitRate[i][j]; } 721 Void setAvgBitRate(Int i, Int j, Int x) { m_avgBitRate[i][j] = x; } 722 Int getMaxBitRate(Int i, Int j) { return m_maxBitRate[i][j]; } 723 Void setMaxBitRate(Int i, Int j, Int x) { m_maxBitRate[i][j] = x; } 724 725 Int getConstPicRateIdc(Int i, Int j) { return m_constPicRateIdc[i][j]; } 726 Void setConstPicRateIdc(Int i, Int j, Int x) { m_constPicRateIdc[i][j] = x; } 727 Int getAvgPicRate(Int i, Int j) { return m_avgPicRate[i][j]; } 728 Void setAvgPicRate(Int i, Int j, Int x) { m_avgPicRate[i][j] = x; } 729 #endif 700 730 }; 701 731 -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h
r382 r385 83 83 #define N0160_TILE_BOUNDARY_ALIGNED_FLAG 1 ///< VPS VUI flag to indicate tile boundary alignment 84 84 #define N0160_VUI_EXT_ILP_REF 1 ///< VUI extension inter-layer dependency offset signalling 85 #define VPS_VUI_BITRATE_PICRATE 1 ///< N0085 - Signal bit rate and picture in VPS VUI 85 86 #endif //VPS_VUI 86 87 -
branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r384 r385 1169 1169 UInt i,j; 1170 1170 UInt uiCode; 1171 #if VPS_VUI_BITRATE_PICRATE 1172 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); vps->setBitRatePresentVpsFlag( uiCode ? true : false ); 1173 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); vps->setPicRatePresentVpsFlag( uiCode ? true : false ); 1174 1175 Bool parseFlag = vps->getBitRatePresentVpsFlag() || vps->getPicRatePresentVpsFlag(); 1176 { 1177 for( i = 0; i < vps->getNumLayerSets(); i++ ) 1178 { 1179 for( j = 0; j < vps->getMaxTLayers(); j++ ) 1180 { 1181 if( parseFlag && vps->getBitRatePresentVpsFlag() ) 1182 { 1183 READ_FLAG( uiCode, "bit_rate_present_vps_flag[i][j]" ); vps->setBitRatePresentFlag( i, j, uiCode ? true : false ); 1184 } 1185 else 1186 { 1187 vps->setBitRatePresentFlag( i, j, false ); 1188 } 1189 if( parseFlag && vps->getPicRatePresentVpsFlag() ) 1190 { 1191 READ_FLAG( uiCode, "pic_rate_present_vps_flag[i][j]" ); vps->setPicRatePresentFlag( i, j, uiCode ? true : false ); 1192 } 1193 else 1194 { 1195 vps->setPicRatePresentFlag( i, j, false ); 1196 } 1197 if( parseFlag && vps->getBitRatePresentFlag(i, j) ) 1198 { 1199 READ_CODE( 16, uiCode, "avg_bit_rate[i][j]" ); vps->setAvgBitRate( i, j, uiCode ); 1200 READ_CODE( 16, uiCode, "max_bit_rate[i][j]" ); vps->setMaxBitRate( i, j, uiCode ); 1201 } 1202 else 1203 { 1204 vps->setAvgBitRate( i, j, 0 ); 1205 vps->setMaxBitRate( i, j, 0 ); 1206 } 1207 if( parseFlag && vps->getPicRatePresentFlag(i, j) ) 1208 { 1209 READ_CODE( 2 , uiCode, "constant_pic_rate_idc[i][j]" ); vps->setConstPicRateIdc( i, j, uiCode ); 1210 READ_CODE( 16, uiCode, "avg_pic_rate[i][j]" ); vps->setAvgPicRate( i, j, uiCode ); 1211 } 1212 else 1213 { 1214 vps->setConstPicRateIdc( i, j, 0 ); 1215 vps->setAvgPicRate ( i, j, 0 ); 1216 } 1217 } 1218 } 1219 } 1220 #endif 1171 1221 #if N0160_TILE_BOUNDARY_ALIGNED_FLAG 1172 1222 for(i = 1; i < vps->getMaxLayers(); i++) -
branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r384 r385 914 914 { 915 915 Int i,j; 916 #if VPS_VUI_BITRATE_PICRATE 917 WRITE_FLAG( vps->getBitRatePresentVpsFlag(), "bit_rate_present_vps_flag" ); 918 WRITE_FLAG( vps->getPicRatePresentVpsFlag(), "pic_rate_present_vps_flag" ); 919 920 if( vps->getBitRatePresentVpsFlag() || vps->getPicRatePresentVpsFlag() ) 921 { 922 for( i = 0; i < vps->getNumLayerSets(); i++ ) 923 { 924 for( j = 0; j < vps->getMaxTLayers(); j++ ) 925 { 926 if( vps->getBitRatePresentVpsFlag() ) 927 { 928 WRITE_FLAG( vps->getBitRatePresentFlag( i, j), "bit_rate_present_vps_flag[i][j]" ); 929 } 930 if( vps->getPicRatePresentVpsFlag() ) 931 { 932 WRITE_FLAG( vps->getPicRatePresentFlag( i, j), "pic_rate_present_vps_flag[i][j]" ); 933 } 934 if( vps->getBitRatePresentFlag(i, j) ) 935 { 936 WRITE_CODE( vps->getAvgBitRate( i, j ), 16, "avg_bit_rate[i][j]" ); 937 WRITE_CODE( vps->getAvgBitRate( i, j ), 16, "max_bit_rate[i][j]" ); 938 } 939 if( vps->getPicRatePresentFlag(i, j) ) 940 { 941 WRITE_CODE( vps->getConstPicRateIdc( i, j), 2 , "constant_pic_rate_idc[i][j]" ); 942 WRITE_CODE( vps->getConstPicRateIdc( i, j), 16, "avg_pic_rate[i][j]" ); 943 } 944 } 945 } 946 } 947 #endif 916 948 #if N0160_TILE_BOUNDARY_ALIGNED_FLAG 917 949 for(i = 1; i < vps->getMaxLayers(); i++)
Note: See TracChangeset for help on using the changeset viewer.