Changeset 169 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
9 May 2013, 10:43:46 (12 years ago)
Author:
qualcomm
Message:

Remove ceil and log functions

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r167 r169  
    978978    if( i > (vps->getNumLayerSets() - 1) )
    979979    {
    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      }
    981985      READ_CODE( numBits, uiCode, "output_layer_set_idx_minus1");   vps->setOutputLayerSetIdx( i, uiCode + 1);
    982986      Int lsIdx = vps->getOutputLayerSetIdx(i);
     
    10061010      }
    10071011    }
    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    }
    10091017    READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
    10101018  }
Note: See TracChangeset for help on using the changeset viewer.