Package net.sourceforge.jaad.aac

Examples of net.sourceforge.jaad.aac.Profile


    icsL = new ICStream(frameLength);
    icsR = new ICStream(frameLength);
  }

  void decode(BitStream in, DecoderConfig conf) throws AACException {
    final Profile profile = conf.getProfile();
    final SampleFrequency sf = conf.getSampleFrequency();
    if(sf.equals(SampleFrequency.SAMPLE_FREQUENCY_NONE)) throw new AACException("invalid sample frequency");

    readElementInstanceTag(in);

    commonWindow = in.readBool();
    final ICSInfo info = icsL.getInfo();
    if(commonWindow) {
      info.decode(in, conf, commonWindow);
      icsR.getInfo().setData(info);

      msMask = MSMask.forInt(in.readBits(2));
      if(msMask.equals(MSMask.TYPE_USED)) {
        final int maxSFB = info.getMaxSFB();
        final int windowGroupCount = info.getWindowGroupCount();

        for(int idx = 0; idx<windowGroupCount*maxSFB; idx++) {
          msUsed[idx] = in.readBool();
        }
      }
      else if(msMask.equals(MSMask.TYPE_ALL_1)) Arrays.fill(msUsed, true);
      else if(msMask.equals(MSMask.TYPE_ALL_0)) Arrays.fill(msUsed, false);
      else throw new AACException("reserved MS mask type used");
    }
    else {
      msMask = MSMask.TYPE_ALL_0;
      Arrays.fill(msUsed, false);
    }

    if(profile.isErrorResilientProfile()&&(info.isLTPrediction1Present())) {
      if(info.ltpData2Present = in.readBool()) info.getLTPrediction2().decode(in, info, profile);
    }

    icsL.decode(in, commonWindow, conf);
    icsR.decode(in, commonWindow, conf);
View Full Code Here


      if(!psPresent&&prev.getSBR().isPSUsed()) psPresent = true;
    }
  }

  public void process(FilterBank filterBank) throws AACException {
    final Profile profile = config.getProfile();
    final SampleFrequency sf = config.getSampleFrequency();
    //final ChannelConfiguration channels = config.getChannelConfiguration();

    int chs = config.getChannelConfiguration().getChannelCount();
    if(chs==1&&psPresent) chs++;
View Full Code Here

TOP

Related Classes of net.sourceforge.jaad.aac.Profile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.