Changeset 169 in SHVCSoftware for branches/SHM-2.0-dev/source
- Timestamp:
- 9 May 2013, 10:43:46 (12 years ago)
- Location:
- branches/SHM-2.0-dev/source/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r167 r169 978 978 if( i > (vps->getNumLayerSets() - 1) ) 979 979 { 980 Int numBits = (Int)std::max(1.0, ceil( log((double)vps->getNumLayerSets() - 1) / log(2.0) )); 980 Int numBits = 1; 981 while ((1 << numBits) < (vps->getNumLayerSets() - 1)) 982 { 983 numBits++; 984 } 981 985 READ_CODE( numBits, uiCode, "output_layer_set_idx_minus1"); vps->setOutputLayerSetIdx( i, uiCode + 1); 982 986 Int lsIdx = vps->getOutputLayerSetIdx(i); … … 1006 1010 } 1007 1011 } 1008 Int numBits = (Int)std::max(1.0, ceil( log((double)vps->getNumProfileTierLevel()) / log(2.0) )); 1012 Int numBits = 1; 1013 while ((1 << numBits) < (vps->getNumProfileTierLevel())) 1014 { 1015 numBits++; 1016 } 1009 1017 READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode); 1010 1018 } -
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r165 r169 755 755 if( i > (vps->getNumLayerSets() - 1) ) 756 756 { 757 Int numBits = std::max(1.0, ceil( log((double)vps->getNumLayerSets() - 1) / log(2.0) )); 757 Int numBits = 1; 758 while ((1 << numBits) < (vps->getNumLayerSets() - 1)) 759 { 760 numBits++; 761 } 758 762 WRITE_CODE( vps->getOutputLayerSetIdx(i) - 1, numBits, "output_layer_set_idx_minus1"); 759 763 Int lsIdx = vps->getOutputLayerSetIdx(i); … … 763 767 } 764 768 } 765 Int numBits = std::max(1.0, ceil( log((double)vps->getNumProfileTierLevel()) / log(2.0) )); 769 Int numBits = 1; 770 while ((1 << numBits) < (vps->getNumProfileTierLevel())) 771 { 772 numBits++; 773 } 766 774 WRITE_CODE( vps->getProfileLevelTierIdx(i), numBits, "profile_level_tier_idx[i]" ); 767 775 }
Note: See TracChangeset for help on using the changeset viewer.