diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6a75c0c2..48d974ca 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -17,17 +17,13 @@ on: pull_request: # The branches below must be a subset of the branches above branches: [ vavi ] - schedule: - - cron: '27 6 * * 2' +# schedule: +# - cron: '27 6 * * 2' jobs: analyze: name: Analyze runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write strategy: fail-fast: false @@ -38,11 +34,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -53,7 +49,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -67,4 +63,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ff46ab9f..6590a163 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,12 +15,19 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Check w/o SNAPSHOT when "bump version" + if: ${{ contains(github.event.head_commit.message, 'bump version') }} + run: grep "" pom.xml | head -1 | grep -v SNAPSHOT + + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'temurin' + cache: maven + + - name: Build with Maven + run: mvn -B package --file pom.xml diff --git a/.gitignore b/.gitignore index 052c8593..c8400087 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ *.iml *.ipr *.iws + +/tmp/ +local.properties diff --git a/README.md b/README.md index 0a8fcbd4..9165e795 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ [![Release](https://jitpack.io/v/umjammer/JAADec.svg)](https://jitpack.io/#umjammer/JAADec) -[![Actions Status](https://github.com/umjammer/JAADec/workflows/Java%20CI/badge.svg)](https://github.com/umjammer/JAADec/actions) +[![Java CI with Maven](https://github.com/umjammer/JAADec/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/JAADec/actions/workflows/maven.yml) +[![CodeQL](https://github.com/umjammer/JAADec/actions/workflows/codeql.yml/badge.svg)](https://github.com/umjammer/JAADec/actions/workflows/codeql.yml) +![Java](https://img.shields.io/badge/Java-8-b07219) +[![Parent](https://img.shields.io/badge/Parent-vavi--sound--sandbox-pink)](https://github.com/umjammer/vavi-sound-sandbox) # JAADec @@ -16,4 +19,9 @@ and decode AAC-LC (Low Complexity) and HE-AAC (High Efficiency/AAC+). ## Install - * https://jitpack.io/v/umjammer/JAADec \ No newline at end of file + * https://jitpack.io/#/umjammer/JAADec + +## Applied Patches + + * https://github.com/Tianscar/jaac/commit/cf9b24f55fcd8f77ae76c42cac87602fdb0382a8 + * https://github.com/Tianscar/jaac/commit/bbaaec277d6620e0233561d02185f2e901970480 diff --git a/local.properties.sample b/local.properties.sample new file mode 100644 index 00000000..6c71e42b --- /dev/null +++ b/local.properties.sample @@ -0,0 +1 @@ +mp4=/foo/bar.m4a \ No newline at end of file diff --git a/pom.xml b/pom.xml index d8f81603..83da5410 100644 --- a/pom.xml +++ b/pom.xml @@ -5,10 +5,10 @@ net.sourceforge.jaadec jaad - 0.8.8 + 0.8.9 JAAD is an AAC decoder and MP4 demultiplexer library written completely in Java. It uses no native libraries, is platform-independent and portable. It can read MP4 container from almost every input-stream (files, network sockets etc.) and decode AAC-LC (Low Complexity) and HE-AAC (High Efficiency/AAC+). - https://github.com/DV8FromTheWorld/JAADec + https://github.com/umjammer/JAADec Public Domain @@ -33,15 +33,17 @@ - scm:git:git@github.com:DV8FromTheWorld/JAADec.git - scm:git:git@github.com:DV8FromTheWorld/JAADec.git - scm:git:git@github.com:DV8FromTheWorld/JAADec.git + scm:git:git@github.com:umjammer/JAADec.git + scm:git:git@github.com:umjammer/JAADec.git + scm:git:git@github.com:umjammer/JAADec.git + org.apache.maven.plugins maven-compiler-plugin + 3.10.1 8 8 @@ -49,12 +51,12 @@ + org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.0.0-M7 -Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties - -Dvavi.test=true false always @@ -75,7 +77,7 @@ org.junit junit-bom - 5.8.1 + 5.9.2 pom import @@ -86,8 +88,18 @@ com.github.umjammer vavi-sound - 1.0.12 + 1.0.15 test + + + commons-beanutils + commons-beanutils + + + org.apache.ant + ant + + diff --git a/src/main/java/net/sourceforge/jaad/MP4Info.java b/src/main/java/net/sourceforge/jaad/MP4Info.java index 3a6f4bbb..4e2dbd36 100644 --- a/src/main/java/net/sourceforge/jaad/MP4Info.java +++ b/src/main/java/net/sourceforge/jaad/MP4Info.java @@ -3,94 +3,95 @@ import java.io.RandomAccessFile; import java.util.List; import java.util.Map; + import net.sourceforge.jaad.mp4.MP4Container; +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.api.MetaData; import net.sourceforge.jaad.mp4.api.Movie; import net.sourceforge.jaad.mp4.api.Protection; import net.sourceforge.jaad.mp4.api.Track; import net.sourceforge.jaad.mp4.boxes.Box; + public class MP4Info { - private static final String USAGE = "usage:\nnet.sourceforge.jaad.MP4Info [options] \n\n\t-b\talso print all boxes"; + private static final String USAGE = "usage:\nnet.sourceforge.jaad.MP4Info [options] \n\n\t-b\talso print all boxes"; - public static void main(String[] args) { - try { - if(args.length<1) printUsage(); - else { - boolean boxes = false; - final String file; - if(args.length>1) { - if(args[0].equals("-b")) boxes = true; - else printUsage(); - file = args[1]; - } - else file = args[0]; + public static void main(String[] args) { + try { + if (args.length < 1) printUsage(); + else { + boolean boxes = false; + String file; + if (args.length > 1) { + if (args[0].equals("-b")) boxes = true; + else printUsage(); + file = args[1]; + } else file = args[0]; - final MP4Container cont = new MP4Container(new RandomAccessFile(file, "r")); - final Movie movie = cont.getMovie(); - System.out.println("Movie:"); + MP4Input is = MP4Input.open(new RandomAccessFile(file, "r")); + MP4Container cont = new MP4Container(is); + Movie movie = cont.getMovie(); + System.out.println("Movie:"); - final List tracks = movie.getTracks(); - Track t; - for(int i = 0; i tracks = movie.getTracks(); + Track t; + for (int i = 0; i < tracks.size(); i++) { + t = tracks.get(i); + System.out.println("\tTrack " + i + ": " + t.getCodec() + " (language: " + t.getLanguage() + ", created: " + t.getCreationTime() + ")"); - final Protection p = t.getProtection(); - if(p!=null) System.out.println("\t\tprotection: "+p.getScheme()); - } + Protection p = t.getProtection(); + if (p != null) System.out.println("\t\tprotection: " + p.getScheme()); + } - if(movie.containsMetaData()) { - System.out.println("\tMetadata:"); - final Map, Object> data = movie.getMetaData().getAll(); - for(MetaData.Field key : data.keySet()) { - if(key.equals(MetaData.Field.COVER_ARTWORKS)) { - final List l = (List) data.get(MetaData.Field.COVER_ARTWORKS); - System.out.println("\t\t"+l.size()+" Cover Artworks present"); - } - else System.out.println("\t\t"+key.getName()+" = "+data.get(key)); - } - } + if (movie.containsMetaData()) { + System.out.println("\tMetadata:"); + Map, Object> data = movie.getMetaData().getAll(); + for (MetaData.Field key : data.keySet()) { + if (key.equals(MetaData.Field.COVER_ARTWORKS)) { + List l = (List) data.get(MetaData.Field.COVER_ARTWORKS); + System.out.println("\t\t" + l.size() + " Cover Artworks present"); + } else System.out.println("\t\t" + key.getName() + " = " + data.get(key)); + } + } - final List protections = movie.getProtections(); - if(protections.size()>0) { - System.out.println("\tprotections:"); - for(Protection p : protections) { - System.out.println("\t\t"+p.getScheme()); - } - } + List protections = movie.getProtections(); + if (protections.size() > 0) { + System.out.println("\tprotections:"); + for (Protection p : protections) { + System.out.println("\t\t" + p.getScheme()); + } + } - //print all boxes - if(boxes) { - System.out.println("================================"); - for(Box box : cont.getBoxes()) { - printBox(box, 0); - } - } - } - } - catch(Exception e) { - e.printStackTrace(); - System.err.println("error while reading file: "+e.toString()); - } - } + //print all boxes + if (boxes) { + System.out.println("================================"); + for (Box box : cont.getBoxes()) { + printBox(box, 0); + } + } + } + } catch (Exception e) { + e.printStackTrace(); + System.err.println("error while reading file: " + e); + } + } - private static void printUsage() { - System.out.println(USAGE); - System.exit(1); - } + private static void printUsage() { + System.out.println(USAGE); + System.exit(1); + } - private static void printBox(Box box, int level) { - final StringBuilder sb = new StringBuilder(); - for(int i = 0; i tracks = movie.getTracks(AudioTrack.AudioCodec.AAC); - if(tracks.isEmpty()) throw new Exception("movie does not contain any AAC track"); - final AudioTrack track = (AudioTrack) tracks.get(0); + private static void decodeMP4(String in, String out) throws Exception { + WaveFileWriter wav = null; + try { + MP4Input is = MP4Input.open(new RandomAccessFile(in, "r")); + MP4Container cont = new MP4Container(is); + Movie movie = cont.getMovie(); + List tracks = movie.getTracks(AudioTrack.AudioCodec.AAC); + if (tracks.isEmpty()) throw new Exception("movie does not contain any AAC track"); + AudioTrack track = (AudioTrack) tracks.get(0); - wav = new WaveFileWriter(new File(out), track.getSampleRate(), track.getChannelCount(), track.getSampleSize()); + wav = new WaveFileWriter(new File(out), track.getSampleRate(), track.getChannelCount(), track.getSampleSize()); - final Decoder dec = new Decoder(track.getDecoderSpecificInfo()); + Decoder dec = Decoder.create(track.getDecoderSpecificInfo().getData()); - Frame frame; - final SampleBuffer buf = new SampleBuffer(); - while(track.hasMoreFrames()) { - frame = track.readNextFrame(); - dec.decodeFrame(frame.getData(), buf); - wav.write(buf.getData()); - } - } - finally { - if(wav!=null) wav.close(); - } - } + Frame frame; + SampleBuffer buf = new SampleBuffer(); + while (track.hasMoreFrames()) { + frame = track.readNextFrame(); + dec.decodeFrame(frame.getData(), buf); + wav.write(buf.getData()); + } + } finally { + if (wav != null) wav.close(); + } + } - private static void decodeAAC(String in, String out) throws IOException { - WaveFileWriter wav = null; - try { - final ADTSDemultiplexer adts = new ADTSDemultiplexer(new FileInputStream(in)); - final Decoder dec = new Decoder(adts.getDecoderSpecificInfo()); + private static void decodeAAC(String in, String out) throws IOException { + WaveFileWriter wav = null; + try { + ADTSDemultiplexer adts = new ADTSDemultiplexer(Files.newInputStream(Paths.get(in))); + Decoder dec = Decoder.create(adts.getDecoderInfo()); - final SampleBuffer buf = new SampleBuffer(); - byte[] b; - while(true) { - b = adts.readNextFrame(); - dec.decodeFrame(b, buf); + SampleBuffer buf = new SampleBuffer(); + byte[] b; + while (true) { + b = adts.readNextFrame(); + dec.decodeFrame(b, buf); - if(wav==null) wav = new WaveFileWriter(new File(out), buf.getSampleRate(), buf.getChannels(), buf.getBitsPerSample()); - wav.write(buf.getData()); - } - } - finally { - if(wav!=null) wav.close(); - } - } + if (wav == null) + wav = new WaveFileWriter(new File(out), buf.getSampleRate(), buf.getChannels(), buf.getBitsPerSample()); + wav.write(buf.getData()); + } + } finally { + if (wav != null) wav.close(); + } + } } diff --git a/src/main/java/net/sourceforge/jaad/Play.java b/src/main/java/net/sourceforge/jaad/Play.java index 62d24f38..743001bc 100644 --- a/src/main/java/net/sourceforge/jaad/Play.java +++ b/src/main/java/net/sourceforge/jaad/Play.java @@ -1,117 +1,132 @@ package net.sourceforge.jaad; -import net.sourceforge.jaad.aac.AACException; -import net.sourceforge.jaad.aac.Decoder; -import net.sourceforge.jaad.aac.SampleBuffer; -import net.sourceforge.jaad.adts.ADTSDemultiplexer; -import net.sourceforge.jaad.mp4.MP4Container; -import net.sourceforge.jaad.mp4.api.*; -import java.io.FileInputStream; +import java.io.InputStream; import java.io.RandomAccessFile; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.List; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.SourceDataLine; +import net.sourceforge.jaad.aac.AACException; +import net.sourceforge.jaad.aac.Decoder; +import net.sourceforge.jaad.aac.DecoderConfig; +import net.sourceforge.jaad.adts.ADTSDemultiplexer; +import net.sourceforge.jaad.mp4.MP4Container; +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.api.AudioTrack; +import net.sourceforge.jaad.mp4.api.Frame; +import net.sourceforge.jaad.mp4.api.Movie; +import net.sourceforge.jaad.mp4.api.Track; + + /** * Command line example, that can decode an AAC file and play it. + * * @author in-somnia */ public class Play { - private static final String USAGE = "usage:\nnet.sourceforge.jaad.Play [-mp4] \n\n\t-mp4\tinput file is in MP4 container format"; - - public static void main(String[] args) { - try { - if(args.length<1) printUsage(); - if(args[0].equals("-mp4")) { - if(args.length<2) printUsage(); - else decodeMP4(args[1]); - } - else decodeAAC(args[0]); - } - catch(Exception e) { - e.printStackTrace(); - System.err.println("error while decoding: "+e.toString()); - } - } - - private static void printUsage() { - System.out.println(USAGE); - System.exit(1); - } - - private static void decodeMP4(String in) throws Exception { - SourceDataLine line = null; - byte[] b; - try { - //create container - final MP4Container cont = new MP4Container(new RandomAccessFile(in, "r")); - final Movie movie = cont.getMovie(); - //find AAC track - final List tracks = movie.getTracks(AudioTrack.AudioCodec.AAC); - if(tracks.isEmpty()) throw new Exception("movie does not contain any AAC track"); - final AudioTrack track = (AudioTrack) tracks.get(0); - - //create audio format - final AudioFormat aufmt = new AudioFormat(track.getSampleRate(), track.getSampleSize(), track.getChannelCount(), true, true); - line = AudioSystem.getSourceDataLine(aufmt); - line.open(); - line.start(); - - //create AAC decoder - final Decoder dec = new Decoder(track.getDecoderSpecificInfo()); - - //decode - Frame frame; - final SampleBuffer buf = new SampleBuffer(); - while(track.hasMoreFrames()) { - frame = track.readNextFrame(); - try { - dec.decodeFrame(frame.getData(), buf); - b = buf.getData(); - line.write(b, 0, b.length); - } - catch(AACException e) { - e.printStackTrace(); - //since the frames are separate, decoding can continue if one fails - } - } - } - finally { - if(line!=null) { - line.stop(); - line.close(); - } - } - } - - private static void decodeAAC(String in) throws Exception { - SourceDataLine line = null; - byte[] b; - try { - final ADTSDemultiplexer adts = new ADTSDemultiplexer(new FileInputStream(in)); - final Decoder dec = new Decoder(adts.getDecoderSpecificInfo()); - final SampleBuffer buf = new SampleBuffer(); - while(true) { - b = adts.readNextFrame(); - dec.decodeFrame(b, buf); - - if(line==null) { - final AudioFormat aufmt = new AudioFormat(buf.getSampleRate(), buf.getBitsPerSample(), buf.getChannels(), true, true); - line = AudioSystem.getSourceDataLine(aufmt); - line.open(); - line.start(); - } - b = buf.getData(); - line.write(b, 0, b.length); - } - } - finally { - if(line!=null) { - line.stop(); - line.close(); - } - } - } + private static final String USAGE = "usage:\nnet.sourceforge.jaad.Play [-mp4] \n\n\t-mp4\tinput file is in MP4 container format"; + + public static void main(String[] args) { + try { + if (args.length < 1) printUsage(); + if (args[0].equals("-mp4")) { + if (args.length < 2) printUsage(); + else decodeMP4(args[1]); + } else decodeAAC(args[0]); + } catch (Exception e) { + e.printStackTrace(); + System.err.println("error while decoding: " + e); + } + } + + private static void printUsage() { + System.out.println(USAGE); + System.exit(1); + } + + private static void decodeMP4(String in) throws Exception { + if (in.startsWith("http:")) + decodeMP4(new URL(in).openStream()); + else + decodeMP4(new RandomAccessFile(in, "r")); + } + + private static void decodeMP4(InputStream in) throws Exception { + decodeMP4(MP4Input.open(in)); + } + + private static void decodeMP4(RandomAccessFile in) throws Exception { + decodeMP4(MP4Input.open(in)); + } + + private static void decodeMP4(MP4Input in) throws Exception { + + // create container + MP4Container cont = new MP4Container(in); + Movie movie = cont.getMovie(); + // find AAC track + List tracks = movie.getTracks(AudioTrack.AudioCodec.AAC); + if (tracks.isEmpty()) throw new Exception("movie does not contain any AAC track"); + AudioTrack track = (AudioTrack) tracks.get(0); + + // create AAC decoder + Decoder dec = Decoder.create(track.getDecoderSpecificInfo().getData()); + + // create audio format + DecoderConfig conf = dec.getConfig(); + AudioFormat aufmt = new AudioFormat(conf.getOutputFrequency().getFrequency(), 16, conf.getChannelCount(), true, true); + + try (SourceDataLine line = AudioSystem.getSourceDataLine(aufmt)) { + line.open(); + line.start(); + + // decode + SampleBuffer buf = new SampleBuffer(aufmt); + while (track.hasMoreFrames()) { + Frame frame = track.readNextFrame(); + + try { + dec.decodeFrame(frame.getData(), buf); + byte[] b = buf.getData(); + line.write(b, 0, b.length); + } catch (AACException e) { + e.printStackTrace(); + // since the frames are separate, decoding can continue if one fails + } + } + line.drain(); + } + } + + private static void decodeAAC(String in) throws Exception { + if (in.startsWith("http:")) + decodeAAC(new URL(in).openStream()); + else + decodeAAC(Files.newInputStream(Paths.get(in))); + } + + private static void decodeAAC(InputStream in) throws Exception { + + ADTSDemultiplexer adts = new ADTSDemultiplexer(in); + Decoder dec = Decoder.create(adts.getDecoderInfo()); + AudioFormat aufmt = dec.getAudioFormat(); + SampleBuffer buf = new SampleBuffer(aufmt); + + try (SourceDataLine line = AudioSystem.getSourceDataLine(aufmt)) { + line.open(); + line.start(); + + while (true) { + byte[] b = adts.readNextFrame(); + dec.decodeFrame(b, buf); + b = buf.getData(); + line.write(b, 0, b.length); + } + } + } } diff --git a/src/main/java/net/sourceforge/jaad/Radio.java b/src/main/java/net/sourceforge/jaad/Radio.java index fdf1ad99..94865c88 100644 --- a/src/main/java/net/sourceforge/jaad/Radio.java +++ b/src/main/java/net/sourceforge/jaad/Radio.java @@ -7,98 +7,101 @@ import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.SourceDataLine; + import net.sourceforge.jaad.aac.Decoder; -import net.sourceforge.jaad.aac.SampleBuffer; import net.sourceforge.jaad.adts.ADTSDemultiplexer; + /** - * Command line example, that can decode an AAC stream from an Shoutcast/Icecast + * Command line example, that can decode an AAC stream from a Shoutcast/Icecast * server. * * @author in-somnia */ public class Radio { - private static final String USAGE = "usage:\nnet.sourceforge.jaad.Radio "; + private static final String USAGE = "usage:\nnet.sourceforge.jaad.Radio "; - public static void main(String[] args) { - try { - if(args.length<1) printUsage(); - else decode(args[0]); - } - catch(Exception e) { - e.printStackTrace(); - System.err.println("error while decoding: "+e.toString()); - } - } + public static void main(String[] args) { + try { + if (args.length < 1) + printUsage(); + else + decode(args[0]); + } catch (Exception e) { + e.printStackTrace(); + System.err.println("error while decoding: " + e); + } + } - private static void printUsage() { - System.out.println(USAGE); - System.exit(1); - } + private static void printUsage() { + System.out.println(USAGE); + System.exit(1); + } - private static void decode(String arg) throws Exception { - final SampleBuffer buf = new SampleBuffer(); + private static void decode(String arg) throws Exception { + SampleBuffer buf = new SampleBuffer(); - SourceDataLine line = null; - byte[] b; - try { - final URI uri = new URI(arg); - final Socket sock = new Socket(uri.getHost(), uri.getPort()>0 ? uri.getPort() : 80); + SourceDataLine line = null; + byte[] b; + try { + URI uri = new URI(arg); + Socket sock = new Socket(uri.getHost(), uri.getPort() > 0 ? uri.getPort() : 80); - //send HTTP request - final PrintStream out = new PrintStream(sock.getOutputStream()); - String path = uri.getPath(); - if(path==null||path.equals("")) path = "/"; - if(uri.getQuery()!=null) path += "?"+uri.getQuery(); - out.println("GET "+path+" HTTP/1.1"); - out.println("Host: "+uri.getHost()); - out.println(); + // send HTTP request + PrintStream out = new PrintStream(sock.getOutputStream()); + String path = uri.getPath(); + if (path == null || path.equals("")) + path = "/"; + if (uri.getQuery() != null) + path += "?" + uri.getQuery(); + out.println("GET " + path + " HTTP/1.1"); + out.println("Host: " + uri.getHost()); + out.println(); - //read response (skip header) - final DataInputStream in = new DataInputStream(sock.getInputStream()); - String x; - do { - x = in.readLine(); - } - while(x!=null&&!x.trim().equals("")); + // read response (skip header) + DataInputStream in = new DataInputStream(sock.getInputStream()); + String x; + do { + x = in.readLine(); + } + while (x != null && !x.trim().equals("")); - final ADTSDemultiplexer adts = new ADTSDemultiplexer(in); - AudioFormat aufmt = new AudioFormat(adts.getSampleFrequency(), 16, adts.getChannelCount(), true, true); - final Decoder dec = new Decoder(adts.getDecoderSpecificInfo()); + ADTSDemultiplexer adts = new ADTSDemultiplexer(in); + AudioFormat aufmt = new AudioFormat(adts.getSampleFrequency(), 16, adts.getChannelCount(), true, true); + Decoder dec = Decoder.create(adts.getDecoderInfo()); - while(true) { - b = adts.readNextFrame(); - dec.decodeFrame(b, buf); + while (true) { + b = adts.readNextFrame(); + dec.decodeFrame(b, buf); - if(line!=null&&formatChanged(line.getFormat(), buf)) { - //format has changed (e.g. SBR has started) - line.stop(); - line.close(); - line = null; - aufmt = new AudioFormat(buf.getSampleRate(), buf.getBitsPerSample(), buf.getChannels(), true, true); - } - if(line==null) { - line = AudioSystem.getSourceDataLine(aufmt); - line.open(); - line.start(); - } - b = buf.getData(); - line.write(b, 0, b.length); - } - } - finally { - if(line!=null) { - line.stop(); - line.close(); - } - } - } + if (line != null && formatChanged(line.getFormat(), buf)) { + // format has changed (e.g. SBR has started) + line.stop(); + line.close(); + line = null; + aufmt = new AudioFormat(buf.getSampleRate(), buf.getBitsPerSample(), buf.getChannels(), true, true); + } + if (line == null) { + line = AudioSystem.getSourceDataLine(aufmt); + line.open(); + line.start(); + } + b = buf.getData(); + line.write(b, 0, b.length); + } + } finally { + if (line != null) { + line.stop(); + line.close(); + } + } + } - private static boolean formatChanged(AudioFormat af, SampleBuffer buf) { - return af.getSampleRate()!=buf.getSampleRate() - ||af.getChannels()!=buf.getChannels() - ||af.getSampleSizeInBits()!=buf.getBitsPerSample() - ||af.isBigEndian()!=buf.isBigEndian(); - } + private static boolean formatChanged(AudioFormat af, SampleBuffer buf) { + return af.getSampleRate() != buf.getSampleRate() + || af.getChannels() != buf.getChannels() + || af.getSampleSizeInBits() != buf.getBitsPerSample() + || af.isBigEndian() != buf.isBigEndian(); + } } diff --git a/src/main/java/net/sourceforge/jaad/SampleBuffer.java b/src/main/java/net/sourceforge/jaad/SampleBuffer.java new file mode 100644 index 00000000..d08feb80 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/SampleBuffer.java @@ -0,0 +1,169 @@ +package net.sourceforge.jaad; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.List; +import javax.sound.sampled.AudioFormat; + +import net.sourceforge.jaad.aac.Receiver; + + +/** + * The SampleBuffer holds the decoded AAC frame. It contains the raw PCM data + * and its format. + * + * @author in-somnia + */ +public class SampleBuffer implements Receiver { + + private int sampleRate, channels, bitsPerSample; + private double length, bitrate; + private byte[] data; + private boolean bigEndian; + + public SampleBuffer() { + data = new byte[0]; + sampleRate = 0; + channels = 0; + bitsPerSample = 0; + bigEndian = true; + } + + public SampleBuffer(AudioFormat af) { + data = new byte[0]; + sampleRate = (int) af.getSampleRate(); + channels = af.getChannels(); + bitsPerSample = af.getSampleSizeInBits(); + bigEndian = af.isBigEndian(); + } + + /** + * Returns the buffer's PCM data. + * + * @return the audio data + */ + public byte[] getData() { + return data; + } + + /** + * Returns the data's sample rate. + * + * @return the sample rate + */ + public int getSampleRate() { + return sampleRate; + } + + /** + * Returns the number of channels stored in the data buffer. + * + * @return the number of channels + */ + public int getChannels() { + return channels; + } + + /** + * Returns the number of bits per sample. Usually this is 16, meaning a + * sample is stored in two bytes. + * + * @return the number of bits per sample + */ + public int getBitsPerSample() { + return bitsPerSample; + } + + /** + * Returns the length of the current frame in seconds. + * length = samplesPerChannel / sampleRate + * + * @return the length in seconds + */ + public double getLength() { + return length; + } + + /** + * Returns the bitrate of the decoded PCM data. + * bitrate = (samplesPerChannel * bitsPerSample) / length + * + * @return the bitrate + */ + public double getBitrate() { + return bitrate; + } + + /** + * Indicates the endianness for the data. + * + * @return true if the data is in big endian, false if it is in little endian + */ + public boolean isBigEndian() { + return bigEndian; + } + + /** + * Sets the endianness for the data. + * + * @param bigEndian if true the data will be in big endian, else in little + * endian + */ + public void setBigEndian(boolean bigEndian) { + if (bigEndian != this.bigEndian) { + byte tmp; + for (int i = 0; i < data.length; i += 2) { + tmp = data[i]; + data[i] = data[i + 1]; + data[i + 1] = tmp; + } + this.bigEndian = bigEndian; + } + } + + public void setData(byte[] data, int sampleRate, int channels, int bitsPerSample, int bitsRead) { + this.data = data; + this.sampleRate = sampleRate; + this.channels = channels; + this.bitsPerSample = bitsPerSample; + + if (sampleRate == 0) { + length = 0; + bitrate = 0; + } else { + int bytesPerSample = bitsPerSample / 8; //usually 2 + int samplesPerChannel = data.length / (bytesPerSample * channels); //=1024 + length = (double) samplesPerChannel / (double) sampleRate; + bitrate = (double) (samplesPerChannel * bitsPerSample * channels) / length; + } + } + + @Override + public void accept(List samples, int sampleLength, int sampleRate) { + + this.sampleRate = sampleRate; + this.channels = samples.size(); + this.bitsPerSample = Short.SIZE; + + int bytes = samples.size() * Short.BYTES * sampleLength; + if (data == null || data.length != bytes) + data = new byte[bytes]; + + this.length = (double) sampleLength / sampleRate; + this.bitrate = (double) sampleLength * bitsPerSample * channels / bytes; + + ByteBuffer bb = ByteBuffer.wrap(data); + bb.order(bigEndian ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); + + for (int is = 0; is < sampleLength; ++is) { + for (float[] sample : samples) { + int k = sample.length * is / sampleLength; + float s = sample[k]; + int pulse = Math.round(s); + pulse = Math.min(pulse, Short.MAX_VALUE); + pulse = Math.max(pulse, Short.MIN_VALUE); + bb.putShort((short) pulse); + } + } + } +} \ No newline at end of file diff --git a/src/main/java/net/sourceforge/jaad/aac/AACException.java b/src/main/java/net/sourceforge/jaad/aac/AACException.java index a8f29fd1..83993551 100644 --- a/src/main/java/net/sourceforge/jaad/aac/AACException.java +++ b/src/main/java/net/sourceforge/jaad/aac/AACException.java @@ -1,31 +1,18 @@ package net.sourceforge.jaad.aac; -import java.io.IOException; - /** * Standard exception, thrown when decoding of an AAC frame fails. * The message gives more detailed information about the error. + * * @author in-somnia */ -public class AACException extends IOException { - - private final boolean eos; - - public AACException(String message) { - this(message, false); - } - - public AACException(String message, boolean eos) { - super(message); - this.eos = eos; - } +public class AACException extends RuntimeException { - public AACException(Throwable cause) { - super(cause); - eos = false; - } + public AACException(String message) { + super(message); + } - boolean isEndOfStream() { - return eos; - } + public AACException(Throwable cause) { + super(cause); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/AudioDecoderInfo.java b/src/main/java/net/sourceforge/jaad/aac/AudioDecoderInfo.java new file mode 100644 index 00000000..5b8f7ba4 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/AudioDecoderInfo.java @@ -0,0 +1,16 @@ +package net.sourceforge.jaad.aac; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 24.03.18 + * Time: 15:21 + */ +public interface AudioDecoderInfo { + + Profile getProfile(); + + SampleFrequency getSampleFrequency(); + + ChannelConfiguration getChannelConfiguration(); +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ChannelConfiguration.java b/src/main/java/net/sourceforge/jaad/aac/ChannelConfiguration.java index a91a9d59..e0d18191 100644 --- a/src/main/java/net/sourceforge/jaad/aac/ChannelConfiguration.java +++ b/src/main/java/net/sourceforge/jaad/aac/ChannelConfiguration.java @@ -1,85 +1,106 @@ package net.sourceforge.jaad.aac; +import java.util.List; + +import net.sourceforge.jaad.aac.tools.Utils; + +import static net.sourceforge.jaad.aac.Speaker.BC; +import static net.sourceforge.jaad.aac.Speaker.BL; +import static net.sourceforge.jaad.aac.Speaker.BR; +import static net.sourceforge.jaad.aac.Speaker.FC; +import static net.sourceforge.jaad.aac.Speaker.FL; +import static net.sourceforge.jaad.aac.Speaker.FLC; +import static net.sourceforge.jaad.aac.Speaker.FR; +import static net.sourceforge.jaad.aac.Speaker.FRC; +import static net.sourceforge.jaad.aac.Speaker.LFE; + + /** * All possible channel configurations for AAC. + * * @author in-somnia */ public enum ChannelConfiguration { - CHANNEL_CONFIG_UNSUPPORTED(-1, "invalid"), - CHANNEL_CONFIG_NONE(0, "No channel"), - CHANNEL_CONFIG_MONO(1, "Mono"), - CHANNEL_CONFIG_STEREO(2, "Stereo"), - CHANNEL_CONFIG_STEREO_PLUS_CENTER(3, "Stereo+Center"), - CHANNEL_CONFIG_STEREO_PLUS_CENTER_PLUS_REAR_MONO(4, "Stereo+Center+Rear"), - CHANNEL_CONFIG_FIVE(5, "Five channels"), - CHANNEL_CONFIG_FIVE_PLUS_ONE(6, "Five channels+LF"), - CHANNEL_CONFIG_SEVEN_PLUS_ONE(8, "Seven channels+LF"); - - public static ChannelConfiguration forInt(int i) { - ChannelConfiguration c; - switch(i) { - case 0: - c = CHANNEL_CONFIG_NONE; - break; - case 1: - c = CHANNEL_CONFIG_MONO; - break; - case 2: - c = CHANNEL_CONFIG_STEREO; - break; - case 3: - c = CHANNEL_CONFIG_STEREO_PLUS_CENTER; - break; - case 4: - c = CHANNEL_CONFIG_STEREO_PLUS_CENTER_PLUS_REAR_MONO; - break; - case 5: - c = CHANNEL_CONFIG_FIVE; - break; - case 6: - c = CHANNEL_CONFIG_FIVE_PLUS_ONE; - break; - case 7: - case 8: - c = CHANNEL_CONFIG_SEVEN_PLUS_ONE; - break; - default: - c = CHANNEL_CONFIG_UNSUPPORTED; - break; - } - return c; - } - private final int chCount; - private final String descr; - - private ChannelConfiguration(int chCount, String descr) { - this.chCount = chCount; - this.descr = descr; - } - - /** - * Returns the number of channels in this configuration. - */ - public int getChannelCount() { - return chCount; - } - - /** - * Returns a short description of this configuration. - * @return the channel configuration's description - */ - public String getDescription() { - return descr; - } - - /** - * Returns a string representation of this channel configuration. - * The method is identical to getDescription(). - * @return the channel configuration's description - */ - @Override - public String toString() { - return descr; - } + NONE("No channel"), + MONO("Mono", FC), + STEREO("Stereo", FL, FR), + STEREO_PLUS_CENTER("Stereo+Center", FC, FL, FR), + STEREO_PLUS_CENTER_PLUS_REAR_MONO("Stereo+Center+Rear", FC, FL, FR, BC), + FIVE("Five channels", FC, FL, FR, BL, BR), + FIVE_PLUS_ONE("Five channels+LF", FC, FL, FR, BL, BR, LFE), + INVALID_SEVEN("Seven channels (invalid)", (Speaker) null), + SEVEN_PLUS_ONE("Seven channels+LF", FC, FL, FR, BL, BR, FLC, FRC, LFE); + + static final ChannelConfiguration CHANNEL_CONFIG_UNSUPPORTED = null; + + static final List CONFIGURATIONS = Utils.listOf(values()); + + public static ChannelConfiguration forInt(int i) { + // 7 -> 8 + // 8 -> 9 -> error + if (i >= 7) + ++i; + + return CONFIGURATIONS.get(i); + } + + public static ChannelConfiguration forChannelCount(int n) { + if (n == 7) + throw new AACException("invalid channel configuration: 8"); + + return CONFIGURATIONS.get(n); + } + + private final String descr; + + private final List speakers; + + ChannelConfiguration(String descr) { + this.descr = descr; + this.speakers = Utils.listOf(); + } + + ChannelConfiguration(String descr, Speaker... speakes) { + this.descr = descr; + this.speakers = Utils.listOf(speakes); + if (speakers.size() != ordinal()) + throw new IllegalArgumentException("invalid speaker count"); + } + + ChannelConfiguration(String descr, Speaker speaker) { + this.descr = descr; + this.speakers = speaker == null ? null : Utils.listOf(speaker); + } + + /** + * Returns the number of channels in this configuration. + */ + public int getChannelCount() { + return ordinal(); + } + + public List getSpeakers() { + return speakers; + } + + /** + * Returns a short description of this configuration. + * + * @return the channel configuration's description + */ + public String getDescription() { + return descr; + } + + /** + * Returns a string representation of this channel configuration. + * The method is identical to getDescription(). + * + * @return the channel configuration's description + */ + @Override + public String toString() { + return descr; + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/Decoder.java b/src/main/java/net/sourceforge/jaad/aac/Decoder.java index 577dafb0..bac68b19 100644 --- a/src/main/java/net/sourceforge/jaad/aac/Decoder.java +++ b/src/main/java/net/sourceforge/jaad/aac/Decoder.java @@ -1,124 +1,140 @@ package net.sourceforge.jaad.aac; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.sound.sampled.AudioFormat; + +import net.sourceforge.jaad.SampleBuffer; import net.sourceforge.jaad.aac.syntax.BitStream; -import net.sourceforge.jaad.aac.syntax.Constants; import net.sourceforge.jaad.aac.syntax.PCE; import net.sourceforge.jaad.aac.syntax.SyntacticElements; -import net.sourceforge.jaad.aac.filterbank.FilterBank; import net.sourceforge.jaad.aac.transport.ADIFHeader; -import java.util.logging.ConsoleHandler; -import java.util.logging.Handler; -import java.util.logging.Level; + /** * Main AAC decoder class + * * @author in-somnia */ -public class Decoder implements Constants { - - static { - if (System.getProperty("java.util.logging.config.file", "").isEmpty()) { - for(Handler h : LOGGER.getHandlers()) { - LOGGER.removeHandler(h); - } - LOGGER.setLevel(Level.WARNING); - - final ConsoleHandler h = new ConsoleHandler(); - h.setLevel(Level.ALL); - LOGGER.addHandler(h); +public class Decoder { + + static final Logger LOGGER = Logger.getLogger(Decoder.class.getName()); + + private final DecoderConfig config; + private final SyntacticElements syntacticElements; + public int frames=0; + private ADIFHeader adifHeader; + + /** + * The methods returns true, if a profile is supported by the decoder. + * + * @param profile an AAC profile + * @return true if the specified profile can be decoded + * @see Profile#isDecodingSupported() + */ + public static boolean canDecode(Profile profile) { + return profile.isDecodingSupported(); + } + + public static Decoder create(byte[] data) { + return create(BitStream.open(data)); + } + + public static Decoder create(BitStream in) { + DecoderConfig config = new DecoderConfig().decode(in); + return create(config); + } + + public static Decoder create(AudioDecoderInfo info) { + DecoderConfig config = DecoderConfig.create(info); + return create(config); + } + + public static Decoder create(DecoderConfig config) { + if(config==null) + throw new IllegalArgumentException("illegal MP4 decoder specific info"); + return new Decoder(config); + } + + /** + * Initializes the decoder with a MP4 decoder specific info. + *

+ * After this the MP4 frames can be passed to the + * decodeFrame(byte[], SampleBuffer) method to decode them. + * + * @param config decoder specific info from an MP4 container + * @throws AACException if the specified profile is not supported + */ + public Decoder(DecoderConfig config) { +// config = DecoderConfig.parseMP4DecoderSpecificInfo(decoderSpecificInfo); + + this.config = config; + + syntacticElements = new SyntacticElements(config); + + LOGGER.log(Level.FINE, "profile: {0}", config.getProfile()); + LOGGER.log(Level.FINE, "sf: {0}", config.getSampleFrequency().getFrequency()); + LOGGER.log(Level.FINE, "channels: {0}", config.getChannelConfiguration().getDescription()); + } + + public DecoderConfig getConfig() { + return config; + } + + /** + * Decodes one frame of AAC data in frame mode and returns the raw PCM + * data. + * + * @param frame the AAC frame + * @param buffer a buffer to hold the decoded PCM data + * @throws AACException if decoding fails + */ + public void decodeFrame(byte[] frame, SampleBuffer buffer) throws AACException { + + BitStream in = BitStream.open(frame); + + try { + LOGGER.log(Level.FINE, () -> String.format("frame %d @%d", frames, 8 * frame.length)); + decode(in, buffer); + LOGGER.log(Level.FINEST, () -> String.format("left %d", in.getBitsLeft())); + } catch (EOSException e) { + LOGGER.log(Level.WARNING,"unexpected end of frame",e); + } finally { + ++frames; } - } - private final DecoderConfig config; - private final SyntacticElements syntacticElements; - private final FilterBank filterBank; - private BitStream in; - private ADIFHeader adifHeader; - - /** - * The methods returns true, if a profile is supported by the decoder. - * @param profile an AAC profile - * @return true if the specified profile can be decoded - * @see Profile#isDecodingSupported() - */ - public static boolean canDecode(Profile profile) { - return profile.isDecodingSupported(); - } - - /** - * Initializes the decoder with a MP4 decoder specific info. - * - * After this the MP4 frames can be passed to the - * decodeFrame(byte[], SampleBuffer) method to decode them. - * - * @param decoderSpecificInfo a byte array containing the decoder specific info from an MP4 container - * @throws AACException if the specified profile is not supported - */ - public Decoder(byte[] decoderSpecificInfo) throws AACException { - config = DecoderConfig.parseMP4DecoderSpecificInfo(decoderSpecificInfo); - if(config==null) throw new IllegalArgumentException("illegal MP4 decoder specific info"); - - if(!canDecode(config.getProfile())) throw new AACException("unsupported profile: "+config.getProfile().getDescription()); - - syntacticElements = new SyntacticElements(config); - filterBank = new FilterBank(config.isSmallFrameUsed(), config.getChannelConfiguration().getChannelCount()); - - in = new BitStream(); - - LOGGER.log(Level.FINE, "profile: {0}", config.getProfile()); - LOGGER.log(Level.FINE, "sf: {0}", config.getSampleFrequency().getFrequency()); - LOGGER.log(Level.FINE, "channels: {0}", config.getChannelConfiguration().getDescription()); - } - - public DecoderConfig getConfig() { - return config; - } - - /** - * Decodes one frame of AAC data in frame mode and returns the raw PCM - * data. - * @param frame the AAC frame - * @param buffer a buffer to hold the decoded PCM data - * @throws AACException if decoding fails - */ - public void decodeFrame(byte[] frame, SampleBuffer buffer) throws AACException { - if(frame!=null) in.setData(frame); - try { - decode(buffer); - } - catch(AACException e) { - if(!e.isEndOfStream()) throw e; - else LOGGER.log(Level.WARNING,"unexpected end of frame",e); - } - } - - private void decode(SampleBuffer buffer) throws AACException { - if(ADIFHeader.isPresent(in)) { - adifHeader = ADIFHeader.readHeader(in); - final PCE pce = adifHeader.getFirstPCE(); - config.setProfile(pce.getProfile()); - config.setSampleFrequency(pce.getSampleFrequency()); - config.setChannelConfiguration(ChannelConfiguration.forInt(pce.getChannelCount())); - } - - if(!canDecode(config.getProfile())) throw new AACException("unsupported profile: "+config.getProfile().getDescription()); - - syntacticElements.startNewFrame(); - - try { - //1: bitstream parsing and noiseless coding - syntacticElements.decode(in); - //2: spectral processing - syntacticElements.process(filterBank); - //3: send to output buffer - syntacticElements.sendToOutput(buffer); - } - catch(AACException e) { - buffer.setData(new byte[0], 0, 0, 0, 0); - throw e; - } - catch(Exception e) { - buffer.setData(new byte[0], 0, 0, 0, 0); - throw new AACException(e); - } - } + } + + private void decode(BitStream in, SampleBuffer buffer) throws AACException { + if (ADIFHeader.isPresent(in)) { + adifHeader = ADIFHeader.readHeader(in); + PCE pce = adifHeader.getFirstPCE(); + config.setProfile(pce.getProfile()); + } + + if (!canDecode(config.getProfile())) + throw new AACException("unsupported profile: " + config.getProfile().getDescription()); + + syntacticElements.startNewFrame(); + + // 1: bitstream parsing and noiseless coding + syntacticElements.decode(in); + // 2: spectral processing + List channels = syntacticElements.process(); + // 3: send to output buffer + buffer.accept(channels, config.getSampleLength(), config.getOutputFrequency().getFrequency()); + } + + public AudioFormat getAudioFormat() { + + int freq = config.getSampleFrequency().getFrequency(); + + // assume SBR/PS + if (!config.getProfile().isErrorResilientProfile() + && config.getChannelConfiguration() == ChannelConfiguration.MONO + && freq < 24000) + freq *= 2; + + return new AudioFormat(freq, 16, config.getChannelCount(), true, false); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/DecoderConfig.java b/src/main/java/net/sourceforge/jaad/aac/DecoderConfig.java index aa2ba019..54d57a88 100644 --- a/src/main/java/net/sourceforge/jaad/aac/DecoderConfig.java +++ b/src/main/java/net/sourceforge/jaad/aac/DecoderConfig.java @@ -1,9 +1,15 @@ package net.sourceforge.jaad.aac; +import net.sourceforge.jaad.aac.filterbank.FilterBank; +import net.sourceforge.jaad.aac.ps.PSImpl; +import net.sourceforge.jaad.aac.sbr.PS; +import net.sourceforge.jaad.aac.sbr.SBR; import net.sourceforge.jaad.aac.syntax.BitStream; -import net.sourceforge.jaad.aac.syntax.Constants; import net.sourceforge.jaad.aac.syntax.PCE; +import static net.sourceforge.jaad.aac.SampleFrequency.SF_NONE; + + /** * DecoderConfig that must be passed to the * Decoder constructor. Typically it is created via one of the @@ -11,230 +17,294 @@ * * @author in-somnia */ -public class DecoderConfig implements Constants { - - private Profile profile, extProfile; - private SampleFrequency sampleFrequency; - private ChannelConfiguration channelConfiguration; - private boolean frameLengthFlag; - private boolean dependsOnCoreCoder; - private int coreCoderDelay; - private boolean extensionFlag; - //extension: SBR - private boolean sbrPresent, downSampledSBR, sbrEnabled; - //extension: error resilience - private boolean sectionDataResilience, scalefactorResilience, spectralDataResilience; - - private DecoderConfig() { - profile = Profile.AAC_MAIN; - extProfile = Profile.UNKNOWN; - sampleFrequency = SampleFrequency.SAMPLE_FREQUENCY_NONE; - channelConfiguration = ChannelConfiguration.CHANNEL_CONFIG_UNSUPPORTED; - frameLengthFlag = false; - sbrPresent = false; - downSampledSBR = false; - sbrEnabled = true; - sectionDataResilience = false; - scalefactorResilience = false; - spectralDataResilience = false; - } - - /* ========== gets/sets ========== */ - public ChannelConfiguration getChannelConfiguration() { - return channelConfiguration; - } - - public void setChannelConfiguration(ChannelConfiguration channelConfiguration) { - this.channelConfiguration = channelConfiguration; - } - - public int getCoreCoderDelay() { - return coreCoderDelay; - } - - public void setCoreCoderDelay(int coreCoderDelay) { - this.coreCoderDelay = coreCoderDelay; - } - - public boolean isDependsOnCoreCoder() { - return dependsOnCoreCoder; - } - - public void setDependsOnCoreCoder(boolean dependsOnCoreCoder) { - this.dependsOnCoreCoder = dependsOnCoreCoder; - } - - public Profile getExtObjectType() { - return extProfile; - } - - public void setExtObjectType(Profile extObjectType) { - this.extProfile = extObjectType; - } - - public int getFrameLength() { - return frameLengthFlag ? WINDOW_SMALL_LEN_LONG : WINDOW_LEN_LONG; - } - - public boolean isSmallFrameUsed() { - return frameLengthFlag; - } - - public void setSmallFrameUsed(boolean shortFrame) { - this.frameLengthFlag = shortFrame; - } - - public Profile getProfile() { - return profile; - } - - public void setProfile(Profile profile) { - this.profile = profile; - } - - public SampleFrequency getSampleFrequency() { - return sampleFrequency; - } - - public void setSampleFrequency(SampleFrequency sampleFrequency) { - this.sampleFrequency = sampleFrequency; - } - - //=========== SBR ============= - public boolean isSBRPresent() { - return sbrPresent; - } - - public boolean isSBRDownSampled() { - return downSampledSBR; - } - - public boolean isSBREnabled() { - return sbrEnabled; - } - - public void setSBREnabled(boolean enabled) { - sbrEnabled = enabled; - } - - //=========== ER ============= - public boolean isScalefactorResilienceUsed() { - return scalefactorResilience; - } - - public boolean isSectionDataResilienceUsed() { - return sectionDataResilience; - } - - public boolean isSpectralDataResilienceUsed() { - return spectralDataResilience; - } - - /* ======== static builder ========= */ - /** - * Parses the input arrays as a DecoderSpecificInfo, as used in MP4 - * containers. - * - * @return a DecoderConfig - */ - static DecoderConfig parseMP4DecoderSpecificInfo(byte[] data) throws AACException { - final BitStream in = new BitStream(data); - final DecoderConfig config = new DecoderConfig(); - - try { - config.profile = readProfile(in); - - int sf = in.readBits(4); - if(sf==0xF) config.sampleFrequency = SampleFrequency.forFrequency(in.readBits(24)); - else config.sampleFrequency = SampleFrequency.forInt(sf); - config.channelConfiguration = ChannelConfiguration.forInt(in.readBits(4)); - - switch(config.profile) { - case AAC_SBR: - config.extProfile = config.profile; - config.sbrPresent = true; - sf = in.readBits(4); - //TODO: 24 bits already read; read again? - //if(sf==0xF) config.sampleFrequency = SampleFrequency.forFrequency(in.readBits(24)); - //if sample frequencies are the same: downsample SBR - config.downSampledSBR = config.sampleFrequency.getIndex()==sf; - config.sampleFrequency = SampleFrequency.forInt(sf); - config.profile = readProfile(in); - break; - case AAC_MAIN: - case AAC_LC: - case AAC_SSR: - case AAC_LTP: - case ER_AAC_LC: - case ER_AAC_LTP: - case ER_AAC_LD: - //ga-specific info: - config.frameLengthFlag = in.readBool(); - if(config.frameLengthFlag) throw new AACException("config uses 960-sample frames, not yet supported"); //TODO: are 960-frames working yet? - config.dependsOnCoreCoder = in.readBool(); - if(config.dependsOnCoreCoder) config.coreCoderDelay = in.readBits(14); - else config.coreCoderDelay = 0; - config.extensionFlag = in.readBool(); - - if(config.extensionFlag) { - if(config.profile.isErrorResilientProfile()) { - config.sectionDataResilience = in.readBool(); - config.scalefactorResilience = in.readBool(); - config.spectralDataResilience = in.readBool(); - } - //extensionFlag3 - in.skipBit(); - } - - if(config.channelConfiguration==ChannelConfiguration.CHANNEL_CONFIG_NONE) { - //TODO: is this working correct? -> ISO 14496-3 part 1: 1.A.4.3 - in.skipBits(3); //PCE - PCE pce = new PCE(); - pce.decode(in); - config.profile = pce.getProfile(); - config.sampleFrequency = pce.getSampleFrequency(); - config.channelConfiguration = ChannelConfiguration.forInt(pce.getChannelCount()); - } - - if(in.getBitsLeft()>10) readSyncExtension(in, config); - break; - default: - throw new AACException("profile not supported: "+config.profile.getIndex()); - } - return config; - } - finally { - in.destroy(); - } - } - - private static Profile readProfile(BitStream in) throws AACException { - int i = in.readBits(5); - if(i==31) i = 32+in.readBits(6); - return Profile.forInt(i); - } - - private static void readSyncExtension(BitStream in, DecoderConfig config) throws AACException { - final int type = in.readBits(11); - switch(type) { - case 0x2B7: - final Profile profile = Profile.forInt(in.readBits(5)); - - if(profile.equals(Profile.AAC_SBR)) { - config.sbrPresent = in.readBool(); - if(config.sbrPresent) { - config.profile = profile; - - int tmp = in.readBits(4); - - if(tmp==config.sampleFrequency.getIndex()) config.downSampledSBR = true; - if(tmp==15) { - throw new AACException("sample rate specified explicitly, not supported yet!"); - //tmp = in.readBits(24); - } - } - } - break; - } - } +public class DecoderConfig { + + private Profile profile = Profile.AAC_MAIN, extProfile = Profile.UNKNOWN; + private SampleRate sampleFrequency = SF_NONE; + private ChannelConfiguration channelConfiguration = ChannelConfiguration.CHANNEL_CONFIG_UNSUPPORTED; + private ChannelConfiguration extChannelConfiguration = ChannelConfiguration.CHANNEL_CONFIG_UNSUPPORTED; + private boolean frameLengthFlag = false; + private boolean dependsOnCoreCoder = false; + private int coreCoderDelay = 0; + private boolean extensionFlag = false; + // extension: SBR + private final boolean sbrEnabled; + private boolean sbrPresent = false; + // in case of SBR this may be twice the SampleFrequency. + // it remains null without SBR + private SampleRate outputFrequency; + + private boolean psEnabled = true; + private boolean psPresent = false; + + public PS openPS(SBR sbr) { + psPresent = true; + return new PSImpl(sbr.numTimeSlotsRate); + } + + // extension: error resilience + private boolean sectionDataResilience = false, scalefactorResilience = false, spectralDataResilience = false; + + DecoderConfig(boolean sbrEnabled) { + this.sbrEnabled = sbrEnabled; + } + + DecoderConfig() { + this(true); + } + + /* ========== gets/sets ========== */ + public ChannelConfiguration getChannelConfiguration() { + return channelConfiguration; + } + + public DecoderConfig setAudioDecoderInfo(AudioDecoderInfo info) { + profile = info.getProfile(); + sampleFrequency = info.getSampleFrequency(); + channelConfiguration = info.getChannelConfiguration(); + return this; + } + + public int getCoreCoderDelay() { + return coreCoderDelay; + } + + public void setCoreCoderDelay(int coreCoderDelay) { + this.coreCoderDelay = coreCoderDelay; + } + + public boolean isDependsOnCoreCoder() { + return dependsOnCoreCoder; + } + + public void setDependsOnCoreCoder(boolean dependsOnCoreCoder) { + this.dependsOnCoreCoder = dependsOnCoreCoder; + } + + public Profile getExtObjectType() { + return extProfile; + } + + public void setExtObjectType(Profile extObjectType) { + this.extProfile = extObjectType; + } + + public int getFrameLength() { + return frameLengthFlag ? FilterBank.WINDOW_SMALL_LEN_LONG : FilterBank.WINDOW_LEN_LONG; + } + + public int getSampleLength() { + int upsampled = outputFrequency!= null && sampleFrequency != outputFrequency ? 2 : 1; + return upsampled * getFrameLength(); + } + + public boolean isSmallFrameUsed() { + return frameLengthFlag; + } + + public void setSmallFrameUsed(boolean shortFrame) { + this.frameLengthFlag = shortFrame; + } + + public Profile getProfile() { + return profile; + } + + public void setProfile(Profile profile) { + this.profile = profile; + } + + public SampleRate getSampleFrequency() { + return sampleFrequency; + } + + public SampleRate getOutputFrequency() { + return outputFrequency != null ? outputFrequency : sampleFrequency; + } + + public int getChannelCount() { + + // expect HE AAC v2 with PS + if (sbrEnabled && channelConfiguration == ChannelConfiguration.MONO) + return 2; + + return channelConfiguration.getChannelCount(); + } + + //=========== SBR ============= + + /** + * Setup SBR and try to duplicate the output frequency if possible. + * + * @return true if the frequency could be duplicated. + */ + public boolean setSBRPresent() { + sbrPresent = true; + + if (outputFrequency == null) { + SampleRate duplicated = sampleFrequency.duplicated(); + if (duplicated == SF_NONE) + return false; + outputFrequency = duplicated; + } + + return isUpSampled(); + } + + boolean isUpSampled() { + return outputFrequency != null && outputFrequency != sampleFrequency; + } + + public boolean isSBREnabled() { + return sbrEnabled; + } + + public boolean isPSEnabled() { + return psEnabled; + } + + //=========== ER ============= + + public boolean isScalefactorResilienceUsed() { + return scalefactorResilience; + } + + public boolean isSectionDataResilienceUsed() { + return sectionDataResilience; + } + + public boolean isSpectralDataResilienceUsed() { + return spectralDataResilience; + } + + /* ======== static builder ========= */ + + public static DecoderConfig create(AudioDecoderInfo info) { + return new DecoderConfig().setAudioDecoderInfo(info); + } + + /** + * Parses the input arrays as a DecoderSpecificInfo, as used in MP4 + * containers. + *

+ * see: 1.6.2.1 AudioSpecificConfig + * + * @return a DecoderConfig + */ + public DecoderConfig decode(BitStream in) { + + profile = readProfile(in); + + sampleFrequency = SampleRate.decode(in); + outputFrequency = sampleFrequency; + + channelConfiguration = ChannelConfiguration.forInt(in.readBits(4)); + + switch (profile) { + case AAC_PS: + psPresent = true; + // implies SBR + case AAC_SBR: + SampleRate frequency = SampleRate.decode(in); + + extProfile = profile; + profile = readProfile(in); + + if (sbrEnabled) { + outputFrequency = frequency; + } + + break; + + case AAC_MAIN: + case AAC_LC: + case AAC_SSR: + case AAC_LTP: + case ER_AAC_LC: + case ER_AAC_LTP: + case ER_AAC_LD: + //ga-specific info: + frameLengthFlag = in.readBool(); + if (frameLengthFlag) + throw new AACException("config uses 960-sample frames, not yet supported"); //TODO: are 960-frames working yet? + + dependsOnCoreCoder = in.readBool(); + + if (dependsOnCoreCoder) + coreCoderDelay = in.readBits(14); + else + coreCoderDelay = 0; + + extensionFlag = in.readBool(); + + if (extensionFlag) { + if (profile.isErrorResilientProfile()) { + sectionDataResilience = in.readBool(); + scalefactorResilience = in.readBool(); + spectralDataResilience = in.readBool(); + } + //extensionFlag3 + in.skipBit(); + } + + if (channelConfiguration == ChannelConfiguration.NONE) { + //TODO: is this working correct? -> ISO 14496-3 part 1: 1.A.4.3 + //in.skipBits(3); //PCE + PCE pce = PCE.read(in); + setAudioDecoderInfo(pce); + } + + if (sbrEnabled && in.getBitsLeft() > 10) + readSyncExtension(in); + + break; + + default: + throw new AACException("profile not supported: " + profile.getIndex()); + } + + // expect implicit SBR for low frequencies + // see 4.6.18.2.6 + // if(sbrEnabled && !sbrPresent && sampleFrequency.duplicated() != SF_NONE) { + // setSBRPresent(); + // } + + return this; + } + + private static Profile readProfile(BitStream in) throws AACException { + int i = in.readBits(5); + if (i == 31) i = 32 + in.readBits(6); + return Profile.forInt(i); + } + + /** + * Read possible SBR and PS indication. + * See 1.6.6 Signaling of Parametric Stereo (PS) + * + * @param in input stream + */ + private void readSyncExtension(BitStream in) throws AACException { + int extensionType = in.readBits(11); + if (extensionType == 0x2B7) { + extProfile = Profile.forInt(in.readBits(5)); + if (extProfile.equals(Profile.AAC_SBR) || extProfile.equals(Profile.ER_BSAC)) { + sbrPresent = in.readBool(); + if (sbrPresent) { + outputFrequency = SampleRate.decode(in); + } + if (extProfile.equals(Profile.AAC_SBR)) { + // possible PS indication + // see: 1.6.6 Signaling of Parametric Stereo (PS) + if (in.getBitsLeft() > 12) { + extensionType = in.readBits(11); + if (extensionType == 0x548) + psPresent = in.readBool(); + } + } else if (extProfile.equals(Profile.ER_BSAC)) { + extChannelConfiguration = ChannelConfiguration.forInt(in.readBits(4)); + } + } + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/EOSException.java b/src/main/java/net/sourceforge/jaad/aac/EOSException.java new file mode 100644 index 00000000..0bd6899f --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/EOSException.java @@ -0,0 +1,18 @@ +package net.sourceforge.jaad.aac; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 21.12.18 + * Time: 13:30 + */ +public class EOSException extends AACException { + + public EOSException(String message) { + super(message); + } + + public EOSException(Throwable cause) { + super(cause); + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/Profile.java b/src/main/java/net/sourceforge/jaad/aac/Profile.java index f360fe5e..3ca83432 100644 --- a/src/main/java/net/sourceforge/jaad/aac/Profile.java +++ b/src/main/java/net/sourceforge/jaad/aac/Profile.java @@ -5,98 +5,119 @@ * The function Decoder.canDecode specifies if the decoder can * handle a given format. * More precisely, the ISO standard calls these 'object types'. + * * @author in-somnia */ public enum Profile { - UNKNOWN(-1, "unknown", false), - AAC_MAIN(1, "AAC Main Profile", true), - AAC_LC(2, "AAC Low Complexity", true), - AAC_SSR(3, "AAC Scalable Sample Rate", false), - AAC_LTP(4, "AAC Long Term Prediction", false), - AAC_SBR(5, "AAC SBR", true), - AAC_SCALABLE(6, "Scalable AAC", false), - TWIN_VQ(7, "TwinVQ", false), - AAC_LD(11, "AAC Low Delay", false), - ER_AAC_LC(17, "Error Resilient AAC Low Complexity", true), - ER_AAC_SSR(18, "Error Resilient AAC SSR", false), - ER_AAC_LTP(19, "Error Resilient AAC Long Term Prediction", false), - ER_AAC_SCALABLE(20, "Error Resilient Scalable AAC", false), - ER_TWIN_VQ(21, "Error Resilient TwinVQ", false), - ER_BSAC(22, "Error Resilient BSAC", false), - ER_AAC_LD(23, "Error Resilient AAC Low Delay", false); - private static final Profile[] ALL = { - AAC_MAIN, AAC_LC, AAC_SSR, AAC_LTP, AAC_SBR, AAC_SCALABLE, TWIN_VQ, - null, null, null, AAC_LD, null, null, null, null, null, ER_AAC_LC, ER_AAC_SSR, - ER_AAC_LTP, ER_AAC_SCALABLE, ER_TWIN_VQ, ER_BSAC, ER_AAC_LD - }; + UNKNOWN(-1, "unknown", false), + AAC_MAIN(1, "AAC Main Profile", true), + AAC_LC(2, "AAC Low Complexity", true), + AAC_SSR(3, "AAC Scalable Sample Rate", false), + AAC_LTP(4, "AAC Long Term Prediction", false), + AAC_SBR(5, "AAC SBR", true), + AAC_SCALABLE(6, "Scalable AAC", false), + TWIN_VQ(7, "TwinVQ", false), + AAC_LD(11, "AAC Low Delay", false), + ER_AAC_LC(17, "Error Resilient AAC Low Complexity", true), + ER_AAC_SSR(18, "Error Resilient AAC SSR", false), + ER_AAC_LTP(19, "Error Resilient AAC Long Term Prediction", false), + ER_AAC_SCALABLE(20, "Error Resilient Scalable AAC", false), + ER_TWIN_VQ(21, "Error Resilient TwinVQ", false), + ER_BSAC(22, "Error Resilient BSAC", false), + ER_AAC_LD(23, "Error Resilient AAC Low Delay", false), + AAC_PS(29, "Parametric Stereo", true); - /** - * Returns a profile instance for the given index. If the index is not - * between 1 and 23 inclusive, UNKNOWN is returned. - * @return a profile with the given index - */ - public static Profile forInt(int i) { - Profile p; - if(i<=0||i>ALL.length) p = UNKNOWN; - else p = ALL[i-1]; - return p; - } - private final int num; - private final String descr; - private final boolean supported; + private static final Profile[] ALL = { + AAC_MAIN, AAC_LC, AAC_SSR, AAC_LTP, AAC_SBR, AAC_SCALABLE, TWIN_VQ, + UNKNOWN, // CELP + UNKNOWN, // HXVC + UNKNOWN, // reserved + AAC_LD, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, UNKNOWN, ER_AAC_LC, ER_AAC_SSR, + ER_AAC_LTP, ER_AAC_SCALABLE, ER_TWIN_VQ, ER_BSAC, ER_AAC_LD, + UNKNOWN, // ER CELP + UNKNOWN, // ER HXVC + UNKNOWN, // ER HILN + UNKNOWN, // ER Parametric + UNKNOWN, // SSC (SinuSoidal Coding) + AAC_PS, + UNKNOWN // MPEG Surround + }; - private Profile(int num, String descr, boolean supported) { - this.num = num; - this.descr = descr; - this.supported = supported; - } + /** + * Returns a profile instance for the given index. If the index is not + * between 1 and 23 inclusive, UNKNOWN is returned. + * @return a profile with the given index + */ + public static Profile forInt(int i) { + Profile p; + if (i <= 0 || i > ALL.length) + p = UNKNOWN; + else + p = ALL[i - 1]; + return p; + } - /** - * Returns this profile's index between 1 and 23 or -1 if this is the - * UNKNOWN instance. - * @return the profile's index - */ - public int getIndex() { - return num; - } + private final int num; + private final String descr; + private final boolean supported; - /** - * Returns a short description of this profile. - * @return the profile's description - */ - public String getDescription() { - return descr; - } + Profile(int num, String descr, boolean supported) { + this.num = num; + this.descr = descr; + this.supported = supported; + } - /** - * Returns a string representation of this profile. The method is - * identical to getDescription(). - * @return the profile's description - */ - @Override - public String toString() { - return descr; - } + /** + * Returns this profile's index between 1 and 23 or -1 if this is the + * UNKNOWN instance. + * + * @return the profile's index + */ + public int getIndex() { + return num; + } - /** - * Returns a boolean, indicating if this profile can be decoded by the - * Decoder. - * @see Decoder#canDecode(net.sourceforge.jaad.aac.Profile) - * @return true if the profile is supported - */ - public boolean isDecodingSupported() { - return supported; - } + /** + * Returns a short description of this profile. + * + * @return the profile's description + */ + public String getDescription() { + return descr; + } - /** - * Returns a boolean, indicating if this profile contains error resilient - * tools. That is, if it's index is higher than 16, since the first error - * resilient profile is ER_AAC_LC (17). - * This method is mainly used internally. - * @return true if the profile uses error resilience - */ - public boolean isErrorResilientProfile() { - return num>16; - } + /** + * Returns a string representation of this profile. The method is + * identical to getDescription(). + * + * @return the profile's description + */ + @Override + public String toString() { + return descr; + } + + /** + * Returns a boolean, indicating if this profile can be decoded by the + * Decoder. + * + * @return true if the profile is supported + * @see Decoder#canDecode(net.sourceforge.jaad.aac.Profile) + */ + public boolean isDecodingSupported() { + return supported; + } + + /** + * Returns a boolean, indicating if this profile contains error resilient + * tools. That is, if it's index is higher than 16, since the first error + * resilient profile is ER_AAC_LC (17). + * This method is mainly used internally. + * + * @return true if the profile uses error resilience + */ + public boolean isErrorResilientProfile() { + return num > 16; + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/Receiver.java b/src/main/java/net/sourceforge/jaad/aac/Receiver.java new file mode 100644 index 00000000..e91d9bb1 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/Receiver.java @@ -0,0 +1,14 @@ +package net.sourceforge.jaad.aac; + +import java.util.List; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 17.10.20 + * Time: 17:09 + */ +public interface Receiver { + + void accept(List samples, int sampleLength, int sampleRate); +} diff --git a/src/main/java/net/sourceforge/jaad/aac/SampleBuffer.java b/src/main/java/net/sourceforge/jaad/aac/SampleBuffer.java deleted file mode 100644 index 162a7526..00000000 --- a/src/main/java/net/sourceforge/jaad/aac/SampleBuffer.java +++ /dev/null @@ -1,128 +0,0 @@ -package net.sourceforge.jaad.aac; - -/** - * The SampleBuffer holds the decoded AAC frame. It contains the raw PCM data - * and its format. - * @author in-somnia - */ -public class SampleBuffer { - - private int sampleRate, channels, bitsPerSample; - private double length, bitrate, encodedBitrate; - private byte[] data; - private boolean bigEndian; - - public SampleBuffer() { - data = new byte[0]; - sampleRate = 0; - channels = 0; - bitsPerSample = 0; - bigEndian = true; - } - - /** - * Returns the buffer's PCM data. - * @return the audio data - */ - public byte[] getData() { - return data; - } - - /** - * Returns the data's sample rate. - * @return the sample rate - */ - public int getSampleRate() { - return sampleRate; - } - - /** - * Returns the number of channels stored in the data buffer. - * @return the number of channels - */ - public int getChannels() { - return channels; - } - - /** - * Returns the number of bits per sample. Usually this is 16, meaning a - * sample is stored in two bytes. - * @return the number of bits per sample - */ - public int getBitsPerSample() { - return bitsPerSample; - } - - /** - * Returns the length of the current frame in seconds. - * length = samplesPerChannel / sampleRate - * @return the length in seconds - */ - public double getLength() { - return length; - } - - /** - * Returns the bitrate of the decoded PCM data. - * bitrate = (samplesPerChannel * bitsPerSample) / length - * @return the bitrate - */ - public double getBitrate() { - return bitrate; - } - - /** - * Returns the AAC bitrate of the current frame. - * @return the AAC bitrate - */ - public double getEncodedBitrate() { - return encodedBitrate; - } - - /** - * Indicates the endianness for the data. - * - * @return true if the data is in big endian, false if it is in little endian - */ - public boolean isBigEndian() { - return bigEndian; - } - - /** - * Sets the endianness for the data. - * - * @param bigEndian if true the data will be in big endian, else in little - * endian - */ - public void setBigEndian(boolean bigEndian) { - if(bigEndian!=this.bigEndian) { - byte tmp; - for(int i = 0; i=0&&i<12) freq = values()[i]; - else freq = SAMPLE_FREQUENCY_NONE; - return freq; - } - - public static SampleFrequency forFrequency(int i) { - final SampleFrequency[] all = values(); - - SampleFrequency freq = null; - for(int j = 0; freq==null&&j<12; j++) { - if(i==all[j].frequency) freq = all[j]; - } - - if(freq==null) freq = SAMPLE_FREQUENCY_NONE; - return freq; - } - private final int index, frequency; - private final int[] prediction, maxTNS_SFB; - - private SampleFrequency(int index, int freqency, int[] prediction, int[] maxTNS_SFB) { - this.index = index; - this.frequency = freqency; - this.prediction = prediction; - this.maxTNS_SFB = maxTNS_SFB; - } - - /** - * Returns this sample frequency's index between 0 (96000) and 11 (8000) - * or -1 if this is SAMPLE_FREQUENCY_NONE. - * @return the sample frequency's index - */ - public int getIndex() { - return index; - } - - /** - * Returns the sample frequency as integer value. This may be a value - * between 96000 and 8000, or 0 if this is SAMPLE_FREQUENCY_NONE. - * @return the sample frequency - */ - public int getFrequency() { - return frequency; - } - - /** - * Returns the highest scale factor band allowed for ICPrediction at this - * sample frequency. - * This method is mainly used internally. - * @return the highest prediction SFB - */ - public int getMaximalPredictionSFB() { - return prediction[0]; - } - - /** - * Returns the number of predictors allowed for ICPrediction at this - * sample frequency. - * This method is mainly used internally. - * @return the number of ICPredictors - */ - public int getPredictorCount() { - return prediction[1]; - } - - /** - * Returns the highest scale factor band allowed for TNS at this - * sample frequency. - * This method is mainly used internally. - * @return the highest SFB for TNS - */ - public int getMaximalTNS_SFB(boolean shortWindow) { - return maxTNS_SFB[shortWindow ? 1 : 0]; - } - - /** - * Returns a string representation of this sample frequency. - * The method is identical to getDescription(). - * @return the sample frequency's description - */ - @Override - public String toString() { - return Integer.toString(frequency); - } +public enum SampleFrequency implements SampleRate { + + SF_96000(0, 96000, new int[] {33, 512}, new int[] {31, 9}), + SF_88200(1, 88200, new int[] {33, 512}, new int[] {31, 9}), + SF_64000(2, 64000, new int[] {38, 664}, new int[] {34, 10}), + SF_48000(3, 48000, new int[] {40, 672}, new int[] {40, 14}), + SF_44100(4, 44100, new int[] {40, 672}, new int[] {42, 14}), + SF_32000(5, 32000, new int[] {40, 672}, new int[] {51, 14}), + SF_24000(6, 24000, new int[] {41, 652}, new int[] {46, 14}), + SF_22050(7, 22050, new int[] {41, 652}, new int[] {46, 14}), + SF_16000(8, 16000, new int[] {37, 664}, new int[] {42, 14}), + SF_12000(9, 12000, new int[] {37, 664}, new int[] {42, 14}), + SF_11025(10, 11025, new int[] {37, 664}, new int[] {42, 14}), + SF_8000(11, 8000, new int[] {34, 664}, new int[] {39, 14}); + + public static final SampleFrequency SF_NONE = null; + + public static final int ESCAPE_INDEX = 0x0f; + + public static final List TABLE = Arrays.asList(values()); + + /** + * Returns a sample frequency instance for the given index. If the index + * is not between 0 and 11 inclusive, SF_NONE is returned. + * + * @return a sample frequency with the given index + */ + public static SampleFrequency forInt(int i) { + if (i >= 0 && i < TABLE.size()) + return TABLE.get(i); + else + return SF_NONE; + } + + public SampleRate forFrequency(int freq) { + if (freq == this.frequency) + return this; + + return new SampleRate() { + + @Override + public int getFrequency() { + return frequency; + } + + @Override + public SampleFrequency getNominal() { + return SampleFrequency.this; + } + + public SampleRate duplicated() { + SampleFrequency duplicate = SampleFrequency.this.duplicated(); + return duplicate == SF_NONE ? SF_NONE : duplicate.forFrequency(2 * frequency); + } + }; + } + + public static SampleFrequency nominalFrequency(int freq) { + + SampleFrequency result = null; + float dev = Float.POSITIVE_INFINITY; + + for (SampleFrequency sf : values()) { + + // calculate relative deviation + float d = sf.getDeviationTo(freq); + + // direct match + if(d==0) + return sf; + + // better match + if(dgetDescription(). + * + * @return the sample frequency's description + */ + @Override + public String toString() { + return Integer.toString(frequency); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/SampleRate.java b/src/main/java/net/sourceforge/jaad/aac/SampleRate.java new file mode 100644 index 00000000..56057147 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/SampleRate.java @@ -0,0 +1,44 @@ +package net.sourceforge.jaad.aac; + +import net.sourceforge.jaad.aac.syntax.BitStream; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 04.05.19 + * Time: 18:28 + */ +public interface SampleRate { + + int getFrequency(); + + SampleRate duplicated(); + + SampleFrequency getNominal(); + + static SampleRate forFrequency(int frequency) { + SampleFrequency nominalFrequency = SampleFrequency.nominalFrequency(frequency); + return nominalFrequency.forFrequency(frequency); + } + + /** + * Decode a frequency which may either an index to a nominal frequency + * or an explicitly given frequency. + * + * See: 1.6.2.1 AudioSpecificConfig + * + * @param in input bit stream to decode. + * @return a SampleFrequency. + */ + static SampleRate decode(BitStream in) { + int index = in.readBits(4); + + // indexed nominal frequency + if(index != SampleFrequency.ESCAPE_INDEX) + return SampleFrequency.TABLE.get(index); + + // for explicit frequency + int frequency = in.readBits(24); + return forFrequency(frequency); + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/Speaker.java b/src/main/java/net/sourceforge/jaad/aac/Speaker.java new file mode 100644 index 00000000..a983ba34 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/Speaker.java @@ -0,0 +1,38 @@ +/* + * User: stueken + * Date: 26.12.20 + * Time: 10:26 + */ + +package net.sourceforge.jaad.aac; + +/** + * @see "https://en.wikipedia.org/wiki/Surround_sound" + */ +public enum Speaker { + + FL("Front Left"), + FR("Front Right"), + FC("Front Center"), + LFE("Low Frequency"), + BL("Back Left"), + BR("Back Right"), + FLC("Front Left of Center"), + FRC("Front Right of Center"), + BC("Back Center"), + SL("Side Left"), + SR("Side Right"), + TC("Top Center"), + TFL("Front Left Height"), + TFC("Front Center Height"), + TFR("Front Right Height"), + TBL("Rear Left Height"), + TBC("Rear Center Height"), + TBR("Rear Right Height"); + + final String name; + + Speaker(String name) { + this.name = name; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/error/BitsBuffer.java b/src/main/java/net/sourceforge/jaad/aac/error/BitsBuffer.java index d6e57ebc..ce7fc2dd 100644 --- a/src/main/java/net/sourceforge/jaad/aac/error/BitsBuffer.java +++ b/src/main/java/net/sourceforge/jaad/aac/error/BitsBuffer.java @@ -1,104 +1,101 @@ package net.sourceforge.jaad.aac.error; -import net.sourceforge.jaad.aac.AACException; import net.sourceforge.jaad.aac.syntax.BitStream; + public class BitsBuffer { - int bufa, bufb, len; - - public BitsBuffer() { - len = 0; - } - - public int getLength() { - return len; - } - - public int showBits(int bits) { - if(bits==0) return 0; - if(len<=32) { - //huffman_spectral_data_2 needs to read more than may be available, - //bits maybe > len, deliver 0 than - if(len>=bits) return ((bufa>>(len-bits))&(0xFFFFFFFF>>(32-bits))); - else return ((bufa<<(bits-len))&(0xFFFFFFFF>>(32-bits))); - } - else { - if((len-bits)<32) return ((bufb&(0xFFFFFFFF>>(64-len)))<<(bits-len+32))|(bufa>>(len-bits)); - else return ((bufb>>(len-bits-32))&(0xFFFFFFFF>>(32-bits))); - } - } - - public boolean flushBits(int bits) { - len -= bits; - - boolean b; - if(len<0) { - len = 0; - b = false; - } - else b = true; - return b; - } - - public int getBits(int n) { - int i = showBits(n); - if(!flushBits(n)) i = -1; - return i; - } - - public int getBit() { - int i = showBits(1); - if(!flushBits(1)) i = -1; - return i; - } - - public void rewindReverse() { - if(len==0) return; - final int[] i = HCR.rewindReverse64(bufb, bufa, len); - bufb = i[0]; - bufa = i[1]; - } - - //merge bits of a to b - public void concatBits(BitsBuffer a) { - if(a.len==0) return; - int al = a.bufa; - int ah = a.bufb; - - int bl, bh; - if(len>32) { - //mask off superfluous high b bits - bl = bufa; - bh = bufb&((1<<(len-32))-1); - //left shift a len bits - ah = al<<(len-32); - al = 0; - } - else { - bl = bufa&((1<<(len))-1); - bh = 0; - ah = (ah<<(len))|(al>>(32-len)); - al = al<32) { - bufb = in.readBits(segwidth-32); - bufa = in.readBits(32); - } - else { - bufa = in.readBits(segwidth); - bufb = 0; - } - } + int bufa, bufb, len; + + public BitsBuffer() { + len = 0; + } + + public int getLength() { + return len; + } + + public int showBits(int bits) { + if (bits == 0) return 0; + if (len <= 32) { + //huffman_spectral_data_2 needs to read more than may be available, + //bits maybe > len, deliver 0 than + if (len >= bits) return ((bufa >> (len - bits)) & (0xFFFFFFFF >> (32 - bits))); + else return ((bufa << (bits - len)) & (0xFFFFFFFF >> (32 - bits))); + } else { + if ((len - bits) < 32) + return ((bufb & (0xFFFFFFFF >> (64 - len))) << (bits - len + 32)) | (bufa >> (len - bits)); + else return ((bufb >> (len - bits - 32)) & (0xFFFFFFFF >> (32 - bits))); + } + } + + public boolean flushBits(int bits) { + len -= bits; + + boolean b; + if (len < 0) { + len = 0; + b = false; + } else b = true; + return b; + } + + public int getBits(int n) { + int i = showBits(n); + if (!flushBits(n)) i = -1; + return i; + } + + public int getBit() { + int i = showBits(1); + if (!flushBits(1)) i = -1; + return i; + } + + public void rewindReverse() { + if (len == 0) return; + int[] i = HCR.rewindReverse64(bufb, bufa, len); + bufb = i[0]; + bufa = i[1]; + } + + //merge bits of a to b + public void concatBits(BitsBuffer a) { + if (a.len == 0) return; + int al = a.bufa; + int ah = a.bufb; + + int bl, bh; + if (len > 32) { + //mask off superfluous high b bits + bl = bufa; + bh = bufb & ((1 << (len - 32)) - 1); + //left shift a len bits + ah = al << (len - 32); + al = 0; + } else { + bl = bufa & ((1 << (len)) - 1); + bh = 0; + ah = (ah << (len)) | (al >> (32 - len)); + al = al << len; + } + + //merge + bufa = bl | al; + bufb = bh | ah; + + len += a.len; + } + + public void readSegment(int segwidth, BitStream in) { + len = segwidth; + + if (segwidth > 32) { + bufb = in.readBits(segwidth - 32); + bufa = in.readBits(32); + } else { + bufa = in.readBits(segwidth); + bufb = 0; + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/error/HCR.java b/src/main/java/net/sourceforge/jaad/aac/error/HCR.java index 762c7b30..3aad843e 100644 --- a/src/main/java/net/sourceforge/jaad/aac/error/HCR.java +++ b/src/main/java/net/sourceforge/jaad/aac/error/HCR.java @@ -3,241 +3,239 @@ import net.sourceforge.jaad.aac.AACException; import net.sourceforge.jaad.aac.huffman.HCB; import net.sourceforge.jaad.aac.syntax.BitStream; -import net.sourceforge.jaad.aac.syntax.Constants; import net.sourceforge.jaad.aac.syntax.ICSInfo; import net.sourceforge.jaad.aac.syntax.ICStream; + /** * Huffman Codeword Reordering * Decodes spectral data for ICStreams if error resilience is used for * section data. */ //TODO: needs decodeSpectralDataER() in BitStream -public class HCR implements Constants { - - private static class Codeword { - - int cb, decoded, sp_offset; - BitsBuffer bits; - - private void fill(int sp, int cb) { - sp_offset = sp; - this.cb = cb; - decoded = 0; - bits = new BitsBuffer(); - } - } - private static final int NUM_CB = 6; - private static final int NUM_CB_ER = 22; - private static final int MAX_CB = 32; - private static final int VCB11_FIRST = 16; - private static final int VCB11_LAST = 31; - private static final int[] PRE_SORT_CB_STD = {11, 9, 7, 5, 3, 1}; - private static final int[] PRE_SORT_CB_ER = {11, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 9, 7, 5, 3, 1}; - private static final int[] MAX_CW_LEN = {0, 11, 9, 20, 16, 13, 11, 14, 12, 17, 14, 49, - 0, 0, 0, 0, 14, 17, 21, 21, 25, 25, 29, 29, 29, 29, 33, 33, 33, 37, 37, 41}; - //bit-twiddling helpers - private static final int[] S = {1, 2, 4, 8, 16}; - private static final int[] B = {0x55555555, 0x33333333, 0x0F0F0F0F, 0x00FF00FF, 0x0000FFFF}; - - //32 bit rewind and reverse - private static int rewindReverse(int v, int len) { - v = ((v>>S[0])&B[0])|((v<>S[1])&B[1])|((v<>S[2])&B[2])|((v<>S[3])&B[3])|((v<>S[4])&B[4])|((v<>= (32-len); - - return v; - } - - //64 bit rewind and reverse - static int[] rewindReverse64(int hi, int lo, int len) { - int[] i = new int[2]; - if(len<=32) { - i[0] = 0; - i[1] = rewindReverse(lo, len); - } - else { - lo = ((lo>>S[0])&B[0])|((lo<>S[0])&B[0])|((hi<>S[1])&B[1])|((lo<>S[1])&B[1])|((hi<>S[2])&B[2])|((lo<>S[2])&B[2])|((hi<>S[3])&B[3])|((lo<>S[3])&B[3])|((hi<>S[4])&B[4])|((lo<>S[4])&B[4])|((hi<>(64-len))|(lo<<(len-32)); - i[1] = lo>>(64-len); - } - return i; - } - - private static boolean isGoodCB(int cb, int sectCB) { - boolean b = false; - if((sectCB>HCB.ZERO_HCB&§CB<=HCB.ESCAPE_HCB)||(sectCB>=VCB11_FIRST&§CB<=VCB11_LAST)) { - if(cbaacSectionDataResilienceFlag - public static void decodeReorderedSpectralData(ICStream ics, BitStream in, short[] spectralData, boolean sectionDataResilience) throws AACException { - final ICSInfo info = ics.getInfo(); - final int windowGroupCount = info.getWindowGroupCount(); - final int maxSFB = info.getMaxSFB(); - final int[] swbOffsets = info.getSWBOffsets(); - final int swbOffsetMax = info.getSWBOffsetMax(); - //TODO: - //final SectionData sectData = ics.getSectionData(); - final int[][] sectStart = null; //sectData.getSectStart(); - final int[][] sectEnd = null; //sectData.getSectEnd(); - final int[] numSec = null; //sectData.getNumSec(); - final int[][] sectCB = null; //sectData.getSectCB(); - final int[][] sectSFBOffsets = null; //info.getSectSFBOffsets(); - - //check parameter - final int spDataLen = ics.getReorderedSpectralDataLength(); - if(spDataLen==0) return; - - final int longestLen = ics.getLongestCodewordLength(); - if(longestLen==0||longestLen>=spDataLen) throw new AACException("length of longest HCR codeword out of range"); - - //create spOffsets - final int[] spOffsets = new int[8]; - final int shortFrameLen = spectralData.length/8; - spOffsets[0] = 0; - int g; - for(g = 1; gsfb)) { - /* check whether codebook used here is the one we want to process */ - thisSectCB = sectCB[g][i]; - - if(isGoodCB(thisCB, thisSectCB)) { - //precalculation - int sect_sfb_size = sectSFBOffsets[g][sfb+1]-sectSFBOffsets[g][sfb]; - int inc = (thisSectCB32) { - segment[segmentsCount-1].bufb = segment[segmentsCount].bufb - +segment[segmentsCount-1].showBits(segment[segmentsCount-1].len-32); - segment[segmentsCount-1].bufa = segment[segmentsCount].bufa - +segment[segmentsCount-1].showBits(32); - } - else { - segment[segmentsCount-1].bufa = segment[segmentsCount].bufa - +segment[segmentsCount-1].showBits(segment[segmentsCount-1].len); - segment[segmentsCount-1].bufb = segment[segmentsCount].bufb; - } - segment[segmentsCount-1].len += additional_bits; - } - bitsread = spDataLen; - PCWs_done = 1; - - codeword[0].fill(sp, thisSectCB); - } - } - else { - codeword[numberOfCodewords-segmentsCount].fill(sp, thisSectCB); - } - numberOfCodewords++; - } - } - } - } - } - } - } - } - - if(segmentsCount==0) throw new AACException("no segments in HCR"); - - final int numberOfSets = numberOfCodewords/segmentsCount; - - //step 2: decode nonPCWs - int trial, codewordBase, segmentID, codewordID; - for(int set = 1; set<=numberOfSets; set++) { - for(trial = 0; trial=numberOfCodewords-segmentsCount) break; - - if((codeword[codewordID].decoded==0)&&(segment[segmentID].len>0)) { - if(codeword[codewordID].bits.len!=0) segment[segmentID].concatBits(codeword[codewordID].bits); - - int tmplen = segment[segmentID].len; +public class HCR { + + private static class Codeword { + + int cb, decoded, sp_offset; + BitsBuffer bits; + + private void fill(int sp, int cb) { + sp_offset = sp; + this.cb = cb; + decoded = 0; + bits = new BitsBuffer(); + } + } + + private static final int NUM_CB = 6; + private static final int NUM_CB_ER = 22; + private static final int MAX_CB = 32; + private static final int VCB11_FIRST = 16; + private static final int VCB11_LAST = 31; + private static final int[] PRE_SORT_CB_STD = {11, 9, 7, 5, 3, 1}; + private static final int[] PRE_SORT_CB_ER = {11, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 9, 7, 5, 3, 1}; + private static final int[] MAX_CW_LEN = {0, 11, 9, 20, 16, 13, 11, 14, 12, 17, 14, 49, + 0, 0, 0, 0, 14, 17, 21, 21, 25, 25, 29, 29, 29, 29, 33, 33, 33, 37, 37, 41}; + //bit-twiddling helpers + private static final int[] S = {1, 2, 4, 8, 16}; + private static final int[] B = {0x55555555, 0x33333333, 0x0F0F0F0F, 0x00FF00FF, 0x0000FFFF}; + + //32 bit rewind and reverse + private static int rewindReverse(int v, int len) { + v = ((v >> S[0]) & B[0]) | ((v << S[0]) & ~B[0]); + v = ((v >> S[1]) & B[1]) | ((v << S[1]) & ~B[1]); + v = ((v >> S[2]) & B[2]) | ((v << S[2]) & ~B[2]); + v = ((v >> S[3]) & B[3]) | ((v << S[3]) & ~B[3]); + v = ((v >> S[4]) & B[4]) | ((v << S[4]) & ~B[4]); + + //shift off low bits + v >>= (32 - len); + + return v; + } + + //64 bit rewind and reverse + static int[] rewindReverse64(int hi, int lo, int len) { + int[] i = new int[2]; + if (len <= 32) { + i[0] = 0; + i[1] = rewindReverse(lo, len); + } else { + lo = ((lo >> S[0]) & B[0]) | ((lo << S[0]) & ~B[0]); + hi = ((hi >> S[0]) & B[0]) | ((hi << S[0]) & ~B[0]); + lo = ((lo >> S[1]) & B[1]) | ((lo << S[1]) & ~B[1]); + hi = ((hi >> S[1]) & B[1]) | ((hi << S[1]) & ~B[1]); + lo = ((lo >> S[2]) & B[2]) | ((lo << S[2]) & ~B[2]); + hi = ((hi >> S[2]) & B[2]) | ((hi << S[2]) & ~B[2]); + lo = ((lo >> S[3]) & B[3]) | ((lo << S[3]) & ~B[3]); + hi = ((hi >> S[3]) & B[3]) | ((hi << S[3]) & ~B[3]); + lo = ((lo >> S[4]) & B[4]) | ((lo << S[4]) & ~B[4]); + hi = ((hi >> S[4]) & B[4]) | ((hi << S[4]) & ~B[4]); + + //shift off low bits + i[1] = (hi >> (64 - len)) | (lo << (len - 32)); + i[1] = lo >> (64 - len); + } + return i; + } + + private static boolean isGoodCB(int cb, int sectCB) { + boolean b = false; + if ((sectCB > HCB.ZERO_HCB && sectCB <= HCB.ESCAPE_HCB) || (sectCB >= VCB11_FIRST && sectCB <= VCB11_LAST)) { + if (cb < HCB.ESCAPE_HCB) b = ((sectCB == cb) || (sectCB == cb + 1)); + else b = (sectCB == cb); + } + return b; + } + + //sectionDataResilience = hDecoder->aacSectionDataResilienceFlag + public static void decodeReorderedSpectralData(ICStream ics, BitStream in, short[] spectralData, boolean sectionDataResilience) { + ICSInfo info = ics.getInfo(); + int windowGroupCount = info.getWindowGroupCount(); + int maxSFB = info.getMaxSFB(); + int[] swbOffsets = info.getSWBOffsets(); + int swbOffsetMax = info.getSWBOffsetMax(); + //TODO: + //final SectionData sectData = ics.getSectionData(); + int[][] sectStart = null; //sectData.getSectStart(); + int[][] sectEnd = null; //sectData.getSectEnd(); + int[] numSec = null; //sectData.getNumSec(); + int[][] sectCB = null; //sectData.getSectCB(); + int[][] sectSFBOffsets = null; //info.getSectSFBOffsets(); + + //check parameter + int spDataLen = ics.getReorderedSpectralDataLength(); + if (spDataLen == 0) return; + + int longestLen = ics.getLongestCodewordLength(); + if (longestLen == 0 || longestLen >= spDataLen) + throw new AACException("length of longest HCR codeword out of range"); + + //create spOffsets + int[] spOffsets = new int[8]; + int shortFrameLen = spectralData.length / 8; + spOffsets[0] = 0; + int g; + for (g = 1; g < windowGroupCount; g++) { + spOffsets[g] = spOffsets[g - 1] + shortFrameLen * info.getWindowGroupLength(g - 1); + } + + Codeword[] codeword = new Codeword[512]; + BitsBuffer[] segment = new BitsBuffer[512]; + + int lastCB; + int[] preSortCB; + if (sectionDataResilience) { + preSortCB = PRE_SORT_CB_ER; + lastCB = NUM_CB_ER; + } else { + preSortCB = PRE_SORT_CB_STD; + lastCB = NUM_CB; + } + + int PCWs_done = 0; + int segmentsCount = 0; + int numberOfCodewords = 0; + int bitsread = 0; + + int sfb, w_idx, i, thisCB, thisSectCB, cws; + //step 1: decode PCW's (set 0), and stuff data in easier-to-use format + for (int sortloop = 0; sortloop < lastCB; sortloop++) { + //select codebook to process this pass + thisCB = preSortCB[sortloop]; + + for (sfb = 0; sfb < maxSFB; sfb++) { + for (w_idx = 0; 4 * w_idx < (Math.min(swbOffsets[sfb + 1], swbOffsetMax) - swbOffsets[sfb]); w_idx++) { + for (g = 0; g < windowGroupCount; g++) { + for (i = 0; i < numSec[g]; i++) { + if ((sectStart[g][i] <= sfb) && (sectEnd[g][i] > sfb)) { + /* check whether codebook used here is the one we want to process */ + thisSectCB = sectCB[g][i]; + + if (isGoodCB(thisCB, thisSectCB)) { + //precalculation + int sect_sfb_size = sectSFBOffsets[g][sfb + 1] - sectSFBOffsets[g][sfb]; + int inc = (thisSectCB < HCB.FIRST_PAIR_HCB) ? 4 : 2; + int group_cws_count = (4 * info.getWindowGroupLength(g)) / inc; + int segwidth = Math.min(MAX_CW_LEN[thisSectCB], longestLen); + + //read codewords until end of sfb or end of window group + for (cws = 0; (cws < group_cws_count) && ((cws + w_idx * group_cws_count) < sect_sfb_size); cws++) { + int sp = spOffsets[g] + sectSFBOffsets[g][sfb] + inc * (cws + w_idx * group_cws_count); + + //read and decode PCW + if (PCWs_done == 0) { + //read in normal segments + if (bitsread + segwidth <= spDataLen) { + segment[segmentsCount].readSegment(segwidth, in); + bitsread += segwidth; + + //Huffman.decodeSpectralDataER(segment[segmentsCount], thisSectCB, spectralData, sp); + + //keep leftover bits + segment[segmentsCount].rewindReverse(); + + segmentsCount++; + } else { + //remaining after last segment + if (bitsread < spDataLen) { + int additional_bits = spDataLen - bitsread; + + segment[segmentsCount].readSegment(additional_bits, in); + segment[segmentsCount].len += segment[segmentsCount - 1].len; + segment[segmentsCount].rewindReverse(); + + if (segment[segmentsCount - 1].len > 32) { + segment[segmentsCount - 1].bufb = segment[segmentsCount].bufb + + segment[segmentsCount - 1].showBits(segment[segmentsCount - 1].len - 32); + segment[segmentsCount - 1].bufa = segment[segmentsCount].bufa + + segment[segmentsCount - 1].showBits(32); + } else { + segment[segmentsCount - 1].bufa = segment[segmentsCount].bufa + + segment[segmentsCount - 1].showBits(segment[segmentsCount - 1].len); + segment[segmentsCount - 1].bufb = segment[segmentsCount].bufb; + } + segment[segmentsCount - 1].len += additional_bits; + } + bitsread = spDataLen; + PCWs_done = 1; + + codeword[0].fill(sp, thisSectCB); + } + } else { + codeword[numberOfCodewords - segmentsCount].fill(sp, thisSectCB); + } + numberOfCodewords++; + } + } + } + } + } + } + } + } + + if (segmentsCount == 0) throw new AACException("no segments in HCR"); + + int numberOfSets = numberOfCodewords / segmentsCount; + + //step 2: decode nonPCWs + int trial, codewordBase, segmentID, codewordID; + for (int set = 1; set <= numberOfSets; set++) { + for (trial = 0; trial < segmentsCount; trial++) { + for (codewordBase = 0; codewordBase < segmentsCount; codewordBase++) { + segmentID = (trial + codewordBase) % segmentsCount; + codewordID = codewordBase + set * segmentsCount - segmentsCount; + + //data up + if (codewordID >= numberOfCodewords - segmentsCount) break; + + if ((codeword[codewordID].decoded == 0) && (segment[segmentID].len > 0)) { + if (codeword[codewordID].bits.len != 0) + segment[segmentID].concatBits(codeword[codewordID].bits); + + int tmplen = segment[segmentID].len; /*int ret = Huffman.decodeSpectralDataER(segment[segmentID], codeword[codewordID].cb, spectralData, codeword[codewordID].sp_offset); @@ -247,12 +245,12 @@ public static void decodeReorderedSpectralData(ICStream ics, BitStream in, short codeword[codewordID].bits.len = tmplen; }*/ - } - } - } - for(i = 0; i>1; - while(ii>=k&&k>0) { - ii -= k; - k >>= 1; - } - ii += k; - } - for(int i = 0; i> 1; + while (ii >= k && k > 0) { + ii -= k; + k >>= 1; + } + ii += k; + } + for (int i = 0; i < length; i++) { + in[i][0] = rev[i][0]; + in[i][1] = rev[i][1]; + } + + // bottom base-4 round + for(int i = 0; i=trans) overlap[mid+4*shortLen+i-length] = (buf[shortLen*7+i]*SHORT_WINDOWS[windowShape][shortLen-1-i])+(buf[shortLen*8+i]*SHORT_WINDOWS[windowShape][i]); - overlap[mid+5*shortLen+i-length] = (buf[shortLen*9+i]*SHORT_WINDOWS[windowShape][shortLen-1-i])+(buf[shortLen*10+i]*SHORT_WINDOWS[windowShape][i]); - overlap[mid+6*shortLen+i-length] = (buf[shortLen*11+i]*SHORT_WINDOWS[windowShape][shortLen-1-i])+(buf[shortLen*12+i]*SHORT_WINDOWS[windowShape][i]); - overlap[mid+7*shortLen+i-length] = (buf[shortLen*13+i]*SHORT_WINDOWS[windowShape][shortLen-1-i])+(buf[shortLen*14+i]*SHORT_WINDOWS[windowShape][i]); - overlap[mid+8*shortLen+i-length] = (buf[shortLen*15+i]*SHORT_WINDOWS[windowShape][shortLen-1-i]); - } - for(i = 0; i=0; i--) { - buf[i] = in[i]*LONG_WINDOWS[windowShapePrev][i]; - buf[i+length] = in[i+length]*LONG_WINDOWS[windowShape][length-1-i]; - } - break; - - case LONG_START_SEQUENCE: - for(i = 0; i= trans) + overlap[mid + 4 * shortLen + i - length] = (buf[shortLen * 7 + i] * SHORT_WINDOWS[windowShape][shortLen - 1 - i]) + (buf[shortLen * 8 + i] * SHORT_WINDOWS[windowShape][i]); + overlap[mid + 5 * shortLen + i - length] = (buf[shortLen * 9 + i] * SHORT_WINDOWS[windowShape][shortLen - 1 - i]) + (buf[shortLen * 10 + i] * SHORT_WINDOWS[windowShape][i]); + overlap[mid + 6 * shortLen + i - length] = (buf[shortLen * 11 + i] * SHORT_WINDOWS[windowShape][shortLen - 1 - i]) + (buf[shortLen * 12 + i] * SHORT_WINDOWS[windowShape][i]); + overlap[mid + 7 * shortLen + i - length] = (buf[shortLen * 13 + i] * SHORT_WINDOWS[windowShape][shortLen - 1 - i]) + (buf[shortLen * 14 + i] * SHORT_WINDOWS[windowShape][i]); + overlap[mid + 8 * shortLen + i - length] = (buf[shortLen * 15 + i] * SHORT_WINDOWS[windowShape][shortLen - 1 - i]); + } + for (int i = 0; i < mid; i++) { + overlap[mid + shortLen + i] = 0; + } + break; + case LONG_STOP_SEQUENCE: + mdctLong.process(in, 0, buf, 0); + // add second half output of previous frame to windowed output of current frame + // construct first half window using padding with 1's and 0's + for (int i = 0; i < mid; i++) { + out[i] = overlap[i]; + } + for (int i = 0; i < shortLen; i++) { + out[mid + i] = overlap[mid + i] + (buf[mid + i] * SHORT_WINDOWS[windowShapePrev][i]); + } + for (int i = 0; i < mid; i++) { + out[mid + shortLen + i] = overlap[mid + shortLen + i] + buf[mid + shortLen + i]; + } + //window the second half and save as overlap for next frame + for (int i = 0; i < length; i++) { + overlap[i] = buf[length + i] * LONG_WINDOWS[windowShape][length - 1 - i]; + } + break; + } + } + + // only for LTP: no overlapping, no short blocks + public void processLTP(WindowSequence windowSequence, int windowShape, int windowShapePrev, float[] in, float[] out) { + switch (windowSequence) { + case ONLY_LONG_SEQUENCE: + for (int i = length - 1; i >= 0; i--) { + buf[i] = in[i] * LONG_WINDOWS[windowShapePrev][i]; + buf[i + length] = in[i + length] * LONG_WINDOWS[windowShape][length - 1 - i]; + } + break; + + case LONG_START_SEQUENCE: + for (int i = 0; i < length; i++) { + buf[i] = in[i] * LONG_WINDOWS[windowShapePrev][i]; + } + for (int i = 0; i < mid; i++) { + buf[i + length] = in[i + length]; + } + for (int i = 0; i < shortLen; i++) { + buf[i + length + mid] = in[i + length + mid] * SHORT_WINDOWS[windowShape][shortLen - 1 - i]; + } + for (int i = 0; i < mid; i++) { + buf[i + length + mid + shortLen] = 0; + } + break; + + case LONG_STOP_SEQUENCE: + for (int i = 0; i < mid; i++) { + buf[i] = 0; + } + for (int i = 0; i < shortLen; i++) { + buf[i + mid] = in[i + mid] * SHORT_WINDOWS[windowShapePrev][i]; + } + for (int i = 0; i < mid; i++) { + buf[i + mid + shortLen] = in[i + mid + shortLen]; + } + for (int i = 0; i < length; i++) { + buf[i + length] = in[i + length] * LONG_WINDOWS[windowShape][length - 1 - i]; + } + break; + } + mdctLong.processForward(buf, out); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/filterbank/KBDWindows.java b/src/main/java/net/sourceforge/jaad/aac/filterbank/KBDWindows.java index 59869746..5c7d23fb 100644 --- a/src/main/java/net/sourceforge/jaad/aac/filterbank/KBDWindows.java +++ b/src/main/java/net/sourceforge/jaad/aac/filterbank/KBDWindows.java @@ -2,2244 +2,2244 @@ interface KBDWindows { - float[] KBD_1024 = { - 0.00029256153896361f, - 0.00042998567353047f, - 0.00054674074589540f, - 0.00065482304299792f, - 0.00075870195068747f, - 0.00086059331713336f, - 0.00096177541439010f, - 0.0010630609410878f, - 0.0011650036308132f, - 0.0012680012194148f, - 0.0013723517232956f, - 0.0014782864109136f, - 0.0015859901976719f, - 0.0016956148252373f, - 0.0018072876903517f, - 0.0019211179405514f, - 0.0020372007924215f, - 0.0021556206591754f, - 0.0022764534599614f, - 0.0023997683540995f, - 0.0025256290631156f, - 0.0026540948920831f, - 0.0027852215281403f, - 0.0029190616715331f, - 0.0030556655443223f, - 0.0031950812943391f, - 0.0033373553240392f, - 0.0034825325586930f, - 0.0036306566699199f, - 0.0037817702604646f, - 0.0039359150179719f, - 0.0040931318437260f, - 0.0042534609610026f, - 0.0044169420066964f, - 0.0045836141091341f, - 0.0047535159544086f, - 0.0049266858431214f, - 0.0051031617390698f, - 0.0052829813111335f, - 0.0054661819693975f, - 0.0056528008963682f, - 0.0058428750739943f, - 0.0060364413070882f, - 0.0062335362436492f, - 0.0064341963925079f, - 0.0066384581386503f, - 0.0068463577565218f, - 0.0070579314215715f, - 0.0072732152202559f, - 0.0074922451586909f, - 0.0077150571701162f, - 0.0079416871213115f, - 0.0081721708180857f, - 0.0084065440099458f, - 0.0086448423940363f, - 0.0088871016184291f, - 0.0091333572848345f, - 0.0093836449507939f, - 0.0096380001314086f, - 0.0098964583006517f, - 0.010159054892306f, - 0.010425825300561f, - 0.010696804880310f, - 0.010972028947167f, - 0.011251532777236f, - 0.011535351606646f, - 0.011823520630897f, - 0.012116075003993f, - 0.012413049837429f, - 0.012714480198999f, - 0.013020401111478f, - 0.013330847551161f, - 0.013645854446288f, - 0.013965456675352f, - 0.014289689065314f, - 0.014618586389712f, - 0.014952183366697f, - 0.015290514656976f, - 0.015633614861688f, - 0.015981518520214f, - 0.016334260107915f, - 0.016691874033817f, - 0.017054394638241f, - 0.017421856190380f, - 0.017794292885832f, - 0.018171738844085f, - 0.018554228105962f, - 0.018941794631032f, - 0.019334472294980f, - 0.019732294886947f, - 0.020135296106839f, - 0.020543509562604f, - 0.020956968767488f, - 0.021375707137257f, - 0.021799757987407f, - 0.022229154530343f, - 0.022663929872540f, - 0.023104117011689f, - 0.023549748833816f, - 0.024000858110398f, - 0.024457477495451f, - 0.024919639522613f, - 0.025387376602207f, - 0.025860721018295f, - 0.026339704925726f, - 0.026824360347160f, - 0.027314719170100f, - 0.027810813143900f, - 0.028312673876775f, - 0.028820332832801f, - 0.029333821328905f, - 0.029853170531859f, - 0.030378411455255f, - 0.030909574956490f, - 0.031446691733739f, - 0.031989792322926f, - 0.032538907094693f, - 0.033094066251369f, - 0.033655299823935f, - 0.034222637668991f, - 0.034796109465717f, - 0.035375744712844f, - 0.035961572725616f, - 0.036553622632758f, - 0.037151923373446f, - 0.037756503694277f, - 0.038367392146243f, - 0.038984617081711f, - 0.039608206651398f, - 0.040238188801359f, - 0.040874591269976f, - 0.041517441584950f, - 0.042166767060301f, - 0.042822594793376f, - 0.043484951661852f, - 0.044153864320760f, - 0.044829359199509f, - 0.045511462498913f, - 0.046200200188234f, - 0.046895598002228f, - 0.047597681438201f, - 0.048306475753074f, - 0.049022005960455f, - 0.049744296827725f, - 0.050473372873129f, - 0.051209258362879f, - 0.051951977308273f, - 0.052701553462813f, - 0.053458010319350f, - 0.054221371107223f, - 0.054991658789428f, - 0.055768896059787f, - 0.056553105340134f, - 0.057344308777513f, - 0.058142528241393f, - 0.058947785320893f, - 0.059760101322019f, - 0.060579497264926f, - 0.061405993881180f, - 0.062239611611049f, - 0.063080370600799f, - 0.063928290700012f, - 0.064783391458919f, - 0.065645692125747f, - 0.066515211644086f, - 0.067391968650269f, - 0.068275981470777f, - 0.069167268119652f, - 0.070065846295935f, - 0.070971733381121f, - 0.071884946436630f, - 0.072805502201299f, - 0.073733417088896f, - 0.074668707185649f, - 0.075611388247794f, - 0.076561475699152f, - 0.077518984628715f, - 0.078483929788261f, - 0.079456325589986f, - 0.080436186104162f, - 0.081423525056808f, - 0.082418355827392f, - 0.083420691446553f, - 0.084430544593841f, - 0.085447927595483f, - 0.086472852422178f, - 0.087505330686900f, - 0.088545373642744f, - 0.089592992180780f, - 0.090648196827937f, - 0.091710997744919f, - 0.092781404724131f, - 0.093859427187640f, - 0.094945074185163f, - 0.096038354392069f, - 0.097139276107423f, - 0.098247847252041f, - 0.099364075366580f, - 0.10048796760965f, - 0.10161953075597f, - 0.10275877119451f, - 0.10390569492671f, - 0.10506030756469f, - 0.10622261432949f, - 0.10739262004941f, - 0.10857032915821f, - 0.10975574569357f, - 0.11094887329534f, - 0.11214971520402f, - 0.11335827425914f, - 0.11457455289772f, - 0.11579855315274f, - 0.11703027665170f, - 0.11826972461510f, - 0.11951689785504f, - 0.12077179677383f, - 0.12203442136263f, - 0.12330477120008f, - 0.12458284545102f, - 0.12586864286523f, - 0.12716216177615f, - 0.12846340009971f, - 0.12977235533312f, - 0.13108902455375f, - 0.13241340441801f, - 0.13374549116025f, - 0.13508528059173f, - 0.13643276809961f, - 0.13778794864595f, - 0.13915081676677f, - 0.14052136657114f, - 0.14189959174027f, - 0.14328548552671f, - 0.14467904075349f, - 0.14608024981336f, - 0.14748910466804f, - 0.14890559684750f, - 0.15032971744929f, - 0.15176145713790f, - 0.15320080614414f, - 0.15464775426459f, - 0.15610229086100f, - 0.15756440485987f, - 0.15903408475193f, - 0.16051131859170f, - 0.16199609399712f, - 0.16348839814917f, - 0.16498821779156f, - 0.16649553923042f, - 0.16801034833404f, - 0.16953263053270f, - 0.17106237081842f, - 0.17259955374484f, - 0.17414416342714f, - 0.17569618354193f, - 0.17725559732720f, - 0.17882238758238f, - 0.18039653666830f, - 0.18197802650733f, - 0.18356683858343f, - 0.18516295394233f, - 0.18676635319174f, - 0.18837701650148f, - 0.18999492360384f, - 0.19162005379380f, - 0.19325238592940f, - 0.19489189843209f, - 0.19653856928714f, - 0.19819237604409f, - 0.19985329581721f, - 0.20152130528605f, - 0.20319638069594f, - 0.20487849785865f, - 0.20656763215298f, - 0.20826375852540f, - 0.20996685149083f, - 0.21167688513330f, - 0.21339383310678f, - 0.21511766863598f, - 0.21684836451719f, - 0.21858589311922f, - 0.22033022638425f, - 0.22208133582887f, - 0.22383919254503f, - 0.22560376720111f, - 0.22737503004300f, - 0.22915295089517f, - 0.23093749916189f, - 0.23272864382838f, - 0.23452635346201f, - 0.23633059621364f, - 0.23814133981883f, - 0.23995855159925f, - 0.24178219846403f, - 0.24361224691114f, - 0.24544866302890f, - 0.24729141249740f, - 0.24914046059007f, - 0.25099577217522f, - 0.25285731171763f, - 0.25472504328019f, - 0.25659893052556f, - 0.25847893671788f, - 0.26036502472451f, - 0.26225715701781f, - 0.26415529567692f, - 0.26605940238966f, - 0.26796943845439f, - 0.26988536478190f, - 0.27180714189742f, - 0.27373472994256f, - 0.27566808867736f, - 0.27760717748238f, - 0.27955195536071f, - 0.28150238094021f, - 0.28345841247557f, - 0.28542000785059f, - 0.28738712458038f, - 0.28935971981364f, - 0.29133775033492f, - 0.29332117256704f, - 0.29530994257338f, - 0.29730401606034f, - 0.29930334837974f, - 0.30130789453132f, - 0.30331760916521f, - 0.30533244658452f, - 0.30735236074785f, - 0.30937730527195f, - 0.31140723343430f, - 0.31344209817583f, - 0.31548185210356f, - 0.31752644749341f, - 0.31957583629288f, - 0.32162997012390f, - 0.32368880028565f, - 0.32575227775738f, - 0.32782035320134f, - 0.32989297696566f, - 0.33197009908736f, - 0.33405166929523f, - 0.33613763701295f, - 0.33822795136203f, - 0.34032256116495f, - 0.34242141494820f, - 0.34452446094547f, - 0.34663164710072f, - 0.34874292107143f, - 0.35085823023181f, - 0.35297752167598f, - 0.35510074222129f, - 0.35722783841160f, - 0.35935875652060f, - 0.36149344255514f, - 0.36363184225864f, - 0.36577390111444f, - 0.36791956434930f, - 0.37006877693676f, - 0.37222148360070f, - 0.37437762881878f, - 0.37653715682603f, - 0.37870001161834f, - 0.38086613695607f, - 0.38303547636766f, - 0.38520797315322f, - 0.38738357038821f, - 0.38956221092708f, - 0.39174383740701f, - 0.39392839225157f, - 0.39611581767449f, - 0.39830605568342f, - 0.40049904808370f, - 0.40269473648218f, - 0.40489306229101f, - 0.40709396673153f, - 0.40929739083810f, - 0.41150327546197f, - 0.41371156127524f, - 0.41592218877472f, - 0.41813509828594f, - 0.42035022996702f, - 0.42256752381274f, - 0.42478691965848f, - 0.42700835718423f, - 0.42923177591866f, - 0.43145711524314f, - 0.43368431439580f, - 0.43591331247564f, - 0.43814404844658f, - 0.44037646114161f, - 0.44261048926688f, - 0.44484607140589f, - 0.44708314602359f, - 0.44932165147057f, - 0.45156152598727f, - 0.45380270770813f, - 0.45604513466581f, - 0.45828874479543f, - 0.46053347593880f, - 0.46277926584861f, - 0.46502605219277f, - 0.46727377255861f, - 0.46952236445718f, - 0.47177176532752f, - 0.47402191254100f, - 0.47627274340557f, - 0.47852419517009f, - 0.48077620502869f, - 0.48302871012505f, - 0.48528164755674f, - 0.48753495437962f, - 0.48978856761212f, - 0.49204242423966f, - 0.49429646121898f, - 0.49655061548250f, - 0.49880482394273f, - 0.50105902349665f, - 0.50331315103004f, - 0.50556714342194f, - 0.50782093754901f, - 0.51007447028990f, - 0.51232767852971f, - 0.51458049916433f, - 0.51683286910489f, - 0.51908472528213f, - 0.52133600465083f, - 0.52358664419420f, - 0.52583658092832f, - 0.52808575190648f, - 0.53033409422367f, - 0.53258154502092f, - 0.53482804148974f, - 0.53707352087652f, - 0.53931792048690f, - 0.54156117769021f, - 0.54380322992385f, - 0.54604401469766f, - 0.54828346959835f, - 0.55052153229384f, - 0.55275814053768f, - 0.55499323217338f, - 0.55722674513883f, - 0.55945861747062f, - 0.56168878730842f, - 0.56391719289930f, - 0.56614377260214f, - 0.56836846489188f, - 0.57059120836390f, - 0.57281194173835f, - 0.57503060386439f, - 0.57724713372458f, - 0.57946147043912f, - 0.58167355327012f, - 0.58388332162591f, - 0.58609071506528f, - 0.58829567330173f, - 0.59049813620770f, - 0.59269804381879f, - 0.59489533633802f, - 0.59708995413996f, - 0.59928183777495f, - 0.60147092797329f, - 0.60365716564937f, - 0.60584049190582f, - 0.60802084803764f, - 0.61019817553632f, - 0.61237241609393f, - 0.61454351160718f, - 0.61671140418155f, - 0.61887603613527f, - 0.62103735000336f, - 0.62319528854167f, - 0.62534979473088f, - 0.62750081178042f, - 0.62964828313250f, - 0.63179215246597f, - 0.63393236370030f, - 0.63606886099946f, - 0.63820158877577f, - 0.64033049169379f, - 0.64245551467413f, - 0.64457660289729f, - 0.64669370180740f, - 0.64880675711607f, - 0.65091571480603f, - 0.65302052113494f, - 0.65512112263906f, - 0.65721746613689f, - 0.65930949873289f, - 0.66139716782102f, - 0.66348042108842f, - 0.66555920651892f, - 0.66763347239664f, - 0.66970316730947f, - 0.67176824015260f, - 0.67382864013196f, - 0.67588431676768f, - 0.67793521989751f, - 0.67998129968017f, - 0.68202250659876f, - 0.68405879146403f, - 0.68609010541774f, - 0.68811639993588f, - 0.69013762683195f, - 0.69215373826012f, - 0.69416468671849f, - 0.69617042505214f, - 0.69817090645634f, - 0.70016608447958f, - 0.70215591302664f, - 0.70414034636163f, - 0.70611933911096f, - 0.70809284626630f, - 0.71006082318751f, - 0.71202322560554f, - 0.71398000962530f, - 0.71593113172842f, - 0.71787654877613f, - 0.71981621801195f, - 0.72175009706445f, - 0.72367814394990f, - 0.72560031707496f, - 0.72751657523927f, - 0.72942687763803f, - 0.73133118386457f, - 0.73322945391280f, - 0.73512164817975f, - 0.73700772746796f, - 0.73888765298787f, - 0.74076138636020f, - 0.74262888961827f, - 0.74449012521027f, - 0.74634505600152f, - 0.74819364527663f, - 0.75003585674175f, - 0.75187165452661f, - 0.75370100318668f, - 0.75552386770515f, - 0.75734021349500f, - 0.75915000640095f, - 0.76095321270137f, - 0.76274979911019f, - 0.76453973277875f, - 0.76632298129757f, - 0.76809951269819f, - 0.76986929545481f, - 0.77163229848604f, - 0.77338849115651f, - 0.77513784327849f, - 0.77688032511340f, - 0.77861590737340f, - 0.78034456122283f, - 0.78206625827961f, - 0.78378097061667f, - 0.78548867076330f, - 0.78718933170643f, - 0.78888292689189f, - 0.79056943022564f, - 0.79224881607494f, - 0.79392105926949f, - 0.79558613510249f, - 0.79724401933170f, - 0.79889468818046f, - 0.80053811833858f, - 0.80217428696334f, - 0.80380317168028f, - 0.80542475058405f, - 0.80703900223920f, - 0.80864590568089f, - 0.81024544041560f, - 0.81183758642175f, - 0.81342232415032f, - 0.81499963452540f, - 0.81656949894467f, - 0.81813189927991f, - 0.81968681787738f, - 0.82123423755821f, - 0.82277414161874f, - 0.82430651383076f, - 0.82583133844180f, - 0.82734860017528f, - 0.82885828423070f, - 0.83036037628369f, - 0.83185486248609f, - 0.83334172946597f, - 0.83482096432759f, - 0.83629255465130f, - 0.83775648849344f, - 0.83921275438615f, - 0.84066134133716f, - 0.84210223882952f, - 0.84353543682130f, - 0.84496092574524f, - 0.84637869650833f, - 0.84778874049138f, - 0.84919104954855f, - 0.85058561600677f, - 0.85197243266520f, - 0.85335149279457f, - 0.85472279013653f, - 0.85608631890295f, - 0.85744207377513f, - 0.85879004990298f, - 0.86013024290422f, - 0.86146264886346f, - 0.86278726433124f, - 0.86410408632306f, - 0.86541311231838f, - 0.86671434025950f, - 0.86800776855046f, - 0.86929339605590f, - 0.87057122209981f, - 0.87184124646433f, - 0.87310346938840f, - 0.87435789156650f, - 0.87560451414719f, - 0.87684333873173f, - 0.87807436737261f, - 0.87929760257204f, - 0.88051304728038f, - 0.88172070489456f, - 0.88292057925645f, - 0.88411267465117f, - 0.88529699580537f, - 0.88647354788545f, - 0.88764233649580f, - 0.88880336767692f, - 0.88995664790351f, - 0.89110218408260f, - 0.89223998355154f, - 0.89337005407600f, - 0.89449240384793f, - 0.89560704148345f, - 0.89671397602074f, - 0.89781321691786f, - 0.89890477405053f, - 0.89998865770993f, - 0.90106487860034f, - 0.90213344783689f, - 0.90319437694315f, - 0.90424767784873f, - 0.90529336288690f, - 0.90633144479201f, - 0.90736193669708f, - 0.90838485213119f, - 0.90940020501694f, - 0.91040800966776f, - 0.91140828078533f, - 0.91240103345685f, - 0.91338628315231f, - 0.91436404572173f, - 0.91533433739238f, - 0.91629717476594f, - 0.91725257481564f, - 0.91820055488334f, - 0.91914113267664f, - 0.92007432626589f, - 0.92100015408120f, - 0.92191863490944f, - 0.92282978789113f, - 0.92373363251740f, - 0.92463018862687f, - 0.92551947640245f, - 0.92640151636824f, - 0.92727632938624f, - 0.92814393665320f, - 0.92900435969727f, - 0.92985762037477f, - 0.93070374086684f, - 0.93154274367610f, - 0.93237465162328f, - 0.93319948784382f, - 0.93401727578443f, - 0.93482803919967f, - 0.93563180214841f, - 0.93642858899043f, - 0.93721842438279f, - 0.93800133327637f, - 0.93877734091223f, - 0.93954647281807f, - 0.94030875480458f, - 0.94106421296182f, - 0.94181287365556f, - 0.94255476352362f, - 0.94328990947213f, - 0.94401833867184f, - 0.94474007855439f, - 0.94545515680855f, - 0.94616360137644f, - 0.94686544044975f, - 0.94756070246592f, - 0.94824941610434f, - 0.94893161028248f, - 0.94960731415209f, - 0.95027655709525f, - 0.95093936872056f, - 0.95159577885924f, - 0.95224581756115f, - 0.95288951509097f, - 0.95352690192417f, - 0.95415800874314f, - 0.95478286643320f, - 0.95540150607863f, - 0.95601395895871f, - 0.95662025654373f, - 0.95722043049100f, - 0.95781451264084f, - 0.95840253501260f, - 0.95898452980058f, - 0.95956052937008f, - 0.96013056625336f, - 0.96069467314557f, - 0.96125288290073f, - 0.96180522852773f, - 0.96235174318622f, - 0.96289246018262f, - 0.96342741296604f, - 0.96395663512424f, - 0.96448016037959f, - 0.96499802258499f, - 0.96551025571985f, - 0.96601689388602f, - 0.96651797130376f, - 0.96701352230768f, - 0.96750358134269f, - 0.96798818295998f, - 0.96846736181297f, - 0.96894115265327f, - 0.96940959032667f, - 0.96987270976912f, - 0.97033054600270f, - 0.97078313413161f, - 0.97123050933818f, - 0.97167270687887f, - 0.97210976208030f, - 0.97254171033525f, - 0.97296858709871f, - 0.97339042788392f, - 0.97380726825843f, - 0.97421914384017f, - 0.97462609029350f, - 0.97502814332534f, - 0.97542533868127f, - 0.97581771214160f, - 0.97620529951759f, - 0.97658813664749f, - 0.97696625939282f, - 0.97733970363445f, - 0.97770850526884f, - 0.97807270020427f, - 0.97843232435704f, - 0.97878741364771f, - 0.97913800399743f, - 0.97948413132414f, - 0.97982583153895f, - 0.98016314054243f, - 0.98049609422096f, - 0.98082472844313f, - 0.98114907905608f, - 0.98146918188197f, - 0.98178507271438f, - 0.98209678731477f, - 0.98240436140902f, - 0.98270783068385f, - 0.98300723078342f, - 0.98330259730589f, - 0.98359396579995f, - 0.98388137176152f, - 0.98416485063031f, - 0.98444443778651f, - 0.98472016854752f, - 0.98499207816463f, - 0.98526020181980f, - 0.98552457462240f, - 0.98578523160609f, - 0.98604220772560f, - 0.98629553785362f, - 0.98654525677772f, - 0.98679139919726f, - 0.98703399972035f, - 0.98727309286089f, - 0.98750871303556f, - 0.98774089456089f, - 0.98796967165036f, - 0.98819507841154f, - 0.98841714884323f, - 0.98863591683269f, - 0.98885141615285f, - 0.98906368045957f, - 0.98927274328896f, - 0.98947863805473f, - 0.98968139804554f, - 0.98988105642241f, - 0.99007764621618f, - 0.99027120032501f, - 0.99046175151186f, - 0.99064933240208f, - 0.99083397548099f, - 0.99101571309153f, - 0.99119457743191f, - 0.99137060055337f, - 0.99154381435784f, - 0.99171425059582f, - 0.99188194086414f, - 0.99204691660388f, - 0.99220920909823f, - 0.99236884947045f, - 0.99252586868186f, - 0.99268029752989f, - 0.99283216664606f, - 0.99298150649419f, - 0.99312834736847f, - 0.99327271939167f, - 0.99341465251338f, - 0.99355417650825f, - 0.99369132097430f, - 0.99382611533130f, - 0.99395858881910f, - 0.99408877049612f, - 0.99421668923778f, - 0.99434237373503f, - 0.99446585249289f, - 0.99458715382906f, - 0.99470630587254f, - 0.99482333656229f, - 0.99493827364600f, - 0.99505114467878f, - 0.99516197702200f, - 0.99527079784214f, - 0.99537763410962f, - 0.99548251259777f, - 0.99558545988178f, - 0.99568650233767f, - 0.99578566614138f, - 0.99588297726783f, - 0.99597846149005f, - 0.99607214437834f, - 0.99616405129947f, - 0.99625420741595f, - 0.99634263768527f, - 0.99642936685928f, - 0.99651441948352f, - 0.99659781989663f, - 0.99667959222978f, - 0.99675976040620f, - 0.99683834814063f, - 0.99691537893895f, - 0.99699087609774f, - 0.99706486270391f, - 0.99713736163442f, - 0.99720839555593f, - 0.99727798692461f, - 0.99734615798589f, - 0.99741293077431f, - 0.99747832711337f, - 0.99754236861541f, - 0.99760507668158f, - 0.99766647250181f, - 0.99772657705478f, - 0.99778541110799f, - 0.99784299521785f, - 0.99789934972976f, - 0.99795449477828f, - 0.99800845028730f, - 0.99806123597027f, - 0.99811287133042f, - 0.99816337566108f, - 0.99821276804596f, - 0.99826106735952f, - 0.99830829226732f, - 0.99835446122649f, - 0.99839959248609f, - 0.99844370408765f, - 0.99848681386566f, - 0.99852893944805f, - 0.99857009825685f, - 0.99861030750869f, - 0.99864958421549f, - 0.99868794518504f, - 0.99872540702178f, - 0.99876198612738f, - 0.99879769870160f, - 0.99883256074295f, - 0.99886658804953f, - 0.99889979621983f, - 0.99893220065356f, - 0.99896381655254f, - 0.99899465892154f, - 0.99902474256924f, - 0.99905408210916f, - 0.99908269196056f, - 0.99911058634952f, - 0.99913777930986f, - 0.99916428468421f, - 0.99919011612505f, - 0.99921528709576f, - 0.99923981087174f, - 0.99926370054150f, - 0.99928696900779f, - 0.99930962898876f, - 0.99933169301910f, - 0.99935317345126f, - 0.99937408245662f, - 0.99939443202674f, - 0.99941423397457f, - 0.99943349993572f, - 0.99945224136972f, - 0.99947046956130f, - 0.99948819562171f, - 0.99950543049000f, - 0.99952218493439f, - 0.99953846955355f, - 0.99955429477803f, - 0.99956967087154f, - 0.99958460793242f, - 0.99959911589494f, - 0.99961320453077f, - 0.99962688345035f, - 0.99964016210433f, - 0.99965304978499f, - 0.99966555562769f, - 0.99967768861231f, - 0.99968945756473f, - 0.99970087115825f, - 0.99971193791510f, - 0.99972266620792f, - 0.99973306426121f, - 0.99974314015288f, - 0.99975290181568f, - 0.99976235703876f, - 0.99977151346914f, - 0.99978037861326f, - 0.99978895983845f, - 0.99979726437448f, - 0.99980529931507f, - 0.99981307161943f, - 0.99982058811377f, - 0.99982785549283f, - 0.99983488032144f, - 0.99984166903600f, - 0.99984822794606f, - 0.99985456323584f, - 0.99986068096572f, - 0.99986658707386f, - 0.99987228737764f, - 0.99987778757524f, - 0.99988309324717f, - 0.99988820985777f, - 0.99989314275675f, - 0.99989789718072f, - 0.99990247825468f, - 0.99990689099357f, - 0.99991114030376f, - 0.99991523098456f, - 0.99991916772971f, - 0.99992295512891f, - 0.99992659766930f, - 0.99993009973692f, - 0.99993346561824f, - 0.99993669950161f, - 0.99993980547870f, - 0.99994278754604f, - 0.99994564960642f, - 0.99994839547033f, - 0.99995102885747f, - 0.99995355339809f, - 0.99995597263451f, - 0.99995829002249f, - 0.99996050893264f, - 0.99996263265183f, - 0.99996466438460f, - 0.99996660725452f, - 0.99996846430558f, - 0.99997023850356f, - 0.99997193273736f, - 0.99997354982037f, - 0.99997509249183f, - 0.99997656341810f, - 0.99997796519400f, - 0.99997930034415f, - 0.99998057132421f, - 0.99998178052220f, - 0.99998293025975f, - 0.99998402279338f, - 0.99998506031574f, - 0.99998604495686f, - 0.99998697878536f, - 0.99998786380966f, - 0.99998870197921f, - 0.99998949518567f, - 0.99999024526408f, - 0.99999095399401f, - 0.99999162310077f, - 0.99999225425649f, - 0.99999284908128f, - 0.99999340914435f, - 0.99999393596510f, - 0.99999443101421f, - 0.99999489571473f, - 0.99999533144314f, - 0.99999573953040f, - 0.99999612126300f, - 0.99999647788395f, - 0.99999681059383f, - 0.99999712055178f, - 0.99999740887647f, - 0.99999767664709f, - 0.99999792490431f, - 0.99999815465123f, - 0.99999836685427f, - 0.99999856244415f, - 0.99999874231676f, - 0.99999890733405f, - 0.99999905832493f, - 0.99999919608613f, - 0.99999932138304f, - 0.99999943495056f, - 0.99999953749392f, - 0.99999962968950f, - 0.99999971218563f, - 0.99999978560337f, - 0.99999985053727f, - 0.99999990755616f, - 0.99999995720387f - }; - float[] KBD_128 = { - 4.3795702929468881e-005f, - 0.00011867384265436617f, - 0.0002307165763996192f, - 0.00038947282760568383f, - 0.00060581272288302553f, - 0.00089199695169487453f, - 0.0012617254423430522f, - 0.0017301724373162003f, - 0.0023140071937421476f, - 0.0030313989666022221f, - 0.0039020049735530842f, - 0.0049469401815512024f, - 0.0061887279335368318f, - 0.0076512306364647726f, - 0.0093595599562652423f, - 0.011339966208377799f, - 0.013619706891715299f, - 0.016226894586323766f, - 0.019190324717288168f, - 0.022539283975960878f, - 0.026303340480472455f, - 0.030512117046644357f, - 0.03519504922365594f, - 0.040381130021856941f, - 0.046098643518702249f, - 0.052374889768730587f, - 0.059235903660769147f, - 0.066706170556282418f, - 0.074808341703430481f, - 0.083562952548726227f, - 0.092988147159339674f, - 0.1030994120216919f, - 0.11390932249409955f, - 0.12542730516149531f, - 0.13765941926783826f, - 0.15060816028651081f, - 0.16427228853114245f, - 0.17864668550988483f, - 0.19372224048676889f, - 0.20948576943658073f, - 0.22591996826744942f, - 0.24300340184133981f, - 0.26071052995068139f, - 0.27901177101369551f, - 0.29787360383626599f, - 0.3172587073594233f, - 0.33712613787396362f, - 0.35743154274286698f, - 0.37812740923363009f, - 0.39916334663203618f, - 0.42048639939189658f, - 0.4420413886774246f, - 0.4637712792815169f, - 0.4856175685594023f, - 0.50752069370766872f, - 0.52942045344797806f, - 0.55125643994680196f, - 0.57296847662071559f, - 0.59449705734411495f, - 0.61578378249506627f, - 0.63677178724712891f, - 0.65740615754163356f, - 0.67763432925662526f, - 0.69740646622548552f, - 0.71667581294953808f, - 0.73539901809352737f, - 0.75353642514900732f, - 0.77105232699609816f, - 0.78791518148597028f, - 0.80409778560147072f, - 0.81957740622770781f, - 0.83433586607383625f, - 0.84835958382689225f, - 0.86163956818294229f, - 0.87417136598406997f, - 0.88595496528524853f, - 0.89699465477567619f, - 0.90729884157670959f, - 0.91687983002436779f, - 0.92575356460899649f, - 0.93393934077779084f, - 0.94145948779657318f, - 0.94833902830402828f, - 0.95460531956280026f, - 0.96028768170574896f, - 0.96541701848104766f, - 0.97002543610646474f, - 0.97414586584250062f, - 0.97781169577969584f, - 0.98105641710392333f, - 0.98391328975491177f, - 0.98641503193166202f, - 0.98859353733226141f, - 0.99047962335771556f, - 0.9921028127769449f, - 0.99349115056397752f, - 0.99467105680259038f, - 0.9956672157341897f, - 0.99650250022834352f, - 0.99719793020823266f, - 0.99777266288955657f, - 0.99824401211201486f, - 0.99862749357391212f, - 0.99893689243401962f, - 0.99918434952623147f, - 0.99938046234161726f, - 0.99953439696357238f, - 0.99965400728430465f, - 0.99974595807027455f, - 0.99981584876278362f, - 0.99986833527824281f, - 0.99990724749057802f, - 0.99993570051598468f, - 0.99995619835942084f, - 0.99997072890647543f, - 0.9999808496399144f, - 0.99998776381655818f, - 0.99999238714961569f, - 0.99999540529959718f, - 0.99999732268176988f, - 0.99999850325054862f, - 0.99999920402413744f, - 0.9999996021706401f, - 0.99999981649545566f, - 0.99999992415545547f, - 0.99999997338493041f, - 0.99999999295825959f, - 0.99999999904096815f - }; - float[] KBD_960 = { - 0.0003021562530949f, - 0.0004452267024786f, - 0.0005674947527496f, - 0.0006812465553466f, - 0.0007910496776387f, - 0.0008991655033895f, - 0.0010068978259384f, - 0.0011150758515751f, - 0.0012242653193642f, - 0.0013348735658205f, - 0.0014472068670273f, - 0.0015615039850448f, - 0.0016779568885263f, - 0.0017967241232412f, - 0.0019179397560955f, - 0.0020417195415393f, - 0.0021681652836642f, - 0.0022973679910599f, - 0.0024294102029937f, - 0.0025643677339078f, - 0.0027023110014772f, - 0.0028433060512612f, - 0.0029874153568025f, - 0.0031346984511728f, - 0.0032852124303662f, - 0.0034390123581190f, - 0.0035961515940931f, - 0.0037566820618961f, - 0.0039206544694386f, - 0.0040881184912194f, - 0.0042591229199617f, - 0.0044337157933972f, - 0.0046119445007641f, - 0.0047938558726415f, - 0.0049794962570131f, - 0.0051689115838900f, - 0.0053621474203763f, - 0.0055592490177131f, - 0.0057602613515573f, - 0.0059652291565289f, - 0.0061741969558843f, - 0.0063872090870253f, - 0.0066043097234387f, - 0.0068255428935640f, - 0.0070509524970088f, - 0.0072805823184660f, - 0.0075144760396340f, - 0.0077526772493942f, - 0.0079952294524673f, - 0.0082421760767325f, - 0.0084935604793733f, - 0.0087494259519870f, - 0.0090098157247792f, - 0.0092747729699467f, - 0.0095443408043399f, - 0.0098185622914832f, - 0.0100974804430226f, - 0.0103811382196612f, - 0.0106695785316351f, - 0.0109628442387771f, - 0.0112609781502091f, - 0.0115640230236993f, - 0.0118720215647169f, - 0.0121850164252137f, - 0.0125030502021561f, - 0.0128261654358321f, - 0.0131544046079532f, - 0.0134878101395681f, - 0.0138264243888068f, - 0.0141702896484671f, - 0.0145194481434592f, - 0.0148739420281182f, - 0.0152338133833959f, - 0.0155991042139432f, - 0.0159698564450882f, - 0.0163461119197227f, - 0.0167279123950996f, - 0.0171152995395520f, - 0.0175083149291368f, - 0.0179070000442104f, - 0.0183113962659409f, - 0.0187215448727609f, - 0.0191374870367659f, - 0.0195592638200623f, - 0.0199869161710679f, - 0.0204204849207691f, - 0.0208600107789370f, - 0.0213055343303066f, - 0.0217570960307201f, - 0.0222147362032386f, - 0.0226784950342228f, - 0.0231484125693867f, - 0.0236245287098244f, - 0.0241068832080138f, - 0.0245955156637973f, - 0.0250904655203431f, - 0.0255917720600868f, - 0.0260994744006559f, - 0.0266136114907790f, - 0.0271342221061795f, - 0.0276613448454576f, - 0.0281950181259587f, - 0.0287352801796329f, - 0.0292821690488833f, - 0.0298357225824074f, - 0.0303959784310299f, - 0.0309629740435296f, - 0.0315367466624615f, - 0.0321173333199732f, - 0.0327047708336193f, - 0.0332990958021720f, - 0.0339003446014307f, - 0.0345085533800302f, - 0.0351237580552491f, - 0.0357459943088193f, - 0.0363752975827358f, - 0.0370117030750704f, - 0.0376552457357870f, - 0.0383059602625614f, - 0.0389638810966056f, - 0.0396290424184964f, - 0.0403014781440112f, - 0.0409812219199691f, - 0.0416683071200799f, - 0.0423627668408009f, - 0.0430646338972016f, - 0.0437739408188385f, - 0.0444907198456388f, - 0.0452150029237951f, - 0.0459468217016708f, - 0.0466862075257170f, - 0.0474331914364021f, - 0.0481878041641539f, - 0.0489500761253148f, - 0.0497200374181119f, - 0.0504977178186404f, - 0.0512831467768636f, - 0.0520763534126273f, - 0.0528773665116913f, - 0.0536862145217772f, - 0.0545029255486345f, - 0.0553275273521232f, - 0.0561600473423164f, - 0.0570005125756209f, - 0.0578489497509179f, - 0.0587053852057233f, - 0.0595698449123695f, - 0.0604423544742077f, - 0.0613229391218317f, - 0.0622116237093247f, - 0.0631084327105284f, - 0.0640133902153352f, - 0.0649265199260043f, - 0.0658478451535027f, - 0.0667773888138695f, - 0.0677151734246072f, - 0.0686612211010977f, - 0.0696155535530446f, - 0.0705781920809429f, - 0.0715491575725758f, - 0.0725284704995383f, - 0.0735161509137906f, - 0.0745122184442388f, - 0.0755166922933461f, - 0.0765295912337720f, - 0.0775509336050437f, - 0.0785807373102561f, - 0.0796190198128044f, - 0.0806657981331473f, - 0.0817210888456026f, - 0.0827849080751753f, - 0.0838572714944183f, - 0.0849381943203265f, - 0.0860276913112652f, - 0.0871257767639319f, - 0.0882324645103534f, - 0.0893477679149177f, - 0.0904716998714418f, - 0.0916042728002747f, - 0.0927454986454381f, - 0.0938953888718020f, - 0.0950539544622996f, - 0.0962212059151784f, - 0.0973971532412897f, - 0.0985818059614169f, - 0.0997751731036425f, - 0.1009772632007537f, - 0.1021880842876888f, - 0.1034076438990227f, - 0.1046359490664932f, - 0.1058730063165681f, - 0.1071188216680533f, - 0.1083734006297428f, - 0.1096367481981100f, - 0.1109088688550422f, - 0.1121897665656167f, - 0.1134794447759207f, - 0.1147779064109143f, - 0.1160851538723372f, - 0.1174011890366591f, - 0.1187260132530751f, - 0.1200596273415457f, - 0.1214020315908810f, - 0.1227532257568719f, - 0.1241132090604651f, - 0.1254819801859856f, - 0.1268595372794049f, - 0.1282458779466558f, - 0.1296409992519942f, - 0.1310448977164081f, - 0.1324575693160745f, - 0.1338790094808633f, - 0.1353092130928902f, - 0.1367481744851168f, - 0.1381958874400010f, - 0.1396523451881945f, - 0.1411175404072910f, - 0.1425914652206223f, - 0.1440741111961058f, - 0.1455654693451402f, - 0.1470655301215526f, - 0.1485742834205956f, - 0.1500917185779945f, - 0.1516178243690463f, - 0.1531525890077689f, - 0.1546960001461024f, - 0.1562480448731608f, - 0.1578087097145364f, - 0.1593779806316558f, - 0.1609558430211876f, - 0.1625422817145027f, - 0.1641372809771871f, - 0.1657408245086070f, - 0.1673528954415270f, - 0.1689734763417811f, - 0.1706025492079969f, - 0.1722400954713725f, - 0.1738860959955082f, - 0.1755405310762898f, - 0.1772033804418275f, - 0.1788746232524467f, - 0.1805542381007349f, - 0.1822422030116404f, - 0.1839384954426268f, - 0.1856430922838810f, - 0.1873559698585756f, - 0.1890771039231862f, - 0.1908064696678625f, - 0.1925440417168546f, - 0.1942897941289937f, - 0.1960437003982277f, - 0.1978057334542116f, - 0.1995758656629525f, - 0.2013540688275098f, - 0.2031403141887507f, - 0.2049345724261595f, - 0.2067368136587033f, - 0.2085470074457521f, - 0.2103651227880538f, - 0.2121911281287646f, - 0.2140249913545346f, - 0.2158666797966480f, - 0.2177161602322188f, - 0.2195733988854414f, - 0.2214383614288963f, - 0.2233110129849106f, - 0.2251913181269740f, - 0.2270792408812093f, - 0.2289747447278976f, - 0.2308777926030592f, - 0.2327883469000885f, - 0.2347063694714437f, - 0.2366318216303919f, - 0.2385646641528076f, - 0.2405048572790267f, - 0.2424523607157545f, - 0.2444071336380283f, - 0.2463691346912334f, - 0.2483383219931741f, - 0.2503146531361985f, - 0.2522980851893767f, - 0.2542885747007335f, - 0.2562860776995335f, - 0.2582905496986215f, - 0.2603019456968142f, - 0.2623202201813464f, - 0.2643453271303700f, - 0.2663772200155053f, - 0.2684158518044454f, - 0.2704611749636135f, - 0.2725131414608710f, - 0.2745717027682799f, - 0.2766368098649151f, - 0.2787084132397296f, - 0.2807864628944707f, - 0.2828709083466482f, - 0.2849616986325523f, - 0.2870587823103237f, - 0.2891621074630737f, - 0.2912716217020546f, - 0.2933872721698803f, - 0.2955090055437973f, - 0.2976367680390041f, - 0.2997705054120213f, - 0.3019101629641097f, - 0.3040556855447379f, - 0.3062070175550981f, - 0.3083641029516701f, - 0.3105268852498334f, - 0.3126953075275265f, - 0.3148693124289546f, - 0.3170488421683428f, - 0.3192338385337370f, - 0.3214242428908514f, - 0.3236199961869606f, - 0.3258210389548392f, - 0.3280273113167459f, - 0.3302387529884521f, - 0.3324553032833160f, - 0.3346769011164010f, - 0.3369034850086373f, - 0.3391349930910280f, - 0.3413713631088974f, - 0.3436125324261830f, - 0.3458584380297697f, - 0.3481090165338656f, - 0.3503642041844199f, - 0.3526239368635820f, - 0.3548881500942010f, - 0.3571567790443668f, - 0.3594297585319891f, - 0.3617070230294185f, - 0.3639885066681048f, - 0.3662741432432950f, - 0.3685638662187693f, - 0.3708576087316147f, - 0.3731553035970366f, - 0.3754568833132069f, - 0.3777622800661488f, - 0.3800714257346570f, - 0.3823842518952546f, - 0.3847006898271841f, - 0.3870206705174334f, - 0.3893441246657958f, - 0.3916709826899639f, - 0.3940011747306560f, - 0.3963346306567764f, - 0.3986712800706062f, - 0.4010110523130271f, - 0.4033538764687756f, - 0.4056996813717284f, - 0.4080483956102172f, - 0.4103999475323736f, - 0.4127542652515031f, - 0.4151112766514873f, - 0.4174709093922143f, - 0.4198330909150365f, - 0.4221977484482556f, - 0.4245648090126334f, - 0.4269341994269293f, - 0.4293058463134616f, - 0.4316796761036958f, - 0.4340556150438547f, - 0.4364335892005536f, - 0.4388135244664580f, - 0.4411953465659639f, - 0.4435789810609000f, - 0.4459643533562509f, - 0.4483513887059016f, - 0.4507400122184019f, - 0.4531301488627497f, - 0.4555217234741947f, - 0.4579146607600593f, - 0.4603088853055777f, - 0.4627043215797521f, - 0.4651008939412254f, - 0.4674985266441709f, - 0.4698971438441951f, - 0.4722966696042580f, - 0.4746970279006055f, - 0.4770981426287164f, - 0.4794999376092619f, - 0.4819023365940778f, - 0.4843052632721476f, - 0.4867086412755978f, - 0.4891123941857028f, - 0.4915164455388997f, - 0.4939207188328126f, - 0.4963251375322855f, - 0.4987296250754225f, - 0.5011341048796359f, - 0.5035385003477012f, - 0.5059427348738168f, - 0.5083467318496706f, - 0.5107504146705106f, - 0.5131537067412193f, - 0.5155565314823923f, - 0.5179588123364193f, - 0.5203604727735667f, - 0.5227614362980630f, - 0.5251616264541841f, - 0.5275609668323384f, - 0.5299593810751532f, - 0.5323567928835578f, - 0.5347531260228663f, - 0.5371483043288580f, - 0.5395422517138538f, - 0.5419348921727899f, - 0.5443261497892862f, - 0.5467159487417104f, - 0.5491042133092364f, - 0.5514908678778958f, - 0.5538758369466227f, - 0.5562590451332913f, - 0.5586404171807443f, - 0.5610198779628133f, - 0.5633973524903286f, - 0.5657727659171199f, - 0.5681460435460047f, - 0.5705171108347663f, - 0.5728858934021188f, - 0.5752523170336598f, - 0.5776163076878088f, - 0.5799777915017323f, - 0.5823366947972535f, - 0.5846929440867458f, - 0.5870464660790119f, - 0.5893971876851449f, - 0.5917450360243719f, - 0.5940899384298793f, - 0.5964318224546208f, - 0.5987706158771039f, - 0.6011062467071583f, - 0.6034386431916822f, - 0.6057677338203681f, - 0.6080934473314057f, - 0.6104157127171639f, - 0.6127344592298474f, - 0.6150496163871310f, - 0.6173611139777690f, - 0.6196688820671789f, - 0.6219728510029997f, - 0.6242729514206247f, - 0.6265691142487051f, - 0.6288612707146283f, - 0.6311493523499663f, - 0.6334332909958958f, - 0.6357130188085891f, - 0.6379884682645743f, - 0.6402595721660647f, - 0.6425262636462578f, - 0.6447884761746012f, - 0.6470461435620266f, - 0.6492991999661505f, - 0.6515475798964411f, - 0.6537912182193508f, - 0.6560300501634142f, - 0.6582640113243098f, - 0.6604930376698862f, - 0.6627170655451516f, - 0.6649360316772256f, - 0.6671498731802533f, - 0.6693585275602818f, - 0.6715619327200959f, - 0.6737600269640164f, - 0.6759527490026566f, - 0.6781400379576392f, - 0.6803218333662715f, - 0.6824980751861787f, - 0.6846687037998949f, - 0.6868336600194123f, - 0.6889928850906855f, - 0.6911463206980928f, - 0.6932939089688525f, - 0.6954355924773949f, - 0.6975713142496884f, - 0.6997010177675195f, - 0.7018246469727265f, - 0.7039421462713862f, - 0.7060534605379528f, - 0.7081585351193496f, - 0.7102573158390105f, - 0.7123497490008750f, - 0.7144357813933307f, - 0.7165153602931092f, - 0.7185884334691287f, - 0.7206549491862871f, - 0.7227148562092042f, - 0.7247681038059106f, - 0.7268146417514855f, - 0.7288544203316418f, - 0.7308873903462577f, - 0.7329135031128549f, - 0.7349327104700221f, - 0.7369449647807855f, - 0.7389502189359237f, - 0.7409484263572271f, - 0.7429395410007016f, - 0.7449235173597176f, - 0.7469003104681008f, - 0.7488698759031670f, - 0.7508321697887005f, - 0.7527871487978728f, - 0.7547347701561059f, - 0.7566749916438754f, - 0.7586077715994560f, - 0.7605330689216074f, - 0.7624508430722016f, - 0.7643610540787891f, - 0.7662636625371070f, - 0.7681586296135255f, - 0.7700459170474343f, - 0.7719254871535672f, - 0.7737973028242671f, - 0.7756613275316875f, - 0.7775175253299340f, - 0.7793658608571425f, - 0.7812062993374951f, - 0.7830388065831744f, - 0.7848633489962533f, - 0.7866798935705233f, - 0.7884884078932579f, - 0.7902888601469138f, - 0.7920812191107668f, - 0.7938654541624850f, - 0.7956415352796368f, - 0.7974094330411343f, - 0.7991691186286133f, - 0.8009205638277465f, - 0.8026637410294932f, - 0.8043986232312831f, - 0.8061251840381346f, - 0.8078433976637077f, - 0.8095532389312917f, - 0.8112546832747255f, - 0.8129477067392539f, - 0.8146322859823164f, - 0.8163083982742698f, - 0.8179760214990457f, - 0.8196351341547393f, - 0.8212857153541345f, - 0.8229277448251595f, - 0.8245612029112778f, - 0.8261860705718113f, - 0.8278023293821971f, - 0.8294099615341773f, - 0.8310089498359212f, - 0.8325992777120815f, - 0.8341809292037831f, - 0.8357538889685445f, - 0.8373181422801330f, - 0.8388736750283521f, - 0.8404204737187619f, - 0.8419585254723335f, - 0.8434878180250348f, - 0.8450083397273509f, - 0.8465200795437368f, - 0.8480230270520029f, - 0.8495171724426350f, - 0.8510025065180464f, - 0.8524790206917633f, - 0.8539467069875448f, - 0.8554055580384357f, - 0.8568555670857525f, - 0.8582967279780043f, - 0.8597290351697464f, - 0.8611524837203691f, - 0.8625670692928198f, - 0.8639727881522599f, - 0.8653696371646555f, - 0.8667576137953045f, - 0.8681367161072958f, - 0.8695069427599065f, - 0.8708682930069319f, - 0.8722207666949527f, - 0.8735643642615368f, - 0.8748990867333771f, - 0.8762249357243662f, - 0.8775419134336067f, - 0.8788500226433579f, - 0.8801492667169208f, - 0.8814396495964587f, - 0.8827211758007560f, - 0.8839938504229149f, - 0.8852576791279895f, - 0.8865126681505587f, - 0.8877588242922386f, - 0.8889961549191320f, - 0.8902246679592184f, - 0.8914443718996848f, - 0.8926552757841945f, - 0.8938573892100969f, - 0.8950507223255798f, - 0.8962352858267605f, - 0.8974110909547198f, - 0.8985781494924783f, - 0.8997364737619142f, - 0.9008860766206249f, - 0.9020269714587307f, - 0.9031591721956235f, - 0.9042826932766591f, - 0.9053975496697941f, - 0.9065037568621681f, - 0.9076013308566311f, - 0.9086902881682180f, - 0.9097706458205682f, - 0.9108424213422940f, - 0.9119056327632955f, - 0.9129602986110235f, - 0.9140064379066919f, - 0.9150440701614393f, - 0.9160732153724396f, - 0.9170938940189634f, - 0.9181061270583908f, - 0.9191099359221748f, - 0.9201053425117579f, - 0.9210923691944400f, - 0.9220710387992010f, - 0.9230413746124764f, - 0.9240034003738882f, - 0.9249571402719298f, - 0.9259026189396085f, - 0.9268398614500427f, - 0.9277688933120170f, - 0.9286897404654957f, - 0.9296024292770939f, - 0.9305069865355076f, - 0.9314034394469048f, - 0.9322918156302762f, - 0.9331721431127471f, - 0.9340444503248519f, - 0.9349087660957711f, - 0.9357651196485313f, - 0.9366135405951697f, - 0.9374540589318637f, - 0.9382867050340261f, - 0.9391115096513655f, - 0.9399285039029165f, - 0.9407377192720349f, - 0.9415391876013639f, - 0.9423329410877687f, - 0.9431190122772415f, - 0.9438974340597782f, - 0.9446682396642262f, - 0.9454314626531054f, - 0.9461871369174033f, - 0.9469352966713429f, - 0.9476759764471278f, - 0.9484092110896616f, - 0.9491350357512457f, - 0.9498534858862532f, - 0.9505645972457831f, - 0.9512684058722927f, - 0.9519649480942105f, - 0.9526542605205314f, - 0.9533363800353921f, - 0.9540113437926313f, - 0.9546791892103320f, - 0.9553399539653500f, - 0.9559936759878265f, - 0.9566403934556893f, - 0.9572801447891388f, - 0.9579129686451244f, - 0.9585389039118085f, - 0.9591579897030224f, - 0.9597702653527108f, - 0.9603757704093711f, - 0.9609745446304828f, - 0.9615666279769324f, - 0.9621520606074324f, - 0.9627308828729358f, - 0.9633031353110477f, - 0.9638688586404335f, - 0.9644280937552258f, - 0.9649808817194311f, - 0.9655272637613366f, - 0.9660672812679171f, - 0.9666009757792454f, - 0.9671283889829055f, - 0.9676495627084089f, - 0.9681645389216160f, - 0.9686733597191652f, - 0.9691760673229058f, - 0.9696727040743406f, - 0.9701633124290767f, - 0.9706479349512860f, - 0.9711266143081750f, - 0.9715993932644684f, - 0.9720663146769026f, - 0.9725274214887337f, - 0.9729827567242596f, - 0.9734323634833574f, - 0.9738762849360358f, - 0.9743145643170059f, - 0.9747472449202687f, - 0.9751743700937215f, - 0.9755959832337850f, - 0.9760121277800496f, - 0.9764228472099433f, - 0.9768281850334235f, - 0.9772281847876897f, - 0.9776228900319223f, - 0.9780123443420448f, - 0.9783965913055132f, - 0.9787756745161313f, - 0.9791496375688939f, - 0.9795185240548578f, - 0.9798823775560431f, - 0.9802412416403639f, - 0.9805951598565897f, - 0.9809441757293399f, - 0.9812883327541090f, - 0.9816276743923267f, - 0.9819622440664515f, - 0.9822920851550995f, - 0.9826172409882086f, - 0.9829377548422400f, - 0.9832536699354163f, - 0.9835650294229984f, - 0.9838718763926001f, - 0.9841742538595437f, - 0.9844722047622547f, - 0.9847657719576983f, - 0.9850549982168574f, - 0.9853399262202529f, - 0.9856205985535073f, - 0.9858970577029519f, - 0.9861693460512790f, - 0.9864375058732389f, - 0.9867015793313820f, - 0.9869616084718489f, - 0.9872176352202061f, - 0.9874697013773301f, - 0.9877178486153397f, - 0.9879621184735767f, - 0.9882025523546365f, - 0.9884391915204485f, - 0.9886720770884069f, - 0.9889012500275530f, - 0.9891267511548089f, - 0.9893486211312621f, - 0.9895669004585049f, - 0.9897816294750255f, - 0.9899928483526520f, - 0.9902005970930525f, - 0.9904049155242876f, - 0.9906058432974180f, - 0.9908034198831690f, - 0.9909976845686489f, - 0.9911886764541239f, - 0.9913764344498495f, - 0.9915609972729590f, - 0.9917424034444086f, - 0.9919206912859797f, - 0.9920958989173397f, - 0.9922680642531603f, - 0.9924372250002933f, - 0.9926034186550070f, - 0.9927666825002789f, - 0.9929270536031491f, - 0.9930845688121325f, - 0.9932392647546895f, - 0.9933911778347579f, - 0.9935403442303433f, - 0.9936867998911693f, - 0.9938305805363887f, - 0.9939717216523539f, - 0.9941102584904481f, - 0.9942462260649764f, - 0.9943796591511174f, - 0.9945105922829353f, - 0.9946390597514524f, - 0.9947650956027824f, - 0.9948887336363228f, - 0.9950100074030103f, - 0.9951289502036336f, - 0.9952455950872091f, - 0.9953599748494155f, - 0.9954721220310890f, - 0.9955820689167787f, - 0.9956898475333619f, - 0.9957954896487196f, - 0.9958990267704713f, - 0.9960004901447701f, - 0.9960999107551559f, - 0.9961973193214694f, - 0.9962927462988245f, - 0.9963862218766388f, - 0.9964777759777242f, - 0.9965674382574342f, - 0.9966552381028704f, - 0.9967412046321465f, - 0.9968253666937095f, - 0.9969077528657186f, - 0.9969883914554805f, - 0.9970673104989413f, - 0.9971445377602348f, - 0.9972201007312871f, - 0.9972940266314749f, - 0.9973663424073412f, - 0.9974370747323638f, - 0.9975062500067785f, - 0.9975738943574574f, - 0.9976400336378379f, - 0.9977046934279079f, - 0.9977678990342401f, - 0.9978296754900812f, - 0.9978900475554902f, - 0.9979490397175296f, - 0.9980066761905056f, - 0.9980629809162593f, - 0.9981179775645063f, - 0.9981716895332257f, - 0.9982241399490979f, - 0.9982753516679893f, - 0.9983253472754841f, - 0.9983741490874634f, - 0.9984217791507299f, - 0.9984682592436778f, - 0.9985136108770075f, - 0.9985578552944850f, - 0.9986010134737439f, - 0.9986431061271304f, - 0.9986841537025921f, - 0.9987241763846056f, - 0.9987631940951476f, - 0.9988012264947044f, - 0.9988382929833222f, - 0.9988744127016956f, - 0.9989096045322947f, - 0.9989438871005292f, - 0.9989772787759494f, - 0.9990097976734847f, - 0.9990414616547146f, - 0.9990722883291779f, - 0.9991022950557125f, - 0.9991314989438310f, - 0.9991599168551279f, - 0.9991875654047181f, - 0.9992144609627068f, - 0.9992406196556911f, - 0.9992660573682882f, - 0.9992907897446957f, - 0.9993148321902777f, - 0.9993381998731797f, - 0.9993609077259696f, - 0.9993829704473038f, - 0.9994044025036201f, - 0.9994252181308537f, - 0.9994454313361775f, - 0.9994650558997651f, - 0.9994841053765757f, - 0.9995025930981609f, - 0.9995205321744921f, - 0.9995379354958073f, - 0.9995548157344778f, - 0.9995711853468930f, - 0.9995870565753632f, - 0.9996024414500382f, - 0.9996173517908444f, - 0.9996317992094352f, - 0.9996457951111574f, - 0.9996593506970310f, - 0.9996724769657434f, - 0.9996851847156547f, - 0.9996974845468164f, - 0.9997093868630000f, - 0.9997209018737374f, - 0.9997320395963699f, - 0.9997428098581069f, - 0.9997532222980933f, - 0.9997632863694836f, - 0.9997730113415246f, - 0.9997824063016426f, - 0.9997914801575380f, - 0.9998002416392840f, - 0.9998086993014300f, - 0.9998168615251084f, - 0.9998247365201450f, - 0.9998323323271717f, - 0.9998396568197407f, - 0.9998467177064404f, - 0.9998535225330116f, - 0.9998600786844637f, - 0.9998663933871905f, - 0.9998724737110845f, - 0.9998783265716498f, - 0.9998839587321121f, - 0.9998893768055266f, - 0.9998945872568815f, - 0.9998995964051983f, - 0.9999044104256269f, - 0.9999090353515359f, - 0.9999134770765971f, - 0.9999177413568642f, - 0.9999218338128448f, - 0.9999257599315647f, - 0.9999295250686255f, - 0.9999331344502529f, - 0.9999365931753376f, - 0.9999399062174669f, - 0.9999430784269460f, - 0.9999461145328103f, - 0.9999490191448277f, - 0.9999517967554878f, - 0.9999544517419835f, - 0.9999569883681778f, - 0.9999594107865607f, - 0.9999617230401926f, - 0.9999639290646355f, - 0.9999660326898712f, - 0.9999680376422052f, - 0.9999699475461585f, - 0.9999717659263435f, - 0.9999734962093266f, - 0.9999751417254756f, - 0.9999767057107922f, - 0.9999781913087290f, - 0.9999796015719915f, - 0.9999809394643231f, - 0.9999822078622751f, - 0.9999834095569596f, - 0.9999845472557860f, - 0.9999856235841805f, - 0.9999866410872889f, - 0.9999876022316609f, - 0.9999885094069193f, - 0.9999893649274085f, - 0.9999901710338274f, - 0.9999909298948430f, - 0.9999916436086862f, - 0.9999923142047299f, - 0.9999929436450469f, - 0.9999935338259505f, - 0.9999940865795161f, - 0.9999946036750835f, - 0.9999950868207405f, - 0.9999955376647868f, - 0.9999959577971798f, - 0.9999963487509599f, - 0.9999967120036571f, - 0.9999970489786785f, - 0.9999973610466748f, - 0.9999976495268890f, - 0.9999979156884846f, - 0.9999981607518545f, - 0.9999983858899099f, - 0.9999985922293493f, - 0.9999987808519092f, - 0.9999989527955938f, - 0.9999991090558848f, - 0.9999992505869332f, - 0.9999993783027293f, - 0.9999994930782556f, - 0.9999995957506171f, - 0.9999996871201549f, - 0.9999997679515386f, - 0.9999998389748399f, - 0.9999999008865869f, - 0.9999999543507984f - }; - float[] KBD_120 = { - 0.0000452320086910f, - 0.0001274564692111f, - 0.0002529398385345f, - 0.0004335140496648f, - 0.0006827100966952f, - 0.0010158708222246f, - 0.0014502162869659f, - 0.0020048865156264f, - 0.0027009618393178f, - 0.0035614590925043f, - 0.0046113018122711f, - 0.0058772627936484f, - 0.0073878776584103f, - 0.0091733284512589f, - 0.0112652966728373f, - 0.0136967855861945f, - 0.0165019120857793f, - 0.0197156688892217f, - 0.0233736582950619f, - 0.0275117992367496f, - 0.0321660098468534f, - 0.0373718682174417f, - 0.0431642544948834f, - 0.0495769778717676f, - 0.0566423924273392f, - 0.0643910061132260f, - 0.0728510874761729f, - 0.0820482749475221f, - 0.0920051937045235f, - 0.1027410852163450f, - 0.1142714546239370f, - 0.1266077410648368f, - 0.1397570159398145f, - 0.1537217139274270f, - 0.1684994012857075f, - 0.1840825856392944f, - 0.2004585710384133f, - 0.2176093615976121f, - 0.2355116164824983f, - 0.2541366584185075f, - 0.2734505372545160f, - 0.2934141494343369f, - 0.3139834135200387f, - 0.3351095011824163f, - 0.3567391223361566f, - 0.3788148623608774f, - 0.4012755686250732f, - 0.4240567828288110f, - 0.4470912150133537f, - 0.4703092544619664f, - 0.4936395121456694f, - 0.5170093888596962f, - 0.5403456627591340f, - 0.5635750896430154f, - 0.5866250090612892f, - 0.6094239491338723f, - 0.6319022228794100f, - 0.6539925088563087f, - 0.6756304090216887f, - 0.6967549769155277f, - 0.7173092095766250f, - 0.7372404969921184f, - 0.7565010233699827f, - 0.7750481150999984f, - 0.7928445309277697f, - 0.8098586906021583f, - 0.8260648390616000f, - 0.8414431440907889f, - 0.8559797262966709f, - 0.8696666212110165f, - 0.8825016743142358f, - 0.8944883707784486f, - 0.9056356027326216f, - 0.9159573778427816f, - 0.9254724739583072f, - 0.9342040454819434f, - 0.9421791879559176f, - 0.9494284680976784f, - 0.9559854271440150f, - 0.9618860658493898f, - 0.9671683198119525f, - 0.9718715339497299f, - 0.9760359449042233f, - 0.9797021798981759f, - 0.9829107801140203f, - 0.9857017559923277f, - 0.9881141809867999f, - 0.9901858292742826f, - 0.9919528617340944f, - 0.9934495632180476f, - 0.9947081327749199f, - 0.9957585271195989f, - 0.9966283562984427f, - 0.9973428292485683f, - 0.9979247458259197f, - 0.9983945309245774f, - 0.9987703055583410f, - 0.9990679892449266f, - 0.9993014277313617f, - 0.9994825400228521f, - 0.9996214788122335f, - 0.9997267987294857f, - 0.9998056273097539f, - 0.9998638341781910f, - 0.9999061946325793f, - 0.9999365445321382f, - 0.9999579241373735f, - 0.9999727092594598f, - 0.9999827287418790f, - 0.9999893678912771f, - 0.9999936579844555f, - 0.9999963523959187f, - 0.9999979902130101f, - 0.9999989484358076f, - 0.9999994840031031f, - 0.9999997669534347f, - 0.9999999060327799f, - 0.9999999680107184f, - 0.9999999918774242f, - 0.9999999989770326f - }; + float[] KBD_1024 = { + 0.00029256153896361f, + 0.00042998567353047f, + 0.00054674074589540f, + 0.00065482304299792f, + 0.00075870195068747f, + 0.00086059331713336f, + 0.00096177541439010f, + 0.0010630609410878f, + 0.0011650036308132f, + 0.0012680012194148f, + 0.0013723517232956f, + 0.0014782864109136f, + 0.0015859901976719f, + 0.0016956148252373f, + 0.0018072876903517f, + 0.0019211179405514f, + 0.0020372007924215f, + 0.0021556206591754f, + 0.0022764534599614f, + 0.0023997683540995f, + 0.0025256290631156f, + 0.0026540948920831f, + 0.0027852215281403f, + 0.0029190616715331f, + 0.0030556655443223f, + 0.0031950812943391f, + 0.0033373553240392f, + 0.0034825325586930f, + 0.0036306566699199f, + 0.0037817702604646f, + 0.0039359150179719f, + 0.0040931318437260f, + 0.0042534609610026f, + 0.0044169420066964f, + 0.0045836141091341f, + 0.0047535159544086f, + 0.0049266858431214f, + 0.0051031617390698f, + 0.0052829813111335f, + 0.0054661819693975f, + 0.0056528008963682f, + 0.0058428750739943f, + 0.0060364413070882f, + 0.0062335362436492f, + 0.0064341963925079f, + 0.0066384581386503f, + 0.0068463577565218f, + 0.0070579314215715f, + 0.0072732152202559f, + 0.0074922451586909f, + 0.0077150571701162f, + 0.0079416871213115f, + 0.0081721708180857f, + 0.0084065440099458f, + 0.0086448423940363f, + 0.0088871016184291f, + 0.0091333572848345f, + 0.0093836449507939f, + 0.0096380001314086f, + 0.0098964583006517f, + 0.010159054892306f, + 0.010425825300561f, + 0.010696804880310f, + 0.010972028947167f, + 0.011251532777236f, + 0.011535351606646f, + 0.011823520630897f, + 0.012116075003993f, + 0.012413049837429f, + 0.012714480198999f, + 0.013020401111478f, + 0.013330847551161f, + 0.013645854446288f, + 0.013965456675352f, + 0.014289689065314f, + 0.014618586389712f, + 0.014952183366697f, + 0.015290514656976f, + 0.015633614861688f, + 0.015981518520214f, + 0.016334260107915f, + 0.016691874033817f, + 0.017054394638241f, + 0.017421856190380f, + 0.017794292885832f, + 0.018171738844085f, + 0.018554228105962f, + 0.018941794631032f, + 0.019334472294980f, + 0.019732294886947f, + 0.020135296106839f, + 0.020543509562604f, + 0.020956968767488f, + 0.021375707137257f, + 0.021799757987407f, + 0.022229154530343f, + 0.022663929872540f, + 0.023104117011689f, + 0.023549748833816f, + 0.024000858110398f, + 0.024457477495451f, + 0.024919639522613f, + 0.025387376602207f, + 0.025860721018295f, + 0.026339704925726f, + 0.026824360347160f, + 0.027314719170100f, + 0.027810813143900f, + 0.028312673876775f, + 0.028820332832801f, + 0.029333821328905f, + 0.029853170531859f, + 0.030378411455255f, + 0.030909574956490f, + 0.031446691733739f, + 0.031989792322926f, + 0.032538907094693f, + 0.033094066251369f, + 0.033655299823935f, + 0.034222637668991f, + 0.034796109465717f, + 0.035375744712844f, + 0.035961572725616f, + 0.036553622632758f, + 0.037151923373446f, + 0.037756503694277f, + 0.038367392146243f, + 0.038984617081711f, + 0.039608206651398f, + 0.040238188801359f, + 0.040874591269976f, + 0.041517441584950f, + 0.042166767060301f, + 0.042822594793376f, + 0.043484951661852f, + 0.044153864320760f, + 0.044829359199509f, + 0.045511462498913f, + 0.046200200188234f, + 0.046895598002228f, + 0.047597681438201f, + 0.048306475753074f, + 0.049022005960455f, + 0.049744296827725f, + 0.050473372873129f, + 0.051209258362879f, + 0.051951977308273f, + 0.052701553462813f, + 0.053458010319350f, + 0.054221371107223f, + 0.054991658789428f, + 0.055768896059787f, + 0.056553105340134f, + 0.057344308777513f, + 0.058142528241393f, + 0.058947785320893f, + 0.059760101322019f, + 0.060579497264926f, + 0.061405993881180f, + 0.062239611611049f, + 0.063080370600799f, + 0.063928290700012f, + 0.064783391458919f, + 0.065645692125747f, + 0.066515211644086f, + 0.067391968650269f, + 0.068275981470777f, + 0.069167268119652f, + 0.070065846295935f, + 0.070971733381121f, + 0.071884946436630f, + 0.072805502201299f, + 0.073733417088896f, + 0.074668707185649f, + 0.075611388247794f, + 0.076561475699152f, + 0.077518984628715f, + 0.078483929788261f, + 0.079456325589986f, + 0.080436186104162f, + 0.081423525056808f, + 0.082418355827392f, + 0.083420691446553f, + 0.084430544593841f, + 0.085447927595483f, + 0.086472852422178f, + 0.087505330686900f, + 0.088545373642744f, + 0.089592992180780f, + 0.090648196827937f, + 0.091710997744919f, + 0.092781404724131f, + 0.093859427187640f, + 0.094945074185163f, + 0.096038354392069f, + 0.097139276107423f, + 0.098247847252041f, + 0.099364075366580f, + 0.10048796760965f, + 0.10161953075597f, + 0.10275877119451f, + 0.10390569492671f, + 0.10506030756469f, + 0.10622261432949f, + 0.10739262004941f, + 0.10857032915821f, + 0.10975574569357f, + 0.11094887329534f, + 0.11214971520402f, + 0.11335827425914f, + 0.11457455289772f, + 0.11579855315274f, + 0.11703027665170f, + 0.11826972461510f, + 0.11951689785504f, + 0.12077179677383f, + 0.12203442136263f, + 0.12330477120008f, + 0.12458284545102f, + 0.12586864286523f, + 0.12716216177615f, + 0.12846340009971f, + 0.12977235533312f, + 0.13108902455375f, + 0.13241340441801f, + 0.13374549116025f, + 0.13508528059173f, + 0.13643276809961f, + 0.13778794864595f, + 0.13915081676677f, + 0.14052136657114f, + 0.14189959174027f, + 0.14328548552671f, + 0.14467904075349f, + 0.14608024981336f, + 0.14748910466804f, + 0.14890559684750f, + 0.15032971744929f, + 0.15176145713790f, + 0.15320080614414f, + 0.15464775426459f, + 0.15610229086100f, + 0.15756440485987f, + 0.15903408475193f, + 0.16051131859170f, + 0.16199609399712f, + 0.16348839814917f, + 0.16498821779156f, + 0.16649553923042f, + 0.16801034833404f, + 0.16953263053270f, + 0.17106237081842f, + 0.17259955374484f, + 0.17414416342714f, + 0.17569618354193f, + 0.17725559732720f, + 0.17882238758238f, + 0.18039653666830f, + 0.18197802650733f, + 0.18356683858343f, + 0.18516295394233f, + 0.18676635319174f, + 0.18837701650148f, + 0.18999492360384f, + 0.19162005379380f, + 0.19325238592940f, + 0.19489189843209f, + 0.19653856928714f, + 0.19819237604409f, + 0.19985329581721f, + 0.20152130528605f, + 0.20319638069594f, + 0.20487849785865f, + 0.20656763215298f, + 0.20826375852540f, + 0.20996685149083f, + 0.21167688513330f, + 0.21339383310678f, + 0.21511766863598f, + 0.21684836451719f, + 0.21858589311922f, + 0.22033022638425f, + 0.22208133582887f, + 0.22383919254503f, + 0.22560376720111f, + 0.22737503004300f, + 0.22915295089517f, + 0.23093749916189f, + 0.23272864382838f, + 0.23452635346201f, + 0.23633059621364f, + 0.23814133981883f, + 0.23995855159925f, + 0.24178219846403f, + 0.24361224691114f, + 0.24544866302890f, + 0.24729141249740f, + 0.24914046059007f, + 0.25099577217522f, + 0.25285731171763f, + 0.25472504328019f, + 0.25659893052556f, + 0.25847893671788f, + 0.26036502472451f, + 0.26225715701781f, + 0.26415529567692f, + 0.26605940238966f, + 0.26796943845439f, + 0.26988536478190f, + 0.27180714189742f, + 0.27373472994256f, + 0.27566808867736f, + 0.27760717748238f, + 0.27955195536071f, + 0.28150238094021f, + 0.28345841247557f, + 0.28542000785059f, + 0.28738712458038f, + 0.28935971981364f, + 0.29133775033492f, + 0.29332117256704f, + 0.29530994257338f, + 0.29730401606034f, + 0.29930334837974f, + 0.30130789453132f, + 0.30331760916521f, + 0.30533244658452f, + 0.30735236074785f, + 0.30937730527195f, + 0.31140723343430f, + 0.31344209817583f, + 0.31548185210356f, + 0.31752644749341f, + 0.31957583629288f, + 0.32162997012390f, + 0.32368880028565f, + 0.32575227775738f, + 0.32782035320134f, + 0.32989297696566f, + 0.33197009908736f, + 0.33405166929523f, + 0.33613763701295f, + 0.33822795136203f, + 0.34032256116495f, + 0.34242141494820f, + 0.34452446094547f, + 0.34663164710072f, + 0.34874292107143f, + 0.35085823023181f, + 0.35297752167598f, + 0.35510074222129f, + 0.35722783841160f, + 0.35935875652060f, + 0.36149344255514f, + 0.36363184225864f, + 0.36577390111444f, + 0.36791956434930f, + 0.37006877693676f, + 0.37222148360070f, + 0.37437762881878f, + 0.37653715682603f, + 0.37870001161834f, + 0.38086613695607f, + 0.38303547636766f, + 0.38520797315322f, + 0.38738357038821f, + 0.38956221092708f, + 0.39174383740701f, + 0.39392839225157f, + 0.39611581767449f, + 0.39830605568342f, + 0.40049904808370f, + 0.40269473648218f, + 0.40489306229101f, + 0.40709396673153f, + 0.40929739083810f, + 0.41150327546197f, + 0.41371156127524f, + 0.41592218877472f, + 0.41813509828594f, + 0.42035022996702f, + 0.42256752381274f, + 0.42478691965848f, + 0.42700835718423f, + 0.42923177591866f, + 0.43145711524314f, + 0.43368431439580f, + 0.43591331247564f, + 0.43814404844658f, + 0.44037646114161f, + 0.44261048926688f, + 0.44484607140589f, + 0.44708314602359f, + 0.44932165147057f, + 0.45156152598727f, + 0.45380270770813f, + 0.45604513466581f, + 0.45828874479543f, + 0.46053347593880f, + 0.46277926584861f, + 0.46502605219277f, + 0.46727377255861f, + 0.46952236445718f, + 0.47177176532752f, + 0.47402191254100f, + 0.47627274340557f, + 0.47852419517009f, + 0.48077620502869f, + 0.48302871012505f, + 0.48528164755674f, + 0.48753495437962f, + 0.48978856761212f, + 0.49204242423966f, + 0.49429646121898f, + 0.49655061548250f, + 0.49880482394273f, + 0.50105902349665f, + 0.50331315103004f, + 0.50556714342194f, + 0.50782093754901f, + 0.51007447028990f, + 0.51232767852971f, + 0.51458049916433f, + 0.51683286910489f, + 0.51908472528213f, + 0.52133600465083f, + 0.52358664419420f, + 0.52583658092832f, + 0.52808575190648f, + 0.53033409422367f, + 0.53258154502092f, + 0.53482804148974f, + 0.53707352087652f, + 0.53931792048690f, + 0.54156117769021f, + 0.54380322992385f, + 0.54604401469766f, + 0.54828346959835f, + 0.55052153229384f, + 0.55275814053768f, + 0.55499323217338f, + 0.55722674513883f, + 0.55945861747062f, + 0.56168878730842f, + 0.56391719289930f, + 0.56614377260214f, + 0.56836846489188f, + 0.57059120836390f, + 0.57281194173835f, + 0.57503060386439f, + 0.57724713372458f, + 0.57946147043912f, + 0.58167355327012f, + 0.58388332162591f, + 0.58609071506528f, + 0.58829567330173f, + 0.59049813620770f, + 0.59269804381879f, + 0.59489533633802f, + 0.59708995413996f, + 0.59928183777495f, + 0.60147092797329f, + 0.60365716564937f, + 0.60584049190582f, + 0.60802084803764f, + 0.61019817553632f, + 0.61237241609393f, + 0.61454351160718f, + 0.61671140418155f, + 0.61887603613527f, + 0.62103735000336f, + 0.62319528854167f, + 0.62534979473088f, + 0.62750081178042f, + 0.62964828313250f, + 0.63179215246597f, + 0.63393236370030f, + 0.63606886099946f, + 0.63820158877577f, + 0.64033049169379f, + 0.64245551467413f, + 0.64457660289729f, + 0.64669370180740f, + 0.64880675711607f, + 0.65091571480603f, + 0.65302052113494f, + 0.65512112263906f, + 0.65721746613689f, + 0.65930949873289f, + 0.66139716782102f, + 0.66348042108842f, + 0.66555920651892f, + 0.66763347239664f, + 0.66970316730947f, + 0.67176824015260f, + 0.67382864013196f, + 0.67588431676768f, + 0.67793521989751f, + 0.67998129968017f, + 0.68202250659876f, + 0.68405879146403f, + 0.68609010541774f, + 0.68811639993588f, + 0.69013762683195f, + 0.69215373826012f, + 0.69416468671849f, + 0.69617042505214f, + 0.69817090645634f, + 0.70016608447958f, + 0.70215591302664f, + 0.70414034636163f, + 0.70611933911096f, + 0.70809284626630f, + 0.71006082318751f, + 0.71202322560554f, + 0.71398000962530f, + 0.71593113172842f, + 0.71787654877613f, + 0.71981621801195f, + 0.72175009706445f, + 0.72367814394990f, + 0.72560031707496f, + 0.72751657523927f, + 0.72942687763803f, + 0.73133118386457f, + 0.73322945391280f, + 0.73512164817975f, + 0.73700772746796f, + 0.73888765298787f, + 0.74076138636020f, + 0.74262888961827f, + 0.74449012521027f, + 0.74634505600152f, + 0.74819364527663f, + 0.75003585674175f, + 0.75187165452661f, + 0.75370100318668f, + 0.75552386770515f, + 0.75734021349500f, + 0.75915000640095f, + 0.76095321270137f, + 0.76274979911019f, + 0.76453973277875f, + 0.76632298129757f, + 0.76809951269819f, + 0.76986929545481f, + 0.77163229848604f, + 0.77338849115651f, + 0.77513784327849f, + 0.77688032511340f, + 0.77861590737340f, + 0.78034456122283f, + 0.78206625827961f, + 0.78378097061667f, + 0.78548867076330f, + 0.78718933170643f, + 0.78888292689189f, + 0.79056943022564f, + 0.79224881607494f, + 0.79392105926949f, + 0.79558613510249f, + 0.79724401933170f, + 0.79889468818046f, + 0.80053811833858f, + 0.80217428696334f, + 0.80380317168028f, + 0.80542475058405f, + 0.80703900223920f, + 0.80864590568089f, + 0.81024544041560f, + 0.81183758642175f, + 0.81342232415032f, + 0.81499963452540f, + 0.81656949894467f, + 0.81813189927991f, + 0.81968681787738f, + 0.82123423755821f, + 0.82277414161874f, + 0.82430651383076f, + 0.82583133844180f, + 0.82734860017528f, + 0.82885828423070f, + 0.83036037628369f, + 0.83185486248609f, + 0.83334172946597f, + 0.83482096432759f, + 0.83629255465130f, + 0.83775648849344f, + 0.83921275438615f, + 0.84066134133716f, + 0.84210223882952f, + 0.84353543682130f, + 0.84496092574524f, + 0.84637869650833f, + 0.84778874049138f, + 0.84919104954855f, + 0.85058561600677f, + 0.85197243266520f, + 0.85335149279457f, + 0.85472279013653f, + 0.85608631890295f, + 0.85744207377513f, + 0.85879004990298f, + 0.86013024290422f, + 0.86146264886346f, + 0.86278726433124f, + 0.86410408632306f, + 0.86541311231838f, + 0.86671434025950f, + 0.86800776855046f, + 0.86929339605590f, + 0.87057122209981f, + 0.87184124646433f, + 0.87310346938840f, + 0.87435789156650f, + 0.87560451414719f, + 0.87684333873173f, + 0.87807436737261f, + 0.87929760257204f, + 0.88051304728038f, + 0.88172070489456f, + 0.88292057925645f, + 0.88411267465117f, + 0.88529699580537f, + 0.88647354788545f, + 0.88764233649580f, + 0.88880336767692f, + 0.88995664790351f, + 0.89110218408260f, + 0.89223998355154f, + 0.89337005407600f, + 0.89449240384793f, + 0.89560704148345f, + 0.89671397602074f, + 0.89781321691786f, + 0.89890477405053f, + 0.89998865770993f, + 0.90106487860034f, + 0.90213344783689f, + 0.90319437694315f, + 0.90424767784873f, + 0.90529336288690f, + 0.90633144479201f, + 0.90736193669708f, + 0.90838485213119f, + 0.90940020501694f, + 0.91040800966776f, + 0.91140828078533f, + 0.91240103345685f, + 0.91338628315231f, + 0.91436404572173f, + 0.91533433739238f, + 0.91629717476594f, + 0.91725257481564f, + 0.91820055488334f, + 0.91914113267664f, + 0.92007432626589f, + 0.92100015408120f, + 0.92191863490944f, + 0.92282978789113f, + 0.92373363251740f, + 0.92463018862687f, + 0.92551947640245f, + 0.92640151636824f, + 0.92727632938624f, + 0.92814393665320f, + 0.92900435969727f, + 0.92985762037477f, + 0.93070374086684f, + 0.93154274367610f, + 0.93237465162328f, + 0.93319948784382f, + 0.93401727578443f, + 0.93482803919967f, + 0.93563180214841f, + 0.93642858899043f, + 0.93721842438279f, + 0.93800133327637f, + 0.93877734091223f, + 0.93954647281807f, + 0.94030875480458f, + 0.94106421296182f, + 0.94181287365556f, + 0.94255476352362f, + 0.94328990947213f, + 0.94401833867184f, + 0.94474007855439f, + 0.94545515680855f, + 0.94616360137644f, + 0.94686544044975f, + 0.94756070246592f, + 0.94824941610434f, + 0.94893161028248f, + 0.94960731415209f, + 0.95027655709525f, + 0.95093936872056f, + 0.95159577885924f, + 0.95224581756115f, + 0.95288951509097f, + 0.95352690192417f, + 0.95415800874314f, + 0.95478286643320f, + 0.95540150607863f, + 0.95601395895871f, + 0.95662025654373f, + 0.95722043049100f, + 0.95781451264084f, + 0.95840253501260f, + 0.95898452980058f, + 0.95956052937008f, + 0.96013056625336f, + 0.96069467314557f, + 0.96125288290073f, + 0.96180522852773f, + 0.96235174318622f, + 0.96289246018262f, + 0.96342741296604f, + 0.96395663512424f, + 0.96448016037959f, + 0.96499802258499f, + 0.96551025571985f, + 0.96601689388602f, + 0.96651797130376f, + 0.96701352230768f, + 0.96750358134269f, + 0.96798818295998f, + 0.96846736181297f, + 0.96894115265327f, + 0.96940959032667f, + 0.96987270976912f, + 0.97033054600270f, + 0.97078313413161f, + 0.97123050933818f, + 0.97167270687887f, + 0.97210976208030f, + 0.97254171033525f, + 0.97296858709871f, + 0.97339042788392f, + 0.97380726825843f, + 0.97421914384017f, + 0.97462609029350f, + 0.97502814332534f, + 0.97542533868127f, + 0.97581771214160f, + 0.97620529951759f, + 0.97658813664749f, + 0.97696625939282f, + 0.97733970363445f, + 0.97770850526884f, + 0.97807270020427f, + 0.97843232435704f, + 0.97878741364771f, + 0.97913800399743f, + 0.97948413132414f, + 0.97982583153895f, + 0.98016314054243f, + 0.98049609422096f, + 0.98082472844313f, + 0.98114907905608f, + 0.98146918188197f, + 0.98178507271438f, + 0.98209678731477f, + 0.98240436140902f, + 0.98270783068385f, + 0.98300723078342f, + 0.98330259730589f, + 0.98359396579995f, + 0.98388137176152f, + 0.98416485063031f, + 0.98444443778651f, + 0.98472016854752f, + 0.98499207816463f, + 0.98526020181980f, + 0.98552457462240f, + 0.98578523160609f, + 0.98604220772560f, + 0.98629553785362f, + 0.98654525677772f, + 0.98679139919726f, + 0.98703399972035f, + 0.98727309286089f, + 0.98750871303556f, + 0.98774089456089f, + 0.98796967165036f, + 0.98819507841154f, + 0.98841714884323f, + 0.98863591683269f, + 0.98885141615285f, + 0.98906368045957f, + 0.98927274328896f, + 0.98947863805473f, + 0.98968139804554f, + 0.98988105642241f, + 0.99007764621618f, + 0.99027120032501f, + 0.99046175151186f, + 0.99064933240208f, + 0.99083397548099f, + 0.99101571309153f, + 0.99119457743191f, + 0.99137060055337f, + 0.99154381435784f, + 0.99171425059582f, + 0.99188194086414f, + 0.99204691660388f, + 0.99220920909823f, + 0.99236884947045f, + 0.99252586868186f, + 0.99268029752989f, + 0.99283216664606f, + 0.99298150649419f, + 0.99312834736847f, + 0.99327271939167f, + 0.99341465251338f, + 0.99355417650825f, + 0.99369132097430f, + 0.99382611533130f, + 0.99395858881910f, + 0.99408877049612f, + 0.99421668923778f, + 0.99434237373503f, + 0.99446585249289f, + 0.99458715382906f, + 0.99470630587254f, + 0.99482333656229f, + 0.99493827364600f, + 0.99505114467878f, + 0.99516197702200f, + 0.99527079784214f, + 0.99537763410962f, + 0.99548251259777f, + 0.99558545988178f, + 0.99568650233767f, + 0.99578566614138f, + 0.99588297726783f, + 0.99597846149005f, + 0.99607214437834f, + 0.99616405129947f, + 0.99625420741595f, + 0.99634263768527f, + 0.99642936685928f, + 0.99651441948352f, + 0.99659781989663f, + 0.99667959222978f, + 0.99675976040620f, + 0.99683834814063f, + 0.99691537893895f, + 0.99699087609774f, + 0.99706486270391f, + 0.99713736163442f, + 0.99720839555593f, + 0.99727798692461f, + 0.99734615798589f, + 0.99741293077431f, + 0.99747832711337f, + 0.99754236861541f, + 0.99760507668158f, + 0.99766647250181f, + 0.99772657705478f, + 0.99778541110799f, + 0.99784299521785f, + 0.99789934972976f, + 0.99795449477828f, + 0.99800845028730f, + 0.99806123597027f, + 0.99811287133042f, + 0.99816337566108f, + 0.99821276804596f, + 0.99826106735952f, + 0.99830829226732f, + 0.99835446122649f, + 0.99839959248609f, + 0.99844370408765f, + 0.99848681386566f, + 0.99852893944805f, + 0.99857009825685f, + 0.99861030750869f, + 0.99864958421549f, + 0.99868794518504f, + 0.99872540702178f, + 0.99876198612738f, + 0.99879769870160f, + 0.99883256074295f, + 0.99886658804953f, + 0.99889979621983f, + 0.99893220065356f, + 0.99896381655254f, + 0.99899465892154f, + 0.99902474256924f, + 0.99905408210916f, + 0.99908269196056f, + 0.99911058634952f, + 0.99913777930986f, + 0.99916428468421f, + 0.99919011612505f, + 0.99921528709576f, + 0.99923981087174f, + 0.99926370054150f, + 0.99928696900779f, + 0.99930962898876f, + 0.99933169301910f, + 0.99935317345126f, + 0.99937408245662f, + 0.99939443202674f, + 0.99941423397457f, + 0.99943349993572f, + 0.99945224136972f, + 0.99947046956130f, + 0.99948819562171f, + 0.99950543049000f, + 0.99952218493439f, + 0.99953846955355f, + 0.99955429477803f, + 0.99956967087154f, + 0.99958460793242f, + 0.99959911589494f, + 0.99961320453077f, + 0.99962688345035f, + 0.99964016210433f, + 0.99965304978499f, + 0.99966555562769f, + 0.99967768861231f, + 0.99968945756473f, + 0.99970087115825f, + 0.99971193791510f, + 0.99972266620792f, + 0.99973306426121f, + 0.99974314015288f, + 0.99975290181568f, + 0.99976235703876f, + 0.99977151346914f, + 0.99978037861326f, + 0.99978895983845f, + 0.99979726437448f, + 0.99980529931507f, + 0.99981307161943f, + 0.99982058811377f, + 0.99982785549283f, + 0.99983488032144f, + 0.99984166903600f, + 0.99984822794606f, + 0.99985456323584f, + 0.99986068096572f, + 0.99986658707386f, + 0.99987228737764f, + 0.99987778757524f, + 0.99988309324717f, + 0.99988820985777f, + 0.99989314275675f, + 0.99989789718072f, + 0.99990247825468f, + 0.99990689099357f, + 0.99991114030376f, + 0.99991523098456f, + 0.99991916772971f, + 0.99992295512891f, + 0.99992659766930f, + 0.99993009973692f, + 0.99993346561824f, + 0.99993669950161f, + 0.99993980547870f, + 0.99994278754604f, + 0.99994564960642f, + 0.99994839547033f, + 0.99995102885747f, + 0.99995355339809f, + 0.99995597263451f, + 0.99995829002249f, + 0.99996050893264f, + 0.99996263265183f, + 0.99996466438460f, + 0.99996660725452f, + 0.99996846430558f, + 0.99997023850356f, + 0.99997193273736f, + 0.99997354982037f, + 0.99997509249183f, + 0.99997656341810f, + 0.99997796519400f, + 0.99997930034415f, + 0.99998057132421f, + 0.99998178052220f, + 0.99998293025975f, + 0.99998402279338f, + 0.99998506031574f, + 0.99998604495686f, + 0.99998697878536f, + 0.99998786380966f, + 0.99998870197921f, + 0.99998949518567f, + 0.99999024526408f, + 0.99999095399401f, + 0.99999162310077f, + 0.99999225425649f, + 0.99999284908128f, + 0.99999340914435f, + 0.99999393596510f, + 0.99999443101421f, + 0.99999489571473f, + 0.99999533144314f, + 0.99999573953040f, + 0.99999612126300f, + 0.99999647788395f, + 0.99999681059383f, + 0.99999712055178f, + 0.99999740887647f, + 0.99999767664709f, + 0.99999792490431f, + 0.99999815465123f, + 0.99999836685427f, + 0.99999856244415f, + 0.99999874231676f, + 0.99999890733405f, + 0.99999905832493f, + 0.99999919608613f, + 0.99999932138304f, + 0.99999943495056f, + 0.99999953749392f, + 0.99999962968950f, + 0.99999971218563f, + 0.99999978560337f, + 0.99999985053727f, + 0.99999990755616f, + 0.99999995720387f + }; + float[] KBD_128 = { + 4.3795702929468881e-005f, + 0.00011867384265436617f, + 0.0002307165763996192f, + 0.00038947282760568383f, + 0.00060581272288302553f, + 0.00089199695169487453f, + 0.0012617254423430522f, + 0.0017301724373162003f, + 0.0023140071937421476f, + 0.0030313989666022221f, + 0.0039020049735530842f, + 0.0049469401815512024f, + 0.0061887279335368318f, + 0.0076512306364647726f, + 0.0093595599562652423f, + 0.011339966208377799f, + 0.013619706891715299f, + 0.016226894586323766f, + 0.019190324717288168f, + 0.022539283975960878f, + 0.026303340480472455f, + 0.030512117046644357f, + 0.03519504922365594f, + 0.040381130021856941f, + 0.046098643518702249f, + 0.052374889768730587f, + 0.059235903660769147f, + 0.066706170556282418f, + 0.074808341703430481f, + 0.083562952548726227f, + 0.092988147159339674f, + 0.1030994120216919f, + 0.11390932249409955f, + 0.12542730516149531f, + 0.13765941926783826f, + 0.15060816028651081f, + 0.16427228853114245f, + 0.17864668550988483f, + 0.19372224048676889f, + 0.20948576943658073f, + 0.22591996826744942f, + 0.24300340184133981f, + 0.26071052995068139f, + 0.27901177101369551f, + 0.29787360383626599f, + 0.3172587073594233f, + 0.33712613787396362f, + 0.35743154274286698f, + 0.37812740923363009f, + 0.39916334663203618f, + 0.42048639939189658f, + 0.4420413886774246f, + 0.4637712792815169f, + 0.4856175685594023f, + 0.50752069370766872f, + 0.52942045344797806f, + 0.55125643994680196f, + 0.57296847662071559f, + 0.59449705734411495f, + 0.61578378249506627f, + 0.63677178724712891f, + 0.65740615754163356f, + 0.67763432925662526f, + 0.69740646622548552f, + 0.71667581294953808f, + 0.73539901809352737f, + 0.75353642514900732f, + 0.77105232699609816f, + 0.78791518148597028f, + 0.80409778560147072f, + 0.81957740622770781f, + 0.83433586607383625f, + 0.84835958382689225f, + 0.86163956818294229f, + 0.87417136598406997f, + 0.88595496528524853f, + 0.89699465477567619f, + 0.90729884157670959f, + 0.91687983002436779f, + 0.92575356460899649f, + 0.93393934077779084f, + 0.94145948779657318f, + 0.94833902830402828f, + 0.95460531956280026f, + 0.96028768170574896f, + 0.96541701848104766f, + 0.97002543610646474f, + 0.97414586584250062f, + 0.97781169577969584f, + 0.98105641710392333f, + 0.98391328975491177f, + 0.98641503193166202f, + 0.98859353733226141f, + 0.99047962335771556f, + 0.9921028127769449f, + 0.99349115056397752f, + 0.99467105680259038f, + 0.9956672157341897f, + 0.99650250022834352f, + 0.99719793020823266f, + 0.99777266288955657f, + 0.99824401211201486f, + 0.99862749357391212f, + 0.99893689243401962f, + 0.99918434952623147f, + 0.99938046234161726f, + 0.99953439696357238f, + 0.99965400728430465f, + 0.99974595807027455f, + 0.99981584876278362f, + 0.99986833527824281f, + 0.99990724749057802f, + 0.99993570051598468f, + 0.99995619835942084f, + 0.99997072890647543f, + 0.9999808496399144f, + 0.99998776381655818f, + 0.99999238714961569f, + 0.99999540529959718f, + 0.99999732268176988f, + 0.99999850325054862f, + 0.99999920402413744f, + 0.9999996021706401f, + 0.99999981649545566f, + 0.99999992415545547f, + 0.99999997338493041f, + 0.99999999295825959f, + 0.99999999904096815f + }; + float[] KBD_960 = { + 0.0003021562530949f, + 0.0004452267024786f, + 0.0005674947527496f, + 0.0006812465553466f, + 0.0007910496776387f, + 0.0008991655033895f, + 0.0010068978259384f, + 0.0011150758515751f, + 0.0012242653193642f, + 0.0013348735658205f, + 0.0014472068670273f, + 0.0015615039850448f, + 0.0016779568885263f, + 0.0017967241232412f, + 0.0019179397560955f, + 0.0020417195415393f, + 0.0021681652836642f, + 0.0022973679910599f, + 0.0024294102029937f, + 0.0025643677339078f, + 0.0027023110014772f, + 0.0028433060512612f, + 0.0029874153568025f, + 0.0031346984511728f, + 0.0032852124303662f, + 0.0034390123581190f, + 0.0035961515940931f, + 0.0037566820618961f, + 0.0039206544694386f, + 0.0040881184912194f, + 0.0042591229199617f, + 0.0044337157933972f, + 0.0046119445007641f, + 0.0047938558726415f, + 0.0049794962570131f, + 0.0051689115838900f, + 0.0053621474203763f, + 0.0055592490177131f, + 0.0057602613515573f, + 0.0059652291565289f, + 0.0061741969558843f, + 0.0063872090870253f, + 0.0066043097234387f, + 0.0068255428935640f, + 0.0070509524970088f, + 0.0072805823184660f, + 0.0075144760396340f, + 0.0077526772493942f, + 0.0079952294524673f, + 0.0082421760767325f, + 0.0084935604793733f, + 0.0087494259519870f, + 0.0090098157247792f, + 0.0092747729699467f, + 0.0095443408043399f, + 0.0098185622914832f, + 0.0100974804430226f, + 0.0103811382196612f, + 0.0106695785316351f, + 0.0109628442387771f, + 0.0112609781502091f, + 0.0115640230236993f, + 0.0118720215647169f, + 0.0121850164252137f, + 0.0125030502021561f, + 0.0128261654358321f, + 0.0131544046079532f, + 0.0134878101395681f, + 0.0138264243888068f, + 0.0141702896484671f, + 0.0145194481434592f, + 0.0148739420281182f, + 0.0152338133833959f, + 0.0155991042139432f, + 0.0159698564450882f, + 0.0163461119197227f, + 0.0167279123950996f, + 0.0171152995395520f, + 0.0175083149291368f, + 0.0179070000442104f, + 0.0183113962659409f, + 0.0187215448727609f, + 0.0191374870367659f, + 0.0195592638200623f, + 0.0199869161710679f, + 0.0204204849207691f, + 0.0208600107789370f, + 0.0213055343303066f, + 0.0217570960307201f, + 0.0222147362032386f, + 0.0226784950342228f, + 0.0231484125693867f, + 0.0236245287098244f, + 0.0241068832080138f, + 0.0245955156637973f, + 0.0250904655203431f, + 0.0255917720600868f, + 0.0260994744006559f, + 0.0266136114907790f, + 0.0271342221061795f, + 0.0276613448454576f, + 0.0281950181259587f, + 0.0287352801796329f, + 0.0292821690488833f, + 0.0298357225824074f, + 0.0303959784310299f, + 0.0309629740435296f, + 0.0315367466624615f, + 0.0321173333199732f, + 0.0327047708336193f, + 0.0332990958021720f, + 0.0339003446014307f, + 0.0345085533800302f, + 0.0351237580552491f, + 0.0357459943088193f, + 0.0363752975827358f, + 0.0370117030750704f, + 0.0376552457357870f, + 0.0383059602625614f, + 0.0389638810966056f, + 0.0396290424184964f, + 0.0403014781440112f, + 0.0409812219199691f, + 0.0416683071200799f, + 0.0423627668408009f, + 0.0430646338972016f, + 0.0437739408188385f, + 0.0444907198456388f, + 0.0452150029237951f, + 0.0459468217016708f, + 0.0466862075257170f, + 0.0474331914364021f, + 0.0481878041641539f, + 0.0489500761253148f, + 0.0497200374181119f, + 0.0504977178186404f, + 0.0512831467768636f, + 0.0520763534126273f, + 0.0528773665116913f, + 0.0536862145217772f, + 0.0545029255486345f, + 0.0553275273521232f, + 0.0561600473423164f, + 0.0570005125756209f, + 0.0578489497509179f, + 0.0587053852057233f, + 0.0595698449123695f, + 0.0604423544742077f, + 0.0613229391218317f, + 0.0622116237093247f, + 0.0631084327105284f, + 0.0640133902153352f, + 0.0649265199260043f, + 0.0658478451535027f, + 0.0667773888138695f, + 0.0677151734246072f, + 0.0686612211010977f, + 0.0696155535530446f, + 0.0705781920809429f, + 0.0715491575725758f, + 0.0725284704995383f, + 0.0735161509137906f, + 0.0745122184442388f, + 0.0755166922933461f, + 0.0765295912337720f, + 0.0775509336050437f, + 0.0785807373102561f, + 0.0796190198128044f, + 0.0806657981331473f, + 0.0817210888456026f, + 0.0827849080751753f, + 0.0838572714944183f, + 0.0849381943203265f, + 0.0860276913112652f, + 0.0871257767639319f, + 0.0882324645103534f, + 0.0893477679149177f, + 0.0904716998714418f, + 0.0916042728002747f, + 0.0927454986454381f, + 0.0938953888718020f, + 0.0950539544622996f, + 0.0962212059151784f, + 0.0973971532412897f, + 0.0985818059614169f, + 0.0997751731036425f, + 0.1009772632007537f, + 0.1021880842876888f, + 0.1034076438990227f, + 0.1046359490664932f, + 0.1058730063165681f, + 0.1071188216680533f, + 0.1083734006297428f, + 0.1096367481981100f, + 0.1109088688550422f, + 0.1121897665656167f, + 0.1134794447759207f, + 0.1147779064109143f, + 0.1160851538723372f, + 0.1174011890366591f, + 0.1187260132530751f, + 0.1200596273415457f, + 0.1214020315908810f, + 0.1227532257568719f, + 0.1241132090604651f, + 0.1254819801859856f, + 0.1268595372794049f, + 0.1282458779466558f, + 0.1296409992519942f, + 0.1310448977164081f, + 0.1324575693160745f, + 0.1338790094808633f, + 0.1353092130928902f, + 0.1367481744851168f, + 0.1381958874400010f, + 0.1396523451881945f, + 0.1411175404072910f, + 0.1425914652206223f, + 0.1440741111961058f, + 0.1455654693451402f, + 0.1470655301215526f, + 0.1485742834205956f, + 0.1500917185779945f, + 0.1516178243690463f, + 0.1531525890077689f, + 0.1546960001461024f, + 0.1562480448731608f, + 0.1578087097145364f, + 0.1593779806316558f, + 0.1609558430211876f, + 0.1625422817145027f, + 0.1641372809771871f, + 0.1657408245086070f, + 0.1673528954415270f, + 0.1689734763417811f, + 0.1706025492079969f, + 0.1722400954713725f, + 0.1738860959955082f, + 0.1755405310762898f, + 0.1772033804418275f, + 0.1788746232524467f, + 0.1805542381007349f, + 0.1822422030116404f, + 0.1839384954426268f, + 0.1856430922838810f, + 0.1873559698585756f, + 0.1890771039231862f, + 0.1908064696678625f, + 0.1925440417168546f, + 0.1942897941289937f, + 0.1960437003982277f, + 0.1978057334542116f, + 0.1995758656629525f, + 0.2013540688275098f, + 0.2031403141887507f, + 0.2049345724261595f, + 0.2067368136587033f, + 0.2085470074457521f, + 0.2103651227880538f, + 0.2121911281287646f, + 0.2140249913545346f, + 0.2158666797966480f, + 0.2177161602322188f, + 0.2195733988854414f, + 0.2214383614288963f, + 0.2233110129849106f, + 0.2251913181269740f, + 0.2270792408812093f, + 0.2289747447278976f, + 0.2308777926030592f, + 0.2327883469000885f, + 0.2347063694714437f, + 0.2366318216303919f, + 0.2385646641528076f, + 0.2405048572790267f, + 0.2424523607157545f, + 0.2444071336380283f, + 0.2463691346912334f, + 0.2483383219931741f, + 0.2503146531361985f, + 0.2522980851893767f, + 0.2542885747007335f, + 0.2562860776995335f, + 0.2582905496986215f, + 0.2603019456968142f, + 0.2623202201813464f, + 0.2643453271303700f, + 0.2663772200155053f, + 0.2684158518044454f, + 0.2704611749636135f, + 0.2725131414608710f, + 0.2745717027682799f, + 0.2766368098649151f, + 0.2787084132397296f, + 0.2807864628944707f, + 0.2828709083466482f, + 0.2849616986325523f, + 0.2870587823103237f, + 0.2891621074630737f, + 0.2912716217020546f, + 0.2933872721698803f, + 0.2955090055437973f, + 0.2976367680390041f, + 0.2997705054120213f, + 0.3019101629641097f, + 0.3040556855447379f, + 0.3062070175550981f, + 0.3083641029516701f, + 0.3105268852498334f, + 0.3126953075275265f, + 0.3148693124289546f, + 0.3170488421683428f, + 0.3192338385337370f, + 0.3214242428908514f, + 0.3236199961869606f, + 0.3258210389548392f, + 0.3280273113167459f, + 0.3302387529884521f, + 0.3324553032833160f, + 0.3346769011164010f, + 0.3369034850086373f, + 0.3391349930910280f, + 0.3413713631088974f, + 0.3436125324261830f, + 0.3458584380297697f, + 0.3481090165338656f, + 0.3503642041844199f, + 0.3526239368635820f, + 0.3548881500942010f, + 0.3571567790443668f, + 0.3594297585319891f, + 0.3617070230294185f, + 0.3639885066681048f, + 0.3662741432432950f, + 0.3685638662187693f, + 0.3708576087316147f, + 0.3731553035970366f, + 0.3754568833132069f, + 0.3777622800661488f, + 0.3800714257346570f, + 0.3823842518952546f, + 0.3847006898271841f, + 0.3870206705174334f, + 0.3893441246657958f, + 0.3916709826899639f, + 0.3940011747306560f, + 0.3963346306567764f, + 0.3986712800706062f, + 0.4010110523130271f, + 0.4033538764687756f, + 0.4056996813717284f, + 0.4080483956102172f, + 0.4103999475323736f, + 0.4127542652515031f, + 0.4151112766514873f, + 0.4174709093922143f, + 0.4198330909150365f, + 0.4221977484482556f, + 0.4245648090126334f, + 0.4269341994269293f, + 0.4293058463134616f, + 0.4316796761036958f, + 0.4340556150438547f, + 0.4364335892005536f, + 0.4388135244664580f, + 0.4411953465659639f, + 0.4435789810609000f, + 0.4459643533562509f, + 0.4483513887059016f, + 0.4507400122184019f, + 0.4531301488627497f, + 0.4555217234741947f, + 0.4579146607600593f, + 0.4603088853055777f, + 0.4627043215797521f, + 0.4651008939412254f, + 0.4674985266441709f, + 0.4698971438441951f, + 0.4722966696042580f, + 0.4746970279006055f, + 0.4770981426287164f, + 0.4794999376092619f, + 0.4819023365940778f, + 0.4843052632721476f, + 0.4867086412755978f, + 0.4891123941857028f, + 0.4915164455388997f, + 0.4939207188328126f, + 0.4963251375322855f, + 0.4987296250754225f, + 0.5011341048796359f, + 0.5035385003477012f, + 0.5059427348738168f, + 0.5083467318496706f, + 0.5107504146705106f, + 0.5131537067412193f, + 0.5155565314823923f, + 0.5179588123364193f, + 0.5203604727735667f, + 0.5227614362980630f, + 0.5251616264541841f, + 0.5275609668323384f, + 0.5299593810751532f, + 0.5323567928835578f, + 0.5347531260228663f, + 0.5371483043288580f, + 0.5395422517138538f, + 0.5419348921727899f, + 0.5443261497892862f, + 0.5467159487417104f, + 0.5491042133092364f, + 0.5514908678778958f, + 0.5538758369466227f, + 0.5562590451332913f, + 0.5586404171807443f, + 0.5610198779628133f, + 0.5633973524903286f, + 0.5657727659171199f, + 0.5681460435460047f, + 0.5705171108347663f, + 0.5728858934021188f, + 0.5752523170336598f, + 0.5776163076878088f, + 0.5799777915017323f, + 0.5823366947972535f, + 0.5846929440867458f, + 0.5870464660790119f, + 0.5893971876851449f, + 0.5917450360243719f, + 0.5940899384298793f, + 0.5964318224546208f, + 0.5987706158771039f, + 0.6011062467071583f, + 0.6034386431916822f, + 0.6057677338203681f, + 0.6080934473314057f, + 0.6104157127171639f, + 0.6127344592298474f, + 0.6150496163871310f, + 0.6173611139777690f, + 0.6196688820671789f, + 0.6219728510029997f, + 0.6242729514206247f, + 0.6265691142487051f, + 0.6288612707146283f, + 0.6311493523499663f, + 0.6334332909958958f, + 0.6357130188085891f, + 0.6379884682645743f, + 0.6402595721660647f, + 0.6425262636462578f, + 0.6447884761746012f, + 0.6470461435620266f, + 0.6492991999661505f, + 0.6515475798964411f, + 0.6537912182193508f, + 0.6560300501634142f, + 0.6582640113243098f, + 0.6604930376698862f, + 0.6627170655451516f, + 0.6649360316772256f, + 0.6671498731802533f, + 0.6693585275602818f, + 0.6715619327200959f, + 0.6737600269640164f, + 0.6759527490026566f, + 0.6781400379576392f, + 0.6803218333662715f, + 0.6824980751861787f, + 0.6846687037998949f, + 0.6868336600194123f, + 0.6889928850906855f, + 0.6911463206980928f, + 0.6932939089688525f, + 0.6954355924773949f, + 0.6975713142496884f, + 0.6997010177675195f, + 0.7018246469727265f, + 0.7039421462713862f, + 0.7060534605379528f, + 0.7081585351193496f, + 0.7102573158390105f, + 0.7123497490008750f, + 0.7144357813933307f, + 0.7165153602931092f, + 0.7185884334691287f, + 0.7206549491862871f, + 0.7227148562092042f, + 0.7247681038059106f, + 0.7268146417514855f, + 0.7288544203316418f, + 0.7308873903462577f, + 0.7329135031128549f, + 0.7349327104700221f, + 0.7369449647807855f, + 0.7389502189359237f, + 0.7409484263572271f, + 0.7429395410007016f, + 0.7449235173597176f, + 0.7469003104681008f, + 0.7488698759031670f, + 0.7508321697887005f, + 0.7527871487978728f, + 0.7547347701561059f, + 0.7566749916438754f, + 0.7586077715994560f, + 0.7605330689216074f, + 0.7624508430722016f, + 0.7643610540787891f, + 0.7662636625371070f, + 0.7681586296135255f, + 0.7700459170474343f, + 0.7719254871535672f, + 0.7737973028242671f, + 0.7756613275316875f, + 0.7775175253299340f, + 0.7793658608571425f, + 0.7812062993374951f, + 0.7830388065831744f, + 0.7848633489962533f, + 0.7866798935705233f, + 0.7884884078932579f, + 0.7902888601469138f, + 0.7920812191107668f, + 0.7938654541624850f, + 0.7956415352796368f, + 0.7974094330411343f, + 0.7991691186286133f, + 0.8009205638277465f, + 0.8026637410294932f, + 0.8043986232312831f, + 0.8061251840381346f, + 0.8078433976637077f, + 0.8095532389312917f, + 0.8112546832747255f, + 0.8129477067392539f, + 0.8146322859823164f, + 0.8163083982742698f, + 0.8179760214990457f, + 0.8196351341547393f, + 0.8212857153541345f, + 0.8229277448251595f, + 0.8245612029112778f, + 0.8261860705718113f, + 0.8278023293821971f, + 0.8294099615341773f, + 0.8310089498359212f, + 0.8325992777120815f, + 0.8341809292037831f, + 0.8357538889685445f, + 0.8373181422801330f, + 0.8388736750283521f, + 0.8404204737187619f, + 0.8419585254723335f, + 0.8434878180250348f, + 0.8450083397273509f, + 0.8465200795437368f, + 0.8480230270520029f, + 0.8495171724426350f, + 0.8510025065180464f, + 0.8524790206917633f, + 0.8539467069875448f, + 0.8554055580384357f, + 0.8568555670857525f, + 0.8582967279780043f, + 0.8597290351697464f, + 0.8611524837203691f, + 0.8625670692928198f, + 0.8639727881522599f, + 0.8653696371646555f, + 0.8667576137953045f, + 0.8681367161072958f, + 0.8695069427599065f, + 0.8708682930069319f, + 0.8722207666949527f, + 0.8735643642615368f, + 0.8748990867333771f, + 0.8762249357243662f, + 0.8775419134336067f, + 0.8788500226433579f, + 0.8801492667169208f, + 0.8814396495964587f, + 0.8827211758007560f, + 0.8839938504229149f, + 0.8852576791279895f, + 0.8865126681505587f, + 0.8877588242922386f, + 0.8889961549191320f, + 0.8902246679592184f, + 0.8914443718996848f, + 0.8926552757841945f, + 0.8938573892100969f, + 0.8950507223255798f, + 0.8962352858267605f, + 0.8974110909547198f, + 0.8985781494924783f, + 0.8997364737619142f, + 0.9008860766206249f, + 0.9020269714587307f, + 0.9031591721956235f, + 0.9042826932766591f, + 0.9053975496697941f, + 0.9065037568621681f, + 0.9076013308566311f, + 0.9086902881682180f, + 0.9097706458205682f, + 0.9108424213422940f, + 0.9119056327632955f, + 0.9129602986110235f, + 0.9140064379066919f, + 0.9150440701614393f, + 0.9160732153724396f, + 0.9170938940189634f, + 0.9181061270583908f, + 0.9191099359221748f, + 0.9201053425117579f, + 0.9210923691944400f, + 0.9220710387992010f, + 0.9230413746124764f, + 0.9240034003738882f, + 0.9249571402719298f, + 0.9259026189396085f, + 0.9268398614500427f, + 0.9277688933120170f, + 0.9286897404654957f, + 0.9296024292770939f, + 0.9305069865355076f, + 0.9314034394469048f, + 0.9322918156302762f, + 0.9331721431127471f, + 0.9340444503248519f, + 0.9349087660957711f, + 0.9357651196485313f, + 0.9366135405951697f, + 0.9374540589318637f, + 0.9382867050340261f, + 0.9391115096513655f, + 0.9399285039029165f, + 0.9407377192720349f, + 0.9415391876013639f, + 0.9423329410877687f, + 0.9431190122772415f, + 0.9438974340597782f, + 0.9446682396642262f, + 0.9454314626531054f, + 0.9461871369174033f, + 0.9469352966713429f, + 0.9476759764471278f, + 0.9484092110896616f, + 0.9491350357512457f, + 0.9498534858862532f, + 0.9505645972457831f, + 0.9512684058722927f, + 0.9519649480942105f, + 0.9526542605205314f, + 0.9533363800353921f, + 0.9540113437926313f, + 0.9546791892103320f, + 0.9553399539653500f, + 0.9559936759878265f, + 0.9566403934556893f, + 0.9572801447891388f, + 0.9579129686451244f, + 0.9585389039118085f, + 0.9591579897030224f, + 0.9597702653527108f, + 0.9603757704093711f, + 0.9609745446304828f, + 0.9615666279769324f, + 0.9621520606074324f, + 0.9627308828729358f, + 0.9633031353110477f, + 0.9638688586404335f, + 0.9644280937552258f, + 0.9649808817194311f, + 0.9655272637613366f, + 0.9660672812679171f, + 0.9666009757792454f, + 0.9671283889829055f, + 0.9676495627084089f, + 0.9681645389216160f, + 0.9686733597191652f, + 0.9691760673229058f, + 0.9696727040743406f, + 0.9701633124290767f, + 0.9706479349512860f, + 0.9711266143081750f, + 0.9715993932644684f, + 0.9720663146769026f, + 0.9725274214887337f, + 0.9729827567242596f, + 0.9734323634833574f, + 0.9738762849360358f, + 0.9743145643170059f, + 0.9747472449202687f, + 0.9751743700937215f, + 0.9755959832337850f, + 0.9760121277800496f, + 0.9764228472099433f, + 0.9768281850334235f, + 0.9772281847876897f, + 0.9776228900319223f, + 0.9780123443420448f, + 0.9783965913055132f, + 0.9787756745161313f, + 0.9791496375688939f, + 0.9795185240548578f, + 0.9798823775560431f, + 0.9802412416403639f, + 0.9805951598565897f, + 0.9809441757293399f, + 0.9812883327541090f, + 0.9816276743923267f, + 0.9819622440664515f, + 0.9822920851550995f, + 0.9826172409882086f, + 0.9829377548422400f, + 0.9832536699354163f, + 0.9835650294229984f, + 0.9838718763926001f, + 0.9841742538595437f, + 0.9844722047622547f, + 0.9847657719576983f, + 0.9850549982168574f, + 0.9853399262202529f, + 0.9856205985535073f, + 0.9858970577029519f, + 0.9861693460512790f, + 0.9864375058732389f, + 0.9867015793313820f, + 0.9869616084718489f, + 0.9872176352202061f, + 0.9874697013773301f, + 0.9877178486153397f, + 0.9879621184735767f, + 0.9882025523546365f, + 0.9884391915204485f, + 0.9886720770884069f, + 0.9889012500275530f, + 0.9891267511548089f, + 0.9893486211312621f, + 0.9895669004585049f, + 0.9897816294750255f, + 0.9899928483526520f, + 0.9902005970930525f, + 0.9904049155242876f, + 0.9906058432974180f, + 0.9908034198831690f, + 0.9909976845686489f, + 0.9911886764541239f, + 0.9913764344498495f, + 0.9915609972729590f, + 0.9917424034444086f, + 0.9919206912859797f, + 0.9920958989173397f, + 0.9922680642531603f, + 0.9924372250002933f, + 0.9926034186550070f, + 0.9927666825002789f, + 0.9929270536031491f, + 0.9930845688121325f, + 0.9932392647546895f, + 0.9933911778347579f, + 0.9935403442303433f, + 0.9936867998911693f, + 0.9938305805363887f, + 0.9939717216523539f, + 0.9941102584904481f, + 0.9942462260649764f, + 0.9943796591511174f, + 0.9945105922829353f, + 0.9946390597514524f, + 0.9947650956027824f, + 0.9948887336363228f, + 0.9950100074030103f, + 0.9951289502036336f, + 0.9952455950872091f, + 0.9953599748494155f, + 0.9954721220310890f, + 0.9955820689167787f, + 0.9956898475333619f, + 0.9957954896487196f, + 0.9958990267704713f, + 0.9960004901447701f, + 0.9960999107551559f, + 0.9961973193214694f, + 0.9962927462988245f, + 0.9963862218766388f, + 0.9964777759777242f, + 0.9965674382574342f, + 0.9966552381028704f, + 0.9967412046321465f, + 0.9968253666937095f, + 0.9969077528657186f, + 0.9969883914554805f, + 0.9970673104989413f, + 0.9971445377602348f, + 0.9972201007312871f, + 0.9972940266314749f, + 0.9973663424073412f, + 0.9974370747323638f, + 0.9975062500067785f, + 0.9975738943574574f, + 0.9976400336378379f, + 0.9977046934279079f, + 0.9977678990342401f, + 0.9978296754900812f, + 0.9978900475554902f, + 0.9979490397175296f, + 0.9980066761905056f, + 0.9980629809162593f, + 0.9981179775645063f, + 0.9981716895332257f, + 0.9982241399490979f, + 0.9982753516679893f, + 0.9983253472754841f, + 0.9983741490874634f, + 0.9984217791507299f, + 0.9984682592436778f, + 0.9985136108770075f, + 0.9985578552944850f, + 0.9986010134737439f, + 0.9986431061271304f, + 0.9986841537025921f, + 0.9987241763846056f, + 0.9987631940951476f, + 0.9988012264947044f, + 0.9988382929833222f, + 0.9988744127016956f, + 0.9989096045322947f, + 0.9989438871005292f, + 0.9989772787759494f, + 0.9990097976734847f, + 0.9990414616547146f, + 0.9990722883291779f, + 0.9991022950557125f, + 0.9991314989438310f, + 0.9991599168551279f, + 0.9991875654047181f, + 0.9992144609627068f, + 0.9992406196556911f, + 0.9992660573682882f, + 0.9992907897446957f, + 0.9993148321902777f, + 0.9993381998731797f, + 0.9993609077259696f, + 0.9993829704473038f, + 0.9994044025036201f, + 0.9994252181308537f, + 0.9994454313361775f, + 0.9994650558997651f, + 0.9994841053765757f, + 0.9995025930981609f, + 0.9995205321744921f, + 0.9995379354958073f, + 0.9995548157344778f, + 0.9995711853468930f, + 0.9995870565753632f, + 0.9996024414500382f, + 0.9996173517908444f, + 0.9996317992094352f, + 0.9996457951111574f, + 0.9996593506970310f, + 0.9996724769657434f, + 0.9996851847156547f, + 0.9996974845468164f, + 0.9997093868630000f, + 0.9997209018737374f, + 0.9997320395963699f, + 0.9997428098581069f, + 0.9997532222980933f, + 0.9997632863694836f, + 0.9997730113415246f, + 0.9997824063016426f, + 0.9997914801575380f, + 0.9998002416392840f, + 0.9998086993014300f, + 0.9998168615251084f, + 0.9998247365201450f, + 0.9998323323271717f, + 0.9998396568197407f, + 0.9998467177064404f, + 0.9998535225330116f, + 0.9998600786844637f, + 0.9998663933871905f, + 0.9998724737110845f, + 0.9998783265716498f, + 0.9998839587321121f, + 0.9998893768055266f, + 0.9998945872568815f, + 0.9998995964051983f, + 0.9999044104256269f, + 0.9999090353515359f, + 0.9999134770765971f, + 0.9999177413568642f, + 0.9999218338128448f, + 0.9999257599315647f, + 0.9999295250686255f, + 0.9999331344502529f, + 0.9999365931753376f, + 0.9999399062174669f, + 0.9999430784269460f, + 0.9999461145328103f, + 0.9999490191448277f, + 0.9999517967554878f, + 0.9999544517419835f, + 0.9999569883681778f, + 0.9999594107865607f, + 0.9999617230401926f, + 0.9999639290646355f, + 0.9999660326898712f, + 0.9999680376422052f, + 0.9999699475461585f, + 0.9999717659263435f, + 0.9999734962093266f, + 0.9999751417254756f, + 0.9999767057107922f, + 0.9999781913087290f, + 0.9999796015719915f, + 0.9999809394643231f, + 0.9999822078622751f, + 0.9999834095569596f, + 0.9999845472557860f, + 0.9999856235841805f, + 0.9999866410872889f, + 0.9999876022316609f, + 0.9999885094069193f, + 0.9999893649274085f, + 0.9999901710338274f, + 0.9999909298948430f, + 0.9999916436086862f, + 0.9999923142047299f, + 0.9999929436450469f, + 0.9999935338259505f, + 0.9999940865795161f, + 0.9999946036750835f, + 0.9999950868207405f, + 0.9999955376647868f, + 0.9999959577971798f, + 0.9999963487509599f, + 0.9999967120036571f, + 0.9999970489786785f, + 0.9999973610466748f, + 0.9999976495268890f, + 0.9999979156884846f, + 0.9999981607518545f, + 0.9999983858899099f, + 0.9999985922293493f, + 0.9999987808519092f, + 0.9999989527955938f, + 0.9999991090558848f, + 0.9999992505869332f, + 0.9999993783027293f, + 0.9999994930782556f, + 0.9999995957506171f, + 0.9999996871201549f, + 0.9999997679515386f, + 0.9999998389748399f, + 0.9999999008865869f, + 0.9999999543507984f + }; + float[] KBD_120 = { + 0.0000452320086910f, + 0.0001274564692111f, + 0.0002529398385345f, + 0.0004335140496648f, + 0.0006827100966952f, + 0.0010158708222246f, + 0.0014502162869659f, + 0.0020048865156264f, + 0.0027009618393178f, + 0.0035614590925043f, + 0.0046113018122711f, + 0.0058772627936484f, + 0.0073878776584103f, + 0.0091733284512589f, + 0.0112652966728373f, + 0.0136967855861945f, + 0.0165019120857793f, + 0.0197156688892217f, + 0.0233736582950619f, + 0.0275117992367496f, + 0.0321660098468534f, + 0.0373718682174417f, + 0.0431642544948834f, + 0.0495769778717676f, + 0.0566423924273392f, + 0.0643910061132260f, + 0.0728510874761729f, + 0.0820482749475221f, + 0.0920051937045235f, + 0.1027410852163450f, + 0.1142714546239370f, + 0.1266077410648368f, + 0.1397570159398145f, + 0.1537217139274270f, + 0.1684994012857075f, + 0.1840825856392944f, + 0.2004585710384133f, + 0.2176093615976121f, + 0.2355116164824983f, + 0.2541366584185075f, + 0.2734505372545160f, + 0.2934141494343369f, + 0.3139834135200387f, + 0.3351095011824163f, + 0.3567391223361566f, + 0.3788148623608774f, + 0.4012755686250732f, + 0.4240567828288110f, + 0.4470912150133537f, + 0.4703092544619664f, + 0.4936395121456694f, + 0.5170093888596962f, + 0.5403456627591340f, + 0.5635750896430154f, + 0.5866250090612892f, + 0.6094239491338723f, + 0.6319022228794100f, + 0.6539925088563087f, + 0.6756304090216887f, + 0.6967549769155277f, + 0.7173092095766250f, + 0.7372404969921184f, + 0.7565010233699827f, + 0.7750481150999984f, + 0.7928445309277697f, + 0.8098586906021583f, + 0.8260648390616000f, + 0.8414431440907889f, + 0.8559797262966709f, + 0.8696666212110165f, + 0.8825016743142358f, + 0.8944883707784486f, + 0.9056356027326216f, + 0.9159573778427816f, + 0.9254724739583072f, + 0.9342040454819434f, + 0.9421791879559176f, + 0.9494284680976784f, + 0.9559854271440150f, + 0.9618860658493898f, + 0.9671683198119525f, + 0.9718715339497299f, + 0.9760359449042233f, + 0.9797021798981759f, + 0.9829107801140203f, + 0.9857017559923277f, + 0.9881141809867999f, + 0.9901858292742826f, + 0.9919528617340944f, + 0.9934495632180476f, + 0.9947081327749199f, + 0.9957585271195989f, + 0.9966283562984427f, + 0.9973428292485683f, + 0.9979247458259197f, + 0.9983945309245774f, + 0.9987703055583410f, + 0.9990679892449266f, + 0.9993014277313617f, + 0.9994825400228521f, + 0.9996214788122335f, + 0.9997267987294857f, + 0.9998056273097539f, + 0.9998638341781910f, + 0.9999061946325793f, + 0.9999365445321382f, + 0.9999579241373735f, + 0.9999727092594598f, + 0.9999827287418790f, + 0.9999893678912771f, + 0.9999936579844555f, + 0.9999963523959187f, + 0.9999979902130101f, + 0.9999989484358076f, + 0.9999994840031031f, + 0.9999997669534347f, + 0.9999999060327799f, + 0.9999999680107184f, + 0.9999999918774242f, + 0.9999999989770326f + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/filterbank/MDCT.java b/src/main/java/net/sourceforge/jaad/aac/filterbank/MDCT.java index 309eb77b..324a1c97 100644 --- a/src/main/java/net/sourceforge/jaad/aac/filterbank/MDCT.java +++ b/src/main/java/net/sourceforge/jaad/aac/filterbank/MDCT.java @@ -2,125 +2,124 @@ import net.sourceforge.jaad.aac.AACException; + class MDCT implements MDCTTables { - private final int N, N2, N4, N8; - private final float[][] sincos; - private final FFT fft; - private final float[][] buf; - private final float[] tmp; - - MDCT(int length) throws AACException { - N = length; - N2 = length>>1; - N4 = length>>2; - N8 = length>>3; - switch(length) { - case 2048: - sincos = MDCT_TABLE_2048; - break; - case 256: - sincos = MDCT_TABLE_128; - break; - case 1920: - sincos = MDCT_TABLE_1920; - break; - case 240: - sincos = MDCT_TABLE_240; - default: - throw new AACException("unsupported MDCT length: "+length); - } - fft = new FFT(N4); - buf = new float[N4][2]; - tmp = new float[2]; - } - - void process(float[] in, int inOff, float[] out, int outOff) { - int k; - - //pre-IFFT complex multiplication - for(k = 0; k> 1; + N4 = length >> 2; + N8 = length >> 3; + switch (length) { + case 2048: + sincos = MDCT_TABLE_2048; + break; + case 256: + sincos = MDCT_TABLE_128; + break; + case 1920: + sincos = MDCT_TABLE_1920; + break; + case 240: + sincos = MDCT_TABLE_240; + default: + throw new AACException("unsupported MDCT length: " + length); + } + fft = new FFT(N4); + buf = new float[N4][2]; + tmp = new float[2]; + } + + void process(float[] in, int inOff, float[] out, int outOff) { + + // pre-IFFT complex multiplication + for (int k = 0; k < N4; k++) { + buf[k][1] = (in[inOff + 2 * k] * sincos[k][0]) + (in[inOff + N2 - 1 - 2 * k] * sincos[k][1]); + buf[k][0] = (in[inOff + N2 - 1 - 2 * k] * sincos[k][0]) - (in[inOff + 2 * k] * sincos[k][1]); + } + + // complex IFFT, non-scaling + fft.process(buf, false); + + // post-IFFT complex multiplication + for (int k = 0; k < N4; k++) { + tmp[0] = buf[k][0]; + tmp[1] = buf[k][1]; + buf[k][1] = (tmp[1] * sincos[k][0]) + (tmp[0] * sincos[k][1]); + buf[k][0] = (tmp[0] * sincos[k][0]) - (tmp[1] * sincos[k][1]); + } + + // reordering + for (int k = 0; k < N8; k += 2) { + out[outOff + 2 * k] = buf[N8 + k][1]; + out[outOff + 2 + 2 * k] = buf[N8 + 1 + k][1]; + + out[outOff + 1 + 2 * k] = -buf[N8 - 1 - k][0]; + out[outOff + 3 + 2 * k] = -buf[N8 - 2 - k][0]; + + out[outOff + N4 + 2 * k] = buf[k][0]; + out[outOff + N4 + 2 + 2 * k] = buf[1 + k][0]; + + out[outOff + N4 + 1 + 2 * k] = -buf[N4 - 1 - k][1]; + out[outOff + N4 + 3 + 2 * k] = -buf[N4 - 2 - k][1]; + + out[outOff + N2 + 2 * k] = buf[N8 + k][0]; + out[outOff + N2 + 2 + 2 * k] = buf[N8 + 1 + k][0]; + + out[outOff + N2 + 1 + 2 * k] = -buf[N8 - 1 - k][1]; + out[outOff + N2 + 3 + 2 * k] = -buf[N8 - 2 - k][1]; + + out[outOff + N2 + N4 + 2 * k] = -buf[k][1]; + out[outOff + N2 + N4 + 2 + 2 * k] = -buf[1 + k][1]; + + out[outOff + N2 + N4 + 1 + 2 * k] = buf[N4 - 1 - k][0]; + out[outOff + N2 + N4 + 3 + 2 * k] = buf[N4 - 2 - k][0]; + } + } + + void processForward(float[] in, float[] out) { + // pre-FFT complex multiplication + for (int k = 0; k < N8; k++) { + int n = k << 1; + tmp[0] = in[N - N4 - 1 - n] + in[N - N4 + n]; + tmp[1] = in[N4 + n] - in[N4 - 1 - n]; + + buf[k][0] = (tmp[0] * sincos[k][0]) + (tmp[1] * sincos[k][1]); + buf[k][1] = (tmp[1] * sincos[k][0]) - (tmp[0] * sincos[k][1]); + + buf[k][0] *= N; + buf[k][1] *= N; + + tmp[0] = in[N2 - 1 - n] - in[n]; + tmp[1] = in[N2 + n] + in[N - 1 - n]; + + buf[k + N8][0] = (tmp[0] * sincos[k + N8][0]) + (tmp[1] * sincos[k + N8][1]); + buf[k + N8][1] = (tmp[1] * sincos[k + N8][0]) - (tmp[0] * sincos[k + N8][1]); + + buf[k + N8][0] *= N; + buf[k + N8][1] *= N; + } + + // complex FFT, non-scaling + fft.process(buf, true); + + // post-FFT complex multiplication + for (int k = 0; k < N4; k++) { + int n = k << 1; + + tmp[0] = (buf[k][0] * sincos[k][0]) + (buf[k][1] * sincos[k][1]); + tmp[1] = (buf[k][1] * sincos[k][0]) - (buf[k][0] * sincos[k][1]); + + out[n] = -tmp[0]; + out[N2 - 1 - n] = tmp[1]; + out[N2 + n] = -tmp[1]; + out[N - 1 - n] = tmp[0]; + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/filterbank/MDCTTables.java b/src/main/java/net/sourceforge/jaad/aac/filterbank/MDCTTables.java index a8e5648f..221aa70c 100644 --- a/src/main/java/net/sourceforge/jaad/aac/filterbank/MDCTTables.java +++ b/src/main/java/net/sourceforge/jaad/aac/filterbank/MDCTTables.java @@ -2,1128 +2,1128 @@ interface MDCTTables { - float[][] MDCT_TABLE_2048 = { - {0.031249997702054f, 0.000011984224612f}, - {0.031249813866531f, 0.000107857810004f}, - {0.031249335895858f, 0.000203730380198f}, - {0.031248563794535f, 0.000299601032804f}, - {0.031247497569829f, 0.000395468865451f}, - {0.031246137231775f, 0.000491332975794f}, - {0.031244482793177f, 0.000587192461525f}, - {0.031242534269608f, 0.000683046420376f}, - {0.031240291679407f, 0.000778893950134f}, - {0.031237755043684f, 0.000874734148645f}, - {0.031234924386313f, 0.000970566113826f}, - {0.031231799733938f, 0.001066388943669f}, - {0.031228381115970f, 0.001162201736253f}, - {0.031224668564585f, 0.001258003589751f}, - {0.031220662114728f, 0.001353793602441f}, - {0.031216361804108f, 0.001449570872710f}, - {0.031211767673203f, 0.001545334499065f}, - {0.031206879765253f, 0.001641083580144f}, - {0.031201698126266f, 0.001736817214719f}, - {0.031196222805014f, 0.001832534501709f}, - {0.031190453853031f, 0.001928234540186f}, - {0.031184391324617f, 0.002023916429386f}, - {0.031178035276836f, 0.002119579268713f}, - {0.031171385769513f, 0.002215222157753f}, - {0.031164442865236f, 0.002310844196278f}, - {0.031157206629353f, 0.002406444484258f}, - {0.031149677129975f, 0.002502022121865f}, - {0.031141854437973f, 0.002597576209488f}, - {0.031133738626977f, 0.002693105847734f}, - {0.031125329773375f, 0.002788610137442f}, - {0.031116627956316f, 0.002884088179689f}, - {0.031107633257703f, 0.002979539075801f}, - {0.031098345762200f, 0.003074961927355f}, - {0.031088765557222f, 0.003170355836197f}, - {0.031078892732942f, 0.003265719904442f}, - {0.031068727382288f, 0.003361053234488f}, - {0.031058269600939f, 0.003456354929021f}, - {0.031047519487329f, 0.003551624091024f}, - {0.031036477142640f, 0.003646859823790f}, - {0.031025142670809f, 0.003742061230921f}, - {0.031013516178519f, 0.003837227416347f}, - {0.031001597775203f, 0.003932357484328f}, - {0.030989387573042f, 0.004027450539462f}, - {0.030976885686963f, 0.004122505686697f}, - {0.030964092234638f, 0.004217522031340f}, - {0.030951007336485f, 0.004312498679058f}, - {0.030937631115663f, 0.004407434735897f}, - {0.030923963698074f, 0.004502329308281f}, - {0.030910005212362f, 0.004597181503027f}, - {0.030895755789908f, 0.004691990427350f}, - {0.030881215564835f, 0.004786755188872f}, - {0.030866384674000f, 0.004881474895632f}, - {0.030851263256996f, 0.004976148656090f}, - {0.030835851456154f, 0.005070775579142f}, - {0.030820149416533f, 0.005165354774124f}, - {0.030804157285929f, 0.005259885350819f}, - {0.030787875214864f, 0.005354366419469f}, - {0.030771303356593f, 0.005448797090784f}, - {0.030754441867095f, 0.005543176475946f}, - {0.030737290905077f, 0.005637503686619f}, - {0.030719850631972f, 0.005731777834961f}, - {0.030702121211932f, 0.005825998033626f}, - {0.030684102811835f, 0.005920163395780f}, - {0.030665795601276f, 0.006014273035101f}, - {0.030647199752570f, 0.006108326065793f}, - {0.030628315440748f, 0.006202321602594f}, - {0.030609142843557f, 0.006296258760782f}, - {0.030589682141455f, 0.006390136656185f}, - {0.030569933517616f, 0.006483954405188f}, - {0.030549897157919f, 0.006577711124743f}, - {0.030529573250956f, 0.006671405932375f}, - {0.030508961988022f, 0.006765037946194f}, - {0.030488063563118f, 0.006858606284900f}, - {0.030466878172949f, 0.006952110067791f}, - {0.030445406016919f, 0.007045548414774f}, - {0.030423647297133f, 0.007138920446372f}, - {0.030401602218392f, 0.007232225283733f}, - {0.030379270988192f, 0.007325462048634f}, - {0.030356653816724f, 0.007418629863497f}, - {0.030333750916869f, 0.007511727851390f}, - {0.030310562504198f, 0.007604755136040f}, - {0.030287088796968f, 0.007697710841838f}, - {0.030263330016124f, 0.007790594093851f}, - {0.030239286385293f, 0.007883404017824f}, - {0.030214958130781f, 0.007976139740197f}, - {0.030190345481576f, 0.008068800388104f}, - {0.030165448669342f, 0.008161385089390f}, - {0.030140267928416f, 0.008253892972610f}, - {0.030114803495809f, 0.008346323167047f}, - {0.030089055611203f, 0.008438674802711f}, - {0.030063024516947f, 0.008530947010354f}, - {0.030036710458054f, 0.008623138921475f}, - {0.030010113682202f, 0.008715249668328f}, - {0.029983234439732f, 0.008807278383932f}, - {0.029956072983640f, 0.008899224202078f}, - {0.029928629569580f, 0.008991086257336f}, - {0.029900904455860f, 0.009082863685067f}, - {0.029872897903441f, 0.009174555621425f}, - {0.029844610175929f, 0.009266161203371f}, - {0.029816041539579f, 0.009357679568679f}, - {0.029787192263292f, 0.009449109855944f}, - {0.029758062618606f, 0.009540451204587f}, - {0.029728652879702f, 0.009631702754871f}, - {0.029698963323395f, 0.009722863647900f}, - {0.029668994229134f, 0.009813933025633f}, - {0.029638745879000f, 0.009904910030891f}, - {0.029608218557702f, 0.009995793807363f}, - {0.029577412552575f, 0.010086583499618f}, - {0.029546328153577f, 0.010177278253107f}, - {0.029514965653285f, 0.010267877214177f}, - {0.029483325346896f, 0.010358379530076f}, - {0.029451407532220f, 0.010448784348962f}, - {0.029419212509679f, 0.010539090819911f}, - {0.029386740582307f, 0.010629298092923f}, - {0.029353992055740f, 0.010719405318933f}, - {0.029320967238220f, 0.010809411649818f}, - {0.029287666440590f, 0.010899316238403f}, - {0.029254089976290f, 0.010989118238474f}, - {0.029220238161353f, 0.011078816804778f}, - {0.029186111314406f, 0.011168411093039f}, - {0.029151709756664f, 0.011257900259961f}, - {0.029117033811927f, 0.011347283463239f}, - {0.029082083806579f, 0.011436559861563f}, - {0.029046860069582f, 0.011525728614630f}, - {0.029011362932476f, 0.011614788883150f}, - {0.028975592729373f, 0.011703739828853f}, - {0.028939549796957f, 0.011792580614500f}, - {0.028903234474475f, 0.011881310403886f}, - {0.028866647103744f, 0.011969928361855f}, - {0.028829788029135f, 0.012058433654299f}, - {0.028792657597583f, 0.012146825448172f}, - {0.028755256158571f, 0.012235102911499f}, - {0.028717584064137f, 0.012323265213377f}, - {0.028679641668864f, 0.012411311523990f}, - {0.028641429329882f, 0.012499241014612f}, - {0.028602947406859f, 0.012587052857618f}, - {0.028564196262001f, 0.012674746226488f}, - {0.028525176260050f, 0.012762320295819f}, - {0.028485887768276f, 0.012849774241331f}, - {0.028446331156478f, 0.012937107239875f}, - {0.028406506796976f, 0.013024318469437f}, - {0.028366415064615f, 0.013111407109155f}, - {0.028326056336751f, 0.013198372339315f}, - {0.028285430993258f, 0.013285213341368f}, - {0.028244539416515f, 0.013371929297933f}, - {0.028203381991411f, 0.013458519392807f}, - {0.028161959105334f, 0.013544982810971f}, - {0.028120271148172f, 0.013631318738598f}, - {0.028078318512309f, 0.013717526363062f}, - {0.028036101592619f, 0.013803604872943f}, - {0.027993620786463f, 0.013889553458039f}, - {0.027950876493687f, 0.013975371309367f}, - {0.027907869116616f, 0.014061057619178f}, - {0.027864599060052f, 0.014146611580959f}, - {0.027821066731270f, 0.014232032389445f}, - {0.027777272540012f, 0.014317319240622f}, - {0.027733216898487f, 0.014402471331737f}, - {0.027688900221361f, 0.014487487861307f}, - {0.027644322925762f, 0.014572368029123f}, - {0.027599485431266f, 0.014657111036262f}, - {0.027554388159903f, 0.014741716085090f}, - {0.027509031536144f, 0.014826182379271f}, - {0.027463415986904f, 0.014910509123778f}, - {0.027417541941533f, 0.014994695524894f}, - {0.027371409831816f, 0.015078740790225f}, - {0.027325020091965f, 0.015162644128704f}, - {0.027278373158618f, 0.015246404750603f}, - {0.027231469470833f, 0.015330021867534f}, - {0.027184309470088f, 0.015413494692460f}, - {0.027136893600268f, 0.015496822439704f}, - {0.027089222307671f, 0.015580004324954f}, - {0.027041296040997f, 0.015663039565269f}, - {0.026993115251345f, 0.015745927379091f}, - {0.026944680392213f, 0.015828666986247f}, - {0.026895991919487f, 0.015911257607961f}, - {0.026847050291442f, 0.015993698466859f}, - {0.026797855968734f, 0.016075988786976f}, - {0.026748409414401f, 0.016158127793763f}, - {0.026698711093851f, 0.016240114714099f}, - {0.026648761474864f, 0.016321948776289f}, - {0.026598561027585f, 0.016403629210082f}, - {0.026548110224519f, 0.016485155246669f}, - {0.026497409540530f, 0.016566526118696f}, - {0.026446459452830f, 0.016647741060271f}, - {0.026395260440982f, 0.016728799306966f}, - {0.026343812986890f, 0.016809700095831f}, - {0.026292117574797f, 0.016890442665397f}, - {0.026240174691280f, 0.016971026255683f}, - {0.026187984825246f, 0.017051450108208f}, - {0.026135548467924f, 0.017131713465990f}, - {0.026082866112867f, 0.017211815573560f}, - {0.026029938255941f, 0.017291755676967f}, - {0.025976765395322f, 0.017371533023784f}, - {0.025923348031494f, 0.017451146863116f}, - {0.025869686667242f, 0.017530596445607f}, - {0.025815781807646f, 0.017609881023449f}, - {0.025761633960080f, 0.017688999850383f}, - {0.025707243634204f, 0.017767952181715f}, - {0.025652611341960f, 0.017846737274313f}, - {0.025597737597568f, 0.017925354386623f}, - {0.025542622917522f, 0.018003802778671f}, - {0.025487267820581f, 0.018082081712071f}, - {0.025431672827768f, 0.018160190450031f}, - {0.025375838462365f, 0.018238128257362f}, - {0.025319765249906f, 0.018315894400484f}, - {0.025263453718173f, 0.018393488147432f}, - {0.025206904397193f, 0.018470908767865f}, - {0.025150117819228f, 0.018548155533070f}, - {0.025093094518776f, 0.018625227715971f}, - {0.025035835032562f, 0.018702124591135f}, - {0.024978339899534f, 0.018778845434780f}, - {0.024920609660858f, 0.018855389524780f}, - {0.024862644859912f, 0.018931756140672f}, - {0.024804446042284f, 0.019007944563666f}, - {0.024746013755764f, 0.019083954076646f}, - {0.024687348550337f, 0.019159783964183f}, - {0.024628450978184f, 0.019235433512536f}, - {0.024569321593670f, 0.019310902009663f}, - {0.024509960953345f, 0.019386188745225f}, - {0.024450369615932f, 0.019461293010596f}, - {0.024390548142329f, 0.019536214098866f}, - {0.024330497095598f, 0.019610951304848f}, - {0.024270217040961f, 0.019685503925087f}, - {0.024209708545799f, 0.019759871257867f}, - {0.024148972179639f, 0.019834052603212f}, - {0.024088008514157f, 0.019908047262901f}, - {0.024026818123164f, 0.019981854540467f}, - {0.023965401582609f, 0.020055473741208f}, - {0.023903759470567f, 0.020128904172192f}, - {0.023841892367236f, 0.020202145142264f}, - {0.023779800854935f, 0.020275195962052f}, - {0.023717485518092f, 0.020348055943974f}, - {0.023654946943242f, 0.020420724402244f}, - {0.023592185719023f, 0.020493200652878f}, - {0.023529202436167f, 0.020565484013703f}, - {0.023465997687496f, 0.020637573804361f}, - {0.023402572067918f, 0.020709469346314f}, - {0.023338926174419f, 0.020781169962854f}, - {0.023275060606058f, 0.020852674979108f}, - {0.023210975963963f, 0.020923983722044f}, - {0.023146672851322f, 0.020995095520475f}, - {0.023082151873380f, 0.021066009705072f}, - {0.023017413637435f, 0.021136725608363f}, - {0.022952458752826f, 0.021207242564742f}, - {0.022887287830934f, 0.021277559910478f}, - {0.022821901485173f, 0.021347676983716f}, - {0.022756300330983f, 0.021417593124488f}, - {0.022690484985827f, 0.021487307674717f}, - {0.022624456069185f, 0.021556819978223f}, - {0.022558214202547f, 0.021626129380729f}, - {0.022491760009405f, 0.021695235229869f}, - {0.022425094115252f, 0.021764136875192f}, - {0.022358217147572f, 0.021832833668171f}, - {0.022291129735838f, 0.021901324962204f}, - {0.022223832511501f, 0.021969610112625f}, - {0.022156326107988f, 0.022037688476709f}, - {0.022088611160696f, 0.022105559413676f}, - {0.022020688306983f, 0.022173222284699f}, - {0.021952558186166f, 0.022240676452909f}, - {0.021884221439510f, 0.022307921283403f}, - {0.021815678710228f, 0.022374956143245f}, - {0.021746930643469f, 0.022441780401478f}, - {0.021677977886316f, 0.022508393429127f}, - {0.021608821087780f, 0.022574794599206f}, - {0.021539460898790f, 0.022640983286719f}, - {0.021469897972190f, 0.022706958868676f}, - {0.021400132962735f, 0.022772720724087f}, - {0.021330166527077f, 0.022838268233979f}, - {0.021259999323769f, 0.022903600781391f}, - {0.021189632013250f, 0.022968717751391f}, - {0.021119065257845f, 0.023033618531071f}, - {0.021048299721754f, 0.023098302509561f}, - {0.020977336071050f, 0.023162769078031f}, - {0.020906174973670f, 0.023227017629698f}, - {0.020834817099409f, 0.023291047559828f}, - {0.020763263119915f, 0.023354858265748f}, - {0.020691513708680f, 0.023418449146848f}, - {0.020619569541038f, 0.023481819604585f}, - {0.020547431294155f, 0.023544969042494f}, - {0.020475099647023f, 0.023607896866186f}, - {0.020402575280455f, 0.023670602483363f}, - {0.020329858877078f, 0.023733085303813f}, - {0.020256951121327f, 0.023795344739427f}, - {0.020183852699437f, 0.023857380204193f}, - {0.020110564299439f, 0.023919191114211f}, - {0.020037086611150f, 0.023980776887692f}, - {0.019963420326171f, 0.024042136944968f}, - {0.019889566137877f, 0.024103270708495f}, - {0.019815524741412f, 0.024164177602859f}, - {0.019741296833681f, 0.024224857054779f}, - {0.019666883113346f, 0.024285308493120f}, - {0.019592284280817f, 0.024345531348888f}, - {0.019517501038246f, 0.024405525055242f}, - {0.019442534089523f, 0.024465289047500f}, - {0.019367384140264f, 0.024524822763141f}, - {0.019292051897809f, 0.024584125641809f}, - {0.019216538071215f, 0.024643197125323f}, - {0.019140843371246f, 0.024702036657681f}, - {0.019064968510369f, 0.024760643685063f}, - {0.018988914202748f, 0.024819017655836f}, - {0.018912681164234f, 0.024877158020562f}, - {0.018836270112363f, 0.024935064232003f}, - {0.018759681766343f, 0.024992735745123f}, - {0.018682916847054f, 0.025050172017095f}, - {0.018605976077037f, 0.025107372507308f}, - {0.018528860180486f, 0.025164336677369f}, - {0.018451569883247f, 0.025221063991110f}, - {0.018374105912805f, 0.025277553914591f}, - {0.018296468998280f, 0.025333805916107f}, - {0.018218659870421f, 0.025389819466194f}, - {0.018140679261596f, 0.025445594037630f}, - {0.018062527905790f, 0.025501129105445f}, - {0.017984206538592f, 0.025556424146920f}, - {0.017905715897192f, 0.025611478641598f}, - {0.017827056720375f, 0.025666292071285f}, - {0.017748229748511f, 0.025720863920056f}, - {0.017669235723550f, 0.025775193674260f}, - {0.017590075389012f, 0.025829280822525f}, - {0.017510749489986f, 0.025883124855762f}, - {0.017431258773116f, 0.025936725267170f}, - {0.017351603986600f, 0.025990081552242f}, - {0.017271785880180f, 0.026043193208768f}, - {0.017191805205132f, 0.026096059736841f}, - {0.017111662714267f, 0.026148680638861f}, - {0.017031359161915f, 0.026201055419541f}, - {0.016950895303924f, 0.026253183585908f}, - {0.016870271897651f, 0.026305064647313f}, - {0.016789489701954f, 0.026356698115431f}, - {0.016708549477186f, 0.026408083504269f}, - {0.016627451985187f, 0.026459220330167f}, - {0.016546197989277f, 0.026510108111806f}, - {0.016464788254250f, 0.026560746370212f}, - {0.016383223546365f, 0.026611134628757f}, - {0.016301504633341f, 0.026661272413168f}, - {0.016219632284346f, 0.026711159251530f}, - {0.016137607269996f, 0.026760794674288f}, - {0.016055430362340f, 0.026810178214254f}, - {0.015973102334858f, 0.026859309406613f}, - {0.015890623962454f, 0.026908187788922f}, - {0.015807996021446f, 0.026956812901119f}, - {0.015725219289558f, 0.027005184285527f}, - {0.015642294545918f, 0.027053301486856f}, - {0.015559222571044f, 0.027101164052208f}, - {0.015476004146842f, 0.027148771531083f}, - {0.015392640056594f, 0.027196123475380f}, - {0.015309131084956f, 0.027243219439406f}, - {0.015225478017946f, 0.027290058979875f}, - {0.015141681642938f, 0.027336641655915f}, - {0.015057742748656f, 0.027382967029073f}, - {0.014973662125164f, 0.027429034663317f}, - {0.014889440563862f, 0.027474844125040f}, - {0.014805078857474f, 0.027520394983066f}, - {0.014720577800046f, 0.027565686808654f}, - {0.014635938186934f, 0.027610719175499f}, - {0.014551160814797f, 0.027655491659740f}, - {0.014466246481592f, 0.027700003839960f}, - {0.014381195986567f, 0.027744255297195f}, - {0.014296010130247f, 0.027788245614933f}, - {0.014210689714436f, 0.027831974379120f}, - {0.014125235542201f, 0.027875441178165f}, - {0.014039648417870f, 0.027918645602941f}, - {0.013953929147020f, 0.027961587246792f}, - {0.013868078536476f, 0.028004265705534f}, - {0.013782097394294f, 0.028046680577462f}, - {0.013695986529763f, 0.028088831463351f}, - {0.013609746753390f, 0.028130717966461f}, - {0.013523378876898f, 0.028172339692540f}, - {0.013436883713214f, 0.028213696249828f}, - {0.013350262076462f, 0.028254787249062f}, - {0.013263514781960f, 0.028295612303478f}, - {0.013176642646205f, 0.028336171028814f}, - {0.013089646486871f, 0.028376463043317f}, - {0.013002527122799f, 0.028416487967743f}, - {0.012915285373990f, 0.028456245425361f}, - {0.012827922061597f, 0.028495735041960f}, - {0.012740438007915f, 0.028534956445849f}, - {0.012652834036379f, 0.028573909267859f}, - {0.012565110971550f, 0.028612593141354f}, - {0.012477269639111f, 0.028651007702224f}, - {0.012389310865858f, 0.028689152588899f}, - {0.012301235479693f, 0.028727027442343f}, - {0.012213044309615f, 0.028764631906065f}, - {0.012124738185712f, 0.028801965626115f}, - {0.012036317939156f, 0.028839028251097f}, - {0.011947784402191f, 0.028875819432161f}, - {0.011859138408130f, 0.028912338823015f}, - {0.011770380791341f, 0.028948586079925f}, - {0.011681512387245f, 0.028984560861718f}, - {0.011592534032306f, 0.029020262829785f}, - {0.011503446564022f, 0.029055691648087f}, - {0.011414250820918f, 0.029090846983152f}, - {0.011324947642537f, 0.029125728504087f}, - {0.011235537869437f, 0.029160335882573f}, - {0.011146022343175f, 0.029194668792871f}, - {0.011056401906305f, 0.029228726911828f}, - {0.010966677402371f, 0.029262509918876f}, - {0.010876849675891f, 0.029296017496036f}, - {0.010786919572361f, 0.029329249327922f}, - {0.010696887938235f, 0.029362205101743f}, - {0.010606755620926f, 0.029394884507308f}, - {0.010516523468793f, 0.029427287237024f}, - {0.010426192331137f, 0.029459412985906f}, - {0.010335763058187f, 0.029491261451573f}, - {0.010245236501099f, 0.029522832334255f}, - {0.010154613511943f, 0.029554125336796f}, - {0.010063894943698f, 0.029585140164654f}, - {0.009973081650240f, 0.029615876525905f}, - {0.009882174486340f, 0.029646334131247f}, - {0.009791174307650f, 0.029676512694001f}, - {0.009700081970699f, 0.029706411930116f}, - {0.009608898332881f, 0.029736031558168f}, - {0.009517624252453f, 0.029765371299366f}, - {0.009426260588521f, 0.029794430877553f}, - {0.009334808201034f, 0.029823210019210f}, - {0.009243267950778f, 0.029851708453456f}, - {0.009151640699363f, 0.029879925912053f}, - {0.009059927309220f, 0.029907862129408f}, - {0.008968128643591f, 0.029935516842573f}, - {0.008876245566520f, 0.029962889791254f}, - {0.008784278942845f, 0.029989980717805f}, - {0.008692229638191f, 0.030016789367235f}, - {0.008600098518961f, 0.030043315487212f}, - {0.008507886452329f, 0.030069558828062f}, - {0.008415594306230f, 0.030095519142772f}, - {0.008323222949351f, 0.030121196186994f}, - {0.008230773251129f, 0.030146589719046f}, - {0.008138246081733f, 0.030171699499915f}, - {0.008045642312067f, 0.030196525293257f}, - {0.007952962813750f, 0.030221066865402f}, - {0.007860208459119f, 0.030245323985357f}, - {0.007767380121212f, 0.030269296424803f}, - {0.007674478673766f, 0.030292983958103f}, - {0.007581504991203f, 0.030316386362302f}, - {0.007488459948628f, 0.030339503417126f}, - {0.007395344421816f, 0.030362334904989f}, - {0.007302159287206f, 0.030384880610993f}, - {0.007208905421891f, 0.030407140322928f}, - {0.007115583703613f, 0.030429113831278f}, - {0.007022195010752f, 0.030450800929220f}, - {0.006928740222316f, 0.030472201412626f}, - {0.006835220217939f, 0.030493315080068f}, - {0.006741635877866f, 0.030514141732814f}, - {0.006647988082948f, 0.030534681174838f}, - {0.006554277714635f, 0.030554933212813f}, - {0.006460505654964f, 0.030574897656119f}, - {0.006366672786553f, 0.030594574316845f}, - {0.006272779992593f, 0.030613963009786f}, - {0.006178828156839f, 0.030633063552447f}, - {0.006084818163601f, 0.030651875765048f}, - {0.005990750897737f, 0.030670399470520f}, - {0.005896627244644f, 0.030688634494512f}, - {0.005802448090250f, 0.030706580665388f}, - {0.005708214321004f, 0.030724237814232f}, - {0.005613926823871f, 0.030741605774849f}, - {0.005519586486321f, 0.030758684383764f}, - {0.005425194196321f, 0.030775473480228f}, - {0.005330750842327f, 0.030791972906214f}, - {0.005236257313276f, 0.030808182506425f}, - {0.005141714498576f, 0.030824102128288f}, - {0.005047123288102f, 0.030839731621963f}, - {0.004952484572181f, 0.030855070840339f}, - {0.004857799241589f, 0.030870119639036f}, - {0.004763068187541f, 0.030884877876411f}, - {0.004668292301681f, 0.030899345413553f}, - {0.004573472476075f, 0.030913522114288f}, - {0.004478609603205f, 0.030927407845180f}, - {0.004383704575956f, 0.030941002475530f}, - {0.004288758287610f, 0.030954305877381f}, - {0.004193771631837f, 0.030967317925516f}, - {0.004098745502689f, 0.030980038497461f}, - {0.004003680794587f, 0.030992467473486f}, - {0.003908578402316f, 0.031004604736602f}, - {0.003813439221017f, 0.031016450172571f}, - {0.003718264146176f, 0.031028003669899f}, - {0.003623054073616f, 0.031039265119839f}, - {0.003527809899492f, 0.031050234416394f}, - {0.003432532520278f, 0.031060911456318f}, - {0.003337222832760f, 0.031071296139114f}, - {0.003241881734029f, 0.031081388367037f}, - {0.003146510121474f, 0.031091188045095f}, - {0.003051108892766f, 0.031100695081051f}, - {0.002955678945860f, 0.031109909385419f}, - {0.002860221178978f, 0.031118830871473f}, - {0.002764736490604f, 0.031127459455239f}, - {0.002669225779478f, 0.031135795055501f}, - {0.002573689944583f, 0.031143837593803f}, - {0.002478129885137f, 0.031151586994444f}, - {0.002382546500589f, 0.031159043184484f}, - {0.002286940690606f, 0.031166206093743f}, - {0.002191313355067f, 0.031173075654800f}, - {0.002095665394051f, 0.031179651802998f}, - {0.001999997707835f, 0.031185934476438f}, - {0.001904311196878f, 0.031191923615985f}, - {0.001808606761820f, 0.031197619165268f}, - {0.001712885303465f, 0.031203021070678f}, - {0.001617147722782f, 0.031208129281370f}, - {0.001521394920889f, 0.031212943749264f}, - {0.001425627799047f, 0.031217464429043f}, - {0.001329847258653f, 0.031221691278159f}, - {0.001234054201231f, 0.031225624256825f}, - {0.001138249528420f, 0.031229263328024f}, - {0.001042434141971f, 0.031232608457502f}, - {0.000946608943736f, 0.031235659613775f}, - {0.000850774835656f, 0.031238416768124f}, - {0.000754932719759f, 0.031240879894597f}, - {0.000659083498149f, 0.031243048970010f}, - {0.000563228072993f, 0.031244923973948f}, - {0.000467367346520f, 0.031246504888762f}, - {0.000371502221008f, 0.031247791699571f}, - {0.000275633598775f, 0.031248784394264f}, - {0.000179762382174f, 0.031249482963498f}, - {0.000083889473581f, 0.031249887400697f} - }; - float[][] MDCT_TABLE_128 = { - {0.088387931675923f, 0.000271171628935f}, - {0.088354655998507f, 0.002440238387037f}, - {0.088268158780110f, 0.004607835236780f}, - {0.088128492123423f, 0.006772656498875f}, - {0.087935740158418f, 0.008933398165942f}, - {0.087690018991670f, 0.011088758687994f}, - {0.087391476636423f, 0.013237439756448f}, - {0.087040292923427f, 0.015378147086172f}, - {0.086636679392621f, 0.017509591195118f}, - {0.086180879165703f, 0.019630488181053f}, - {0.085673166799686f, 0.021739560494940f}, - {0.085113848121515f, 0.023835537710479f}, - {0.084503260043847f, 0.025917157289369f}, - {0.083841770362110f, 0.027983165341813f}, - {0.083129777532952f, 0.030032317381813f}, - {0.082367710434230f, 0.032063379076803f}, - {0.081556028106671f, 0.034075126991164f}, - {0.080695219477356f, 0.036066349323177f}, - {0.079785803065216f, 0.038035846634965f}, - {0.078828326668693f, 0.039982432574992f}, - {0.077823367035766f, 0.041904934592675f}, - {0.076771529516540f, 0.043802194644686f}, - {0.075673447698606f, 0.045673069892513f}, - {0.074529783025390f, 0.047516433390863f}, - {0.073341224397728f, 0.049331174766491f}, - {0.072108487758894f, 0.051116200887052f}, - {0.070832315663343f, 0.052870436519557f}, - {0.069513476829429f, 0.054592824978055f}, - {0.068152765676348f, 0.056282328760143f}, - {0.066751001845620f, 0.057937930171918f}, - {0.065309029707361f, 0.059558631940996f}, - {0.063827717851668f, 0.061143457817234f}, - {0.062307958565413f, 0.062691453160784f}, - {0.060750667294763f, 0.064201685517134f}, - {0.059156782093749f, 0.065673245178784f}, - {0.057527263059216f, 0.067105245733220f}, - {0.055863091752499f, 0.068496824596852f}, - {0.054165270608165f, 0.069847143534609f}, - {0.052434822330188f, 0.071155389164853f}, - {0.050672789275903f, 0.072420773449336f}, - {0.048880232828135f, 0.073642534167879f}, - {0.047058232755862f, 0.074819935377512f}, - {0.045207886563797f, 0.075952267855771f}, - {0.043330308831298f, 0.077038849527912f}, - {0.041426630540984f, 0.078079025877766f}, - {0.039497998397473f, 0.079072170341994f}, - {0.037545574136653f, 0.080017684687506f}, - {0.035570533825892f, 0.080914999371817f}, - {0.033574067155622f, 0.081763573886112f}, - {0.031557376722714f, 0.082562897080836f}, - {0.029521677306074f, 0.083312487473584f}, - {0.027468195134911f, 0.084011893539132f}, - {0.025398167150101f, 0.084660693981419f}, - {0.023312840259098f, 0.085258497987320f}, - {0.021213470584847f, 0.085804945462053f}, - {0.019101322709138f, 0.086299707246093f}, - {0.016977668910873f, 0.086742485313442f}, - {0.014843788399692f, 0.087133012951149f}, - {0.012700966545425f, 0.087471054919968f}, - {0.010550494103830f, 0.087756407596056f}, - {0.008393666439096f, 0.087988899093631f}, - {0.006231782743558f, 0.088168389368510f}, - {0.004066145255116f, 0.088294770302461f}, - {0.001898058472816f, 0.088367965768336f} - }; - float[][] MDCT_TABLE_1920 = { - {0.032274858518097f, 0.000013202404176f}, - {0.032274642494505f, 0.000118821372483f}, - {0.032274080835421f, 0.000224439068308f}, - {0.032273173546860f, 0.000330054360572f}, - {0.032271920638538f, 0.000435666118218f}, - {0.032270322123873f, 0.000541273210231f}, - {0.032268378019984f, 0.000646874505642f}, - {0.032266088347691f, 0.000752468873546f}, - {0.032263453131514f, 0.000858055183114f}, - {0.032260472399674f, 0.000963632303600f}, - {0.032257146184092f, 0.001069199104358f}, - {0.032253474520390f, 0.001174754454853f}, - {0.032249457447888f, 0.001280297224671f}, - {0.032245095009606f, 0.001385826283535f}, - {0.032240387252262f, 0.001491340501313f}, - {0.032235334226272f, 0.001596838748031f}, - {0.032229935985750f, 0.001702319893890f}, - {0.032224192588507f, 0.001807782809271f}, - {0.032218104096050f, 0.001913226364749f}, - {0.032211670573582f, 0.002018649431111f}, - {0.032204892090000f, 0.002124050879359f}, - {0.032197768717898f, 0.002229429580728f}, - {0.032190300533560f, 0.002334784406698f}, - {0.032182487616965f, 0.002440114229003f}, - {0.032174330051782f, 0.002545417919644f}, - {0.032165827925374f, 0.002650694350905f}, - {0.032156981328790f, 0.002755942395358f}, - {0.032147790356771f, 0.002861160925883f}, - {0.032138255107744f, 0.002966348815672f}, - {0.032128375683825f, 0.003071504938250f}, - {0.032118152190814f, 0.003176628167476f}, - {0.032107584738196f, 0.003281717377568f}, - {0.032096673439141f, 0.003386771443102f}, - {0.032085418410500f, 0.003491789239036f}, - {0.032073819772804f, 0.003596769640711f}, - {0.032061877650267f, 0.003701711523874f}, - {0.032049592170778f, 0.003806613764680f}, - {0.032036963465906f, 0.003911475239711f}, - {0.032023991670893f, 0.004016294825985f}, - {0.032010676924657f, 0.004121071400967f}, - {0.031997019369789f, 0.004225803842586f}, - {0.031983019152549f, 0.004330491029241f}, - {0.031968676422869f, 0.004435131839816f}, - {0.031953991334348f, 0.004539725153692f}, - {0.031938964044252f, 0.004644269850758f}, - {0.031923594713510f, 0.004748764811426f}, - {0.031907883506716f, 0.004853208916638f}, - {0.031891830592124f, 0.004957601047881f}, - {0.031875436141648f, 0.005061940087200f}, - {0.031858700330859f, 0.005166224917208f}, - {0.031841623338985f, 0.005270454421097f}, - {0.031824205348907f, 0.005374627482653f}, - {0.031806446547156f, 0.005478742986267f}, - {0.031788347123916f, 0.005582799816945f}, - {0.031769907273017f, 0.005686796860323f}, - {0.031751127191935f, 0.005790733002674f}, - {0.031732007081789f, 0.005894607130928f}, - {0.031712547147340f, 0.005998418132675f}, - {0.031692747596989f, 0.006102164896182f}, - {0.031672608642773f, 0.006205846310406f}, - {0.031652130500364f, 0.006309461265002f}, - {0.031631313389067f, 0.006413008650337f}, - {0.031610157531816f, 0.006516487357501f}, - {0.031588663155172f, 0.006619896278321f}, - {0.031566830489325f, 0.006723234305370f}, - {0.031544659768083f, 0.006826500331981f}, - {0.031522151228878f, 0.006929693252258f}, - {0.031499305112758f, 0.007032811961088f}, - {0.031476121664387f, 0.007135855354151f}, - {0.031452601132040f, 0.007238822327937f}, - {0.031428743767604f, 0.007341711779751f}, - {0.031404549826572f, 0.007444522607730f}, - {0.031380019568042f, 0.007547253710853f}, - {0.031355153254712f, 0.007649903988952f}, - {0.031329951152882f, 0.007752472342725f}, - {0.031304413532445f, 0.007854957673748f}, - {0.031278540666888f, 0.007957358884484f}, - {0.031252332833290f, 0.008059674878300f}, - {0.031225790312316f, 0.008161904559473f}, - {0.031198913388214f, 0.008264046833205f}, - {0.031171702348814f, 0.008366100605636f}, - {0.031144157485525f, 0.008468064783849f}, - {0.031116279093331f, 0.008569938275893f}, - {0.031088067470786f, 0.008671719990782f}, - {0.031059522920014f, 0.008773408838517f}, - {0.031030645746705f, 0.008875003730092f}, - {0.031001436260110f, 0.008976503577507f}, - {0.030971894773039f, 0.009077907293780f}, - {0.030942021601857f, 0.009179213792959f}, - {0.030911817066483f, 0.009280421990133f}, - {0.030881281490382f, 0.009381530801444f}, - {0.030850415200566f, 0.009482539144097f}, - {0.030819218527589f, 0.009583445936373f}, - {0.030787691805541f, 0.009684250097643f}, - {0.030755835372048f, 0.009784950548375f}, - {0.030723649568268f, 0.009885546210147f}, - {0.030691134738883f, 0.009986036005661f}, - {0.030658291232103f, 0.010086418858753f}, - {0.030625119399655f, 0.010186693694402f}, - {0.030591619596781f, 0.010286859438745f}, - {0.030557792182239f, 0.010386915019088f}, - {0.030523637518292f, 0.010486859363916f}, - {0.030489155970710f, 0.010586691402906f}, - {0.030454347908763f, 0.010686410066936f}, - {0.030419213705216f, 0.010786014288099f}, - {0.030383753736329f, 0.010885502999714f}, - {0.030347968381849f, 0.010984875136338f}, - {0.030311858025010f, 0.011084129633775f}, - {0.030275423052523f, 0.011183265429088f}, - {0.030238663854579f, 0.011282281460612f}, - {0.030201580824838f, 0.011381176667967f}, - {0.030164174360430f, 0.011479949992062f}, - {0.030126444861948f, 0.011578600375117f}, - {0.030088392733446f, 0.011677126760663f}, - {0.030050018382430f, 0.011775528093563f}, - {0.030011322219859f, 0.011873803320018f}, - {0.029972304660138f, 0.011971951387578f}, - {0.029932966121114f, 0.012069971245157f}, - {0.029893307024070f, 0.012167861843041f}, - {0.029853327793724f, 0.012265622132901f}, - {0.029813028858222f, 0.012363251067801f}, - {0.029772410649132f, 0.012460747602215f}, - {0.029731473601443f, 0.012558110692033f}, - {0.029690218153558f, 0.012655339294575f}, - {0.029648644747289f, 0.012752432368600f}, - {0.029606753827855f, 0.012849388874320f}, - {0.029564545843872f, 0.012946207773407f}, - {0.029522021247356f, 0.013042888029011f}, - {0.029479180493710f, 0.013139428605762f}, - {0.029436024041725f, 0.013235828469789f}, - {0.029392552353570f, 0.013332086588727f}, - {0.029348765894794f, 0.013428201931728f}, - {0.029304665134313f, 0.013524173469475f}, - {0.029260250544412f, 0.013620000174189f}, - {0.029215522600735f, 0.013715681019643f}, - {0.029170481782283f, 0.013811214981173f}, - {0.029125128571406f, 0.013906601035686f}, - {0.029079463453801f, 0.014001838161674f}, - {0.029033486918505f, 0.014096925339225f}, - {0.028987199457889f, 0.014191861550031f}, - {0.028940601567655f, 0.014286645777401f}, - {0.028893693746829f, 0.014381277006273f}, - {0.028846476497755f, 0.014475754223221f}, - {0.028798950326094f, 0.014570076416472f}, - {0.028751115740811f, 0.014664242575910f}, - {0.028702973254178f, 0.014758251693091f}, - {0.028654523381760f, 0.014852102761253f}, - {0.028605766642418f, 0.014945794775326f}, - {0.028556703558297f, 0.015039326731945f}, - {0.028507334654823f, 0.015132697629457f}, - {0.028457660460698f, 0.015225906467935f}, - {0.028407681507891f, 0.015318952249187f}, - {0.028357398331639f, 0.015411833976768f}, - {0.028306811470432f, 0.015504550655988f}, - {0.028255921466016f, 0.015597101293927f}, - {0.028204728863381f, 0.015689484899442f}, - {0.028153234210760f, 0.015781700483179f}, - {0.028101438059619f, 0.015873747057582f}, - {0.028049340964652f, 0.015965623636907f}, - {0.027996943483779f, 0.016057329237229f}, - {0.027944246178133f, 0.016148862876456f}, - {0.027891249612061f, 0.016240223574335f}, - {0.027837954353113f, 0.016331410352467f}, - {0.027784360972039f, 0.016422422234315f}, - {0.027730470042780f, 0.016513258245214f}, - {0.027676282142466f, 0.016603917412384f}, - {0.027621797851405f, 0.016694398764938f}, - {0.027567017753080f, 0.016784701333894f}, - {0.027511942434143f, 0.016874824152183f}, - {0.027456572484404f, 0.016964766254662f}, - {0.027400908496833f, 0.017054526678124f}, - {0.027344951067546f, 0.017144104461307f}, - {0.027288700795801f, 0.017233498644904f}, - {0.027232158283994f, 0.017322708271577f}, - {0.027175324137651f, 0.017411732385960f}, - {0.027118198965418f, 0.017500570034678f}, - {0.027060783379060f, 0.017589220266351f}, - {0.027003077993454f, 0.017677682131607f}, - {0.026945083426576f, 0.017765954683088f}, - {0.026886800299502f, 0.017854036975468f}, - {0.026828229236397f, 0.017941928065456f}, - {0.026769370864511f, 0.018029627011808f}, - {0.026710225814170f, 0.018117132875340f}, - {0.026650794718768f, 0.018204444718934f}, - {0.026591078214767f, 0.018291561607551f}, - {0.026531076941680f, 0.018378482608238f}, - {0.026470791542075f, 0.018465206790142f}, - {0.026410222661558f, 0.018551733224515f}, - {0.026349370948775f, 0.018638060984730f}, - {0.026288237055398f, 0.018724189146286f}, - {0.026226821636121f, 0.018810116786819f}, - {0.026165125348656f, 0.018895842986112f}, - {0.026103148853718f, 0.018981366826109f}, - {0.026040892815028f, 0.019066687390916f}, - {0.025978357899296f, 0.019151803766819f}, - {0.025915544776223f, 0.019236715042290f}, - {0.025852454118485f, 0.019321420307998f}, - {0.025789086601733f, 0.019405918656817f}, - {0.025725442904582f, 0.019490209183837f}, - {0.025661523708606f, 0.019574290986376f}, - {0.025597329698327f, 0.019658163163984f}, - {0.025532861561211f, 0.019741824818458f}, - {0.025468119987662f, 0.019825275053848f}, - {0.025403105671008f, 0.019908512976470f}, - {0.025337819307501f, 0.019991537694913f}, - {0.025272261596305f, 0.020074348320047f}, - {0.025206433239491f, 0.020156943965039f}, - {0.025140334942028f, 0.020239323745355f}, - {0.025073967411776f, 0.020321486778774f}, - {0.025007331359476f, 0.020403432185395f}, - {0.024940427498748f, 0.020485159087650f}, - {0.024873256546079f, 0.020566666610309f}, - {0.024805819220816f, 0.020647953880491f}, - {0.024738116245157f, 0.020729020027676f}, - {0.024670148344147f, 0.020809864183709f}, - {0.024601916245669f, 0.020890485482816f}, - {0.024533420680433f, 0.020970883061607f}, - {0.024464662381971f, 0.021051056059087f}, - {0.024395642086630f, 0.021131003616670f}, - {0.024326360533561f, 0.021210724878181f}, - {0.024256818464715f, 0.021290218989868f}, - {0.024187016624830f, 0.021369485100415f}, - {0.024116955761430f, 0.021448522360944f}, - {0.024046636624808f, 0.021527329925030f}, - {0.023976059968027f, 0.021605906948708f}, - {0.023905226546906f, 0.021684252590480f}, - {0.023834137120014f, 0.021762366011328f}, - {0.023762792448662f, 0.021840246374720f}, - {0.023691193296893f, 0.021917892846620f}, - {0.023619340431478f, 0.021995304595495f}, - {0.023547234621902f, 0.022072480792330f}, - {0.023474876640361f, 0.022149420610628f}, - {0.023402267261751f, 0.022226123226426f}, - {0.023329407263659f, 0.022302587818300f}, - {0.023256297426359f, 0.022378813567377f}, - {0.023182938532797f, 0.022454799657339f}, - {0.023109331368588f, 0.022530545274437f}, - {0.023035476722006f, 0.022606049607496f}, - {0.022961375383975f, 0.022681311847926f}, - {0.022887028148061f, 0.022756331189727f}, - {0.022812435810462f, 0.022831106829504f}, - {0.022737599170003f, 0.022905637966469f}, - {0.022662519028125f, 0.022979923802453f}, - {0.022587196188874f, 0.023053963541915f}, - {0.022511631458899f, 0.023127756391950f}, - {0.022435825647437f, 0.023201301562294f}, - {0.022359779566306f, 0.023274598265338f}, - {0.022283494029900f, 0.023347645716133f}, - {0.022206969855176f, 0.023420443132400f}, - {0.022130207861645f, 0.023492989734537f}, - {0.022053208871367f, 0.023565284745628f}, - {0.021975973708940f, 0.023637327391451f}, - {0.021898503201489f, 0.023709116900488f}, - {0.021820798178663f, 0.023780652503931f}, - {0.021742859472618f, 0.023851933435691f}, - {0.021664687918017f, 0.023922958932406f}, - {0.021586284352013f, 0.023993728233451f}, - {0.021507649614247f, 0.024064240580942f}, - {0.021428784546832f, 0.024134495219750f}, - {0.021349689994350f, 0.024204491397504f}, - {0.021270366803840f, 0.024274228364600f}, - {0.021190815824791f, 0.024343705374213f}, - {0.021111037909128f, 0.024412921682298f}, - {0.021031033911210f, 0.024481876547605f}, - {0.020950804687815f, 0.024550569231683f}, - {0.020870351098134f, 0.024618998998889f}, - {0.020789674003759f, 0.024687165116394f}, - {0.020708774268678f, 0.024755066854194f}, - {0.020627652759262f, 0.024822703485116f}, - {0.020546310344257f, 0.024890074284826f}, - {0.020464747894775f, 0.024957178531837f}, - {0.020382966284284f, 0.025024015507516f}, - {0.020300966388600f, 0.025090584496093f}, - {0.020218749085876f, 0.025156884784668f}, - {0.020136315256592f, 0.025222915663218f}, - {0.020053665783549f, 0.025288676424605f}, - {0.019970801551857f, 0.025354166364584f}, - {0.019887723448925f, 0.025419384781811f}, - {0.019804432364452f, 0.025484330977848f}, - {0.019720929190419f, 0.025549004257175f}, - {0.019637214821078f, 0.025613403927192f}, - {0.019553290152943f, 0.025677529298230f}, - {0.019469156084779f, 0.025741379683559f}, - {0.019384813517595f, 0.025804954399392f}, - {0.019300263354632f, 0.025868252764895f}, - {0.019215506501354f, 0.025931274102193f}, - {0.019130543865439f, 0.025994017736379f}, - {0.019045376356769f, 0.026056482995518f}, - {0.018960004887419f, 0.026118669210657f}, - {0.018874430371648f, 0.026180575715833f}, - {0.018788653725892f, 0.026242201848076f}, - {0.018702675868750f, 0.026303546947421f}, - {0.018616497720974f, 0.026364610356909f}, - {0.018530120205464f, 0.026425391422602f}, - {0.018443544247254f, 0.026485889493583f}, - {0.018356770773502f, 0.026546103921965f}, - {0.018269800713483f, 0.026606034062902f}, - {0.018182634998576f, 0.026665679274589f}, - {0.018095274562256f, 0.026725038918274f}, - {0.018007720340083f, 0.026784112358263f}, - {0.017919973269692f, 0.026842898961926f}, - {0.017832034290785f, 0.026901398099707f}, - {0.017743904345116f, 0.026959609145127f}, - {0.017655584376488f, 0.027017531474792f}, - {0.017567075330734f, 0.027075164468401f}, - {0.017478378155718f, 0.027132507508750f}, - {0.017389493801313f, 0.027189559981742f}, - {0.017300423219401f, 0.027246321276391f}, - {0.017211167363854f, 0.027302790784828f}, - {0.017121727190533f, 0.027358967902310f}, - {0.017032103657269f, 0.027414852027226f}, - {0.016942297723858f, 0.027470442561102f}, - {0.016852310352050f, 0.027525738908608f}, - {0.016762142505537f, 0.027580740477564f}, - {0.016671795149944f, 0.027635446678948f}, - {0.016581269252819f, 0.027689856926900f}, - {0.016490565783622f, 0.027743970638730f}, - {0.016399685713714f, 0.027797787234924f}, - {0.016308630016347f, 0.027851306139149f}, - {0.016217399666655f, 0.027904526778260f}, - {0.016125995641641f, 0.027957448582309f}, - {0.016034418920170f, 0.028010070984544f}, - {0.015942670482954f, 0.028062393421421f}, - {0.015850751312545f, 0.028114415332610f}, - {0.015758662393324f, 0.028166136160998f}, - {0.015666404711489f, 0.028217555352697f}, - {0.015573979255046f, 0.028268672357047f}, - {0.015481387013797f, 0.028319486626627f}, - {0.015388628979331f, 0.028369997617257f}, - {0.015295706145012f, 0.028420204788004f}, - {0.015202619505968f, 0.028470107601191f}, - {0.015109370059084f, 0.028519705522399f}, - {0.015015958802984f, 0.028568998020472f}, - {0.014922386738030f, 0.028617984567529f}, - {0.014828654866302f, 0.028666664638963f}, - {0.014734764191593f, 0.028715037713449f}, - {0.014640715719398f, 0.028763103272951f}, - {0.014546510456900f, 0.028810860802724f}, - {0.014452149412962f, 0.028858309791325f}, - {0.014357633598114f, 0.028905449730613f}, - {0.014262964024545f, 0.028952280115756f}, - {0.014168141706090f, 0.028998800445240f}, - {0.014073167658220f, 0.029045010220868f}, - {0.013978042898030f, 0.029090908947771f}, - {0.013882768444231f, 0.029136496134411f}, - {0.013787345317136f, 0.029181771292585f}, - {0.013691774538648f, 0.029226733937433f}, - {0.013596057132255f, 0.029271383587441f}, - {0.013500194123014f, 0.029315719764447f}, - {0.013404186537539f, 0.029359741993647f}, - {0.013308035403995f, 0.029403449803598f}, - {0.013211741752084f, 0.029446842726223f}, - {0.013115306613032f, 0.029489920296820f}, - {0.013018731019584f, 0.029532682054063f}, - {0.012922016005985f, 0.029575127540008f}, - {0.012825162607977f, 0.029617256300097f}, - {0.012728171862781f, 0.029659067883165f}, - {0.012631044809089f, 0.029700561841444f}, - {0.012533782487056f, 0.029741737730567f}, - {0.012436385938281f, 0.029782595109573f}, - {0.012338856205805f, 0.029823133540913f}, - {0.012241194334091f, 0.029863352590452f}, - {0.012143401369021f, 0.029903251827477f}, - {0.012045478357878f, 0.029942830824699f}, - {0.011947426349339f, 0.029982089158259f}, - {0.011849246393462f, 0.030021026407731f}, - {0.011750939541676f, 0.030059642156129f}, - {0.011652506846768f, 0.030097935989909f}, - {0.011553949362874f, 0.030135907498976f}, - {0.011455268145464f, 0.030173556276684f}, - {0.011356464251335f, 0.030210881919845f}, - {0.011257538738598f, 0.030247884028732f}, - {0.011158492666665f, 0.030284562207083f}, - {0.011059327096240f, 0.030320916062102f}, - {0.010960043089307f, 0.030356945204470f}, - {0.010860641709118f, 0.030392649248343f}, - {0.010761124020182f, 0.030428027811361f}, - {0.010661491088253f, 0.030463080514646f}, - {0.010561743980319f, 0.030497806982812f}, - {0.010461883764593f, 0.030532206843968f}, - {0.010361911510496f, 0.030566279729717f}, - {0.010261828288652f, 0.030600025275167f}, - {0.010161635170872f, 0.030633443118931f}, - {0.010061333230142f, 0.030666532903129f}, - {0.009960923540617f, 0.030699294273397f}, - {0.009860407177603f, 0.030731726878888f}, - {0.009759785217550f, 0.030763830372273f}, - {0.009659058738038f, 0.030795604409750f}, - {0.009558228817767f, 0.030827048651045f}, - {0.009457296536545f, 0.030858162759415f}, - {0.009356262975275f, 0.030888946401653f}, - {0.009255129215945f, 0.030919399248091f}, - {0.009153896341616f, 0.030949520972603f}, - {0.009052565436412f, 0.030979311252611f}, - {0.008951137585505f, 0.031008769769084f}, - {0.008849613875105f, 0.031037896206544f}, - {0.008747995392451f, 0.031066690253072f}, - {0.008646283225794f, 0.031095151600306f}, - {0.008544478464390f, 0.031123279943448f}, - {0.008442582198486f, 0.031151074981266f}, - {0.008340595519310f, 0.031178536416098f}, - {0.008238519519057f, 0.031205663953853f}, - {0.008136355290878f, 0.031232457304017f}, - {0.008034103928871f, 0.031258916179656f}, - {0.007931766528065f, 0.031285040297416f}, - {0.007829344184412f, 0.031310829377528f}, - {0.007726837994772f, 0.031336283143813f}, - {0.007624249056906f, 0.031361401323680f}, - {0.007521578469457f, 0.031386183648135f}, - {0.007418827331946f, 0.031410629851778f}, - {0.007315996744755f, 0.031434739672811f}, - {0.007213087809115f, 0.031458512853036f}, - {0.007110101627101f, 0.031481949137863f}, - {0.007007039301610f, 0.031505048276306f}, - {0.006903901936357f, 0.031527810020993f}, - {0.006800690635862f, 0.031550234128164f}, - {0.006697406505433f, 0.031572320357675f}, - {0.006594050651161f, 0.031594068473000f}, - {0.006490624179905f, 0.031615478241233f}, - {0.006387128199278f, 0.031636549433095f}, - {0.006283563817639f, 0.031657281822929f}, - {0.006179932144080f, 0.031677675188707f}, - {0.006076234288412f, 0.031697729312034f}, - {0.005972471361157f, 0.031717443978146f}, - {0.005868644473532f, 0.031736818975914f}, - {0.005764754737440f, 0.031755854097848f}, - {0.005660803265456f, 0.031774549140098f}, - {0.005556791170816f, 0.031792903902453f}, - {0.005452719567407f, 0.031810918188350f}, - {0.005348589569753f, 0.031828591804869f}, - {0.005244402293001f, 0.031845924562742f}, - {0.005140158852914f, 0.031862916276347f}, - {0.005035860365855f, 0.031879566763717f}, - {0.004931507948778f, 0.031895875846539f}, - {0.004827102719212f, 0.031911843350155f}, - {0.004722645795254f, 0.031927469103567f}, - {0.004618138295554f, 0.031942752939435f}, - {0.004513581339303f, 0.031957694694082f}, - {0.004408976046222f, 0.031972294207493f}, - {0.004304323536549f, 0.031986551323320f}, - {0.004199624931030f, 0.032000465888879f}, - {0.004094881350902f, 0.032014037755158f}, - {0.003990093917884f, 0.032027266776813f}, - {0.003885263754166f, 0.032040152812170f}, - {0.003780391982394f, 0.032052695723232f}, - {0.003675479725661f, 0.032064895375674f}, - {0.003570528107494f, 0.032076751638847f}, - {0.003465538251839f, 0.032088264385780f}, - {0.003360511283053f, 0.032099433493181f}, - {0.003255448325892f, 0.032110258841438f}, - {0.003150350505494f, 0.032120740314619f}, - {0.003045218947373f, 0.032130877800478f}, - {0.002940054777404f, 0.032140671190449f}, - {0.002834859121810f, 0.032150120379653f}, - {0.002729633107153f, 0.032159225266897f}, - {0.002624377860318f, 0.032167985754674f}, - {0.002519094508504f, 0.032176401749168f}, - {0.002413784179212f, 0.032184473160250f}, - {0.002308448000231f, 0.032192199901481f}, - {0.002203087099626f, 0.032199581890114f}, - {0.002097702605728f, 0.032206619047093f}, - {0.001992295647121f, 0.032213311297057f}, - {0.001886867352628f, 0.032219658568338f}, - {0.001781418851302f, 0.032225660792960f}, - {0.001675951272410f, 0.032231317906644f}, - {0.001570465745428f, 0.032236629848809f}, - {0.001464963400018f, 0.032241596562566f}, - {0.001359445366028f, 0.032246217994727f}, - {0.001253912773470f, 0.032250494095799f}, - {0.001148366752513f, 0.032254424819990f}, - {0.001042808433471f, 0.032258010125204f}, - {0.000937238946789f, 0.032261249973045f}, - {0.000831659423030f, 0.032264144328817f}, - {0.000726070992868f, 0.032266693161525f}, - {0.000620474787068f, 0.032268896443871f}, - {0.000514871936481f, 0.032270754152261f}, - {0.000409263572030f, 0.032272266266801f}, - {0.000303650824695f, 0.032273432771295f}, - {0.000198034825504f, 0.032274253653254f}, - {0.000092416705518f, 0.032274728903884f} - }; - float[][] MDCT_TABLE_240 = { - {0.091286604111815f, 0.000298735779793f}, - {0.091247502481454f, 0.002688238127538f}, - {0.091145864370807f, 0.005075898091152f}, - {0.090981759437558f, 0.007460079287760f}, - {0.090755300151030f, 0.009839147718664f}, - {0.090466641715108f, 0.012211472889198f}, - {0.090115981961863f, 0.014575428926191f}, - {0.089703561215976f, 0.016929395692256f}, - {0.089229662130024f, 0.019271759896156f}, - {0.088694609490769f, 0.021600916198470f}, - {0.088098769996564f, 0.023915268311810f}, - {0.087442552006035f, 0.026213230094844f}, - {0.086726405258214f, 0.028493226639351f}, - {0.085950820564309f, 0.030753695349588f}, - {0.085116329471329f, 0.032993087013213f}, - {0.084223503897785f, 0.035209866863042f}, - {0.083272955741727f, 0.037402515628894f}, - {0.082265336461381f, 0.039569530578832f}, - {0.081201336628670f, 0.041709426549053f}, - {0.080081685455930f, 0.043820736961749f}, - {0.078907150296148f, 0.045902014830227f}, - {0.077678536117054f, 0.047951833750597f}, - {0.076396684949434f, 0.049968788879362f}, - {0.075062475310050f, 0.051951497896226f}, - {0.073676821599542f, 0.053898601951466f}, - {0.072240673475749f, 0.055808766597225f}, - {0.070755015202858f, 0.057680682702068f}, - {0.069220864976840f, 0.059513067348201f}, - {0.067639274227625f, 0.061304664710718f}, - {0.066011326898512f, 0.063054246918278f}, - {0.064338138703282f, 0.064760614894630f}, - {0.062620856361546f, 0.066422599180399f}, - {0.060860656812842f, 0.068039060734572f}, - {0.059058746410016f, 0.069608891715145f}, - {0.057216360092450f, 0.071131016238378f}, - {0.055334760539699f, 0.072604391116154f}, - {0.053415237306106f, 0.074028006570930f}, - {0.051459105937014f, 0.075400886927784f}, - {0.049467707067153f, 0.076722091283096f}, - {0.047442405501835f, 0.077990714149396f}, - {0.045384589281588f, 0.079205886075941f}, - {0.043295668730857f, 0.080366774244592f}, - {0.041177075491445f, 0.081472583040586f}, - {0.039030261541332f, 0.082522554597810f}, - {0.036856698199564f, 0.083515969318206f}, - {0.034657875117883f, 0.084452146364948f}, - {0.032435299259796f, 0.085330444129049f}, - {0.030190493867775f, 0.086150260669096f}, - {0.027924997419306f, 0.086911034123781f}, - {0.025640362572491f, 0.087612243096981f}, - {0.023338155101933f, 0.088253407015092f}, - {0.021019952825636f, 0.088834086456390f}, - {0.018687344523641f, 0.089353883452193f}, - {0.016341928849164f, 0.089812441759604f}, - {0.013985313232951f, 0.090209447105664f}, - {0.011619112781631f, 0.090544627402740f}, - {0.009244949170797f, 0.090817752935000f}, - {0.006864449533597f, 0.091028636515846f}, - {0.004479245345574f, 0.091177133616206f}, - {0.002090971306534f, 0.091263142463585f} - }; + float[][] MDCT_TABLE_2048 = { + {0.031249997702054f, 0.000011984224612f}, + {0.031249813866531f, 0.000107857810004f}, + {0.031249335895858f, 0.000203730380198f}, + {0.031248563794535f, 0.000299601032804f}, + {0.031247497569829f, 0.000395468865451f}, + {0.031246137231775f, 0.000491332975794f}, + {0.031244482793177f, 0.000587192461525f}, + {0.031242534269608f, 0.000683046420376f}, + {0.031240291679407f, 0.000778893950134f}, + {0.031237755043684f, 0.000874734148645f}, + {0.031234924386313f, 0.000970566113826f}, + {0.031231799733938f, 0.001066388943669f}, + {0.031228381115970f, 0.001162201736253f}, + {0.031224668564585f, 0.001258003589751f}, + {0.031220662114728f, 0.001353793602441f}, + {0.031216361804108f, 0.001449570872710f}, + {0.031211767673203f, 0.001545334499065f}, + {0.031206879765253f, 0.001641083580144f}, + {0.031201698126266f, 0.001736817214719f}, + {0.031196222805014f, 0.001832534501709f}, + {0.031190453853031f, 0.001928234540186f}, + {0.031184391324617f, 0.002023916429386f}, + {0.031178035276836f, 0.002119579268713f}, + {0.031171385769513f, 0.002215222157753f}, + {0.031164442865236f, 0.002310844196278f}, + {0.031157206629353f, 0.002406444484258f}, + {0.031149677129975f, 0.002502022121865f}, + {0.031141854437973f, 0.002597576209488f}, + {0.031133738626977f, 0.002693105847734f}, + {0.031125329773375f, 0.002788610137442f}, + {0.031116627956316f, 0.002884088179689f}, + {0.031107633257703f, 0.002979539075801f}, + {0.031098345762200f, 0.003074961927355f}, + {0.031088765557222f, 0.003170355836197f}, + {0.031078892732942f, 0.003265719904442f}, + {0.031068727382288f, 0.003361053234488f}, + {0.031058269600939f, 0.003456354929021f}, + {0.031047519487329f, 0.003551624091024f}, + {0.031036477142640f, 0.003646859823790f}, + {0.031025142670809f, 0.003742061230921f}, + {0.031013516178519f, 0.003837227416347f}, + {0.031001597775203f, 0.003932357484328f}, + {0.030989387573042f, 0.004027450539462f}, + {0.030976885686963f, 0.004122505686697f}, + {0.030964092234638f, 0.004217522031340f}, + {0.030951007336485f, 0.004312498679058f}, + {0.030937631115663f, 0.004407434735897f}, + {0.030923963698074f, 0.004502329308281f}, + {0.030910005212362f, 0.004597181503027f}, + {0.030895755789908f, 0.004691990427350f}, + {0.030881215564835f, 0.004786755188872f}, + {0.030866384674000f, 0.004881474895632f}, + {0.030851263256996f, 0.004976148656090f}, + {0.030835851456154f, 0.005070775579142f}, + {0.030820149416533f, 0.005165354774124f}, + {0.030804157285929f, 0.005259885350819f}, + {0.030787875214864f, 0.005354366419469f}, + {0.030771303356593f, 0.005448797090784f}, + {0.030754441867095f, 0.005543176475946f}, + {0.030737290905077f, 0.005637503686619f}, + {0.030719850631972f, 0.005731777834961f}, + {0.030702121211932f, 0.005825998033626f}, + {0.030684102811835f, 0.005920163395780f}, + {0.030665795601276f, 0.006014273035101f}, + {0.030647199752570f, 0.006108326065793f}, + {0.030628315440748f, 0.006202321602594f}, + {0.030609142843557f, 0.006296258760782f}, + {0.030589682141455f, 0.006390136656185f}, + {0.030569933517616f, 0.006483954405188f}, + {0.030549897157919f, 0.006577711124743f}, + {0.030529573250956f, 0.006671405932375f}, + {0.030508961988022f, 0.006765037946194f}, + {0.030488063563118f, 0.006858606284900f}, + {0.030466878172949f, 0.006952110067791f}, + {0.030445406016919f, 0.007045548414774f}, + {0.030423647297133f, 0.007138920446372f}, + {0.030401602218392f, 0.007232225283733f}, + {0.030379270988192f, 0.007325462048634f}, + {0.030356653816724f, 0.007418629863497f}, + {0.030333750916869f, 0.007511727851390f}, + {0.030310562504198f, 0.007604755136040f}, + {0.030287088796968f, 0.007697710841838f}, + {0.030263330016124f, 0.007790594093851f}, + {0.030239286385293f, 0.007883404017824f}, + {0.030214958130781f, 0.007976139740197f}, + {0.030190345481576f, 0.008068800388104f}, + {0.030165448669342f, 0.008161385089390f}, + {0.030140267928416f, 0.008253892972610f}, + {0.030114803495809f, 0.008346323167047f}, + {0.030089055611203f, 0.008438674802711f}, + {0.030063024516947f, 0.008530947010354f}, + {0.030036710458054f, 0.008623138921475f}, + {0.030010113682202f, 0.008715249668328f}, + {0.029983234439732f, 0.008807278383932f}, + {0.029956072983640f, 0.008899224202078f}, + {0.029928629569580f, 0.008991086257336f}, + {0.029900904455860f, 0.009082863685067f}, + {0.029872897903441f, 0.009174555621425f}, + {0.029844610175929f, 0.009266161203371f}, + {0.029816041539579f, 0.009357679568679f}, + {0.029787192263292f, 0.009449109855944f}, + {0.029758062618606f, 0.009540451204587f}, + {0.029728652879702f, 0.009631702754871f}, + {0.029698963323395f, 0.009722863647900f}, + {0.029668994229134f, 0.009813933025633f}, + {0.029638745879000f, 0.009904910030891f}, + {0.029608218557702f, 0.009995793807363f}, + {0.029577412552575f, 0.010086583499618f}, + {0.029546328153577f, 0.010177278253107f}, + {0.029514965653285f, 0.010267877214177f}, + {0.029483325346896f, 0.010358379530076f}, + {0.029451407532220f, 0.010448784348962f}, + {0.029419212509679f, 0.010539090819911f}, + {0.029386740582307f, 0.010629298092923f}, + {0.029353992055740f, 0.010719405318933f}, + {0.029320967238220f, 0.010809411649818f}, + {0.029287666440590f, 0.010899316238403f}, + {0.029254089976290f, 0.010989118238474f}, + {0.029220238161353f, 0.011078816804778f}, + {0.029186111314406f, 0.011168411093039f}, + {0.029151709756664f, 0.011257900259961f}, + {0.029117033811927f, 0.011347283463239f}, + {0.029082083806579f, 0.011436559861563f}, + {0.029046860069582f, 0.011525728614630f}, + {0.029011362932476f, 0.011614788883150f}, + {0.028975592729373f, 0.011703739828853f}, + {0.028939549796957f, 0.011792580614500f}, + {0.028903234474475f, 0.011881310403886f}, + {0.028866647103744f, 0.011969928361855f}, + {0.028829788029135f, 0.012058433654299f}, + {0.028792657597583f, 0.012146825448172f}, + {0.028755256158571f, 0.012235102911499f}, + {0.028717584064137f, 0.012323265213377f}, + {0.028679641668864f, 0.012411311523990f}, + {0.028641429329882f, 0.012499241014612f}, + {0.028602947406859f, 0.012587052857618f}, + {0.028564196262001f, 0.012674746226488f}, + {0.028525176260050f, 0.012762320295819f}, + {0.028485887768276f, 0.012849774241331f}, + {0.028446331156478f, 0.012937107239875f}, + {0.028406506796976f, 0.013024318469437f}, + {0.028366415064615f, 0.013111407109155f}, + {0.028326056336751f, 0.013198372339315f}, + {0.028285430993258f, 0.013285213341368f}, + {0.028244539416515f, 0.013371929297933f}, + {0.028203381991411f, 0.013458519392807f}, + {0.028161959105334f, 0.013544982810971f}, + {0.028120271148172f, 0.013631318738598f}, + {0.028078318512309f, 0.013717526363062f}, + {0.028036101592619f, 0.013803604872943f}, + {0.027993620786463f, 0.013889553458039f}, + {0.027950876493687f, 0.013975371309367f}, + {0.027907869116616f, 0.014061057619178f}, + {0.027864599060052f, 0.014146611580959f}, + {0.027821066731270f, 0.014232032389445f}, + {0.027777272540012f, 0.014317319240622f}, + {0.027733216898487f, 0.014402471331737f}, + {0.027688900221361f, 0.014487487861307f}, + {0.027644322925762f, 0.014572368029123f}, + {0.027599485431266f, 0.014657111036262f}, + {0.027554388159903f, 0.014741716085090f}, + {0.027509031536144f, 0.014826182379271f}, + {0.027463415986904f, 0.014910509123778f}, + {0.027417541941533f, 0.014994695524894f}, + {0.027371409831816f, 0.015078740790225f}, + {0.027325020091965f, 0.015162644128704f}, + {0.027278373158618f, 0.015246404750603f}, + {0.027231469470833f, 0.015330021867534f}, + {0.027184309470088f, 0.015413494692460f}, + {0.027136893600268f, 0.015496822439704f}, + {0.027089222307671f, 0.015580004324954f}, + {0.027041296040997f, 0.015663039565269f}, + {0.026993115251345f, 0.015745927379091f}, + {0.026944680392213f, 0.015828666986247f}, + {0.026895991919487f, 0.015911257607961f}, + {0.026847050291442f, 0.015993698466859f}, + {0.026797855968734f, 0.016075988786976f}, + {0.026748409414401f, 0.016158127793763f}, + {0.026698711093851f, 0.016240114714099f}, + {0.026648761474864f, 0.016321948776289f}, + {0.026598561027585f, 0.016403629210082f}, + {0.026548110224519f, 0.016485155246669f}, + {0.026497409540530f, 0.016566526118696f}, + {0.026446459452830f, 0.016647741060271f}, + {0.026395260440982f, 0.016728799306966f}, + {0.026343812986890f, 0.016809700095831f}, + {0.026292117574797f, 0.016890442665397f}, + {0.026240174691280f, 0.016971026255683f}, + {0.026187984825246f, 0.017051450108208f}, + {0.026135548467924f, 0.017131713465990f}, + {0.026082866112867f, 0.017211815573560f}, + {0.026029938255941f, 0.017291755676967f}, + {0.025976765395322f, 0.017371533023784f}, + {0.025923348031494f, 0.017451146863116f}, + {0.025869686667242f, 0.017530596445607f}, + {0.025815781807646f, 0.017609881023449f}, + {0.025761633960080f, 0.017688999850383f}, + {0.025707243634204f, 0.017767952181715f}, + {0.025652611341960f, 0.017846737274313f}, + {0.025597737597568f, 0.017925354386623f}, + {0.025542622917522f, 0.018003802778671f}, + {0.025487267820581f, 0.018082081712071f}, + {0.025431672827768f, 0.018160190450031f}, + {0.025375838462365f, 0.018238128257362f}, + {0.025319765249906f, 0.018315894400484f}, + {0.025263453718173f, 0.018393488147432f}, + {0.025206904397193f, 0.018470908767865f}, + {0.025150117819228f, 0.018548155533070f}, + {0.025093094518776f, 0.018625227715971f}, + {0.025035835032562f, 0.018702124591135f}, + {0.024978339899534f, 0.018778845434780f}, + {0.024920609660858f, 0.018855389524780f}, + {0.024862644859912f, 0.018931756140672f}, + {0.024804446042284f, 0.019007944563666f}, + {0.024746013755764f, 0.019083954076646f}, + {0.024687348550337f, 0.019159783964183f}, + {0.024628450978184f, 0.019235433512536f}, + {0.024569321593670f, 0.019310902009663f}, + {0.024509960953345f, 0.019386188745225f}, + {0.024450369615932f, 0.019461293010596f}, + {0.024390548142329f, 0.019536214098866f}, + {0.024330497095598f, 0.019610951304848f}, + {0.024270217040961f, 0.019685503925087f}, + {0.024209708545799f, 0.019759871257867f}, + {0.024148972179639f, 0.019834052603212f}, + {0.024088008514157f, 0.019908047262901f}, + {0.024026818123164f, 0.019981854540467f}, + {0.023965401582609f, 0.020055473741208f}, + {0.023903759470567f, 0.020128904172192f}, + {0.023841892367236f, 0.020202145142264f}, + {0.023779800854935f, 0.020275195962052f}, + {0.023717485518092f, 0.020348055943974f}, + {0.023654946943242f, 0.020420724402244f}, + {0.023592185719023f, 0.020493200652878f}, + {0.023529202436167f, 0.020565484013703f}, + {0.023465997687496f, 0.020637573804361f}, + {0.023402572067918f, 0.020709469346314f}, + {0.023338926174419f, 0.020781169962854f}, + {0.023275060606058f, 0.020852674979108f}, + {0.023210975963963f, 0.020923983722044f}, + {0.023146672851322f, 0.020995095520475f}, + {0.023082151873380f, 0.021066009705072f}, + {0.023017413637435f, 0.021136725608363f}, + {0.022952458752826f, 0.021207242564742f}, + {0.022887287830934f, 0.021277559910478f}, + {0.022821901485173f, 0.021347676983716f}, + {0.022756300330983f, 0.021417593124488f}, + {0.022690484985827f, 0.021487307674717f}, + {0.022624456069185f, 0.021556819978223f}, + {0.022558214202547f, 0.021626129380729f}, + {0.022491760009405f, 0.021695235229869f}, + {0.022425094115252f, 0.021764136875192f}, + {0.022358217147572f, 0.021832833668171f}, + {0.022291129735838f, 0.021901324962204f}, + {0.022223832511501f, 0.021969610112625f}, + {0.022156326107988f, 0.022037688476709f}, + {0.022088611160696f, 0.022105559413676f}, + {0.022020688306983f, 0.022173222284699f}, + {0.021952558186166f, 0.022240676452909f}, + {0.021884221439510f, 0.022307921283403f}, + {0.021815678710228f, 0.022374956143245f}, + {0.021746930643469f, 0.022441780401478f}, + {0.021677977886316f, 0.022508393429127f}, + {0.021608821087780f, 0.022574794599206f}, + {0.021539460898790f, 0.022640983286719f}, + {0.021469897972190f, 0.022706958868676f}, + {0.021400132962735f, 0.022772720724087f}, + {0.021330166527077f, 0.022838268233979f}, + {0.021259999323769f, 0.022903600781391f}, + {0.021189632013250f, 0.022968717751391f}, + {0.021119065257845f, 0.023033618531071f}, + {0.021048299721754f, 0.023098302509561f}, + {0.020977336071050f, 0.023162769078031f}, + {0.020906174973670f, 0.023227017629698f}, + {0.020834817099409f, 0.023291047559828f}, + {0.020763263119915f, 0.023354858265748f}, + {0.020691513708680f, 0.023418449146848f}, + {0.020619569541038f, 0.023481819604585f}, + {0.020547431294155f, 0.023544969042494f}, + {0.020475099647023f, 0.023607896866186f}, + {0.020402575280455f, 0.023670602483363f}, + {0.020329858877078f, 0.023733085303813f}, + {0.020256951121327f, 0.023795344739427f}, + {0.020183852699437f, 0.023857380204193f}, + {0.020110564299439f, 0.023919191114211f}, + {0.020037086611150f, 0.023980776887692f}, + {0.019963420326171f, 0.024042136944968f}, + {0.019889566137877f, 0.024103270708495f}, + {0.019815524741412f, 0.024164177602859f}, + {0.019741296833681f, 0.024224857054779f}, + {0.019666883113346f, 0.024285308493120f}, + {0.019592284280817f, 0.024345531348888f}, + {0.019517501038246f, 0.024405525055242f}, + {0.019442534089523f, 0.024465289047500f}, + {0.019367384140264f, 0.024524822763141f}, + {0.019292051897809f, 0.024584125641809f}, + {0.019216538071215f, 0.024643197125323f}, + {0.019140843371246f, 0.024702036657681f}, + {0.019064968510369f, 0.024760643685063f}, + {0.018988914202748f, 0.024819017655836f}, + {0.018912681164234f, 0.024877158020562f}, + {0.018836270112363f, 0.024935064232003f}, + {0.018759681766343f, 0.024992735745123f}, + {0.018682916847054f, 0.025050172017095f}, + {0.018605976077037f, 0.025107372507308f}, + {0.018528860180486f, 0.025164336677369f}, + {0.018451569883247f, 0.025221063991110f}, + {0.018374105912805f, 0.025277553914591f}, + {0.018296468998280f, 0.025333805916107f}, + {0.018218659870421f, 0.025389819466194f}, + {0.018140679261596f, 0.025445594037630f}, + {0.018062527905790f, 0.025501129105445f}, + {0.017984206538592f, 0.025556424146920f}, + {0.017905715897192f, 0.025611478641598f}, + {0.017827056720375f, 0.025666292071285f}, + {0.017748229748511f, 0.025720863920056f}, + {0.017669235723550f, 0.025775193674260f}, + {0.017590075389012f, 0.025829280822525f}, + {0.017510749489986f, 0.025883124855762f}, + {0.017431258773116f, 0.025936725267170f}, + {0.017351603986600f, 0.025990081552242f}, + {0.017271785880180f, 0.026043193208768f}, + {0.017191805205132f, 0.026096059736841f}, + {0.017111662714267f, 0.026148680638861f}, + {0.017031359161915f, 0.026201055419541f}, + {0.016950895303924f, 0.026253183585908f}, + {0.016870271897651f, 0.026305064647313f}, + {0.016789489701954f, 0.026356698115431f}, + {0.016708549477186f, 0.026408083504269f}, + {0.016627451985187f, 0.026459220330167f}, + {0.016546197989277f, 0.026510108111806f}, + {0.016464788254250f, 0.026560746370212f}, + {0.016383223546365f, 0.026611134628757f}, + {0.016301504633341f, 0.026661272413168f}, + {0.016219632284346f, 0.026711159251530f}, + {0.016137607269996f, 0.026760794674288f}, + {0.016055430362340f, 0.026810178214254f}, + {0.015973102334858f, 0.026859309406613f}, + {0.015890623962454f, 0.026908187788922f}, + {0.015807996021446f, 0.026956812901119f}, + {0.015725219289558f, 0.027005184285527f}, + {0.015642294545918f, 0.027053301486856f}, + {0.015559222571044f, 0.027101164052208f}, + {0.015476004146842f, 0.027148771531083f}, + {0.015392640056594f, 0.027196123475380f}, + {0.015309131084956f, 0.027243219439406f}, + {0.015225478017946f, 0.027290058979875f}, + {0.015141681642938f, 0.027336641655915f}, + {0.015057742748656f, 0.027382967029073f}, + {0.014973662125164f, 0.027429034663317f}, + {0.014889440563862f, 0.027474844125040f}, + {0.014805078857474f, 0.027520394983066f}, + {0.014720577800046f, 0.027565686808654f}, + {0.014635938186934f, 0.027610719175499f}, + {0.014551160814797f, 0.027655491659740f}, + {0.014466246481592f, 0.027700003839960f}, + {0.014381195986567f, 0.027744255297195f}, + {0.014296010130247f, 0.027788245614933f}, + {0.014210689714436f, 0.027831974379120f}, + {0.014125235542201f, 0.027875441178165f}, + {0.014039648417870f, 0.027918645602941f}, + {0.013953929147020f, 0.027961587246792f}, + {0.013868078536476f, 0.028004265705534f}, + {0.013782097394294f, 0.028046680577462f}, + {0.013695986529763f, 0.028088831463351f}, + {0.013609746753390f, 0.028130717966461f}, + {0.013523378876898f, 0.028172339692540f}, + {0.013436883713214f, 0.028213696249828f}, + {0.013350262076462f, 0.028254787249062f}, + {0.013263514781960f, 0.028295612303478f}, + {0.013176642646205f, 0.028336171028814f}, + {0.013089646486871f, 0.028376463043317f}, + {0.013002527122799f, 0.028416487967743f}, + {0.012915285373990f, 0.028456245425361f}, + {0.012827922061597f, 0.028495735041960f}, + {0.012740438007915f, 0.028534956445849f}, + {0.012652834036379f, 0.028573909267859f}, + {0.012565110971550f, 0.028612593141354f}, + {0.012477269639111f, 0.028651007702224f}, + {0.012389310865858f, 0.028689152588899f}, + {0.012301235479693f, 0.028727027442343f}, + {0.012213044309615f, 0.028764631906065f}, + {0.012124738185712f, 0.028801965626115f}, + {0.012036317939156f, 0.028839028251097f}, + {0.011947784402191f, 0.028875819432161f}, + {0.011859138408130f, 0.028912338823015f}, + {0.011770380791341f, 0.028948586079925f}, + {0.011681512387245f, 0.028984560861718f}, + {0.011592534032306f, 0.029020262829785f}, + {0.011503446564022f, 0.029055691648087f}, + {0.011414250820918f, 0.029090846983152f}, + {0.011324947642537f, 0.029125728504087f}, + {0.011235537869437f, 0.029160335882573f}, + {0.011146022343175f, 0.029194668792871f}, + {0.011056401906305f, 0.029228726911828f}, + {0.010966677402371f, 0.029262509918876f}, + {0.010876849675891f, 0.029296017496036f}, + {0.010786919572361f, 0.029329249327922f}, + {0.010696887938235f, 0.029362205101743f}, + {0.010606755620926f, 0.029394884507308f}, + {0.010516523468793f, 0.029427287237024f}, + {0.010426192331137f, 0.029459412985906f}, + {0.010335763058187f, 0.029491261451573f}, + {0.010245236501099f, 0.029522832334255f}, + {0.010154613511943f, 0.029554125336796f}, + {0.010063894943698f, 0.029585140164654f}, + {0.009973081650240f, 0.029615876525905f}, + {0.009882174486340f, 0.029646334131247f}, + {0.009791174307650f, 0.029676512694001f}, + {0.009700081970699f, 0.029706411930116f}, + {0.009608898332881f, 0.029736031558168f}, + {0.009517624252453f, 0.029765371299366f}, + {0.009426260588521f, 0.029794430877553f}, + {0.009334808201034f, 0.029823210019210f}, + {0.009243267950778f, 0.029851708453456f}, + {0.009151640699363f, 0.029879925912053f}, + {0.009059927309220f, 0.029907862129408f}, + {0.008968128643591f, 0.029935516842573f}, + {0.008876245566520f, 0.029962889791254f}, + {0.008784278942845f, 0.029989980717805f}, + {0.008692229638191f, 0.030016789367235f}, + {0.008600098518961f, 0.030043315487212f}, + {0.008507886452329f, 0.030069558828062f}, + {0.008415594306230f, 0.030095519142772f}, + {0.008323222949351f, 0.030121196186994f}, + {0.008230773251129f, 0.030146589719046f}, + {0.008138246081733f, 0.030171699499915f}, + {0.008045642312067f, 0.030196525293257f}, + {0.007952962813750f, 0.030221066865402f}, + {0.007860208459119f, 0.030245323985357f}, + {0.007767380121212f, 0.030269296424803f}, + {0.007674478673766f, 0.030292983958103f}, + {0.007581504991203f, 0.030316386362302f}, + {0.007488459948628f, 0.030339503417126f}, + {0.007395344421816f, 0.030362334904989f}, + {0.007302159287206f, 0.030384880610993f}, + {0.007208905421891f, 0.030407140322928f}, + {0.007115583703613f, 0.030429113831278f}, + {0.007022195010752f, 0.030450800929220f}, + {0.006928740222316f, 0.030472201412626f}, + {0.006835220217939f, 0.030493315080068f}, + {0.006741635877866f, 0.030514141732814f}, + {0.006647988082948f, 0.030534681174838f}, + {0.006554277714635f, 0.030554933212813f}, + {0.006460505654964f, 0.030574897656119f}, + {0.006366672786553f, 0.030594574316845f}, + {0.006272779992593f, 0.030613963009786f}, + {0.006178828156839f, 0.030633063552447f}, + {0.006084818163601f, 0.030651875765048f}, + {0.005990750897737f, 0.030670399470520f}, + {0.005896627244644f, 0.030688634494512f}, + {0.005802448090250f, 0.030706580665388f}, + {0.005708214321004f, 0.030724237814232f}, + {0.005613926823871f, 0.030741605774849f}, + {0.005519586486321f, 0.030758684383764f}, + {0.005425194196321f, 0.030775473480228f}, + {0.005330750842327f, 0.030791972906214f}, + {0.005236257313276f, 0.030808182506425f}, + {0.005141714498576f, 0.030824102128288f}, + {0.005047123288102f, 0.030839731621963f}, + {0.004952484572181f, 0.030855070840339f}, + {0.004857799241589f, 0.030870119639036f}, + {0.004763068187541f, 0.030884877876411f}, + {0.004668292301681f, 0.030899345413553f}, + {0.004573472476075f, 0.030913522114288f}, + {0.004478609603205f, 0.030927407845180f}, + {0.004383704575956f, 0.030941002475530f}, + {0.004288758287610f, 0.030954305877381f}, + {0.004193771631837f, 0.030967317925516f}, + {0.004098745502689f, 0.030980038497461f}, + {0.004003680794587f, 0.030992467473486f}, + {0.003908578402316f, 0.031004604736602f}, + {0.003813439221017f, 0.031016450172571f}, + {0.003718264146176f, 0.031028003669899f}, + {0.003623054073616f, 0.031039265119839f}, + {0.003527809899492f, 0.031050234416394f}, + {0.003432532520278f, 0.031060911456318f}, + {0.003337222832760f, 0.031071296139114f}, + {0.003241881734029f, 0.031081388367037f}, + {0.003146510121474f, 0.031091188045095f}, + {0.003051108892766f, 0.031100695081051f}, + {0.002955678945860f, 0.031109909385419f}, + {0.002860221178978f, 0.031118830871473f}, + {0.002764736490604f, 0.031127459455239f}, + {0.002669225779478f, 0.031135795055501f}, + {0.002573689944583f, 0.031143837593803f}, + {0.002478129885137f, 0.031151586994444f}, + {0.002382546500589f, 0.031159043184484f}, + {0.002286940690606f, 0.031166206093743f}, + {0.002191313355067f, 0.031173075654800f}, + {0.002095665394051f, 0.031179651802998f}, + {0.001999997707835f, 0.031185934476438f}, + {0.001904311196878f, 0.031191923615985f}, + {0.001808606761820f, 0.031197619165268f}, + {0.001712885303465f, 0.031203021070678f}, + {0.001617147722782f, 0.031208129281370f}, + {0.001521394920889f, 0.031212943749264f}, + {0.001425627799047f, 0.031217464429043f}, + {0.001329847258653f, 0.031221691278159f}, + {0.001234054201231f, 0.031225624256825f}, + {0.001138249528420f, 0.031229263328024f}, + {0.001042434141971f, 0.031232608457502f}, + {0.000946608943736f, 0.031235659613775f}, + {0.000850774835656f, 0.031238416768124f}, + {0.000754932719759f, 0.031240879894597f}, + {0.000659083498149f, 0.031243048970010f}, + {0.000563228072993f, 0.031244923973948f}, + {0.000467367346520f, 0.031246504888762f}, + {0.000371502221008f, 0.031247791699571f}, + {0.000275633598775f, 0.031248784394264f}, + {0.000179762382174f, 0.031249482963498f}, + {0.000083889473581f, 0.031249887400697f} + }; + float[][] MDCT_TABLE_128 = { + {0.088387931675923f, 0.000271171628935f}, + {0.088354655998507f, 0.002440238387037f}, + {0.088268158780110f, 0.004607835236780f}, + {0.088128492123423f, 0.006772656498875f}, + {0.087935740158418f, 0.008933398165942f}, + {0.087690018991670f, 0.011088758687994f}, + {0.087391476636423f, 0.013237439756448f}, + {0.087040292923427f, 0.015378147086172f}, + {0.086636679392621f, 0.017509591195118f}, + {0.086180879165703f, 0.019630488181053f}, + {0.085673166799686f, 0.021739560494940f}, + {0.085113848121515f, 0.023835537710479f}, + {0.084503260043847f, 0.025917157289369f}, + {0.083841770362110f, 0.027983165341813f}, + {0.083129777532952f, 0.030032317381813f}, + {0.082367710434230f, 0.032063379076803f}, + {0.081556028106671f, 0.034075126991164f}, + {0.080695219477356f, 0.036066349323177f}, + {0.079785803065216f, 0.038035846634965f}, + {0.078828326668693f, 0.039982432574992f}, + {0.077823367035766f, 0.041904934592675f}, + {0.076771529516540f, 0.043802194644686f}, + {0.075673447698606f, 0.045673069892513f}, + {0.074529783025390f, 0.047516433390863f}, + {0.073341224397728f, 0.049331174766491f}, + {0.072108487758894f, 0.051116200887052f}, + {0.070832315663343f, 0.052870436519557f}, + {0.069513476829429f, 0.054592824978055f}, + {0.068152765676348f, 0.056282328760143f}, + {0.066751001845620f, 0.057937930171918f}, + {0.065309029707361f, 0.059558631940996f}, + {0.063827717851668f, 0.061143457817234f}, + {0.062307958565413f, 0.062691453160784f}, + {0.060750667294763f, 0.064201685517134f}, + {0.059156782093749f, 0.065673245178784f}, + {0.057527263059216f, 0.067105245733220f}, + {0.055863091752499f, 0.068496824596852f}, + {0.054165270608165f, 0.069847143534609f}, + {0.052434822330188f, 0.071155389164853f}, + {0.050672789275903f, 0.072420773449336f}, + {0.048880232828135f, 0.073642534167879f}, + {0.047058232755862f, 0.074819935377512f}, + {0.045207886563797f, 0.075952267855771f}, + {0.043330308831298f, 0.077038849527912f}, + {0.041426630540984f, 0.078079025877766f}, + {0.039497998397473f, 0.079072170341994f}, + {0.037545574136653f, 0.080017684687506f}, + {0.035570533825892f, 0.080914999371817f}, + {0.033574067155622f, 0.081763573886112f}, + {0.031557376722714f, 0.082562897080836f}, + {0.029521677306074f, 0.083312487473584f}, + {0.027468195134911f, 0.084011893539132f}, + {0.025398167150101f, 0.084660693981419f}, + {0.023312840259098f, 0.085258497987320f}, + {0.021213470584847f, 0.085804945462053f}, + {0.019101322709138f, 0.086299707246093f}, + {0.016977668910873f, 0.086742485313442f}, + {0.014843788399692f, 0.087133012951149f}, + {0.012700966545425f, 0.087471054919968f}, + {0.010550494103830f, 0.087756407596056f}, + {0.008393666439096f, 0.087988899093631f}, + {0.006231782743558f, 0.088168389368510f}, + {0.004066145255116f, 0.088294770302461f}, + {0.001898058472816f, 0.088367965768336f} + }; + float[][] MDCT_TABLE_1920 = { + {0.032274858518097f, 0.000013202404176f}, + {0.032274642494505f, 0.000118821372483f}, + {0.032274080835421f, 0.000224439068308f}, + {0.032273173546860f, 0.000330054360572f}, + {0.032271920638538f, 0.000435666118218f}, + {0.032270322123873f, 0.000541273210231f}, + {0.032268378019984f, 0.000646874505642f}, + {0.032266088347691f, 0.000752468873546f}, + {0.032263453131514f, 0.000858055183114f}, + {0.032260472399674f, 0.000963632303600f}, + {0.032257146184092f, 0.001069199104358f}, + {0.032253474520390f, 0.001174754454853f}, + {0.032249457447888f, 0.001280297224671f}, + {0.032245095009606f, 0.001385826283535f}, + {0.032240387252262f, 0.001491340501313f}, + {0.032235334226272f, 0.001596838748031f}, + {0.032229935985750f, 0.001702319893890f}, + {0.032224192588507f, 0.001807782809271f}, + {0.032218104096050f, 0.001913226364749f}, + {0.032211670573582f, 0.002018649431111f}, + {0.032204892090000f, 0.002124050879359f}, + {0.032197768717898f, 0.002229429580728f}, + {0.032190300533560f, 0.002334784406698f}, + {0.032182487616965f, 0.002440114229003f}, + {0.032174330051782f, 0.002545417919644f}, + {0.032165827925374f, 0.002650694350905f}, + {0.032156981328790f, 0.002755942395358f}, + {0.032147790356771f, 0.002861160925883f}, + {0.032138255107744f, 0.002966348815672f}, + {0.032128375683825f, 0.003071504938250f}, + {0.032118152190814f, 0.003176628167476f}, + {0.032107584738196f, 0.003281717377568f}, + {0.032096673439141f, 0.003386771443102f}, + {0.032085418410500f, 0.003491789239036f}, + {0.032073819772804f, 0.003596769640711f}, + {0.032061877650267f, 0.003701711523874f}, + {0.032049592170778f, 0.003806613764680f}, + {0.032036963465906f, 0.003911475239711f}, + {0.032023991670893f, 0.004016294825985f}, + {0.032010676924657f, 0.004121071400967f}, + {0.031997019369789f, 0.004225803842586f}, + {0.031983019152549f, 0.004330491029241f}, + {0.031968676422869f, 0.004435131839816f}, + {0.031953991334348f, 0.004539725153692f}, + {0.031938964044252f, 0.004644269850758f}, + {0.031923594713510f, 0.004748764811426f}, + {0.031907883506716f, 0.004853208916638f}, + {0.031891830592124f, 0.004957601047881f}, + {0.031875436141648f, 0.005061940087200f}, + {0.031858700330859f, 0.005166224917208f}, + {0.031841623338985f, 0.005270454421097f}, + {0.031824205348907f, 0.005374627482653f}, + {0.031806446547156f, 0.005478742986267f}, + {0.031788347123916f, 0.005582799816945f}, + {0.031769907273017f, 0.005686796860323f}, + {0.031751127191935f, 0.005790733002674f}, + {0.031732007081789f, 0.005894607130928f}, + {0.031712547147340f, 0.005998418132675f}, + {0.031692747596989f, 0.006102164896182f}, + {0.031672608642773f, 0.006205846310406f}, + {0.031652130500364f, 0.006309461265002f}, + {0.031631313389067f, 0.006413008650337f}, + {0.031610157531816f, 0.006516487357501f}, + {0.031588663155172f, 0.006619896278321f}, + {0.031566830489325f, 0.006723234305370f}, + {0.031544659768083f, 0.006826500331981f}, + {0.031522151228878f, 0.006929693252258f}, + {0.031499305112758f, 0.007032811961088f}, + {0.031476121664387f, 0.007135855354151f}, + {0.031452601132040f, 0.007238822327937f}, + {0.031428743767604f, 0.007341711779751f}, + {0.031404549826572f, 0.007444522607730f}, + {0.031380019568042f, 0.007547253710853f}, + {0.031355153254712f, 0.007649903988952f}, + {0.031329951152882f, 0.007752472342725f}, + {0.031304413532445f, 0.007854957673748f}, + {0.031278540666888f, 0.007957358884484f}, + {0.031252332833290f, 0.008059674878300f}, + {0.031225790312316f, 0.008161904559473f}, + {0.031198913388214f, 0.008264046833205f}, + {0.031171702348814f, 0.008366100605636f}, + {0.031144157485525f, 0.008468064783849f}, + {0.031116279093331f, 0.008569938275893f}, + {0.031088067470786f, 0.008671719990782f}, + {0.031059522920014f, 0.008773408838517f}, + {0.031030645746705f, 0.008875003730092f}, + {0.031001436260110f, 0.008976503577507f}, + {0.030971894773039f, 0.009077907293780f}, + {0.030942021601857f, 0.009179213792959f}, + {0.030911817066483f, 0.009280421990133f}, + {0.030881281490382f, 0.009381530801444f}, + {0.030850415200566f, 0.009482539144097f}, + {0.030819218527589f, 0.009583445936373f}, + {0.030787691805541f, 0.009684250097643f}, + {0.030755835372048f, 0.009784950548375f}, + {0.030723649568268f, 0.009885546210147f}, + {0.030691134738883f, 0.009986036005661f}, + {0.030658291232103f, 0.010086418858753f}, + {0.030625119399655f, 0.010186693694402f}, + {0.030591619596781f, 0.010286859438745f}, + {0.030557792182239f, 0.010386915019088f}, + {0.030523637518292f, 0.010486859363916f}, + {0.030489155970710f, 0.010586691402906f}, + {0.030454347908763f, 0.010686410066936f}, + {0.030419213705216f, 0.010786014288099f}, + {0.030383753736329f, 0.010885502999714f}, + {0.030347968381849f, 0.010984875136338f}, + {0.030311858025010f, 0.011084129633775f}, + {0.030275423052523f, 0.011183265429088f}, + {0.030238663854579f, 0.011282281460612f}, + {0.030201580824838f, 0.011381176667967f}, + {0.030164174360430f, 0.011479949992062f}, + {0.030126444861948f, 0.011578600375117f}, + {0.030088392733446f, 0.011677126760663f}, + {0.030050018382430f, 0.011775528093563f}, + {0.030011322219859f, 0.011873803320018f}, + {0.029972304660138f, 0.011971951387578f}, + {0.029932966121114f, 0.012069971245157f}, + {0.029893307024070f, 0.012167861843041f}, + {0.029853327793724f, 0.012265622132901f}, + {0.029813028858222f, 0.012363251067801f}, + {0.029772410649132f, 0.012460747602215f}, + {0.029731473601443f, 0.012558110692033f}, + {0.029690218153558f, 0.012655339294575f}, + {0.029648644747289f, 0.012752432368600f}, + {0.029606753827855f, 0.012849388874320f}, + {0.029564545843872f, 0.012946207773407f}, + {0.029522021247356f, 0.013042888029011f}, + {0.029479180493710f, 0.013139428605762f}, + {0.029436024041725f, 0.013235828469789f}, + {0.029392552353570f, 0.013332086588727f}, + {0.029348765894794f, 0.013428201931728f}, + {0.029304665134313f, 0.013524173469475f}, + {0.029260250544412f, 0.013620000174189f}, + {0.029215522600735f, 0.013715681019643f}, + {0.029170481782283f, 0.013811214981173f}, + {0.029125128571406f, 0.013906601035686f}, + {0.029079463453801f, 0.014001838161674f}, + {0.029033486918505f, 0.014096925339225f}, + {0.028987199457889f, 0.014191861550031f}, + {0.028940601567655f, 0.014286645777401f}, + {0.028893693746829f, 0.014381277006273f}, + {0.028846476497755f, 0.014475754223221f}, + {0.028798950326094f, 0.014570076416472f}, + {0.028751115740811f, 0.014664242575910f}, + {0.028702973254178f, 0.014758251693091f}, + {0.028654523381760f, 0.014852102761253f}, + {0.028605766642418f, 0.014945794775326f}, + {0.028556703558297f, 0.015039326731945f}, + {0.028507334654823f, 0.015132697629457f}, + {0.028457660460698f, 0.015225906467935f}, + {0.028407681507891f, 0.015318952249187f}, + {0.028357398331639f, 0.015411833976768f}, + {0.028306811470432f, 0.015504550655988f}, + {0.028255921466016f, 0.015597101293927f}, + {0.028204728863381f, 0.015689484899442f}, + {0.028153234210760f, 0.015781700483179f}, + {0.028101438059619f, 0.015873747057582f}, + {0.028049340964652f, 0.015965623636907f}, + {0.027996943483779f, 0.016057329237229f}, + {0.027944246178133f, 0.016148862876456f}, + {0.027891249612061f, 0.016240223574335f}, + {0.027837954353113f, 0.016331410352467f}, + {0.027784360972039f, 0.016422422234315f}, + {0.027730470042780f, 0.016513258245214f}, + {0.027676282142466f, 0.016603917412384f}, + {0.027621797851405f, 0.016694398764938f}, + {0.027567017753080f, 0.016784701333894f}, + {0.027511942434143f, 0.016874824152183f}, + {0.027456572484404f, 0.016964766254662f}, + {0.027400908496833f, 0.017054526678124f}, + {0.027344951067546f, 0.017144104461307f}, + {0.027288700795801f, 0.017233498644904f}, + {0.027232158283994f, 0.017322708271577f}, + {0.027175324137651f, 0.017411732385960f}, + {0.027118198965418f, 0.017500570034678f}, + {0.027060783379060f, 0.017589220266351f}, + {0.027003077993454f, 0.017677682131607f}, + {0.026945083426576f, 0.017765954683088f}, + {0.026886800299502f, 0.017854036975468f}, + {0.026828229236397f, 0.017941928065456f}, + {0.026769370864511f, 0.018029627011808f}, + {0.026710225814170f, 0.018117132875340f}, + {0.026650794718768f, 0.018204444718934f}, + {0.026591078214767f, 0.018291561607551f}, + {0.026531076941680f, 0.018378482608238f}, + {0.026470791542075f, 0.018465206790142f}, + {0.026410222661558f, 0.018551733224515f}, + {0.026349370948775f, 0.018638060984730f}, + {0.026288237055398f, 0.018724189146286f}, + {0.026226821636121f, 0.018810116786819f}, + {0.026165125348656f, 0.018895842986112f}, + {0.026103148853718f, 0.018981366826109f}, + {0.026040892815028f, 0.019066687390916f}, + {0.025978357899296f, 0.019151803766819f}, + {0.025915544776223f, 0.019236715042290f}, + {0.025852454118485f, 0.019321420307998f}, + {0.025789086601733f, 0.019405918656817f}, + {0.025725442904582f, 0.019490209183837f}, + {0.025661523708606f, 0.019574290986376f}, + {0.025597329698327f, 0.019658163163984f}, + {0.025532861561211f, 0.019741824818458f}, + {0.025468119987662f, 0.019825275053848f}, + {0.025403105671008f, 0.019908512976470f}, + {0.025337819307501f, 0.019991537694913f}, + {0.025272261596305f, 0.020074348320047f}, + {0.025206433239491f, 0.020156943965039f}, + {0.025140334942028f, 0.020239323745355f}, + {0.025073967411776f, 0.020321486778774f}, + {0.025007331359476f, 0.020403432185395f}, + {0.024940427498748f, 0.020485159087650f}, + {0.024873256546079f, 0.020566666610309f}, + {0.024805819220816f, 0.020647953880491f}, + {0.024738116245157f, 0.020729020027676f}, + {0.024670148344147f, 0.020809864183709f}, + {0.024601916245669f, 0.020890485482816f}, + {0.024533420680433f, 0.020970883061607f}, + {0.024464662381971f, 0.021051056059087f}, + {0.024395642086630f, 0.021131003616670f}, + {0.024326360533561f, 0.021210724878181f}, + {0.024256818464715f, 0.021290218989868f}, + {0.024187016624830f, 0.021369485100415f}, + {0.024116955761430f, 0.021448522360944f}, + {0.024046636624808f, 0.021527329925030f}, + {0.023976059968027f, 0.021605906948708f}, + {0.023905226546906f, 0.021684252590480f}, + {0.023834137120014f, 0.021762366011328f}, + {0.023762792448662f, 0.021840246374720f}, + {0.023691193296893f, 0.021917892846620f}, + {0.023619340431478f, 0.021995304595495f}, + {0.023547234621902f, 0.022072480792330f}, + {0.023474876640361f, 0.022149420610628f}, + {0.023402267261751f, 0.022226123226426f}, + {0.023329407263659f, 0.022302587818300f}, + {0.023256297426359f, 0.022378813567377f}, + {0.023182938532797f, 0.022454799657339f}, + {0.023109331368588f, 0.022530545274437f}, + {0.023035476722006f, 0.022606049607496f}, + {0.022961375383975f, 0.022681311847926f}, + {0.022887028148061f, 0.022756331189727f}, + {0.022812435810462f, 0.022831106829504f}, + {0.022737599170003f, 0.022905637966469f}, + {0.022662519028125f, 0.022979923802453f}, + {0.022587196188874f, 0.023053963541915f}, + {0.022511631458899f, 0.023127756391950f}, + {0.022435825647437f, 0.023201301562294f}, + {0.022359779566306f, 0.023274598265338f}, + {0.022283494029900f, 0.023347645716133f}, + {0.022206969855176f, 0.023420443132400f}, + {0.022130207861645f, 0.023492989734537f}, + {0.022053208871367f, 0.023565284745628f}, + {0.021975973708940f, 0.023637327391451f}, + {0.021898503201489f, 0.023709116900488f}, + {0.021820798178663f, 0.023780652503931f}, + {0.021742859472618f, 0.023851933435691f}, + {0.021664687918017f, 0.023922958932406f}, + {0.021586284352013f, 0.023993728233451f}, + {0.021507649614247f, 0.024064240580942f}, + {0.021428784546832f, 0.024134495219750f}, + {0.021349689994350f, 0.024204491397504f}, + {0.021270366803840f, 0.024274228364600f}, + {0.021190815824791f, 0.024343705374213f}, + {0.021111037909128f, 0.024412921682298f}, + {0.021031033911210f, 0.024481876547605f}, + {0.020950804687815f, 0.024550569231683f}, + {0.020870351098134f, 0.024618998998889f}, + {0.020789674003759f, 0.024687165116394f}, + {0.020708774268678f, 0.024755066854194f}, + {0.020627652759262f, 0.024822703485116f}, + {0.020546310344257f, 0.024890074284826f}, + {0.020464747894775f, 0.024957178531837f}, + {0.020382966284284f, 0.025024015507516f}, + {0.020300966388600f, 0.025090584496093f}, + {0.020218749085876f, 0.025156884784668f}, + {0.020136315256592f, 0.025222915663218f}, + {0.020053665783549f, 0.025288676424605f}, + {0.019970801551857f, 0.025354166364584f}, + {0.019887723448925f, 0.025419384781811f}, + {0.019804432364452f, 0.025484330977848f}, + {0.019720929190419f, 0.025549004257175f}, + {0.019637214821078f, 0.025613403927192f}, + {0.019553290152943f, 0.025677529298230f}, + {0.019469156084779f, 0.025741379683559f}, + {0.019384813517595f, 0.025804954399392f}, + {0.019300263354632f, 0.025868252764895f}, + {0.019215506501354f, 0.025931274102193f}, + {0.019130543865439f, 0.025994017736379f}, + {0.019045376356769f, 0.026056482995518f}, + {0.018960004887419f, 0.026118669210657f}, + {0.018874430371648f, 0.026180575715833f}, + {0.018788653725892f, 0.026242201848076f}, + {0.018702675868750f, 0.026303546947421f}, + {0.018616497720974f, 0.026364610356909f}, + {0.018530120205464f, 0.026425391422602f}, + {0.018443544247254f, 0.026485889493583f}, + {0.018356770773502f, 0.026546103921965f}, + {0.018269800713483f, 0.026606034062902f}, + {0.018182634998576f, 0.026665679274589f}, + {0.018095274562256f, 0.026725038918274f}, + {0.018007720340083f, 0.026784112358263f}, + {0.017919973269692f, 0.026842898961926f}, + {0.017832034290785f, 0.026901398099707f}, + {0.017743904345116f, 0.026959609145127f}, + {0.017655584376488f, 0.027017531474792f}, + {0.017567075330734f, 0.027075164468401f}, + {0.017478378155718f, 0.027132507508750f}, + {0.017389493801313f, 0.027189559981742f}, + {0.017300423219401f, 0.027246321276391f}, + {0.017211167363854f, 0.027302790784828f}, + {0.017121727190533f, 0.027358967902310f}, + {0.017032103657269f, 0.027414852027226f}, + {0.016942297723858f, 0.027470442561102f}, + {0.016852310352050f, 0.027525738908608f}, + {0.016762142505537f, 0.027580740477564f}, + {0.016671795149944f, 0.027635446678948f}, + {0.016581269252819f, 0.027689856926900f}, + {0.016490565783622f, 0.027743970638730f}, + {0.016399685713714f, 0.027797787234924f}, + {0.016308630016347f, 0.027851306139149f}, + {0.016217399666655f, 0.027904526778260f}, + {0.016125995641641f, 0.027957448582309f}, + {0.016034418920170f, 0.028010070984544f}, + {0.015942670482954f, 0.028062393421421f}, + {0.015850751312545f, 0.028114415332610f}, + {0.015758662393324f, 0.028166136160998f}, + {0.015666404711489f, 0.028217555352697f}, + {0.015573979255046f, 0.028268672357047f}, + {0.015481387013797f, 0.028319486626627f}, + {0.015388628979331f, 0.028369997617257f}, + {0.015295706145012f, 0.028420204788004f}, + {0.015202619505968f, 0.028470107601191f}, + {0.015109370059084f, 0.028519705522399f}, + {0.015015958802984f, 0.028568998020472f}, + {0.014922386738030f, 0.028617984567529f}, + {0.014828654866302f, 0.028666664638963f}, + {0.014734764191593f, 0.028715037713449f}, + {0.014640715719398f, 0.028763103272951f}, + {0.014546510456900f, 0.028810860802724f}, + {0.014452149412962f, 0.028858309791325f}, + {0.014357633598114f, 0.028905449730613f}, + {0.014262964024545f, 0.028952280115756f}, + {0.014168141706090f, 0.028998800445240f}, + {0.014073167658220f, 0.029045010220868f}, + {0.013978042898030f, 0.029090908947771f}, + {0.013882768444231f, 0.029136496134411f}, + {0.013787345317136f, 0.029181771292585f}, + {0.013691774538648f, 0.029226733937433f}, + {0.013596057132255f, 0.029271383587441f}, + {0.013500194123014f, 0.029315719764447f}, + {0.013404186537539f, 0.029359741993647f}, + {0.013308035403995f, 0.029403449803598f}, + {0.013211741752084f, 0.029446842726223f}, + {0.013115306613032f, 0.029489920296820f}, + {0.013018731019584f, 0.029532682054063f}, + {0.012922016005985f, 0.029575127540008f}, + {0.012825162607977f, 0.029617256300097f}, + {0.012728171862781f, 0.029659067883165f}, + {0.012631044809089f, 0.029700561841444f}, + {0.012533782487056f, 0.029741737730567f}, + {0.012436385938281f, 0.029782595109573f}, + {0.012338856205805f, 0.029823133540913f}, + {0.012241194334091f, 0.029863352590452f}, + {0.012143401369021f, 0.029903251827477f}, + {0.012045478357878f, 0.029942830824699f}, + {0.011947426349339f, 0.029982089158259f}, + {0.011849246393462f, 0.030021026407731f}, + {0.011750939541676f, 0.030059642156129f}, + {0.011652506846768f, 0.030097935989909f}, + {0.011553949362874f, 0.030135907498976f}, + {0.011455268145464f, 0.030173556276684f}, + {0.011356464251335f, 0.030210881919845f}, + {0.011257538738598f, 0.030247884028732f}, + {0.011158492666665f, 0.030284562207083f}, + {0.011059327096240f, 0.030320916062102f}, + {0.010960043089307f, 0.030356945204470f}, + {0.010860641709118f, 0.030392649248343f}, + {0.010761124020182f, 0.030428027811361f}, + {0.010661491088253f, 0.030463080514646f}, + {0.010561743980319f, 0.030497806982812f}, + {0.010461883764593f, 0.030532206843968f}, + {0.010361911510496f, 0.030566279729717f}, + {0.010261828288652f, 0.030600025275167f}, + {0.010161635170872f, 0.030633443118931f}, + {0.010061333230142f, 0.030666532903129f}, + {0.009960923540617f, 0.030699294273397f}, + {0.009860407177603f, 0.030731726878888f}, + {0.009759785217550f, 0.030763830372273f}, + {0.009659058738038f, 0.030795604409750f}, + {0.009558228817767f, 0.030827048651045f}, + {0.009457296536545f, 0.030858162759415f}, + {0.009356262975275f, 0.030888946401653f}, + {0.009255129215945f, 0.030919399248091f}, + {0.009153896341616f, 0.030949520972603f}, + {0.009052565436412f, 0.030979311252611f}, + {0.008951137585505f, 0.031008769769084f}, + {0.008849613875105f, 0.031037896206544f}, + {0.008747995392451f, 0.031066690253072f}, + {0.008646283225794f, 0.031095151600306f}, + {0.008544478464390f, 0.031123279943448f}, + {0.008442582198486f, 0.031151074981266f}, + {0.008340595519310f, 0.031178536416098f}, + {0.008238519519057f, 0.031205663953853f}, + {0.008136355290878f, 0.031232457304017f}, + {0.008034103928871f, 0.031258916179656f}, + {0.007931766528065f, 0.031285040297416f}, + {0.007829344184412f, 0.031310829377528f}, + {0.007726837994772f, 0.031336283143813f}, + {0.007624249056906f, 0.031361401323680f}, + {0.007521578469457f, 0.031386183648135f}, + {0.007418827331946f, 0.031410629851778f}, + {0.007315996744755f, 0.031434739672811f}, + {0.007213087809115f, 0.031458512853036f}, + {0.007110101627101f, 0.031481949137863f}, + {0.007007039301610f, 0.031505048276306f}, + {0.006903901936357f, 0.031527810020993f}, + {0.006800690635862f, 0.031550234128164f}, + {0.006697406505433f, 0.031572320357675f}, + {0.006594050651161f, 0.031594068473000f}, + {0.006490624179905f, 0.031615478241233f}, + {0.006387128199278f, 0.031636549433095f}, + {0.006283563817639f, 0.031657281822929f}, + {0.006179932144080f, 0.031677675188707f}, + {0.006076234288412f, 0.031697729312034f}, + {0.005972471361157f, 0.031717443978146f}, + {0.005868644473532f, 0.031736818975914f}, + {0.005764754737440f, 0.031755854097848f}, + {0.005660803265456f, 0.031774549140098f}, + {0.005556791170816f, 0.031792903902453f}, + {0.005452719567407f, 0.031810918188350f}, + {0.005348589569753f, 0.031828591804869f}, + {0.005244402293001f, 0.031845924562742f}, + {0.005140158852914f, 0.031862916276347f}, + {0.005035860365855f, 0.031879566763717f}, + {0.004931507948778f, 0.031895875846539f}, + {0.004827102719212f, 0.031911843350155f}, + {0.004722645795254f, 0.031927469103567f}, + {0.004618138295554f, 0.031942752939435f}, + {0.004513581339303f, 0.031957694694082f}, + {0.004408976046222f, 0.031972294207493f}, + {0.004304323536549f, 0.031986551323320f}, + {0.004199624931030f, 0.032000465888879f}, + {0.004094881350902f, 0.032014037755158f}, + {0.003990093917884f, 0.032027266776813f}, + {0.003885263754166f, 0.032040152812170f}, + {0.003780391982394f, 0.032052695723232f}, + {0.003675479725661f, 0.032064895375674f}, + {0.003570528107494f, 0.032076751638847f}, + {0.003465538251839f, 0.032088264385780f}, + {0.003360511283053f, 0.032099433493181f}, + {0.003255448325892f, 0.032110258841438f}, + {0.003150350505494f, 0.032120740314619f}, + {0.003045218947373f, 0.032130877800478f}, + {0.002940054777404f, 0.032140671190449f}, + {0.002834859121810f, 0.032150120379653f}, + {0.002729633107153f, 0.032159225266897f}, + {0.002624377860318f, 0.032167985754674f}, + {0.002519094508504f, 0.032176401749168f}, + {0.002413784179212f, 0.032184473160250f}, + {0.002308448000231f, 0.032192199901481f}, + {0.002203087099626f, 0.032199581890114f}, + {0.002097702605728f, 0.032206619047093f}, + {0.001992295647121f, 0.032213311297057f}, + {0.001886867352628f, 0.032219658568338f}, + {0.001781418851302f, 0.032225660792960f}, + {0.001675951272410f, 0.032231317906644f}, + {0.001570465745428f, 0.032236629848809f}, + {0.001464963400018f, 0.032241596562566f}, + {0.001359445366028f, 0.032246217994727f}, + {0.001253912773470f, 0.032250494095799f}, + {0.001148366752513f, 0.032254424819990f}, + {0.001042808433471f, 0.032258010125204f}, + {0.000937238946789f, 0.032261249973045f}, + {0.000831659423030f, 0.032264144328817f}, + {0.000726070992868f, 0.032266693161525f}, + {0.000620474787068f, 0.032268896443871f}, + {0.000514871936481f, 0.032270754152261f}, + {0.000409263572030f, 0.032272266266801f}, + {0.000303650824695f, 0.032273432771295f}, + {0.000198034825504f, 0.032274253653254f}, + {0.000092416705518f, 0.032274728903884f} + }; + float[][] MDCT_TABLE_240 = { + {0.091286604111815f, 0.000298735779793f}, + {0.091247502481454f, 0.002688238127538f}, + {0.091145864370807f, 0.005075898091152f}, + {0.090981759437558f, 0.007460079287760f}, + {0.090755300151030f, 0.009839147718664f}, + {0.090466641715108f, 0.012211472889198f}, + {0.090115981961863f, 0.014575428926191f}, + {0.089703561215976f, 0.016929395692256f}, + {0.089229662130024f, 0.019271759896156f}, + {0.088694609490769f, 0.021600916198470f}, + {0.088098769996564f, 0.023915268311810f}, + {0.087442552006035f, 0.026213230094844f}, + {0.086726405258214f, 0.028493226639351f}, + {0.085950820564309f, 0.030753695349588f}, + {0.085116329471329f, 0.032993087013213f}, + {0.084223503897785f, 0.035209866863042f}, + {0.083272955741727f, 0.037402515628894f}, + {0.082265336461381f, 0.039569530578832f}, + {0.081201336628670f, 0.041709426549053f}, + {0.080081685455930f, 0.043820736961749f}, + {0.078907150296148f, 0.045902014830227f}, + {0.077678536117054f, 0.047951833750597f}, + {0.076396684949434f, 0.049968788879362f}, + {0.075062475310050f, 0.051951497896226f}, + {0.073676821599542f, 0.053898601951466f}, + {0.072240673475749f, 0.055808766597225f}, + {0.070755015202858f, 0.057680682702068f}, + {0.069220864976840f, 0.059513067348201f}, + {0.067639274227625f, 0.061304664710718f}, + {0.066011326898512f, 0.063054246918278f}, + {0.064338138703282f, 0.064760614894630f}, + {0.062620856361546f, 0.066422599180399f}, + {0.060860656812842f, 0.068039060734572f}, + {0.059058746410016f, 0.069608891715145f}, + {0.057216360092450f, 0.071131016238378f}, + {0.055334760539699f, 0.072604391116154f}, + {0.053415237306106f, 0.074028006570930f}, + {0.051459105937014f, 0.075400886927784f}, + {0.049467707067153f, 0.076722091283096f}, + {0.047442405501835f, 0.077990714149396f}, + {0.045384589281588f, 0.079205886075941f}, + {0.043295668730857f, 0.080366774244592f}, + {0.041177075491445f, 0.081472583040586f}, + {0.039030261541332f, 0.082522554597810f}, + {0.036856698199564f, 0.083515969318206f}, + {0.034657875117883f, 0.084452146364948f}, + {0.032435299259796f, 0.085330444129049f}, + {0.030190493867775f, 0.086150260669096f}, + {0.027924997419306f, 0.086911034123781f}, + {0.025640362572491f, 0.087612243096981f}, + {0.023338155101933f, 0.088253407015092f}, + {0.021019952825636f, 0.088834086456390f}, + {0.018687344523641f, 0.089353883452193f}, + {0.016341928849164f, 0.089812441759604f}, + {0.013985313232951f, 0.090209447105664f}, + {0.011619112781631f, 0.090544627402740f}, + {0.009244949170797f, 0.090817752935000f}, + {0.006864449533597f, 0.091028636515846f}, + {0.004479245345574f, 0.091177133616206f}, + {0.002090971306534f, 0.091263142463585f} + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/filterbank/SineWindows.java b/src/main/java/net/sourceforge/jaad/aac/filterbank/SineWindows.java index 4abb668b..f927744a 100644 --- a/src/main/java/net/sourceforge/jaad/aac/filterbank/SineWindows.java +++ b/src/main/java/net/sourceforge/jaad/aac/filterbank/SineWindows.java @@ -2,2244 +2,2244 @@ interface SineWindows { - float[] SINE_1024 = { - 0.00076699031874270449f, - 0.002300969151425805f, - 0.0038349425697062275f, - 0.0053689069639963425f, - 0.0069028587247297558f, - 0.0084367942423697988f, - 0.0099707099074180308f, - 0.011504602110422714f, - 0.013038467241987334f, - 0.014572301692779064f, - 0.016106101853537287f, - 0.017639864115082053f, - 0.019173584868322623f, - 0.020707260504265895f, - 0.022240887414024961f, - 0.023774461988827555f, - 0.025307980620024571f, - 0.026841439699098531f, - 0.028374835617672099f, - 0.029908164767516555f, - 0.031441423540560301f, - 0.032974608328897335f, - 0.03450771552479575f, - 0.036040741520706229f, - 0.037573682709270494f, - 0.039106535483329888f, - 0.040639296235933736f, - 0.042171961360347947f, - 0.043704527250063421f, - 0.04523699029880459f, - 0.046769346900537863f, - 0.048301593449480144f, - 0.049833726340107277f, - 0.051365741967162593f, - 0.052897636725665324f, - 0.054429407010919133f, - 0.055961049218520569f, - 0.057492559744367566f, - 0.059023934984667931f, - 0.060555171335947788f, - 0.062086265195060088f, - 0.063617212959193106f, - 0.065148011025878833f, - 0.066678655793001557f, - 0.068209143658806329f, - 0.069739471021907307f, - 0.071269634281296401f, - 0.072799629836351673f, - 0.074329454086845756f, - 0.075859103432954447f, - 0.077388574275265049f, - 0.078917863014784942f, - 0.080446966052950014f, - 0.081975879791633066f, - 0.083504600633152432f, - 0.085033124980280275f, - 0.08656144923625117f, - 0.088089569804770507f, - 0.089617483090022959f, - 0.091145185496681005f, - 0.09267267342991331f, - 0.094199943295393204f, - 0.095726991499307162f, - 0.097253814448363271f, - 0.098780408549799623f, - 0.10030677021139286f, - 0.10183289584146653f, - 0.10335878184889961f, - 0.10488442464313497f, - 0.10640982063418768f, - 0.10793496623265365f, - 0.10945985784971798f, - 0.11098449189716339f, - 0.11250886478737869f, - 0.1140329729333672f, - 0.11555681274875526f, - 0.11708038064780059f, - 0.11860367304540072f, - 0.1201266863571015f, - 0.12164941699910553f, - 0.12317186138828048f, - 0.12469401594216764f, - 0.12621587707899035f, - 0.12773744121766231f, - 0.12925870477779614f, - 0.13077966417971171f, - 0.13230031584444465f, - 0.13382065619375472f, - 0.13534068165013421f, - 0.13686038863681638f, - 0.13837977357778389f, - 0.13989883289777721f, - 0.14141756302230302f, - 0.14293596037764267f, - 0.14445402139086047f, - 0.14597174248981221f, - 0.14748912010315357f, - 0.14900615066034845f, - 0.1505228305916774f, - 0.15203915632824605f, - 0.15355512430199345f, - 0.15507073094570051f, - 0.15658597269299843f, - 0.15810084597837698f, - 0.15961534723719306f, - 0.16112947290567881f, - 0.16264321942095031f, - 0.16415658322101581f, - 0.16566956074478412f, - 0.16718214843207294f, - 0.16869434272361733f, - 0.17020614006107807f, - 0.17171753688704997f, - 0.17322852964507032f, - 0.1747391147796272f, - 0.17624928873616788f, - 0.17775904796110717f, - 0.17926838890183575f, - 0.18077730800672859f, - 0.1822858017251533f, - 0.18379386650747845f, - 0.1853014988050819f, - 0.18680869507035927f, - 0.18831545175673212f, - 0.18982176531865641f, - 0.1913276322116309f, - 0.19283304889220523f, - 0.1943380118179886f, - 0.19584251744765785f, - 0.19734656224096592f, - 0.19885014265875009f, - 0.20035325516294045f, - 0.20185589621656805f, - 0.20335806228377332f, - 0.20485974982981442f, - 0.20636095532107551f, - 0.20786167522507507f, - 0.20936190601047416f, - 0.21086164414708486f, - 0.21236088610587842f, - 0.21385962835899375f, - 0.21535786737974555f, - 0.21685559964263262f, - 0.21835282162334632f, - 0.2198495297987787f, - 0.22134572064703081f, - 0.22284139064742112f, - 0.2243365362804936f, - 0.22583115402802617f, - 0.22732524037303886f, - 0.22881879179980222f, - 0.23031180479384544f, - 0.23180427584196478f, - 0.23329620143223159f, - 0.23478757805400097f, - 0.23627840219791957f, - 0.23776867035593419f, - 0.23925837902129998f, - 0.24074752468858843f, - 0.24223610385369601f, - 0.24372411301385216f, - 0.24521154866762754f, - 0.24669840731494241f, - 0.24818468545707478f, - 0.24967037959666857f, - 0.25115548623774192f, - 0.25264000188569552f, - 0.25412392304732062f, - 0.25560724623080738f, - 0.25708996794575312f, - 0.25857208470317034f, - 0.26005359301549519f, - 0.26153448939659552f, - 0.263014770361779f, - 0.26449443242780163f, - 0.26597347211287559f, - 0.26745188593667762f, - 0.26892967042035726f, - 0.27040682208654482f, - 0.27188333745935972f, - 0.27335921306441868f, - 0.27483444542884394f, - 0.27630903108127108f, - 0.27778296655185769f, - 0.27925624837229118f, - 0.28072887307579719f, - 0.28220083719714756f, - 0.28367213727266843f, - 0.28514276984024867f, - 0.28661273143934779f, - 0.28808201861100413f, - 0.28955062789784303f, - 0.29101855584408509f, - 0.29248579899555388f, - 0.29395235389968466f, - 0.29541821710553201f, - 0.29688338516377827f, - 0.2983478546267414f, - 0.29981162204838335f, - 0.30127468398431795f, - 0.30273703699181914f, - 0.30419867762982911f, - 0.30565960245896612f, - 0.3071198080415331f, - 0.30857929094152509f, - 0.31003804772463789f, - 0.31149607495827591f, - 0.3129533692115602f, - 0.31440992705533666f, - 0.31586574506218396f, - 0.31732081980642174f, - 0.31877514786411848f, - 0.32022872581309986f, - 0.32168155023295658f, - 0.32313361770505233f, - 0.32458492481253215f, - 0.32603546814033024f, - 0.327485244275178f, - 0.3289342498056122f, - 0.33038248132198278f, - 0.33182993541646111f, - 0.33327660868304793f, - 0.33472249771758122f, - 0.33616759911774452f, - 0.33761190948307462f, - 0.33905542541496964f, - 0.34049814351669716f, - 0.34194006039340219f, - 0.34338117265211504f, - 0.34482147690175929f, - 0.34626096975316001f, - 0.34769964781905138f, - 0.34913750771408497f, - 0.35057454605483751f, - 0.35201075945981908f, - 0.35344614454948081f, - 0.35488069794622279f, - 0.35631441627440241f, - 0.3577472961603419f, - 0.3591793342323365f, - 0.36061052712066227f, - 0.36204087145758418f, - 0.36347036387736376f, - 0.36489900101626732f, - 0.36632677951257359f, - 0.36775369600658198f, - 0.36917974714062002f, - 0.37060492955905167f, - 0.37202923990828501f, - 0.3734526748367803f, - 0.37487523099505754f, - 0.37629690503570479f, - 0.37771769361338564f, - 0.37913759338484732f, - 0.38055660100892852f, - 0.38197471314656722f, - 0.38339192646080866f, - 0.38480823761681288f, - 0.38622364328186298f, - 0.38763814012537273f, - 0.38905172481889438f, - 0.39046439403612659f, - 0.39187614445292235f, - 0.3932869727472964f, - 0.39469687559943356f, - 0.39610584969169627f, - 0.39751389170863233f, - 0.39892099833698291f, - 0.40032716626569009f, - 0.40173239218590501f, - 0.4031366727909953f, - 0.404540004776553f, - 0.40594238484040251f, - 0.40734380968260797f, - 0.40874427600548136f, - 0.41014378051359024f, - 0.41154231991376522f, - 0.41293989091510808f, - 0.4143364902289991f, - 0.41573211456910536f, - 0.41712676065138787f, - 0.4185204251941097f, - 0.41991310491784362f, - 0.42130479654547964f, - 0.42269549680223295f, - 0.42408520241565156f, - 0.4254739101156238f, - 0.42686161663438643f, - 0.42824831870653196f, - 0.42963401306901638f, - 0.43101869646116703f, - 0.43240236562469014f, - 0.43378501730367852f, - 0.43516664824461926f, - 0.4365472551964012f, - 0.43792683491032286f, - 0.43930538414009995f, - 0.4406828996418729f, - 0.4420593781742147f, - 0.44343481649813848f, - 0.44480921137710488f, - 0.44618255957703007f, - 0.44755485786629301f, - 0.44892610301574326f, - 0.45029629179870861f, - 0.45166542099100249f, - 0.45303348737093158f, - 0.45440048771930358f, - 0.45576641881943464f, - 0.45713127745715698f, - 0.45849506042082627f, - 0.45985776450132954f, - 0.46121938649209238f, - 0.46257992318908681f, - 0.46393937139083852f, - 0.4652977278984346f, - 0.46665498951553092f, - 0.46801115304835983f, - 0.46936621530573752f, - 0.4707201730990716f, - 0.47207302324236866f, - 0.47342476255224153f, - 0.47477538784791712f, - 0.47612489595124358f, - 0.47747328368669806f, - 0.47882054788139389f, - 0.48016668536508839f, - 0.48151169297018986f, - 0.48285556753176567f, - 0.48419830588754903f, - 0.48553990487794696f, - 0.48688036134604734f, - 0.48821967213762679f, - 0.48955783410115744f, - 0.49089484408781509f, - 0.49223069895148602f, - 0.49356539554877477f, - 0.49489893073901126f, - 0.49623130138425825f, - 0.49756250434931915f, - 0.49889253650174459f, - 0.50022139471184068f, - 0.50154907585267539f, - 0.50287557680008699f, - 0.50420089443269034f, - 0.50552502563188539f, - 0.50684796728186321f, - 0.5081697162696146f, - 0.50949026948493636f, - 0.51080962382043904f, - 0.51212777617155469f, - 0.51344472343654346f, - 0.5147604625165012f, - 0.51607499031536663f, - 0.51738830373992906f, - 0.51870039969983495f, - 0.52001127510759604f, - 0.52132092687859566f, - 0.52262935193109661f, - 0.5239365471862486f, - 0.52524250956809471f, - 0.52654723600357944f, - 0.52785072342255523f, - 0.52915296875779061f, - 0.53045396894497632f, - 0.53175372092273332f, - 0.53305222163261945f, - 0.53434946801913752f, - 0.53564545702974109f, - 0.53694018561484291f, - 0.5382336507278217f, - 0.53952584932502889f, - 0.54081677836579667f, - 0.54210643481244392f, - 0.5433948156302848f, - 0.54468191778763453f, - 0.54596773825581757f, - 0.54725227400917409f, - 0.54853552202506739f, - 0.54981747928389091f, - 0.55109814276907543f, - 0.55237750946709607f, - 0.55365557636747931f, - 0.55493234046281037f, - 0.55620779874873993f, - 0.55748194822399155f, - 0.55875478589036831f, - 0.56002630875276038f, - 0.56129651381915147f, - 0.56256539810062656f, - 0.56383295861137817f, - 0.56509919236871398f, - 0.56636409639306384f, - 0.56762766770798623f, - 0.56888990334017586f, - 0.5701508003194703f, - 0.57141035567885723f, - 0.57266856645448116f, - 0.57392542968565075f, - 0.57518094241484508f, - 0.57643510168772183f, - 0.5776879045531228f, - 0.57893934806308178f, - 0.58018942927283168f, - 0.58143814524081017f, - 0.58268549302866846f, - 0.58393146970127618f, - 0.58517607232673041f, - 0.5864192979763605f, - 0.58766114372473666f, - 0.58890160664967572f, - 0.59014068383224882f, - 0.59137837235678758f, - 0.59261466931089113f, - 0.59384957178543363f, - 0.59508307687456996f, - 0.59631518167574371f, - 0.59754588328969316f, - 0.59877517882045872f, - 0.60000306537538894f, - 0.6012295400651485f, - 0.60245460000372375f, - 0.60367824230843037f, - 0.60490046409991982f, - 0.60612126250218612f, - 0.60734063464257293f, - 0.60855857765177945f, - 0.60977508866386843f, - 0.61099016481627166f, - 0.61220380324979795f, - 0.61341600110863859f, - 0.61462675554037505f, - 0.61583606369598509f, - 0.61704392272984976f, - 0.61825032979976025f, - 0.61945528206692402f, - 0.62065877669597214f, - 0.62186081085496536f, - 0.62306138171540126f, - 0.62426048645222065f, - 0.62545812224381436f, - 0.62665428627202935f, - 0.62784897572217646f, - 0.629042187783036f, - 0.63023391964686437f, - 0.63142416850940186f, - 0.63261293156987741f, - 0.63380020603101728f, - 0.63498598909904946f, - 0.63617027798371217f, - 0.63735306989825913f, - 0.63853436205946679f, - 0.63971415168764045f, - 0.64089243600662138f, - 0.64206921224379254f, - 0.64324447763008585f, - 0.64441822939998838f, - 0.64559046479154869f, - 0.64676118104638392f, - 0.64793037540968534f, - 0.64909804513022595f, - 0.65026418746036585f, - 0.65142879965605982f, - 0.65259187897686244f, - 0.65375342268593606f, - 0.65491342805005603f, - 0.6560718923396176f, - 0.65722881282864254f, - 0.65838418679478505f, - 0.65953801151933866f, - 0.6606902842872423f, - 0.66184100238708687f, - 0.66299016311112147f, - 0.66413776375526001f, - 0.66528380161908718f, - 0.66642827400586524f, - 0.66757117822254031f, - 0.66871251157974798f, - 0.66985227139182102f, - 0.67099045497679422f, - 0.67212705965641173f, - 0.67326208275613297f, - 0.67439552160513905f, - 0.67552737353633852f, - 0.67665763588637495f, - 0.6777863059956315f, - 0.67891338120823841f, - 0.68003885887207893f, - 0.68116273633879543f, - 0.68228501096379557f, - 0.68340568010625868f, - 0.6845247411291423f, - 0.68564219139918747f, - 0.68675802828692589f, - 0.68787224916668555f, - 0.68898485141659704f, - 0.69009583241859995f, - 0.69120518955844845f, - 0.69231292022571822f, - 0.69341902181381176f, - 0.69452349171996552f, - 0.69562632734525487f, - 0.6967275260946012f, - 0.69782708537677729f, - 0.69892500260441415f, - 0.70002127519400625f, - 0.70111590056591866f, - 0.70220887614439187f, - 0.70330019935754873f, - 0.70438986763740041f, - 0.7054778784198521f, - 0.70656422914470951f, - 0.70764891725568435f, - 0.70873194020040065f, - 0.70981329543040084f, - 0.71089298040115168f, - 0.71197099257204999f, - 0.71304732940642923f, - 0.71412198837156471f, - 0.71519496693868001f, - 0.71626626258295312f, - 0.71733587278352173f, - 0.71840379502348972f, - 0.71947002678993299f, - 0.72053456557390527f, - 0.72159740887044366f, - 0.72265855417857561f, - 0.72371799900132339f, - 0.72477574084571128f, - 0.72583177722277037f, - 0.72688610564754497f, - 0.72793872363909862f, - 0.72898962872051931f, - 0.73003881841892615f, - 0.73108629026547423f, - 0.73213204179536129f, - 0.73317607054783274f, - 0.73421837406618817f, - 0.73525894989778673f, - 0.73629779559405306f, - 0.73733490871048279f, - 0.73837028680664851f, - 0.73940392744620576f, - 0.74043582819689802f, - 0.74146598663056329f, - 0.74249440032313918f, - 0.74352106685466912f, - 0.74454598380930725f, - 0.74556914877532543f, - 0.74659055934511731f, - 0.74761021311520515f, - 0.74862810768624533f, - 0.74964424066303348f, - 0.75065860965451059f, - 0.75167121227376843f, - 0.75268204613805523f, - 0.75369110886878121f, - 0.75469839809152439f, - 0.75570391143603588f, - 0.75670764653624567f, - 0.75770960103026808f, - 0.75870977256040739f, - 0.75970815877316344f, - 0.76070475731923692f, - 0.76169956585353527f, - 0.76269258203517787f, - 0.76368380352750187f, - 0.76467322799806714f, - 0.76566085311866239f, - 0.76664667656531038f, - 0.76763069601827327f, - 0.76861290916205827f, - 0.76959331368542294f, - 0.7705719072813807f, - 0.7715486876472063f, - 0.77252365248444133f, - 0.77349679949889905f, - 0.77446812640067086f, - 0.77543763090413043f, - 0.77640531072794039f, - 0.7773711635950562f, - 0.77833518723273309f, - 0.7792973793725303f, - 0.78025773775031659f, - 0.78121626010627609f, - 0.7821729441849129f, - 0.78312778773505731f, - 0.78408078850986995f, - 0.78503194426684808f, - 0.78598125276783015f, - 0.7869287117790017f, - 0.78787431907090011f, - 0.78881807241842017f, - 0.78975996960081907f, - 0.79070000840172161f, - 0.79163818660912577f, - 0.79257450201540758f, - 0.79350895241732666f, - 0.79444153561603059f, - 0.79537224941706119f, - 0.79630109163035911f, - 0.7972280600702687f, - 0.79815315255554375f, - 0.79907636690935235f, - 0.79999770095928191f, - 0.8009171525373443f, - 0.80183471947998131f, - 0.80275039962806916f, - 0.80366419082692409f, - 0.804576090926307f, - 0.80548609778042912f, - 0.80639420924795624f, - 0.80730042319201445f, - 0.80820473748019472f, - 0.80910714998455813f, - 0.81000765858164114f, - 0.81090626115245967f, - 0.81180295558251536f, - 0.81269773976179949f, - 0.81359061158479851f, - 0.81448156895049861f, - 0.81537060976239129f, - 0.81625773192847739f, - 0.81714293336127297f, - 0.81802621197781344f, - 0.81890756569965895f, - 0.81978699245289899f, - 0.82066449016815746f, - 0.82154005678059761f, - 0.82241369022992639f, - 0.82328538846040011f, - 0.82415514942082857f, - 0.82502297106458022f, - 0.82588885134958678f, - 0.82675278823834852f, - 0.8276147796979384f, - 0.82847482370000713f, - 0.82933291822078825f, - 0.83018906124110237f, - 0.83104325074636232f, - 0.83189548472657759f, - 0.83274576117635946f, - 0.83359407809492514f, - 0.83444043348610319f, - 0.83528482535833737f, - 0.83612725172469216f, - 0.83696771060285702f, - 0.83780620001515094f, - 0.8386427179885273f, - 0.83947726255457855f, - 0.84030983174954077f, - 0.84114042361429808f, - 0.84196903619438768f, - 0.84279566754000412f, - 0.84362031570600404f, - 0.84444297875191066f, - 0.84526365474191822f, - 0.84608234174489694f, - 0.84689903783439735f, - 0.84771374108865427f, - 0.84852644959059265f, - 0.84933716142783067f, - 0.85014587469268521f, - 0.85095258748217573f, - 0.85175729789802912f, - 0.85256000404668397f, - 0.85336070403929543f, - 0.85415939599173873f, - 0.85495607802461482f, - 0.85575074826325392f, - 0.85654340483771996f, - 0.85733404588281559f, - 0.85812266953808602f, - 0.8589092739478239f, - 0.85969385726107261f, - 0.86047641763163207f, - 0.86125695321806206f, - 0.86203546218368721f, - 0.86281194269660033f, - 0.86358639292966799f, - 0.86435881106053403f, - 0.86512919527162369f, - 0.86589754375014882f, - 0.86666385468811102f, - 0.86742812628230692f, - 0.86819035673433131f, - 0.86895054425058238f, - 0.86970868704226556f, - 0.87046478332539767f, - 0.8712188313208109f, - 0.8719708292541577f, - 0.8727207753559143f, - 0.87346866786138488f, - 0.8742145050107063f, - 0.87495828504885154f, - 0.8757000062256346f, - 0.87643966679571361f, - 0.87717726501859594f, - 0.87791279915864173f, - 0.87864626748506813f, - 0.87937766827195318f, - 0.88010699979824036f, - 0.88083426034774204f, - 0.88155944820914378f, - 0.8822825616760086f, - 0.88300359904678072f, - 0.88372255862478966f, - 0.8844394387182537f, - 0.88515423764028511f, - 0.88586695370889279f, - 0.88657758524698704f, - 0.88728613058238315f, - 0.88799258804780556f, - 0.88869695598089171f, - 0.88939923272419552f, - 0.89009941662519221f, - 0.89079750603628149f, - 0.89149349931479138f, - 0.89218739482298248f, - 0.89287919092805168f, - 0.89356888600213602f, - 0.89425647842231604f, - 0.89494196657062075f, - 0.89562534883403f, - 0.89630662360447966f, - 0.89698578927886397f, - 0.89766284425904075f, - 0.89833778695183419f, - 0.89901061576903907f, - 0.89968132912742393f, - 0.9003499254487356f, - 0.90101640315970233f, - 0.90168076069203773f, - 0.9023429964824442f, - 0.90300310897261704f, - 0.90366109660924798f, - 0.90431695784402832f, - 0.90497069113365325f, - 0.90562229493982516f, - 0.90627176772925766f, - 0.90691910797367803f, - 0.90756431414983252f, - 0.9082073847394887f, - 0.90884831822943912f, - 0.90948711311150543f, - 0.91012376788254157f, - 0.91075828104443757f, - 0.91139065110412232f, - 0.91202087657356823f, - 0.9126489559697939f, - 0.91327488781486776f, - 0.91389867063591168f, - 0.91452030296510445f, - 0.91513978333968526f, - 0.91575711030195672f, - 0.91637228239928914f, - 0.91698529818412289f, - 0.91759615621397295f, - 0.9182048550514309f, - 0.91881139326416994f, - 0.91941576942494696f, - 0.92001798211160657f, - 0.92061802990708386f, - 0.92121591139940873f, - 0.92181162518170812f, - 0.92240516985220988f, - 0.92299654401424625f, - 0.92358574627625656f, - 0.9241727752517912f, - 0.92475762955951391f, - 0.9253403078232062f, - 0.92592080867176996f, - 0.92649913073923051f, - 0.9270752726647401f, - 0.92764923309258118f, - 0.92822101067216944f, - 0.92879060405805702f, - 0.9293580119099355f, - 0.92992323289263956f, - 0.93048626567614978f, - 0.93104710893559517f, - 0.93160576135125783f, - 0.93216222160857432f, - 0.93271648839814025f, - 0.93326856041571205f, - 0.93381843636221096f, - 0.9343661149437259f, - 0.93491159487151609f, - 0.93545487486201462f, - 0.9359959536368313f, - 0.9365348299227555f, - 0.93707150245175919f, - 0.93760596996099999f, - 0.93813823119282436f, - 0.93866828489477017f, - 0.9391961298195699f, - 0.93972176472515334f, - 0.94024518837465088f, - 0.94076639953639607f, - 0.94128539698392866f, - 0.94180217949599765f, - 0.94231674585656378f, - 0.94282909485480271f, - 0.94333922528510772f, - 0.94384713594709269f, - 0.94435282564559475f, - 0.94485629319067721f, - 0.94535753739763229f, - 0.94585655708698391f, - 0.94635335108449059f, - 0.946847918221148f, - 0.94734025733319194f, - 0.94783036726210101f, - 0.94831824685459909f, - 0.94880389496265838f, - 0.94928731044350201f, - 0.94976849215960668f, - 0.95024743897870523f, - 0.95072414977378961f, - 0.95119862342311323f, - 0.95167085881019386f, - 0.95214085482381583f, - 0.95260861035803324f, - 0.9530741243121722f, - 0.95353739559083328f, - 0.95399842310389449f, - 0.95445720576651349f, - 0.95491374249913052f, - 0.95536803222747024f, - 0.95582007388254542f, - 0.95626986640065814f, - 0.95671740872340305f, - 0.9571626997976701f, - 0.95760573857564624f, - 0.9580465240148186f, - 0.9584850550779761f, - 0.95892133073321306f, - 0.95935534995393079f, - 0.9597871117188399f, - 0.96021661501196343f, - 0.96064385882263847f, - 0.96106884214551935f, - 0.961491563980579f, - 0.9619120233331121f, - 0.9623302192137374f, - 0.96274615063839941f, - 0.96315981662837136f, - 0.96357121621025721f, - 0.96398034841599411f, - 0.96438721228285429f, - 0.9647918068534479f, - 0.96519413117572472f, - 0.96559418430297683f, - 0.96599196529384057f, - 0.96638747321229879f, - 0.96678070712768327f, - 0.96717166611467664f, - 0.96756034925331436f, - 0.9679467556289878f, - 0.9683308843324453f, - 0.96871273445979478f, - 0.9690923051125061f, - 0.96946959539741295f, - 0.96984460442671483f, - 0.97021733131797916f, - 0.97058777519414363f, - 0.97095593518351797f, - 0.97132181041978616f, - 0.97168540004200854f, - 0.9720467031946235f, - 0.97240571902744977f, - 0.97276244669568857f, - 0.97311688535992513f, - 0.97346903418613095f, - 0.9738188923456661f, - 0.97416645901528032f, - 0.97451173337711572f, - 0.97485471461870843f, - 0.97519540193299037f, - 0.97553379451829136f, - 0.97586989157834103f, - 0.97620369232227056f, - 0.97653519596461447f, - 0.97686440172531264f, - 0.97719130882971228f, - 0.97751591650856928f, - 0.97783822399805043f, - 0.97815823053973505f, - 0.97847593538061683f, - 0.97879133777310567f, - 0.97910443697502925f, - 0.97941523224963478f, - 0.97972372286559117f, - 0.98002990809698998f, - 0.98033378722334796f, - 0.98063535952960812f, - 0.98093462430614164f, - 0.98123158084874973f, - 0.98152622845866466f, - 0.9818185664425525f, - 0.98210859411251361f, - 0.98239631078608469f, - 0.98268171578624086f, - 0.98296480844139644f, - 0.98324558808540707f, - 0.98352405405757126f, - 0.98380020570263149f, - 0.98407404237077645f, - 0.9843455634176419f, - 0.9846147682043126f, - 0.9848816560973237f, - 0.98514622646866223f, - 0.98540847869576842f, - 0.98566841216153755f, - 0.98592602625432113f, - 0.98618132036792827f, - 0.98643429390162707f, - 0.98668494626014669f, - 0.98693327685367771f, - 0.98717928509787434f, - 0.98742297041385541f, - 0.98766433222820571f, - 0.98790336997297779f, - 0.98814008308569257f, - 0.98837447100934128f, - 0.98860653319238645f, - 0.98883626908876354f, - 0.98906367815788154f, - 0.98928875986462517f, - 0.98951151367935519f, - 0.98973193907791057f, - 0.98995003554160899f, - 0.9901658025572484f, - 0.99037923961710816f, - 0.99059034621895015f, - 0.99079912186602037f, - 0.99100556606704937f, - 0.99120967833625406f, - 0.99141145819333854f, - 0.99161090516349537f, - 0.99180801877740643f, - 0.99200279857124452f, - 0.99219524408667392f, - 0.99238535487085167f, - 0.99257313047642881f, - 0.99275857046155114f, - 0.99294167438986047f, - 0.99312244183049558f, - 0.99330087235809328f, - 0.99347696555278919f, - 0.99365072100021912f, - 0.99382213829151966f, - 0.99399121702332938f, - 0.99415795679778973f, - 0.99432235722254581f, - 0.9944844179107476f, - 0.99464413848105071f, - 0.99480151855761711f, - 0.99495655777011638f, - 0.99510925575372611f, - 0.99525961214913339f, - 0.9954076266025349f, - 0.99555329876563847f, - 0.99569662829566352f, - 0.99583761485534161f, - 0.99597625811291779f, - 0.99611255774215113f, - 0.99624651342231552f, - 0.99637812483820021f, - 0.99650739168011082f, - 0.9966343136438699f, - 0.996758890430818f, - 0.99688112174781385f, - 0.99700100730723529f, - 0.99711854682697998f, - 0.99723374003046616f, - 0.99734658664663323f, - 0.99745708640994191f, - 0.99756523906037575f, - 0.997671044343441f, - 0.99777450201016782f, - 0.99787561181711015f, - 0.99797437352634699f, - 0.99807078690548234f, - 0.99816485172764624f, - 0.99825656777149518f, - 0.99834593482121237f, - 0.99843295266650844f, - 0.99851762110262221f, - 0.99859993993032037f, - 0.99867990895589909f, - 0.99875752799118334f, - 0.99883279685352799f, - 0.99890571536581829f, - 0.99897628335646982f, - 0.99904450065942929f, - 0.99911036711417489f, - 0.99917388256571638f, - 0.99923504686459585f, - 0.99929385986688779f, - 0.99935032143419944f, - 0.9994044314336713f, - 0.99945618973797734f, - 0.99950559622532531f, - 0.99955265077945699f, - 0.99959735328964838f, - 0.9996397036507102f, - 0.99967970176298793f, - 0.99971734753236219f, - 0.99975264087024884f, - 0.99978558169359921f, - 0.99981616992490041f, - 0.99984440549217524f, - 0.99987028832898295f, - 0.99989381837441849f, - 0.99991499557311347f, - 0.999933819875236f, - 0.99995029123649048f, - 0.99996440961811828f, - 0.99997617498689761f, - 0.9999855873151432f, - 0.99999264658070719f, - 0.99999735276697821f, - 0.99999970586288223f - }; - float[] SINE_128 = { - 0.0061358846491544753f, - 0.01840672990580482f, - 0.030674803176636626f, - 0.04293825693494082f, - 0.055195244349689934f, - 0.067443919563664051f, - 0.079682437971430126f, - 0.091908956497132724f, - 0.10412163387205459f, - 0.11631863091190475f, - 0.12849811079379317f, - 0.14065823933284921f, - 0.15279718525844344f, - 0.16491312048996989f, - 0.17700422041214875f, - 0.18906866414980619f, - 0.2011046348420919f, - 0.21311031991609136f, - 0.22508391135979283f, - 0.2370236059943672f, - 0.24892760574572015f, - 0.26079411791527551f, - 0.27262135544994898f, - 0.28440753721127188f, - 0.29615088824362379f, - 0.30784964004153487f, - 0.31950203081601569f, - 0.33110630575987643f, - 0.34266071731199438f, - 0.35416352542049034f, - 0.36561299780477385f, - 0.37700741021641826f, - 0.38834504669882625f, - 0.39962419984564679f, - 0.41084317105790391f, - 0.42200027079979968f, - 0.43309381885315196f, - 0.4441221445704292f, - 0.45508358712634384f, - 0.46597649576796618f, - 0.47679923006332209f, - 0.487550160148436f, - 0.49822766697278187f, - 0.50883014254310699f, - 0.51935599016558964f, - 0.52980362468629461f, - 0.54017147272989285f, - 0.55045797293660481f, - 0.56066157619733603f, - 0.57078074588696726f, - 0.58081395809576453f, - 0.59075970185887416f, - 0.60061647938386897f, - 0.61038280627630948f, - 0.6200572117632891f, - 0.62963823891492698f, - 0.63912444486377573f, - 0.64851440102211244f, - 0.65780669329707864f, - 0.66699992230363747f, - 0.67609270357531592f, - 0.68508366777270036f, - 0.693971460889654f, - 0.7027547444572253f, - 0.71143219574521643f, - 0.72000250796138165f, - 0.7284643904482252f, - 0.73681656887736979f, - 0.74505778544146595f, - 0.75318679904361241f, - 0.76120238548426178f, - 0.76910333764557959f, - 0.77688846567323244f, - 0.78455659715557524f, - 0.79210657730021239f, - 0.79953726910790501f, - 0.80684755354379922f, - 0.8140363297059483f, - 0.82110251499110465f, - 0.8280450452577558f, - 0.83486287498638001f, - 0.84155497743689833f, - 0.84812034480329712f, - 0.85455798836540053f, - 0.86086693863776731f, - 0.86704624551569265f, - 0.87309497841829009f, - 0.87901222642863341f, - 0.88479709843093779f, - 0.89044872324475788f, - 0.89596624975618511f, - 0.90134884704602203f, - 0.90659570451491533f, - 0.91170603200542988f, - 0.9166790599210427f, - 0.9215140393420419f, - 0.92621024213831127f, - 0.93076696107898371f, - 0.9351835099389475f, - 0.93945922360218992f, - 0.94359345816196039f, - 0.94758559101774109f, - 0.95143502096900834f, - 0.95514116830577067f, - 0.9587034748958716f, - 0.96212140426904158f, - 0.9653944416976894f, - 0.96852209427441727f, - 0.97150389098625178f, - 0.97433938278557586f, - 0.97702814265775439f, - 0.97956976568544052f, - 0.98196386910955524f, - 0.98421009238692903f, - 0.98630809724459867f, - 0.98825756773074946f, - 0.99005821026229712f, - 0.99170975366909953f, - 0.9932119492347945f, - 0.99456457073425542f, - 0.99576741446765982f, - 0.99682029929116567f, - 0.99772306664419164f, - 0.99847558057329477f, - 0.99907772775264536f, - 0.99952941750109314f, - 0.9998305817958234f, - 0.99998117528260111f - }; - float[] SINE_960 = { - 0.00081812299560725323f, - 0.0024543667964602917f, - 0.0040906040262347889f, - 0.0057268303042312674f, - 0.0073630412497795667f, - 0.0089992324822505774f, - 0.010635399621067975f, - 0.012271538285719924f, - 0.013907644095770845f, - 0.015543712670873098f, - 0.017179739630778748f, - 0.018815720595351273f, - 0.020451651184577292f, - 0.022087527018578291f, - 0.023723343717622358f, - 0.025359096902135895f, - 0.02699478219271537f, - 0.028630395210139003f, - 0.030265931575378519f, - 0.031901386909610863f, - 0.033536756834229922f, - 0.035172036970858266f, - 0.036807222941358832f, - 0.038442310367846677f, - 0.040077294872700696f, - 0.041712172078575326f, - 0.043346937608412288f, - 0.044981587085452281f, - 0.046616116133246711f, - 0.048250520375669431f, - 0.049884795436928406f, - 0.051518936941577477f, - 0.053152940514528055f, - 0.05478680178106083f, - 0.056420516366837495f, - 0.05805407989791244f, - 0.059687488000744485f, - 0.061320736302208578f, - 0.062953820429607482f, - 0.064586736010683557f, - 0.066219478673630344f, - 0.06785204404710439f, - 0.069484427760236861f, - 0.071116625442645326f, - 0.072748632724445372f, - 0.07438044523626236f, - 0.076012058609243122f, - 0.077643468475067631f, - 0.079274670465960706f, - 0.080905660214703745f, - 0.082536433354646319f, - 0.084166985519717977f, - 0.085797312344439894f, - 0.08742740946393647f, - 0.089057272513947183f, - 0.090686897130838162f, - 0.092316278951613845f, - 0.093945413613928788f, - 0.095574296756099186f, - 0.097202924017114667f, - 0.098831291036649963f, - 0.10045939345507648f, - 0.10208722691347409f, - 0.10371478705364276f, - 0.10534206951811415f, - 0.10696906995016341f, - 0.10859578399382072f, - 0.11022220729388306f, - 0.11184833549592579f, - 0.11347416424631435f, - 0.11509968919221586f, - 0.11672490598161089f, - 0.11834981026330495f, - 0.11997439768694031f, - 0.12159866390300751f, - 0.12322260456285709f, - 0.12484621531871121f, - 0.12646949182367517f, - 0.12809242973174936f, - 0.12971502469784052f, - 0.13133727237777362f, - 0.13295916842830346f, - 0.13458070850712617f, - 0.13620188827289101f, - 0.1378227033852118f, - 0.13944314950467873f, - 0.14106322229286994f, - 0.14268291741236291f, - 0.14430223052674654f, - 0.1459211573006321f, - 0.14753969339966552f, - 0.14915783449053857f, - 0.15077557624100058f, - 0.15239291431987001f, - 0.1540098443970461f, - 0.15562636214352044f, - 0.15724246323138855f, - 0.15885814333386142f, - 0.16047339812527725f, - 0.16208822328111283f, - 0.16370261447799525f, - 0.16531656739371339f, - 0.16693007770722967f, - 0.16854314109869134f, - 0.17015575324944232f, - 0.17176790984203447f, - 0.17337960656023954f, - 0.1749908390890603f, - 0.17660160311474243f, - 0.17821189432478593f, - 0.17982170840795647f, - 0.18143104105429744f, - 0.18303988795514095f, - 0.1846482448031197f, - 0.18625610729217834f, - 0.1878634711175852f, - 0.18947033197594348f, - 0.19107668556520319f, - 0.19268252758467228f, - 0.19428785373502844f, - 0.19589265971833042f, - 0.19749694123802966f, - 0.19910069399898173f, - 0.20070391370745785f, - 0.20230659607115639f, - 0.20390873679921437f, - 0.20551033160221882f, - 0.20711137619221856f, - 0.2087118662827353f, - 0.21031179758877552f, - 0.21191116582684155f, - 0.21350996671494335f, - 0.21510819597260972f, - 0.21670584932089998f, - 0.2183029224824154f, - 0.21989941118131037f, - 0.22149531114330431f, - 0.22309061809569264f, - 0.22468532776735861f, - 0.22627943588878449f, - 0.22787293819206314f, - 0.22946583041090929f, - 0.23105810828067114f, - 0.23264976753834157f, - 0.23424080392256985f, - 0.2358312131736727f, - 0.23742099103364595f, - 0.23901013324617584f, - 0.24059863555665045f, - 0.24218649371217096f, - 0.24377370346156332f, - 0.24536026055538934f, - 0.24694616074595824f, - 0.24853139978733788f, - 0.25011597343536629f, - 0.25169987744766298f, - 0.25328310758364025f, - 0.25486565960451457f, - 0.25644752927331788f, - 0.25802871235490898f, - 0.25960920461598508f, - 0.26118900182509258f, - 0.26276809975263904f, - 0.264346494170904f, - 0.26592418085405067f, - 0.26750115557813692f, - 0.2690774141211269f, - 0.27065295226290209f, - 0.2722277657852728f, - 0.27380185047198918f, - 0.27537520210875299f, - 0.2769478164832283f, - 0.27851968938505312f, - 0.28009081660585067f, - 0.28166119393924061f, - 0.28323081718085019f, - 0.28479968212832563f, - 0.28636778458134327f, - 0.28793512034162105f, - 0.2895016852129294f, - 0.29106747500110264f, - 0.29263248551405047f, - 0.2941967125617686f, - 0.29576015195635058f, - 0.29732279951199847f, - 0.29888465104503475f, - 0.30044570237391266f, - 0.30200594931922808f, - 0.30356538770373032f, - 0.30512401335233358f, - 0.30668182209212791f, - 0.3082388097523906f, - 0.30979497216459695f, - 0.31135030516243201f, - 0.3129048045818012f, - 0.31445846626084178f, - 0.31601128603993378f, - 0.31756325976171151f, - 0.31911438327107416f, - 0.32066465241519732f, - 0.32221406304354389f, - 0.3237626110078754f, - 0.32531029216226293f, - 0.32685710236309828f, - 0.32840303746910487f, - 0.32994809334134939f, - 0.3314922658432522f, - 0.33303555084059877f, - 0.33457794420155085f, - 0.33611944179665709f, - 0.33766003949886464f, - 0.33919973318352969f, - 0.34073851872842903f, - 0.34227639201377064f, - 0.34381334892220483f, - 0.34534938533883547f, - 0.34688449715123082f, - 0.34841868024943456f, - 0.34995193052597684f, - 0.35148424387588523f, - 0.3530156161966958f, - 0.35454604338846402f, - 0.35607552135377557f, - 0.35760404599775775f, - 0.35913161322809023f, - 0.36065821895501554f, - 0.36218385909135092f, - 0.36370852955249849f, - 0.36523222625645668f, - 0.36675494512383078f, - 0.36827668207784414f, - 0.36979743304434909f, - 0.37131719395183754f, - 0.37283596073145214f, - 0.37435372931699717f, - 0.37587049564494951f, - 0.37738625565446909f, - 0.37890100528741022f, - 0.38041474048833229f, - 0.38192745720451066f, - 0.38343915138594736f, - 0.38494981898538222f, - 0.38645945595830333f, - 0.38796805826295838f, - 0.38947562186036483f, - 0.39098214271432141f, - 0.39248761679141814f, - 0.3939920400610481f, - 0.39549540849541737f, - 0.39699771806955625f, - 0.39849896476132979f, - 0.39999914455144892f, - 0.40149825342348083f, - 0.4029962873638599f, - 0.40449324236189854f, - 0.40598911440979762f, - 0.40748389950265762f, - 0.40897759363848879f, - 0.41047019281822261f, - 0.41196169304572178f, - 0.4134520903277914f, - 0.41494138067418929f, - 0.41642956009763715f, - 0.41791662461383078f, - 0.41940257024145089f, - 0.42088739300217382f, - 0.42237108892068231f, - 0.42385365402467584f, - 0.42533508434488143f, - 0.42681537591506419f, - 0.42829452477203828f, - 0.42977252695567697f, - 0.43124937850892364f, - 0.4327250754778022f, - 0.43419961391142781f, - 0.43567298986201736f, - 0.43714519938489987f, - 0.43861623853852766f, - 0.44008610338448595f, - 0.44155478998750436f, - 0.44302229441546676f, - 0.4444886127394222f, - 0.44595374103359531f, - 0.44741767537539667f, - 0.44888041184543348f, - 0.45034194652752002f, - 0.45180227550868812f, - 0.45326139487919759f, - 0.45471930073254679f, - 0.45617598916548296f, - 0.45763145627801283f, - 0.45908569817341294f, - 0.46053871095824001f, - 0.46199049074234161f, - 0.46344103363886635f, - 0.46489033576427435f, - 0.46633839323834758f, - 0.46778520218420055f, - 0.46923075872829029f, - 0.47067505900042683f, - 0.47211809913378361f, - 0.47355987526490806f, - 0.47500038353373153f, - 0.47643962008357982f, - 0.47787758106118372f, - 0.47931426261668875f, - 0.48074966090366611f, - 0.48218377207912272f, - 0.48361659230351117f, - 0.48504811774074069f, - 0.48647834455818684f, - 0.48790726892670194f, - 0.48933488702062544f, - 0.49076119501779414f, - 0.49218618909955225f, - 0.4936098654507618f, - 0.49503222025981269f, - 0.49645324971863303f, - 0.49787295002269943f, - 0.49929131737104687f, - 0.50070834796627917f, - 0.50212403801457872f, - 0.50353838372571758f, - 0.50495138131306638f, - 0.50636302699360547f, - 0.50777331698793449f, - 0.50918224752028263f, - 0.51058981481851906f, - 0.51199601511416237f, - 0.51340084464239111f, - 0.51480429964205421f, - 0.51620637635567967f, - 0.51760707102948678f, - 0.51900637991339404f, - 0.5204042992610306f, - 0.52180082532974559f, - 0.5231959543806185f, - 0.52458968267846895f, - 0.52598200649186677f, - 0.52737292209314235f, - 0.52876242575839572f, - 0.53015051376750777f, - 0.53153718240414882f, - 0.53292242795578992f, - 0.53430624671371152f, - 0.53568863497301467f, - 0.5370695890326298f, - 0.5384491051953274f, - 0.53982717976772743f, - 0.54120380906030963f, - 0.54257898938742311f, - 0.54395271706729609f, - 0.54532498842204646f, - 0.54669579977769045f, - 0.54806514746415402f, - 0.54943302781528081f, - 0.55079943716884383f, - 0.55216437186655387f, - 0.55352782825406999f, - 0.55488980268100907f, - 0.55625029150095584f, - 0.55760929107147217f, - 0.55896679775410718f, - 0.56032280791440714f, - 0.56167731792192455f, - 0.56303032415022869f, - 0.56438182297691453f, - 0.56573181078361312f, - 0.56708028395600085f, - 0.56842723888380908f, - 0.56977267196083425f, - 0.57111657958494688f, - 0.5724589581581021f, - 0.57379980408634845f, - 0.57513911377983773f, - 0.57647688365283478f, - 0.57781311012372738f, - 0.57914778961503466f, - 0.58048091855341843f, - 0.5818124933696911f, - 0.58314251049882604f, - 0.58447096637996743f, - 0.58579785745643886f, - 0.5871231801757536f, - 0.58844693098962408f, - 0.58976910635397084f, - 0.59108970272893235f, - 0.59240871657887517f, - 0.59372614437240179f, - 0.59504198258236196f, - 0.5963562276858605f, - 0.59766887616426767f, - 0.5989799245032289f, - 0.60028936919267273f, - 0.60159720672682204f, - 0.60290343360420195f, - 0.60420804632765002f, - 0.60551104140432543f, - 0.60681241534571839f, - 0.60811216466765883f, - 0.60941028589032709f, - 0.61070677553826169f, - 0.61200163014036979f, - 0.61329484622993602f, - 0.6145864203446314f, - 0.61587634902652377f, - 0.61716462882208556f, - 0.61845125628220421f, - 0.61973622796219074f, - 0.6210195404217892f, - 0.62230119022518593f, - 0.62358117394101897f, - 0.62485948814238634f, - 0.62613612940685637f, - 0.62741109431647646f, - 0.62868437945778133f, - 0.62995598142180387f, - 0.6312258968040827f, - 0.63249412220467238f, - 0.63376065422815175f, - 0.63502548948363347f, - 0.63628862458477287f, - 0.63755005614977711f, - 0.63880978080141437f, - 0.6400677951670225f, - 0.6413240958785188f, - 0.64257867957240766f, - 0.6438315428897915f, - 0.64508268247637779f, - 0.64633209498248945f, - 0.64757977706307335f, - 0.64882572537770888f, - 0.65006993659061751f, - 0.65131240737067142f, - 0.65255313439140239f, - 0.65379211433101081f, - 0.65502934387237444f, - 0.6562648197030575f, - 0.65749853851531959f, - 0.65873049700612374f, - 0.65996069187714679f, - 0.66118911983478657f, - 0.66241577759017178f, - 0.66364066185917048f, - 0.66486376936239888f, - 0.66608509682523009f, - 0.66730464097780284f, - 0.66852239855503071f, - 0.66973836629660977f, - 0.67095254094702894f, - 0.67216491925557675f, - 0.67337549797635199f, - 0.67458427386827102f, - 0.67579124369507693f, - 0.67699640422534846f, - 0.67819975223250772f, - 0.6794012844948305f, - 0.68060099779545302f, - 0.68179888892238183f, - 0.6829949546685018f, - 0.68418919183158522f, - 0.68538159721429948f, - 0.6865721676242168f, - 0.68776089987382172f, - 0.68894779078052026f, - 0.69013283716664853f, - 0.69131603585948032f, - 0.69249738369123692f, - 0.69367687749909468f, - 0.69485451412519361f, - 0.69603029041664599f, - 0.6972042032255451f, - 0.6983762494089728f, - 0.69954642582900894f, - 0.70071472935273893f, - 0.70188115685226271f, - 0.703045705204703f, - 0.70420837129221303f, - 0.70536915200198613f, - 0.70652804422626281f, - 0.70768504486233985f, - 0.70884015081257845f, - 0.70999335898441229f, - 0.711144666290356f, - 0.71229406964801356f, - 0.71344156598008623f, - 0.71458715221438096f, - 0.71573082528381871f, - 0.71687258212644234f, - 0.7180124196854254f, - 0.71915033490907943f, - 0.72028632475086318f, - 0.72142038616938997f, - 0.72255251612843596f, - 0.72368271159694852f, - 0.72481096954905444f, - 0.72593728696406756f, - 0.72706166082649704f, - 0.72818408812605595f, - 0.72930456585766834f, - 0.73042309102147851f, - 0.73153966062285747f, - 0.73265427167241282f, - 0.73376692118599507f, - 0.73487760618470677f, - 0.73598632369490979f, - 0.73709307074823405f, - 0.73819784438158409f, - 0.73930064163714881f, - 0.74040145956240788f, - 0.74150029521014049f, - 0.74259714563843304f, - 0.74369200791068657f, - 0.74478487909562552f, - 0.74587575626730485f, - 0.74696463650511791f, - 0.74805151689380456f, - 0.74913639452345926f, - 0.75021926648953785f, - 0.75130012989286621f, - 0.7523789818396478f, - 0.75345581944147111f, - 0.75453063981531809f, - 0.75560344008357094f, - 0.75667421737402052f, - 0.7577429688198738f, - 0.75880969155976163f, - 0.75987438273774599f, - 0.76093703950332836f, - 0.76199765901145666f, - 0.76305623842253345f, - 0.76411277490242291f, - 0.76516726562245885f, - 0.76621970775945258f, - 0.76727009849569949f, - 0.76831843501898767f, - 0.76936471452260458f, - 0.77040893420534517f, - 0.77145109127151923f, - 0.77249118293095853f, - 0.77352920639902467f, - 0.77456515889661659f, - 0.77559903765017746f, - 0.7766308398917029f, - 0.77766056285874774f, - 0.77868820379443371f, - 0.77971375994745684f, - 0.78073722857209438f, - 0.7817586069282132f, - 0.78277789228127592f, - 0.78379508190234881f, - 0.78481017306810918f, - 0.78582316306085265f, - 0.78683404916849986f, - 0.78784282868460476f, - 0.78884949890836087f, - 0.78985405714460888f, - 0.7908565007038445f, - 0.79185682690222425f, - 0.79285503306157412f, - 0.79385111650939566f, - 0.79484507457887377f, - 0.79583690460888357f, - 0.79682660394399751f, - 0.79781416993449272f, - 0.79879959993635785f, - 0.7997828913113002f, - 0.80076404142675273f, - 0.80174304765588156f, - 0.80271990737759213f, - 0.80369461797653707f, - 0.80466717684312306f, - 0.80563758137351682f, - 0.80660582896965372f, - 0.80757191703924336f, - 0.80853584299577752f, - 0.80949760425853612f, - 0.81045719825259477f, - 0.81141462240883167f, - 0.81236987416393436f, - 0.81332295096040608f, - 0.81427385024657373f, - 0.81522256947659355f, - 0.81616910611045879f, - 0.817113457614006f, - 0.81805562145892186f, - 0.81899559512275044f, - 0.81993337608889916f, - 0.82086896184664637f, - 0.8218023498911472f, - 0.82273353772344116f, - 0.82366252285045805f, - 0.82458930278502529f, - 0.82551387504587381f, - 0.82643623715764558f, - 0.82735638665089983f, - 0.82827432106211907f, - 0.82919003793371693f, - 0.83010353481404364f, - 0.83101480925739324f, - 0.83192385882400965f, - 0.83283068108009373f, - 0.8337352735978093f, - 0.83463763395529011f, - 0.83553775973664579f, - 0.83643564853196872f, - 0.83733129793734051f, - 0.83822470555483797f, - 0.83911586899254031f, - 0.84000478586453453f, - 0.84089145379092289f, - 0.84177587039782842f, - 0.84265803331740163f, - 0.84353794018782702f, - 0.844415588653329f, - 0.8452909763641786f, - 0.84616410097669936f, - 0.84703496015327406f, - 0.84790355156235053f, - 0.84876987287844818f, - 0.8496339217821639f, - 0.85049569596017938f, - 0.85135519310526508f, - 0.85221241091628896f, - 0.85306734709822085f, - 0.85391999936213903f, - 0.85477036542523732f, - 0.85561844301082923f, - 0.85646422984835635f, - 0.85730772367339259f, - 0.85814892222765116f, - 0.85898782325899026f, - 0.85982442452141961f, - 0.86065872377510555f, - 0.86149071878637817f, - 0.8623204073277364f, - 0.86314778717785412f, - 0.8639728561215867f, - 0.86479561194997623f, - 0.86561605246025763f, - 0.86643417545586487f, - 0.8672499787464365f, - 0.86806346014782154f, - 0.8688746174820855f, - 0.86968344857751589f, - 0.87048995126862883f, - 0.87129412339617363f, - 0.87209596280713941f, - 0.8728954673547612f, - 0.87369263489852422f, - 0.87448746330417149f, - 0.87527995044370765f, - 0.8760700941954066f, - 0.87685789244381551f, - 0.87764334307976144f, - 0.87842644400035663f, - 0.8792071931090043f, - 0.87998558831540408f, - 0.88076162753555787f, - 0.88153530869177488f, - 0.88230662971267804f, - 0.88307558853320878f, - 0.88384218309463292f, - 0.8846064113445461f, - 0.88536827123687933f, - 0.88612776073190425f, - 0.88688487779623937f, - 0.88763962040285393f, - 0.8883919865310751f, - 0.88914197416659235f, - 0.88988958130146301f, - 0.8906348059341177f, - 0.89137764606936609f, - 0.89211809971840139f, - 0.89285616489880615f, - 0.89359183963455813f, - 0.89432512195603453f, - 0.89505600990001799f, - 0.89578450150970124f, - 0.8965105948346932f, - 0.89723428793102367f, - 0.89795557886114807f, - 0.89867446569395382f, - 0.89939094650476448f, - 0.90010501937534515f, - 0.900816682393908f, - 0.90152593365511691f, - 0.90223277126009283f, - 0.90293719331641886f, - 0.90363919793814496f, - 0.90433878324579353f, - 0.90503594736636439f, - 0.90573068843333915f, - 0.90642300458668679f, - 0.90711289397286898f, - 0.90780035474484411f, - 0.90848538506207266f, - 0.90916798309052227f, - 0.90984814700267291f, - 0.9105258749775208f, - 0.91120116520058425f, - 0.91187401586390815f, - 0.91254442516606893f, - 0.9132123913121788f, - 0.91387791251389161f, - 0.91454098698940678f, - 0.91520161296347435f, - 0.91585978866739981f, - 0.91651551233904871f, - 0.91716878222285148f, - 0.91781959656980805f, - 0.91846795363749245f, - 0.91911385169005766f, - 0.9197572889982405f, - 0.9203982638393654f, - 0.92103677449734989f, - 0.92167281926270861f, - 0.92230639643255874f, - 0.92293750431062316f, - 0.92356614120723612f, - 0.92419230543934783f, - 0.92481599533052783f, - 0.92543720921097061f, - 0.92605594541749991f, - 0.92667220229357261f, - 0.92728597818928349f, - 0.9278972714613698f, - 0.92850608047321548f, - 0.9291124035948557f, - 0.92971623920298097f, - 0.93031758568094147f, - 0.93091644141875196f, - 0.93151280481309506f, - 0.93210667426732674f, - 0.93269804819147983f, - 0.93328692500226818f, - 0.93387330312309147f, - 0.93445718098403896f, - 0.93503855702189376f, - 0.9356174296801375f, - 0.93619379740895381f, - 0.93676765866523259f, - 0.93733901191257496f, - 0.93790785562129597f, - 0.93847418826842988f, - 0.93903800833773399f, - 0.93959931431969212f, - 0.94015810471151917f, - 0.94071437801716529f, - 0.94126813274731924f, - 0.94181936741941319f, - 0.94236808055762578f, - 0.94291427069288691f, - 0.94345793636288133f, - 0.94399907611205225f, - 0.9445376884916058f, - 0.94507377205951448f, - 0.94560732538052128f, - 0.94613834702614352f, - 0.94666683557467624f, - 0.94719278961119657f, - 0.94771620772756759f, - 0.94823708852244104f, - 0.94875543060126255f, - 0.94927123257627433f, - 0.94978449306651924f, - 0.95029521069784428f, - 0.9508033841029051f, - 0.95130901192116835f, - 0.9518120927989161f, - 0.95231262538924943f, - 0.95281060835209208f, - 0.95330604035419386f, - 0.95379892006913403f, - 0.95428924617732525f, - 0.95477701736601728f, - 0.95526223232929941f, - 0.95574488976810545f, - 0.95622498839021619f, - 0.95670252691026292f, - 0.95717750404973156f, - 0.95764991853696524f, - 0.95811976910716812f, - 0.95858705450240911f, - 0.95905177347162429f, - 0.95951392477062125f, - 0.95997350716208196f, - 0.96043051941556579f, - 0.96088496030751369f, - 0.96133682862125036f, - 0.96178612314698864f, - 0.96223284268183173f, - 0.9626769860297768f, - 0.96311855200171881f, - 0.96355753941545252f, - 0.96399394709567654f, - 0.96442777387399625f, - 0.96485901858892686f, - 0.96528768008589627f, - 0.96571375721724895f, - 0.96613724884224783f, - 0.96655815382707866f, - 0.96697647104485207f, - 0.96739219937560694f, - 0.96780533770631338f, - 0.96821588493087585f, - 0.9686238399501359f, - 0.96902920167187501f, - 0.96943196901081796f, - 0.96983214088863534f, - 0.9702297162339466f, - 0.97062469398232287f, - 0.97101707307629004f, - 0.97140685246533098f, - 0.97179403110588902f, - 0.97217860796137046f, - 0.97256058200214734f, - 0.97293995220556007f, - 0.97331671755592064f, - 0.97369087704451474f, - 0.97406242966960455f, - 0.97443137443643235f, - 0.97479771035722163f, - 0.97516143645118103f, - 0.97552255174450631f, - 0.97588105527038305f, - 0.97623694606898959f, - 0.97659022318749911f, - 0.97694088568008242f, - 0.97728893260791039f, - 0.97763436303915685f, - 0.97797717604900047f, - 0.97831737071962765f, - 0.97865494614023485f, - 0.97898990140703124f, - 0.97932223562324061f, - 0.97965194789910426f, - 0.9799790373518833f, - 0.98030350310586067f, - 0.98062534429234405f, - 0.98094456004966768f, - 0.98126114952319499f, - 0.98157511186532054f, - 0.98188644623547261f, - 0.98219515180011563f, - 0.98250122773275184f, - 0.98280467321392362f, - 0.98310548743121629f, - 0.98340366957925973f, - 0.98369921885973044f, - 0.98399213448135414f, - 0.98428241565990748f, - 0.98457006161822058f, - 0.98485507158617835f, - 0.98513744480072363f, - 0.98541718050585803f, - 0.98569427795264519f, - 0.98596873639921168f, - 0.98624055511074971f, - 0.98650973335951875f, - 0.98677627042484772f, - 0.98704016559313645f, - 0.98730141815785832f, - 0.98756002741956173f, - 0.9878159926858715f, - 0.98806931327149194f, - 0.98831998849820735f, - 0.98856801769488489f, - 0.98881340019747566f, - 0.98905613534901682f, - 0.98929622249963345f, - 0.98953366100653983f, - 0.98976845023404181f, - 0.99000058955353776f, - 0.99023007834352106f, - 0.99045691598958097f, - 0.99068110188440506f, - 0.99090263542778001f, - 0.99112151602659404f, - 0.99133774309483769f, - 0.99155131605360625f, - 0.99176223433110056f, - 0.99197049736262888f, - 0.99217610459060845f, - 0.99237905546456673f, - 0.99257934944114334f, - 0.99277698598409092f, - 0.99297196456427694f, - 0.99316428465968509f, - 0.99335394575541669f, - 0.99354094734369169f, - 0.99372528892385081f, - 0.99390697000235606f, - 0.99408599009279242f, - 0.99426234871586938f, - 0.99443604539942176f, - 0.99460707967841133f, - 0.99477545109492771f, - 0.99494115919819004f, - 0.99510420354454787f, - 0.99526458369748239f, - 0.99542229922760772f, - 0.99557734971267187f, - 0.9957297347375581f, - 0.99587945389428578f, - 0.99602650678201154f, - 0.99617089300703077f, - 0.996312612182778f, - 0.99645166392982831f, - 0.99658804787589839f, - 0.99672176365584741f, - 0.99685281091167788f, - 0.99698118929253687f, - 0.99710689845471678f, - 0.99722993806165661f, - 0.99735030778394196f, - 0.99746800729930707f, - 0.99758303629263489f, - 0.99769539445595812f, - 0.99780508148846014f, - 0.99791209709647588f, - 0.99801644099349218f, - 0.99811811290014918f, - 0.9982171125442405f, - 0.9983134396607144f, - 0.99840709399167404f, - 0.99849807528637868f, - 0.99858638330124405f, - 0.99867201779984294f, - 0.99875497855290607f, - 0.99883526533832245f, - 0.99891287794114036f, - 0.99898781615356746f, - 0.99906007977497147f, - 0.99912966861188113f, - 0.99919658247798593f, - 0.99926082119413751f, - 0.99932238458834954f, - 0.999381272495798f, - 0.99943748475882255f, - 0.9994910212269259f, - 0.99954188175677483f, - 0.99959006621220048f, - 0.99963557446419837f, - 0.99967840639092931f, - 0.99971856187771946f, - 0.99975604081706027f, - 0.99979084310860955f, - 0.99982296865919107f, - 0.99985241738279484f, - 0.99987918920057806f, - 0.99990328404086426f, - 0.9999247018391445f, - 0.99994344253807688f, - 0.99995950608748674f, - 0.99997289244436727f, - 0.99998360157287902f, - 0.9999916334443506f, - 0.99999698803727821f, - 0.99999966533732598f - }; - float[] SINE_120 = { - 0.0065449379673518581f, - 0.019633692460628301f, - 0.032719082821776137f, - 0.045798866936520771f, - 0.058870803651189033f, - 0.071932653156719387f, - 0.084982177372441667f, - 0.09801714032956059f, - 0.11103530855427769f, - 0.12403445145048532f, - 0.13701234168196802f, - 0.14996675555404498f, - 0.16289547339458874f, - 0.17579627993435451f, - 0.18866696468655525f, - 0.2015053223256171f, - 0.21430915306505074f, - 0.2270762630343732f, - 0.23980446465501654f, - 0.25249157701515795f, - 0.26513542624340797f, - 0.27773384588129219f, - 0.29028467725446233f, - 0.3027857698425746f, - 0.31523498164776964f, - 0.32763017956169349f, - 0.33996923973099424f, - 0.35225004792123354f, - 0.36447049987914965f, - 0.37662850169321077f, - 0.38872197015239557f, - 0.40074883310314097f, - 0.41270702980439467f, - 0.42459451128071307f, - 0.43640924067334208f, - 0.44814919358922256f, - 0.45981235844785984f, - 0.47139673682599764f, - 0.48290034380003727f, - 0.49432120828614462f, - 0.50565737337798455f, - 0.51690689668202761f, - 0.52806785065036799f, - 0.53913832291100017f, - 0.55011641659549337f, - 0.56100025066400983f, - 0.57178796022761225f, - 0.58247769686780215f, - 0.59306762895323706f, - 0.60355594195357143f, - 0.61394083875036642f, - 0.62422053994501758f, - 0.63439328416364549f, - 0.64445732835889735f, - 0.65441094810861034f, - 0.66425243791128175f, - 0.67398011147829784f, - 0.68359230202287125f, - 0.69308736254563585f, - 0.70246366611685174f, - 0.71171960615517138f, - 0.72085359670291882f, - 0.7298640726978356f, - 0.73874949024124625f, - 0.74750832686259672f, - 0.75613908178032285f, - 0.76464027615900032f, - 0.77301045336273699f, - 0.78124817920475853f, - 0.78935204219315003f, - 0.79732065377270711f, - 0.80515264856285829f, - 0.81284668459161513f, - 0.82040144352551359f, - 0.82781563089550203f, - 0.83508797631874299f, - 0.84221723371628654f, - 0.84920218152657889f, - 0.85604162291477137f, - 0.86273438597779184f, - 0.86927932394514362f, - 0.87567531537539967f, - 0.88192126434835494f, - 0.88801610065280734f, - 0.89395877996993212f, - 0.8997482840522214f, - 0.90538362089795521f, - 0.91086382492117568f, - 0.91618795711713596f, - 0.92135510522319242f, - 0.9263643838751181f, - 0.93121493475880346f, - 0.93590592675732565f, - 0.94043655609335486f, - 0.94480604646687805f, - 0.94901364918821385f, - 0.95305864330629697f, - 0.95694033573220882f, - 0.9606580613579353f, - 0.96421118317032928f, - 0.96759909236025976f, - 0.9708212084269281f, - 0.97387697927733363f, - 0.97676588132087239f, - 0.97948741955905139f, - 0.98204112767030394f, - 0.98442656808989171f, - 0.98664333208487898f, - 0.98869103982416728f, - 0.99056934044357725f, - 0.99227791210596705f, - 0.99381646205637808f, - 0.99518472667219682f, - 0.99638247150832537f, - 0.99740949133735191f, - 0.99826561018471593f, - 0.99895068135886012f, - 0.99946458747636568f, - 0.99980724048206482f, - 0.99997858166412923f - }; + float[] SINE_1024 = { + 0.00076699031874270449f, + 0.002300969151425805f, + 0.0038349425697062275f, + 0.0053689069639963425f, + 0.0069028587247297558f, + 0.0084367942423697988f, + 0.0099707099074180308f, + 0.011504602110422714f, + 0.013038467241987334f, + 0.014572301692779064f, + 0.016106101853537287f, + 0.017639864115082053f, + 0.019173584868322623f, + 0.020707260504265895f, + 0.022240887414024961f, + 0.023774461988827555f, + 0.025307980620024571f, + 0.026841439699098531f, + 0.028374835617672099f, + 0.029908164767516555f, + 0.031441423540560301f, + 0.032974608328897335f, + 0.03450771552479575f, + 0.036040741520706229f, + 0.037573682709270494f, + 0.039106535483329888f, + 0.040639296235933736f, + 0.042171961360347947f, + 0.043704527250063421f, + 0.04523699029880459f, + 0.046769346900537863f, + 0.048301593449480144f, + 0.049833726340107277f, + 0.051365741967162593f, + 0.052897636725665324f, + 0.054429407010919133f, + 0.055961049218520569f, + 0.057492559744367566f, + 0.059023934984667931f, + 0.060555171335947788f, + 0.062086265195060088f, + 0.063617212959193106f, + 0.065148011025878833f, + 0.066678655793001557f, + 0.068209143658806329f, + 0.069739471021907307f, + 0.071269634281296401f, + 0.072799629836351673f, + 0.074329454086845756f, + 0.075859103432954447f, + 0.077388574275265049f, + 0.078917863014784942f, + 0.080446966052950014f, + 0.081975879791633066f, + 0.083504600633152432f, + 0.085033124980280275f, + 0.08656144923625117f, + 0.088089569804770507f, + 0.089617483090022959f, + 0.091145185496681005f, + 0.09267267342991331f, + 0.094199943295393204f, + 0.095726991499307162f, + 0.097253814448363271f, + 0.098780408549799623f, + 0.10030677021139286f, + 0.10183289584146653f, + 0.10335878184889961f, + 0.10488442464313497f, + 0.10640982063418768f, + 0.10793496623265365f, + 0.10945985784971798f, + 0.11098449189716339f, + 0.11250886478737869f, + 0.1140329729333672f, + 0.11555681274875526f, + 0.11708038064780059f, + 0.11860367304540072f, + 0.1201266863571015f, + 0.12164941699910553f, + 0.12317186138828048f, + 0.12469401594216764f, + 0.12621587707899035f, + 0.12773744121766231f, + 0.12925870477779614f, + 0.13077966417971171f, + 0.13230031584444465f, + 0.13382065619375472f, + 0.13534068165013421f, + 0.13686038863681638f, + 0.13837977357778389f, + 0.13989883289777721f, + 0.14141756302230302f, + 0.14293596037764267f, + 0.14445402139086047f, + 0.14597174248981221f, + 0.14748912010315357f, + 0.14900615066034845f, + 0.1505228305916774f, + 0.15203915632824605f, + 0.15355512430199345f, + 0.15507073094570051f, + 0.15658597269299843f, + 0.15810084597837698f, + 0.15961534723719306f, + 0.16112947290567881f, + 0.16264321942095031f, + 0.16415658322101581f, + 0.16566956074478412f, + 0.16718214843207294f, + 0.16869434272361733f, + 0.17020614006107807f, + 0.17171753688704997f, + 0.17322852964507032f, + 0.1747391147796272f, + 0.17624928873616788f, + 0.17775904796110717f, + 0.17926838890183575f, + 0.18077730800672859f, + 0.1822858017251533f, + 0.18379386650747845f, + 0.1853014988050819f, + 0.18680869507035927f, + 0.18831545175673212f, + 0.18982176531865641f, + 0.1913276322116309f, + 0.19283304889220523f, + 0.1943380118179886f, + 0.19584251744765785f, + 0.19734656224096592f, + 0.19885014265875009f, + 0.20035325516294045f, + 0.20185589621656805f, + 0.20335806228377332f, + 0.20485974982981442f, + 0.20636095532107551f, + 0.20786167522507507f, + 0.20936190601047416f, + 0.21086164414708486f, + 0.21236088610587842f, + 0.21385962835899375f, + 0.21535786737974555f, + 0.21685559964263262f, + 0.21835282162334632f, + 0.2198495297987787f, + 0.22134572064703081f, + 0.22284139064742112f, + 0.2243365362804936f, + 0.22583115402802617f, + 0.22732524037303886f, + 0.22881879179980222f, + 0.23031180479384544f, + 0.23180427584196478f, + 0.23329620143223159f, + 0.23478757805400097f, + 0.23627840219791957f, + 0.23776867035593419f, + 0.23925837902129998f, + 0.24074752468858843f, + 0.24223610385369601f, + 0.24372411301385216f, + 0.24521154866762754f, + 0.24669840731494241f, + 0.24818468545707478f, + 0.24967037959666857f, + 0.25115548623774192f, + 0.25264000188569552f, + 0.25412392304732062f, + 0.25560724623080738f, + 0.25708996794575312f, + 0.25857208470317034f, + 0.26005359301549519f, + 0.26153448939659552f, + 0.263014770361779f, + 0.26449443242780163f, + 0.26597347211287559f, + 0.26745188593667762f, + 0.26892967042035726f, + 0.27040682208654482f, + 0.27188333745935972f, + 0.27335921306441868f, + 0.27483444542884394f, + 0.27630903108127108f, + 0.27778296655185769f, + 0.27925624837229118f, + 0.28072887307579719f, + 0.28220083719714756f, + 0.28367213727266843f, + 0.28514276984024867f, + 0.28661273143934779f, + 0.28808201861100413f, + 0.28955062789784303f, + 0.29101855584408509f, + 0.29248579899555388f, + 0.29395235389968466f, + 0.29541821710553201f, + 0.29688338516377827f, + 0.2983478546267414f, + 0.29981162204838335f, + 0.30127468398431795f, + 0.30273703699181914f, + 0.30419867762982911f, + 0.30565960245896612f, + 0.3071198080415331f, + 0.30857929094152509f, + 0.31003804772463789f, + 0.31149607495827591f, + 0.3129533692115602f, + 0.31440992705533666f, + 0.31586574506218396f, + 0.31732081980642174f, + 0.31877514786411848f, + 0.32022872581309986f, + 0.32168155023295658f, + 0.32313361770505233f, + 0.32458492481253215f, + 0.32603546814033024f, + 0.327485244275178f, + 0.3289342498056122f, + 0.33038248132198278f, + 0.33182993541646111f, + 0.33327660868304793f, + 0.33472249771758122f, + 0.33616759911774452f, + 0.33761190948307462f, + 0.33905542541496964f, + 0.34049814351669716f, + 0.34194006039340219f, + 0.34338117265211504f, + 0.34482147690175929f, + 0.34626096975316001f, + 0.34769964781905138f, + 0.34913750771408497f, + 0.35057454605483751f, + 0.35201075945981908f, + 0.35344614454948081f, + 0.35488069794622279f, + 0.35631441627440241f, + 0.3577472961603419f, + 0.3591793342323365f, + 0.36061052712066227f, + 0.36204087145758418f, + 0.36347036387736376f, + 0.36489900101626732f, + 0.36632677951257359f, + 0.36775369600658198f, + 0.36917974714062002f, + 0.37060492955905167f, + 0.37202923990828501f, + 0.3734526748367803f, + 0.37487523099505754f, + 0.37629690503570479f, + 0.37771769361338564f, + 0.37913759338484732f, + 0.38055660100892852f, + 0.38197471314656722f, + 0.38339192646080866f, + 0.38480823761681288f, + 0.38622364328186298f, + 0.38763814012537273f, + 0.38905172481889438f, + 0.39046439403612659f, + 0.39187614445292235f, + 0.3932869727472964f, + 0.39469687559943356f, + 0.39610584969169627f, + 0.39751389170863233f, + 0.39892099833698291f, + 0.40032716626569009f, + 0.40173239218590501f, + 0.4031366727909953f, + 0.404540004776553f, + 0.40594238484040251f, + 0.40734380968260797f, + 0.40874427600548136f, + 0.41014378051359024f, + 0.41154231991376522f, + 0.41293989091510808f, + 0.4143364902289991f, + 0.41573211456910536f, + 0.41712676065138787f, + 0.4185204251941097f, + 0.41991310491784362f, + 0.42130479654547964f, + 0.42269549680223295f, + 0.42408520241565156f, + 0.4254739101156238f, + 0.42686161663438643f, + 0.42824831870653196f, + 0.42963401306901638f, + 0.43101869646116703f, + 0.43240236562469014f, + 0.43378501730367852f, + 0.43516664824461926f, + 0.4365472551964012f, + 0.43792683491032286f, + 0.43930538414009995f, + 0.4406828996418729f, + 0.4420593781742147f, + 0.44343481649813848f, + 0.44480921137710488f, + 0.44618255957703007f, + 0.44755485786629301f, + 0.44892610301574326f, + 0.45029629179870861f, + 0.45166542099100249f, + 0.45303348737093158f, + 0.45440048771930358f, + 0.45576641881943464f, + 0.45713127745715698f, + 0.45849506042082627f, + 0.45985776450132954f, + 0.46121938649209238f, + 0.46257992318908681f, + 0.46393937139083852f, + 0.4652977278984346f, + 0.46665498951553092f, + 0.46801115304835983f, + 0.46936621530573752f, + 0.4707201730990716f, + 0.47207302324236866f, + 0.47342476255224153f, + 0.47477538784791712f, + 0.47612489595124358f, + 0.47747328368669806f, + 0.47882054788139389f, + 0.48016668536508839f, + 0.48151169297018986f, + 0.48285556753176567f, + 0.48419830588754903f, + 0.48553990487794696f, + 0.48688036134604734f, + 0.48821967213762679f, + 0.48955783410115744f, + 0.49089484408781509f, + 0.49223069895148602f, + 0.49356539554877477f, + 0.49489893073901126f, + 0.49623130138425825f, + 0.49756250434931915f, + 0.49889253650174459f, + 0.50022139471184068f, + 0.50154907585267539f, + 0.50287557680008699f, + 0.50420089443269034f, + 0.50552502563188539f, + 0.50684796728186321f, + 0.5081697162696146f, + 0.50949026948493636f, + 0.51080962382043904f, + 0.51212777617155469f, + 0.51344472343654346f, + 0.5147604625165012f, + 0.51607499031536663f, + 0.51738830373992906f, + 0.51870039969983495f, + 0.52001127510759604f, + 0.52132092687859566f, + 0.52262935193109661f, + 0.5239365471862486f, + 0.52524250956809471f, + 0.52654723600357944f, + 0.52785072342255523f, + 0.52915296875779061f, + 0.53045396894497632f, + 0.53175372092273332f, + 0.53305222163261945f, + 0.53434946801913752f, + 0.53564545702974109f, + 0.53694018561484291f, + 0.5382336507278217f, + 0.53952584932502889f, + 0.54081677836579667f, + 0.54210643481244392f, + 0.5433948156302848f, + 0.54468191778763453f, + 0.54596773825581757f, + 0.54725227400917409f, + 0.54853552202506739f, + 0.54981747928389091f, + 0.55109814276907543f, + 0.55237750946709607f, + 0.55365557636747931f, + 0.55493234046281037f, + 0.55620779874873993f, + 0.55748194822399155f, + 0.55875478589036831f, + 0.56002630875276038f, + 0.56129651381915147f, + 0.56256539810062656f, + 0.56383295861137817f, + 0.56509919236871398f, + 0.56636409639306384f, + 0.56762766770798623f, + 0.56888990334017586f, + 0.5701508003194703f, + 0.57141035567885723f, + 0.57266856645448116f, + 0.57392542968565075f, + 0.57518094241484508f, + 0.57643510168772183f, + 0.5776879045531228f, + 0.57893934806308178f, + 0.58018942927283168f, + 0.58143814524081017f, + 0.58268549302866846f, + 0.58393146970127618f, + 0.58517607232673041f, + 0.5864192979763605f, + 0.58766114372473666f, + 0.58890160664967572f, + 0.59014068383224882f, + 0.59137837235678758f, + 0.59261466931089113f, + 0.59384957178543363f, + 0.59508307687456996f, + 0.59631518167574371f, + 0.59754588328969316f, + 0.59877517882045872f, + 0.60000306537538894f, + 0.6012295400651485f, + 0.60245460000372375f, + 0.60367824230843037f, + 0.60490046409991982f, + 0.60612126250218612f, + 0.60734063464257293f, + 0.60855857765177945f, + 0.60977508866386843f, + 0.61099016481627166f, + 0.61220380324979795f, + 0.61341600110863859f, + 0.61462675554037505f, + 0.61583606369598509f, + 0.61704392272984976f, + 0.61825032979976025f, + 0.61945528206692402f, + 0.62065877669597214f, + 0.62186081085496536f, + 0.62306138171540126f, + 0.62426048645222065f, + 0.62545812224381436f, + 0.62665428627202935f, + 0.62784897572217646f, + 0.629042187783036f, + 0.63023391964686437f, + 0.63142416850940186f, + 0.63261293156987741f, + 0.63380020603101728f, + 0.63498598909904946f, + 0.63617027798371217f, + 0.63735306989825913f, + 0.63853436205946679f, + 0.63971415168764045f, + 0.64089243600662138f, + 0.64206921224379254f, + 0.64324447763008585f, + 0.64441822939998838f, + 0.64559046479154869f, + 0.64676118104638392f, + 0.64793037540968534f, + 0.64909804513022595f, + 0.65026418746036585f, + 0.65142879965605982f, + 0.65259187897686244f, + 0.65375342268593606f, + 0.65491342805005603f, + 0.6560718923396176f, + 0.65722881282864254f, + 0.65838418679478505f, + 0.65953801151933866f, + 0.6606902842872423f, + 0.66184100238708687f, + 0.66299016311112147f, + 0.66413776375526001f, + 0.66528380161908718f, + 0.66642827400586524f, + 0.66757117822254031f, + 0.66871251157974798f, + 0.66985227139182102f, + 0.67099045497679422f, + 0.67212705965641173f, + 0.67326208275613297f, + 0.67439552160513905f, + 0.67552737353633852f, + 0.67665763588637495f, + 0.6777863059956315f, + 0.67891338120823841f, + 0.68003885887207893f, + 0.68116273633879543f, + 0.68228501096379557f, + 0.68340568010625868f, + 0.6845247411291423f, + 0.68564219139918747f, + 0.68675802828692589f, + 0.68787224916668555f, + 0.68898485141659704f, + 0.69009583241859995f, + 0.69120518955844845f, + 0.69231292022571822f, + 0.69341902181381176f, + 0.69452349171996552f, + 0.69562632734525487f, + 0.6967275260946012f, + 0.69782708537677729f, + 0.69892500260441415f, + 0.70002127519400625f, + 0.70111590056591866f, + 0.70220887614439187f, + 0.70330019935754873f, + 0.70438986763740041f, + 0.7054778784198521f, + 0.70656422914470951f, + 0.70764891725568435f, + 0.70873194020040065f, + 0.70981329543040084f, + 0.71089298040115168f, + 0.71197099257204999f, + 0.71304732940642923f, + 0.71412198837156471f, + 0.71519496693868001f, + 0.71626626258295312f, + 0.71733587278352173f, + 0.71840379502348972f, + 0.71947002678993299f, + 0.72053456557390527f, + 0.72159740887044366f, + 0.72265855417857561f, + 0.72371799900132339f, + 0.72477574084571128f, + 0.72583177722277037f, + 0.72688610564754497f, + 0.72793872363909862f, + 0.72898962872051931f, + 0.73003881841892615f, + 0.73108629026547423f, + 0.73213204179536129f, + 0.73317607054783274f, + 0.73421837406618817f, + 0.73525894989778673f, + 0.73629779559405306f, + 0.73733490871048279f, + 0.73837028680664851f, + 0.73940392744620576f, + 0.74043582819689802f, + 0.74146598663056329f, + 0.74249440032313918f, + 0.74352106685466912f, + 0.74454598380930725f, + 0.74556914877532543f, + 0.74659055934511731f, + 0.74761021311520515f, + 0.74862810768624533f, + 0.74964424066303348f, + 0.75065860965451059f, + 0.75167121227376843f, + 0.75268204613805523f, + 0.75369110886878121f, + 0.75469839809152439f, + 0.75570391143603588f, + 0.75670764653624567f, + 0.75770960103026808f, + 0.75870977256040739f, + 0.75970815877316344f, + 0.76070475731923692f, + 0.76169956585353527f, + 0.76269258203517787f, + 0.76368380352750187f, + 0.76467322799806714f, + 0.76566085311866239f, + 0.76664667656531038f, + 0.76763069601827327f, + 0.76861290916205827f, + 0.76959331368542294f, + 0.7705719072813807f, + 0.7715486876472063f, + 0.77252365248444133f, + 0.77349679949889905f, + 0.77446812640067086f, + 0.77543763090413043f, + 0.77640531072794039f, + 0.7773711635950562f, + 0.77833518723273309f, + 0.7792973793725303f, + 0.78025773775031659f, + 0.78121626010627609f, + 0.7821729441849129f, + 0.78312778773505731f, + 0.78408078850986995f, + 0.78503194426684808f, + 0.78598125276783015f, + 0.7869287117790017f, + 0.78787431907090011f, + 0.78881807241842017f, + 0.78975996960081907f, + 0.79070000840172161f, + 0.79163818660912577f, + 0.79257450201540758f, + 0.79350895241732666f, + 0.79444153561603059f, + 0.79537224941706119f, + 0.79630109163035911f, + 0.7972280600702687f, + 0.79815315255554375f, + 0.79907636690935235f, + 0.79999770095928191f, + 0.8009171525373443f, + 0.80183471947998131f, + 0.80275039962806916f, + 0.80366419082692409f, + 0.804576090926307f, + 0.80548609778042912f, + 0.80639420924795624f, + 0.80730042319201445f, + 0.80820473748019472f, + 0.80910714998455813f, + 0.81000765858164114f, + 0.81090626115245967f, + 0.81180295558251536f, + 0.81269773976179949f, + 0.81359061158479851f, + 0.81448156895049861f, + 0.81537060976239129f, + 0.81625773192847739f, + 0.81714293336127297f, + 0.81802621197781344f, + 0.81890756569965895f, + 0.81978699245289899f, + 0.82066449016815746f, + 0.82154005678059761f, + 0.82241369022992639f, + 0.82328538846040011f, + 0.82415514942082857f, + 0.82502297106458022f, + 0.82588885134958678f, + 0.82675278823834852f, + 0.8276147796979384f, + 0.82847482370000713f, + 0.82933291822078825f, + 0.83018906124110237f, + 0.83104325074636232f, + 0.83189548472657759f, + 0.83274576117635946f, + 0.83359407809492514f, + 0.83444043348610319f, + 0.83528482535833737f, + 0.83612725172469216f, + 0.83696771060285702f, + 0.83780620001515094f, + 0.8386427179885273f, + 0.83947726255457855f, + 0.84030983174954077f, + 0.84114042361429808f, + 0.84196903619438768f, + 0.84279566754000412f, + 0.84362031570600404f, + 0.84444297875191066f, + 0.84526365474191822f, + 0.84608234174489694f, + 0.84689903783439735f, + 0.84771374108865427f, + 0.84852644959059265f, + 0.84933716142783067f, + 0.85014587469268521f, + 0.85095258748217573f, + 0.85175729789802912f, + 0.85256000404668397f, + 0.85336070403929543f, + 0.85415939599173873f, + 0.85495607802461482f, + 0.85575074826325392f, + 0.85654340483771996f, + 0.85733404588281559f, + 0.85812266953808602f, + 0.8589092739478239f, + 0.85969385726107261f, + 0.86047641763163207f, + 0.86125695321806206f, + 0.86203546218368721f, + 0.86281194269660033f, + 0.86358639292966799f, + 0.86435881106053403f, + 0.86512919527162369f, + 0.86589754375014882f, + 0.86666385468811102f, + 0.86742812628230692f, + 0.86819035673433131f, + 0.86895054425058238f, + 0.86970868704226556f, + 0.87046478332539767f, + 0.8712188313208109f, + 0.8719708292541577f, + 0.8727207753559143f, + 0.87346866786138488f, + 0.8742145050107063f, + 0.87495828504885154f, + 0.8757000062256346f, + 0.87643966679571361f, + 0.87717726501859594f, + 0.87791279915864173f, + 0.87864626748506813f, + 0.87937766827195318f, + 0.88010699979824036f, + 0.88083426034774204f, + 0.88155944820914378f, + 0.8822825616760086f, + 0.88300359904678072f, + 0.88372255862478966f, + 0.8844394387182537f, + 0.88515423764028511f, + 0.88586695370889279f, + 0.88657758524698704f, + 0.88728613058238315f, + 0.88799258804780556f, + 0.88869695598089171f, + 0.88939923272419552f, + 0.89009941662519221f, + 0.89079750603628149f, + 0.89149349931479138f, + 0.89218739482298248f, + 0.89287919092805168f, + 0.89356888600213602f, + 0.89425647842231604f, + 0.89494196657062075f, + 0.89562534883403f, + 0.89630662360447966f, + 0.89698578927886397f, + 0.89766284425904075f, + 0.89833778695183419f, + 0.89901061576903907f, + 0.89968132912742393f, + 0.9003499254487356f, + 0.90101640315970233f, + 0.90168076069203773f, + 0.9023429964824442f, + 0.90300310897261704f, + 0.90366109660924798f, + 0.90431695784402832f, + 0.90497069113365325f, + 0.90562229493982516f, + 0.90627176772925766f, + 0.90691910797367803f, + 0.90756431414983252f, + 0.9082073847394887f, + 0.90884831822943912f, + 0.90948711311150543f, + 0.91012376788254157f, + 0.91075828104443757f, + 0.91139065110412232f, + 0.91202087657356823f, + 0.9126489559697939f, + 0.91327488781486776f, + 0.91389867063591168f, + 0.91452030296510445f, + 0.91513978333968526f, + 0.91575711030195672f, + 0.91637228239928914f, + 0.91698529818412289f, + 0.91759615621397295f, + 0.9182048550514309f, + 0.91881139326416994f, + 0.91941576942494696f, + 0.92001798211160657f, + 0.92061802990708386f, + 0.92121591139940873f, + 0.92181162518170812f, + 0.92240516985220988f, + 0.92299654401424625f, + 0.92358574627625656f, + 0.9241727752517912f, + 0.92475762955951391f, + 0.9253403078232062f, + 0.92592080867176996f, + 0.92649913073923051f, + 0.9270752726647401f, + 0.92764923309258118f, + 0.92822101067216944f, + 0.92879060405805702f, + 0.9293580119099355f, + 0.92992323289263956f, + 0.93048626567614978f, + 0.93104710893559517f, + 0.93160576135125783f, + 0.93216222160857432f, + 0.93271648839814025f, + 0.93326856041571205f, + 0.93381843636221096f, + 0.9343661149437259f, + 0.93491159487151609f, + 0.93545487486201462f, + 0.9359959536368313f, + 0.9365348299227555f, + 0.93707150245175919f, + 0.93760596996099999f, + 0.93813823119282436f, + 0.93866828489477017f, + 0.9391961298195699f, + 0.93972176472515334f, + 0.94024518837465088f, + 0.94076639953639607f, + 0.94128539698392866f, + 0.94180217949599765f, + 0.94231674585656378f, + 0.94282909485480271f, + 0.94333922528510772f, + 0.94384713594709269f, + 0.94435282564559475f, + 0.94485629319067721f, + 0.94535753739763229f, + 0.94585655708698391f, + 0.94635335108449059f, + 0.946847918221148f, + 0.94734025733319194f, + 0.94783036726210101f, + 0.94831824685459909f, + 0.94880389496265838f, + 0.94928731044350201f, + 0.94976849215960668f, + 0.95024743897870523f, + 0.95072414977378961f, + 0.95119862342311323f, + 0.95167085881019386f, + 0.95214085482381583f, + 0.95260861035803324f, + 0.9530741243121722f, + 0.95353739559083328f, + 0.95399842310389449f, + 0.95445720576651349f, + 0.95491374249913052f, + 0.95536803222747024f, + 0.95582007388254542f, + 0.95626986640065814f, + 0.95671740872340305f, + 0.9571626997976701f, + 0.95760573857564624f, + 0.9580465240148186f, + 0.9584850550779761f, + 0.95892133073321306f, + 0.95935534995393079f, + 0.9597871117188399f, + 0.96021661501196343f, + 0.96064385882263847f, + 0.96106884214551935f, + 0.961491563980579f, + 0.9619120233331121f, + 0.9623302192137374f, + 0.96274615063839941f, + 0.96315981662837136f, + 0.96357121621025721f, + 0.96398034841599411f, + 0.96438721228285429f, + 0.9647918068534479f, + 0.96519413117572472f, + 0.96559418430297683f, + 0.96599196529384057f, + 0.96638747321229879f, + 0.96678070712768327f, + 0.96717166611467664f, + 0.96756034925331436f, + 0.9679467556289878f, + 0.9683308843324453f, + 0.96871273445979478f, + 0.9690923051125061f, + 0.96946959539741295f, + 0.96984460442671483f, + 0.97021733131797916f, + 0.97058777519414363f, + 0.97095593518351797f, + 0.97132181041978616f, + 0.97168540004200854f, + 0.9720467031946235f, + 0.97240571902744977f, + 0.97276244669568857f, + 0.97311688535992513f, + 0.97346903418613095f, + 0.9738188923456661f, + 0.97416645901528032f, + 0.97451173337711572f, + 0.97485471461870843f, + 0.97519540193299037f, + 0.97553379451829136f, + 0.97586989157834103f, + 0.97620369232227056f, + 0.97653519596461447f, + 0.97686440172531264f, + 0.97719130882971228f, + 0.97751591650856928f, + 0.97783822399805043f, + 0.97815823053973505f, + 0.97847593538061683f, + 0.97879133777310567f, + 0.97910443697502925f, + 0.97941523224963478f, + 0.97972372286559117f, + 0.98002990809698998f, + 0.98033378722334796f, + 0.98063535952960812f, + 0.98093462430614164f, + 0.98123158084874973f, + 0.98152622845866466f, + 0.9818185664425525f, + 0.98210859411251361f, + 0.98239631078608469f, + 0.98268171578624086f, + 0.98296480844139644f, + 0.98324558808540707f, + 0.98352405405757126f, + 0.98380020570263149f, + 0.98407404237077645f, + 0.9843455634176419f, + 0.9846147682043126f, + 0.9848816560973237f, + 0.98514622646866223f, + 0.98540847869576842f, + 0.98566841216153755f, + 0.98592602625432113f, + 0.98618132036792827f, + 0.98643429390162707f, + 0.98668494626014669f, + 0.98693327685367771f, + 0.98717928509787434f, + 0.98742297041385541f, + 0.98766433222820571f, + 0.98790336997297779f, + 0.98814008308569257f, + 0.98837447100934128f, + 0.98860653319238645f, + 0.98883626908876354f, + 0.98906367815788154f, + 0.98928875986462517f, + 0.98951151367935519f, + 0.98973193907791057f, + 0.98995003554160899f, + 0.9901658025572484f, + 0.99037923961710816f, + 0.99059034621895015f, + 0.99079912186602037f, + 0.99100556606704937f, + 0.99120967833625406f, + 0.99141145819333854f, + 0.99161090516349537f, + 0.99180801877740643f, + 0.99200279857124452f, + 0.99219524408667392f, + 0.99238535487085167f, + 0.99257313047642881f, + 0.99275857046155114f, + 0.99294167438986047f, + 0.99312244183049558f, + 0.99330087235809328f, + 0.99347696555278919f, + 0.99365072100021912f, + 0.99382213829151966f, + 0.99399121702332938f, + 0.99415795679778973f, + 0.99432235722254581f, + 0.9944844179107476f, + 0.99464413848105071f, + 0.99480151855761711f, + 0.99495655777011638f, + 0.99510925575372611f, + 0.99525961214913339f, + 0.9954076266025349f, + 0.99555329876563847f, + 0.99569662829566352f, + 0.99583761485534161f, + 0.99597625811291779f, + 0.99611255774215113f, + 0.99624651342231552f, + 0.99637812483820021f, + 0.99650739168011082f, + 0.9966343136438699f, + 0.996758890430818f, + 0.99688112174781385f, + 0.99700100730723529f, + 0.99711854682697998f, + 0.99723374003046616f, + 0.99734658664663323f, + 0.99745708640994191f, + 0.99756523906037575f, + 0.997671044343441f, + 0.99777450201016782f, + 0.99787561181711015f, + 0.99797437352634699f, + 0.99807078690548234f, + 0.99816485172764624f, + 0.99825656777149518f, + 0.99834593482121237f, + 0.99843295266650844f, + 0.99851762110262221f, + 0.99859993993032037f, + 0.99867990895589909f, + 0.99875752799118334f, + 0.99883279685352799f, + 0.99890571536581829f, + 0.99897628335646982f, + 0.99904450065942929f, + 0.99911036711417489f, + 0.99917388256571638f, + 0.99923504686459585f, + 0.99929385986688779f, + 0.99935032143419944f, + 0.9994044314336713f, + 0.99945618973797734f, + 0.99950559622532531f, + 0.99955265077945699f, + 0.99959735328964838f, + 0.9996397036507102f, + 0.99967970176298793f, + 0.99971734753236219f, + 0.99975264087024884f, + 0.99978558169359921f, + 0.99981616992490041f, + 0.99984440549217524f, + 0.99987028832898295f, + 0.99989381837441849f, + 0.99991499557311347f, + 0.999933819875236f, + 0.99995029123649048f, + 0.99996440961811828f, + 0.99997617498689761f, + 0.9999855873151432f, + 0.99999264658070719f, + 0.99999735276697821f, + 0.99999970586288223f + }; + float[] SINE_128 = { + 0.0061358846491544753f, + 0.01840672990580482f, + 0.030674803176636626f, + 0.04293825693494082f, + 0.055195244349689934f, + 0.067443919563664051f, + 0.079682437971430126f, + 0.091908956497132724f, + 0.10412163387205459f, + 0.11631863091190475f, + 0.12849811079379317f, + 0.14065823933284921f, + 0.15279718525844344f, + 0.16491312048996989f, + 0.17700422041214875f, + 0.18906866414980619f, + 0.2011046348420919f, + 0.21311031991609136f, + 0.22508391135979283f, + 0.2370236059943672f, + 0.24892760574572015f, + 0.26079411791527551f, + 0.27262135544994898f, + 0.28440753721127188f, + 0.29615088824362379f, + 0.30784964004153487f, + 0.31950203081601569f, + 0.33110630575987643f, + 0.34266071731199438f, + 0.35416352542049034f, + 0.36561299780477385f, + 0.37700741021641826f, + 0.38834504669882625f, + 0.39962419984564679f, + 0.41084317105790391f, + 0.42200027079979968f, + 0.43309381885315196f, + 0.4441221445704292f, + 0.45508358712634384f, + 0.46597649576796618f, + 0.47679923006332209f, + 0.487550160148436f, + 0.49822766697278187f, + 0.50883014254310699f, + 0.51935599016558964f, + 0.52980362468629461f, + 0.54017147272989285f, + 0.55045797293660481f, + 0.56066157619733603f, + 0.57078074588696726f, + 0.58081395809576453f, + 0.59075970185887416f, + 0.60061647938386897f, + 0.61038280627630948f, + 0.6200572117632891f, + 0.62963823891492698f, + 0.63912444486377573f, + 0.64851440102211244f, + 0.65780669329707864f, + 0.66699992230363747f, + 0.67609270357531592f, + 0.68508366777270036f, + 0.693971460889654f, + 0.7027547444572253f, + 0.71143219574521643f, + 0.72000250796138165f, + 0.7284643904482252f, + 0.73681656887736979f, + 0.74505778544146595f, + 0.75318679904361241f, + 0.76120238548426178f, + 0.76910333764557959f, + 0.77688846567323244f, + 0.78455659715557524f, + 0.79210657730021239f, + 0.79953726910790501f, + 0.80684755354379922f, + 0.8140363297059483f, + 0.82110251499110465f, + 0.8280450452577558f, + 0.83486287498638001f, + 0.84155497743689833f, + 0.84812034480329712f, + 0.85455798836540053f, + 0.86086693863776731f, + 0.86704624551569265f, + 0.87309497841829009f, + 0.87901222642863341f, + 0.88479709843093779f, + 0.89044872324475788f, + 0.89596624975618511f, + 0.90134884704602203f, + 0.90659570451491533f, + 0.91170603200542988f, + 0.9166790599210427f, + 0.9215140393420419f, + 0.92621024213831127f, + 0.93076696107898371f, + 0.9351835099389475f, + 0.93945922360218992f, + 0.94359345816196039f, + 0.94758559101774109f, + 0.95143502096900834f, + 0.95514116830577067f, + 0.9587034748958716f, + 0.96212140426904158f, + 0.9653944416976894f, + 0.96852209427441727f, + 0.97150389098625178f, + 0.97433938278557586f, + 0.97702814265775439f, + 0.97956976568544052f, + 0.98196386910955524f, + 0.98421009238692903f, + 0.98630809724459867f, + 0.98825756773074946f, + 0.99005821026229712f, + 0.99170975366909953f, + 0.9932119492347945f, + 0.99456457073425542f, + 0.99576741446765982f, + 0.99682029929116567f, + 0.99772306664419164f, + 0.99847558057329477f, + 0.99907772775264536f, + 0.99952941750109314f, + 0.9998305817958234f, + 0.99998117528260111f + }; + float[] SINE_960 = { + 0.00081812299560725323f, + 0.0024543667964602917f, + 0.0040906040262347889f, + 0.0057268303042312674f, + 0.0073630412497795667f, + 0.0089992324822505774f, + 0.010635399621067975f, + 0.012271538285719924f, + 0.013907644095770845f, + 0.015543712670873098f, + 0.017179739630778748f, + 0.018815720595351273f, + 0.020451651184577292f, + 0.022087527018578291f, + 0.023723343717622358f, + 0.025359096902135895f, + 0.02699478219271537f, + 0.028630395210139003f, + 0.030265931575378519f, + 0.031901386909610863f, + 0.033536756834229922f, + 0.035172036970858266f, + 0.036807222941358832f, + 0.038442310367846677f, + 0.040077294872700696f, + 0.041712172078575326f, + 0.043346937608412288f, + 0.044981587085452281f, + 0.046616116133246711f, + 0.048250520375669431f, + 0.049884795436928406f, + 0.051518936941577477f, + 0.053152940514528055f, + 0.05478680178106083f, + 0.056420516366837495f, + 0.05805407989791244f, + 0.059687488000744485f, + 0.061320736302208578f, + 0.062953820429607482f, + 0.064586736010683557f, + 0.066219478673630344f, + 0.06785204404710439f, + 0.069484427760236861f, + 0.071116625442645326f, + 0.072748632724445372f, + 0.07438044523626236f, + 0.076012058609243122f, + 0.077643468475067631f, + 0.079274670465960706f, + 0.080905660214703745f, + 0.082536433354646319f, + 0.084166985519717977f, + 0.085797312344439894f, + 0.08742740946393647f, + 0.089057272513947183f, + 0.090686897130838162f, + 0.092316278951613845f, + 0.093945413613928788f, + 0.095574296756099186f, + 0.097202924017114667f, + 0.098831291036649963f, + 0.10045939345507648f, + 0.10208722691347409f, + 0.10371478705364276f, + 0.10534206951811415f, + 0.10696906995016341f, + 0.10859578399382072f, + 0.11022220729388306f, + 0.11184833549592579f, + 0.11347416424631435f, + 0.11509968919221586f, + 0.11672490598161089f, + 0.11834981026330495f, + 0.11997439768694031f, + 0.12159866390300751f, + 0.12322260456285709f, + 0.12484621531871121f, + 0.12646949182367517f, + 0.12809242973174936f, + 0.12971502469784052f, + 0.13133727237777362f, + 0.13295916842830346f, + 0.13458070850712617f, + 0.13620188827289101f, + 0.1378227033852118f, + 0.13944314950467873f, + 0.14106322229286994f, + 0.14268291741236291f, + 0.14430223052674654f, + 0.1459211573006321f, + 0.14753969339966552f, + 0.14915783449053857f, + 0.15077557624100058f, + 0.15239291431987001f, + 0.1540098443970461f, + 0.15562636214352044f, + 0.15724246323138855f, + 0.15885814333386142f, + 0.16047339812527725f, + 0.16208822328111283f, + 0.16370261447799525f, + 0.16531656739371339f, + 0.16693007770722967f, + 0.16854314109869134f, + 0.17015575324944232f, + 0.17176790984203447f, + 0.17337960656023954f, + 0.1749908390890603f, + 0.17660160311474243f, + 0.17821189432478593f, + 0.17982170840795647f, + 0.18143104105429744f, + 0.18303988795514095f, + 0.1846482448031197f, + 0.18625610729217834f, + 0.1878634711175852f, + 0.18947033197594348f, + 0.19107668556520319f, + 0.19268252758467228f, + 0.19428785373502844f, + 0.19589265971833042f, + 0.19749694123802966f, + 0.19910069399898173f, + 0.20070391370745785f, + 0.20230659607115639f, + 0.20390873679921437f, + 0.20551033160221882f, + 0.20711137619221856f, + 0.2087118662827353f, + 0.21031179758877552f, + 0.21191116582684155f, + 0.21350996671494335f, + 0.21510819597260972f, + 0.21670584932089998f, + 0.2183029224824154f, + 0.21989941118131037f, + 0.22149531114330431f, + 0.22309061809569264f, + 0.22468532776735861f, + 0.22627943588878449f, + 0.22787293819206314f, + 0.22946583041090929f, + 0.23105810828067114f, + 0.23264976753834157f, + 0.23424080392256985f, + 0.2358312131736727f, + 0.23742099103364595f, + 0.23901013324617584f, + 0.24059863555665045f, + 0.24218649371217096f, + 0.24377370346156332f, + 0.24536026055538934f, + 0.24694616074595824f, + 0.24853139978733788f, + 0.25011597343536629f, + 0.25169987744766298f, + 0.25328310758364025f, + 0.25486565960451457f, + 0.25644752927331788f, + 0.25802871235490898f, + 0.25960920461598508f, + 0.26118900182509258f, + 0.26276809975263904f, + 0.264346494170904f, + 0.26592418085405067f, + 0.26750115557813692f, + 0.2690774141211269f, + 0.27065295226290209f, + 0.2722277657852728f, + 0.27380185047198918f, + 0.27537520210875299f, + 0.2769478164832283f, + 0.27851968938505312f, + 0.28009081660585067f, + 0.28166119393924061f, + 0.28323081718085019f, + 0.28479968212832563f, + 0.28636778458134327f, + 0.28793512034162105f, + 0.2895016852129294f, + 0.29106747500110264f, + 0.29263248551405047f, + 0.2941967125617686f, + 0.29576015195635058f, + 0.29732279951199847f, + 0.29888465104503475f, + 0.30044570237391266f, + 0.30200594931922808f, + 0.30356538770373032f, + 0.30512401335233358f, + 0.30668182209212791f, + 0.3082388097523906f, + 0.30979497216459695f, + 0.31135030516243201f, + 0.3129048045818012f, + 0.31445846626084178f, + 0.31601128603993378f, + 0.31756325976171151f, + 0.31911438327107416f, + 0.32066465241519732f, + 0.32221406304354389f, + 0.3237626110078754f, + 0.32531029216226293f, + 0.32685710236309828f, + 0.32840303746910487f, + 0.32994809334134939f, + 0.3314922658432522f, + 0.33303555084059877f, + 0.33457794420155085f, + 0.33611944179665709f, + 0.33766003949886464f, + 0.33919973318352969f, + 0.34073851872842903f, + 0.34227639201377064f, + 0.34381334892220483f, + 0.34534938533883547f, + 0.34688449715123082f, + 0.34841868024943456f, + 0.34995193052597684f, + 0.35148424387588523f, + 0.3530156161966958f, + 0.35454604338846402f, + 0.35607552135377557f, + 0.35760404599775775f, + 0.35913161322809023f, + 0.36065821895501554f, + 0.36218385909135092f, + 0.36370852955249849f, + 0.36523222625645668f, + 0.36675494512383078f, + 0.36827668207784414f, + 0.36979743304434909f, + 0.37131719395183754f, + 0.37283596073145214f, + 0.37435372931699717f, + 0.37587049564494951f, + 0.37738625565446909f, + 0.37890100528741022f, + 0.38041474048833229f, + 0.38192745720451066f, + 0.38343915138594736f, + 0.38494981898538222f, + 0.38645945595830333f, + 0.38796805826295838f, + 0.38947562186036483f, + 0.39098214271432141f, + 0.39248761679141814f, + 0.3939920400610481f, + 0.39549540849541737f, + 0.39699771806955625f, + 0.39849896476132979f, + 0.39999914455144892f, + 0.40149825342348083f, + 0.4029962873638599f, + 0.40449324236189854f, + 0.40598911440979762f, + 0.40748389950265762f, + 0.40897759363848879f, + 0.41047019281822261f, + 0.41196169304572178f, + 0.4134520903277914f, + 0.41494138067418929f, + 0.41642956009763715f, + 0.41791662461383078f, + 0.41940257024145089f, + 0.42088739300217382f, + 0.42237108892068231f, + 0.42385365402467584f, + 0.42533508434488143f, + 0.42681537591506419f, + 0.42829452477203828f, + 0.42977252695567697f, + 0.43124937850892364f, + 0.4327250754778022f, + 0.43419961391142781f, + 0.43567298986201736f, + 0.43714519938489987f, + 0.43861623853852766f, + 0.44008610338448595f, + 0.44155478998750436f, + 0.44302229441546676f, + 0.4444886127394222f, + 0.44595374103359531f, + 0.44741767537539667f, + 0.44888041184543348f, + 0.45034194652752002f, + 0.45180227550868812f, + 0.45326139487919759f, + 0.45471930073254679f, + 0.45617598916548296f, + 0.45763145627801283f, + 0.45908569817341294f, + 0.46053871095824001f, + 0.46199049074234161f, + 0.46344103363886635f, + 0.46489033576427435f, + 0.46633839323834758f, + 0.46778520218420055f, + 0.46923075872829029f, + 0.47067505900042683f, + 0.47211809913378361f, + 0.47355987526490806f, + 0.47500038353373153f, + 0.47643962008357982f, + 0.47787758106118372f, + 0.47931426261668875f, + 0.48074966090366611f, + 0.48218377207912272f, + 0.48361659230351117f, + 0.48504811774074069f, + 0.48647834455818684f, + 0.48790726892670194f, + 0.48933488702062544f, + 0.49076119501779414f, + 0.49218618909955225f, + 0.4936098654507618f, + 0.49503222025981269f, + 0.49645324971863303f, + 0.49787295002269943f, + 0.49929131737104687f, + 0.50070834796627917f, + 0.50212403801457872f, + 0.50353838372571758f, + 0.50495138131306638f, + 0.50636302699360547f, + 0.50777331698793449f, + 0.50918224752028263f, + 0.51058981481851906f, + 0.51199601511416237f, + 0.51340084464239111f, + 0.51480429964205421f, + 0.51620637635567967f, + 0.51760707102948678f, + 0.51900637991339404f, + 0.5204042992610306f, + 0.52180082532974559f, + 0.5231959543806185f, + 0.52458968267846895f, + 0.52598200649186677f, + 0.52737292209314235f, + 0.52876242575839572f, + 0.53015051376750777f, + 0.53153718240414882f, + 0.53292242795578992f, + 0.53430624671371152f, + 0.53568863497301467f, + 0.5370695890326298f, + 0.5384491051953274f, + 0.53982717976772743f, + 0.54120380906030963f, + 0.54257898938742311f, + 0.54395271706729609f, + 0.54532498842204646f, + 0.54669579977769045f, + 0.54806514746415402f, + 0.54943302781528081f, + 0.55079943716884383f, + 0.55216437186655387f, + 0.55352782825406999f, + 0.55488980268100907f, + 0.55625029150095584f, + 0.55760929107147217f, + 0.55896679775410718f, + 0.56032280791440714f, + 0.56167731792192455f, + 0.56303032415022869f, + 0.56438182297691453f, + 0.56573181078361312f, + 0.56708028395600085f, + 0.56842723888380908f, + 0.56977267196083425f, + 0.57111657958494688f, + 0.5724589581581021f, + 0.57379980408634845f, + 0.57513911377983773f, + 0.57647688365283478f, + 0.57781311012372738f, + 0.57914778961503466f, + 0.58048091855341843f, + 0.5818124933696911f, + 0.58314251049882604f, + 0.58447096637996743f, + 0.58579785745643886f, + 0.5871231801757536f, + 0.58844693098962408f, + 0.58976910635397084f, + 0.59108970272893235f, + 0.59240871657887517f, + 0.59372614437240179f, + 0.59504198258236196f, + 0.5963562276858605f, + 0.59766887616426767f, + 0.5989799245032289f, + 0.60028936919267273f, + 0.60159720672682204f, + 0.60290343360420195f, + 0.60420804632765002f, + 0.60551104140432543f, + 0.60681241534571839f, + 0.60811216466765883f, + 0.60941028589032709f, + 0.61070677553826169f, + 0.61200163014036979f, + 0.61329484622993602f, + 0.6145864203446314f, + 0.61587634902652377f, + 0.61716462882208556f, + 0.61845125628220421f, + 0.61973622796219074f, + 0.6210195404217892f, + 0.62230119022518593f, + 0.62358117394101897f, + 0.62485948814238634f, + 0.62613612940685637f, + 0.62741109431647646f, + 0.62868437945778133f, + 0.62995598142180387f, + 0.6312258968040827f, + 0.63249412220467238f, + 0.63376065422815175f, + 0.63502548948363347f, + 0.63628862458477287f, + 0.63755005614977711f, + 0.63880978080141437f, + 0.6400677951670225f, + 0.6413240958785188f, + 0.64257867957240766f, + 0.6438315428897915f, + 0.64508268247637779f, + 0.64633209498248945f, + 0.64757977706307335f, + 0.64882572537770888f, + 0.65006993659061751f, + 0.65131240737067142f, + 0.65255313439140239f, + 0.65379211433101081f, + 0.65502934387237444f, + 0.6562648197030575f, + 0.65749853851531959f, + 0.65873049700612374f, + 0.65996069187714679f, + 0.66118911983478657f, + 0.66241577759017178f, + 0.66364066185917048f, + 0.66486376936239888f, + 0.66608509682523009f, + 0.66730464097780284f, + 0.66852239855503071f, + 0.66973836629660977f, + 0.67095254094702894f, + 0.67216491925557675f, + 0.67337549797635199f, + 0.67458427386827102f, + 0.67579124369507693f, + 0.67699640422534846f, + 0.67819975223250772f, + 0.6794012844948305f, + 0.68060099779545302f, + 0.68179888892238183f, + 0.6829949546685018f, + 0.68418919183158522f, + 0.68538159721429948f, + 0.6865721676242168f, + 0.68776089987382172f, + 0.68894779078052026f, + 0.69013283716664853f, + 0.69131603585948032f, + 0.69249738369123692f, + 0.69367687749909468f, + 0.69485451412519361f, + 0.69603029041664599f, + 0.6972042032255451f, + 0.6983762494089728f, + 0.69954642582900894f, + 0.70071472935273893f, + 0.70188115685226271f, + 0.703045705204703f, + 0.70420837129221303f, + 0.70536915200198613f, + 0.70652804422626281f, + 0.70768504486233985f, + 0.70884015081257845f, + 0.70999335898441229f, + 0.711144666290356f, + 0.71229406964801356f, + 0.71344156598008623f, + 0.71458715221438096f, + 0.71573082528381871f, + 0.71687258212644234f, + 0.7180124196854254f, + 0.71915033490907943f, + 0.72028632475086318f, + 0.72142038616938997f, + 0.72255251612843596f, + 0.72368271159694852f, + 0.72481096954905444f, + 0.72593728696406756f, + 0.72706166082649704f, + 0.72818408812605595f, + 0.72930456585766834f, + 0.73042309102147851f, + 0.73153966062285747f, + 0.73265427167241282f, + 0.73376692118599507f, + 0.73487760618470677f, + 0.73598632369490979f, + 0.73709307074823405f, + 0.73819784438158409f, + 0.73930064163714881f, + 0.74040145956240788f, + 0.74150029521014049f, + 0.74259714563843304f, + 0.74369200791068657f, + 0.74478487909562552f, + 0.74587575626730485f, + 0.74696463650511791f, + 0.74805151689380456f, + 0.74913639452345926f, + 0.75021926648953785f, + 0.75130012989286621f, + 0.7523789818396478f, + 0.75345581944147111f, + 0.75453063981531809f, + 0.75560344008357094f, + 0.75667421737402052f, + 0.7577429688198738f, + 0.75880969155976163f, + 0.75987438273774599f, + 0.76093703950332836f, + 0.76199765901145666f, + 0.76305623842253345f, + 0.76411277490242291f, + 0.76516726562245885f, + 0.76621970775945258f, + 0.76727009849569949f, + 0.76831843501898767f, + 0.76936471452260458f, + 0.77040893420534517f, + 0.77145109127151923f, + 0.77249118293095853f, + 0.77352920639902467f, + 0.77456515889661659f, + 0.77559903765017746f, + 0.7766308398917029f, + 0.77766056285874774f, + 0.77868820379443371f, + 0.77971375994745684f, + 0.78073722857209438f, + 0.7817586069282132f, + 0.78277789228127592f, + 0.78379508190234881f, + 0.78481017306810918f, + 0.78582316306085265f, + 0.78683404916849986f, + 0.78784282868460476f, + 0.78884949890836087f, + 0.78985405714460888f, + 0.7908565007038445f, + 0.79185682690222425f, + 0.79285503306157412f, + 0.79385111650939566f, + 0.79484507457887377f, + 0.79583690460888357f, + 0.79682660394399751f, + 0.79781416993449272f, + 0.79879959993635785f, + 0.7997828913113002f, + 0.80076404142675273f, + 0.80174304765588156f, + 0.80271990737759213f, + 0.80369461797653707f, + 0.80466717684312306f, + 0.80563758137351682f, + 0.80660582896965372f, + 0.80757191703924336f, + 0.80853584299577752f, + 0.80949760425853612f, + 0.81045719825259477f, + 0.81141462240883167f, + 0.81236987416393436f, + 0.81332295096040608f, + 0.81427385024657373f, + 0.81522256947659355f, + 0.81616910611045879f, + 0.817113457614006f, + 0.81805562145892186f, + 0.81899559512275044f, + 0.81993337608889916f, + 0.82086896184664637f, + 0.8218023498911472f, + 0.82273353772344116f, + 0.82366252285045805f, + 0.82458930278502529f, + 0.82551387504587381f, + 0.82643623715764558f, + 0.82735638665089983f, + 0.82827432106211907f, + 0.82919003793371693f, + 0.83010353481404364f, + 0.83101480925739324f, + 0.83192385882400965f, + 0.83283068108009373f, + 0.8337352735978093f, + 0.83463763395529011f, + 0.83553775973664579f, + 0.83643564853196872f, + 0.83733129793734051f, + 0.83822470555483797f, + 0.83911586899254031f, + 0.84000478586453453f, + 0.84089145379092289f, + 0.84177587039782842f, + 0.84265803331740163f, + 0.84353794018782702f, + 0.844415588653329f, + 0.8452909763641786f, + 0.84616410097669936f, + 0.84703496015327406f, + 0.84790355156235053f, + 0.84876987287844818f, + 0.8496339217821639f, + 0.85049569596017938f, + 0.85135519310526508f, + 0.85221241091628896f, + 0.85306734709822085f, + 0.85391999936213903f, + 0.85477036542523732f, + 0.85561844301082923f, + 0.85646422984835635f, + 0.85730772367339259f, + 0.85814892222765116f, + 0.85898782325899026f, + 0.85982442452141961f, + 0.86065872377510555f, + 0.86149071878637817f, + 0.8623204073277364f, + 0.86314778717785412f, + 0.8639728561215867f, + 0.86479561194997623f, + 0.86561605246025763f, + 0.86643417545586487f, + 0.8672499787464365f, + 0.86806346014782154f, + 0.8688746174820855f, + 0.86968344857751589f, + 0.87048995126862883f, + 0.87129412339617363f, + 0.87209596280713941f, + 0.8728954673547612f, + 0.87369263489852422f, + 0.87448746330417149f, + 0.87527995044370765f, + 0.8760700941954066f, + 0.87685789244381551f, + 0.87764334307976144f, + 0.87842644400035663f, + 0.8792071931090043f, + 0.87998558831540408f, + 0.88076162753555787f, + 0.88153530869177488f, + 0.88230662971267804f, + 0.88307558853320878f, + 0.88384218309463292f, + 0.8846064113445461f, + 0.88536827123687933f, + 0.88612776073190425f, + 0.88688487779623937f, + 0.88763962040285393f, + 0.8883919865310751f, + 0.88914197416659235f, + 0.88988958130146301f, + 0.8906348059341177f, + 0.89137764606936609f, + 0.89211809971840139f, + 0.89285616489880615f, + 0.89359183963455813f, + 0.89432512195603453f, + 0.89505600990001799f, + 0.89578450150970124f, + 0.8965105948346932f, + 0.89723428793102367f, + 0.89795557886114807f, + 0.89867446569395382f, + 0.89939094650476448f, + 0.90010501937534515f, + 0.900816682393908f, + 0.90152593365511691f, + 0.90223277126009283f, + 0.90293719331641886f, + 0.90363919793814496f, + 0.90433878324579353f, + 0.90503594736636439f, + 0.90573068843333915f, + 0.90642300458668679f, + 0.90711289397286898f, + 0.90780035474484411f, + 0.90848538506207266f, + 0.90916798309052227f, + 0.90984814700267291f, + 0.9105258749775208f, + 0.91120116520058425f, + 0.91187401586390815f, + 0.91254442516606893f, + 0.9132123913121788f, + 0.91387791251389161f, + 0.91454098698940678f, + 0.91520161296347435f, + 0.91585978866739981f, + 0.91651551233904871f, + 0.91716878222285148f, + 0.91781959656980805f, + 0.91846795363749245f, + 0.91911385169005766f, + 0.9197572889982405f, + 0.9203982638393654f, + 0.92103677449734989f, + 0.92167281926270861f, + 0.92230639643255874f, + 0.92293750431062316f, + 0.92356614120723612f, + 0.92419230543934783f, + 0.92481599533052783f, + 0.92543720921097061f, + 0.92605594541749991f, + 0.92667220229357261f, + 0.92728597818928349f, + 0.9278972714613698f, + 0.92850608047321548f, + 0.9291124035948557f, + 0.92971623920298097f, + 0.93031758568094147f, + 0.93091644141875196f, + 0.93151280481309506f, + 0.93210667426732674f, + 0.93269804819147983f, + 0.93328692500226818f, + 0.93387330312309147f, + 0.93445718098403896f, + 0.93503855702189376f, + 0.9356174296801375f, + 0.93619379740895381f, + 0.93676765866523259f, + 0.93733901191257496f, + 0.93790785562129597f, + 0.93847418826842988f, + 0.93903800833773399f, + 0.93959931431969212f, + 0.94015810471151917f, + 0.94071437801716529f, + 0.94126813274731924f, + 0.94181936741941319f, + 0.94236808055762578f, + 0.94291427069288691f, + 0.94345793636288133f, + 0.94399907611205225f, + 0.9445376884916058f, + 0.94507377205951448f, + 0.94560732538052128f, + 0.94613834702614352f, + 0.94666683557467624f, + 0.94719278961119657f, + 0.94771620772756759f, + 0.94823708852244104f, + 0.94875543060126255f, + 0.94927123257627433f, + 0.94978449306651924f, + 0.95029521069784428f, + 0.9508033841029051f, + 0.95130901192116835f, + 0.9518120927989161f, + 0.95231262538924943f, + 0.95281060835209208f, + 0.95330604035419386f, + 0.95379892006913403f, + 0.95428924617732525f, + 0.95477701736601728f, + 0.95526223232929941f, + 0.95574488976810545f, + 0.95622498839021619f, + 0.95670252691026292f, + 0.95717750404973156f, + 0.95764991853696524f, + 0.95811976910716812f, + 0.95858705450240911f, + 0.95905177347162429f, + 0.95951392477062125f, + 0.95997350716208196f, + 0.96043051941556579f, + 0.96088496030751369f, + 0.96133682862125036f, + 0.96178612314698864f, + 0.96223284268183173f, + 0.9626769860297768f, + 0.96311855200171881f, + 0.96355753941545252f, + 0.96399394709567654f, + 0.96442777387399625f, + 0.96485901858892686f, + 0.96528768008589627f, + 0.96571375721724895f, + 0.96613724884224783f, + 0.96655815382707866f, + 0.96697647104485207f, + 0.96739219937560694f, + 0.96780533770631338f, + 0.96821588493087585f, + 0.9686238399501359f, + 0.96902920167187501f, + 0.96943196901081796f, + 0.96983214088863534f, + 0.9702297162339466f, + 0.97062469398232287f, + 0.97101707307629004f, + 0.97140685246533098f, + 0.97179403110588902f, + 0.97217860796137046f, + 0.97256058200214734f, + 0.97293995220556007f, + 0.97331671755592064f, + 0.97369087704451474f, + 0.97406242966960455f, + 0.97443137443643235f, + 0.97479771035722163f, + 0.97516143645118103f, + 0.97552255174450631f, + 0.97588105527038305f, + 0.97623694606898959f, + 0.97659022318749911f, + 0.97694088568008242f, + 0.97728893260791039f, + 0.97763436303915685f, + 0.97797717604900047f, + 0.97831737071962765f, + 0.97865494614023485f, + 0.97898990140703124f, + 0.97932223562324061f, + 0.97965194789910426f, + 0.9799790373518833f, + 0.98030350310586067f, + 0.98062534429234405f, + 0.98094456004966768f, + 0.98126114952319499f, + 0.98157511186532054f, + 0.98188644623547261f, + 0.98219515180011563f, + 0.98250122773275184f, + 0.98280467321392362f, + 0.98310548743121629f, + 0.98340366957925973f, + 0.98369921885973044f, + 0.98399213448135414f, + 0.98428241565990748f, + 0.98457006161822058f, + 0.98485507158617835f, + 0.98513744480072363f, + 0.98541718050585803f, + 0.98569427795264519f, + 0.98596873639921168f, + 0.98624055511074971f, + 0.98650973335951875f, + 0.98677627042484772f, + 0.98704016559313645f, + 0.98730141815785832f, + 0.98756002741956173f, + 0.9878159926858715f, + 0.98806931327149194f, + 0.98831998849820735f, + 0.98856801769488489f, + 0.98881340019747566f, + 0.98905613534901682f, + 0.98929622249963345f, + 0.98953366100653983f, + 0.98976845023404181f, + 0.99000058955353776f, + 0.99023007834352106f, + 0.99045691598958097f, + 0.99068110188440506f, + 0.99090263542778001f, + 0.99112151602659404f, + 0.99133774309483769f, + 0.99155131605360625f, + 0.99176223433110056f, + 0.99197049736262888f, + 0.99217610459060845f, + 0.99237905546456673f, + 0.99257934944114334f, + 0.99277698598409092f, + 0.99297196456427694f, + 0.99316428465968509f, + 0.99335394575541669f, + 0.99354094734369169f, + 0.99372528892385081f, + 0.99390697000235606f, + 0.99408599009279242f, + 0.99426234871586938f, + 0.99443604539942176f, + 0.99460707967841133f, + 0.99477545109492771f, + 0.99494115919819004f, + 0.99510420354454787f, + 0.99526458369748239f, + 0.99542229922760772f, + 0.99557734971267187f, + 0.9957297347375581f, + 0.99587945389428578f, + 0.99602650678201154f, + 0.99617089300703077f, + 0.996312612182778f, + 0.99645166392982831f, + 0.99658804787589839f, + 0.99672176365584741f, + 0.99685281091167788f, + 0.99698118929253687f, + 0.99710689845471678f, + 0.99722993806165661f, + 0.99735030778394196f, + 0.99746800729930707f, + 0.99758303629263489f, + 0.99769539445595812f, + 0.99780508148846014f, + 0.99791209709647588f, + 0.99801644099349218f, + 0.99811811290014918f, + 0.9982171125442405f, + 0.9983134396607144f, + 0.99840709399167404f, + 0.99849807528637868f, + 0.99858638330124405f, + 0.99867201779984294f, + 0.99875497855290607f, + 0.99883526533832245f, + 0.99891287794114036f, + 0.99898781615356746f, + 0.99906007977497147f, + 0.99912966861188113f, + 0.99919658247798593f, + 0.99926082119413751f, + 0.99932238458834954f, + 0.999381272495798f, + 0.99943748475882255f, + 0.9994910212269259f, + 0.99954188175677483f, + 0.99959006621220048f, + 0.99963557446419837f, + 0.99967840639092931f, + 0.99971856187771946f, + 0.99975604081706027f, + 0.99979084310860955f, + 0.99982296865919107f, + 0.99985241738279484f, + 0.99987918920057806f, + 0.99990328404086426f, + 0.9999247018391445f, + 0.99994344253807688f, + 0.99995950608748674f, + 0.99997289244436727f, + 0.99998360157287902f, + 0.9999916334443506f, + 0.99999698803727821f, + 0.99999966533732598f + }; + float[] SINE_120 = { + 0.0065449379673518581f, + 0.019633692460628301f, + 0.032719082821776137f, + 0.045798866936520771f, + 0.058870803651189033f, + 0.071932653156719387f, + 0.084982177372441667f, + 0.09801714032956059f, + 0.11103530855427769f, + 0.12403445145048532f, + 0.13701234168196802f, + 0.14996675555404498f, + 0.16289547339458874f, + 0.17579627993435451f, + 0.18866696468655525f, + 0.2015053223256171f, + 0.21430915306505074f, + 0.2270762630343732f, + 0.23980446465501654f, + 0.25249157701515795f, + 0.26513542624340797f, + 0.27773384588129219f, + 0.29028467725446233f, + 0.3027857698425746f, + 0.31523498164776964f, + 0.32763017956169349f, + 0.33996923973099424f, + 0.35225004792123354f, + 0.36447049987914965f, + 0.37662850169321077f, + 0.38872197015239557f, + 0.40074883310314097f, + 0.41270702980439467f, + 0.42459451128071307f, + 0.43640924067334208f, + 0.44814919358922256f, + 0.45981235844785984f, + 0.47139673682599764f, + 0.48290034380003727f, + 0.49432120828614462f, + 0.50565737337798455f, + 0.51690689668202761f, + 0.52806785065036799f, + 0.53913832291100017f, + 0.55011641659549337f, + 0.56100025066400983f, + 0.57178796022761225f, + 0.58247769686780215f, + 0.59306762895323706f, + 0.60355594195357143f, + 0.61394083875036642f, + 0.62422053994501758f, + 0.63439328416364549f, + 0.64445732835889735f, + 0.65441094810861034f, + 0.66425243791128175f, + 0.67398011147829784f, + 0.68359230202287125f, + 0.69308736254563585f, + 0.70246366611685174f, + 0.71171960615517138f, + 0.72085359670291882f, + 0.7298640726978356f, + 0.73874949024124625f, + 0.74750832686259672f, + 0.75613908178032285f, + 0.76464027615900032f, + 0.77301045336273699f, + 0.78124817920475853f, + 0.78935204219315003f, + 0.79732065377270711f, + 0.80515264856285829f, + 0.81284668459161513f, + 0.82040144352551359f, + 0.82781563089550203f, + 0.83508797631874299f, + 0.84221723371628654f, + 0.84920218152657889f, + 0.85604162291477137f, + 0.86273438597779184f, + 0.86927932394514362f, + 0.87567531537539967f, + 0.88192126434835494f, + 0.88801610065280734f, + 0.89395877996993212f, + 0.8997482840522214f, + 0.90538362089795521f, + 0.91086382492117568f, + 0.91618795711713596f, + 0.92135510522319242f, + 0.9263643838751181f, + 0.93121493475880346f, + 0.93590592675732565f, + 0.94043655609335486f, + 0.94480604646687805f, + 0.94901364918821385f, + 0.95305864330629697f, + 0.95694033573220882f, + 0.9606580613579353f, + 0.96421118317032928f, + 0.96759909236025976f, + 0.9708212084269281f, + 0.97387697927733363f, + 0.97676588132087239f, + 0.97948741955905139f, + 0.98204112767030394f, + 0.98442656808989171f, + 0.98664333208487898f, + 0.98869103982416728f, + 0.99056934044357725f, + 0.99227791210596705f, + 0.99381646205637808f, + 0.99518472667219682f, + 0.99638247150832537f, + 0.99740949133735191f, + 0.99826561018471593f, + 0.99895068135886012f, + 0.99946458747636568f, + 0.99980724048206482f, + 0.99997858166412923f + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/gain/FFT.java b/src/main/java/net/sourceforge/jaad/aac/gain/FFT.java index 210a89de..83efa5d6 100644 --- a/src/main/java/net/sourceforge/jaad/aac/gain/FFT.java +++ b/src/main/java/net/sourceforge/jaad/aac/gain/FFT.java @@ -3,132 +3,129 @@ //complex FFT of length 128/16, inplace class FFT { - private static final float[][] FFT_TABLE_128 = { - {1.0f, -0.0f}, - {0.99879545f, -0.049067676f}, - {0.9951847f, -0.09801714f}, - {0.9891765f, -0.14673047f}, - {0.98078525f, -0.19509032f}, - {0.97003126f, -0.24298018f}, - {0.95694035f, -0.29028466f}, - {0.94154406f, -0.33688986f}, - {0.9238795f, -0.38268343f}, - {0.9039893f, -0.42755508f}, - {0.8819213f, -0.47139674f}, - {0.8577286f, -0.51410276f}, - {0.8314696f, -0.55557024f}, - {0.8032075f, -0.5956993f}, - {0.77301043f, -0.6343933f}, - {0.7409511f, -0.671559f}, - {0.70710677f, -0.70710677f}, - {0.671559f, -0.7409511f}, - {0.6343933f, -0.77301043f}, - {0.5956993f, -0.8032075f}, - {0.55557024f, -0.8314696f}, - {0.51410276f, -0.8577286f}, - {0.47139674f, -0.8819213f}, - {0.42755508f, -0.9039893f}, - {0.38268343f, -0.9238795f}, - {0.33688986f, -0.94154406f}, - {0.29028466f, -0.95694035f}, - {0.24298018f, -0.97003126f}, - {0.19509032f, -0.98078525f}, - {0.14673047f, -0.9891765f}, - {0.09801714f, -0.9951847f}, - {0.049067676f, -0.99879545f}, - {6.123234E-17f, -1.0f}, - {-0.049067676f, -0.99879545f}, - {-0.09801714f, -0.9951847f}, - {-0.14673047f, -0.9891765f}, - {-0.19509032f, -0.98078525f}, - {-0.24298018f, -0.97003126f}, - {-0.29028466f, -0.95694035f}, - {-0.33688986f, -0.94154406f}, - {-0.38268343f, -0.9238795f}, - {-0.42755508f, -0.9039893f}, - {-0.47139674f, -0.8819213f}, - {-0.51410276f, -0.8577286f}, - {-0.55557024f, -0.8314696f}, - {-0.5956993f, -0.8032075f}, - {-0.6343933f, -0.77301043f}, - {-0.671559f, -0.7409511f}, - {-0.70710677f, -0.70710677f}, - {-0.7409511f, -0.671559f}, - {-0.77301043f, -0.6343933f}, - {-0.8032075f, -0.5956993f}, - {-0.8314696f, -0.55557024f}, - {-0.8577286f, -0.51410276f}, - {-0.8819213f, -0.47139674f}, - {-0.9039893f, -0.42755508f}, - {-0.9238795f, -0.38268343f}, - {-0.94154406f, -0.33688986f}, - {-0.95694035f, -0.29028466f}, - {-0.97003126f, -0.24298018f}, - {-0.98078525f, -0.19509032f}, - {-0.9891765f, -0.14673047f}, - {-0.9951847f, -0.09801714f}, - {-0.99879545f, -0.049067676f} - }; - private static final float[][] FFT_TABLE_16 = { - {1.0f, -0.0f}, - {0.9238795f, -0.38268343f}, - {0.70710677f, -0.70710677f}, - {0.38268343f, -0.9238795f}, - {6.123234E-17f, -1.0f}, - {-0.38268343f, -0.9238795f}, - {-0.70710677f, -0.70710677f}, - {-0.9238795f, -0.38268343f} - }; + private static final float[][] FFT_TABLE_128 = { + {1.0f, -0.0f}, + {0.99879545f, -0.049067676f}, + {0.9951847f, -0.09801714f}, + {0.9891765f, -0.14673047f}, + {0.98078525f, -0.19509032f}, + {0.97003126f, -0.24298018f}, + {0.95694035f, -0.29028466f}, + {0.94154406f, -0.33688986f}, + {0.9238795f, -0.38268343f}, + {0.9039893f, -0.42755508f}, + {0.8819213f, -0.47139674f}, + {0.8577286f, -0.51410276f}, + {0.8314696f, -0.55557024f}, + {0.8032075f, -0.5956993f}, + {0.77301043f, -0.6343933f}, + {0.7409511f, -0.671559f}, + {0.70710677f, -0.70710677f}, + {0.671559f, -0.7409511f}, + {0.6343933f, -0.77301043f}, + {0.5956993f, -0.8032075f}, + {0.55557024f, -0.8314696f}, + {0.51410276f, -0.8577286f}, + {0.47139674f, -0.8819213f}, + {0.42755508f, -0.9039893f}, + {0.38268343f, -0.9238795f}, + {0.33688986f, -0.94154406f}, + {0.29028466f, -0.95694035f}, + {0.24298018f, -0.97003126f}, + {0.19509032f, -0.98078525f}, + {0.14673047f, -0.9891765f}, + {0.09801714f, -0.9951847f}, + {0.049067676f, -0.99879545f}, + {6.123234E-17f, -1.0f}, + {-0.049067676f, -0.99879545f}, + {-0.09801714f, -0.9951847f}, + {-0.14673047f, -0.9891765f}, + {-0.19509032f, -0.98078525f}, + {-0.24298018f, -0.97003126f}, + {-0.29028466f, -0.95694035f}, + {-0.33688986f, -0.94154406f}, + {-0.38268343f, -0.9238795f}, + {-0.42755508f, -0.9039893f}, + {-0.47139674f, -0.8819213f}, + {-0.51410276f, -0.8577286f}, + {-0.55557024f, -0.8314696f}, + {-0.5956993f, -0.8032075f}, + {-0.6343933f, -0.77301043f}, + {-0.671559f, -0.7409511f}, + {-0.70710677f, -0.70710677f}, + {-0.7409511f, -0.671559f}, + {-0.77301043f, -0.6343933f}, + {-0.8032075f, -0.5956993f}, + {-0.8314696f, -0.55557024f}, + {-0.8577286f, -0.51410276f}, + {-0.8819213f, -0.47139674f}, + {-0.9039893f, -0.42755508f}, + {-0.9238795f, -0.38268343f}, + {-0.94154406f, -0.33688986f}, + {-0.95694035f, -0.29028466f}, + {-0.97003126f, -0.24298018f}, + {-0.98078525f, -0.19509032f}, + {-0.9891765f, -0.14673047f}, + {-0.9951847f, -0.09801714f}, + {-0.99879545f, -0.049067676f} + }; + private static final float[][] FFT_TABLE_16 = { + {1.0f, -0.0f}, + {0.9238795f, -0.38268343f}, + {0.70710677f, -0.70710677f}, + {0.38268343f, -0.9238795f}, + {6.123234E-17f, -1.0f}, + {-0.38268343f, -0.9238795f}, + {-0.70710677f, -0.70710677f}, + {-0.9238795f, -0.38268343f} + }; - static void process(float[][] in, int n) { - final int ln = (int) Math.round(Math.log(n)/Math.log(2)); - final float[][] table = (n==128) ? FFT_TABLE_128 : FFT_TABLE_16; + static void process(float[][] in, int n) { + int ln = (int) Math.round(Math.log(n) / Math.log(2)); + float[][] table = (n == 128) ? FFT_TABLE_128 : FFT_TABLE_16; - //bit-reversal - final float[][] rev = new float[n][2]; - int i, ii = 0; - for(i = 0; i>1; - while(ii>=k&&k>0) { - ii -= k; - k >>= 1; - } - ii += k; - } - for(i = 0; i> 1; + while (ii >= k && k > 0) { + ii -= k; + k >>= 1; + } + ii += k; + } + for (int i = 0; i < n; i++) { + in[i][0] = rev[i][0]; + in[i][1] = rev[i][1]; + } - //calculation - int blocks = n/2; - int size = 2; - int j, k, l, k0, k1, size2; - float[] a = new float[2]; - for(i = 0; i=loc[m[i]])&&(i<=loc[m[i]]+7)) fmd[i] = interpolateGain(lev[m[i]], lev[m[i]+1], i-loc[m[i]]); - else fmd[i] = lev[m[i]+1]; - } - - return secLevel; - } - - /** - * transformes the exponent value of the gain to the id of the gain change - * point - */ - private int getGainChangePointID(int lngain) { - for(int i = 0; i= loc[m[i]]) && (i <= loc[m[i]] + 7)) + fmd[i] = interpolateGain(lev[m[i]], lev[m[i] + 1], i - loc[m[i]]); + else fmd[i] = lev[m[i] + 1]; + } + + return secLevel; + } + + /** + * transformes the exponent value of the gain to the id of the gain change + * point + */ + private int getGainChangePointID(int lngain) { + for (int i = 0; i < ID_GAIN; i++) { + if (lngain == LN_GAIN[i]) return i; + } + return 0; // shouldn't happen + } + + /** + * calculates a fragment modification function + * the interpolated gain value between the gain values of two gain change + * positions is calculated by the formula: + * f(a,b,j) = 2^(((8-j)log2(a)+j*log2(b))/8) + */ + private float interpolateGain(float alev0, float alev1, int iloc) { + float a0 = (float) (Math.log(alev0) / Math.log(2)); + float a1 = (float) (Math.log(alev1) / Math.log(2)); + return (float) Math.pow(2.0f, (((8 - iloc) * a0 + iloc * a1) / 8)); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/gain/IMDCT.java b/src/main/java/net/sourceforge/jaad/aac/gain/IMDCT.java index bfbd2de2..f9cd34b6 100644 --- a/src/main/java/net/sourceforge/jaad/aac/gain/IMDCT.java +++ b/src/main/java/net/sourceforge/jaad/aac/gain/IMDCT.java @@ -3,181 +3,178 @@ import net.sourceforge.jaad.aac.AACException; import net.sourceforge.jaad.aac.syntax.ICSInfo.WindowSequence; + //inverse modified discrete cosine transform class IMDCT implements GCConstants, IMDCTTables, Windows { - private static final float[][] LONG_WINDOWS = {SINE_256, KBD_256}; - private static final float[][] SHORT_WINDOWS = {SINE_32, KBD_32}; - private final int frameLen, shortFrameLen, lbLong, lbShort, lbMid; - - IMDCT(int frameLen) { - this.frameLen = frameLen; - lbLong = frameLen/BANDS; - shortFrameLen = frameLen/8; - lbShort = shortFrameLen/BANDS; - lbMid = (lbLong-lbShort)/2; - } - - void process(float[] in, float[] out, int winShape, int winShapePrev, WindowSequence winSeq) throws AACException { - final float[] buf = new float[frameLen]; - - int b, j, i; - if(winSeq.equals(WindowSequence.EIGHT_SHORT_SEQUENCE)) { - for(b = 0; b15) { - signValues(in, data, off, cb<5 ? QUAD_LEN : PAIR_LEN); //virtual codebooks are always unsigned - if(Math.abs(data[off])==16) data[off] = getEscape(in, data[off]); - if(Math.abs(data[off+1])==16) data[off+1] = getEscape(in, data[off+1]); - } - else throw new AACException("Huffman: unknown spectral codebook: "+cb); - } + // sign & escape + if (cb < 11) { + if (UNSIGNED[cb - 1]) signValues(in, data, off, cb < 5 ? QUAD_LEN : PAIR_LEN); + } else if (cb == 11 || cb > 15) { + signValues(in, data, off, cb < 5 ? QUAD_LEN : PAIR_LEN); //virtual codebooks are always unsigned + if (Math.abs(data[off]) == 16) data[off] = getEscape(in, data[off]); + if (Math.abs(data[off + 1]) == 16) data[off + 1] = getEscape(in, data[off + 1]); + } else throw new AACException("Huffman: unknown spectral codebook: " + cb); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/EnvData.java b/src/main/java/net/sourceforge/jaad/aac/ps/EnvData.java new file mode 100644 index 00000000..8dba1100 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/EnvData.java @@ -0,0 +1,82 @@ +package net.sourceforge.jaad.aac.ps; + +import net.sourceforge.jaad.aac.syntax.BitStream; + +import java.util.Arrays; + +import static net.sourceforge.jaad.aac.ps.PSConstants.MAX_PS_ENVELOPES; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 02:13 + */ +abstract public class EnvData { + + final int[] first; + final Envelope[] envs; + + Mode mode = null; + + EnvData(int len) { + first = new int[len]; + envs = new Envelope[MAX_PS_ENVELOPES]; + + /* + * Each Envelope refers to its predecessor. + * The first envelop refers to prev. + */ + int[] prev = first; + for(int l=0; l {0,0,1,1,2,2,3,3,4,4} + */ + if (stride > 1) { + for (int i = stride * nr_par - 1; i > 0; --i) { + index[i] = index[i / stride]; + } + } + } + } + + /** + * Map indexes. + * Multiple indices are placed on higher bytes. + * Index 0 can only be used at first place. + *

+ * Table 8.45 of Subpart 8 + */ + private static final int[] MAP20TO34 = { + 0, 0 | 1 << 8, 1, 2, 2 | 3 << 8, 3, 4, 4, 5, 5, 6, 7, 8, 8, 9, 9, 10, + 11, 12, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19 + }; + + void map20To34() { + + // l==0 does not matter + for (int l = index.length - 1; l > 0; --l) { + int m = MAP20TO34[l]; + int i = index[m & 0xff]; + m >>= 8; + + // find further indexes to add + int n = 1; + while (m != 0) { + i += index[m & 0xff]; + m >>= 8; + ++n; + } + i /= n; + + index[l] = i; + } + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/ExtData.java b/src/main/java/net/sourceforge/jaad/aac/ps/ExtData.java new file mode 100644 index 00000000..9ba658ed --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/ExtData.java @@ -0,0 +1,60 @@ +package net.sourceforge.jaad.aac.ps; + +import net.sourceforge.jaad.aac.syntax.BitStream; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 18:05 + */ +class ExtData { + + boolean enabled = false; + + final PDData ipd = PDMode.IpdData(); + final PDData opd = PDMode.OpdData(); + + void setMode(IIDMode mode) { + ipd.setMode(mode); + opd.setMode(mode); + } + + void readData(BitStream ld, int num_env) { + enabled = ld.readBool(); + if (enabled) { + ipd.readData(ld, num_env); + opd.readData(ld, num_env); + } + ld.readBit(); //reserved + } + + void decode(int num_env) { + if (enabled) { + ipd.decode(num_env); + opd.decode(num_env); + } + } + + void update(int num_env) { + ipd.update(num_env); + opd.update(num_env); + } + + void restore(int num_env) { + ipd.update(num_env); + opd.update(num_env); + } + + public void mapTo34(int num_env) { + ipd.mapTo34(num_env); + opd.mapTo34(num_env); + } + + public int nr_par() { + int nr_par = ipd.mode.nr_par; + if(nr_par<11) + nr_par = 11; + return nr_par; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/Extension.java b/src/main/java/net/sourceforge/jaad/aac/ps/Extension.java new file mode 100644 index 00000000..5df58e6b --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/Extension.java @@ -0,0 +1,87 @@ +package net.sourceforge.jaad.aac.ps; + +import net.sourceforge.jaad.aac.syntax.BitStream; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 12:51 + */ +public class Extension { + + final IIDData parent; + + boolean enabled = false; + + ExtData data = null; + + public Extension(IIDData parent) { + this.parent = parent; + } + + ExtData data() { + if(enabled && data==null) + data = new ExtData(); + + return data; + } + + boolean readMode(BitStream ld) { + enabled = ld.readBool(); + ExtData data = data(); + + if(data!=null) + data.setMode(enabled ? parent.mode : null); + + return enabled; + } + + void readData(BitStream ld, int num_env) { + if(enabled) { + int cnt = ld.readBits(4); + if(cnt==15) { + cnt += ld.readBits(8); + } + + // open a new sub stream + ld = ld.readSubStream(8*cnt); + + while(ld.getBitsLeft()>7) { + int ps_extension_id = ld.readBits(2); + if(ps_extension_id==0) { + ExtData data = data(); + if(data!=null) + data.readData(ld, num_env); + } + } + } + } + + void decode(int num_env) { + if(enabled && data!=null) + data.decode(num_env); + } + + void update(int num_env) { + if(enabled && data!=null) + data.update(num_env); + } + + void restore(int num_env) { + if(enabled && data!=null) + data.restore(num_env); + } + + public void mapTo34(int num_env) { + if(enabled && data!=null) + data.mapTo34(num_env); + } + + int nr_par() { + if(enabled && data!=null) + return data.nr_par(); + else + return 0; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/FBType.java b/src/main/java/net/sourceforge/jaad/aac/ps/FBType.java new file mode 100644 index 00000000..f51e8cd9 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/FBType.java @@ -0,0 +1,78 @@ +package net.sourceforge.jaad.aac.ps; + +import java.util.Comparator; + +import static net.sourceforge.jaad.aac.ps.PSConstants.NEGATE_IPD_MASK; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 12.09.21 + * Time: 13:34 + */ +public class FBType { + + public static final Comparator CMP = Comparator.nullsLast(Comparator.comparingInt(t->t.nr_par_bands)); + + public static FBType max(FBType a, FBType b) { + return CMP.compare(a,b)<0 ? a : b; + } + public FBType max(FBType other) { + return max(this, other); + } + + public static final FBType T34 = new FBType(PSTables.group_border34, PSTables.map_group2bk34, + 32+18, 32, 34, 5, + PSTables.Phi_Fract_SubQmf34, PSTables.Q_Fract_allpass_SubQmf34, + new Filter[]{Filter12.f, Filter8.f34, Filter4.f, Filter4.f, Filter4.f}); + + public static final FBType T20 = new FBType(PSTables.group_border20, PSTables.map_group2bk20, + 10+12, 10, 20, 3, + PSTables.Phi_Fract_SubQmf20, PSTables.Q_Fract_allpass_SubQmf20, + new Filter[]{Filter8.f20, Filter2.f, Filter2.f}); + + final String name; + final int num_groups; + final int num_hybrid_groups; + final int nr_par_bands; + final int decay_cutoff; + final int[] group_border; + final int[] map_group2bk; + final float[][] phiFract; + final float[][][] qFractAllpassSubQmf; + final Filter[] filters; + + public FBType(int[] group_border, int[] map_group2bk, + int num_groups, int num_hybrid_groups, + int nr_par_bands, int decay_cutoff, + float[][] phiFract, float[][][] qFractAllpassSubQmf, + Filter[] filters) { + + this.name = "FBType" + nr_par_bands; + this.num_groups = num_groups; + this.num_hybrid_groups = num_hybrid_groups; + this.nr_par_bands = nr_par_bands; + this.decay_cutoff = decay_cutoff; + this.group_border = group_border; + this.map_group2bk = map_group2bk; + this.phiFract = phiFract; + this.qFractAllpassSubQmf = qFractAllpassSubQmf; + this.filters = filters; + } + + int bk(int gr) { + return map_group2bk[gr] & ~NEGATE_IPD_MASK; + } + + int maxsb(int gr) { + return (gr { + int index = 0; + + while(index>=0) { + int bit = ld.readBit(); + index = huff[index][bit]; + } + + return index+31; + }; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/HuffmanTables.java b/src/main/java/net/sourceforge/jaad/aac/ps/HuffmanTables.java deleted file mode 100644 index cc04884b..00000000 --- a/src/main/java/net/sourceforge/jaad/aac/ps/HuffmanTables.java +++ /dev/null @@ -1,257 +0,0 @@ -package net.sourceforge.jaad.aac.ps; - -interface HuffmanTables { - - /* binary lookup huffman tables */ - int[][] f_huff_iid_def = { - { /*0*/-31, 1}, /* index 0: 1 bits: x */ - {2, 3}, /* index 1: 2 bits: 1x */ - { /*1*/-30, /*-1*/ -32}, /* index 2: 3 bits: 10x */ - {4, 5}, /* index 3: 3 bits: 11x */ - { /*2*/-29, /*-2*/ -33}, /* index 4: 4 bits: 110x */ - {6, 7}, /* index 5: 4 bits: 111x */ - { /*3*/-28, /*-3*/ -34}, /* index 6: 5 bits: 1110x */ - {8, 9}, /* index 7: 5 bits: 1111x */ - { /*-4*/-35, /*4*/ -27}, /* index 8: 6 bits: 11110x */ - { /*5*/-26, 10}, /* index 9: 6 bits: 11111x */ - { /*-5*/-36, 11}, /* index 10: 7 bits: 111111x */ - { /*6*/-25, 12}, /* index 11: 8 bits: 1111111x */ - { /*-6*/-37, 13}, /* index 12: 9 bits: 11111111x */ - { /*-7*/-38, 14}, /* index 13: 10 bits: 111111111x */ - { /*7*/-24, 15}, /* index 14: 11 bits: 1111111111x */ - {16, 17}, /* index 15: 12 bits: 11111111111x */ - { /*8*/-23, /*-8*/ -39}, /* index 16: 13 bits: 111111111110x */ - {18, 19}, /* index 17: 13 bits: 111111111111x */ - { /*9*/-22, /*10*/ -21}, /* index 18: 14 bits: 1111111111110x */ - {20, 21}, /* index 19: 14 bits: 1111111111111x */ - { /*-9*/-40, /*11*/ -20}, /* index 20: 15 bits: 11111111111110x */ - {22, 23}, /* index 21: 15 bits: 11111111111111x */ - { /*-10*/-41, 24}, /* index 22: 16 bits: 111111111111110x */ - {25, 26}, /* index 23: 16 bits: 111111111111111x */ - { /*-11*/-42, /*-14*/ -45}, /* index 24: 17 bits: 1111111111111101x */ - { /*-13*/-44, /*-12*/ -43}, /* index 25: 17 bits: 1111111111111110x */ - { /*12*/-19, 27}, /* index 26: 17 bits: 1111111111111111x */ - { /*13*/-18, /*14*/ -17} /* index 27: 18 bits: 11111111111111111x */}; - - int[][] t_huff_iid_def = { - { /*0*/-31, 1}, /* index 0: 1 bits: x */ - { /*-1*/-32, 2}, /* index 1: 2 bits: 1x */ - { /*1*/-30, 3}, /* index 2: 3 bits: 11x */ - { /*-2*/-33, 4}, /* index 3: 4 bits: 111x */ - { /*2*/-29, 5}, /* index 4: 5 bits: 1111x */ - { /*-3*/-34, 6}, /* index 5: 6 bits: 11111x */ - { /*3*/-28, 7}, /* index 6: 7 bits: 111111x */ - { /*-4*/-35, 8}, /* index 7: 8 bits: 1111111x */ - { /*4*/-27, 9}, /* index 8: 9 bits: 11111111x */ - { /*-5*/-36, 10}, /* index 9: 10 bits: 111111111x */ - { /*5*/-26, 11}, /* index 10: 11 bits: 1111111111x */ - { /*-6*/-37, 12}, /* index 11: 12 bits: 11111111111x */ - { /*6*/-25, 13}, /* index 12: 13 bits: 111111111111x */ - { /*7*/-24, 14}, /* index 13: 14 bits: 1111111111111x */ - { /*-7*/-38, 15}, /* index 14: 15 bits: 11111111111111x */ - {16, 17}, /* index 15: 16 bits: 111111111111111x */ - { /*8*/-23, /*-8*/ -39}, /* index 16: 17 bits: 1111111111111110x */ - {18, 19}, /* index 17: 17 bits: 1111111111111111x */ - {20, 21}, /* index 18: 18 bits: 11111111111111110x */ - {22, 23}, /* index 19: 18 bits: 11111111111111111x */ - { /*9*/-22, /*-14*/ -45}, /* index 20: 19 bits: 111111111111111100x */ - { /*-13*/-44, /*-12*/ -43}, /* index 21: 19 bits: 111111111111111101x */ - {24, 25}, /* index 22: 19 bits: 111111111111111110x */ - {26, 27}, /* index 23: 19 bits: 111111111111111111x */ - { /*-11*/-42, /*-10*/ -41}, /* index 24: 20 bits: 1111111111111111100x */ - { /*-9*/-40, /*10*/ -21}, /* index 25: 20 bits: 1111111111111111101x */ - { /*11*/-20, /*12*/ -19}, /* index 26: 20 bits: 1111111111111111110x */ - { /*13*/-18, /*14*/ -17} /* index 27: 20 bits: 1111111111111111111x */}; - - int[][] f_huff_iid_fine = { - {1, /*0*/ -31}, /* index 0: 1 bits: x */ - {2, 3}, /* index 1: 2 bits: 0x */ - {4, /*-1*/ -32}, /* index 2: 3 bits: 00x */ - { /*1*/-30, 5}, /* index 3: 3 bits: 01x */ - { /*-2*/-33, /*2*/ -29}, /* index 4: 4 bits: 000x */ - {6, 7}, /* index 5: 4 bits: 011x */ - { /*-3*/-34, /*3*/ -28}, /* index 6: 5 bits: 0110x */ - {8, 9}, /* index 7: 5 bits: 0111x */ - { /*-4*/-35, /*4*/ -27}, /* index 8: 6 bits: 01110x */ - {10, 11}, /* index 9: 6 bits: 01111x */ - { /*-5*/-36, /*5*/ -26}, /* index 10: 7 bits: 011110x */ - {12, 13}, /* index 11: 7 bits: 011111x */ - { /*-6*/-37, /*6*/ -25}, /* index 12: 8 bits: 0111110x */ - {14, 15}, /* index 13: 8 bits: 0111111x */ - { /*7*/-24, 16}, /* index 14: 9 bits: 01111110x */ - {17, 18}, /* index 15: 9 bits: 01111111x */ - {19, /*-8*/ -39}, /* index 16: 10 bits: 011111101x */ - { /*8*/-23, 20}, /* index 17: 10 bits: 011111110x */ - {21, /*-7*/ -38}, /* index 18: 10 bits: 011111111x */ - { /*10*/-21, 22}, /* index 19: 11 bits: 0111111010x */ - {23, /*-9*/ -40}, /* index 20: 11 bits: 0111111101x */ - { /*9*/-22, 24}, /* index 21: 11 bits: 0111111110x */ - { /*-11*/-42, /*11*/ -20}, /* index 22: 12 bits: 01111110101x */ - {25, 26}, /* index 23: 12 bits: 01111111010x */ - {27, /*-10*/ -41}, /* index 24: 12 bits: 01111111101x */ - {28, /*-12*/ -43}, /* index 25: 13 bits: 011111110100x */ - { /*12*/-19, 29}, /* index 26: 13 bits: 011111110101x */ - {30, 31}, /* index 27: 13 bits: 011111111010x */ - {32, /*-14*/ -45}, /* index 28: 14 bits: 0111111101000x */ - { /*14*/-17, 33}, /* index 29: 14 bits: 0111111101011x */ - {34, /*-13*/ -44}, /* index 30: 14 bits: 0111111110100x */ - { /*13*/-18, 35}, /* index 31: 14 bits: 0111111110101x */ - {36, 37}, /* index 32: 15 bits: 01111111010000x */ - {38, /*-15*/ -46}, /* index 33: 15 bits: 01111111010111x */ - { /*15*/-16, 39}, /* index 34: 15 bits: 01111111101000x */ - {40, 41}, /* index 35: 15 bits: 01111111101011x */ - {42, 43}, /* index 36: 16 bits: 011111110100000x */ - { /*-17*/-48, /*17*/ -14}, /* index 37: 16 bits: 011111110100001x */ - {44, 45}, /* index 38: 16 bits: 011111110101110x */ - {46, 47}, /* index 39: 16 bits: 011111111010001x */ - {48, 49}, /* index 40: 16 bits: 011111111010110x */ - { /*-16*/-47, /*16*/ -15}, /* index 41: 16 bits: 011111111010111x */ - { /*-21*/-52, /*21*/ -10}, /* index 42: 17 bits: 0111111101000000x */ - { /*-19*/-50, /*19*/ -12}, /* index 43: 17 bits: 0111111101000001x */ - { /*-18*/-49, /*18*/ -13}, /* index 44: 17 bits: 0111111101011100x */ - {50, 51}, /* index 45: 17 bits: 0111111101011101x */ - {52, 53}, /* index 46: 17 bits: 0111111110100010x */ - {54, 55}, /* index 47: 17 bits: 0111111110100011x */ - {56, 57}, /* index 48: 17 bits: 0111111110101100x */ - {58, 59}, /* index 49: 17 bits: 0111111110101101x */ - { /*-26*/-57, /*-25*/ -56}, /* index 50: 18 bits: 01111111010111010x */ - { /*-28*/-59, /*-27*/ -58}, /* index 51: 18 bits: 01111111010111011x */ - { /*-22*/-53, /*22*/ -9}, /* index 52: 18 bits: 01111111101000100x */ - { /*-24*/-55, /*-23*/ -54}, /* index 53: 18 bits: 01111111101000101x */ - { /*25*/-6, /*26*/ -5}, /* index 54: 18 bits: 01111111101000110x */ - { /*23*/-8, /*24*/ -7}, /* index 55: 18 bits: 01111111101000111x */ - { /*29*/-2, /*30*/ -1}, /* index 56: 18 bits: 01111111101011000x */ - { /*27*/-4, /*28*/ -3}, /* index 57: 18 bits: 01111111101011001x */ - { /*-30*/-61, /*-29*/ -60}, /* index 58: 18 bits: 01111111101011010x */ - { /*-20*/-51, /*20*/ -11} /* index 59: 18 bits: 01111111101011011x */}; - - int[][] t_huff_iid_fine = { - {1, /*0*/ -31}, /* index 0: 1 bits: x */ - { /*1*/-30, 2}, /* index 1: 2 bits: 0x */ - {3, /*-1*/ -32}, /* index 2: 3 bits: 01x */ - {4, 5}, /* index 3: 4 bits: 010x */ - {6, 7}, /* index 4: 5 bits: 0100x */ - { /*-2*/-33, /*2*/ -29}, /* index 5: 5 bits: 0101x */ - {8, /*-3*/ -34}, /* index 6: 6 bits: 01000x */ - { /*3*/-28, 9}, /* index 7: 6 bits: 01001x */ - { /*-4*/-35, /*4*/ -27}, /* index 8: 7 bits: 010000x */ - {10, 11}, /* index 9: 7 bits: 010011x */ - { /*5*/-26, 12}, /* index 10: 8 bits: 0100110x */ - {13, 14}, /* index 11: 8 bits: 0100111x */ - { /*-6*/-37, /*6*/ -25}, /* index 12: 9 bits: 01001101x */ - {15, 16}, /* index 13: 9 bits: 01001110x */ - {17, /*-5*/ -36}, /* index 14: 9 bits: 01001111x */ - {18, /*-7*/ -38}, /* index 15: 10 bits: 010011100x */ - { /*7*/-24, 19}, /* index 16: 10 bits: 010011101x */ - {20, 21}, /* index 17: 10 bits: 010011110x */ - { /*9*/-22, 22}, /* index 18: 11 bits: 0100111000x */ - {23, 24}, /* index 19: 11 bits: 0100111011x */ - { /*-8*/-39, /*8*/ -23}, /* index 20: 11 bits: 0100111100x */ - {25, 26}, /* index 21: 11 bits: 0100111101x */ - { /*11*/-20, 27}, /* index 22: 12 bits: 01001110001x */ - {28, 29}, /* index 23: 12 bits: 01001110110x */ - { /*-10*/-41, /*10*/ -21}, /* index 24: 12 bits: 01001110111x */ - {30, 31}, /* index 25: 12 bits: 01001111010x */ - {32, /*-9*/ -40}, /* index 26: 12 bits: 01001111011x */ - {33, /*-13*/ -44}, /* index 27: 13 bits: 010011100011x */ - { /*13*/-18, 34}, /* index 28: 13 bits: 010011101100x */ - {35, 36}, /* index 29: 13 bits: 010011101101x */ - {37, /*-12*/ -43}, /* index 30: 13 bits: 010011110100x */ - { /*12*/-19, 38}, /* index 31: 13 bits: 010011110101x */ - {39, /*-11*/ -42}, /* index 32: 13 bits: 010011110110x */ - {40, 41}, /* index 33: 14 bits: 0100111000110x */ - {42, 43}, /* index 34: 14 bits: 0100111011001x */ - {44, 45}, /* index 35: 14 bits: 0100111011010x */ - {46, /*-15*/ -46}, /* index 36: 14 bits: 0100111011011x */ - { /*15*/-16, 47}, /* index 37: 14 bits: 0100111101000x */ - { /*-14*/-45, /*14*/ -17}, /* index 38: 14 bits: 0100111101011x */ - {48, 49}, /* index 39: 14 bits: 0100111101100x */ - { /*-21*/-52, /*-20*/ -51}, /* index 40: 15 bits: 01001110001100x */ - { /*18*/-13, /*19*/ -12}, /* index 41: 15 bits: 01001110001101x */ - { /*-19*/-50, /*-18*/ -49}, /* index 42: 15 bits: 01001110110010x */ - {50, 51}, /* index 43: 15 bits: 01001110110011x */ - {52, 53}, /* index 44: 15 bits: 01001110110100x */ - {54, 55}, /* index 45: 15 bits: 01001110110101x */ - {56, /*-17*/ -48}, /* index 46: 15 bits: 01001110110110x */ - { /*17*/-14, 57}, /* index 47: 15 bits: 01001111010001x */ - {58, /*-16*/ -47}, /* index 48: 15 bits: 01001111011000x */ - { /*16*/-15, 59}, /* index 49: 15 bits: 01001111011001x */ - { /*-26*/-57, /*26*/ -5}, /* index 50: 16 bits: 010011101100110x */ - { /*-28*/-59, /*-27*/ -58}, /* index 51: 16 bits: 010011101100111x */ - { /*29*/-2, /*30*/ -1}, /* index 52: 16 bits: 010011101101000x */ - { /*27*/-4, /*28*/ -3}, /* index 53: 16 bits: 010011101101001x */ - { /*-30*/-61, /*-29*/ -60}, /* index 54: 16 bits: 010011101101010x */ - { /*-25*/-56, /*25*/ -6}, /* index 55: 16 bits: 010011101101011x */ - { /*-24*/-55, /*24*/ -7}, /* index 56: 16 bits: 010011101101100x */ - { /*-23*/-54, /*23*/ -8}, /* index 57: 16 bits: 010011110100011x */ - { /*-22*/-53, /*22*/ -9}, /* index 58: 16 bits: 010011110110000x */ - { /*20*/-11, /*21*/ -10} /* index 59: 16 bits: 010011110110011x */}; - - int[][] f_huff_icc = { - { /*0*/-31, 1}, /* index 0: 1 bits: x */ - { /*1*/-30, 2}, /* index 1: 2 bits: 1x */ - { /*-1*/-32, 3}, /* index 2: 3 bits: 11x */ - { /*2*/-29, 4}, /* index 3: 4 bits: 111x */ - { /*-2*/-33, 5}, /* index 4: 5 bits: 1111x */ - { /*3*/-28, 6}, /* index 5: 6 bits: 11111x */ - { /*-3*/-34, 7}, /* index 6: 7 bits: 111111x */ - { /*4*/-27, 8}, /* index 7: 8 bits: 1111111x */ - { /*5*/-26, 9}, /* index 8: 9 bits: 11111111x */ - { /*-4*/-35, 10}, /* index 9: 10 bits: 111111111x */ - { /*6*/-25, 11}, /* index 10: 11 bits: 1111111111x */ - { /*-5*/-36, 12}, /* index 11: 12 bits: 11111111111x */ - { /*7*/-24, 13}, /* index 12: 13 bits: 111111111111x */ - { /*-6*/-37, /*-7*/ -38} /* index 13: 14 bits: 1111111111111x */}; - - int[][] t_huff_icc = { - { /*0*/-31, 1}, /* index 0: 1 bits: x */ - { /*1*/-30, 2}, /* index 1: 2 bits: 1x */ - { /*-1*/-32, 3}, /* index 2: 3 bits: 11x */ - { /*2*/-29, 4}, /* index 3: 4 bits: 111x */ - { /*-2*/-33, 5}, /* index 4: 5 bits: 1111x */ - { /*3*/-28, 6}, /* index 5: 6 bits: 11111x */ - { /*-3*/-34, 7}, /* index 6: 7 bits: 111111x */ - { /*4*/-27, 8}, /* index 7: 8 bits: 1111111x */ - { /*-4*/-35, 9}, /* index 8: 9 bits: 11111111x */ - { /*5*/-26, 10}, /* index 9: 10 bits: 111111111x */ - { /*-5*/-36, 11}, /* index 10: 11 bits: 1111111111x */ - { /*6*/-25, 12}, /* index 11: 12 bits: 11111111111x */ - { /*-6*/-37, 13}, /* index 12: 13 bits: 111111111111x */ - { /*-7*/-38, /*7*/ -24} /* index 13: 14 bits: 1111111111111x */}; - - int[][] f_huff_ipd = { - {1, /*0*/ -31}, /* index 0: 1 bits: x */ - {2, 3}, /* index 1: 2 bits: 0x */ - { /*1*/-30, 4}, /* index 2: 3 bits: 00x */ - {5, 6}, /* index 3: 3 bits: 01x */ - { /*4*/-27, /*5*/ -26}, /* index 4: 4 bits: 001x */ - { /*3*/-28, /*6*/ -25}, /* index 5: 4 bits: 010x */ - { /*2*/-29, /*7*/ -24} /* index 6: 4 bits: 011x */}; - - int[][] t_huff_ipd = { - {1, /*0*/ -31}, /* index 0: 1 bits: x */ - {2, 3}, /* index 1: 2 bits: 0x */ - {4, 5}, /* index 2: 3 bits: 00x */ - { /*1*/-30, /*7*/ -24}, /* index 3: 3 bits: 01x */ - { /*5*/-26, 6}, /* index 4: 4 bits: 000x */ - { /*2*/-29, /*6*/ -25}, /* index 5: 4 bits: 001x */ - { /*4*/-27, /*3*/ -28} /* index 6: 5 bits: 0001x */}; - - int[][] f_huff_opd = { - {1, /*0*/ -31}, /* index 0: 1 bits: x */ - {2, 3}, /* index 1: 2 bits: 0x */ - { /*7*/-24, /*1*/ -30}, /* index 2: 3 bits: 00x */ - {4, 5}, /* index 3: 3 bits: 01x */ - { /*3*/-28, /*6*/ -25}, /* index 4: 4 bits: 010x */ - { /*2*/-29, 6}, /* index 5: 4 bits: 011x */ - { /*5*/-26, /*4*/ -27} /* index 6: 5 bits: 0111x */}; - - int[][] t_huff_opd = { - {1, /*0*/ -31}, /* index 0: 1 bits: x */ - {2, 3}, /* index 1: 2 bits: 0x */ - {4, 5}, /* index 2: 3 bits: 00x */ - { /*1*/-30, /*7*/ -24}, /* index 3: 3 bits: 01x */ - { /*5*/-26, /*2*/ -29}, /* index 4: 4 bits: 000x */ - { /*6*/-25, 6}, /* index 5: 4 bits: 001x */ - { /*4*/-27, /*3*/ -28} /* index 6: 5 bits: 0011x */}; -} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/ICCData.java b/src/main/java/net/sourceforge/jaad/aac/ps/ICCData.java new file mode 100644 index 00000000..c35bd38b --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/ICCData.java @@ -0,0 +1,22 @@ +package net.sourceforge.jaad.aac.ps; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 12:37 + */ +public class ICCData extends ICData { + + /** + * ICCMode default is mode(1) ?? + */ + ICCMode mode() { + return mode == null ? mode(1) : mode; + } + + @Override + protected ICCMode mode(int id) { + return ICCMode.mode(id); + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/ICCMode.java b/src/main/java/net/sourceforge/jaad/aac/ps/ICCMode.java new file mode 100644 index 00000000..1d9c738c --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/ICCMode.java @@ -0,0 +1,44 @@ +package net.sourceforge.jaad.aac.ps; + +import static net.sourceforge.jaad.aac.ps.Huffman.f_huff_icc; +import static net.sourceforge.jaad.aac.ps.Huffman.t_huff_icc; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 01:20 + */ +public class ICCMode extends ICMode { + + private static final EnvTables ICC_TABLES = new EnvTables(f_huff_icc, t_huff_icc); + + @Override + EnvTables tables() { + return ICC_TABLES; + } + + public ICCMode(int id, int nr_par) { + super(id, nr_par); + } + + @Override + int clip(int idx) { + idx = Math.max(idx, 0); + idx = Math.min(idx, 7); + return idx; + } + + static private final ICCMode[] ICC_MODES = { + new ICCMode(0, 10), + new ICCMode(1, 20), + new ICCMode(2, 34), + new ICCMode(3, 10), + new ICCMode(4, 20), + new ICCMode(5, 34) + }; + + static ICCMode mode(int id) { + return ICC_MODES[id]; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/ICData.java b/src/main/java/net/sourceforge/jaad/aac/ps/ICData.java new file mode 100644 index 00000000..3c74871b --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/ICData.java @@ -0,0 +1,33 @@ +package net.sourceforge.jaad.aac.ps; + +import net.sourceforge.jaad.aac.syntax.BitStream; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 12:37 + */ +abstract public class ICData extends EnvData { + + ICData() { + super(34); + } + + FBType fbType() { + return mode==null ? null : mode.fbType(); + } + + Mode readMode(BitStream ld) { + boolean enabled = ld.readBool(); + + if (enabled) { + int id = ld.readBits(3); + this.mode = mode(id); + } else { + this.mode = null; + } + + return mode; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/ICMode.java b/src/main/java/net/sourceforge/jaad/aac/ps/ICMode.java new file mode 100644 index 00000000..98520c74 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/ICMode.java @@ -0,0 +1,22 @@ +package net.sourceforge.jaad.aac.ps; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 17:52 + */ +public abstract class ICMode extends EnvMode { + + public ICMode(int id, int nr_par) { + super(id, nr_par); + } + + FBType fbType() { + return (id %3)==2 ? FBType.T34 : FBType.T20; + } + + int stride() { + return (id%3)==0 ? 2 : 0; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/IIDData.java b/src/main/java/net/sourceforge/jaad/aac/ps/IIDData.java new file mode 100644 index 00000000..6b4beea1 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/IIDData.java @@ -0,0 +1,15 @@ +package net.sourceforge.jaad.aac.ps; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 12:37 + */ +public class IIDData extends ICData { + + @Override + protected IIDMode mode(int id) { + return IIDMode.mode(id); + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/IIDMode.java b/src/main/java/net/sourceforge/jaad/aac/ps/IIDMode.java new file mode 100644 index 00000000..f2061ada --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/IIDMode.java @@ -0,0 +1,65 @@ +package net.sourceforge.jaad.aac.ps; + +import net.sourceforge.jaad.aac.tools.Utils; + +import static net.sourceforge.jaad.aac.ps.Huffman.*; +import static net.sourceforge.jaad.aac.ps.PSTables.*; + + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 00:21 + */ +public class IIDMode extends ICMode { + + private static final IIDTables DEFAULT_TABLES = new IIDTables( + f_huff_iid_def, t_huff_iid_def, + 7, sf_iid_normal, + cos_betas_normal, sin_betas_normal, + sin_gammas_normal, cos_gammas_normal, + sincos_alphas_B_normal); + + private static final IIDTables FINE_TABLES = new IIDTables( + f_huff_iid_fine, t_huff_iid_fine, + 15, sf_iid_fine, + cos_betas_fine, sin_betas_fine, + sin_gammas_fine, cos_gammas_fine, + sincos_alphas_B_fine); + + final IIDTables tables; + + public IIDMode(int id, int nr_par, IIDTables tables) { + super(id, nr_par); + this.tables = tables; + } + + @Override + IIDTables tables() { + return tables; + } + + @Override + int clip(int idx) { + int clip = tables.num_steps; + return Utils.clip(idx, -clip, clip); + } + + static private final IIDMode[] IID_MODES = { + new IIDMode(0, 10, DEFAULT_TABLES), + new IIDMode(1, 20, DEFAULT_TABLES), + new IIDMode(2, 34, DEFAULT_TABLES), + new IIDMode(3, 10, FINE_TABLES), + new IIDMode(4, 20, FINE_TABLES), + new IIDMode(5, 34, FINE_TABLES) + }; + + static IIDMode mode(int id) { + return IID_MODES[id]; + } + + public static IIDData data() { + return new IIDData(); + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/IIDTables.java b/src/main/java/net/sourceforge/jaad/aac/ps/IIDTables.java new file mode 100644 index 00000000..3274fed8 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/IIDTables.java @@ -0,0 +1,31 @@ +package net.sourceforge.jaad.aac.ps; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 12:20 + */ +class IIDTables extends EnvTables { + + final int num_steps; + + final float[] sf; + + final float[][] cos_betas, sin_betas, cos_gammas, sin_gammas, sincos_alphas_b; + + IIDTables(int[][] f, int[][] t, + int num_steps, float[] sf, + float[][] cos_betas, float[][] sin_betas, + float[][] cos_gammas, float[][] sin_gammas, + float[][] sincos_alphas_b) { + super(f, t); + this.num_steps = num_steps; + this.sf = sf; + this.cos_betas = cos_betas; + this.sin_betas = sin_betas; + this.cos_gammas = cos_gammas; + this.sin_gammas = sin_gammas; + this.sincos_alphas_b = sincos_alphas_b; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/PDData.java b/src/main/java/net/sourceforge/jaad/aac/ps/PDData.java new file mode 100644 index 00000000..78ece1bc --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/PDData.java @@ -0,0 +1,28 @@ +package net.sourceforge.jaad.aac.ps; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 12:54 + */ +public class PDData extends EnvData { + + private final PDMode[] modes; + + public float[][][] prev = new float[20][2][2]; + + PDData(PDMode[] modes) { + super(17); + this.modes = modes; + } + + void setMode(IIDMode mode) { + this.mode = mode==null ? null : mode(mode.id); + } + + @Override + protected PDMode mode(int id) { + return modes[id]; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/PDMode.java b/src/main/java/net/sourceforge/jaad/aac/ps/PDMode.java new file mode 100644 index 00000000..59115d30 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/ps/PDMode.java @@ -0,0 +1,62 @@ +package net.sourceforge.jaad.aac.ps; + +import static net.sourceforge.jaad.aac.ps.Huffman.*; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.09.21 + * Time: 01:38 + */ +public class PDMode extends EnvMode { + + final EnvTables tables; + + public PDMode(int id, int nr_par, EnvTables tables) { + super(id, nr_par); + this.tables = tables; + } + + @Override + EnvTables tables() { + return tables; + } + + @Override + int stride() { + return 1; + } + + /** + * modulo clip on 7 + */ + @Override + int clip(int idx) { + return idx & 7; + } + + static private final PDMode[] IPD_MODES = modes(f_huff_ipd, t_huff_ipd); + + static private final PDMode[] OPD_MODES = modes(f_huff_opd, t_huff_opd); + + public static PDData IpdData() { + return new PDData(IPD_MODES); + } + + public static PDData OpdData() { + return new PDData(OPD_MODES); + } + + private static PDMode[] modes(int[][] f, int[][] t) { + EnvTables tables = new EnvTables(f, t); + + return new PDMode[] { + new PDMode(0, 5, tables), + new PDMode(1, 11, tables), + new PDMode(2, 17, tables), + new PDMode(3, 5, tables), + new PDMode(4, 11, tables), + new PDMode(5, 17, tables) + }; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/PS.java b/src/main/java/net/sourceforge/jaad/aac/ps/PS.java deleted file mode 100644 index 3993b861..00000000 --- a/src/main/java/net/sourceforge/jaad/aac/ps/PS.java +++ /dev/null @@ -1,1295 +0,0 @@ -package net.sourceforge.jaad.aac.ps; - -import net.sourceforge.jaad.aac.AACException; -import net.sourceforge.jaad.aac.SampleFrequency; -import net.sourceforge.jaad.aac.syntax.BitStream; - -public class PS implements PSConstants, PSTables, HuffmanTables { - - /* bitstream parameters */ - boolean enable_iid, enable_icc, enable_ext; - int iid_mode; - int icc_mode; - int nr_iid_par; - int nr_ipdopd_par; - int nr_icc_par; - int frame_class; - int num_env; - int[] border_position = new int[MAX_PS_ENVELOPES+1]; - boolean[] iid_dt = new boolean[MAX_PS_ENVELOPES]; - boolean[] icc_dt = new boolean[MAX_PS_ENVELOPES]; - boolean enable_ipdopd; - int ipd_mode; - boolean[] ipd_dt = new boolean[MAX_PS_ENVELOPES]; - boolean[] opd_dt = new boolean[MAX_PS_ENVELOPES]; - - /* indices */ - int[] iid_index_prev = new int[34]; - int[] icc_index_prev = new int[34]; - int[] ipd_index_prev = new int[17]; - int[] opd_index_prev = new int[17]; - int[][] iid_index = new int[MAX_PS_ENVELOPES][34]; - int[][] icc_index = new int[MAX_PS_ENVELOPES][34]; - int[][] ipd_index = new int[MAX_PS_ENVELOPES][17]; - int[][] opd_index = new int[MAX_PS_ENVELOPES][17]; - - int[] ipd_index_1 = new int[17]; - int[] opd_index_1 = new int[17]; - int[] ipd_index_2 = new int[17]; - int[] opd_index_2 = new int[17]; - /* ps data was correctly read */ - int ps_data_available; - /* a header has been read */ - public boolean header_read; - /* hybrid filterbank parameters */ - Filterbank hyb; - boolean use34hybrid_bands; - int numTimeSlotsRate; - int num_groups; - int num_hybrid_groups; - int nr_par_bands; - int nr_allpass_bands; - int decay_cutoff; - int[] group_border; - int[] map_group2bk; - /* filter delay handling */ - int saved_delay; - int[] delay_buf_index_ser = new int[NO_ALLPASS_LINKS]; - int[] num_sample_delay_ser = new int[NO_ALLPASS_LINKS]; - int[] delay_D = new int[64]; - int[] delay_buf_index_delay = new int[64]; - float[][][] delay_Qmf = new float[14][64][2]; /* 14 samples delay max, 64 QMF channels */ - - float[][][] delay_SubQmf = new float[2][32][2]; /* 2 samples delay max (SubQmf is always allpass filtered) */ - - float[][][][] delay_Qmf_ser = new float[NO_ALLPASS_LINKS][5][64][2]; /* 5 samples delay max (table 8.34), 64 QMF channels */ - - float[][][][] delay_SubQmf_ser = new float[NO_ALLPASS_LINKS][5][32][2]; /* 5 samples delay max (table 8.34) */ - /* transients */ - - float alpha_decay; - float alpha_smooth; - float[] P_PeakDecayNrg = new float[34]; - float[] P_prev = new float[34]; - float[] P_SmoothPeakDecayDiffNrg_prev = new float[34]; - /* mixing and phase */ - float[][] h11_prev = new float[50][2]; - float[][] h12_prev = new float[50][2]; - float[][] h21_prev = new float[50][2]; - float[][] h22_prev = new float[50][2]; - int phase_hist; - float[][][] ipd_prev = new float[20][2][2]; - float[][][] opd_prev = new float[20][2][2]; - - public PS(SampleFrequency sr, int numTimeSlotsRate) { - int i; - int short_delay_band; - - hyb = new Filterbank(numTimeSlotsRate); - this.numTimeSlotsRate = numTimeSlotsRate; - - this.ps_data_available = 0; - - /* delay stuff*/ - this.saved_delay = 0; - - for(i = 0; i<64; i++) { - this.delay_buf_index_delay[i] = 0; - } - - for(i = 0; i7) { - int ps_extension_id = ld.readBits(2); - - num_bits_left -= 2; - num_bits_left -= ps_extension(ld, ps_extension_id, num_bits_left); - } - - ld.skipBits(num_bits_left); - } - - int bits2 = (int) (ld.getPosition()-bits); - - this.ps_data_available = 1; - - return bits2; - } - - private int ps_extension(BitStream ld, - int ps_extension_id, - int num_bits_left) throws AACException { - int n; - long bits = ld.getPosition(); - - if(ps_extension_id==0) { - this.enable_ipdopd = ld.readBool(); - - if(this.enable_ipdopd) { - for(n = 0; n=0) { - bit = ld.readBit(); - index = t_huff[index][bit]; - } - - return index+31; - } - - /* limits the value i to the range [min,max] */ - private int delta_clip(int i, int min, int max) { - if(imax) return max; - else return i; - } - - - /* delta decode array */ - private void delta_decode(boolean enable, int[] index, int[] index_prev, - boolean dt_flag, int nr_par, int stride, - int min_index, int max_index) { - int i; - - if(enable) { - if(!dt_flag) { - /* delta coded in frequency direction */ - index[0] = 0+index[0]; - index[0] = delta_clip(index[0], min_index, max_index); - - for(i = 1; i0; i--) { - index[i] = index[i>>1]; - } - } - } - - /* delta modulo decode array */ - /* in: log2 value of the modulo value to allow using AND instead of MOD */ - private void delta_modulo_decode(boolean enable, int[] index, int[] index_prev, - boolean dt_flag, int nr_par, int stride, - int and_modulo) { - int i; - - if(enable) { - if(!dt_flag) { - /* delta coded in frequency direction */ - index[0] = 0+index[0]; - index[0] &= and_modulo; - - for(i = 1; i0; i--) { - index[i] = index[i>>1]; - } - } - } - - private void map20indexto34(int[] index, int bins) { - //index[0] = index[0]; - index[1] = (index[0]+index[1])/2; - index[2] = index[1]; - index[3] = index[2]; - index[4] = (index[2]+index[3])/2; - index[5] = index[3]; - index[6] = index[4]; - index[7] = index[4]; - index[8] = index[5]; - index[9] = index[5]; - index[10] = index[6]; - index[11] = index[7]; - index[12] = index[8]; - index[13] = index[8]; - index[14] = index[9]; - index[15] = index[9]; - index[16] = index[10]; - - if(bins==34) { - index[17] = index[11]; - index[18] = index[12]; - index[19] = index[13]; - index[20] = index[14]; - index[21] = index[14]; - index[22] = index[15]; - index[23] = index[15]; - index[24] = index[16]; - index[25] = index[16]; - index[26] = index[17]; - index[27] = index[17]; - index[28] = index[18]; - index[29] = index[18]; - index[30] = index[18]; - index[31] = index[18]; - index[32] = index[19]; - index[33] = index[19]; - } - } - - /* parse the bitstream data decoded in ps_data() */ - private void ps_data_decode() { - int env, bin; - - /* ps data not available, use data from previous frame */ - if(this.ps_data_available==0) { - this.num_env = 0; - } - - for(env = 0; envthr) { - this.border_position[env] = thr; - } - else { - thr = this.border_position[env-1]+1; - if(this.border_position[env]this.nr_allpass_bands&&gr>=this.num_hybrid_groups) { - /* delay */ - - /* never hybrid subbands here, always QMF subbands */ - tmp[0] = this.delay_Qmf[this.delay_buf_index_delay[sb]][sb][0]; - tmp[1] = this.delay_Qmf[this.delay_buf_index_delay[sb]][sb][1]; - R0[0] = tmp[0]; - R0[1] = tmp[1]; - this.delay_Qmf[this.delay_buf_index_delay[sb]][sb][0] = inputLeft[0]; - this.delay_Qmf[this.delay_buf_index_delay[sb]][sb][1] = inputLeft[1]; - } - else { - /* allpass filter */ - //int m; - float[] Phi_Fract = new float[2]; - - /* fetch parameters */ - if(gr=2) { - temp_delay = 0; - } - - /* update delay indices */ - if(sb>this.nr_allpass_bands&&gr>=this.num_hybrid_groups) { - /* delay_D depends on the samplerate, it can hold the values 14 and 1 */ - if(++this.delay_buf_index_delay[sb]>=this.delay_D[sb]) { - this.delay_buf_index_delay[sb] = 0; - } - } - - for(m = 0; m=this.num_sample_delay_ser[m]) { - temp_delay_ser[m] = 0; - } - } - } - } - } - - /* update delay indices */ - this.saved_delay = temp_delay; - for(m = 0; m=3) { - no_iid_steps = 15; - sf_iid = sf_iid_fine; - } - else { - no_iid_steps = 7; - sf_iid = sf_iid_normal; - } - - if(this.ipd_mode==0||this.ipd_mode==3) { - nr_ipdopd_par = 11; /* resolution */ - - } - else { - nr_ipdopd_par = this.nr_ipdopd_par; - } - - for(gr = 0; gr=3) { - if(this.iid_index[env][bk]<0) { - cosb = cos_betas_fine[-this.iid_index[env][bk]][this.icc_index[env][bk]]; - sinb = -sin_betas_fine[-this.iid_index[env][bk]][this.icc_index[env][bk]]; - } - else { - cosb = cos_betas_fine[this.iid_index[env][bk]][this.icc_index[env][bk]]; - sinb = sin_betas_fine[this.iid_index[env][bk]][this.icc_index[env][bk]]; - } - } - else { - if(this.iid_index[env][bk]<0) { - cosb = cos_betas_normal[-this.iid_index[env][bk]][this.icc_index[env][bk]]; - sinb = -sin_betas_normal[-this.iid_index[env][bk]][this.icc_index[env][bk]]; - } - else { - cosb = cos_betas_normal[this.iid_index[env][bk]][this.icc_index[env][bk]]; - sinb = sin_betas_normal[this.iid_index[env][bk]][this.icc_index[env][bk]]; - } - } - - ab1 = (cosb*cosa); - ab2 = (sinb*sina); - ab3 = (sinb*cosa); - ab4 = (cosb*sina); - - /* h_xy: COEF */ - h11[0] = (c_2*(ab1-ab2)); - h12[0] = (c_1*(ab1+ab2)); - h21[0] = (c_2*(ab3+ab4)); - h22[0] = (c_1*(ab3-ab4)); - } - else { - /* type 'B' mixing as described in 8.6.4.6.2.2 */ - float sina, cosa; - float cosg, sing; - - if(this.iid_mode>=3) { - int abs_iid = Math.abs(this.iid_index[env][bk]); - - cosa = sincos_alphas_B_fine[no_iid_steps+this.iid_index[env][bk]][this.icc_index[env][bk]]; - sina = sincos_alphas_B_fine[30-(no_iid_steps+this.iid_index[env][bk])][this.icc_index[env][bk]]; - cosg = cos_gammas_fine[abs_iid][this.icc_index[env][bk]]; - sing = sin_gammas_fine[abs_iid][this.icc_index[env][bk]]; - } - else { - int abs_iid = Math.abs(this.iid_index[env][bk]); - - cosa = sincos_alphas_B_normal[no_iid_steps+this.iid_index[env][bk]][this.icc_index[env][bk]]; - sina = sincos_alphas_B_normal[14-(no_iid_steps+this.iid_index[env][bk])][this.icc_index[env][bk]]; - cosg = cos_gammas_normal[abs_iid][this.icc_index[env][bk]]; - sing = sin_gammas_normal[abs_iid][this.icc_index[env][bk]]; - } - - h11[0] = (COEF_SQRT2*(cosa*cosg)); - h12[0] = (COEF_SQRT2*(sina*cosg)); - h21[0] = (COEF_SQRT2*(-cosa*sing)); - h22[0] = (COEF_SQRT2*(sina*sing)); - } - - /* calculate phase rotation parameters H_xy */ - /* note that the imaginary part of these parameters are only calculated when - IPD and OPD are enabled - */ - if((this.enable_ipdopd)&&(bk NR_ALLPASS_BANDS &&gr>=fbt.num_hybrid_groups) { + /* delay */ + float[] delay = delay_Qmf[delay_buf_index_delay[sb]][sb]; + /* never hybrid subbands here, always QMF subbands */ + r0Re = delay[0]; + r0Im = delay[1]; + delay[0] = re; + delay[1] = im; + } + else { + + float[] delayQmf = gr=2) { + temp_delay = 0; + } + + /* update delay indices */ + if(sb> NR_ALLPASS_BANDS &&gr>=fbt.num_hybrid_groups) { + /* delay_D depends on the samplerate, it can hold the values 14 and 1 */ + if(++delay_buf_index_delay[sb]>=delay_D[sb]) { + delay_buf_index_delay[sb] = 0; + } + } + + for(int m = 0; m=num_sample_delay_ser[m]) { + temp_delay_ser[m] = 0; + } + } + } + } + } + + /* update delay indices */ + saved_delay = temp_delay; + System.arraycopy(temp_delay_ser, 0, delay_buf_index_ser, 0, NO_ALLPASS_LINKS); + } + + private static float magnitude_c(float[] c) { + return (float) Math.sqrt(c[0]*c[0]+c[1]*c[1]); + } + + private void ps_mix_phase(float[][][] X_left, float[][][] X_right, + float[][][] X_hybrid_left, float[][][] X_hybrid_right) { + + float[] h11 = new float[2], h12 = new float[2], h21 = new float[2], h22 = new float[2]; + float[] H11 = new float[2], H12 = new float[2], H21 = new float[2], H22 = new float[2]; + float[] deltaH11 = new float[2], deltaH12 = new float[2], deltaH21 = new float[2], deltaH22 = new float[2]; + float[] tempLeft = new float[2]; + float[] tempRight = new float[2]; + float[] phaseLeft = new float[2]; + float[] phaseRight = new float[2]; + + IIDTables tables = iid.mode().tables(); + + for(int gr = 0; gr 7) { + ps_extension(ld); + } + } + + ps_data_available = true; + } + + private void ps_extension(BitStream ld) { + int ps_extension_id = ld.readBits(2); + + if (ps_extension_id == 0) { + enable_ipdopd = ld.readBool(); + + if (enable_ipdopd) { + for (int n = 0; n < num_env; n++) { + ipd_dt[n] = ld.readBool(); + + /* ipd_data */ + huff_data(ld, ipd_dt[n], nr_ipdopd_par, t_huff_ipd, + f_huff_ipd, ipd_index[n]); + + opd_dt[n] = ld.readBool(); + + /* opd_data */ + huff_data(ld, opd_dt[n], nr_ipdopd_par, t_huff_opd, + f_huff_opd, opd_index[n]); + } + } + ld.readBit(); //reserved + } + } + + /* read huffman data coded in either the frequency or the time direction */ + private static void huff_data(BitStream ld, boolean dt, int nr_par, + int[][] t_huff, int[][] f_huff, int[] par) { + + if (dt) { + /* coded in time direction */ + for (int n = 0; n < nr_par; n++) { + par[n] = ps_huff_dec(ld, t_huff); + } + } else { + /* coded in frequency direction */ + par[0] = ps_huff_dec(ld, f_huff); + + for (int n = 1; n < nr_par; n++) { + par[n] = ps_huff_dec(ld, f_huff); + } + } + } + + /* binary search huffman decoding */ + private static int ps_huff_dec(BitStream ld, int[][] t_huff) { + int index = 0; + + while (index >= 0) { + int bit = ld.readBit(); + index = t_huff[index][bit]; + } + + return index + 31; + } + + /* limits the value i to the range [min,max] */ + private static int delta_clip(int i, int min, int max) { + if (i < min) + return min; + else return Math.min(i, max); + } + + + /* delta decode array */ + private static void delta_decode(boolean enable, int[] index, int[] index_prev, + boolean dt_flag, int nr_par, int stride, + int min_index, int max_index) { + + if (enable) { + if (!dt_flag) { + /* delta coded in frequency direction */ + index[0] = 0 + index[0]; + index[0] = delta_clip(index[0], min_index, max_index); + + for (int i = 1; i < nr_par; i++) { + index[i] = index[i - 1] + index[i]; + index[i] = delta_clip(index[i], min_index, max_index); + } + } else { + /* delta coded in time direction */ + for (int i = 0; i < nr_par; i++) { + //int8_t tmp2; + //int8_t tmp = index[i]; + + //printf("%d %d\n", index_prev[i*stride], index[i]); + //printf("%d\n", index[i]); + index[i] = index_prev[i * stride] + index[i]; + //tmp2 = index[i]; + index[i] = delta_clip(index[i], min_index, max_index); + + //if (iid) + //{ + // if (index[i] == 7) + // { + // printf("%d %d %d\n", index_prev[i*stride], tmp, tmp2); + // } + //} + } + } + } else { + /* set indices to zero */ + for (int i = 0; i < nr_par; i++) { + index[i] = 0; + } + } + + /* coarse */ + if (stride == 2) { + for (int i = (nr_par << 1) - 1; i > 0; i--) { + index[i] = index[i >> 1]; + } + } + } + + /* delta modulo decode array */ + /* in: log2 value of the modulo value to allow using AND instead of MOD */ + private static void delta_modulo_decode(boolean enable, int[] index, int[] index_prev, + boolean dt_flag, int nr_par, int stride, + int and_modulo) { + + if (enable) { + if (!dt_flag) { + /* delta coded in frequency direction */ + index[0] = 0 + index[0]; + index[0] &= and_modulo; + + for (int i = 1; i < nr_par; i++) { + index[i] = index[i - 1] + index[i]; + index[i] &= and_modulo; + } + } else { + /* delta coded in time direction */ + for (int i = 0; i < nr_par; i++) { + index[i] = index_prev[i * stride] + index[i]; + index[i] &= and_modulo; + } + } + } else { + /* set indices to zero */ + for (int i = 0; i < nr_par; i++) { + index[i] = 0; + } + } + + /* coarse */ + if (stride == 2) { + index[0] = 0; + for (int i = (nr_par << 1) - 1; i > 0; i--) { + index[i] = index[i >> 1]; + } + } + } + + private static void map20indexto34(int[] index, int bins) { + //index[0] = index[0]; + index[1] = (index[0] + index[1]) / 2; + index[2] = index[1]; + index[3] = index[2]; + index[4] = (index[2] + index[3]) / 2; + index[5] = index[3]; + index[6] = index[4]; + index[7] = index[4]; + index[8] = index[5]; + index[9] = index[5]; + index[10] = index[6]; + index[11] = index[7]; + index[12] = index[8]; + index[13] = index[8]; + index[14] = index[9]; + index[15] = index[9]; + index[16] = index[10]; + + if (bins == 34) { + index[17] = index[11]; + index[18] = index[12]; + index[19] = index[13]; + index[20] = index[14]; + index[21] = index[14]; + index[22] = index[15]; + index[23] = index[15]; + index[24] = index[16]; + index[25] = index[16]; + index[26] = index[17]; + index[27] = index[17]; + index[28] = index[18]; + index[29] = index[18]; + index[30] = index[18]; + index[31] = index[18]; + index[32] = index[19]; + index[33] = index[19]; + } + } + + /* parse the bitstream data decoded in ps_data() */ + private void ps_data_decode() { + + /* ps data not available, use data from previous frame */ + if (!ps_data_available) { + num_env = 0; + } + + for (int env = 0; env < num_env; env++) { + + int num_iid_steps = (iid_mode < 3) ? 7 : 15 /*fine quant*/; + +// iid = 1; + /* delta decode iid parameters */ + delta_decode(enable_iid, iid_index[env], + env == 0 ? iid_index_prev : iid_index[env - 1], + iid_dt[env], nr_iid_par, + (iid_mode == 0 || iid_mode == 3) ? 2 : 1, + -num_iid_steps, num_iid_steps); +// iid = 0; + + /* delta decode icc parameters */ + delta_decode(enable_icc, icc_index[env], + env == 0 ? icc_index_prev : icc_index[env - 1], + icc_dt[env], nr_icc_par, + (icc_mode == 0 || icc_mode == 3) ? 2 : 1, + 0, 7); + + /* delta modulo decode ipd parameters */ + delta_modulo_decode(enable_ipdopd, ipd_index[env], + env == 0 ? ipd_index_prev : ipd_index[env - 1], + ipd_dt[env], nr_ipdopd_par, 1, 7); + + /* delta modulo decode opd parameters */ + delta_modulo_decode(enable_ipdopd, opd_index[env], + env == 0 ? opd_index_prev : opd_index[env - 1], + opd_dt[env], nr_ipdopd_par, 1, 7); + } + + /* handle error case */ + if (num_env == 0) { + /* force to 1 */ + num_env = 1; + + if (enable_iid) { + for (int bin = 0; bin < 34; bin++) { + iid_index[0][bin] = iid_index_prev[bin]; + } + } else { + for (int bin = 0; bin < 34; bin++) { + iid_index[0][bin] = 0; + } + } + + if (enable_icc) { + for (int bin = 0; bin < 34; bin++) { + icc_index[0][bin] = icc_index_prev[bin]; + } + } else { + for (int bin = 0; bin < 34; bin++) { + icc_index[0][bin] = 0; + } + } + + if (enable_ipdopd) { + for (int bin = 0; bin < 17; bin++) { + ipd_index[0][bin] = ipd_index_prev[bin]; + opd_index[0][bin] = opd_index_prev[bin]; + } + } else { + for (int bin = 0; bin < 17; bin++) { + ipd_index[0][bin] = 0; + opd_index[0][bin] = 0; + } + } + } + + /* update previous indices */ + for (int bin = 0; bin < 34; bin++) { + iid_index_prev[bin] = iid_index[num_env - 1][bin]; + } + for (int bin = 0; bin < 34; bin++) { + icc_index_prev[bin] = icc_index[num_env - 1][bin]; + } + for (int bin = 0; bin < 17; bin++) { + ipd_index_prev[bin] = ipd_index[num_env - 1][bin]; + opd_index_prev[bin] = opd_index[num_env - 1][bin]; + } + + ps_data_available = false; + + if (frame_class == 0) { + border_position[0] = 0; + for (int env = 1; env < num_env; env++) { + border_position[env] = (env * numTimeSlotsRate) / num_env; + } + border_position[num_env] = numTimeSlotsRate; + } else { + border_position[0] = 0; + + if (border_position[num_env] < numTimeSlotsRate) { + for (int bin = 0; bin < 34; bin++) { + iid_index[num_env][bin] = iid_index[num_env - 1][bin]; + icc_index[num_env][bin] = icc_index[num_env - 1][bin]; + } + for (int bin = 0; bin < 17; bin++) { + ipd_index[num_env][bin] = ipd_index[num_env - 1][bin]; + opd_index[num_env][bin] = opd_index[num_env - 1][bin]; + } + num_env++; + border_position[num_env] = numTimeSlotsRate; + } + + for (int env = 1; env < num_env; env++) { + int thr = numTimeSlotsRate - (num_env - env); + + if (border_position[env] > thr) { + border_position[env] = thr; + } else { + thr = border_position[env - 1] + 1; + if (border_position[env] < thr) { + border_position[env] = thr; + } + } + } + } + + /* make sure that the indices of all parameters can be mapped + * to the same hybrid synthesis filterbank + */ + if (fbt == FBType.T34) { + for (int env = 0; env < num_env; env++) { + if (iid_mode != 2 && iid_mode != 5) + map20indexto34(iid_index[env], 34); + if (icc_mode != 2 && icc_mode != 5) + map20indexto34(icc_index[env], 34); + if (ipd_mode != 2 && ipd_mode != 5) { + map20indexto34(ipd_index[env], 17); + map20indexto34(opd_index[env], 17); + } + } + } + } + + /* decorrelate the mono signal using an allpass filter */ + private void ps_decorrelate(float[][][] X_left, float[][][] X_right, + float[][][] X_hybrid_left, float[][][] X_hybrid_right) { + float[][] P = new float[32][34]; + float[][] G_TransientRatio = new float[32][34]; + + /* clear the energy values */ + for (int n = 0; n < 32; n++) { + for (int bk = 0; bk < 34; bk++) { + P[n][bk] = 0; + } + } + + /* calculate the energy in each parameter band b(k) */ + for (int gr = 0; gr < fbt.num_groups; gr++) { + /* select the parameter index b(k) to which this group belongs */ + int bk = fbt.bk(gr); + + /* select the upper subband border for this group */ + int maxsb = (gr < fbt.num_hybrid_groups) ? fbt.group_border[gr] + 1 : fbt.group_border[gr + 1]; + float[][][] Xl = gr < fbt.num_hybrid_groups ? X_hybrid_left : X_left; + + for (int n = border_position[0]; n < border_position[num_env]; n++) { + float[] p = P[n]; + for (int sb = fbt.group_border[gr]; sb < maxsb; sb++) { + float[] xl = Xl[n][sb]; + float re = xl[0]; + float im = xl[1]; + /* accumulate energy */ + p[bk] += (re * re) + (im * im); + } + } + } + + /* calculate transient reduction ratio for each parameter band b(k) */ + for (int bk = 0; bk < fbt.nr_par_bands; bk++) { + for (int n = border_position[0]; n < border_position[num_env]; n++) { + float gamma = 1.5f; + + P_PeakDecayNrg[bk] = (P_PeakDecayNrg[bk] * ALPHA_DECAY); + if (P_PeakDecayNrg[bk] < P[n][bk]) + P_PeakDecayNrg[bk] = P[n][bk]; + + /* apply smoothing filter to peak decay energy */ + float P_SmoothPeakDecayDiffNrg = P_SmoothPeakDecayDiffNrg_prev[bk]; + P_SmoothPeakDecayDiffNrg += ((P_PeakDecayNrg[bk] - P[n][bk] - P_SmoothPeakDecayDiffNrg_prev[bk]) * ALPHA_SMOOTH); + P_SmoothPeakDecayDiffNrg_prev[bk] = P_SmoothPeakDecayDiffNrg; + + /* apply smoothing filter to energy */ + float nrg = P_prev[bk]; + nrg += ((P[n][bk] - P_prev[bk]) * ALPHA_SMOOTH); + P_prev[bk] = nrg; + + /* calculate transient ratio */ + if ((P_SmoothPeakDecayDiffNrg * gamma) <= nrg) { + G_TransientRatio[n][bk] = 1.0f; + } else { + G_TransientRatio[n][bk] = (nrg / (P_SmoothPeakDecayDiffNrg * gamma)); + } + } + } + + int temp_delay = 0; + int[] temp_delay_ser = new int[NO_ALLPASS_LINKS]; + float[] g_DecaySlope_filt = new float[NO_ALLPASS_LINKS]; + + /* apply stereo decorrelation filter to the signal */ + for (int gr = 0; gr < fbt.num_groups; gr++) { + int maxsb; + if (gr < fbt.num_hybrid_groups) + maxsb = fbt.group_border[gr] + 1; + else + maxsb = fbt.group_border[gr + 1]; + + float[][][] Xl = gr < fbt.num_hybrid_groups ? X_hybrid_left : X_left; + float[][][] Xr = gr < fbt.num_hybrid_groups ? X_hybrid_right : X_right; + float[][][][] delay_ser = gr < fbt.num_hybrid_groups ? delay_SubQmf_ser : delay_Qmf_ser; + float[][][] qFractAllpassQmf = gr < fbt.num_hybrid_groups ? fbt.qFractAllpassSubQmf : Q_Fract_allpass_Qmf; + + /* QMF channel */ + for (int sb = fbt.group_border[gr]; sb < maxsb; sb++) { + float g_DecaySlope; + + /* g_DecaySlope: [0..1] */ + if (gr < fbt.num_hybrid_groups || sb <= fbt.decay_cutoff) { + g_DecaySlope = 1.0f; + } else { + int decay = fbt.decay_cutoff - sb; + if (decay <= -20 /* -1/DECAY_SLOPE */) { + g_DecaySlope = 0; + } else { + /* decay(int)*decay_slope(frac) = g_DecaySlope(frac) */ + g_DecaySlope = 1.0f + DECAY_SLOPE * decay; + } + } + + /* calculate g_DecaySlope_filt for every m multiplied by filter_a[m] */ + for (int m = 0; m < NO_ALLPASS_LINKS; m++) { + g_DecaySlope_filt[m] = g_DecaySlope * filter_a[m]; + } + + /* set delay indices */ + temp_delay = saved_delay; + for (int n = 0; n < NO_ALLPASS_LINKS; n++) { + temp_delay_ser[n] = delay_buf_index_ser[n]; + } + + for (int n = border_position[0]; n < border_position[num_env]; n++) { + + float r0Re, r0Im; + + float re = Xl[n][sb][0]; + float im = Xl[n][sb][1]; + + if (sb > NR_ALLPASS_BANDS && gr >= fbt.num_hybrid_groups) { + /* delay */ + float[] delay = delay_Qmf[delay_buf_index_delay[sb]][sb]; + /* never hybrid subbands here, always QMF subbands */ + r0Re = delay[0]; + r0Im = delay[1]; + delay[0] = re; + delay[1] = im; + } else { + + float[] delayQmf = gr < fbt.num_hybrid_groups ? delay_SubQmf[temp_delay][sb] : delay_Qmf[temp_delay][sb]; + + /* allpass filter */ + //int m; + float[] Phi_Fract = gr < fbt.num_hybrid_groups ? fbt.phiFract[sb] : Phi_Fract_Qmf[sb]; + + float tmp0Re = delayQmf[0]; + float tmp0Im = delayQmf[1]; + + delayQmf[0] = re; + delayQmf[1] = im; + + /* z^(-2) * Phi_Fract[k] */ + r0Re = (tmp0Re * Phi_Fract[0]) + (tmp0Im * Phi_Fract[1]); + r0Im = (tmp0Im * Phi_Fract[0]) - (tmp0Re * Phi_Fract[1]); + + for (int m = 0; m < NO_ALLPASS_LINKS; m++) { + + float[] qFractAllpass = qFractAllpassQmf[sb][m]; + float[] delay = delay_ser[m][temp_delay_ser[m]][sb]; + + tmp0Re = delay[0]; + tmp0Im = delay[1]; + + /* delay by a fraction */ + /* z^(-d(m)) * qFractAllpass[k,m] */ + float tmpRe = (tmp0Re * qFractAllpass[0]) + (tmp0Im * qFractAllpass[1]); + float tmpIm = (tmp0Im * qFractAllpass[0]) - (tmp0Re * qFractAllpass[1]); + + /* -a(m) * g_DecaySlope[k] */ + tmpRe -= g_DecaySlope_filt[m] * r0Re; + tmpIm -= g_DecaySlope_filt[m] * r0Im; + + /* -a(m) * g_DecaySlope[k] * qFractAllpass[k,m] * z^(-d(m)) */ + delay[0] = r0Re + (g_DecaySlope_filt[m] * tmpRe); + delay[1] = r0Im + (g_DecaySlope_filt[m] * tmpIm); + + /* store for next iteration (or as output value if last iteration) */ + r0Re = tmpRe; + r0Im = tmpIm; + } + } + + /* select b(k) for reading the transient ratio */ + int bk = fbt.bk(gr); + + /* duck if a past transient is found */ + Xr[n][sb][0] = (G_TransientRatio[n][bk] * r0Re); + Xr[n][sb][1] = (G_TransientRatio[n][bk] * r0Im); + + /* Update delay buffer index */ + if (++temp_delay >= 2) { + temp_delay = 0; + } + + /* update delay indices */ + if (sb > NR_ALLPASS_BANDS && gr >= fbt.num_hybrid_groups) { + /* delay_D depends on the samplerate, it can hold the values 14 and 1 */ + if (++delay_buf_index_delay[sb] >= delay_D[sb]) { + delay_buf_index_delay[sb] = 0; + } + } + + for (int m = 0; m < NO_ALLPASS_LINKS; m++) { + if (++temp_delay_ser[m] >= num_sample_delay_ser[m]) { + temp_delay_ser[m] = 0; + } + } + } + } + } + + /* update delay indices */ + saved_delay = temp_delay; + System.arraycopy(temp_delay_ser, 0, delay_buf_index_ser, 0, NO_ALLPASS_LINKS); + } + + private static float magnitude_c(float[] c) { + return (float) Math.sqrt(c[0] * c[0] + c[1] * c[1]); + } + + private void ps_mix_phase(float[][][] X_left, float[][][] X_right, + float[][][] X_hybrid_left, float[][][] X_hybrid_right) { + + float[] h11 = new float[2], h12 = new float[2], h21 = new float[2], h22 = new float[2]; + float[] H11 = new float[2], H12 = new float[2], H21 = new float[2], H22 = new float[2]; + float[] deltaH11 = new float[2], deltaH12 = new float[2], deltaH21 = new float[2], deltaH22 = new float[2]; + float[] tempLeft = new float[2]; + float[] tempRight = new float[2]; + float[] phaseLeft = new float[2]; + float[] phaseRight = new float[2]; + float[] sf_iid; + int no_iid_steps; + + if (iid_mode >= 3) { + no_iid_steps = 15; + sf_iid = sf_iid_fine; + } else { + no_iid_steps = 7; + sf_iid = sf_iid_normal; + } + + int nr_ipdopd_par; // local version + if (ipd_mode == 0 || ipd_mode == 3) { + nr_ipdopd_par = 11; /* resolution */ + } else { + nr_ipdopd_par = this.nr_ipdopd_par; + } + + for (int gr = 0; gr < fbt.num_groups; gr++) { + int bk = fbt.bk(gr); + + /* use one channel per group in the subqmf domain */ + int maxsb = (gr < fbt.num_hybrid_groups) ? fbt.group_border[gr] + 1 : fbt.group_border[gr + 1]; + + for (int env = 0; env < num_env; env++) { + if (icc_mode < 3) { + /* type 'A' mixing as described in 8.6.4.6.2.1 */ + float c_1, c_2; + float cosa, sina; + float cosb, sinb; + float ab1, ab2; + float ab3, ab4; + + /* + c_1 = sqrt(2.0 / (1.0 + pow(10.0, quant_iid[no_iid_steps + iid_index] / 10.0))); + c_2 = sqrt(2.0 / (1.0 + pow(10.0, quant_iid[no_iid_steps - iid_index] / 10.0))); + alpha = 0.5 * acos(quant_rho[icc_index]); + beta = alpha * ( c_1 - c_2 ) / sqrt(2.0); + */ + //printf("%d\n", ps.iid_index[env][bk]); + + /* calculate the scalefactors c_1 and c_2 from the intensity differences */ + c_1 = sf_iid[no_iid_steps + iid_index[env][bk]]; + c_2 = sf_iid[no_iid_steps - iid_index[env][bk]]; + + /* calculate alpha and beta using the ICC parameters */ + cosa = cos_alphas[icc_index[env][bk]]; + sina = sin_alphas[icc_index[env][bk]]; + + if (iid_mode >= 3) { + if (iid_index[env][bk] < 0) { + cosb = cos_betas_fine[-iid_index[env][bk]][icc_index[env][bk]]; + sinb = -sin_betas_fine[-iid_index[env][bk]][icc_index[env][bk]]; + } else { + cosb = cos_betas_fine[iid_index[env][bk]][icc_index[env][bk]]; + sinb = sin_betas_fine[iid_index[env][bk]][icc_index[env][bk]]; + } + } else { + if (iid_index[env][bk] < 0) { + cosb = cos_betas_normal[-iid_index[env][bk]][icc_index[env][bk]]; + sinb = -sin_betas_normal[-iid_index[env][bk]][icc_index[env][bk]]; + } else { + cosb = cos_betas_normal[iid_index[env][bk]][icc_index[env][bk]]; + sinb = sin_betas_normal[iid_index[env][bk]][icc_index[env][bk]]; + } + } + + ab1 = (cosb * cosa); + ab2 = (sinb * sina); + ab3 = (sinb * cosa); + ab4 = (cosb * sina); + + /* h_xy: COEF */ + h11[0] = (c_2 * (ab1 - ab2)); + h12[0] = (c_1 * (ab1 + ab2)); + h21[0] = (c_2 * (ab3 + ab4)); + h22[0] = (c_1 * (ab3 - ab4)); + } else { + /* type 'B' mixing as described in 8.6.4.6.2.2 */ + float sina, cosa; + float cosg, sing; + + if (iid_mode >= 3) { + int abs_iid = Math.abs(iid_index[env][bk]); + + cosa = sincos_alphas_B_fine[no_iid_steps + iid_index[env][bk]][icc_index[env][bk]]; + sina = sincos_alphas_B_fine[30 - (no_iid_steps + iid_index[env][bk])][icc_index[env][bk]]; + cosg = cos_gammas_fine[abs_iid][icc_index[env][bk]]; + sing = sin_gammas_fine[abs_iid][icc_index[env][bk]]; + } else { + int abs_iid = Math.abs(iid_index[env][bk]); + + cosa = sincos_alphas_B_normal[no_iid_steps + iid_index[env][bk]][icc_index[env][bk]]; + sina = sincos_alphas_B_normal[14 - (no_iid_steps + iid_index[env][bk])][icc_index[env][bk]]; + cosg = cos_gammas_normal[abs_iid][icc_index[env][bk]]; + sing = sin_gammas_normal[abs_iid][icc_index[env][bk]]; + } + + h11[0] = (COEF_SQRT2 * (cosa * cosg)); + h12[0] = (COEF_SQRT2 * (sina * cosg)); + h21[0] = (COEF_SQRT2 * (-cosa * sing)); + h22[0] = (COEF_SQRT2 * (sina * sing)); + } + + /* calculate phase rotation parameters H_xy */ + /* note that the imaginary part of these parameters are only calculated when + IPD and OPD are enabled + */ + if ((enable_ipdopd) && (bk < nr_ipdopd_par)) { + + /* ringbuffer index */ + int i = phase_hist; + + /* previous value */ + tempLeft[0] = (ipd_prev[bk][i][0] * 0.25f); + tempLeft[1] = (ipd_prev[bk][i][1] * 0.25f); + tempRight[0] = (opd_prev[bk][i][0] * 0.25f); + tempRight[1] = (opd_prev[bk][i][1] * 0.25f); + + /* save current value */ + ipd_prev[bk][i][0] = ipdopd_cos_tab[Math.abs(ipd_index[env][bk])]; + ipd_prev[bk][i][1] = ipdopd_sin_tab[Math.abs(ipd_index[env][bk])]; + opd_prev[bk][i][0] = ipdopd_cos_tab[Math.abs(opd_index[env][bk])]; + opd_prev[bk][i][1] = ipdopd_sin_tab[Math.abs(opd_index[env][bk])]; + + /* add current value */ + tempLeft[0] += ipd_prev[bk][i][0]; + tempLeft[1] += ipd_prev[bk][i][1]; + tempRight[0] += opd_prev[bk][i][0]; + tempRight[1] += opd_prev[bk][i][1]; + + /* ringbuffer index */ + if (i == 0) { + i = 2; + } + i--; + + /* get value before previous */ + tempLeft[0] += (ipd_prev[bk][i][0] * 0.5f); + tempLeft[1] += (ipd_prev[bk][i][1] * 0.5f); + tempRight[0] += (opd_prev[bk][i][0] * 0.5f); + tempRight[1] += (opd_prev[bk][i][1] * 0.5f); + + float xy = magnitude_c(tempRight); + float pq = magnitude_c(tempLeft); + + if (xy != 0) { + phaseLeft[0] = (tempRight[0] / xy); + phaseLeft[1] = (tempRight[1] / xy); + } else { + phaseLeft[0] = 0; + phaseLeft[1] = 0; + } + + float xypq = (xy * pq); + + if (xypq != 0) { + float tmp1 = (tempRight[0] * tempLeft[0]) + (tempRight[1] * tempLeft[1]); + float tmp2 = (tempRight[1] * tempLeft[0]) - (tempRight[0] * tempLeft[1]); + + phaseRight[0] = (tmp1 / xypq); + phaseRight[1] = (tmp2 / xypq); + } else { + phaseRight[0] = 0; + phaseRight[1] = 0; + } + + /* MUL_F(COEF, REAL) = COEF */ + h11[1] = (h11[0] * phaseLeft[1]); + h12[1] = (h12[0] * phaseRight[1]); + h21[1] = (h21[0] * phaseLeft[1]); + h22[1] = (h22[0] * phaseRight[1]); + + h11[0] = (h11[0] * phaseLeft[0]); + h12[0] = (h12[0] * phaseRight[0]); + h21[0] = (h21[0] * phaseLeft[0]); + h22[0] = (h22[0] * phaseRight[0]); + } + + /* length of the envelope n_e+1 - n_e (in time samples) */ + /* 0 < L <= 32: integer */ + float L = (float) (border_position[env + 1] - border_position[env]); + + /* obtain final H_xy by means of linear interpolation */ + deltaH11[0] = (h11[0] - h11_prev[gr][0]) / L; + deltaH12[0] = (h12[0] - h12_prev[gr][0]) / L; + deltaH21[0] = (h21[0] - h21_prev[gr][0]) / L; + deltaH22[0] = (h22[0] - h22_prev[gr][0]) / L; + + H11[0] = h11_prev[gr][0]; + H12[0] = h12_prev[gr][0]; + H21[0] = h21_prev[gr][0]; + H22[0] = h22_prev[gr][0]; + + h11_prev[gr][0] = h11[0]; + h12_prev[gr][0] = h12[0]; + h21_prev[gr][0] = h21[0]; + h22_prev[gr][0] = h22[0]; + + /* only calculate imaginary part when needed */ + if ((enable_ipdopd) && (bk < nr_ipdopd_par)) { + /* obtain final H_xy by means of linear interpolation */ + deltaH11[1] = (h11[1] - h11_prev[gr][1]) / L; + deltaH12[1] = (h12[1] - h12_prev[gr][1]) / L; + deltaH21[1] = (h21[1] - h21_prev[gr][1]) / L; + deltaH22[1] = (h22[1] - h22_prev[gr][1]) / L; + + H11[1] = h11_prev[gr][1]; + H12[1] = h12_prev[gr][1]; + H21[1] = h21_prev[gr][1]; + H22[1] = h22_prev[gr][1]; + + if (fbt.bkm(gr)) { + deltaH11[1] = -deltaH11[1]; + deltaH12[1] = -deltaH12[1]; + deltaH21[1] = -deltaH21[1]; + deltaH22[1] = -deltaH22[1]; + + H11[1] = -H11[1]; + H12[1] = -H12[1]; + H21[1] = -H21[1]; + H22[1] = -H22[1]; + } + + h11_prev[gr][1] = h11[1]; + h12_prev[gr][1] = h12[1]; + h21_prev[gr][1] = h21[1]; + h22_prev[gr][1] = h22[1]; + } + + /* apply H_xy to the current envelope band of the decorrelated subband */ + for (int n = border_position[env]; n < border_position[env + 1]; n++) { + /* addition finalises the interpolation over every n */ + H11[0] += deltaH11[0]; + H12[0] += deltaH12[0]; + H21[0] += deltaH21[0]; + H22[0] += deltaH22[0]; + if ((enable_ipdopd) && (bk < nr_ipdopd_par)) { + H11[1] += deltaH11[1]; + H12[1] += deltaH12[1]; + H21[1] += deltaH21[1]; + H22[1] += deltaH22[1]; + } + + /* channel is an alias to the subband */ + for (int sb = fbt.group_border[gr]; sb < maxsb; sb++) { + float[] inLeft = new float[2], inRight = new float[2]; + + /* load decorrelated samples */ + if (gr < fbt.num_hybrid_groups) { + inLeft[0] = X_hybrid_left[n][sb][0]; + inLeft[1] = X_hybrid_left[n][sb][1]; + inRight[0] = X_hybrid_right[n][sb][0]; + inRight[1] = X_hybrid_right[n][sb][1]; + } else { + inLeft[0] = X_left[n][sb][0]; + inLeft[1] = X_left[n][sb][1]; + inRight[0] = X_right[n][sb][0]; + inRight[1] = X_right[n][sb][1]; + } + + /* apply mixing */ + tempLeft[0] = (H11[0] * inLeft[0]) + (H21[0] * inRight[0]); + tempLeft[1] = (H11[0] * inLeft[1]) + (H21[0] * inRight[1]); + tempRight[0] = (H12[0] * inLeft[0]) + (H22[0] * inRight[0]); + tempRight[1] = (H12[0] * inLeft[1]) + (H22[0] * inRight[1]); + + /* only perform imaginary operations when needed */ + if ((enable_ipdopd) && (bk < nr_ipdopd_par)) { + /* apply rotation */ + tempLeft[0] -= (H11[1] * inLeft[1]) + (H21[1] * inRight[1]); + tempLeft[1] += (H11[1] * inLeft[0]) + (H21[1] * inRight[0]); + tempRight[0] -= (H12[1] * inLeft[1]) + (H22[1] * inRight[1]); + tempRight[1] += (H12[1] * inLeft[0]) + (H22[1] * inRight[0]); + } + + /* store final samples */ + if (gr < fbt.num_hybrid_groups) { + X_hybrid_left[n][sb][0] = tempLeft[0]; + X_hybrid_left[n][sb][1] = tempLeft[1]; + X_hybrid_right[n][sb][0] = tempRight[0]; + X_hybrid_right[n][sb][1] = tempRight[1]; + } else { + X_left[n][sb][0] = tempLeft[0]; + X_left[n][sb][1] = tempLeft[1]; + X_right[n][sb][0] = tempRight[0]; + X_right[n][sb][1] = tempRight[1]; + } + } + } + + /* shift phase smoother's circular buffer index */ + phase_hist++; + if (phase_hist == 2) { + phase_hist = 0; + } + } + } + } + + /* main Parametric Stereo decoding function */ + @Override + public void process(float[][][] X_left, float[][][] X_right) { + float[][][] X_hybrid_left = new float[32][32][2]; + float[][][] X_hybrid_right = new float[32][32][2]; + + /* delta decoding of the bitstream data */ + ps_data_decode(); + + /* Perform further analysis on the lowest subbands to get a higher + * frequency resolution + */ + hyb.hybrid_analysis(X_left, X_hybrid_left, fbt); + + /* decorrelate mono signal */ + ps_decorrelate(X_left, X_right, X_hybrid_left, X_hybrid_right); + + /* apply mixing and phase parameters */ + ps_mix_phase(X_left, X_right, X_hybrid_left, X_hybrid_right); + + /* hybrid synthesis, to rebuild the SBR QMF matrices */ + hyb.hybrid_synthesis(X_left, X_hybrid_left, fbt); + + hyb.hybrid_synthesis(X_right, X_hybrid_right, fbt); + } + +} diff --git a/src/main/java/net/sourceforge/jaad/aac/ps/PSTables.java b/src/main/java/net/sourceforge/jaad/aac/ps/PSTables.java index c49587e9..21bc4492 100644 --- a/src/main/java/net/sourceforge/jaad/aac/ps/PSTables.java +++ b/src/main/java/net/sourceforge/jaad/aac/ps/PSTables.java @@ -2,582 +2,531 @@ interface PSTables extends PSConstants { - /* type definitaions */ - /* static data tables */ - int[] nr_iid_par_tab = { - 10, 20, 34, 10, 20, 34, 0, 0 - }; - int[] nr_icc_par_tab = { - 10, 20, 34, 10, 20, 34, 0, 0 - }; - int[] nr_ipdopd_par_tab = { - 5, 11, 17, 5, 11, 17, 0, 0 - }; - int[][] num_env_tab = { - {0, 1, 2, 4}, - {1, 2, 3, 4} - }; - float[] filter_a = { /* a(m) = exp(-d_48kHz(m)/7) */ - 0.65143905753106f, - 0.56471812200776f, - 0.48954165955695f - }; - - int[] group_border20 = { - 6, 7, 0, 1, 2, 3, /* 6 subqmf subbands */ - 9, 8, /* 2 subqmf subbands */ - 10, 11, /* 2 subqmf subbands */ - 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 35, 64 - }; - - int[] group_border34 = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, /* 12 subqmf subbands */ - 12, 13, 14, 15, 16, 17, 18, 19, /* 8 subqmf subbands */ - 20, 21, 22, 23, /* 4 subqmf subbands */ - 24, 25, 26, 27, /* 4 subqmf subbands */ - 28, 29, 30, 31, /* 4 subqmf subbands */ - 32-27, 33-27, 34-27, 35-27, 36-27, 37-27, 38-27, 40-27, 42-27, 44-27, 46-27, 48-27, 51-27, 54-27, 57-27, 60-27, 64-27, 68-27, 91-27 - }; - - int[] map_group2bk20 = { - (NEGATE_IPD_MASK|1), (NEGATE_IPD_MASK|0), - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 - }; - - int[] map_group2bk34 = { - 0, 1, 2, 3, 4, 5, 6, 6, 7, (NEGATE_IPD_MASK|2), (NEGATE_IPD_MASK|1), (NEGATE_IPD_MASK|0), - 10, 10, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 9, - 14, 11, 12, 13, - 14, 15, 16, 13, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 - }; - - int[] delay_length_d = {3, 4, 5 /* d_48kHz */}; - /* tables */ - /* filters are mirrored in coef 6, second half left out */ - float[] p8_13_20 = { - 0.00746082949812f, - 0.02270420949825f, - 0.04546865930473f, - 0.07266113929591f, - 0.09885108575264f, - 0.11793710567217f, - 0.125f - }; - - float[] p2_13_20 = { - 0.0f, - 0.01899487526049f, - 0.0f, - -0.07293139167538f, - 0.0f, - 0.30596630545168f, - 0.5f - }; - - float[] p12_13_34 = { - 0.04081179924692f, - 0.03812810994926f, - 0.05144908135699f, - 0.06399831151592f, - 0.07428313801106f, - 0.08100347892914f, - 0.08333333333333f - }; - - float[] p8_13_34 = { - 0.01565675600122f, - 0.03752716391991f, - 0.05417891378782f, - 0.08417044116767f, - 0.10307344158036f, - 0.12222452249753f, - 0.125f - }; - - float[] p4_13_34 = { - -0.05908211155639f, - -0.04871498374946f, - 0.0f, - 0.07778723915851f, - 0.16486303567403f, - 0.23279856662996f, - 0.25f - }; - - /* RE(ps->Phi_Fract_Qmf[j]) = (float)cos(M_PI*(j+0.5)*(0.39)); */ - /* IM(ps->Phi_Fract_Qmf[j]) = (float)sin(M_PI*(j+0.5)*(0.39)); */ - float[][] Phi_Fract_Qmf = { - {0.8181497455f, 0.5750052333f}, - {-0.2638730407f, 0.9645574093f}, - {-0.9969173074f, 0.0784590989f}, - {-0.4115143716f, -0.9114032984f}, - {0.7181262970f, -0.6959127784f}, - {0.8980275989f, 0.4399391711f}, - {-0.1097343117f, 0.9939609766f}, - {-0.9723699093f, 0.2334453613f}, - {-0.5490227938f, -0.8358073831f}, - {0.6004202366f, -0.7996846437f}, - {0.9557930231f, 0.2940403223f}, - {0.0471064523f, 0.9988898635f}, - {-0.9238795042f, 0.3826834261f}, - {-0.6730124950f, -0.7396311164f}, - {0.4679298103f, -0.8837656379f}, - {0.9900236726f, 0.1409012377f}, - {0.2027872950f, 0.9792228341f}, - {-0.8526401520f, 0.5224985480f}, - {-0.7804304361f, -0.6252426505f}, - {0.3239174187f, -0.9460853338f}, - {0.9998766184f, -0.0157073177f}, - {0.3534748554f, 0.9354440570f}, - {-0.7604059577f, 0.6494480371f}, - {-0.8686315417f, -0.4954586625f}, - {0.1719291061f, -0.9851093292f}, - {0.9851093292f, -0.1719291061f}, - {0.4954586625f, 0.8686315417f}, - {-0.6494480371f, 0.7604059577f}, - {-0.9354440570f, -0.3534748554f}, - {0.0157073177f, -0.9998766184f}, - {0.9460853338f, -0.3239174187f}, - {0.6252426505f, 0.7804304361f}, - {-0.5224985480f, 0.8526401520f}, - {-0.9792228341f, -0.2027872950f}, - {-0.1409012377f, -0.9900236726f}, - {0.8837656379f, -0.4679298103f}, - {0.7396311164f, 0.6730124950f}, - {-0.3826834261f, 0.9238795042f}, - {-0.9988898635f, -0.0471064523f}, - {-0.2940403223f, -0.9557930231f}, - {0.7996846437f, -0.6004202366f}, - {0.8358073831f, 0.5490227938f}, - {-0.2334453613f, 0.9723699093f}, - {-0.9939609766f, 0.1097343117f}, - {-0.4399391711f, -0.8980275989f}, - {0.6959127784f, -0.7181262970f}, - {0.9114032984f, 0.4115143716f}, - {-0.0784590989f, 0.9969173074f}, - {-0.9645574093f, 0.2638730407f}, - {-0.5750052333f, -0.8181497455f}, - {0.5750052333f, -0.8181497455f}, - {0.9645574093f, 0.2638730407f}, - {0.0784590989f, 0.9969173074f}, - {-0.9114032984f, 0.4115143716f}, - {-0.6959127784f, -0.7181262970f}, - {0.4399391711f, -0.8980275989f}, - {0.9939609766f, 0.1097343117f}, - {0.2334453613f, 0.9723699093f}, - {-0.8358073831f, 0.5490227938f}, - {-0.7996846437f, -0.6004202366f}, - {0.2940403223f, -0.9557930231f}, - {0.9988898635f, -0.0471064523f}, - {0.3826834261f, 0.9238795042f}, - {-0.7396311164f, 0.6730124950f} - }; - - /* RE(Phi_Fract_SubQmf20[j]) = (float)cos(M_PI*f_center_20[j]*0.39); */ - /* IM(Phi_Fract_SubQmf20[j]) = (float)sin(M_PI*f_center_20[j]*0.39); */ - float[][] Phi_Fract_SubQmf20 = { - {0.9882950187f, 0.1525546312f}, - {0.8962930441f, 0.4434623122f}, - {0.7208535671f, 0.6930873394f}, - {0.4783087075f, 0.8781917691f}, - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {0.8962930441f, -0.4434623122f}, - {0.9882950187f, -0.1525546312f}, - {-0.5424415469f, 0.8400935531f}, - {0.0392598175f, 0.9992290139f}, - {-0.9268565774f, 0.3754155636f}, - {-0.9741733670f, -0.2258012742f} - }; - - /* RE(Phi_Fract_SubQmf34[j]) = (float)cos(M_PI*f_center_34[j]*0.39); */ - /* IM(Phi_Fract_SubQmf34[j]) = (float)sin(M_PI*f_center_34[j]*0.39); */ - float[][] Phi_Fract_SubQmf34 = { - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {0.3387379348f, 0.9408807755f}, - {0.3387379348f, 0.9408807755f}, - {0.3387379348f, 0.9408807755f}, - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {-0.7705132365f, 0.6374239922f}, - {-0.7705132365f, 0.6374239922f}, - {1.0000000000f, 0.0000000000f}, - {1.0000000000f, 0.0000000000f}, - {0.3387379348f, 0.9408807755f}, - {0.3387379348f, 0.9408807755f}, - {0.3387379348f, 0.9408807755f}, - {0.3387379348f, 0.9408807755f}, - {-0.7705132365f, 0.6374239922f}, - {-0.7705132365f, 0.6374239922f}, - {-0.8607420325f, -0.5090414286f}, - {0.3387379348f, 0.9408807755f}, - {0.1873813123f, -0.9822872281f}, - {-0.7705132365f, 0.6374239922f}, - {-0.8607420325f, -0.5090414286f}, - {-0.8607420325f, -0.5090414286f}, - {0.1873813123f, -0.9822872281f}, - {0.1873813123f, -0.9822872281f}, - {0.9876883626f, -0.1564344615f}, - {-0.8607420325f, -0.5090414286f} - }; - - /* RE(Q_Fract_allpass_Qmf[j][i]) = (float)cos(M_PI*(j+0.5)*(frac_delay_q[i])); */ - /* IM(Q_Fract_allpass_Qmf[j][i]) = (float)sin(M_PI*(j+0.5)*(frac_delay_q[i])); */ - float[][][] Q_Fract_allpass_Qmf = { - {{0.7804303765f, 0.6252426505f}, {0.3826834261f, 0.9238795042f}, {0.8550928831f, 0.5184748173f}}, - {{-0.4399392009f, 0.8980275393f}, {-0.9238795042f, -0.3826834261f}, {-0.0643581524f, 0.9979268909f}}, - {{-0.9723699093f, -0.2334454209f}, {0.9238795042f, -0.3826834261f}, {-0.9146071672f, 0.4043435752f}}, - {{0.0157073960f, -0.9998766184f}, {-0.3826834261f, 0.9238795042f}, {-0.7814115286f, -0.6240159869f}}, - {{0.9792228341f, -0.2027871907f}, {-0.3826834261f, -0.9238795042f}, {0.1920081824f, -0.9813933372f}}, - {{0.4115142524f, 0.9114032984f}, {0.9238795042f, 0.3826834261f}, {0.9589683414f, -0.2835132182f}}, - {{-0.7996847630f, 0.6004201174f}, {-0.9238795042f, 0.3826834261f}, {0.6947838664f, 0.7192186117f}}, - {{-0.7604058385f, -0.6494481564f}, {0.3826834261f, -0.9238795042f}, {-0.3164770305f, 0.9486001730f}}, - {{0.4679299891f, -0.8837655187f}, {0.3826834261f, 0.9238795042f}, {-0.9874414206f, 0.1579856575f}}, - {{0.9645573497f, 0.2638732493f}, {-0.9238795042f, -0.3826834261f}, {-0.5966450572f, -0.8025052547f}}, - {{-0.0471066870f, 0.9988898635f}, {0.9238795042f, -0.3826834261f}, {0.4357025325f, -0.9000906944f}}, - {{-0.9851093888f, 0.1719288528f}, {-0.3826834261f, 0.9238795042f}, {0.9995546937f, -0.0298405960f}}, - {{-0.3826831877f, -0.9238796234f}, {-0.3826834261f, -0.9238795042f}, {0.4886211455f, 0.8724960685f}}, - {{0.8181498647f, -0.5750049949f}, {0.9238795042f, 0.3826834261f}, {-0.5477093458f, 0.8366686702f}}, - {{0.7396308780f, 0.6730127335f}, {-0.9238795042f, 0.3826834261f}, {-0.9951074123f, -0.0987988561f}}, - {{-0.4954589605f, 0.8686313629f}, {0.3826834261f, -0.9238795042f}, {-0.3725017905f, -0.9280315042f}}, - {{-0.9557929039f, -0.2940406799f}, {0.3826834261f, 0.9238795042f}, {0.6506417990f, -0.7593847513f}}, - {{0.0784594864f, -0.9969173074f}, {-0.9238795042f, -0.3826834261f}, {0.9741733670f, 0.2258014232f}}, - {{0.9900237322f, -0.1409008205f}, {0.9238795042f, -0.3826834261f}, {0.2502108514f, 0.9681913853f}}, - {{0.3534744382f, 0.9354441762f}, {-0.3826834261f, 0.9238795042f}, {-0.7427945137f, 0.6695194840f}}, - {{-0.8358076215f, 0.5490224361f}, {-0.3826834261f, -0.9238795042f}, {-0.9370992780f, -0.3490629196f}}, - {{-0.7181259394f, -0.6959131360f}, {0.9238795042f, 0.3826834261f}, {-0.1237744763f, -0.9923103452f}}, - {{0.5224990249f, -0.8526399136f}, {-0.9238795042f, 0.3826834261f}, {0.8226406574f, -0.5685616732f}}, - {{0.9460852146f, 0.3239179254f}, {0.3826834261f, -0.9238795042f}, {0.8844994903f, 0.4665412009f}}, - {{-0.1097348556f, 0.9939609170f}, {0.3826834261f, 0.9238795042f}, {-0.0047125919f, 0.9999889135f}}, - {{-0.9939610362f, 0.1097337380f}, {-0.9238795042f, -0.3826834261f}, {-0.8888573647f, 0.4581840038f}}, - {{-0.3239168525f, -0.9460855722f}, {0.9238795042f, -0.3826834261f}, {-0.8172453642f, -0.5762898922f}}, - {{0.8526405096f, -0.5224980116f}, {-0.3826834261f, 0.9238795042f}, {0.1331215799f, -0.9910997152f}}, - {{0.6959123611f, 0.7181267142f}, {-0.3826834261f, -0.9238795042f}, {0.9403476119f, -0.3402152061f}}, - {{-0.5490233898f, 0.8358070254f}, {0.9238795042f, 0.3826834261f}, {0.7364512086f, 0.6764906645f}}, - {{-0.9354437590f, -0.3534754813f}, {-0.9238795042f, 0.3826834261f}, {-0.2593250275f, 0.9657900929f}}, - {{0.1409019381f, -0.9900235534f}, {0.3826834261f, -0.9238795042f}, {-0.9762582779f, 0.2166097313f}}, - {{0.9969173670f, -0.0784583688f}, {0.3826834261f, 0.9238795042f}, {-0.6434556246f, -0.7654833794f}}, - {{0.2940396070f, 0.9557932615f}, {-0.9238795042f, -0.3826834261f}, {0.3812320232f, -0.9244794250f}}, - {{-0.8686318994f, 0.4954580069f}, {0.9238795042f, -0.3826834261f}, {0.9959943891f, -0.0894154981f}}, - {{-0.6730118990f, -0.7396316528f}, {-0.3826834261f, 0.9238795042f}, {0.5397993922f, 0.8417937160f}}, - {{0.5750059485f, -0.8181492686f}, {-0.3826834261f, -0.9238795042f}, {-0.4968227744f, 0.8678520322f}}, - {{0.9238792062f, 0.3826842010f}, {0.9238795042f, 0.3826834261f}, {-0.9992290139f, -0.0392601527f}}, - {{-0.1719299555f, 0.9851091504f}, {-0.9238795042f, 0.3826834261f}, {-0.4271997511f, -0.9041572809f}}, - {{-0.9988899231f, 0.0471055657f}, {0.3826834261f, -0.9238795042f}, {0.6041822433f, -0.7968461514f}}, - {{-0.2638721764f, -0.9645576477f}, {0.3826834261f, 0.9238795042f}, {0.9859085083f, 0.1672853529f}}, - {{0.8837660551f, -0.4679289758f}, {-0.9238795042f, -0.3826834261f}, {0.3075223565f, 0.9515408874f}}, - {{0.6494473219f, 0.7604066133f}, {0.9238795042f, -0.3826834261f}, {-0.7015317082f, 0.7126382589f}}, - {{-0.6004210114f, 0.7996840477f}, {-0.3826834261f, 0.9238795042f}, {-0.9562535882f, -0.2925389707f}}, - {{-0.9114028811f, -0.4115152657f}, {-0.3826834261f, -0.9238795042f}, {-0.1827499419f, -0.9831594229f}}, - {{0.2027882934f, -0.9792225957f}, {0.9238795042f, 0.3826834261f}, {0.7872582674f, -0.6166234016f}}, - {{0.9998766780f, -0.0157062728f}, {-0.9238795042f, 0.3826834261f}, {0.9107555747f, 0.4129458666f}}, - {{0.2334443331f, 0.9723701477f}, {0.3826834261f, -0.9238795042f}, {0.0549497530f, 0.9984891415f}}, - {{-0.8980280757f, 0.4399381876f}, {0.3826834261f, 0.9238795042f}, {-0.8599416018f, 0.5103924870f}}, - {{-0.6252418160f, -0.7804310918f}, {-0.9238795042f, -0.3826834261f}, {-0.8501682281f, -0.5265110731f}}, - {{0.6252435446f, -0.7804297209f}, {0.9238795042f, -0.3826834261f}, {0.0737608299f, -0.9972759485f}}, - {{0.8980270624f, 0.4399402142f}, {-0.3826834261f, 0.9238795042f}, {0.9183775187f, -0.3957053721f}}, - {{-0.2334465086f, 0.9723696709f}, {-0.3826834261f, -0.9238795042f}, {0.7754954696f, 0.6313531399f}}, - {{-0.9998766184f, -0.0157085191f}, {0.9238795042f, 0.3826834261f}, {-0.2012493610f, 0.9795400500f}}, - {{-0.2027861029f, -0.9792230725f}, {-0.9238795042f, 0.3826834261f}, {-0.9615978599f, 0.2744622827f}}, - {{0.9114037752f, -0.4115132093f}, {0.3826834261f, -0.9238795042f}, {-0.6879743338f, -0.7257350087f}}, - {{0.6004192233f, 0.7996854186f}, {0.3826834261f, 0.9238795042f}, {0.3254036009f, -0.9455752373f}}, - {{-0.6494490504f, 0.7604051232f}, {-0.9238795042f, -0.3826834261f}, {0.9888865948f, -0.1486719251f}}, - {{-0.8837650418f, -0.4679309726f}, {0.9238795042f, -0.3826834261f}, {0.5890548825f, 0.8080930114f}}, - {{0.2638743520f, -0.9645570517f}, {-0.3826834261f, 0.9238795042f}, {-0.4441666007f, 0.8959442377f}}, - {{0.9988898039f, 0.0471078083f}, {-0.3826834261f, -0.9238795042f}, {-0.9997915030f, 0.0204183888f}}, - {{0.1719277352f, 0.9851095676f}, {0.9238795042f, 0.3826834261f}, {-0.4803760946f, -0.8770626187f}}, - {{-0.9238800406f, 0.3826821446f}, {-0.9238795042f, 0.3826834261f}, {0.5555707216f, -0.8314692974f}}, - {{-0.5750041008f, -0.8181505203f}, {0.3826834261f, -0.9238795042f}, {0.9941320419f, 0.1081734300f}} - }; - - /* RE(Q_Fract_allpass_SubQmf20[j][i]) = (float)cos(M_PI*f_center_20[j]*frac_delay_q[i]); */ - /* IM(Q_Fract_allpass_SubQmf20[j][i]) = (float)sin(M_PI*f_center_20[j]*frac_delay_q[i]); */ - float[][][] Q_Fract_allpass_SubQmf20 = { - {{0.9857769012f, 0.1680592746f}, {0.9569403529f, 0.2902846634f}, {0.9907300472f, 0.1358452588f}}, - {{0.8744080663f, 0.4851911962f}, {0.6343932748f, 0.7730104327f}, {0.9175986052f, 0.3975082636f}}, - {{0.6642524004f, 0.7475083470f}, {0.0980171412f, 0.9951847196f}, {0.7767338753f, 0.6298289299f}}, - {{0.3790524006f, 0.9253752232f}, {-0.4713967443f, 0.8819212914f}, {0.5785340071f, 0.8156582713f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{0.8744080663f, -0.4851911962f}, {0.6343932748f, -0.7730104327f}, {0.9175986052f, -0.3975082636f}}, - {{0.9857769012f, -0.1680592746f}, {0.9569403529f, -0.2902846634f}, {0.9907300472f, -0.1358452588f}}, - {{-0.7126385570f, 0.7015314102f}, {-0.5555702448f, -0.8314695954f}, {-0.3305967748f, 0.9437720776f}}, - {{-0.1175374240f, 0.9930684566f}, {-0.9807852507f, 0.1950903237f}, {0.2066311091f, 0.9784189463f}}, - {{-0.9947921634f, 0.1019244045f}, {0.5555702448f, -0.8314695954f}, {-0.7720130086f, 0.6356067061f}}, - {{-0.8400934935f, -0.5424416065f}, {0.9807852507f, 0.1950903237f}, {-0.9896889329f, 0.1432335079f}} - }; - - /* RE(Q_Fract_allpass_SubQmf34[j][i]) = (float)cos(M_PI*f_center_34[j]*frac_delay_q[i]); */ - /* IM(Q_Fract_allpass_SubQmf34[j][i]) = (float)sin(M_PI*f_center_34[j]*frac_delay_q[i]); */ - float[][][] Q_Fract_allpass_SubQmf34 = { - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, - {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, - {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, - {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, - {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, - {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, - {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, - {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, - {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, - {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, - {{-0.6129069924f, -0.7901550531f}, {0.7071067691f, 0.7071067691f}, {-0.9917160273f, -0.1284494549f}}, - {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, - {{0.6374240518f, -0.7705131769f}, {-1.0000000000f, 0.0000000000f}, {-0.3446428776f, -0.9387338758f}}, - {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, - {{-0.6129069924f, -0.7901550531f}, {0.7071067691f, 0.7071067691f}, {-0.9917160273f, -0.1284494549f}}, - {{-0.6129069924f, -0.7901550531f}, {0.7071067691f, 0.7071067691f}, {-0.9917160273f, -0.1284494549f}}, - {{0.6374240518f, -0.7705131769f}, {-1.0000000000f, 0.0000000000f}, {-0.3446428776f, -0.9387338758f}}, - {{0.6374240518f, -0.7705131769f}, {-1.0000000000f, 0.0000000000f}, {-0.3446428776f, -0.9387338758f}}, - {{0.8910064697f, 0.4539906085f}, {0.7071067691f, -0.7071067691f}, {0.6730125546f, -0.7396310568f}}, - {{-0.6129069924f, -0.7901550531f}, {0.7071067691f, 0.7071067691f}, {-0.9917160273f, -0.1284494549f}} - }; - - float[] cos_alphas = { - 1.0000000000f, 0.9841239700f, 0.9594738210f, - 0.8946843079f, 0.8269340931f, 0.7071067812f, - 0.4533210856f, 0.0000000000f - }; - - float[] sin_alphas = { - 0.0000000000f, 0.1774824264f, 0.2817977763f, - 0.4466989918f, 0.5622988580f, 0.7071067812f, - 0.8913472911f, 1.0000000000f - }; - - float[][] cos_betas_normal = { - {1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f}, - {1.0000000000f, 0.9995871699f, 0.9989419133f, 0.9972204583f, 0.9953790839f, 0.9920112747f, 0.9843408180f, 0.9681727381f}, - {1.0000000000f, 0.9984497744f, 0.9960279377f, 0.9895738413f, 0.9826814632f, 0.9701058164f, 0.9416098832f, 0.8822105900f}, - {1.0000000000f, 0.9959398908f, 0.9896038018f, 0.9727589768f, 0.9548355329f, 0.9223070404f, 0.8494349490f, 0.7013005535f}, - {1.0000000000f, 0.9932417400f, 0.9827071856f, 0.9547730996f, 0.9251668930f, 0.8717461589f, 0.7535520592f, 0.5198827312f}, - {1.0000000000f, 0.9902068095f, 0.9749613872f, 0.9346538534f, 0.8921231300f, 0.8158851259f, 0.6495964302f, 0.3313370772f}, - {1.0000000000f, 0.9880510933f, 0.9694670261f, 0.9204347876f, 0.8688622825f, 0.7768516704f, 0.5782161800f, 0.2069970356f}, - {1.0000000000f, 0.9858996945f, 0.9639898866f, 0.9063034786f, 0.8458214608f, 0.7384262300f, 0.5089811277f, 0.0905465944f} - }; - - float[][] sin_betas_normal = { - {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f}, - {0.0000000000f, -0.0287313368f, -0.0459897147f, -0.0745074328f, -0.0960233266f, -0.1261492408f, -0.1762757894f, -0.2502829383f}, - {0.0000000000f, -0.0556601118f, -0.0890412670f, -0.1440264301f, -0.1853028382f, -0.2426823129f, -0.3367058477f, -0.4708550466f}, - {0.0000000000f, -0.0900207420f, -0.1438204281f, -0.2318188366f, -0.2971348264f, -0.3864579191f, -0.5276933461f, -0.7128657193f}, - {0.0000000000f, -0.1160639735f, -0.1851663774f, -0.2973353800f, -0.3795605619f, -0.4899577884f, -0.6573882369f, -0.8542376401f}, - {0.0000000000f, -0.1396082894f, -0.2223742196f, -0.3555589603f, -0.4517923427f, -0.5782140273f, -0.7602792104f, -0.9435124489f}, - {0.0000000000f, -0.1541266914f, -0.2452217065f, -0.3908961522f, -0.4950538699f, -0.6296836366f, -0.8158836002f, -0.9783415698f}, - {0.0000000000f, -0.1673373610f, -0.2659389001f, -0.4226275012f, -0.5334660781f, -0.6743342664f, -0.8607776784f, -0.9958922202f} - }; - - float[][] cos_betas_fine = { - {1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f}, - {1.0000000000f, 0.9995871699f, 0.9989419133f, 0.9972204583f, 0.9953790839f, 0.9920112747f, 0.9843408180f, 0.9681727381f}, - {1.0000000000f, 0.9984497744f, 0.9960279377f, 0.9895738413f, 0.9826814632f, 0.9701058164f, 0.9416098832f, 0.8822105900f}, - {1.0000000000f, 0.9968361371f, 0.9918968104f, 0.9787540479f, 0.9647515190f, 0.9392903010f, 0.8820167114f, 0.7645325390f}, - {1.0000000000f, 0.9950262915f, 0.9872675041f, 0.9666584578f, 0.9447588606f, 0.9050918405f, 0.8165997379f, 0.6383824796f}, - {1.0000000000f, 0.9932417400f, 0.9827071856f, 0.9547730996f, 0.9251668930f, 0.8717461589f, 0.7535520592f, 0.5198827312f}, - {1.0000000000f, 0.9908827998f, 0.9766855904f, 0.9391249214f, 0.8994531782f, 0.8282352693f, 0.6723983174f, 0.3719473225f}, - {1.0000000000f, 0.9890240165f, 0.9719459866f, 0.9268448110f, 0.8793388536f, 0.7944023271f, 0.6101812098f, 0.2621501145f}, - {1.0000000000f, 0.9876350461f, 0.9684073447f, 0.9176973944f, 0.8643930070f, 0.7693796058f, 0.5646720713f, 0.1838899556f}, - {1.0000000000f, 0.9866247085f, 0.9658349704f, 0.9110590761f, 0.8535668048f, 0.7513165426f, 0.5320914819f, 0.1289530943f}, - {1.0000000000f, 0.9858996945f, 0.9639898866f, 0.9063034786f, 0.8458214608f, 0.7384262300f, 0.5089811277f, 0.0905465944f}, - {1.0000000000f, 0.9851245614f, 0.9620180268f, 0.9012265590f, 0.8375623272f, 0.7247108045f, 0.4845204297f, 0.0504115003f}, - {1.0000000000f, 0.9846869856f, 0.9609052357f, 0.8983639533f, 0.8329098386f, 0.7169983441f, 0.4708245354f, 0.0281732509f}, - {1.0000000000f, 0.9844406325f, 0.9602788522f, 0.8967533934f, 0.8302936455f, 0.7126658102f, 0.4631492839f, 0.0157851140f}, - {1.0000000000f, 0.9843020502f, 0.9599265269f, 0.8958477331f, 0.8288229094f, 0.7102315840f, 0.4588429315f, 0.0088578059f}, - {1.0000000000f, 0.9842241136f, 0.9597283916f, 0.8953385094f, 0.8279961409f, 0.7088635748f, 0.4564246834f, 0.0049751355f} - }; - - float[][] sin_betas_fine = { - {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f}, - {0.0000000000f, -0.0287313368f, -0.0459897147f, -0.0745074328f, -0.0960233266f, -0.1261492408f, -0.1762757894f, -0.2502829383f}, - {0.0000000000f, -0.0556601118f, -0.0890412670f, -0.1440264301f, -0.1853028382f, -0.2426823129f, -0.3367058477f, -0.4708550466f}, - {0.0000000000f, -0.0794840594f, -0.1270461238f, -0.2050378347f, -0.2631625097f, -0.3431234916f, -0.4712181245f, -0.6445851354f}, - {0.0000000000f, -0.0996126459f, -0.1590687758f, -0.2560691819f, -0.3277662204f, -0.4252161335f, -0.5772043556f, -0.7697193058f}, - {0.0000000000f, -0.1160639735f, -0.1851663774f, -0.2973353800f, -0.3795605619f, -0.4899577884f, -0.6573882369f, -0.8542376401f}, - {0.0000000000f, -0.1347266752f, -0.2146747714f, -0.3435758752f, -0.4370171396f, -0.5603805303f, -0.7401895046f, -0.9282538388f}, - {0.0000000000f, -0.1477548470f, -0.2352041647f, -0.3754446647f, -0.4761965776f, -0.6073919186f, -0.7922618830f, -0.9650271071f}, - {0.0000000000f, -0.1567705832f, -0.2493736450f, -0.3972801182f, -0.5028167951f, -0.6387918458f, -0.8253153651f, -0.9829468369f}, - {0.0000000000f, -0.1630082348f, -0.2591578860f, -0.4122758299f, -0.5209834064f, -0.6599420072f, -0.8466868694f, -0.9916506943f}, - {0.0000000000f, -0.1673373610f, -0.2659389001f, -0.4226275012f, -0.5334660781f, -0.6743342664f, -0.8607776784f, -0.9958922202f}, - {0.0000000000f, -0.1718417832f, -0.2729859267f, -0.4333482310f, -0.5463417868f, -0.6890531546f, -0.8747799456f, -0.9987285320f}, - {0.0000000000f, -0.1743316967f, -0.2768774604f, -0.4392518725f, -0.5534087104f, -0.6970748701f, -0.8822268738f, -0.9996030552f}, - {0.0000000000f, -0.1757175038f, -0.2790421580f, -0.4425306221f, -0.5573261722f, -0.7015037013f, -0.8862802834f, -0.9998754073f}, - {0.0000000000f, -0.1764921355f, -0.2802517850f, -0.4443611583f, -0.5595110229f, -0.7039681080f, -0.8885173967f, -0.9999607689f}, - {0.0000000000f, -0.1769262394f, -0.2809295540f, -0.4453862969f, -0.5607337966f, -0.7053456119f, -0.8897620516f, -0.9999876239f} - }; - - float[][] sincos_alphas_B_normal = { - {0.0561454100f, 0.0526385859f, 0.0472937334f, 0.0338410641f, 0.0207261065f, 0.0028205635f, 0.0028205635f, 0.0028205635f}, - {0.1249065138f, 0.1173697697f, 0.1057888284f, 0.0761985131f, 0.0468732723f, 0.0063956103f, 0.0063956103f, 0.0063956103f}, - {0.1956693050f, 0.1846090179f, 0.1673645109f, 0.1220621836f, 0.0757362479f, 0.0103882630f, 0.0103882630f, 0.0103882630f}, - {0.3015113269f, 0.2870525790f, 0.2637738799f, 0.1984573949f, 0.1260749909f, 0.0175600126f, 0.0175600126f, 0.0175600126f}, - {0.4078449476f, 0.3929852420f, 0.3680589270f, 0.2911029124f, 0.1934512363f, 0.0278686716f, 0.0278686716f, 0.0278686716f}, - {0.5336171261f, 0.5226637762f, 0.5033652606f, 0.4349162672f, 0.3224682122f, 0.0521999036f, 0.0521999036f, 0.0521999036f}, - {0.6219832023f, 0.6161847276f, 0.6057251063f, 0.5654342668f, 0.4826149915f, 0.1058044758f, 0.1058044758f, 0.1058044758f}, - {0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f}, - {0.7830305572f, 0.7876016373f, 0.7956739618f, 0.8247933372f, 0.8758325942f, 0.9943869542f, 0.9943869542f, 0.9943869542f}, - {0.8457261833f, 0.8525388778f, 0.8640737401f, 0.9004708933f, 0.9465802987f, 0.9986366532f, 0.9986366532f, 0.9986366532f}, - {0.9130511848f, 0.9195447612f, 0.9298024282f, 0.9566917233f, 0.9811098801f, 0.9996115928f, 0.9996115928f, 0.9996115928f}, - {0.9534625907f, 0.9579148236f, 0.9645845234f, 0.9801095128f, 0.9920207064f, 0.9998458099f, 0.9998458099f, 0.9998458099f}, - {0.9806699215f, 0.9828120260f, 0.9858950861f, 0.9925224431f, 0.9971278825f, 0.9999460406f, 0.9999460406f, 0.9999460406f}, - {0.9921685024f, 0.9930882705f, 0.9943886135f, 0.9970926648f, 0.9989008403f, 0.9999795479f, 0.9999795479f, 0.9999795479f}, - {0.9984226014f, 0.9986136287f, 0.9988810254f, 0.9994272242f, 0.9997851906f, 0.9999960221f, 0.9999960221f, 0.9999960221f} - }; - - float[][] sincos_alphas_B_fine = { - {0.0031622158f, 0.0029630181f, 0.0026599892f, 0.0019002704f, 0.0011626042f, 0.0001580278f, 0.0001580278f, 0.0001580278f}, - {0.0056232673f, 0.0052689825f, 0.0047302825f, 0.0033791756f, 0.0020674015f, 0.0002811710f, 0.0002811710f, 0.0002811710f}, - {0.0099994225f, 0.0093696693f, 0.0084117414f, 0.0060093796f, 0.0036766009f, 0.0005000392f, 0.0005000392f, 0.0005000392f}, - {0.0177799194f, 0.0166607102f, 0.0149581377f, 0.0106875809f, 0.0065392545f, 0.0008893767f, 0.0008893767f, 0.0008893767f}, - {0.0316069684f, 0.0296211579f, 0.0265987295f, 0.0190113813f, 0.0116349973f, 0.0015826974f, 0.0015826974f, 0.0015826974f}, - {0.0561454100f, 0.0526385859f, 0.0472937334f, 0.0338410641f, 0.0207261065f, 0.0028205635f, 0.0028205635f, 0.0028205635f}, - {0.0791834041f, 0.0742798103f, 0.0667907269f, 0.0478705292f, 0.0293500747f, 0.0039966755f, 0.0039966755f, 0.0039966755f}, - {0.1115021177f, 0.1047141985f, 0.0943053154f, 0.0678120561f, 0.0416669150f, 0.0056813213f, 0.0056813213f, 0.0056813213f}, - {0.1565355066f, 0.1473258371f, 0.1330924027f, 0.0963282233f, 0.0594509113f, 0.0081277946f, 0.0081277946f, 0.0081277946f}, - {0.2184643682f, 0.2064579524f, 0.1876265439f, 0.1375744167f, 0.0856896681f, 0.0117817338f, 0.0117817338f, 0.0117817338f}, - {0.3015113269f, 0.2870525790f, 0.2637738799f, 0.1984573949f, 0.1260749909f, 0.0175600126f, 0.0175600126f, 0.0175600126f}, - {0.3698741335f, 0.3547727297f, 0.3298252076f, 0.2556265829f, 0.1665990017f, 0.0236344541f, 0.0236344541f, 0.0236344541f}, - {0.4480623975f, 0.4339410024f, 0.4098613774f, 0.3322709108f, 0.2266784729f, 0.0334094131f, 0.0334094131f, 0.0334094131f}, - {0.5336171261f, 0.5226637762f, 0.5033652606f, 0.4349162672f, 0.3224682122f, 0.0521999036f, 0.0521999036f, 0.0521999036f}, - {0.6219832023f, 0.6161847276f, 0.6057251063f, 0.5654342668f, 0.4826149915f, 0.1058044758f, 0.1058044758f, 0.1058044758f}, - {0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f}, - {0.7830305572f, 0.7876016373f, 0.7956739618f, 0.8247933372f, 0.8758325942f, 0.9943869542f, 0.9943869542f, 0.9943869542f}, - {0.8457261833f, 0.8525388778f, 0.8640737401f, 0.9004708933f, 0.9465802987f, 0.9986366532f, 0.9986366532f, 0.9986366532f}, - {0.8940022267f, 0.9009412572f, 0.9121477564f, 0.9431839770f, 0.9739696219f, 0.9994417480f, 0.9994417480f, 0.9994417480f}, - {0.9290818561f, 0.9349525662f, 0.9440420138f, 0.9667755833f, 0.9860247275f, 0.9997206664f, 0.9997206664f, 0.9997206664f}, - {0.9534625907f, 0.9579148236f, 0.9645845234f, 0.9801095128f, 0.9920207064f, 0.9998458099f, 0.9998458099f, 0.9998458099f}, - {0.9758449068f, 0.9784554646f, 0.9822404252f, 0.9904914275f, 0.9963218730f, 0.9999305926f, 0.9999305926f, 0.9999305926f}, - {0.9876723320f, 0.9890880155f, 0.9911036356f, 0.9953496173f, 0.9982312259f, 0.9999669685f, 0.9999669685f, 0.9999669685f}, - {0.9937641889f, 0.9945023501f, 0.9955433130f, 0.9976981117f, 0.9991315558f, 0.9999838610f, 0.9999838610f, 0.9999838610f}, - {0.9968600642f, 0.9972374385f, 0.9977670024f, 0.9988535464f, 0.9995691924f, 0.9999920129f, 0.9999920129f, 0.9999920129f}, - {0.9984226014f, 0.9986136287f, 0.9988810254f, 0.9994272242f, 0.9997851906f, 0.9999960221f, 0.9999960221f, 0.9999960221f}, - {0.9995003746f, 0.9995611974f, 0.9996461891f, 0.9998192657f, 0.9999323103f, 0.9999987475f, 0.9999987475f, 0.9999987475f}, - {0.9998419236f, 0.9998611991f, 0.9998881193f, 0.9999428861f, 0.9999786185f, 0.9999996045f, 0.9999996045f, 0.9999996045f}, - {0.9999500038f, 0.9999561034f, 0.9999646206f, 0.9999819429f, 0.9999932409f, 0.9999998750f, 0.9999998750f, 0.9999998750f}, - {0.9999841890f, 0.9999861183f, 0.9999888121f, 0.9999942902f, 0.9999978628f, 0.9999999605f, 0.9999999605f, 0.9999999605f}, - {0.9999950000f, 0.9999956102f, 0.9999964621f, 0.9999981945f, 0.9999993242f, 0.9999999875f, 0.9999999875f, 0.9999999875f} - }; - - float[][] cos_gammas_normal = { - {1.0000000000f, 0.9841239707f, 0.9594738226f, 0.8946843024f, 0.8269341029f, 0.7245688486f, 0.7245688486f, 0.7245688486f}, - {1.0000000000f, 0.9849690570f, 0.9617776789f, 0.9020941550f, 0.8436830391f, 0.7846832804f, 0.7846832804f, 0.7846832804f}, - {1.0000000000f, 0.9871656089f, 0.9676774734f, 0.9199102884f, 0.8785067015f, 0.8464232214f, 0.8464232214f, 0.8464232214f}, - {1.0000000000f, 0.9913533967f, 0.9786000177f, 0.9496063381f, 0.9277157252f, 0.9133354077f, 0.9133354077f, 0.9133354077f}, - {1.0000000000f, 0.9948924435f, 0.9875319180f, 0.9716329849f, 0.9604805241f, 0.9535949574f, 0.9535949574f, 0.9535949574f}, - {1.0000000000f, 0.9977406278f, 0.9945423840f, 0.9878736667f, 0.9833980494f, 0.9807207440f, 0.9807207440f, 0.9807207440f}, - {1.0000000000f, 0.9990607067f, 0.9977417734f, 0.9950323970f, 0.9932453273f, 0.9921884740f, 0.9921884740f, 0.9921884740f}, - {1.0000000000f, 0.9998081748f, 0.9995400312f, 0.9989936459f, 0.9986365356f, 0.9984265591f, 0.9984265591f, 0.9984265591f} - }; - - float[][] cos_gammas_fine = { - {1.0000000000f, 0.9841239707f, 0.9594738226f, 0.8946843024f, 0.8269341029f, 0.7245688486f, 0.7245688486f, 0.7245688486f}, - {1.0000000000f, 0.9849690570f, 0.9617776789f, 0.9020941550f, 0.8436830391f, 0.7846832804f, 0.7846832804f, 0.7846832804f}, - {1.0000000000f, 0.9871656089f, 0.9676774734f, 0.9199102884f, 0.8785067015f, 0.8464232214f, 0.8464232214f, 0.8464232214f}, - {1.0000000000f, 0.9899597309f, 0.9750098690f, 0.9402333855f, 0.9129698759f, 0.8943765944f, 0.8943765944f, 0.8943765944f}, - {1.0000000000f, 0.9926607607f, 0.9819295710f, 0.9580160104f, 0.9404993670f, 0.9293004472f, 0.9293004472f, 0.9293004472f}, - {1.0000000000f, 0.9948924435f, 0.9875319180f, 0.9716329849f, 0.9604805241f, 0.9535949574f, 0.9535949574f, 0.9535949574f}, - {1.0000000000f, 0.9972074644f, 0.9932414270f, 0.9849197629f, 0.9792926592f, 0.9759092525f, 0.9759092525f, 0.9759092525f}, - {1.0000000000f, 0.9985361982f, 0.9964742028f, 0.9922136306f, 0.9893845420f, 0.9877041371f, 0.9877041371f, 0.9877041371f}, - {1.0000000000f, 0.9992494366f, 0.9981967170f, 0.9960386625f, 0.9946185834f, 0.9937800239f, 0.9937800239f, 0.9937800239f}, - {1.0000000000f, 0.9996194722f, 0.9990869422f, 0.9979996269f, 0.9972873651f, 0.9968679747f, 0.9968679747f, 0.9968679747f}, - {1.0000000000f, 0.9998081748f, 0.9995400312f, 0.9989936459f, 0.9986365356f, 0.9984265591f, 0.9984265591f, 0.9984265591f}, - {1.0000000000f, 0.9999390971f, 0.9998540271f, 0.9996809352f, 0.9995679735f, 0.9995016284f, 0.9995016284f, 0.9995016284f}, - {1.0000000000f, 0.9999807170f, 0.9999537862f, 0.9998990191f, 0.9998632947f, 0.9998423208f, 0.9998423208f, 0.9998423208f}, - {1.0000000000f, 0.9999938979f, 0.9999853814f, 0.9999680568f, 0.9999567596f, 0.9999501270f, 0.9999501270f, 0.9999501270f}, - {1.0000000000f, 0.9999980703f, 0.9999953731f, 0.9999898968f, 0.9999863277f, 0.9999842265f, 0.9999842265f, 0.9999842265f}, - {1.0000000000f, 0.9999993891f, 0.9999985397f, 0.9999968037f, 0.9999956786f, 0.9999950155f, 0.9999950155f, 0.9999950155f} - }; - - float[][] sin_gammas_normal = { - {0.0000000000f, 0.1774824223f, 0.2817977711f, 0.4466990028f, 0.5622988435f, 0.6892024258f, 0.6892024258f, 0.6892024258f}, - {0.0000000000f, 0.1727308798f, 0.2738315110f, 0.4315392630f, 0.5368416242f, 0.6198968861f, 0.6198968861f, 0.6198968861f}, - {0.0000000000f, 0.1596999079f, 0.2521910140f, 0.3921288836f, 0.4777300236f, 0.5325107795f, 0.5325107795f, 0.5325107795f}, - {0.0000000000f, 0.1312190642f, 0.2057717310f, 0.3134450552f, 0.3732874674f, 0.4072080955f, 0.4072080955f, 0.4072080955f}, - {0.0000000000f, 0.1009407043f, 0.1574189028f, 0.2364938532f, 0.2783471983f, 0.3010924396f, 0.3010924396f, 0.3010924396f}, - {0.0000000000f, 0.0671836269f, 0.1043333428f, 0.1552598422f, 0.1814615013f, 0.1954144885f, 0.1954144885f, 0.1954144885f}, - {0.0000000000f, 0.0433324862f, 0.0671666110f, 0.0995516398f, 0.1160332699f, 0.1247478739f, 0.1247478739f, 0.1247478739f}, - {0.0000000000f, 0.0195860576f, 0.0303269852f, 0.0448519274f, 0.0522022017f, 0.0560750040f, 0.0560750040f, 0.0560750040f} - }; - - float[][] sin_gammas_fine = { - {0.0000000000f, 0.1774824223f, 0.2817977711f, 0.4466990028f, 0.5622988435f, 0.6892024258f, 0.6892024258f, 0.6892024258f}, - {0.0000000000f, 0.1727308798f, 0.2738315110f, 0.4315392630f, 0.5368416242f, 0.6198968861f, 0.6198968861f, 0.6198968861f}, - {0.0000000000f, 0.1596999079f, 0.2521910140f, 0.3921288836f, 0.4777300236f, 0.5325107795f, 0.5325107795f, 0.5325107795f}, - {0.0000000000f, 0.1413496768f, 0.2221615526f, 0.3405307340f, 0.4080269669f, 0.4473147744f, 0.4473147744f, 0.4473147744f}, - {0.0000000000f, 0.1209322714f, 0.1892467110f, 0.2867147079f, 0.3397954394f, 0.3693246252f, 0.3693246252f, 0.3693246252f}, - {0.0000000000f, 0.1009407043f, 0.1574189028f, 0.2364938532f, 0.2783471983f, 0.3010924396f, 0.3010924396f, 0.3010924396f}, - {0.0000000000f, 0.0746811420f, 0.1160666523f, 0.1730117353f, 0.2024497161f, 0.2181768341f, 0.2181768341f, 0.2181768341f}, - {0.0000000000f, 0.0540875291f, 0.0838997203f, 0.1245476266f, 0.1453211203f, 0.1563346972f, 0.1563346972f, 0.1563346972f}, - {0.0000000000f, 0.0387371058f, 0.0600276114f, 0.0889212171f, 0.1036044086f, 0.1113609634f, 0.1113609634f, 0.1113609634f}, - {0.0000000000f, 0.0275846110f, 0.0427233177f, 0.0632198125f, 0.0736064637f, 0.0790837596f, 0.0790837596f, 0.0790837596f}, - {0.0000000000f, 0.0195860576f, 0.0303269852f, 0.0448519274f, 0.0522022017f, 0.0560750040f, 0.0560750040f, 0.0560750040f}, - {0.0000000000f, 0.0110363955f, 0.0170857974f, 0.0252592108f, 0.0293916021f, 0.0315673054f, 0.0315673054f, 0.0315673054f}, - {0.0000000000f, 0.0062101284f, 0.0096138203f, 0.0142109649f, 0.0165345659f, 0.0177576316f, 0.0177576316f, 0.0177576316f}, - {0.0000000000f, 0.0034934509f, 0.0054071189f, 0.0079928316f, 0.0092994041f, 0.0099871631f, 0.0099871631f, 0.0099871631f}, - {0.0000000000f, 0.0019645397f, 0.0030419905f, 0.0044951511f, 0.0052291853f, 0.0056166498f, 0.0056166498f, 0.0056166498f}, - {0.0000000000f, 0.0011053943f, 0.0017089869f, 0.0025283670f, 0.0029398552f, 0.0031573685f, 0.0031573685f, 0.0031573685f} - }; - - float[] sf_iid_normal = { - 1.4119827747f, 1.4031381607f, 1.3868767023f, - 1.3483997583f, 1.2912493944f, 1.1960374117f, - 1.1073724031f, 1.0000000000f, 0.8796171546f, - 0.7546485662f, 0.5767799020f, 0.4264014363f, - 0.2767182887f, 0.1766446233f, 0.0794016272f - }; - - float[] sf_iid_fine = { - 1.4142065048f, 1.4141912460f, 1.4141428471f, - 1.4139900208f, 1.4135069847f, 1.4119827747f, - 1.4097729921f, 1.4053947926f, 1.3967796564f, - 1.3800530434f, 1.3483997583f, 1.3139201403f, - 1.2643101215f, 1.1960374117f, 1.1073724031f, - 1.0000000000f, 0.8796171546f, 0.7546485662f, - 0.6336560845f, 0.5230810642f, 0.4264014363f, - 0.3089554012f, 0.2213746458f, 0.1576878875f, - 0.1119822487f, 0.0794016272f, 0.0446990170f, - 0.0251446925f, 0.0141414283f, 0.0079525812f, - 0.0044721137f - }; - float[] ipdopd_cos_tab = { - 1.000000000000000f, - 0.707106781186548f, - 0.000000000000000f, - -0.707106781186547f, - -1.000000000000000f, - -0.707106781186548f, - -0.000000000000000f, - 0.707106781186547f, - 1.000000000000000f - }; - - float[] ipdopd_sin_tab = { - 0.000000000000000f, - 0.707106781186547f, - 1.000000000000000f, - 0.707106781186548f, - 0.000000000000000f, - -0.707106781186547f, - -1.000000000000000f, - -0.707106781186548f, - -0.000000000000000f - }; + /* type definitaions */ + /* static data tables */ + int[] nr_iid_par_tab = { + 10, 20, 34, 10, 20, 34, 0, 0 + }; + int[] nr_icc_par_tab = { + 10, 20, 34, 10, 20, 34, 0, 0 + }; + int[] nr_ipdopd_par_tab = { + 5, 11, 17, 5, 11, 17, 0, 0 + }; + int[][] num_env_tab = { + {0, 1, 2, 4}, + {1, 2, 3, 4} + }; + float[] filter_a = { /* a(m) = exp(-d_48kHz(m)/7) */ + 0.65143905753106f, + 0.56471812200776f, + 0.48954165955695f + }; + + int[] group_border20 = { + 6, 7, 0, 1, 2, 3, /* 6 subqmf subbands */ + 9, 8, /* 2 subqmf subbands */ + 10, 11, /* 2 subqmf subbands */ + 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 35, 64 + }; + + int[] group_border34 = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, /* 12 subqmf subbands */ + 12, 13, 14, 15, 16, 17, 18, 19, /* 8 subqmf subbands */ + 20, 21, 22, 23, /* 4 subqmf subbands */ + 24, 25, 26, 27, /* 4 subqmf subbands */ + 28, 29, 30, 31, /* 4 subqmf subbands */ + 32 - 27, 33 - 27, 34 - 27, 35 - 27, 36 - 27, 37 - 27, 38 - 27, 40 - 27, 42 - 27, 44 - 27, 46 - 27, 48 - 27, 51 - 27, 54 - 27, 57 - 27, 60 - 27, 64 - 27, 68 - 27, 91 - 27 + }; + + int[] map_group2bk20 = { + (NEGATE_IPD_MASK | 1), (NEGATE_IPD_MASK | 0), + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 + }; + + int[] map_group2bk34 = { + 0, 1, 2, 3, 4, 5, 6, 6, 7, (NEGATE_IPD_MASK | 2), (NEGATE_IPD_MASK | 1), (NEGATE_IPD_MASK | 0), + 10, 10, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 9, + 14, 11, 12, 13, + 14, 15, 16, 13, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 + }; + + int[] delay_length_d = {3, 4, 5 /* d_48kHz */}; + + /* RE(ps->Phi_Fract_Qmf[j]) = (float)cos(M_PI*(j+0.5)*(0.39)); */ + /* IM(ps->Phi_Fract_Qmf[j]) = (float)sin(M_PI*(j+0.5)*(0.39)); */ + float[][] Phi_Fract_Qmf = { + {0.8181497455f, 0.5750052333f}, + {-0.2638730407f, 0.9645574093f}, + {-0.9969173074f, 0.0784590989f}, + {-0.4115143716f, -0.9114032984f}, + {0.7181262970f, -0.6959127784f}, + {0.8980275989f, 0.4399391711f}, + {-0.1097343117f, 0.9939609766f}, + {-0.9723699093f, 0.2334453613f}, + {-0.5490227938f, -0.8358073831f}, + {0.6004202366f, -0.7996846437f}, + {0.9557930231f, 0.2940403223f}, + {0.0471064523f, 0.9988898635f}, + {-0.9238795042f, 0.3826834261f}, + {-0.6730124950f, -0.7396311164f}, + {0.4679298103f, -0.8837656379f}, + {0.9900236726f, 0.1409012377f}, + {0.2027872950f, 0.9792228341f}, + {-0.8526401520f, 0.5224985480f}, + {-0.7804304361f, -0.6252426505f}, + {0.3239174187f, -0.9460853338f}, + {0.9998766184f, -0.0157073177f}, + {0.3534748554f, 0.9354440570f}, + {-0.7604059577f, 0.6494480371f}, + {-0.8686315417f, -0.4954586625f}, + {0.1719291061f, -0.9851093292f}, + {0.9851093292f, -0.1719291061f}, + {0.4954586625f, 0.8686315417f}, + {-0.6494480371f, 0.7604059577f}, + {-0.9354440570f, -0.3534748554f}, + {0.0157073177f, -0.9998766184f}, + {0.9460853338f, -0.3239174187f}, + {0.6252426505f, 0.7804304361f}, + {-0.5224985480f, 0.8526401520f}, + {-0.9792228341f, -0.2027872950f}, + {-0.1409012377f, -0.9900236726f}, + {0.8837656379f, -0.4679298103f}, + {0.7396311164f, 0.6730124950f}, + {-0.3826834261f, 0.9238795042f}, + {-0.9988898635f, -0.0471064523f}, + {-0.2940403223f, -0.9557930231f}, + {0.7996846437f, -0.6004202366f}, + {0.8358073831f, 0.5490227938f}, + {-0.2334453613f, 0.9723699093f}, + {-0.9939609766f, 0.1097343117f}, + {-0.4399391711f, -0.8980275989f}, + {0.6959127784f, -0.7181262970f}, + {0.9114032984f, 0.4115143716f}, + {-0.0784590989f, 0.9969173074f}, + {-0.9645574093f, 0.2638730407f}, + {-0.5750052333f, -0.8181497455f}, + {0.5750052333f, -0.8181497455f}, + {0.9645574093f, 0.2638730407f}, + {0.0784590989f, 0.9969173074f}, + {-0.9114032984f, 0.4115143716f}, + {-0.6959127784f, -0.7181262970f}, + {0.4399391711f, -0.8980275989f}, + {0.9939609766f, 0.1097343117f}, + {0.2334453613f, 0.9723699093f}, + {-0.8358073831f, 0.5490227938f}, + {-0.7996846437f, -0.6004202366f}, + {0.2940403223f, -0.9557930231f}, + {0.9988898635f, -0.0471064523f}, + {0.3826834261f, 0.9238795042f}, + {-0.7396311164f, 0.6730124950f} + }; + + /* RE(Phi_Fract_SubQmf20[j]) = (float)cos(M_PI*f_center_20[j]*0.39); */ + /* IM(Phi_Fract_SubQmf20[j]) = (float)sin(M_PI*f_center_20[j]*0.39); */ + float[][] Phi_Fract_SubQmf20 = { + {0.9882950187f, 0.1525546312f}, + {0.8962930441f, 0.4434623122f}, + {0.7208535671f, 0.6930873394f}, + {0.4783087075f, 0.8781917691f}, + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {0.8962930441f, -0.4434623122f}, + {0.9882950187f, -0.1525546312f}, + {-0.5424415469f, 0.8400935531f}, + {0.0392598175f, 0.9992290139f}, + {-0.9268565774f, 0.3754155636f}, + {-0.9741733670f, -0.2258012742f} + }; + + /* RE(Phi_Fract_SubQmf34[j]) = (float)cos(M_PI*f_center_34[j]*0.39); */ + /* IM(Phi_Fract_SubQmf34[j]) = (float)sin(M_PI*f_center_34[j]*0.39); */ + float[][] Phi_Fract_SubQmf34 = { + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {0.3387379348f, 0.9408807755f}, + {0.3387379348f, 0.9408807755f}, + {0.3387379348f, 0.9408807755f}, + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {-0.7705132365f, 0.6374239922f}, + {-0.7705132365f, 0.6374239922f}, + {1.0000000000f, 0.0000000000f}, + {1.0000000000f, 0.0000000000f}, + {0.3387379348f, 0.9408807755f}, + {0.3387379348f, 0.9408807755f}, + {0.3387379348f, 0.9408807755f}, + {0.3387379348f, 0.9408807755f}, + {-0.7705132365f, 0.6374239922f}, + {-0.7705132365f, 0.6374239922f}, + {-0.8607420325f, -0.5090414286f}, + {0.3387379348f, 0.9408807755f}, + {0.1873813123f, -0.9822872281f}, + {-0.7705132365f, 0.6374239922f}, + {-0.8607420325f, -0.5090414286f}, + {-0.8607420325f, -0.5090414286f}, + {0.1873813123f, -0.9822872281f}, + {0.1873813123f, -0.9822872281f}, + {0.9876883626f, -0.1564344615f}, + {-0.8607420325f, -0.5090414286f} + }; + + /* RE(Q_Fract_allpass_Qmf[j][i]) = (float)cos(M_PI*(j+0.5)*(frac_delay_q[i])); */ + /* IM(Q_Fract_allpass_Qmf[j][i]) = (float)sin(M_PI*(j+0.5)*(frac_delay_q[i])); */ + float[][][] Q_Fract_allpass_Qmf = { + {{0.7804303765f, 0.6252426505f}, {0.3826834261f, 0.9238795042f}, {0.8550928831f, 0.5184748173f}}, + {{-0.4399392009f, 0.8980275393f}, {-0.9238795042f, -0.3826834261f}, {-0.0643581524f, 0.9979268909f}}, + {{-0.9723699093f, -0.2334454209f}, {0.9238795042f, -0.3826834261f}, {-0.9146071672f, 0.4043435752f}}, + {{0.0157073960f, -0.9998766184f}, {-0.3826834261f, 0.9238795042f}, {-0.7814115286f, -0.6240159869f}}, + {{0.9792228341f, -0.2027871907f}, {-0.3826834261f, -0.9238795042f}, {0.1920081824f, -0.9813933372f}}, + {{0.4115142524f, 0.9114032984f}, {0.9238795042f, 0.3826834261f}, {0.9589683414f, -0.2835132182f}}, + {{-0.7996847630f, 0.6004201174f}, {-0.9238795042f, 0.3826834261f}, {0.6947838664f, 0.7192186117f}}, + {{-0.7604058385f, -0.6494481564f}, {0.3826834261f, -0.9238795042f}, {-0.3164770305f, 0.9486001730f}}, + {{0.4679299891f, -0.8837655187f}, {0.3826834261f, 0.9238795042f}, {-0.9874414206f, 0.1579856575f}}, + {{0.9645573497f, 0.2638732493f}, {-0.9238795042f, -0.3826834261f}, {-0.5966450572f, -0.8025052547f}}, + {{-0.0471066870f, 0.9988898635f}, {0.9238795042f, -0.3826834261f}, {0.4357025325f, -0.9000906944f}}, + {{-0.9851093888f, 0.1719288528f}, {-0.3826834261f, 0.9238795042f}, {0.9995546937f, -0.0298405960f}}, + {{-0.3826831877f, -0.9238796234f}, {-0.3826834261f, -0.9238795042f}, {0.4886211455f, 0.8724960685f}}, + {{0.8181498647f, -0.5750049949f}, {0.9238795042f, 0.3826834261f}, {-0.5477093458f, 0.8366686702f}}, + {{0.7396308780f, 0.6730127335f}, {-0.9238795042f, 0.3826834261f}, {-0.9951074123f, -0.0987988561f}}, + {{-0.4954589605f, 0.8686313629f}, {0.3826834261f, -0.9238795042f}, {-0.3725017905f, -0.9280315042f}}, + {{-0.9557929039f, -0.2940406799f}, {0.3826834261f, 0.9238795042f}, {0.6506417990f, -0.7593847513f}}, + {{0.0784594864f, -0.9969173074f}, {-0.9238795042f, -0.3826834261f}, {0.9741733670f, 0.2258014232f}}, + {{0.9900237322f, -0.1409008205f}, {0.9238795042f, -0.3826834261f}, {0.2502108514f, 0.9681913853f}}, + {{0.3534744382f, 0.9354441762f}, {-0.3826834261f, 0.9238795042f}, {-0.7427945137f, 0.6695194840f}}, + {{-0.8358076215f, 0.5490224361f}, {-0.3826834261f, -0.9238795042f}, {-0.9370992780f, -0.3490629196f}}, + {{-0.7181259394f, -0.6959131360f}, {0.9238795042f, 0.3826834261f}, {-0.1237744763f, -0.9923103452f}}, + {{0.5224990249f, -0.8526399136f}, {-0.9238795042f, 0.3826834261f}, {0.8226406574f, -0.5685616732f}}, + {{0.9460852146f, 0.3239179254f}, {0.3826834261f, -0.9238795042f}, {0.8844994903f, 0.4665412009f}}, + {{-0.1097348556f, 0.9939609170f}, {0.3826834261f, 0.9238795042f}, {-0.0047125919f, 0.9999889135f}}, + {{-0.9939610362f, 0.1097337380f}, {-0.9238795042f, -0.3826834261f}, {-0.8888573647f, 0.4581840038f}}, + {{-0.3239168525f, -0.9460855722f}, {0.9238795042f, -0.3826834261f}, {-0.8172453642f, -0.5762898922f}}, + {{0.8526405096f, -0.5224980116f}, {-0.3826834261f, 0.9238795042f}, {0.1331215799f, -0.9910997152f}}, + {{0.6959123611f, 0.7181267142f}, {-0.3826834261f, -0.9238795042f}, {0.9403476119f, -0.3402152061f}}, + {{-0.5490233898f, 0.8358070254f}, {0.9238795042f, 0.3826834261f}, {0.7364512086f, 0.6764906645f}}, + {{-0.9354437590f, -0.3534754813f}, {-0.9238795042f, 0.3826834261f}, {-0.2593250275f, 0.9657900929f}}, + {{0.1409019381f, -0.9900235534f}, {0.3826834261f, -0.9238795042f}, {-0.9762582779f, 0.2166097313f}}, + {{0.9969173670f, -0.0784583688f}, {0.3826834261f, 0.9238795042f}, {-0.6434556246f, -0.7654833794f}}, + {{0.2940396070f, 0.9557932615f}, {-0.9238795042f, -0.3826834261f}, {0.3812320232f, -0.9244794250f}}, + {{-0.8686318994f, 0.4954580069f}, {0.9238795042f, -0.3826834261f}, {0.9959943891f, -0.0894154981f}}, + {{-0.6730118990f, -0.7396316528f}, {-0.3826834261f, 0.9238795042f}, {0.5397993922f, 0.8417937160f}}, + {{0.5750059485f, -0.8181492686f}, {-0.3826834261f, -0.9238795042f}, {-0.4968227744f, 0.8678520322f}}, + {{0.9238792062f, 0.3826842010f}, {0.9238795042f, 0.3826834261f}, {-0.9992290139f, -0.0392601527f}}, + {{-0.1719299555f, 0.9851091504f}, {-0.9238795042f, 0.3826834261f}, {-0.4271997511f, -0.9041572809f}}, + {{-0.9988899231f, 0.0471055657f}, {0.3826834261f, -0.9238795042f}, {0.6041822433f, -0.7968461514f}}, + {{-0.2638721764f, -0.9645576477f}, {0.3826834261f, 0.9238795042f}, {0.9859085083f, 0.1672853529f}}, + {{0.8837660551f, -0.4679289758f}, {-0.9238795042f, -0.3826834261f}, {0.3075223565f, 0.9515408874f}}, + {{0.6494473219f, 0.7604066133f}, {0.9238795042f, -0.3826834261f}, {-0.7015317082f, 0.7126382589f}}, + {{-0.6004210114f, 0.7996840477f}, {-0.3826834261f, 0.9238795042f}, {-0.9562535882f, -0.2925389707f}}, + {{-0.9114028811f, -0.4115152657f}, {-0.3826834261f, -0.9238795042f}, {-0.1827499419f, -0.9831594229f}}, + {{0.2027882934f, -0.9792225957f}, {0.9238795042f, 0.3826834261f}, {0.7872582674f, -0.6166234016f}}, + {{0.9998766780f, -0.0157062728f}, {-0.9238795042f, 0.3826834261f}, {0.9107555747f, 0.4129458666f}}, + {{0.2334443331f, 0.9723701477f}, {0.3826834261f, -0.9238795042f}, {0.0549497530f, 0.9984891415f}}, + {{-0.8980280757f, 0.4399381876f}, {0.3826834261f, 0.9238795042f}, {-0.8599416018f, 0.5103924870f}}, + {{-0.6252418160f, -0.7804310918f}, {-0.9238795042f, -0.3826834261f}, {-0.8501682281f, -0.5265110731f}}, + {{0.6252435446f, -0.7804297209f}, {0.9238795042f, -0.3826834261f}, {0.0737608299f, -0.9972759485f}}, + {{0.8980270624f, 0.4399402142f}, {-0.3826834261f, 0.9238795042f}, {0.9183775187f, -0.3957053721f}}, + {{-0.2334465086f, 0.9723696709f}, {-0.3826834261f, -0.9238795042f}, {0.7754954696f, 0.6313531399f}}, + {{-0.9998766184f, -0.0157085191f}, {0.9238795042f, 0.3826834261f}, {-0.2012493610f, 0.9795400500f}}, + {{-0.2027861029f, -0.9792230725f}, {-0.9238795042f, 0.3826834261f}, {-0.9615978599f, 0.2744622827f}}, + {{0.9114037752f, -0.4115132093f}, {0.3826834261f, -0.9238795042f}, {-0.6879743338f, -0.7257350087f}}, + {{0.6004192233f, 0.7996854186f}, {0.3826834261f, 0.9238795042f}, {0.3254036009f, -0.9455752373f}}, + {{-0.6494490504f, 0.7604051232f}, {-0.9238795042f, -0.3826834261f}, {0.9888865948f, -0.1486719251f}}, + {{-0.8837650418f, -0.4679309726f}, {0.9238795042f, -0.3826834261f}, {0.5890548825f, 0.8080930114f}}, + {{0.2638743520f, -0.9645570517f}, {-0.3826834261f, 0.9238795042f}, {-0.4441666007f, 0.8959442377f}}, + {{0.9988898039f, 0.0471078083f}, {-0.3826834261f, -0.9238795042f}, {-0.9997915030f, 0.0204183888f}}, + {{0.1719277352f, 0.9851095676f}, {0.9238795042f, 0.3826834261f}, {-0.4803760946f, -0.8770626187f}}, + {{-0.9238800406f, 0.3826821446f}, {-0.9238795042f, 0.3826834261f}, {0.5555707216f, -0.8314692974f}}, + {{-0.5750041008f, -0.8181505203f}, {0.3826834261f, -0.9238795042f}, {0.9941320419f, 0.1081734300f}} + }; + + /* RE(Q_Fract_allpass_SubQmf20[j][i]) = (float)cos(M_PI*f_center_20[j]*frac_delay_q[i]); */ + /* IM(Q_Fract_allpass_SubQmf20[j][i]) = (float)sin(M_PI*f_center_20[j]*frac_delay_q[i]); */ + float[][][] Q_Fract_allpass_SubQmf20 = { + {{0.9857769012f, 0.1680592746f}, {0.9569403529f, 0.2902846634f}, {0.9907300472f, 0.1358452588f}}, + {{0.8744080663f, 0.4851911962f}, {0.6343932748f, 0.7730104327f}, {0.9175986052f, 0.3975082636f}}, + {{0.6642524004f, 0.7475083470f}, {0.0980171412f, 0.9951847196f}, {0.7767338753f, 0.6298289299f}}, + {{0.3790524006f, 0.9253752232f}, {-0.4713967443f, 0.8819212914f}, {0.5785340071f, 0.8156582713f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{0.8744080663f, -0.4851911962f}, {0.6343932748f, -0.7730104327f}, {0.9175986052f, -0.3975082636f}}, + {{0.9857769012f, -0.1680592746f}, {0.9569403529f, -0.2902846634f}, {0.9907300472f, -0.1358452588f}}, + {{-0.7126385570f, 0.7015314102f}, {-0.5555702448f, -0.8314695954f}, {-0.3305967748f, 0.9437720776f}}, + {{-0.1175374240f, 0.9930684566f}, {-0.9807852507f, 0.1950903237f}, {0.2066311091f, 0.9784189463f}}, + {{-0.9947921634f, 0.1019244045f}, {0.5555702448f, -0.8314695954f}, {-0.7720130086f, 0.6356067061f}}, + {{-0.8400934935f, -0.5424416065f}, {0.9807852507f, 0.1950903237f}, {-0.9896889329f, 0.1432335079f}} + }; + + /* RE(Q_Fract_allpass_SubQmf34[j][i]) = (float)cos(M_PI*f_center_34[j]*frac_delay_q[i]); */ + /* IM(Q_Fract_allpass_SubQmf34[j][i]) = (float)sin(M_PI*f_center_34[j]*frac_delay_q[i]); */ + float[][][] Q_Fract_allpass_SubQmf34 = { + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, + {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, + {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, + {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}, {1.0000000000f, 0.0000000000f}}, + {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, + {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, + {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, + {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, + {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, + {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, + {{-0.6129069924f, -0.7901550531f}, {0.7071067691f, 0.7071067691f}, {-0.9917160273f, -0.1284494549f}}, + {{0.2181432247f, 0.9759167433f}, {-0.7071067691f, 0.7071067691f}, {0.4623677433f, 0.8866882324f}}, + {{0.6374240518f, -0.7705131769f}, {-1.0000000000f, 0.0000000000f}, {-0.3446428776f, -0.9387338758f}}, + {{-0.9048270583f, 0.4257792532f}, {-0.0000000000f, -1.0000000000f}, {-0.5724321604f, 0.8199520707f}}, + {{-0.6129069924f, -0.7901550531f}, {0.7071067691f, 0.7071067691f}, {-0.9917160273f, -0.1284494549f}}, + {{-0.6129069924f, -0.7901550531f}, {0.7071067691f, 0.7071067691f}, {-0.9917160273f, -0.1284494549f}}, + {{0.6374240518f, -0.7705131769f}, {-1.0000000000f, 0.0000000000f}, {-0.3446428776f, -0.9387338758f}}, + {{0.6374240518f, -0.7705131769f}, {-1.0000000000f, 0.0000000000f}, {-0.3446428776f, -0.9387338758f}}, + {{0.8910064697f, 0.4539906085f}, {0.7071067691f, -0.7071067691f}, {0.6730125546f, -0.7396310568f}}, + {{-0.6129069924f, -0.7901550531f}, {0.7071067691f, 0.7071067691f}, {-0.9917160273f, -0.1284494549f}} + }; + + float[] cos_alphas = { + 1.0000000000f, 0.9841239700f, 0.9594738210f, + 0.8946843079f, 0.8269340931f, 0.7071067812f, + 0.4533210856f, 0.0000000000f + }; + + float[] sin_alphas = { + 0.0000000000f, 0.1774824264f, 0.2817977763f, + 0.4466989918f, 0.5622988580f, 0.7071067812f, + 0.8913472911f, 1.0000000000f + }; + + float[][] cos_betas_normal = { + {1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f}, + {1.0000000000f, 0.9995871699f, 0.9989419133f, 0.9972204583f, 0.9953790839f, 0.9920112747f, 0.9843408180f, 0.9681727381f}, + {1.0000000000f, 0.9984497744f, 0.9960279377f, 0.9895738413f, 0.9826814632f, 0.9701058164f, 0.9416098832f, 0.8822105900f}, + {1.0000000000f, 0.9959398908f, 0.9896038018f, 0.9727589768f, 0.9548355329f, 0.9223070404f, 0.8494349490f, 0.7013005535f}, + {1.0000000000f, 0.9932417400f, 0.9827071856f, 0.9547730996f, 0.9251668930f, 0.8717461589f, 0.7535520592f, 0.5198827312f}, + {1.0000000000f, 0.9902068095f, 0.9749613872f, 0.9346538534f, 0.8921231300f, 0.8158851259f, 0.6495964302f, 0.3313370772f}, + {1.0000000000f, 0.9880510933f, 0.9694670261f, 0.9204347876f, 0.8688622825f, 0.7768516704f, 0.5782161800f, 0.2069970356f}, + {1.0000000000f, 0.9858996945f, 0.9639898866f, 0.9063034786f, 0.8458214608f, 0.7384262300f, 0.5089811277f, 0.0905465944f} + }; + + float[][] sin_betas_normal = { + {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f}, + {0.0000000000f, -0.0287313368f, -0.0459897147f, -0.0745074328f, -0.0960233266f, -0.1261492408f, -0.1762757894f, -0.2502829383f}, + {0.0000000000f, -0.0556601118f, -0.0890412670f, -0.1440264301f, -0.1853028382f, -0.2426823129f, -0.3367058477f, -0.4708550466f}, + {0.0000000000f, -0.0900207420f, -0.1438204281f, -0.2318188366f, -0.2971348264f, -0.3864579191f, -0.5276933461f, -0.7128657193f}, + {0.0000000000f, -0.1160639735f, -0.1851663774f, -0.2973353800f, -0.3795605619f, -0.4899577884f, -0.6573882369f, -0.8542376401f}, + {0.0000000000f, -0.1396082894f, -0.2223742196f, -0.3555589603f, -0.4517923427f, -0.5782140273f, -0.7602792104f, -0.9435124489f}, + {0.0000000000f, -0.1541266914f, -0.2452217065f, -0.3908961522f, -0.4950538699f, -0.6296836366f, -0.8158836002f, -0.9783415698f}, + {0.0000000000f, -0.1673373610f, -0.2659389001f, -0.4226275012f, -0.5334660781f, -0.6743342664f, -0.8607776784f, -0.9958922202f} + }; + + float[][] cos_betas_fine = { + {1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f, 1.0000000000f}, + {1.0000000000f, 0.9995871699f, 0.9989419133f, 0.9972204583f, 0.9953790839f, 0.9920112747f, 0.9843408180f, 0.9681727381f}, + {1.0000000000f, 0.9984497744f, 0.9960279377f, 0.9895738413f, 0.9826814632f, 0.9701058164f, 0.9416098832f, 0.8822105900f}, + {1.0000000000f, 0.9968361371f, 0.9918968104f, 0.9787540479f, 0.9647515190f, 0.9392903010f, 0.8820167114f, 0.7645325390f}, + {1.0000000000f, 0.9950262915f, 0.9872675041f, 0.9666584578f, 0.9447588606f, 0.9050918405f, 0.8165997379f, 0.6383824796f}, + {1.0000000000f, 0.9932417400f, 0.9827071856f, 0.9547730996f, 0.9251668930f, 0.8717461589f, 0.7535520592f, 0.5198827312f}, + {1.0000000000f, 0.9908827998f, 0.9766855904f, 0.9391249214f, 0.8994531782f, 0.8282352693f, 0.6723983174f, 0.3719473225f}, + {1.0000000000f, 0.9890240165f, 0.9719459866f, 0.9268448110f, 0.8793388536f, 0.7944023271f, 0.6101812098f, 0.2621501145f}, + {1.0000000000f, 0.9876350461f, 0.9684073447f, 0.9176973944f, 0.8643930070f, 0.7693796058f, 0.5646720713f, 0.1838899556f}, + {1.0000000000f, 0.9866247085f, 0.9658349704f, 0.9110590761f, 0.8535668048f, 0.7513165426f, 0.5320914819f, 0.1289530943f}, + {1.0000000000f, 0.9858996945f, 0.9639898866f, 0.9063034786f, 0.8458214608f, 0.7384262300f, 0.5089811277f, 0.0905465944f}, + {1.0000000000f, 0.9851245614f, 0.9620180268f, 0.9012265590f, 0.8375623272f, 0.7247108045f, 0.4845204297f, 0.0504115003f}, + {1.0000000000f, 0.9846869856f, 0.9609052357f, 0.8983639533f, 0.8329098386f, 0.7169983441f, 0.4708245354f, 0.0281732509f}, + {1.0000000000f, 0.9844406325f, 0.9602788522f, 0.8967533934f, 0.8302936455f, 0.7126658102f, 0.4631492839f, 0.0157851140f}, + {1.0000000000f, 0.9843020502f, 0.9599265269f, 0.8958477331f, 0.8288229094f, 0.7102315840f, 0.4588429315f, 0.0088578059f}, + {1.0000000000f, 0.9842241136f, 0.9597283916f, 0.8953385094f, 0.8279961409f, 0.7088635748f, 0.4564246834f, 0.0049751355f} + }; + + float[][] sin_betas_fine = { + {0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f, 0.0000000000f}, + {0.0000000000f, -0.0287313368f, -0.0459897147f, -0.0745074328f, -0.0960233266f, -0.1261492408f, -0.1762757894f, -0.2502829383f}, + {0.0000000000f, -0.0556601118f, -0.0890412670f, -0.1440264301f, -0.1853028382f, -0.2426823129f, -0.3367058477f, -0.4708550466f}, + {0.0000000000f, -0.0794840594f, -0.1270461238f, -0.2050378347f, -0.2631625097f, -0.3431234916f, -0.4712181245f, -0.6445851354f}, + {0.0000000000f, -0.0996126459f, -0.1590687758f, -0.2560691819f, -0.3277662204f, -0.4252161335f, -0.5772043556f, -0.7697193058f}, + {0.0000000000f, -0.1160639735f, -0.1851663774f, -0.2973353800f, -0.3795605619f, -0.4899577884f, -0.6573882369f, -0.8542376401f}, + {0.0000000000f, -0.1347266752f, -0.2146747714f, -0.3435758752f, -0.4370171396f, -0.5603805303f, -0.7401895046f, -0.9282538388f}, + {0.0000000000f, -0.1477548470f, -0.2352041647f, -0.3754446647f, -0.4761965776f, -0.6073919186f, -0.7922618830f, -0.9650271071f}, + {0.0000000000f, -0.1567705832f, -0.2493736450f, -0.3972801182f, -0.5028167951f, -0.6387918458f, -0.8253153651f, -0.9829468369f}, + {0.0000000000f, -0.1630082348f, -0.2591578860f, -0.4122758299f, -0.5209834064f, -0.6599420072f, -0.8466868694f, -0.9916506943f}, + {0.0000000000f, -0.1673373610f, -0.2659389001f, -0.4226275012f, -0.5334660781f, -0.6743342664f, -0.8607776784f, -0.9958922202f}, + {0.0000000000f, -0.1718417832f, -0.2729859267f, -0.4333482310f, -0.5463417868f, -0.6890531546f, -0.8747799456f, -0.9987285320f}, + {0.0000000000f, -0.1743316967f, -0.2768774604f, -0.4392518725f, -0.5534087104f, -0.6970748701f, -0.8822268738f, -0.9996030552f}, + {0.0000000000f, -0.1757175038f, -0.2790421580f, -0.4425306221f, -0.5573261722f, -0.7015037013f, -0.8862802834f, -0.9998754073f}, + {0.0000000000f, -0.1764921355f, -0.2802517850f, -0.4443611583f, -0.5595110229f, -0.7039681080f, -0.8885173967f, -0.9999607689f}, + {0.0000000000f, -0.1769262394f, -0.2809295540f, -0.4453862969f, -0.5607337966f, -0.7053456119f, -0.8897620516f, -0.9999876239f} + }; + + float[][] sincos_alphas_B_normal = { + {0.0561454100f, 0.0526385859f, 0.0472937334f, 0.0338410641f, 0.0207261065f, 0.0028205635f, 0.0028205635f, 0.0028205635f}, + {0.1249065138f, 0.1173697697f, 0.1057888284f, 0.0761985131f, 0.0468732723f, 0.0063956103f, 0.0063956103f, 0.0063956103f}, + {0.1956693050f, 0.1846090179f, 0.1673645109f, 0.1220621836f, 0.0757362479f, 0.0103882630f, 0.0103882630f, 0.0103882630f}, + {0.3015113269f, 0.2870525790f, 0.2637738799f, 0.1984573949f, 0.1260749909f, 0.0175600126f, 0.0175600126f, 0.0175600126f}, + {0.4078449476f, 0.3929852420f, 0.3680589270f, 0.2911029124f, 0.1934512363f, 0.0278686716f, 0.0278686716f, 0.0278686716f}, + {0.5336171261f, 0.5226637762f, 0.5033652606f, 0.4349162672f, 0.3224682122f, 0.0521999036f, 0.0521999036f, 0.0521999036f}, + {0.6219832023f, 0.6161847276f, 0.6057251063f, 0.5654342668f, 0.4826149915f, 0.1058044758f, 0.1058044758f, 0.1058044758f}, + {0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f}, + {0.7830305572f, 0.7876016373f, 0.7956739618f, 0.8247933372f, 0.8758325942f, 0.9943869542f, 0.9943869542f, 0.9943869542f}, + {0.8457261833f, 0.8525388778f, 0.8640737401f, 0.9004708933f, 0.9465802987f, 0.9986366532f, 0.9986366532f, 0.9986366532f}, + {0.9130511848f, 0.9195447612f, 0.9298024282f, 0.9566917233f, 0.9811098801f, 0.9996115928f, 0.9996115928f, 0.9996115928f}, + {0.9534625907f, 0.9579148236f, 0.9645845234f, 0.9801095128f, 0.9920207064f, 0.9998458099f, 0.9998458099f, 0.9998458099f}, + {0.9806699215f, 0.9828120260f, 0.9858950861f, 0.9925224431f, 0.9971278825f, 0.9999460406f, 0.9999460406f, 0.9999460406f}, + {0.9921685024f, 0.9930882705f, 0.9943886135f, 0.9970926648f, 0.9989008403f, 0.9999795479f, 0.9999795479f, 0.9999795479f}, + {0.9984226014f, 0.9986136287f, 0.9988810254f, 0.9994272242f, 0.9997851906f, 0.9999960221f, 0.9999960221f, 0.9999960221f} + }; + + float[][] sincos_alphas_B_fine = { + {0.0031622158f, 0.0029630181f, 0.0026599892f, 0.0019002704f, 0.0011626042f, 0.0001580278f, 0.0001580278f, 0.0001580278f}, + {0.0056232673f, 0.0052689825f, 0.0047302825f, 0.0033791756f, 0.0020674015f, 0.0002811710f, 0.0002811710f, 0.0002811710f}, + {0.0099994225f, 0.0093696693f, 0.0084117414f, 0.0060093796f, 0.0036766009f, 0.0005000392f, 0.0005000392f, 0.0005000392f}, + {0.0177799194f, 0.0166607102f, 0.0149581377f, 0.0106875809f, 0.0065392545f, 0.0008893767f, 0.0008893767f, 0.0008893767f}, + {0.0316069684f, 0.0296211579f, 0.0265987295f, 0.0190113813f, 0.0116349973f, 0.0015826974f, 0.0015826974f, 0.0015826974f}, + {0.0561454100f, 0.0526385859f, 0.0472937334f, 0.0338410641f, 0.0207261065f, 0.0028205635f, 0.0028205635f, 0.0028205635f}, + {0.0791834041f, 0.0742798103f, 0.0667907269f, 0.0478705292f, 0.0293500747f, 0.0039966755f, 0.0039966755f, 0.0039966755f}, + {0.1115021177f, 0.1047141985f, 0.0943053154f, 0.0678120561f, 0.0416669150f, 0.0056813213f, 0.0056813213f, 0.0056813213f}, + {0.1565355066f, 0.1473258371f, 0.1330924027f, 0.0963282233f, 0.0594509113f, 0.0081277946f, 0.0081277946f, 0.0081277946f}, + {0.2184643682f, 0.2064579524f, 0.1876265439f, 0.1375744167f, 0.0856896681f, 0.0117817338f, 0.0117817338f, 0.0117817338f}, + {0.3015113269f, 0.2870525790f, 0.2637738799f, 0.1984573949f, 0.1260749909f, 0.0175600126f, 0.0175600126f, 0.0175600126f}, + {0.3698741335f, 0.3547727297f, 0.3298252076f, 0.2556265829f, 0.1665990017f, 0.0236344541f, 0.0236344541f, 0.0236344541f}, + {0.4480623975f, 0.4339410024f, 0.4098613774f, 0.3322709108f, 0.2266784729f, 0.0334094131f, 0.0334094131f, 0.0334094131f}, + {0.5336171261f, 0.5226637762f, 0.5033652606f, 0.4349162672f, 0.3224682122f, 0.0521999036f, 0.0521999036f, 0.0521999036f}, + {0.6219832023f, 0.6161847276f, 0.6057251063f, 0.5654342668f, 0.4826149915f, 0.1058044758f, 0.1058044758f, 0.1058044758f}, + {0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f, 0.7071067657f}, + {0.7830305572f, 0.7876016373f, 0.7956739618f, 0.8247933372f, 0.8758325942f, 0.9943869542f, 0.9943869542f, 0.9943869542f}, + {0.8457261833f, 0.8525388778f, 0.8640737401f, 0.9004708933f, 0.9465802987f, 0.9986366532f, 0.9986366532f, 0.9986366532f}, + {0.8940022267f, 0.9009412572f, 0.9121477564f, 0.9431839770f, 0.9739696219f, 0.9994417480f, 0.9994417480f, 0.9994417480f}, + {0.9290818561f, 0.9349525662f, 0.9440420138f, 0.9667755833f, 0.9860247275f, 0.9997206664f, 0.9997206664f, 0.9997206664f}, + {0.9534625907f, 0.9579148236f, 0.9645845234f, 0.9801095128f, 0.9920207064f, 0.9998458099f, 0.9998458099f, 0.9998458099f}, + {0.9758449068f, 0.9784554646f, 0.9822404252f, 0.9904914275f, 0.9963218730f, 0.9999305926f, 0.9999305926f, 0.9999305926f}, + {0.9876723320f, 0.9890880155f, 0.9911036356f, 0.9953496173f, 0.9982312259f, 0.9999669685f, 0.9999669685f, 0.9999669685f}, + {0.9937641889f, 0.9945023501f, 0.9955433130f, 0.9976981117f, 0.9991315558f, 0.9999838610f, 0.9999838610f, 0.9999838610f}, + {0.9968600642f, 0.9972374385f, 0.9977670024f, 0.9988535464f, 0.9995691924f, 0.9999920129f, 0.9999920129f, 0.9999920129f}, + {0.9984226014f, 0.9986136287f, 0.9988810254f, 0.9994272242f, 0.9997851906f, 0.9999960221f, 0.9999960221f, 0.9999960221f}, + {0.9995003746f, 0.9995611974f, 0.9996461891f, 0.9998192657f, 0.9999323103f, 0.9999987475f, 0.9999987475f, 0.9999987475f}, + {0.9998419236f, 0.9998611991f, 0.9998881193f, 0.9999428861f, 0.9999786185f, 0.9999996045f, 0.9999996045f, 0.9999996045f}, + {0.9999500038f, 0.9999561034f, 0.9999646206f, 0.9999819429f, 0.9999932409f, 0.9999998750f, 0.9999998750f, 0.9999998750f}, + {0.9999841890f, 0.9999861183f, 0.9999888121f, 0.9999942902f, 0.9999978628f, 0.9999999605f, 0.9999999605f, 0.9999999605f}, + {0.9999950000f, 0.9999956102f, 0.9999964621f, 0.9999981945f, 0.9999993242f, 0.9999999875f, 0.9999999875f, 0.9999999875f} + }; + + float[][] cos_gammas_normal = { + {1.0000000000f, 0.9841239707f, 0.9594738226f, 0.8946843024f, 0.8269341029f, 0.7245688486f, 0.7245688486f, 0.7245688486f}, + {1.0000000000f, 0.9849690570f, 0.9617776789f, 0.9020941550f, 0.8436830391f, 0.7846832804f, 0.7846832804f, 0.7846832804f}, + {1.0000000000f, 0.9871656089f, 0.9676774734f, 0.9199102884f, 0.8785067015f, 0.8464232214f, 0.8464232214f, 0.8464232214f}, + {1.0000000000f, 0.9913533967f, 0.9786000177f, 0.9496063381f, 0.9277157252f, 0.9133354077f, 0.9133354077f, 0.9133354077f}, + {1.0000000000f, 0.9948924435f, 0.9875319180f, 0.9716329849f, 0.9604805241f, 0.9535949574f, 0.9535949574f, 0.9535949574f}, + {1.0000000000f, 0.9977406278f, 0.9945423840f, 0.9878736667f, 0.9833980494f, 0.9807207440f, 0.9807207440f, 0.9807207440f}, + {1.0000000000f, 0.9990607067f, 0.9977417734f, 0.9950323970f, 0.9932453273f, 0.9921884740f, 0.9921884740f, 0.9921884740f}, + {1.0000000000f, 0.9998081748f, 0.9995400312f, 0.9989936459f, 0.9986365356f, 0.9984265591f, 0.9984265591f, 0.9984265591f} + }; + + float[][] cos_gammas_fine = { + {1.0000000000f, 0.9841239707f, 0.9594738226f, 0.8946843024f, 0.8269341029f, 0.7245688486f, 0.7245688486f, 0.7245688486f}, + {1.0000000000f, 0.9849690570f, 0.9617776789f, 0.9020941550f, 0.8436830391f, 0.7846832804f, 0.7846832804f, 0.7846832804f}, + {1.0000000000f, 0.9871656089f, 0.9676774734f, 0.9199102884f, 0.8785067015f, 0.8464232214f, 0.8464232214f, 0.8464232214f}, + {1.0000000000f, 0.9899597309f, 0.9750098690f, 0.9402333855f, 0.9129698759f, 0.8943765944f, 0.8943765944f, 0.8943765944f}, + {1.0000000000f, 0.9926607607f, 0.9819295710f, 0.9580160104f, 0.9404993670f, 0.9293004472f, 0.9293004472f, 0.9293004472f}, + {1.0000000000f, 0.9948924435f, 0.9875319180f, 0.9716329849f, 0.9604805241f, 0.9535949574f, 0.9535949574f, 0.9535949574f}, + {1.0000000000f, 0.9972074644f, 0.9932414270f, 0.9849197629f, 0.9792926592f, 0.9759092525f, 0.9759092525f, 0.9759092525f}, + {1.0000000000f, 0.9985361982f, 0.9964742028f, 0.9922136306f, 0.9893845420f, 0.9877041371f, 0.9877041371f, 0.9877041371f}, + {1.0000000000f, 0.9992494366f, 0.9981967170f, 0.9960386625f, 0.9946185834f, 0.9937800239f, 0.9937800239f, 0.9937800239f}, + {1.0000000000f, 0.9996194722f, 0.9990869422f, 0.9979996269f, 0.9972873651f, 0.9968679747f, 0.9968679747f, 0.9968679747f}, + {1.0000000000f, 0.9998081748f, 0.9995400312f, 0.9989936459f, 0.9986365356f, 0.9984265591f, 0.9984265591f, 0.9984265591f}, + {1.0000000000f, 0.9999390971f, 0.9998540271f, 0.9996809352f, 0.9995679735f, 0.9995016284f, 0.9995016284f, 0.9995016284f}, + {1.0000000000f, 0.9999807170f, 0.9999537862f, 0.9998990191f, 0.9998632947f, 0.9998423208f, 0.9998423208f, 0.9998423208f}, + {1.0000000000f, 0.9999938979f, 0.9999853814f, 0.9999680568f, 0.9999567596f, 0.9999501270f, 0.9999501270f, 0.9999501270f}, + {1.0000000000f, 0.9999980703f, 0.9999953731f, 0.9999898968f, 0.9999863277f, 0.9999842265f, 0.9999842265f, 0.9999842265f}, + {1.0000000000f, 0.9999993891f, 0.9999985397f, 0.9999968037f, 0.9999956786f, 0.9999950155f, 0.9999950155f, 0.9999950155f} + }; + + float[][] sin_gammas_normal = { + {0.0000000000f, 0.1774824223f, 0.2817977711f, 0.4466990028f, 0.5622988435f, 0.6892024258f, 0.6892024258f, 0.6892024258f}, + {0.0000000000f, 0.1727308798f, 0.2738315110f, 0.4315392630f, 0.5368416242f, 0.6198968861f, 0.6198968861f, 0.6198968861f}, + {0.0000000000f, 0.1596999079f, 0.2521910140f, 0.3921288836f, 0.4777300236f, 0.5325107795f, 0.5325107795f, 0.5325107795f}, + {0.0000000000f, 0.1312190642f, 0.2057717310f, 0.3134450552f, 0.3732874674f, 0.4072080955f, 0.4072080955f, 0.4072080955f}, + {0.0000000000f, 0.1009407043f, 0.1574189028f, 0.2364938532f, 0.2783471983f, 0.3010924396f, 0.3010924396f, 0.3010924396f}, + {0.0000000000f, 0.0671836269f, 0.1043333428f, 0.1552598422f, 0.1814615013f, 0.1954144885f, 0.1954144885f, 0.1954144885f}, + {0.0000000000f, 0.0433324862f, 0.0671666110f, 0.0995516398f, 0.1160332699f, 0.1247478739f, 0.1247478739f, 0.1247478739f}, + {0.0000000000f, 0.0195860576f, 0.0303269852f, 0.0448519274f, 0.0522022017f, 0.0560750040f, 0.0560750040f, 0.0560750040f} + }; + + float[][] sin_gammas_fine = { + {0.0000000000f, 0.1774824223f, 0.2817977711f, 0.4466990028f, 0.5622988435f, 0.6892024258f, 0.6892024258f, 0.6892024258f}, + {0.0000000000f, 0.1727308798f, 0.2738315110f, 0.4315392630f, 0.5368416242f, 0.6198968861f, 0.6198968861f, 0.6198968861f}, + {0.0000000000f, 0.1596999079f, 0.2521910140f, 0.3921288836f, 0.4777300236f, 0.5325107795f, 0.5325107795f, 0.5325107795f}, + {0.0000000000f, 0.1413496768f, 0.2221615526f, 0.3405307340f, 0.4080269669f, 0.4473147744f, 0.4473147744f, 0.4473147744f}, + {0.0000000000f, 0.1209322714f, 0.1892467110f, 0.2867147079f, 0.3397954394f, 0.3693246252f, 0.3693246252f, 0.3693246252f}, + {0.0000000000f, 0.1009407043f, 0.1574189028f, 0.2364938532f, 0.2783471983f, 0.3010924396f, 0.3010924396f, 0.3010924396f}, + {0.0000000000f, 0.0746811420f, 0.1160666523f, 0.1730117353f, 0.2024497161f, 0.2181768341f, 0.2181768341f, 0.2181768341f}, + {0.0000000000f, 0.0540875291f, 0.0838997203f, 0.1245476266f, 0.1453211203f, 0.1563346972f, 0.1563346972f, 0.1563346972f}, + {0.0000000000f, 0.0387371058f, 0.0600276114f, 0.0889212171f, 0.1036044086f, 0.1113609634f, 0.1113609634f, 0.1113609634f}, + {0.0000000000f, 0.0275846110f, 0.0427233177f, 0.0632198125f, 0.0736064637f, 0.0790837596f, 0.0790837596f, 0.0790837596f}, + {0.0000000000f, 0.0195860576f, 0.0303269852f, 0.0448519274f, 0.0522022017f, 0.0560750040f, 0.0560750040f, 0.0560750040f}, + {0.0000000000f, 0.0110363955f, 0.0170857974f, 0.0252592108f, 0.0293916021f, 0.0315673054f, 0.0315673054f, 0.0315673054f}, + {0.0000000000f, 0.0062101284f, 0.0096138203f, 0.0142109649f, 0.0165345659f, 0.0177576316f, 0.0177576316f, 0.0177576316f}, + {0.0000000000f, 0.0034934509f, 0.0054071189f, 0.0079928316f, 0.0092994041f, 0.0099871631f, 0.0099871631f, 0.0099871631f}, + {0.0000000000f, 0.0019645397f, 0.0030419905f, 0.0044951511f, 0.0052291853f, 0.0056166498f, 0.0056166498f, 0.0056166498f}, + {0.0000000000f, 0.0011053943f, 0.0017089869f, 0.0025283670f, 0.0029398552f, 0.0031573685f, 0.0031573685f, 0.0031573685f} + }; + + float[] sf_iid_normal = { + 1.4119827747f, 1.4031381607f, 1.3868767023f, + 1.3483997583f, 1.2912493944f, 1.1960374117f, + 1.1073724031f, 1.0000000000f, 0.8796171546f, + 0.7546485662f, 0.5767799020f, 0.4264014363f, + 0.2767182887f, 0.1766446233f, 0.0794016272f + }; + + float[] sf_iid_fine = { + 1.4142065048f, 1.4141912460f, 1.4141428471f, + 1.4139900208f, 1.4135069847f, 1.4119827747f, + 1.4097729921f, 1.4053947926f, 1.3967796564f, + 1.3800530434f, 1.3483997583f, 1.3139201403f, + 1.2643101215f, 1.1960374117f, 1.1073724031f, + 1.0000000000f, 0.8796171546f, 0.7546485662f, + 0.6336560845f, 0.5230810642f, 0.4264014363f, + 0.3089554012f, 0.2213746458f, 0.1576878875f, + 0.1119822487f, 0.0794016272f, 0.0446990170f, + 0.0251446925f, 0.0141414283f, 0.0079525812f, + 0.0044721137f + }; + float[] ipdopd_cos_tab = { + 1.000000000000000f, + 0.707106781186548f, + 0.000000000000000f, + -0.707106781186547f, + -1.000000000000000f, + -0.707106781186548f, + -0.000000000000000f, + 0.707106781186547f, + 1.000000000000000f + }; + + float[] ipdopd_sin_tab = { + 0.000000000000000f, + 0.707106781186547f, + 1.000000000000000f, + 0.707106781186548f, + 0.000000000000000f, + -0.707106781186547f, + -1.000000000000000f, + -0.707106781186548f, + -0.000000000000000f + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/AnalysisFilterbank.java b/src/main/java/net/sourceforge/jaad/aac/sbr/AnalysisFilterbank.java index b38cda7c..5f5fc30c 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/AnalysisFilterbank.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/AnalysisFilterbank.java @@ -1,93 +1,77 @@ package net.sourceforge.jaad.aac.sbr; -import java.util.Arrays; +class AnalysisFilterbank extends Filterbank { -class AnalysisFilterbank implements FilterbankTable { + AnalysisFilterbank(int channels) { + super(channels); + } - private float[] x; //x is implemented as double ringbuffer - private int x_index; //ringbuffer index - private int channels; + void sbr_qmf_analysis_32(int numTimeSlotsRate, float[] input, + float[][][] X, int offset, int kx) { + float[] u = new float[64]; + float[] in_real = new float[32], in_imag = new float[32]; + float[] out_real = new float[32], out_imag = new float[32]; - AnalysisFilterbank(int channels) { - this.channels = channels; - x = new float[2*channels*10]; - x_index = 0; - } + /* qmf subsample l */ + for (int l = 0, in=0; l < numTimeSlotsRate; l++) { + int n; - public void reset() { - Arrays.fill(x, 0); - } + /* shift input buffer x */ + /* input buffer is not shifted anymore, x is implemented as double ringbuffer */ + //memmove(qmfa.x + 32, qmfa.x, (320-32)*sizeof(real_t)); - void sbr_qmf_analysis_32(SBR sbr, float[] input, - float[][][] X, int offset, int kx) { - float[] u = new float[64]; - float[] in_real = new float[32], in_imag = new float[32]; - float[] out_real = new float[32], out_imag = new float[32]; - int in = 0; - int l; + /* add new samples to input buffer x */ + for (n = 32 - 1; n >= 0; n--) { + this.v[this.v_index + n] = this.v[this.v_index + n + 320] = input[in++]; + } - /* qmf subsample l */ - for(l = 0; l=0; n--) { - this.x[this.x_index+n] = this.x[this.x_index+n+320] = input[in++]; - } + /* calculate 32 subband samples by introducing X */ + // Reordering of data moved from DCT_IV to here + in_imag[31] = u[1]; + in_real[0] = u[0]; + for (n = 1; n < 31; n++) { + in_imag[31 - n] = u[n + 1]; + in_real[n] = -u[64 - n]; + } + in_imag[0] = u[32]; + in_real[31] = -u[33]; - /* window and summation to create array u */ - for(n = 0; n<64; n++) { - u[n] = (this.x[this.x_index+n]*qmf_c[2*n]) - +(this.x[this.x_index+n+64]*qmf_c[2*(n+64)]) - +(this.x[this.x_index+n+128]*qmf_c[2*(n+128)]) - +(this.x[this.x_index+n+192]*qmf_c[2*(n+192)]) - +(this.x[this.x_index+n+256]*qmf_c[2*(n+256)]); - } + // dct4_kernel is DCT_IV without reordering which is done before and after FFT + DCT.dct4_kernel(in_real, in_imag, out_real, out_imag); - /* update ringbuffer index */ - this.x_index -= 32; - if(this.x_index<0) - this.x_index = (320-32); - - /* calculate 32 subband samples by introducing X */ - // Reordering of data moved from DCT_IV to here - in_imag[31] = u[1]; - in_real[0] = u[0]; - for(n = 1; n<31; n++) { - in_imag[31-n] = u[n+1]; - in_real[n] = -u[64-n]; - } - in_imag[0] = u[32]; - in_real[31] = -u[33]; - - // dct4_kernel is DCT_IV without reordering which is done before and after FFT - DCT.dct4_kernel(in_real, in_imag, out_real, out_imag); - - // Reordering of data moved from DCT_IV to here - for(n = 0; n<16; n++) { - if(2*n+1= 0) { + int bit = ld.readBit(); + index = t_huff[index][bit]; + } + + return index + 64; + } + + void extract_noise_floor_data() { + + for (int l = 0; l < L_Q; l++) { + if (bs_df_noise[l] == 0) { + for (int k = 1; k < sbr.N_Q; k++) { + Q[k][l] = Q[k][l] + Q[k - 1][l]; + } + } else { + if (l == 0) { + for (int k = 0; k < sbr.N_Q; k++) { + Q[k][l] = Q_prev[k] + Q[k][0]; + } + } else { + for (int k = 0; k < sbr.N_Q; k++) { + Q[k][l] = Q[k][l - 1] + Q[k][l]; + } + } + } + } + } + + /* table 7 */ + int sbr_grid(BitStream ld) { + int result; + int saved_L_E = L_E; + int saved_L_Q = L_Q; + FrameClass saved_frame_class = bs_frame_class; + + bs_frame_class = FrameClass.read(ld); + + switch (bs_frame_class) { + case FIXFIX: { + int i = ld.readBits(2); + + int bs_num_env = Math.min(1 << i, 5); + + i = ld.readBit(); + for (int env = 0; env < bs_num_env; env++) { + f[env] = i; + } + + L_E = Math.min(bs_num_env, 4); + + abs_bord_lead = 0; + abs_bord_trail = sbr.numTimeSlots; + n_rel_lead = bs_num_env - 1; + n_rel_trail = 0; + break; + } + case FIXVAR: { + int bs_abs_bord = ld.readBits(2) + sbr.numTimeSlots; + int bs_num_env = ld.readBits(2) + 1; + + for (int rel = 0; rel < bs_num_env - 1; rel++) { + bs_rel_bord[rel] = 2 * ld.readBits(2) + 2; + } + int i = sbr_log2(bs_num_env + 1); + bs_pointer = ld.readBits(i); + + for (int env = 0; env < bs_num_env; env++) { + f[bs_num_env - env - 1] = ld.readBit(); + } + + L_E = Math.min(bs_num_env, 4); + + abs_bord_lead = 0; + abs_bord_trail = bs_abs_bord; + n_rel_lead = 0; + n_rel_trail = bs_num_env - 1; + break; + } + case VARFIX: { + int bs_abs_bord = ld.readBits(2); + int bs_num_env = ld.readBits(2) + 1; + + for (int rel = 0; rel < bs_num_env - 1; rel++) { + bs_rel_bord[rel] = 2 * ld.readBits(2) + 2; + } + int i = sbr_log2(bs_num_env + 1); + bs_pointer = ld.readBits(i); + + for (int env = 0; env < bs_num_env; env++) { + f[env] = ld.readBit(); + } + + L_E = Math.min(bs_num_env, 4); + + abs_bord_lead = bs_abs_bord; + abs_bord_trail = sbr.numTimeSlots; + n_rel_lead = bs_num_env - 1; + n_rel_trail = 0; + break; + } + case VARVAR: { + int bs_abs_bord = ld.readBits(2); + int bs_abs_bord_1 = ld.readBits(2) + sbr.numTimeSlots; + bs_num_rel_0 = ld.readBits(2); + bs_num_rel_1 = ld.readBits(2); + + int bs_num_env = Math.min(5, bs_num_rel_0 + bs_num_rel_1 + 1); + + for (int rel = 0; rel < bs_num_rel_0; rel++) { + bs_rel_bord_0[rel] = 2 * ld.readBits(2) + 2; + } + for (int rel = 0; rel < bs_num_rel_1; rel++) { + bs_rel_bord_1[rel] = 2 * ld.readBits(2) + 2; + } + int i = sbr_log2(bs_num_rel_0 + bs_num_rel_1 + 2); + bs_pointer = ld.readBits(i); + + for (int env = 0; env < bs_num_env; env++) { + f[env] = ld.readBit(); + } + + L_E = Math.min(bs_num_env, 5); + + abs_bord_lead = bs_abs_bord; + abs_bord_trail = bs_abs_bord_1; + n_rel_lead = bs_num_rel_0; + n_rel_trail = bs_num_rel_1; + + break; + } + } + + if (L_E <= 0) + return 1; + + if (L_E > 1) + L_Q = 2; + else + L_Q = 1; + + /* TODO: this code can probably be integrated into the code above! */ + if ((result = envelope_time_border_vector()) > 0) { + bs_frame_class = saved_frame_class; + L_E = saved_L_E; + L_Q = saved_L_Q; + return result; + } + + noise_floor_time_border_vector(); + + return 0; + } + + private static final int[] log2tab = {0, 0, 1, 2, 2, 3, 3, 3, 3, 4}; + + /* integer log[2](x): input range [0,10) */ + private static int sbr_log2(int val) { + + if (val < 10 && val >= 0) + return log2tab[val]; + else + return 0; + } + + + private final int[] eTmp = new int[6]; + + /* function constructs new time border vector */ + /* first build into temp vector to be able to use previous vector on error */ + int envelope_time_border_vector() { + + eTmp[0] = sbr.rate * abs_bord_lead; + eTmp[L_E] = sbr.rate * abs_bord_trail; + + switch (bs_frame_class) { + case FIXFIX: + switch (L_E) { + case 4: + int temp = (sbr.numTimeSlots / 4); + eTmp[3] = sbr.rate * 3 * temp; + eTmp[2] = sbr.rate * 2 * temp; + eTmp[1] = sbr.rate * temp; + break; + case 2: + eTmp[1] = sbr.rate * (sbr.numTimeSlots / 2); + break; + default: + break; + } + break; + + case FIXVAR: + if (L_E > 1) { + int i = L_E; + int border = abs_bord_trail; + + for (int l = 0; l < (L_E - 1); l++) { + if (border < bs_rel_bord[l]) + return 1; + + border -= bs_rel_bord[l]; + eTmp[--i] = sbr.rate * border; + } + } + break; + + case VARFIX: + if (L_E > 1) { + int i = 1; + int border = abs_bord_lead; + + for (int l = 0; l < (L_E - 1); l++) { + border += bs_rel_bord[l]; + + if (sbr.rate * border + sbr.tHFAdj > sbr.numTimeSlotsRate + sbr.tHFGen) + return 1; + + eTmp[i++] = sbr.rate * border; + } + } + break; + + case VARVAR: + if (bs_num_rel_0 != 0) { + int i = 1; + int border = abs_bord_lead; + + for (int l = 0; l < bs_num_rel_0; l++) { + border += bs_rel_bord_0[l]; + + if (sbr.rate * border + sbr.tHFAdj > sbr.numTimeSlotsRate + sbr.tHFGen) + return 1; + + eTmp[i++] = sbr.rate * border; + } + } + + if (bs_num_rel_1 != 0) { + int i = L_E; + int border = abs_bord_trail; + + for (int l = 0; l < bs_num_rel_1; l++) { + if (border < bs_rel_bord_1[l]) + return 1; + + border -= bs_rel_bord_1[l]; + eTmp[--i] = sbr.rate * border; + } + } + break; + } + + /* no error occured, we can safely use this t_E vector */ + System.arraycopy(eTmp, 0, t_E, 0, 6); + + return 0; + } + + void noise_floor_time_border_vector() { + t_Q[0] = t_E[0]; + + if (L_E == 1) { + t_Q[1] = t_E[1]; + t_Q[2] = 0; + } else { + int index = middleBorder(); + t_Q[1] = t_E[index]; + t_Q[2] = t_E[L_E]; + } + } + + private int middleBorder() { + int retval = 0; + + switch (bs_frame_class) { + case FIXFIX: + retval = L_E / 2; + break; + case VARFIX: + if (bs_pointer == 0) + retval = 1; + else if (bs_pointer == 1) + retval = L_E - 1; + else + retval = bs_pointer - 1; + break; + case FIXVAR: + case VARVAR: + if (bs_pointer > 1) + retval = L_E + 1 - bs_pointer; + else + retval = L_E - 1; + break; + } + + return Math.max(retval, 0); + } + + + void process_channel(float[] channel_buf, float[][][] X, boolean reset) { + + sbr.bsco = 0; + + boolean dont_process = sbr.hdr == null; + + /* subband analysis */ + qmfa.sbr_qmf_analysis_32(sbr.numTimeSlotsRate, channel_buf, + Xsbr, sbr.tHFGen, dont_process ? 32 : sbr.kx); + + if (!dont_process) { + /* insert high frequencies here */ + /* hf generation using patching */ + HFGeneration.hf_generation(Xsbr, Xsbr, this, reset); + + + /* hf adjustment */ + HFAdjustment.hf_adjustment(sbr, Xsbr, this); + } + + if (dont_process) { + for (int l = 0; l < sbr.numTimeSlotsRate; l++) { + for (int k = 0; k < 32; k++) { + X[l][k][0] = Xsbr[l + sbr.tHFAdj][k][0]; + X[l][k][1] = Xsbr[l + sbr.tHFAdj][k][1]; + } + for (int k = 32; k < 64; k++) { + X[l][k][0] = 0; + X[l][k][1] = 0; + } + } + } else { + for (int l = 0; l < sbr.numTimeSlotsRate; l++) { + int kx_band, M_band, bsco_band; + + if (l < t_E[0]) { + kx_band = sbr.kx_prev; + M_band = sbr.M_prev; + bsco_band = sbr.bsco_prev; + } else { + kx_band = sbr.kx; + M_band = sbr.M; + bsco_band = sbr.bsco; + } + + for (int k = 0; k < kx_band + bsco_band; k++) { + X[l][k][0] = Xsbr[l + sbr.tHFAdj][k][0]; + X[l][k][1] = Xsbr[l + sbr.tHFAdj][k][1]; + } + for (int k = kx_band + bsco_band; k < kx_band + M_band; k++) { + X[l][k][0] = Xsbr[l + sbr.tHFAdj][k][0]; + X[l][k][1] = Xsbr[l + sbr.tHFAdj][k][1]; + } + for (int k = Math.max(kx_band + bsco_band, kx_band + M_band); k < 64; k++) { + X[l][k][0] = 0; + X[l][k][1] = 0; + } + } + } + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/Constants.java b/src/main/java/net/sourceforge/jaad/aac/sbr/Constants.java deleted file mode 100644 index 938035c6..00000000 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/Constants.java +++ /dev/null @@ -1,37 +0,0 @@ -package net.sourceforge.jaad.aac.sbr; - -interface Constants { - - int[] startMinTable = {7, 7, 10, 11, 12, 16, 16, - 17, 24, 32, 35, 48}; - int[] offsetIndexTable = {5, 5, 4, 4, 4, 3, 2, 1, 0, - 6, 6, 6}; - int[][] OFFSET = { - {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7}, //16000 - {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13}, //22050 - {-5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16}, //24000 - {-6, -4, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16}, //32000 - {-4, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20}, //44100-64000 - {-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20, 24}, //>64000 - {0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20, 24, 28, 33} - }; - int EXTENSION_ID_PS = 2; - int MAX_NTSRHFG = 40; //maximum of number_time_slots * rate + HFGen. 16*2+8 - int MAX_NTSR = 32; //max number_time_slots * rate, ok for DRM and not DRM mode - int MAX_M = 49; //maximum value for M - int MAX_L_E = 5; //maximum value for L_E - int EXT_SBR_DATA = 13; - int EXT_SBR_DATA_CRC = 14; - int FIXFIX = 0; - int FIXVAR = 1; - int VARFIX = 2; - int VARVAR = 3; - int LO_RES = 0; - int HI_RES = 1; - int NO_TIME_SLOTS_960 = 15; - int NO_TIME_SLOTS = 16; - int RATE = 2; - int NOISE_FLOOR_OFFSET = 6; - int T_HFGEN = 8; - int T_HFADJ = 2; -} diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/DCT.java b/src/main/java/net/sourceforge/jaad/aac/sbr/DCT.java index d0c1a09b..e6d37d25 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/DCT.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/DCT.java @@ -2,393 +2,392 @@ class DCT { - private static final int n = 32; - - // w_array_real[i] = cos(2*M_PI*i/32) - private static final float[] w_array_real = { - 1.000000000000000f, 0.980785279337272f, - 0.923879528329380f, 0.831469603195765f, - 0.707106765732237f, 0.555570210304169f, - 0.382683402077046f, 0.195090284503576f, - 0.000000000000000f, -0.195090370246552f, - -0.382683482845162f, -0.555570282993553f, - -0.707106827549476f, -0.831469651765257f, - -0.923879561784627f, -0.980785296392607f - }; - - // w_array_imag[i] = sin(-2*M_PI*i/32) - private static final float[] w_array_imag = { - 0.000000000000000f, -0.195090327375064f, - -0.382683442461104f, -0.555570246648862f, - -0.707106796640858f, -0.831469627480512f, - -0.923879545057005f, -0.980785287864940f, - -1.000000000000000f, -0.980785270809601f, - -0.923879511601754f, -0.831469578911016f, - -0.707106734823616f, -0.555570173959476f, - -0.382683361692986f, -0.195090241632088f - }; - - private static final float[] dct4_64_tab = { - 0.999924719333649f, 0.998118102550507f, - 0.993906974792480f, 0.987301409244537f, - 0.978317379951477f, 0.966976463794708f, - 0.953306019306183f, 0.937339007854462f, - 0.919113874435425f, 0.898674488067627f, - 0.876070082187653f, 0.851355195045471f, - 0.824589252471924f, 0.795836925506592f, - 0.765167236328125f, 0.732654273509979f, - 0.698376238346100f, 0.662415742874146f, - 0.624859452247620f, 0.585797846317291f, - 0.545324981212616f, 0.503538429737091f, - 0.460538715124130f, 0.416429549455643f, - 0.371317148208618f, 0.325310230255127f, - 0.278519600629807f, 0.231058135628700f, - 0.183039888739586f, 0.134580686688423f, - 0.085797272622585f, 0.036807164549828f, - -1.012196302413940f, -1.059438824653626f, - -1.104129195213318f, -1.146159529685974f, - -1.185428738594055f, -1.221842169761658f, - -1.255311965942383f, -1.285757660865784f, - -1.313105940818787f, -1.337290763854981f, - -1.358253836631775f, -1.375944852828980f, - -1.390321016311646f, -1.401347875595093f, - -1.408998727798462f, -1.413255214691162f, - -1.414107084274292f, -1.411552190780640f, - -1.405596733093262f, -1.396255016326904f, - -1.383549690246582f, -1.367511272430420f, - -1.348178386688232f, -1.325597524642944f, - -1.299823284149170f, -1.270917654037476f, - -1.238950133323669f, -1.203998088836670f, - -1.166145324707031f, -1.125483393669128f, - -1.082109928131104f, -1.036129593849182f, - -0.987653195858002f, -0.936797380447388f, - -0.883684754371643f, -0.828443288803101f, - -0.771206021308899f, -0.712110757827759f, - -0.651300072669983f, -0.588920354843140f, - -0.525121808052063f, -0.460058242082596f, - -0.393886327743530f, -0.326765477657318f, - -0.258857429027557f, -0.190325915813446f, - -0.121335685253143f, -0.052053272724152f, - 0.017354607582092f, 0.086720645427704f, - 0.155877828598022f, 0.224659323692322f, - 0.292899727821350f, 0.360434412956238f, - 0.427100926637650f, 0.492738455533981f, - 0.557188928127289f, 0.620297133922577f, - 0.681910991668701f, 0.741881847381592f, - 0.800065577030182f, 0.856321990489960f, - 0.910515367984772f, 0.962515234947205f, - 1.000000000000000f, 0.998795449733734f, - 0.995184719562531f, 0.989176511764526f, - 0.980785250663757f, 0.970031261444092f, - 0.956940352916718f, 0.941544055938721f, - 0.923879504203796f, 0.903989315032959f, - 0.881921231746674f, 0.857728600502014f, - 0.831469595432281f, 0.803207516670227f, - 0.773010432720184f, 0.740951120853424f, - 0.707106769084930f, 0.671558916568756f, - 0.634393274784088f, 0.595699310302734f, - 0.555570185184479f, 0.514102697372437f, - 0.471396654844284f, 0.427555114030838f, - 0.382683426141739f, 0.336889833211899f, - 0.290284633636475f, 0.242980122566223f, - 0.195090234279633f, 0.146730497479439f, - 0.098017133772373f, 0.049067649990320f, - -1.000000000000000f, -1.047863125801086f, - -1.093201875686646f, -1.135906934738159f, - -1.175875544548035f, -1.213011503219605f, - -1.247225046157837f, -1.278433918952942f, - -1.306562900543213f, -1.331544399261475f, - -1.353317975997925f, -1.371831417083740f, - -1.387039899826050f, -1.398906826972961f, - -1.407403707504273f, -1.412510156631470f, - 0f, -1.412510156631470f, - -1.407403707504273f, -1.398906826972961f, - -1.387039899826050f, -1.371831417083740f, - -1.353317975997925f, -1.331544399261475f, - -1.306562900543213f, -1.278433918952942f, - -1.247225046157837f, -1.213011384010315f, - -1.175875544548035f, -1.135907053947449f, - -1.093201875686646f, -1.047863125801086f, - -1.000000000000000f, -0.949727773666382f, - -0.897167563438416f, -0.842446029186249f, - -0.785694956779480f, -0.727051079273224f, - -0.666655659675598f, -0.604654192924500f, - -0.541196048259735f, -0.476434230804443f, - -0.410524487495422f, -0.343625843524933f, - -0.275899350643158f, -0.207508206367493f, - -0.138617098331451f, -0.069392144680023f, - 0f, 0.069392263889313f, - 0.138617157936096f, 0.207508206367493f, - 0.275899469852448f, 0.343625962734222f, - 0.410524636507034f, 0.476434201002121f, - 0.541196107864380f, 0.604654192924500f, - 0.666655719280243f, 0.727051138877869f, - 0.785695075988770f, 0.842446029186249f, - 0.897167563438416f, 0.949727773666382f - }; - - private static final int[] bit_rev_tab = {0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23, 15, 31}; - - // FFT decimation in frequency - // 4*16*2+16=128+16=144 multiplications - // 6*16*2+10*8+4*16*2=192+80+128=400 additions - private static void fft_dif(float[] Real, float[] Imag) { - float w_real, w_imag; // For faster access - float point1_real, point1_imag, point2_real, point2_imag; // For faster access - int j, i, i2, w_index; // Counters - - // First 2 stages of 32 point FFT decimation in frequency - // 4*16*2=64*2=128 multiplications - // 6*16*2=96*2=192 additions - // Stage 1 of 32 point FFT decimation in frequency - for(i = 0; i<16; i++) { - point1_real = Real[i]; - point1_imag = Imag[i]; - i2 = i+16; - point2_real = Real[i2]; - point2_imag = Imag[i2]; - - w_real = w_array_real[i]; - w_imag = w_array_imag[i]; - - // temp1 = x[i] - x[i2] - point1_real -= point2_real; - point1_imag -= point2_imag; - - // x[i1] = x[i] + x[i2] - Real[i] += point2_real; - Imag[i] += point2_imag; - - // x[i2] = (x[i] - x[i2]) * w - Real[i2] = ((point1_real*w_real)-(point1_imag*w_imag)); - Imag[i2] = ((point1_real*w_imag)+(point1_imag*w_real)); - } - // Stage 2 of 32 point FFT decimation in frequency - for(j = 0, w_index = 0; j<8; j++, w_index += 2) { - w_real = w_array_real[w_index]; - w_imag = w_array_imag[w_index]; - - i = j; - point1_real = Real[i]; - point1_imag = Imag[i]; - i2 = i+8; - point2_real = Real[i2]; - point2_imag = Imag[i2]; - - // temp1 = x[i] - x[i2] - point1_real -= point2_real; - point1_imag -= point2_imag; - - // x[i1] = x[i] + x[i2] - Real[i] += point2_real; - Imag[i] += point2_imag; - - // x[i2] = (x[i] - x[i2]) * w - Real[i2] = ((point1_real*w_real)-(point1_imag*w_imag)); - Imag[i2] = ((point1_real*w_imag)+(point1_imag*w_real)); - - i = j+16; - point1_real = Real[i]; - point1_imag = Imag[i]; - i2 = i+8; - point2_real = Real[i2]; - point2_imag = Imag[i2]; - - // temp1 = x[i] - x[i2] - point1_real -= point2_real; - point1_imag -= point2_imag; - - // x[i1] = x[i] + x[i2] - Real[i] += point2_real; - Imag[i] += point2_imag; - - // x[i2] = (x[i] - x[i2]) * w - Real[i2] = ((point1_real*w_real)-(point1_imag*w_imag)); - Imag[i2] = ((point1_real*w_imag)+(point1_imag*w_real)); - } - - // Stage 3 of 32 point FFT decimation in frequency - // 2*4*2=16 multiplications - // 4*4*2+6*4*2=10*8=80 additions - for(i = 0; i k0 */ - if(k2<=k0) { - sbr.N_master = 0; - return 1; - } - - dk = bs_alter_scale ? 2 : 1; - - if(bs_alter_scale) { - nrBands = (((k2-k0+2)>>2)<<1); - } - else { - nrBands = (((k2-k0)>>1)<<1); - } - nrBands = Math.min(nrBands, 63); - if(nrBands<=0) - return 1; - - k2Achieved = k0+nrBands*dk; - k2Diff = k2-k2Achieved; - for(k = 0; k0) ? -1 : 1; - k = ((k2Diff>0) ? (nrBands-1) : 0); - - while(k2Diff!=0) { - vDk[k] -= incr; - k += incr; - k2Diff += incr; - } - } - - sbr.f_master[0] = k0; - for(k = 1; k<=nrBands; k++) { - sbr.f_master[k] = (sbr.f_master[k-1]+vDk[k-1]); - } - - sbr.N_master = nrBands; - sbr.N_master = Math.min(sbr.N_master, 64); - - return 0; - } - - /* - This function finds the number of bands using this formula: - bands * log(a1/a0)/log(2.0) + 0.5 - */ - public static int find_bands(int warp, int bands, int a0, int a1) { - float div = (float) Math.log(2.0); - if(warp!=0) div *= 1.3f; - - return (int) (bands*Math.log((float) a1/(float) a0)/div+0.5); - } - - public static float find_initial_power(int bands, int a0, int a1) { - return (float) Math.pow((float) a1/(float) a0, 1.0f/(float) bands); - } - - /* - version for bs_freq_scale > 0 - */ - public static int master_frequency_table(SBR sbr, int k0, int k2, - int bs_freq_scale, boolean bs_alter_scale) { - int k, bands; - boolean twoRegions; - int k1; - int nrBand0, nrBand1; - int[] vDk0 = new int[64], vDk1 = new int[64]; - int[] vk0 = new int[64], vk1 = new int[64]; - int[] temp1 = {6, 5, 4}; - float q, qk; - int A_1; - - /* mft only defined for k2 > k0 */ - if(k2<=k0) { - sbr.N_master = 0; - return 1; - } - - bands = temp1[bs_freq_scale-1]; - - if((float) k2/(float) k0>2.2449) { - twoRegions = true; - k1 = k0<<1; - } - else { - twoRegions = false; - k1 = k2; - } - - nrBand0 = (2*find_bands(0, bands, k0, k1)); - nrBand0 = Math.min(nrBand0, 63); - if(nrBand0<=0) - return 1; - - q = find_initial_power(nrBand0, k0, k1); - qk = k0; - A_1 = (int) (qk+0.5f); - for(k = 0; k<=nrBand0; k++) { - int A_0 = A_1; - qk *= q; - A_1 = (int) (qk+0.5f); - vDk0[k] = A_1-A_0; - } - - /* needed? */ - //qsort(vDk0, nrBand0, sizeof(vDk0[0]), longcmp); - Arrays.sort(vDk0, 0, nrBand0); - - vk0[0] = k0; - for(k = 1; k<=nrBand0; k++) { - vk0[k] = vk0[k-1]+vDk0[k-1]; - if(vDk0[k-1]==0) - return 1; - } - - if(!twoRegions) { - for(k = 0; k<=nrBand0; k++) { - sbr.f_master[k] = vk0[k]; - } - - sbr.N_master = nrBand0; - sbr.N_master = Math.min(sbr.N_master, 64); - return 0; - } - - nrBand1 = (2*find_bands(1 /* warped */, bands, k1, k2)); - nrBand1 = Math.min(nrBand1, 63); - - q = find_initial_power(nrBand1, k1, k2); - qk = k1; - A_1 = (int) (qk+0.5f); - for(k = 0; k<=nrBand1-1; k++) { - int A_0 = A_1; - qk *= q; - A_1 = (int) (qk+0.5f); - vDk1[k] = A_1-A_0; - } - - if(vDk1[0]>1)+(sbr.N_high-((sbr.N_high>>1)<<1)); - - sbr.n[0] = sbr.N_low; - sbr.n[1] = sbr.N_high; - - for(k = 0; k<=sbr.N_high; k++) { - sbr.f_table_res[HI_RES][k] = sbr.f_master[k+bs_xover_band]; - } - - sbr.M = sbr.f_table_res[HI_RES][sbr.N_high]-sbr.f_table_res[HI_RES][0]; - sbr.kx = sbr.f_table_res[HI_RES][0]; - if(sbr.kx>32) - return 1; - if(sbr.kx+sbr.M>64) - return 1; - - minus = ((sbr.N_high&1)!=0) ? 1 : 0; - - for(k = 0; k<=sbr.N_low; k++) { - if(k==0) - i = 0; - else - i = (2*k-minus); - sbr.f_table_res[LO_RES][k] = sbr.f_table_res[HI_RES][i]; - } - - sbr.N_Q = 0; - if(sbr.bs_noise_bands==0) { - sbr.N_Q = 1; - } - else { - sbr.N_Q = (Math.max(1, find_bands(0, sbr.bs_noise_bands, sbr.kx, k2))); - sbr.N_Q = Math.min(5, sbr.N_Q); - } - - for(k = 0; k<=sbr.N_Q; k++) { - if(k==0) { - i = 0; - } - else { - /* i = i + (int32_t)((sbr.N_low - i)/(sbr.N_Q + 1 - k)); */ - i += (sbr.N_low-i)/(sbr.N_Q+1-k); - } - sbr.f_table_noise[k] = sbr.f_table_res[LO_RES][i]; - } - - /* build table for mapping k to g in hf patching */ - for(k = 0; k<64; k++) { - int g; - for(g = 0; g64000 + {0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20, 24, 28, 33} + }; + + public static final int LO_RES = 0; + + public static final int HI_RES = 1; + /* calculate the start QMF channel for the master frequency band table */ + /* parameter is also called k0 */ + public static int qmf_start_channel(int bs_start_freq, int bs_samplerate_mode, SampleFrequency sample_rate) { + + int startMin = startMinTable[sample_rate.getIndex()]; + int offsetIndex = offsetIndexTable[sample_rate.getIndex()]; + + if (bs_samplerate_mode != 0) { + return startMin + OFFSET[offsetIndex][bs_start_freq]; + } else { + return startMin + OFFSET[6][bs_start_freq]; + } + } + + private static final int[] stopMinTable = {13, 15, 20, 21, 23, + 32, 32, 35, 48, 64, 70, 96}; + private static final int[][] STOP_OFFSET_TABLE = { + {0, 2, 4, 6, 8, 11, 14, 18, 22, 26, 31, 37, 44, 51}, + {0, 2, 4, 6, 8, 11, 14, 18, 22, 26, 31, 36, 42, 49}, + {0, 2, 4, 6, 8, 11, 14, 17, 21, 25, 29, 34, 39, 44}, + {0, 2, 4, 6, 8, 11, 14, 17, 20, 24, 28, 33, 38, 43}, + {0, 2, 4, 6, 8, 11, 14, 17, 20, 24, 28, 32, 36, 41}, + {0, 2, 4, 6, 8, 10, 12, 14, 17, 20, 23, 26, 29, 32}, + {0, 2, 4, 6, 8, 10, 12, 14, 17, 20, 23, 26, 29, 32}, + {0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 20, 23, 26, 29}, + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, -1, -2, -3, -4, -5, -6, -6, -6, -6, -6, -6, -6, -6}, + {0, -3, -6, -9, -12, -15, -18, -20, -22, -24, -26, -28, -30, -32} + }; + /* calculate the stop QMF channel for the master frequency band table */ + /* parameter is also called k2 */ + + public static int qmf_stop_channel(int bs_stop_freq, SampleFrequency sample_rate, int k0) { + if (bs_stop_freq == 15) { + return Math.min(64, k0 * 3); + } else if (bs_stop_freq == 14) { + return Math.min(64, k0 * 2); + } else { + int stopMin = stopMinTable[sample_rate.getIndex()]; + + /* bs_stop_freq <= 13 */ + return Math.min(64, stopMin + STOP_OFFSET_TABLE[sample_rate.getIndex()][Math.min(bs_stop_freq, 13)]); + } + } + + /* calculate the master frequency table from k0, k2, bs_freq_scale + and bs_alter_scale + + version for bs_freq_scale = 0 + */ + public static int master_frequency_table_fs0(SBR sbr, int k0, int k2, boolean bs_alter_scale) { + int[] vDk = new int[64]; + + /* mft only defined for k2 > k0 */ + if (k2 <= k0) { + sbr.N_master = 0; + return 1; + } + + int dk = bs_alter_scale ? 2 : 1; + + int nrBands = bs_alter_scale ? ((k2 - k0 + 2) >> 2) << 1 : ((k2 - k0) >> 1) << 1; + + nrBands = Math.min(nrBands, 63); + if (nrBands <= 0) + return 1; + + int k2Achieved = k0 + nrBands * dk; + int k2Diff = k2 - k2Achieved; + for (int k = 0; k < nrBands; k++) { + vDk[k] = dk; + } + + if (k2Diff != 0) { + int incr = (k2Diff > 0) ? -1 : 1; + int k = ((k2Diff > 0) ? (nrBands - 1) : 0); + + while (k2Diff != 0) { + vDk[k] -= incr; + k += incr; + k2Diff += incr; + } + } + + sbr.f_master[0] = k0; + for (int k = 1; k <= nrBands; k++) { + sbr.f_master[k] = (sbr.f_master[k - 1] + vDk[k - 1]); + } + + sbr.N_master = nrBands; + sbr.N_master = Math.min(sbr.N_master, 64); + + return 0; + } + + /* + This function finds the number of bands using this formula: + bands * log(a1/a0)/log(2.0) + 0.5 + */ + public static int find_bands(int warp, int bands, int a0, int a1) { + float div = (float) Math.log(2.0); + if (warp != 0) div *= 1.3f; + + return (int) (bands * Math.log((float) a1 / (float) a0) / div + 0.5); + } + + public static float find_initial_power(int bands, int a0, int a1) { + return (float) Math.pow((float) a1 / (float) a0, 1.0f / (float) bands); + } + + /* + version for bs_freq_scale > 0 + */ + public static int master_frequency_table(SBR sbr, int k0, int k2, + int bs_freq_scale, boolean bs_alter_scale) { + int[] vDk0 = new int[64], vDk1 = new int[64]; + int[] vk0 = new int[64], vk1 = new int[64]; + int[] temp1 = {6, 5, 4}; + + /* mft only defined for k2 > k0 */ + if (k2 <= k0) { + sbr.N_master = 0; + return 1; + } + + int bands = temp1[bs_freq_scale - 1]; + + boolean twoRegions; + int k1; + if ((float) k2 / (float) k0 > 2.2449) { + twoRegions = true; + k1 = k0 << 1; + } else { + twoRegions = false; + k1 = k2; + } + + int nrBand0 = (2 * find_bands(0, bands, k0, k1)); + nrBand0 = Math.min(nrBand0, 63); + if (nrBand0 <= 0) + return 1; + + float q = find_initial_power(nrBand0, k0, k1); + float qk = k0; + int A_1 = (int) (qk + 0.5f); + for (int k = 0; k <= nrBand0; k++) { + int A_0 = A_1; + qk *= q; + A_1 = (int) (qk + 0.5f); + vDk0[k] = A_1 - A_0; + } + + /* needed? */ + //qsort(vDk0, nrBand0, sizeof(vDk0[0]), longcmp); + Arrays.sort(vDk0, 0, nrBand0); + + vk0[0] = k0; + for (int k = 1; k <= nrBand0; k++) { + vk0[k] = vk0[k - 1] + vDk0[k - 1]; + if (vDk0[k - 1] == 0) + return 1; + } + + if (!twoRegions) { + for (int k = 0; k <= nrBand0; k++) { + sbr.f_master[k] = vk0[k]; + } + + sbr.N_master = nrBand0; + sbr.N_master = Math.min(sbr.N_master, 64); + return 0; + } + + int nrBand1 = (2 * find_bands(1 /* warped */, bands, k1, k2)); + nrBand1 = Math.min(nrBand1, 63); + + q = find_initial_power(nrBand1, k1, k2); + qk = k1; + A_1 = (int) (qk + 0.5f); + for (int k = 0; k <= nrBand1 - 1; k++) { + int A_0 = A_1; + qk *= q; + A_1 = (int) (qk + 0.5f); + vDk1[k] = A_1 - A_0; + } + + if (vDk1[0] < vDk0[nrBand0 - 1]) { + int change; + + /* needed? */ + //qsort(vDk1, nrBand1+1, sizeof(vDk1[0]), longcmp); + Arrays.sort(vDk1, 0, nrBand1 + 1); + change = vDk0[nrBand0 - 1] - vDk1[0]; + vDk1[0] = vDk0[nrBand0 - 1]; + vDk1[nrBand1 - 1] = vDk1[nrBand1 - 1] - change; + } + + /* needed? */ + //qsort(vDk1, nrBand1, sizeof(vDk1[0]), longcmp); + Arrays.sort(vDk1, 0, nrBand1); + vk1[0] = k1; + for (int k = 1; k <= nrBand1; k++) { + vk1[k] = vk1[k - 1] + vDk1[k - 1]; + if (vDk1[k - 1] == 0) + return 1; + } + + sbr.N_master = nrBand0 + nrBand1; + sbr.N_master = Math.min(sbr.N_master, 64); + for (int k = 0; k <= nrBand0; k++) { + sbr.f_master[k] = vk0[k]; + } + for (int k = nrBand0 + 1; k <= sbr.N_master; k++) { + sbr.f_master[k] = vk1[k - nrBand0]; + } + + return 0; + } + + /* calculate the derived frequency border tables from f_master */ + public static int derived_frequency_table(SBR sbr, int bs_xover_band, int k2) { + + /* The following relation shall be satisfied: bs_xover_band < N_Master */ + if (sbr.N_master <= bs_xover_band) + return 1; + + sbr.N_high = sbr.N_master - bs_xover_band; + sbr.N_low = (sbr.N_high >> 1) + (sbr.N_high - ((sbr.N_high >> 1) << 1)); + + sbr.n[0] = sbr.N_low; + sbr.n[1] = sbr.N_high; + + for (int k = 0; k <= sbr.N_high; k++) { + sbr.f_table_res[HI_RES][k] = sbr.f_master[k + bs_xover_band]; + } + + sbr.M = sbr.f_table_res[HI_RES][sbr.N_high] - sbr.f_table_res[HI_RES][0]; + sbr.kx = sbr.f_table_res[HI_RES][0]; + if (sbr.kx > 32) + return 1; + if (sbr.kx + sbr.M > 64) + return 1; + + int minus = ((sbr.N_high & 1) != 0) ? 1 : 0; + + for (int i = 0, k = 0; k <= sbr.N_low; k++) { + if (k > 0) + i = 2 * k - minus; + + sbr.f_table_res[LO_RES][k] = sbr.f_table_res[HI_RES][i]; + } + + sbr.N_Q = 0; + if (sbr.hdr.bs_noise_bands == 0) { + sbr.N_Q = 1; + } else { + sbr.N_Q = (Math.max(1, find_bands(0, sbr.hdr.bs_noise_bands, sbr.kx, k2))); + sbr.N_Q = Math.min(5, sbr.N_Q); + } + + for (int i = 0, k = 0; k <= sbr.N_Q; k++) { + if (k == 0) { + i = 0; + } else { + /* i = i + (int32_t)((sbr.N_low - i)/(sbr.N_Q + 1 - k)); */ + i += (sbr.N_low - i) / (sbr.N_Q + 1 - k); + } + sbr.f_table_noise[k] = sbr.f_table_res[LO_RES][i]; + } + + /* build table for mapping k to g in hf patching */ + for (int k = 0; k < 64; k++) { + for (int g = 0; g < sbr.N_Q; g++) { + if ((sbr.f_table_noise[g] <= k) + && (k < sbr.f_table_noise[g + 1])) { + sbr.table_map_k_to_g[k] = g; + break; + } + } + } + return 0; + } + + /* TODO: blegh, ugly */ + /* Modified to calculate for all possible bs_limiter_bands always + * This reduces the number calls to this functions needed (now only on + * header reset) + */ + private static final float[] limiterBandsCompare = {1.327152f, + 1.185093f, 1.119872f}; + + public static void limiter_frequency_table(SBR sbr) { + + sbr.f_table_lim[0][0] = sbr.f_table_res[LO_RES][0] - sbr.kx; + sbr.f_table_lim[0][1] = sbr.f_table_res[LO_RES][sbr.N_low] - sbr.kx; + sbr.N_L[0] = 1; + + for (int s = 1; s < 4; s++) { + int[] limTable = new int[100 /*TODO*/]; + int[] patchBorders = new int[64/*??*/]; + + patchBorders[0] = sbr.kx; + for (int k = 1; k <= sbr.noPatches; k++) { + patchBorders[k] = patchBorders[k - 1] + sbr.patchNoSubbands[k - 1]; + } + + for (int k = 0; k <= sbr.N_low; k++) { + limTable[k] = sbr.f_table_res[LO_RES][k]; + } + for (int k = 1; k < sbr.noPatches; k++) { + limTable[k + sbr.N_low] = patchBorders[k]; + } + + /* needed */ + //qsort(limTable, sbr.noPatches+sbr.N_low, sizeof(limTable[0]), longcmp); + Arrays.sort(limTable, 0, sbr.noPatches + sbr.N_low); + int k = 1; + int nrLim = sbr.noPatches + sbr.N_low - 1; + + if (nrLim < 0) // TODO: BIG FAT PROBLEM + return; + + restart: + while (k <= nrLim) { + float nOctaves; + + if (limTable[k - 1] != 0) + nOctaves = (float) limTable[k] / (float) limTable[k - 1]; + else + nOctaves = 0; + + if (nOctaves < limiterBandsCompare[s - 1]) { + if (limTable[k] != limTable[k - 1]) { + boolean found = false, found2 = false; + for (int i = 0; i <= sbr.noPatches; i++) { + if (limTable[k] == patchBorders[i]) + found = true; + } + if (found) { + found2 = false; + for (int i = 0; i <= sbr.noPatches; i++) { + if (limTable[k - 1] == patchBorders[i]) + found2 = true; + } + if (found2) { + k++; + continue; + } else { + /* remove (k-1)th element */ + limTable[k - 1] = sbr.f_table_res[LO_RES][sbr.N_low]; + //qsort(limTable, sbr.noPatches+sbr.N_low, sizeof(limTable[0]), longcmp); + Arrays.sort(limTable, 0, sbr.noPatches + sbr.N_low); + nrLim--; + continue; + } + } + } + /* remove kth element */ + limTable[k] = sbr.f_table_res[LO_RES][sbr.N_low]; + //qsort(limTable, nrLim, sizeof(limTable[0]), longcmp); + Arrays.sort(limTable, 0, nrLim); + nrLim--; + //continue; + } else { + k++; + //continue; + } + } + + sbr.N_L[s] = nrLim; + for (k = 0; k <= nrLim; k++) { + sbr.f_table_lim[s][k] = limTable[k] - sbr.kx; + } + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/FilterbankTable.java b/src/main/java/net/sourceforge/jaad/aac/sbr/Filterbank.java similarity index 97% rename from src/main/java/net/sourceforge/jaad/aac/sbr/FilterbankTable.java rename to src/main/java/net/sourceforge/jaad/aac/sbr/Filterbank.java index 38f6a165..df843c9c 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/FilterbankTable.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/Filterbank.java @@ -1,8 +1,10 @@ package net.sourceforge.jaad.aac.sbr; -interface FilterbankTable { +import java.util.Arrays; - float[] qmf_c = { +class Filterbank { + + static final float[] qmf_c = { 0f, -0.00055252865047f, -0.00056176925738f, -0.00049475180896f, -0.00048752279712f, -0.00048937912498f, @@ -325,4 +327,15 @@ interface FilterbankTable { -0.00056176925738f, -0.00055252865047f }; -} + protected final float[] v; //double ringbuffer + protected int v_index; //ringbuffer index + + public Filterbank(int channels) { + v = new float[2*channels*20]; + v_index = 0; + } + + public void reset() { + Arrays.fill(v, 0); + } +} \ No newline at end of file diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/FrameClass.java b/src/main/java/net/sourceforge/jaad/aac/sbr/FrameClass.java new file mode 100644 index 00000000..7e4c58d2 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/FrameClass.java @@ -0,0 +1,24 @@ +package net.sourceforge.jaad.aac.sbr; + +import net.sourceforge.jaad.aac.syntax.BitStream; +import net.sourceforge.jaad.aac.tools.Utils; + +import java.util.List; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 28.12.20 + * Time: 09:43 + */ +enum FrameClass { + + FIXFIX, FIXVAR, VARFIX, VARVAR; + + public static final List VALUES = Utils.listOf(values()); + + static FrameClass read(BitStream is) { + int bits = is.readBits(2); + return VALUES.get(bits); + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/HFAdjustment.java b/src/main/java/net/sourceforge/jaad/aac/sbr/HFAdjustment.java index 2d200776..20652cb2 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/HFAdjustment.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/HFAdjustment.java @@ -1,427 +1,406 @@ package net.sourceforge.jaad.aac.sbr; -class HFAdjustment implements Constants, NoiseTable { - - private static final float[] h_smooth = { - 0.03183050093751f, 0.11516383427084f, - 0.21816949906249f, 0.30150283239582f, - 0.33333333333333f - }; - private static final int[] phi_re = {1, 0, -1, 0}; - private static final int[] phi_im = {0, 1, 0, -1}; - private static final float[] limGain = {0.5f, 1.0f, 2.0f, 1e10f}; - private static final float EPS = 1e-12f; - private float[][] G_lim_boost = new float[MAX_L_E][MAX_M]; - private float[][] Q_M_lim_boost = new float[MAX_L_E][MAX_M]; - private float[][] S_M_boost = new float[MAX_L_E][MAX_M]; - - public static int hf_adjustment(SBR sbr, float[][][] Xsbr, int ch) { - HFAdjustment adj = new HFAdjustment(); - int ret = 0; - - if(sbr.bs_frame_class[ch]==FIXFIX) { - sbr.l_A[ch] = -1; - } - else if(sbr.bs_frame_class[ch]==VARFIX) { - if(sbr.bs_pointer[ch]>1) - sbr.l_A[ch] = sbr.bs_pointer[ch]-1; - else - sbr.l_A[ch] = -1; - } - else { - if(sbr.bs_pointer[ch]==0) - sbr.l_A[ch] = -1; - else - sbr.l_A[ch] = sbr.L_E[ch]+1-sbr.bs_pointer[ch]; - } - - ret = estimate_current_envelope(sbr, adj, Xsbr, ch); - if(ret>0) return 1; - - calculate_gain(sbr, adj, ch); - - hf_assembly(sbr, adj, Xsbr, ch); - - return 0; - } - - private static int get_S_mapped(SBR sbr, int ch, int l, int current_band) { - if(sbr.f[ch][l]==HI_RES) { - /* in case of using f_table_high we just have 1 to 1 mapping - * from bs_add_harmonic[l][k] - */ - if((l>=sbr.l_A[ch]) - ||(sbr.bs_add_harmonic_prev[ch][current_band]!=0&&sbr.bs_add_harmonic_flag_prev[ch])) { - return sbr.bs_add_harmonic[ch][current_band]; - } - } - else { - int b, lb, ub; - - /* in case of f_table_low we check if any of the HI_RES bands - * within this LO_RES band has bs_add_harmonic[l][k] turned on - * (note that borders in the LO_RES table are also present in - * the HI_RES table) - */ - - /* find first HI_RES band in current LO_RES band */ - lb = 2*current_band-((sbr.N_high&1)!=0 ? 1 : 0); - /* find first HI_RES band in next LO_RES band */ - ub = 2*(current_band+1)-((sbr.N_high&1)!=0 ? 1 : 0); - - /* check all HI_RES bands in current LO_RES band for sinusoid */ - for(b = lb; b=sbr.l_A[ch]) - ||(sbr.bs_add_harmonic_prev[ch][b]!=0&&sbr.bs_add_harmonic_flag_prev[ch])) { - if(sbr.bs_add_harmonic[ch][b]==1) - return 1; - } - } - } - - return 0; - } - - private static int estimate_current_envelope(SBR sbr, HFAdjustment adj, - float[][][] Xsbr, int ch) { - int m, l, j, k, k_l, k_h, p; - float nrg, div; - - if(sbr.bs_interpol_freq) { - for(l = 0; l=5) - ri -= 5; - G_filt += (sbr.G_temp_prev[ch][ri][m]*curr_h_smooth); - Q_filt += (sbr.Q_temp_prev[ch][ri][m]*curr_h_smooth); - } - } - else { - G_filt = sbr.G_temp_prev[ch][sbr.GQ_ringbuf_index[ch]][m]; - Q_filt = sbr.Q_temp_prev[ch][sbr.GQ_ringbuf_index[ch]][m]; - } - - Q_filt = (adj.S_M_boost[l][m]!=0||no_noise) ? 0 : Q_filt; - - /* add noise to the output */ - fIndexNoise = (fIndexNoise+1)&511; - - /* the smoothed gain values are applied to Xsbr */ - /* V is defined, not calculated */ - Xsbr[i+sbr.tHFAdj][m+sbr.kx][0] = G_filt*Xsbr[i+sbr.tHFAdj][m+sbr.kx][0] - +(Q_filt*NOISE_TABLE[fIndexNoise][0]); - if(sbr.bs_extension_id==3&&sbr.bs_extension_data==42) - Xsbr[i+sbr.tHFAdj][m+sbr.kx][0] = 16428320; - Xsbr[i+sbr.tHFAdj][m+sbr.kx][1] = G_filt*Xsbr[i+sbr.tHFAdj][m+sbr.kx][1] - +(Q_filt*NOISE_TABLE[fIndexNoise][1]); - - { - int rev = (((m+sbr.kx)&1)!=0 ? -1 : 1); - psi[0] = adj.S_M_boost[l][m]*phi_re[fIndexSine]; - Xsbr[i+sbr.tHFAdj][m+sbr.kx][0] += psi[0]; - - psi[1] = rev*adj.S_M_boost[l][m]*phi_im[fIndexSine]; - Xsbr[i+sbr.tHFAdj][m+sbr.kx][1] += psi[1]; - } - } - - fIndexSine = (fIndexSine+1)&3; - - /* update the ringbuffer index used for filtering G and Q with h_smooth */ - sbr.GQ_ringbuf_index[ch]++; - if(sbr.GQ_ringbuf_index[ch]>=5) - sbr.GQ_ringbuf_index[ch] = 0; - } - } - - sbr.index_noise_prev[ch] = fIndexNoise; - sbr.psi_is_prev[ch] = fIndexSine; - } - - private static void calculate_gain(SBR sbr, HFAdjustment adj, int ch) { - int m, l, k; - - int current_t_noise_band = 0; - int S_mapped; - - float[] Q_M_lim = new float[MAX_M]; - float[] G_lim = new float[MAX_M]; - float G_boost; - float[] S_M = new float[MAX_M]; - - for(l = 0; lsbr.t_Q[ch][current_t_noise_band+1]) { - current_t_noise_band++; - } - - for(k = 0; k=sbr.l_A[ch]) - ||(sbr.bs_add_harmonic_prev[ch][current_hi_res_band]!=0&&sbr.bs_add_harmonic_flag_prev[ch])) { - /* find the middle subband of the HI_RES frequency band */ - if((m+sbr.kx)==(sbr.f_table_res[HI_RES][current_hi_res_band+1]+sbr.f_table_res[HI_RES][current_hi_res_band])>>1) - S_index_mapped = sbr.bs_add_harmonic[ch][current_hi_res_band]; - } - - - /* Q_div: [0..1] (1/(1+Q_mapped)) */ - Q_div = sbr.Q_div[ch][current_f_noise_band][current_t_noise_band]; - - - /* Q_div2: [0..1] (Q_mapped/(1+Q_mapped)) */ - Q_div2 = sbr.Q_div2[ch][current_f_noise_band][current_t_noise_band]; - - - /* Q_M only depends on E_orig and Q_div2: - * since N_Q <= N_Low <= N_High we only need to recalculate Q_M on - * a change of current noise band - */ - Q_M = sbr.E_orig[ch][current_res_band2][l]*Q_div2; - - - /* S_M only depends on E_orig, Q_div and S_index_mapped: - * S_index_mapped can only be non-zero once per HI_RES band - */ - if(S_index_mapped==0) { - S_M[m] = 0; - } - else { - S_M[m] = sbr.E_orig[ch][current_res_band2][l]*Q_div; - - /* accumulate sinusoid part of the total energy */ - den += S_M[m]; - } - - - /* calculate gain */ - /* ratio of the energy of the original signal and the energy - * of the HF generated signal - */ - G = sbr.E_orig[ch][current_res_band2][l]/(1.0f+sbr.E_curr[ch][m][l]); - if((S_mapped==0)&&(delta==1)) - G *= Q_div; - else if(S_mapped==1) - G *= Q_div2; - - - /* limit the additional noise energy level */ - /* and apply the limiter */ - if(G_max>G) { - Q_M_lim[m] = Q_M; - G_lim[m] = G; - } - else { - Q_M_lim[m] = Q_M*G_max/G; - G_lim[m] = G_max; - } - - - /* accumulate the total energy */ - den += sbr.E_curr[ch][m][l]*G_lim[m]; - if((S_index_mapped==0)&&(l!=sbr.l_A[ch])) - den += Q_M_lim[m]; - } - - /* G_boost: [0..2.51188643] */ - G_boost = (acc1+EPS)/(den+EPS); - G_boost = Math.min(G_boost, 2.51188643f /* 1.584893192 ^ 2 */); - - for(m = ml1; m 1) + ch.l_A = ch.bs_pointer - 1; + else + ch.l_A = -1; + } else { + if (ch.bs_pointer == 0) + ch.l_A = -1; + else + ch.l_A = ch.L_E + 1 - ch.bs_pointer; + } + + adj.estimate_current_envelope(sbr, Xsbr, ch); + + adj.calculate_gain(sbr, ch); + + adj.hf_assembly(sbr, Xsbr, ch); + } + + private static int get_S_mapped(SBR sbr, Channel ch, int l, int current_band) { + if (ch.f[l] == FBT.HI_RES) { + /* in case of using f_table_high we just have 1 to 1 mapping + * from bs_add_harmonic[l][k] + */ + if ((l >= ch.l_A) + || (ch.bs_add_harmonic_prev[current_band] != 0 && ch.bs_add_harmonic_flag_prev)) { + return ch.bs_add_harmonic[current_band]; + } + } else { + int b, lb, ub; + + /* in case of f_table_low we check if any of the HI_RES bands + * within this LO_RES band has bs_add_harmonic[l][k] turned on + * (note that borders in the LO_RES table are also present in + * the HI_RES table) + */ + + /* find first HI_RES band in current LO_RES band */ + lb = 2 * current_band - ((sbr.N_high & 1) != 0 ? 1 : 0); + /* find first HI_RES band in next LO_RES band */ + ub = 2 * (current_band + 1) - ((sbr.N_high & 1) != 0 ? 1 : 0); + + /* check all HI_RES bands in current LO_RES band for sinusoid */ + for (b = lb; b < ub; b++) { + if ((l >= ch.l_A) + || (ch.bs_add_harmonic_prev[b] != 0 && ch.bs_add_harmonic_flag_prev)) { + if (ch.bs_add_harmonic[b] == 1) + return 1; + } + } + } + + return 0; + } + + private void estimate_current_envelope(SBR sbr, float[][][] Xsbr, Channel ch) { + float nrg, div; + + if (sbr.hdr.bs_interpol_freq) { + for (int l = 0; l < ch.L_E; l++) { + int i, l_i, u_i; + + l_i = ch.t_E[l]; + u_i = ch.t_E[l + 1]; + + div = (float) (u_i - l_i); + + if (div == 0) + div = 1; + + for (int m = 0; m < sbr.M; m++) { + nrg = 0; + + for (i = l_i + sbr.tHFAdj; i < u_i + sbr.tHFAdj; i++) { + nrg += (Xsbr[i][m + sbr.kx][0] * Xsbr[i][m + sbr.kx][0]) + + (Xsbr[i][m + sbr.kx][1] * Xsbr[i][m + sbr.kx][1]); + } + + ch.E_curr[m][l] = nrg / div; + } + } + } else { + for (int l = 0; l < ch.L_E; l++) { + for (int p = 0; p < sbr.n[ch.f[l]]; p++) { + int k_l = sbr.f_table_res[ch.f[l]][p]; + int k_h = sbr.f_table_res[ch.f[l]][p + 1]; + + for (int k = k_l; k < k_h; k++) { + nrg = 0; + + int l_i = ch.t_E[l]; + int u_i = ch.t_E[l + 1]; + + div = (float) ((u_i - l_i) * (k_h - k_l)); + + if (div == 0) + div = 1; + + for (int i = l_i + sbr.tHFAdj; i < u_i + sbr.tHFAdj; i++) { + for (int j = k_l; j < k_h; j++) { + nrg += (Xsbr[i][j][0] * Xsbr[i][j][0]) + + (Xsbr[i][j][1] * Xsbr[i][j][1]); + } + } + + ch.E_curr[k - sbr.kx][l] = nrg / div; + } + } + } + } + } + + private void hf_assembly(SBR sbr, float[][][] Xsbr, Channel ch) { + + int fIndexNoise = 0; + int fIndexSine = 0; + boolean assembly_reset = false; + + float G_filt, Q_filt; + + int h_SL; + + if (sbr.reset) { + assembly_reset = true; + fIndexNoise = 0; + } else { + fIndexNoise = ch.index_noise_prev; + } + fIndexSine = ch.psi_is_prev; + + for (int l = 0; l < ch.L_E; l++) { + boolean no_noise = (l == ch.l_A || l == ch.prevEnvIsShort); + + h_SL = (sbr.hdr.bs_smoothing_mode) ? 0 : 4; + h_SL = (no_noise ? 0 : h_SL); + + if (assembly_reset) { + for (int n = 0; n < 4; n++) { + System.arraycopy(this.G_lim_boost[l], 0, ch.G_temp_prev[n], 0, sbr.M); + System.arraycopy(this.Q_M_lim_boost[l], 0, ch.Q_temp_prev[n], 0, sbr.M); + } + /* reset ringbuffer index */ + ch.GQ_ringbuf_index = 4; + assembly_reset = false; + } + + for (int i = ch.t_E[l]; i < ch.t_E[l + 1]; i++) { + /* load new values into ringbuffer */ + System.arraycopy(this.G_lim_boost[l], 0, ch.G_temp_prev[ch.GQ_ringbuf_index], 0, sbr.M); + System.arraycopy(this.Q_M_lim_boost[l], 0, ch.Q_temp_prev[ch.GQ_ringbuf_index], 0, sbr.M); + + for (int m = 0; m < sbr.M; m++) { + float[] psi = new float[2]; + + G_filt = 0; + Q_filt = 0; + + if (h_SL != 0) { + int ri = ch.GQ_ringbuf_index; + for (int n = 0; n <= 4; n++) { + float curr_h_smooth = h_smooth[n]; + ri++; + if (ri >= 5) + ri -= 5; + G_filt += (ch.G_temp_prev[ri][m] * curr_h_smooth); + Q_filt += (ch.Q_temp_prev[ri][m] * curr_h_smooth); + } + } else { + G_filt = ch.G_temp_prev[ch.GQ_ringbuf_index][m]; + Q_filt = ch.Q_temp_prev[ch.GQ_ringbuf_index][m]; + } + + Q_filt = (this.S_M_boost[l][m] != 0 || no_noise) ? 0 : Q_filt; + + /* add noise to the output */ + fIndexNoise = (fIndexNoise + 1) & 511; + + /* the smoothed gain values are applied to Xsbr */ + /* V is defined, not calculated */ + Xsbr[i + sbr.tHFAdj][m + sbr.kx][0] = G_filt * Xsbr[i + sbr.tHFAdj][m + sbr.kx][0] + + (Q_filt * NOISE_TABLE[fIndexNoise][0]); +// if (sbr.bs_extension_id == 3 && sbr.bs_extension_data == 42) +// Xsbr[i + sbr.tHFAdj][m + sbr.kx][0] = 16428320; + Xsbr[i + sbr.tHFAdj][m + sbr.kx][1] = G_filt * Xsbr[i + sbr.tHFAdj][m + sbr.kx][1] + + (Q_filt * NOISE_TABLE[fIndexNoise][1]); + + { + int rev = (((m + sbr.kx) & 1) != 0 ? -1 : 1); + psi[0] = this.S_M_boost[l][m] * phi_re[fIndexSine]; + Xsbr[i + sbr.tHFAdj][m + sbr.kx][0] += psi[0]; + + psi[1] = rev * this.S_M_boost[l][m] * phi_im[fIndexSine]; + Xsbr[i + sbr.tHFAdj][m + sbr.kx][1] += psi[1]; + } + } + + fIndexSine = (fIndexSine + 1) & 3; + + /* update the ringbuffer index used for filtering G and Q with h_smooth */ + ch.GQ_ringbuf_index++; + if (ch.GQ_ringbuf_index >= 5) + ch.GQ_ringbuf_index = 0; + } + } + + ch.index_noise_prev = fIndexNoise; + ch.psi_is_prev = fIndexSine; + } + + private void calculate_gain(SBR sbr, Channel ch) { + + int current_t_noise_band = 0; + int S_mapped; + + float[] Q_M_lim = new float[SBR.MAX_M]; + float[] G_lim = new float[SBR.MAX_M]; + float G_boost; + float[] S_M = new float[SBR.MAX_M]; + + for (int l = 0; l < ch.L_E; l++) { + int current_f_noise_band = 0; + int current_res_band = 0; + int current_res_band2 = 0; + int current_hi_res_band = 0; + + float delta = (l == ch.l_A || l == ch.prevEnvIsShort) ? 0 : 1; + + S_mapped = get_S_mapped(sbr, ch, l, current_res_band2); + + if (ch.t_E[l + 1] > ch.t_Q[current_t_noise_band + 1]) { + current_t_noise_band++; + } + + for (int k = 0; k < sbr.N_L[sbr.hdr.bs_limiter_bands]; k++) { + float G_max; + float den = 0; + float acc1 = 0; + float acc2 = 0; + int current_res_band_size = 0; + + int ml1, ml2; + + ml1 = sbr.f_table_lim[sbr.hdr.bs_limiter_bands][k]; + ml2 = sbr.f_table_lim[sbr.hdr.bs_limiter_bands][k + 1]; + + + /* calculate the accumulated E_orig and E_curr over the limiter band */ + for (int m = ml1; m < ml2; m++) { + if ((m + sbr.kx) == sbr.f_table_res[ch.f[l]][current_res_band + 1]) { + current_res_band++; + } + acc1 += ch.E_orig[current_res_band][l]; + acc2 += ch.E_curr[m][l]; + } + + + /* calculate the maximum gain */ + /* ratio of the energy of the original signal and the energy + * of the HF generated signal + */ + G_max = ((EPS + acc1) / (EPS + acc2)) * limGain[sbr.hdr.bs_limiter_gains]; + G_max = Math.min(G_max, 1e10f); + + for (int m = ml1; m < ml2; m++) { + float Q_M, G; + float Q_div, Q_div2; + int S_index_mapped; + + + /* check if m is on a noise band border */ + if ((m + sbr.kx) == sbr.f_table_noise[current_f_noise_band + 1]) { + /* step to next noise band */ + current_f_noise_band++; + } + + + /* check if m is on a resolution band border */ + if ((m + sbr.kx) == sbr.f_table_res[ch.f[l]][current_res_band2 + 1]) { + /* step to next resolution band */ + current_res_band2++; + + /* if we move to a new resolution band, we should check if we are + * going to add a sinusoid in this band + */ + S_mapped = get_S_mapped(sbr, ch, l, current_res_band2); + } + + + /* check if m is on a HI_RES band border */ + if ((m + sbr.kx) == sbr.f_table_res[FBT.HI_RES][current_hi_res_band + 1]) { + /* step to next HI_RES band */ + current_hi_res_band++; + } + + + /* find S_index_mapped + * S_index_mapped can only be 1 for the m in the middle of the + * current HI_RES band + */ + S_index_mapped = 0; + if ((l >= ch.l_A) + || (ch.bs_add_harmonic_prev[current_hi_res_band] != 0 && ch.bs_add_harmonic_flag_prev)) { + /* find the middle subband of the HI_RES frequency band */ + if ((m + sbr.kx) == (sbr.f_table_res[FBT.HI_RES][current_hi_res_band + 1] + sbr.f_table_res[FBT.HI_RES][current_hi_res_band]) >> 1) + S_index_mapped = ch.bs_add_harmonic[current_hi_res_band]; + } + + + /* Q_div: [0..1] (1/(1+Q_mapped)) */ + Q_div = ch.Q_div[current_f_noise_band][current_t_noise_band]; + + + /* Q_div2: [0..1] (Q_mapped/(1+Q_mapped)) */ + Q_div2 = ch.Q_div2[current_f_noise_band][current_t_noise_band]; + + + /* Q_M only depends on E_orig and Q_div2: + * since N_Q <= N_Low <= N_High we only need to recalculate Q_M on + * a change of current noise band + */ + Q_M = ch.E_orig[current_res_band2][l] * Q_div2; + + + /* S_M only depends on E_orig, Q_div and S_index_mapped: + * S_index_mapped can only be non-zero once per HI_RES band + */ + if (S_index_mapped == 0) { + S_M[m] = 0; + } else { + S_M[m] = ch.E_orig[current_res_band2][l] * Q_div; + + /* accumulate sinusoid part of the total energy */ + den += S_M[m]; + } + + + /* calculate gain */ + /* ratio of the energy of the original signal and the energy + * of the HF generated signal + */ + G = ch.E_orig[current_res_band2][l] / (1.0f + ch.E_curr[m][l]); + if ((S_mapped == 0) && (delta == 1)) + G *= Q_div; + else if (S_mapped == 1) + G *= Q_div2; + + + /* limit the additional noise energy level */ + /* and apply the limiter */ + if (G_max > G) { + Q_M_lim[m] = Q_M; + G_lim[m] = G; + } else { + Q_M_lim[m] = Q_M * G_max / G; + G_lim[m] = G_max; + } + + + /* accumulate the total energy */ + den += ch.E_curr[m][l] * G_lim[m]; + if ((S_index_mapped == 0) && (l != ch.l_A)) + den += Q_M_lim[m]; + } + + /* G_boost: [0..2.51188643] */ + G_boost = (acc1 + EPS) / (den + EPS); + G_boost = Math.min(G_boost, 2.51188643f /* 1.584893192 ^ 2 */); + + for (int m = ml1; m < ml2; m++) { + /* apply compensation to gain, noise floor sf's and sinusoid levels */ + this.G_lim_boost[l][m] = (float) Math.sqrt(G_lim[m] * G_boost); + this.Q_M_lim_boost[l][m] = (float) Math.sqrt(Q_M_lim[m] * G_boost); + + if (S_M[m] != 0) { + this.S_M_boost[l][m] = (float) Math.sqrt(S_M[m] * G_boost); + } else { + this.S_M_boost[l][m] = 0; + } + } + } + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/HFGeneration.java b/src/main/java/net/sourceforge/jaad/aac/sbr/HFGeneration.java index 8ec5d44d..2d4c6735 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/HFGeneration.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/HFGeneration.java @@ -2,314 +2,309 @@ class HFGeneration { - private static final int[] goalSbTab = {21, 23, 32, 43, 46, 64, 85, 93, 128, 0, 0, 0}; - - private static class acorr_coef { - - float[] r01 = new float[2]; - float[] r02 = new float[2]; - float[] r11 = new float[2]; - float[] r12 = new float[2]; - float[] r22 = new float[2]; - float det; - } - - public static void hf_generation(SBR sbr, float[][][] Xlow, - float[][][] Xhigh, int ch) { - int l, i, x; - float[][] alpha_0 = new float[64][2], alpha_1 = new float[64][2]; - - int offset = sbr.tHFAdj; - int first = sbr.t_E[ch][0]; - int last = sbr.t_E[ch][sbr.L_E[ch]]; - - calc_chirp_factors(sbr, ch); - - if((ch==0)&&(sbr.Reset)) - patch_construction(sbr); - - /* calculate the prediction coefficients */ - - /* actual HF generation */ - for(i = 0; i0) { - float temp1_r, temp2_r, temp3_r; - float temp1_i, temp2_i, temp3_i; - calc_prediction_coef(sbr, Xlow, alpha_0, alpha_1, p); - - a0_r = (alpha_0[p][0]*bw); - a1_r = (alpha_1[p][0]*bw2); - a0_i = (alpha_0[p][1]*bw); - a1_i = (alpha_1[p][1]*bw2); - - temp2_r = (Xlow[first-2+offset][p][0]); - temp3_r = (Xlow[first-1+offset][p][0]); - temp2_i = (Xlow[first-2+offset][p][1]); - temp3_i = (Xlow[first-1+offset][p][1]); - for(l = first; l=16.0f) - ||((alpha_1[k][0]*alpha_1[k][0])+(alpha_1[k][1]*alpha_1[k][1])>=16.0f)) { - alpha_0[k][0] = 0; - alpha_0[k][1] = 0; - alpha_1[k][0] = 0; - alpha_1[k][1] = 0; - } - } - - /* FIXED POINT: bwArray = COEF */ - private static float mapNewBw(int invf_mode, int invf_mode_prev) { - switch(invf_mode) { - case 1: /* LOW */ - - if(invf_mode_prev==0) /* NONE */ - return 0.6f; - else - return 0.75f; - - case 2: /* MID */ - - return 0.9f; - - case 3: /* HIGH */ - - return 0.98f; - - default: /* NONE */ - - if(invf_mode_prev==1) /* LOW */ - return 0.6f; - else - return 0.0f; - } - } - - /* FIXED POINT: bwArray = COEF */ - private static void calc_chirp_factors(SBR sbr, int ch) { - int i; - - for(i = 0; i=0.99609375f) - sbr.bwArray[ch][i] = 0.99609375f; - - sbr.bwArray_prev[ch][i] = sbr.bwArray[ch][i]; - sbr.bs_invf_mode_prev[ch][i] = sbr.bs_invf_mode[ch][i]; - } - } - - private static void patch_construction(SBR sbr) { - int i, k; - int odd, sb; - int msb = sbr.k0; - int usb = sbr.kx; - /* (uint8_t)(2.048e6/sbr.sample_rate + 0.5); */ - int goalSb = goalSbTab[sbr.sample_rate.getIndex()]; - - sbr.noPatches = 0; - - if(goalSb<(sbr.kx+sbr.M)) { - for(i = 0, k = 0; sbr.f_master[i](sbr.k0-1+msb-odd)); - - sbr.patchNoSubbands[sbr.noPatches] = Math.max(sb-usb, 0); - sbr.patchStartSubband[sbr.noPatches] = sbr.k0-odd - -sbr.patchNoSubbands[sbr.noPatches]; - - if(sbr.patchNoSubbands[sbr.noPatches]>0) { - usb = sb; - msb = sb; - sbr.noPatches++; - } - else { - msb = sbr.kx; - } - - if(sbr.f_master[k]-sb<3) - k = sbr.N_master; - } - while(sb!=(sbr.kx+sbr.M)); - - if((sbr.patchNoSubbands[sbr.noPatches-1]<3)&&(sbr.noPatches>1)) { - sbr.noPatches--; - } + private static final int[] goalSbTab = {21, 23, 32, 43, 46, 64, 85, 93, 128, 0, 0, 0}; + + private static class acorr_coef { + + float[] r01 = new float[2]; + float[] r02 = new float[2]; + float[] r11 = new float[2]; + float[] r12 = new float[2]; + float[] r22 = new float[2]; + float det; + } + + public static void hf_generation(float[][][] Xlow, float[][][] Xhigh, Channel ch, boolean reset) { + + float[][] alpha_0 = new float[64][2], alpha_1 = new float[64][2]; + + int offset = ch.sbr.tHFAdj; + int first = ch.t_E[0]; + int last = ch.t_E[ch.L_E]; + + calc_chirp_factors(ch); + + if (reset) + patch_construction(ch.sbr); + + /* calculate the prediction coefficients */ + + /* actual HF generation */ + for (int i = 0; i < ch.sbr.noPatches; i++) { + for (int x = 0; x < ch.sbr.patchNoSubbands[i]; x++) { + float a0_r, a0_i, a1_r, a1_i; + float bw, bw2; + int q, p, k, g; + + /* find the low and high band for patching */ + k = ch.sbr.kx + x; + for (q = 0; q < i; q++) { + k += ch.sbr.patchNoSubbands[q]; + } + p = ch.sbr.patchStartSubband[i] + x; + + g = ch.sbr.table_map_k_to_g[k]; + + bw = ch.bwArray[g]; + bw2 = bw * bw; + + /* do the patching */ + /* with or without filtering */ + if (bw2 > 0) { + float temp1_r, temp2_r, temp3_r; + float temp1_i, temp2_i, temp3_i; + calc_prediction_coef(ch.sbr, Xlow, alpha_0, alpha_1, p); + + a0_r = (alpha_0[p][0] * bw); + a1_r = (alpha_1[p][0] * bw2); + a0_i = (alpha_0[p][1] * bw); + a1_i = (alpha_1[p][1] * bw2); + + temp2_r = (Xlow[first - 2 + offset][p][0]); + temp3_r = (Xlow[first - 1 + offset][p][0]); + temp2_i = (Xlow[first - 2 + offset][p][1]); + temp3_i = (Xlow[first - 1 + offset][p][1]); + for (int l = first; l < last; l++) { + temp1_r = temp2_r; + temp2_r = temp3_r; + temp3_r = (Xlow[l + offset][p][0]); + temp1_i = temp2_i; + temp2_i = temp3_i; + temp3_i = (Xlow[l + offset][p][1]); + + Xhigh[l + offset][k][0] + = temp3_r + + ((a0_r * temp2_r) + - (a0_i * temp2_i) + + (a1_r * temp1_r) + - (a1_i * temp1_i)); + Xhigh[l + offset][k][1] + = temp3_i + + ((a0_i * temp2_r) + + (a0_r * temp2_i) + + (a1_i * temp1_r) + + (a1_r * temp1_i)); + } + } else { + for (int l = first; l < last; l++) { + Xhigh[l + offset][k][0] = Xlow[l + offset][p][0]; + Xhigh[l + offset][k][1] = Xlow[l + offset][p][1]; + } + } + } + } + + if (ch.sbr.reset) { + FBT.limiter_frequency_table(ch.sbr); + } + } + + private static void auto_correlation(SBR sbr, acorr_coef ac, float[][][] buffer, + int bd, int len) { + float r01r = 0, r01i = 0, r02r = 0, r02i = 0, r11r = 0; + float temp1_r, temp1_i, temp2_r, temp2_i, temp3_r, temp3_i, temp4_r, temp4_i, temp5_r, temp5_i; + float rel = 1.0f / (1 + 1e-6f); + int j; + int offset = sbr.tHFAdj; + + temp2_r = buffer[offset - 2][bd][0]; + temp2_i = buffer[offset - 2][bd][1]; + temp3_r = buffer[offset - 1][bd][0]; + temp3_i = buffer[offset - 1][bd][1]; + // Save these because they are needed after loop + temp4_r = temp2_r; + temp4_i = temp2_i; + temp5_r = temp3_r; + temp5_i = temp3_i; + + for (j = offset; j < len + offset; j++) { + temp1_r = temp2_r; // temp1_r = QMF_RE(buffer[j-2][bd]; + temp1_i = temp2_i; // temp1_i = QMF_IM(buffer[j-2][bd]; + temp2_r = temp3_r; // temp2_r = QMF_RE(buffer[j-1][bd]; + temp2_i = temp3_i; // temp2_i = QMF_IM(buffer[j-1][bd]; + temp3_r = buffer[j][bd][0]; + temp3_i = buffer[j][bd][1]; + r01r += temp3_r * temp2_r + temp3_i * temp2_i; + r01i += temp3_i * temp2_r - temp3_r * temp2_i; + r02r += temp3_r * temp1_r + temp3_i * temp1_i; + r02i += temp3_i * temp1_r - temp3_r * temp1_i; + r11r += temp2_r * temp2_r + temp2_i * temp2_i; + } + + // These are actual values in temporary variable at this point + // temp1_r = QMF_RE(buffer[len+offset-1-2][bd]; + // temp1_i = QMF_IM(buffer[len+offset-1-2][bd]; + // temp2_r = QMF_RE(buffer[len+offset-1-1][bd]; + // temp2_i = QMF_IM(buffer[len+offset-1-1][bd]; + // temp3_r = QMF_RE(buffer[len+offset-1][bd]); + // temp3_i = QMF_IM(buffer[len+offset-1][bd]); + // temp4_r = QMF_RE(buffer[offset-2][bd]); + // temp4_i = QMF_IM(buffer[offset-2][bd]); + // temp5_r = QMF_RE(buffer[offset-1][bd]); + // temp5_i = QMF_IM(buffer[offset-1][bd]); + ac.r12[0] = r01r + - (temp3_r * temp2_r + temp3_i * temp2_i) + + (temp5_r * temp4_r + temp5_i * temp4_i); + ac.r12[1] = r01i + - (temp3_i * temp2_r - temp3_r * temp2_i) + + (temp5_i * temp4_r - temp5_r * temp4_i); + ac.r22[0] = r11r + - (temp2_r * temp2_r + temp2_i * temp2_i) + + (temp4_r * temp4_r + temp4_i * temp4_i); + + ac.r01[0] = r01r; + ac.r01[1] = r01i; + ac.r02[0] = r02r; + ac.r02[1] = r02i; + ac.r11[0] = r11r; + + ac.det = (ac.r11[0] * ac.r22[0]) - (rel * ((ac.r12[0] * ac.r12[0]) + (ac.r12[1] * ac.r12[1]))); + } + + /* calculate linear prediction coefficients using the covariance method */ + private static void calc_prediction_coef(SBR sbr, float[][][] Xlow, + float[][] alpha_0, float[][] alpha_1, int k) { + float tmp; + acorr_coef ac = new acorr_coef(); + + auto_correlation(sbr, ac, Xlow, k, sbr.numTimeSlotsRate + 6); + + if (ac.det == 0) { + alpha_1[k][0] = 0; + alpha_1[k][1] = 0; + } else { + tmp = 1.0f / ac.det; + alpha_1[k][0] = ((ac.r01[0] * ac.r12[0]) - (ac.r01[1] * ac.r12[1]) - (ac.r02[0] * ac.r11[0])) * tmp; + alpha_1[k][1] = ((ac.r01[1] * ac.r12[0]) + (ac.r01[0] * ac.r12[1]) - (ac.r02[1] * ac.r11[0])) * tmp; + } + + if (ac.r11[0] == 0) { + alpha_0[k][0] = 0; + alpha_0[k][1] = 0; + } else { + tmp = 1.0f / ac.r11[0]; + alpha_0[k][0] = -(ac.r01[0] + (alpha_1[k][0] * ac.r12[0]) + (alpha_1[k][1] * ac.r12[1])) * tmp; + alpha_0[k][1] = -(ac.r01[1] + (alpha_1[k][1] * ac.r12[0]) - (alpha_1[k][0] * ac.r12[1])) * tmp; + } + + if (((alpha_0[k][0] * alpha_0[k][0]) + (alpha_0[k][1] * alpha_0[k][1]) >= 16.0f) + || ((alpha_1[k][0] * alpha_1[k][0]) + (alpha_1[k][1] * alpha_1[k][1]) >= 16.0f)) { + alpha_0[k][0] = 0; + alpha_0[k][1] = 0; + alpha_1[k][0] = 0; + alpha_1[k][1] = 0; + } + } + + /* FIXED POINT: bwArray = COEF */ + private static float mapNewBw(int invf_mode, int invf_mode_prev) { + switch (invf_mode) { + case 1: /* LOW */ + + if (invf_mode_prev == 0) /* NONE */ + return 0.6f; + else + return 0.75f; + + case 2: /* MID */ + + return 0.9f; + + case 3: /* HIGH */ + + return 0.98f; + + default: /* NONE */ + + if (invf_mode_prev == 1) /* LOW */ + return 0.6f; + else + return 0.0f; + } + } + + /* FIXED POINT: bwArray = COEF */ + private static void calc_chirp_factors(Channel ch) { + int i; + + for (i = 0; i < ch.sbr.N_Q; i++) { + ch.bwArray[i] = mapNewBw(ch.bs_invf_mode[i], ch.bs_invf_mode_prev[i]); + + if (ch.bwArray[i] < ch.bwArray_prev[i]) + ch.bwArray[i] = (ch.bwArray[i] * 0.75f) + (ch.bwArray_prev[i] * 0.25f); + else + ch.bwArray[i] = (ch.bwArray[i] * 0.90625f) + (ch.bwArray_prev[i] * 0.09375f); + + if (ch.bwArray[i] < 0.015625f) + ch.bwArray[i] = 0.0f; + + if (ch.bwArray[i] >= 0.99609375f) + ch.bwArray[i] = 0.99609375f; + + ch.bwArray_prev[i] = ch.bwArray[i]; + ch.bs_invf_mode_prev[i] = ch.bs_invf_mode[i]; + } + } + + private static void patch_construction(SBR sbr) { + int msb = sbr.k0; + int usb = sbr.kx; + /* (uint8_t)(2.048e6/sbr.sample_rate + 0.5); */ + int goalSb = goalSbTab[sbr.sample_rate.getIndex()]; + + sbr.noPatches = 0; + + int k = 0; + if (goalSb < (sbr.kx + sbr.M)) { + for (int i = 0; sbr.f_master[i] < goalSb; i++) { + k = i + 1; + } + } else { + k = sbr.N_master; + } + + if (sbr.N_master == 0) { + sbr.noPatches = 0; + sbr.patchNoSubbands[0] = 0; + sbr.patchStartSubband[0] = 0; + + return; + } + + int sb; + do { + int j = k + 1; + int odd; + + do { + j--; + + sb = sbr.f_master[j]; + odd = (sb - 2 + sbr.k0) % 2; + } + while (sb > (sbr.k0 - 1 + msb - odd)); + + sbr.patchNoSubbands[sbr.noPatches] = Math.max(sb - usb, 0); + sbr.patchStartSubband[sbr.noPatches] = sbr.k0 - odd + - sbr.patchNoSubbands[sbr.noPatches]; + + if (sbr.patchNoSubbands[sbr.noPatches] > 0) { + usb = sb; + msb = sb; + sbr.noPatches++; + } else { + msb = sbr.kx; + } + + if (sbr.f_master[k] - sb < 3) + k = sbr.N_master; + } + while (sb != (sbr.kx + sbr.M)); - sbr.noPatches = Math.min(sbr.noPatches, 5); - } + if ((sbr.patchNoSubbands[sbr.noPatches - 1] < 3) && (sbr.noPatches > 1)) { + sbr.noPatches--; + } + + sbr.noPatches = Math.min(sbr.noPatches, 5); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/Header.java b/src/main/java/net/sourceforge/jaad/aac/sbr/Header.java new file mode 100644 index 00000000..1102705f --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/Header.java @@ -0,0 +1,79 @@ +package net.sourceforge.jaad.aac.sbr; + +import net.sourceforge.jaad.aac.syntax.BitStream; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 13.05.21 + * Time: 18:57 + */ +class Header { + boolean bs_amp_res = true; + int bs_start_freq = 5; + int bs_stop_freq; + int bs_xover_band; + int bs_freq_scale = 2; + boolean bs_alter_scale = true; + int bs_noise_bands = 2; + int bs_limiter_bands = 2; + int bs_limiter_gains = 2; + boolean bs_interpol_freq; + boolean bs_smoothing_mode; + + public void decode(BitStream ld) { + + this.bs_amp_res = ld.readBool(); + + /* bs_start_freq and bs_stop_freq must define a frequency band that does + not exceed 48 channels */ + this.bs_start_freq = ld.readBits(4); + this.bs_stop_freq = ld.readBits(4); + this.bs_xover_band = ld.readBits(3); + + ld.readBits(2); //reserved + + boolean bs_header_extra_1 = ld.readBool(); + boolean bs_header_extra_2 = ld.readBool(); + + if (bs_header_extra_1) { + this.bs_freq_scale = ld.readBits(2); + this.bs_alter_scale = ld.readBool(); + this.bs_noise_bands = ld.readBits(2); + } else { + /* Default values */ + this.bs_freq_scale = 2; + this.bs_alter_scale = true; + this.bs_noise_bands = 2; + } + + if (bs_header_extra_2) { + this.bs_limiter_bands = ld.readBits(2); + this.bs_limiter_gains = ld.readBits(2); + this.bs_interpol_freq = ld.readBool(); + this.bs_smoothing_mode = ld.readBool(); + } else { + /* Default values */ + this.bs_limiter_bands = 2; + this.bs_limiter_gains = 2; + this.bs_interpol_freq = true; + this.bs_smoothing_mode = true; + } + } + + /** + * If ay of these parameters differs the system must is reset. + * + * @param prev header to compare + * @return if any relevant parameter differs or the previous header was null. + */ + public boolean differs(Header prev) { + return prev == null + || this.bs_start_freq != prev.bs_start_freq + || this.bs_stop_freq != prev.bs_stop_freq + || this.bs_freq_scale != prev.bs_freq_scale + || this.bs_alter_scale != prev.bs_alter_scale + || this.bs_xover_band != prev.bs_xover_band + || this.bs_noise_bands != prev.bs_noise_bands; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/HuffmanTables.java b/src/main/java/net/sourceforge/jaad/aac/sbr/HuffmanTables.java index ff908657..e61d3718 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/HuffmanTables.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/HuffmanTables.java @@ -2,182 +2,182 @@ interface HuffmanTables { - int[][] T_HUFFMAN_ENV_1_5DB = { - {1, 2}, {-64, -65}, {3, 4}, {-63, -66}, - {5, 6}, {-62, -67}, {7, 8}, {-61, -68}, - {9, 10}, {-60, -69}, {11, 12}, {-59, -70}, - {13, 14}, {-58, -71}, {15, 16}, {-57, -72}, - {17, 18}, {-73, -56}, {19, 21}, {-74, 20}, - {-55, -75}, {22, 26}, {23, 24}, {-54, -76}, - {-77, 25}, {-53, -78}, {27, 34}, {28, 29}, - {-52, -79}, {30, 31}, {-80, -51}, {32, 33}, - {-83, -82}, {-81, -50}, {35, 57}, {36, 40}, - {37, 38}, {-88, -84}, {-48, 39}, {-90, -85}, - {41, 46}, {42, 43}, {-49, -87}, {44, 45}, - {-89, -86}, {-124, -123}, {47, 50}, {48, 49}, - {-122, -121}, {-120, -119}, {51, 54}, {52, 53}, - {-118, -117}, {-116, -115}, {55, 56}, {-114, -113}, - {-112, -111}, {58, 89}, {59, 74}, {60, 67}, - {61, 64}, {62, 63}, {-110, -109}, {-108, -107}, - {65, 66}, {-106, -105}, {-104, -103}, {68, 71}, - {69, 70}, {-102, -101}, {-100, -99}, {72, 73}, - {-98, -97}, {-96, -95}, {75, 82}, {76, 79}, - {77, 78}, {-94, -93}, {-92, -91}, {80, 81}, - {-47, -46}, {-45, -44}, {83, 86}, {84, 85}, - {-43, -42}, {-41, -40}, {87, 88}, {-39, -38}, - {-37, -36}, {90, 105}, {91, 98}, {92, 95}, - {93, 94}, {-35, -34}, {-33, -32}, {96, 97}, - {-31, -30}, {-29, -28}, {99, 102}, {100, 101}, - {-27, -26}, {-25, -24}, {103, 104}, {-23, -22}, - {-21, -20}, {106, 113}, {107, 110}, {108, 109}, - {-19, -18}, {-17, -16}, {111, 112}, {-15, -14}, - {-13, -12}, {114, 117}, {115, 116}, {-11, -10}, - {-9, -8}, {118, 119}, {-7, -6}, {-5, -4} - }; - - int[][] F_HUFFMAN_ENV_1_5DB = { - {1, 2}, {-64, -65}, {3, 4}, {-63, -66}, - {5, 6}, {-67, -62}, {7, 8}, {-68, -61}, - {9, 10}, {-69, -60}, {11, 13}, {-70, 12}, - {-59, -71}, {14, 16}, {-58, 15}, {-72, -57}, - {17, 19}, {-73, 18}, {-56, -74}, {20, 23}, - {21, 22}, {-55, -75}, {-54, -53}, {24, 27}, - {25, 26}, {-76, -52}, {-77, -51}, {28, 31}, - {29, 30}, {-50, -78}, {-79, -49}, {32, 36}, - {33, 34}, {-48, -47}, {-80, 35}, {-81, -82}, - {37, 47}, {38, 41}, {39, 40}, {-83, -46}, - {-45, -84}, {42, 44}, {-85, 43}, {-44, -43}, - {45, 46}, {-88, -87}, {-86, -90}, {48, 66}, - {49, 56}, {50, 53}, {51, 52}, {-92, -42}, - {-41, -39}, {54, 55}, {-105, -89}, {-38, -37}, - {57, 60}, {58, 59}, {-94, -91}, {-40, -36}, - {61, 63}, {-20, 62}, {-115, -110}, {64, 65}, - {-108, -107}, {-101, -97}, {67, 89}, {68, 75}, - {69, 72}, {70, 71}, {-95, -93}, {-34, -27}, - {73, 74}, {-22, -17}, {-16, -124}, {76, 82}, - {77, 79}, {-123, 78}, {-122, -121}, {80, 81}, - {-120, -119}, {-118, -117}, {83, 86}, {84, 85}, - {-116, -114}, {-113, -112}, {87, 88}, {-111, -109}, - {-106, -104}, {90, 105}, {91, 98}, {92, 95}, - {93, 94}, {-103, -102}, {-100, -99}, {96, 97}, - {-98, -96}, {-35, -33}, {99, 102}, {100, 101}, - {-32, -31}, {-30, -29}, {103, 104}, {-28, -26}, - {-25, -24}, {106, 113}, {107, 110}, {108, 109}, - {-23, -21}, {-19, -18}, {111, 112}, {-15, -14}, - {-13, -12}, {114, 117}, {115, 116}, {-11, -10}, - {-9, -8}, {118, 119}, {-7, -6}, {-5, -4} - }; + int[][] T_HUFFMAN_ENV_1_5DB = { + {1, 2}, {-64, -65}, {3, 4}, {-63, -66}, + {5, 6}, {-62, -67}, {7, 8}, {-61, -68}, + {9, 10}, {-60, -69}, {11, 12}, {-59, -70}, + {13, 14}, {-58, -71}, {15, 16}, {-57, -72}, + {17, 18}, {-73, -56}, {19, 21}, {-74, 20}, + {-55, -75}, {22, 26}, {23, 24}, {-54, -76}, + {-77, 25}, {-53, -78}, {27, 34}, {28, 29}, + {-52, -79}, {30, 31}, {-80, -51}, {32, 33}, + {-83, -82}, {-81, -50}, {35, 57}, {36, 40}, + {37, 38}, {-88, -84}, {-48, 39}, {-90, -85}, + {41, 46}, {42, 43}, {-49, -87}, {44, 45}, + {-89, -86}, {-124, -123}, {47, 50}, {48, 49}, + {-122, -121}, {-120, -119}, {51, 54}, {52, 53}, + {-118, -117}, {-116, -115}, {55, 56}, {-114, -113}, + {-112, -111}, {58, 89}, {59, 74}, {60, 67}, + {61, 64}, {62, 63}, {-110, -109}, {-108, -107}, + {65, 66}, {-106, -105}, {-104, -103}, {68, 71}, + {69, 70}, {-102, -101}, {-100, -99}, {72, 73}, + {-98, -97}, {-96, -95}, {75, 82}, {76, 79}, + {77, 78}, {-94, -93}, {-92, -91}, {80, 81}, + {-47, -46}, {-45, -44}, {83, 86}, {84, 85}, + {-43, -42}, {-41, -40}, {87, 88}, {-39, -38}, + {-37, -36}, {90, 105}, {91, 98}, {92, 95}, + {93, 94}, {-35, -34}, {-33, -32}, {96, 97}, + {-31, -30}, {-29, -28}, {99, 102}, {100, 101}, + {-27, -26}, {-25, -24}, {103, 104}, {-23, -22}, + {-21, -20}, {106, 113}, {107, 110}, {108, 109}, + {-19, -18}, {-17, -16}, {111, 112}, {-15, -14}, + {-13, -12}, {114, 117}, {115, 116}, {-11, -10}, + {-9, -8}, {118, 119}, {-7, -6}, {-5, -4} + }; - int[][] T_HUFFMAN_ENV_BAL_1_5DB = { - {-64, 1}, {-63, 2}, {-65, 3}, {-62, 4}, - {-66, 5}, {-61, 6}, {-67, 7}, {-60, 8}, - {-68, 9}, {10, 11}, {-69, -59}, {12, 13}, - {-70, -58}, {14, 28}, {15, 21}, {16, 18}, - {-57, 17}, {-71, -56}, {19, 20}, {-88, -87}, - {-86, -85}, {22, 25}, {23, 24}, {-84, -83}, - {-82, -81}, {26, 27}, {-80, -79}, {-78, -77}, - {29, 36}, {30, 33}, {31, 32}, {-76, -75}, - {-74, -73}, {34, 35}, {-72, -55}, {-54, -53}, - {37, 41}, {38, 39}, {-52, -51}, {-50, 40}, - {-49, -48}, {42, 45}, {43, 44}, {-47, -46}, - {-45, -44}, {46, 47}, {-43, -42}, {-41, -40} - }; + int[][] F_HUFFMAN_ENV_1_5DB = { + {1, 2}, {-64, -65}, {3, 4}, {-63, -66}, + {5, 6}, {-67, -62}, {7, 8}, {-68, -61}, + {9, 10}, {-69, -60}, {11, 13}, {-70, 12}, + {-59, -71}, {14, 16}, {-58, 15}, {-72, -57}, + {17, 19}, {-73, 18}, {-56, -74}, {20, 23}, + {21, 22}, {-55, -75}, {-54, -53}, {24, 27}, + {25, 26}, {-76, -52}, {-77, -51}, {28, 31}, + {29, 30}, {-50, -78}, {-79, -49}, {32, 36}, + {33, 34}, {-48, -47}, {-80, 35}, {-81, -82}, + {37, 47}, {38, 41}, {39, 40}, {-83, -46}, + {-45, -84}, {42, 44}, {-85, 43}, {-44, -43}, + {45, 46}, {-88, -87}, {-86, -90}, {48, 66}, + {49, 56}, {50, 53}, {51, 52}, {-92, -42}, + {-41, -39}, {54, 55}, {-105, -89}, {-38, -37}, + {57, 60}, {58, 59}, {-94, -91}, {-40, -36}, + {61, 63}, {-20, 62}, {-115, -110}, {64, 65}, + {-108, -107}, {-101, -97}, {67, 89}, {68, 75}, + {69, 72}, {70, 71}, {-95, -93}, {-34, -27}, + {73, 74}, {-22, -17}, {-16, -124}, {76, 82}, + {77, 79}, {-123, 78}, {-122, -121}, {80, 81}, + {-120, -119}, {-118, -117}, {83, 86}, {84, 85}, + {-116, -114}, {-113, -112}, {87, 88}, {-111, -109}, + {-106, -104}, {90, 105}, {91, 98}, {92, 95}, + {93, 94}, {-103, -102}, {-100, -99}, {96, 97}, + {-98, -96}, {-35, -33}, {99, 102}, {100, 101}, + {-32, -31}, {-30, -29}, {103, 104}, {-28, -26}, + {-25, -24}, {106, 113}, {107, 110}, {108, 109}, + {-23, -21}, {-19, -18}, {111, 112}, {-15, -14}, + {-13, -12}, {114, 117}, {115, 116}, {-11, -10}, + {-9, -8}, {118, 119}, {-7, -6}, {-5, -4} + }; - int[][] F_HUFFMAN_ENV_BAL_1_5DB = { - {-64, 1}, {-65, 2}, {-63, 3}, {-66, 4}, - {-62, 5}, {-61, 6}, {-67, 7}, {-68, 8}, - {-60, 9}, {10, 11}, {-69, -59}, {-70, 12}, - {-58, 13}, {14, 17}, {-71, 15}, {-57, 16}, - {-56, -73}, {18, 32}, {19, 25}, {20, 22}, - {-72, 21}, {-88, -87}, {23, 24}, {-86, -85}, - {-84, -83}, {26, 29}, {27, 28}, {-82, -81}, - {-80, -79}, {30, 31}, {-78, -77}, {-76, -75}, - {33, 40}, {34, 37}, {35, 36}, {-74, -55}, - {-54, -53}, {38, 39}, {-52, -51}, {-50, -49}, - {41, 44}, {42, 43}, {-48, -47}, {-46, -45}, - {45, 46}, {-44, -43}, {-42, 47}, {-41, -40} - }; + int[][] T_HUFFMAN_ENV_BAL_1_5DB = { + {-64, 1}, {-63, 2}, {-65, 3}, {-62, 4}, + {-66, 5}, {-61, 6}, {-67, 7}, {-60, 8}, + {-68, 9}, {10, 11}, {-69, -59}, {12, 13}, + {-70, -58}, {14, 28}, {15, 21}, {16, 18}, + {-57, 17}, {-71, -56}, {19, 20}, {-88, -87}, + {-86, -85}, {22, 25}, {23, 24}, {-84, -83}, + {-82, -81}, {26, 27}, {-80, -79}, {-78, -77}, + {29, 36}, {30, 33}, {31, 32}, {-76, -75}, + {-74, -73}, {34, 35}, {-72, -55}, {-54, -53}, + {37, 41}, {38, 39}, {-52, -51}, {-50, 40}, + {-49, -48}, {42, 45}, {43, 44}, {-47, -46}, + {-45, -44}, {46, 47}, {-43, -42}, {-41, -40} + }; - int[][] T_HUFFMAN_ENV_3_0DB = { - {-64, 1}, {-65, 2}, {-63, 3}, {-66, 4}, - {-62, 5}, {-67, 6}, {-61, 7}, {-68, 8}, - {-60, 9}, {10, 11}, {-69, -59}, {12, 14}, - {-70, 13}, {-71, -58}, {15, 18}, {16, 17}, - {-72, -57}, {-73, -74}, {19, 22}, {-56, 20}, - {-55, 21}, {-54, -77}, {23, 31}, {24, 25}, - {-75, -76}, {26, 27}, {-78, -53}, {28, 29}, - {-52, -95}, {-94, 30}, {-93, -92}, {32, 47}, - {33, 40}, {34, 37}, {35, 36}, {-91, -90}, - {-89, -88}, {38, 39}, {-87, -86}, {-85, -84}, - {41, 44}, {42, 43}, {-83, -82}, {-81, -80}, - {45, 46}, {-79, -51}, {-50, -49}, {48, 55}, - {49, 52}, {50, 51}, {-48, -47}, {-46, -45}, - {53, 54}, {-44, -43}, {-42, -41}, {56, 59}, - {57, 58}, {-40, -39}, {-38, -37}, {60, 61}, - {-36, -35}, {-34, -33} - }; + int[][] F_HUFFMAN_ENV_BAL_1_5DB = { + {-64, 1}, {-65, 2}, {-63, 3}, {-66, 4}, + {-62, 5}, {-61, 6}, {-67, 7}, {-68, 8}, + {-60, 9}, {10, 11}, {-69, -59}, {-70, 12}, + {-58, 13}, {14, 17}, {-71, 15}, {-57, 16}, + {-56, -73}, {18, 32}, {19, 25}, {20, 22}, + {-72, 21}, {-88, -87}, {23, 24}, {-86, -85}, + {-84, -83}, {26, 29}, {27, 28}, {-82, -81}, + {-80, -79}, {30, 31}, {-78, -77}, {-76, -75}, + {33, 40}, {34, 37}, {35, 36}, {-74, -55}, + {-54, -53}, {38, 39}, {-52, -51}, {-50, -49}, + {41, 44}, {42, 43}, {-48, -47}, {-46, -45}, + {45, 46}, {-44, -43}, {-42, 47}, {-41, -40} + }; - int[][] F_HUFFMAN_ENV_3_0DB = { - {-64, 1}, {-65, 2}, {-63, 3}, {-66, 4}, - {-62, 5}, {-67, 6}, {7, 8}, {-61, -68}, - {9, 10}, {-60, -69}, {11, 12}, {-59, -70}, - {13, 14}, {-58, -71}, {15, 16}, {-57, -72}, - {17, 19}, {-56, 18}, {-55, -73}, {20, 24}, - {21, 22}, {-74, -54}, {-53, 23}, {-75, -76}, - {25, 30}, {26, 27}, {-52, -51}, {28, 29}, - {-77, -79}, {-50, -49}, {31, 39}, {32, 35}, - {33, 34}, {-78, -46}, {-82, -88}, {36, 37}, - {-83, -48}, {-47, 38}, {-86, -85}, {40, 47}, - {41, 44}, {42, 43}, {-80, -44}, {-43, -42}, - {45, 46}, {-39, -87}, {-84, -40}, {48, 55}, - {49, 52}, {50, 51}, {-95, -94}, {-93, -92}, - {53, 54}, {-91, -90}, {-89, -81}, {56, 59}, - {57, 58}, {-45, -41}, {-38, -37}, {60, 61}, - {-36, -35}, {-34, -33} - }; + int[][] T_HUFFMAN_ENV_3_0DB = { + {-64, 1}, {-65, 2}, {-63, 3}, {-66, 4}, + {-62, 5}, {-67, 6}, {-61, 7}, {-68, 8}, + {-60, 9}, {10, 11}, {-69, -59}, {12, 14}, + {-70, 13}, {-71, -58}, {15, 18}, {16, 17}, + {-72, -57}, {-73, -74}, {19, 22}, {-56, 20}, + {-55, 21}, {-54, -77}, {23, 31}, {24, 25}, + {-75, -76}, {26, 27}, {-78, -53}, {28, 29}, + {-52, -95}, {-94, 30}, {-93, -92}, {32, 47}, + {33, 40}, {34, 37}, {35, 36}, {-91, -90}, + {-89, -88}, {38, 39}, {-87, -86}, {-85, -84}, + {41, 44}, {42, 43}, {-83, -82}, {-81, -80}, + {45, 46}, {-79, -51}, {-50, -49}, {48, 55}, + {49, 52}, {50, 51}, {-48, -47}, {-46, -45}, + {53, 54}, {-44, -43}, {-42, -41}, {56, 59}, + {57, 58}, {-40, -39}, {-38, -37}, {60, 61}, + {-36, -35}, {-34, -33} + }; - int[][] T_HUFFMAN_ENV_BAL_3_0DB = { - {-64, 1}, {-63, 2}, {-65, 3}, {-66, 4}, - {-62, 5}, {-61, 6}, {-67, 7}, {-68, 8}, - {-60, 9}, {10, 16}, {11, 13}, {-69, 12}, - {-76, -75}, {14, 15}, {-74, -73}, {-72, -71}, - {17, 20}, {18, 19}, {-70, -59}, {-58, -57}, - {21, 22}, {-56, -55}, {-54, 23}, {-53, -52} - }; - int[][] F_HUFFMAN_ENV_BAL_3_0DB = { - {-64, 1}, {-65, 2}, {-63, 3}, {-66, 4}, - {-62, 5}, {-61, 6}, {-67, 7}, {-68, 8}, - {-60, 9}, {10, 13}, {-69, 11}, {-59, 12}, - {-58, -76}, {14, 17}, {15, 16}, {-75, -74}, - {-73, -72}, {18, 21}, {19, 20}, {-71, -70}, - {-57, -56}, {22, 23}, {-55, -54}, {-53, -52} - }; + int[][] F_HUFFMAN_ENV_3_0DB = { + {-64, 1}, {-65, 2}, {-63, 3}, {-66, 4}, + {-62, 5}, {-67, 6}, {7, 8}, {-61, -68}, + {9, 10}, {-60, -69}, {11, 12}, {-59, -70}, + {13, 14}, {-58, -71}, {15, 16}, {-57, -72}, + {17, 19}, {-56, 18}, {-55, -73}, {20, 24}, + {21, 22}, {-74, -54}, {-53, 23}, {-75, -76}, + {25, 30}, {26, 27}, {-52, -51}, {28, 29}, + {-77, -79}, {-50, -49}, {31, 39}, {32, 35}, + {33, 34}, {-78, -46}, {-82, -88}, {36, 37}, + {-83, -48}, {-47, 38}, {-86, -85}, {40, 47}, + {41, 44}, {42, 43}, {-80, -44}, {-43, -42}, + {45, 46}, {-39, -87}, {-84, -40}, {48, 55}, + {49, 52}, {50, 51}, {-95, -94}, {-93, -92}, + {53, 54}, {-91, -90}, {-89, -81}, {56, 59}, + {57, 58}, {-45, -41}, {-38, -37}, {60, 61}, + {-36, -35}, {-34, -33} + }; - int[][] T_HUFFMAN_NOISE_3_0DB = { - {-64, 1}, {-63, 2}, {-65, 3}, {-66, 4}, - {-62, 5}, {-67, 6}, {7, 8}, {-61, -68}, - {9, 30}, {10, 15}, {-60, 11}, {-69, 12}, - {13, 14}, {-59, -53}, {-95, -94}, {16, 23}, - {17, 20}, {18, 19}, {-93, -92}, {-91, -90}, - {21, 22}, {-89, -88}, {-87, -86}, {24, 27}, - {25, 26}, {-85, -84}, {-83, -82}, {28, 29}, - {-81, -80}, {-79, -78}, {31, 46}, {32, 39}, - {33, 36}, {34, 35}, {-77, -76}, {-75, -74}, - {37, 38}, {-73, -72}, {-71, -70}, {40, 43}, - {41, 42}, {-58, -57}, {-56, -55}, {44, 45}, - {-54, -52}, {-51, -50}, {47, 54}, {48, 51}, - {49, 50}, {-49, -48}, {-47, -46}, {52, 53}, - {-45, -44}, {-43, -42}, {55, 58}, {56, 57}, - {-41, -40}, {-39, -38}, {59, 60}, {-37, -36}, - {-35, 61}, {-34, -33} - }; + int[][] T_HUFFMAN_ENV_BAL_3_0DB = { + {-64, 1}, {-63, 2}, {-65, 3}, {-66, 4}, + {-62, 5}, {-61, 6}, {-67, 7}, {-68, 8}, + {-60, 9}, {10, 16}, {11, 13}, {-69, 12}, + {-76, -75}, {14, 15}, {-74, -73}, {-72, -71}, + {17, 20}, {18, 19}, {-70, -59}, {-58, -57}, + {21, 22}, {-56, -55}, {-54, 23}, {-53, -52} + }; + int[][] F_HUFFMAN_ENV_BAL_3_0DB = { + {-64, 1}, {-65, 2}, {-63, 3}, {-66, 4}, + {-62, 5}, {-61, 6}, {-67, 7}, {-68, 8}, + {-60, 9}, {10, 13}, {-69, 11}, {-59, 12}, + {-58, -76}, {14, 17}, {15, 16}, {-75, -74}, + {-73, -72}, {18, 21}, {19, 20}, {-71, -70}, + {-57, -56}, {22, 23}, {-55, -54}, {-53, -52} + }; - int[][] T_HUFFMAN_NOISE_BAL_3_0DB = { - {-64, 1}, {-65, 2}, {-63, 3}, {4, 9}, - {-66, 5}, {-62, 6}, {7, 8}, {-76, -75}, - {-74, -73}, {10, 17}, {11, 14}, {12, 13}, - {-72, -71}, {-70, -69}, {15, 16}, {-68, -67}, - {-61, -60}, {18, 21}, {19, 20}, {-59, -58}, - {-57, -56}, {22, 23}, {-55, -54}, {-53, -52} - }; + int[][] T_HUFFMAN_NOISE_3_0DB = { + {-64, 1}, {-63, 2}, {-65, 3}, {-66, 4}, + {-62, 5}, {-67, 6}, {7, 8}, {-61, -68}, + {9, 30}, {10, 15}, {-60, 11}, {-69, 12}, + {13, 14}, {-59, -53}, {-95, -94}, {16, 23}, + {17, 20}, {18, 19}, {-93, -92}, {-91, -90}, + {21, 22}, {-89, -88}, {-87, -86}, {24, 27}, + {25, 26}, {-85, -84}, {-83, -82}, {28, 29}, + {-81, -80}, {-79, -78}, {31, 46}, {32, 39}, + {33, 36}, {34, 35}, {-77, -76}, {-75, -74}, + {37, 38}, {-73, -72}, {-71, -70}, {40, 43}, + {41, 42}, {-58, -57}, {-56, -55}, {44, 45}, + {-54, -52}, {-51, -50}, {47, 54}, {48, 51}, + {49, 50}, {-49, -48}, {-47, -46}, {52, 53}, + {-45, -44}, {-43, -42}, {55, 58}, {56, 57}, + {-41, -40}, {-39, -38}, {59, 60}, {-37, -36}, + {-35, 61}, {-34, -33} + }; + + int[][] T_HUFFMAN_NOISE_BAL_3_0DB = { + {-64, 1}, {-65, 2}, {-63, 3}, {4, 9}, + {-66, 5}, {-62, 6}, {7, 8}, {-76, -75}, + {-74, -73}, {10, 17}, {11, 14}, {12, 13}, + {-72, -71}, {-70, -69}, {15, 16}, {-68, -67}, + {-61, -60}, {18, 21}, {19, 20}, {-59, -58}, + {-57, -56}, {22, 23}, {-55, -54}, {-53, -52} + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/NoiseEnvelope.java b/src/main/java/net/sourceforge/jaad/aac/sbr/NoiseEnvelope.java index 41200912..7b613186 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/NoiseEnvelope.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/NoiseEnvelope.java @@ -1,438 +1,340 @@ package net.sourceforge.jaad.aac.sbr; -class NoiseEnvelope implements Constants { - - private static final float[] E_deq_tab = { - 64.0f, 128.0f, 256.0f, 512.0f, 1024.0f, 2048.0f, 4096.0f, 8192.0f, - 16384.0f, 32768.0f, 65536.0f, 131072.0f, 262144.0f, 524288.0f, 1.04858E+006f, 2.09715E+006f, - 4.1943E+006f, 8.38861E+006f, 1.67772E+007f, 3.35544E+007f, 6.71089E+007f, 1.34218E+008f, 2.68435E+008f, 5.36871E+008f, - 1.07374E+009f, 2.14748E+009f, 4.29497E+009f, 8.58993E+009f, 1.71799E+010f, 3.43597E+010f, 6.87195E+010f, 1.37439E+011f, - 2.74878E+011f, 5.49756E+011f, 1.09951E+012f, 2.19902E+012f, 4.39805E+012f, 8.79609E+012f, 1.75922E+013f, 3.51844E+013f, - 7.03687E+013f, 1.40737E+014f, 2.81475E+014f, 5.6295E+014f, 1.1259E+015f, 2.2518E+015f, 4.5036E+015f, 9.0072E+015f, - 1.80144E+016f, 3.60288E+016f, 7.20576E+016f, 1.44115E+017f, 2.8823E+017f, 5.76461E+017f, 1.15292E+018f, 2.30584E+018f, - 4.61169E+018f, 9.22337E+018f, 1.84467E+019f, 3.68935E+019f, 7.3787E+019f, 1.47574E+020f, 2.95148E+020f, 5.90296E+020f - }; - - /* table for Q_div2 values when no coupling */ - private static final float[] Q_div2_tab = { - 0.984615f, 0.969697f, - 0.941176f, 0.888889f, - 0.8f, 0.666667f, - 0.5f, 0.333333f, - 0.2f, 0.111111f, - 0.0588235f, 0.030303f, - 0.0153846f, 0.00775194f, - 0.00389105f, 0.00194932f, - 0.00097561f, 0.000488043f, - 0.000244081f, 0.000122055f, - 6.10314E-005f, 3.05166E-005f, - 1.52586E-005f, 7.62934E-006f, - 3.81468E-006f, 1.90734E-006f, - 9.53673E-007f, 4.76837E-007f, - 2.38419E-007f, 1.19209E-007f, - 5.96046E-008f}; - - private static final float[][] Q_div2_tab_left = { - {0.0302959f, 0.111015f, 0.332468f, 0.663212f, 0.882759f, 0.962406f, 0.984615f, 0.990329f, 0.991768f, 0.992128f, 0.992218f, 0.992241f, 0.992246f}, - {0.0153809f, 0.0587695f, 0.199377f, 0.496124f, 0.790123f, 0.927536f, 0.969697f, 0.980843f, 0.98367f, 0.984379f, 0.984556f, 0.984601f, 0.984612f}, - {0.00775006f, 0.0302744f, 0.110727f, 0.329897f, 0.653061f, 0.864865f, 0.941176f, 0.962406f, 0.967864f, 0.969238f, 0.969582f, 0.969668f, 0.96969f}, - {0.0038901f, 0.0153698f, 0.0586081f, 0.197531f, 0.484848f, 0.761905f, 0.888889f, 0.927536f, 0.937729f, 0.940312f, 0.94096f, 0.941122f, 0.941163f}, - {0.00194884f, 0.00774443f, 0.0301887f, 0.109589f, 0.32f, 0.615385f, 0.8f, 0.864865f, 0.882759f, 0.887348f, 0.888503f, 0.888792f, 0.888865f}, - {0.000975372f, 0.00388727f, 0.0153257f, 0.057971f, 0.190476f, 0.444444f, 0.666667f, 0.761905f, 0.790123f, 0.797508f, 0.799375f, 0.799844f, 0.799961f}, - {0.000487924f, 0.00194742f, 0.00772201f, 0.0298507f, 0.105263f, 0.285714f, 0.5f, 0.615385f, 0.653061f, 0.663212f, 0.6658f, 0.66645f, 0.666612f}, - {0.000244021f, 0.000974659f, 0.00387597f, 0.0151515f, 0.0555556f, 0.166667f, 0.333333f, 0.444444f, 0.484848f, 0.496124f, 0.499025f, 0.499756f, 0.499939f}, - {0.000122026f, 0.000487567f, 0.00194175f, 0.00763359f, 0.0285714f, 0.0909091f, 0.2f, 0.285714f, 0.32f, 0.329897f, 0.332468f, 0.333116f, 0.333279f}, - {6.10165E-005f, 0.000243843f, 0.000971817f, 0.00383142f, 0.0144928f, 0.047619f, 0.111111f, 0.166667f, 0.190476f, 0.197531f, 0.199377f, 0.199844f, 0.199961f}, - {3.05092E-005f, 0.000121936f, 0.000486145f, 0.00191939f, 0.00729927f, 0.0243902f, 0.0588235f, 0.0909091f, 0.105263f, 0.109589f, 0.110727f, 0.111015f, 0.111087f}, - {1.52548E-005f, 6.09719E-005f, 0.000243132f, 0.000960615f, 0.003663f, 0.0123457f, 0.030303f, 0.047619f, 0.0555556f, 0.057971f, 0.0586081f, 0.0587695f, 0.05881f}, - {7.62747E-006f, 3.04869E-005f, 0.000121581f, 0.000480538f, 0.00183486f, 0.00621118f, 0.0153846f, 0.0243902f, 0.0285714f, 0.0298507f, 0.0301887f, 0.0302744f, 0.0302959f}, - {3.81375E-006f, 1.52437E-005f, 6.0794E-005f, 0.000240327f, 0.000918274f, 0.00311526f, 0.00775194f, 0.0123457f, 0.0144928f, 0.0151515f, 0.0153257f, 0.0153698f, 0.0153809f}, - {1.90688E-006f, 7.62189E-006f, 3.03979E-005f, 0.000120178f, 0.000459348f, 0.00156006f, 0.00389105f, 0.00621118f, 0.00729927f, 0.00763359f, 0.00772201f, 0.00774443f, 0.00775006f}, - {9.53441E-007f, 3.81096E-006f, 1.51992E-005f, 6.00925E-005f, 0.000229727f, 0.00078064f, 0.00194932f, 0.00311526f, 0.003663f, 0.00383142f, 0.00387597f, 0.00388727f, 0.0038901f}, - {4.76721E-007f, 1.90548E-006f, 7.59965E-006f, 3.00472E-005f, 0.000114877f, 0.000390472f, 0.00097561f, 0.00156006f, 0.00183486f, 0.00191939f, 0.00194175f, 0.00194742f, 0.00194884f}, - {2.3836E-007f, 9.52743E-007f, 3.79984E-006f, 1.50238E-005f, 5.74416E-005f, 0.000195274f, 0.000488043f, 0.00078064f, 0.000918274f, 0.000960615f, 0.000971817f, 0.000974659f, 0.000975372f}, - {1.1918E-007f, 4.76372E-007f, 1.89992E-006f, 7.51196E-006f, 2.87216E-005f, 9.76467E-005f, 0.000244081f, 0.000390472f, 0.000459348f, 0.000480538f, 0.000486145f, 0.000487567f, 0.000487924f}, - {5.95901E-008f, 2.38186E-007f, 9.49963E-007f, 3.756E-006f, 1.4361E-005f, 4.88257E-005f, 0.000122055f, 0.000195274f, 0.000229727f, 0.000240327f, 0.000243132f, 0.000243843f, 0.000244021f}, - {2.9795E-008f, 1.19093E-007f, 4.74982E-007f, 1.878E-006f, 7.18056E-006f, 2.44135E-005f, 6.10314E-005f, 9.76467E-005f, 0.000114877f, 0.000120178f, 0.000121581f, 0.000121936f, 0.000122026f}, - {1.48975E-008f, 5.95465E-008f, 2.37491E-007f, 9.39002E-007f, 3.59029E-006f, 1.22069E-005f, 3.05166E-005f, 4.88257E-005f, 5.74416E-005f, 6.00925E-005f, 6.0794E-005f, 6.09719E-005f, 6.10165E-005f}, - {7.44876E-009f, 2.97732E-008f, 1.18745E-007f, 4.69501E-007f, 1.79515E-006f, 6.10348E-006f, 1.52586E-005f, 2.44135E-005f, 2.87216E-005f, 3.00472E-005f, 3.03979E-005f, 3.04869E-005f, 3.05092E-005f}, - {3.72438E-009f, 1.48866E-008f, 5.93727E-008f, 2.34751E-007f, 8.97575E-007f, 3.05175E-006f, 7.62934E-006f, 1.22069E-005f, 1.4361E-005f, 1.50238E-005f, 1.51992E-005f, 1.52437E-005f, 1.52548E-005f}, - {1.86219E-009f, 7.44331E-009f, 2.96864E-008f, 1.17375E-007f, 4.48788E-007f, 1.52588E-006f, 3.81468E-006f, 6.10348E-006f, 7.18056E-006f, 7.51196E-006f, 7.59965E-006f, 7.62189E-006f, 7.62747E-006f}, - {9.31095E-010f, 3.72166E-009f, 1.48432E-008f, 5.86876E-008f, 2.24394E-007f, 7.62939E-007f, 1.90734E-006f, 3.05175E-006f, 3.59029E-006f, 3.756E-006f, 3.79984E-006f, 3.81096E-006f, 3.81375E-006f}, - {4.65548E-010f, 1.86083E-009f, 7.42159E-009f, 2.93438E-008f, 1.12197E-007f, 3.8147E-007f, 9.53673E-007f, 1.52588E-006f, 1.79515E-006f, 1.878E-006f, 1.89992E-006f, 1.90548E-006f, 1.90688E-006f}, - {2.32774E-010f, 9.30414E-010f, 3.71079E-009f, 1.46719E-008f, 5.60985E-008f, 1.90735E-007f, 4.76837E-007f, 7.62939E-007f, 8.97575E-007f, 9.39002E-007f, 9.49963E-007f, 9.52743E-007f, 9.53441E-007f}, - {1.16387E-010f, 4.65207E-010f, 1.8554E-009f, 7.33596E-009f, 2.80492E-008f, 9.53674E-008f, 2.38419E-007f, 3.8147E-007f, 4.48788E-007f, 4.69501E-007f, 4.74982E-007f, 4.76372E-007f, 4.76721E-007f}, - {5.81935E-011f, 2.32603E-010f, 9.27699E-010f, 3.66798E-009f, 1.40246E-008f, 4.76837E-008f, 1.19209E-007f, 1.90735E-007f, 2.24394E-007f, 2.34751E-007f, 2.37491E-007f, 2.38186E-007f, 2.3836E-007f}, - {2.90967E-011f, 1.16302E-010f, 4.63849E-010f, 1.83399E-009f, 7.01231E-009f, 2.38419E-008f, 5.96046E-008f, 9.53674E-008f, 1.12197E-007f, 1.17375E-007f, 1.18745E-007f, 1.19093E-007f, 1.1918E-007f} - }; - - private static final float[][] Q_div2_tab_right = { - {0.992246f, 0.992241f, 0.992218f, 0.992128f, 0.991768f, 0.990329f, 0.984615f, 0.962406f, 0.882759f, 0.663212f, 0.332468f, 0.111015f, 0.0302959f}, - {0.984612f, 0.984601f, 0.984556f, 0.984379f, 0.98367f, 0.980843f, 0.969697f, 0.927536f, 0.790123f, 0.496124f, 0.199377f, 0.0587695f, 0.0153809f}, - {0.96969f, 0.969668f, 0.969582f, 0.969238f, 0.967864f, 0.962406f, 0.941176f, 0.864865f, 0.653061f, 0.329897f, 0.110727f, 0.0302744f, 0.00775006f}, - {0.941163f, 0.941122f, 0.94096f, 0.940312f, 0.937729f, 0.927536f, 0.888889f, 0.761905f, 0.484848f, 0.197531f, 0.0586081f, 0.0153698f, 0.0038901f}, - {0.888865f, 0.888792f, 0.888503f, 0.887348f, 0.882759f, 0.864865f, 0.8f, 0.615385f, 0.32f, 0.109589f, 0.0301887f, 0.00774443f, 0.00194884f}, - {0.799961f, 0.799844f, 0.799375f, 0.797508f, 0.790123f, 0.761905f, 0.666667f, 0.444444f, 0.190476f, 0.057971f, 0.0153257f, 0.00388727f, 0.000975372f}, - {0.666612f, 0.66645f, 0.6658f, 0.663212f, 0.653061f, 0.615385f, 0.5f, 0.285714f, 0.105263f, 0.0298507f, 0.00772201f, 0.00194742f, 0.000487924f}, - {0.499939f, 0.499756f, 0.499025f, 0.496124f, 0.484848f, 0.444444f, 0.333333f, 0.166667f, 0.0555556f, 0.0151515f, 0.00387597f, 0.000974659f, 0.000244021f}, - {0.333279f, 0.333116f, 0.332468f, 0.329897f, 0.32f, 0.285714f, 0.2f, 0.0909091f, 0.0285714f, 0.00763359f, 0.00194175f, 0.000487567f, 0.000122026f}, - {0.199961f, 0.199844f, 0.199377f, 0.197531f, 0.190476f, 0.166667f, 0.111111f, 0.047619f, 0.0144928f, 0.00383142f, 0.000971817f, 0.000243843f, 6.10165E-005f}, - {0.111087f, 0.111015f, 0.110727f, 0.109589f, 0.105263f, 0.0909091f, 0.0588235f, 0.0243902f, 0.00729927f, 0.00191939f, 0.000486145f, 0.000121936f, 3.05092E-005f}, - {0.05881f, 0.0587695f, 0.0586081f, 0.057971f, 0.0555556f, 0.047619f, 0.030303f, 0.0123457f, 0.003663f, 0.000960615f, 0.000243132f, 6.09719E-005f, 1.52548E-005f}, - {0.0302959f, 0.0302744f, 0.0301887f, 0.0298507f, 0.0285714f, 0.0243902f, 0.0153846f, 0.00621118f, 0.00183486f, 0.000480538f, 0.000121581f, 3.04869E-005f, 7.62747E-006f}, - {0.0153809f, 0.0153698f, 0.0153257f, 0.0151515f, 0.0144928f, 0.0123457f, 0.00775194f, 0.00311526f, 0.000918274f, 0.000240327f, 6.0794E-005f, 1.52437E-005f, 3.81375E-006f}, - {0.00775006f, 0.00774443f, 0.00772201f, 0.00763359f, 0.00729927f, 0.00621118f, 0.00389105f, 0.00156006f, 0.000459348f, 0.000120178f, 3.03979E-005f, 7.62189E-006f, 1.90688E-006f}, - {0.0038901f, 0.00388727f, 0.00387597f, 0.00383142f, 0.003663f, 0.00311526f, 0.00194932f, 0.00078064f, 0.000229727f, 6.00925E-005f, 1.51992E-005f, 3.81096E-006f, 9.53441E-007f}, - {0.00194884f, 0.00194742f, 0.00194175f, 0.00191939f, 0.00183486f, 0.00156006f, 0.00097561f, 0.000390472f, 0.000114877f, 3.00472E-005f, 7.59965E-006f, 1.90548E-006f, 4.76721E-007f}, - {0.000975372f, 0.000974659f, 0.000971817f, 0.000960615f, 0.000918274f, 0.00078064f, 0.000488043f, 0.000195274f, 5.74416E-005f, 1.50238E-005f, 3.79984E-006f, 9.52743E-007f, 2.3836E-007f}, - {0.000487924f, 0.000487567f, 0.000486145f, 0.000480538f, 0.000459348f, 0.000390472f, 0.000244081f, 9.76467E-005f, 2.87216E-005f, 7.51196E-006f, 1.89992E-006f, 4.76372E-007f, 1.1918E-007f}, - {0.000244021f, 0.000243843f, 0.000243132f, 0.000240327f, 0.000229727f, 0.000195274f, 0.000122055f, 4.88257E-005f, 1.4361E-005f, 3.756E-006f, 9.49963E-007f, 2.38186E-007f, 5.95901E-008f}, - {0.000122026f, 0.000121936f, 0.000121581f, 0.000120178f, 0.000114877f, 9.76467E-005f, 6.10314E-005f, 2.44135E-005f, 7.18056E-006f, 1.878E-006f, 4.74982E-007f, 1.19093E-007f, 2.9795E-008f}, - {6.10165E-005f, 6.09719E-005f, 6.0794E-005f, 6.00925E-005f, 5.74416E-005f, 4.88257E-005f, 3.05166E-005f, 1.22069E-005f, 3.59029E-006f, 9.39002E-007f, 2.37491E-007f, 5.95465E-008f, 1.48975E-008f}, - {3.05092E-005f, 3.04869E-005f, 3.03979E-005f, 3.00472E-005f, 2.87216E-005f, 2.44135E-005f, 1.52586E-005f, 6.10348E-006f, 1.79515E-006f, 4.69501E-007f, 1.18745E-007f, 2.97732E-008f, 7.44876E-009f}, - {1.52548E-005f, 1.52437E-005f, 1.51992E-005f, 1.50238E-005f, 1.4361E-005f, 1.22069E-005f, 7.62934E-006f, 3.05175E-006f, 8.97575E-007f, 2.34751E-007f, 5.93727E-008f, 1.48866E-008f, 3.72438E-009f}, - {7.62747E-006f, 7.62189E-006f, 7.59965E-006f, 7.51196E-006f, 7.18056E-006f, 6.10348E-006f, 3.81468E-006f, 1.52588E-006f, 4.48788E-007f, 1.17375E-007f, 2.96864E-008f, 7.44331E-009f, 1.86219E-009f}, - {3.81375E-006f, 3.81096E-006f, 3.79984E-006f, 3.756E-006f, 3.59029E-006f, 3.05175E-006f, 1.90734E-006f, 7.62939E-007f, 2.24394E-007f, 5.86876E-008f, 1.48432E-008f, 3.72166E-009f, 9.31095E-010f}, - {1.90688E-006f, 1.90548E-006f, 1.89992E-006f, 1.878E-006f, 1.79515E-006f, 1.52588E-006f, 9.53673E-007f, 3.8147E-007f, 1.12197E-007f, 2.93438E-008f, 7.42159E-009f, 1.86083E-009f, 4.65548E-010f}, - {9.53441E-007f, 9.52743E-007f, 9.49963E-007f, 9.39002E-007f, 8.97575E-007f, 7.62939E-007f, 4.76837E-007f, 1.90735E-007f, 5.60985E-008f, 1.46719E-008f, 3.71079E-009f, 9.30414E-010f, 2.32774E-010f}, - {4.76721E-007f, 4.76372E-007f, 4.74982E-007f, 4.69501E-007f, 4.48788E-007f, 3.8147E-007f, 2.38419E-007f, 9.53674E-008f, 2.80492E-008f, 7.33596E-009f, 1.8554E-009f, 4.65207E-010f, 1.16387E-010f}, - {2.3836E-007f, 2.38186E-007f, 2.37491E-007f, 2.34751E-007f, 2.24394E-007f, 1.90735E-007f, 1.19209E-007f, 4.76837E-008f, 1.40246E-008f, 3.66798E-009f, 9.27699E-010f, 2.32603E-010f, 5.81935E-011f}, - {1.1918E-007f, 1.19093E-007f, 1.18745E-007f, 1.17375E-007f, 1.12197E-007f, 9.53674E-008f, 5.96046E-008f, 2.38419E-008f, 7.01231E-009f, 1.83399E-009f, 4.63849E-010f, 1.16302E-010f, 2.90967E-011f} - }; - /* table for Q_div values when no coupling */ - private static final float[] Q_div_tab = { - 0.0153846f, 0.030303f, - 0.0588235f, 0.111111f, - 0.2f, 0.333333f, - 0.5f, 0.666667f, - 0.8f, 0.888889f, - 0.941176f, 0.969697f, - 0.984615f, 0.992248f, - 0.996109f, 0.998051f, - 0.999024f, 0.999512f, - 0.999756f, 0.999878f, - 0.999939f, 0.999969f, - 0.999985f, 0.999992f, - 0.999996f, 0.999998f, - 0.999999f, 1f, - 1f, 1f, - 1f - }; - - private static final float[][] Q_div_tab_left = { - {0.969704f, 0.888985f, 0.667532f, 0.336788f, 0.117241f, 0.037594f, 0.0153846f, 0.00967118f, 0.00823245f, 0.00787211f, 0.00778198f, 0.00775945f, 0.00775382f}, - {0.984619f, 0.94123f, 0.800623f, 0.503876f, 0.209877f, 0.0724638f, 0.030303f, 0.0191571f, 0.0163305f, 0.0156212f, 0.0154438f, 0.0153994f, 0.0153883f}, - {0.99225f, 0.969726f, 0.889273f, 0.670103f, 0.346939f, 0.135135f, 0.0588235f, 0.037594f, 0.0321361f, 0.0307619f, 0.0304178f, 0.0303317f, 0.0303102f}, - {0.99611f, 0.98463f, 0.941392f, 0.802469f, 0.515152f, 0.238095f, 0.111111f, 0.0724638f, 0.0622711f, 0.0596878f, 0.0590397f, 0.0588776f, 0.058837f}, - {0.998051f, 0.992256f, 0.969811f, 0.890411f, 0.68f, 0.384615f, 0.2f, 0.135135f, 0.117241f, 0.112652f, 0.111497f, 0.111208f, 0.111135f}, - {0.999025f, 0.996113f, 0.984674f, 0.942029f, 0.809524f, 0.555556f, 0.333333f, 0.238095f, 0.209877f, 0.202492f, 0.200625f, 0.200156f, 0.200039f}, - {0.999512f, 0.998053f, 0.992278f, 0.970149f, 0.894737f, 0.714286f, 0.5f, 0.384615f, 0.346939f, 0.336788f, 0.3342f, 0.33355f, 0.333388f}, - {0.999756f, 0.999025f, 0.996124f, 0.984848f, 0.944444f, 0.833333f, 0.666667f, 0.555556f, 0.515152f, 0.503876f, 0.500975f, 0.500244f, 0.500061f}, - {0.999878f, 0.999512f, 0.998058f, 0.992366f, 0.971429f, 0.909091f, 0.8f, 0.714286f, 0.68f, 0.670103f, 0.667532f, 0.666884f, 0.666721f}, - {0.999939f, 0.999756f, 0.999028f, 0.996169f, 0.985507f, 0.952381f, 0.888889f, 0.833333f, 0.809524f, 0.802469f, 0.800623f, 0.800156f, 0.800039f}, - {0.999969f, 0.999878f, 0.999514f, 0.998081f, 0.992701f, 0.97561f, 0.941176f, 0.909091f, 0.894737f, 0.890411f, 0.889273f, 0.888985f, 0.888913f}, - {0.999985f, 0.999939f, 0.999757f, 0.999039f, 0.996337f, 0.987654f, 0.969697f, 0.952381f, 0.944444f, 0.942029f, 0.941392f, 0.94123f, 0.94119f}, - {0.999992f, 0.99997f, 0.999878f, 0.999519f, 0.998165f, 0.993789f, 0.984615f, 0.97561f, 0.971429f, 0.970149f, 0.969811f, 0.969726f, 0.969704f}, - {0.999996f, 0.999985f, 0.999939f, 0.99976f, 0.999082f, 0.996885f, 0.992248f, 0.987654f, 0.985507f, 0.984848f, 0.984674f, 0.98463f, 0.984619f}, - {0.999998f, 0.999992f, 0.99997f, 0.99988f, 0.999541f, 0.99844f, 0.996109f, 0.993789f, 0.992701f, 0.992366f, 0.992278f, 0.992256f, 0.99225f}, - {0.999999f, 0.999996f, 0.999985f, 0.99994f, 0.99977f, 0.999219f, 0.998051f, 0.996885f, 0.996337f, 0.996169f, 0.996124f, 0.996113f, 0.99611f}, - {1f, 0.999998f, 0.999992f, 0.99997f, 0.999885f, 0.99961f, 0.999024f, 0.99844f, 0.998165f, 0.998081f, 0.998058f, 0.998053f, 0.998051f}, - {1f, 0.999999f, 0.999996f, 0.999985f, 0.999943f, 0.999805f, 0.999512f, 0.999219f, 0.999082f, 0.999039f, 0.999028f, 0.999025f, 0.999025f}, - {1f, 1f, 0.999998f, 0.999992f, 0.999971f, 0.999902f, 0.999756f, 0.99961f, 0.999541f, 0.999519f, 0.999514f, 0.999512f, 0.999512f}, - {1f, 1f, 0.999999f, 0.999996f, 0.999986f, 0.999951f, 0.999878f, 0.999805f, 0.99977f, 0.99976f, 0.999757f, 0.999756f, 0.999756f}, - {1f, 1f, 1f, 0.999998f, 0.999993f, 0.999976f, 0.999939f, 0.999902f, 0.999885f, 0.99988f, 0.999878f, 0.999878f, 0.999878f}, - {1f, 1f, 1f, 0.999999f, 0.999996f, 0.999988f, 0.999969f, 0.999951f, 0.999943f, 0.99994f, 0.999939f, 0.999939f, 0.999939f}, - {1f, 1f, 1f, 1f, 0.999998f, 0.999994f, 0.999985f, 0.999976f, 0.999971f, 0.99997f, 0.99997f, 0.99997f, 0.999969f}, - {1f, 1f, 1f, 1f, 0.999999f, 0.999997f, 0.999992f, 0.999988f, 0.999986f, 0.999985f, 0.999985f, 0.999985f, 0.999985f}, - {1f, 1f, 1f, 1f, 1f, 0.999998f, 0.999996f, 0.999994f, 0.999993f, 0.999992f, 0.999992f, 0.999992f, 0.999992f}, - {1f, 1f, 1f, 1f, 1f, 0.999999f, 0.999998f, 0.999997f, 0.999996f, 0.999996f, 0.999996f, 0.999996f, 0.999996f}, - {1f, 1f, 1f, 1f, 1f, 1f, 0.999999f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999998f}, - {1f, 1f, 1f, 1f, 1f, 1f, 1f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f}, - {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, - {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, - {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f} - }; - - private static final float[][] Q_div_tab_right = { - {0.00775382f, 0.00775945f, 0.00778198f, 0.00787211f, 0.00823245f, 0.00967118f, 0.0153846f, 0.037594f, 0.117241f, 0.336788f, 0.667532f, 0.888985f, 0.969704f}, - {0.0153883f, 0.0153994f, 0.0154438f, 0.0156212f, 0.0163305f, 0.0191571f, 0.030303f, 0.0724638f, 0.209877f, 0.503876f, 0.800623f, 0.94123f, 0.984619f}, - {0.0303102f, 0.0303317f, 0.0304178f, 0.0307619f, 0.0321361f, 0.037594f, 0.0588235f, 0.135135f, 0.346939f, 0.670103f, 0.889273f, 0.969726f, 0.99225f}, - {0.058837f, 0.0588776f, 0.0590397f, 0.0596878f, 0.0622711f, 0.0724638f, 0.111111f, 0.238095f, 0.515152f, 0.802469f, 0.941392f, 0.98463f, 0.99611f}, - {0.111135f, 0.111208f, 0.111497f, 0.112652f, 0.117241f, 0.135135f, 0.2f, 0.384615f, 0.68f, 0.890411f, 0.969811f, 0.992256f, 0.998051f}, - {0.200039f, 0.200156f, 0.200625f, 0.202492f, 0.209877f, 0.238095f, 0.333333f, 0.555556f, 0.809524f, 0.942029f, 0.984674f, 0.996113f, 0.999025f}, - {0.333388f, 0.33355f, 0.3342f, 0.336788f, 0.346939f, 0.384615f, 0.5f, 0.714286f, 0.894737f, 0.970149f, 0.992278f, 0.998053f, 0.999512f}, - {0.500061f, 0.500244f, 0.500975f, 0.503876f, 0.515152f, 0.555556f, 0.666667f, 0.833333f, 0.944444f, 0.984848f, 0.996124f, 0.999025f, 0.999756f}, - {0.666721f, 0.666884f, 0.667532f, 0.670103f, 0.68f, 0.714286f, 0.8f, 0.909091f, 0.971429f, 0.992366f, 0.998058f, 0.999512f, 0.999878f}, - {0.800039f, 0.800156f, 0.800623f, 0.802469f, 0.809524f, 0.833333f, 0.888889f, 0.952381f, 0.985507f, 0.996169f, 0.999028f, 0.999756f, 0.999939f}, - {0.888913f, 0.888985f, 0.889273f, 0.890411f, 0.894737f, 0.909091f, 0.941176f, 0.97561f, 0.992701f, 0.998081f, 0.999514f, 0.999878f, 0.999969f}, - {0.94119f, 0.94123f, 0.941392f, 0.942029f, 0.944444f, 0.952381f, 0.969697f, 0.987654f, 0.996337f, 0.999039f, 0.999757f, 0.999939f, 0.999985f}, - {0.969704f, 0.969726f, 0.969811f, 0.970149f, 0.971429f, 0.97561f, 0.984615f, 0.993789f, 0.998165f, 0.999519f, 0.999878f, 0.99997f, 0.999992f}, - {0.984619f, 0.98463f, 0.984674f, 0.984848f, 0.985507f, 0.987654f, 0.992248f, 0.996885f, 0.999082f, 0.99976f, 0.999939f, 0.999985f, 0.999996f}, - {0.99225f, 0.992256f, 0.992278f, 0.992366f, 0.992701f, 0.993789f, 0.996109f, 0.99844f, 0.999541f, 0.99988f, 0.99997f, 0.999992f, 0.999998f}, - {0.99611f, 0.996113f, 0.996124f, 0.996169f, 0.996337f, 0.996885f, 0.998051f, 0.999219f, 0.99977f, 0.99994f, 0.999985f, 0.999996f, 0.999999f}, - {0.998051f, 0.998053f, 0.998058f, 0.998081f, 0.998165f, 0.99844f, 0.999024f, 0.99961f, 0.999885f, 0.99997f, 0.999992f, 0.999998f, 1f}, - {0.999025f, 0.999025f, 0.999028f, 0.999039f, 0.999082f, 0.999219f, 0.999512f, 0.999805f, 0.999943f, 0.999985f, 0.999996f, 0.999999f, 1f}, - {0.999512f, 0.999512f, 0.999514f, 0.999519f, 0.999541f, 0.99961f, 0.999756f, 0.999902f, 0.999971f, 0.999992f, 0.999998f, 1f, 1f}, - {0.999756f, 0.999756f, 0.999757f, 0.99976f, 0.99977f, 0.999805f, 0.999878f, 0.999951f, 0.999986f, 0.999996f, 0.999999f, 1f, 1f}, - {0.999878f, 0.999878f, 0.999878f, 0.99988f, 0.999885f, 0.999902f, 0.999939f, 0.999976f, 0.999993f, 0.999998f, 1f, 1f, 1f}, - {0.999939f, 0.999939f, 0.999939f, 0.99994f, 0.999943f, 0.999951f, 0.999969f, 0.999988f, 0.999996f, 0.999999f, 1f, 1f, 1f}, - {0.999969f, 0.99997f, 0.99997f, 0.99997f, 0.999971f, 0.999976f, 0.999985f, 0.999994f, 0.999998f, 1f, 1f, 1f, 1f}, - {0.999985f, 0.999985f, 0.999985f, 0.999985f, 0.999986f, 0.999988f, 0.999992f, 0.999997f, 0.999999f, 1f, 1f, 1f, 1f}, - {0.999992f, 0.999992f, 0.999992f, 0.999992f, 0.999993f, 0.999994f, 0.999996f, 0.999998f, 1f, 1f, 1f, 1f, 1f}, - {0.999996f, 0.999996f, 0.999996f, 0.999996f, 0.999996f, 0.999997f, 0.999998f, 0.999999f, 1f, 1f, 1f, 1f, 1f}, - {0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999999f, 1f, 1f, 1f, 1f, 1f, 1f}, - {0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, - {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, - {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f}, - {1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f} - }; - - public static void extract_envelope_data(SBR sbr, int ch) { - int l, k; - - for(l = 0; l30) - ||(sbr.Q[1][m][l]<0||sbr.Q[1][m][l]>24 /* 2*panOffset(1) */)) { - return 0; - } - else { - /* the pan parameter is always even */ - if(ch==0) { - return Q_div_tab_left[sbr.Q[0][m][l]][sbr.Q[1][m][l]>>1]; - } - else { - return Q_div_tab_right[sbr.Q[0][m][l]][sbr.Q[1][m][l]>>1]; - } - } - } - else { - /* no coupling */ - if(sbr.Q[ch][m][l]<0||sbr.Q[ch][m][l]>30) { - return 0; - } - else { - return Q_div_tab[sbr.Q[ch][m][l]]; - } - } - } - - /* calculates Q/(1+Q) */ - /* [0..1] */ - public static float calc_Q_div2(SBR sbr, int ch, int m, int l) { - if(sbr.bs_coupling) { - if((sbr.Q[0][m][l]<0||sbr.Q[0][m][l]>30) - ||(sbr.Q[1][m][l]<0||sbr.Q[1][m][l]>24 /* 2*panOffset(1) */)) { - return 0; - } - else { - /* the pan parameter is always even */ - if(ch==0) { - return Q_div2_tab_left[sbr.Q[0][m][l]][sbr.Q[1][m][l]>>1]; - } - else { - return Q_div2_tab_right[sbr.Q[0][m][l]][sbr.Q[1][m][l]>>1]; - } - } - } - else { - /* no coupling */ - if(sbr.Q[ch][m][l]<0||sbr.Q[ch][m][l]>30) { - return 0; - } - else { - return Q_div2_tab[sbr.Q[ch][m][l]]; - } - } - } - - public static void dequantChannel(SBR sbr, int ch) { - if(!sbr.bs_coupling) { - int exp; - int l, k; - int amp = (sbr.amp_res[ch]) ? 0 : 1; - - for(l = 0; l> amp) + 6; */ - exp = (sbr.E[ch][k][l]>>amp); - - if((exp<0)||(exp>=64)) { - sbr.E_orig[ch][k][l] = 0; - } - else { - sbr.E_orig[ch][k][l] = E_deq_tab[exp]; - - /* save half the table size at the cost of 1 multiply */ - if(amp!=0&&(sbr.E[ch][k][l]&1)!=0) { - sbr.E_orig[ch][k][l] = (sbr.E_orig[ch][k][l]*1.414213562f); - } - } - } - } - - for(l = 0; l>amp0)+1; - - /* UN_MAP removed: (x / 4096) same as (x >> 12) */ - /* E[1] is always even so no need for compensating the divide by 2 with - * an extra multiplication - */ - /* exp1 = (sbr.E[1][k][l] >> amp1) - 12; */ - exp1 = (sbr.E[1][k][l]>>amp1); - - if((exp0<0)||(exp0>=64) - ||(exp1<0)||(exp1>24)) { - sbr.E_orig[1][k][l] = 0; - sbr.E_orig[0][k][l] = 0; - } - else { - tmp = E_deq_tab[exp0]; - if(amp0!=0&&(sbr.E[0][k][l]&1)!=0) { - tmp *= 1.414213562; - } - - /* panning */ - sbr.E_orig[0][k][l] = (tmp*E_pan_tab[exp1]); - sbr.E_orig[1][k][l] = (tmp*E_pan_tab[24-exp1]); - } - } - } - - for(l = 0; l 30) + || (sbr.ch1.Q[m][l] < 0 || sbr.ch1.Q[m][l] > 24 /* 2*panOffset(1) */)) { + return 0; + } else { + /* the pan parameter is always even */ + if (ch == sbr.ch0) { + return Q_div_tab_left[sbr.ch0.Q[m][l]][sbr.ch1.Q[m][l] >> 1]; + } else { + return Q_div_tab_right[sbr.ch0.Q[m][l]][sbr.ch1.Q[m][l] >> 1]; + } + } + } else { + return calc_Q_div(ch, m, l); + } + } + + public static float calc_Q_div(Channel ch, int m, int l) { + /* no coupling */ + if (ch.Q[m][l] < 0 || ch.Q[m][l] > 30) { + return 0; + } else { + return Q_div_tab[ch.Q[m][l]]; + } + } + + /* calculates Q/(1+Q) */ + /* [0..1] */ + public static float calc_Q_div2(SBR2 sbr, Channel ch, int m, int l) { + if (sbr.bs_coupling) { + if ((sbr.ch0.Q[m][l] < 0 || sbr.ch0.Q[m][l] > 30) + || (sbr.ch1.Q[m][l] < 0 || sbr.ch1.Q[m][l] > 24 /* 2*panOffset(1) */)) { + return 0; + } else { + /* the pan parameter is always even */ + if (ch == sbr.ch0) { + return Q_div2_tab_left[sbr.ch0.Q[m][l]][sbr.ch1.Q[m][l] >> 1]; + } else { + return Q_div2_tab_right[sbr.ch0.Q[m][l]][sbr.ch1.Q[m][l] >> 1]; + } + } + } else { + return calc_Q_div2(ch, m, l); + } + } + + public static float calc_Q_div2(Channel ch, int m, int l) { + /* no coupling */ + if (ch.Q[m][l] < 0 || ch.Q[m][l] > 30) { + return 0; + } else { + return Q_div2_tab[ch.Q[m][l]]; + } + } + + public static void dequantChannel(SBR sbr, Channel ch) { + int amp = (ch.amp_res) ? 0 : 1; + + for (int l = 0; l < ch.L_E; l++) { + for (int k = 0; k < sbr.n[ch.f[l]]; k++) { + /* +6 for the *64 and -10 for the /32 in the synthesis QMF (fixed) + * since this is an energy value: (x/32)^2 = (x^2)/1024 + */ + /* exp = (ch.E[k][l] >> amp) + 6; */ + int exp = (ch.E[k][l] >> amp); + + if ((exp < 0) || (exp >= 64)) { + ch.E_orig[k][l] = 0; + } else { + ch.E_orig[k][l] = E_deq_tab[exp]; + + /* save half the table size at the cost of 1 multiply */ + if (amp != 0 && (ch.E[k][l] & 1) != 0) { + ch.E_orig[k][l] = (ch.E_orig[k][l] * 1.414213562f); + } + } + } + } + + for (int l = 0; l < ch.L_Q; l++) { + for (int k = 0; k < sbr.N_Q; k++) { + ch.Q_div[k][l] = calc_Q_div(ch, k, l); + ch.Q_div2[k][l] = calc_Q_div2(ch, k, l); + } + } + } + + private static final float[] E_pan_tab = { + 0.000244081f, 0.000488043f, + 0.00097561f, 0.00194932f, + 0.00389105f, 0.00775194f, + 0.0153846f, 0.030303f, + 0.0588235f, 0.111111f, + 0.2f, 0.333333f, + 0.5f, 0.666667f, + 0.8f, 0.888889f, + 0.941176f, 0.969697f, + 0.984615f, 0.992248f, + 0.996109f, 0.998051f, + 0.999024f, 0.999512f, + 0.999756f + }; + + public static void unmap(SBR2 sbr) { + + int amp0 = (sbr.ch0.amp_res) ? 0 : 1; + int amp1 = (sbr.ch1.amp_res) ? 0 : 1; + + for (int l = 0; l < sbr.ch0.L_E; l++) { + for (int k = 0; k < sbr.n[sbr.ch0.f[l]]; k++) { + /* +6: * 64 ; +1: * 2 ; */ + int exp0 = (sbr.ch0.E[k][l] >> amp0) + 1; + + /* UN_MAP removed: (x / 4096) same as (x >> 12) */ + /* E[1] is always even so no need for compensating the divide by 2 with + * an extra multiplication + */ + /* exp1 = (sbr.ch1.E[k][l] >> amp1) - 12; */ + int exp1 = (sbr.ch1.E[k][l] >> amp1); + + if ((exp0 < 0) || (exp0 >= 64) + || (exp1 < 0) || (exp1 > 24)) { + sbr.ch1.E_orig[k][l] = 0; + sbr.ch0.E_orig[k][l] = 0; + } else { + float tmp = E_deq_tab[exp0]; + if (amp0 != 0 && (sbr.ch0.E[k][l] & 1) != 0) { + tmp *= 1.414213562; + } + + /* panning */ + sbr.ch0.E_orig[k][l] = (tmp * E_pan_tab[exp1]); + sbr.ch1.E_orig[k][l] = (tmp * E_pan_tab[24 - exp1]); + } + } + } + + for (int l = 0; l < sbr.ch0.L_Q; l++) { + for (int k = 0; k < sbr.N_Q; k++) { + sbr.ch0.Q_div[k][l] = calc_Q_div(sbr, sbr.ch0, k, l); + sbr.ch1.Q_div[k][l] = calc_Q_div(sbr, sbr.ch1, k, l); + sbr.ch0.Q_div2[k][l] = calc_Q_div2(sbr, sbr.ch0, k, l); + sbr.ch1.Q_div2[k][l] = calc_Q_div2(sbr, sbr.ch1, k, l); + } + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/NoiseTable.java b/src/main/java/net/sourceforge/jaad/aac/sbr/NoiseTable.java index 094349cf..8baac0f9 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/NoiseTable.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/NoiseTable.java @@ -2,519 +2,519 @@ interface NoiseTable { - /* Table 1.A.13 Noise table V */ - float[][] NOISE_TABLE = { - {-0.99948155879974f, -0.59483414888382f}, - {0.97113454341888f, -0.67528516054153f}, - {0.14130051434040f, -0.95090985298157f}, - {-0.47005495429039f, -0.37340548634529f}, - {0.80705064535141f, 0.29653668403625f}, - {-0.38981479406357f, 0.89572608470917f}, - {-0.01053049881011f, -0.66959059238434f}, - {-0.91266369819641f, -0.11522938311100f}, - {0.54840421676636f, 0.75221365690231f}, - {0.40009254217148f, -0.98929399251938f}, - {-0.99867975711823f, -0.88147068023682f}, - {-0.95531076192856f, 0.90908759832382f}, - {-0.45725932717323f, -0.56716322898865f}, - {-0.72929674386978f, -0.98008275032043f}, - {0.75622802972794f, 0.20950329303741f}, - {0.07069442421198f, -0.78247898817062f}, - {0.74496251344681f, -0.91169005632401f}, - {-0.96440184116364f, -0.94739919900894f}, - {0.30424630641937f, -0.49438267946243f}, - {0.66565030813217f, 0.64652937650681f}, - {0.91697007417679f, 0.17514097690582f}, - {-0.70774918794632f, 0.52548652887344f}, - {-0.70051413774490f, -0.45340028405190f}, - {-0.99496513605118f, -0.90071910619736f}, - {0.98164492845535f, -0.77463155984879f}, - {-0.54671579599380f, -0.02570928446949f}, - {-0.01689629070461f, 0.00287506449968f}, - {-0.86110347509384f, 0.42548584938049f}, - {-0.98892980813980f, -0.87881129980087f}, - {0.51756626367569f, 0.66926783323288f}, - {-0.99635028839111f, -0.58107727766037f}, - {-0.99969369173050f, 0.98369991779327f}, - {0.55266261100769f, 0.59449058771133f}, - {0.34581178426743f, 0.94879418611526f}, - {0.62664210796356f, -0.74402970075607f}, - {-0.77149701118469f, -0.33883658051491f}, - {-0.91592246294022f, 0.03687901422381f}, - {-0.76285493373871f, -0.91371870040894f}, - {0.79788339138031f, -0.93180972337723f}, - {0.54473078250885f, -0.11919206380844f}, - {-0.85639280080795f, 0.42429855465889f}, - {-0.92882400751114f, 0.27871808409691f}, - {-0.11708371341228f, -0.99800843000412f}, - {0.21356749534607f, -0.90716296434402f}, - {-0.76191693544388f, 0.99768120050430f}, - {0.98111045360565f, -0.95854461193085f}, - {-0.85913270711899f, 0.95766568183899f}, - {-0.93307244777679f, 0.49431759119034f}, - {0.30485755205154f, -0.70540034770966f}, - {0.85289651155472f, 0.46766132116318f}, - {0.91328084468842f, -0.99839597940445f}, - {-0.05890199914575f, 0.70741826295853f}, - {0.28398686647415f, 0.34633556008339f}, - {0.95258164405823f, -0.54893416166306f}, - {-0.78566324710846f, -0.75568538904190f}, - {-0.95789498090744f, -0.20423194766045f}, - {0.82411158084869f, 0.96654617786407f}, - {-0.65185445547104f, -0.88734990358353f}, - {-0.93643605709076f, 0.99870789051056f}, - {0.91427159309387f, -0.98290503025055f}, - {-0.70395684242249f, 0.58796799182892f}, - {0.00563771976158f, 0.61768198013306f}, - {0.89065051078796f, 0.52783352136612f}, - {-0.68683707714081f, 0.80806946754456f}, - {0.72165340185165f, -0.69259858131409f}, - {-0.62928247451782f, 0.13627037405968f}, - {0.29938435554504f, -0.46051329374313f}, - {-0.91781955957413f, -0.74012714624405f}, - {0.99298715591431f, 0.40816611051559f}, - {0.82368296384811f, -0.74036049842834f}, - {-0.98512834310532f, -0.99972331523895f}, - {-0.95915371179581f, -0.99237799644470f}, - {-0.21411126852036f, -0.93424820899963f}, - {-0.68821477890015f, -0.26892307400703f}, - {0.91851997375488f, 0.09358228743076f}, - {-0.96062767505646f, 0.36099094152451f}, - {0.51646184921265f, -0.71373331546783f}, - {0.61130720376968f, 0.46950140595436f}, - {0.47336128354073f, -0.27333179116249f}, - {0.90998309850693f, 0.96715664863586f}, - {0.44844800233841f, 0.99211573600769f}, - {0.66614890098572f, 0.96590173244476f}, - {0.74922239780426f, -0.89879858493805f}, - {-0.99571585655212f, 0.52785521745682f}, - {0.97401082515717f, -0.16855870187283f}, - {0.72683745622635f, -0.48060774803162f}, - {0.95432192087173f, 0.68849605321884f}, - {-0.72962206602097f, -0.76608443260193f}, - {-0.85359477996826f, 0.88738125562668f}, - {-0.81412428617477f, -0.97480767965317f}, - {-0.87930774688721f, 0.74748307466507f}, - {-0.71573328971863f, -0.98570609092712f}, - {0.83524298667908f, 0.83702534437180f}, - {-0.48086065053940f, -0.98848503828049f}, - {0.97139126062393f, 0.80093622207642f}, - {0.51992827653885f, 0.80247628688812f}, - {-0.00848591234535f, -0.76670128107071f}, - {-0.70294374227524f, 0.55359911918640f}, - {-0.95894426107407f, -0.43265503644943f}, - {0.97079253196716f, 0.09325857460499f}, - {-0.92404294013977f, 0.85507702827454f}, - {-0.69506472349167f, 0.98633414506912f}, - {0.26559203863144f, 0.73314309120178f}, - {0.28038442134857f, 0.14537914097309f}, - {-0.74138122797012f, 0.99310338497162f}, - {-0.01752796024084f, -0.82616633176804f}, - {-0.55126774311066f, -0.98898541927338f}, - {0.97960901260376f, -0.94021445512772f}, - {-0.99196308851242f, 0.67019015550613f}, - {-0.67684930562973f, 0.12631492316723f}, - {0.09140039235353f, -0.20537731051445f}, - {-0.71658962965012f, -0.97788202762604f}, - {0.81014639139175f, 0.53722649812698f}, - {0.40616992115974f, -0.26469007134438f}, - {-0.67680186033249f, 0.94502049684525f}, - {0.86849772930145f, -0.18333598971367f}, - {-0.99500381946564f, -0.02634122036397f}, - {0.84329187870026f, 0.10406957566738f}, - {-0.09215968847275f, 0.69540011882782f}, - {0.99956172704697f, -0.12358541786671f}, - {-0.79732781648636f, -0.91582524776459f}, - {0.96349972486496f, 0.96640455722809f}, - {-0.79942780733109f, 0.64323902130127f}, - {-0.11566039919853f, 0.28587844967842f}, - {-0.39922955632210f, 0.94129604101181f}, - {0.99089199304581f, -0.92062628269196f}, - {0.28631284832954f, -0.91035044193268f}, - {-0.83302724361420f, -0.67330408096313f}, - {0.95404446125031f, 0.49162766337395f}, - {-0.06449863314629f, 0.03250560909510f}, - {-0.99575054645538f, 0.42389783263206f}, - {-0.65501141548157f, 0.82546114921570f}, - {-0.81254440546036f, -0.51627236604691f}, - {-0.99646371603012f, 0.84490531682968f}, - {0.00287840608507f, 0.64768260717392f}, - {0.70176988840103f, -0.20453028380871f}, - {0.96361881494522f, 0.40706968307495f}, - {-0.68883758783340f, 0.91338956356049f}, - {-0.34875586628914f, 0.71472293138504f}, - {0.91980081796646f, 0.66507452726364f}, - {-0.99009048938751f, 0.85868018865585f}, - {0.68865793943405f, 0.55660319328308f}, - {-0.99484401941299f, -0.20052559673786f}, - {0.94214510917664f, -0.99696427583694f}, - {-0.67414629459381f, 0.49548220634460f}, - {-0.47339352965355f, -0.85904330015182f}, - {0.14323651790619f, -0.94145596027374f}, - {-0.29268294572830f, 0.05759225040674f}, - {0.43793860077858f, -0.78904968500137f}, - {-0.36345127224922f, 0.64874434471130f}, - {-0.08750604838133f, 0.97686946392059f}, - {-0.96495270729065f, -0.53960305452347f}, - {0.55526942014694f, 0.78891521692276f}, - {0.73538213968277f, 0.96452075242996f}, - {-0.30889773368835f, -0.80664390325546f}, - {0.03574995696545f, -0.97325617074966f}, - {0.98720687627792f, 0.48409134149551f}, - {-0.81689298152924f, -0.90827703475952f}, - {0.67866861820221f, 0.81284505128860f}, - {-0.15808570384979f, 0.85279554128647f}, - {0.80723392963409f, -0.24717418849468f}, - {0.47788757085800f, -0.46333149075508f}, - {0.96367555856705f, 0.38486748933792f}, - {-0.99143874645233f, -0.24945276975632f}, - {0.83081877231598f, -0.94780850410461f}, - {-0.58753192424774f, 0.01290772389621f}, - {0.95538109540939f, -0.85557049512863f}, - {-0.96490919589996f, -0.64020973443985f}, - {-0.97327101230621f, 0.12378127872944f}, - {0.91400367021561f, 0.57972472906113f}, - {-0.99925839900970f, 0.71084845066071f}, - {-0.86875903606415f, -0.20291699469090f}, - {-0.26240035891533f, -0.68264555931091f}, - {-0.24664412438869f, -0.87642270326614f}, - {0.02416275814176f, 0.27192914485931f}, - {0.82068622112274f, -0.85087788105011f}, - {0.88547372817993f, -0.89636802673340f}, - {-0.18173077702522f, -0.26152145862579f}, - {0.09355476498604f, 0.54845124483109f}, - {-0.54668414592743f, 0.95980775356293f}, - {0.37050989270210f, -0.59910142421722f}, - {-0.70373594760895f, 0.91227668523788f}, - {-0.34600785374641f, -0.99441426992416f}, - {-0.68774479627609f, -0.30238837003708f}, - {-0.26843291521072f, 0.83115667104721f}, - {0.49072334170341f, -0.45359709858894f}, - {0.38975992798805f, 0.95515358448029f}, - {-0.97757124900818f, 0.05305894464254f}, - {-0.17325553297997f, -0.92770671844482f}, - {0.99948036670685f, 0.58285546302795f}, - {-0.64946246147156f, 0.68645507097244f}, - {-0.12016920745373f, -0.57147324085236f}, - {-0.58947455883026f, -0.34847131371498f}, - {-0.41815140843391f, 0.16276422142982f}, - {0.99885648488998f, 0.11136095225811f}, - {-0.56649613380432f, -0.90494865179062f}, - {0.94138020277023f, 0.35281917452812f}, - {-0.75725078582764f, 0.53650552034378f}, - {0.20541973412037f, -0.94435143470764f}, - {0.99980372190475f, 0.79835915565491f}, - {0.29078277945518f, 0.35393777489662f}, - {-0.62858772277832f, 0.38765692710876f}, - {0.43440905213356f, -0.98546332120895f}, - {-0.98298585414886f, 0.21021524071693f}, - {0.19513028860092f, -0.94239830970764f}, - {-0.95476663112640f, 0.98364555835724f}, - {0.93379634618759f, -0.70881992578506f}, - {-0.85235410928726f, -0.08342348039150f}, - {-0.86425095796585f, -0.45795026421547f}, - {0.38879778981209f, 0.97274428606033f}, - {0.92045122385025f, -0.62433654069901f}, - {0.89162534475327f, 0.54950958490372f}, - {-0.36834338307381f, 0.96458297967911f}, - {0.93891763687134f, -0.89968353509903f}, - {0.99267655611038f, -0.03757034242153f}, - {-0.94063472747803f, 0.41332337260246f}, - {0.99740225076675f, -0.16830494999886f}, - {-0.35899412631989f, -0.46633225679398f}, - {0.05237237364054f, -0.25640362501144f}, - {0.36703583598137f, -0.38653266429901f}, - {0.91653180122375f, -0.30587628483772f}, - {0.69000804424286f, 0.90952169895172f}, - {-0.38658750057220f, 0.99501574039459f}, - {-0.29250815510750f, 0.37444993853569f}, - {-0.60182201862335f, 0.86779648065567f}, - {-0.97418588399887f, 0.96468526124954f}, - {0.88461571931839f, 0.57508403062820f}, - {0.05198933184147f, 0.21269661188126f}, - {-0.53499621152878f, 0.97241556644440f}, - {-0.49429559707642f, 0.98183864355087f}, - {-0.98935145139694f, -0.40249159932137f}, - {-0.98081380128860f, -0.72856897115707f}, - {-0.27338150143623f, 0.99950921535492f}, - {0.06310802698135f, -0.54539585113525f}, - {-0.20461677014828f, -0.14209978282452f}, - {0.66223841905594f, 0.72528582811356f}, - {-0.84764343500137f, 0.02372316829860f}, - {-0.89039862155914f, 0.88866579532623f}, - {0.95903307199478f, 0.76744925975800f}, - {0.73504126071930f, -0.03747203201056f}, - {-0.31744435429573f, -0.36834111809731f}, - {-0.34110826253891f, 0.40211221575737f}, - {0.47803884744644f, -0.39423218369484f}, - {0.98299193382263f, 0.01989791356027f}, - {-0.30963072180748f, -0.18076720833778f}, - {0.99992591142654f, -0.26281872391701f}, - {-0.93149733543396f, -0.98313164710999f}, - {0.99923473596573f, -0.80142992734909f}, - {-0.26024168729782f, -0.75999760627747f}, - {-0.35712513327599f, 0.19298963248730f}, - {-0.99899083375931f, 0.74645155668259f}, - {0.86557173728943f, 0.55593866109848f}, - {0.33408042788506f, 0.86185956001282f}, - {0.99010735750198f, 0.04602397605777f}, - {-0.66694271564484f, -0.91643613576889f}, - {0.64016789197922f, 0.15649530291557f}, - {0.99570536613464f, 0.45844584703445f}, - {-0.63431465625763f, 0.21079117059708f}, - {-0.07706847041845f, -0.89581435918808f}, - {0.98590087890625f, 0.88241720199585f}, - {0.80099332332611f, -0.36851897835732f}, - {0.78368133306503f, 0.45506998896599f}, - {0.08707806468010f, 0.80938994884491f}, - {-0.86811882257462f, 0.39347308874130f}, - {-0.39466530084610f, -0.66809433698654f}, - {0.97875326871872f, -0.72467839717865f}, - {-0.95038563013077f, 0.89563220739365f}, - {0.17005239427090f, 0.54683053493500f}, - {-0.76910793781281f, -0.96226614713669f}, - {0.99743282794952f, 0.42697158455849f}, - {0.95437383651733f, 0.97002321481705f}, - {0.99578905105591f, -0.54106825590134f}, - {0.28058260679245f, -0.85361421108246f}, - {0.85256522893906f, -0.64567607641220f}, - {-0.50608539581299f, -0.65846014022827f}, - {-0.97210735082626f, -0.23095212876797f}, - {0.95424050092697f, -0.99240148067474f}, - {-0.96926569938660f, 0.73775655031204f}, - {0.30872163176537f, 0.41514959931374f}, - {-0.24523839354515f, 0.63206630945206f}, - {-0.33813264966011f, -0.38661777973175f}, - {-0.05826828256249f, -0.06940773874521f}, - {-0.22898460924625f, 0.97054851055145f}, - {-0.18509915471077f, 0.47565764188766f}, - {-0.10488238185644f, -0.87769949436188f}, - {-0.71886587142944f, 0.78030979633331f}, - {0.99793875217438f, 0.90041309595108f}, - {0.57563304901123f, -0.91034334897995f}, - {0.28909647464752f, 0.96307784318924f}, - {0.42188999056816f, 0.48148649930954f}, - {0.93335050344467f, -0.43537023663521f}, - {-0.97087377309799f, 0.86636447906494f}, - {0.36722871661186f, 0.65291655063629f}, - {-0.81093025207520f, 0.08778370171785f}, - {-0.26240602135658f, -0.92774093151093f}, - {0.83996498584747f, 0.55839848518372f}, - {-0.99909615516663f, -0.96024608612061f}, - {0.74649465084076f, 0.12144893407822f}, - {-0.74774593114853f, -0.26898062229156f}, - {0.95781666040421f, -0.79047924280167f}, - {0.95472306013107f, -0.08588775992393f}, - {0.48708331584930f, 0.99999040365219f}, - {0.46332037448883f, 0.10964126139879f}, - {-0.76497006416321f, 0.89210927486420f}, - {0.57397389411926f, 0.35289704799652f}, - {0.75374317169189f, 0.96705216169357f}, - {-0.59174400568008f, -0.89405369758606f}, - {0.75087904930115f, -0.29612672328949f}, - {-0.98607856035233f, 0.25034910440445f}, - {-0.40761056542397f, -0.90045571327209f}, - {0.66929268836975f, 0.98629492521286f}, - {-0.97463697195053f, -0.00190223299433f}, - {0.90145510435104f, 0.99781388044357f}, - {-0.87259286642075f, 0.99233585596085f}, - {-0.91529458761215f, -0.15698707103729f}, - {-0.03305738791823f, -0.37205263972282f}, - {0.07223051041365f, -0.88805001974106f}, - {0.99498009681702f, 0.97094357013702f}, - {-0.74904936552048f, 0.99985486268997f}, - {0.04585228487849f, 0.99812334775925f}, - {-0.89054954051971f, -0.31791913509369f}, - {-0.83782142400742f, 0.97637635469437f}, - {0.33454805612564f, -0.86231517791748f}, - {-0.99707579612732f, 0.93237990140915f}, - {-0.22827528417110f, 0.18874759972095f}, - {0.67248046398163f, -0.03646211326122f}, - {-0.05146538093686f, -0.92599701881409f}, - {0.99947297573090f, 0.93625229597092f}, - {0.66951125860214f, 0.98905825614929f}, - {-0.99602955579758f, -0.44654715061188f}, - {0.82104903459549f, 0.99540740251541f}, - {0.99186509847641f, 0.72022998332977f}, - {-0.65284591913223f, 0.52186721563339f}, - {0.93885445594788f, -0.74895310401917f}, - {0.96735250949860f, 0.90891814231873f}, - {-0.22225968539715f, 0.57124030590057f}, - {-0.44132784008980f, -0.92688840627670f}, - {-0.85694974660873f, 0.88844531774521f}, - {0.91783040761948f, -0.46356892585754f}, - {0.72556972503662f, -0.99899554252625f}, - {-0.99711579084396f, 0.58211559057236f}, - {0.77638977766037f, 0.94321835041046f}, - {0.07717324048281f, 0.58638399839401f}, - {-0.56049829721451f, 0.82522302865982f}, - {0.98398894071579f, 0.39467439055443f}, - {0.47546947002411f, 0.68613046407700f}, - {0.65675091743469f, 0.18331636488438f}, - {0.03273375332355f, -0.74933111667633f}, - {-0.38684144616127f, 0.51337349414825f}, - {-0.97346270084381f, -0.96549361944199f}, - {-0.53282153606415f, -0.91423267126083f}, - {0.99817311763763f, 0.61133575439453f}, - {-0.50254499912262f, -0.88829338550568f}, - {0.01995873264968f, 0.85223513841629f}, - {0.99930381774902f, 0.94578897953033f}, - {0.82907766103745f, -0.06323442608118f}, - {-0.58660709857941f, 0.96840775012970f}, - {-0.17573736608028f, -0.48166921734810f}, - {0.83434289693832f, -0.13023450970650f}, - {0.05946491286159f, 0.20511047542095f}, - {0.81505483388901f, -0.94685947895050f}, - {-0.44976380467415f, 0.40894573926926f}, - {-0.89746475219727f, 0.99846577644348f}, - {0.39677256345749f, -0.74854665994644f}, - {-0.07588948309422f, 0.74096214771271f}, - {0.76343196630478f, 0.41746628284454f}, - {-0.74490106105804f, 0.94725912809372f}, - {0.64880120754242f, 0.41336661577225f}, - {0.62319535017014f, -0.93098312616348f}, - {0.42215818166733f, -0.07712787389755f}, - {0.02704554051161f, -0.05417517945170f}, - {0.80001771450043f, 0.91542196273804f}, - {-0.79351830482483f, -0.36208897829056f}, - {0.63872361183167f, 0.08128252625465f}, - {0.52890521287918f, 0.60048872232437f}, - {0.74238550662994f, 0.04491915181279f}, - {0.99096131324768f, -0.19451183080673f}, - {-0.80412328243256f, -0.88513815402985f}, - {-0.64612615108490f, 0.72198677062988f}, - {0.11657770723104f, -0.83662831783295f}, - {-0.95053184032440f, -0.96939903497696f}, - {-0.62228870391846f, 0.82767260074615f}, - {0.03004475869238f, -0.99738895893097f}, - {-0.97987216711044f, 0.36526128649712f}, - {-0.99986982345581f, -0.36021611094475f}, - {0.89110648632050f, -0.97894251346588f}, - {0.10407960414886f, 0.77357792854309f}, - {0.95964735746384f, -0.35435819625854f}, - {0.50843232870102f, 0.96107691526413f}, - {0.17006334662437f, -0.76854026317596f}, - {0.25872674584389f, 0.99893301725388f}, - {-0.01115998718888f, 0.98496019840240f}, - {-0.79598701000214f, 0.97138410806656f}, - {-0.99264711141586f, -0.99542820453644f}, - {-0.99829661846161f, 0.01877138763666f}, - {-0.70801013708115f, 0.33680686354637f}, - {-0.70467054843903f, 0.93272775411606f}, - {0.99846023321152f, -0.98725748062134f}, - {-0.63364970684052f, -0.16473594307899f}, - {-0.16258217394352f, -0.95939123630524f}, - {-0.43645593523979f, -0.94805032014847f}, - {-0.99848473072052f, 0.96245169639587f}, - {-0.16796459257603f, -0.98987513780594f}, - {-0.87979227304459f, -0.71725726127625f}, - {0.44183099269867f, -0.93568974733353f}, - {0.93310177326202f, -0.99913311004639f}, - {-0.93941932916641f, -0.56409376859665f}, - {-0.88590002059937f, 0.47624599933624f}, - {0.99971461296082f, -0.83889955282211f}, - {-0.75376385450363f, 0.00814643409103f}, - {0.93887686729431f, -0.11284527927637f}, - {0.85126435756683f, 0.52349251508713f}, - {0.39701420068741f, 0.81779634952545f}, - {-0.37024465203285f, -0.87071657180786f}, - {-0.36024826765060f, 0.34655734896660f}, - {-0.93388813734055f, -0.84476542472839f}, - {-0.65298801660538f, -0.18439576029778f}, - {0.11960318684578f, 0.99899345636368f}, - {0.94292563199997f, 0.83163905143738f}, - {0.75081145763397f, -0.35533222556114f}, - {0.56721979379654f, -0.24076835811138f}, - {0.46857765316963f, -0.30140233039856f}, - {0.97312313318253f, -0.99548190832138f}, - {-0.38299977779388f, 0.98516911268234f}, - {0.41025799512863f, 0.02116736955941f}, - {0.09638062119484f, 0.04411984235048f}, - {-0.85283249616623f, 0.91475564241409f}, - {0.88866806030273f, -0.99735265970230f}, - {-0.48202428221703f, -0.96805608272552f}, - {0.27572581171989f, 0.58634752035141f}, - {-0.65889132022858f, 0.58835631608963f}, - {0.98838084936142f, 0.99994349479675f}, - {-0.20651349425316f, 0.54593044519424f}, - {-0.62126415967941f, -0.59893679618835f}, - {0.20320105552673f, -0.86879181861877f}, - {-0.97790551185608f, 0.96290808916092f}, - {0.11112534999847f, 0.21484763920307f}, - {-0.41368338465691f, 0.28216838836670f}, - {0.24133038520813f, 0.51294362545013f}, - {-0.66393411159515f, -0.08249679952860f}, - {-0.53697830438614f, -0.97649902105331f}, - {-0.97224736213684f, 0.22081333398819f}, - {0.87392479181290f, -0.12796173989773f}, - {0.19050361216068f, 0.01602615416050f}, - {-0.46353441476822f, -0.95249038934708f}, - {-0.07064096629620f, -0.94479805231094f}, - {-0.92444086074829f, -0.10457590222359f}, - {-0.83822596073151f, -0.01695043221116f}, - {0.75214684009552f, -0.99955683946609f}, - {-0.42102998495102f, 0.99720942974091f}, - {-0.72094786167145f, -0.35008960962296f}, - {0.78843313455582f, 0.52851396799088f}, - {0.97394025325775f, -0.26695942878723f}, - {0.99206465482712f, -0.57010120153427f}, - {0.76789611577988f, -0.76519358158112f}, - {-0.82002419233322f, -0.73530179262161f}, - {0.81924992799759f, 0.99698424339294f}, - {-0.26719850301743f, 0.68903368711472f}, - {-0.43311259150505f, 0.85321813821793f}, - {0.99194979667664f, 0.91876250505447f}, - {-0.80691999197006f, -0.32627540826797f}, - {0.43080005049706f, -0.21919095516205f}, - {0.67709493637085f, -0.95478075742722f}, - {0.56151771545410f, -0.70693808794022f}, - {0.10831862688065f, -0.08628837019205f}, - {0.91229414939880f, -0.65987348556519f}, - {-0.48972892761230f, 0.56289243698120f}, - {-0.89033657312393f, -0.71656566858292f}, - {0.65269446372986f, 0.65916007757187f}, - {0.67439478635788f, -0.81684380769730f}, - {-0.47770830988884f, -0.16789555549622f}, - {-0.99715977907181f, -0.93565785884857f}, - {-0.90889590978622f, 0.62034398317337f}, - {-0.06618622690439f, -0.23812216520309f}, - {0.99430269002914f, 0.18812555074692f}, - {0.97686403989792f, -0.28664535284042f}, - {0.94813650846481f, -0.97506642341614f}, - {-0.95434498786926f, -0.79607981443405f}, - {-0.49104782938957f, 0.32895213365555f}, - {0.99881172180176f, 0.88993984460831f}, - {0.50449168682098f, -0.85995072126389f}, - {0.47162890434265f, -0.18680204451084f}, - {-0.62081581354141f, 0.75000673532486f}, - {-0.43867015838623f, 0.99998068809509f}, - {0.98630565404892f, -0.53578901290894f}, - {-0.61510360240936f, -0.89515018463135f}, - {-0.03841517493129f, -0.69888818264008f}, - {-0.30102157592773f, -0.07667808979750f}, - {0.41881284117699f, 0.02188098989427f}, - {-0.86135452985764f, 0.98947483301163f}, - {0.67226862907410f, -0.13494388759136f}, - {-0.70737397670746f, -0.76547348499298f}, - {0.94044947624207f, 0.09026201069355f}, - {-0.82386350631714f, 0.08924768865108f}, - {-0.32070666551590f, 0.50143420696259f}, - {0.57593160867691f, -0.98966425657272f}, - {-0.36326017975807f, 0.07440242916346f}, - {0.99979043006897f, -0.14130286872387f}, - {-0.92366021871567f, -0.97979295253754f}, - {-0.44607177376747f, -0.54233253002167f}, - {0.44226801395416f, 0.71326756477356f}, - {0.03671907261014f, 0.63606387376785f}, - {0.52175426483154f, -0.85396826267242f}, - {-0.94701141119003f, -0.01826348155737f}, - {-0.98759609460831f, 0.82288712263107f}, - {0.87434792518616f, 0.89399492740631f}, - {-0.93412041664124f, 0.41374051570892f}, - {0.96063941717148f, 0.93116706609726f}, - {0.97534251213074f, 0.86150932312012f}, - {0.99642467498779f, 0.70190042257309f}, - {-0.94705086946487f, -0.29580041766167f}, - {0.91599804162979f, -0.98147833347321f} - }; + /* Table 1.A.13 Noise table V */ + float[][] NOISE_TABLE = { + {-0.99948155879974f, -0.59483414888382f}, + {0.97113454341888f, -0.67528516054153f}, + {0.14130051434040f, -0.95090985298157f}, + {-0.47005495429039f, -0.37340548634529f}, + {0.80705064535141f, 0.29653668403625f}, + {-0.38981479406357f, 0.89572608470917f}, + {-0.01053049881011f, -0.66959059238434f}, + {-0.91266369819641f, -0.11522938311100f}, + {0.54840421676636f, 0.75221365690231f}, + {0.40009254217148f, -0.98929399251938f}, + {-0.99867975711823f, -0.88147068023682f}, + {-0.95531076192856f, 0.90908759832382f}, + {-0.45725932717323f, -0.56716322898865f}, + {-0.72929674386978f, -0.98008275032043f}, + {0.75622802972794f, 0.20950329303741f}, + {0.07069442421198f, -0.78247898817062f}, + {0.74496251344681f, -0.91169005632401f}, + {-0.96440184116364f, -0.94739919900894f}, + {0.30424630641937f, -0.49438267946243f}, + {0.66565030813217f, 0.64652937650681f}, + {0.91697007417679f, 0.17514097690582f}, + {-0.70774918794632f, 0.52548652887344f}, + {-0.70051413774490f, -0.45340028405190f}, + {-0.99496513605118f, -0.90071910619736f}, + {0.98164492845535f, -0.77463155984879f}, + {-0.54671579599380f, -0.02570928446949f}, + {-0.01689629070461f, 0.00287506449968f}, + {-0.86110347509384f, 0.42548584938049f}, + {-0.98892980813980f, -0.87881129980087f}, + {0.51756626367569f, 0.66926783323288f}, + {-0.99635028839111f, -0.58107727766037f}, + {-0.99969369173050f, 0.98369991779327f}, + {0.55266261100769f, 0.59449058771133f}, + {0.34581178426743f, 0.94879418611526f}, + {0.62664210796356f, -0.74402970075607f}, + {-0.77149701118469f, -0.33883658051491f}, + {-0.91592246294022f, 0.03687901422381f}, + {-0.76285493373871f, -0.91371870040894f}, + {0.79788339138031f, -0.93180972337723f}, + {0.54473078250885f, -0.11919206380844f}, + {-0.85639280080795f, 0.42429855465889f}, + {-0.92882400751114f, 0.27871808409691f}, + {-0.11708371341228f, -0.99800843000412f}, + {0.21356749534607f, -0.90716296434402f}, + {-0.76191693544388f, 0.99768120050430f}, + {0.98111045360565f, -0.95854461193085f}, + {-0.85913270711899f, 0.95766568183899f}, + {-0.93307244777679f, 0.49431759119034f}, + {0.30485755205154f, -0.70540034770966f}, + {0.85289651155472f, 0.46766132116318f}, + {0.91328084468842f, -0.99839597940445f}, + {-0.05890199914575f, 0.70741826295853f}, + {0.28398686647415f, 0.34633556008339f}, + {0.95258164405823f, -0.54893416166306f}, + {-0.78566324710846f, -0.75568538904190f}, + {-0.95789498090744f, -0.20423194766045f}, + {0.82411158084869f, 0.96654617786407f}, + {-0.65185445547104f, -0.88734990358353f}, + {-0.93643605709076f, 0.99870789051056f}, + {0.91427159309387f, -0.98290503025055f}, + {-0.70395684242249f, 0.58796799182892f}, + {0.00563771976158f, 0.61768198013306f}, + {0.89065051078796f, 0.52783352136612f}, + {-0.68683707714081f, 0.80806946754456f}, + {0.72165340185165f, -0.69259858131409f}, + {-0.62928247451782f, 0.13627037405968f}, + {0.29938435554504f, -0.46051329374313f}, + {-0.91781955957413f, -0.74012714624405f}, + {0.99298715591431f, 0.40816611051559f}, + {0.82368296384811f, -0.74036049842834f}, + {-0.98512834310532f, -0.99972331523895f}, + {-0.95915371179581f, -0.99237799644470f}, + {-0.21411126852036f, -0.93424820899963f}, + {-0.68821477890015f, -0.26892307400703f}, + {0.91851997375488f, 0.09358228743076f}, + {-0.96062767505646f, 0.36099094152451f}, + {0.51646184921265f, -0.71373331546783f}, + {0.61130720376968f, 0.46950140595436f}, + {0.47336128354073f, -0.27333179116249f}, + {0.90998309850693f, 0.96715664863586f}, + {0.44844800233841f, 0.99211573600769f}, + {0.66614890098572f, 0.96590173244476f}, + {0.74922239780426f, -0.89879858493805f}, + {-0.99571585655212f, 0.52785521745682f}, + {0.97401082515717f, -0.16855870187283f}, + {0.72683745622635f, -0.48060774803162f}, + {0.95432192087173f, 0.68849605321884f}, + {-0.72962206602097f, -0.76608443260193f}, + {-0.85359477996826f, 0.88738125562668f}, + {-0.81412428617477f, -0.97480767965317f}, + {-0.87930774688721f, 0.74748307466507f}, + {-0.71573328971863f, -0.98570609092712f}, + {0.83524298667908f, 0.83702534437180f}, + {-0.48086065053940f, -0.98848503828049f}, + {0.97139126062393f, 0.80093622207642f}, + {0.51992827653885f, 0.80247628688812f}, + {-0.00848591234535f, -0.76670128107071f}, + {-0.70294374227524f, 0.55359911918640f}, + {-0.95894426107407f, -0.43265503644943f}, + {0.97079253196716f, 0.09325857460499f}, + {-0.92404294013977f, 0.85507702827454f}, + {-0.69506472349167f, 0.98633414506912f}, + {0.26559203863144f, 0.73314309120178f}, + {0.28038442134857f, 0.14537914097309f}, + {-0.74138122797012f, 0.99310338497162f}, + {-0.01752796024084f, -0.82616633176804f}, + {-0.55126774311066f, -0.98898541927338f}, + {0.97960901260376f, -0.94021445512772f}, + {-0.99196308851242f, 0.67019015550613f}, + {-0.67684930562973f, 0.12631492316723f}, + {0.09140039235353f, -0.20537731051445f}, + {-0.71658962965012f, -0.97788202762604f}, + {0.81014639139175f, 0.53722649812698f}, + {0.40616992115974f, -0.26469007134438f}, + {-0.67680186033249f, 0.94502049684525f}, + {0.86849772930145f, -0.18333598971367f}, + {-0.99500381946564f, -0.02634122036397f}, + {0.84329187870026f, 0.10406957566738f}, + {-0.09215968847275f, 0.69540011882782f}, + {0.99956172704697f, -0.12358541786671f}, + {-0.79732781648636f, -0.91582524776459f}, + {0.96349972486496f, 0.96640455722809f}, + {-0.79942780733109f, 0.64323902130127f}, + {-0.11566039919853f, 0.28587844967842f}, + {-0.39922955632210f, 0.94129604101181f}, + {0.99089199304581f, -0.92062628269196f}, + {0.28631284832954f, -0.91035044193268f}, + {-0.83302724361420f, -0.67330408096313f}, + {0.95404446125031f, 0.49162766337395f}, + {-0.06449863314629f, 0.03250560909510f}, + {-0.99575054645538f, 0.42389783263206f}, + {-0.65501141548157f, 0.82546114921570f}, + {-0.81254440546036f, -0.51627236604691f}, + {-0.99646371603012f, 0.84490531682968f}, + {0.00287840608507f, 0.64768260717392f}, + {0.70176988840103f, -0.20453028380871f}, + {0.96361881494522f, 0.40706968307495f}, + {-0.68883758783340f, 0.91338956356049f}, + {-0.34875586628914f, 0.71472293138504f}, + {0.91980081796646f, 0.66507452726364f}, + {-0.99009048938751f, 0.85868018865585f}, + {0.68865793943405f, 0.55660319328308f}, + {-0.99484401941299f, -0.20052559673786f}, + {0.94214510917664f, -0.99696427583694f}, + {-0.67414629459381f, 0.49548220634460f}, + {-0.47339352965355f, -0.85904330015182f}, + {0.14323651790619f, -0.94145596027374f}, + {-0.29268294572830f, 0.05759225040674f}, + {0.43793860077858f, -0.78904968500137f}, + {-0.36345127224922f, 0.64874434471130f}, + {-0.08750604838133f, 0.97686946392059f}, + {-0.96495270729065f, -0.53960305452347f}, + {0.55526942014694f, 0.78891521692276f}, + {0.73538213968277f, 0.96452075242996f}, + {-0.30889773368835f, -0.80664390325546f}, + {0.03574995696545f, -0.97325617074966f}, + {0.98720687627792f, 0.48409134149551f}, + {-0.81689298152924f, -0.90827703475952f}, + {0.67866861820221f, 0.81284505128860f}, + {-0.15808570384979f, 0.85279554128647f}, + {0.80723392963409f, -0.24717418849468f}, + {0.47788757085800f, -0.46333149075508f}, + {0.96367555856705f, 0.38486748933792f}, + {-0.99143874645233f, -0.24945276975632f}, + {0.83081877231598f, -0.94780850410461f}, + {-0.58753192424774f, 0.01290772389621f}, + {0.95538109540939f, -0.85557049512863f}, + {-0.96490919589996f, -0.64020973443985f}, + {-0.97327101230621f, 0.12378127872944f}, + {0.91400367021561f, 0.57972472906113f}, + {-0.99925839900970f, 0.71084845066071f}, + {-0.86875903606415f, -0.20291699469090f}, + {-0.26240035891533f, -0.68264555931091f}, + {-0.24664412438869f, -0.87642270326614f}, + {0.02416275814176f, 0.27192914485931f}, + {0.82068622112274f, -0.85087788105011f}, + {0.88547372817993f, -0.89636802673340f}, + {-0.18173077702522f, -0.26152145862579f}, + {0.09355476498604f, 0.54845124483109f}, + {-0.54668414592743f, 0.95980775356293f}, + {0.37050989270210f, -0.59910142421722f}, + {-0.70373594760895f, 0.91227668523788f}, + {-0.34600785374641f, -0.99441426992416f}, + {-0.68774479627609f, -0.30238837003708f}, + {-0.26843291521072f, 0.83115667104721f}, + {0.49072334170341f, -0.45359709858894f}, + {0.38975992798805f, 0.95515358448029f}, + {-0.97757124900818f, 0.05305894464254f}, + {-0.17325553297997f, -0.92770671844482f}, + {0.99948036670685f, 0.58285546302795f}, + {-0.64946246147156f, 0.68645507097244f}, + {-0.12016920745373f, -0.57147324085236f}, + {-0.58947455883026f, -0.34847131371498f}, + {-0.41815140843391f, 0.16276422142982f}, + {0.99885648488998f, 0.11136095225811f}, + {-0.56649613380432f, -0.90494865179062f}, + {0.94138020277023f, 0.35281917452812f}, + {-0.75725078582764f, 0.53650552034378f}, + {0.20541973412037f, -0.94435143470764f}, + {0.99980372190475f, 0.79835915565491f}, + {0.29078277945518f, 0.35393777489662f}, + {-0.62858772277832f, 0.38765692710876f}, + {0.43440905213356f, -0.98546332120895f}, + {-0.98298585414886f, 0.21021524071693f}, + {0.19513028860092f, -0.94239830970764f}, + {-0.95476663112640f, 0.98364555835724f}, + {0.93379634618759f, -0.70881992578506f}, + {-0.85235410928726f, -0.08342348039150f}, + {-0.86425095796585f, -0.45795026421547f}, + {0.38879778981209f, 0.97274428606033f}, + {0.92045122385025f, -0.62433654069901f}, + {0.89162534475327f, 0.54950958490372f}, + {-0.36834338307381f, 0.96458297967911f}, + {0.93891763687134f, -0.89968353509903f}, + {0.99267655611038f, -0.03757034242153f}, + {-0.94063472747803f, 0.41332337260246f}, + {0.99740225076675f, -0.16830494999886f}, + {-0.35899412631989f, -0.46633225679398f}, + {0.05237237364054f, -0.25640362501144f}, + {0.36703583598137f, -0.38653266429901f}, + {0.91653180122375f, -0.30587628483772f}, + {0.69000804424286f, 0.90952169895172f}, + {-0.38658750057220f, 0.99501574039459f}, + {-0.29250815510750f, 0.37444993853569f}, + {-0.60182201862335f, 0.86779648065567f}, + {-0.97418588399887f, 0.96468526124954f}, + {0.88461571931839f, 0.57508403062820f}, + {0.05198933184147f, 0.21269661188126f}, + {-0.53499621152878f, 0.97241556644440f}, + {-0.49429559707642f, 0.98183864355087f}, + {-0.98935145139694f, -0.40249159932137f}, + {-0.98081380128860f, -0.72856897115707f}, + {-0.27338150143623f, 0.99950921535492f}, + {0.06310802698135f, -0.54539585113525f}, + {-0.20461677014828f, -0.14209978282452f}, + {0.66223841905594f, 0.72528582811356f}, + {-0.84764343500137f, 0.02372316829860f}, + {-0.89039862155914f, 0.88866579532623f}, + {0.95903307199478f, 0.76744925975800f}, + {0.73504126071930f, -0.03747203201056f}, + {-0.31744435429573f, -0.36834111809731f}, + {-0.34110826253891f, 0.40211221575737f}, + {0.47803884744644f, -0.39423218369484f}, + {0.98299193382263f, 0.01989791356027f}, + {-0.30963072180748f, -0.18076720833778f}, + {0.99992591142654f, -0.26281872391701f}, + {-0.93149733543396f, -0.98313164710999f}, + {0.99923473596573f, -0.80142992734909f}, + {-0.26024168729782f, -0.75999760627747f}, + {-0.35712513327599f, 0.19298963248730f}, + {-0.99899083375931f, 0.74645155668259f}, + {0.86557173728943f, 0.55593866109848f}, + {0.33408042788506f, 0.86185956001282f}, + {0.99010735750198f, 0.04602397605777f}, + {-0.66694271564484f, -0.91643613576889f}, + {0.64016789197922f, 0.15649530291557f}, + {0.99570536613464f, 0.45844584703445f}, + {-0.63431465625763f, 0.21079117059708f}, + {-0.07706847041845f, -0.89581435918808f}, + {0.98590087890625f, 0.88241720199585f}, + {0.80099332332611f, -0.36851897835732f}, + {0.78368133306503f, 0.45506998896599f}, + {0.08707806468010f, 0.80938994884491f}, + {-0.86811882257462f, 0.39347308874130f}, + {-0.39466530084610f, -0.66809433698654f}, + {0.97875326871872f, -0.72467839717865f}, + {-0.95038563013077f, 0.89563220739365f}, + {0.17005239427090f, 0.54683053493500f}, + {-0.76910793781281f, -0.96226614713669f}, + {0.99743282794952f, 0.42697158455849f}, + {0.95437383651733f, 0.97002321481705f}, + {0.99578905105591f, -0.54106825590134f}, + {0.28058260679245f, -0.85361421108246f}, + {0.85256522893906f, -0.64567607641220f}, + {-0.50608539581299f, -0.65846014022827f}, + {-0.97210735082626f, -0.23095212876797f}, + {0.95424050092697f, -0.99240148067474f}, + {-0.96926569938660f, 0.73775655031204f}, + {0.30872163176537f, 0.41514959931374f}, + {-0.24523839354515f, 0.63206630945206f}, + {-0.33813264966011f, -0.38661777973175f}, + {-0.05826828256249f, -0.06940773874521f}, + {-0.22898460924625f, 0.97054851055145f}, + {-0.18509915471077f, 0.47565764188766f}, + {-0.10488238185644f, -0.87769949436188f}, + {-0.71886587142944f, 0.78030979633331f}, + {0.99793875217438f, 0.90041309595108f}, + {0.57563304901123f, -0.91034334897995f}, + {0.28909647464752f, 0.96307784318924f}, + {0.42188999056816f, 0.48148649930954f}, + {0.93335050344467f, -0.43537023663521f}, + {-0.97087377309799f, 0.86636447906494f}, + {0.36722871661186f, 0.65291655063629f}, + {-0.81093025207520f, 0.08778370171785f}, + {-0.26240602135658f, -0.92774093151093f}, + {0.83996498584747f, 0.55839848518372f}, + {-0.99909615516663f, -0.96024608612061f}, + {0.74649465084076f, 0.12144893407822f}, + {-0.74774593114853f, -0.26898062229156f}, + {0.95781666040421f, -0.79047924280167f}, + {0.95472306013107f, -0.08588775992393f}, + {0.48708331584930f, 0.99999040365219f}, + {0.46332037448883f, 0.10964126139879f}, + {-0.76497006416321f, 0.89210927486420f}, + {0.57397389411926f, 0.35289704799652f}, + {0.75374317169189f, 0.96705216169357f}, + {-0.59174400568008f, -0.89405369758606f}, + {0.75087904930115f, -0.29612672328949f}, + {-0.98607856035233f, 0.25034910440445f}, + {-0.40761056542397f, -0.90045571327209f}, + {0.66929268836975f, 0.98629492521286f}, + {-0.97463697195053f, -0.00190223299433f}, + {0.90145510435104f, 0.99781388044357f}, + {-0.87259286642075f, 0.99233585596085f}, + {-0.91529458761215f, -0.15698707103729f}, + {-0.03305738791823f, -0.37205263972282f}, + {0.07223051041365f, -0.88805001974106f}, + {0.99498009681702f, 0.97094357013702f}, + {-0.74904936552048f, 0.99985486268997f}, + {0.04585228487849f, 0.99812334775925f}, + {-0.89054954051971f, -0.31791913509369f}, + {-0.83782142400742f, 0.97637635469437f}, + {0.33454805612564f, -0.86231517791748f}, + {-0.99707579612732f, 0.93237990140915f}, + {-0.22827528417110f, 0.18874759972095f}, + {0.67248046398163f, -0.03646211326122f}, + {-0.05146538093686f, -0.92599701881409f}, + {0.99947297573090f, 0.93625229597092f}, + {0.66951125860214f, 0.98905825614929f}, + {-0.99602955579758f, -0.44654715061188f}, + {0.82104903459549f, 0.99540740251541f}, + {0.99186509847641f, 0.72022998332977f}, + {-0.65284591913223f, 0.52186721563339f}, + {0.93885445594788f, -0.74895310401917f}, + {0.96735250949860f, 0.90891814231873f}, + {-0.22225968539715f, 0.57124030590057f}, + {-0.44132784008980f, -0.92688840627670f}, + {-0.85694974660873f, 0.88844531774521f}, + {0.91783040761948f, -0.46356892585754f}, + {0.72556972503662f, -0.99899554252625f}, + {-0.99711579084396f, 0.58211559057236f}, + {0.77638977766037f, 0.94321835041046f}, + {0.07717324048281f, 0.58638399839401f}, + {-0.56049829721451f, 0.82522302865982f}, + {0.98398894071579f, 0.39467439055443f}, + {0.47546947002411f, 0.68613046407700f}, + {0.65675091743469f, 0.18331636488438f}, + {0.03273375332355f, -0.74933111667633f}, + {-0.38684144616127f, 0.51337349414825f}, + {-0.97346270084381f, -0.96549361944199f}, + {-0.53282153606415f, -0.91423267126083f}, + {0.99817311763763f, 0.61133575439453f}, + {-0.50254499912262f, -0.88829338550568f}, + {0.01995873264968f, 0.85223513841629f}, + {0.99930381774902f, 0.94578897953033f}, + {0.82907766103745f, -0.06323442608118f}, + {-0.58660709857941f, 0.96840775012970f}, + {-0.17573736608028f, -0.48166921734810f}, + {0.83434289693832f, -0.13023450970650f}, + {0.05946491286159f, 0.20511047542095f}, + {0.81505483388901f, -0.94685947895050f}, + {-0.44976380467415f, 0.40894573926926f}, + {-0.89746475219727f, 0.99846577644348f}, + {0.39677256345749f, -0.74854665994644f}, + {-0.07588948309422f, 0.74096214771271f}, + {0.76343196630478f, 0.41746628284454f}, + {-0.74490106105804f, 0.94725912809372f}, + {0.64880120754242f, 0.41336661577225f}, + {0.62319535017014f, -0.93098312616348f}, + {0.42215818166733f, -0.07712787389755f}, + {0.02704554051161f, -0.05417517945170f}, + {0.80001771450043f, 0.91542196273804f}, + {-0.79351830482483f, -0.36208897829056f}, + {0.63872361183167f, 0.08128252625465f}, + {0.52890521287918f, 0.60048872232437f}, + {0.74238550662994f, 0.04491915181279f}, + {0.99096131324768f, -0.19451183080673f}, + {-0.80412328243256f, -0.88513815402985f}, + {-0.64612615108490f, 0.72198677062988f}, + {0.11657770723104f, -0.83662831783295f}, + {-0.95053184032440f, -0.96939903497696f}, + {-0.62228870391846f, 0.82767260074615f}, + {0.03004475869238f, -0.99738895893097f}, + {-0.97987216711044f, 0.36526128649712f}, + {-0.99986982345581f, -0.36021611094475f}, + {0.89110648632050f, -0.97894251346588f}, + {0.10407960414886f, 0.77357792854309f}, + {0.95964735746384f, -0.35435819625854f}, + {0.50843232870102f, 0.96107691526413f}, + {0.17006334662437f, -0.76854026317596f}, + {0.25872674584389f, 0.99893301725388f}, + {-0.01115998718888f, 0.98496019840240f}, + {-0.79598701000214f, 0.97138410806656f}, + {-0.99264711141586f, -0.99542820453644f}, + {-0.99829661846161f, 0.01877138763666f}, + {-0.70801013708115f, 0.33680686354637f}, + {-0.70467054843903f, 0.93272775411606f}, + {0.99846023321152f, -0.98725748062134f}, + {-0.63364970684052f, -0.16473594307899f}, + {-0.16258217394352f, -0.95939123630524f}, + {-0.43645593523979f, -0.94805032014847f}, + {-0.99848473072052f, 0.96245169639587f}, + {-0.16796459257603f, -0.98987513780594f}, + {-0.87979227304459f, -0.71725726127625f}, + {0.44183099269867f, -0.93568974733353f}, + {0.93310177326202f, -0.99913311004639f}, + {-0.93941932916641f, -0.56409376859665f}, + {-0.88590002059937f, 0.47624599933624f}, + {0.99971461296082f, -0.83889955282211f}, + {-0.75376385450363f, 0.00814643409103f}, + {0.93887686729431f, -0.11284527927637f}, + {0.85126435756683f, 0.52349251508713f}, + {0.39701420068741f, 0.81779634952545f}, + {-0.37024465203285f, -0.87071657180786f}, + {-0.36024826765060f, 0.34655734896660f}, + {-0.93388813734055f, -0.84476542472839f}, + {-0.65298801660538f, -0.18439576029778f}, + {0.11960318684578f, 0.99899345636368f}, + {0.94292563199997f, 0.83163905143738f}, + {0.75081145763397f, -0.35533222556114f}, + {0.56721979379654f, -0.24076835811138f}, + {0.46857765316963f, -0.30140233039856f}, + {0.97312313318253f, -0.99548190832138f}, + {-0.38299977779388f, 0.98516911268234f}, + {0.41025799512863f, 0.02116736955941f}, + {0.09638062119484f, 0.04411984235048f}, + {-0.85283249616623f, 0.91475564241409f}, + {0.88866806030273f, -0.99735265970230f}, + {-0.48202428221703f, -0.96805608272552f}, + {0.27572581171989f, 0.58634752035141f}, + {-0.65889132022858f, 0.58835631608963f}, + {0.98838084936142f, 0.99994349479675f}, + {-0.20651349425316f, 0.54593044519424f}, + {-0.62126415967941f, -0.59893679618835f}, + {0.20320105552673f, -0.86879181861877f}, + {-0.97790551185608f, 0.96290808916092f}, + {0.11112534999847f, 0.21484763920307f}, + {-0.41368338465691f, 0.28216838836670f}, + {0.24133038520813f, 0.51294362545013f}, + {-0.66393411159515f, -0.08249679952860f}, + {-0.53697830438614f, -0.97649902105331f}, + {-0.97224736213684f, 0.22081333398819f}, + {0.87392479181290f, -0.12796173989773f}, + {0.19050361216068f, 0.01602615416050f}, + {-0.46353441476822f, -0.95249038934708f}, + {-0.07064096629620f, -0.94479805231094f}, + {-0.92444086074829f, -0.10457590222359f}, + {-0.83822596073151f, -0.01695043221116f}, + {0.75214684009552f, -0.99955683946609f}, + {-0.42102998495102f, 0.99720942974091f}, + {-0.72094786167145f, -0.35008960962296f}, + {0.78843313455582f, 0.52851396799088f}, + {0.97394025325775f, -0.26695942878723f}, + {0.99206465482712f, -0.57010120153427f}, + {0.76789611577988f, -0.76519358158112f}, + {-0.82002419233322f, -0.73530179262161f}, + {0.81924992799759f, 0.99698424339294f}, + {-0.26719850301743f, 0.68903368711472f}, + {-0.43311259150505f, 0.85321813821793f}, + {0.99194979667664f, 0.91876250505447f}, + {-0.80691999197006f, -0.32627540826797f}, + {0.43080005049706f, -0.21919095516205f}, + {0.67709493637085f, -0.95478075742722f}, + {0.56151771545410f, -0.70693808794022f}, + {0.10831862688065f, -0.08628837019205f}, + {0.91229414939880f, -0.65987348556519f}, + {-0.48972892761230f, 0.56289243698120f}, + {-0.89033657312393f, -0.71656566858292f}, + {0.65269446372986f, 0.65916007757187f}, + {0.67439478635788f, -0.81684380769730f}, + {-0.47770830988884f, -0.16789555549622f}, + {-0.99715977907181f, -0.93565785884857f}, + {-0.90889590978622f, 0.62034398317337f}, + {-0.06618622690439f, -0.23812216520309f}, + {0.99430269002914f, 0.18812555074692f}, + {0.97686403989792f, -0.28664535284042f}, + {0.94813650846481f, -0.97506642341614f}, + {-0.95434498786926f, -0.79607981443405f}, + {-0.49104782938957f, 0.32895213365555f}, + {0.99881172180176f, 0.88993984460831f}, + {0.50449168682098f, -0.85995072126389f}, + {0.47162890434265f, -0.18680204451084f}, + {-0.62081581354141f, 0.75000673532486f}, + {-0.43867015838623f, 0.99998068809509f}, + {0.98630565404892f, -0.53578901290894f}, + {-0.61510360240936f, -0.89515018463135f}, + {-0.03841517493129f, -0.69888818264008f}, + {-0.30102157592773f, -0.07667808979750f}, + {0.41881284117699f, 0.02188098989427f}, + {-0.86135452985764f, 0.98947483301163f}, + {0.67226862907410f, -0.13494388759136f}, + {-0.70737397670746f, -0.76547348499298f}, + {0.94044947624207f, 0.09026201069355f}, + {-0.82386350631714f, 0.08924768865108f}, + {-0.32070666551590f, 0.50143420696259f}, + {0.57593160867691f, -0.98966425657272f}, + {-0.36326017975807f, 0.07440242916346f}, + {0.99979043006897f, -0.14130286872387f}, + {-0.92366021871567f, -0.97979295253754f}, + {-0.44607177376747f, -0.54233253002167f}, + {0.44226801395416f, 0.71326756477356f}, + {0.03671907261014f, 0.63606387376785f}, + {0.52175426483154f, -0.85396826267242f}, + {-0.94701141119003f, -0.01826348155737f}, + {-0.98759609460831f, 0.82288712263107f}, + {0.87434792518616f, 0.89399492740631f}, + {-0.93412041664124f, 0.41374051570892f}, + {0.96063941717148f, 0.93116706609726f}, + {0.97534251213074f, 0.86150932312012f}, + {0.99642467498779f, 0.70190042257309f}, + {-0.94705086946487f, -0.29580041766167f}, + {0.91599804162979f, -0.98147833347321f} + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/PS.java b/src/main/java/net/sourceforge/jaad/aac/sbr/PS.java new file mode 100644 index 00000000..1136b89f --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/PS.java @@ -0,0 +1,19 @@ +package net.sourceforge.jaad.aac.sbr; + +import net.sourceforge.jaad.aac.syntax.BitStream; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 24.09.21 + * Time: 23:25 + */ +public interface PS { + + boolean isDataAvailable(); + + void decode(BitStream ld); + + /* main Parametric Stereo decoding function */ + void process(float[][][] X_left, float[][][] X_right); +} diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/SBR.java b/src/main/java/net/sourceforge/jaad/aac/sbr/SBR.java index 297e936e..b4218e22 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/SBR.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/SBR.java @@ -1,1328 +1,302 @@ package net.sourceforge.jaad.aac.sbr; -import java.util.Arrays; import net.sourceforge.jaad.aac.AACException; +import net.sourceforge.jaad.aac.DecoderConfig; import net.sourceforge.jaad.aac.SampleFrequency; -import net.sourceforge.jaad.aac.ps.PS; import net.sourceforge.jaad.aac.syntax.BitStream; -public class SBR implements Constants, net.sourceforge.jaad.aac.syntax.Constants, HuffmanTables { - - private final boolean downSampledSBR; - final SampleFrequency sample_rate; - int maxAACLine; - - int rate; - boolean just_seeked; - int ret; - - boolean[] amp_res = new boolean[2]; - - int k0; - int kx; - int M; - int N_master; - int N_high; - int N_low; - int N_Q; - int[] N_L = new int[4]; - int[] n = new int[2]; - - int[] f_master = new int[64]; - int[][] f_table_res = new int[2][64]; - int[] f_table_noise = new int[64]; - int[][] f_table_lim = new int[4][64]; - - int[] table_map_k_to_g = new int[64]; - - int[] abs_bord_lead = new int[2]; - int[] abs_bord_trail = new int[2]; - int[] n_rel_lead = new int[2]; - int[] n_rel_trail = new int[2]; - - int[] L_E = new int[2]; - int[] L_E_prev = new int[2]; - int[] L_Q = new int[2]; - - int[][] t_E = new int[2][MAX_L_E+1]; - int[][] t_Q = new int[2][3]; - int[][] f = new int[2][MAX_L_E+1]; - int[] f_prev = new int[2]; - - float[][][] G_temp_prev = new float[2][5][64]; - float[][][] Q_temp_prev = new float[2][5][64]; - int[] GQ_ringbuf_index = new int[2]; - - int[][][] E = new int[2][64][MAX_L_E]; - int[][] E_prev = new int[2][64]; - float[][][] E_orig = new float[2][64][MAX_L_E]; - float[][][] E_curr = new float[2][64][MAX_L_E]; - int[][][] Q = new int[2][64][2]; - float[][][] Q_div = new float[2][64][2]; - float[][][] Q_div2 = new float[2][64][2]; - int[][] Q_prev = new int[2][64]; - - int[] l_A = new int[2]; - int[] l_A_prev = new int[2]; - - int[][] bs_invf_mode = new int[2][MAX_L_E]; - int[][] bs_invf_mode_prev = new int[2][MAX_L_E]; - float[][] bwArray = new float[2][64]; - float[][] bwArray_prev = new float[2][64]; - - int noPatches; - int[] patchNoSubbands = new int[64]; - int[] patchStartSubband = new int[64]; - - int[][] bs_add_harmonic = new int[2][64]; - int[][] bs_add_harmonic_prev = new int[2][64]; - - int[] index_noise_prev = new int[2]; - int[] psi_is_prev = new int[2]; - - int bs_start_freq_prev; - int bs_stop_freq_prev; - int bs_xover_band_prev; - int bs_freq_scale_prev; - boolean bs_alter_scale_prev; - int bs_noise_bands_prev; - - int[] prevEnvIsShort = new int[2]; - - int kx_prev; - int bsco; - int bsco_prev; - int M_prev; - - boolean Reset; - int frame; - int header_count; - - boolean stereo; - AnalysisFilterbank[] qmfa = new AnalysisFilterbank[2]; - SynthesisFilterbank[] qmfs = new SynthesisFilterbank[2]; - - float[][][][] Xsbr = new float[2][MAX_NTSRHFG][64][2]; - - int numTimeSlotsRate; - int numTimeSlots; - int tHFGen; - int tHFAdj; - - PS ps; - boolean ps_used; - boolean psResetFlag; - - /* to get it compiling */ - /* we'll see during the coding of all the tools, whether - these are all used or not. - */ - boolean bs_header_flag; - int bs_crc_flag; - int bs_sbr_crc_bits; - int bs_protocol_version; - boolean bs_amp_res; - int bs_start_freq; - int bs_stop_freq; - int bs_xover_band; - int bs_freq_scale; - boolean bs_alter_scale; - int bs_noise_bands; - int bs_limiter_bands; - int bs_limiter_gains; - boolean bs_interpol_freq; - boolean bs_smoothing_mode; - int bs_samplerate_mode; - boolean[] bs_add_harmonic_flag = new boolean[2]; - boolean[] bs_add_harmonic_flag_prev = new boolean[2]; - boolean bs_extended_data; - int bs_extension_id; - int bs_extension_data; - boolean bs_coupling; - int[] bs_frame_class = new int[2]; - int[][] bs_rel_bord = new int[2][9]; - int[][] bs_rel_bord_0 = new int[2][9]; - int[][] bs_rel_bord_1 = new int[2][9]; - int[] bs_pointer = new int[2]; - int[] bs_abs_bord_0 = new int[2]; - int[] bs_abs_bord_1 = new int[2]; - int[] bs_num_rel_0 = new int[2]; - int[] bs_num_rel_1 = new int[2]; - int[][] bs_df_env = new int[2][9]; - int[][] bs_df_noise = new int[2][3]; - - public SBR(boolean smallFrames, boolean stereo, SampleFrequency sample_rate, boolean downSampledSBR) { - this.downSampledSBR = downSampledSBR; - this.stereo = stereo; - this.sample_rate = sample_rate; - - this.bs_freq_scale = 2; - this.bs_alter_scale = true; - this.bs_noise_bands = 2; - this.bs_limiter_bands = 2; - this.bs_limiter_gains = 2; - this.bs_interpol_freq = true; - this.bs_smoothing_mode = true; - this.bs_start_freq = 5; - this.bs_amp_res = true; - this.bs_samplerate_mode = 1; - this.prevEnvIsShort[0] = -1; - this.prevEnvIsShort[1] = -1; - this.header_count = 0; - this.Reset = true; - - this.tHFGen = T_HFGEN; - this.tHFAdj = T_HFADJ; - - this.bsco = 0; - this.bsco_prev = 0; - this.M_prev = 0; - - /* force sbr reset */ - this.bs_start_freq_prev = -1; - - if(smallFrames) { - this.numTimeSlotsRate = RATE*NO_TIME_SLOTS_960; - this.numTimeSlots = NO_TIME_SLOTS_960; - } - else { - this.numTimeSlotsRate = RATE*NO_TIME_SLOTS; - this.numTimeSlots = NO_TIME_SLOTS; - } - - this.GQ_ringbuf_index[0] = 0; - this.GQ_ringbuf_index[1] = 0; - - if(stereo) { - /* stereo */ - int j; - this.qmfa[0] = new AnalysisFilterbank(32); - this.qmfa[1] = new AnalysisFilterbank(32); - this.qmfs[0] = new SynthesisFilterbank((downSampledSBR) ? 32 : 64); - this.qmfs[1] = new SynthesisFilterbank((downSampledSBR) ? 32 : 64); - } - else { - /* mono */ - this.qmfa[0] = new AnalysisFilterbank(32); - this.qmfs[0] = new SynthesisFilterbank((downSampledSBR) ? 32 : 64); - this.qmfs[1] = null; - } - } - - void sbrReset() { - int j; - if(this.qmfa[0]!=null) qmfa[0].reset(); - if(this.qmfa[1]!=null) qmfa[1].reset(); - if(this.qmfs[0]!=null) qmfs[0].reset(); - if(this.qmfs[1]!=null) qmfs[1].reset(); - - for(j = 0; j<5; j++) { - if(this.G_temp_prev[0][j]!=null) Arrays.fill(G_temp_prev[0][j], 0); - if(this.G_temp_prev[1][j]!=null) Arrays.fill(G_temp_prev[1][j], 0); - if(this.Q_temp_prev[0][j]!=null) Arrays.fill(Q_temp_prev[0][j], 0); - if(this.Q_temp_prev[1][j]!=null) Arrays.fill(Q_temp_prev[1][j], 0); - } - - for(int i = 0; i<40; i++) { - for(int k = 0; k<64; k++) { - Xsbr[0][i][j][0] = 0; - Xsbr[0][i][j][1] = 0; - Xsbr[1][i][j][0] = 0; - Xsbr[1][i][j][1] = 0; - } - } - - this.GQ_ringbuf_index[0] = 0; - this.GQ_ringbuf_index[1] = 0; - this.header_count = 0; - this.Reset = true; - - this.L_E_prev[0] = 0; - this.L_E_prev[1] = 0; - this.bs_freq_scale = 2; - this.bs_alter_scale = true; - this.bs_noise_bands = 2; - this.bs_limiter_bands = 2; - this.bs_limiter_gains = 2; - this.bs_interpol_freq = true; - this.bs_smoothing_mode = true; - this.bs_start_freq = 5; - this.bs_amp_res = true; - this.bs_samplerate_mode = 1; - this.prevEnvIsShort[0] = -1; - this.prevEnvIsShort[1] = -1; - this.bsco = 0; - this.bsco_prev = 0; - this.M_prev = 0; - this.bs_start_freq_prev = -1; - - this.f_prev[0] = 0; - this.f_prev[1] = 0; - for(j = 0; j=48000) { - if((k2-this.k0)>32) - result += 1; - } - else if(this.sample_rate.getFrequency()<=32000) { - if((k2-this.k0)>48) - result += 1; - } - else { /* (sbr.sample_rate == 44100) */ - - if((k2-this.k0)>45) - result += 1; - } - - if(freq_scale==0) { - result += FBT.master_frequency_table_fs0(this, this.k0, k2, alter_scale); - } - else { - result += FBT.master_frequency_table(this, this.k0, k2, freq_scale, alter_scale); - } - result += FBT.derived_frequency_table(this, xover_band, k2); - - result = (result>0) ? 1 : 0; - - return result; - } - - /* table 2 */ - public int decode(BitStream ld, int cnt) throws AACException { - int result = 0; - int num_align_bits = 0; - long num_sbr_bits1 = ld.getPosition(); - int num_sbr_bits2; - - int saved_start_freq, saved_samplerate_mode; - int saved_stop_freq, saved_freq_scale; - int saved_xover_band; - boolean saved_alter_scale; - - int bs_extension_type = ld.readBits(4); - - if(bs_extension_type==EXT_SBR_DATA_CRC) { - this.bs_sbr_crc_bits = ld.readBits(10); - } - - /* save old header values, in case the new ones are corrupted */ - saved_start_freq = this.bs_start_freq; - saved_samplerate_mode = this.bs_samplerate_mode; - saved_stop_freq = this.bs_stop_freq; - saved_freq_scale = this.bs_freq_scale; - saved_alter_scale = this.bs_alter_scale; - saved_xover_band = this.bs_xover_band; - - this.bs_header_flag = ld.readBool(); - - if(this.bs_header_flag) - sbr_header(ld); - - /* Reset? */ - sbr_reset(); - - /* first frame should have a header */ - //if (!(sbr.frame == 0 && sbr.bs_header_flag == 0)) - if(this.header_count!=0) { - if(this.Reset||(this.bs_header_flag&&this.just_seeked)) { - int rt = calc_sbr_tables(this.bs_start_freq, this.bs_stop_freq, - this.bs_samplerate_mode, this.bs_freq_scale, - this.bs_alter_scale, this.bs_xover_band); - - /* if an error occured with the new header values revert to the old ones */ - if(rt>0) { - calc_sbr_tables(saved_start_freq, saved_stop_freq, - saved_samplerate_mode, saved_freq_scale, - saved_alter_scale, saved_xover_band); - } - } - - if(result==0) { - result = sbr_data(ld); - - /* sbr_data() returning an error means that there was an error in - envelope_time_border_vector(). - In this case the old time border vector is saved and all the previous - data normally read after sbr_grid() is saved. - */ - /* to be on the safe side, calculate old sbr tables in case of error */ - if((result>0) - &&(this.Reset||(this.bs_header_flag&&this.just_seeked))) { - calc_sbr_tables(saved_start_freq, saved_stop_freq, - saved_samplerate_mode, saved_freq_scale, - saved_alter_scale, saved_xover_band); - } - - /* we should be able to safely set result to 0 now, */ - /* but practise indicates this doesn't work well */ - } - } - else { - result = 1; - } - - num_sbr_bits2 = (int) (ld.getPosition()-num_sbr_bits1); - - /* check if we read more bits then were available for sbr */ - if(8*cnt7) { - ld.readBits(8); - num_align_bits -= 8; - } - ld.readBits(num_align_bits); - } - - return result; - } - - /* table 3 */ - private void sbr_header(BitStream ld) throws AACException { - boolean bs_header_extra_1, bs_header_extra_2; - - this.header_count++; - - this.bs_amp_res = ld.readBool(); - - /* bs_start_freq and bs_stop_freq must define a fequency band that does - not exceed 48 channels */ - this.bs_start_freq = ld.readBits(4); - this.bs_stop_freq = ld.readBits(4); - this.bs_xover_band = ld.readBits(3); - ld.readBits(2); //reserved - bs_header_extra_1 = ld.readBool(); - bs_header_extra_2 = ld.readBool(); - - if(bs_header_extra_1) { - this.bs_freq_scale = ld.readBits(2); - this.bs_alter_scale = ld.readBool(); - this.bs_noise_bands = ld.readBits(2); - } - else { - /* Default values */ - this.bs_freq_scale = 2; - this.bs_alter_scale = true; - this.bs_noise_bands = 2; - } - - if(bs_header_extra_2) { - this.bs_limiter_bands = ld.readBits(2); - this.bs_limiter_gains = ld.readBits(2); - this.bs_interpol_freq = ld.readBool(); - this.bs_smoothing_mode = ld.readBool(); - } - else { - /* Default values */ - this.bs_limiter_bands = 2; - this.bs_limiter_gains = 2; - this.bs_interpol_freq = true; - this.bs_smoothing_mode = true; - } - - } - - /* table 4 */ - private int sbr_data(BitStream ld) throws AACException { - int result; - - this.rate = (this.bs_samplerate_mode!=0) ? 2 : 1; - - if(stereo) { - if((result = sbr_channel_pair_element(ld))>0) - return result; - } - else { - if((result = sbr_single_channel_element(ld))>0) - return result; - } - - return 0; - } - - /* table 5 */ - private int sbr_single_channel_element(BitStream ld) throws AACException { - int result; - - if(ld.readBool()) { - ld.readBits(4); //reserved - } - - if((result = sbr_grid(ld, 0))>0) - return result; - - sbr_dtdf(ld, 0); - invf_mode(ld, 0); - sbr_envelope(ld, 0); - sbr_noise(ld, 0); - - NoiseEnvelope.dequantChannel(this, 0); - - Arrays.fill(bs_add_harmonic[0], 0, 64, 0); - Arrays.fill(bs_add_harmonic[1], 0, 64, 0); - - this.bs_add_harmonic_flag[0] = ld.readBool(); - if(this.bs_add_harmonic_flag[0]) - sinusoidal_coding(ld, 0); - - this.bs_extended_data = ld.readBool(); - - if(this.bs_extended_data) { - int nr_bits_left; - int ps_ext_read = 0; - int cnt = ld.readBits(4); - if(cnt==15) { - cnt += ld.readBits(8); - } - - nr_bits_left = 8*cnt; - while(nr_bits_left>7) { - int tmp_nr_bits = 0; - - this.bs_extension_id = ld.readBits(2); - tmp_nr_bits += 2; - - /* allow only 1 PS extension element per extension data */ - if(this.bs_extension_id==EXTENSION_ID_PS) { - if(ps_ext_read==0) { - ps_ext_read = 1; - } - else { - /* to be safe make it 3, will switch to "default" - * in sbr_extension() */ - this.bs_extension_id = 3; - } - } - - tmp_nr_bits += sbr_extension(ld, this.bs_extension_id, nr_bits_left); - - /* check if the data read is bigger than the number of available bits */ - if(tmp_nr_bits>nr_bits_left) - return 1; - - nr_bits_left -= tmp_nr_bits; - } - - /* Corrigendum */ - if(nr_bits_left>0) { - ld.readBits(nr_bits_left); - } - } - - return 0; - } - - /* table 6 */ - private int sbr_channel_pair_element(BitStream ld) throws AACException { - int n, result; - - if(ld.readBool()) { - //reserved - ld.readBits(4); - ld.readBits(4); - } - - this.bs_coupling = ld.readBool(); - - if(this.bs_coupling) { - if((result = sbr_grid(ld, 0))>0) - return result; - - /* need to copy some data from left to right */ - this.bs_frame_class[1] = this.bs_frame_class[0]; - this.L_E[1] = this.L_E[0]; - this.L_Q[1] = this.L_Q[0]; - this.bs_pointer[1] = this.bs_pointer[0]; - - for(n = 0; n<=this.L_E[0]; n++) { - this.t_E[1][n] = this.t_E[0][n]; - this.f[1][n] = this.f[0][n]; - } - for(n = 0; n<=this.L_Q[0]; n++) { - this.t_Q[1][n] = this.t_Q[0][n]; - } - - sbr_dtdf(ld, 0); - sbr_dtdf(ld, 1); - invf_mode(ld, 0); - - /* more copying */ - for(n = 0; n0) - return result; - if((result = sbr_grid(ld, 1))>0) { - /* restore first channel data as well */ - this.bs_frame_class[0] = saved_frame_class; - this.L_E[0] = saved_L_E; - this.L_Q[0] = saved_L_Q; - for(n = 0; n<6; n++) { - this.t_E[0][n] = saved_t_E[n]; - } - for(n = 0; n<3; n++) { - this.t_Q[0][n] = saved_t_Q[n]; - } - - return result; - } - sbr_dtdf(ld, 0); - sbr_dtdf(ld, 1); - invf_mode(ld, 0); - invf_mode(ld, 1); - sbr_envelope(ld, 0); - sbr_envelope(ld, 1); - sbr_noise(ld, 0); - sbr_noise(ld, 1); - - Arrays.fill(bs_add_harmonic[0], 0, 64, 0); - Arrays.fill(bs_add_harmonic[1], 0, 64, 0); - - this.bs_add_harmonic_flag[0] = ld.readBool(); - if(this.bs_add_harmonic_flag[0]) - sinusoidal_coding(ld, 0); - - this.bs_add_harmonic_flag[1] = ld.readBool(); - if(this.bs_add_harmonic_flag[1]) - sinusoidal_coding(ld, 1); - } - NoiseEnvelope.dequantChannel(this, 0); - NoiseEnvelope.dequantChannel(this, 1); - - if(this.bs_coupling) - NoiseEnvelope.unmap(this); - - this.bs_extended_data = ld.readBool(); - if(this.bs_extended_data) { - int nr_bits_left; - int cnt = ld.readBits(4); - if(cnt==15) { - cnt += ld.readBits(8); - } - - nr_bits_left = 8*cnt; - while(nr_bits_left>7) { - int tmp_nr_bits = 0; - - this.bs_extension_id = ld.readBits(2); - tmp_nr_bits += 2; - tmp_nr_bits += sbr_extension(ld, this.bs_extension_id, nr_bits_left); - - /* check if the data read is bigger than the number of available bits */ - if(tmp_nr_bits>nr_bits_left) - return 1; - - nr_bits_left -= tmp_nr_bits; - } - - /* Corrigendum */ - if(nr_bits_left>0) { - ld.readBits(nr_bits_left); - } - } - - return 0; - } - - /* integer log[2](x): input range [0,10) */ - private int sbr_log2(int val) { - int log2tab[] = {0, 0, 1, 2, 2, 3, 3, 3, 3, 4}; - if(val<10&&val>=0) - return log2tab[val]; - else - return 0; - } - - - /* table 7 */ - private int sbr_grid(BitStream ld, int ch) throws AACException { - int i, env, rel, result; - int bs_abs_bord, bs_abs_bord_1; - int bs_num_env = 0; - int saved_L_E = this.L_E[ch]; - int saved_L_Q = this.L_Q[ch]; - int saved_frame_class = this.bs_frame_class[ch]; - - this.bs_frame_class[ch] = ld.readBits(2); - - switch(this.bs_frame_class[ch]) { - case FIXFIX: - i = ld.readBits(2); - - bs_num_env = Math.min(1<1) - this.L_Q[ch] = 2; - else - this.L_Q[ch] = 1; - - /* TODO: this code can probably be integrated into the code above! */ - if((result = TFGrid.envelope_time_border_vector(this, ch))>0) { - this.bs_frame_class[ch] = saved_frame_class; - this.L_E[ch] = saved_L_E; - this.L_Q[ch] = saved_L_Q; - return result; - } - TFGrid.noise_floor_time_border_vector(this, ch); - - return 0; - } - - /* table 8 */ - private void sbr_dtdf(BitStream ld, int ch) throws AACException { - int i; - - for(i = 0; i=0) { - bit = ld.readBit(); - index = t_huff[index][bit]; - } - - return index+64; - } - - private int sbr_save_prev_data(int ch) { - int i; - - /* save data for next frame */ - this.kx_prev = this.kx; - this.M_prev = this.M; - this.bsco_prev = this.bsco; - - this.L_E_prev[ch] = this.L_E[ch]; - - /* sbr.L_E[ch] can become 0 on files with bit errors */ - if(this.L_E[ch]<=0) - return 19; - - this.f_prev[ch] = this.f[ch][this.L_E[ch]-1]; - for(i = 0; i0) { - dont_process = true; - } - } - - if(this.just_seeked||dont_process) { - for(l = 0; l= 48000) { + if ((k2 - this.k0) > 32) + result += 1; + } else if (this.sample_rate.getFrequency() <= 32000) { + if ((k2 - this.k0) > 48) + result += 1; + } else { /* (sbr.sample_rate == 44100) */ + + if ((k2 - this.k0) > 45) + result += 1; + } + + if (hdr.bs_freq_scale == 0) { + result += FBT.master_frequency_table_fs0(this, this.k0, k2, hdr.bs_alter_scale); + } else { + result += FBT.master_frequency_table(this, this.k0, k2, hdr.bs_freq_scale, hdr.bs_alter_scale); + } + result += FBT.derived_frequency_table(this, hdr.bs_xover_band, k2); + + result = (result > 0) ? 1 : 0; + + return result; + } + + /* table 2 */ + public void decode(BitStream ld, boolean crc) { + + if (crc) { + this.bs_sbr_crc_bits = ld.readBits(10); + } else + this.bs_sbr_crc_bits = -1; + + reset = readHeader(ld); + + if (reset) { + int rt = calc_sbr_tables(this.hdr); + + /* if an error occurred with the new header values revert to the old ones */ + if (rt > 0) { + calc_sbr_tables(swapHeaders()); + } + } + + if (this.hdr != null) { + int result = sbr_data(ld); + + valid = (result == 0); + } else + valid = true; + } + + /** + * Save current header and return the previously saved header. + * + * @return the saved header. + */ + private Header swapHeaders() { + + // save current header and recycle old one (if exists) + Header hdr = this.hdr_saved; + this.hdr_saved = this.hdr; + + if (hdr == null) + hdr = new Header(); + this.hdr = hdr; + + return hdr; + } + + /** + * Read a new header and return if the header parameter changed. + * See: 5.3.1 Decoding process. + * + * @param ld input data. + * @return true if relevant parameters changed. + */ + private boolean readHeader(BitStream ld) { + boolean bs_header_flag = ld.readBool(); + + if (bs_header_flag) { + Header hdr = swapHeaders(); + hdr.decode(ld); + return hdr.differs(hdr_saved); + } else + return false; + } + + abstract protected int sbr_data(BitStream ld); + + public abstract void process(float[] left_chan, float[] right_chan); + + protected void readExtendedData(BitStream ld) { + boolean bs_extended_data = ld.readBool(); + if (bs_extended_data) { + + int cnt = ld.readBits(4); + if (cnt == 15) { + cnt += ld.readBits(8); + } + + ld = ld.readSubStream(8 * cnt); + while (ld.getBitsLeft() > 7) { + int bs_extension_id = ld.readBits(2); + sbr_extension(ld, bs_extension_id); + } + } + } + + protected void sbr_extension(BitStream ld, int bs_extension_id) { + + } + + /* table 12 */ + protected void sinusoidal_coding(BitStream ld, Channel ch) { + + for (int n = 0; n < this.N_high; n++) { + ch.bs_add_harmonic[n] = ld.readBit(); + } + } + + protected void sbr_save_prev_data(Channel ch) { + + /* save data for next frame */ + this.kx_prev = this.kx; + this.M_prev = this.M; + this.bsco_prev = this.bsco; + + ch.L_E_prev = ch.L_E; + + /* sbr.L_E[ch] can become 0 on files with bit errors */ + if (ch.L_E <= 0) + throw new AACException("L_E<0"); + + ch.f_prev = ch.f[ch.L_E - 1]; + for (int i = 0; i < MAX_M; i++) { + ch.E_prev[i] = ch.E[i][ch.L_E - 1]; + ch.Q_prev[i] = ch.Q[i][ch.L_Q - 1]; + } + + System.arraycopy(ch.bs_add_harmonic, 0, ch.bs_add_harmonic_prev, 0, MAX_M); + ch.bs_add_harmonic_flag_prev = ch.bs_add_harmonic_flag; + + if (ch.l_A == ch.L_E) + ch.prevEnvIsShort = 0; + else + ch.prevEnvIsShort = -1; + } + + protected void sbr_save_matrix(Channel ch) { + + for (int i = 0; i < this.tHFGen; i++) { + for (int j = 0; j < 64; j++) { + ch.Xsbr[i][j][0] = ch.Xsbr[i + numTimeSlotsRate][j][0]; + ch.Xsbr[i][j][1] = ch.Xsbr[i + numTimeSlotsRate][j][1]; + } + } + for (int i = this.tHFGen; i < Channel.MAX_NTSRHFG; i++) { + for (int j = 0; j < 64; j++) { + ch.Xsbr[i][j][0] = 0; + ch.Xsbr[i][j][1] = 0; + } + } + } + + public static void upsample(float[] data) { + + for (int i = data.length / 2 - 1; i > 0; --i) { + float v = data[i]; + data[2 * i] = v; + data[2 * i + 1] = v; + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/SBR1.java b/src/main/java/net/sourceforge/jaad/aac/sbr/SBR1.java new file mode 100644 index 00000000..f4903a5d --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/SBR1.java @@ -0,0 +1,140 @@ +package net.sourceforge.jaad.aac.sbr; + +import net.sourceforge.jaad.aac.DecoderConfig; +import net.sourceforge.jaad.aac.syntax.BitStream; + +import java.util.Arrays; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 13.05.21 + * Time: 19:12 + */ +public class SBR1 extends SBR { + + static final int EXTENSION_ID_PS = 2; + + final Channel ch0; + + final SynthesisFilterbank qmfs0; + SynthesisFilterbank qmfs1; + + PS ps; + + public SBR1(DecoderConfig config) { + super(config); + + ch0 = new Channel(this); + qmfs0 = openFilterbank(); + } + + + /* table 5 */ + protected int sbr_data(BitStream ld) { + int result; + + if(ld.readBool()) { + ld.readBits(4); //reserved + } + + if((result = ch0.sbr_grid(ld))>0) + return result; + + ch0.sbr_dtdf(ld); + ch0.invf_mode(ld); + ch0.sbr_envelope(ld,false); + ch0.sbr_noise(ld,false); + + NoiseEnvelope.dequantChannel(this, ch0); + + Arrays.fill(ch0.bs_add_harmonic, 0, 64, 0); + + ch0.bs_add_harmonic_flag = ld.readBool(); + if(ch0.bs_add_harmonic_flag) + sinusoidal_coding(ld, ch0); + + readExtendedData(ld); + + return 0; + } + + protected void sbr_extension(BitStream ld, int bs_extension_id) { + if(bs_extension_id==EXTENSION_ID_PS && config.isPSEnabled()) { + if(ps==null) { + this.ps = config.openPS(this); + this.qmfs1 = openFilterbank(); + } + + ps.decode(ld); + + } else + super.sbr_extension(ld, bs_extension_id); + } + + public void process(float[] left_chan, float[] right_chan) { + if(isPSUsed()) { + processPS(left_chan, right_chan); + } else { + process(left_chan); + System.arraycopy(left_chan, 0, right_chan, 0, right_chan.length); + } + } + + + private void process(float[] channel) { + float[][][] X = new float[MAX_NTSR][64][2]; + + ch0.process_channel(channel, X, this.reset); + + /* subband synthesis */ + qmfs0.synthesis(numTimeSlotsRate, X, channel); + + if(this.hdr!=null) { + sbr_save_prev_data(ch0); + } + + sbr_save_matrix(ch0); + + this.frame++; + } + + private int processPS(float[] left_channel, float[] right_channel) { + int ret = 0; + float[][][] X_left = new float[MAX_NTSR+6][64][2]; + float[][][] X_right = new float[MAX_NTSR+6][64][2]; + + ch0.process_channel(left_channel, X_left, this.reset); + + /* copy some extra data for PS */ + for(int l = this.numTimeSlotsRate; l 0) + return result; + + ch0.sbr_dtdf(ld); + ch1.sbr_dtdf(ld); + ch0.invf_mode(ld); + + /* need to copy some data from left to right */ + ch1.couple(ch0, N_Q); + + ch0.sbr_envelope(ld, false); + ch0.sbr_noise(ld, false); + + ch1.sbr_envelope(ld, this.bs_coupling); + ch1.sbr_noise(ld, this.bs_coupling); + + Arrays.fill(ch0.bs_add_harmonic, 0, 64, 0); + Arrays.fill(ch1.bs_add_harmonic, 0, 64, 0); + + ch0.bs_add_harmonic_flag = ld.readBool(); + if (ch0.bs_add_harmonic_flag) + sinusoidal_coding(ld, ch0); + + ch1.bs_add_harmonic_flag = ld.readBool(); + if (ch1.bs_add_harmonic_flag) + sinusoidal_coding(ld, ch1); + } else { + int[] saved_t_E = new int[6], saved_t_Q = new int[3]; + int saved_L_E = ch0.L_E; + int saved_L_Q = ch0.L_Q; + FrameClass saved_frame_class = ch0.bs_frame_class; + + for (int n = 0; n < saved_L_E; n++) { + saved_t_E[n] = ch0.t_E[n]; + } + for (int n = 0; n < saved_L_Q; n++) { + saved_t_Q[n] = ch0.t_Q[n]; + } + + if ((result = ch0.sbr_grid(ld)) > 0) + return result; + + if ((result = ch1.sbr_grid(ld)) > 0) { + /* restore first channel data as well */ + ch0.bs_frame_class = saved_frame_class; + ch0.L_E = saved_L_E; + ch0.L_Q = saved_L_Q; + for (int n = 0; n < 6; n++) { + ch0.t_E[n] = saved_t_E[n]; + } + for (int n = 0; n < 3; n++) { + ch0.t_Q[n] = saved_t_Q[n]; + } + + return result; + } + ch0.sbr_dtdf(ld); + ch1.sbr_dtdf(ld); + ch0.invf_mode(ld); + ch1.invf_mode(ld); + ch0.sbr_envelope(ld, false); + ch1.sbr_envelope(ld, false); + ch0.sbr_noise(ld, this.bs_coupling); + ch1.sbr_noise(ld, this.bs_coupling); + + Arrays.fill(ch0.bs_add_harmonic, 0, 64, 0); + Arrays.fill(ch1.bs_add_harmonic, 0, 64, 0); + + ch0.bs_add_harmonic_flag = ld.readBool(); + if (ch0.bs_add_harmonic_flag) + sinusoidal_coding(ld, ch0); + + ch1.bs_add_harmonic_flag = ld.readBool(); + if (ch1.bs_add_harmonic_flag) + sinusoidal_coding(ld, ch1); + } + + if (!this.bs_coupling) { + NoiseEnvelope.dequantChannel(this, ch0); + NoiseEnvelope.dequantChannel(this, ch1); + } else { + NoiseEnvelope.unmap(this); + } + + readExtendedData(ld); + + return 0; + } + + public void process(float[] left_chan, float[] right_chan) { + float[][][] X = new float[MAX_NTSR][64][2]; + + ch0.process_channel(left_chan, X, this.reset); + /* subband synthesis */ + qmfs0.synthesis(numTimeSlotsRate, X, left_chan); + + ch1.process_channel(right_chan, X, false); + /* subband synthesis */ + qmfs1.synthesis(numTimeSlotsRate, X, right_chan); + + if (this.hdr != null) { + sbr_save_prev_data(ch0); + sbr_save_prev_data(ch1); + } + + sbr_save_matrix(ch0); + sbr_save_matrix(ch1); + + this.frame++; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/sbr/SynthesisFilterbank.java b/src/main/java/net/sourceforge/jaad/aac/sbr/SynthesisFilterbank.java index be4eeb62..07a8629b 100644 --- a/src/main/java/net/sourceforge/jaad/aac/sbr/SynthesisFilterbank.java +++ b/src/main/java/net/sourceforge/jaad/aac/sbr/SynthesisFilterbank.java @@ -2,1031 +2,12 @@ import java.util.Arrays; -class SynthesisFilterbank implements FilterbankTable { - private static final float[][] qmf32_pre_twiddle = { - {0.999924701839145f, -0.012271538285720f}, - {0.999322384588350f, -0.036807222941359f}, - {0.998118112900149f, -0.061320736302209f}, - {0.996312612182778f, -0.085797312344440f}, - {0.993906970002356f, -0.110222207293883f}, - {0.990902635427780f, -0.134580708507126f}, - {0.987301418157858f, -0.158858143333861f}, - {0.983105487431216f, -0.183039887955141f}, - {0.978317370719628f, -0.207111376192219f}, - {0.972939952205560f, -0.231058108280671f}, - {0.966976471044852f, -0.254865659604515f}, - {0.960430519415566f, -0.278519689385053f}, - {0.953306040354194f, -0.302005949319228f}, - {0.945607325380521f, -0.325310292162263f}, - {0.937339011912575f, -0.348418680249435f}, - {0.928506080473216f, -0.371317193951838f}, - {0.919113851690058f, -0.393992040061048f}, - {0.909167983090522f, -0.416429560097637f}, - {0.898674465693954f, -0.438616238538528f}, - {0.887639620402854f, -0.460538710958240f}, - {0.876070094195407f, -0.482183772079123f}, - {0.863972856121587f, -0.503538383725718f}, - {0.851355193105265f, -0.524589682678469f}, - {0.838224705554838f, -0.545324988422046f}, - {0.824589302785025f, -0.565731810783613f}, - {0.810457198252595f, -0.585797857456439f}, - {0.795836904608884f, -0.605511041404326f}, - {0.780737228572094f, -0.624859488142386f}, - {0.765167265622459f, -0.643831542889791f}, - {0.749136394523459f, -0.662415777590172f}, - {0.732654271672413f, -0.680600997795453f}, - {0.715730825283819f, -0.698376249408973f} - }; +abstract class SynthesisFilterbank extends Filterbank { - private float[] v; //double ringbuffer - private int v_index; //ringbuffer index - private final int channels; - - public SynthesisFilterbank(int channels) { - this.channels = channels; - v = new float[2*channels*20]; - v_index = 0; - } - - public void reset() { - Arrays.fill(v, 0); - } - - void sbr_qmf_synthesis_32(SBR sbr, float[][][] X, - float[] output) { - float[] x1 = new float[32], x2 = new float[32]; - float scale = 1.f/64.f; - int n, k, out = 0; - int l; - - - /* qmf subsample l */ - for(l = 0; l1) { - int i = sbr.L_E[ch]; - border = sbr.abs_bord_trail[ch]; - - for(l = 0; l<(sbr.L_E[ch]-1); l++) { - if(border1) { - int i = 1; - border = sbr.abs_bord_lead[ch]; - - for(l = 0; l<(sbr.L_E[ch]-1); l++) { - border += sbr.bs_rel_bord[ch][l]; - - if(sbr.rate*border+sbr.tHFAdj>sbr.numTimeSlotsRate+sbr.tHFGen) - return 1; - - t_E_temp[i++] = sbr.rate*border; - } - } - break; - - case VARVAR: - if(sbr.bs_num_rel_0[ch]!=0) { - int i = 1; - border = sbr.abs_bord_lead[ch]; - - for(l = 0; lsbr.numTimeSlotsRate+sbr.tHFGen) - return 1; - - t_E_temp[i++] = sbr.rate*border; - } - } - - if(sbr.bs_num_rel_1[ch]!=0) { - int i = sbr.L_E[ch]; - border = sbr.abs_bord_trail[ch]; - - for(l = 0; l1) - retval = sbr.L_E[ch]+1-sbr.bs_pointer[ch]; - else - retval = sbr.L_E[ch]-1; - break; - } - - return (retval>0) ? retval : 0; - } - -} diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/BitStream.java b/src/main/java/net/sourceforge/jaad/aac/syntax/BitStream.java index d8050e14..eb71b208 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/BitStream.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/BitStream.java @@ -1,176 +1,48 @@ package net.sourceforge.jaad.aac.syntax; -import net.sourceforge.jaad.aac.AACException; - -public class BitStream { - - private static final int WORD_BITS = 32; - private static final int WORD_BYTES = 4; - private static final int BYTE_MASK = 0xff; - private byte[] buffer; - private int pos; //offset in the buffer array - private int cache; //current 4 bytes, that are read from the buffer - protected int bitsCached; //remaining bits in current cache - protected int position; //number of total bits read - - public BitStream() { - } - - public BitStream(byte[] data) { - setData(data); - } - - public void destroy() { - reset(); - buffer = null; - } - - public final void setData(byte[] data) { - //make the buffer size an integer number of words - final int size = WORD_BYTES*((data.length+WORD_BYTES-1)/WORD_BYTES); - //only reallocate if needed - if(buffer==null||buffer.length!=size) buffer = new byte[size]; - System.arraycopy(data, 0, buffer, 0, data.length); - reset(); - } - - public void byteAlign() throws AACException { - final int toFlush = bitsCached&7; - if(toFlush>0) skipBits(toFlush); - } - - public final void reset() { - pos = 0; - bitsCached = 0; - cache = 0; - position = 0; - } - - public int getPosition() { - return position; - } - - public int getBitsLeft() { - return 8*(buffer.length-pos)+bitsCached; - } - - /** - * Reads the next four bytes. - * @param peek if true, the stream pointer will not be increased - */ - protected int readCache(boolean peek) throws AACException { - int i; - if(pos>buffer.length-WORD_BYTES) throw new AACException("end of stream", true); - else i = ((buffer[pos]&BYTE_MASK)<<24) - |((buffer[pos+1]&BYTE_MASK)<<16) - |((buffer[pos+2]&BYTE_MASK)<<8) - |(buffer[pos+3]&BYTE_MASK); - if(!peek) pos += WORD_BYTES; - return i; - } - - public int readBits(int n) throws AACException { - int result; - if(bitsCached>=n) { - bitsCached -= n; - result = (cache>>bitsCached)&maskBits(n); - position += n; - } - else { - position += n; - final int c = cache&maskBits(bitsCached); - final int left = n-bitsCached; - cache = readCache(false); - bitsCached = WORD_BITS-left; - result = ((cache>>bitsCached)&maskBits(left))|(c<0) { - bitsCached--; - i = (cache>>(bitsCached))&1; - position++; - } - else { - cache = readCache(false); - bitsCached = WORD_BITS-1; - position++; - i = (cache>>bitsCached)&1; - } - return i; - } - - public boolean readBool() throws AACException { - return (readBit()&0x1)!=0; - } - - public int peekBits(int n) throws AACException { - int ret; - if(bitsCached>=n) { - ret = (cache>>(bitsCached-n))&maskBits(n); - } - else { - //old cache - final int c = cache&maskBits(bitsCached); - n -= bitsCached; - //read next & combine - ret = ((readCache(true)>>WORD_BITS-n)&maskBits(n))|(c<0) { - ret = (cache>>(bitsCached-1))&1; - } - else { - final int word = readCache(true); - ret = (word>>WORD_BITS-1)&1; - } - return ret; - } - - public void skipBits(int n) throws AACException { - position += n; - if(n<=bitsCached) { - bitsCached -= n; - } - else { - n -= bitsCached; - while(n>=WORD_BITS) { - n -= WORD_BITS; - readCache(false); - } - if(n>0) { - cache = readCache(false); - bitsCached = WORD_BITS-n; - } - else { - cache = 0; - bitsCached = 0; - } - } - } - - public void skipBit() throws AACException { - position++; - if(bitsCached>0) { - bitsCached--; - } - else { - cache = readCache(false); - bitsCached = WORD_BITS-1; - } - } - - public int maskBits(int n) { - int i; - if(n==32) i = -1; - else i = (1< 8) + throw new IllegalArgumentException(); + + return (byte) readBits(n); + } + + default short readShort(int n) { + if (n > 16) + throw new IllegalArgumentException(); + + return (short) readBits(n); + } + + int readBit(); + + boolean readBool(); + + int peekBits(int n); + + void skipBits(int n); + + void skipBit(); + + void byteAlign(); + + BitStream readSubStream(int n); + + static BitStream open(byte[] data) { + return new ByteArrayBitStream(data); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/ByteArrayBitStream.java b/src/main/java/net/sourceforge/jaad/aac/syntax/ByteArrayBitStream.java new file mode 100644 index 00000000..89f09e28 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/ByteArrayBitStream.java @@ -0,0 +1,274 @@ +package net.sourceforge.jaad.aac.syntax; + +import java.util.logging.Level; +import java.util.logging.Logger; + +import net.sourceforge.jaad.aac.EOSException; + + +public class ByteArrayBitStream implements BitStream { + + static final Logger LOGGER = Logger.getLogger(ByteArrayBitStream.class.getName()); + + private static final int WORD_BITS = 32; + private static final int WORD_BYTES = 4; + private static final int BYTE_MASK = 0xff; + + private byte[] buffer; + /** # of bits in buffer */ + private int length; + /** offset in the buffer array */ + private int pos; + /** current 4 bytes, that are read from the buffer */ + private int cache; + /** remaining bits in current cache */ + protected int bitsCached; + /** number of total bits read */ + protected int position; + + public String toString() { + if (buffer == null) + return "[]"; + else + return String.format("[%d;%d]", getPosition(), length); + } + + ByteArrayBitStream() { + } + + /** + * Clone a subset of another BitStream + * + * @param other BitStream + * @param size of this sub stream + */ + ByteArrayBitStream(ByteArrayBitStream other, int size) { + + if (other.getBitsLeft() < size) throw new EOSException("stream overrun"); + + this.length = other.position + size; + this.buffer = other.buffer; + this.pos = other.pos; + this.cache = other.cache; + this.bitsCached = other.bitsCached; + this.position = other.position; + + other.skipBits(size); + } + + ByteArrayBitStream(byte[] data) { + setData(data); + } + + public void destroy() { + reset(); + buffer = null; + } + + public final void setData(byte[] data) { + reset(); + + int size = data.length; + this.length = 8 * size; + + // reduce the buffer size to an integer number of words + int shift = size % WORD_BYTES; + + // push leading bytes to cache + bitsCached = 8 * shift; + + for (int i = 0; i < shift; ++i) { + byte c = data[i]; + cache <<= 8; + cache |= 0xff & c; + } + + size -= shift; + + // only reallocate if needed + if (buffer == null || buffer.length != size) + buffer = new byte[size]; + + System.arraycopy(data, shift, buffer, 0, buffer.length); + } + + @Override + public BitStream readSubStream(int n) { + if (getBitsLeft() < n) + throw new EOSException("stream overrun"); + + return new ByteArrayBitStream(this, n); + } + + public void byteAlign() { + LOGGER.log(Level.FINER, "@%d byteAlign: %d", position); + int toFlush = bitsCached & 7; + if (toFlush > 0) + skipBits(toFlush); + } + + public final void reset() { + pos = 0; + length = 0; + bitsCached = 0; + cache = 0; + position = 0; + } + + public int getPosition() { + return position; + } + + public int getBitsLeft() { + return length - position; + } + + /** + * Reads the next four bytes. + * + * @param peek if true, the stream pointer will not be increased + */ + protected int readCache(boolean peek) { + int i; + if (pos > buffer.length - WORD_BYTES) + throw new EOSException("end of stream"); + + else i = ((buffer[pos] & BYTE_MASK) << 24) + | ((buffer[pos + 1] & BYTE_MASK) << 16) + | ((buffer[pos + 2] & BYTE_MASK) << 8) + | (buffer[pos + 3] & BYTE_MASK); + if (!peek) + pos += WORD_BYTES; + return i; + } + + public int readBits(int n) { + LOGGER.log(n == 0 ? Level.FINEST : Level.FINER, "@%d readBits: %d", n); + + if (getBitsLeft() < n) + throw new EOSException("stream overrun"); + + int result; + if (bitsCached >= n) { + bitsCached -= n; + result = (cache >> bitsCached) & maskBits(n); + position += n; + } else { + position += n; + int c = cache & maskBits(bitsCached); + int left = n - bitsCached; + cache = readCache(false); + bitsCached = WORD_BITS - left; + result = ((cache >> bitsCached) & maskBits(left)) | (c << left); + } + return result; + } + + public int readBit() { + LOGGER.log(Level.FINER, "@%d readBit: %d", 1); + + if (getBitsLeft() < 1) + throw new EOSException("stream overrun"); + + int i; + if (bitsCached > 0) { + bitsCached--; + i = (cache >> (bitsCached)) & 1; + } else { + cache = readCache(false); + bitsCached = WORD_BITS - 1; + i = (cache >> bitsCached) & 1; + } + + position++; + return i; + } + + public boolean readBool() { + return (readBit() & 0x1) != 0; + } + + public int peekBits(int n) { + LOGGER.log(Level.FINER, "@%d peekBits: %d", n); + + if (getBitsLeft() < n) + throw new EOSException("stream overrun"); + + int ret; + if (bitsCached >= n) { + ret = (cache >> (bitsCached - n)) & maskBits(n); + } else { + //old cache + int c = cache & maskBits(bitsCached); + n -= bitsCached; + //read next & combine + ret = ((readCache(true) >> WORD_BITS - n) & maskBits(n)) | (c << n); + } + return ret; + } + + public int peekBit() { + LOGGER.log(Level.FINER, "@%d peekBit: %d", 1); + + if (getBitsLeft() < 1) + throw new EOSException("stream overrun"); + + int ret; + if (bitsCached > 0) { + ret = (cache >> (bitsCached - 1)) & 1; + } else { + int word = readCache(true); + ret = (word >> WORD_BITS - 1) & 1; + } + return ret; + } + + public void skipBits(int n) { + LOGGER.log(Level.FINER, "@%d skipBits: %d", n); + + if (getBitsLeft() < n) + throw new EOSException("stream overrun"); + + position += n; + if (n <= bitsCached) { + bitsCached -= n; + } else { + n -= bitsCached; + while (n >= WORD_BITS) { + n -= WORD_BITS; + readCache(false); + } + if (n > 0) { + cache = readCache(false); + bitsCached = WORD_BITS - n; + } else { + cache = 0; + bitsCached = 0; + } + } + } + + public void skipBit() { + LOGGER.log(Level.FINER, "@%d skipBit: %d", 1); + + if (getBitsLeft() < 1) + throw new EOSException("end of stream"); + + position++; + if (bitsCached > 0) { + bitsCached--; + } else { + cache = readCache(false); + bitsCached = WORD_BITS - 1; + } + } + + public static int maskBits(int n) { + int i; + if (n == 32) + i = -1; + else + i = (1 << n) - 1; + return i; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/CCE.java b/src/main/java/net/sourceforge/jaad/aac/syntax/CCE.java index 738653f2..a605c8dd 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/CCE.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/CCE.java @@ -1,163 +1,203 @@ package net.sourceforge.jaad.aac.syntax; +import java.util.List; + import net.sourceforge.jaad.aac.AACException; import net.sourceforge.jaad.aac.DecoderConfig; import net.sourceforge.jaad.aac.huffman.HCB; import net.sourceforge.jaad.aac.huffman.Huffman; -class CCE extends Element implements Constants { - - public static final int BEFORE_TNS = 0; - public static final int AFTER_TNS = 1; - public static final int AFTER_IMDCT = 2; - private static final float[] CCE_SCALE = { - 1.09050773266525765921f, - 1.18920711500272106672f, - 1.4142135623730950488016887f, - 2f}; - private final ICStream ics; - private float[] iqData; - private int couplingPoint; - private int coupledCount; - private final boolean[] channelPair; - private final int[] idSelect; - private final int[] chSelect; - /*[0] shared list of gains; [1] list of gains for right channel; - *[2] list of gains for left channel; [3] lists of gains for both channels - */ - private final float[][] gain; - - CCE(int frameLength) { - super(); - ics = new ICStream(frameLength); - channelPair = new boolean[8]; - idSelect = new int[8]; - chSelect = new int[8]; - gain = new float[16][120]; - } - - int getCouplingPoint() { - return couplingPoint; - } - - int getCoupledCount() { - return coupledCount; - } - - boolean isChannelPair(int index) { - return channelPair[index]; - } - - int getIDSelect(int index) { - return idSelect[index]; - } - - int getCHSelect(int index) { - return chSelect[index]; - } - - void decode(BitStream in, DecoderConfig conf) throws AACException { - couplingPoint = 2*in.readBit(); - coupledCount = in.readBits(3); - int gainCount = 0; - int i; - for(i = 0; i<=coupledCount; i++) { - gainCount++; - channelPair[i] = in.readBool(); - idSelect[i] = in.readBits(4); - if(channelPair[i]) { - chSelect[i] = in.readBits(2); - if(chSelect[i]==3) gainCount++; - } - else chSelect[i] = 2; - } - couplingPoint += in.readBit(); - couplingPoint |= (couplingPoint>>1); - - final boolean sign = in.readBool(); - final double scale = CCE_SCALE[in.readBits(2)]; - - ics.decode(in, false, conf); - final ICSInfo info = ics.getInfo(); - final int windowGroupCount = info.getWindowGroupCount(); - final int maxSFB = info.getMaxSFB(); - //TODO: - final int[][] sfbCB = null;//ics.getSectionData().getSfbCB(); - - for(i = 0; i0) { - cge = couplingPoint==2 ? 1 : in.readBit(); - xg = cge==0 ? 0 : Huffman.decodeScaleFactor(in)-60; - gainCache = (float) Math.pow(scale, -xg); - } - if(couplingPoint==2) gain[i][0] = gainCache; - else { - int sfb; - for(int g = 0; g>= 1; - } - gainCache = (float) (Math.pow(scale, -t)*s); - } - } - gain[i][idx] = gainCache; - } - } - } - } - } - } - - void process() throws AACException { - iqData = ics.getInvQuantData(); - } - - void applyIndependentCoupling(int index, float[] data) { - final double g = gain[index][0]; - for(int i = 0; i=16; + } + + @Override + public Type getType() { + return TYPE; + } + + @Override + public Element newElement(DecoderConfig config) { + return new CCE(config, this); + } + } + + public static final List TAGS = Element.createTagList(32, CCE.Tag::new); + + private final DecoderConfig config; + private final Tag tag; + + @Override + public Tag getElementInstanceTag() { + return tag; + } + + public static final int BEFORE_TNS = 0; + public static final int AFTER_TNS = 1; + public static final int AFTER_IMDCT = 2; + private static final float[] CCE_SCALE = { + 1.09050773266525765921f, + 1.18920711500272106672f, + 1.4142135623730950488016887f, + 2f}; + private final ICStream ics; + private int couplingPoint; + private int coupledCount; + private final boolean[] channelPair; + private final int[] idSelect; + private final int[] chSelect; + /*[0] shared list of gains; [1] list of gains for right channel; + *[2] list of gains for left channel; [3] lists of gains for both channels + */ + private final float[][] gain; + + CCE(DecoderConfig config, Tag tag) { + this.config = config; + this.tag = tag; + + ics = new ICStream(config); + channelPair = new boolean[8]; + idSelect = new int[8]; + chSelect = new int[8]; + gain = new float[16][120]; + } + + int getCouplingPoint() { + return couplingPoint; + } + + int getCoupledCount() { + return coupledCount; + } + + boolean isChannelPair(int index) { + return channelPair[index]; + } + + int getIDSelect(int index) { + return idSelect[index]; + } + + int getCHSelect(int index) { + return chSelect[index]; + } + + public void decode(BitStream in) throws AACException { + couplingPoint = 2 * in.readBit(); + coupledCount = in.readBits(3); + int gainCount = 0; + + for (int i = 0; i <= coupledCount; i++) { + gainCount++; + channelPair[i] = in.readBool(); + idSelect[i] = in.readBits(4); + if (channelPair[i]) { + chSelect[i] = in.readBits(2); + if (chSelect[i] == 3) gainCount++; + } else chSelect[i] = 2; + } + couplingPoint += in.readBit(); + couplingPoint |= (couplingPoint >> 1); + + boolean sign = in.readBool(); + double scale = CCE_SCALE[in.readBits(2)]; + + ics.decode(in, false, config); + ICSInfo info = ics.getInfo(); + int windowGroupCount = info.getWindowGroupCount(); + int maxSFB = info.getMaxSFB(); + + int[] sfbCB = ics.getSfbCB(); + + for (int i = 0; i < gainCount; i++) { + int idx = 0; + int cge = 1; + int xg = 0; + float gainCache = 1.0f; + if (i > 0) { + cge = couplingPoint == 2 ? 1 : in.readBit(); + xg = cge == 0 ? 0 : Huffman.decodeScaleFactor(in) - 60; + gainCache = (float) Math.pow(scale, -xg); + } + if (couplingPoint == 2) gain[i][0] = gainCache; + else { + int sfb; + for (int g = 0; g < windowGroupCount; g++) { + for (sfb = 0; sfb < maxSFB; sfb++, idx++) { + if (sfbCB[sfb] != HCB.ZERO_HCB) { + if (cge == 0) { + int t = Huffman.decodeScaleFactor(in) - 60; + if (t != 0) { + int s = 1; + t = xg += t; + if (!sign) { + s -= 2 * (t & 0x1); + t >>= 1; + } + gainCache = (float) (Math.pow(scale, -t) * s); + } + } + gain[i][idx] = gainCache; + } + } + } + } + } + } + + void process() { + } + + void applyIndependentCoupling(int index, float[] data) { + double g = gain[index][0]; + float[] iqData = ics.getInvQuantData(); + for (int i = 0; i < data.length; i++) { + data[i] += g * iqData[i]; + } + } + + void applyDependentCoupling(int index, float[] data) { + ICSInfo info = ics.getInfo(); + int[] swbOffsets = info.getSWBOffsets(); + int windowGroupCount = info.getWindowGroupCount(); + int maxSFB = info.getMaxSFB(); + int[] sfbCB = ics.getSfbCB(); + float[] iqData = ics.getInvQuantData(); + + int srcOff = 0; + int dstOff = 0; + + int idx = 0; + for (int g = 0; g < windowGroupCount; g++) { + int len = info.getWindowGroupLength(g); + for (int sfb = 0; sfb < maxSFB; sfb++, idx++) { + if (sfbCB[sfb] != HCB.ZERO_HCB) { + float x = gain[index][idx]; + for (int group = 0; group < len; group++) { + for (int k = swbOffsets[sfb]; k < swbOffsets[sfb + 1]; k++) { + data[dstOff + group * 128 + k] += x * iqData[srcOff + group * 128 + k]; + } + } + } + } + dstOff += len * 128; + srcOff += len * 128; + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/CPE.java b/src/main/java/net/sourceforge/jaad/aac/syntax/CPE.java index 3cfa91c6..168e9390 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/CPE.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/CPE.java @@ -1,86 +1,209 @@ package net.sourceforge.jaad.aac.syntax; import java.util.Arrays; +import java.util.List; +import java.util.function.Consumer; +import java.util.logging.Level; +import java.util.logging.Logger; + import net.sourceforge.jaad.aac.AACException; import net.sourceforge.jaad.aac.DecoderConfig; -import net.sourceforge.jaad.aac.Profile; -import net.sourceforge.jaad.aac.SampleFrequency; +import net.sourceforge.jaad.aac.filterbank.FilterBank; +import net.sourceforge.jaad.aac.sbr.SBR; +import net.sourceforge.jaad.aac.sbr.SBR2; +import net.sourceforge.jaad.aac.tools.IS; +import net.sourceforge.jaad.aac.tools.MS; import net.sourceforge.jaad.aac.tools.MSMask; -public class CPE extends Element implements Constants { - - private MSMask msMask; - private boolean[] msUsed; - private boolean commonWindow; - ICStream icsL, icsR; - - CPE(int frameLength) { - super(); - msUsed = new boolean[MAX_MS_MASK]; - 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 TAGS = Element.createTagList(16, Tag::new); + + public static final int MAX_MS_MASK = 128; + + private MSMask msMask; + private boolean[] msUsed; + private boolean commonWindow; + ICStream icsL, icsR; + + public CPE(DecoderConfig config, ChannelTag tag) { + super(config, tag); + msUsed = new boolean[MAX_MS_MASK]; + icsL = new ICStream(config); + icsR = new ICStream(config); + } + + public boolean isChannelPair() { + return true; + } + + public boolean isStereo() { + return true; + } + + protected SBR openSBR() { + return new SBR2(config); + } + + public void decode(BitStream in) { + super.decode(in); + + commonWindow = in.readBool(); + ICSInfo infoL = icsL.getInfo(); + ICSInfo infoR = icsR.getInfo(); + + LOGGER.log(Level.FINE, ()->String.format("CPE %s", commonWindow? "common":"")); + + if (commonWindow) { + infoL.decode(in, commonWindow); + infoR.setCommonData(in, infoL); + + msMask = MSMask.forInt(in.readBits(2)); + if(msMask.equals(MSMask.TYPE_USED)) { + int maxSFB = infoL.getMaxSFB(); + int windowGroupCount = infoL.getWindowGroupCount(); + + for(int idx = 0; idx cces, Consumer target) { + + float[] dataL = getDataL(); + float[] dataR = getDataR(); + + // inverse quantization + float[] iqDataL = icsL.getInvQuantData(); + float[] iqDataR = icsR.getInvQuantData(); + + // MS + if (isCommonWindow() & isMSMaskPresent()) + MS.process(this, iqDataL, iqDataR); + + // prediction + icsL.processICP(); + icsR.processICP(); + + // IS + IS.process(this, iqDataL, iqDataR); + + icsL.processLTP(filterBank); + icsR.processLTP(filterBank); + + // dependent coupling + processDependentCoupling(cces, CCE.BEFORE_TNS, iqDataL, iqDataR); + + icsL.processTNS(); + icsR.processTNS(); + + //dependent coupling + processDependentCoupling(cces, CCE.AFTER_TNS, iqDataL, iqDataR); + + // filterbank + icsL.process(dataL, filterBank); + icsR.process(dataR, filterBank); + + icsL.updateLTP(dataL); + icsR.updateLTP(dataR); + + // independent coupling + processIndependentCoupling(cces, dataL, dataR); + + // gain control + icsL.processGainControl(); + icsR.processGainControl(); + + // SBR + if (isSBRPresent() && config.isSBREnabled()) { + if (dataL.length == config.getFrameLength()) + LOGGER.log(Level.WARNING, "SBR data present, but buffer has normal size!"); + + getSBR().process(dataL, dataR); + } else if (dataL.length != config.getFrameLength()) { + SBR.upsample(dataL); + SBR.upsample(dataR); + } + + target.accept(dataL); + target.accept(dataR); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/ChannelElement.java b/src/main/java/net/sourceforge/jaad/aac/syntax/ChannelElement.java new file mode 100644 index 00000000..86f2e72c --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/ChannelElement.java @@ -0,0 +1,157 @@ +package net.sourceforge.jaad.aac.syntax; + +import net.sourceforge.jaad.aac.DecoderConfig; +import net.sourceforge.jaad.aac.filterbank.FilterBank; +import net.sourceforge.jaad.aac.sbr.SBR; + +import java.util.List; +import java.util.function.Consumer; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 16.04.19 + * Time: 16:55 + */ +public abstract class ChannelElement implements Element { + + abstract static class ChannelTag extends InstanceTag { + + protected ChannelTag(int id) { + super(id); + } + + abstract public boolean isChannelPair(); + + @Override + abstract public ChannelElement newElement(DecoderConfig config); + } + + protected final DecoderConfig config; + + protected final ChannelTag tag; + + protected ChannelElement(DecoderConfig config, ChannelTag tag) { + this.config = config; + this.tag = tag; + } + + public ChannelTag getElementInstanceTag() { + return tag; + } + + /** + * @return if this element represents a channel pair. + */ + abstract public boolean isChannelPair(); + + /** + * A single channel may produce stereo using parametric stereo. + * @return if this stereo. + */ + abstract public boolean isStereo(); + + protected SBR sbr; + + public void decode(BitStream in) { + if(sbr!=null) + sbr.invalidate(); + } + + abstract protected SBR openSBR(); + + void decodeSBR(BitStream in, boolean crc) { + + if(!config.isSBREnabled()) { + return; + } + + if(sbr==null) + sbr = openSBR(); + + if(sbr!=null) + sbr.decode(in, crc); + } + + boolean isSBRPresent() { + return sbr!=null && sbr.isValid(); + } + + SBR getSBR() { + return sbr; + } + + private float[] dataL, dataR; + + private float[] newData() { + int len = config.getSampleLength(); + return new float[len]; + } + + public float[] getDataL() { + if(dataL==null) + dataL = newData(); + return dataL; + } + + public float[] getDataR() { + if(dataR==null) + dataR = newData(); + return dataR; + } + + abstract public void process(FilterBank filterBank, List cces, Consumer target); + + void processDependentCoupling(List cces, int couplingPoint, float[] dataL, float[] dataR) { + + int elementID = getElementInstanceTag().getId(); + + for (CCE cce : cces) { + int index = 0; + if(cce!=null&&cce.getCouplingPoint()==couplingPoint) { + for(int c = 0; c<=cce.getCoupledCount(); c++) { + int chSelect = cce.getCHSelect(c); + if(cce.isChannelPair(c)==isChannelPair()&&cce.getIDSelect(c)==elementID) { + if(chSelect!=1) { + cce.applyDependentCoupling(index, dataL); + if(chSelect!=0) + index++; + } + if(chSelect!=2) { + cce.applyDependentCoupling(index, dataR); + index++; + } + } + else + index += 1+((chSelect==3) ? 1 : 0); + } + } + } + } + + void processIndependentCoupling(List cces, float[] dataL, float[] dataR) { + + int elementID = getElementInstanceTag().getId(); + + for (CCE cce : cces) { + int index = 0; + if (cce != null && cce.getCouplingPoint() == CCE.AFTER_IMDCT) { + for (int c = 0; c <= cce.getCoupledCount(); c++) { + int chSelect = cce.getCHSelect(c); + if (cce.isChannelPair(c) == isChannelPair() && cce.getIDSelect(c) == elementID) { + if (chSelect != 1) { + cce.applyIndependentCoupling(index, dataL); + if (chSelect != 0) + index++; + } + if (chSelect != 2) { + cce.applyIndependentCoupling(index, dataR); + index++; + } + } else + index += 1 + ((chSelect == 3) ? 1 : 0); + } + } + } + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/Constants.java b/src/main/java/net/sourceforge/jaad/aac/syntax/Constants.java deleted file mode 100644 index 4be1f007..00000000 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/Constants.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.sourceforge.jaad.aac.syntax; - -import java.util.logging.Logger; - -public interface Constants { - - Logger LOGGER = Logger.getLogger("jaad"); //for debugging - int MAX_ELEMENTS = 16; - int BYTE_MASK = 0xFF; - int MIN_INPUT_SIZE = 768; //6144 bits/channel - //frame length - int WINDOW_LEN_LONG = 1024; - int WINDOW_LEN_SHORT = WINDOW_LEN_LONG/8; - int WINDOW_SMALL_LEN_LONG = 960; - int WINDOW_SMALL_LEN_SHORT = WINDOW_SMALL_LEN_LONG/8; - //element types - int ELEMENT_SCE = 0; - int ELEMENT_CPE = 1; - int ELEMENT_CCE = 2; - int ELEMENT_LFE = 3; - int ELEMENT_DSE = 4; - int ELEMENT_PCE = 5; - int ELEMENT_FIL = 6; - int ELEMENT_END = 7; - //maximum numbers - int MAX_WINDOW_COUNT = 8; - int MAX_WINDOW_GROUP_COUNT = MAX_WINDOW_COUNT; - int MAX_LTP_SFB = 40; - int MAX_SECTIONS = 120; - int MAX_MS_MASK = 128; - float SQRT2 = 1.414213562f; -} diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/DRC.java b/src/main/java/net/sourceforge/jaad/aac/syntax/DRC.java new file mode 100644 index 00000000..2236c26c --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/DRC.java @@ -0,0 +1,84 @@ +package net.sourceforge.jaad.aac.syntax; + +/** + * Dynamic Range Control (4.5.2.7) + *

+ * This is currently unused. + * The parameters are to be applied to all channels. + */ +public class DRC { + + private static final int MAX_NBR_BANDS = 7; + private final boolean[] excludeMask; + private final boolean[] additionalExcludedChannels; + private boolean pceTagPresent; + private int pceInstanceTag; + private int tagReservedBits; + private boolean excludedChannelsPresent; + private boolean bandsPresent; + private int bandsIncrement, interpolationScheme; + private int[] bandTop; + private boolean progRefLevelPresent; + private int progRefLevel, progRefLevelReservedBits; + private boolean[] dynRngSgn; + private int[] dynRngCtl; + + public DRC() { + excludeMask = new boolean[MAX_NBR_BANDS]; + additionalExcludedChannels = new boolean[MAX_NBR_BANDS]; + } + + public void decode(BitStream in) { + + int bandCount = 1; + + // pce tag + if (pceTagPresent = in.readBool()) { + pceInstanceTag = in.readBits(4); + tagReservedBits = in.readBits(4); + } + + // excluded channels + if (excludedChannelsPresent = in.readBool()) { + decodeExcludedChannels(in); + } + + // bands + if (bandsPresent = in.readBool()) { + bandsIncrement = in.readBits(4); + interpolationScheme = in.readBits(4); + bandCount += bandsIncrement; + bandTop = new int[bandCount]; + for (int i = 0; i < bandCount; i++) { + bandTop[i] = in.readBits(8); + } + } + + // prog ref level + if (progRefLevelPresent = in.readBool()) { + progRefLevel = in.readBits(7); + progRefLevelReservedBits = in.readBits(1); + } + + dynRngSgn = new boolean[bandCount]; + dynRngCtl = new int[bandCount]; + for (int i = 0; i < bandCount; i++) { + dynRngSgn[i] = in.readBool(); + dynRngCtl[i] = in.readBits(7); + } + } + + private int decodeExcludedChannels(BitStream in) { + int exclChs = 0; + + do { + for (int i = 0; i < 7; i++) { + excludeMask[exclChs] = in.readBool(); + exclChs++; + } + } + while (exclChs < 57 && in.readBool()); + + return (exclChs / 7) * 8; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/DSE.java b/src/main/java/net/sourceforge/jaad/aac/syntax/DSE.java index 815142cd..09891160 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/DSE.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/DSE.java @@ -1,25 +1,67 @@ package net.sourceforge.jaad.aac.syntax; -import net.sourceforge.jaad.aac.AACException; +import java.util.List; -class DSE extends Element { +import net.sourceforge.jaad.aac.DecoderConfig; - private byte[] dataStreamBytes; - DSE() { - super(); - } +/** + * data_stream_element Abbreviation DSE. + * + * Syntactic element that contains data. + * Again, there are 16 element_instance_tags. + * There is, however, no restriction on the number + * of data_stream_element’s with any one instance tag, + * as a single data stream may continue across multiple + * data_stream_element’s with the same instance tag. + */ +class DSE implements Element { - void decode(BitStream in) throws AACException { - final boolean byteAlign = in.readBool(); - int count = in.readBits(8); - if(count==255) count += in.readBits(8); + public static final Type TYPE = Type.DSE; - if(byteAlign) in.byteAlign(); + static class Tag extends InstanceTag { - dataStreamBytes = new byte[count]; - for(int i = 0; i TAGS = Element.createTagList(32, Tag::new); + + private final Tag tag; + + @Override + public Tag getElementInstanceTag() { + return tag; + } + + private byte[] dataStreamBytes; + + public DSE(DecoderConfig config, Tag tag) { + super(); + this.tag = tag; + } + + public void decode(BitStream in) { + boolean byteAlign = in.readBool(); + int count = in.readBits(8); + if (count == 255) count += in.readBits(8); + + if (byteAlign) in.byteAlign(); + + dataStreamBytes = new byte[count]; + for (int i = 0; i < count; i++) { + dataStreamBytes[i] = (byte) in.readBits(8); + } + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/Element.java b/src/main/java/net/sourceforge/jaad/aac/syntax/Element.java index 1834d8c8..046f5d74 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/Element.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/Element.java @@ -1,32 +1,97 @@ package net.sourceforge.jaad.aac.syntax; -import net.sourceforge.jaad.aac.AACException; -import net.sourceforge.jaad.aac.SampleFrequency; -import net.sourceforge.jaad.aac.sbr.SBR; +import java.util.AbstractList; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.IntFunction; -public abstract class Element implements Constants { +import net.sourceforge.jaad.aac.DecoderConfig; +import net.sourceforge.jaad.aac.tools.Utils; - private int elementInstanceTag; - private SBR sbr; - protected void readElementInstanceTag(BitStream in) throws AACException { - elementInstanceTag = in.readBits(4); - } +public interface Element { - public int getElementInstanceTag() { - return elementInstanceTag; - } + enum Type { + SCE, CPE, CCE, LFE, DSE, PCE, FIL, END; + public static final List VALUES = Utils.listOf(values()); - void decodeSBR(BitStream in, SampleFrequency sf, int count, boolean stereo, boolean crc, boolean downSampled,boolean smallFrames) throws AACException { - if(sbr==null) sbr = new SBR(smallFrames,elementInstanceTag==ELEMENT_CPE,sf,downSampled); - sbr.decode(in, count); - } + public static Type get(int i) { + return VALUES.get(i); + } + } - boolean isSBRPresent() { - return sbr!=null; - } + static Type readType(BitStream in) { + return Type.get(in.readBits(3)); + } - SBR getSBR() { - return sbr; - } + abstract class InstanceTag { + + protected final int id; + + protected InstanceTag(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + abstract public Type getType(); + + abstract public Element newElement(DecoderConfig config); + + public int hashCode() { + return getType().ordinal() + 8 * id; + } + + public boolean equals(Object obj) { + return this.getClass().equals(obj.getClass()) && equalsTag((InstanceTag) obj); + } + + boolean equalsTag(InstanceTag other) { + return this.id == other.id && Objects.equals(getId(), other.getId()); + } + + transient String toString; + + public String toString() { + if (toString == null) + toString = String.format("%s:[%d]", getType().name(), id); + return toString; + } + } + + InstanceTag getElementInstanceTag(); + + void decode(BitStream in); + + static List + createTagList(int count, IntFunction newTag) { + List tags = new AbstractList() { + + @Override + public int size() { + return count; + } + + @Override + public T get(int index) { + return newTag.apply(index); + } + }; + return Utils.listCopyOf(tags); + } + + static Map> tagFactory() { + Map> types = new EnumMap<>(Element.Type.class); + types.put(Element.Type.PCE, PCE.TAGS::get); + types.put(Element.Type.SCE, SCE.TAGS::get); + types.put(Element.Type.CPE, CPE.TAGS::get); + types.put(Element.Type.LFE, LFE.TAGS::get); + types.put(Element.Type.CCE, CCE.TAGS::get); + types.put(Element.Type.DSE, DSE.TAGS::get); + return types; + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/FIL.java b/src/main/java/net/sourceforge/jaad/aac/syntax/FIL.java deleted file mode 100644 index acbfb216..00000000 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/FIL.java +++ /dev/null @@ -1,155 +0,0 @@ -package net.sourceforge.jaad.aac.syntax; - -import net.sourceforge.jaad.aac.AACException; -import net.sourceforge.jaad.aac.SampleFrequency; - -class FIL extends Element implements Constants { - - public static class DynamicRangeInfo { - - private static final int MAX_NBR_BANDS = 7; - private final boolean[] excludeMask; - private final boolean[] additionalExcludedChannels; - private boolean pceTagPresent; - private int pceInstanceTag; - private int tagReservedBits; - private boolean excludedChannelsPresent; - private boolean bandsPresent; - private int bandsIncrement, interpolationScheme; - private int[] bandTop; - private boolean progRefLevelPresent; - private int progRefLevel, progRefLevelReservedBits; - private boolean[] dynRngSgn; - private int[] dynRngCtl; - - public DynamicRangeInfo() { - excludeMask = new boolean[MAX_NBR_BANDS]; - additionalExcludedChannels = new boolean[MAX_NBR_BANDS]; - } - } - private static final int TYPE_FILL = 0; - private static final int TYPE_FILL_DATA = 1; - private static final int TYPE_EXT_DATA_ELEMENT = 2; - private static final int TYPE_DYNAMIC_RANGE = 11; - private static final int TYPE_SBR_DATA = 13; - private static final int TYPE_SBR_DATA_CRC = 14; - private final boolean downSampledSBR; - private DynamicRangeInfo dri; - - FIL(boolean downSampledSBR) { - super(); - this.downSampledSBR = downSampledSBR; - } - - void decode(BitStream in, Element prev, SampleFrequency sf, boolean sbrEnabled, boolean smallFrames) throws AACException { - int count = in.readBits(4); - if(count==15) count += in.readBits(8)-1; - count *= 8; //convert to bits - - final int cpy = count; - final int pos = in.getPosition(); - - while(count>0) { - count = decodeExtensionPayload(in, count, prev, sf, sbrEnabled, smallFrames); - } - - final int pos2 = in.getPosition()-pos; - final int bitsLeft = cpy-pos2; - if(bitsLeft>0) in.skipBits(pos2); - else if(bitsLeft<0) throw new AACException("FIL element overread: "+bitsLeft); - } - - private int decodeExtensionPayload(BitStream in, int count, Element prev, SampleFrequency sf, boolean sbrEnabled, boolean smallFrames) throws AACException { - final int type = in.readBits(4); - int ret = count-4; - switch(type) { - case TYPE_DYNAMIC_RANGE: - ret = decodeDynamicRangeInfo(in, ret); - break; - case TYPE_SBR_DATA: - case TYPE_SBR_DATA_CRC: - if(sbrEnabled) { - if(prev instanceof SCE_LFE||prev instanceof CPE||prev instanceof CCE) { - prev.decodeSBR(in, sf, ret, (prev instanceof CPE), (type==TYPE_SBR_DATA_CRC), downSampledSBR, smallFrames); - ret = 0; - break; - } - else throw new AACException("SBR applied on unexpected element: "+prev); - } - else { - in.skipBits(ret); - ret = 0; - } - case TYPE_FILL: - case TYPE_FILL_DATA: - case TYPE_EXT_DATA_ELEMENT: - default: - in.skipBits(ret); - ret = 0; - break; - } - return ret; - } - - private int decodeDynamicRangeInfo(BitStream in, int count) throws AACException { - if(dri==null) dri = new DynamicRangeInfo(); - int ret = count; - - int bandCount = 1; - - //pce tag - if(dri.pceTagPresent = in.readBool()) { - dri.pceInstanceTag = in.readBits(4); - dri.tagReservedBits = in.readBits(4); - } - - //excluded channels - if(dri.excludedChannelsPresent = in.readBool()) { - ret -= decodeExcludedChannels(in); - } - - //bands - if(dri.bandsPresent = in.readBool()) { - dri.bandsIncrement = in.readBits(4); - dri.interpolationScheme = in.readBits(4); - ret -= 8; - bandCount += dri.bandsIncrement; - dri.bandTop = new int[bandCount]; - for(int i = 0; imaxSFB) throw new AACException("too many bands: "+end+", allowed: "+maxSFB); - for(; k=info.getSWBCount()) throw new AACException("pulse SWB out of range: "+pulseStartSWB+" > "+info.getSWBCount()); - - if(pulseOffset==null||pulseCount!=pulseOffset.length) { - //only reallocate if needed - pulseOffset = new int[pulseCount]; - pulseAmp = new int[pulseCount]; - } - - pulseOffset[0] = info.getSWBOffsets()[pulseStartSWB]; - pulseOffset[0] += in.readBits(5); - pulseAmp[0] = in.readBits(4); - for(int i = 1; i1023) throw new AACException("pulse offset out of range: "+pulseOffset[0]); - pulseAmp[i] = in.readBits(4); - } - } - - public void decodeScaleFactors(BitStream in) throws AACException { - final int windowGroups = info.getWindowGroupCount(); - final int maxSFB = info.getMaxSFB(); - //0: spectrum, 1: noise, 2: intensity - final int[] offset = {globalGain, globalGain-90, 0}; - - int tmp; - boolean noiseFlag = true; - - int sfb, idx = 0; - for(int g = 0; g255) throw new AACException("scalefactor out of range: "+offset[0]); - scaleFactors[idx] = SCALEFACTOR_TABLE[offset[0]-100+SF_OFFSET]; - } - break; - } - } - } - } - - private void decodeSpectralData(BitStream in) throws AACException { - Arrays.fill(data, 0); - final int maxSFB = info.getMaxSFB(); - final int windowGroups = info.getWindowGroupCount(); - final int[] offsets = info.getSWBOffsets(); - final int[] buf = new int[4]; - - int sfb, j, k, w, hcb, off, width, num; - int groupOff = 0, idx = 0; - for(int g = 0; g=FIRST_PAIR_HCB) ? 2 : 4; - for(k = 0; k0) ? IQ_TABLE[buf[j]] : -IQ_TABLE[-buf[j]]; - data[off+k+j] *= scaleFactors[idx]; - } - } - } - } - } - groupOff += groupLen<<7; - } - } - - /* =========== gets ============ */ - /** - * Does inverse quantization and applies the scale factors on the decoded - * data. After this the noiseless decoding is finished and the decoded data - * is returned. - * @return the inverse quantized and scaled data - */ - public float[] getInvQuantData() throws AACException { - return data; - } - - public ICSInfo getInfo() { - return info; - } - - public int[] getSectEnd() { - return sectEnd; - } - - public int[] getSfbCB() { - return sfbCB; - } - - public float[] getScaleFactors() { - return scaleFactors; - } - - public boolean isTNSDataPresent() { - return tnsDataPresent; - } - - public TNS getTNS() { - return tns; - } - - public int getGlobalGain() { - return globalGain; - } - - public boolean isNoiseUsed() { - return noiseUsed; - } - - public int getLongestCodewordLength() { - return longestCodewordLen; - } - - public int getReorderedSpectralDataLength() { - return reorderedSpectralDataLen; - } - - public boolean isGainControlPresent() { - return gainControlPresent; - } - - public GainControl getGainControl() { - return gainControl; - } +public class ICStream implements HCB, ScaleFactorTable, IQTable { + + static final Logger LOGGER = Logger.getLogger(ICStream.class.getName()); + + public static final int MAX_SECTIONS = 120; + + private static final int SF_DELTA = 60; + private static final int SF_OFFSET = 200; + private static int randomState = 0x1F2E3D4C; + private final int frameLength; + // always needed + private final ICSInfo info; + private final int[] sfbCB; + private final int[] sectEnd; + private final float[] iqData; + private final float[] scaleFactors; + private int globalGain; + private boolean pulseDataPresent, tnsDataPresent, gainControlPresent; + // only allocated if needed + private TNS tns; + private GainControl gainControl; + private int[] pulseOffset, pulseAmp; + private int pulseCount; + private int pulseStartSWB; + // error resilience + private boolean noiseUsed; + private int reorderedSpectralDataLen, longestCodewordLen; + private RVLC rvlc; + + private float[] overlap; + + public ICStream(DecoderConfig config) { + this.frameLength = config.getFrameLength(); + info = new ICSInfo(config); + sfbCB = new int[MAX_SECTIONS]; + sectEnd = new int[MAX_SECTIONS]; + iqData = new float[frameLength]; + scaleFactors = new float[MAX_SECTIONS]; + this.overlap = new float[frameLength]; + } + + /* ========= decoding ========== */ + public void decode(BitStream in, boolean commonWindow, DecoderConfig conf) throws AACException { + if (conf.isScalefactorResilienceUsed() && rvlc == null) rvlc = new RVLC(); + boolean er = conf.getProfile().isErrorResilientProfile(); + + globalGain = in.readBits(8); + + if (!commonWindow) info.decode(in, commonWindow); + + decodeSectionData(in, conf.isSectionDataResilienceUsed()); + + //if(conf.isScalefactorResilienceUsed()) rvlc.decode(in, this, scaleFactors); + /*else*/ + decodeScaleFactors(in); + + pulseDataPresent = in.readBool(); + if (pulseDataPresent) { + if (info.isEightShortFrame()) throw new AACException("pulse data not allowed for short frames"); + LOGGER.log(Level.FINE, "PULSE"); + decodePulseData(in); + } + + tnsDataPresent = in.readBool(); + if (tnsDataPresent && !er) { + if (tns == null) tns = new TNS(); + tns.decode(in, info); + } + + gainControlPresent = in.readBool(); + if (gainControlPresent) { + if (gainControl == null) gainControl = new GainControl(frameLength); + LOGGER.log(Level.FINE, "GAIN"); + gainControl.decode(in, info.getWindowSequence()); + } + + //RVLC spectral data + //if(conf.isScalefactorResilienceUsed()) rvlc.decodeScalefactors(this, in, scaleFactors); + + if (conf.isSpectralDataResilienceUsed()) { + int max = (conf.getChannelConfiguration() == ChannelConfiguration.STEREO) ? 6144 : 12288; + reorderedSpectralDataLen = Math.max(in.readBits(14), max); + longestCodewordLen = Math.max(in.readBits(6), 49); + //HCR.decodeReorderedSpectralData(this, in, data, conf.isSectionDataResilienceUsed()); + } else decodeSpectralData(in); + } + + public void decodeSectionData(BitStream in, boolean sectionDataResilienceUsed) throws AACException { + Arrays.fill(sfbCB, 0); + Arrays.fill(sectEnd, 0); + int bits = info.isEightShortFrame() ? 3 : 5; + int escVal = (1 << bits) - 1; + + int windowGroupCount = info.getWindowGroupCount(); + int maxSFB = info.getMaxSFB(); + + int end, cb, incr; + int idx = 0; + + for (int g = 0; g < windowGroupCount; g++) { + int k = 0; + while (k < maxSFB) { + end = k; + cb = in.readBits(4); + if (cb == 12) throw new AACException("invalid huffman codebook: 12"); + while ((incr = in.readBits(bits)) == escVal) { + end += incr; + } + end += incr; + if (end > maxSFB) throw new AACException("too many bands: " + end + ", allowed: " + maxSFB); + for (; k < end; k++) { + sfbCB[idx] = cb; + sectEnd[idx++] = end; + } + } + } + } + + private void decodePulseData(BitStream in) throws AACException { + pulseCount = in.readBits(2) + 1; + pulseStartSWB = in.readBits(6); + if (pulseStartSWB >= info.getSWBCount()) + throw new AACException("pulse SWB out of range: " + pulseStartSWB + " > " + info.getSWBCount()); + + if (pulseOffset == null || pulseCount != pulseOffset.length) { + //only reallocate if needed + pulseOffset = new int[pulseCount]; + pulseAmp = new int[pulseCount]; + } + + pulseOffset[0] = info.getSWBOffsets()[pulseStartSWB]; + pulseOffset[0] += in.readBits(5); + pulseAmp[0] = in.readBits(4); + for (int i = 1; i < pulseCount; i++) { + pulseOffset[i] = in.readBits(5) + pulseOffset[i - 1]; + if (pulseOffset[i] > 1023) throw new AACException("pulse offset out of range: " + pulseOffset[0]); + pulseAmp[i] = in.readBits(4); + } + } + + public void decodeScaleFactors(BitStream in) throws AACException { + int windowGroups = info.getWindowGroupCount(); + int maxSFB = info.getMaxSFB(); + //0: spectrum, 1: noise, 2: intensity + int[] offset = {globalGain, globalGain - 90, 0}; + + int tmp; + boolean noiseFlag = true; + + int sfb, idx = 0; + for (int g = 0; g < windowGroups; g++) { + for (sfb = 0; sfb < maxSFB; ) { + int end = sectEnd[idx]; + switch (sfbCB[idx]) { + case ZERO_HCB: + for (; sfb < end; sfb++, idx++) { + scaleFactors[idx] = 0; + } + break; + case INTENSITY_HCB: + case INTENSITY_HCB2: + for (; sfb < end; sfb++, idx++) { + offset[2] += Huffman.decodeScaleFactor(in) - SF_DELTA; + tmp = Math.min(Math.max(offset[2], -155), 100); + scaleFactors[idx] = SCALEFACTOR_TABLE[-tmp + SF_OFFSET]; + } + break; + case NOISE_HCB: + for (; sfb < end; sfb++, idx++) { + if (noiseFlag) { + offset[1] += in.readBits(9) - 256; + noiseFlag = false; + } else offset[1] += Huffman.decodeScaleFactor(in) - SF_DELTA; + tmp = Math.min(Math.max(offset[1], -100), 155); + scaleFactors[idx] = -SCALEFACTOR_TABLE[tmp + SF_OFFSET]; + } + break; + default: + for (; sfb < end; sfb++, idx++) { + offset[0] += Huffman.decodeScaleFactor(in) - SF_DELTA; + if (offset[0] > 255) throw new AACException("scalefactor out of range: " + offset[0]); + scaleFactors[idx] = SCALEFACTOR_TABLE[offset[0] - 100 + SF_OFFSET]; + } + break; + } + } + } + } + + private void decodeSpectralData(BitStream in) throws AACException { + Arrays.fill(iqData, 0); + int maxSFB = info.getMaxSFB(); + int windowGroups = info.getWindowGroupCount(); + int[] offsets = info.getSWBOffsets(); + int[] buf = new int[4]; + + for (int g = 0, idx = 0, groupOff = 0; g < windowGroups; g++) { + int groupLen = info.getWindowGroupLength(g); + + for (int sfb = 0; sfb < maxSFB; sfb++, idx++) { + int hcb = sfbCB[idx]; + int off = groupOff + offsets[sfb]; + int width = offsets[sfb + 1] - offsets[sfb]; + if (hcb == ZERO_HCB || hcb == INTENSITY_HCB || hcb == INTENSITY_HCB2) { + for (int w = 0; w < groupLen; w++, off += 128) { + Arrays.fill(iqData, off, off + width, 0); + } + } else if (hcb == NOISE_HCB) { + //apply PNS: fill with random values + for (int w = 0; w < groupLen; w++, off += 128) { + float energy = 0; + + for (int k = 0; k < width; k++) { + randomState *= 1664525 + 1013904223; + iqData[off + k] = randomState; + energy += iqData[off + k] * iqData[off + k]; + } + + float scale = (float) (scaleFactors[idx] / Math.sqrt(energy)); + for (int k = 0; k < width; k++) { + iqData[off + k] *= scale; + } + } + } else { + for (int w = 0; w < groupLen; w++, off += 128) { + int num = (hcb >= FIRST_PAIR_HCB) ? 2 : 4; + for (int k = 0; k < width; k += num) { + Huffman.decodeSpectralData(in, hcb, buf, 0); + + //inverse quantization & scaling + for (int j = 0; j < num; j++) { + iqData[off + k + j] = (buf[j] > 0) ? IQ_TABLE[buf[j]] : -IQ_TABLE[-buf[j]]; + iqData[off + k + j] *= scaleFactors[idx]; + } + } + } + } + } + groupOff += groupLen << 7; + } + } + + /* =========== gets ============ */ + + /** + * Does inverse quantization and applies the scale factors on the decoded + * data. After this the noiseless decoding is finished and the decoded data + * is returned. + * + * @return the inverse quantized and scaled data + */ + public float[] getInvQuantData() throws AACException { + return iqData; + } + + public float[] getOverlap() { + return overlap; + } + + public ICSInfo getInfo() { + return info; + } + + public int[] getSectEnd() { + return sectEnd; + } + + public int[] getSfbCB() { + return sfbCB; + } + + public float[] getScaleFactors() { + return scaleFactors; + } + + public void process(float[] data, FilterBank filterBank) { + filterBank.process(info.getWindowSequence(), info.getWindowShape(ICSInfo.CURRENT), info.getWindowShape(ICSInfo.PREVIOUS), + iqData, data, overlap); + } + + private void processTNS(float[] data, boolean decode) { + if (tns != null && tnsDataPresent) + tns.process(this, data, info.sf, decode); + } + + public void processICP() { + info.processICP(this.iqData); + } + + public void processTNS() { + processTNS(this.iqData, false); + } + + public void processTNS(float[] data) { + processTNS(data, true); + } + + public void processLTP(FilterBank filterBank) { + if (info.ltPredict != null) + info.ltPredict.process(this, filterBank); + } + + public void updateLTP(float[] data) { + if (info.ltPredict != null) + info.ltPredict.updateState(data, getOverlap(), info.config.getProfile()); + } + + public int getGlobalGain() { + return globalGain; + } + + public boolean isNoiseUsed() { + return noiseUsed; + } + + public int getLongestCodewordLength() { + return longestCodewordLen; + } + + public int getReorderedSpectralDataLength() { + return reorderedSpectralDataLen; + } + + public void processGainControl() { + if (gainControl != null && gainControlPresent) + gainControl.process(this.iqData, + info.getWindowShape(ICSInfo.CURRENT), + info.getWindowShape(ICSInfo.PREVIOUS), + info.getWindowSequence()); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/IQTable.java b/src/main/java/net/sourceforge/jaad/aac/syntax/IQTable.java index 3da25573..cd956d64 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/IQTable.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/IQTable.java @@ -3,8202 +3,8203 @@ /** * Inverse quantization lookup table for all possible values * from 04/3 to 81914/3. + * * @author in-somnia */ //TODO: list is too big, create at startup interface IQTable { - float[] IQ_TABLE = { - 0.0f, - 1.0f, - 2.519842099789746f, - 4.3267487109222245f, - 6.3496042078727974f, - 8.549879733383484f, - 10.902723556992836f, - 13.390518279406722f, - 15.999999999999998f, - 18.720754407467133f, - 21.544346900318835f, - 24.463780996262464f, - 27.47314182127996f, - 30.567350940369842f, - 33.74199169845321f, - 36.993181114957046f, - 40.317473596635935f, - 43.71178704118999f, - 47.173345095760126f, - 50.69963132571694f, - 54.28835233189812f, - 57.93740770400352f, - 61.6448652744185f, - 65.40894053658599f, - 69.22797937475559f, - 73.10044345532164f, - 77.02489777859162f, - 80.99999999999997f, - 85.02449121251853f, - 89.09718794488955f, - 93.21697517861574f, - 97.38280022413316f, - 101.59366732596474f, - 105.84863288986224f, - 110.14680124343441f, - 114.4873208566006f, - 118.86938096020653f, - 123.29220851090024f, - 127.75506545836058f, - 132.25724627755247f, - 136.79807573413572f, - 141.3769068556919f, - 145.99311908523086f, - 150.6461165966291f, - 155.33532675434674f, - 160.0601987020528f, - 164.8202020667335f, - 169.6148257665186f, - 174.44357691188537f, - 179.30597979112554f, - 184.20157493201927f, - 189.12991823257562f, - 194.09058015449685f, - 199.08314497371674f, - 204.1072100829694f, - 209.16238534187647f, - 214.24829247050752f, - 219.36456448277784f, - 224.51084515641213f, - 229.6867885365223f, - 234.89205847013176f, - 240.1263281692325f, - 245.38927980018508f, - 250.6806040974726f, - 255.99999999999991f, - 261.3471743082887f, - 266.7218413610645f, - 272.12372272986045f, - 277.5525469303796f, - 283.0080491494619f, - 288.4899709865989f, - 293.99806020902247f, - 299.5320705194741f, - 305.0917613358298f, - 310.67689758182206f, - 316.28724948815585f, - 321.92259240337177f, - 327.58270661385535f, - 333.2673771724374f, - 338.97639373507025f, - 344.70955040510125f, - 350.46664558470013f, - 356.2474818330261f, - 362.0518657307514f, - 367.8796077505826f, - 373.7305221334451f, - 379.60442677002084f, - 385.501143087346f, - 391.42049594019943f, - 397.3623135070237f, - 403.32642719014467f, - 409.3126715200626f, - 415.320884063608f, - 421.35090533576465f, - 427.4025787149762f, - 433.4757503617617f, - 439.5702691404793f, - 445.6859865440827f, - 451.8227566217276f, - 457.9804359090913f, - 464.15888336127773f, - 470.35796028818726f, - 476.5775302922363f, - 482.81745920832043f, - 489.0776150459174f, - 495.3578679332358f, - 501.6580900633169f, - 507.9781556420037f, - 514.3179408376965f, - 520.6773237328167f, - 527.056184276906f, - 533.4544042412917f, - 539.8718671752513f, - 546.308458363615f, - 552.7640647857461f, - 559.2385750758419f, - 565.7318794845041f, - 572.2438698415234f, - 578.7744395198338f, - 585.3234834005884f, - 591.8908978393126f, - 598.4765806330926f, - 605.0804309887604f, - 611.7023494920364f, - 618.3422380775919f, - 624.9999999999998f, - 631.6755398055375f, - 638.3687633048116f, - 645.0795775461748f, - 651.8078907899041f, - 658.553612483115f, - 665.3166532353836f, - 672.0969247950522f, - 678.8943400261944f, - 685.7088128862142f, - 692.540258404062f, - 699.3885926590398f, - 706.2537327601806f, - 713.1355968261797f, - 720.0341039658604f, - 726.9491742591542f, - 733.8807287385821f, - 740.8286893712154f, - 747.7929790411054f, - 754.7735215321619f, - 761.7702415114704f, - 768.7830645130296f, - 775.811916921899f, - 782.8567259587425f, - 789.9174196647544f, - 796.993926886958f, - 804.0861772638627f, - 811.194101211471f, - 818.3176299096223f, - 825.4566952886656f, - 832.6112300164486f, - 839.781167485616f, - 846.9664418012055f, - 854.1669877685351f, - 861.3827408813713f, - 868.6136373103698f, - 875.859613891782f, - 883.1206081164196f, - 890.3965581188676f, - 897.6874026669418f, - 904.9930811513817f, - 912.3135335757719f, - 919.6487005466876f, - 926.9985232640562f, - 934.3629435117291f, - 941.7419036482586f, - 949.1353465978742f, - 956.5432158416521f, - 963.9654554088735f, - 971.4020098685654f, - 978.8528243212218f, - 986.3178443906959f, - 993.7970162162635f, - 1001.29028644485f, - 1008.797602223418f, - 1016.3189111915103f, - 1023.8541614739464f, - 1031.4033016736653f, - 1038.9662808647138f, - 1046.5430485853758f, - 1054.1335548314366f, - 1061.7377500495838f, - 1069.3555851309357f, - 1076.9870114046978f, - 1084.6319806319443f, - 1092.2904449995174f, - 1099.9623571140482f, - 1107.6476699960892f, - 1115.3463370743607f, - 1123.058312180106f, - 1130.783549541554f, - 1138.5220037784857f, - 1146.273629896901f, - 1154.0383832837879f, - 1161.816219701986f, - 1169.607095285146f, - 1177.4109665327805f, - 1185.2277903054078f, - 1193.0575238197798f, - 1200.9001246442f, - 1208.7555506939248f, - 1216.6237602266442f, - 1224.5047118380478f, - 1232.3983644574657f, - 1240.3046773435874f, - 1248.2236100802568f, - 1256.1551225723395f, - 1264.099175041662f, - 1272.0557280230228f, - 1280.024742360269f, - 1288.0061792024444f, - 1295.9999999999995f, - 1304.006166501068f, - 1312.0246407478062f, - 1320.055385072793f, - 1328.0983620954903f, - 1336.153534718765f, - 1344.2208661254647f, - 1352.3003197750522f, - 1360.3918594002962f, - 1368.4954490040145f, - 1376.6110528558709f, - 1384.7386354892244f, - 1392.8781616980295f, - 1401.0295965337855f, - 1409.1929053025353f, - 1417.368053561912f, - 1425.5550071182324f, - 1433.7537320236374f, - 1441.9641945732744f, - 1450.186361302528f, - 1458.4201989842913f, - 1466.6656746262797f, - 1474.9227554683875f, - 1483.1914089800841f, - 1491.4716028578516f, - 1499.7633050226596f, - 1508.0664836174794f, - 1516.3811070048375f, - 1524.7071437644029f, - 1533.044562690613f, - 1541.3933327903342f, - 1549.753423280558f, - 1558.1248035861304f, - 1566.507443337515f, - 1574.9013123685909f, - 1583.3063807144795f, - 1591.722618609407f, - 1600.149996484594f, - 1608.58848496618f, - 1617.0380548731737f, - 1625.4986772154357f, - 1633.9703231916887f, - 1642.4529641875577f, - 1650.9465717736346f, - 1659.4511177035752f, - 1667.9665739122186f, - 1676.4929125137353f, - 1685.0301057998013f, - 1693.5781262377957f, - 1702.136946469027f, - 1710.7065393069795f, - 1719.286877735588f, - 1727.8779349075323f, - 1736.4796841425596f, - 1745.0920989258252f, - 1753.7151529062583f, - 1762.3488198949503f, - 1770.993073863563f, - 1779.6478889427597f, - 1788.3132394206564f, - 1796.9890997412947f, - 1805.6754445031333f, - 1814.3722484575621f, - 1823.0794865074322f, - 1831.7971337056094f, - 1840.5251652535437f, - 1849.263556499858f, - 1858.0122829389563f, - 1866.7713202096493f, - 1875.5406440937966f, - 1884.3202305149687f, - 1893.110055537124f, - 1901.9100953633042f, - 1910.7203263343454f, - 1919.5407249276057f, - 1928.3712677557098f, - 1937.2119315653083f, - 1946.0626932358525f, - 1954.923529778386f, - 1963.79441833435f, - 1972.6753361744036f, - 1981.5662606972594f, - 1990.467169428533f, - 1999.378040019607f, - 2008.2988502465078f, - 2017.2295780087982f, - 2026.1702013284819f, - 2035.1206983489212f, - 2044.0810473337688f, - 2053.0512266659125f, - 2062.031214846431f, - 2071.0209904935646f, - 2080.020532341696f, - 2089.0298192403443f, - 2098.0488301531714f, - 2107.0775441569995f, - 2116.115940440839f, - 2125.1639983049317f, - 2134.2216971597995f, - 2143.2890165253098f, - 2152.3659360297484f, - 2161.452435408903f, - 2170.5484945051617f, - 2179.6540932666144f, - 2188.769211746171f, - 2197.893830100689f, - 2207.0279285901042f, - 2216.171487576584f, - 2225.324487523676f, - 2234.486908995478f, - 2243.65873265581f, - 2252.839939267398f, - 2262.03050969107f, - 2271.2304248849537f, - 2280.4396659036897f, - 2289.6582138976523f, - 2298.8860501121762f, - 2308.1231558867926f, - 2317.3695126544767f, - 2326.6251019409005f, - 2335.8899053636933f, - 2345.163904631713f, - 2354.4470815443233f, - 2363.739417990679f, - 2373.0408959490205f, - 2382.351497485973f, - 2391.671204755856f, - 2400.999999999999f, - 2410.337865546065f, - 2419.6847838073813f, - 2429.0407372822747f, - 2438.405708553419f, - 2447.779680287186f, - 2457.162635233001f, - 2466.554556222711f, - 2475.955426169957f, - 2485.3652280695474f, - 2494.7839449968487f, - 2504.2115601071737f, - 2513.648056635179f, - 2523.0934178942675f, - 2532.5476272760025f, - 2542.010668249519f, - 2551.482524360948f, - 2560.963179232844f, - 2570.4526165636184f, - 2579.950820126979f, - 2589.4577737713744f, - 2598.973461419446f, - 2608.4978670674823f, - 2618.0309747848837f, - 2627.572768713626f, - 2637.1232330677353f, - 2646.6823521327647f, - 2656.250110265277f, - 2665.826491892333f, - 2675.4114815109842f, - 2685.0050636877722f, - 2694.6072230582295f, - 2704.2179443263894f, - 2713.8372122642972f, - 2723.465011711528f, - 2733.1013275747096f, - 2742.7461448270483f, - 2752.39944850786f, - 2762.0612237221085f, - 2771.731455639942f, - 2781.4101294962406f, - 2791.097230590165f, - 2800.7927442847094f, - 2810.496656006259f, - 2820.208951244152f, - 2829.9296155502466f, - 2839.6586345384894f, - 2849.395993884492f, - 2859.1416793251065f, - 2868.8956766580086f, - 2878.6579717412847f, - 2888.4285504930212f, - 2898.2073988908974f, - 2907.9945029717837f, - 2917.789848831344f, - 2927.5934226236377f, - 2937.4052105607307f, - 2947.225198912308f, - 2957.053374005286f, - 2966.8897222234364f, - 2976.734230007005f, - 2986.5868838523397f, - 2996.4476703115197f, - 3006.316575991989f, - 3016.193587556191f, - 3026.078691721209f, - 3035.971875258411f, - 3045.8731249930906f, - 3055.7824278041207f, - 3065.699770623604f, - 3075.6251404365285f, - 3085.5585242804245f, - 3095.49990924503f, - 3105.449282471949f, - 3115.4066311543256f, - 3125.371942536509f, - 3135.3452039137287f, - 3145.3264026317715f, - 3155.3155260866592f, - 3165.3125617243295f, - 3175.3174970403234f, - 3185.330319579468f, - 3195.35101693557f, - 3205.379576751108f, - 3215.4159867169246f, - 3225.460234571929f, - 3235.5123081027928f, - 3245.572195143656f, - 3255.63988357583f, - 3265.7153613275095f, - 3275.7986163734795f, - 3285.889636734829f, - 3295.9884104786665f, - 3306.0949257178395f, - 3316.2091706106517f, - 3326.331133360588f, - 3336.4608022160382f, - 3346.598165470023f, - 3356.7432114599264f, - 3366.8959285672245f, - 3377.056305217221f, - 3387.2243298787826f, - 3397.3999910640764f, - 3407.5832773283128f, - 3417.7741772694862f, - 3427.9726795281194f, - 3438.1787727870123f, - 3448.3924457709873f, - 3458.6136872466445f, - 3468.842486022111f, - 3479.0788309467976f, - 3489.3227109111554f, - 3499.5741148464344f, - 3509.8330317244445f, - 3520.0994505573185f, - 3530.373360397275f, - 3540.6547503363886f, - 3550.9436095063534f, - 3561.239927078258f, - 3571.543692262354f, - 3581.854894307831f, - 3592.1735225025936f, - 3602.4995661730372f, - 3612.8330146838275f, - 3623.1738574376814f, - 3633.52208387515f, - 3643.877683474403f, - 3654.240645751014f, - 3664.6109602577494f, - 3674.9886165843564f, - 3685.3736043573545f, - 3695.7659132398294f, - 3706.165532931225f, - 3716.57245316714f, - 3726.986663719126f, - 3737.4081543944876f, - 3747.836915036078f, - 3758.272935522107f, - 3768.716205765941f, - 3779.1667157159077f, - 3789.6244553551055f, - 3800.089414701208f, - 3810.5615838062768f, - 3821.0409527565694f, - 3831.5275116723533f, - 3842.0212507077194f, - 3852.522160050396f, - 3863.0302299215673f, - 3873.5454505756893f, - 3884.067812300311f, - 3894.597305415892f, - 3905.1339202756285f, - 3915.677647265273f, - 3926.2284768029604f, - 3936.786399339034f, - 3947.3514053558706f, - 3957.9234853677135f, - 3968.502629920497f, - 3979.0888295916798f, - 3989.6820749900776f, - 4000.2823567556948f, - 4010.8896655595613f, - 4021.5039921035655f, - 4032.1253271202945f, - 4042.7536613728694f, - 4053.3889856547858f, - 4064.031290789755f, - 4074.680567631545f, - 4085.336807063822f, - 4095.999999999998f, - 4106.670137383071f, - 4117.347210185475f, - 4128.031209408926f, - 4138.722126084268f, - 4149.419951271327f, - 4160.124676058758f, - 4170.836291563898f, - 4181.554788932618f, - 4192.280159339177f, - 4203.012393986074f, - 4213.75148410391f, - 4224.497420951238f, - 4235.250195814426f, - 4246.0098000075095f, - 4256.776224872057f, - 4267.549461777031f, - 4278.329502118642f, - 4289.11633732022f, - 4299.909958832071f, - 4310.7103581313495f, - 4321.517526721914f, - 4332.3314561342f, - 4343.152137925088f, - 4353.979563677767f, - 4364.813725001605f, - 4375.654613532022f, - 4386.502220930359f, - 4397.356538883747f, - 4408.217559104982f, - 4419.085273332402f, - 4429.959673329753f, - 4440.840750886073f, - 4451.72849781556f, - 4462.622905957458f, - 4473.523967175923f, - 4484.431673359913f, - 4495.346016423058f, - 4506.26698830355f, - 4517.194580964012f, - 4528.128786391389f, - 4539.069596596828f, - 4550.017003615559f, - 4560.970999506781f, - 4571.931576353546f, - 4582.898726262647f, - 4593.8724413645f, - 4604.852713813035f, - 4615.839535785582f, - 4626.832899482757f, - 4637.832797128359f, - 4648.839220969251f, - 4659.852163275256f, - 4670.871616339047f, - 4681.897572476039f, - 4692.930024024284f, - 4703.9689633443595f, - 4715.014382819267f, - 4726.0662748543255f, - 4737.124631877068f, - 4748.189446337137f, - 4759.26071070618f, - 4770.338417477749f, - 4781.422559167199f, - 4792.513128311585f, - 4803.610117469561f, - 4814.713519221285f, - 4825.823326168315f, - 4836.93953093351f, - 4848.062126160935f, - 4859.191104515763f, - 4870.326458684178f, - 4881.468181373277f, - 4892.616265310977f, - 4903.770703245919f, - 4914.931487947375f, - 4926.098612205151f, - 4937.272068829496f, - 4948.451850651012f, - 4959.637950520555f, - 4970.830361309152f, - 4982.029075907904f, - 4993.234087227897f, - 5004.445388200115f, - 5015.662971775347f, - 5026.886830924101f, - 5038.116958636513f, - 5049.353347922266f, - 5060.595991810493f, - 5071.8448833497005f, - 5083.100015607673f, - 5094.3613816714f, - 5105.628974646975f, - 5116.902787659525f, - 5128.18281385312f, - 5139.469046390692f, - 5150.761478453947f, - 5162.060103243293f, - 5173.364913977747f, - 5184.675903894859f, - 5195.993066250632f, - 5207.316394319439f, - 5218.645881393944f, - 5229.981520785022f, - 5241.323305821685f, - 5252.671229850992f, - 5264.025286237983f, - 5275.385468365595f, - 5286.751769634588f, - 5298.124183463464f, - 5309.502703288395f, - 5320.887322563145f, - 5332.278034758998f, - 5343.674833364676f, - 5355.077711886272f, - 5366.486663847172f, - 5377.901682787985f, - 5389.3227622664635f, - 5400.749895857437f, - 5412.183077152737f, - 5423.622299761123f, - 5435.067557308219f, - 5446.518843436432f, - 5457.976151804887f, - 5469.439476089359f, - 5480.908809982197f, - 5492.384147192261f, - 5503.8654814448455f, - 5515.35280648162f, - 5526.846116060552f, - 5538.345403955847f, - 5549.850663957874f, - 5561.361889873103f, - 5572.879075524037f, - 5584.402214749145f, - 5595.9313014027975f, - 5607.466329355201f, - 5619.00729249233f, - 5630.554184715866f, - 5642.106999943128f, - 5653.665732107017f, - 5665.230375155943f, - 5676.8009230537655f, - 5688.377369779733f, - 5699.959709328416f, - 5711.547935709647f, - 5723.142042948459f, - 5734.742025085021f, - 5746.347876174581f, - 5757.959590287402f, - 5769.577161508701f, - 5781.200583938591f, - 5792.829851692021f, - 5804.464958898715f, - 5816.1058997031105f, - 5827.7526682643065f, - 5839.405258755998f, - 5851.06366536642f, - 5862.727882298291f, - 5874.397903768755f, - 5886.07372400932f, - 5897.755337265809f, - 5909.442737798296f, - 5921.135919881051f, - 5932.834877802487f, - 5944.539605865103f, - 5956.250098385426f, - 5967.966349693957f, - 5979.688354135121f, - 5991.416106067203f, - 6003.1495998623f, - 6014.888829906269f, - 6026.6337905986675f, - 6038.384476352703f, - 6050.140881595178f, - 6061.903000766441f, - 6073.670828320332f, - 6085.444358724127f, - 6097.223586458489f, - 6109.00850601742f, - 6120.7991119082f, - 6132.595398651345f, - 6144.397360780552f, - 6156.204992842646f, - 6168.018289397536f, - 6179.837245018158f, - 6191.661854290431f, - 6203.492111813202f, - 6215.3280121982025f, - 6227.1695500699925f, - 6239.01672006592f, - 6250.869516836063f, - 6262.727935043189f, - 6274.591969362706f, - 6286.461614482607f, - 6298.3368651034325f, - 6310.217715938217f, - 6322.104161712446f, - 6333.996197164003f, - 6345.893817043131f, - 6357.7970161123785f, - 6369.705789146558f, - 6381.620130932701f, - 6393.5400362700075f, - 6405.465499969803f, - 6417.396516855498f, - 6429.333081762534f, - 6441.275189538345f, - 6453.222835042314f, - 6465.176013145724f, - 6477.134718731716f, - 6489.098946695247f, - 6501.0686919430445f, - 6513.043949393563f, - 6525.024713976942f, - 6537.010980634961f, - 6549.002744321001f, - 6560.999999999996f, - 6573.002742648398f, - 6585.010967254128f, - 6597.024668816537f, - 6609.043842346366f, - 6621.0684828657f, - 6633.098585407935f, - 6645.134145017727f, - 6657.175156750956f, - 6669.221615674691f, - 6681.273516867135f, - 6693.3308554176f, - 6705.393626426459f, - 6717.461825005108f, - 6729.535446275926f, - 6741.614485372234f, - 6753.69893743826f, - 6765.788797629097f, - 6777.884061110663f, - 6789.984723059666f, - 6802.090778663563f, - 6814.20222312052f, - 6826.31905163938f, - 6838.441259439618f, - 6850.568841751307f, - 6862.701793815083f, - 6874.8401108821f, - 6886.983788213999f, - 6899.132821082872f, - 6911.287204771221f, - 6923.44693457192f, - 6935.612005788186f, - 6947.7824137335365f, - 6959.958153731754f, - 6972.139221116853f, - 6984.325611233041f, - 6996.517319434686f, - 7008.714341086277f, - 7020.916671562394f, - 7033.124306247668f, - 7045.337240536748f, - 7057.555469834268f, - 7069.77898955481f, - 7082.007795122871f, - 7094.241881972827f, - 7106.481245548902f, - 7118.7258813051285f, - 7130.975784705322f, - 7143.23095122304f, - 7155.491376341552f, - 7167.757055553804f, - 7180.027984362389f, - 7192.304158279513f, - 7204.585572826957f, - 7216.872223536052f, - 7229.164105947641f, - 7241.461215612049f, - 7253.76354808905f, - 7266.0710989478375f, - 7278.383863766987f, - 7290.70183813443f, - 7303.025017647417f, - 7315.353397912493f, - 7327.68697454546f, - 7340.025743171346f, - 7352.36969942438f, - 7364.718838947954f, - 7377.073157394597f, - 7389.432650425941f, - 7401.797313712694f, - 7414.167142934606f, - 7426.542133780443f, - 7438.922281947951f, - 7451.307583143835f, - 7463.698033083718f, - 7476.093627492121f, - 7488.49436210243f, - 7500.900232656865f, - 7513.311234906452f, - 7525.727364610994f, - 7538.148617539045f, - 7550.574989467873f, - 7563.006476183442f, - 7575.443073480374f, - 7587.884777161926f, - 7600.33158303996f, - 7612.783486934915f, - 7625.24048467578f, - 7637.702572100064f, - 7650.169745053768f, - 7662.64199939136f, - 7675.119330975745f, - 7687.60173567824f, - 7700.089209378544f, - 7712.581747964711f, - 7725.079347333125f, - 7737.582003388473f, - 7750.089712043714f, - 7762.602469220058f, - 7775.1202708469355f, - 7787.643112861973f, - 7800.1709912109645f, - 7812.703901847848f, - 7825.241840734677f, - 7837.784803841597f, - 7850.3327871468155f, - 7862.885786636581f, - 7875.443798305154f, - 7888.006818154784f, - 7900.57484219568f, - 7913.14786644599f, - 7925.725886931772f, - 7938.308899686972f, - 7950.896900753395f, - 7963.489886180685f, - 7976.087852026296f, - 7988.690794355469f, - 8001.298709241209f, - 8013.911592764257f, - 8026.529441013069f, - 8039.152250083789f, - 8051.780016080227f, - 8064.412735113835f, - 8077.05040330368f, - 8089.693016776422f, - 8102.340571666295f, - 8114.993064115073f, - 8127.650490272057f, - 8140.312846294045f, - 8152.98012834531f, - 8165.652332597579f, - 8178.329455230005f, - 8191.011492429153f, - 8203.698440388966f, - 8216.390295310746f, - 8229.087053403142f, - 8241.788710882107f, - 8254.495263970894f, - 8267.206708900021f, - 8279.923041907257f, - 8292.644259237595f, - 8305.37035714323f, - 8318.101331883543f, - 8330.837179725066f, - 8343.577896941475f, - 8356.323479813558f, - 8369.073924629198f, - 8381.82922768335f, - 8394.589385278021f, - 8407.354393722242f, - 8420.124249332057f, - 8432.898948430495f, - 8445.67848734755f, - 8458.462862420158f, - 8471.25206999218f, - 8484.046106414384f, - 8496.844968044408f, - 8509.648651246764f, - 8522.457152392795f, - 8535.270467860666f, - 8548.088594035344f, - 8560.911527308566f, - 8573.73926407884f, - 8586.5718007514f, - 8599.409133738207f, - 8612.251259457915f, - 8625.098174335855f, - 8637.94987480402f, - 8650.806357301039f, - 8663.667618272157f, - 8676.533654169225f, - 8689.404461450664f, - 8702.28003658146f, - 8715.160376033142f, - 8728.04547628375f, - 8740.935333817839f, - 8753.829945126436f, - 8766.729306707033f, - 8779.633415063572f, - 8792.542266706416f, - 8805.455858152332f, - 8818.374185924482f, - 8831.29724655239f, - 8844.225036571936f, - 8857.157552525327f, - 8870.094790961084f, - 8883.03674843403f, - 8895.983421505252f, - 8908.934806742107f, - 8921.890900718185f, - 8934.8517000133f, - 8947.817201213471f, - 8960.7874009109f, - 8973.76229570396f, - 8986.741882197173f, - 8999.726157001192f, - 9012.715116732788f, - 9025.708758014824f, - 9038.707077476247f, - 9051.710071752064f, - 9064.717737483328f, - 9077.730071317117f, - 9090.747069906518f, - 9103.768729910615f, - 9116.795047994465f, - 9129.826020829081f, - 9142.861645091423f, - 9155.901917464373f, - 9168.946834636716f, - 9181.996393303136f, - 9195.050590164185f, - 9208.109421926274f, - 9221.172885301656f, - 9234.240977008405f, - 9247.313693770408f, - 9260.391032317339f, - 9273.472989384647f, - 9286.559561713542f, - 9299.650746050975f, - 9312.74653914962f, - 9325.84693776787f, - 9338.951938669801f, - 9352.061538625176f, - 9365.175734409413f, - 9378.294522803584f, - 9391.417900594384f, - 9404.545864574127f, - 9417.678411540726f, - 9430.815538297675f, - 9443.957241654036f, - 9457.103518424428f, - 9470.254365429f, - 9483.40977949343f, - 9496.569757448893f, - 9509.734296132066f, - 9522.903392385091f, - 9536.07704305558f, - 9549.255244996582f, - 9562.437995066583f, - 9575.62529012948f, - 9588.817127054574f, - 9602.013502716549f, - 9615.214413995463f, - 9628.419857776727f, - 9641.629830951093f, - 9654.844330414644f, - 9668.063353068772f, - 9681.286895820167f, - 9694.514955580802f, - 9707.74752926792f, - 9720.984613804016f, - 9734.226206116828f, - 9747.472303139319f, - 9760.722901809664f, - 9773.977999071232f, - 9787.237591872581f, - 9800.501677167433f, - 9813.77025191467f, - 9827.04331307831f, - 9840.320857627503f, - 9853.602882536512f, - 9866.8893847847f, - 9880.18036135651f, - 9893.475809241469f, - 9906.775725434152f, - 9920.080106934185f, - 9933.388950746223f, - 9946.702253879943f, - 9960.020013350022f, - 9973.34222617613f, - 9986.668889382916f, - 9999.999999999995f, - 10013.335555061929f, - 10026.675551608221f, - 10040.0199866833f, - 10053.368857336509f, - 10066.722160622081f, - 10080.079893599144f, - 10093.442053331697f, - 10106.808636888598f, - 10120.17964134355f, - 10133.555063775097f, - 10146.934901266595f, - 10160.31915090622f, - 10173.707809786936f, - 10187.100875006496f, - 10200.498343667417f, - 10213.900212876984f, - 10227.306479747222f, - 10240.717141394889f, - 10254.132194941467f, - 10267.551637513146f, - 10280.975466240814f, - 10294.40367826004f, - 10307.836270711065f, - 10321.273240738796f, - 10334.71458549278f, - 10348.160302127204f, - 10361.610387800878f, - 10375.064839677221f, - 10388.523654924258f, - 10401.986830714592f, - 10415.454364225412f, - 10428.926252638465f, - 10442.402493140049f, - 10455.883082921007f, - 10469.368019176709f, - 10482.85729910704f, - 10496.350919916393f, - 10509.848878813653f, - 10523.351173012188f, - 10536.857799729838f, - 10550.368756188902f, - 10563.884039616121f, - 10577.403647242685f, - 10590.927576304197f, - 10604.455824040679f, - 10617.988387696556f, - 10631.525264520642f, - 10645.066451766135f, - 10658.611946690598f, - 10672.161746555956f, - 10685.715848628475f, - 10699.274250178762f, - 10712.836948481747f, - 10726.403940816675f, - 10739.97522446709f, - 10753.550796720836f, - 10767.130654870027f, - 10780.714796211058f, - 10794.303218044579f, - 10807.895917675487f, - 10821.492892412922f, - 10835.094139570248f, - 10848.699656465047f, - 10862.309440419107f, - 10875.923488758415f, - 10889.541798813138f, - 10903.16436791762f, - 10916.791193410372f, - 10930.422272634056f, - 10944.05760293548f, - 10957.697181665582f, - 10971.341006179427f, - 10984.98907383619f, - 10998.641381999149f, - 11012.297928035676f, - 11025.958709317223f, - 11039.623723219316f, - 11053.292967121542f, - 11066.96643840754f, - 11080.64413446499f, - 11094.326052685608f, - 11108.012190465128f, - 11121.702545203298f, - 11135.397114303863f, - 11149.09589517457f, - 11162.798885227143f, - 11176.506081877276f, - 11190.217482544635f, - 11203.933084652828f, - 11217.652885629415f, - 11231.376882905886f, - 11245.105073917659f, - 11258.837456104062f, - 11272.574026908333f, - 11286.314783777601f, - 11300.059724162888f, - 11313.808845519083f, - 11327.56214530495f, - 11341.319620983111f, - 11355.081270020033f, - 11368.847089886023f, - 11382.617078055218f, - 11396.391232005579f, - 11410.169549218874f, - 11423.952027180676f, - 11437.738663380347f, - 11451.529455311042f, - 11465.324400469679f, - 11479.123496356951f, - 11492.926740477304f, - 11506.734130338931f, - 11520.545663453764f, - 11534.361337337468f, - 11548.181149509423f, - 11562.005097492724f, - 11575.83317881417f, - 11589.665391004253f, - 11603.501731597149f, - 11617.342198130715f, - 11631.186788146468f, - 11645.03549918959f, - 11658.888328808911f, - 11672.745274556906f, - 11686.606333989675f, - 11700.471504666955f, - 11714.340784152086f, - 11728.214170012021f, - 11742.091659817312f, - 11755.9732511421f, - 11769.85894156411f, - 11783.748728664636f, - 11797.642610028539f, - 11811.540583244237f, - 11825.442645903695f, - 11839.34879560242f, - 11853.259029939445f, - 11867.173346517331f, - 11881.091742942153f, - 11895.014216823492f, - 11908.940765774427f, - 11922.871387411526f, - 11936.80607935484f, - 11950.744839227897f, - 11964.687664657684f, - 11978.634553274653f, - 11992.5855027127f, - 12006.540510609168f, - 12020.499574604826f, - 12034.462692343877f, - 12048.429861473938f, - 12062.401079646032f, - 12076.376344514589f, - 12090.355653737432f, - 12104.339004975769f, - 12118.326395894186f, - 12132.317824160644f, - 12146.313287446457f, - 12160.312783426303f, - 12174.316309778205f, - 12188.323864183525f, - 12202.335444326955f, - 12216.35104789651f, - 12230.37067258353f, - 12244.394316082657f, - 12258.421976091831f, - 12272.453650312296f, - 12286.489336448576f, - 12300.529032208471f, - 12314.57273530306f, - 12328.620443446678f, - 12342.672154356922f, - 12356.727865754638f, - 12370.78757536391f, - 12384.851280912055f, - 12398.918980129623f, - 12412.990670750381f, - 12427.066350511306f, - 12441.146017152583f, - 12455.229668417589f, - 12469.317302052901f, - 12483.408915808272f, - 12497.50450743663f, - 12511.604074694078f, - 12525.707615339878f, - 12539.815127136444f, - 12553.926607849342f, - 12568.042055247275f, - 12582.161467102082f, - 12596.284841188726f, - 12610.41217528529f, - 12624.54346717297f, - 12638.67871463607f, - 12652.817915461985f, - 12666.961067441209f, - 12681.108168367316f, - 12695.259216036962f, - 12709.41420824987f, - 12723.573142808826f, - 12737.73601751968f, - 12751.902830191326f, - 12766.073578635704f, - 12780.248260667788f, - 12794.426874105588f, - 12808.609416770132f, - 12822.795886485468f, - 12836.986281078653f, - 12851.180598379744f, - 12865.378836221802f, - 12879.580992440871f, - 12893.787064875982f, - 12907.997051369144f, - 12922.210949765336f, - 12936.428757912496f, - 12950.650473661524f, - 12964.876094866271f, - 12979.105619383532f, - 12993.33904507304f, - 13007.576369797454f, - 13021.817591422368f, - 13036.062707816287f, - 13050.311716850629f, - 13064.564616399723f, - 13078.821404340792f, - 13093.082078553954f, - 13107.346636922217f, - 13121.615077331466f, - 13135.887397670458f, - 13150.163595830825f, - 13164.44366970706f, - 13178.727617196502f, - 13193.015436199352f, - 13207.307124618648f, - 13221.602680360265f, - 13235.902101332911f, - 13250.20538544812f, - 13264.512530620239f, - 13278.823534766434f, - 13293.138395806676f, - 13307.457111663734f, - 13321.779680263176f, - 13336.106099533357f, - 13350.43636740541f, - 13364.770481813252f, - 13379.108440693562f, - 13393.450241985796f, - 13407.795883632158f, - 13422.145363577607f, - 13436.498679769855f, - 13450.855830159346f, - 13465.216812699266f, - 13479.58162534553f, - 13493.950266056772f, - 13508.32273279435f, - 13522.69902352233f, - 13537.079136207483f, - 13551.463068819285f, - 13565.850819329906f, - 13580.2423857142f, - 13594.637765949712f, - 13609.036958016655f, - 13623.439959897927f, - 13637.84676957908f, - 13652.257385048335f, - 13666.67180429656f, - 13681.090025317284f, - 13695.512046106669f, - 13709.93786466352f, - 13724.367478989278f, - 13738.800887088004f, - 13753.238086966387f, - 13767.679076633725f, - 13782.12385410194f, - 13796.572417385545f, - 13811.024764501659f, - 13825.480893469998f, - 13839.94080231286f, - 13854.404489055134f, - 13868.871951724283f, - 13883.34318835034f, - 13897.818196965914f, - 13912.296975606168f, - 13926.779522308825f, - 13941.26583511416f, - 13955.755912064991f, - 13970.24975120668f, - 13984.747350587126f, - 13999.248708256751f, - 14013.75382226851f, - 14028.262690677873f, - 14042.775311542828f, - 14057.291682923867f, - 14071.811802883994f, - 14086.335669488704f, - 14100.863280805994f, - 14115.39463490634f, - 14129.92972986271f, - 14144.468563750548f, - 14159.01113464777f, - 14173.55744063476f, - 14188.10747979437f, - 14202.6612502119f, - 14217.218749975118f, - 14231.779977174227f, - 14246.34492990188f, - 14260.913606253163f, - 14275.486004325601f, - 14290.062122219148f, - 14304.64195803617f, - 14319.225509881464f, - 14333.812775862236f, - 14348.403754088098f, - 14362.998442671067f, - 14377.59683972556f, - 14392.198943368388f, - 14406.804751718748f, - 14421.414262898223f, - 14436.027475030774f, - 14450.64438624274f, - 14465.264994662828f, - 14479.889298422106f, - 14494.517295654005f, - 14509.148984494313f, - 14523.784363081166f, - 14538.423429555049f, - 14553.066182058781f, - 14567.712618737527f, - 14582.362737738777f, - 14597.016537212348f, - 14611.674015310382f, - 14626.33517018734f, - 14640.999999999993f, - 14655.668502907418f, - 14670.340677071003f, - 14685.016520654426f, - 14699.69603182367f, - 14714.379208747f, - 14729.066049594967f, - 14743.756552540408f, - 14758.45071575843f, - 14773.148537426418f, - 14787.850015724018f, - 14802.555148833142f, - 14817.26393493796f, - 14831.976372224897f, - 14846.692458882624f, - 14861.41219310206f, - 14876.135573076363f, - 14890.862597000923f, - 14905.593263073371f, - 14920.327569493558f, - 14935.065514463557f, - 14949.807096187662f, - 14964.552312872382f, - 14979.301162726431f, - 14994.053643960735f, - 15008.809754788414f, - 15023.569493424788f, - 15038.33285808737f, - 15053.099846995858f, - 15067.870458372134f, - 15082.644690440264f, - 15097.422541426484f, - 15112.204009559202f, - 15126.989093068994f, - 15141.777790188597f, - 15156.570099152905f, - 15171.366018198967f, - 15186.165545565986f, - 15200.968679495301f, - 15215.775418230402f, - 15230.58576001691f, - 15245.39970310258f, - 15260.217245737298f, - 15275.038386173073f, - 15289.863122664035f, - 15304.691453466432f, - 15319.52337683862f, - 15334.358891041069f, - 15349.197994336348f, - 15364.040684989128f, - 15378.886961266177f, - 15393.736821436356f, - 15408.59026377061f, - 15423.447286541972f, - 15438.307888025554f, - 15453.172066498542f, - 15468.039820240196f, - 15482.91114753184f, - 15497.786046656869f, - 15512.664515900733f, - 15527.54655355094f, - 15542.432157897045f, - 15557.32132723066f, - 15572.214059845435f, - 15587.110354037064f, - 15602.010208103273f, - 15616.913620343823f, - 15631.820589060506f, - 15646.731112557136f, - 15661.645189139546f, - 15676.562817115593f, - 15691.483994795139f, - 15706.408720490062f, - 15721.336992514242f, - 15736.26880918356f, - 15751.2041688159f, - 15766.143069731135f, - 15781.085510251132f, - 15796.03148869974f, - 15810.981003402798f, - 15825.934052688119f, - 15840.890634885489f, - 15855.850748326673f, - 15870.8143913454f, - 15885.781562277361f, - 15900.752259460214f, - 15915.726481233565f, - 15930.704225938982f, - 15945.685491919978f, - 15960.67027752201f, - 15975.65858109248f, - 15990.65040098073f, - 16005.645735538035f, - 16020.644583117599f, - 16035.646942074556f, - 16050.652810765967f, - 16065.662187550806f, - 16080.675070789974f, - 16095.691458846273f, - 16110.711350084424f, - 16125.734742871053f, - 16140.761635574685f, - 16155.792026565747f, - 16170.82591421656f, - 16185.863296901338f, - 16200.904172996183f, - 16215.948540879079f, - 16230.9963989299f, - 16246.047745530386f, - 16261.102579064163f, - 16276.160897916721f, - 16291.22270047542f, - 16306.287985129484f, - 16321.356750269995f, - 16336.428994289896f, - 16351.504715583982f, - 16366.5839125489f, - 16381.66658358314f, - 16396.75272708704f, - 16411.842341462776f, - 16426.935425114363f, - 16442.031976447644f, - 16457.131993870298f, - 16472.23547579183f, - 16487.34242062356f, - 16502.45282677864f, - 16517.566692672033f, - 16532.684016720516f, - 16547.804797342676f, - 16562.929032958902f, - 16578.056721991394f, - 16593.18786286415f, - 16608.322454002962f, - 16623.460493835417f, - 16638.601980790896f, - 16653.746913300558f, - 16668.895289797354f, - 16684.047108716015f, - 16699.202368493046f, - 16714.361067566726f, - 16729.523204377107f, - 16744.68877736601f, - 16759.85778497701f, - 16775.030225655464f, - 16790.206097848466f, - 16805.385400004874f, - 16820.568130575302f, - 16835.754288012104f, - 16850.94387076938f, - 16866.136877302983f, - 16881.333306070494f, - 16896.53315553123f, - 16911.73642414625f, - 16926.94311037833f, - 16942.153212691992f, - 16957.366729553454f, - 16972.583659430682f, - 16987.804000793338f, - 17003.027752112816f, - 17018.254911862205f, - 17033.48547851631f, - 17048.719450551645f, - 17063.95682644642f, - 17079.197604680547f, - 17094.44178373563f, - 17109.689362094967f, - 17124.940338243552f, - 17140.19471066806f, - 17155.452477856852f, - 17170.713638299967f, - 17185.978190489128f, - 17201.246132917724f, - 17216.517464080825f, - 17231.792182475165f, - 17247.07028659914f, - 17262.351774952826f, - 17277.636646037936f, - 17292.924898357855f, - 17308.216530417623f, - 17323.51154072392f, - 17338.80992778509f, - 17354.111690111105f, - 17369.416826213594f, - 17384.72533460582f, - 17400.037213802683f, - 17415.352462320716f, - 17430.67107867809f, - 17445.993061394587f, - 17461.318408991636f, - 17476.647119992274f, - 17491.979192921164f, - 17507.314626304586f, - 17522.653418670423f, - 17537.995568548187f, - 17553.341074468986f, - 17568.689934965536f, - 17584.042148572156f, - 17599.39771382477f, - 17614.75662926089f, - 17630.118893419625f, - 17645.484504841683f, - 17660.853462069354f, - 17676.22576364651f, - 17691.60140811862f, - 17706.98039403272f, - 17722.362719937424f, - 17737.748384382936f, - 17753.137385921014f, - 17768.529723105f, - 17783.92539448979f, - 17799.324398631856f, - 17814.726734089225f, - 17830.13239942148f, - 17845.541393189767f, - 17860.95371395678f, - 17876.36936028677f, - 17891.788330745527f, - 17907.210623900395f, - 17922.636238320254f, - 17938.065172575527f, - 17953.497425238176f, - 17968.932994881692f, - 17984.371880081104f, - 17999.814079412972f, - 18015.25959145537f, - 18030.708414787914f, - 18046.16054799173f, - 18061.615989649465f, - 18077.074738345284f, - 18092.53679266486f, - 18108.002151195393f, - 18123.47081252557f, - 18138.9427752456f, - 18154.41803794719f, - 18169.896599223546f, - 18185.37845766938f, - 18200.863611880886f, - 18216.352060455767f, - 18231.843801993204f, - 18247.338835093873f, - 18262.837158359936f, - 18278.338770395032f, - 18293.84366980429f, - 18309.35185519431f, - 18324.863325173166f, - 18340.37807835041f, - 18355.89611333707f, - 18371.417428745623f, - 18386.942023190033f, - 18402.469895285714f, - 18418.00104364955f, - 18433.53546689987f, - 18449.073163656474f, - 18464.614132540602f, - 18480.158372174956f, - 18495.705881183676f, - 18511.25665819236f, - 18526.810701828035f, - 18542.368010719183f, - 18557.928583495715f, - 18573.492418788985f, - 18589.059515231773f, - 18604.629871458303f, - 18620.203486104212f, - 18635.78035780658f, - 18651.3604852039f, - 18666.943866936086f, - 18682.53050164448f, - 18698.12038797184f, - 18713.713524562332f, - 18729.30991006154f, - 18744.909543116457f, - 18760.51242237548f, - 18776.11854648842f, - 18791.72791410648f, - 18807.340523882274f, - 18822.95637446981f, - 18838.57546452449f, - 18854.19779270311f, - 18869.823357663863f, - 18885.452158066328f, - 18901.08419257147f, - 18916.71945984164f, - 18932.357958540564f, - 18947.999687333362f, - 18963.64464488652f, - 18979.292829867907f, - 18994.94424094676f, - 19010.598876793687f, - 19026.256736080668f, - 19041.917817481044f, - 19057.582119669532f, - 19073.2496413222f, - 19088.920381116473f, - 19104.594337731145f, - 19120.271509846356f, - 19135.951896143604f, - 19151.635495305738f, - 19167.322306016948f, - 19183.01232696278f, - 19198.705556830122f, - 19214.401994307198f, - 19230.10163808358f, - 19245.804486850167f, - 19261.510539299208f, - 19277.219794124274f, - 19292.932250020265f, - 19308.64790568342f, - 19324.366759811302f, - 19340.088811102793f, - 19355.8140582581f, - 19371.542499978754f, - 19387.2741349676f, - 19403.008961928797f, - 19418.746979567823f, - 19434.48818659147f, - 19450.232581707827f, - 19465.980163626304f, - 19481.730931057613f, - 19497.48488271376f, - 19513.242017308068f, - 19529.00233355514f, - 19544.765830170898f, - 19560.53250587254f, - 19576.302359378566f, - 19592.07538940876f, - 19607.85159468421f, - 19623.63097392727f, - 19639.41352586159f, - 19655.199249212103f, - 19670.988142705017f, - 19686.780205067822f, - 19702.57543502929f, - 19718.373831319448f, - 19734.175392669615f, - 19749.980117812374f, - 19765.78800548157f, - 19781.59905441232f, - 19797.413263341008f, - 19813.230631005274f, - 19829.051156144014f, - 19844.874837497395f, - 19860.701673806827f, - 19876.531663814985f, - 19892.36480626579f, - 19908.201099904407f, - 19924.04054347726f, - 19939.883135732012f, - 19955.72887541758f, - 19971.577761284105f, - 19987.429792082985f, - 20003.284966566847f, - 20019.14328348956f, - 20035.00474160622f, - 20050.86933967316f, - 20066.737076447942f, - 20082.60795068936f, - 20098.481961157428f, - 20114.359106613385f, - 20130.239385819703f, - 20146.122797540054f, - 20162.009340539353f, - 20177.899013583716f, - 20193.791815440476f, - 20209.68774487818f, - 20225.58680066659f, - 20241.48898157667f, - 20257.394286380597f, - 20273.302713851754f, - 20289.214262764715f, - 20305.128931895277f, - 20321.046720020415f, - 20336.967625918318f, - 20352.89164836836f, - 20368.818786151114f, - 20384.749038048347f, - 20400.68240284301f, - 20416.61887931925f, - 20432.55846626239f, - 20448.501162458953f, - 20464.44696669663f, - 20480.395877764302f, - 20496.347894452025f, - 20512.30301555103f, - 20528.261239853735f, - 20544.22256615372f, - 20560.18699324574f, - 20576.15451992572f, - 20592.125144990758f, - 20608.098867239107f, - 20624.075685470198f, - 20640.055598484618f, - 20656.038605084115f, - 20672.024704071595f, - 20688.013894251126f, - 20704.006174427926f, - 20720.00154340837f, - 20735.99999999999f, - 20752.001543011454f, - 20768.006171252597f, - 20784.013883534382f, - 20800.02467866893f, - 20816.038555469506f, - 20832.055512750507f, - 20848.075549327474f, - 20864.098664017085f, - 20880.12485563716f, - 20896.154123006647f, - 20912.186464945626f, - 20928.221880275312f, - 20944.260367818053f, - 20960.30192639731f, - 20976.346554837684f, - 20992.394251964895f, - 21008.445016605787f, - 21024.49884758832f, - 21040.555743741574f, - 21056.615703895754f, - 21072.67872688217f, - 21088.74481153325f, - 21104.813956682538f, - 21120.886161164683f, - 21136.96142381544f, - 21153.039743471683f, - 21169.12111897138f, - 21185.205549153605f, - 21201.293032858535f, - 21217.383568927453f, - 21233.47715620273f, - 21249.573793527845f, - 21265.67347974736f, - 21281.776213706937f, - 21297.881994253334f, - 21313.990820234398f, - 21330.102690499054f, - 21346.21760389733f, - 21362.335559280327f, - 21378.45655550024f, - 21394.580591410333f, - 21410.70766586496f, - 21426.837777719556f, - 21442.97092583063f, - 21459.10710905576f, - 21475.246326253604f, - 21491.388576283895f, - 21507.53385800743f, - 21523.682170286087f, - 21539.833511982797f, - 21555.987881961566f, - 21572.14527908746f, - 21588.305702226615f, - 21604.469150246216f, - 21620.63562201452f, - 21636.805116400832f, - 21652.97763227552f, - 21669.153168510005f, - 21685.331723976764f, - 21701.513297549318f, - 21717.697888102244f, - 21733.885494511167f, - 21750.07611565276f, - 21766.269750404736f, - 21782.46639764586f, - 21798.666056255934f, - 21814.8687251158f, - 21831.07440310734f, - 21847.283089113484f, - 21863.494782018177f, - 21879.709480706417f, - 21895.92718406423f, - 21912.147890978667f, - 21928.371600337818f, - 21944.598311030797f, - 21960.828021947746f, - 21977.06073197983f, - 21993.296440019243f, - 22009.535144959198f, - 22025.77684569393f, - 22042.02154111869f, - 22058.269230129757f, - 22074.51991162441f, - 22090.77358450096f, - 22107.030247658717f, - 22123.289899998013f, - 22139.552540420187f, - 22155.818167827587f, - 22172.08678112357f, - 22188.358379212495f, - 22204.632960999726f, - 22220.910525391642f, - 22237.1910712956f, - 22253.474597619977f, - 22269.761103274148f, - 22286.050587168473f, - 22302.343048214312f, - 22318.638485324027f, - 22334.936897410968f, - 22351.23828338947f, - 22367.54264217487f, - 22383.849972683485f, - 22400.16027383262f, - 22416.473544540568f, - 22432.789783726603f, - 22449.10899031099f, - 22465.431163214962f, - 22481.75630136074f, - 22498.084403671528f, - 22514.415469071497f, - 22530.749496485798f, - 22547.08648484056f, - 22563.42643306288f, - 22579.769340080824f, - 22596.115204823436f, - 22612.46402622072f, - 22628.815803203655f, - 22645.17053470418f, - 22661.5282196552f, - 22677.888856990587f, - 22694.25244564517f, - 22710.618984554734f, - 22726.988472656034f, - 22743.360908886778f, - 22759.736292185622f, - 22776.11462149219f, - 22792.495895747044f, - 22808.88011389172f, - 22825.26727486868f, - 22841.657377621348f, - 22858.050421094096f, - 22874.446404232243f, - 22890.845325982053f, - 22907.247185290722f, - 22923.651981106406f, - 22940.059712378195f, - 22956.470378056114f, - 22972.88397709113f, - 22989.300508435153f, - 23005.719971041017f, - 23022.1423638625f, - 23038.56768585431f, - 23054.99593597208f, - 23071.427113172387f, - 23087.86121641273f, - 23104.29824465153f, - 23120.738196848142f, - 23137.18107196285f, - 23153.626868956846f, - 23170.075586792263f, - 23186.52722443214f, - 23202.981780840448f, - 23219.439254982062f, - 23235.899645822796f, - 23252.362952329357f, - 23268.829173469378f, - 23285.298308211408f, - 23301.7703555249f, - 23318.245314380227f, - 23334.723183748658f, - 23351.203962602387f, - 23367.687649914504f, - 23384.174244659007f, - 23400.663745810794f, - 23417.15615234568f, - 23433.651463240367f, - 23450.14967747246f, - 23466.650794020472f, - 23483.154811863806f, - 23499.661729982763f, - 23516.171547358543f, - 23532.684262973235f, - 23549.19987580982f, - 23565.71838485219f, - 23582.23978908509f, - 23598.764087494194f, - 23615.29127906604f, - 23631.821362788058f, - 23648.354337648565f, - 23664.890202636765f, - 23681.428956742733f, - 23697.970598957443f, - 23714.51512827274f, - 23731.062543681343f, - 23747.612844176863f, - 23764.166028753774f, - 23780.72209640744f, - 23797.281046134085f, - 23813.842876930816f, - 23830.407587795606f, - 23846.975177727305f, - 23863.545645725622f, - 23880.11899079115f, - 23896.695211925336f, - 23913.2743081305f, - 23929.85627840982f, - 23946.441121767348f, - 23963.02883720799f, - 23979.619423737513f, - 23996.212880362546f, - 24012.809206090584f, - 24029.408399929966f, - 24046.0104608899f, - 24062.615387980433f, - 24079.223180212488f, - 24095.833836597827f, - 24112.447356149067f, - 24129.063737879667f, - 24145.682980803947f, - 24162.305083937077f, - 24178.930046295063f, - 24195.557866894764f, - 24212.18854475388f, - 24228.82207889096f, - 24245.45846832539f, - 24262.097712077397f, - 24278.73980916805f, - 24295.384758619257f, - 24312.03255945377f, - 24328.683210695162f, - 24345.33671136786f, - 24361.99306049711f, - 24378.652257108995f, - 24395.314300230442f, - 24411.979188889192f, - 24428.646922113825f, - 24445.317498933746f, - 24461.990918379193f, - 24478.66717948122f, - 24495.346281271726f, - 24512.028222783407f, - 24528.7130030498f, - 24545.40062110527f, - 24562.091075984976f, - 24578.784366724925f, - 24595.480492361927f, - 24612.179451933614f, - 24628.881244478434f, - 24645.585869035654f, - 24662.293324645343f, - 24679.003610348394f, - 24695.716725186514f, - 24712.43266820221f, - 24729.151438438807f, - 24745.873034940436f, - 24762.59745675203f, - 24779.324702919344f, - 24796.054772488926f, - 24812.787664508123f, - 24829.5233780251f, - 24846.26191208882f, - 24863.003265749034f, - 24879.747438056307f, - 24896.494428062004f, - 24913.244234818278f, - 24929.99685737808f, - 24946.752294795166f, - 24963.51054612408f, - 24980.271610420154f, - 24997.035486739525f, - 25013.802174139113f, - 25030.57167167663f, - 25047.343978410572f, - 25064.119093400237f, - 25080.897015705697f, - 25097.677744387816f, - 25114.46127850824f, - 25131.247617129404f, - 25148.036759314517f, - 25164.828704127583f, - 25181.62345063337f, - 25198.420997897447f, - 25215.221344986145f, - 25232.024490966574f, - 25248.83043490663f, - 25265.639175874974f, - 25282.45071294105f, - 25299.26504517507f, - 25316.082171648024f, - 25332.902091431668f, - 25349.724803598532f, - 25366.550307221914f, - 25383.378601375884f, - 25400.20968513527f, - 25417.04355757568f, - 25433.880217773472f, - 25450.719664805783f, - 25467.561897750507f, - 25484.406915686297f, - 25501.254717692573f, - 25518.10530284951f, - 25534.958670238055f, - 25551.814818939893f, - 25568.67374803748f, - 25585.535456614027f, - 25602.399943753502f, - 25619.26720854062f, - 25636.137250060856f, - 25653.01006740043f, - 25669.885659646327f, - 25686.76402588627f, - 25703.645165208734f, - 25720.529076702944f, - 25737.415759458876f, - 25754.305212567244f, - 25771.197435119517f, - 25788.0924262079f, - 25804.990184925344f, - 25821.890710365547f, - 25838.794001622948f, - 25855.700057792717f, - 25872.608877970775f, - 25889.52046125378f, - 25906.43480673912f, - 25923.351913524923f, - 25940.271780710063f, - 25957.194407394138f, - 25974.119792677477f, - 25991.047935661154f, - 26007.978835446964f, - 26024.912491137442f, - 26041.84890183584f, - 26058.788066646157f, - 26075.729984673108f, - 26092.674655022136f, - 26109.62207679941f, - 26126.57224911183f, - 26143.525171067016f, - 26160.480841773315f, - 26177.43926033979f, - 26194.40042587623f, - 26211.36433749315f, - 26228.330994301767f, - 26245.30039541404f, - 26262.272539942627f, - 26279.24742700092f, - 26296.225055703006f, - 26313.205425163702f, - 26330.18853449854f, - 26347.174382823756f, - 26364.162969256307f, - 26381.154292913852f, - 26398.148352914774f, - 26415.14514837815f, - 26432.144678423778f, - 26449.146942172156f, - 26466.151938744493f, - 26483.159667262702f, - 26500.170126849403f, - 26517.18331662792f, - 26534.199235722277f, - 26551.2178832572f, - 26568.239258358124f, - 26585.263360151173f, - 26602.29018776318f, - 26619.319740321676f, - 26636.352016954883f, - 26653.387016791727f, - 26670.424738961825f, - 26687.465182595493f, - 26704.508346823743f, - 26721.554230778267f, - 26738.602833591467f, - 26755.65415439643f, - 26772.70819232693f, - 26789.764946517433f, - 26806.824416103096f, - 26823.88660021976f, - 26840.95149800396f, - 26858.01910859291f, - 26875.089431124517f, - 26892.162464737365f, - 26909.23820857072f, - 26926.316661764547f, - 26943.39782345947f, - 26960.481692796813f, - 26977.56826891857f, - 26994.657550967422f, - 27011.74953808672f, - 27028.844229420498f, - 27045.941624113464f, - 27063.041721311005f, - 27080.14452015918f, - 27097.250019804727f, - 27114.35821939505f, - 27131.469118078236f, - 27148.58271500303f, - 27165.699009318858f, - 27182.818000175816f, - 27199.939686724665f, - 27217.064068116837f, - 27234.191143504428f, - 27251.320912040203f, - 27268.453372877593f, - 27285.588525170693f, - 27302.72636807427f, - 27319.866900743735f, - 27337.01012233518f, - 27354.156032005358f, - 27371.30462891167f, - 27388.455912212183f, - 27405.609881065626f, - 27422.766534631388f, - 27439.925872069507f, - 27457.087892540683f, - 27474.252595206275f, - 27491.419979228293f, - 27508.5900437694f, - 27525.762787992917f, - 27542.93821106281f, - 27560.116312143706f, - 27577.297090400876f, - 27594.480545000246f, - 27611.666675108383f, - 27628.855479892518f, - 27646.046958520514f, - 27663.24111016089f, - 27680.4379339828f, - 27697.637429156064f, - 27714.83959485113f, - 27732.04443023909f, - 27749.251934491687f, - 27766.4621067813f, - 27783.67494628095f, - 27800.8904521643f, - 27818.108623605658f, - 27835.329459779954f, - 27852.55295986278f, - 27869.779123030345f, - 27887.007948459504f, - 27904.239435327745f, - 27921.473582813196f, - 27938.710390094617f, - 27955.94985635139f, - 27973.19198076355f, - 27990.436762511745f, - 28007.684200777272f, - 28024.934294742037f, - 28042.1870435886f, - 28059.44244650013f, - 28076.700502660427f, - 28093.961211253933f, - 28111.224571465696f, - 28128.4905824814f, - 28145.759243487362f, - 28163.03055367051f, - 28180.304512218394f, - 28197.581118319198f, - 28214.860371161725f, - 28232.14226993539f, - 28249.426813830236f, - 28266.71400203693f, - 28284.003833746745f, - 28301.296308151585f, - 28318.59142444396f, - 28335.889181817f, - 28353.189579464466f, - 28370.492616580705f, - 28387.798292360705f, - 28405.10660600005f, - 28422.417556694945f, - 28439.73114364221f, - 28457.047366039264f, - 28474.36622308415f, - 28491.687713975512f, - 28509.01183791261f, - 28526.338594095305f, - 28543.66798172407f, - 28560.999999999985f, - 28578.33464812473f, - 28595.671925300605f, - 28613.0118307305f, - 28630.35436361791f, - 28647.699523166943f, - 28665.0473085823f, - 28682.39771906929f, - 28699.750753833818f, - 28717.10641208239f, - 28734.46469302212f, - 28751.82559586071f, - 28769.189119806462f, - 28786.55526406828f, - 28803.92402785566f, - 28821.2954103787f, - 28838.669410848088f, - 28856.046028475103f, - 28873.42526247163f, - 28890.80711205013f, - 28908.191576423673f, - 28925.578654805915f, - 28942.968346411097f, - 28960.360650454055f, - 28977.755566150212f, - 28995.15309271559f, - 29012.553229366786f, - 29029.955975320987f, - 29047.361329795975f, - 29064.769292010107f, - 29082.179861182336f, - 29099.593036532187f, - 29117.00881727978f, - 29134.427202645813f, - 29151.848191851568f, - 29169.27178411891f, - 29186.697978670283f, - 29204.126774728706f, - 29221.55817151779f, - 29238.992168261717f, - 29256.42876418525f, - 29273.867958513725f, - 29291.30975047306f, - 29308.754139289747f, - 29326.201124190855f, - 29343.65070440403f, - 29361.102879157483f, - 29378.557647680012f, - 29396.015009200975f, - 29413.47496295031f, - 29430.937508158524f, - 29448.402644056692f, - 29465.87036987647f, - 29483.34068485007f, - 29500.81358821028f, - 29518.289079190454f, - 29535.76715702451f, - 29553.247820946945f, - 29570.731070192807f, - 29588.216903997723f, - 29605.70532159787f, - 29623.19632223f, - 29640.68990513143f, - 29658.18606954003f, - 29675.684814694236f, - 29693.186139833047f, - 29710.690044196028f, - 29728.196527023298f, - 29745.705587555527f, - 29763.217225033964f, - 29780.731438700397f, - 29798.248227797183f, - 29815.76759156723f, - 29833.289529254005f, - 29850.81404010153f, - 29868.34112335438f, - 29885.870778257693f, - 29903.403004057145f, - 29920.937799998974f, - 29938.475165329975f, - 29956.01509929748f, - 29973.557601149394f, - 29991.102670134147f, - 30008.65030550074f, - 30026.20050649871f, - 30043.753272378144f, - 30061.308602389683f, - 30078.866495784507f, - 30096.426951814352f, - 30113.989969731494f, - 30131.55554878875f, - 30149.12368823949f, - 30166.69438733763f, - 30184.26764533761f, - 30201.843461494434f, - 30219.42183506364f, - 30237.00276530131f, - 30254.586251464058f, - 30272.172292809046f, - 30289.760888593977f, - 30307.35203807709f, - 30324.94574051716f, - 30342.541995173502f, - 30360.140801305966f, - 30377.742158174944f, - 30395.346065041358f, - 30412.952521166666f, - 30430.56152581286f, - 30448.173078242475f, - 30465.78717771856f, - 30483.40382350472f, - 30501.02301486507f, - 30518.644751064272f, - 30536.269031367516f, - 30553.895855040515f, - 30571.52522134952f, - 30589.157129561307f, - 30606.791578943175f, - 30624.428568762964f, - 30642.06809828903f, - 30659.71016679026f, - 30677.35477353607f, - 30695.00191779639f, - 30712.651598841687f, - 30730.303815942945f, - 30747.958568371676f, - 30765.615855399912f, - 30783.27567630021f, - 30800.938030345646f, - 30818.602916809814f, - 30836.270334966837f, - 30853.940284091354f, - 30871.61276345852f, - 30889.28777234401f, - 30906.965310024025f, - 30924.64537577527f, - 30942.327968874983f, - 30960.013088600903f, - 30977.700734231294f, - 30995.39090504493f, - 31013.0836003211f, - 31030.77881933962f, - 31048.476561380798f, - 31066.17682572547f, - 31083.87961165498f, - 31101.58491845118f, - 31119.29274539644f, - 31137.003091773637f, - 31154.715956866155f, - 31172.431339957893f, - 31190.14924033326f, - 31207.869657277162f, - 31225.592590075023f, - 31243.31803801277f, - 31261.04600037684f, - 31278.77647645417f, - 31296.50946553221f, - 31314.24496689891f, - 31331.98297984272f, - 31349.7235036526f, - 31367.466537618013f, - 31385.212081028923f, - 31402.960133175795f, - 31420.710693349596f, - 31438.46376084179f, - 31456.21933494435f, - 31473.977414949743f, - 31491.738000150934f, - 31509.50108984139f, - 31527.26668331507f, - 31545.034779866437f, - 31562.80537879045f, - 31580.578479382562f, - 31598.35408093872f, - 31616.13218275537f, - 31633.91278412945f, - 31651.695884358396f, - 31669.48148274013f, - 31687.269578573076f, - 31705.060171156143f, - 31722.853259788735f, - 31740.64884377075f, - 31758.446922402567f, - 31776.247494985066f, - 31794.050560819614f, - 31811.85611920806f, - 31829.664169452753f, - 31847.47471085652f, - 31865.287742722685f, - 31883.103264355046f, - 31900.9212750579f, - 31918.74177413602f, - 31936.56476089467f, - 31954.3902346396f, - 31972.21819467704f, - 31990.048640313704f, - 32007.881570856793f, - 32025.716985613984f, - 32043.554883893445f, - 32061.395265003815f, - 32079.238128254223f, - 32097.08347295427f, - 32114.93129841405f, - 32132.781603944117f, - 32150.634388855524f, - 32168.48965245979f, - 32186.347394068915f, - 32204.20761299537f, - 32222.07030855212f, - 32239.935480052583f, - 32257.80312681067f, - 32275.673248140767f, - 32293.54584335772f, - 32311.420911776862f, - 32329.298452713996f, - 32347.178465485395f, - 32365.060949407813f, - 32382.945903798463f, - 32400.83332797504f, - 32418.723221255706f, - 32436.615582959093f, - 32454.510412404306f, - 32472.407708910916f, - 32490.307471798966f, - 32508.20970038896f, - 32526.114394001877f, - 32544.021551959166f, - 32561.931173582732f, - 32579.843258194956f, - 32597.75780511868f, - 32615.67481367721f, - 32633.59428319433f, - 32651.51621299426f, - 32669.44060240171f, - 32687.367450741847f, - 32705.296757340297f, - 32723.228521523146f, - 32741.162742616943f, - 32759.099419948703f, - 32777.0385528459f, - 32794.980140636464f, - 32812.92418264879f, - 32830.87067821173f, - 32848.81962665459f, - 32866.77102730715f, - 32884.72487949962f, - 32902.68118256269f, - 32920.639935827494f, - 32938.60113862564f, - 32956.56479028918f, - 32974.53089015061f, - 32992.499437542894f, - 33010.47043179945f, - 33028.443872254145f, - 33046.41975824131f, - 33064.39808909571f, - 33082.37886415258f, - 33100.36208274759f, - 33118.34774421688f, - 33136.335847897026f, - 33154.32639312506f, - 33172.31937923847f, - 33190.31480557517f, - 33208.312671473555f, - 33226.31297627244f, - 33244.31571931111f, - 33262.320899929284f, - 33280.328517467125f, - 33298.33857126526f, - 33316.35106066475f, - 33334.36598500709f, - 33352.38334363424f, - 33370.40313588859f, - 33388.42536111299f, - 33406.45001865072f, - 33424.4771078455f, - 33442.50662804151f, - 33460.53857858335f, - 33478.57295881608f, - 33496.60976808519f, - 33514.64900573662f, - 33532.69067111674f, - 33550.734763572356f, - 33568.781282450735f, - 33586.83022709956f, - 33604.88159686697f, - 33622.93539110153f, - 33640.99160915224f, - 33659.05025036854f, - 33677.11131410032f, - 33695.17479969788f, - 33713.240706511984f, - 33731.309033893805f, - 33749.37978119497f, - 33767.45294776753f, - 33785.528532963974f, - 33803.60653613721f, - 33821.6869566406f, - 33839.76979382794f, - 33857.855047053425f, - 33875.94271567171f, - 33894.03279903787f, - 33912.12529650743f, - 33930.220207436316f, - 33948.31753118089f, - 33966.41726709796f, - 33984.519414544746f, - 34002.6239728789f, - 34020.73094145851f, - 34038.84031964208f, - 34056.952106788536f, - 34075.066302257255f, - 34093.182905408015f, - 34111.30191560103f, - 34129.42333219693f, - 34147.547154556785f, - 34165.67338204208f, - 34183.80201401472f, - 34201.93304983703f, - 34220.06648887178f, - 34238.20233048214f, - 34256.3405740317f, - 34274.481218884495f, - 34292.62426440495f, - 34310.76970995794f, - 34328.91755490873f, - 34347.06779862303f, - 34365.220440466954f, - 34383.37547980705f, - 34401.53291601026f, - 34419.69274844397f, - 34437.85497647597f, - 34456.01959947445f, - 34474.18661680806f, - 34492.35602784582f, - 34510.527831957195f, - 34528.70202851205f, - 34546.87861688068f, - 34565.05759643377f, - 34583.23896654245f, - 34601.42272657823f, - 34619.608875913065f, - 34637.797413919296f, - 34655.98833996969f, - 34674.18165343742f, - 34692.37735369608f, - 34710.57544011967f, - 34728.77591208258f, - 34746.97876895965f, - 34765.18401012608f, - 34783.39163495754f, - 34801.60164283005f, - 34819.81403312006f, - 34838.028805204456f, - 34856.24595846048f, - 34874.46549226582f, - 34892.68740599856f, - 34910.91169903718f, - 34929.138370760564f, - 34947.36742054803f, - 34965.59884777927f, - 34983.8326518344f, - 35002.06883209391f, - 35020.30738793874f, - 35038.54831875018f, - 35056.79162390998f, - 35075.03730280025f, - 35093.285354803505f, - 35111.53577930269f, - 35129.788575681116f, - 35148.043743322516f, - 35166.30128161101f, - 35184.56118993114f, - 35202.823467667826f, - 35221.08811420639f, - 35239.355128932555f, - 35257.62451123245f, - 35275.896260492584f, - 35294.170376099886f, - 35312.44685744167f, - 35330.72570390563f, - 35349.00691487989f, - 35367.290489752944f, - 35385.576427913686f, - 35403.86472875142f, - 35422.15539165581f, - 35440.44841601697f, - 35458.74380122534f, - 35477.041546671804f, - 35495.34165174762f, - 35513.644115844436f, - 35531.948938354304f, - 35550.256118669655f, - 35568.56565618331f, - 35586.8775502885f, - 35605.191800378816f, - 35623.50840584827f, - 35641.82736609124f, - 35660.148680502505f, - 35678.47234847723f, - 35696.79836941098f, - 35715.12674269968f, - 35733.45746773966f, - 35751.790543927644f, - 35770.12597066074f, - 35788.46374733642f, - 35806.80387335257f, - 35825.14634810745f, - 35843.49117099971f, - 35861.83834142837f, - 35880.18785879285f, - 35898.539722492955f, - 35916.89393192886f, - 35935.25048650113f, - 35953.60938561072f, - 35971.97062865896f, - 35990.33421504756f, - 36008.70014417861f, - 36027.068415454596f, - 36045.43902827837f, - 36063.81198205317f, - 36082.18727618261f, - 36100.564910070694f, - 36118.94488312179f, - 36137.327194740654f, - 36155.71184433243f, - 36174.09883130262f, - 36192.488155057115f, - 36210.87981500219f, - 36229.27381054447f, - 36247.670141091f, - 36266.06880604917f, - 36284.46980482674f, - 36302.87313683186f, - 36321.27880147307f, - 36339.68679815925f, - 36358.09712629968f, - 36376.50978530401f, - 36394.924774582265f, - 36413.342093544816f, - 36431.761741602444f, - 36450.18371816629f, - 36468.60802264786f, - 36487.03465445903f, - 36505.46361301206f, - 36523.89489771958f, - 36542.32850799458f, - 36560.76444325041f, - 36579.20270290083f, - 36597.643286359926f, - 36616.08619304218f, - 36634.53142236244f, - 36652.978973735895f, - 36671.42884657814f, - 36689.881040305125f, - 36708.33555433315f, - 36726.7923880789f, - 36745.25154095943f, - 36763.71301239214f, - 36782.17680179481f, - 36800.64290858559f, - 36819.11133218299f, - 36837.58207200587f, - 36856.05512747348f, - 36874.53049800542f, - 36893.00818302165f, - 36911.488181942506f, - 36929.970494188674f, - 36948.455119181206f, - 36966.94205634152f, - 36985.43130509139f, - 37003.92286485296f, - 37022.41673504873f, - 37040.91291510156f, - 37059.411404434664f, - 37077.91220247162f, - 37096.41530863639f, - 37114.92072235324f, - 37133.42844304686f, - 37151.93847014225f, - 37170.450803064785f, - 37188.96544124021f, - 37207.4823840946f, - 37226.0016310544f, - 37244.52318154643f, - 37263.04703499784f, - 37281.57319083615f, - 37300.101648489224f, - 37318.632407385296f, - 37337.165466952945f, - 37355.70082662111f, - 37374.238485819085f, - 37392.77844397651f, - 37411.320700523385f, - 37429.86525489006f, - 37448.41210650723f, - 37466.96125480597f, - 37485.51269921768f, - 37504.066439174116f, - 37522.622474107404f, - 37541.18080344999f, - 37559.741426634704f, - 37578.30434309469f, - 37596.86955226349f, - 37615.43705357494f, - 37634.00684646328f, - 37652.578930363044f, - 37671.153304709165f, - 37689.729968936896f, - 37708.30892248185f, - 37726.890164779965f, - 37745.47369526756f, - 37764.059513381275f, - 37782.64761855811f, - 37801.238010235415f, - 37819.83068785086f, - 37838.425650842495f, - 37857.02289864869f, - 37875.62243070817f, - 37894.22424646001f, - 37912.828345343616f, - 37931.43472679875f, - 37950.043390265506f, - 37968.65433518433f, - 37987.267560996f, - 38005.883067141665f, - 38024.500853062775f, - 38043.12091820116f, - 38061.74326199896f, - 38080.36788389868f, - 38098.99478334316f, - 38117.62395977556f, - 38136.25541263942f, - 38154.889141378575f, - 38173.525145437234f, - 38192.16342425994f, - 38210.80397729155f, - 38229.44680397729f, - 38248.0919037627f, - 38266.739276093685f, - 38285.388920416466f, - 38304.040836177606f, - 38322.695022824f, - 38341.3514798029f, - 38360.01020656186f, - 38378.671202548816f, - 38397.33446721199f, - 38415.99999999998f, - 38434.66780036168f, - 38453.33786774637f, - 38472.01020160361f, - 38490.68480138334f, - 38509.361666535784f, - 38528.04079651155f, - 38546.72219076155f, - 38565.405848737035f, - 38584.091769889594f, - 38602.77995367113f, - 38621.47039953391f, - 38640.163106930486f, - 38658.858075313794f, - 38677.55530413706f, - 38696.25479285386f, - 38714.956540918094f, - 38733.66054778399f, - 38752.36681290611f, - 38771.07533573935f, - 38789.78611573892f, - 38808.49915236037f, - 38827.21444505957f, - 38845.93199329274f, - 38864.65179651639f, - 38883.37385418738f, - 38902.098165762916f, - 38920.824730700486f, - 38939.55354845794f, - 38958.28461849343f, - 38977.01794026546f, - 38995.753513232834f, - 39014.4913368547f, - 39033.23141059052f, - 39051.97373390007f, - 39070.718306243485f, - 39089.46512708119f, - 39108.214195873945f, - 39126.96551208283f, - 39145.71907516926f, - 39164.474884594965f, - 39183.23293982199f, - 39201.99324031271f, - 39220.755785529815f, - 39239.52057493633f, - 39258.28760799559f, - 39277.05688417125f, - 39295.82840292729f, - 39314.60216372801f, - 39333.37816603802f, - 39352.15640932227f, - 39370.936893046004f, - 39389.71961667481f, - 39408.50457967458f, - 39427.29178151152f, - 39446.08122165217f, - 39464.87289956337f, - 39483.66681471229f, - 39502.46296656641f, - 39521.26135459354f, - 39540.06197826178f, - 39558.86483703957f, - 39577.669930395656f, - 39596.47725779911f, - 39615.2868187193f, - 39634.09861262592f, - 39652.91263898899f, - 39671.72889727882f, - 39690.547386966064f, - 39709.36810752165f, - 39728.19105841686f, - 39747.01623912326f, - 39765.84364911275f, - 39784.67328785753f, - 39803.505154830105f, - 39822.33924950332f, - 39841.17557135029f, - 39860.0141198445f, - 39878.85489445968f, - 39897.69789466991f, - 39916.54311994958f, - 39935.39056977337f, - 39954.2402436163f, - 39973.092140953675f, - 39991.94626126112f, - 40010.80260401455f, - 40029.661168690225f, - 40048.52195476468f, - 40067.38496171478f, - 40086.25018901768f, - 40105.117636150855f, - 40123.98730259209f, - 40142.85918781947f, - 40161.73329131138f, - 40180.60961254653f, - 40199.48815100391f, - 40218.368906162854f, - 40237.25187750296f, - 40256.13706450415f, - 40275.02446664667f, - 40293.91408341103f, - 40312.805914278084f, - 40331.69995872896f, - 40350.5962162451f, - 40369.49468630827f, - 40388.39536840051f, - 40407.29826200417f, - 40426.20336660192f, - 40445.110681676706f, - 40464.02020671179f, - 40482.93194119075f, - 40501.84588459744f, - 40520.76203641603f, - 40539.680396130985f, - 40558.60096322707f, - 40577.52373718937f, - 40596.448717503234f, - 40615.37590365434f, - 40634.30529512866f, - 40653.23689141245f, - 40672.170691992294f, - 40691.10669635505f, - 40710.04490398787f, - 40728.98531437824f, - 40747.9279270139f, - 40766.87274138292f, - 40785.81975697365f, - 40804.768973274746f, - 40823.72038977516f, - 40842.67400596413f, - 40861.62982133121f, - 40880.58783536623f, - 40899.54804755933f, - 40918.51045740093f, - 40937.47506438176f, - 40956.44186799285f, - 40975.4108677255f, - 40994.38206307133f, - 41013.355453522236f, - 41032.33103857042f, - 41051.30881770836f, - 41070.288790428865f, - 41089.27095622499f, - 41108.25531459011f, - 41127.24186501789f, - 41146.23060700229f, - 41165.22154003754f, - 41184.2146636182f, - 41203.20997723908f, - 41222.20748039531f, - 41241.2071725823f, - 41260.20905329575f, - 41279.21312203166f, - 41298.2193782863f, - 41317.227821556255f, - 41336.23845133838f, - 41355.25126712983f, - 41374.26626842804f, - 41393.28345473074f, - 41412.30282553595f, - 41431.32438034198f, - 41450.34811864742f, - 41469.374039951144f, - 41488.40214375233f, - 41507.43242955043f, - 41526.46489684518f, - 41545.49954513663f, - 41564.536373925075f, - 41583.575382711126f, - 41602.61657099567f, - 41621.659938279874f, - 41640.705484065205f, - 41659.7532078534f, - 41678.803109146495f, - 41697.8551874468f, - 41716.90944225691f, - 41735.96587307971f, - 41755.02447941836f, - 41774.085260776315f, - 41793.1482166573f, - 41812.21334656533f, - 41831.280650004715f, - 41850.350126480014f, - 41869.42177549611f, - 41888.49559655813f, - 41907.571589171515f, - 41926.64975284196f, - 41945.73008707546f, - 41964.812591378286f, - 41983.89726525698f, - 42002.98410821838f, - 42022.07311976959f, - 42041.164299418015f, - 42060.25764667131f, - 42079.35316103742f, - 42098.45084202459f, - 42117.550689141324f, - 42136.652701896404f, - 42155.75687979889f, - 42174.86322235814f, - 42193.97172908376f, - 42213.082399485655f, - 42232.195233074f, - 42251.310229359246f, - 42270.42738785213f, - 42289.546708063644f, - 42308.66818950508f, - 42327.791831687995f, - 42346.91763412423f, - 42366.04559632589f, - 42385.17571780535f, - 42404.307998075295f, - 42423.44243664864f, - 42442.57903303861f, - 42461.71778675867f, - 42480.858697322605f, - 42500.00176424442f, - 42519.146987038446f, - 42538.29436521925f, - 42557.44389830169f, - 42576.59558580088f, - 42595.74942723224f, - 42614.90542211142f, - 42634.06356995438f, - 42653.22387027732f, - 42672.386322596736f, - 42691.55092642938f, - 42710.71768129229f, - 42729.88658670276f, - 42749.05764217836f, - 42768.23084723694f, - 42787.4062013966f, - 42806.58370417574f, - 42825.76335509299f, - 42844.945153667286f, - 42864.129099417805f, - 42883.315191864014f, - 42902.50343052565f, - 42921.69381492269f, - 42940.88634457541f, - 42960.08101900435f, - 42979.2778377303f, - 42998.47680027432f, - 43017.67790615777f, - 43036.881154902236f, - 43056.08654602958f, - 43075.29407906196f, - 43094.50375352177f, - 43113.71556893167f, - 43132.9295248146f, - 43152.14562069376f, - 43171.36385609262f, - 43190.58423053491f, - 43209.80674354462f, - 43229.031394646016f, - 43248.25818336362f, - 43267.487109222224f, - 43286.71817174688f, - 43305.951370462906f, - 43325.18670489588f, - 43344.42417457165f, - 43363.66377901632f, - 43382.90551775626f, - 43402.1493903181f, - 43421.39539622875f, - 43440.64353501535f, - 43459.89380620532f, - 43479.146209326354f, - 43498.40074390638f, - 43517.657409473606f, - 43536.916205556496f, - 43556.177131683784f, - 43575.44018738444f, - 43594.705372187724f, - 43613.972685623135f, - 43633.24212722044f, - 43652.51369650967f, - 43671.78739302109f, - 43691.06321628527f, - 43710.341165833f, - 43729.621241195346f, - 43748.903441903625f, - 43768.18776748941f, - 43787.474217484545f, - 43806.762791421126f, - 43826.0534888315f, - 43845.34630924828f, - 43864.641252204325f, - 43883.938317232765f, - 43903.23750386697f, - 43922.538811640596f, - 43941.84224008751f, - 43961.14778874188f, - 43980.4554571381f, - 43999.765244810835f, - 44019.077151295f, - 44038.391176125755f, - 44057.70731883854f, - 44077.02557896902f, - 44096.34595605314f, - 44115.66844962708f, - 44134.99305922729f, - 44154.319784390456f, - 44173.648624653535f, - 44192.97957955373f, - 44212.31264862849f, - 44231.64783141553f, - 44250.985127452805f, - 44270.32453627854f, - 44289.66605743118f, - 44309.009690449464f, - 44328.355434872356f, - 44347.703290239064f, - 44367.05325608907f, - 44386.40533196211f, - 44405.75951739814f, - 44425.11581193739f, - 44444.47421512033f, - 44463.834726487694f, - 44483.19734558046f, - 44502.56207193984f, - 44521.92890510733f, - 44541.297844624634f, - 44560.66889003373f, - 44580.042040876855f, - 44599.417296696454f, - 44618.794657035265f, - 44638.174121436256f, - 44657.55568944264f, - 44676.93936059787f, - 44696.32513444567f, - 44715.71301053f, - 44735.102988395054f, - 44754.495067585296f, - 44773.88924764542f, - 44793.285528120374f, - 44812.683908555344f, - 44832.08438849578f, - 44851.48696748736f, - 44870.891645076015f, - 44890.298420807914f, - 44909.70729422949f, - 44929.11826488741f, - 44948.531332328566f, - 44967.946496100136f, - 44987.36375574951f, - 45006.783110824326f, - 45026.20456087247f, - 45045.6281054421f, - 45065.05374408157f, - 45084.48147633949f, - 45103.91130176475f, - 45123.34321990643f, - 45142.777230313885f, - 45162.21333253671f, - 45181.65152612473f, - 45201.09181062803f, - 45220.53418559692f, - 45239.978650581965f, - 45259.42520513396f, - 45278.87384880394f, - 45298.32458114319f, - 45317.777401703235f, - 45337.23231003585f, - 45356.68930569302f, - 45376.148388227f, - 45395.60955719027f, - 45415.07281213556f, - 45434.53815261583f, - 45454.00557818428f, - 45473.47508839436f, - 45492.946682799746f, - 45512.42036095436f, - 45531.89612241236f, - 45551.373966728155f, - 45570.85389345636f, - 45590.33590215187f, - 45609.819992369776f, - 45629.30616366544f, - 45648.79441559444f, - 45668.28474771261f, - 45687.777159576006f, - 45707.27165074092f, - 45726.76822076389f, - 45746.26686920169f, - 45765.76759561132f, - 45785.270399550034f, - 45804.7752805753f, - 45824.28223824482f, - 45843.79127211657f, - 45863.30238174872f, - 45882.81556669969f, - 45902.33082652812f, - 45921.84816079293f, - 45941.367569053225f, - 45960.889050868354f, - 45980.41260579793f, - 45999.93823340176f, - 46019.4659332399f, - 46038.99570487266f, - 46058.52754786055f, - 46078.06146176433f, - 46097.597446144995f, - 46117.135500563774f, - 46136.67562458211f, - 46156.2178177617f, - 46175.76207966446f, - 46195.30840985254f, - 46214.85680788833f, - 46234.40727333444f, - 46253.95980575372f, - 46273.51440470924f, - 46293.07106976431f, - 46312.62980048248f, - 46332.1905964275f, - 46351.75345716338f, - 46371.31838225435f, - 46390.88537126487f, - 46410.45442375962f, - 46430.025539303526f, - 46449.59871746173f, - 46469.17395779962f, - 46488.75125988279f, - 46508.33062327707f, - 46527.91204754854f, - 46547.49553226347f, - 46567.0810769884f, - 46586.66868129006f, - 46606.258344735434f, - 46625.850066891726f, - 46645.44384732635f, - 46665.039685606986f, - 46684.6375813015f, - 46704.237533978005f, - 46723.83954320484f, - 46743.44360855057f, - 46763.04972958399f, - 46782.657905874104f, - 46802.26813699017f, - 46821.88042250163f, - 46841.494761978196f, - 46861.111154989776f, - 46880.72960110652f, - 46900.3500998988f, - 46919.9726509372f, - 46939.597253792526f, - 46959.22390803584f, - 46978.8526132384f, - 46998.48336897169f, - 47018.11617480742f, - 47037.75103031755f, - 47057.38793507422f, - 47077.02688864981f, - 47096.66789061694f, - 47116.31094054843f, - 47135.95603801733f, - 47155.60318259692f, - 47175.2523738607f, - 47194.903611382375f, - 47214.5568947359f, - 47234.21222349542f, - 47253.86959723534f, - 47273.52901553025f, - 47293.19047795498f, - 47312.85398408458f, - 47332.519533494306f, - 47352.187125759665f, - 47371.85676045634f, - 47391.52843716029f, - 47411.20215544765f, - 47430.877914894794f, - 47450.5557150783f, - 47470.23555557498f, - 47489.91743596186f, - 47509.6013558162f, - 47529.28731471546f, - 47548.97531223731f, - 47568.66534795967f, - 47588.35742146065f, - 47608.051532318605f, - 47627.74768011208f, - 47647.445864419846f, - 47667.14608482091f, - 47686.848340894474f, - 47706.55263221997f, - 47726.258958377046f, - 47745.96731894555f, - 47765.67771350559f, - 47785.39014163743f, - 47805.104602921594f, - 47824.821096938824f, - 47844.539623270044f, - 47864.26018149643f, - 47883.98277119934f, - 47903.70739196039f, - 47923.43404336137f, - 47943.162724984315f, - 47962.89343641144f, - 47982.62617722522f, - 48002.36094700831f, - 48022.0977453436f, - 48041.83657181417f, - 48061.57742600335f, - 48081.32030749465f, - 48101.065215871815f, - 48120.81215071879f, - 48140.56111161974f, - 48160.31209815905f, - 48180.0651099213f, - 48199.82014649131f, - 48219.57720745407f, - 48239.336292394844f, - 48259.097400899045f, - 48278.86053255234f, - 48298.62568694059f, - 48318.392863649875f, - 48338.16206226648f, - 48357.933282376915f, - 48377.70652356789f, - 48397.48178542632f, - 48417.259067539344f, - 48437.0383694943f, - 48456.819690878765f, - 48476.60303128049f, - 48496.38839028745f, - 48516.17576748783f, - 48535.96516247005f, - 48555.756574822684f, - 48575.550004134566f, - 48595.34544999472f, - 48615.14291199238f, - 48634.94238971699f, - 48654.7438827582f, - 48674.54739070588f, - 48694.35291315008f, - 48714.16044968111f, - 48733.969999889436f, - 48753.78156336576f, - 48773.59513970098f, - 48793.41072848621f, - 48813.22832931277f, - 48833.04794177219f, - 48852.86956545619f, - 48872.69319995672f, - 48892.51884486592f, - 48912.346499776155f, - 48932.176164279976f, - 48952.00783797016f, - 48971.84152043966f, - 48991.677211281676f, - 49011.51491008959f, - 49031.354616456985f, - 49051.196329977654f, - 49071.04005024561f, - 49090.88577685506f, - 49110.73350940041f, - 49130.58324747627f, - 49150.43499067749f, - 49170.28873859906f, - 49190.14449083623f, - 49210.00224698444f, - 49229.86200663932f, - 49249.72376939672f, - 49269.587534852675f, - 49289.45330260345f, - 49309.32107224548f, - 49329.19084337544f, - 49349.06261559019f, - 49368.936388486785f, - 49388.81216166249f, - 49408.689934714785f, - 49428.569707241324f, - 49448.45147883999f, - 49468.33524910886f, - 49488.22101764621f, - 49508.10878405052f, - 49527.99854792047f, - 49547.89030885494f, - 49567.78406645301f, - 49587.67982031398f, - 49607.57757003732f, - 49627.47731522272f, - 49647.37905547007f, - 49667.28279037946f, - 49687.18851955118f, - 49707.09624258571f, - 49727.00595908374f, - 49746.917668646165f, - 49766.83137087407f, - 49786.747065368734f, - 49806.66475173166f, - 49826.58442956452f, - 49846.5060984692f, - 49866.429758047794f, - 49886.35540790258f, - 49906.28304763604f, - 49926.212676850846f, - 49946.14429514988f, - 49966.077902136225f, - 49986.01349741315f, - 50005.951080584135f, - 50025.890651252834f, - 50045.83220902312f, - 50065.77575349907f, - 50085.72128428493f, - 50105.668800985164f, - 50125.61830320443f, - 50145.569790547575f, - 50165.52326261965f, - 50185.4787190259f, - 50205.43615937177f, - 50225.39558326289f, - 50245.3569903051f, - 50265.32038010443f, - 50285.2857522671f, - 50305.25310639953f, - 50325.22244210834f, - 50345.193759000336f, - 50365.16705668252f, - 50385.1423347621f, - 50405.11959284647f, - 50425.09883054322f, - 50445.08004746013f, - 50465.06324320518f, - 50485.04841738654f, - 50505.03556961258f, - 50525.024699491856f, - 50545.01580663313f, - 50565.00889064534f, - 50585.00395113762f, - 50605.00098771933f, - 50624.99999999997f, - 50645.00098758927f, - 50665.00395009713f, - 50685.00888713368f, - 50705.01579830919f, - 50725.024683234165f, - 50745.03554151928f, - 50765.04837277541f, - 50785.06317661362f, - 50805.07995264516f, - 50825.09870048149f, - 50845.11941973424f, - 50865.142110015244f, - 50885.16677093652f, - 50905.19340211028f, - 50925.222003148934f, - 50945.25257366507f, - 50965.28511327147f, - 50985.31962158112f, - 51005.356098207165f, - 51025.39454276298f, - 51045.434954862096f, - 51065.477334118244f, - 51085.521680145364f, - 51105.567992557546f, - 51125.61627096911f, - 51145.66651499454f, - 51165.71872424852f, - 51185.77289834591f, - 51205.82903690178f, - 51225.88713953136f, - 51245.947205850105f, - 51266.00923547362f, - 51286.07322801772f, - 51306.1391830984f, - 51326.207100331856f, - 51346.27697933445f, - 51366.348819722756f, - 51386.42262111351f, - 51406.49838312366f, - 51426.57610537032f, - 51446.655787470794f, - 51466.73742904259f, - 51486.82102970338f, - 51506.90658907105f, - 51526.99410676363f, - 51547.08358239939f, - 51567.17501559674f, - 51587.2684059743f, - 51607.36375315086f, - 51627.461056745415f, - 51647.56031637713f, - 51667.66153166536f, - 51687.76470222966f, - 51707.86982768973f, - 51727.9769076655f, - 51748.085941777055f, - 51768.19692964468f, - 51788.309870888836f, - 51808.42476513017f, - 51828.54161198952f, - 51848.660411087905f, - 51868.781162046515f, - 51888.90386448674f, - 51909.02851803014f, - 51929.155122298485f, - 51949.28367691369f, - 51969.41418149788f, - 51989.54663567335f, - 52009.68103906259f, - 52029.81739128826f, - 52049.95569197321f, - 52070.09594074048f, - 52090.23813721327f, - 52110.38228101499f, - 52130.5283717692f, - 52150.676409099666f, - 52170.82639263033f, - 52190.97832198532f, - 52211.13219678893f, - 52231.288016665654f, - 52251.44578124015f, - 52271.60549013727f, - 52291.76714298204f, - 52311.93073939967f, - 52332.096279015546f, - 52352.26376145525f, - 52372.43318634451f, - 52392.604553309284f, - 52412.777861975665f, - 52432.953111969946f, - 52453.130302918595f, - 52473.30943444827f, - 52493.49050618579f, - 52513.67351775817f, - 52533.858468792605f, - 52554.04535891645f, - 52574.23418775725f, - 52594.42495494274f, - 52614.61766010081f, - 52634.81230285956f, - 52655.00888284723f, - 52675.20739969227f, - 52695.407853023295f, - 52715.6102424691f, - 52735.81456765866f, - 52756.02082822111f, - 52776.229023785796f, - 52796.439153982225f, - 52816.65121844006f, - 52836.86521678917f, - 52857.0811486596f, - 52877.29901368155f, - 52897.518811485425f, - 52917.74054170177f, - 52937.96420396135f, - 52958.18979789508f, - 52978.41732313405f, - 52998.64677930953f, - 53018.87816605298f, - 53039.111482996006f, - 53059.34672977042f, - 53079.58390600819f, - 53099.82301134148f, - 53120.0640454026f, - 53140.30700782406f, - 53160.55189823853f, - 53180.79871627886f, - 53201.04746157809f, - 53221.2981337694f, - 53241.550732486176f, - 53261.805257361964f, - 53282.06170803049f, - 53302.32008412564f, - 53322.58038528149f, - 53342.8426111323f, - 53363.10676131247f, - 53383.3728354566f, - 53403.64083319945f, - 53423.91075417597f, - 53444.18259802126f, - 53464.45636437061f, - 53484.73205285948f, - 53505.0096631235f, - 53525.28919479847f, - 53545.57064752036f, - 53565.85402092533f, - 53586.1393146497f, - 53606.426528329954f, - 53626.715661602764f, - 53647.00671410496f, - 53667.299685473554f, - 53687.59457534572f, - 53707.891383358816f, - 53728.19010915037f, - 53748.490752358055f, - 53768.79331261975f, - 53789.0977895735f, - 53809.404182857485f, - 53829.712492110106f, - 53850.0227169699f, - 53870.33485707559f, - 53890.648912066055f, - 53910.96488158037f, - 53931.28276525774f, - 53951.60256273758f, - 53971.92427365946f, - 53992.24789766311f, - 54012.57343438844f, - 54032.90088347553f, - 54053.23024456462f, - 54073.561517296126f, - 54093.894701310644f, - 54114.22979624891f, - 54134.566801751855f, - 54154.90571746057f, - 54175.246543016314f, - 54195.589278060506f, - 54215.933922234755f, - 54236.280475180814f, - 54256.62893654063f, - 54276.97930595628f, - 54297.331583070045f, - 54317.68576752436f, - 54338.04185896183f, - 54358.399857025215f, - 54378.75976135746f, - 54399.12157160167f, - 54419.48528740111f, - 54439.850908399225f, - 54460.218434239614f, - 54480.587864566056f, - 54500.95919902248f, - 54521.332437253f, - 54541.70757890188f, - 54562.084623613555f, - 54582.46357103264f, - 54602.844420803885f, - 54623.227172572246f, - 54643.61182598281f, - 54663.99838068084f, - 54684.38683631177f, - 54704.7771925212f, - 54725.1694489549f, - 54745.56360525877f, - 54765.95966107893f, - 54786.357616061614f, - 54806.757469853255f, - 54827.15922210044f, - 54847.56287244991f, - 54867.96842054858f, - 54888.375866043534f, - 54908.78520858201f, - 54929.19644781142f, - 54949.60958337932f, - 54970.02461493346f, - 54990.44154212173f, - 55010.86036459218f, - 55031.28108199306f, - 55051.70369397273f, - 55072.12820017975f, - 55092.55460026284f, - 55112.98289387087f, - 55133.41308065288f, - 55153.84516025806f, - 55174.27913233579f, - 55194.714996535586f, - 55215.15275250714f, - 55235.5923999003f, - 55256.033938365086f, - 55276.477367551655f, - 55296.92268711036f, - 55317.369896691685f, - 55337.818995946305f, - 55358.269984525024f, - 55378.72286207883f, - 55399.17762825887f, - 55419.63428271644f, - 55440.09282510301f, - 55460.553255070205f, - 55481.01557226981f, - 55501.479776353764f, - 55521.94586697419f, - 55542.413843783346f, - 55562.883706433655f, - 55583.355454577715f, - 55603.82908786826f, - 55624.30460595821f, - 55644.78200850064f, - 55665.26129514875f, - 55685.742465555944f, - 55706.225519375774f, - 55726.71045626193f, - 55747.197275868275f, - 55767.68597784884f, - 55788.176561857814f, - 55808.66902754953f, - 55829.16337457848f, - 55849.65960259933f, - 55870.15771126689f, - 55890.657700236145f, - 55911.15956916222f, - 55931.66331770041f, - 55952.168945506164f, - 55972.676452235086f, - 55993.185837542944f, - 56013.69710108565f, - 56034.2102425193f, - 56054.72526150012f, - 56075.24215768451f, - 56095.76093072901f, - 56116.28158029034f, - 56136.80410602537f, - 56157.328507591104f, - 56177.85478464474f, - 56198.3829368436f, - 56218.912963845185f, - 56239.44486530714f, - 56259.97864088727f, - 56280.51429024353f, - 56301.05181303404f, - 56321.59120891709f, - 56342.13247755108f, - 56362.675618594614f, - 56383.22063170642f, - 56403.7675165454f, - 56424.31627277061f, - 56444.86690004124f, - 56465.41939801667f, - 56485.973766356394f, - 56506.5300047201f, - 56527.08811276761f, - 56547.6480901589f, - 56568.20993655411f, - 56588.77365161352f, - 56609.339234997584f, - 56629.9066863669f, - 56650.47600538221f, - 56671.04719170442f, - 56691.6202449946f, - 56712.19516491396f, - 56732.77195112387f, - 56753.350603285835f, - 56773.93112106154f, - 56794.51350411282f, - 56815.09775210165f, - 56835.68386469015f, - 56856.27184154063f, - 56876.86168231552f, - 56897.4533866774f, - 56918.04695428902f, - 56938.6423848133f, - 56959.23967791326f, - 56979.83883325211f, - 57000.439850493225f, - 57021.04272930009f, - 57041.64746933637f, - 57062.25407026587f, - 57082.86253175256f, - 57103.47285346055f, - 57124.08503505411f, - 57144.69907619765f, - 57165.31497655575f, - 57185.9327357931f, - 57206.55235357461f, - 57227.173829565276f, - 57247.79716343028f, - 57268.42235483494f, - 57289.04940344473f, - 57309.678308925286f, - 57330.30907094237f, - 57350.94168916191f, - 57371.576163249985f, - 57392.212492872815f, - 57412.850677696784f, - 57433.490717388406f, - 57454.13261161437f, - 57474.77636004149f, - 57495.421962336746f, - 57516.069418167266f, - 57536.718727200314f, - 57557.36988910332f, - 57578.02290354386f, - 57598.67777018964f, - 57619.33448870855f, - 57639.99305876859f, - 57660.65348003794f, - 57681.315752184906f, - 57701.97987487797f, - 57722.64584778573f, - 57743.31367057695f, - 57763.98334292055f, - 57784.65486448557f, - 57805.32823494123f, - 57826.00345395688f, - 57846.680521202026f, - 57867.359436346305f, - 57888.04019905953f, - 57908.72280901163f, - 57929.40726587271f, - 57950.093569313f, - 57970.781719002895f, - 57991.47171461291f, - 58012.16355581375f, - 58032.85724227622f, - 58053.55277367131f, - 58074.25014967013f, - 58094.94936994395f, - 58115.650434164185f, - 58136.35334200239f, - 58157.058093130276f, - 58177.76468721969f, - 58198.47312394264f, - 58219.18340297126f, - 58239.89552397784f, - 58260.60948663482f, - 58281.325290614775f, - 58302.042935590434f, - 58322.76242123468f, - 58343.48374722051f, - 58364.206913221096f, - 58384.93191890975f, - 58405.65876395992f, - 58426.3874480452f, - 58447.11797083934f, - 58467.85033201621f, - 58488.584531249864f, - 58509.32056821446f, - 58530.05844258433f, - 58550.79815403393f, - 58571.539702237875f, - 58592.283086870906f, - 58613.02830760793f, - 58633.77536412398f, - 58654.52425609425f, - 58675.27498319405f, - 58696.02754509888f, - 58716.781941484325f, - 58737.53817202616f, - 58758.296236400274f, - 58779.05613428273f, - 58799.817865349694f, - 58820.5814292775f, - 58841.34682574264f, - 58862.11405442171f, - 58882.883114991484f, - 58903.65400712885f, - 58924.42673051085f, - 58945.201284814684f, - 58965.977669717664f, - 58986.75588489727f, - 59007.53593003111f, - 59028.31780479695f, - 59049.10150887266f, - 59069.8870419363f, - 59090.674403666046f, - 59111.46359374021f, - 59132.25461183726f, - 59153.0474576358f, - 59173.84213081458f, - 59194.63863105247f, - 59215.436958028506f, - 59236.237111421855f, - 59257.03909091183f, - 59277.84289617788f, - 59298.64852689959f, - 59319.455982756685f, - 59340.26526342905f, - 59361.076368596696f, - 59381.88929793976f, - 59402.70405113854f, - 59423.520627873484f, - 59444.33902782514f, - 59465.15925067423f, - 59485.9812961016f, - 59506.80516378825f, - 59527.63085341531f, - 59548.458364664046f, - 59569.28769721586f, - 59590.11885075232f, - 59610.95182495509f, - 59631.78661950601f, - 59652.62323408705f, - 59673.46166838031f, - 59694.30192206803f, - 59715.14399483259f, - 59735.987886356525f, - 59756.83359632248f, - 59777.681124413255f, - 59798.530470311794f, - 59819.38163370116f, - 59840.23461426457f, - 59861.08941168538f, - 59881.94602564707f, - 59902.80445583327f, - 59923.664701927744f, - 59944.52676361438f, - 59965.39064057724f, - 59986.25633250049f, - 60007.12383906844f, - 60027.99315996554f, - 60048.86429487638f, - 60069.73724348569f, - 60090.612005478324f, - 60111.488580539284f, - 60132.36696835371f, - 60153.24716860687f, - 60174.129180984164f, - 60195.01300517115f, - 60215.89864085351f, - 60236.78608771706f, - 60257.67534544775f, - 60278.56641373167f, - 60299.459292255044f, - 60320.35398070425f, - 60341.25047876576f, - 60362.14878612623f, - 60383.04890247242f, - 60403.95082749124f, - 60424.85456086972f, - 60445.76010229504f, - 60466.667451454516f, - 60487.57660803559f, - 60508.48757172584f, - 60529.400342213f, - 60550.31491918489f, - 60571.23130232952f, - 60592.149491335f, - 60613.06948588959f, - 60633.99128568168f, - 60654.914890399785f, - 60675.84029973257f, - 60696.76751336883f, - 60717.69653099749f, - 60738.6273523076f, - 60759.55997698837f, - 60780.49440472912f, - 60801.43063521932f, - 60822.368668148556f, - 60843.308503206565f, - 60864.250140083204f, - 60885.19357846847f, - 60906.138818052495f, - 60927.08585852554f, - 60948.03469957801f, - 60968.98534090042f, - 60989.93778218344f, - 61010.89202311786f, - 61031.84806339462f, - 61052.805902704764f, - 61073.76554073949f, - 61094.726977190134f, - 61115.69021174814f, - 61136.6552441051f, - 61157.62207395274f, - 61178.590700982924f, - 61199.561124887616f, - 61220.53334535895f, - 61241.50736208917f, - 61262.48317477066f, - 61283.46078309594f, - 61304.440186757645f, - 61325.42138544856f, - 61346.40437886158f, - 61367.389166689754f, - 61388.37574862626f, - 61409.36412436439f, - 61430.35429359757f, - 61451.34625601937f, - 61472.3400113235f, - 61493.33555920376f, - 61514.33289935412f, - 61535.33203146867f, - 61556.33295524162f, - 61577.33567036731f, - 61598.34017654024f, - 61619.34647345499f, - 61640.35456080633f, - 61661.3644382891f, - 61682.37610559831f, - 61703.38956242909f, - 61724.40480847669f, - 61745.42184343651f, - 61766.44066700406f, - 61787.46127887499f, - 61808.48367874506f, - 61829.5078663102f, - 61850.533841266435f, - 61871.56160330993f, - 61892.59115213697f, - 61913.62248744399f, - 61934.655608927525f, - 61955.69051628427f, - 61976.72720921102f, - 61997.765687404724f, - 62018.80595056245f, - 62039.847998381374f, - 62060.891830558845f, - 62081.93744679229f, - 62102.9848467793f, - 62124.034030217575f, - 62145.084996804966f, - 62166.137746239416f, - 62187.19227821903f, - 62208.248592442025f, - 62229.30668860674f, - 62250.366566411656f, - 62271.42822555538f, - 62292.49166573663f, - 62313.55688665427f, - 62334.62388800727f, - 62355.69266949476f, - 62376.763230815974f, - 62397.83557167027f, - 62418.909691757144f, - 62439.98559077621f, - 62461.06326842723f, - 62482.14272441005f, - 62503.223958424685f, - 62524.30697017127f, - 62545.39175935003f, - 62566.47832566137f, - 62587.56666880577f, - 62608.65678848388f, - 62629.74868439645f, - 62650.842356244364f, - 62671.93780372862f, - 62693.035026550366f, - 62714.13402441086f, - 62735.23479701148f, - 62756.33734405374f, - 62777.441665239276f, - 62798.54776026985f, - 62819.65562884736f, - 62840.7652706738f, - 62861.87668545132f, - 62882.989872882186f, - 62904.104832668774f, - 62925.2215645136f, - 62946.34006811931f, - 62967.46034318866f, - 62988.582389424526f, - 63009.70620652994f, - 63030.83179420802f, - 63051.95915216204f, - 63073.08828009537f, - 63094.21917771154f, - 63115.351844714154f, - 63136.48628080699f, - 63157.62248569392f, - 63178.760459078956f, - 63199.90020066622f, - 63221.04171015997f, - 63242.18498726457f, - 63263.330031684534f, - 63284.476843124474f, - 63305.62542128914f, - 63326.77576588341f, - 63347.92787661226f, - 63369.08175318081f, - 63390.237395294316f, - 63411.39480265812f, - 63432.553974977716f, - 63453.71491195871f, - 63474.87761330684f, - 63496.04207872794f, - 63517.208307928f, - 63538.37630061312f, - 63559.546056489504f, - 63580.717575263516f, - 63601.89085664161f, - 63623.06590033037f, - 63644.242706036515f, - 63665.42127346687f, - 63686.60160232838f, - 63707.783692328136f, - 63728.967543173334f, - 63750.15315457128f, - 63771.34052622942f, - 63792.52965785532f, - 63813.72054915665f, - 63834.91319984123f, - 63856.10760961698f, - 63877.30377819194f, - 63898.501705274284f, - 63919.7013905723f, - 63940.902833794404f, - 63962.106034649114f, - 63983.310992845094f, - 64004.51770809111f, - 64025.72618009605f, - 64046.93640856894f, - 64068.1483932189f, - 64089.362133755196f, - 64110.57762988719f, - 64131.79488132439f, - 64153.013887776404f, - 64174.23464895297f, - 64195.45716456394f, - 64216.68143431929f, - 64237.90745792911f, - 64259.135235103626f, - 64280.36476555316f, - 64301.59604898817f, - 64322.829085119236f, - 64344.06387365704f, - 64365.3004143124f, - 64386.53870679625f, - 64407.778750819634f, - 64429.02054609372f, - 64450.26409232981f, - 64471.50938923929f, - 64492.75643653371f, - 64514.005233924705f, - 64535.25578112403f, - 64556.50807784358f, - 64577.76212379536f, - 64599.017918691476f, - 64620.27546224417f, - 64641.534754165805f, - 64662.795794168844f, - 64684.058581965895f, - 64705.32311726966f, - 64726.589399792974f, - 64747.857429248776f, - 64769.12720535014f, - 64790.398727810236f, - 64811.671996342375f, - 64832.94701065997f, - 64854.22377047656f, - 64875.502275505794f, - 64896.78252546145f, - 64918.064520057414f, - 64939.34825900768f, - 64960.63374202639f, - 64981.92096882776f, - 65003.209939126165f, - 65024.50065263607f, - 65045.79310907207f, - 65067.08730814886f, - 65088.38324958128f, - 65109.68093308426f, - 65130.980358372864f, - 65152.28152516226f, - 65173.584433167736f, - 65194.8890821047f, - 65216.19547168868f, - 65237.50360163532f, - 65258.81347166035f, - 65280.125081479666f, - 65301.43843080924f, - 65322.75351936518f, - 65344.07034686371f, - 65365.38891302115f, - 65386.70921755396f, - 65408.0312601787f, - 65429.355040612056f, - 65450.68055857082f, - 65472.00781377191f, - 65493.336805932355f, - 65514.66753476928f, - 65535.999999999956f, - 65557.33420134176f, - 65578.67013851217f, - 65600.00781122879f, - 65621.34721920933f, - 65642.68836217163f, - 65664.03123983364f, - 65685.37585191341f, - 65706.72219812914f, - 65728.07027819908f, - 65749.42009184166f, - 65770.7716387754f, - 65792.12491871894f, - 65813.479931391f, - 65834.83667651046f, - 65856.1951537963f, - 65877.5553629676f, - 65898.91730374355f, - 65920.28097584349f, - 65941.64637898684f, - 65963.01351289316f, - 65984.38237728208f, - 66005.75297187339f, - 66027.12529638696f, - 66048.4993505428f, - 66069.87513406102f, - 66091.25264666184f, - 66112.63188806562f, - 66134.01285799277f, - 66155.39555616389f, - 66176.77998229963f, - 66198.1661361208f, - 66219.55401734827f, - 66240.9436257031f, - 66262.33496090639f, - 66283.7280226794f, - 66305.12281074344f, - 66326.51932482002f, - 66347.9175646307f, - 66369.31752989716f, - 66390.71922034123f, - 66412.12263568479f, - 66433.52777564988f, - 66454.93463995864f, - 66476.34322833332f, - 66497.75354049628f, - 66519.16557617f, - 66540.57933507704f, - 66561.99481694012f, - 66583.41202148204f, - 66604.83094842573f, - 66626.25159749422f, - 66647.67396841063f, - 66669.09806089824f, - 66690.52387468038f, - 66711.95140948056f, - 66733.38066502237f, - 66754.81164102948f, - 66776.24433722571f, - 66797.67875333499f, - 66819.11488908132f, - 66840.55274418888f, - 66861.9923183819f, - 66883.43361138474f, - 66904.87662292189f, - 66926.3213527179f, - 66947.7678004975f, - 66969.21596598547f, - 66990.66584890673f, - 67012.1174489863f, - 67033.57076594933f, - 67055.02579952106f, - 67076.48254942682f, - 67097.94101539208f, - 67119.40119714243f, - 67140.86309440355f, - 67162.32670690122f, - 67183.79203436135f, - 67205.25907650996f, - 67226.72783307315f, - 67248.19830377717f, - 67269.67048834835f, - 67291.14438651314f, - 67312.61999799809f, - 67334.09732252988f, - 67355.5763598353f, - 67377.05710964119f, - 67398.53957167457f, - 67420.02374566255f, - 67441.50963133233f, - 67462.99722841123f, - 67484.48653662669f, - 67505.97755570622f, - 67527.4702853775f, - 67548.96472536826f, - 67570.46087540637f, - 67591.9587352198f, - 67613.45830453663f, - 67634.95958308503f, - 67656.46257059333f, - 67677.9672667899f, - 67699.47367140325f, - 67720.98178416202f, - 67742.49160479492f, - 67764.0031330308f, - 67785.51636859858f, - 67807.03131122731f, - 67828.54796064617f, - 67850.0663165844f, - 67871.58637877138f, - 67893.10814693659f, - 67914.63162080961f, - 67936.15680012014f, - 67957.68368459797f, - 67979.21227397301f, - 68000.74256797526f, - 68022.27456633488f, - 68043.80826878206f, - 68065.34367504714f, - 68086.88078486058f, - 68108.41959795292f, - 68129.96011405479f, - 68151.50233289697f, - 68173.04625421032f, - 68194.59187772583f, - 68216.13920317456f, - 68237.6882302877f, - 68259.23895879654f, - 68280.79138843248f, - 68302.34551892703f, - 68323.90135001179f, - 68345.45888141848f, - 68367.01811287891f, - 68388.57904412503f, - 68410.14167488884f, - 68431.7060049025f, - 68453.27203389826f, - 68474.83976160845f, - 68496.40918776554f, - 68517.98031210208f, - 68539.55313435073f, - 68561.12765424428f, - 68582.70387151558f, - 68604.28178589763f, - 68625.8613971235f, - 68647.44270492639f, - 68669.0257090396f, - 68690.61040919652f, - 68712.19680513066f, - 68733.78489657563f, - 68755.37468326512f, - 68776.966164933f, - 68798.55934131313f, - 68820.15421213959f, - 68841.75077714647f, - 68863.34903606804f, - 68884.94898863863f, - 68906.55063459268f, - 68928.15397366474f, - 68949.75900558944f, - 68971.36573010158f, - 68992.97414693599f, - 69014.58425582763f, - 69036.19605651159f, - 69057.80954872302f, - 69079.4247321972f, - 69101.04160666953f, - 69122.66017187547f, - 69144.2804275506f, - 69165.90237343062f, - 69187.52600925133f, - 69209.15133474862f, - 69230.77834965847f, - 69252.40705371699f, - 69274.0374466604f, - 69295.669528225f, - 69317.30329814719f, - 69338.9387561635f, - 69360.57590201053f, - 69382.214735425f, - 69403.85525614375f, - 69425.49746390368f, - 69447.14135844183f, - 69468.78693949533f, - 69490.4342068014f, - 69512.08316009739f, - 69533.73379912072f, - 69555.38612360893f, - 69577.04013329967f, - 69598.69582793067f, - 69620.3532072398f, - 69642.01227096497f, - 69663.67301884426f, - 69685.33545061579f, - 69706.99956601784f, - 69728.66536478874f, - 69750.33284666698f, - 69772.00201139107f, - 69793.67285869969f, - 69815.34538833161f, - 69837.01960002567f, - 69858.69549352085f, - 69880.3730685562f, - 69902.0523248709f, - 69923.73326220422f, - 69945.41588029549f, - 69967.10017888421f, - 69988.78615770994f, - 70010.47381651236f, - 70032.16315503122f, - 70053.8541730064f, - 70075.54687017787f, - 70097.24124628572f, - 70118.93730107011f, - 70140.6350342713f, - 70162.33444562969f, - 70184.03553488574f, - 70205.73830178002f, - 70227.44274605322f, - 70249.1488674461f, - 70270.85666569954f, - 70292.56614055451f, - 70314.2772917521f, - 70335.9901190335f, - 70357.70462213994f, - 70379.42080081282f, - 70401.13865479361f, - 70422.85818382389f, - 70444.57938764534f, - 70466.30226599972f, - 70488.02681862892f, - 70509.75304527488f, - 70531.48094567971f, - 70553.21051958555f, - 70574.9417667347f, - 70596.6746868695f, - 70618.40927973246f, - 70640.1455450661f, - 70661.8834826131f, - 70683.62309211626f, - 70705.36437331841f, - 70727.10732596253f, - 70748.85194979167f, - 70770.59824454901f, - 70792.34620997778f, - 70814.09584582137f, - 70835.84715182323f, - 70857.6001277269f, - 70879.35477327603f, - 70901.11108821441f, - 70922.86907228586f, - 70944.62872523433f, - 70966.39004680388f, - 70988.15303673863f, - 71009.91769478285f, - 71031.68402068088f, - 71053.45201417715f, - 71075.22167501619f, - 71096.99300294266f, - 71118.76599770127f, - 71140.54065903684f, - 71162.31698669434f, - 71184.09498041874f, - 71205.87463995522f, - 71227.65596504895f, - 71249.4389554453f, - 71271.22361088963f, - 71293.00993112748f, - 71314.79791590448f, - 71336.5875649663f, - 71358.37887805876f, - 71380.17185492777f, - 71401.96649531931f, - 71423.76279897949f, - 71445.56076565449f, - 71467.3603950906f, - 71489.16168703421f, - 71510.96464123181f, - 71532.76925742996f, - 71554.57553537536f, - 71576.38347481475f, - 71598.19307549503f, - 71620.00433716313f, - 71641.81725956615f, - 71663.63184245121f, - 71685.4480855656f, - 71707.26598865664f, - 71729.0855514718f, - 71750.90677375859f, - 71772.72965526467f, - 71794.55419573777f, - 71816.38039492571f, - 71838.20825257644f, - 71860.03776843796f, - 71881.86894225838f, - 71903.70177378594f, - 71925.53626276893f, - 71947.37240895575f, - 71969.2102120949f, - 71991.04967193498f, - 72012.89078822469f, - 72034.73356071279f, - 72056.57798914817f, - 72078.42407327982f, - 72100.2718128568f, - 72122.12120762825f, - 72143.97225734347f, - 72165.8249617518f, - 72187.67932060269f, - 72209.53533364569f, - 72231.39300063043f, - 72253.25232130665f, - 72275.11329542418f, - 72296.97592273295f, - 72318.84020298296f, - 72340.70613592434f, - 72362.57372130727f, - 72384.4429588821f, - 72406.31384839918f, - 72428.18638960904f, - 72450.06058226222f, - 72471.93642610943f, - 72493.81392090143f, - 72515.6930663891f, - 72537.57386232339f, - 72559.45630845535f, - 72581.34040453614f, - 72603.22615031699f, - 72625.11354554925f, - 72647.00258998433f, - 72668.89328337376f, - 72690.78562546917f, - 72712.67961602227f, - 72734.57525478485f, - 72756.47254150882f, - 72778.37147594614f, - 72800.27205784894f, - 72822.17428696936f, - 72844.07816305969f, - 72865.98368587228f, - 72887.8908551596f, - 72909.79967067418f, - 72931.7101321687f, - 72953.62223939585f, - 72975.53599210849f, - 72997.45139005952f, - 73019.36843300196f, - 73041.28712068892f, - 73063.20745287361f, - 73085.1294293093f, - 73107.05304974939f, - 73128.97831394733f, - 73150.90522165672f, - 73172.83377263122f, - 73194.76396662457f, - 73216.69580339061f, - 73238.62928268328f, - 73260.56440425663f, - 73282.50116786477f, - 73304.4395732619f, - 73326.37962020234f, - 73348.32130844049f, - 73370.26463773084f, - 73392.20960782796f, - 73414.15621848653f, - 73436.10446946132f, - 73458.05436050717f, - 73480.00589137906f, - 73501.95906183199f, - 73523.91387162112f, - 73545.87032050166f, - 73567.82840822893f, - 73589.78813455833f, - 73611.74949924536f, - 73633.71250204562f, - 73655.67714271475f, - 73677.64342100856f, - 73699.61133668288f, - 73721.58088949369f, - 73743.55207919702f, - 73765.524905549f, - 73787.49936830586f, - 73809.4754672239f, - 73831.45320205955f, - 73853.43257256929f, - 73875.41357850972f, - 73897.3962196375f, - 73919.38049570941f, - 73941.36640648231f, - 73963.35395171314f, - 73985.34313115895f, - 74007.33394457687f, - 74029.32639172411f, - 74051.32047235797f, - 74073.31618623588f, - 74095.3135331153f, - 74117.31251275384f, - 74139.31312490914f, - 74161.31536933898f, - 74183.31924580119f, - 74205.32475405373f, - 74227.33189385463f, - 74249.34066496199f, - 74271.35106713403f, - 74293.36310012905f, - 74315.37676370544f, - 74337.39205762166f, - 74359.4089816363f, - 74381.427535508f, - 74403.4477189955f, - 74425.46953185767f, - 74447.4929738534f, - 74469.5180447417f, - 74491.54474428168f, - 74513.57307223254f, - 74535.60302835355f, - 74557.63461240409f, - 74579.6678241436f, - 74601.70266333164f, - 74623.73912972784f, - 74645.77722309194f, - 74667.81694318372f, - 74689.85828976311f, - 74711.9012625901f, - 74733.94586142474f, - 74755.99208602723f, - 74778.0399361578f, - 74800.08941157682f, - 74822.1405120447f, - 74844.19323732196f, - 74866.24758716923f, - 74888.30356134719f, - 74910.36115961662f, - 74932.42038173841f, - 74954.4812274735f, - 74976.54369658297f, - 74998.60778882793f, - 75020.6735039696f, - 75042.74084176932f, - 75064.80980198846f, - 75086.88038438853f, - 75108.9525887311f, - 75131.02641477782f, - 75153.10186229047f, - 75175.17893103085f, - 75197.25762076092f, - 75219.33793124268f, - 75241.41986223822f, - 75263.50341350974f, - 75285.5885848195f, - 75307.67537592987f, - 75329.76378660332f, - 75351.85381660235f, - 75373.94546568961f, - 75396.0387336278f, - 75418.13362017972f, - 75440.23012510825f, - 75462.32824817636f, - 75484.42798914711f, - 75506.52934778365f, - 75528.63232384919f, - 75550.73691710707f, - 75572.8431273207f, - 75594.95095425354f, - 75617.0603976692f, - 75639.17145733131f, - 75661.28413300365f, - 75683.39842445003f, - 75705.5143314344f, - 75727.63185372074f, - 75749.75099107318f, - 75771.87174325586f, - 75793.99411003308f, - 75816.11809116918f, - 75838.24368642858f, - 75860.37089557585f, - 75882.49971837556f, - 75904.63015459242f, - 75926.76220399122f, - 75948.89586633682f, - 75971.03114139418f, - 75993.16802892832f, - 76015.3065287044f, - 76037.4466404876f, - 76059.58836404321f, - 76081.73169913665f, - 76103.87664553335f, - 76126.02320299888f, - 76148.17137129887f, - 76170.32115019904f, - 76192.4725394652f, - 76214.62553886326f, - 76236.78014815917f, - 76258.93636711901f, - 76281.09419550892f, - 76303.25363309514f, - 76325.41467964397f, - 76347.57733492184f, - 76369.74159869523f, - 76391.90747073069f, - 76414.07495079488f, - 76436.24403865456f, - 76458.41473407655f, - 76480.58703682775f, - 76502.76094667517f, - 76524.93646338588f, - 76547.11358672705f, - 76569.29231646592f, - 76591.47265236982f, - 76613.65459420616f, - 76635.83814174247f, - 76658.02329474631f, - 76680.21005298535f, - 76702.39841622734f, - 76724.58838424014f, - 76746.77995679164f, - 76768.97313364987f, - 76791.1679145829f, - 76813.3642993589f, - 76835.56228774616f, - 76857.76187951297f, - 76879.9630744278f, - 76902.16587225911f, - 76924.37027277553f, - 76946.57627574573f, - 76968.78388093844f, - 76990.99308812252f, - 77013.2038970669f, - 77035.41630754055f, - 77057.63031931262f, - 77079.84593215224f, - 77102.0631458287f, - 77124.28196011129f, - 77146.50237476948f, - 77168.72438957276f, - 77190.94800429072f, - 77213.17321869303f, - 77235.40003254944f, - 77257.6284456298f, - 77279.85845770403f, - 77302.09006854212f, - 77324.32327791417f, - 77346.55808559034f, - 77368.79449134089f, - 77391.03249493614f, - 77413.27209614652f, - 77435.51329474253f, - 77457.75609049473f, - 77480.0004831738f, - 77502.2464725505f, - 77524.49405839563f, - 77546.74324048011f, - 77568.99401857494f, - 77591.2463924512f, - 77613.50036188003f, - 77635.75592663266f, - 77658.01308648044f, - 77680.27184119476f, - 77702.53219054709f, - 77724.79413430902f, - 77747.0576722522f, - 77769.32280414834f, - 77791.58952976925f, - 77813.85784888684f, - 77836.12776127306f, - 77858.3992667f, - 77880.67236493979f, - 77902.94705576463f, - 77925.22333894683f, - 77947.50121425878f, - 77969.78068147293f, - 77992.06174036184f, - 78014.34439069813f, - 78036.62863225449f, - 78058.91446480375f, - 78081.20188811873f, - 78103.49090197241f, - 78125.78150613782f, - 78148.07370038806f, - 78170.36748449634f, - 78192.66285823593f, - 78214.95982138017f, - 78237.2583737025f, - 78259.55851497645f, - 78281.86024497561f, - 78304.16356347366f, - 78326.46847024436f, - 78348.77496506154f, - 78371.08304769913f, - 78393.3927179311f, - 78415.70397553158f, - 78438.0168202747f, - 78460.3312519347f, - 78482.6472702859f, - 78504.96487510273f, - 78527.28406615963f, - 78549.6048432312f, - 78571.92720609205f, - 78594.25115451691f, - 78616.5766882806f, - 78638.90380715799f, - 78661.23251092403f, - 78683.56279935378f, - 78705.89467222235f, - 78728.22812930495f, - 78750.56317037686f, - 78772.89979521342f, - 78795.2380035901f, - 78817.5777952824f, - 78839.91917006593f, - 78862.26212771636f, - 78884.60666800945f, - 78906.95279072104f, - 78929.30049562705f, - 78951.64978250346f, - 78974.00065112638f, - 78996.35310127193f, - 79018.70713271636f, - 79041.06274523598f, - 79063.41993860717f, - 79085.77871260644f, - 79108.13906701028f, - 79130.50100159539f, - 79152.86451613842f, - 79175.22961041618f, - 79197.59628420553f, - 79219.96453728342f, - 79242.33436942687f, - 79264.70578041299f, - 79287.07877001894f, - 79309.45333802201f, - 79331.82948419951f, - 79354.20720832888f, - 79376.58651018758f, - 79398.96738955322f, - 79421.34984620343f, - 79443.73387991595f, - 79466.11949046858f, - 79488.50667763922f, - 79510.89544120582f, - 79533.28578094643f, - 79555.67769663916f, - 79578.07118806223f, - 79600.4662549939f, - 79622.86289721253f, - 79645.26111449653f, - 79667.66090662447f, - 79690.06227337488f, - 79712.46521452646f, - 79734.86972985794f, - 79757.27581914813f, - 79779.68348217595f, - 79802.09271872038f, - 79824.50352856045f, - 79846.91591147533f, - 79869.3298672442f, - 79891.74539564634f, - 79914.16249646115f, - 79936.58116946805f, - 79959.00141444655f, - 79981.42323117626f, - 80003.84661943685f, - 80026.27157900808f, - 80048.69810966977f, - 80071.12621120183f, - 80093.55588338424f, - 80115.98712599705f, - 80138.41993882041f, - 80160.85432163453f, - 80183.29027421969f, - 80205.72779635628f, - 80228.16688782471f, - 80250.60754840553f, - 80273.04977787934f, - 80295.49357602678f, - 80317.93894262865f, - 80340.38587746573f, - 80362.83438031895f, - 80385.28445096928f, - 80407.73608919779f, - 80430.1892947856f, - 80452.64406751392f, - 80475.10040716403f, - 80497.55831351732f, - 80520.01778635521f, - 80542.47882545921f, - 80564.94143061092f, - 80587.405601592f, - 80609.8713381842f, - 80632.33864016933f, - 80654.8075073293f, - 80677.27793944607f, - 80699.74993630168f, - 80722.22349767828f, - 80744.69862335804f, - 80767.17531312324f, - 80789.65356675624f, - 80812.13338403947f, - 80834.6147647554f, - 80857.09770868665f, - 80879.58221561585f, - 80902.06828532573f, - 80924.5559175991f, - 80947.04511221882f, - 80969.53586896788f, - 80992.02818762927f, - 81014.52206798614f, - 81037.01750982161f, - 81059.514512919f, - 81082.01307706161f, - 81104.51320203283f, - 81127.01488761618f, - 81149.5181335952f, - 81172.0229397535f, - 81194.5293058748f, - 81217.0372317429f, - 81239.54671714164f, - 81262.05776185496f, - 81284.57036566685f, - 81307.0845283614f, - 81329.60024972277f, - 81352.11752953519f, - 81374.63636758295f, - 81397.15676365045f, - 81419.67871752213f, - 81442.20222898253f, - 81464.72729781622f, - 81487.25392380793f, - 81509.78210674238f, - 81532.3118464044f, - 81554.8431425789f, - 81577.37599505084f, - 81599.91040360527f, - 81622.44636802733f, - 81644.98388810222f, - 81667.52296361518f, - 81690.06359435158f, - 81712.60578009684f, - 81735.14952063645f, - 81757.69481575597f, - 81780.24166524105f, - 81802.79006887741f, - 81825.34002645082f, - 81847.89153774717f, - 81870.44460255238f, - 81892.99922065248f, - 81915.5553918335f, - 81938.11311588167f, - 81960.67239258319f, - 81983.23322172434f, - 82005.79560309154f, - 82028.35953647122f, - 82050.9250216499f, - 82073.49205841421f, - 82096.06064655079f, - 82118.63078584638f, - 82141.20247608784f, - 82163.77571706203f, - 82186.35050855593f, - 82208.92685035657f, - 82231.50474225105f, - 82254.08418402658f, - 82276.66517547039f, - 82299.24771636983f, - 82321.83180651232f, - 82344.4174456853f, - 82367.00463367635f, - 82389.59337027307f, - 82412.18365526316f, - 82434.77548843439f, - 82457.3688695746f, - 82479.9637984717f, - 82502.56027491367f, - 82525.1582986886f, - 82547.7578695846f, - 82570.35898738986f, - 82592.96165189268f, - 82615.5658628814f, - 82638.17162014442f, - 82660.77892347026f, - 82683.38777264747f, - 82705.99816746471f, - 82728.61010771066f, - 82751.22359317412f, - 82773.83862364394f, - 82796.45519890904f, - 82819.07331875843f, - 82841.69298298119f, - 82864.31419136643f, - 82886.93694370337f, - 82909.56123978132f, - 82932.18707938964f, - 82954.81446231774f, - 82977.44338835512f, - 83000.07385729137f, - 83022.70586891612f, - 83045.33942301909f, - 83067.97451939009f, - 83090.61115781896f, - 83113.24933809563f, - 83135.8890600101f, - 83158.53032335246f, - 83181.17312791286f, - 83203.8174734815f, - 83226.46335984867f, - 83249.11078680474f, - 83271.75975414013f, - 83294.41026164537f, - 83317.062309111f, - 83339.7158963277f, - 83362.37102308616f, - 83385.02768917716f, - 83407.68589439159f, - 83430.34563852036f, - 83453.00692135448f, - 83475.669742685f, - 83498.33410230308f, - 83520.99999999994f, - 83543.66743556687f, - 83566.33640879519f, - 83589.00691947635f, - 83611.67896740185f, - 83634.35255236324f, - 83657.02767415217f, - 83679.70433256036f, - 83702.38252737955f, - 83725.06225840164f, - 83747.74352541851f, - 83770.42632822218f, - 83793.11066660468f, - 83815.79654035816f, - 83838.48394927483f, - 83861.17289314694f, - 83883.86337176684f, - 83906.55538492696f, - 83929.24893241975f, - 83951.9440140378f, - 83974.6406295737f, - 83997.33877882015f, - 84020.03846156993f, - 84042.73967761586f, - 84065.44242675084f, - 84088.14670876783f, - 84110.85252345992f, - 84133.55987062017f, - 84156.2687500418f, - 84178.97916151803f, - 84201.6911048422f, - 84224.40457980771f, - 84247.119586208f, - 84269.83612383662f, - 84292.55419248715f, - 84315.27379195328f, - 84337.99492202874f, - 84360.71758250732f, - 84383.44177318295f, - 84406.16749384951f, - 84428.89474430107f, - 84451.62352433169f, - 84474.35383373554f, - 84497.08567230683f, - 84519.81903983987f, - 84542.553936129f, - 84565.29036096868f, - 84588.0283141534f, - 84610.76779547772f, - 84633.50880473628f, - 84656.25134172381f, - 84678.99540623507f, - 84701.74099806492f, - 84724.48811700825f, - 84747.23676286006f, - 84769.9869354154f, - 84792.73863446941f, - 84815.49185981725f, - 84838.2466112542f, - 84861.00288857557f, - 84883.76069157677f, - 84906.52002005326f, - 84929.28087380057f, - 84952.0432526143f, - 84974.80715629015f, - 84997.5725846238f, - 85020.33953741111f, - 85043.10801444795f, - 85065.87801553024f, - 85088.64954045399f, - 85111.4225890153f, - 85134.19716101032f, - 85156.97325623524f, - 85179.75087448637f, - 85202.53001556007f, - 85225.31067925273f, - 85248.09286536086f, - 85270.87657368102f, - 85293.66180400981f, - 85316.44855614395f, - 85339.23682988019f, - 85362.02662501535f, - 85384.81794134635f, - 85407.61077867013f, - 85430.40513678372f, - 85453.20101548426f, - 85475.99841456886f, - 85498.7973338348f, - 85521.59777307935f, - 85544.3997320999f, - 85567.2032106939f, - 85590.00820865881f, - 85612.81472579224f, - 85635.62276189183f, - 85658.43231675526f, - 85681.24339018033f, - 85704.05598196488f, - 85726.8700919068f, - 85749.68571980408f, - 85772.50286545476f, - 85795.32152865696f, - 85818.14170920885f, - 85840.96340690868f, - 85863.78662155475f, - 85886.61135294545f, - 85909.43760087922f, - 85932.26536515457f, - 85955.09464557009f, - 85977.92544192442f, - 86000.75775401627f, - 86023.59158164443f, - 86046.42692460775f, - 86069.26378270512f, - 86092.10215573556f, - 86114.94204349807f, - 86137.7834457918f, - 86160.62636241592f, - 86183.47079316968f, - 86206.31673785238f, - 86229.1641962634f, - 86252.0131682022f, - 86274.8636534683f, - 86297.71565186126f, - 86320.56916318073f, - 86343.42418722642f, - 86366.28072379812f, - 86389.13877269567f, - 86411.99833371898f, - 86434.85940666801f, - 86457.72199134283f, - 86480.58608754353f, - 86503.45169507028f, - 86526.31881372335f, - 86549.18744330303f, - 86572.05758360968f, - 86594.92923444376f, - 86617.80239560577f, - 86640.67706689627f, - 86663.5532481159f, - 86686.43093906538f, - 86709.31013954544f, - 86732.19084935696f, - 86755.07306830082f, - 86777.95679617795f, - 86800.84203278944f, - 86823.72877793635f, - 86846.61703141985f, - 86869.50679304118f, - 86892.39806260161f, - 86915.29083990252f, - 86938.1851247453f, - 86961.08091693149f, - 86983.97821626259f, - 87006.87702254027f, - 87029.77733556618f, - 87052.67915514208f, - 87075.5824810698f, - 87098.48731315118f, - 87121.39365118822f, - 87144.3014949829f, - 87167.21084433729f, - 87190.12169905353f, - 87213.03405893384f, - 87235.9479237805f, - 87258.86329339583f, - 87281.78016758224f, - 87304.69854614217f, - 87327.61842887818f, - 87350.53981559286f, - 87373.46270608885f, - 87396.3871001689f, - 87419.31299763577f, - 87442.24039829234f, - 87465.16930194154f, - 87488.09970838632f, - 87511.03161742973f, - 87533.9650288749f, - 87556.89994252501f, - 87579.83635818327f, - 87602.77427565302f, - 87625.71369473761f, - 87648.65461524049f, - 87671.59703696515f, - 87694.54095971514f, - 87717.4863832941f, - 87740.43330750574f, - 87763.38173215378f, - 87786.33165704206f, - 87809.28308197446f, - 87832.23600675492f, - 87855.19043118745f, - 87878.14635507615f, - 87901.10377822515f, - 87924.06270043863f, - 87947.02312152089f, - 87969.98504127625f, - 87992.94845950909f, - 88015.9133760239f, - 88038.87979062517f, - 88061.84770311751f, - 88084.81711330556f, - 88107.78802099405f, - 88130.76042598773f, - 88153.73432809146f, - 88176.70972711014f, - 88199.68662284875f, - 88222.6650151123f, - 88245.6449037059f, - 88268.62628843471f, - 88291.60916910395f, - 88314.5935455189f, - 88337.57941748491f, - 88360.56678480741f, - 88383.55564729185f, - 88406.5460047438f, - 88429.53785696882f, - 88452.53120377261f, - 88475.52604496089f, - 88498.52238033945f, - 88521.52020971413f, - 88544.51953289087f, - 88567.52034967564f, - 88590.5226598745f, - 88613.52646329353f, - 88636.53175973892f, - 88659.5385490169f, - 88682.54683093374f, - 88705.55660529585f, - 88728.56787190959f, - 88751.58063058149f, - 88774.59488111807f, - 88797.61062332596f, - 88820.62785701183f, - 88843.6465819824f, - 88866.66679804446f, - 88889.68850500489f, - 88912.71170267061f, - 88935.73639084859f, - 88958.7625693459f, - 88981.79023796963f, - 89004.81939652696f, - 89027.85004482511f, - 89050.88218267141f, - 89073.9158098732f, - 89096.95092623789f, - 89119.98753157297f, - 89143.025625686f, - 89166.06520838456f, - 89189.10627947636f, - 89212.14883876909f, - 89235.19288607058f, - 89258.23842118867f, - 89281.28544393127f, - 89304.33395410638f, - 89327.38395152202f, - 89350.4354359863f, - 89373.4884073074f, - 89396.54286529354f, - 89419.598809753f, - 89442.65624049417f, - 89465.71515732541f, - 89488.77556005522f, - 89511.83744849212f, - 89534.90082244476f, - 89557.96568172173f, - 89581.03202613181f, - 89604.09985548374f, - 89627.1691695864f, - 89650.23996824867f, - 89673.31225127954f, - 89696.38601848802f, - 89719.4612696832f, - 89742.53800467425f, - 89765.61622327036f, - 89788.69592528083f, - 89811.77711051499f, - 89834.85977878221f, - 89857.94392989198f, - 89881.0295636538f, - 89904.11667987728f, - 89927.20527837201f, - 89950.29535894774f, - 89973.38692141422f, - 89996.47996558127f, - 90019.57449125877f, - 90042.67049825669f, - 90065.76798638502f, - 90088.86695545384f, - 90111.96740527326f, - 90135.06933565348f, - 90158.17274640476f, - 90181.2776373374f, - 90204.3840082618f, - 90227.49185898836f, - 90250.60118932759f, - 90273.71199909004f, - 90296.82428808633f, - 90319.93805612714f, - 90343.05330302319f, - 90366.1700285853f, - 90389.2882326243f, - 90412.40791495114f, - 90435.52907537678f, - 90458.65171371226f, - 90481.77582976868f, - 90504.90142335721f, - 90528.02849428906f, - 90551.1570423755f, - 90574.28706742791f, - 90597.41856925764f, - 90620.5515476762f, - 90643.68600249507f, - 90666.82193352585f, - 90689.95934058019f, - 90713.09822346977f, - 90736.23858200636f, - 90759.3804160018f, - 90782.52372526795f, - 90805.66850961676f, - 90828.81476886023f, - 90851.96250281043f, - 90875.11171127946f, - 90898.26239407953f, - 90921.41455102284f, - 90944.56818192174f, - 90967.72328658856f, - 90990.87986483572f, - 91014.03791647572f, - 91037.19744132107f, - 91060.35843918439f, - 91083.52090987834f, - 91106.68485321563f, - 91129.85026900904f, - 91153.0171570714f, - 91176.18551721562f, - 91199.35534925465f, - 91222.52665300149f, - 91245.69942826925f, - 91268.87367487104f, - 91292.04939262004f, - 91315.22658132955f, - 91338.40524081283f, - 91361.58537088329f, - 91384.76697135434f, - 91407.95004203948f, - 91431.13458275225f, - 91454.32059330626f, - 91477.50807351517f, - 91500.69702319271f, - 91523.88744215269f, - 91547.07933020893f, - 91570.27268717533f, - 91593.46751286586f, - 91616.66380709453f, - 91639.86156967544f, - 91663.06080042271f, - 91686.26149915057f, - 91709.46366567322f, - 91732.66729980502f, - 91755.87240136032f, - 91779.07897015357f, - 91802.28700599924f, - 91825.49650871192f, - 91848.70747810617f, - 91871.91991399668f, - 91895.13381619815f, - 91918.34918452542f, - 91941.56601879328f, - 91964.78431881666f, - 91988.0040844105f, - 92011.22531538982f, - 92034.44801156971f, - 92057.67217276528f, - 92080.89779879176f, - 92104.12488946435f, - 92127.35344459841f, - 92150.58346400928f, - 92173.81494751238f, - 92197.04789492322f, - 92220.28230605731f, - 92243.51818073026f, - 92266.75551875774f, - 92289.99431995547f, - 92313.2345841392f, - 92336.47631112477f, - 92359.71950072808f, - 92382.96415276507f, - 92406.21026705173f, - 92429.45784340418f, - 92452.70688163847f, - 92475.95738157081f, - 92499.20934301744f, - 92522.46276579465f, - 92545.7176497188f, - 92568.9739946063f, - 92592.23180027361f, - 92615.49106653726f, - 92638.75179321383f, - 92662.01398011995f, - 92685.27762707233f, - 92708.54273388773f, - 92731.80930038294f, - 92755.07732637487f, - 92778.34681168041f, - 92801.61775611658f, - 92824.89015950038f, - 92848.16402164895f, - 92871.43934237942f, - 92894.71612150903f, - 92917.99435885502f, - 92941.27405423473f, - 92964.55520746557f, - 92987.83781836496f, - 93011.12188675042f, - 93034.40741243947f, - 93057.69439524977f, - 93080.98283499895f, - 93104.27273150477f, - 93127.564084585f, - 93150.8568940575f, - 93174.15115974014f, - 93197.44688145092f, - 93220.7440590078f, - 93244.04269222889f, - 93267.34278093232f, - 93290.64432493623f, - 93313.94732405891f, - 93337.25177811863f, - 93360.55768693375f, - 93383.8650503227f, - 93407.17386810391f, - 93430.48414009594f, - 93453.79586611736f, - 93477.10904598678f, - 93500.42367952294f, - 93523.73976654456f, - 93547.05730687045f, - 93570.37630031949f, - 93593.69674671057f, - 93617.0186458627f, - 93640.3419975949f, - 93663.66680172624f, - 93686.99305807588f, - 93710.32076646303f, - 93733.64992670694f, - 93756.98053862691f, - 93780.31260204234f, - 93803.64611677264f, - 93826.9810826373f, - 93850.31749945584f, - 93873.65536704786f, - 93896.99468523303f, - 93920.33545383104f, - 93943.67767266167f, - 93967.0213415447f, - 93990.36646030005f, - 94013.71302874765f, - 94037.06104670743f, - 94060.4105139995f, - 94083.7614304439f, - 94107.11379586085f, - 94130.46761007051f, - 94153.82287289316f, - 94177.17958414911f, - 94200.53774365876f, - 94223.89735124253f, - 94247.25840672091f, - 94270.62090991443f, - 94293.98486064372f, - 94317.35025872942f, - 94340.71710399224f, - 94364.08539625294f, - 94387.45513533235f, - 94410.82632105134f, - 94434.19895323085f, - 94457.57303169188f, - 94480.94855625545f, - 94504.32552674267f, - 94527.70394297468f, - 94551.08380477272f, - 94574.46511195804f, - 94597.84786435193f, - 94621.23206177581f, - 94644.61770405111f, - 94668.00479099927f, - 94691.39332244187f, - 94714.78329820049f, - 94738.1747180968f, - 94761.56758195249f, - 94784.9618895893f, - 94808.35764082908f, - 94831.7548354937f, - 94855.15347340508f, - 94878.55355438517f, - 94901.95507825605f, - 94925.35804483978f, - 94948.76245395854f, - 94972.16830543448f, - 94995.57559908989f, - 95018.98433474707f, - 95042.3945122284f, - 95065.80613135628f, - 95089.21919195318f, - 95112.63369384164f, - 95136.04963684424f, - 95159.46702078362f, - 95182.88584548247f, - 95206.30611076353f, - 95229.72781644962f, - 95253.15096236358f, - 95276.57554832831f, - 95300.00157416679f, - 95323.42903970205f, - 95346.85794475715f, - 95370.28828915521f, - 95393.72007271941f, - 95417.15329527302f, - 95440.5879566393f, - 95464.02405664159f, - 95487.46159510332f, - 95510.9005718479f, - 95534.34098669887f, - 95557.78283947978f, - 95581.22613001426f, - 95604.67085812596f, - 95628.1170236386f, - 95651.56462637598f, - 95675.01366616192f, - 95698.4641428203f, - 95721.91605617508f, - 95745.36940605023f, - 95768.8241922698f, - 95792.28041465791f, - 95815.7380730387f, - 95839.19716723639f, - 95862.65769707522f, - 95886.11966237954f, - 95909.58306297369f, - 95933.04789868211f, - 95956.51416932927f, - 95979.98187473971f, - 96003.451014738f, - 96026.92158914881f, - 96050.39359779679f, - 96073.86704050671f, - 96097.34191710339f, - 96120.81822741163f, - 96144.29597125638f, - 96167.77514846258f, - 96191.25575885524f, - 96214.73780225945f, - 96238.2212785003f, - 96261.70618740298f, - 96285.19252879272f, - 96308.68030249479f, - 96332.16950833453f, - 96355.66014613732f, - 96379.1522157286f, - 96402.64571693387f, - 96426.14064957868f, - 96449.6370134886f, - 96473.13480848931f, - 96496.63403440651f, - 96520.13469106596f, - 96543.63677829347f, - 96567.1402959149f, - 96590.64524375615f, - 96614.15162164322f, - 96637.65942940213f, - 96661.16866685895f, - 96684.6793338398f, - 96708.19143017087f, - 96731.7049556784f, - 96755.21991018867f, - 96778.73629352801f, - 96802.25410552284f, - 96825.77334599958f, - 96849.29401478474f, - 96872.81611170487f, - 96896.33963658658f, - 96919.86458925651f, - 96943.39096954139f, - 96966.91877726796f, - 96990.44801226305f, - 97013.97867435352f, - 97037.5107633663f, - 97061.04427912834f, - 97084.57922146667f, - 97108.11559020838f, - 97131.6533851806f, - 97155.19260621049f, - 97178.73325312529f, - 97202.2753257523f, - 97225.81882391885f, - 97249.36374745233f, - 97272.91009618019f, - 97296.4578699299f, - 97320.00706852904f, - 97343.5576918052f, - 97367.10973958601f, - 97390.6632116992f, - 97414.2181079725f, - 97437.77442823374f, - 97461.33217231077f, - 97484.89134003149f, - 97508.4519312239f, - 97532.01394571598f, - 97555.57738333581f, - 97579.14224391151f, - 97602.70852727126f, - 97626.27623324326f, - 97649.84536165581f, - 97673.41591233722f, - 97696.98788511587f, - 97720.56127982022f, - 97744.1360962787f, - 97767.71233431989f, - 97791.28999377234f, - 97814.86907446472f, - 97838.44957622568f, - 97862.031498884f, - 97885.61484226845f, - 97909.19960620788f, - 97932.7857905312f, - 97956.37339506732f, - 97979.96241964525f, - 98003.55286409408f, - 98027.14472824286f, - 98050.73801192077f, - 98074.332714957f, - 98097.9288371808f, - 98121.52637842152f, - 98145.12533850846f, - 98168.72571727107f, - 98192.32751453877f, - 98215.93073014112f, - 98239.53536390766f, - 98263.14141566801f, - 98286.74888525181f, - 98310.35777248882f, - 98333.96807720876f, - 98357.57979924149f, - 98381.19293841685f, - 98404.80749456478f, - 98428.42346751524f, - 98452.04085709827f, - 98475.65966314392f, - 98499.27988548232f, - 98522.90152394367f, - 98546.52457835816f, - 98570.1490485561f, - 98593.77493436779f, - 98617.40223562362f, - 98641.03095215405f, - 98664.66108378951f, - 98688.29263036055f, - 98711.92559169777f, - 98735.5599676318f, - 98759.1957579933f, - 98782.83296261301f, - 98806.47158132173f, - 98830.11161395028f, - 98853.75306032957f, - 98877.39592029051f, - 98901.0401936641f, - 98924.68588028138f, - 98948.33297997342f, - 98971.98149257139f, - 98995.63141790645f, - 99019.28275580984f, - 99042.93550611287f, - 99066.58966864688f, - 99090.24524324323f, - 99113.9022297334f, - 99137.56062794886f, - 99161.22043772115f, - 99184.88165888184f, - 99208.54429126263f, - 99232.20833469517f, - 99255.87378901121f, - 99279.54065404256f, - 99303.20892962103f, - 99326.87861557852f, - 99350.54971174701f, - 99374.22221795844f, - 99397.89613404489f, - 99421.57145983842f, - 99445.24819517121f, - 99468.92633987544f, - 99492.60589378334f, - 99516.28685672721f, - 99539.9692285394f, - 99563.65300905229f, - 99587.33819809832f, - 99611.02479551f, - 99634.71280111987f, - 99658.4022147605f, - 99682.09303626454f, - 99705.7852654647f, - 99729.47890219369f, - 99753.17394628433f, - 99776.87039756944f, - 99800.56825588191f, - 99824.26752105469f, - 99847.96819292076f, - 99871.67027131317f, - 99895.373756065f, - 99919.07864700939f, - 99942.78494397952f, - 99966.49264680862f, - 99990.20175533001f, - 100013.91226937699f, - 100037.62418878295f, - 100061.33751338134f, - 100085.05224300563f, - 100108.76837748935f, - 100132.4859166661f, - 100156.2048603695f, - 100179.92520843323f, - 100203.64696069101f, - 100227.37011697664f, - 100251.09467712394f, - 100274.82064096678f, - 100298.54800833909f, - 100322.27677907483f, - 100346.00695300807f, - 100369.73852997283f, - 100393.47150980328f, - 100417.20589233354f, - 100440.94167739789f, - 100464.67886483055f, - 100488.41745446586f, - 100512.1574461382f, - 100535.89883968196f, - 100559.64163493161f, - 100583.3858317217f, - 100607.13142988674f, - 100630.87842926137f, - 100654.62682968024f, - 100678.37663097809f, - 100702.12783298964f, - 100725.88043554971f, - 100749.63443849317f, - 100773.38984165489f, - 100797.14664486986f, - 100820.90484797307f, - 100844.66445079957f, - 100868.42545318443f, - 100892.18785496285f, - 100915.95165596998f, - 100939.71685604108f, - 100963.48345501146f, - 100987.25145271645f, - 101011.02084899142f, - 101034.79164367184f, - 101058.56383659315f, - 101082.33742759094f, - 101106.11241650078f, - 101129.88880315828f, - 101153.66658739912f, - 101177.44576905905f, - 101201.22634797383f, - 101225.00832397929f, - 101248.7916969113f, - 101272.5764666058f, - 101296.36263289873f, - 101320.15019562612f, - 101343.93915462404f, - 101367.7295097286f, - 101391.52126077596f, - 101415.31440760233f, - 101439.10895004397f, - 101462.9048879372f, - 101486.70222111835f, - 101510.50094942382f, - 101534.30107269008f, - 101558.10259075361f, - 101581.90550345098f, - 101605.70981061876f, - 101629.5155120936f, - 101653.32260771218f, - 101677.13109731126f, - 101700.9409807276f, - 101724.75225779804f, - 101748.56492835947f, - 101772.3789922488f, - 101796.19444930303f, - 101820.01129935916f, - 101843.82954225427f, - 101867.64917782549f, - 101891.47020590997f, - 101915.29262634492f, - 101939.11643896763f, - 101962.94164361537f, - 101986.76824012553f, - 102010.59622833549f, - 102034.42560808272f, - 102058.25637920471f, - 102082.08854153901f, - 102105.92209492321f, - 102129.75703919494f, - 102153.59337419191f, - 102177.43109975185f, - 102201.27021571253f, - 102225.1107219118f, - 102248.95261818753f, - 102272.79590437764f, - 102296.64058032009f, - 102320.48664585294f, - 102344.33410081422f, - 102368.18294504205f, - 102392.03317837461f, - 102415.88480065008f, - 102439.73781170673f, - 102463.59221138287f, - 102487.44799951684f, - 102511.30517594703f, - 102535.1637405119f, - 102559.02369304994f, - 102582.88503339965f, - 102606.74776139966f, - 102630.6118768886f, - 102654.47737970512f, - 102678.34426968795f, - 102702.21254667587f, - 102726.08221050771f, - 102749.95326102231f, - 102773.8256980586f, - 102797.69952145554f, - 102821.57473105213f, - 102845.45132668741f, - 102869.32930820051f, - 102893.20867543056f, - 102917.08942821674f, - 102940.97156639831f, - 102964.85508981455f, - 102988.73999830478f, - 103012.6262917084f, - 103036.51396986481f, - 103060.40303261351f, - 103084.293479794f, - 103108.18531124585f, - 103132.07852680866f, - 103155.97312632212f, - 103179.8691096259f, - 103203.76647655977f, - 103227.66522696352f, - 103251.565360677f, - 103275.46687754011f, - 103299.36977739276f, - 103323.27406007495f, - 103347.1797254267f, - 103371.08677328809f, - 103394.99520349925f, - 103418.90501590034f, - 103442.81621033157f, - 103466.7287866332f, - 103490.64274464553f, - 103514.55808420894f, - 103538.4748051638f, - 103562.39290735057f, - 103586.31239060973f, - 103610.23325478184f, - 103634.15549970744f, - 103658.0791252272f, - 103682.00413118176f, - 103705.93051741188f, - 103729.8582837583f, - 103753.78743006183f, - 103777.71795616334f, - 103801.64986190372f, - 103825.58314712394f, - 103849.51781166499f, - 103873.4538553679f, - 103897.39127807376f, - 103921.33007962372f, - 103945.27025985895f, - 103969.21181862066f, - 103993.15475575015f, - 104017.0990710887f, - 104041.0447644777f, - 104064.99183575854f, - 104088.94028477269f, - 104112.89011136163f, - 104136.84131536692f, - 104160.79389663014f, - 104184.74785499295f, - 104208.70319029699f, - 104232.65990238401f, - 104256.61799109579f, - 104280.57745627411f, - 104304.53829776088f, - 104328.50051539797f, - 104352.46410902737f, - 104376.42907849104f, - 104400.39542363104f, - 104424.36314428947f, - 104448.33224030846f, - 104472.3027115302f, - 104496.27455779689f, - 104520.24777895081f, - 104544.22237483428f, - 104568.19834528965f, - 104592.17569015936f, - 104616.15440928582f, - 104640.13450251156f, - 104664.11596967909f, - 104688.09881063103f, - 104712.08302520998f, - 104736.06861325864f, - 104760.05557461972f, - 104784.043909136f, - 104808.03361665027f, - 104832.0246970054f, - 104856.01715004431f, - 104880.01097560991f, - 104904.00617354522f, - 104928.00274369326f, - 104952.00068589713f, - 104975.99999999993f, - 105000.00068584486f, - 105024.00274327511f, - 105048.00617213396f, - 105072.01097226472f, - 105096.0171435107f, - 105120.02468571535f, - 105144.03359872208f, - 105168.04388237436f, - 105192.05553651575f, - 105216.06856098982f, - 105240.08295564016f, - 105264.09872031047f, - 105288.11585484444f, - 105312.13435908582f, - 105336.1542328784f, - 105360.17547606604f, - 105384.19808849262f, - 105408.22207000206f, - 105432.24742043833f, - 105456.27413964548f, - 105480.30222746753f, - 105504.33168374863f, - 105528.36250833291f, - 105552.39470106458f, - 105576.42826178786f, - 105600.46319034706f, - 105624.49948658649f, - 105648.53715035053f, - 105672.5761814836f, - 105696.61657983017f, - 105720.65834523473f, - 105744.70147754184f, - 105768.74597659608f, - 105792.79184224212f, - 105816.83907432464f, - 105840.88767268835f, - 105864.93763717801f, - 105888.98896763846f, - 105913.04166391456f, - 105937.09572585119f, - 105961.15115329332f, - 105985.20794608595f, - 106009.2661040741f, - 106033.32562710284f, - 106057.3865150173f, - 106081.44876766266f, - 106105.51238488412f, - 106129.57736652695f, - 106153.64371243643f, - 106177.71142245791f, - 106201.78049643678f, - 106225.85093421848f, - 106249.92273564848f, - 106273.99590057228f, - 106298.07042883546f, - 106322.14632028362f, - 106346.2235747624f, - 106370.30219211751f, - 106394.38217219469f, - 106418.4635148397f, - 106442.54621989837f, - 106466.63028721658f, - 106490.71571664023f, - 106514.8025080153f, - 106538.89066118775f, - 106562.98017600364f, - 106587.07105230905f, - 106611.16328995011f, - 106635.25688877302f, - 106659.35184862395f, - 106683.44816934918f, - 106707.54585079502f, - 106731.64489280782f, - 106755.74529523395f, - 106779.84705791986f, - 106803.95018071201f, - 106828.05466345693f, - 106852.16050600118f, - 106876.26770819136f, - 106900.37626987413f, - 106924.48619089619f, - 106948.59747110425f, - 106972.71011034511f, - 106996.82410846559f, - 107020.93946531255f, - 107045.05618073288f, - 107069.17425457356f, - 107093.29368668159f, - 107117.41447690397f, - 107141.53662508781f, - 107165.66013108024f, - 107189.7849947284f, - 107213.91121587952f, - 107238.03879438085f, - 107262.16773007967f, - 107286.29802282334f, - 107310.42967245923f, - 107334.56267883476f, - 107358.69704179741f, - 107382.83276119467f, - 107406.96983687414f, - 107431.10826868335f, - 107455.24805646998f, - 107479.38920008171f, - 107503.53169936626f, - 107527.6755541714f, - 107551.82076434491f, - 107575.96732973469f, - 107600.11525018861f, - 107624.26452555461f, - 107648.41515568066f, - 107672.56714041479f, - 107696.72047960508f, - 107720.87517309963f, - 107745.03122074658f, - 107769.18862239414f, - 107793.34737789052f, - 107817.50748708403f, - 107841.66894982298f, - 107865.83176595572f, - 107889.99593533068f, - 107914.16145779629f, - 107938.32833320105f, - 107962.49656139348f, - 107986.66614222217f, - 108010.83707553573f, - 108035.00936118282f, - 108059.18299901215f, - 108083.35798887245f, - 108107.53433061253f, - 108131.71202408121f, - 108155.89106912735f, - 108180.07146559987f, - 108204.25321334775f, - 108228.43631221994f, - 108252.62076206553f, - 108276.80656273357f, - 108300.9937140732f, - 108325.18221593359f, - 108349.37206816394f, - 108373.5632706135f, - 108397.75582313156f, - 108421.94972556747f, - 108446.1449777706f, - 108470.34157959036f, - 108494.53953087622f, - 108518.7388314777f, - 108542.9394812443f, - 108567.14148002566f, - 108591.34482767139f, - 108615.54952403114f, - 108639.75556895464f, - 108663.96296229165f, - 108688.17170389196f, - 108712.38179360541f, - 108736.59323128188f, - 108760.80601677128f, - 108785.02014992358f, - 108809.23563058881f, - 108833.45245861699f, - 108857.67063385822f, - 108881.89015616261f, - 108906.11102538036f, - 108930.33324136169f, - 108954.55680395682f, - 108978.78171301607f, - 109003.00796838978f, - 109027.2355699283f, - 109051.4645174821f, - 109075.69481090162f, - 109099.92645003737f, - 109124.15943473988f, - 109148.39376485976f, - 109172.62944024763f, - 109196.86646075416f, - 109221.10482623006f, - 109245.3445365261f, - 109269.58559149304f, - 109293.82799098175f, - 109318.0717348431f, - 109342.316822928f, - 109366.56325508743f, - 109390.81103117237f, - 109415.06015103386f, - 109439.31061452301f, - 109463.56242149093f, - 109487.8155717888f, - 109512.0700652678f, - 109536.3259017792f, - 109560.58308117429f, - 109584.8416033044f, - 109609.1014680209f, - 109633.36267517522f, - 109657.62522461878f, - 109681.88911620309f, - 109706.15434977971f, - 109730.4209252002f, - 109754.68884231619f, - 109778.95810097932f, - 109803.22870104131f, - 109827.50064235389f, - 109851.77392476884f, - 109876.048548138f, - 109900.32451231324f, - 109924.60181714644f, - 109948.88046248957f, - 109973.1604481946f, - 109997.44177411357f, - 110021.72444009855f, - 110046.00844600165f, - 110070.29379167501f, - 110094.58047697082f, - 110118.86850174134f, - 110143.15786583882f, - 110167.44856911557f, - 110191.74061142397f, - 110216.0339926164f, - 110240.32871254528f, - 110264.62477106311f, - 110288.9221680224f, - 110313.22090327571f, - 110337.52097667565f, - 110361.82238807483f, - 110386.12513732594f, - 110410.42922428172f, - 110434.7346487949f, - 110459.04141071832f, - 110483.34950990479f, - 110507.6589462072f, - 110531.96971947847f, - 110556.28182957157f, - 110580.5952763395f, - 110604.91005963532f, - 110629.2261793121f, - 110653.54363522294f, - 110677.86242722106f, - 110702.18255515961f, - 110726.50401889188f, - 110750.82681827113f, - 110775.1509531507f, - 110799.47642338395f, - 110823.80322882428f, - 110848.13136932514f, - 110872.46084474004f, - 110896.79165492248f, - 110921.12379972603f, - 110945.4572790043f, - 110969.79209261097f, - 110994.12824039967f, - 111018.46572222418f, - 111042.80453793824f, - 111067.14468739566f, - 111091.48617045028f, - 111115.82898695602f, - 111140.1731367668f, - 111164.51861973657f, - 111188.86543571934f, - 111213.21358456917f, - 111237.56306614014f, - 111261.91388028639f, - 111286.26602686207f, - 111310.6195057214f, - 111334.97431671864f, - 111359.33045970804f, - 111383.68793454397f, - 111408.04674108078f, - 111432.40687917286f, - 111456.76834867468f, - 111481.13114944073f, - 111505.49528132551f, - 111529.8607441836f, - 111554.22753786962f, - 111578.59566223821f, - 111602.96511714405f, - 111627.33590244185f, - 111651.7080179864f, - 111676.08146363248f, - 111700.45623923496f, - 111724.8323446487f, - 111749.20977972864f, - 111773.58854432974f, - 111797.968638307f, - 111822.35006151545f, - 111846.73281381019f, - 111871.11689504632f, - 111895.50230507903f, - 111919.88904376348f, - 111944.27711095495f, - 111968.6665065087f, - 111993.05723028004f, - 112017.44928212435f, - 112041.842661897f, - 112066.23736945343f, - 112090.63340464912f, - 112115.0307673396f, - 112139.42945738042f, - 112163.82947462716f, - 112188.23081893545f, - 112212.63349016097f, - 112237.03748815943f, - 112261.44281278658f, - 112285.84946389822f, - 112310.25744135017f, - 112334.66674499828f, - 112359.07737469849f, - 112383.48933030672f, - 112407.90261167898f, - 112432.31721867126f, - 112456.73315113965f, - 112481.15040894024f, - 112505.56899192919f, - 112529.98889996266f, - 112554.41013289688f, - 112578.83269058811f, - 112603.25657289263f, - 112627.6817796668f, - 112652.10831076698f, - 112676.53616604958f, - 112700.96534537108f, - 112725.39584858794f, - 112749.82767555672f, - 112774.26082613398f, - 112798.6953001763f, - 112823.13109754038f, - 112847.56821808286f, - 112872.00666166049f, - 112896.44642813003f, - 112920.88751734828f, - 112945.32992917208f, - 112969.7736634583f, - 112994.21872006389f, - 113018.66509884578f, - 113043.11279966097f, - 113067.56182236652f, - 113092.01216681948f, - 113116.46383287695f, - 113140.9168203961f, - 113165.37112923413f, - 113189.82675924824f, - 113214.28371029573f, - 113238.74198223387f, - 113263.20157492002f, - 113287.66248821156f, - 113312.12472196593f, - 113336.58827604055f, - 113361.05315029295f, - 113385.51934458067f, - 113409.98685876124f, - 113434.45569269233f, - 113458.92584623155f, - 113483.39731923661f, - 113507.87011156522f, - 113532.34422307517f, - 113556.81965362425f, - 113581.2964030703f, - 113605.77447127122f, - 113630.2538580849f, - 113654.73456336933f, - 113679.21658698248f, - 113703.69992878241f, - 113728.18458862716f, - 113752.67056637487f, - 113777.15786188368f, - 113801.64647501177f, - 113826.13640561736f, - 113850.62765355874f, - 113875.12021869418f, - 113899.61410088204f, - 113924.1092999807f, - 113948.60581584855f, - 113973.10364834408f, - 113997.60279732574f, - 114022.1032626521f, - 114046.60504418172f, - 114071.10814177318f, - 114095.61255528513f, - 114120.11828457628f, - 114144.62532950533f, - 114169.13368993104f, - 114193.6433657122f, - 114218.15435670764f, - 114242.66666277626f, - 114267.18028377692f, - 114291.69521956862f, - 114316.21147001031f, - 114340.72903496103f, - 114365.24791427983f, - 114389.7681078258f, - 114414.2896154581f, - 114438.81243703587f, - 114463.33657241837f, - 114487.8620214648f, - 114512.38878403447f, - 114536.91685998671f, - 114561.44624918088f, - 114585.97695147636f, - 114610.5089667326f, - 114635.04229480909f, - 114659.57693556532f, - 114684.11288886084f, - 114708.65015455526f, - 114733.18873250818f, - 114757.72862257928f, - 114782.26982462825f, - 114806.81233851484f, - 114831.35616409882f, - 114855.90130124f, - 114880.44774979822f, - 114904.99550963337f, - 114929.5445806054f, - 114954.09496257425f, - 114978.64665539993f, - 115003.19965894247f, - 115027.75397306195f, - 115052.30959761847f, - 115076.86653247218f, - 115101.42477748329f, - 115125.984332512f, - 115150.54519741859f, - 115175.10737206334f, - 115199.67085630659f, - 115224.23565000873f, - 115248.80175303014f, - 115273.3691652313f, - 115297.93788647266f, - 115322.50791661476f, - 115347.07925551817f, - 115371.65190304347f, - 115396.2258590513f, - 115420.80112340231f, - 115445.37769595724f, - 115469.95557657682f, - 115494.53476512182f, - 115519.11526145306f, - 115543.6970654314f, - 115568.28017691776f, - 115592.86459577303f, - 115617.4503218582f, - 115642.03735503425f, - 115666.62569516223f, - 115691.21534210323f, - 115715.80629571836f, - 115740.39855586876f, - 115764.99212241563f, - 115789.58699522018f, - 115814.18317414368f, - 115838.78065904742f, - 115863.37944979276f, - 115887.97954624105f, - 115912.5809482537f, - 115937.18365569218f, - 115961.78766841792f, - 115986.39298629249f, - 116010.99960917742f, - 116035.60753693432f, - 116060.21676942479f, - 116084.82730651053f, - 116109.43914805322f, - 116134.0522939146f, - 116158.66674395645f, - 116183.2824980406f, - 116207.89955602886f, - 116232.51791778316f, - 116257.13758316539f, - 116281.75855203751f, - 116306.38082426153f, - 116331.0043996995f, - 116355.62927821343f, - 116380.25545966547f, - 116404.88294391775f, - 116429.51173083246f, - 116454.14182027178f, - 116478.77321209799f, - 116503.40590617337f, - 116528.03990236024f, - 116552.67520052097f, - 116577.31180051794f, - 116601.94970221359f, - 116626.5889054704f, - 116651.22941015086f, - 116675.8712161175f, - 116700.51432323293f, - 116725.15873135976f, - 116749.8044403606f, - 116774.45145009817f, - 116799.0997604352f, - 116823.74937123443f, - 116848.40028235866f, - 116873.05249367072f, - 116897.70600503348f, - 116922.36081630984f, - 116947.01692736275f, - 116971.67433805518f, - 116996.33304825013f, - 117020.99305781067f, - 117045.65436659988f, - 117070.31697448085f, - 117094.98088131678f, - 117119.64608697084f, - 117144.31259130625f, - 117168.98039418628f, - 117193.64949547425f, - 117218.31989503348f, - 117242.99159272734f, - 117267.66458841923f, - 117292.33888197262f, - 117317.01447325097f, - 117341.6913621178f, - 117366.36954843666f, - 117391.04903207115f, - 117415.72981288488f, - 117440.41189074152f, - 117465.09526550476f, - 117489.77993703831f, - 117514.46590520597f, - 117539.15316987154f, - 117563.84173089883f, - 117588.53158815173f, - 117613.22274149416f, - 117637.91519079005f, - 117662.60893590341f, - 117687.30397669821f, - 117712.00031303853f, - 117736.69794478847f, - 117761.39687181212f, - 117786.09709397367f, - 117810.7986111373f, - 117835.50142316725f, - 117860.20552992777f, - 117884.91093128319f, - 117909.6176270978f, - 117934.32561723603f, - 117959.03490156225f, - 117983.74547994092f, - 118008.45735223651f, - 118033.17051831353f, - 118057.88497803656f, - 118082.60073127014f, - 118107.31777787892f, - 118132.03611772758f, - 118156.75575068076f, - 118181.47667660323f, - 118206.19889535972f, - 118230.92240681504f, - 118255.64721083404f, - 118280.37330728157f, - 118305.10069602253f, - 118329.82937692187f, - 118354.55934984458f, - 118379.29061465565f, - 118404.02317122012f, - 118428.75701940308f, - 118453.49215906965f, - 118478.22859008498f, - 118502.96631231424f, - 118527.70532562268f, - 118552.44562987552f, - 118577.18722493808f, - 118601.93011067568f, - 118626.67428695368f, - 118651.41975363747f, - 118676.1665105925f, - 118700.91455768421f, - 118725.66389477813f, - 118750.41452173979f, - 118775.16643843475f, - 118799.91964472862f, - 118824.67414048707f, - 118849.42992557574f, - 118874.18699986035f, - 118898.94536320666f, - 118923.70501548043f, - 118948.46595654752f, - 118973.22818627374f, - 118997.99170452499f, - 119022.7565111672f, - 119047.52260606633f, - 119072.28998908834f, - 119097.0586600993f, - 119121.82861896523f, - 119146.59986555226f, - 119171.3723997265f, - 119196.14622135412f, - 119220.92133030134f, - 119245.69772643436f, - 119270.47540961947f, - 119295.25437972297f, - 119320.0346366112f, - 119344.81618015055f, - 119369.5990102074f, - 119394.38312664822f, - 119419.16852933947f, - 119443.95521814766f, - 119468.74319293935f, - 119493.53245358112f, - 119518.32299993958f, - 119543.1148318814f, - 119567.90794927324f, - 119592.70235198183f, - 119617.49803987393f, - 119642.29501281632f, - 119667.09327067583f, - 119691.89281331931f, - 119716.69364061367f, - 119741.49575242584f, - 119766.29914862274f, - 119791.10382907142f, - 119815.90979363887f, - 119840.71704219218f, - 119865.52557459843f, - 119890.33539072477f, - 119915.14649043836f, - 119939.95887360642f, - 119964.77254009615f, - 119989.58748977486f, - 120014.40372250983f, - 120039.22123816841f, - 120064.04003661797f, - 120088.86011772591f, - 120113.6814813597f, - 120138.50412738678f, - 120163.3280556747f, - 120188.15326609099f, - 120212.9797585032f, - 120237.807532779f, - 120262.636588786f, - 120287.46692639188f, - 120312.29854546436f, - 120337.13144587121f, - 120361.9656274802f, - 120386.80109015913f, - 120411.6378337759f, - 120436.47585819835f, - 120461.31516329442f, - 120486.15574893207f, - 120510.99761497928f, - 120535.84076130408f, - 120560.6851877745f, - 120585.53089425867f, - 120610.3778806247f, - 120635.22614674074f, - 120660.07569247499f, - 120684.92651769568f, - 120709.77862227106f, - 120734.63200606944f, - 120759.48666895913f, - 120784.3426108085f, - 120809.19983148595f, - 120834.05833085992f, - 120858.91810879884f, - 120883.77916517125f, - 120908.64149984565f, - 120933.5051126906f, - 120958.37000357473f, - 120983.23617236665f, - 121008.10361893504f, - 121032.9723431486f, - 121057.84234487606f, - 121082.71362398617f, - 121107.58618034775f, - 121132.46001382964f, - 121157.33512430069f, - 121182.21151162982f, - 121207.08917568595f, - 121231.96811633807f, - 121256.84833345517f, - 121281.72982690629f, - 121306.61259656049f, - 121331.49664228689f, - 121356.38196395461f, - 121381.26856143285f, - 121406.15643459078f, - 121431.04558329767f, - 121455.93600742277f, - 121480.82770683538f, - 121505.72068140487f, - 121530.61493100057f, - 121555.51045549192f, - 121580.40725474835f, - 121605.30532863933f, - 121630.20467703436f, - 121655.10529980299f, - 121680.00719681478f, - 121704.91036793934f, - 121729.81481304632f, - 121754.72053200539f, - 121779.62752468624f, - 121804.53579095862f, - 121829.44533069231f, - 121854.3561437571f, - 121879.26823002285f, - 121904.1815893594f, - 121929.09622163669f, - 121954.01212672464f, - 121978.92930449323f, - 122003.84775481246f, - 122028.76747755238f, - 122053.68847258303f, - 122078.61073977455f, - 122103.53427899707f, - 122128.45909012076f, - 122153.3851730158f, - 122178.31252755247f, - 122203.241153601f, - 122228.1710510317f, - 122253.10221971496f, - 122278.03465952107f, - 122302.9683703205f, - 122327.90335198362f, - 122352.83960438096f, - 122377.777127383f, - 122402.71592086025f, - 122427.65598468333f, - 122452.59731872278f, - 122477.53992284928f, - 122502.48379693348f, - 122527.42894084606f, - 122552.37535445779f, - 122577.3230376394f, - 122602.27199026172f, - 122627.22221219557f, - 122652.17370331181f, - 122677.12646348133f, - 122702.08049257506f, - 122727.03579046397f, - 122751.99235701906f, - 122776.95019211136f, - 122801.9092956119f, - 122826.8696673918f, - 122851.8313073222f, - 122876.79421527422f, - 122901.75839111907f, - 122926.72383472799f, - 122951.69054597223f, - 122976.65852472307f, - 123001.62777085182f, - 123026.59828422987f, - 123051.57006472857f, - 123076.54311221937f, - 123101.5174265737f, - 123126.49300766307f, - 123151.46985535898f, - 123176.447969533f, - 123201.42735005668f, - 123226.40799680166f, - 123251.38990963959f, - 123276.37308844214f, - 123301.35753308103f, - 123326.343243428f, - 123351.33021935483f, - 123376.31846073334f, - 123401.30796743535f, - 123426.29873933276f, - 123451.29077629748f, - 123476.28407820144f, - 123501.2786449166f, - 123526.27447631498f, - 123551.27157226863f, - 123576.2699326496f, - 123601.26955732999f, - 123626.27044618195f, - 123651.27259907764f, - 123676.27601588926f, - 123701.28069648903f, - 123726.28664074925f, - 123751.29384854218f, - 123776.30231974016f, - 123801.31205421555f, - 123826.32305184074f, - 123851.33531248817f, - 123876.34883603029f, - 123901.36362233957f, - 123926.37967128855f, - 123951.3969827498f, - 123976.41555659588f, - 124001.43539269941f, - 124026.45649093305f, - 124051.47885116948f, - 124076.50247328142f, - 124101.5273571416f, - 124126.55350262282f, - 124151.58090959788f, - 124176.60957793961f, - 124201.63950752091f, - 124226.67069821467f, - 124251.70314989384f, - 124276.73686243138f, - 124301.7718357003f, - 124326.80806957364f, - 124351.84556392446f, - 124376.88431862585f, - 124401.92433355095f, - 124426.96560857294f, - 124452.00814356498f, - 124477.05193840031f, - 124502.0969929522f, - 124527.14330709392f, - 124552.19088069882f, - 124577.23971364023f, - 124602.28980579154f, - 124627.34115702618f, - 124652.3937672176f, - 124677.44763623926f, - 124702.50276396469f, - 124727.55915026742f, - 124752.61679502104f, - 124777.67569809916f, - 124802.73585937542f, - 124827.79727872348f, - 124852.85995601704f, - 124877.92389112986f, - 124902.98908393568f, - 124928.05553430831f, - 124953.1232421216f, - 124978.19220724938f, - 125003.26242956554f, - 125028.33390894404f, - 125053.40664525882f, - 125078.48063838384f, - 125103.55588819316f, - 125128.63239456083f, - 125153.71015736091f, - 125178.78917646752f, - 125203.86945175481f, - 125228.95098309696f, - 125254.03377036817f, - 125279.1178134427f, - 125304.2031121948f, - 125329.28966649878f, - 125354.37747622898f, - 125379.46654125977f, - 125404.55686146552f, - 125429.6484367207f, - 125454.74126689974f, - 125479.83535187715f, - 125504.93069152744f, - 125530.02728572517f, - 125555.12513434493f, - 125580.22423726133f, - 125605.32459434902f, - 125630.42620548268f, - 125655.52907053704f, - 125680.63318938682f, - 125705.7385619068f, - 125730.84518797178f, - 125755.9530674566f, - 125781.06220023613f, - 125806.17258618528f, - 125831.28422517896f, - 125856.39711709213f, - 125881.51126179981f, - 125906.62665917698f, - 125931.74330909875f, - 125956.86121144016f, - 125981.98036607634f, - 126007.10077288245f, - 126032.22243173365f, - 126057.34534250517f, - 126082.46950507225f, - 126107.59491931014f, - 126132.72158509417f, - 126157.84950229966f, - 126182.97867080198f, - 126208.10909047653f, - 126233.24076119871f, - 126258.37368284403f, - 126283.50785528794f, - 126308.64327840599f, - 126333.7799520737f, - 126358.91787616667f, - 126384.0570505605f, - 126409.19747513086f, - 126434.3391497534f, - 126459.48207430386f, - 126484.62624865794f, - 126509.77167269142f, - 126534.9183462801f, - 126560.06626929982f, - 126585.21544162642f, - 126610.36586313581f, - 126635.51753370391f, - 126660.67045320668f, - 126685.82462152008f, - 126710.98003852014f, - 126736.1367040829f, - 126761.29461808444f, - 126786.45378040087f, - 126811.61419090834f, - 126836.77584948298f, - 126861.93875600102f, - 126887.10291033868f, - 126912.26831237224f, - 126937.43496197795f, - 126962.60285903217f, - 126987.77200341123f, - 127012.94239499152f, - 127038.11403364947f, - 127063.2869192615f, - 127088.46105170409f, - 127113.63643085376f, - 127138.81305658702f, - 127163.99092878048f, - 127189.17004731069f, - 127214.3504120543f, - 127239.53202288797f, - 127264.71487968838f, - 127289.89898233226f, - 127315.08433069635f, - 127340.27092465744f, - 127365.45876409234f, - 127390.64784887788f, - 127415.83817889093f, - 127441.02975400841f, - 127466.22257410725f, - 127491.4166390644f, - 127516.61194875685f, - 127541.80850306165f, - 127567.00630185583f, - 127592.20534501647f, - 127617.4056324207f, - 127642.60716394568f, - 127667.80993946856f, - 127693.01395886653f, - 127718.21922201688f, - 127743.42572879682f, - 127768.63347908368f, - 127793.8424727548f, - 127819.05270968749f, - 127844.26418975917f, - 127869.47691284724f, - 127894.69087882918f, - 127919.90608758242f, - 127945.12253898452f, - 127970.34023291297f, - 127995.55916924539f, - 128020.77934785932f, - 128046.00076863244f, - 128071.22343144237f, - 128096.44733616684f, - 128121.67248268353f, - 128146.89887087021f, - 128172.12650060465f, - 128197.35537176466f, - 128222.5854842281f, - 128247.81683787282f, - 128273.0494325767f, - 128298.28326821771f, - 128323.5183446738f, - 128348.75466182294f, - 128373.99221954317f, - 128399.23101771252f, - 128424.47105620909f, - 128449.71233491098f, - 128474.95485369631f, - 128500.19861244329f, - 128525.44361103009f, - 128550.68984933494f, - 128575.93732723613f, - 128601.18604461191f, - 128626.43600134061f, - 128651.68719730059f, - 128676.93963237021f, - 128702.1933064279f, - 128727.44821935208f, - 128752.70437102125f, - 128777.96176131385f, - 128803.22039010846f, - 128828.48025728362f, - 128853.74136271792f, - 128879.00370628996f, - 128904.2672878784f, - 128929.53210736193f, - 128954.79816461923f, - 128980.06545952905f, - 129005.33399197015f, - 129030.60376182134f, - 129055.87476896142f, - 129081.14701326926f, - 129106.42049462376f, - 129131.6952129038f, - 129156.97116798835f, - 129182.24835975636f, - 129207.52678808685f, - 129232.80645285884f, - 129258.08735395141f, - 129283.36949124365f, - 129308.65286461466f, - 129333.9374739436f, - 129359.22331910966f, - 129384.51039999202f, - 129409.79871646997f, - 129435.08826842274f, - 129460.37905572963f, - 129485.67107826998f, - 129510.96433592314f, - 129536.2588285685f, - 129561.55455608548f, - 129586.85151835352f, - 129612.14971525209f, - 129637.4491466607f, - 129662.74981245887f, - 129688.0517125262f, - 129713.35484674224f, - 129738.65921498663f, - 129763.96481713903f, - 129789.2716530791f, - 129814.57972268655f, - 129839.88902584116f, - 129865.19956242264f, - 129890.51133231082f, - 129915.82433538554f, - 129941.13857152662f, - 129966.45404061397f, - 129991.7707425275f, - 130017.08867714716f, - 130042.4078443529f, - 130067.72824402474f, - 130093.04987604271f, - 130118.37274028687f, - 130143.69683663732f, - 130169.02216497416f, - 130194.34872517755f, - 130219.67651712766f, - 130245.0055407047f, - 130270.33579578891f, - 130295.66728226055f, - 130320.99999999991f, - 130346.33394888733f, - 130371.66912880314f, - 130397.00553962773f, - 130422.34318124152f, - 130447.68205352494f, - 130473.02215635845f, - 130498.36348962256f, - 130523.70605319779f, - 130549.0498469647f, - 130574.39487080388f, - 130599.74112459592f, - 130625.08860822149f, - 130650.43732156123f, - 130675.78726449587f, - 130701.13843690613f, - 130726.49083867275f, - 130751.84446967654f, - 130777.19932979831f, - 130802.5554189189f, - 130827.91273691918f, - 130853.27128368006f, - 130878.63105908247f, - 130903.99206300738f, - 130929.35429533575f, - 130954.71775594862f, - 130980.08244472703f, - 131005.44836155206f, - 131030.81550630482f, - 131056.18387886642f, - 131081.55347911804f, - 131106.92430694087f, - 131132.29636221612f, - 131157.66964482504f, - 131183.0441546489f, - 131208.41989156904f, - 131233.79685546676f, - 131259.17504622342f, - 131284.55446372041f, - 131309.93510783918f, - 131335.31697846117f, - 131360.70007546784f, - 131386.0843987407f, - 131411.46994816128f, - 131436.85672361116f, - 131462.24472497194f, - 131487.6339521252f, - 131513.02440495262f, - 131538.41608333588f, - 131563.80898715663f, - 131589.2031162967f, - 131614.59847063778f, - 131639.9950500617f, - 131665.39285445024f, - 131690.7918836853f, - 131716.19213764873f, - 131741.5936162224f, - 131766.99631928833f, - 131792.4002467284f, - 131817.80539842462f, - 131843.21177425905f, - 131868.6193741137f, - 131894.02819787065f, - 131919.43824541202f, - 131944.84951661993f, - 131970.26201137656f, - 131995.67572956407f, - 132021.09067106468f, - 132046.50683576067f, - 132071.9242235343f, - 132097.34283426782f, - 132122.76266784366f, - 132148.1837241441f, - 132173.60600305157f, - 132199.02950444847f, - 132224.45422821722f, - 132249.88017424036f, - 132275.3073424003f, - 132300.73573257966f, - 132326.16534466096f, - 132351.59617852676f, - 132377.0282340597f, - 132402.46151114244f, - 132427.8960096576f, - 132453.3317294879f, - 132478.7686705161f, - 132504.2068326249f, - 132529.64621569714f, - 132555.0868196156f, - 132580.5286442631f, - 132605.97168952253f, - 132631.41595527678f, - 132656.8614414088f, - 132682.3081478015f, - 132707.75607433787f, - 132733.20522090094f, - 132758.65558737374f, - 132784.1071736393f, - 132809.55997958075f, - 132835.01400508118f, - 132860.46925002377f, - 132885.92571429166f, - 132911.3833977681f, - 132936.84230033628f, - 132962.30242187946f, - 132987.76376228096f, - 133013.22632142407f, - 133038.69009919214f, - 133064.15509546854f, - 133089.62131013666f, - 133115.08874307995f, - 133140.55739418184f, - 133166.0272633258f, - 133191.4983503954f, - 133216.97065527414f, - 133242.4441778456f, - 133267.91891799335f, - 133293.39487560102f, - 133318.87205055228f, - 133344.3504427308f, - 133369.83005202023f, - 133395.3108783044f, - 133420.79292146701f, - 133446.27618139185f, - 133471.76065796276f, - 133497.24635106357f, - 133522.73326057816f, - 133548.2213863904f, - 133573.71072838426f, - 133599.20128644365f, - 133624.6930604526f, - 133650.1860502951f, - 133675.68025585517f, - 133701.1756770169f, - 133726.67231366437f, - 133752.17016568172f, - 133777.66923295305f, - 133803.1695153626f, - 133828.67101279454f, - 133854.1737251331f, - 133879.67765226253f, - 133905.18279406714f, - 133930.68915043125f, - 133956.19672123916f, - 133981.70550637526f, - 134007.215505724f, - 134032.7267191697f, - 134058.23914659687f, - 134083.75278789f, - 134109.26764293358f, - 134134.78371161217f, - 134160.30099381026f, - 134185.8194894125f, - 134211.33919830353f, - 134236.8601203679f, - 134262.38225549037f, - 134287.90560355558f, - 134313.4301644483f, - 134338.95593805326f, - 134364.48292425525f, - 134390.0111229391f, - 134415.54053398955f, - 134441.0711572916f, - 134466.60299273f, - 134492.1360401898f, - 134517.67029955584f, - 134543.20577071316f, - 134568.74245354676f, - 134594.2803479416f, - 134619.81945378278f, - 134645.35977095537f, - 134670.90129934452f, - 134696.4440388353f, - 134721.9879893129f, - 134747.53315066252f, - 134773.07952276937f, - 134798.6271055187f, - 134824.17589879577f, - 134849.7259024859f, - 134875.27711647438f, - 134900.8295406466f, - 134926.38317488792f, - 134951.93801908373f, - 134977.4940731195f, - 135003.0513368807f, - 135028.60981025276f, - 135054.16949312127f, - 135079.73038537172f, - 135105.29248688967f, - 135130.85579756077f, - 135156.42031727062f, - 135181.98604590484f, - 135207.55298334916f, - 135233.12112948927f, - 135258.69048421088f, - 135284.26104739975f, - 135309.83281894168f, - 135335.4057987225f, - 135360.97998662802f, - 135386.55538254412f, - 135412.1319863567f, - 135437.70979795168f, - 135463.28881721498f, - 135488.86904403262f, - 135514.45047829056f, - 135540.03311987486f, - 135565.61696867156f, - 135591.20202456677f, - 135616.78828744654f, - 135642.37575719706f, - 135667.96443370447f, - 135693.55431685498f, - 135719.14540653478f, - 135744.7377026301f, - 135770.33120502727f, - 135795.92591361253f, - 135821.52182827223f, - 135847.11894889272f, - 135872.7172753604f, - 135898.3168075616f, - 135923.91754538284f, - 135949.51948871053f, - 135975.12263743114f, - 136000.72699143123f, - 136026.3325505973f, - 136051.9393148159f, - 136077.5472839737f, - 136103.15645795723f, - 136128.76683665317f, - 136154.37841994822f, - 136179.991207729f, - 136205.60519988232f, - 136231.2203962949f, - 136256.8367968535f, - 136282.45440144493f, - 136308.07320995603f, - 136333.69322227367f, - 136359.3144382847f, - 136384.93685787608f, - 136410.56048093468f, - 136436.18530734754f, - 136461.81133700156f, - 136487.43856978387f, - 136513.06700558143f, - 136538.6966442813f, - 136564.32748577066f, - 136589.95952993655f, - 136615.59277666616f, - 136641.22722584667f, - 136666.86287736523f, - 136692.49973110916f, - 136718.13778696564f, - 136743.77704482197f, - 136769.41750456547f, - 136795.05916608346f, - 136820.7020292633f, - 136846.34609399244f, - 136871.9913601582f, - 136897.63782764805f, - 136923.28549634948f, - 136948.93436614997f, - 136974.58443693706f, - 137000.23570859825f, - 137025.88818102115f, - 137051.54185409332f, - 137077.19672770242f, - 137102.8528017361f, - 137128.51007608202f, - 137154.16855062786f, - 137179.82822526142f, - 137205.4890998704f, - 137231.15117434258f, - 137256.8144485658f, - 137282.4789224279f, - 137308.14459581667f, - 137333.8114686201f, - 137359.47954072602f, - 137385.1488120224f, - 137410.8192823972f, - 137436.49095173844f, - 137462.16381993407f, - 137487.8378868722f, - 137513.5131524409f, - 137539.18961652822f, - 137564.8672790223f, - 137590.5461398113f, - 137616.22619878338f, - 137641.90745582676f, - 137667.58991082967f, - 137693.27356368033f, - 137718.95841426702f, - 137744.64446247809f, - 137770.33170820182f, - 137796.0201513266f, - 137821.7097917408f, - 137847.40062933284f, - 137873.09266399115f, - 137898.78589560417f, - 137924.48032406042f, - 137950.17594924837f, - 137975.8727710566f, - 138001.57078937365f, - 138027.27000408815f, - 138052.97041508864f, - 138078.67202226384f, - 138104.3748255024f, - 138130.07882469296f, - 138155.78401972432f, - 138181.49041048516f, - 138207.1979968643f, - 138232.9067787505f, - 138258.61675603263f, - 138284.3279285995f, - 138310.04029633995f, - 138335.75385914298f, - 138361.46861689744f, - 138387.18456949232f, - 138412.9017168166f, - 138438.62005875923f, - 138464.3395952093f, - 138490.06032605586f, - 138515.78225118798f, - 138541.50537049473f, - 138567.2296838653f, - 138592.95519118884f, - 138618.6818923545f, - 138644.40978725153f, - 138670.13887576913f, - 138695.86915779658f, - 138721.60063322316f, - 138747.33330193823f, - 138773.06716383106f, - 138798.80221879104f, - 138824.53846670757f, - 138850.27590747006f, - 138876.01454096794f, - 138901.7543670907f, - 138927.49538572782f, - 138953.2375967688f, - 138978.9810001032f, - 139004.7255956206f, - 139030.4713832106f, - 139056.2183627628f, - 139081.96653416683f, - 139107.7158973124f, - 139133.46645208917f, - 139159.2181983869f, - 139184.97113609532f, - 139210.7252651042f, - 139236.48058530336f, - 139262.23709658257f, - 139287.99479883176f, - 139313.75369194074f, - 139339.51377579942f, - 139365.27505029776f, - 139391.03751532568f, - 139416.80117077316f, - 139442.56601653024f, - 139468.3320524869f, - 139494.09927853322f, - 139519.86769455927f, - 139545.63730045516f, - 139571.408096111f, - 139597.18008141697f, - 139622.95325626322f, - 139648.72762054f, - 139674.5031741375f, - 139700.27991694602f, - 139726.0578488558f, - 139751.83696975713f, - 139777.61727954043f, - 139803.39877809596f, - 139829.18146531415f, - 139854.9653410854f, - 139880.75040530015f, - 139906.53665784886f, - 139932.324098622f, - 139958.11272751007f, - 139983.90254440365f, - 140009.69354919327f, - 140035.4857417695f, - 140061.27912202294f, - 140087.07368984428f, - 140112.86944512415f, - 140138.6663877532f, - 140164.4645176222f, - 140190.26383462187f, - 140216.06433864293f, - 140241.86602957622f, - 140267.66890731253f, - 140293.47297174268f, - 140319.27822275754f, - 140345.08466024802f, - 140370.89228410498f, - 140396.70109421943f, - 140422.51109048226f, - 140448.32227278448f, - 140474.13464101712f, - 140499.94819507122f, - 140525.7629348378f, - 140551.578860208f, - 140577.3959710729f, - 140603.21426732364f, - 140629.03374885136f, - 140654.8544155473f, - 140680.67626730262f, - 140706.49930400858f, - 140732.32352555645f, - 140758.1489318375f, - 140783.97552274304f, - 140809.80329816442f, - 140835.63225799298f, - 140861.46240212015f, - 140887.2937304373f, - 140913.12624283586f, - 140938.95993920733f, - 140964.79481944317f, - 140990.63088343487f, - 141016.468131074f, - 141042.30656225214f, - 141068.14617686084f, - 141093.98697479168f, - 141119.82895593636f, - 141145.6721201865f, - 141171.51646743377f, - 141197.36199756994f, - 141223.20871048668f, - 141249.05660607578f, - 141274.90568422904f, - 141300.75594483822f, - 141326.6073877952f, - 141352.4600129918f, - 141378.31382031992f, - 141404.16880967148f, - 141430.02498093838f, - 141455.8823340126f, - 141481.74086878612f, - 141507.60058515094f, - 141533.4614829991f, - 141559.32356222265f, - 141585.18682271364f, - 141611.0512643642f, - 141636.9168870665f, - 141662.78369071265f, - 141688.6516751948f, - 141714.5208404052f, - 141740.39118623605f, - 141766.26271257963f, - 141792.1354193282f, - 141818.00930637406f, - 141843.88437360956f, - 141869.760620927f, - 141895.6380482188f, - 141921.51665537735f, - 141947.39644229505f, - 141973.27740886438f, - 141999.15955497778f, - 142025.0428805278f, - 142050.9273854069f, - 142076.81306950765f, - 142102.69993272264f, - 142128.58797494444f, - 142154.4771960657f, - 142180.36759597904f, - 142206.25917457714f, - 142232.15193175265f, - 142258.04586739838f, - 142283.94098140698f, - 142309.83727367126f, - 142335.734744084f, - 142361.63339253806f, - 142387.5332189262f, - 142413.43422314132f, - 142439.33640507632f, - 142465.23976462413f, - 142491.14430167765f, - 142517.05001612983f, - 142542.95690787368f, - 142568.86497680223f, - 142594.77422280848f, - 142620.6846457855f, - 142646.5962456264f, - 142672.50902222423f, - 142698.42297547215f, - 142724.33810526333f, - 142750.25441149093f, - 142776.17189404817f, - 142802.09055282827f, - 142828.0103877245f, - 142853.93139863008f, - 142879.85358543837f, - 142905.77694804268f, - 142931.70148633636f, - 142957.62720021277f, - 142983.55408956532f, - 143009.48215428743f, - 143035.41139427255f, - 143061.34180941415f, - 143087.2733996057f, - 143113.20616474075f, - 143139.14010471283f, - 143165.0752194155f, - 143191.01150874238f, - 143216.94897258704f, - 143242.88761084314f, - 143268.82742340435f, - 143294.76841016437f, - 143320.71057101688f, - 143346.65390585564f, - 143372.59841457437f, - 143398.54409706692f, - 143424.490953227f, - 143450.43898294857f, - 143476.38818612538f, - 143502.33856265133f, - 143528.29011242036f, - 143554.24283532638f, - 143580.19673126334f, - 143606.1518001252f, - 143632.10804180597f, - 143658.0654561997f, - 143684.02404320036f, - 143709.98380270213f, - 143735.944734599f, - 143761.9068387852f, - 143787.87011515474f, - 143813.83456360188f, - 143839.8001840208f, - 143865.7669763057f, - 143891.7349403508f, - 143917.7040760504f, - 143943.67438329876f, - 143969.6458619902f, - 143995.61851201905f, - 144021.59233327967f, - 144047.56732566646f, - 144073.54348907378f, - 144099.52082339607f, - 144125.49932852783f, - 144151.4790043635f, - 144177.45985079758f, - 144203.44186772458f, - 144229.4250550391f, - 144255.40941263564f, - 144281.39494040885f, - 144307.3816382533f, - 144333.36950606373f, - 144359.35854373468f, - 144385.34875116093f, - 144411.34012823718f, - 144437.33267485813f, - 144463.32639091855f, - 144489.32127631325f, - 144515.31733093705f, - 144541.31455468474f, - 144567.3129474512f, - 144593.3125091313f, - 144619.31323961995f, - 144645.31513881206f, - 144671.31820660262f, - 144697.32244288657f, - 144723.3278475589f, - 144749.33442051467f, - 144775.34216164888f, - 144801.35107085665f, - 144827.36114803303f, - 144853.37239307314f, - 144879.38480587213f, - 144905.39838632516f, - 144931.41313432742f, - 144957.4290497741f, - 144983.44613256046f, - 145009.46438258173f, - 145035.48379973322f, - 145061.5043839102f, - 145087.52613500805f, - 145113.54905292206f, - 145139.57313754765f, - 145165.59838878017f, - 145191.6248065151f, - 145217.65239064783f, - 145243.68114107384f, - 145269.71105768863f, - 145295.74214038774f, - 145321.77438906668f, - 145347.807803621f, - 145373.8423839463f, - 145399.87812993818f, - 145425.9150414923f, - 145451.95311850426f, - 145477.9923608698f, - 145504.03276848458f, - 145530.07434124436f, - 145556.11707904484f, - 145582.1609817818f, - 145608.20604935108f, - 145634.25228164849f, - 145660.2996785698f, - 145686.34824001096f, - 145712.39796586783f, - 145738.4488560363f, - 145764.50091041232f, - 145790.55412889185f, - 145816.60851137087f, - 145842.66405774537f, - 145868.7207679114f, - 145894.778641765f, - 145920.83767920226f, - 145946.89788011924f, - 145972.95924441208f, - 145999.02177197693f, - 146025.08546270995f, - 146051.15031650732f, - 146077.21633326527f, - 146103.28351288004f, - 146129.3518552479f, - 146155.42136026506f, - 146181.49202782792f, - 146207.56385783272f, - 146233.63685017588f, - 146259.71100475377f, - 146285.78632146274f, - 146311.86280019928f, - 146337.94044085976f, - 146364.0192433407f, - 146390.09920753856f, - 146416.18033334985f, - 146442.26262067116f, - 146468.34606939898f, - 146494.43067942993f, - 146520.51645066062f, - 146546.60338298764f, - 146572.6914763077f, - 146598.7807305174f, - 146624.87114551352f, - 146650.96272119274f, - 146677.0554574518f, - 146703.14935418745f, - 146729.2444112965f, - 146755.34062867577f, - 146781.43800622207f, - 146807.53654383228f, - 146833.6362414033f, - 146859.73709883197f, - 146885.83911601527f, - 146911.94229285014f, - 146938.04662923355f, - 146964.15212506248f, - 146990.25878023397f, - 147016.36659464505f, - 147042.4755681928f, - 147068.58570077427f, - 147094.6969922866f, - 147120.80944262692f, - 147146.92305169237f, - 147173.03781938017f, - 147199.15374558745f, - 147225.2708302115f, - 147251.38907314953f, - 147277.5084742988f, - 147303.62903355664f, - 147329.75075082036f, - 147355.87362598727f, - 147381.99765895473f, - 147408.12284962015f, - 147434.2491978809f, - 147460.37670363448f, - 147486.50536677826f, - 147512.63518720976f, - 147538.76616482646f, - 147564.89829952587f, - 147591.03159120557f, - 147617.16603976308f, - 147643.301645096f, - 147669.43840710196f, - 147695.5763256786f, - 147721.71540072354f, - 147747.85563213445f, - 147773.9970198091f, - 147800.13956364512f, - 147826.28326354033f, - 147852.42811939248f, - 147878.57413109933f, - 147904.72129855872f, - 147930.8696216685f, - 147957.01910032652f, - 147983.16973443062f, - 148009.32152387875f, - 148035.47446856883f, - 148061.62856839882f, - 148087.78382326665f, - 148113.94023307035f, - 148140.09779770792f, - 148166.2565170774f, - 148192.41639107687f, - 148218.57741960438f, - 148244.73960255808f, - 148270.90293983606f, - 148297.0674313365f, - 148323.23307695755f, - 148349.39987659742f, - 148375.56783015432f, - 148401.73693752653f, - 148427.90719861226f, - 148454.07861330983f, - 148480.25118151752f, - 148506.42490313368f, - 148532.59977805667f, - 148558.77580618486f, - 148584.95298741665f, - 148611.13132165046f, - 148637.3108087847f, - 148663.4914487179f, - 148689.6732413485f, - 148715.85618657502f, - 148742.040284296f, - 148768.22553440998f, - 148794.41193681557f, - 148820.59949141133f, - 148846.7881980959f, - 148872.97805676793f, - 148899.16906732606f, - 148925.361229669f, - 148951.55454369547f, - 148977.74900930419f, - 149003.9446263939f, - 149030.14139486343f, - 149056.3393146115f, - 149082.538385537f, - 149108.73860753875f, - 149134.9399805156f, - 149161.14250436646f, - 149187.34617899026f, - 149213.5510042859f, - 149239.75698015234f, - 149265.96410648854f, - 149292.17238319354f, - 149318.38181016635f, - 149344.59238730598f, - 149370.80411451156f, - 149397.01699168212f, - 149423.2310187168f, - 149449.4461955147f, - 149475.66252197503f, - 149501.87999799693f, - 149528.0986234796f, - 149554.31839832227f, - 149580.53932242419f, - 149606.7613956846f, - 149632.98461800278f, - 149659.2089892781f, - 149685.43450940982f, - 149711.66117829733f, - 149737.88899584f, - 149764.11796193724f, - 149790.34807648844f, - 149816.5793393931f, - 149842.8117505506f, - 149869.0453098605f, - 149895.28001722222f, - 149921.51587253538f, - 149947.75287569952f, - 149973.99102661415f, - 150000.2303251789f, - 150026.47077129342f, - 150052.71236485732f, - 150078.95510577026f, - 150105.1989939319f, - 150131.444029242f, - 150157.69021160025f, - 150183.9375409064f, - 150210.18601706024f, - 150236.43563996154f, - 150262.68640951012f, - 150288.93832560582f, - 150315.19138814852f, - 150341.44559703805f, - 150367.70095217437f, - 150393.95745345735f, - 150420.215100787f, - 150446.4738940632f, - 150472.733833186f, - 150498.99491805542f, - 150525.25714857146f, - 150551.5205246342f, - 150577.7850461437f, - 150604.05071300003f, - 150630.31752510337f, - 150656.58548235384f, - 150682.8545846516f, - 150709.1248318968f, - 150735.39622398972f, - 150761.66876083054f, - 150787.9424423195f, - 150814.2172683569f, - 150840.49323884305f, - 150866.7703536782f, - 150893.04861276277f, - 150919.32801599705f, - 150945.60856328148f, - 150971.89025451642f, - 150998.1730896023f, - 151024.45706843957f, - 151050.74219092872f, - 151077.0284569702f, - 151103.31586646455f, - 151129.6044193123f, - 151155.894115414f, - 151182.1849546702f, - 151208.47693698155f, - 151234.77006224863f, - 151261.0643303721f, - 151287.35974125259f, - 151313.65629479082f, - 151339.95399088747f, - 151366.25282944329f, - 151392.55281035902f, - 151418.85393353543f, - 151445.1561988733f, - 151471.45960627345f, - 151497.76415563675f, - 151524.06984686397f, - 151550.3766798561f, - 151576.68465451393f, - 151602.99377073845f, - 151629.30402843058f, - 151655.61542749128f, - 151681.92796782157f, - 151708.24164932242f, - 151734.55647189484f, - 151760.87243543993f, - 151787.18953985872f, - 151813.50778505235f, - 151839.82717092187f, - 151866.14769736846f, - 151892.46936429327f, - 151918.79217159748f, - 151945.1161191823f, - 151971.4412069489f, - 151997.76743479856f, - 152024.09480263255f, - 152050.42331035214f, - 152076.75295785864f, - 152103.0837450534f, - 152129.41567183775f, - 152155.74873811303f, - 152182.08294378067f, - 152208.41828874208f, - 152234.7547728987f, - 152261.09239615197f, - 152287.43115840337f, - 152313.7710595544f, - 152340.11209950657f, - 152366.45427816146f, - 152392.79759542056f, - 152419.14205118554f, - 152445.48764535793f, - 152471.8343778394f, - 152498.1822485316f, - 152524.53125733617f, - 152550.88140415482f, - 152577.23268888926f, - 152603.5851114412f, - 152629.9386717124f, - 152656.29336960468f, - 152682.64920501978f, - 152709.00617785956f, - 152735.36428802583f, - 152761.72353542043f, - 152788.0839199453f, - 152814.4454415023f, - 152840.80809999333f, - 152867.1718953204f, - 152893.53682738543f, - 152919.9028960904f, - 152946.27010133737f, - 152972.63844302832f, - 152999.0079210653f, - 153025.3785353504f, - 153051.7502857857f, - 153078.12317227334f, - 153104.4971947154f, - 153130.8723530141f, - 153157.24864707157f, - 153183.62607679f, - 153210.00464207167f, - 153236.38434281875f, - 153262.76517893354f, - 153289.1471503183f, - 153315.53025687535f, - 153341.914498507f, - 153368.29987511563f, - 153394.68638660354f, - 153421.07403287315f, - 153447.4628138269f, - 153473.85272936718f, - 153500.24377939643f, - 153526.63596381716f, - 153553.02928253182f, - 153579.42373544298f, - 153605.81932245308f, - 153632.21604346478f, - 153658.61389838057f, - 153685.0128871031f, - 153711.41300953497f, - 153737.8142655788f, - 153764.21665513728f, - 153790.62017811305f, - 153817.02483440886f, - 153843.4306239274f, - 153869.8375465714f, - 153896.24560224364f, - 153922.65479084692f, - 153949.06511228404f, - 153975.4765664578f, - 154001.88915327107f, - 154028.3028726267f, - 154054.7177244276f, - 154081.13370857667f, - 154107.55082497682f, - 154133.969073531f, - 154160.38845414226f, - 154186.8089667135f, - 154213.23061114774f, - 154239.65338734805f, - 154266.07729521746f, - 154292.50233465908f, - 154318.92850557598f, - 154345.35580787127f, - 154371.7842414481f, - 154398.21380620962f, - 154424.64450205903f, - 154451.0763288995f, - 154477.50928663427f, - 154503.9433751666f, - 154530.3785943997f, - 154556.8149442369f, - 154583.25242458144f, - 154609.69103533673f, - 154636.13077640603f, - 154662.5716476928f, - 154689.01364910032f, - 154715.45678053208f, - 154741.90104189145f, - 154768.34643308193f, - 154794.79295400696f, - 154821.24060457002f, - 154847.68938467462f, - 154874.13929422433f, - 154900.59033312264f, - 154927.04250127316f, - 154953.49579857948f, - 154979.9502249452f, - 155006.40578027396f, - 155032.86246446942f, - 155059.32027743524f, - 155085.77921907514f, - 155112.2392892928f, - 155138.70048799197f, - 155165.16281507642f, - 155191.6262704499f, - 155218.09085401625f, - 155244.55656567923f, - 155271.0234053427f, - 155297.4913729106f, - 155323.96046828668f, - 155350.4306913749f, - 155376.9020420792f, - 155403.37452030348f, - 155429.8481259517f, - 155456.3228589279f, - 155482.79871913602f, - 155509.2757064801f, - 155535.75382086422f, - 155562.2330621924f, - 155588.71343036872f, - 155615.1949252973f, - 155641.67754688227f, - 155668.1612950278f, - 155694.64616963797f, - 155721.13217061706f, - 155747.6192978692f, - 155774.1075512987f, - 155800.59693080973f, - 155827.0874363066f, - 155853.5790676936f, - 155880.07182487496f, - 155906.56570775513f, - 155933.06071623837f, - 155959.5568502291f, - 155986.05410963166f, - 156012.5524943505f, - 156039.05200429005f, - 156065.55263935472f, - 156092.054399449f, - 156118.5572844774f, - 156145.06129434443f, - 156171.5664289546f, - 156198.07268821247f, - 156224.5800720226f, - 156251.0885802896f, - 156277.5982129181f, - 156304.10896981266f, - 156330.620850878f, - 156357.1338560188f, - 156383.6479851397f, - 156410.16323814544f, - 156436.67961494075f, - 156463.1971154304f, - 156489.71573951913f, - 156516.2354871118f, - 156542.7563581131f, - 156569.278352428f, - 156595.80146996127f, - 156622.32571061782f, - 156648.85107430254f, - 156675.37756092031f, - 156701.90517037612f, - 156728.4339025749f, - 156754.96375742165f, - 156781.4947348213f, - 156808.0268346789f, - 156834.5600568995f, - 156861.09440138817f, - 156887.62986804993f, - 156914.16645678994f, - 156940.70416751326f, - 156967.24300012505f, - 156993.78295453047f, - 157020.32403063469f, - 157046.8662283429f, - 157073.40954756032f, - 157099.9539881922f, - 157126.49955014378f, - 157153.04623332032f, - 157179.59403762716f, - 157206.14296296958f, - 157232.69300925292f, - 157259.24417638258f, - 157285.79646426387f, - 157312.3498728022f, - 157338.90440190304f, - 157365.46005147175f, - 157392.01682141385f, - 157418.57471163478f, - 157445.13372204005f, - 157471.69385253516f, - 157498.25510302564f, - 157524.81747341706f, - 157551.38096361503f, - 157577.9455735251f, - 157604.51130305286f, - 157631.07815210402f, - 157657.64612058416f, - 157684.21520839902f, - 157710.78541545427f, - 157737.3567416556f, - 157763.92918690876f, - 157790.50275111952f, - 157817.07743419363f, - 157843.65323603692f, - 157870.23015655516f, - 157896.80819565422f, - 157923.3873532399f, - 157949.96762921812f, - 157976.5490234948f, - 158003.13153597576f, - 158029.715166567f, - 158056.2999151745f, - 158082.88578170416f, - 158109.47276606198f, - 158136.06086815405f, - 158162.6500878863f, - 158189.24042516484f, - 158215.83187989573f, - 158242.42445198505f, - 158269.01814133892f, - 158295.61294786347f, - 158322.20887146486f, - 158348.80591204923f, - 158375.4040695228f, - 158402.00334379176f, - 158428.60373476235f, - 158455.2052423408f, - 158481.80786643337f, - 158508.4116069464f, - 158535.01646378616f, - 158561.62243685898f, - 158588.2295260712f, - 158614.8377313292f, - 158641.44705253936f, - 158668.05748960807f, - 158694.6690424418f, - 158721.28171094693f, - 158747.89549502998f, - 158774.5103945974f, - 158801.12640955573f, - 158827.74353981143f, - 158854.36178527112f, - 158880.9811458413f, - 158907.60162142856f, - 158934.22321193956f, - 158960.84591728085f, - 158987.4697373591f, - 159014.09467208097f, - 159040.72072135314f, - 159067.3478850823f, - 159093.9761631752f, - 159120.60555553852f, - 159147.23606207906f, - 159173.8676827036f, - 159200.5004173189f, - 159227.13426583182f, - 159253.76922814918f, - 159280.4053041778f, - 159307.0424938246f, - 159333.6807969965f, - 159360.32021360032f, - 159386.96074354305f, - 159413.60238673165f, - 159440.2451430731f, - 159466.88901247433f, - 159493.53399484244f, - 159520.18009008438f, - 159546.8272981072f, - 159573.47561881805f, - 159600.12505212397f, - 159626.77559793205f, - 159653.4272561494f, - 159680.08002668325f, - 159706.7339094407f, - 159733.38890432892f, - 159760.04501125516f, - 159786.70223012666f, - 159813.3605608506f, - 159840.02000333427f, - 159866.68055748497f, - 159893.34222320997f, - 159920.00500041663f, - 159946.66888901225f, - 159973.33388890422f, - 159999.99999999988f, - 160026.66722220668f, - 160053.33555543202f, - 160080.0049995833f, - 160106.675554568f, - 160133.3472202936f, - 160160.0199966676f, - 160186.6938835975f, - 160213.36888099083f, - 160240.04498875517f, - 160266.72220679803f, - 160293.4005350271f, - 160320.07997334987f, - 160346.76052167406f, - 160373.4421799073f, - 160400.1249479572f, - 160426.8088257315f, - 160453.49381313793f, - 160480.17991008417f, - 160506.86711647795f, - 160533.5554322271f, - 160560.24485723933f, - 160586.93539142248f, - 160613.62703468435f, - 160640.31978693279f, - 160667.0136480757f, - 160693.70861802087f, - 160720.40469667627f, - 160747.1018839498f, - 160773.80017974938f, - 160800.49958398298f, - 160827.20009655855f, - 160853.9017173841f, - 160880.60444636765f, - 160907.30828341722f, - 160934.0132284409f, - 160960.71928134665f, - 160987.4264420427f, - 161014.13471043704f, - 161040.84408643784f, - 161067.55456995327f, - 161094.26616089148f, - 161120.97885916062f, - 161147.69266466892f, - 161174.40757732463f, - 161201.12359703594f, - 161227.84072371112f, - 161254.55895725847f, - 161281.27829758628f, - 161307.99874460287f, - 161334.72029821656f, - 161361.4429583357f, - 161388.1667248687f, - 161414.8915977239f, - 161441.61757680977f, - 161468.34466203468f, - 161495.07285330712f, - 161521.80215053557f, - 161548.53255362847f, - 161575.26406249436f, - 161601.99667704175f, - 161628.7303971792f, - 161655.46522281526f, - 161682.2011538585f, - 161708.93819021754f, - 161735.676331801f, - 161762.4155785175f, - 161789.1559302757f, - 161815.89738698432f, - 161842.639948552f, - 161869.38361488748f, - 161896.1283858995f, - 161922.87426149676f, - 161949.62124158812f, - 161976.3693260823f, - 162003.1185148881f, - 162029.8688079144f, - 162056.62020507f, - 162083.37270626382f, - 162110.1263114047f, - 162136.88102040152f, - 162163.63683316324f, - 162190.3937495988f, - 162217.1517696171f, - 162243.91089312723f, - 162270.67112003808f, - 162297.43245025873f, - 162324.1948836982f, - 162350.9584202655f, - 162377.72305986975f, - 162404.48880242003f, - 162431.25564782543f, - 162458.0235959951f, - 162484.79264683815f, - 162511.56280026378f, - 162538.33405618116f, - 162565.1064144995f, - 162591.879875128f, - 162618.65443797593f, - 162645.43010295252f, - 162672.20686996708f, - 162698.98473892888f, - 162725.76370974723f, - 162752.54378233146f, - 162779.32495659095f, - 162806.10723243505f, - 162832.89060977317f, - 162859.67508851466f, - 162886.46066856902f, - 162913.24734984562f, - 162940.035132254f, - 162966.82401570358f, - 162993.6140001039f, - 163020.40508536444f, - 163047.19727139478f, - 163073.99055810447f, - 163100.78494540305f, - 163127.58043320014f, - 163154.37702140535f, - 163181.1747099283f, - 163207.97349867865f, - 163234.77338756606f, - 163261.57437650024f, - 163288.37646539084f, - 163315.17965414765f, - 163341.98394268038f, - 163368.78933089875f, - 163395.5958187126f, - 163422.40340603172f, - 163449.2120927659f, - 163476.02187882498f, - 163502.83276411882f, - 163529.6447485573f, - 163556.45783205028f, - 163583.2720145077f, - 163610.08729583945f, - 163636.90367595552f, - 163663.72115476584f, - 163690.53973218042f, - 163717.35940810922f, - 163744.18018246227f, - 163771.00205514964f, - 163797.82502608138f, - 163824.64909516752f, - 163851.4742623182f, - 163878.3005274435f, - 163905.12789045356f, - 163931.95635125853f, - 163958.78590976857f, - 163985.61656589387f, - 164012.44831954464f, - 164039.2811706311f, - 164066.11511906344f, - 164092.950164752f, - 164119.786307607f, - 164146.62354753874f, - 164173.46188445756f, - 164200.30131827376f, - 164227.1418488977f, - 164253.98347623978f, - 164280.82620021031f, - 164307.6700207198f, - 164334.51493767856f, - 164361.3609509971f, - 164388.20806058586f, - 164415.05626635533f, - 164441.905568216f, - 164468.75596607837f, - 164495.607459853f, - 164522.4600494504f, - 164549.31373478117f, - 164576.1685157559f, - 164603.02439228518f, - 164629.88136427966f, - 164656.7394316499f, - 164683.59859430668f, - 164710.4588521606f, - 164737.32020512238f, - 164764.18265310273f, - 164791.04619601235f, - 164817.91083376206f, - 164844.77656626256f, - 164871.6433934247f, - 164898.51131515924f, - 164925.38033137703f, - 164952.25044198887f, - 164979.1216469057f, - 165005.9939460383f, - 165032.86733929766f, - 165059.7418265946f, - 165086.61740784015f - }; + float[] IQ_TABLE = { + 0.0f, + 1.0f, + 2.519842099789746f, + 4.3267487109222245f, + 6.3496042078727974f, + 8.549879733383484f, + 10.902723556992836f, + 13.390518279406722f, + 15.999999999999998f, + 18.720754407467133f, + 21.544346900318835f, + 24.463780996262464f, + 27.47314182127996f, + 30.567350940369842f, + 33.74199169845321f, + 36.993181114957046f, + 40.317473596635935f, + 43.71178704118999f, + 47.173345095760126f, + 50.69963132571694f, + 54.28835233189812f, + 57.93740770400352f, + 61.6448652744185f, + 65.40894053658599f, + 69.22797937475559f, + 73.10044345532164f, + 77.02489777859162f, + 80.99999999999997f, + 85.02449121251853f, + 89.09718794488955f, + 93.21697517861574f, + 97.38280022413316f, + 101.59366732596474f, + 105.84863288986224f, + 110.14680124343441f, + 114.4873208566006f, + 118.86938096020653f, + 123.29220851090024f, + 127.75506545836058f, + 132.25724627755247f, + 136.79807573413572f, + 141.3769068556919f, + 145.99311908523086f, + 150.6461165966291f, + 155.33532675434674f, + 160.0601987020528f, + 164.8202020667335f, + 169.6148257665186f, + 174.44357691188537f, + 179.30597979112554f, + 184.20157493201927f, + 189.12991823257562f, + 194.09058015449685f, + 199.08314497371674f, + 204.1072100829694f, + 209.16238534187647f, + 214.24829247050752f, + 219.36456448277784f, + 224.51084515641213f, + 229.6867885365223f, + 234.89205847013176f, + 240.1263281692325f, + 245.38927980018508f, + 250.6806040974726f, + 255.99999999999991f, + 261.3471743082887f, + 266.7218413610645f, + 272.12372272986045f, + 277.5525469303796f, + 283.0080491494619f, + 288.4899709865989f, + 293.99806020902247f, + 299.5320705194741f, + 305.0917613358298f, + 310.67689758182206f, + 316.28724948815585f, + 321.92259240337177f, + 327.58270661385535f, + 333.2673771724374f, + 338.97639373507025f, + 344.70955040510125f, + 350.46664558470013f, + 356.2474818330261f, + 362.0518657307514f, + 367.8796077505826f, + 373.7305221334451f, + 379.60442677002084f, + 385.501143087346f, + 391.42049594019943f, + 397.3623135070237f, + 403.32642719014467f, + 409.3126715200626f, + 415.320884063608f, + 421.35090533576465f, + 427.4025787149762f, + 433.4757503617617f, + 439.5702691404793f, + 445.6859865440827f, + 451.8227566217276f, + 457.9804359090913f, + 464.15888336127773f, + 470.35796028818726f, + 476.5775302922363f, + 482.81745920832043f, + 489.0776150459174f, + 495.3578679332358f, + 501.6580900633169f, + 507.9781556420037f, + 514.3179408376965f, + 520.6773237328167f, + 527.056184276906f, + 533.4544042412917f, + 539.8718671752513f, + 546.308458363615f, + 552.7640647857461f, + 559.2385750758419f, + 565.7318794845041f, + 572.2438698415234f, + 578.7744395198338f, + 585.3234834005884f, + 591.8908978393126f, + 598.4765806330926f, + 605.0804309887604f, + 611.7023494920364f, + 618.3422380775919f, + 624.9999999999998f, + 631.6755398055375f, + 638.3687633048116f, + 645.0795775461748f, + 651.8078907899041f, + 658.553612483115f, + 665.3166532353836f, + 672.0969247950522f, + 678.8943400261944f, + 685.7088128862142f, + 692.540258404062f, + 699.3885926590398f, + 706.2537327601806f, + 713.1355968261797f, + 720.0341039658604f, + 726.9491742591542f, + 733.8807287385821f, + 740.8286893712154f, + 747.7929790411054f, + 754.7735215321619f, + 761.7702415114704f, + 768.7830645130296f, + 775.811916921899f, + 782.8567259587425f, + 789.9174196647544f, + 796.993926886958f, + 804.0861772638627f, + 811.194101211471f, + 818.3176299096223f, + 825.4566952886656f, + 832.6112300164486f, + 839.781167485616f, + 846.9664418012055f, + 854.1669877685351f, + 861.3827408813713f, + 868.6136373103698f, + 875.859613891782f, + 883.1206081164196f, + 890.3965581188676f, + 897.6874026669418f, + 904.9930811513817f, + 912.3135335757719f, + 919.6487005466876f, + 926.9985232640562f, + 934.3629435117291f, + 941.7419036482586f, + 949.1353465978742f, + 956.5432158416521f, + 963.9654554088735f, + 971.4020098685654f, + 978.8528243212218f, + 986.3178443906959f, + 993.7970162162635f, + 1001.29028644485f, + 1008.797602223418f, + 1016.3189111915103f, + 1023.8541614739464f, + 1031.4033016736653f, + 1038.9662808647138f, + 1046.5430485853758f, + 1054.1335548314366f, + 1061.7377500495838f, + 1069.3555851309357f, + 1076.9870114046978f, + 1084.6319806319443f, + 1092.2904449995174f, + 1099.9623571140482f, + 1107.6476699960892f, + 1115.3463370743607f, + 1123.058312180106f, + 1130.783549541554f, + 1138.5220037784857f, + 1146.273629896901f, + 1154.0383832837879f, + 1161.816219701986f, + 1169.607095285146f, + 1177.4109665327805f, + 1185.2277903054078f, + 1193.0575238197798f, + 1200.9001246442f, + 1208.7555506939248f, + 1216.6237602266442f, + 1224.5047118380478f, + 1232.3983644574657f, + 1240.3046773435874f, + 1248.2236100802568f, + 1256.1551225723395f, + 1264.099175041662f, + 1272.0557280230228f, + 1280.024742360269f, + 1288.0061792024444f, + 1295.9999999999995f, + 1304.006166501068f, + 1312.0246407478062f, + 1320.055385072793f, + 1328.0983620954903f, + 1336.153534718765f, + 1344.2208661254647f, + 1352.3003197750522f, + 1360.3918594002962f, + 1368.4954490040145f, + 1376.6110528558709f, + 1384.7386354892244f, + 1392.8781616980295f, + 1401.0295965337855f, + 1409.1929053025353f, + 1417.368053561912f, + 1425.5550071182324f, + 1433.7537320236374f, + 1441.9641945732744f, + 1450.186361302528f, + 1458.4201989842913f, + 1466.6656746262797f, + 1474.9227554683875f, + 1483.1914089800841f, + 1491.4716028578516f, + 1499.7633050226596f, + 1508.0664836174794f, + 1516.3811070048375f, + 1524.7071437644029f, + 1533.044562690613f, + 1541.3933327903342f, + 1549.753423280558f, + 1558.1248035861304f, + 1566.507443337515f, + 1574.9013123685909f, + 1583.3063807144795f, + 1591.722618609407f, + 1600.149996484594f, + 1608.58848496618f, + 1617.0380548731737f, + 1625.4986772154357f, + 1633.9703231916887f, + 1642.4529641875577f, + 1650.9465717736346f, + 1659.4511177035752f, + 1667.9665739122186f, + 1676.4929125137353f, + 1685.0301057998013f, + 1693.5781262377957f, + 1702.136946469027f, + 1710.7065393069795f, + 1719.286877735588f, + 1727.8779349075323f, + 1736.4796841425596f, + 1745.0920989258252f, + 1753.7151529062583f, + 1762.3488198949503f, + 1770.993073863563f, + 1779.6478889427597f, + 1788.3132394206564f, + 1796.9890997412947f, + 1805.6754445031333f, + 1814.3722484575621f, + 1823.0794865074322f, + 1831.7971337056094f, + 1840.5251652535437f, + 1849.263556499858f, + 1858.0122829389563f, + 1866.7713202096493f, + 1875.5406440937966f, + 1884.3202305149687f, + 1893.110055537124f, + 1901.9100953633042f, + 1910.7203263343454f, + 1919.5407249276057f, + 1928.3712677557098f, + 1937.2119315653083f, + 1946.0626932358525f, + 1954.923529778386f, + 1963.79441833435f, + 1972.6753361744036f, + 1981.5662606972594f, + 1990.467169428533f, + 1999.378040019607f, + 2008.2988502465078f, + 2017.2295780087982f, + 2026.1702013284819f, + 2035.1206983489212f, + 2044.0810473337688f, + 2053.0512266659125f, + 2062.031214846431f, + 2071.0209904935646f, + 2080.020532341696f, + 2089.0298192403443f, + 2098.0488301531714f, + 2107.0775441569995f, + 2116.115940440839f, + 2125.1639983049317f, + 2134.2216971597995f, + 2143.2890165253098f, + 2152.3659360297484f, + 2161.452435408903f, + 2170.5484945051617f, + 2179.6540932666144f, + 2188.769211746171f, + 2197.893830100689f, + 2207.0279285901042f, + 2216.171487576584f, + 2225.324487523676f, + 2234.486908995478f, + 2243.65873265581f, + 2252.839939267398f, + 2262.03050969107f, + 2271.2304248849537f, + 2280.4396659036897f, + 2289.6582138976523f, + 2298.8860501121762f, + 2308.1231558867926f, + 2317.3695126544767f, + 2326.6251019409005f, + 2335.8899053636933f, + 2345.163904631713f, + 2354.4470815443233f, + 2363.739417990679f, + 2373.0408959490205f, + 2382.351497485973f, + 2391.671204755856f, + 2400.999999999999f, + 2410.337865546065f, + 2419.6847838073813f, + 2429.0407372822747f, + 2438.405708553419f, + 2447.779680287186f, + 2457.162635233001f, + 2466.554556222711f, + 2475.955426169957f, + 2485.3652280695474f, + 2494.7839449968487f, + 2504.2115601071737f, + 2513.648056635179f, + 2523.0934178942675f, + 2532.5476272760025f, + 2542.010668249519f, + 2551.482524360948f, + 2560.963179232844f, + 2570.4526165636184f, + 2579.950820126979f, + 2589.4577737713744f, + 2598.973461419446f, + 2608.4978670674823f, + 2618.0309747848837f, + 2627.572768713626f, + 2637.1232330677353f, + 2646.6823521327647f, + 2656.250110265277f, + 2665.826491892333f, + 2675.4114815109842f, + 2685.0050636877722f, + 2694.6072230582295f, + 2704.2179443263894f, + 2713.8372122642972f, + 2723.465011711528f, + 2733.1013275747096f, + 2742.7461448270483f, + 2752.39944850786f, + 2762.0612237221085f, + 2771.731455639942f, + 2781.4101294962406f, + 2791.097230590165f, + 2800.7927442847094f, + 2810.496656006259f, + 2820.208951244152f, + 2829.9296155502466f, + 2839.6586345384894f, + 2849.395993884492f, + 2859.1416793251065f, + 2868.8956766580086f, + 2878.6579717412847f, + 2888.4285504930212f, + 2898.2073988908974f, + 2907.9945029717837f, + 2917.789848831344f, + 2927.5934226236377f, + 2937.4052105607307f, + 2947.225198912308f, + 2957.053374005286f, + 2966.8897222234364f, + 2976.734230007005f, + 2986.5868838523397f, + 2996.4476703115197f, + 3006.316575991989f, + 3016.193587556191f, + 3026.078691721209f, + 3035.971875258411f, + 3045.8731249930906f, + 3055.7824278041207f, + 3065.699770623604f, + 3075.6251404365285f, + 3085.5585242804245f, + 3095.49990924503f, + 3105.449282471949f, + 3115.4066311543256f, + 3125.371942536509f, + 3135.3452039137287f, + 3145.3264026317715f, + 3155.3155260866592f, + 3165.3125617243295f, + 3175.3174970403234f, + 3185.330319579468f, + 3195.35101693557f, + 3205.379576751108f, + 3215.4159867169246f, + 3225.460234571929f, + 3235.5123081027928f, + 3245.572195143656f, + 3255.63988357583f, + 3265.7153613275095f, + 3275.7986163734795f, + 3285.889636734829f, + 3295.9884104786665f, + 3306.0949257178395f, + 3316.2091706106517f, + 3326.331133360588f, + 3336.4608022160382f, + 3346.598165470023f, + 3356.7432114599264f, + 3366.8959285672245f, + 3377.056305217221f, + 3387.2243298787826f, + 3397.3999910640764f, + 3407.5832773283128f, + 3417.7741772694862f, + 3427.9726795281194f, + 3438.1787727870123f, + 3448.3924457709873f, + 3458.6136872466445f, + 3468.842486022111f, + 3479.0788309467976f, + 3489.3227109111554f, + 3499.5741148464344f, + 3509.8330317244445f, + 3520.0994505573185f, + 3530.373360397275f, + 3540.6547503363886f, + 3550.9436095063534f, + 3561.239927078258f, + 3571.543692262354f, + 3581.854894307831f, + 3592.1735225025936f, + 3602.4995661730372f, + 3612.8330146838275f, + 3623.1738574376814f, + 3633.52208387515f, + 3643.877683474403f, + 3654.240645751014f, + 3664.6109602577494f, + 3674.9886165843564f, + 3685.3736043573545f, + 3695.7659132398294f, + 3706.165532931225f, + 3716.57245316714f, + 3726.986663719126f, + 3737.4081543944876f, + 3747.836915036078f, + 3758.272935522107f, + 3768.716205765941f, + 3779.1667157159077f, + 3789.6244553551055f, + 3800.089414701208f, + 3810.5615838062768f, + 3821.0409527565694f, + 3831.5275116723533f, + 3842.0212507077194f, + 3852.522160050396f, + 3863.0302299215673f, + 3873.5454505756893f, + 3884.067812300311f, + 3894.597305415892f, + 3905.1339202756285f, + 3915.677647265273f, + 3926.2284768029604f, + 3936.786399339034f, + 3947.3514053558706f, + 3957.9234853677135f, + 3968.502629920497f, + 3979.0888295916798f, + 3989.6820749900776f, + 4000.2823567556948f, + 4010.8896655595613f, + 4021.5039921035655f, + 4032.1253271202945f, + 4042.7536613728694f, + 4053.3889856547858f, + 4064.031290789755f, + 4074.680567631545f, + 4085.336807063822f, + 4095.999999999998f, + 4106.670137383071f, + 4117.347210185475f, + 4128.031209408926f, + 4138.722126084268f, + 4149.419951271327f, + 4160.124676058758f, + 4170.836291563898f, + 4181.554788932618f, + 4192.280159339177f, + 4203.012393986074f, + 4213.75148410391f, + 4224.497420951238f, + 4235.250195814426f, + 4246.0098000075095f, + 4256.776224872057f, + 4267.549461777031f, + 4278.329502118642f, + 4289.11633732022f, + 4299.909958832071f, + 4310.7103581313495f, + 4321.517526721914f, + 4332.3314561342f, + 4343.152137925088f, + 4353.979563677767f, + 4364.813725001605f, + 4375.654613532022f, + 4386.502220930359f, + 4397.356538883747f, + 4408.217559104982f, + 4419.085273332402f, + 4429.959673329753f, + 4440.840750886073f, + 4451.72849781556f, + 4462.622905957458f, + 4473.523967175923f, + 4484.431673359913f, + 4495.346016423058f, + 4506.26698830355f, + 4517.194580964012f, + 4528.128786391389f, + 4539.069596596828f, + 4550.017003615559f, + 4560.970999506781f, + 4571.931576353546f, + 4582.898726262647f, + 4593.8724413645f, + 4604.852713813035f, + 4615.839535785582f, + 4626.832899482757f, + 4637.832797128359f, + 4648.839220969251f, + 4659.852163275256f, + 4670.871616339047f, + 4681.897572476039f, + 4692.930024024284f, + 4703.9689633443595f, + 4715.014382819267f, + 4726.0662748543255f, + 4737.124631877068f, + 4748.189446337137f, + 4759.26071070618f, + 4770.338417477749f, + 4781.422559167199f, + 4792.513128311585f, + 4803.610117469561f, + 4814.713519221285f, + 4825.823326168315f, + 4836.93953093351f, + 4848.062126160935f, + 4859.191104515763f, + 4870.326458684178f, + 4881.468181373277f, + 4892.616265310977f, + 4903.770703245919f, + 4914.931487947375f, + 4926.098612205151f, + 4937.272068829496f, + 4948.451850651012f, + 4959.637950520555f, + 4970.830361309152f, + 4982.029075907904f, + 4993.234087227897f, + 5004.445388200115f, + 5015.662971775347f, + 5026.886830924101f, + 5038.116958636513f, + 5049.353347922266f, + 5060.595991810493f, + 5071.8448833497005f, + 5083.100015607673f, + 5094.3613816714f, + 5105.628974646975f, + 5116.902787659525f, + 5128.18281385312f, + 5139.469046390692f, + 5150.761478453947f, + 5162.060103243293f, + 5173.364913977747f, + 5184.675903894859f, + 5195.993066250632f, + 5207.316394319439f, + 5218.645881393944f, + 5229.981520785022f, + 5241.323305821685f, + 5252.671229850992f, + 5264.025286237983f, + 5275.385468365595f, + 5286.751769634588f, + 5298.124183463464f, + 5309.502703288395f, + 5320.887322563145f, + 5332.278034758998f, + 5343.674833364676f, + 5355.077711886272f, + 5366.486663847172f, + 5377.901682787985f, + 5389.3227622664635f, + 5400.749895857437f, + 5412.183077152737f, + 5423.622299761123f, + 5435.067557308219f, + 5446.518843436432f, + 5457.976151804887f, + 5469.439476089359f, + 5480.908809982197f, + 5492.384147192261f, + 5503.8654814448455f, + 5515.35280648162f, + 5526.846116060552f, + 5538.345403955847f, + 5549.850663957874f, + 5561.361889873103f, + 5572.879075524037f, + 5584.402214749145f, + 5595.9313014027975f, + 5607.466329355201f, + 5619.00729249233f, + 5630.554184715866f, + 5642.106999943128f, + 5653.665732107017f, + 5665.230375155943f, + 5676.8009230537655f, + 5688.377369779733f, + 5699.959709328416f, + 5711.547935709647f, + 5723.142042948459f, + 5734.742025085021f, + 5746.347876174581f, + 5757.959590287402f, + 5769.577161508701f, + 5781.200583938591f, + 5792.829851692021f, + 5804.464958898715f, + 5816.1058997031105f, + 5827.7526682643065f, + 5839.405258755998f, + 5851.06366536642f, + 5862.727882298291f, + 5874.397903768755f, + 5886.07372400932f, + 5897.755337265809f, + 5909.442737798296f, + 5921.135919881051f, + 5932.834877802487f, + 5944.539605865103f, + 5956.250098385426f, + 5967.966349693957f, + 5979.688354135121f, + 5991.416106067203f, + 6003.1495998623f, + 6014.888829906269f, + 6026.6337905986675f, + 6038.384476352703f, + 6050.140881595178f, + 6061.903000766441f, + 6073.670828320332f, + 6085.444358724127f, + 6097.223586458489f, + 6109.00850601742f, + 6120.7991119082f, + 6132.595398651345f, + 6144.397360780552f, + 6156.204992842646f, + 6168.018289397536f, + 6179.837245018158f, + 6191.661854290431f, + 6203.492111813202f, + 6215.3280121982025f, + 6227.1695500699925f, + 6239.01672006592f, + 6250.869516836063f, + 6262.727935043189f, + 6274.591969362706f, + 6286.461614482607f, + 6298.3368651034325f, + 6310.217715938217f, + 6322.104161712446f, + 6333.996197164003f, + 6345.893817043131f, + 6357.7970161123785f, + 6369.705789146558f, + 6381.620130932701f, + 6393.5400362700075f, + 6405.465499969803f, + 6417.396516855498f, + 6429.333081762534f, + 6441.275189538345f, + 6453.222835042314f, + 6465.176013145724f, + 6477.134718731716f, + 6489.098946695247f, + 6501.0686919430445f, + 6513.043949393563f, + 6525.024713976942f, + 6537.010980634961f, + 6549.002744321001f, + 6560.999999999996f, + 6573.002742648398f, + 6585.010967254128f, + 6597.024668816537f, + 6609.043842346366f, + 6621.0684828657f, + 6633.098585407935f, + 6645.134145017727f, + 6657.175156750956f, + 6669.221615674691f, + 6681.273516867135f, + 6693.3308554176f, + 6705.393626426459f, + 6717.461825005108f, + 6729.535446275926f, + 6741.614485372234f, + 6753.69893743826f, + 6765.788797629097f, + 6777.884061110663f, + 6789.984723059666f, + 6802.090778663563f, + 6814.20222312052f, + 6826.31905163938f, + 6838.441259439618f, + 6850.568841751307f, + 6862.701793815083f, + 6874.8401108821f, + 6886.983788213999f, + 6899.132821082872f, + 6911.287204771221f, + 6923.44693457192f, + 6935.612005788186f, + 6947.7824137335365f, + 6959.958153731754f, + 6972.139221116853f, + 6984.325611233041f, + 6996.517319434686f, + 7008.714341086277f, + 7020.916671562394f, + 7033.124306247668f, + 7045.337240536748f, + 7057.555469834268f, + 7069.77898955481f, + 7082.007795122871f, + 7094.241881972827f, + 7106.481245548902f, + 7118.7258813051285f, + 7130.975784705322f, + 7143.23095122304f, + 7155.491376341552f, + 7167.757055553804f, + 7180.027984362389f, + 7192.304158279513f, + 7204.585572826957f, + 7216.872223536052f, + 7229.164105947641f, + 7241.461215612049f, + 7253.76354808905f, + 7266.0710989478375f, + 7278.383863766987f, + 7290.70183813443f, + 7303.025017647417f, + 7315.353397912493f, + 7327.68697454546f, + 7340.025743171346f, + 7352.36969942438f, + 7364.718838947954f, + 7377.073157394597f, + 7389.432650425941f, + 7401.797313712694f, + 7414.167142934606f, + 7426.542133780443f, + 7438.922281947951f, + 7451.307583143835f, + 7463.698033083718f, + 7476.093627492121f, + 7488.49436210243f, + 7500.900232656865f, + 7513.311234906452f, + 7525.727364610994f, + 7538.148617539045f, + 7550.574989467873f, + 7563.006476183442f, + 7575.443073480374f, + 7587.884777161926f, + 7600.33158303996f, + 7612.783486934915f, + 7625.24048467578f, + 7637.702572100064f, + 7650.169745053768f, + 7662.64199939136f, + 7675.119330975745f, + 7687.60173567824f, + 7700.089209378544f, + 7712.581747964711f, + 7725.079347333125f, + 7737.582003388473f, + 7750.089712043714f, + 7762.602469220058f, + 7775.1202708469355f, + 7787.643112861973f, + 7800.1709912109645f, + 7812.703901847848f, + 7825.241840734677f, + 7837.784803841597f, + 7850.3327871468155f, + 7862.885786636581f, + 7875.443798305154f, + 7888.006818154784f, + 7900.57484219568f, + 7913.14786644599f, + 7925.725886931772f, + 7938.308899686972f, + 7950.896900753395f, + 7963.489886180685f, + 7976.087852026296f, + 7988.690794355469f, + 8001.298709241209f, + 8013.911592764257f, + 8026.529441013069f, + 8039.152250083789f, + 8051.780016080227f, + 8064.412735113835f, + 8077.05040330368f, + 8089.693016776422f, + 8102.340571666295f, + 8114.993064115073f, + 8127.650490272057f, + 8140.312846294045f, + 8152.98012834531f, + 8165.652332597579f, + 8178.329455230005f, + 8191.011492429153f, + 8203.698440388966f, + 8216.390295310746f, + 8229.087053403142f, + 8241.788710882107f, + 8254.495263970894f, + 8267.206708900021f, + 8279.923041907257f, + 8292.644259237595f, + 8305.37035714323f, + 8318.101331883543f, + 8330.837179725066f, + 8343.577896941475f, + 8356.323479813558f, + 8369.073924629198f, + 8381.82922768335f, + 8394.589385278021f, + 8407.354393722242f, + 8420.124249332057f, + 8432.898948430495f, + 8445.67848734755f, + 8458.462862420158f, + 8471.25206999218f, + 8484.046106414384f, + 8496.844968044408f, + 8509.648651246764f, + 8522.457152392795f, + 8535.270467860666f, + 8548.088594035344f, + 8560.911527308566f, + 8573.73926407884f, + 8586.5718007514f, + 8599.409133738207f, + 8612.251259457915f, + 8625.098174335855f, + 8637.94987480402f, + 8650.806357301039f, + 8663.667618272157f, + 8676.533654169225f, + 8689.404461450664f, + 8702.28003658146f, + 8715.160376033142f, + 8728.04547628375f, + 8740.935333817839f, + 8753.829945126436f, + 8766.729306707033f, + 8779.633415063572f, + 8792.542266706416f, + 8805.455858152332f, + 8818.374185924482f, + 8831.29724655239f, + 8844.225036571936f, + 8857.157552525327f, + 8870.094790961084f, + 8883.03674843403f, + 8895.983421505252f, + 8908.934806742107f, + 8921.890900718185f, + 8934.8517000133f, + 8947.817201213471f, + 8960.7874009109f, + 8973.76229570396f, + 8986.741882197173f, + 8999.726157001192f, + 9012.715116732788f, + 9025.708758014824f, + 9038.707077476247f, + 9051.710071752064f, + 9064.717737483328f, + 9077.730071317117f, + 9090.747069906518f, + 9103.768729910615f, + 9116.795047994465f, + 9129.826020829081f, + 9142.861645091423f, + 9155.901917464373f, + 9168.946834636716f, + 9181.996393303136f, + 9195.050590164185f, + 9208.109421926274f, + 9221.172885301656f, + 9234.240977008405f, + 9247.313693770408f, + 9260.391032317339f, + 9273.472989384647f, + 9286.559561713542f, + 9299.650746050975f, + 9312.74653914962f, + 9325.84693776787f, + 9338.951938669801f, + 9352.061538625176f, + 9365.175734409413f, + 9378.294522803584f, + 9391.417900594384f, + 9404.545864574127f, + 9417.678411540726f, + 9430.815538297675f, + 9443.957241654036f, + 9457.103518424428f, + 9470.254365429f, + 9483.40977949343f, + 9496.569757448893f, + 9509.734296132066f, + 9522.903392385091f, + 9536.07704305558f, + 9549.255244996582f, + 9562.437995066583f, + 9575.62529012948f, + 9588.817127054574f, + 9602.013502716549f, + 9615.214413995463f, + 9628.419857776727f, + 9641.629830951093f, + 9654.844330414644f, + 9668.063353068772f, + 9681.286895820167f, + 9694.514955580802f, + 9707.74752926792f, + 9720.984613804016f, + 9734.226206116828f, + 9747.472303139319f, + 9760.722901809664f, + 9773.977999071232f, + 9787.237591872581f, + 9800.501677167433f, + 9813.77025191467f, + 9827.04331307831f, + 9840.320857627503f, + 9853.602882536512f, + 9866.8893847847f, + 9880.18036135651f, + 9893.475809241469f, + 9906.775725434152f, + 9920.080106934185f, + 9933.388950746223f, + 9946.702253879943f, + 9960.020013350022f, + 9973.34222617613f, + 9986.668889382916f, + 9999.999999999995f, + 10013.335555061929f, + 10026.675551608221f, + 10040.0199866833f, + 10053.368857336509f, + 10066.722160622081f, + 10080.079893599144f, + 10093.442053331697f, + 10106.808636888598f, + 10120.17964134355f, + 10133.555063775097f, + 10146.934901266595f, + 10160.31915090622f, + 10173.707809786936f, + 10187.100875006496f, + 10200.498343667417f, + 10213.900212876984f, + 10227.306479747222f, + 10240.717141394889f, + 10254.132194941467f, + 10267.551637513146f, + 10280.975466240814f, + 10294.40367826004f, + 10307.836270711065f, + 10321.273240738796f, + 10334.71458549278f, + 10348.160302127204f, + 10361.610387800878f, + 10375.064839677221f, + 10388.523654924258f, + 10401.986830714592f, + 10415.454364225412f, + 10428.926252638465f, + 10442.402493140049f, + 10455.883082921007f, + 10469.368019176709f, + 10482.85729910704f, + 10496.350919916393f, + 10509.848878813653f, + 10523.351173012188f, + 10536.857799729838f, + 10550.368756188902f, + 10563.884039616121f, + 10577.403647242685f, + 10590.927576304197f, + 10604.455824040679f, + 10617.988387696556f, + 10631.525264520642f, + 10645.066451766135f, + 10658.611946690598f, + 10672.161746555956f, + 10685.715848628475f, + 10699.274250178762f, + 10712.836948481747f, + 10726.403940816675f, + 10739.97522446709f, + 10753.550796720836f, + 10767.130654870027f, + 10780.714796211058f, + 10794.303218044579f, + 10807.895917675487f, + 10821.492892412922f, + 10835.094139570248f, + 10848.699656465047f, + 10862.309440419107f, + 10875.923488758415f, + 10889.541798813138f, + 10903.16436791762f, + 10916.791193410372f, + 10930.422272634056f, + 10944.05760293548f, + 10957.697181665582f, + 10971.341006179427f, + 10984.98907383619f, + 10998.641381999149f, + 11012.297928035676f, + 11025.958709317223f, + 11039.623723219316f, + 11053.292967121542f, + 11066.96643840754f, + 11080.64413446499f, + 11094.326052685608f, + 11108.012190465128f, + 11121.702545203298f, + 11135.397114303863f, + 11149.09589517457f, + 11162.798885227143f, + 11176.506081877276f, + 11190.217482544635f, + 11203.933084652828f, + 11217.652885629415f, + 11231.376882905886f, + 11245.105073917659f, + 11258.837456104062f, + 11272.574026908333f, + 11286.314783777601f, + 11300.059724162888f, + 11313.808845519083f, + 11327.56214530495f, + 11341.319620983111f, + 11355.081270020033f, + 11368.847089886023f, + 11382.617078055218f, + 11396.391232005579f, + 11410.169549218874f, + 11423.952027180676f, + 11437.738663380347f, + 11451.529455311042f, + 11465.324400469679f, + 11479.123496356951f, + 11492.926740477304f, + 11506.734130338931f, + 11520.545663453764f, + 11534.361337337468f, + 11548.181149509423f, + 11562.005097492724f, + 11575.83317881417f, + 11589.665391004253f, + 11603.501731597149f, + 11617.342198130715f, + 11631.186788146468f, + 11645.03549918959f, + 11658.888328808911f, + 11672.745274556906f, + 11686.606333989675f, + 11700.471504666955f, + 11714.340784152086f, + 11728.214170012021f, + 11742.091659817312f, + 11755.9732511421f, + 11769.85894156411f, + 11783.748728664636f, + 11797.642610028539f, + 11811.540583244237f, + 11825.442645903695f, + 11839.34879560242f, + 11853.259029939445f, + 11867.173346517331f, + 11881.091742942153f, + 11895.014216823492f, + 11908.940765774427f, + 11922.871387411526f, + 11936.80607935484f, + 11950.744839227897f, + 11964.687664657684f, + 11978.634553274653f, + 11992.5855027127f, + 12006.540510609168f, + 12020.499574604826f, + 12034.462692343877f, + 12048.429861473938f, + 12062.401079646032f, + 12076.376344514589f, + 12090.355653737432f, + 12104.339004975769f, + 12118.326395894186f, + 12132.317824160644f, + 12146.313287446457f, + 12160.312783426303f, + 12174.316309778205f, + 12188.323864183525f, + 12202.335444326955f, + 12216.35104789651f, + 12230.37067258353f, + 12244.394316082657f, + 12258.421976091831f, + 12272.453650312296f, + 12286.489336448576f, + 12300.529032208471f, + 12314.57273530306f, + 12328.620443446678f, + 12342.672154356922f, + 12356.727865754638f, + 12370.78757536391f, + 12384.851280912055f, + 12398.918980129623f, + 12412.990670750381f, + 12427.066350511306f, + 12441.146017152583f, + 12455.229668417589f, + 12469.317302052901f, + 12483.408915808272f, + 12497.50450743663f, + 12511.604074694078f, + 12525.707615339878f, + 12539.815127136444f, + 12553.926607849342f, + 12568.042055247275f, + 12582.161467102082f, + 12596.284841188726f, + 12610.41217528529f, + 12624.54346717297f, + 12638.67871463607f, + 12652.817915461985f, + 12666.961067441209f, + 12681.108168367316f, + 12695.259216036962f, + 12709.41420824987f, + 12723.573142808826f, + 12737.73601751968f, + 12751.902830191326f, + 12766.073578635704f, + 12780.248260667788f, + 12794.426874105588f, + 12808.609416770132f, + 12822.795886485468f, + 12836.986281078653f, + 12851.180598379744f, + 12865.378836221802f, + 12879.580992440871f, + 12893.787064875982f, + 12907.997051369144f, + 12922.210949765336f, + 12936.428757912496f, + 12950.650473661524f, + 12964.876094866271f, + 12979.105619383532f, + 12993.33904507304f, + 13007.576369797454f, + 13021.817591422368f, + 13036.062707816287f, + 13050.311716850629f, + 13064.564616399723f, + 13078.821404340792f, + 13093.082078553954f, + 13107.346636922217f, + 13121.615077331466f, + 13135.887397670458f, + 13150.163595830825f, + 13164.44366970706f, + 13178.727617196502f, + 13193.015436199352f, + 13207.307124618648f, + 13221.602680360265f, + 13235.902101332911f, + 13250.20538544812f, + 13264.512530620239f, + 13278.823534766434f, + 13293.138395806676f, + 13307.457111663734f, + 13321.779680263176f, + 13336.106099533357f, + 13350.43636740541f, + 13364.770481813252f, + 13379.108440693562f, + 13393.450241985796f, + 13407.795883632158f, + 13422.145363577607f, + 13436.498679769855f, + 13450.855830159346f, + 13465.216812699266f, + 13479.58162534553f, + 13493.950266056772f, + 13508.32273279435f, + 13522.69902352233f, + 13537.079136207483f, + 13551.463068819285f, + 13565.850819329906f, + 13580.2423857142f, + 13594.637765949712f, + 13609.036958016655f, + 13623.439959897927f, + 13637.84676957908f, + 13652.257385048335f, + 13666.67180429656f, + 13681.090025317284f, + 13695.512046106669f, + 13709.93786466352f, + 13724.367478989278f, + 13738.800887088004f, + 13753.238086966387f, + 13767.679076633725f, + 13782.12385410194f, + 13796.572417385545f, + 13811.024764501659f, + 13825.480893469998f, + 13839.94080231286f, + 13854.404489055134f, + 13868.871951724283f, + 13883.34318835034f, + 13897.818196965914f, + 13912.296975606168f, + 13926.779522308825f, + 13941.26583511416f, + 13955.755912064991f, + 13970.24975120668f, + 13984.747350587126f, + 13999.248708256751f, + 14013.75382226851f, + 14028.262690677873f, + 14042.775311542828f, + 14057.291682923867f, + 14071.811802883994f, + 14086.335669488704f, + 14100.863280805994f, + 14115.39463490634f, + 14129.92972986271f, + 14144.468563750548f, + 14159.01113464777f, + 14173.55744063476f, + 14188.10747979437f, + 14202.6612502119f, + 14217.218749975118f, + 14231.779977174227f, + 14246.34492990188f, + 14260.913606253163f, + 14275.486004325601f, + 14290.062122219148f, + 14304.64195803617f, + 14319.225509881464f, + 14333.812775862236f, + 14348.403754088098f, + 14362.998442671067f, + 14377.59683972556f, + 14392.198943368388f, + 14406.804751718748f, + 14421.414262898223f, + 14436.027475030774f, + 14450.64438624274f, + 14465.264994662828f, + 14479.889298422106f, + 14494.517295654005f, + 14509.148984494313f, + 14523.784363081166f, + 14538.423429555049f, + 14553.066182058781f, + 14567.712618737527f, + 14582.362737738777f, + 14597.016537212348f, + 14611.674015310382f, + 14626.33517018734f, + 14640.999999999993f, + 14655.668502907418f, + 14670.340677071003f, + 14685.016520654426f, + 14699.69603182367f, + 14714.379208747f, + 14729.066049594967f, + 14743.756552540408f, + 14758.45071575843f, + 14773.148537426418f, + 14787.850015724018f, + 14802.555148833142f, + 14817.26393493796f, + 14831.976372224897f, + 14846.692458882624f, + 14861.41219310206f, + 14876.135573076363f, + 14890.862597000923f, + 14905.593263073371f, + 14920.327569493558f, + 14935.065514463557f, + 14949.807096187662f, + 14964.552312872382f, + 14979.301162726431f, + 14994.053643960735f, + 15008.809754788414f, + 15023.569493424788f, + 15038.33285808737f, + 15053.099846995858f, + 15067.870458372134f, + 15082.644690440264f, + 15097.422541426484f, + 15112.204009559202f, + 15126.989093068994f, + 15141.777790188597f, + 15156.570099152905f, + 15171.366018198967f, + 15186.165545565986f, + 15200.968679495301f, + 15215.775418230402f, + 15230.58576001691f, + 15245.39970310258f, + 15260.217245737298f, + 15275.038386173073f, + 15289.863122664035f, + 15304.691453466432f, + 15319.52337683862f, + 15334.358891041069f, + 15349.197994336348f, + 15364.040684989128f, + 15378.886961266177f, + 15393.736821436356f, + 15408.59026377061f, + 15423.447286541972f, + 15438.307888025554f, + 15453.172066498542f, + 15468.039820240196f, + 15482.91114753184f, + 15497.786046656869f, + 15512.664515900733f, + 15527.54655355094f, + 15542.432157897045f, + 15557.32132723066f, + 15572.214059845435f, + 15587.110354037064f, + 15602.010208103273f, + 15616.913620343823f, + 15631.820589060506f, + 15646.731112557136f, + 15661.645189139546f, + 15676.562817115593f, + 15691.483994795139f, + 15706.408720490062f, + 15721.336992514242f, + 15736.26880918356f, + 15751.2041688159f, + 15766.143069731135f, + 15781.085510251132f, + 15796.03148869974f, + 15810.981003402798f, + 15825.934052688119f, + 15840.890634885489f, + 15855.850748326673f, + 15870.8143913454f, + 15885.781562277361f, + 15900.752259460214f, + 15915.726481233565f, + 15930.704225938982f, + 15945.685491919978f, + 15960.67027752201f, + 15975.65858109248f, + 15990.65040098073f, + 16005.645735538035f, + 16020.644583117599f, + 16035.646942074556f, + 16050.652810765967f, + 16065.662187550806f, + 16080.675070789974f, + 16095.691458846273f, + 16110.711350084424f, + 16125.734742871053f, + 16140.761635574685f, + 16155.792026565747f, + 16170.82591421656f, + 16185.863296901338f, + 16200.904172996183f, + 16215.948540879079f, + 16230.9963989299f, + 16246.047745530386f, + 16261.102579064163f, + 16276.160897916721f, + 16291.22270047542f, + 16306.287985129484f, + 16321.356750269995f, + 16336.428994289896f, + 16351.504715583982f, + 16366.5839125489f, + 16381.66658358314f, + 16396.75272708704f, + 16411.842341462776f, + 16426.935425114363f, + 16442.031976447644f, + 16457.131993870298f, + 16472.23547579183f, + 16487.34242062356f, + 16502.45282677864f, + 16517.566692672033f, + 16532.684016720516f, + 16547.804797342676f, + 16562.929032958902f, + 16578.056721991394f, + 16593.18786286415f, + 16608.322454002962f, + 16623.460493835417f, + 16638.601980790896f, + 16653.746913300558f, + 16668.895289797354f, + 16684.047108716015f, + 16699.202368493046f, + 16714.361067566726f, + 16729.523204377107f, + 16744.68877736601f, + 16759.85778497701f, + 16775.030225655464f, + 16790.206097848466f, + 16805.385400004874f, + 16820.568130575302f, + 16835.754288012104f, + 16850.94387076938f, + 16866.136877302983f, + 16881.333306070494f, + 16896.53315553123f, + 16911.73642414625f, + 16926.94311037833f, + 16942.153212691992f, + 16957.366729553454f, + 16972.583659430682f, + 16987.804000793338f, + 17003.027752112816f, + 17018.254911862205f, + 17033.48547851631f, + 17048.719450551645f, + 17063.95682644642f, + 17079.197604680547f, + 17094.44178373563f, + 17109.689362094967f, + 17124.940338243552f, + 17140.19471066806f, + 17155.452477856852f, + 17170.713638299967f, + 17185.978190489128f, + 17201.246132917724f, + 17216.517464080825f, + 17231.792182475165f, + 17247.07028659914f, + 17262.351774952826f, + 17277.636646037936f, + 17292.924898357855f, + 17308.216530417623f, + 17323.51154072392f, + 17338.80992778509f, + 17354.111690111105f, + 17369.416826213594f, + 17384.72533460582f, + 17400.037213802683f, + 17415.352462320716f, + 17430.67107867809f, + 17445.993061394587f, + 17461.318408991636f, + 17476.647119992274f, + 17491.979192921164f, + 17507.314626304586f, + 17522.653418670423f, + 17537.995568548187f, + 17553.341074468986f, + 17568.689934965536f, + 17584.042148572156f, + 17599.39771382477f, + 17614.75662926089f, + 17630.118893419625f, + 17645.484504841683f, + 17660.853462069354f, + 17676.22576364651f, + 17691.60140811862f, + 17706.98039403272f, + 17722.362719937424f, + 17737.748384382936f, + 17753.137385921014f, + 17768.529723105f, + 17783.92539448979f, + 17799.324398631856f, + 17814.726734089225f, + 17830.13239942148f, + 17845.541393189767f, + 17860.95371395678f, + 17876.36936028677f, + 17891.788330745527f, + 17907.210623900395f, + 17922.636238320254f, + 17938.065172575527f, + 17953.497425238176f, + 17968.932994881692f, + 17984.371880081104f, + 17999.814079412972f, + 18015.25959145537f, + 18030.708414787914f, + 18046.16054799173f, + 18061.615989649465f, + 18077.074738345284f, + 18092.53679266486f, + 18108.002151195393f, + 18123.47081252557f, + 18138.9427752456f, + 18154.41803794719f, + 18169.896599223546f, + 18185.37845766938f, + 18200.863611880886f, + 18216.352060455767f, + 18231.843801993204f, + 18247.338835093873f, + 18262.837158359936f, + 18278.338770395032f, + 18293.84366980429f, + 18309.35185519431f, + 18324.863325173166f, + 18340.37807835041f, + 18355.89611333707f, + 18371.417428745623f, + 18386.942023190033f, + 18402.469895285714f, + 18418.00104364955f, + 18433.53546689987f, + 18449.073163656474f, + 18464.614132540602f, + 18480.158372174956f, + 18495.705881183676f, + 18511.25665819236f, + 18526.810701828035f, + 18542.368010719183f, + 18557.928583495715f, + 18573.492418788985f, + 18589.059515231773f, + 18604.629871458303f, + 18620.203486104212f, + 18635.78035780658f, + 18651.3604852039f, + 18666.943866936086f, + 18682.53050164448f, + 18698.12038797184f, + 18713.713524562332f, + 18729.30991006154f, + 18744.909543116457f, + 18760.51242237548f, + 18776.11854648842f, + 18791.72791410648f, + 18807.340523882274f, + 18822.95637446981f, + 18838.57546452449f, + 18854.19779270311f, + 18869.823357663863f, + 18885.452158066328f, + 18901.08419257147f, + 18916.71945984164f, + 18932.357958540564f, + 18947.999687333362f, + 18963.64464488652f, + 18979.292829867907f, + 18994.94424094676f, + 19010.598876793687f, + 19026.256736080668f, + 19041.917817481044f, + 19057.582119669532f, + 19073.2496413222f, + 19088.920381116473f, + 19104.594337731145f, + 19120.271509846356f, + 19135.951896143604f, + 19151.635495305738f, + 19167.322306016948f, + 19183.01232696278f, + 19198.705556830122f, + 19214.401994307198f, + 19230.10163808358f, + 19245.804486850167f, + 19261.510539299208f, + 19277.219794124274f, + 19292.932250020265f, + 19308.64790568342f, + 19324.366759811302f, + 19340.088811102793f, + 19355.8140582581f, + 19371.542499978754f, + 19387.2741349676f, + 19403.008961928797f, + 19418.746979567823f, + 19434.48818659147f, + 19450.232581707827f, + 19465.980163626304f, + 19481.730931057613f, + 19497.48488271376f, + 19513.242017308068f, + 19529.00233355514f, + 19544.765830170898f, + 19560.53250587254f, + 19576.302359378566f, + 19592.07538940876f, + 19607.85159468421f, + 19623.63097392727f, + 19639.41352586159f, + 19655.199249212103f, + 19670.988142705017f, + 19686.780205067822f, + 19702.57543502929f, + 19718.373831319448f, + 19734.175392669615f, + 19749.980117812374f, + 19765.78800548157f, + 19781.59905441232f, + 19797.413263341008f, + 19813.230631005274f, + 19829.051156144014f, + 19844.874837497395f, + 19860.701673806827f, + 19876.531663814985f, + 19892.36480626579f, + 19908.201099904407f, + 19924.04054347726f, + 19939.883135732012f, + 19955.72887541758f, + 19971.577761284105f, + 19987.429792082985f, + 20003.284966566847f, + 20019.14328348956f, + 20035.00474160622f, + 20050.86933967316f, + 20066.737076447942f, + 20082.60795068936f, + 20098.481961157428f, + 20114.359106613385f, + 20130.239385819703f, + 20146.122797540054f, + 20162.009340539353f, + 20177.899013583716f, + 20193.791815440476f, + 20209.68774487818f, + 20225.58680066659f, + 20241.48898157667f, + 20257.394286380597f, + 20273.302713851754f, + 20289.214262764715f, + 20305.128931895277f, + 20321.046720020415f, + 20336.967625918318f, + 20352.89164836836f, + 20368.818786151114f, + 20384.749038048347f, + 20400.68240284301f, + 20416.61887931925f, + 20432.55846626239f, + 20448.501162458953f, + 20464.44696669663f, + 20480.395877764302f, + 20496.347894452025f, + 20512.30301555103f, + 20528.261239853735f, + 20544.22256615372f, + 20560.18699324574f, + 20576.15451992572f, + 20592.125144990758f, + 20608.098867239107f, + 20624.075685470198f, + 20640.055598484618f, + 20656.038605084115f, + 20672.024704071595f, + 20688.013894251126f, + 20704.006174427926f, + 20720.00154340837f, + 20735.99999999999f, + 20752.001543011454f, + 20768.006171252597f, + 20784.013883534382f, + 20800.02467866893f, + 20816.038555469506f, + 20832.055512750507f, + 20848.075549327474f, + 20864.098664017085f, + 20880.12485563716f, + 20896.154123006647f, + 20912.186464945626f, + 20928.221880275312f, + 20944.260367818053f, + 20960.30192639731f, + 20976.346554837684f, + 20992.394251964895f, + 21008.445016605787f, + 21024.49884758832f, + 21040.555743741574f, + 21056.615703895754f, + 21072.67872688217f, + 21088.74481153325f, + 21104.813956682538f, + 21120.886161164683f, + 21136.96142381544f, + 21153.039743471683f, + 21169.12111897138f, + 21185.205549153605f, + 21201.293032858535f, + 21217.383568927453f, + 21233.47715620273f, + 21249.573793527845f, + 21265.67347974736f, + 21281.776213706937f, + 21297.881994253334f, + 21313.990820234398f, + 21330.102690499054f, + 21346.21760389733f, + 21362.335559280327f, + 21378.45655550024f, + 21394.580591410333f, + 21410.70766586496f, + 21426.837777719556f, + 21442.97092583063f, + 21459.10710905576f, + 21475.246326253604f, + 21491.388576283895f, + 21507.53385800743f, + 21523.682170286087f, + 21539.833511982797f, + 21555.987881961566f, + 21572.14527908746f, + 21588.305702226615f, + 21604.469150246216f, + 21620.63562201452f, + 21636.805116400832f, + 21652.97763227552f, + 21669.153168510005f, + 21685.331723976764f, + 21701.513297549318f, + 21717.697888102244f, + 21733.885494511167f, + 21750.07611565276f, + 21766.269750404736f, + 21782.46639764586f, + 21798.666056255934f, + 21814.8687251158f, + 21831.07440310734f, + 21847.283089113484f, + 21863.494782018177f, + 21879.709480706417f, + 21895.92718406423f, + 21912.147890978667f, + 21928.371600337818f, + 21944.598311030797f, + 21960.828021947746f, + 21977.06073197983f, + 21993.296440019243f, + 22009.535144959198f, + 22025.77684569393f, + 22042.02154111869f, + 22058.269230129757f, + 22074.51991162441f, + 22090.77358450096f, + 22107.030247658717f, + 22123.289899998013f, + 22139.552540420187f, + 22155.818167827587f, + 22172.08678112357f, + 22188.358379212495f, + 22204.632960999726f, + 22220.910525391642f, + 22237.1910712956f, + 22253.474597619977f, + 22269.761103274148f, + 22286.050587168473f, + 22302.343048214312f, + 22318.638485324027f, + 22334.936897410968f, + 22351.23828338947f, + 22367.54264217487f, + 22383.849972683485f, + 22400.16027383262f, + 22416.473544540568f, + 22432.789783726603f, + 22449.10899031099f, + 22465.431163214962f, + 22481.75630136074f, + 22498.084403671528f, + 22514.415469071497f, + 22530.749496485798f, + 22547.08648484056f, + 22563.42643306288f, + 22579.769340080824f, + 22596.115204823436f, + 22612.46402622072f, + 22628.815803203655f, + 22645.17053470418f, + 22661.5282196552f, + 22677.888856990587f, + 22694.25244564517f, + 22710.618984554734f, + 22726.988472656034f, + 22743.360908886778f, + 22759.736292185622f, + 22776.11462149219f, + 22792.495895747044f, + 22808.88011389172f, + 22825.26727486868f, + 22841.657377621348f, + 22858.050421094096f, + 22874.446404232243f, + 22890.845325982053f, + 22907.247185290722f, + 22923.651981106406f, + 22940.059712378195f, + 22956.470378056114f, + 22972.88397709113f, + 22989.300508435153f, + 23005.719971041017f, + 23022.1423638625f, + 23038.56768585431f, + 23054.99593597208f, + 23071.427113172387f, + 23087.86121641273f, + 23104.29824465153f, + 23120.738196848142f, + 23137.18107196285f, + 23153.626868956846f, + 23170.075586792263f, + 23186.52722443214f, + 23202.981780840448f, + 23219.439254982062f, + 23235.899645822796f, + 23252.362952329357f, + 23268.829173469378f, + 23285.298308211408f, + 23301.7703555249f, + 23318.245314380227f, + 23334.723183748658f, + 23351.203962602387f, + 23367.687649914504f, + 23384.174244659007f, + 23400.663745810794f, + 23417.15615234568f, + 23433.651463240367f, + 23450.14967747246f, + 23466.650794020472f, + 23483.154811863806f, + 23499.661729982763f, + 23516.171547358543f, + 23532.684262973235f, + 23549.19987580982f, + 23565.71838485219f, + 23582.23978908509f, + 23598.764087494194f, + 23615.29127906604f, + 23631.821362788058f, + 23648.354337648565f, + 23664.890202636765f, + 23681.428956742733f, + 23697.970598957443f, + 23714.51512827274f, + 23731.062543681343f, + 23747.612844176863f, + 23764.166028753774f, + 23780.72209640744f, + 23797.281046134085f, + 23813.842876930816f, + 23830.407587795606f, + 23846.975177727305f, + 23863.545645725622f, + 23880.11899079115f, + 23896.695211925336f, + 23913.2743081305f, + 23929.85627840982f, + 23946.441121767348f, + 23963.02883720799f, + 23979.619423737513f, + 23996.212880362546f, + 24012.809206090584f, + 24029.408399929966f, + 24046.0104608899f, + 24062.615387980433f, + 24079.223180212488f, + 24095.833836597827f, + 24112.447356149067f, + 24129.063737879667f, + 24145.682980803947f, + 24162.305083937077f, + 24178.930046295063f, + 24195.557866894764f, + 24212.18854475388f, + 24228.82207889096f, + 24245.45846832539f, + 24262.097712077397f, + 24278.73980916805f, + 24295.384758619257f, + 24312.03255945377f, + 24328.683210695162f, + 24345.33671136786f, + 24361.99306049711f, + 24378.652257108995f, + 24395.314300230442f, + 24411.979188889192f, + 24428.646922113825f, + 24445.317498933746f, + 24461.990918379193f, + 24478.66717948122f, + 24495.346281271726f, + 24512.028222783407f, + 24528.7130030498f, + 24545.40062110527f, + 24562.091075984976f, + 24578.784366724925f, + 24595.480492361927f, + 24612.179451933614f, + 24628.881244478434f, + 24645.585869035654f, + 24662.293324645343f, + 24679.003610348394f, + 24695.716725186514f, + 24712.43266820221f, + 24729.151438438807f, + 24745.873034940436f, + 24762.59745675203f, + 24779.324702919344f, + 24796.054772488926f, + 24812.787664508123f, + 24829.5233780251f, + 24846.26191208882f, + 24863.003265749034f, + 24879.747438056307f, + 24896.494428062004f, + 24913.244234818278f, + 24929.99685737808f, + 24946.752294795166f, + 24963.51054612408f, + 24980.271610420154f, + 24997.035486739525f, + 25013.802174139113f, + 25030.57167167663f, + 25047.343978410572f, + 25064.119093400237f, + 25080.897015705697f, + 25097.677744387816f, + 25114.46127850824f, + 25131.247617129404f, + 25148.036759314517f, + 25164.828704127583f, + 25181.62345063337f, + 25198.420997897447f, + 25215.221344986145f, + 25232.024490966574f, + 25248.83043490663f, + 25265.639175874974f, + 25282.45071294105f, + 25299.26504517507f, + 25316.082171648024f, + 25332.902091431668f, + 25349.724803598532f, + 25366.550307221914f, + 25383.378601375884f, + 25400.20968513527f, + 25417.04355757568f, + 25433.880217773472f, + 25450.719664805783f, + 25467.561897750507f, + 25484.406915686297f, + 25501.254717692573f, + 25518.10530284951f, + 25534.958670238055f, + 25551.814818939893f, + 25568.67374803748f, + 25585.535456614027f, + 25602.399943753502f, + 25619.26720854062f, + 25636.137250060856f, + 25653.01006740043f, + 25669.885659646327f, + 25686.76402588627f, + 25703.645165208734f, + 25720.529076702944f, + 25737.415759458876f, + 25754.305212567244f, + 25771.197435119517f, + 25788.0924262079f, + 25804.990184925344f, + 25821.890710365547f, + 25838.794001622948f, + 25855.700057792717f, + 25872.608877970775f, + 25889.52046125378f, + 25906.43480673912f, + 25923.351913524923f, + 25940.271780710063f, + 25957.194407394138f, + 25974.119792677477f, + 25991.047935661154f, + 26007.978835446964f, + 26024.912491137442f, + 26041.84890183584f, + 26058.788066646157f, + 26075.729984673108f, + 26092.674655022136f, + 26109.62207679941f, + 26126.57224911183f, + 26143.525171067016f, + 26160.480841773315f, + 26177.43926033979f, + 26194.40042587623f, + 26211.36433749315f, + 26228.330994301767f, + 26245.30039541404f, + 26262.272539942627f, + 26279.24742700092f, + 26296.225055703006f, + 26313.205425163702f, + 26330.18853449854f, + 26347.174382823756f, + 26364.162969256307f, + 26381.154292913852f, + 26398.148352914774f, + 26415.14514837815f, + 26432.144678423778f, + 26449.146942172156f, + 26466.151938744493f, + 26483.159667262702f, + 26500.170126849403f, + 26517.18331662792f, + 26534.199235722277f, + 26551.2178832572f, + 26568.239258358124f, + 26585.263360151173f, + 26602.29018776318f, + 26619.319740321676f, + 26636.352016954883f, + 26653.387016791727f, + 26670.424738961825f, + 26687.465182595493f, + 26704.508346823743f, + 26721.554230778267f, + 26738.602833591467f, + 26755.65415439643f, + 26772.70819232693f, + 26789.764946517433f, + 26806.824416103096f, + 26823.88660021976f, + 26840.95149800396f, + 26858.01910859291f, + 26875.089431124517f, + 26892.162464737365f, + 26909.23820857072f, + 26926.316661764547f, + 26943.39782345947f, + 26960.481692796813f, + 26977.56826891857f, + 26994.657550967422f, + 27011.74953808672f, + 27028.844229420498f, + 27045.941624113464f, + 27063.041721311005f, + 27080.14452015918f, + 27097.250019804727f, + 27114.35821939505f, + 27131.469118078236f, + 27148.58271500303f, + 27165.699009318858f, + 27182.818000175816f, + 27199.939686724665f, + 27217.064068116837f, + 27234.191143504428f, + 27251.320912040203f, + 27268.453372877593f, + 27285.588525170693f, + 27302.72636807427f, + 27319.866900743735f, + 27337.01012233518f, + 27354.156032005358f, + 27371.30462891167f, + 27388.455912212183f, + 27405.609881065626f, + 27422.766534631388f, + 27439.925872069507f, + 27457.087892540683f, + 27474.252595206275f, + 27491.419979228293f, + 27508.5900437694f, + 27525.762787992917f, + 27542.93821106281f, + 27560.116312143706f, + 27577.297090400876f, + 27594.480545000246f, + 27611.666675108383f, + 27628.855479892518f, + 27646.046958520514f, + 27663.24111016089f, + 27680.4379339828f, + 27697.637429156064f, + 27714.83959485113f, + 27732.04443023909f, + 27749.251934491687f, + 27766.4621067813f, + 27783.67494628095f, + 27800.8904521643f, + 27818.108623605658f, + 27835.329459779954f, + 27852.55295986278f, + 27869.779123030345f, + 27887.007948459504f, + 27904.239435327745f, + 27921.473582813196f, + 27938.710390094617f, + 27955.94985635139f, + 27973.19198076355f, + 27990.436762511745f, + 28007.684200777272f, + 28024.934294742037f, + 28042.1870435886f, + 28059.44244650013f, + 28076.700502660427f, + 28093.961211253933f, + 28111.224571465696f, + 28128.4905824814f, + 28145.759243487362f, + 28163.03055367051f, + 28180.304512218394f, + 28197.581118319198f, + 28214.860371161725f, + 28232.14226993539f, + 28249.426813830236f, + 28266.71400203693f, + 28284.003833746745f, + 28301.296308151585f, + 28318.59142444396f, + 28335.889181817f, + 28353.189579464466f, + 28370.492616580705f, + 28387.798292360705f, + 28405.10660600005f, + 28422.417556694945f, + 28439.73114364221f, + 28457.047366039264f, + 28474.36622308415f, + 28491.687713975512f, + 28509.01183791261f, + 28526.338594095305f, + 28543.66798172407f, + 28560.999999999985f, + 28578.33464812473f, + 28595.671925300605f, + 28613.0118307305f, + 28630.35436361791f, + 28647.699523166943f, + 28665.0473085823f, + 28682.39771906929f, + 28699.750753833818f, + 28717.10641208239f, + 28734.46469302212f, + 28751.82559586071f, + 28769.189119806462f, + 28786.55526406828f, + 28803.92402785566f, + 28821.2954103787f, + 28838.669410848088f, + 28856.046028475103f, + 28873.42526247163f, + 28890.80711205013f, + 28908.191576423673f, + 28925.578654805915f, + 28942.968346411097f, + 28960.360650454055f, + 28977.755566150212f, + 28995.15309271559f, + 29012.553229366786f, + 29029.955975320987f, + 29047.361329795975f, + 29064.769292010107f, + 29082.179861182336f, + 29099.593036532187f, + 29117.00881727978f, + 29134.427202645813f, + 29151.848191851568f, + 29169.27178411891f, + 29186.697978670283f, + 29204.126774728706f, + 29221.55817151779f, + 29238.992168261717f, + 29256.42876418525f, + 29273.867958513725f, + 29291.30975047306f, + 29308.754139289747f, + 29326.201124190855f, + 29343.65070440403f, + 29361.102879157483f, + 29378.557647680012f, + 29396.015009200975f, + 29413.47496295031f, + 29430.937508158524f, + 29448.402644056692f, + 29465.87036987647f, + 29483.34068485007f, + 29500.81358821028f, + 29518.289079190454f, + 29535.76715702451f, + 29553.247820946945f, + 29570.731070192807f, + 29588.216903997723f, + 29605.70532159787f, + 29623.19632223f, + 29640.68990513143f, + 29658.18606954003f, + 29675.684814694236f, + 29693.186139833047f, + 29710.690044196028f, + 29728.196527023298f, + 29745.705587555527f, + 29763.217225033964f, + 29780.731438700397f, + 29798.248227797183f, + 29815.76759156723f, + 29833.289529254005f, + 29850.81404010153f, + 29868.34112335438f, + 29885.870778257693f, + 29903.403004057145f, + 29920.937799998974f, + 29938.475165329975f, + 29956.01509929748f, + 29973.557601149394f, + 29991.102670134147f, + 30008.65030550074f, + 30026.20050649871f, + 30043.753272378144f, + 30061.308602389683f, + 30078.866495784507f, + 30096.426951814352f, + 30113.989969731494f, + 30131.55554878875f, + 30149.12368823949f, + 30166.69438733763f, + 30184.26764533761f, + 30201.843461494434f, + 30219.42183506364f, + 30237.00276530131f, + 30254.586251464058f, + 30272.172292809046f, + 30289.760888593977f, + 30307.35203807709f, + 30324.94574051716f, + 30342.541995173502f, + 30360.140801305966f, + 30377.742158174944f, + 30395.346065041358f, + 30412.952521166666f, + 30430.56152581286f, + 30448.173078242475f, + 30465.78717771856f, + 30483.40382350472f, + 30501.02301486507f, + 30518.644751064272f, + 30536.269031367516f, + 30553.895855040515f, + 30571.52522134952f, + 30589.157129561307f, + 30606.791578943175f, + 30624.428568762964f, + 30642.06809828903f, + 30659.71016679026f, + 30677.35477353607f, + 30695.00191779639f, + 30712.651598841687f, + 30730.303815942945f, + 30747.958568371676f, + 30765.615855399912f, + 30783.27567630021f, + 30800.938030345646f, + 30818.602916809814f, + 30836.270334966837f, + 30853.940284091354f, + 30871.61276345852f, + 30889.28777234401f, + 30906.965310024025f, + 30924.64537577527f, + 30942.327968874983f, + 30960.013088600903f, + 30977.700734231294f, + 30995.39090504493f, + 31013.0836003211f, + 31030.77881933962f, + 31048.476561380798f, + 31066.17682572547f, + 31083.87961165498f, + 31101.58491845118f, + 31119.29274539644f, + 31137.003091773637f, + 31154.715956866155f, + 31172.431339957893f, + 31190.14924033326f, + 31207.869657277162f, + 31225.592590075023f, + 31243.31803801277f, + 31261.04600037684f, + 31278.77647645417f, + 31296.50946553221f, + 31314.24496689891f, + 31331.98297984272f, + 31349.7235036526f, + 31367.466537618013f, + 31385.212081028923f, + 31402.960133175795f, + 31420.710693349596f, + 31438.46376084179f, + 31456.21933494435f, + 31473.977414949743f, + 31491.738000150934f, + 31509.50108984139f, + 31527.26668331507f, + 31545.034779866437f, + 31562.80537879045f, + 31580.578479382562f, + 31598.35408093872f, + 31616.13218275537f, + 31633.91278412945f, + 31651.695884358396f, + 31669.48148274013f, + 31687.269578573076f, + 31705.060171156143f, + 31722.853259788735f, + 31740.64884377075f, + 31758.446922402567f, + 31776.247494985066f, + 31794.050560819614f, + 31811.85611920806f, + 31829.664169452753f, + 31847.47471085652f, + 31865.287742722685f, + 31883.103264355046f, + 31900.9212750579f, + 31918.74177413602f, + 31936.56476089467f, + 31954.3902346396f, + 31972.21819467704f, + 31990.048640313704f, + 32007.881570856793f, + 32025.716985613984f, + 32043.554883893445f, + 32061.395265003815f, + 32079.238128254223f, + 32097.08347295427f, + 32114.93129841405f, + 32132.781603944117f, + 32150.634388855524f, + 32168.48965245979f, + 32186.347394068915f, + 32204.20761299537f, + 32222.07030855212f, + 32239.935480052583f, + 32257.80312681067f, + 32275.673248140767f, + 32293.54584335772f, + 32311.420911776862f, + 32329.298452713996f, + 32347.178465485395f, + 32365.060949407813f, + 32382.945903798463f, + 32400.83332797504f, + 32418.723221255706f, + 32436.615582959093f, + 32454.510412404306f, + 32472.407708910916f, + 32490.307471798966f, + 32508.20970038896f, + 32526.114394001877f, + 32544.021551959166f, + 32561.931173582732f, + 32579.843258194956f, + 32597.75780511868f, + 32615.67481367721f, + 32633.59428319433f, + 32651.51621299426f, + 32669.44060240171f, + 32687.367450741847f, + 32705.296757340297f, + 32723.228521523146f, + 32741.162742616943f, + 32759.099419948703f, + 32777.0385528459f, + 32794.980140636464f, + 32812.92418264879f, + 32830.87067821173f, + 32848.81962665459f, + 32866.77102730715f, + 32884.72487949962f, + 32902.68118256269f, + 32920.639935827494f, + 32938.60113862564f, + 32956.56479028918f, + 32974.53089015061f, + 32992.499437542894f, + 33010.47043179945f, + 33028.443872254145f, + 33046.41975824131f, + 33064.39808909571f, + 33082.37886415258f, + 33100.36208274759f, + 33118.34774421688f, + 33136.335847897026f, + 33154.32639312506f, + 33172.31937923847f, + 33190.31480557517f, + 33208.312671473555f, + 33226.31297627244f, + 33244.31571931111f, + 33262.320899929284f, + 33280.328517467125f, + 33298.33857126526f, + 33316.35106066475f, + 33334.36598500709f, + 33352.38334363424f, + 33370.40313588859f, + 33388.42536111299f, + 33406.45001865072f, + 33424.4771078455f, + 33442.50662804151f, + 33460.53857858335f, + 33478.57295881608f, + 33496.60976808519f, + 33514.64900573662f, + 33532.69067111674f, + 33550.734763572356f, + 33568.781282450735f, + 33586.83022709956f, + 33604.88159686697f, + 33622.93539110153f, + 33640.99160915224f, + 33659.05025036854f, + 33677.11131410032f, + 33695.17479969788f, + 33713.240706511984f, + 33731.309033893805f, + 33749.37978119497f, + 33767.45294776753f, + 33785.528532963974f, + 33803.60653613721f, + 33821.6869566406f, + 33839.76979382794f, + 33857.855047053425f, + 33875.94271567171f, + 33894.03279903787f, + 33912.12529650743f, + 33930.220207436316f, + 33948.31753118089f, + 33966.41726709796f, + 33984.519414544746f, + 34002.6239728789f, + 34020.73094145851f, + 34038.84031964208f, + 34056.952106788536f, + 34075.066302257255f, + 34093.182905408015f, + 34111.30191560103f, + 34129.42333219693f, + 34147.547154556785f, + 34165.67338204208f, + 34183.80201401472f, + 34201.93304983703f, + 34220.06648887178f, + 34238.20233048214f, + 34256.3405740317f, + 34274.481218884495f, + 34292.62426440495f, + 34310.76970995794f, + 34328.91755490873f, + 34347.06779862303f, + 34365.220440466954f, + 34383.37547980705f, + 34401.53291601026f, + 34419.69274844397f, + 34437.85497647597f, + 34456.01959947445f, + 34474.18661680806f, + 34492.35602784582f, + 34510.527831957195f, + 34528.70202851205f, + 34546.87861688068f, + 34565.05759643377f, + 34583.23896654245f, + 34601.42272657823f, + 34619.608875913065f, + 34637.797413919296f, + 34655.98833996969f, + 34674.18165343742f, + 34692.37735369608f, + 34710.57544011967f, + 34728.77591208258f, + 34746.97876895965f, + 34765.18401012608f, + 34783.39163495754f, + 34801.60164283005f, + 34819.81403312006f, + 34838.028805204456f, + 34856.24595846048f, + 34874.46549226582f, + 34892.68740599856f, + 34910.91169903718f, + 34929.138370760564f, + 34947.36742054803f, + 34965.59884777927f, + 34983.8326518344f, + 35002.06883209391f, + 35020.30738793874f, + 35038.54831875018f, + 35056.79162390998f, + 35075.03730280025f, + 35093.285354803505f, + 35111.53577930269f, + 35129.788575681116f, + 35148.043743322516f, + 35166.30128161101f, + 35184.56118993114f, + 35202.823467667826f, + 35221.08811420639f, + 35239.355128932555f, + 35257.62451123245f, + 35275.896260492584f, + 35294.170376099886f, + 35312.44685744167f, + 35330.72570390563f, + 35349.00691487989f, + 35367.290489752944f, + 35385.576427913686f, + 35403.86472875142f, + 35422.15539165581f, + 35440.44841601697f, + 35458.74380122534f, + 35477.041546671804f, + 35495.34165174762f, + 35513.644115844436f, + 35531.948938354304f, + 35550.256118669655f, + 35568.56565618331f, + 35586.8775502885f, + 35605.191800378816f, + 35623.50840584827f, + 35641.82736609124f, + 35660.148680502505f, + 35678.47234847723f, + 35696.79836941098f, + 35715.12674269968f, + 35733.45746773966f, + 35751.790543927644f, + 35770.12597066074f, + 35788.46374733642f, + 35806.80387335257f, + 35825.14634810745f, + 35843.49117099971f, + 35861.83834142837f, + 35880.18785879285f, + 35898.539722492955f, + 35916.89393192886f, + 35935.25048650113f, + 35953.60938561072f, + 35971.97062865896f, + 35990.33421504756f, + 36008.70014417861f, + 36027.068415454596f, + 36045.43902827837f, + 36063.81198205317f, + 36082.18727618261f, + 36100.564910070694f, + 36118.94488312179f, + 36137.327194740654f, + 36155.71184433243f, + 36174.09883130262f, + 36192.488155057115f, + 36210.87981500219f, + 36229.27381054447f, + 36247.670141091f, + 36266.06880604917f, + 36284.46980482674f, + 36302.87313683186f, + 36321.27880147307f, + 36339.68679815925f, + 36358.09712629968f, + 36376.50978530401f, + 36394.924774582265f, + 36413.342093544816f, + 36431.761741602444f, + 36450.18371816629f, + 36468.60802264786f, + 36487.03465445903f, + 36505.46361301206f, + 36523.89489771958f, + 36542.32850799458f, + 36560.76444325041f, + 36579.20270290083f, + 36597.643286359926f, + 36616.08619304218f, + 36634.53142236244f, + 36652.978973735895f, + 36671.42884657814f, + 36689.881040305125f, + 36708.33555433315f, + 36726.7923880789f, + 36745.25154095943f, + 36763.71301239214f, + 36782.17680179481f, + 36800.64290858559f, + 36819.11133218299f, + 36837.58207200587f, + 36856.05512747348f, + 36874.53049800542f, + 36893.00818302165f, + 36911.488181942506f, + 36929.970494188674f, + 36948.455119181206f, + 36966.94205634152f, + 36985.43130509139f, + 37003.92286485296f, + 37022.41673504873f, + 37040.91291510156f, + 37059.411404434664f, + 37077.91220247162f, + 37096.41530863639f, + 37114.92072235324f, + 37133.42844304686f, + 37151.93847014225f, + 37170.450803064785f, + 37188.96544124021f, + 37207.4823840946f, + 37226.0016310544f, + 37244.52318154643f, + 37263.04703499784f, + 37281.57319083615f, + 37300.101648489224f, + 37318.632407385296f, + 37337.165466952945f, + 37355.70082662111f, + 37374.238485819085f, + 37392.77844397651f, + 37411.320700523385f, + 37429.86525489006f, + 37448.41210650723f, + 37466.96125480597f, + 37485.51269921768f, + 37504.066439174116f, + 37522.622474107404f, + 37541.18080344999f, + 37559.741426634704f, + 37578.30434309469f, + 37596.86955226349f, + 37615.43705357494f, + 37634.00684646328f, + 37652.578930363044f, + 37671.153304709165f, + 37689.729968936896f, + 37708.30892248185f, + 37726.890164779965f, + 37745.47369526756f, + 37764.059513381275f, + 37782.64761855811f, + 37801.238010235415f, + 37819.83068785086f, + 37838.425650842495f, + 37857.02289864869f, + 37875.62243070817f, + 37894.22424646001f, + 37912.828345343616f, + 37931.43472679875f, + 37950.043390265506f, + 37968.65433518433f, + 37987.267560996f, + 38005.883067141665f, + 38024.500853062775f, + 38043.12091820116f, + 38061.74326199896f, + 38080.36788389868f, + 38098.99478334316f, + 38117.62395977556f, + 38136.25541263942f, + 38154.889141378575f, + 38173.525145437234f, + 38192.16342425994f, + 38210.80397729155f, + 38229.44680397729f, + 38248.0919037627f, + 38266.739276093685f, + 38285.388920416466f, + 38304.040836177606f, + 38322.695022824f, + 38341.3514798029f, + 38360.01020656186f, + 38378.671202548816f, + 38397.33446721199f, + 38415.99999999998f, + 38434.66780036168f, + 38453.33786774637f, + 38472.01020160361f, + 38490.68480138334f, + 38509.361666535784f, + 38528.04079651155f, + 38546.72219076155f, + 38565.405848737035f, + 38584.091769889594f, + 38602.77995367113f, + 38621.47039953391f, + 38640.163106930486f, + 38658.858075313794f, + 38677.55530413706f, + 38696.25479285386f, + 38714.956540918094f, + 38733.66054778399f, + 38752.36681290611f, + 38771.07533573935f, + 38789.78611573892f, + 38808.49915236037f, + 38827.21444505957f, + 38845.93199329274f, + 38864.65179651639f, + 38883.37385418738f, + 38902.098165762916f, + 38920.824730700486f, + 38939.55354845794f, + 38958.28461849343f, + 38977.01794026546f, + 38995.753513232834f, + 39014.4913368547f, + 39033.23141059052f, + 39051.97373390007f, + 39070.718306243485f, + 39089.46512708119f, + 39108.214195873945f, + 39126.96551208283f, + 39145.71907516926f, + 39164.474884594965f, + 39183.23293982199f, + 39201.99324031271f, + 39220.755785529815f, + 39239.52057493633f, + 39258.28760799559f, + 39277.05688417125f, + 39295.82840292729f, + 39314.60216372801f, + 39333.37816603802f, + 39352.15640932227f, + 39370.936893046004f, + 39389.71961667481f, + 39408.50457967458f, + 39427.29178151152f, + 39446.08122165217f, + 39464.87289956337f, + 39483.66681471229f, + 39502.46296656641f, + 39521.26135459354f, + 39540.06197826178f, + 39558.86483703957f, + 39577.669930395656f, + 39596.47725779911f, + 39615.2868187193f, + 39634.09861262592f, + 39652.91263898899f, + 39671.72889727882f, + 39690.547386966064f, + 39709.36810752165f, + 39728.19105841686f, + 39747.01623912326f, + 39765.84364911275f, + 39784.67328785753f, + 39803.505154830105f, + 39822.33924950332f, + 39841.17557135029f, + 39860.0141198445f, + 39878.85489445968f, + 39897.69789466991f, + 39916.54311994958f, + 39935.39056977337f, + 39954.2402436163f, + 39973.092140953675f, + 39991.94626126112f, + 40010.80260401455f, + 40029.661168690225f, + 40048.52195476468f, + 40067.38496171478f, + 40086.25018901768f, + 40105.117636150855f, + 40123.98730259209f, + 40142.85918781947f, + 40161.73329131138f, + 40180.60961254653f, + 40199.48815100391f, + 40218.368906162854f, + 40237.25187750296f, + 40256.13706450415f, + 40275.02446664667f, + 40293.91408341103f, + 40312.805914278084f, + 40331.69995872896f, + 40350.5962162451f, + 40369.49468630827f, + 40388.39536840051f, + 40407.29826200417f, + 40426.20336660192f, + 40445.110681676706f, + 40464.02020671179f, + 40482.93194119075f, + 40501.84588459744f, + 40520.76203641603f, + 40539.680396130985f, + 40558.60096322707f, + 40577.52373718937f, + 40596.448717503234f, + 40615.37590365434f, + 40634.30529512866f, + 40653.23689141245f, + 40672.170691992294f, + 40691.10669635505f, + 40710.04490398787f, + 40728.98531437824f, + 40747.9279270139f, + 40766.87274138292f, + 40785.81975697365f, + 40804.768973274746f, + 40823.72038977516f, + 40842.67400596413f, + 40861.62982133121f, + 40880.58783536623f, + 40899.54804755933f, + 40918.51045740093f, + 40937.47506438176f, + 40956.44186799285f, + 40975.4108677255f, + 40994.38206307133f, + 41013.355453522236f, + 41032.33103857042f, + 41051.30881770836f, + 41070.288790428865f, + 41089.27095622499f, + 41108.25531459011f, + 41127.24186501789f, + 41146.23060700229f, + 41165.22154003754f, + 41184.2146636182f, + 41203.20997723908f, + 41222.20748039531f, + 41241.2071725823f, + 41260.20905329575f, + 41279.21312203166f, + 41298.2193782863f, + 41317.227821556255f, + 41336.23845133838f, + 41355.25126712983f, + 41374.26626842804f, + 41393.28345473074f, + 41412.30282553595f, + 41431.32438034198f, + 41450.34811864742f, + 41469.374039951144f, + 41488.40214375233f, + 41507.43242955043f, + 41526.46489684518f, + 41545.49954513663f, + 41564.536373925075f, + 41583.575382711126f, + 41602.61657099567f, + 41621.659938279874f, + 41640.705484065205f, + 41659.7532078534f, + 41678.803109146495f, + 41697.8551874468f, + 41716.90944225691f, + 41735.96587307971f, + 41755.02447941836f, + 41774.085260776315f, + 41793.1482166573f, + 41812.21334656533f, + 41831.280650004715f, + 41850.350126480014f, + 41869.42177549611f, + 41888.49559655813f, + 41907.571589171515f, + 41926.64975284196f, + 41945.73008707546f, + 41964.812591378286f, + 41983.89726525698f, + 42002.98410821838f, + 42022.07311976959f, + 42041.164299418015f, + 42060.25764667131f, + 42079.35316103742f, + 42098.45084202459f, + 42117.550689141324f, + 42136.652701896404f, + 42155.75687979889f, + 42174.86322235814f, + 42193.97172908376f, + 42213.082399485655f, + 42232.195233074f, + 42251.310229359246f, + 42270.42738785213f, + 42289.546708063644f, + 42308.66818950508f, + 42327.791831687995f, + 42346.91763412423f, + 42366.04559632589f, + 42385.17571780535f, + 42404.307998075295f, + 42423.44243664864f, + 42442.57903303861f, + 42461.71778675867f, + 42480.858697322605f, + 42500.00176424442f, + 42519.146987038446f, + 42538.29436521925f, + 42557.44389830169f, + 42576.59558580088f, + 42595.74942723224f, + 42614.90542211142f, + 42634.06356995438f, + 42653.22387027732f, + 42672.386322596736f, + 42691.55092642938f, + 42710.71768129229f, + 42729.88658670276f, + 42749.05764217836f, + 42768.23084723694f, + 42787.4062013966f, + 42806.58370417574f, + 42825.76335509299f, + 42844.945153667286f, + 42864.129099417805f, + 42883.315191864014f, + 42902.50343052565f, + 42921.69381492269f, + 42940.88634457541f, + 42960.08101900435f, + 42979.2778377303f, + 42998.47680027432f, + 43017.67790615777f, + 43036.881154902236f, + 43056.08654602958f, + 43075.29407906196f, + 43094.50375352177f, + 43113.71556893167f, + 43132.9295248146f, + 43152.14562069376f, + 43171.36385609262f, + 43190.58423053491f, + 43209.80674354462f, + 43229.031394646016f, + 43248.25818336362f, + 43267.487109222224f, + 43286.71817174688f, + 43305.951370462906f, + 43325.18670489588f, + 43344.42417457165f, + 43363.66377901632f, + 43382.90551775626f, + 43402.1493903181f, + 43421.39539622875f, + 43440.64353501535f, + 43459.89380620532f, + 43479.146209326354f, + 43498.40074390638f, + 43517.657409473606f, + 43536.916205556496f, + 43556.177131683784f, + 43575.44018738444f, + 43594.705372187724f, + 43613.972685623135f, + 43633.24212722044f, + 43652.51369650967f, + 43671.78739302109f, + 43691.06321628527f, + 43710.341165833f, + 43729.621241195346f, + 43748.903441903625f, + 43768.18776748941f, + 43787.474217484545f, + 43806.762791421126f, + 43826.0534888315f, + 43845.34630924828f, + 43864.641252204325f, + 43883.938317232765f, + 43903.23750386697f, + 43922.538811640596f, + 43941.84224008751f, + 43961.14778874188f, + 43980.4554571381f, + 43999.765244810835f, + 44019.077151295f, + 44038.391176125755f, + 44057.70731883854f, + 44077.02557896902f, + 44096.34595605314f, + 44115.66844962708f, + 44134.99305922729f, + 44154.319784390456f, + 44173.648624653535f, + 44192.97957955373f, + 44212.31264862849f, + 44231.64783141553f, + 44250.985127452805f, + 44270.32453627854f, + 44289.66605743118f, + 44309.009690449464f, + 44328.355434872356f, + 44347.703290239064f, + 44367.05325608907f, + 44386.40533196211f, + 44405.75951739814f, + 44425.11581193739f, + 44444.47421512033f, + 44463.834726487694f, + 44483.19734558046f, + 44502.56207193984f, + 44521.92890510733f, + 44541.297844624634f, + 44560.66889003373f, + 44580.042040876855f, + 44599.417296696454f, + 44618.794657035265f, + 44638.174121436256f, + 44657.55568944264f, + 44676.93936059787f, + 44696.32513444567f, + 44715.71301053f, + 44735.102988395054f, + 44754.495067585296f, + 44773.88924764542f, + 44793.285528120374f, + 44812.683908555344f, + 44832.08438849578f, + 44851.48696748736f, + 44870.891645076015f, + 44890.298420807914f, + 44909.70729422949f, + 44929.11826488741f, + 44948.531332328566f, + 44967.946496100136f, + 44987.36375574951f, + 45006.783110824326f, + 45026.20456087247f, + 45045.6281054421f, + 45065.05374408157f, + 45084.48147633949f, + 45103.91130176475f, + 45123.34321990643f, + 45142.777230313885f, + 45162.21333253671f, + 45181.65152612473f, + 45201.09181062803f, + 45220.53418559692f, + 45239.978650581965f, + 45259.42520513396f, + 45278.87384880394f, + 45298.32458114319f, + 45317.777401703235f, + 45337.23231003585f, + 45356.68930569302f, + 45376.148388227f, + 45395.60955719027f, + 45415.07281213556f, + 45434.53815261583f, + 45454.00557818428f, + 45473.47508839436f, + 45492.946682799746f, + 45512.42036095436f, + 45531.89612241236f, + 45551.373966728155f, + 45570.85389345636f, + 45590.33590215187f, + 45609.819992369776f, + 45629.30616366544f, + 45648.79441559444f, + 45668.28474771261f, + 45687.777159576006f, + 45707.27165074092f, + 45726.76822076389f, + 45746.26686920169f, + 45765.76759561132f, + 45785.270399550034f, + 45804.7752805753f, + 45824.28223824482f, + 45843.79127211657f, + 45863.30238174872f, + 45882.81556669969f, + 45902.33082652812f, + 45921.84816079293f, + 45941.367569053225f, + 45960.889050868354f, + 45980.41260579793f, + 45999.93823340176f, + 46019.4659332399f, + 46038.99570487266f, + 46058.52754786055f, + 46078.06146176433f, + 46097.597446144995f, + 46117.135500563774f, + 46136.67562458211f, + 46156.2178177617f, + 46175.76207966446f, + 46195.30840985254f, + 46214.85680788833f, + 46234.40727333444f, + 46253.95980575372f, + 46273.51440470924f, + 46293.07106976431f, + 46312.62980048248f, + 46332.1905964275f, + 46351.75345716338f, + 46371.31838225435f, + 46390.88537126487f, + 46410.45442375962f, + 46430.025539303526f, + 46449.59871746173f, + 46469.17395779962f, + 46488.75125988279f, + 46508.33062327707f, + 46527.91204754854f, + 46547.49553226347f, + 46567.0810769884f, + 46586.66868129006f, + 46606.258344735434f, + 46625.850066891726f, + 46645.44384732635f, + 46665.039685606986f, + 46684.6375813015f, + 46704.237533978005f, + 46723.83954320484f, + 46743.44360855057f, + 46763.04972958399f, + 46782.657905874104f, + 46802.26813699017f, + 46821.88042250163f, + 46841.494761978196f, + 46861.111154989776f, + 46880.72960110652f, + 46900.3500998988f, + 46919.9726509372f, + 46939.597253792526f, + 46959.22390803584f, + 46978.8526132384f, + 46998.48336897169f, + 47018.11617480742f, + 47037.75103031755f, + 47057.38793507422f, + 47077.02688864981f, + 47096.66789061694f, + 47116.31094054843f, + 47135.95603801733f, + 47155.60318259692f, + 47175.2523738607f, + 47194.903611382375f, + 47214.5568947359f, + 47234.21222349542f, + 47253.86959723534f, + 47273.52901553025f, + 47293.19047795498f, + 47312.85398408458f, + 47332.519533494306f, + 47352.187125759665f, + 47371.85676045634f, + 47391.52843716029f, + 47411.20215544765f, + 47430.877914894794f, + 47450.5557150783f, + 47470.23555557498f, + 47489.91743596186f, + 47509.6013558162f, + 47529.28731471546f, + 47548.97531223731f, + 47568.66534795967f, + 47588.35742146065f, + 47608.051532318605f, + 47627.74768011208f, + 47647.445864419846f, + 47667.14608482091f, + 47686.848340894474f, + 47706.55263221997f, + 47726.258958377046f, + 47745.96731894555f, + 47765.67771350559f, + 47785.39014163743f, + 47805.104602921594f, + 47824.821096938824f, + 47844.539623270044f, + 47864.26018149643f, + 47883.98277119934f, + 47903.70739196039f, + 47923.43404336137f, + 47943.162724984315f, + 47962.89343641144f, + 47982.62617722522f, + 48002.36094700831f, + 48022.0977453436f, + 48041.83657181417f, + 48061.57742600335f, + 48081.32030749465f, + 48101.065215871815f, + 48120.81215071879f, + 48140.56111161974f, + 48160.31209815905f, + 48180.0651099213f, + 48199.82014649131f, + 48219.57720745407f, + 48239.336292394844f, + 48259.097400899045f, + 48278.86053255234f, + 48298.62568694059f, + 48318.392863649875f, + 48338.16206226648f, + 48357.933282376915f, + 48377.70652356789f, + 48397.48178542632f, + 48417.259067539344f, + 48437.0383694943f, + 48456.819690878765f, + 48476.60303128049f, + 48496.38839028745f, + 48516.17576748783f, + 48535.96516247005f, + 48555.756574822684f, + 48575.550004134566f, + 48595.34544999472f, + 48615.14291199238f, + 48634.94238971699f, + 48654.7438827582f, + 48674.54739070588f, + 48694.35291315008f, + 48714.16044968111f, + 48733.969999889436f, + 48753.78156336576f, + 48773.59513970098f, + 48793.41072848621f, + 48813.22832931277f, + 48833.04794177219f, + 48852.86956545619f, + 48872.69319995672f, + 48892.51884486592f, + 48912.346499776155f, + 48932.176164279976f, + 48952.00783797016f, + 48971.84152043966f, + 48991.677211281676f, + 49011.51491008959f, + 49031.354616456985f, + 49051.196329977654f, + 49071.04005024561f, + 49090.88577685506f, + 49110.73350940041f, + 49130.58324747627f, + 49150.43499067749f, + 49170.28873859906f, + 49190.14449083623f, + 49210.00224698444f, + 49229.86200663932f, + 49249.72376939672f, + 49269.587534852675f, + 49289.45330260345f, + 49309.32107224548f, + 49329.19084337544f, + 49349.06261559019f, + 49368.936388486785f, + 49388.81216166249f, + 49408.689934714785f, + 49428.569707241324f, + 49448.45147883999f, + 49468.33524910886f, + 49488.22101764621f, + 49508.10878405052f, + 49527.99854792047f, + 49547.89030885494f, + 49567.78406645301f, + 49587.67982031398f, + 49607.57757003732f, + 49627.47731522272f, + 49647.37905547007f, + 49667.28279037946f, + 49687.18851955118f, + 49707.09624258571f, + 49727.00595908374f, + 49746.917668646165f, + 49766.83137087407f, + 49786.747065368734f, + 49806.66475173166f, + 49826.58442956452f, + 49846.5060984692f, + 49866.429758047794f, + 49886.35540790258f, + 49906.28304763604f, + 49926.212676850846f, + 49946.14429514988f, + 49966.077902136225f, + 49986.01349741315f, + 50005.951080584135f, + 50025.890651252834f, + 50045.83220902312f, + 50065.77575349907f, + 50085.72128428493f, + 50105.668800985164f, + 50125.61830320443f, + 50145.569790547575f, + 50165.52326261965f, + 50185.4787190259f, + 50205.43615937177f, + 50225.39558326289f, + 50245.3569903051f, + 50265.32038010443f, + 50285.2857522671f, + 50305.25310639953f, + 50325.22244210834f, + 50345.193759000336f, + 50365.16705668252f, + 50385.1423347621f, + 50405.11959284647f, + 50425.09883054322f, + 50445.08004746013f, + 50465.06324320518f, + 50485.04841738654f, + 50505.03556961258f, + 50525.024699491856f, + 50545.01580663313f, + 50565.00889064534f, + 50585.00395113762f, + 50605.00098771933f, + 50624.99999999997f, + 50645.00098758927f, + 50665.00395009713f, + 50685.00888713368f, + 50705.01579830919f, + 50725.024683234165f, + 50745.03554151928f, + 50765.04837277541f, + 50785.06317661362f, + 50805.07995264516f, + 50825.09870048149f, + 50845.11941973424f, + 50865.142110015244f, + 50885.16677093652f, + 50905.19340211028f, + 50925.222003148934f, + 50945.25257366507f, + 50965.28511327147f, + 50985.31962158112f, + 51005.356098207165f, + 51025.39454276298f, + 51045.434954862096f, + 51065.477334118244f, + 51085.521680145364f, + 51105.567992557546f, + 51125.61627096911f, + 51145.66651499454f, + 51165.71872424852f, + 51185.77289834591f, + 51205.82903690178f, + 51225.88713953136f, + 51245.947205850105f, + 51266.00923547362f, + 51286.07322801772f, + 51306.1391830984f, + 51326.207100331856f, + 51346.27697933445f, + 51366.348819722756f, + 51386.42262111351f, + 51406.49838312366f, + 51426.57610537032f, + 51446.655787470794f, + 51466.73742904259f, + 51486.82102970338f, + 51506.90658907105f, + 51526.99410676363f, + 51547.08358239939f, + 51567.17501559674f, + 51587.2684059743f, + 51607.36375315086f, + 51627.461056745415f, + 51647.56031637713f, + 51667.66153166536f, + 51687.76470222966f, + 51707.86982768973f, + 51727.9769076655f, + 51748.085941777055f, + 51768.19692964468f, + 51788.309870888836f, + 51808.42476513017f, + 51828.54161198952f, + 51848.660411087905f, + 51868.781162046515f, + 51888.90386448674f, + 51909.02851803014f, + 51929.155122298485f, + 51949.28367691369f, + 51969.41418149788f, + 51989.54663567335f, + 52009.68103906259f, + 52029.81739128826f, + 52049.95569197321f, + 52070.09594074048f, + 52090.23813721327f, + 52110.38228101499f, + 52130.5283717692f, + 52150.676409099666f, + 52170.82639263033f, + 52190.97832198532f, + 52211.13219678893f, + 52231.288016665654f, + 52251.44578124015f, + 52271.60549013727f, + 52291.76714298204f, + 52311.93073939967f, + 52332.096279015546f, + 52352.26376145525f, + 52372.43318634451f, + 52392.604553309284f, + 52412.777861975665f, + 52432.953111969946f, + 52453.130302918595f, + 52473.30943444827f, + 52493.49050618579f, + 52513.67351775817f, + 52533.858468792605f, + 52554.04535891645f, + 52574.23418775725f, + 52594.42495494274f, + 52614.61766010081f, + 52634.81230285956f, + 52655.00888284723f, + 52675.20739969227f, + 52695.407853023295f, + 52715.6102424691f, + 52735.81456765866f, + 52756.02082822111f, + 52776.229023785796f, + 52796.439153982225f, + 52816.65121844006f, + 52836.86521678917f, + 52857.0811486596f, + 52877.29901368155f, + 52897.518811485425f, + 52917.74054170177f, + 52937.96420396135f, + 52958.18979789508f, + 52978.41732313405f, + 52998.64677930953f, + 53018.87816605298f, + 53039.111482996006f, + 53059.34672977042f, + 53079.58390600819f, + 53099.82301134148f, + 53120.0640454026f, + 53140.30700782406f, + 53160.55189823853f, + 53180.79871627886f, + 53201.04746157809f, + 53221.2981337694f, + 53241.550732486176f, + 53261.805257361964f, + 53282.06170803049f, + 53302.32008412564f, + 53322.58038528149f, + 53342.8426111323f, + 53363.10676131247f, + 53383.3728354566f, + 53403.64083319945f, + 53423.91075417597f, + 53444.18259802126f, + 53464.45636437061f, + 53484.73205285948f, + 53505.0096631235f, + 53525.28919479847f, + 53545.57064752036f, + 53565.85402092533f, + 53586.1393146497f, + 53606.426528329954f, + 53626.715661602764f, + 53647.00671410496f, + 53667.299685473554f, + 53687.59457534572f, + 53707.891383358816f, + 53728.19010915037f, + 53748.490752358055f, + 53768.79331261975f, + 53789.0977895735f, + 53809.404182857485f, + 53829.712492110106f, + 53850.0227169699f, + 53870.33485707559f, + 53890.648912066055f, + 53910.96488158037f, + 53931.28276525774f, + 53951.60256273758f, + 53971.92427365946f, + 53992.24789766311f, + 54012.57343438844f, + 54032.90088347553f, + 54053.23024456462f, + 54073.561517296126f, + 54093.894701310644f, + 54114.22979624891f, + 54134.566801751855f, + 54154.90571746057f, + 54175.246543016314f, + 54195.589278060506f, + 54215.933922234755f, + 54236.280475180814f, + 54256.62893654063f, + 54276.97930595628f, + 54297.331583070045f, + 54317.68576752436f, + 54338.04185896183f, + 54358.399857025215f, + 54378.75976135746f, + 54399.12157160167f, + 54419.48528740111f, + 54439.850908399225f, + 54460.218434239614f, + 54480.587864566056f, + 54500.95919902248f, + 54521.332437253f, + 54541.70757890188f, + 54562.084623613555f, + 54582.46357103264f, + 54602.844420803885f, + 54623.227172572246f, + 54643.61182598281f, + 54663.99838068084f, + 54684.38683631177f, + 54704.7771925212f, + 54725.1694489549f, + 54745.56360525877f, + 54765.95966107893f, + 54786.357616061614f, + 54806.757469853255f, + 54827.15922210044f, + 54847.56287244991f, + 54867.96842054858f, + 54888.375866043534f, + 54908.78520858201f, + 54929.19644781142f, + 54949.60958337932f, + 54970.02461493346f, + 54990.44154212173f, + 55010.86036459218f, + 55031.28108199306f, + 55051.70369397273f, + 55072.12820017975f, + 55092.55460026284f, + 55112.98289387087f, + 55133.41308065288f, + 55153.84516025806f, + 55174.27913233579f, + 55194.714996535586f, + 55215.15275250714f, + 55235.5923999003f, + 55256.033938365086f, + 55276.477367551655f, + 55296.92268711036f, + 55317.369896691685f, + 55337.818995946305f, + 55358.269984525024f, + 55378.72286207883f, + 55399.17762825887f, + 55419.63428271644f, + 55440.09282510301f, + 55460.553255070205f, + 55481.01557226981f, + 55501.479776353764f, + 55521.94586697419f, + 55542.413843783346f, + 55562.883706433655f, + 55583.355454577715f, + 55603.82908786826f, + 55624.30460595821f, + 55644.78200850064f, + 55665.26129514875f, + 55685.742465555944f, + 55706.225519375774f, + 55726.71045626193f, + 55747.197275868275f, + 55767.68597784884f, + 55788.176561857814f, + 55808.66902754953f, + 55829.16337457848f, + 55849.65960259933f, + 55870.15771126689f, + 55890.657700236145f, + 55911.15956916222f, + 55931.66331770041f, + 55952.168945506164f, + 55972.676452235086f, + 55993.185837542944f, + 56013.69710108565f, + 56034.2102425193f, + 56054.72526150012f, + 56075.24215768451f, + 56095.76093072901f, + 56116.28158029034f, + 56136.80410602537f, + 56157.328507591104f, + 56177.85478464474f, + 56198.3829368436f, + 56218.912963845185f, + 56239.44486530714f, + 56259.97864088727f, + 56280.51429024353f, + 56301.05181303404f, + 56321.59120891709f, + 56342.13247755108f, + 56362.675618594614f, + 56383.22063170642f, + 56403.7675165454f, + 56424.31627277061f, + 56444.86690004124f, + 56465.41939801667f, + 56485.973766356394f, + 56506.5300047201f, + 56527.08811276761f, + 56547.6480901589f, + 56568.20993655411f, + 56588.77365161352f, + 56609.339234997584f, + 56629.9066863669f, + 56650.47600538221f, + 56671.04719170442f, + 56691.6202449946f, + 56712.19516491396f, + 56732.77195112387f, + 56753.350603285835f, + 56773.93112106154f, + 56794.51350411282f, + 56815.09775210165f, + 56835.68386469015f, + 56856.27184154063f, + 56876.86168231552f, + 56897.4533866774f, + 56918.04695428902f, + 56938.6423848133f, + 56959.23967791326f, + 56979.83883325211f, + 57000.439850493225f, + 57021.04272930009f, + 57041.64746933637f, + 57062.25407026587f, + 57082.86253175256f, + 57103.47285346055f, + 57124.08503505411f, + 57144.69907619765f, + 57165.31497655575f, + 57185.9327357931f, + 57206.55235357461f, + 57227.173829565276f, + 57247.79716343028f, + 57268.42235483494f, + 57289.04940344473f, + 57309.678308925286f, + 57330.30907094237f, + 57350.94168916191f, + 57371.576163249985f, + 57392.212492872815f, + 57412.850677696784f, + 57433.490717388406f, + 57454.13261161437f, + 57474.77636004149f, + 57495.421962336746f, + 57516.069418167266f, + 57536.718727200314f, + 57557.36988910332f, + 57578.02290354386f, + 57598.67777018964f, + 57619.33448870855f, + 57639.99305876859f, + 57660.65348003794f, + 57681.315752184906f, + 57701.97987487797f, + 57722.64584778573f, + 57743.31367057695f, + 57763.98334292055f, + 57784.65486448557f, + 57805.32823494123f, + 57826.00345395688f, + 57846.680521202026f, + 57867.359436346305f, + 57888.04019905953f, + 57908.72280901163f, + 57929.40726587271f, + 57950.093569313f, + 57970.781719002895f, + 57991.47171461291f, + 58012.16355581375f, + 58032.85724227622f, + 58053.55277367131f, + 58074.25014967013f, + 58094.94936994395f, + 58115.650434164185f, + 58136.35334200239f, + 58157.058093130276f, + 58177.76468721969f, + 58198.47312394264f, + 58219.18340297126f, + 58239.89552397784f, + 58260.60948663482f, + 58281.325290614775f, + 58302.042935590434f, + 58322.76242123468f, + 58343.48374722051f, + 58364.206913221096f, + 58384.93191890975f, + 58405.65876395992f, + 58426.3874480452f, + 58447.11797083934f, + 58467.85033201621f, + 58488.584531249864f, + 58509.32056821446f, + 58530.05844258433f, + 58550.79815403393f, + 58571.539702237875f, + 58592.283086870906f, + 58613.02830760793f, + 58633.77536412398f, + 58654.52425609425f, + 58675.27498319405f, + 58696.02754509888f, + 58716.781941484325f, + 58737.53817202616f, + 58758.296236400274f, + 58779.05613428273f, + 58799.817865349694f, + 58820.5814292775f, + 58841.34682574264f, + 58862.11405442171f, + 58882.883114991484f, + 58903.65400712885f, + 58924.42673051085f, + 58945.201284814684f, + 58965.977669717664f, + 58986.75588489727f, + 59007.53593003111f, + 59028.31780479695f, + 59049.10150887266f, + 59069.8870419363f, + 59090.674403666046f, + 59111.46359374021f, + 59132.25461183726f, + 59153.0474576358f, + 59173.84213081458f, + 59194.63863105247f, + 59215.436958028506f, + 59236.237111421855f, + 59257.03909091183f, + 59277.84289617788f, + 59298.64852689959f, + 59319.455982756685f, + 59340.26526342905f, + 59361.076368596696f, + 59381.88929793976f, + 59402.70405113854f, + 59423.520627873484f, + 59444.33902782514f, + 59465.15925067423f, + 59485.9812961016f, + 59506.80516378825f, + 59527.63085341531f, + 59548.458364664046f, + 59569.28769721586f, + 59590.11885075232f, + 59610.95182495509f, + 59631.78661950601f, + 59652.62323408705f, + 59673.46166838031f, + 59694.30192206803f, + 59715.14399483259f, + 59735.987886356525f, + 59756.83359632248f, + 59777.681124413255f, + 59798.530470311794f, + 59819.38163370116f, + 59840.23461426457f, + 59861.08941168538f, + 59881.94602564707f, + 59902.80445583327f, + 59923.664701927744f, + 59944.52676361438f, + 59965.39064057724f, + 59986.25633250049f, + 60007.12383906844f, + 60027.99315996554f, + 60048.86429487638f, + 60069.73724348569f, + 60090.612005478324f, + 60111.488580539284f, + 60132.36696835371f, + 60153.24716860687f, + 60174.129180984164f, + 60195.01300517115f, + 60215.89864085351f, + 60236.78608771706f, + 60257.67534544775f, + 60278.56641373167f, + 60299.459292255044f, + 60320.35398070425f, + 60341.25047876576f, + 60362.14878612623f, + 60383.04890247242f, + 60403.95082749124f, + 60424.85456086972f, + 60445.76010229504f, + 60466.667451454516f, + 60487.57660803559f, + 60508.48757172584f, + 60529.400342213f, + 60550.31491918489f, + 60571.23130232952f, + 60592.149491335f, + 60613.06948588959f, + 60633.99128568168f, + 60654.914890399785f, + 60675.84029973257f, + 60696.76751336883f, + 60717.69653099749f, + 60738.6273523076f, + 60759.55997698837f, + 60780.49440472912f, + 60801.43063521932f, + 60822.368668148556f, + 60843.308503206565f, + 60864.250140083204f, + 60885.19357846847f, + 60906.138818052495f, + 60927.08585852554f, + 60948.03469957801f, + 60968.98534090042f, + 60989.93778218344f, + 61010.89202311786f, + 61031.84806339462f, + 61052.805902704764f, + 61073.76554073949f, + 61094.726977190134f, + 61115.69021174814f, + 61136.6552441051f, + 61157.62207395274f, + 61178.590700982924f, + 61199.561124887616f, + 61220.53334535895f, + 61241.50736208917f, + 61262.48317477066f, + 61283.46078309594f, + 61304.440186757645f, + 61325.42138544856f, + 61346.40437886158f, + 61367.389166689754f, + 61388.37574862626f, + 61409.36412436439f, + 61430.35429359757f, + 61451.34625601937f, + 61472.3400113235f, + 61493.33555920376f, + 61514.33289935412f, + 61535.33203146867f, + 61556.33295524162f, + 61577.33567036731f, + 61598.34017654024f, + 61619.34647345499f, + 61640.35456080633f, + 61661.3644382891f, + 61682.37610559831f, + 61703.38956242909f, + 61724.40480847669f, + 61745.42184343651f, + 61766.44066700406f, + 61787.46127887499f, + 61808.48367874506f, + 61829.5078663102f, + 61850.533841266435f, + 61871.56160330993f, + 61892.59115213697f, + 61913.62248744399f, + 61934.655608927525f, + 61955.69051628427f, + 61976.72720921102f, + 61997.765687404724f, + 62018.80595056245f, + 62039.847998381374f, + 62060.891830558845f, + 62081.93744679229f, + 62102.9848467793f, + 62124.034030217575f, + 62145.084996804966f, + 62166.137746239416f, + 62187.19227821903f, + 62208.248592442025f, + 62229.30668860674f, + 62250.366566411656f, + 62271.42822555538f, + 62292.49166573663f, + 62313.55688665427f, + 62334.62388800727f, + 62355.69266949476f, + 62376.763230815974f, + 62397.83557167027f, + 62418.909691757144f, + 62439.98559077621f, + 62461.06326842723f, + 62482.14272441005f, + 62503.223958424685f, + 62524.30697017127f, + 62545.39175935003f, + 62566.47832566137f, + 62587.56666880577f, + 62608.65678848388f, + 62629.74868439645f, + 62650.842356244364f, + 62671.93780372862f, + 62693.035026550366f, + 62714.13402441086f, + 62735.23479701148f, + 62756.33734405374f, + 62777.441665239276f, + 62798.54776026985f, + 62819.65562884736f, + 62840.7652706738f, + 62861.87668545132f, + 62882.989872882186f, + 62904.104832668774f, + 62925.2215645136f, + 62946.34006811931f, + 62967.46034318866f, + 62988.582389424526f, + 63009.70620652994f, + 63030.83179420802f, + 63051.95915216204f, + 63073.08828009537f, + 63094.21917771154f, + 63115.351844714154f, + 63136.48628080699f, + 63157.62248569392f, + 63178.760459078956f, + 63199.90020066622f, + 63221.04171015997f, + 63242.18498726457f, + 63263.330031684534f, + 63284.476843124474f, + 63305.62542128914f, + 63326.77576588341f, + 63347.92787661226f, + 63369.08175318081f, + 63390.237395294316f, + 63411.39480265812f, + 63432.553974977716f, + 63453.71491195871f, + 63474.87761330684f, + 63496.04207872794f, + 63517.208307928f, + 63538.37630061312f, + 63559.546056489504f, + 63580.717575263516f, + 63601.89085664161f, + 63623.06590033037f, + 63644.242706036515f, + 63665.42127346687f, + 63686.60160232838f, + 63707.783692328136f, + 63728.967543173334f, + 63750.15315457128f, + 63771.34052622942f, + 63792.52965785532f, + 63813.72054915665f, + 63834.91319984123f, + 63856.10760961698f, + 63877.30377819194f, + 63898.501705274284f, + 63919.7013905723f, + 63940.902833794404f, + 63962.106034649114f, + 63983.310992845094f, + 64004.51770809111f, + 64025.72618009605f, + 64046.93640856894f, + 64068.1483932189f, + 64089.362133755196f, + 64110.57762988719f, + 64131.79488132439f, + 64153.013887776404f, + 64174.23464895297f, + 64195.45716456394f, + 64216.68143431929f, + 64237.90745792911f, + 64259.135235103626f, + 64280.36476555316f, + 64301.59604898817f, + 64322.829085119236f, + 64344.06387365704f, + 64365.3004143124f, + 64386.53870679625f, + 64407.778750819634f, + 64429.02054609372f, + 64450.26409232981f, + 64471.50938923929f, + 64492.75643653371f, + 64514.005233924705f, + 64535.25578112403f, + 64556.50807784358f, + 64577.76212379536f, + 64599.017918691476f, + 64620.27546224417f, + 64641.534754165805f, + 64662.795794168844f, + 64684.058581965895f, + 64705.32311726966f, + 64726.589399792974f, + 64747.857429248776f, + 64769.12720535014f, + 64790.398727810236f, + 64811.671996342375f, + 64832.94701065997f, + 64854.22377047656f, + 64875.502275505794f, + 64896.78252546145f, + 64918.064520057414f, + 64939.34825900768f, + 64960.63374202639f, + 64981.92096882776f, + 65003.209939126165f, + 65024.50065263607f, + 65045.79310907207f, + 65067.08730814886f, + 65088.38324958128f, + 65109.68093308426f, + 65130.980358372864f, + 65152.28152516226f, + 65173.584433167736f, + 65194.8890821047f, + 65216.19547168868f, + 65237.50360163532f, + 65258.81347166035f, + 65280.125081479666f, + 65301.43843080924f, + 65322.75351936518f, + 65344.07034686371f, + 65365.38891302115f, + 65386.70921755396f, + 65408.0312601787f, + 65429.355040612056f, + 65450.68055857082f, + 65472.00781377191f, + 65493.336805932355f, + 65514.66753476928f, + 65535.999999999956f, + 65557.33420134176f, + 65578.67013851217f, + 65600.00781122879f, + 65621.34721920933f, + 65642.68836217163f, + 65664.03123983364f, + 65685.37585191341f, + 65706.72219812914f, + 65728.07027819908f, + 65749.42009184166f, + 65770.7716387754f, + 65792.12491871894f, + 65813.479931391f, + 65834.83667651046f, + 65856.1951537963f, + 65877.5553629676f, + 65898.91730374355f, + 65920.28097584349f, + 65941.64637898684f, + 65963.01351289316f, + 65984.38237728208f, + 66005.75297187339f, + 66027.12529638696f, + 66048.4993505428f, + 66069.87513406102f, + 66091.25264666184f, + 66112.63188806562f, + 66134.01285799277f, + 66155.39555616389f, + 66176.77998229963f, + 66198.1661361208f, + 66219.55401734827f, + 66240.9436257031f, + 66262.33496090639f, + 66283.7280226794f, + 66305.12281074344f, + 66326.51932482002f, + 66347.9175646307f, + 66369.31752989716f, + 66390.71922034123f, + 66412.12263568479f, + 66433.52777564988f, + 66454.93463995864f, + 66476.34322833332f, + 66497.75354049628f, + 66519.16557617f, + 66540.57933507704f, + 66561.99481694012f, + 66583.41202148204f, + 66604.83094842573f, + 66626.25159749422f, + 66647.67396841063f, + 66669.09806089824f, + 66690.52387468038f, + 66711.95140948056f, + 66733.38066502237f, + 66754.81164102948f, + 66776.24433722571f, + 66797.67875333499f, + 66819.11488908132f, + 66840.55274418888f, + 66861.9923183819f, + 66883.43361138474f, + 66904.87662292189f, + 66926.3213527179f, + 66947.7678004975f, + 66969.21596598547f, + 66990.66584890673f, + 67012.1174489863f, + 67033.57076594933f, + 67055.02579952106f, + 67076.48254942682f, + 67097.94101539208f, + 67119.40119714243f, + 67140.86309440355f, + 67162.32670690122f, + 67183.79203436135f, + 67205.25907650996f, + 67226.72783307315f, + 67248.19830377717f, + 67269.67048834835f, + 67291.14438651314f, + 67312.61999799809f, + 67334.09732252988f, + 67355.5763598353f, + 67377.05710964119f, + 67398.53957167457f, + 67420.02374566255f, + 67441.50963133233f, + 67462.99722841123f, + 67484.48653662669f, + 67505.97755570622f, + 67527.4702853775f, + 67548.96472536826f, + 67570.46087540637f, + 67591.9587352198f, + 67613.45830453663f, + 67634.95958308503f, + 67656.46257059333f, + 67677.9672667899f, + 67699.47367140325f, + 67720.98178416202f, + 67742.49160479492f, + 67764.0031330308f, + 67785.51636859858f, + 67807.03131122731f, + 67828.54796064617f, + 67850.0663165844f, + 67871.58637877138f, + 67893.10814693659f, + 67914.63162080961f, + 67936.15680012014f, + 67957.68368459797f, + 67979.21227397301f, + 68000.74256797526f, + 68022.27456633488f, + 68043.80826878206f, + 68065.34367504714f, + 68086.88078486058f, + 68108.41959795292f, + 68129.96011405479f, + 68151.50233289697f, + 68173.04625421032f, + 68194.59187772583f, + 68216.13920317456f, + 68237.6882302877f, + 68259.23895879654f, + 68280.79138843248f, + 68302.34551892703f, + 68323.90135001179f, + 68345.45888141848f, + 68367.01811287891f, + 68388.57904412503f, + 68410.14167488884f, + 68431.7060049025f, + 68453.27203389826f, + 68474.83976160845f, + 68496.40918776554f, + 68517.98031210208f, + 68539.55313435073f, + 68561.12765424428f, + 68582.70387151558f, + 68604.28178589763f, + 68625.8613971235f, + 68647.44270492639f, + 68669.0257090396f, + 68690.61040919652f, + 68712.19680513066f, + 68733.78489657563f, + 68755.37468326512f, + 68776.966164933f, + 68798.55934131313f, + 68820.15421213959f, + 68841.75077714647f, + 68863.34903606804f, + 68884.94898863863f, + 68906.55063459268f, + 68928.15397366474f, + 68949.75900558944f, + 68971.36573010158f, + 68992.97414693599f, + 69014.58425582763f, + 69036.19605651159f, + 69057.80954872302f, + 69079.4247321972f, + 69101.04160666953f, + 69122.66017187547f, + 69144.2804275506f, + 69165.90237343062f, + 69187.52600925133f, + 69209.15133474862f, + 69230.77834965847f, + 69252.40705371699f, + 69274.0374466604f, + 69295.669528225f, + 69317.30329814719f, + 69338.9387561635f, + 69360.57590201053f, + 69382.214735425f, + 69403.85525614375f, + 69425.49746390368f, + 69447.14135844183f, + 69468.78693949533f, + 69490.4342068014f, + 69512.08316009739f, + 69533.73379912072f, + 69555.38612360893f, + 69577.04013329967f, + 69598.69582793067f, + 69620.3532072398f, + 69642.01227096497f, + 69663.67301884426f, + 69685.33545061579f, + 69706.99956601784f, + 69728.66536478874f, + 69750.33284666698f, + 69772.00201139107f, + 69793.67285869969f, + 69815.34538833161f, + 69837.01960002567f, + 69858.69549352085f, + 69880.3730685562f, + 69902.0523248709f, + 69923.73326220422f, + 69945.41588029549f, + 69967.10017888421f, + 69988.78615770994f, + 70010.47381651236f, + 70032.16315503122f, + 70053.8541730064f, + 70075.54687017787f, + 70097.24124628572f, + 70118.93730107011f, + 70140.6350342713f, + 70162.33444562969f, + 70184.03553488574f, + 70205.73830178002f, + 70227.44274605322f, + 70249.1488674461f, + 70270.85666569954f, + 70292.56614055451f, + 70314.2772917521f, + 70335.9901190335f, + 70357.70462213994f, + 70379.42080081282f, + 70401.13865479361f, + 70422.85818382389f, + 70444.57938764534f, + 70466.30226599972f, + 70488.02681862892f, + 70509.75304527488f, + 70531.48094567971f, + 70553.21051958555f, + 70574.9417667347f, + 70596.6746868695f, + 70618.40927973246f, + 70640.1455450661f, + 70661.8834826131f, + 70683.62309211626f, + 70705.36437331841f, + 70727.10732596253f, + 70748.85194979167f, + 70770.59824454901f, + 70792.34620997778f, + 70814.09584582137f, + 70835.84715182323f, + 70857.6001277269f, + 70879.35477327603f, + 70901.11108821441f, + 70922.86907228586f, + 70944.62872523433f, + 70966.39004680388f, + 70988.15303673863f, + 71009.91769478285f, + 71031.68402068088f, + 71053.45201417715f, + 71075.22167501619f, + 71096.99300294266f, + 71118.76599770127f, + 71140.54065903684f, + 71162.31698669434f, + 71184.09498041874f, + 71205.87463995522f, + 71227.65596504895f, + 71249.4389554453f, + 71271.22361088963f, + 71293.00993112748f, + 71314.79791590448f, + 71336.5875649663f, + 71358.37887805876f, + 71380.17185492777f, + 71401.96649531931f, + 71423.76279897949f, + 71445.56076565449f, + 71467.3603950906f, + 71489.16168703421f, + 71510.96464123181f, + 71532.76925742996f, + 71554.57553537536f, + 71576.38347481475f, + 71598.19307549503f, + 71620.00433716313f, + 71641.81725956615f, + 71663.63184245121f, + 71685.4480855656f, + 71707.26598865664f, + 71729.0855514718f, + 71750.90677375859f, + 71772.72965526467f, + 71794.55419573777f, + 71816.38039492571f, + 71838.20825257644f, + 71860.03776843796f, + 71881.86894225838f, + 71903.70177378594f, + 71925.53626276893f, + 71947.37240895575f, + 71969.2102120949f, + 71991.04967193498f, + 72012.89078822469f, + 72034.73356071279f, + 72056.57798914817f, + 72078.42407327982f, + 72100.2718128568f, + 72122.12120762825f, + 72143.97225734347f, + 72165.8249617518f, + 72187.67932060269f, + 72209.53533364569f, + 72231.39300063043f, + 72253.25232130665f, + 72275.11329542418f, + 72296.97592273295f, + 72318.84020298296f, + 72340.70613592434f, + 72362.57372130727f, + 72384.4429588821f, + 72406.31384839918f, + 72428.18638960904f, + 72450.06058226222f, + 72471.93642610943f, + 72493.81392090143f, + 72515.6930663891f, + 72537.57386232339f, + 72559.45630845535f, + 72581.34040453614f, + 72603.22615031699f, + 72625.11354554925f, + 72647.00258998433f, + 72668.89328337376f, + 72690.78562546917f, + 72712.67961602227f, + 72734.57525478485f, + 72756.47254150882f, + 72778.37147594614f, + 72800.27205784894f, + 72822.17428696936f, + 72844.07816305969f, + 72865.98368587228f, + 72887.8908551596f, + 72909.79967067418f, + 72931.7101321687f, + 72953.62223939585f, + 72975.53599210849f, + 72997.45139005952f, + 73019.36843300196f, + 73041.28712068892f, + 73063.20745287361f, + 73085.1294293093f, + 73107.05304974939f, + 73128.97831394733f, + 73150.90522165672f, + 73172.83377263122f, + 73194.76396662457f, + 73216.69580339061f, + 73238.62928268328f, + 73260.56440425663f, + 73282.50116786477f, + 73304.4395732619f, + 73326.37962020234f, + 73348.32130844049f, + 73370.26463773084f, + 73392.20960782796f, + 73414.15621848653f, + 73436.10446946132f, + 73458.05436050717f, + 73480.00589137906f, + 73501.95906183199f, + 73523.91387162112f, + 73545.87032050166f, + 73567.82840822893f, + 73589.78813455833f, + 73611.74949924536f, + 73633.71250204562f, + 73655.67714271475f, + 73677.64342100856f, + 73699.61133668288f, + 73721.58088949369f, + 73743.55207919702f, + 73765.524905549f, + 73787.49936830586f, + 73809.4754672239f, + 73831.45320205955f, + 73853.43257256929f, + 73875.41357850972f, + 73897.3962196375f, + 73919.38049570941f, + 73941.36640648231f, + 73963.35395171314f, + 73985.34313115895f, + 74007.33394457687f, + 74029.32639172411f, + 74051.32047235797f, + 74073.31618623588f, + 74095.3135331153f, + 74117.31251275384f, + 74139.31312490914f, + 74161.31536933898f, + 74183.31924580119f, + 74205.32475405373f, + 74227.33189385463f, + 74249.34066496199f, + 74271.35106713403f, + 74293.36310012905f, + 74315.37676370544f, + 74337.39205762166f, + 74359.4089816363f, + 74381.427535508f, + 74403.4477189955f, + 74425.46953185767f, + 74447.4929738534f, + 74469.5180447417f, + 74491.54474428168f, + 74513.57307223254f, + 74535.60302835355f, + 74557.63461240409f, + 74579.6678241436f, + 74601.70266333164f, + 74623.73912972784f, + 74645.77722309194f, + 74667.81694318372f, + 74689.85828976311f, + 74711.9012625901f, + 74733.94586142474f, + 74755.99208602723f, + 74778.0399361578f, + 74800.08941157682f, + 74822.1405120447f, + 74844.19323732196f, + 74866.24758716923f, + 74888.30356134719f, + 74910.36115961662f, + 74932.42038173841f, + 74954.4812274735f, + 74976.54369658297f, + 74998.60778882793f, + 75020.6735039696f, + 75042.74084176932f, + 75064.80980198846f, + 75086.88038438853f, + 75108.9525887311f, + 75131.02641477782f, + 75153.10186229047f, + 75175.17893103085f, + 75197.25762076092f, + 75219.33793124268f, + 75241.41986223822f, + 75263.50341350974f, + 75285.5885848195f, + 75307.67537592987f, + 75329.76378660332f, + 75351.85381660235f, + 75373.94546568961f, + 75396.0387336278f, + 75418.13362017972f, + 75440.23012510825f, + 75462.32824817636f, + 75484.42798914711f, + 75506.52934778365f, + 75528.63232384919f, + 75550.73691710707f, + 75572.8431273207f, + 75594.95095425354f, + 75617.0603976692f, + 75639.17145733131f, + 75661.28413300365f, + 75683.39842445003f, + 75705.5143314344f, + 75727.63185372074f, + 75749.75099107318f, + 75771.87174325586f, + 75793.99411003308f, + 75816.11809116918f, + 75838.24368642858f, + 75860.37089557585f, + 75882.49971837556f, + 75904.63015459242f, + 75926.76220399122f, + 75948.89586633682f, + 75971.03114139418f, + 75993.16802892832f, + 76015.3065287044f, + 76037.4466404876f, + 76059.58836404321f, + 76081.73169913665f, + 76103.87664553335f, + 76126.02320299888f, + 76148.17137129887f, + 76170.32115019904f, + 76192.4725394652f, + 76214.62553886326f, + 76236.78014815917f, + 76258.93636711901f, + 76281.09419550892f, + 76303.25363309514f, + 76325.41467964397f, + 76347.57733492184f, + 76369.74159869523f, + 76391.90747073069f, + 76414.07495079488f, + 76436.24403865456f, + 76458.41473407655f, + 76480.58703682775f, + 76502.76094667517f, + 76524.93646338588f, + 76547.11358672705f, + 76569.29231646592f, + 76591.47265236982f, + 76613.65459420616f, + 76635.83814174247f, + 76658.02329474631f, + 76680.21005298535f, + 76702.39841622734f, + 76724.58838424014f, + 76746.77995679164f, + 76768.97313364987f, + 76791.1679145829f, + 76813.3642993589f, + 76835.56228774616f, + 76857.76187951297f, + 76879.9630744278f, + 76902.16587225911f, + 76924.37027277553f, + 76946.57627574573f, + 76968.78388093844f, + 76990.99308812252f, + 77013.2038970669f, + 77035.41630754055f, + 77057.63031931262f, + 77079.84593215224f, + 77102.0631458287f, + 77124.28196011129f, + 77146.50237476948f, + 77168.72438957276f, + 77190.94800429072f, + 77213.17321869303f, + 77235.40003254944f, + 77257.6284456298f, + 77279.85845770403f, + 77302.09006854212f, + 77324.32327791417f, + 77346.55808559034f, + 77368.79449134089f, + 77391.03249493614f, + 77413.27209614652f, + 77435.51329474253f, + 77457.75609049473f, + 77480.0004831738f, + 77502.2464725505f, + 77524.49405839563f, + 77546.74324048011f, + 77568.99401857494f, + 77591.2463924512f, + 77613.50036188003f, + 77635.75592663266f, + 77658.01308648044f, + 77680.27184119476f, + 77702.53219054709f, + 77724.79413430902f, + 77747.0576722522f, + 77769.32280414834f, + 77791.58952976925f, + 77813.85784888684f, + 77836.12776127306f, + 77858.3992667f, + 77880.67236493979f, + 77902.94705576463f, + 77925.22333894683f, + 77947.50121425878f, + 77969.78068147293f, + 77992.06174036184f, + 78014.34439069813f, + 78036.62863225449f, + 78058.91446480375f, + 78081.20188811873f, + 78103.49090197241f, + 78125.78150613782f, + 78148.07370038806f, + 78170.36748449634f, + 78192.66285823593f, + 78214.95982138017f, + 78237.2583737025f, + 78259.55851497645f, + 78281.86024497561f, + 78304.16356347366f, + 78326.46847024436f, + 78348.77496506154f, + 78371.08304769913f, + 78393.3927179311f, + 78415.70397553158f, + 78438.0168202747f, + 78460.3312519347f, + 78482.6472702859f, + 78504.96487510273f, + 78527.28406615963f, + 78549.6048432312f, + 78571.92720609205f, + 78594.25115451691f, + 78616.5766882806f, + 78638.90380715799f, + 78661.23251092403f, + 78683.56279935378f, + 78705.89467222235f, + 78728.22812930495f, + 78750.56317037686f, + 78772.89979521342f, + 78795.2380035901f, + 78817.5777952824f, + 78839.91917006593f, + 78862.26212771636f, + 78884.60666800945f, + 78906.95279072104f, + 78929.30049562705f, + 78951.64978250346f, + 78974.00065112638f, + 78996.35310127193f, + 79018.70713271636f, + 79041.06274523598f, + 79063.41993860717f, + 79085.77871260644f, + 79108.13906701028f, + 79130.50100159539f, + 79152.86451613842f, + 79175.22961041618f, + 79197.59628420553f, + 79219.96453728342f, + 79242.33436942687f, + 79264.70578041299f, + 79287.07877001894f, + 79309.45333802201f, + 79331.82948419951f, + 79354.20720832888f, + 79376.58651018758f, + 79398.96738955322f, + 79421.34984620343f, + 79443.73387991595f, + 79466.11949046858f, + 79488.50667763922f, + 79510.89544120582f, + 79533.28578094643f, + 79555.67769663916f, + 79578.07118806223f, + 79600.4662549939f, + 79622.86289721253f, + 79645.26111449653f, + 79667.66090662447f, + 79690.06227337488f, + 79712.46521452646f, + 79734.86972985794f, + 79757.27581914813f, + 79779.68348217595f, + 79802.09271872038f, + 79824.50352856045f, + 79846.91591147533f, + 79869.3298672442f, + 79891.74539564634f, + 79914.16249646115f, + 79936.58116946805f, + 79959.00141444655f, + 79981.42323117626f, + 80003.84661943685f, + 80026.27157900808f, + 80048.69810966977f, + 80071.12621120183f, + 80093.55588338424f, + 80115.98712599705f, + 80138.41993882041f, + 80160.85432163453f, + 80183.29027421969f, + 80205.72779635628f, + 80228.16688782471f, + 80250.60754840553f, + 80273.04977787934f, + 80295.49357602678f, + 80317.93894262865f, + 80340.38587746573f, + 80362.83438031895f, + 80385.28445096928f, + 80407.73608919779f, + 80430.1892947856f, + 80452.64406751392f, + 80475.10040716403f, + 80497.55831351732f, + 80520.01778635521f, + 80542.47882545921f, + 80564.94143061092f, + 80587.405601592f, + 80609.8713381842f, + 80632.33864016933f, + 80654.8075073293f, + 80677.27793944607f, + 80699.74993630168f, + 80722.22349767828f, + 80744.69862335804f, + 80767.17531312324f, + 80789.65356675624f, + 80812.13338403947f, + 80834.6147647554f, + 80857.09770868665f, + 80879.58221561585f, + 80902.06828532573f, + 80924.5559175991f, + 80947.04511221882f, + 80969.53586896788f, + 80992.02818762927f, + 81014.52206798614f, + 81037.01750982161f, + 81059.514512919f, + 81082.01307706161f, + 81104.51320203283f, + 81127.01488761618f, + 81149.5181335952f, + 81172.0229397535f, + 81194.5293058748f, + 81217.0372317429f, + 81239.54671714164f, + 81262.05776185496f, + 81284.57036566685f, + 81307.0845283614f, + 81329.60024972277f, + 81352.11752953519f, + 81374.63636758295f, + 81397.15676365045f, + 81419.67871752213f, + 81442.20222898253f, + 81464.72729781622f, + 81487.25392380793f, + 81509.78210674238f, + 81532.3118464044f, + 81554.8431425789f, + 81577.37599505084f, + 81599.91040360527f, + 81622.44636802733f, + 81644.98388810222f, + 81667.52296361518f, + 81690.06359435158f, + 81712.60578009684f, + 81735.14952063645f, + 81757.69481575597f, + 81780.24166524105f, + 81802.79006887741f, + 81825.34002645082f, + 81847.89153774717f, + 81870.44460255238f, + 81892.99922065248f, + 81915.5553918335f, + 81938.11311588167f, + 81960.67239258319f, + 81983.23322172434f, + 82005.79560309154f, + 82028.35953647122f, + 82050.9250216499f, + 82073.49205841421f, + 82096.06064655079f, + 82118.63078584638f, + 82141.20247608784f, + 82163.77571706203f, + 82186.35050855593f, + 82208.92685035657f, + 82231.50474225105f, + 82254.08418402658f, + 82276.66517547039f, + 82299.24771636983f, + 82321.83180651232f, + 82344.4174456853f, + 82367.00463367635f, + 82389.59337027307f, + 82412.18365526316f, + 82434.77548843439f, + 82457.3688695746f, + 82479.9637984717f, + 82502.56027491367f, + 82525.1582986886f, + 82547.7578695846f, + 82570.35898738986f, + 82592.96165189268f, + 82615.5658628814f, + 82638.17162014442f, + 82660.77892347026f, + 82683.38777264747f, + 82705.99816746471f, + 82728.61010771066f, + 82751.22359317412f, + 82773.83862364394f, + 82796.45519890904f, + 82819.07331875843f, + 82841.69298298119f, + 82864.31419136643f, + 82886.93694370337f, + 82909.56123978132f, + 82932.18707938964f, + 82954.81446231774f, + 82977.44338835512f, + 83000.07385729137f, + 83022.70586891612f, + 83045.33942301909f, + 83067.97451939009f, + 83090.61115781896f, + 83113.24933809563f, + 83135.8890600101f, + 83158.53032335246f, + 83181.17312791286f, + 83203.8174734815f, + 83226.46335984867f, + 83249.11078680474f, + 83271.75975414013f, + 83294.41026164537f, + 83317.062309111f, + 83339.7158963277f, + 83362.37102308616f, + 83385.02768917716f, + 83407.68589439159f, + 83430.34563852036f, + 83453.00692135448f, + 83475.669742685f, + 83498.33410230308f, + 83520.99999999994f, + 83543.66743556687f, + 83566.33640879519f, + 83589.00691947635f, + 83611.67896740185f, + 83634.35255236324f, + 83657.02767415217f, + 83679.70433256036f, + 83702.38252737955f, + 83725.06225840164f, + 83747.74352541851f, + 83770.42632822218f, + 83793.11066660468f, + 83815.79654035816f, + 83838.48394927483f, + 83861.17289314694f, + 83883.86337176684f, + 83906.55538492696f, + 83929.24893241975f, + 83951.9440140378f, + 83974.6406295737f, + 83997.33877882015f, + 84020.03846156993f, + 84042.73967761586f, + 84065.44242675084f, + 84088.14670876783f, + 84110.85252345992f, + 84133.55987062017f, + 84156.2687500418f, + 84178.97916151803f, + 84201.6911048422f, + 84224.40457980771f, + 84247.119586208f, + 84269.83612383662f, + 84292.55419248715f, + 84315.27379195328f, + 84337.99492202874f, + 84360.71758250732f, + 84383.44177318295f, + 84406.16749384951f, + 84428.89474430107f, + 84451.62352433169f, + 84474.35383373554f, + 84497.08567230683f, + 84519.81903983987f, + 84542.553936129f, + 84565.29036096868f, + 84588.0283141534f, + 84610.76779547772f, + 84633.50880473628f, + 84656.25134172381f, + 84678.99540623507f, + 84701.74099806492f, + 84724.48811700825f, + 84747.23676286006f, + 84769.9869354154f, + 84792.73863446941f, + 84815.49185981725f, + 84838.2466112542f, + 84861.00288857557f, + 84883.76069157677f, + 84906.52002005326f, + 84929.28087380057f, + 84952.0432526143f, + 84974.80715629015f, + 84997.5725846238f, + 85020.33953741111f, + 85043.10801444795f, + 85065.87801553024f, + 85088.64954045399f, + 85111.4225890153f, + 85134.19716101032f, + 85156.97325623524f, + 85179.75087448637f, + 85202.53001556007f, + 85225.31067925273f, + 85248.09286536086f, + 85270.87657368102f, + 85293.66180400981f, + 85316.44855614395f, + 85339.23682988019f, + 85362.02662501535f, + 85384.81794134635f, + 85407.61077867013f, + 85430.40513678372f, + 85453.20101548426f, + 85475.99841456886f, + 85498.7973338348f, + 85521.59777307935f, + 85544.3997320999f, + 85567.2032106939f, + 85590.00820865881f, + 85612.81472579224f, + 85635.62276189183f, + 85658.43231675526f, + 85681.24339018033f, + 85704.05598196488f, + 85726.8700919068f, + 85749.68571980408f, + 85772.50286545476f, + 85795.32152865696f, + 85818.14170920885f, + 85840.96340690868f, + 85863.78662155475f, + 85886.61135294545f, + 85909.43760087922f, + 85932.26536515457f, + 85955.09464557009f, + 85977.92544192442f, + 86000.75775401627f, + 86023.59158164443f, + 86046.42692460775f, + 86069.26378270512f, + 86092.10215573556f, + 86114.94204349807f, + 86137.7834457918f, + 86160.62636241592f, + 86183.47079316968f, + 86206.31673785238f, + 86229.1641962634f, + 86252.0131682022f, + 86274.8636534683f, + 86297.71565186126f, + 86320.56916318073f, + 86343.42418722642f, + 86366.28072379812f, + 86389.13877269567f, + 86411.99833371898f, + 86434.85940666801f, + 86457.72199134283f, + 86480.58608754353f, + 86503.45169507028f, + 86526.31881372335f, + 86549.18744330303f, + 86572.05758360968f, + 86594.92923444376f, + 86617.80239560577f, + 86640.67706689627f, + 86663.5532481159f, + 86686.43093906538f, + 86709.31013954544f, + 86732.19084935696f, + 86755.07306830082f, + 86777.95679617795f, + 86800.84203278944f, + 86823.72877793635f, + 86846.61703141985f, + 86869.50679304118f, + 86892.39806260161f, + 86915.29083990252f, + 86938.1851247453f, + 86961.08091693149f, + 86983.97821626259f, + 87006.87702254027f, + 87029.77733556618f, + 87052.67915514208f, + 87075.5824810698f, + 87098.48731315118f, + 87121.39365118822f, + 87144.3014949829f, + 87167.21084433729f, + 87190.12169905353f, + 87213.03405893384f, + 87235.9479237805f, + 87258.86329339583f, + 87281.78016758224f, + 87304.69854614217f, + 87327.61842887818f, + 87350.53981559286f, + 87373.46270608885f, + 87396.3871001689f, + 87419.31299763577f, + 87442.24039829234f, + 87465.16930194154f, + 87488.09970838632f, + 87511.03161742973f, + 87533.9650288749f, + 87556.89994252501f, + 87579.83635818327f, + 87602.77427565302f, + 87625.71369473761f, + 87648.65461524049f, + 87671.59703696515f, + 87694.54095971514f, + 87717.4863832941f, + 87740.43330750574f, + 87763.38173215378f, + 87786.33165704206f, + 87809.28308197446f, + 87832.23600675492f, + 87855.19043118745f, + 87878.14635507615f, + 87901.10377822515f, + 87924.06270043863f, + 87947.02312152089f, + 87969.98504127625f, + 87992.94845950909f, + 88015.9133760239f, + 88038.87979062517f, + 88061.84770311751f, + 88084.81711330556f, + 88107.78802099405f, + 88130.76042598773f, + 88153.73432809146f, + 88176.70972711014f, + 88199.68662284875f, + 88222.6650151123f, + 88245.6449037059f, + 88268.62628843471f, + 88291.60916910395f, + 88314.5935455189f, + 88337.57941748491f, + 88360.56678480741f, + 88383.55564729185f, + 88406.5460047438f, + 88429.53785696882f, + 88452.53120377261f, + 88475.52604496089f, + 88498.52238033945f, + 88521.52020971413f, + 88544.51953289087f, + 88567.52034967564f, + 88590.5226598745f, + 88613.52646329353f, + 88636.53175973892f, + 88659.5385490169f, + 88682.54683093374f, + 88705.55660529585f, + 88728.56787190959f, + 88751.58063058149f, + 88774.59488111807f, + 88797.61062332596f, + 88820.62785701183f, + 88843.6465819824f, + 88866.66679804446f, + 88889.68850500489f, + 88912.71170267061f, + 88935.73639084859f, + 88958.7625693459f, + 88981.79023796963f, + 89004.81939652696f, + 89027.85004482511f, + 89050.88218267141f, + 89073.9158098732f, + 89096.95092623789f, + 89119.98753157297f, + 89143.025625686f, + 89166.06520838456f, + 89189.10627947636f, + 89212.14883876909f, + 89235.19288607058f, + 89258.23842118867f, + 89281.28544393127f, + 89304.33395410638f, + 89327.38395152202f, + 89350.4354359863f, + 89373.4884073074f, + 89396.54286529354f, + 89419.598809753f, + 89442.65624049417f, + 89465.71515732541f, + 89488.77556005522f, + 89511.83744849212f, + 89534.90082244476f, + 89557.96568172173f, + 89581.03202613181f, + 89604.09985548374f, + 89627.1691695864f, + 89650.23996824867f, + 89673.31225127954f, + 89696.38601848802f, + 89719.4612696832f, + 89742.53800467425f, + 89765.61622327036f, + 89788.69592528083f, + 89811.77711051499f, + 89834.85977878221f, + 89857.94392989198f, + 89881.0295636538f, + 89904.11667987728f, + 89927.20527837201f, + 89950.29535894774f, + 89973.38692141422f, + 89996.47996558127f, + 90019.57449125877f, + 90042.67049825669f, + 90065.76798638502f, + 90088.86695545384f, + 90111.96740527326f, + 90135.06933565348f, + 90158.17274640476f, + 90181.2776373374f, + 90204.3840082618f, + 90227.49185898836f, + 90250.60118932759f, + 90273.71199909004f, + 90296.82428808633f, + 90319.93805612714f, + 90343.05330302319f, + 90366.1700285853f, + 90389.2882326243f, + 90412.40791495114f, + 90435.52907537678f, + 90458.65171371226f, + 90481.77582976868f, + 90504.90142335721f, + 90528.02849428906f, + 90551.1570423755f, + 90574.28706742791f, + 90597.41856925764f, + 90620.5515476762f, + 90643.68600249507f, + 90666.82193352585f, + 90689.95934058019f, + 90713.09822346977f, + 90736.23858200636f, + 90759.3804160018f, + 90782.52372526795f, + 90805.66850961676f, + 90828.81476886023f, + 90851.96250281043f, + 90875.11171127946f, + 90898.26239407953f, + 90921.41455102284f, + 90944.56818192174f, + 90967.72328658856f, + 90990.87986483572f, + 91014.03791647572f, + 91037.19744132107f, + 91060.35843918439f, + 91083.52090987834f, + 91106.68485321563f, + 91129.85026900904f, + 91153.0171570714f, + 91176.18551721562f, + 91199.35534925465f, + 91222.52665300149f, + 91245.69942826925f, + 91268.87367487104f, + 91292.04939262004f, + 91315.22658132955f, + 91338.40524081283f, + 91361.58537088329f, + 91384.76697135434f, + 91407.95004203948f, + 91431.13458275225f, + 91454.32059330626f, + 91477.50807351517f, + 91500.69702319271f, + 91523.88744215269f, + 91547.07933020893f, + 91570.27268717533f, + 91593.46751286586f, + 91616.66380709453f, + 91639.86156967544f, + 91663.06080042271f, + 91686.26149915057f, + 91709.46366567322f, + 91732.66729980502f, + 91755.87240136032f, + 91779.07897015357f, + 91802.28700599924f, + 91825.49650871192f, + 91848.70747810617f, + 91871.91991399668f, + 91895.13381619815f, + 91918.34918452542f, + 91941.56601879328f, + 91964.78431881666f, + 91988.0040844105f, + 92011.22531538982f, + 92034.44801156971f, + 92057.67217276528f, + 92080.89779879176f, + 92104.12488946435f, + 92127.35344459841f, + 92150.58346400928f, + 92173.81494751238f, + 92197.04789492322f, + 92220.28230605731f, + 92243.51818073026f, + 92266.75551875774f, + 92289.99431995547f, + 92313.2345841392f, + 92336.47631112477f, + 92359.71950072808f, + 92382.96415276507f, + 92406.21026705173f, + 92429.45784340418f, + 92452.70688163847f, + 92475.95738157081f, + 92499.20934301744f, + 92522.46276579465f, + 92545.7176497188f, + 92568.9739946063f, + 92592.23180027361f, + 92615.49106653726f, + 92638.75179321383f, + 92662.01398011995f, + 92685.27762707233f, + 92708.54273388773f, + 92731.80930038294f, + 92755.07732637487f, + 92778.34681168041f, + 92801.61775611658f, + 92824.89015950038f, + 92848.16402164895f, + 92871.43934237942f, + 92894.71612150903f, + 92917.99435885502f, + 92941.27405423473f, + 92964.55520746557f, + 92987.83781836496f, + 93011.12188675042f, + 93034.40741243947f, + 93057.69439524977f, + 93080.98283499895f, + 93104.27273150477f, + 93127.564084585f, + 93150.8568940575f, + 93174.15115974014f, + 93197.44688145092f, + 93220.7440590078f, + 93244.04269222889f, + 93267.34278093232f, + 93290.64432493623f, + 93313.94732405891f, + 93337.25177811863f, + 93360.55768693375f, + 93383.8650503227f, + 93407.17386810391f, + 93430.48414009594f, + 93453.79586611736f, + 93477.10904598678f, + 93500.42367952294f, + 93523.73976654456f, + 93547.05730687045f, + 93570.37630031949f, + 93593.69674671057f, + 93617.0186458627f, + 93640.3419975949f, + 93663.66680172624f, + 93686.99305807588f, + 93710.32076646303f, + 93733.64992670694f, + 93756.98053862691f, + 93780.31260204234f, + 93803.64611677264f, + 93826.9810826373f, + 93850.31749945584f, + 93873.65536704786f, + 93896.99468523303f, + 93920.33545383104f, + 93943.67767266167f, + 93967.0213415447f, + 93990.36646030005f, + 94013.71302874765f, + 94037.06104670743f, + 94060.4105139995f, + 94083.7614304439f, + 94107.11379586085f, + 94130.46761007051f, + 94153.82287289316f, + 94177.17958414911f, + 94200.53774365876f, + 94223.89735124253f, + 94247.25840672091f, + 94270.62090991443f, + 94293.98486064372f, + 94317.35025872942f, + 94340.71710399224f, + 94364.08539625294f, + 94387.45513533235f, + 94410.82632105134f, + 94434.19895323085f, + 94457.57303169188f, + 94480.94855625545f, + 94504.32552674267f, + 94527.70394297468f, + 94551.08380477272f, + 94574.46511195804f, + 94597.84786435193f, + 94621.23206177581f, + 94644.61770405111f, + 94668.00479099927f, + 94691.39332244187f, + 94714.78329820049f, + 94738.1747180968f, + 94761.56758195249f, + 94784.9618895893f, + 94808.35764082908f, + 94831.7548354937f, + 94855.15347340508f, + 94878.55355438517f, + 94901.95507825605f, + 94925.35804483978f, + 94948.76245395854f, + 94972.16830543448f, + 94995.57559908989f, + 95018.98433474707f, + 95042.3945122284f, + 95065.80613135628f, + 95089.21919195318f, + 95112.63369384164f, + 95136.04963684424f, + 95159.46702078362f, + 95182.88584548247f, + 95206.30611076353f, + 95229.72781644962f, + 95253.15096236358f, + 95276.57554832831f, + 95300.00157416679f, + 95323.42903970205f, + 95346.85794475715f, + 95370.28828915521f, + 95393.72007271941f, + 95417.15329527302f, + 95440.5879566393f, + 95464.02405664159f, + 95487.46159510332f, + 95510.9005718479f, + 95534.34098669887f, + 95557.78283947978f, + 95581.22613001426f, + 95604.67085812596f, + 95628.1170236386f, + 95651.56462637598f, + 95675.01366616192f, + 95698.4641428203f, + 95721.91605617508f, + 95745.36940605023f, + 95768.8241922698f, + 95792.28041465791f, + 95815.7380730387f, + 95839.19716723639f, + 95862.65769707522f, + 95886.11966237954f, + 95909.58306297369f, + 95933.04789868211f, + 95956.51416932927f, + 95979.98187473971f, + 96003.451014738f, + 96026.92158914881f, + 96050.39359779679f, + 96073.86704050671f, + 96097.34191710339f, + 96120.81822741163f, + 96144.29597125638f, + 96167.77514846258f, + 96191.25575885524f, + 96214.73780225945f, + 96238.2212785003f, + 96261.70618740298f, + 96285.19252879272f, + 96308.68030249479f, + 96332.16950833453f, + 96355.66014613732f, + 96379.1522157286f, + 96402.64571693387f, + 96426.14064957868f, + 96449.6370134886f, + 96473.13480848931f, + 96496.63403440651f, + 96520.13469106596f, + 96543.63677829347f, + 96567.1402959149f, + 96590.64524375615f, + 96614.15162164322f, + 96637.65942940213f, + 96661.16866685895f, + 96684.6793338398f, + 96708.19143017087f, + 96731.7049556784f, + 96755.21991018867f, + 96778.73629352801f, + 96802.25410552284f, + 96825.77334599958f, + 96849.29401478474f, + 96872.81611170487f, + 96896.33963658658f, + 96919.86458925651f, + 96943.39096954139f, + 96966.91877726796f, + 96990.44801226305f, + 97013.97867435352f, + 97037.5107633663f, + 97061.04427912834f, + 97084.57922146667f, + 97108.11559020838f, + 97131.6533851806f, + 97155.19260621049f, + 97178.73325312529f, + 97202.2753257523f, + 97225.81882391885f, + 97249.36374745233f, + 97272.91009618019f, + 97296.4578699299f, + 97320.00706852904f, + 97343.5576918052f, + 97367.10973958601f, + 97390.6632116992f, + 97414.2181079725f, + 97437.77442823374f, + 97461.33217231077f, + 97484.89134003149f, + 97508.4519312239f, + 97532.01394571598f, + 97555.57738333581f, + 97579.14224391151f, + 97602.70852727126f, + 97626.27623324326f, + 97649.84536165581f, + 97673.41591233722f, + 97696.98788511587f, + 97720.56127982022f, + 97744.1360962787f, + 97767.71233431989f, + 97791.28999377234f, + 97814.86907446472f, + 97838.44957622568f, + 97862.031498884f, + 97885.61484226845f, + 97909.19960620788f, + 97932.7857905312f, + 97956.37339506732f, + 97979.96241964525f, + 98003.55286409408f, + 98027.14472824286f, + 98050.73801192077f, + 98074.332714957f, + 98097.9288371808f, + 98121.52637842152f, + 98145.12533850846f, + 98168.72571727107f, + 98192.32751453877f, + 98215.93073014112f, + 98239.53536390766f, + 98263.14141566801f, + 98286.74888525181f, + 98310.35777248882f, + 98333.96807720876f, + 98357.57979924149f, + 98381.19293841685f, + 98404.80749456478f, + 98428.42346751524f, + 98452.04085709827f, + 98475.65966314392f, + 98499.27988548232f, + 98522.90152394367f, + 98546.52457835816f, + 98570.1490485561f, + 98593.77493436779f, + 98617.40223562362f, + 98641.03095215405f, + 98664.66108378951f, + 98688.29263036055f, + 98711.92559169777f, + 98735.5599676318f, + 98759.1957579933f, + 98782.83296261301f, + 98806.47158132173f, + 98830.11161395028f, + 98853.75306032957f, + 98877.39592029051f, + 98901.0401936641f, + 98924.68588028138f, + 98948.33297997342f, + 98971.98149257139f, + 98995.63141790645f, + 99019.28275580984f, + 99042.93550611287f, + 99066.58966864688f, + 99090.24524324323f, + 99113.9022297334f, + 99137.56062794886f, + 99161.22043772115f, + 99184.88165888184f, + 99208.54429126263f, + 99232.20833469517f, + 99255.87378901121f, + 99279.54065404256f, + 99303.20892962103f, + 99326.87861557852f, + 99350.54971174701f, + 99374.22221795844f, + 99397.89613404489f, + 99421.57145983842f, + 99445.24819517121f, + 99468.92633987544f, + 99492.60589378334f, + 99516.28685672721f, + 99539.9692285394f, + 99563.65300905229f, + 99587.33819809832f, + 99611.02479551f, + 99634.71280111987f, + 99658.4022147605f, + 99682.09303626454f, + 99705.7852654647f, + 99729.47890219369f, + 99753.17394628433f, + 99776.87039756944f, + 99800.56825588191f, + 99824.26752105469f, + 99847.96819292076f, + 99871.67027131317f, + 99895.373756065f, + 99919.07864700939f, + 99942.78494397952f, + 99966.49264680862f, + 99990.20175533001f, + 100013.91226937699f, + 100037.62418878295f, + 100061.33751338134f, + 100085.05224300563f, + 100108.76837748935f, + 100132.4859166661f, + 100156.2048603695f, + 100179.92520843323f, + 100203.64696069101f, + 100227.37011697664f, + 100251.09467712394f, + 100274.82064096678f, + 100298.54800833909f, + 100322.27677907483f, + 100346.00695300807f, + 100369.73852997283f, + 100393.47150980328f, + 100417.20589233354f, + 100440.94167739789f, + 100464.67886483055f, + 100488.41745446586f, + 100512.1574461382f, + 100535.89883968196f, + 100559.64163493161f, + 100583.3858317217f, + 100607.13142988674f, + 100630.87842926137f, + 100654.62682968024f, + 100678.37663097809f, + 100702.12783298964f, + 100725.88043554971f, + 100749.63443849317f, + 100773.38984165489f, + 100797.14664486986f, + 100820.90484797307f, + 100844.66445079957f, + 100868.42545318443f, + 100892.18785496285f, + 100915.95165596998f, + 100939.71685604108f, + 100963.48345501146f, + 100987.25145271645f, + 101011.02084899142f, + 101034.79164367184f, + 101058.56383659315f, + 101082.33742759094f, + 101106.11241650078f, + 101129.88880315828f, + 101153.66658739912f, + 101177.44576905905f, + 101201.22634797383f, + 101225.00832397929f, + 101248.7916969113f, + 101272.5764666058f, + 101296.36263289873f, + 101320.15019562612f, + 101343.93915462404f, + 101367.7295097286f, + 101391.52126077596f, + 101415.31440760233f, + 101439.10895004397f, + 101462.9048879372f, + 101486.70222111835f, + 101510.50094942382f, + 101534.30107269008f, + 101558.10259075361f, + 101581.90550345098f, + 101605.70981061876f, + 101629.5155120936f, + 101653.32260771218f, + 101677.13109731126f, + 101700.9409807276f, + 101724.75225779804f, + 101748.56492835947f, + 101772.3789922488f, + 101796.19444930303f, + 101820.01129935916f, + 101843.82954225427f, + 101867.64917782549f, + 101891.47020590997f, + 101915.29262634492f, + 101939.11643896763f, + 101962.94164361537f, + 101986.76824012553f, + 102010.59622833549f, + 102034.42560808272f, + 102058.25637920471f, + 102082.08854153901f, + 102105.92209492321f, + 102129.75703919494f, + 102153.59337419191f, + 102177.43109975185f, + 102201.27021571253f, + 102225.1107219118f, + 102248.95261818753f, + 102272.79590437764f, + 102296.64058032009f, + 102320.48664585294f, + 102344.33410081422f, + 102368.18294504205f, + 102392.03317837461f, + 102415.88480065008f, + 102439.73781170673f, + 102463.59221138287f, + 102487.44799951684f, + 102511.30517594703f, + 102535.1637405119f, + 102559.02369304994f, + 102582.88503339965f, + 102606.74776139966f, + 102630.6118768886f, + 102654.47737970512f, + 102678.34426968795f, + 102702.21254667587f, + 102726.08221050771f, + 102749.95326102231f, + 102773.8256980586f, + 102797.69952145554f, + 102821.57473105213f, + 102845.45132668741f, + 102869.32930820051f, + 102893.20867543056f, + 102917.08942821674f, + 102940.97156639831f, + 102964.85508981455f, + 102988.73999830478f, + 103012.6262917084f, + 103036.51396986481f, + 103060.40303261351f, + 103084.293479794f, + 103108.18531124585f, + 103132.07852680866f, + 103155.97312632212f, + 103179.8691096259f, + 103203.76647655977f, + 103227.66522696352f, + 103251.565360677f, + 103275.46687754011f, + 103299.36977739276f, + 103323.27406007495f, + 103347.1797254267f, + 103371.08677328809f, + 103394.99520349925f, + 103418.90501590034f, + 103442.81621033157f, + 103466.7287866332f, + 103490.64274464553f, + 103514.55808420894f, + 103538.4748051638f, + 103562.39290735057f, + 103586.31239060973f, + 103610.23325478184f, + 103634.15549970744f, + 103658.0791252272f, + 103682.00413118176f, + 103705.93051741188f, + 103729.8582837583f, + 103753.78743006183f, + 103777.71795616334f, + 103801.64986190372f, + 103825.58314712394f, + 103849.51781166499f, + 103873.4538553679f, + 103897.39127807376f, + 103921.33007962372f, + 103945.27025985895f, + 103969.21181862066f, + 103993.15475575015f, + 104017.0990710887f, + 104041.0447644777f, + 104064.99183575854f, + 104088.94028477269f, + 104112.89011136163f, + 104136.84131536692f, + 104160.79389663014f, + 104184.74785499295f, + 104208.70319029699f, + 104232.65990238401f, + 104256.61799109579f, + 104280.57745627411f, + 104304.53829776088f, + 104328.50051539797f, + 104352.46410902737f, + 104376.42907849104f, + 104400.39542363104f, + 104424.36314428947f, + 104448.33224030846f, + 104472.3027115302f, + 104496.27455779689f, + 104520.24777895081f, + 104544.22237483428f, + 104568.19834528965f, + 104592.17569015936f, + 104616.15440928582f, + 104640.13450251156f, + 104664.11596967909f, + 104688.09881063103f, + 104712.08302520998f, + 104736.06861325864f, + 104760.05557461972f, + 104784.043909136f, + 104808.03361665027f, + 104832.0246970054f, + 104856.01715004431f, + 104880.01097560991f, + 104904.00617354522f, + 104928.00274369326f, + 104952.00068589713f, + 104975.99999999993f, + 105000.00068584486f, + 105024.00274327511f, + 105048.00617213396f, + 105072.01097226472f, + 105096.0171435107f, + 105120.02468571535f, + 105144.03359872208f, + 105168.04388237436f, + 105192.05553651575f, + 105216.06856098982f, + 105240.08295564016f, + 105264.09872031047f, + 105288.11585484444f, + 105312.13435908582f, + 105336.1542328784f, + 105360.17547606604f, + 105384.19808849262f, + 105408.22207000206f, + 105432.24742043833f, + 105456.27413964548f, + 105480.30222746753f, + 105504.33168374863f, + 105528.36250833291f, + 105552.39470106458f, + 105576.42826178786f, + 105600.46319034706f, + 105624.49948658649f, + 105648.53715035053f, + 105672.5761814836f, + 105696.61657983017f, + 105720.65834523473f, + 105744.70147754184f, + 105768.74597659608f, + 105792.79184224212f, + 105816.83907432464f, + 105840.88767268835f, + 105864.93763717801f, + 105888.98896763846f, + 105913.04166391456f, + 105937.09572585119f, + 105961.15115329332f, + 105985.20794608595f, + 106009.2661040741f, + 106033.32562710284f, + 106057.3865150173f, + 106081.44876766266f, + 106105.51238488412f, + 106129.57736652695f, + 106153.64371243643f, + 106177.71142245791f, + 106201.78049643678f, + 106225.85093421848f, + 106249.92273564848f, + 106273.99590057228f, + 106298.07042883546f, + 106322.14632028362f, + 106346.2235747624f, + 106370.30219211751f, + 106394.38217219469f, + 106418.4635148397f, + 106442.54621989837f, + 106466.63028721658f, + 106490.71571664023f, + 106514.8025080153f, + 106538.89066118775f, + 106562.98017600364f, + 106587.07105230905f, + 106611.16328995011f, + 106635.25688877302f, + 106659.35184862395f, + 106683.44816934918f, + 106707.54585079502f, + 106731.64489280782f, + 106755.74529523395f, + 106779.84705791986f, + 106803.95018071201f, + 106828.05466345693f, + 106852.16050600118f, + 106876.26770819136f, + 106900.37626987413f, + 106924.48619089619f, + 106948.59747110425f, + 106972.71011034511f, + 106996.82410846559f, + 107020.93946531255f, + 107045.05618073288f, + 107069.17425457356f, + 107093.29368668159f, + 107117.41447690397f, + 107141.53662508781f, + 107165.66013108024f, + 107189.7849947284f, + 107213.91121587952f, + 107238.03879438085f, + 107262.16773007967f, + 107286.29802282334f, + 107310.42967245923f, + 107334.56267883476f, + 107358.69704179741f, + 107382.83276119467f, + 107406.96983687414f, + 107431.10826868335f, + 107455.24805646998f, + 107479.38920008171f, + 107503.53169936626f, + 107527.6755541714f, + 107551.82076434491f, + 107575.96732973469f, + 107600.11525018861f, + 107624.26452555461f, + 107648.41515568066f, + 107672.56714041479f, + 107696.72047960508f, + 107720.87517309963f, + 107745.03122074658f, + 107769.18862239414f, + 107793.34737789052f, + 107817.50748708403f, + 107841.66894982298f, + 107865.83176595572f, + 107889.99593533068f, + 107914.16145779629f, + 107938.32833320105f, + 107962.49656139348f, + 107986.66614222217f, + 108010.83707553573f, + 108035.00936118282f, + 108059.18299901215f, + 108083.35798887245f, + 108107.53433061253f, + 108131.71202408121f, + 108155.89106912735f, + 108180.07146559987f, + 108204.25321334775f, + 108228.43631221994f, + 108252.62076206553f, + 108276.80656273357f, + 108300.9937140732f, + 108325.18221593359f, + 108349.37206816394f, + 108373.5632706135f, + 108397.75582313156f, + 108421.94972556747f, + 108446.1449777706f, + 108470.34157959036f, + 108494.53953087622f, + 108518.7388314777f, + 108542.9394812443f, + 108567.14148002566f, + 108591.34482767139f, + 108615.54952403114f, + 108639.75556895464f, + 108663.96296229165f, + 108688.17170389196f, + 108712.38179360541f, + 108736.59323128188f, + 108760.80601677128f, + 108785.02014992358f, + 108809.23563058881f, + 108833.45245861699f, + 108857.67063385822f, + 108881.89015616261f, + 108906.11102538036f, + 108930.33324136169f, + 108954.55680395682f, + 108978.78171301607f, + 109003.00796838978f, + 109027.2355699283f, + 109051.4645174821f, + 109075.69481090162f, + 109099.92645003737f, + 109124.15943473988f, + 109148.39376485976f, + 109172.62944024763f, + 109196.86646075416f, + 109221.10482623006f, + 109245.3445365261f, + 109269.58559149304f, + 109293.82799098175f, + 109318.0717348431f, + 109342.316822928f, + 109366.56325508743f, + 109390.81103117237f, + 109415.06015103386f, + 109439.31061452301f, + 109463.56242149093f, + 109487.8155717888f, + 109512.0700652678f, + 109536.3259017792f, + 109560.58308117429f, + 109584.8416033044f, + 109609.1014680209f, + 109633.36267517522f, + 109657.62522461878f, + 109681.88911620309f, + 109706.15434977971f, + 109730.4209252002f, + 109754.68884231619f, + 109778.95810097932f, + 109803.22870104131f, + 109827.50064235389f, + 109851.77392476884f, + 109876.048548138f, + 109900.32451231324f, + 109924.60181714644f, + 109948.88046248957f, + 109973.1604481946f, + 109997.44177411357f, + 110021.72444009855f, + 110046.00844600165f, + 110070.29379167501f, + 110094.58047697082f, + 110118.86850174134f, + 110143.15786583882f, + 110167.44856911557f, + 110191.74061142397f, + 110216.0339926164f, + 110240.32871254528f, + 110264.62477106311f, + 110288.9221680224f, + 110313.22090327571f, + 110337.52097667565f, + 110361.82238807483f, + 110386.12513732594f, + 110410.42922428172f, + 110434.7346487949f, + 110459.04141071832f, + 110483.34950990479f, + 110507.6589462072f, + 110531.96971947847f, + 110556.28182957157f, + 110580.5952763395f, + 110604.91005963532f, + 110629.2261793121f, + 110653.54363522294f, + 110677.86242722106f, + 110702.18255515961f, + 110726.50401889188f, + 110750.82681827113f, + 110775.1509531507f, + 110799.47642338395f, + 110823.80322882428f, + 110848.13136932514f, + 110872.46084474004f, + 110896.79165492248f, + 110921.12379972603f, + 110945.4572790043f, + 110969.79209261097f, + 110994.12824039967f, + 111018.46572222418f, + 111042.80453793824f, + 111067.14468739566f, + 111091.48617045028f, + 111115.82898695602f, + 111140.1731367668f, + 111164.51861973657f, + 111188.86543571934f, + 111213.21358456917f, + 111237.56306614014f, + 111261.91388028639f, + 111286.26602686207f, + 111310.6195057214f, + 111334.97431671864f, + 111359.33045970804f, + 111383.68793454397f, + 111408.04674108078f, + 111432.40687917286f, + 111456.76834867468f, + 111481.13114944073f, + 111505.49528132551f, + 111529.8607441836f, + 111554.22753786962f, + 111578.59566223821f, + 111602.96511714405f, + 111627.33590244185f, + 111651.7080179864f, + 111676.08146363248f, + 111700.45623923496f, + 111724.8323446487f, + 111749.20977972864f, + 111773.58854432974f, + 111797.968638307f, + 111822.35006151545f, + 111846.73281381019f, + 111871.11689504632f, + 111895.50230507903f, + 111919.88904376348f, + 111944.27711095495f, + 111968.6665065087f, + 111993.05723028004f, + 112017.44928212435f, + 112041.842661897f, + 112066.23736945343f, + 112090.63340464912f, + 112115.0307673396f, + 112139.42945738042f, + 112163.82947462716f, + 112188.23081893545f, + 112212.63349016097f, + 112237.03748815943f, + 112261.44281278658f, + 112285.84946389822f, + 112310.25744135017f, + 112334.66674499828f, + 112359.07737469849f, + 112383.48933030672f, + 112407.90261167898f, + 112432.31721867126f, + 112456.73315113965f, + 112481.15040894024f, + 112505.56899192919f, + 112529.98889996266f, + 112554.41013289688f, + 112578.83269058811f, + 112603.25657289263f, + 112627.6817796668f, + 112652.10831076698f, + 112676.53616604958f, + 112700.96534537108f, + 112725.39584858794f, + 112749.82767555672f, + 112774.26082613398f, + 112798.6953001763f, + 112823.13109754038f, + 112847.56821808286f, + 112872.00666166049f, + 112896.44642813003f, + 112920.88751734828f, + 112945.32992917208f, + 112969.7736634583f, + 112994.21872006389f, + 113018.66509884578f, + 113043.11279966097f, + 113067.56182236652f, + 113092.01216681948f, + 113116.46383287695f, + 113140.9168203961f, + 113165.37112923413f, + 113189.82675924824f, + 113214.28371029573f, + 113238.74198223387f, + 113263.20157492002f, + 113287.66248821156f, + 113312.12472196593f, + 113336.58827604055f, + 113361.05315029295f, + 113385.51934458067f, + 113409.98685876124f, + 113434.45569269233f, + 113458.92584623155f, + 113483.39731923661f, + 113507.87011156522f, + 113532.34422307517f, + 113556.81965362425f, + 113581.2964030703f, + 113605.77447127122f, + 113630.2538580849f, + 113654.73456336933f, + 113679.21658698248f, + 113703.69992878241f, + 113728.18458862716f, + 113752.67056637487f, + 113777.15786188368f, + 113801.64647501177f, + 113826.13640561736f, + 113850.62765355874f, + 113875.12021869418f, + 113899.61410088204f, + 113924.1092999807f, + 113948.60581584855f, + 113973.10364834408f, + 113997.60279732574f, + 114022.1032626521f, + 114046.60504418172f, + 114071.10814177318f, + 114095.61255528513f, + 114120.11828457628f, + 114144.62532950533f, + 114169.13368993104f, + 114193.6433657122f, + 114218.15435670764f, + 114242.66666277626f, + 114267.18028377692f, + 114291.69521956862f, + 114316.21147001031f, + 114340.72903496103f, + 114365.24791427983f, + 114389.7681078258f, + 114414.2896154581f, + 114438.81243703587f, + 114463.33657241837f, + 114487.8620214648f, + 114512.38878403447f, + 114536.91685998671f, + 114561.44624918088f, + 114585.97695147636f, + 114610.5089667326f, + 114635.04229480909f, + 114659.57693556532f, + 114684.11288886084f, + 114708.65015455526f, + 114733.18873250818f, + 114757.72862257928f, + 114782.26982462825f, + 114806.81233851484f, + 114831.35616409882f, + 114855.90130124f, + 114880.44774979822f, + 114904.99550963337f, + 114929.5445806054f, + 114954.09496257425f, + 114978.64665539993f, + 115003.19965894247f, + 115027.75397306195f, + 115052.30959761847f, + 115076.86653247218f, + 115101.42477748329f, + 115125.984332512f, + 115150.54519741859f, + 115175.10737206334f, + 115199.67085630659f, + 115224.23565000873f, + 115248.80175303014f, + 115273.3691652313f, + 115297.93788647266f, + 115322.50791661476f, + 115347.07925551817f, + 115371.65190304347f, + 115396.2258590513f, + 115420.80112340231f, + 115445.37769595724f, + 115469.95557657682f, + 115494.53476512182f, + 115519.11526145306f, + 115543.6970654314f, + 115568.28017691776f, + 115592.86459577303f, + 115617.4503218582f, + 115642.03735503425f, + 115666.62569516223f, + 115691.21534210323f, + 115715.80629571836f, + 115740.39855586876f, + 115764.99212241563f, + 115789.58699522018f, + 115814.18317414368f, + 115838.78065904742f, + 115863.37944979276f, + 115887.97954624105f, + 115912.5809482537f, + 115937.18365569218f, + 115961.78766841792f, + 115986.39298629249f, + 116010.99960917742f, + 116035.60753693432f, + 116060.21676942479f, + 116084.82730651053f, + 116109.43914805322f, + 116134.0522939146f, + 116158.66674395645f, + 116183.2824980406f, + 116207.89955602886f, + 116232.51791778316f, + 116257.13758316539f, + 116281.75855203751f, + 116306.38082426153f, + 116331.0043996995f, + 116355.62927821343f, + 116380.25545966547f, + 116404.88294391775f, + 116429.51173083246f, + 116454.14182027178f, + 116478.77321209799f, + 116503.40590617337f, + 116528.03990236024f, + 116552.67520052097f, + 116577.31180051794f, + 116601.94970221359f, + 116626.5889054704f, + 116651.22941015086f, + 116675.8712161175f, + 116700.51432323293f, + 116725.15873135976f, + 116749.8044403606f, + 116774.45145009817f, + 116799.0997604352f, + 116823.74937123443f, + 116848.40028235866f, + 116873.05249367072f, + 116897.70600503348f, + 116922.36081630984f, + 116947.01692736275f, + 116971.67433805518f, + 116996.33304825013f, + 117020.99305781067f, + 117045.65436659988f, + 117070.31697448085f, + 117094.98088131678f, + 117119.64608697084f, + 117144.31259130625f, + 117168.98039418628f, + 117193.64949547425f, + 117218.31989503348f, + 117242.99159272734f, + 117267.66458841923f, + 117292.33888197262f, + 117317.01447325097f, + 117341.6913621178f, + 117366.36954843666f, + 117391.04903207115f, + 117415.72981288488f, + 117440.41189074152f, + 117465.09526550476f, + 117489.77993703831f, + 117514.46590520597f, + 117539.15316987154f, + 117563.84173089883f, + 117588.53158815173f, + 117613.22274149416f, + 117637.91519079005f, + 117662.60893590341f, + 117687.30397669821f, + 117712.00031303853f, + 117736.69794478847f, + 117761.39687181212f, + 117786.09709397367f, + 117810.7986111373f, + 117835.50142316725f, + 117860.20552992777f, + 117884.91093128319f, + 117909.6176270978f, + 117934.32561723603f, + 117959.03490156225f, + 117983.74547994092f, + 118008.45735223651f, + 118033.17051831353f, + 118057.88497803656f, + 118082.60073127014f, + 118107.31777787892f, + 118132.03611772758f, + 118156.75575068076f, + 118181.47667660323f, + 118206.19889535972f, + 118230.92240681504f, + 118255.64721083404f, + 118280.37330728157f, + 118305.10069602253f, + 118329.82937692187f, + 118354.55934984458f, + 118379.29061465565f, + 118404.02317122012f, + 118428.75701940308f, + 118453.49215906965f, + 118478.22859008498f, + 118502.96631231424f, + 118527.70532562268f, + 118552.44562987552f, + 118577.18722493808f, + 118601.93011067568f, + 118626.67428695368f, + 118651.41975363747f, + 118676.1665105925f, + 118700.91455768421f, + 118725.66389477813f, + 118750.41452173979f, + 118775.16643843475f, + 118799.91964472862f, + 118824.67414048707f, + 118849.42992557574f, + 118874.18699986035f, + 118898.94536320666f, + 118923.70501548043f, + 118948.46595654752f, + 118973.22818627374f, + 118997.99170452499f, + 119022.7565111672f, + 119047.52260606633f, + 119072.28998908834f, + 119097.0586600993f, + 119121.82861896523f, + 119146.59986555226f, + 119171.3723997265f, + 119196.14622135412f, + 119220.92133030134f, + 119245.69772643436f, + 119270.47540961947f, + 119295.25437972297f, + 119320.0346366112f, + 119344.81618015055f, + 119369.5990102074f, + 119394.38312664822f, + 119419.16852933947f, + 119443.95521814766f, + 119468.74319293935f, + 119493.53245358112f, + 119518.32299993958f, + 119543.1148318814f, + 119567.90794927324f, + 119592.70235198183f, + 119617.49803987393f, + 119642.29501281632f, + 119667.09327067583f, + 119691.89281331931f, + 119716.69364061367f, + 119741.49575242584f, + 119766.29914862274f, + 119791.10382907142f, + 119815.90979363887f, + 119840.71704219218f, + 119865.52557459843f, + 119890.33539072477f, + 119915.14649043836f, + 119939.95887360642f, + 119964.77254009615f, + 119989.58748977486f, + 120014.40372250983f, + 120039.22123816841f, + 120064.04003661797f, + 120088.86011772591f, + 120113.6814813597f, + 120138.50412738678f, + 120163.3280556747f, + 120188.15326609099f, + 120212.9797585032f, + 120237.807532779f, + 120262.636588786f, + 120287.46692639188f, + 120312.29854546436f, + 120337.13144587121f, + 120361.9656274802f, + 120386.80109015913f, + 120411.6378337759f, + 120436.47585819835f, + 120461.31516329442f, + 120486.15574893207f, + 120510.99761497928f, + 120535.84076130408f, + 120560.6851877745f, + 120585.53089425867f, + 120610.3778806247f, + 120635.22614674074f, + 120660.07569247499f, + 120684.92651769568f, + 120709.77862227106f, + 120734.63200606944f, + 120759.48666895913f, + 120784.3426108085f, + 120809.19983148595f, + 120834.05833085992f, + 120858.91810879884f, + 120883.77916517125f, + 120908.64149984565f, + 120933.5051126906f, + 120958.37000357473f, + 120983.23617236665f, + 121008.10361893504f, + 121032.9723431486f, + 121057.84234487606f, + 121082.71362398617f, + 121107.58618034775f, + 121132.46001382964f, + 121157.33512430069f, + 121182.21151162982f, + 121207.08917568595f, + 121231.96811633807f, + 121256.84833345517f, + 121281.72982690629f, + 121306.61259656049f, + 121331.49664228689f, + 121356.38196395461f, + 121381.26856143285f, + 121406.15643459078f, + 121431.04558329767f, + 121455.93600742277f, + 121480.82770683538f, + 121505.72068140487f, + 121530.61493100057f, + 121555.51045549192f, + 121580.40725474835f, + 121605.30532863933f, + 121630.20467703436f, + 121655.10529980299f, + 121680.00719681478f, + 121704.91036793934f, + 121729.81481304632f, + 121754.72053200539f, + 121779.62752468624f, + 121804.53579095862f, + 121829.44533069231f, + 121854.3561437571f, + 121879.26823002285f, + 121904.1815893594f, + 121929.09622163669f, + 121954.01212672464f, + 121978.92930449323f, + 122003.84775481246f, + 122028.76747755238f, + 122053.68847258303f, + 122078.61073977455f, + 122103.53427899707f, + 122128.45909012076f, + 122153.3851730158f, + 122178.31252755247f, + 122203.241153601f, + 122228.1710510317f, + 122253.10221971496f, + 122278.03465952107f, + 122302.9683703205f, + 122327.90335198362f, + 122352.83960438096f, + 122377.777127383f, + 122402.71592086025f, + 122427.65598468333f, + 122452.59731872278f, + 122477.53992284928f, + 122502.48379693348f, + 122527.42894084606f, + 122552.37535445779f, + 122577.3230376394f, + 122602.27199026172f, + 122627.22221219557f, + 122652.17370331181f, + 122677.12646348133f, + 122702.08049257506f, + 122727.03579046397f, + 122751.99235701906f, + 122776.95019211136f, + 122801.9092956119f, + 122826.8696673918f, + 122851.8313073222f, + 122876.79421527422f, + 122901.75839111907f, + 122926.72383472799f, + 122951.69054597223f, + 122976.65852472307f, + 123001.62777085182f, + 123026.59828422987f, + 123051.57006472857f, + 123076.54311221937f, + 123101.5174265737f, + 123126.49300766307f, + 123151.46985535898f, + 123176.447969533f, + 123201.42735005668f, + 123226.40799680166f, + 123251.38990963959f, + 123276.37308844214f, + 123301.35753308103f, + 123326.343243428f, + 123351.33021935483f, + 123376.31846073334f, + 123401.30796743535f, + 123426.29873933276f, + 123451.29077629748f, + 123476.28407820144f, + 123501.2786449166f, + 123526.27447631498f, + 123551.27157226863f, + 123576.2699326496f, + 123601.26955732999f, + 123626.27044618195f, + 123651.27259907764f, + 123676.27601588926f, + 123701.28069648903f, + 123726.28664074925f, + 123751.29384854218f, + 123776.30231974016f, + 123801.31205421555f, + 123826.32305184074f, + 123851.33531248817f, + 123876.34883603029f, + 123901.36362233957f, + 123926.37967128855f, + 123951.3969827498f, + 123976.41555659588f, + 124001.43539269941f, + 124026.45649093305f, + 124051.47885116948f, + 124076.50247328142f, + 124101.5273571416f, + 124126.55350262282f, + 124151.58090959788f, + 124176.60957793961f, + 124201.63950752091f, + 124226.67069821467f, + 124251.70314989384f, + 124276.73686243138f, + 124301.7718357003f, + 124326.80806957364f, + 124351.84556392446f, + 124376.88431862585f, + 124401.92433355095f, + 124426.96560857294f, + 124452.00814356498f, + 124477.05193840031f, + 124502.0969929522f, + 124527.14330709392f, + 124552.19088069882f, + 124577.23971364023f, + 124602.28980579154f, + 124627.34115702618f, + 124652.3937672176f, + 124677.44763623926f, + 124702.50276396469f, + 124727.55915026742f, + 124752.61679502104f, + 124777.67569809916f, + 124802.73585937542f, + 124827.79727872348f, + 124852.85995601704f, + 124877.92389112986f, + 124902.98908393568f, + 124928.05553430831f, + 124953.1232421216f, + 124978.19220724938f, + 125003.26242956554f, + 125028.33390894404f, + 125053.40664525882f, + 125078.48063838384f, + 125103.55588819316f, + 125128.63239456083f, + 125153.71015736091f, + 125178.78917646752f, + 125203.86945175481f, + 125228.95098309696f, + 125254.03377036817f, + 125279.1178134427f, + 125304.2031121948f, + 125329.28966649878f, + 125354.37747622898f, + 125379.46654125977f, + 125404.55686146552f, + 125429.6484367207f, + 125454.74126689974f, + 125479.83535187715f, + 125504.93069152744f, + 125530.02728572517f, + 125555.12513434493f, + 125580.22423726133f, + 125605.32459434902f, + 125630.42620548268f, + 125655.52907053704f, + 125680.63318938682f, + 125705.7385619068f, + 125730.84518797178f, + 125755.9530674566f, + 125781.06220023613f, + 125806.17258618528f, + 125831.28422517896f, + 125856.39711709213f, + 125881.51126179981f, + 125906.62665917698f, + 125931.74330909875f, + 125956.86121144016f, + 125981.98036607634f, + 126007.10077288245f, + 126032.22243173365f, + 126057.34534250517f, + 126082.46950507225f, + 126107.59491931014f, + 126132.72158509417f, + 126157.84950229966f, + 126182.97867080198f, + 126208.10909047653f, + 126233.24076119871f, + 126258.37368284403f, + 126283.50785528794f, + 126308.64327840599f, + 126333.7799520737f, + 126358.91787616667f, + 126384.0570505605f, + 126409.19747513086f, + 126434.3391497534f, + 126459.48207430386f, + 126484.62624865794f, + 126509.77167269142f, + 126534.9183462801f, + 126560.06626929982f, + 126585.21544162642f, + 126610.36586313581f, + 126635.51753370391f, + 126660.67045320668f, + 126685.82462152008f, + 126710.98003852014f, + 126736.1367040829f, + 126761.29461808444f, + 126786.45378040087f, + 126811.61419090834f, + 126836.77584948298f, + 126861.93875600102f, + 126887.10291033868f, + 126912.26831237224f, + 126937.43496197795f, + 126962.60285903217f, + 126987.77200341123f, + 127012.94239499152f, + 127038.11403364947f, + 127063.2869192615f, + 127088.46105170409f, + 127113.63643085376f, + 127138.81305658702f, + 127163.99092878048f, + 127189.17004731069f, + 127214.3504120543f, + 127239.53202288797f, + 127264.71487968838f, + 127289.89898233226f, + 127315.08433069635f, + 127340.27092465744f, + 127365.45876409234f, + 127390.64784887788f, + 127415.83817889093f, + 127441.02975400841f, + 127466.22257410725f, + 127491.4166390644f, + 127516.61194875685f, + 127541.80850306165f, + 127567.00630185583f, + 127592.20534501647f, + 127617.4056324207f, + 127642.60716394568f, + 127667.80993946856f, + 127693.01395886653f, + 127718.21922201688f, + 127743.42572879682f, + 127768.63347908368f, + 127793.8424727548f, + 127819.05270968749f, + 127844.26418975917f, + 127869.47691284724f, + 127894.69087882918f, + 127919.90608758242f, + 127945.12253898452f, + 127970.34023291297f, + 127995.55916924539f, + 128020.77934785932f, + 128046.00076863244f, + 128071.22343144237f, + 128096.44733616684f, + 128121.67248268353f, + 128146.89887087021f, + 128172.12650060465f, + 128197.35537176466f, + 128222.5854842281f, + 128247.81683787282f, + 128273.0494325767f, + 128298.28326821771f, + 128323.5183446738f, + 128348.75466182294f, + 128373.99221954317f, + 128399.23101771252f, + 128424.47105620909f, + 128449.71233491098f, + 128474.95485369631f, + 128500.19861244329f, + 128525.44361103009f, + 128550.68984933494f, + 128575.93732723613f, + 128601.18604461191f, + 128626.43600134061f, + 128651.68719730059f, + 128676.93963237021f, + 128702.1933064279f, + 128727.44821935208f, + 128752.70437102125f, + 128777.96176131385f, + 128803.22039010846f, + 128828.48025728362f, + 128853.74136271792f, + 128879.00370628996f, + 128904.2672878784f, + 128929.53210736193f, + 128954.79816461923f, + 128980.06545952905f, + 129005.33399197015f, + 129030.60376182134f, + 129055.87476896142f, + 129081.14701326926f, + 129106.42049462376f, + 129131.6952129038f, + 129156.97116798835f, + 129182.24835975636f, + 129207.52678808685f, + 129232.80645285884f, + 129258.08735395141f, + 129283.36949124365f, + 129308.65286461466f, + 129333.9374739436f, + 129359.22331910966f, + 129384.51039999202f, + 129409.79871646997f, + 129435.08826842274f, + 129460.37905572963f, + 129485.67107826998f, + 129510.96433592314f, + 129536.2588285685f, + 129561.55455608548f, + 129586.85151835352f, + 129612.14971525209f, + 129637.4491466607f, + 129662.74981245887f, + 129688.0517125262f, + 129713.35484674224f, + 129738.65921498663f, + 129763.96481713903f, + 129789.2716530791f, + 129814.57972268655f, + 129839.88902584116f, + 129865.19956242264f, + 129890.51133231082f, + 129915.82433538554f, + 129941.13857152662f, + 129966.45404061397f, + 129991.7707425275f, + 130017.08867714716f, + 130042.4078443529f, + 130067.72824402474f, + 130093.04987604271f, + 130118.37274028687f, + 130143.69683663732f, + 130169.02216497416f, + 130194.34872517755f, + 130219.67651712766f, + 130245.0055407047f, + 130270.33579578891f, + 130295.66728226055f, + 130320.99999999991f, + 130346.33394888733f, + 130371.66912880314f, + 130397.00553962773f, + 130422.34318124152f, + 130447.68205352494f, + 130473.02215635845f, + 130498.36348962256f, + 130523.70605319779f, + 130549.0498469647f, + 130574.39487080388f, + 130599.74112459592f, + 130625.08860822149f, + 130650.43732156123f, + 130675.78726449587f, + 130701.13843690613f, + 130726.49083867275f, + 130751.84446967654f, + 130777.19932979831f, + 130802.5554189189f, + 130827.91273691918f, + 130853.27128368006f, + 130878.63105908247f, + 130903.99206300738f, + 130929.35429533575f, + 130954.71775594862f, + 130980.08244472703f, + 131005.44836155206f, + 131030.81550630482f, + 131056.18387886642f, + 131081.55347911804f, + 131106.92430694087f, + 131132.29636221612f, + 131157.66964482504f, + 131183.0441546489f, + 131208.41989156904f, + 131233.79685546676f, + 131259.17504622342f, + 131284.55446372041f, + 131309.93510783918f, + 131335.31697846117f, + 131360.70007546784f, + 131386.0843987407f, + 131411.46994816128f, + 131436.85672361116f, + 131462.24472497194f, + 131487.6339521252f, + 131513.02440495262f, + 131538.41608333588f, + 131563.80898715663f, + 131589.2031162967f, + 131614.59847063778f, + 131639.9950500617f, + 131665.39285445024f, + 131690.7918836853f, + 131716.19213764873f, + 131741.5936162224f, + 131766.99631928833f, + 131792.4002467284f, + 131817.80539842462f, + 131843.21177425905f, + 131868.6193741137f, + 131894.02819787065f, + 131919.43824541202f, + 131944.84951661993f, + 131970.26201137656f, + 131995.67572956407f, + 132021.09067106468f, + 132046.50683576067f, + 132071.9242235343f, + 132097.34283426782f, + 132122.76266784366f, + 132148.1837241441f, + 132173.60600305157f, + 132199.02950444847f, + 132224.45422821722f, + 132249.88017424036f, + 132275.3073424003f, + 132300.73573257966f, + 132326.16534466096f, + 132351.59617852676f, + 132377.0282340597f, + 132402.46151114244f, + 132427.8960096576f, + 132453.3317294879f, + 132478.7686705161f, + 132504.2068326249f, + 132529.64621569714f, + 132555.0868196156f, + 132580.5286442631f, + 132605.97168952253f, + 132631.41595527678f, + 132656.8614414088f, + 132682.3081478015f, + 132707.75607433787f, + 132733.20522090094f, + 132758.65558737374f, + 132784.1071736393f, + 132809.55997958075f, + 132835.01400508118f, + 132860.46925002377f, + 132885.92571429166f, + 132911.3833977681f, + 132936.84230033628f, + 132962.30242187946f, + 132987.76376228096f, + 133013.22632142407f, + 133038.69009919214f, + 133064.15509546854f, + 133089.62131013666f, + 133115.08874307995f, + 133140.55739418184f, + 133166.0272633258f, + 133191.4983503954f, + 133216.97065527414f, + 133242.4441778456f, + 133267.91891799335f, + 133293.39487560102f, + 133318.87205055228f, + 133344.3504427308f, + 133369.83005202023f, + 133395.3108783044f, + 133420.79292146701f, + 133446.27618139185f, + 133471.76065796276f, + 133497.24635106357f, + 133522.73326057816f, + 133548.2213863904f, + 133573.71072838426f, + 133599.20128644365f, + 133624.6930604526f, + 133650.1860502951f, + 133675.68025585517f, + 133701.1756770169f, + 133726.67231366437f, + 133752.17016568172f, + 133777.66923295305f, + 133803.1695153626f, + 133828.67101279454f, + 133854.1737251331f, + 133879.67765226253f, + 133905.18279406714f, + 133930.68915043125f, + 133956.19672123916f, + 133981.70550637526f, + 134007.215505724f, + 134032.7267191697f, + 134058.23914659687f, + 134083.75278789f, + 134109.26764293358f, + 134134.78371161217f, + 134160.30099381026f, + 134185.8194894125f, + 134211.33919830353f, + 134236.8601203679f, + 134262.38225549037f, + 134287.90560355558f, + 134313.4301644483f, + 134338.95593805326f, + 134364.48292425525f, + 134390.0111229391f, + 134415.54053398955f, + 134441.0711572916f, + 134466.60299273f, + 134492.1360401898f, + 134517.67029955584f, + 134543.20577071316f, + 134568.74245354676f, + 134594.2803479416f, + 134619.81945378278f, + 134645.35977095537f, + 134670.90129934452f, + 134696.4440388353f, + 134721.9879893129f, + 134747.53315066252f, + 134773.07952276937f, + 134798.6271055187f, + 134824.17589879577f, + 134849.7259024859f, + 134875.27711647438f, + 134900.8295406466f, + 134926.38317488792f, + 134951.93801908373f, + 134977.4940731195f, + 135003.0513368807f, + 135028.60981025276f, + 135054.16949312127f, + 135079.73038537172f, + 135105.29248688967f, + 135130.85579756077f, + 135156.42031727062f, + 135181.98604590484f, + 135207.55298334916f, + 135233.12112948927f, + 135258.69048421088f, + 135284.26104739975f, + 135309.83281894168f, + 135335.4057987225f, + 135360.97998662802f, + 135386.55538254412f, + 135412.1319863567f, + 135437.70979795168f, + 135463.28881721498f, + 135488.86904403262f, + 135514.45047829056f, + 135540.03311987486f, + 135565.61696867156f, + 135591.20202456677f, + 135616.78828744654f, + 135642.37575719706f, + 135667.96443370447f, + 135693.55431685498f, + 135719.14540653478f, + 135744.7377026301f, + 135770.33120502727f, + 135795.92591361253f, + 135821.52182827223f, + 135847.11894889272f, + 135872.7172753604f, + 135898.3168075616f, + 135923.91754538284f, + 135949.51948871053f, + 135975.12263743114f, + 136000.72699143123f, + 136026.3325505973f, + 136051.9393148159f, + 136077.5472839737f, + 136103.15645795723f, + 136128.76683665317f, + 136154.37841994822f, + 136179.991207729f, + 136205.60519988232f, + 136231.2203962949f, + 136256.8367968535f, + 136282.45440144493f, + 136308.07320995603f, + 136333.69322227367f, + 136359.3144382847f, + 136384.93685787608f, + 136410.56048093468f, + 136436.18530734754f, + 136461.81133700156f, + 136487.43856978387f, + 136513.06700558143f, + 136538.6966442813f, + 136564.32748577066f, + 136589.95952993655f, + 136615.59277666616f, + 136641.22722584667f, + 136666.86287736523f, + 136692.49973110916f, + 136718.13778696564f, + 136743.77704482197f, + 136769.41750456547f, + 136795.05916608346f, + 136820.7020292633f, + 136846.34609399244f, + 136871.9913601582f, + 136897.63782764805f, + 136923.28549634948f, + 136948.93436614997f, + 136974.58443693706f, + 137000.23570859825f, + 137025.88818102115f, + 137051.54185409332f, + 137077.19672770242f, + 137102.8528017361f, + 137128.51007608202f, + 137154.16855062786f, + 137179.82822526142f, + 137205.4890998704f, + 137231.15117434258f, + 137256.8144485658f, + 137282.4789224279f, + 137308.14459581667f, + 137333.8114686201f, + 137359.47954072602f, + 137385.1488120224f, + 137410.8192823972f, + 137436.49095173844f, + 137462.16381993407f, + 137487.8378868722f, + 137513.5131524409f, + 137539.18961652822f, + 137564.8672790223f, + 137590.5461398113f, + 137616.22619878338f, + 137641.90745582676f, + 137667.58991082967f, + 137693.27356368033f, + 137718.95841426702f, + 137744.64446247809f, + 137770.33170820182f, + 137796.0201513266f, + 137821.7097917408f, + 137847.40062933284f, + 137873.09266399115f, + 137898.78589560417f, + 137924.48032406042f, + 137950.17594924837f, + 137975.8727710566f, + 138001.57078937365f, + 138027.27000408815f, + 138052.97041508864f, + 138078.67202226384f, + 138104.3748255024f, + 138130.07882469296f, + 138155.78401972432f, + 138181.49041048516f, + 138207.1979968643f, + 138232.9067787505f, + 138258.61675603263f, + 138284.3279285995f, + 138310.04029633995f, + 138335.75385914298f, + 138361.46861689744f, + 138387.18456949232f, + 138412.9017168166f, + 138438.62005875923f, + 138464.3395952093f, + 138490.06032605586f, + 138515.78225118798f, + 138541.50537049473f, + 138567.2296838653f, + 138592.95519118884f, + 138618.6818923545f, + 138644.40978725153f, + 138670.13887576913f, + 138695.86915779658f, + 138721.60063322316f, + 138747.33330193823f, + 138773.06716383106f, + 138798.80221879104f, + 138824.53846670757f, + 138850.27590747006f, + 138876.01454096794f, + 138901.7543670907f, + 138927.49538572782f, + 138953.2375967688f, + 138978.9810001032f, + 139004.7255956206f, + 139030.4713832106f, + 139056.2183627628f, + 139081.96653416683f, + 139107.7158973124f, + 139133.46645208917f, + 139159.2181983869f, + 139184.97113609532f, + 139210.7252651042f, + 139236.48058530336f, + 139262.23709658257f, + 139287.99479883176f, + 139313.75369194074f, + 139339.51377579942f, + 139365.27505029776f, + 139391.03751532568f, + 139416.80117077316f, + 139442.56601653024f, + 139468.3320524869f, + 139494.09927853322f, + 139519.86769455927f, + 139545.63730045516f, + 139571.408096111f, + 139597.18008141697f, + 139622.95325626322f, + 139648.72762054f, + 139674.5031741375f, + 139700.27991694602f, + 139726.0578488558f, + 139751.83696975713f, + 139777.61727954043f, + 139803.39877809596f, + 139829.18146531415f, + 139854.9653410854f, + 139880.75040530015f, + 139906.53665784886f, + 139932.324098622f, + 139958.11272751007f, + 139983.90254440365f, + 140009.69354919327f, + 140035.4857417695f, + 140061.27912202294f, + 140087.07368984428f, + 140112.86944512415f, + 140138.6663877532f, + 140164.4645176222f, + 140190.26383462187f, + 140216.06433864293f, + 140241.86602957622f, + 140267.66890731253f, + 140293.47297174268f, + 140319.27822275754f, + 140345.08466024802f, + 140370.89228410498f, + 140396.70109421943f, + 140422.51109048226f, + 140448.32227278448f, + 140474.13464101712f, + 140499.94819507122f, + 140525.7629348378f, + 140551.578860208f, + 140577.3959710729f, + 140603.21426732364f, + 140629.03374885136f, + 140654.8544155473f, + 140680.67626730262f, + 140706.49930400858f, + 140732.32352555645f, + 140758.1489318375f, + 140783.97552274304f, + 140809.80329816442f, + 140835.63225799298f, + 140861.46240212015f, + 140887.2937304373f, + 140913.12624283586f, + 140938.95993920733f, + 140964.79481944317f, + 140990.63088343487f, + 141016.468131074f, + 141042.30656225214f, + 141068.14617686084f, + 141093.98697479168f, + 141119.82895593636f, + 141145.6721201865f, + 141171.51646743377f, + 141197.36199756994f, + 141223.20871048668f, + 141249.05660607578f, + 141274.90568422904f, + 141300.75594483822f, + 141326.6073877952f, + 141352.4600129918f, + 141378.31382031992f, + 141404.16880967148f, + 141430.02498093838f, + 141455.8823340126f, + 141481.74086878612f, + 141507.60058515094f, + 141533.4614829991f, + 141559.32356222265f, + 141585.18682271364f, + 141611.0512643642f, + 141636.9168870665f, + 141662.78369071265f, + 141688.6516751948f, + 141714.5208404052f, + 141740.39118623605f, + 141766.26271257963f, + 141792.1354193282f, + 141818.00930637406f, + 141843.88437360956f, + 141869.760620927f, + 141895.6380482188f, + 141921.51665537735f, + 141947.39644229505f, + 141973.27740886438f, + 141999.15955497778f, + 142025.0428805278f, + 142050.9273854069f, + 142076.81306950765f, + 142102.69993272264f, + 142128.58797494444f, + 142154.4771960657f, + 142180.36759597904f, + 142206.25917457714f, + 142232.15193175265f, + 142258.04586739838f, + 142283.94098140698f, + 142309.83727367126f, + 142335.734744084f, + 142361.63339253806f, + 142387.5332189262f, + 142413.43422314132f, + 142439.33640507632f, + 142465.23976462413f, + 142491.14430167765f, + 142517.05001612983f, + 142542.95690787368f, + 142568.86497680223f, + 142594.77422280848f, + 142620.6846457855f, + 142646.5962456264f, + 142672.50902222423f, + 142698.42297547215f, + 142724.33810526333f, + 142750.25441149093f, + 142776.17189404817f, + 142802.09055282827f, + 142828.0103877245f, + 142853.93139863008f, + 142879.85358543837f, + 142905.77694804268f, + 142931.70148633636f, + 142957.62720021277f, + 142983.55408956532f, + 143009.48215428743f, + 143035.41139427255f, + 143061.34180941415f, + 143087.2733996057f, + 143113.20616474075f, + 143139.14010471283f, + 143165.0752194155f, + 143191.01150874238f, + 143216.94897258704f, + 143242.88761084314f, + 143268.82742340435f, + 143294.76841016437f, + 143320.71057101688f, + 143346.65390585564f, + 143372.59841457437f, + 143398.54409706692f, + 143424.490953227f, + 143450.43898294857f, + 143476.38818612538f, + 143502.33856265133f, + 143528.29011242036f, + 143554.24283532638f, + 143580.19673126334f, + 143606.1518001252f, + 143632.10804180597f, + 143658.0654561997f, + 143684.02404320036f, + 143709.98380270213f, + 143735.944734599f, + 143761.9068387852f, + 143787.87011515474f, + 143813.83456360188f, + 143839.8001840208f, + 143865.7669763057f, + 143891.7349403508f, + 143917.7040760504f, + 143943.67438329876f, + 143969.6458619902f, + 143995.61851201905f, + 144021.59233327967f, + 144047.56732566646f, + 144073.54348907378f, + 144099.52082339607f, + 144125.49932852783f, + 144151.4790043635f, + 144177.45985079758f, + 144203.44186772458f, + 144229.4250550391f, + 144255.40941263564f, + 144281.39494040885f, + 144307.3816382533f, + 144333.36950606373f, + 144359.35854373468f, + 144385.34875116093f, + 144411.34012823718f, + 144437.33267485813f, + 144463.32639091855f, + 144489.32127631325f, + 144515.31733093705f, + 144541.31455468474f, + 144567.3129474512f, + 144593.3125091313f, + 144619.31323961995f, + 144645.31513881206f, + 144671.31820660262f, + 144697.32244288657f, + 144723.3278475589f, + 144749.33442051467f, + 144775.34216164888f, + 144801.35107085665f, + 144827.36114803303f, + 144853.37239307314f, + 144879.38480587213f, + 144905.39838632516f, + 144931.41313432742f, + 144957.4290497741f, + 144983.44613256046f, + 145009.46438258173f, + 145035.48379973322f, + 145061.5043839102f, + 145087.52613500805f, + 145113.54905292206f, + 145139.57313754765f, + 145165.59838878017f, + 145191.6248065151f, + 145217.65239064783f, + 145243.68114107384f, + 145269.71105768863f, + 145295.74214038774f, + 145321.77438906668f, + 145347.807803621f, + 145373.8423839463f, + 145399.87812993818f, + 145425.9150414923f, + 145451.95311850426f, + 145477.9923608698f, + 145504.03276848458f, + 145530.07434124436f, + 145556.11707904484f, + 145582.1609817818f, + 145608.20604935108f, + 145634.25228164849f, + 145660.2996785698f, + 145686.34824001096f, + 145712.39796586783f, + 145738.4488560363f, + 145764.50091041232f, + 145790.55412889185f, + 145816.60851137087f, + 145842.66405774537f, + 145868.7207679114f, + 145894.778641765f, + 145920.83767920226f, + 145946.89788011924f, + 145972.95924441208f, + 145999.02177197693f, + 146025.08546270995f, + 146051.15031650732f, + 146077.21633326527f, + 146103.28351288004f, + 146129.3518552479f, + 146155.42136026506f, + 146181.49202782792f, + 146207.56385783272f, + 146233.63685017588f, + 146259.71100475377f, + 146285.78632146274f, + 146311.86280019928f, + 146337.94044085976f, + 146364.0192433407f, + 146390.09920753856f, + 146416.18033334985f, + 146442.26262067116f, + 146468.34606939898f, + 146494.43067942993f, + 146520.51645066062f, + 146546.60338298764f, + 146572.6914763077f, + 146598.7807305174f, + 146624.87114551352f, + 146650.96272119274f, + 146677.0554574518f, + 146703.14935418745f, + 146729.2444112965f, + 146755.34062867577f, + 146781.43800622207f, + 146807.53654383228f, + 146833.6362414033f, + 146859.73709883197f, + 146885.83911601527f, + 146911.94229285014f, + 146938.04662923355f, + 146964.15212506248f, + 146990.25878023397f, + 147016.36659464505f, + 147042.4755681928f, + 147068.58570077427f, + 147094.6969922866f, + 147120.80944262692f, + 147146.92305169237f, + 147173.03781938017f, + 147199.15374558745f, + 147225.2708302115f, + 147251.38907314953f, + 147277.5084742988f, + 147303.62903355664f, + 147329.75075082036f, + 147355.87362598727f, + 147381.99765895473f, + 147408.12284962015f, + 147434.2491978809f, + 147460.37670363448f, + 147486.50536677826f, + 147512.63518720976f, + 147538.76616482646f, + 147564.89829952587f, + 147591.03159120557f, + 147617.16603976308f, + 147643.301645096f, + 147669.43840710196f, + 147695.5763256786f, + 147721.71540072354f, + 147747.85563213445f, + 147773.9970198091f, + 147800.13956364512f, + 147826.28326354033f, + 147852.42811939248f, + 147878.57413109933f, + 147904.72129855872f, + 147930.8696216685f, + 147957.01910032652f, + 147983.16973443062f, + 148009.32152387875f, + 148035.47446856883f, + 148061.62856839882f, + 148087.78382326665f, + 148113.94023307035f, + 148140.09779770792f, + 148166.2565170774f, + 148192.41639107687f, + 148218.57741960438f, + 148244.73960255808f, + 148270.90293983606f, + 148297.0674313365f, + 148323.23307695755f, + 148349.39987659742f, + 148375.56783015432f, + 148401.73693752653f, + 148427.90719861226f, + 148454.07861330983f, + 148480.25118151752f, + 148506.42490313368f, + 148532.59977805667f, + 148558.77580618486f, + 148584.95298741665f, + 148611.13132165046f, + 148637.3108087847f, + 148663.4914487179f, + 148689.6732413485f, + 148715.85618657502f, + 148742.040284296f, + 148768.22553440998f, + 148794.41193681557f, + 148820.59949141133f, + 148846.7881980959f, + 148872.97805676793f, + 148899.16906732606f, + 148925.361229669f, + 148951.55454369547f, + 148977.74900930419f, + 149003.9446263939f, + 149030.14139486343f, + 149056.3393146115f, + 149082.538385537f, + 149108.73860753875f, + 149134.9399805156f, + 149161.14250436646f, + 149187.34617899026f, + 149213.5510042859f, + 149239.75698015234f, + 149265.96410648854f, + 149292.17238319354f, + 149318.38181016635f, + 149344.59238730598f, + 149370.80411451156f, + 149397.01699168212f, + 149423.2310187168f, + 149449.4461955147f, + 149475.66252197503f, + 149501.87999799693f, + 149528.0986234796f, + 149554.31839832227f, + 149580.53932242419f, + 149606.7613956846f, + 149632.98461800278f, + 149659.2089892781f, + 149685.43450940982f, + 149711.66117829733f, + 149737.88899584f, + 149764.11796193724f, + 149790.34807648844f, + 149816.5793393931f, + 149842.8117505506f, + 149869.0453098605f, + 149895.28001722222f, + 149921.51587253538f, + 149947.75287569952f, + 149973.99102661415f, + 150000.2303251789f, + 150026.47077129342f, + 150052.71236485732f, + 150078.95510577026f, + 150105.1989939319f, + 150131.444029242f, + 150157.69021160025f, + 150183.9375409064f, + 150210.18601706024f, + 150236.43563996154f, + 150262.68640951012f, + 150288.93832560582f, + 150315.19138814852f, + 150341.44559703805f, + 150367.70095217437f, + 150393.95745345735f, + 150420.215100787f, + 150446.4738940632f, + 150472.733833186f, + 150498.99491805542f, + 150525.25714857146f, + 150551.5205246342f, + 150577.7850461437f, + 150604.05071300003f, + 150630.31752510337f, + 150656.58548235384f, + 150682.8545846516f, + 150709.1248318968f, + 150735.39622398972f, + 150761.66876083054f, + 150787.9424423195f, + 150814.2172683569f, + 150840.49323884305f, + 150866.7703536782f, + 150893.04861276277f, + 150919.32801599705f, + 150945.60856328148f, + 150971.89025451642f, + 150998.1730896023f, + 151024.45706843957f, + 151050.74219092872f, + 151077.0284569702f, + 151103.31586646455f, + 151129.6044193123f, + 151155.894115414f, + 151182.1849546702f, + 151208.47693698155f, + 151234.77006224863f, + 151261.0643303721f, + 151287.35974125259f, + 151313.65629479082f, + 151339.95399088747f, + 151366.25282944329f, + 151392.55281035902f, + 151418.85393353543f, + 151445.1561988733f, + 151471.45960627345f, + 151497.76415563675f, + 151524.06984686397f, + 151550.3766798561f, + 151576.68465451393f, + 151602.99377073845f, + 151629.30402843058f, + 151655.61542749128f, + 151681.92796782157f, + 151708.24164932242f, + 151734.55647189484f, + 151760.87243543993f, + 151787.18953985872f, + 151813.50778505235f, + 151839.82717092187f, + 151866.14769736846f, + 151892.46936429327f, + 151918.79217159748f, + 151945.1161191823f, + 151971.4412069489f, + 151997.76743479856f, + 152024.09480263255f, + 152050.42331035214f, + 152076.75295785864f, + 152103.0837450534f, + 152129.41567183775f, + 152155.74873811303f, + 152182.08294378067f, + 152208.41828874208f, + 152234.7547728987f, + 152261.09239615197f, + 152287.43115840337f, + 152313.7710595544f, + 152340.11209950657f, + 152366.45427816146f, + 152392.79759542056f, + 152419.14205118554f, + 152445.48764535793f, + 152471.8343778394f, + 152498.1822485316f, + 152524.53125733617f, + 152550.88140415482f, + 152577.23268888926f, + 152603.5851114412f, + 152629.9386717124f, + 152656.29336960468f, + 152682.64920501978f, + 152709.00617785956f, + 152735.36428802583f, + 152761.72353542043f, + 152788.0839199453f, + 152814.4454415023f, + 152840.80809999333f, + 152867.1718953204f, + 152893.53682738543f, + 152919.9028960904f, + 152946.27010133737f, + 152972.63844302832f, + 152999.0079210653f, + 153025.3785353504f, + 153051.7502857857f, + 153078.12317227334f, + 153104.4971947154f, + 153130.8723530141f, + 153157.24864707157f, + 153183.62607679f, + 153210.00464207167f, + 153236.38434281875f, + 153262.76517893354f, + 153289.1471503183f, + 153315.53025687535f, + 153341.914498507f, + 153368.29987511563f, + 153394.68638660354f, + 153421.07403287315f, + 153447.4628138269f, + 153473.85272936718f, + 153500.24377939643f, + 153526.63596381716f, + 153553.02928253182f, + 153579.42373544298f, + 153605.81932245308f, + 153632.21604346478f, + 153658.61389838057f, + 153685.0128871031f, + 153711.41300953497f, + 153737.8142655788f, + 153764.21665513728f, + 153790.62017811305f, + 153817.02483440886f, + 153843.4306239274f, + 153869.8375465714f, + 153896.24560224364f, + 153922.65479084692f, + 153949.06511228404f, + 153975.4765664578f, + 154001.88915327107f, + 154028.3028726267f, + 154054.7177244276f, + 154081.13370857667f, + 154107.55082497682f, + 154133.969073531f, + 154160.38845414226f, + 154186.8089667135f, + 154213.23061114774f, + 154239.65338734805f, + 154266.07729521746f, + 154292.50233465908f, + 154318.92850557598f, + 154345.35580787127f, + 154371.7842414481f, + 154398.21380620962f, + 154424.64450205903f, + 154451.0763288995f, + 154477.50928663427f, + 154503.9433751666f, + 154530.3785943997f, + 154556.8149442369f, + 154583.25242458144f, + 154609.69103533673f, + 154636.13077640603f, + 154662.5716476928f, + 154689.01364910032f, + 154715.45678053208f, + 154741.90104189145f, + 154768.34643308193f, + 154794.79295400696f, + 154821.24060457002f, + 154847.68938467462f, + 154874.13929422433f, + 154900.59033312264f, + 154927.04250127316f, + 154953.49579857948f, + 154979.9502249452f, + 155006.40578027396f, + 155032.86246446942f, + 155059.32027743524f, + 155085.77921907514f, + 155112.2392892928f, + 155138.70048799197f, + 155165.16281507642f, + 155191.6262704499f, + 155218.09085401625f, + 155244.55656567923f, + 155271.0234053427f, + 155297.4913729106f, + 155323.96046828668f, + 155350.4306913749f, + 155376.9020420792f, + 155403.37452030348f, + 155429.8481259517f, + 155456.3228589279f, + 155482.79871913602f, + 155509.2757064801f, + 155535.75382086422f, + 155562.2330621924f, + 155588.71343036872f, + 155615.1949252973f, + 155641.67754688227f, + 155668.1612950278f, + 155694.64616963797f, + 155721.13217061706f, + 155747.6192978692f, + 155774.1075512987f, + 155800.59693080973f, + 155827.0874363066f, + 155853.5790676936f, + 155880.07182487496f, + 155906.56570775513f, + 155933.06071623837f, + 155959.5568502291f, + 155986.05410963166f, + 156012.5524943505f, + 156039.05200429005f, + 156065.55263935472f, + 156092.054399449f, + 156118.5572844774f, + 156145.06129434443f, + 156171.5664289546f, + 156198.07268821247f, + 156224.5800720226f, + 156251.0885802896f, + 156277.5982129181f, + 156304.10896981266f, + 156330.620850878f, + 156357.1338560188f, + 156383.6479851397f, + 156410.16323814544f, + 156436.67961494075f, + 156463.1971154304f, + 156489.71573951913f, + 156516.2354871118f, + 156542.7563581131f, + 156569.278352428f, + 156595.80146996127f, + 156622.32571061782f, + 156648.85107430254f, + 156675.37756092031f, + 156701.90517037612f, + 156728.4339025749f, + 156754.96375742165f, + 156781.4947348213f, + 156808.0268346789f, + 156834.5600568995f, + 156861.09440138817f, + 156887.62986804993f, + 156914.16645678994f, + 156940.70416751326f, + 156967.24300012505f, + 156993.78295453047f, + 157020.32403063469f, + 157046.8662283429f, + 157073.40954756032f, + 157099.9539881922f, + 157126.49955014378f, + 157153.04623332032f, + 157179.59403762716f, + 157206.14296296958f, + 157232.69300925292f, + 157259.24417638258f, + 157285.79646426387f, + 157312.3498728022f, + 157338.90440190304f, + 157365.46005147175f, + 157392.01682141385f, + 157418.57471163478f, + 157445.13372204005f, + 157471.69385253516f, + 157498.25510302564f, + 157524.81747341706f, + 157551.38096361503f, + 157577.9455735251f, + 157604.51130305286f, + 157631.07815210402f, + 157657.64612058416f, + 157684.21520839902f, + 157710.78541545427f, + 157737.3567416556f, + 157763.92918690876f, + 157790.50275111952f, + 157817.07743419363f, + 157843.65323603692f, + 157870.23015655516f, + 157896.80819565422f, + 157923.3873532399f, + 157949.96762921812f, + 157976.5490234948f, + 158003.13153597576f, + 158029.715166567f, + 158056.2999151745f, + 158082.88578170416f, + 158109.47276606198f, + 158136.06086815405f, + 158162.6500878863f, + 158189.24042516484f, + 158215.83187989573f, + 158242.42445198505f, + 158269.01814133892f, + 158295.61294786347f, + 158322.20887146486f, + 158348.80591204923f, + 158375.4040695228f, + 158402.00334379176f, + 158428.60373476235f, + 158455.2052423408f, + 158481.80786643337f, + 158508.4116069464f, + 158535.01646378616f, + 158561.62243685898f, + 158588.2295260712f, + 158614.8377313292f, + 158641.44705253936f, + 158668.05748960807f, + 158694.6690424418f, + 158721.28171094693f, + 158747.89549502998f, + 158774.5103945974f, + 158801.12640955573f, + 158827.74353981143f, + 158854.36178527112f, + 158880.9811458413f, + 158907.60162142856f, + 158934.22321193956f, + 158960.84591728085f, + 158987.4697373591f, + 159014.09467208097f, + 159040.72072135314f, + 159067.3478850823f, + 159093.9761631752f, + 159120.60555553852f, + 159147.23606207906f, + 159173.8676827036f, + 159200.5004173189f, + 159227.13426583182f, + 159253.76922814918f, + 159280.4053041778f, + 159307.0424938246f, + 159333.6807969965f, + 159360.32021360032f, + 159386.96074354305f, + 159413.60238673165f, + 159440.2451430731f, + 159466.88901247433f, + 159493.53399484244f, + 159520.18009008438f, + 159546.8272981072f, + 159573.47561881805f, + 159600.12505212397f, + 159626.77559793205f, + 159653.4272561494f, + 159680.08002668325f, + 159706.7339094407f, + 159733.38890432892f, + 159760.04501125516f, + 159786.70223012666f, + 159813.3605608506f, + 159840.02000333427f, + 159866.68055748497f, + 159893.34222320997f, + 159920.00500041663f, + 159946.66888901225f, + 159973.33388890422f, + 159999.99999999988f, + 160026.66722220668f, + 160053.33555543202f, + 160080.0049995833f, + 160106.675554568f, + 160133.3472202936f, + 160160.0199966676f, + 160186.6938835975f, + 160213.36888099083f, + 160240.04498875517f, + 160266.72220679803f, + 160293.4005350271f, + 160320.07997334987f, + 160346.76052167406f, + 160373.4421799073f, + 160400.1249479572f, + 160426.8088257315f, + 160453.49381313793f, + 160480.17991008417f, + 160506.86711647795f, + 160533.5554322271f, + 160560.24485723933f, + 160586.93539142248f, + 160613.62703468435f, + 160640.31978693279f, + 160667.0136480757f, + 160693.70861802087f, + 160720.40469667627f, + 160747.1018839498f, + 160773.80017974938f, + 160800.49958398298f, + 160827.20009655855f, + 160853.9017173841f, + 160880.60444636765f, + 160907.30828341722f, + 160934.0132284409f, + 160960.71928134665f, + 160987.4264420427f, + 161014.13471043704f, + 161040.84408643784f, + 161067.55456995327f, + 161094.26616089148f, + 161120.97885916062f, + 161147.69266466892f, + 161174.40757732463f, + 161201.12359703594f, + 161227.84072371112f, + 161254.55895725847f, + 161281.27829758628f, + 161307.99874460287f, + 161334.72029821656f, + 161361.4429583357f, + 161388.1667248687f, + 161414.8915977239f, + 161441.61757680977f, + 161468.34466203468f, + 161495.07285330712f, + 161521.80215053557f, + 161548.53255362847f, + 161575.26406249436f, + 161601.99667704175f, + 161628.7303971792f, + 161655.46522281526f, + 161682.2011538585f, + 161708.93819021754f, + 161735.676331801f, + 161762.4155785175f, + 161789.1559302757f, + 161815.89738698432f, + 161842.639948552f, + 161869.38361488748f, + 161896.1283858995f, + 161922.87426149676f, + 161949.62124158812f, + 161976.3693260823f, + 162003.1185148881f, + 162029.8688079144f, + 162056.62020507f, + 162083.37270626382f, + 162110.1263114047f, + 162136.88102040152f, + 162163.63683316324f, + 162190.3937495988f, + 162217.1517696171f, + 162243.91089312723f, + 162270.67112003808f, + 162297.43245025873f, + 162324.1948836982f, + 162350.9584202655f, + 162377.72305986975f, + 162404.48880242003f, + 162431.25564782543f, + 162458.0235959951f, + 162484.79264683815f, + 162511.56280026378f, + 162538.33405618116f, + 162565.1064144995f, + 162591.879875128f, + 162618.65443797593f, + 162645.43010295252f, + 162672.20686996708f, + 162698.98473892888f, + 162725.76370974723f, + 162752.54378233146f, + 162779.32495659095f, + 162806.10723243505f, + 162832.89060977317f, + 162859.67508851466f, + 162886.46066856902f, + 162913.24734984562f, + 162940.035132254f, + 162966.82401570358f, + 162993.6140001039f, + 163020.40508536444f, + 163047.19727139478f, + 163073.99055810447f, + 163100.78494540305f, + 163127.58043320014f, + 163154.37702140535f, + 163181.1747099283f, + 163207.97349867865f, + 163234.77338756606f, + 163261.57437650024f, + 163288.37646539084f, + 163315.17965414765f, + 163341.98394268038f, + 163368.78933089875f, + 163395.5958187126f, + 163422.40340603172f, + 163449.2120927659f, + 163476.02187882498f, + 163502.83276411882f, + 163529.6447485573f, + 163556.45783205028f, + 163583.2720145077f, + 163610.08729583945f, + 163636.90367595552f, + 163663.72115476584f, + 163690.53973218042f, + 163717.35940810922f, + 163744.18018246227f, + 163771.00205514964f, + 163797.82502608138f, + 163824.64909516752f, + 163851.4742623182f, + 163878.3005274435f, + 163905.12789045356f, + 163931.95635125853f, + 163958.78590976857f, + 163985.61656589387f, + 164012.44831954464f, + 164039.2811706311f, + 164066.11511906344f, + 164092.950164752f, + 164119.786307607f, + 164146.62354753874f, + 164173.46188445756f, + 164200.30131827376f, + 164227.1418488977f, + 164253.98347623978f, + 164280.82620021031f, + 164307.6700207198f, + 164334.51493767856f, + 164361.3609509971f, + 164388.20806058586f, + 164415.05626635533f, + 164441.905568216f, + 164468.75596607837f, + 164495.607459853f, + 164522.4600494504f, + 164549.31373478117f, + 164576.1685157559f, + 164603.02439228518f, + 164629.88136427966f, + 164656.7394316499f, + 164683.59859430668f, + 164710.4588521606f, + 164737.32020512238f, + 164764.18265310273f, + 164791.04619601235f, + 164817.91083376206f, + 164844.77656626256f, + 164871.6433934247f, + 164898.51131515924f, + 164925.38033137703f, + 164952.25044198887f, + 164979.1216469057f, + 165005.9939460383f, + 165032.86733929766f, + 165059.7418265946f, + 165086.61740784015f + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/LFE.java b/src/main/java/net/sourceforge/jaad/aac/syntax/LFE.java new file mode 100644 index 00000000..4dfca28f --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/LFE.java @@ -0,0 +1,61 @@ +package net.sourceforge.jaad.aac.syntax; + +import net.sourceforge.jaad.aac.DecoderConfig; +import net.sourceforge.jaad.aac.sbr.SBR; + +import java.util.List; + + +/** + * lfe_channel_element: Abbreviation LFE. + * + * Syntactic element that contains a low sampling frequency enhancement channel. + * The rules for the number of lfe_channel_element()’s and instance tags are + * as for single_channel_element’s. + */ + +class LFE extends SCE { + + public static final Type TYPE = Type.LFE; + + static class Tag extends SCE.Tag { + + protected Tag(int id) { + super(id); + } + + @Override + public boolean isChannelPair() { + return false; + } + + @Override + public Type getType() { + return TYPE; + } + + @Override + public ChannelElement newElement(DecoderConfig config) { + return new LFE(config, this); + } + } + + public static final List TAGS = Element.createTagList(16, Tag::new); + + LFE(DecoderConfig config, Tag tag) { + super(config, tag); + } + + protected SBR openSBR() { + return null; + } + + @Override + public boolean isChannelPair() { + return false; + } + + public boolean isLFE() { + return true; + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/PCE.java b/src/main/java/net/sourceforge/jaad/aac/syntax/PCE.java index c06d1bb1..00f34682 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/PCE.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/PCE.java @@ -1,152 +1,222 @@ package net.sourceforge.jaad.aac.syntax; +import java.util.List; +import java.util.logging.Logger; + import net.sourceforge.jaad.aac.AACException; +import net.sourceforge.jaad.aac.AudioDecoderInfo; +import net.sourceforge.jaad.aac.ChannelConfiguration; +import net.sourceforge.jaad.aac.DecoderConfig; import net.sourceforge.jaad.aac.Profile; import net.sourceforge.jaad.aac.SampleFrequency; -public class PCE extends Element { - - private static final int MAX_FRONT_CHANNEL_ELEMENTS = 16; - private static final int MAX_SIDE_CHANNEL_ELEMENTS = 16; - private static final int MAX_BACK_CHANNEL_ELEMENTS = 16; - private static final int MAX_LFE_CHANNEL_ELEMENTS = 4; - private static final int MAX_ASSOC_DATA_ELEMENTS = 8; - private static final int MAX_VALID_CC_ELEMENTS = 16; - - public static class TaggedElement { - - private final boolean isCPE; - private final int tag; - - public TaggedElement(boolean isCPE, int tag) { - this.isCPE = isCPE; - this.tag = tag; - } - - public boolean isIsCPE() { - return isCPE; - } - - public int getTag() { - return tag; - } - } - - public static class CCE { - - private final boolean isIndSW; - private final int tag; - - public CCE(boolean isIndSW, int tag) { - this.isIndSW = isIndSW; - this.tag = tag; - } - - public boolean isIsIndSW() { - return isIndSW; - } - - public int getTag() { - return tag; - } - } - private Profile profile; - private SampleFrequency sampleFrequency; - private int frontChannelElementsCount, sideChannelElementsCount, backChannelElementsCount; - private int lfeChannelElementsCount, assocDataElementsCount; - private int validCCElementsCount; - private boolean monoMixdown, stereoMixdown, matrixMixdownIDXPresent; - private int monoMixdownElementNumber, stereoMixdownElementNumber, matrixMixdownIDX; - private boolean pseudoSurround; - private final TaggedElement[] frontElements, sideElements, backElements; - private final int[] lfeElementTags; - private final int[] assocDataElementTags; - private final CCE[] ccElements; - private byte[] commentFieldData; - - public PCE() { - super(); - frontElements = new TaggedElement[MAX_FRONT_CHANNEL_ELEMENTS]; - sideElements = new TaggedElement[MAX_SIDE_CHANNEL_ELEMENTS]; - backElements = new TaggedElement[MAX_BACK_CHANNEL_ELEMENTS]; - lfeElementTags = new int[MAX_LFE_CHANNEL_ELEMENTS]; - assocDataElementTags = new int[MAX_ASSOC_DATA_ELEMENTS]; - ccElements = new CCE[MAX_VALID_CC_ELEMENTS]; - sampleFrequency = SampleFrequency.SAMPLE_FREQUENCY_NONE; - } - - public void decode(BitStream in) throws AACException { - readElementInstanceTag(in); - - profile = Profile.forInt(in.readBits(2)); - - sampleFrequency = SampleFrequency.forInt(in.readBits(4)); - - frontChannelElementsCount = in.readBits(4); - sideChannelElementsCount = in.readBits(4); - backChannelElementsCount = in.readBits(4); - lfeChannelElementsCount = in.readBits(2); - assocDataElementsCount = in.readBits(3); - validCCElementsCount = in.readBits(4); - - if(monoMixdown = in.readBool()) { - Constants.LOGGER.warning("mono mixdown present, but not yet supported"); - monoMixdownElementNumber = in.readBits(4); - } - if(stereoMixdown = in.readBool()) { - Constants.LOGGER.warning("stereo mixdown present, but not yet supported"); - stereoMixdownElementNumber = in.readBits(4); - } - if(matrixMixdownIDXPresent = in.readBool()) { - Constants.LOGGER.warning("matrix mixdown present, but not yet supported"); - matrixMixdownIDX = in.readBits(2); - pseudoSurround = in.readBool(); - } - - readTaggedElementArray(frontElements, in, frontChannelElementsCount); - - readTaggedElementArray(sideElements, in, sideChannelElementsCount); - - readTaggedElementArray(backElements, in, backChannelElementsCount); - - int i; - for(i = 0; i TAGS = Element.createTagList(32, Tag::new); + + /** + * Read a full PCE element with tag and content. + * + * @param in input stream to decode. + * @return a new program config element. + */ + public static PCE read(BitStream in) { + Tag tag = TAGS.get(in.readBits(4)); + PCE pce = new PCE(tag); + pce.decode(in); + return pce; + } + + private final Tag tag; + + @Override + public Tag getElementInstanceTag() { + return tag; + } + + private static final int MAX_FRONT_CHANNEL_ELEMENTS = 16; + private static final int MAX_SIDE_CHANNEL_ELEMENTS = 16; + private static final int MAX_BACK_CHANNEL_ELEMENTS = 16; + private static final int MAX_LFE_CHANNEL_ELEMENTS = 4; + private static final int MAX_ASSOC_DATA_ELEMENTS = 8; + private static final int MAX_VALID_CC_ELEMENTS = 16; + + public static class TaggedElement { + + private final boolean isCPE; + private final int tag; + + public TaggedElement(boolean isCPE, int tag) { + this.isCPE = isCPE; + this.tag = tag; + } + + public boolean isIsCPE() { + return isCPE; + } + + public int getTag() { + return tag; + } + } + + public static class CCE { + + private final boolean isIndSW; + private final int tag; + + public CCE(boolean isIndSW, int tag) { + this.isIndSW = isIndSW; + this.tag = tag; + } + + public boolean isIsIndSW() { + return isIndSW; + } + + public int getTag() { + return tag; + } + } + + private Profile profile; + private SampleFrequency sampleFrequency; + private int frontChannelElementsCount, sideChannelElementsCount, backChannelElementsCount; + private int lfeChannelElementsCount, assocDataElementsCount; + private int validCCElementsCount; + boolean monoMixdown, stereoMixdown, matrixMixdownIDXPresent; + int monoMixdownElementNumber, stereoMixdownElementNumber, matrixMixdownIDX; + boolean pseudoSurround; + private final TaggedElement[] frontElements, sideElements, backElements; + private final int[] lfeElementTags; + private final int[] assocDataElementTags; + private final CCE[] ccElements; + private byte[] commentFieldData; + + public PCE(Tag tag) { + this.tag = tag; + + frontElements = new TaggedElement[MAX_FRONT_CHANNEL_ELEMENTS]; + sideElements = new TaggedElement[MAX_SIDE_CHANNEL_ELEMENTS]; + backElements = new TaggedElement[MAX_BACK_CHANNEL_ELEMENTS]; + lfeElementTags = new int[MAX_LFE_CHANNEL_ELEMENTS]; + assocDataElementTags = new int[MAX_ASSOC_DATA_ELEMENTS]; + ccElements = new CCE[MAX_VALID_CC_ELEMENTS]; + sampleFrequency = SampleFrequency.SF_NONE; + } + + public void decode(BitStream in) throws AACException { + + profile = Profile.forInt(in.readBits(2)); + + sampleFrequency = SampleFrequency.decode(in); + + frontChannelElementsCount = in.readBits(4); + sideChannelElementsCount = in.readBits(4); + backChannelElementsCount = in.readBits(4); + lfeChannelElementsCount = in.readBits(2); + assocDataElementsCount = in.readBits(3); + validCCElementsCount = in.readBits(4); + + if (monoMixdown = in.readBool()) { + LOGGER.warning("mono mixdown present, but not yet supported"); + monoMixdownElementNumber = in.readBits(4); + } + if (stereoMixdown = in.readBool()) { + LOGGER.warning("stereo mixdown present, but not yet supported"); + stereoMixdownElementNumber = in.readBits(4); + } + if (matrixMixdownIDXPresent = in.readBool()) { + LOGGER.warning("matrix mixdown present, but not yet supported"); + matrixMixdownIDX = in.readBits(2); + pseudoSurround = in.readBool(); + } + + readTaggedElementArray(frontElements, in, frontChannelElementsCount); + + readTaggedElementArray(sideElements, in, sideChannelElementsCount); + + readTaggedElementArray(backElements, in, backChannelElementsCount); + + for (int i = 0; i < lfeChannelElementsCount; ++i) { + lfeElementTags[i] = in.readBits(4); + } + + for (int i = 0; i < assocDataElementsCount; ++i) { + assocDataElementTags[i] = in.readBits(4); + } + + for (int i = 0; i < validCCElementsCount; ++i) { + ccElements[i] = new CCE(in.readBool(), in.readBits(4)); + } + + in.byteAlign(); + + int commentFieldBytes = in.readBits(8); + commentFieldData = new byte[commentFieldBytes]; + for (int i = 0; i < commentFieldBytes; i++) { + commentFieldData[i] = (byte) in.readBits(8); + } + } + + private void readTaggedElementArray(TaggedElement[] te, BitStream in, int len) throws AACException { + for (int i = 0; i < len; ++i) { + te[i] = new TaggedElement(in.readBool(), in.readBits(4)); + } + } + + public Profile getProfile() { + return profile; + } + + public SampleFrequency getSampleFrequency() { + return sampleFrequency; + } + + public int getChannelCount() { + int count = lfeChannelElementsCount; // + assocDataElementsCount; + + for (int n = 0; n < frontChannelElementsCount; ++n) + count += frontElements[n].isCPE ? 2 : 1; + + for (int n = 0; n < sideChannelElementsCount; ++n) + count += sideElements[n].isCPE ? 2 : 1; + + for (int n = 0; n < backChannelElementsCount; ++n) + count += backElements[n].isCPE ? 2 : 1; + + return count; + } + + /** + * Turn this PCE into a known ChannelConfiguration. + * Todo: replace ChannelConfiguration by a preconfigured PCE. + * + * @return a matching ChannelConfiguration according its channel count. + */ + public ChannelConfiguration getChannelConfiguration() { + return ChannelConfiguration.forChannelCount(getChannelCount()); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/SCE.java b/src/main/java/net/sourceforge/jaad/aac/syntax/SCE.java new file mode 100644 index 00000000..b3810622 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/SCE.java @@ -0,0 +1,133 @@ +package net.sourceforge.jaad.aac.syntax; + +import java.util.List; +import java.util.function.Consumer; +import java.util.logging.Level; +import java.util.logging.Logger; + +import net.sourceforge.jaad.aac.DecoderConfig; +import net.sourceforge.jaad.aac.filterbank.FilterBank; +import net.sourceforge.jaad.aac.sbr.SBR; +import net.sourceforge.jaad.aac.sbr.SBR1; + + +/** + * single_channel_element: abbreviaton SCE. + *

+ * Syntactic element of the bitstream containing coded + * data for a single audio channel. A single_channel_element basically + * consists of an individual_channel_stream. There may be up to 16 + * such elements per raw data block, each one must have a unique + * element_instance_tag. + */ +class SCE extends ChannelElement { + + static final Logger LOGGER = Logger.getLogger(SCE.class.getName()); + + public static final Type TYPE = Type.SCE; + + static class Tag extends ChannelTag { + + protected Tag(int id) { + super(id); + } + + @Override + public boolean isChannelPair() { + return false; + } + + @Override + public Type getType() { + return TYPE; + } + + + @Override + public ChannelElement newElement(DecoderConfig config) { + return new SCE(config, this); + } + } + + public static final List TAGS = Element.createTagList(16, Tag::new); + + private final ICStream ics; + + SCE(DecoderConfig config, Tag tag) { + super(config, tag); + ics = new ICStream(config); + } + + protected SBR openSBR() { + return new SBR1(config); + } + + public void decode(BitStream in) { + super.decode(in); + ics.decode(in, false, config); + } + + public ICStream getICStream() { + return ics; + } + + @Override + public boolean isChannelPair() { + return false; + } + + @Override + public boolean isStereo() { + if (sbr != null && config.isSBREnabled()) { + //if(sbr.isPSUsed()) + return true; + } + + return false; + } + + public void process(FilterBank filterBank, List cces, Consumer target) { + + // inverse quantization + float[] iqData = ics.getInvQuantData(); + float[] dataL = getDataL(); + + // prediction + ics.processICP(); + + ics.processLTP(filterBank); + + // dependent coupling + processDependentCoupling(cces, CCE.BEFORE_TNS, iqData, null); + + // TNS + ics.processTNS(); + + // dependent coupling + processDependentCoupling(cces, CCE.AFTER_TNS, iqData, null); + + // filterbank + ics.process(dataL, filterBank); + + ics.updateLTP(dataL); + + // dependent coupling + processIndependentCoupling(cces, dataL, null); + + // gain control + ics.processGainControl(); + target.accept(dataL); + + // SBR + if (isSBRPresent() && config.isSBREnabled()) { + if (dataL.length != config.getSampleLength()) + LOGGER.log(Level.WARNING, "SBR data present, but buffer has normal size!"); + + float[] dataR = getDataR(); + getSBR().process(dataL, dataR); + target.accept(dataR); + } else if (dataL.length != config.getFrameLength()) { + SBR.upsample(dataL); + } + } +} diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/SCE_LFE.java b/src/main/java/net/sourceforge/jaad/aac/syntax/SCE_LFE.java deleted file mode 100644 index b909c43b..00000000 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/SCE_LFE.java +++ /dev/null @@ -1,23 +0,0 @@ -package net.sourceforge.jaad.aac.syntax; - -import net.sourceforge.jaad.aac.AACException; -import net.sourceforge.jaad.aac.DecoderConfig; - -class SCE_LFE extends Element { - - private final ICStream ics; - - SCE_LFE(int frameLength) { - super(); - ics = new ICStream(frameLength); - } - - void decode(BitStream in, DecoderConfig conf) throws AACException { - readElementInstanceTag(in); - ics.decode(in, false, conf); - } - - public ICStream getICStream() { - return ics; - } -} diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/ScaleFactorBands.java b/src/main/java/net/sourceforge/jaad/aac/syntax/ScaleFactorBands.java index d47914c4..4405cfc3 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/ScaleFactorBands.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/ScaleFactorBands.java @@ -2,110 +2,110 @@ interface ScaleFactorBands { - /* scalefactor-band tables end with -1, so that an error can be detected - by index[i+1] without an exception */ - int[] SWB_LONG_WINDOW_COUNT = { - 41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40 - }; - int[] SWB_OFFSET_1024_96 = { - 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, - 64, 72, 80, 88, 96, 108, 120, 132, 144, 156, 172, 188, 212, 240, - 276, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024, - -1 - }; - int[] SWB_OFFSET_1024_64 = { - 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, - 64, 72, 80, 88, 100, 112, 124, 140, 156, 172, 192, 216, 240, 268, - 304, 344, 384, 424, 464, 504, 544, 584, 624, 664, 704, 744, 784, 824, - 864, 904, 944, 984, 1024, - -1 - }; - int[] SWB_OFFSET_1024_48 = { - 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, - 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, - 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736, - 768, 800, 832, 864, 896, 928, 1024, - -1 - }; - int[] SWB_OFFSET_1024_32 = { - 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, - 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, - 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736, - 768, 800, 832, 864, 896, 928, 960, 992, 1024, - -1 - }; - int[] SWB_OFFSET_1024_24 = { - 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, - 76, 84, 92, 100, 108, 116, 124, 136, 148, 160, 172, 188, 204, 220, - 240, 260, 284, 308, 336, 364, 396, 432, 468, 508, 552, 600, 652, 704, - 768, 832, 896, 960, 1024, - -1 - }; - int[] SWB_OFFSET_1024_16 = { - 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 100, 112, 124, - 136, 148, 160, 172, 184, 196, 212, 228, 244, 260, 280, 300, 320, 344, - 368, 396, 424, 456, 492, 532, 572, 616, 664, 716, 772, 832, 896, 960, 1024, - -1 - }; - int[] SWB_OFFSET_1024_8 = { - 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 172, - 188, 204, 220, 236, 252, 268, 288, 308, 328, 348, 372, 396, 420, 448, - 476, 508, 544, 580, 620, 664, 712, 764, 820, 880, 944, 1024, - -1 - }; - int[][] SWB_OFFSET_LONG_WINDOW = { - SWB_OFFSET_1024_96, - SWB_OFFSET_1024_96, - SWB_OFFSET_1024_64, - SWB_OFFSET_1024_48, - SWB_OFFSET_1024_48, - SWB_OFFSET_1024_32, - SWB_OFFSET_1024_24, - SWB_OFFSET_1024_24, - SWB_OFFSET_1024_16, - SWB_OFFSET_1024_16, - SWB_OFFSET_1024_16, - SWB_OFFSET_1024_8 - }; - int[] SWB_SHORT_WINDOW_COUNT = { - 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15 - }; - int[] SWB_OFFSET_128_96 = { - 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128, - -1 - }; - int[] SWB_OFFSET_128_64 = { - 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128, - -1 - }; - int[] SWB_OFFSET_128_48 = { - 0, 4, 8, 12, 16, 20, 28, 36, 44, 56, 68, 80, 96, 112, 128, - -1 - }; - int[] SWB_OFFSET_128_24 = { - 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 64, 76, 92, 108, 128, - -1 - }; - int[] SWB_OFFSET_128_16 = { - 0, 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, 60, 72, 88, 108, 128, - -1 - }; - int[] SWB_OFFSET_128_8 = { - 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 60, 72, 88, 108, 128, - -1 - }; - int[][] SWB_OFFSET_SHORT_WINDOW = { - SWB_OFFSET_128_96, - SWB_OFFSET_128_96, - SWB_OFFSET_128_64, - SWB_OFFSET_128_48, - SWB_OFFSET_128_48, - SWB_OFFSET_128_48, - SWB_OFFSET_128_24, - SWB_OFFSET_128_24, - SWB_OFFSET_128_16, - SWB_OFFSET_128_16, - SWB_OFFSET_128_16, - SWB_OFFSET_128_8 - }; + /* scalefactor-band tables end with -1, so that an error can be detected + by index[i+1] without an exception */ + int[] SWB_LONG_WINDOW_COUNT = { + 41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40 + }; + int[] SWB_OFFSET_1024_96 = { + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, + 64, 72, 80, 88, 96, 108, 120, 132, 144, 156, 172, 188, 212, 240, + 276, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024, + -1 + }; + int[] SWB_OFFSET_1024_64 = { + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, + 64, 72, 80, 88, 100, 112, 124, 140, 156, 172, 192, 216, 240, 268, + 304, 344, 384, 424, 464, 504, 544, 584, 624, 664, 704, 744, 784, 824, + 864, 904, 944, 984, 1024, + -1 + }; + int[] SWB_OFFSET_1024_48 = { + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, + 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, + 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736, + 768, 800, 832, 864, 896, 928, 1024, + -1 + }; + int[] SWB_OFFSET_1024_32 = { + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, + 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, + 320, 352, 384, 416, 448, 480, 512, 544, 576, 608, 640, 672, 704, 736, + 768, 800, 832, 864, 896, 928, 960, 992, 1024, + -1 + }; + int[] SWB_OFFSET_1024_24 = { + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, + 76, 84, 92, 100, 108, 116, 124, 136, 148, 160, 172, 188, 204, 220, + 240, 260, 284, 308, 336, 364, 396, 432, 468, 508, 552, 600, 652, 704, + 768, 832, 896, 960, 1024, + -1 + }; + int[] SWB_OFFSET_1024_16 = { + 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 100, 112, 124, + 136, 148, 160, 172, 184, 196, 212, 228, 244, 260, 280, 300, 320, 344, + 368, 396, 424, 456, 492, 532, 572, 616, 664, 716, 772, 832, 896, 960, 1024, + -1 + }; + int[] SWB_OFFSET_1024_8 = { + 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 172, + 188, 204, 220, 236, 252, 268, 288, 308, 328, 348, 372, 396, 420, 448, + 476, 508, 544, 580, 620, 664, 712, 764, 820, 880, 944, 1024, + -1 + }; + int[][] SWB_OFFSET_LONG_WINDOW = { + SWB_OFFSET_1024_96, + SWB_OFFSET_1024_96, + SWB_OFFSET_1024_64, + SWB_OFFSET_1024_48, + SWB_OFFSET_1024_48, + SWB_OFFSET_1024_32, + SWB_OFFSET_1024_24, + SWB_OFFSET_1024_24, + SWB_OFFSET_1024_16, + SWB_OFFSET_1024_16, + SWB_OFFSET_1024_16, + SWB_OFFSET_1024_8 + }; + int[] SWB_SHORT_WINDOW_COUNT = { + 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15 + }; + int[] SWB_OFFSET_128_96 = { + 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128, + -1 + }; + int[] SWB_OFFSET_128_64 = { + 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128, + -1 + }; + int[] SWB_OFFSET_128_48 = { + 0, 4, 8, 12, 16, 20, 28, 36, 44, 56, 68, 80, 96, 112, 128, + -1 + }; + int[] SWB_OFFSET_128_24 = { + 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 64, 76, 92, 108, 128, + -1 + }; + int[] SWB_OFFSET_128_16 = { + 0, 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, 60, 72, 88, 108, 128, + -1 + }; + int[] SWB_OFFSET_128_8 = { + 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 60, 72, 88, 108, 128, + -1 + }; + int[][] SWB_OFFSET_SHORT_WINDOW = { + SWB_OFFSET_128_96, + SWB_OFFSET_128_96, + SWB_OFFSET_128_64, + SWB_OFFSET_128_48, + SWB_OFFSET_128_48, + SWB_OFFSET_128_48, + SWB_OFFSET_128_24, + SWB_OFFSET_128_24, + SWB_OFFSET_128_16, + SWB_OFFSET_128_16, + SWB_OFFSET_128_16, + SWB_OFFSET_128_8 + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/ScaleFactorTable.java b/src/main/java/net/sourceforge/jaad/aac/syntax/ScaleFactorTable.java index 1dfd9c1c..3594213e 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/ScaleFactorTable.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/ScaleFactorTable.java @@ -2,96 +2,97 @@ /** * Scalefactor lookup table + * * @author in-somnia */ interface ScaleFactorTable { - float[] SCALEFACTOR_TABLE = {8.881784E-16f, 1.0562281E-15f, 1.2560739E-15f, - 1.4937321E-15f, 1.7763568E-15f, 2.1124561E-15f, - 2.5121479E-15f, 2.9874642E-15f, 3.5527137E-15f, 4.2249122E-15f, 5.0242958E-15f, - 5.9749285E-15f, 7.1054274E-15f, 8.4498245E-15f, 1.00485916E-14f, 1.1949857E-14f, - 1.4210855E-14f, 1.6899649E-14f, 2.0097183E-14f, 2.3899714E-14f, 2.842171E-14f, - 3.3799298E-14f, 4.0194366E-14f, 4.7799428E-14f, 5.684342E-14f, 6.7598596E-14f, - 8.038873E-14f, 9.5598856E-14f, 1.1368684E-13f, 1.3519719E-13f, 1.6077747E-13f, - 1.9119771E-13f, 2.2737368E-13f, 2.7039438E-13f, 3.2155493E-13f, 3.8239542E-13f, - 4.5474735E-13f, 5.4078877E-13f, 6.4310986E-13f, 7.6479085E-13f, 9.094947E-13f, - 1.0815775E-12f, 1.2862197E-12f, 1.5295817E-12f, 1.8189894E-12f, 2.163155E-12f, - 2.5724394E-12f, 3.0591634E-12f, 3.6379788E-12f, 4.32631E-12f, 5.144879E-12f, - 6.1183268E-12f, 7.2759576E-12f, 8.65262E-12f, 1.0289758E-11f, 1.22366535E-11f, - 1.4551915E-11f, 1.730524E-11f, 2.0579516E-11f, 2.4473307E-11f, 2.910383E-11f, - 3.461048E-11f, 4.115903E-11f, 4.8946614E-11f, 5.820766E-11f, 6.922096E-11f, - 8.231806E-11f, 9.789323E-11f, 1.1641532E-10f, 1.3844192E-10f, 1.6463612E-10f, - 1.9578646E-10f, 2.3283064E-10f, 2.7688385E-10f, 3.2927225E-10f, 3.915729E-10f, - 4.656613E-10f, 5.537677E-10f, 6.585445E-10f, 7.831458E-10f, 9.313226E-10f, - 1.1075354E-9f, 1.317089E-9f, 1.5662917E-9f, 1.8626451E-9f, 2.2150708E-9f, - 2.634178E-9f, 3.1325833E-9f, 3.7252903E-9f, 4.4301416E-9f, 5.268356E-9f, - 6.2651666E-9f, 7.4505806E-9f, 8.860283E-9f, 1.0536712E-8f, 1.2530333E-8f, - 1.4901161E-8f, 1.7720566E-8f, 2.1073424E-8f, 2.5060666E-8f, 2.9802322E-8f, - 3.5441133E-8f, 4.2146848E-8f, 5.0121333E-8f, 5.9604645E-8f, 7.0882265E-8f, - 8.4293696E-8f, 1.00242666E-7f, 1.1920929E-7f, 1.4176453E-7f, 1.6858739E-7f, - 2.0048533E-7f, 2.3841858E-7f, 2.8352906E-7f, 3.3717478E-7f, 4.0097066E-7f, - 4.7683716E-7f, 5.670581E-7f, 6.7434956E-7f, 8.019413E-7f, 9.536743E-7f, - 1.1341162E-6f, 1.3486991E-6f, 1.6038827E-6f, 1.9073486E-6f, 2.2682325E-6f, - 2.6973983E-6f, 3.2077653E-6f, 3.8146973E-6f, 4.536465E-6f, 5.3947965E-6f, - 6.4155306E-6f, 7.6293945E-6f, 9.07293E-6f, 1.0789593E-5f, 1.2831061E-5f, - 1.5258789E-5f, 1.814586E-5f, 2.1579186E-5f, 2.5662122E-5f, 3.0517578E-5f, - 3.629172E-5f, 4.3158372E-5f, 5.1324245E-5f, 6.1035156E-5f, 7.258344E-5f, - 8.6316744E-5f, 1.0264849E-4f, 1.2207031E-4f, 1.4516688E-4f, 1.7263349E-4f, - 2.0529698E-4f, 2.4414062E-4f, 2.9033376E-4f, 3.4526698E-4f, 4.1059396E-4f, - 4.8828125E-4f, 5.806675E-4f, 6.9053395E-4f, 8.211879E-4f, 9.765625E-4f, - 0.001161335f, 0.0013810679f, 0.0016423758f, 0.001953125f, 0.00232267f, - 0.0027621358f, 0.0032847517f, 0.00390625f, 0.00464534f, 0.0055242716f, - 0.0065695033f, 0.0078125f, 0.00929068f, 0.011048543f, 0.013139007f, - 0.015625f, 0.01858136f, 0.022097087f, 0.026278013f, 0.03125f, - 0.03716272f, 0.044194173f, 0.052556027f, 0.0625f, 0.07432544f, - 0.088388346f, 0.10511205f, 0.125f, 0.14865088f, 0.17677669f, - 0.2102241f, 0.25f, 0.29730177f, 0.35355338f, 0.4204482f, - 0.5f, 0.59460354f, 0.70710677f, 0.8408964f, 1.0f, - 1.1892071f, 1.4142135f, 1.6817929f, 2.0f, 2.3784142f, - 2.828427f, 3.3635857f, 4.0f, 4.7568283f, 5.656854f, - 6.7271714f, 8.0f, 9.513657f, 11.313708f, 13.454343f, - 16.0f, 19.027313f, 22.627417f, 26.908686f, 32.0f, - 38.054626f, 45.254833f, 53.81737f, 64.0f, 76.10925f, - 90.50967f, 107.63474f, 128.0f, 152.2185f, 181.01933f, - 215.26949f, 256.0f, 304.437f, 362.03867f, 430.53897f, - 512.0f, 608.874f, 724.07733f, 861.07794f, 1024.0f, - 1217.748f, 1448.1547f, 1722.1559f, 2048.0f, 2435.496f, - 2896.3093f, 3444.3118f, 4096.0f, 4870.992f, 5792.6187f, - 6888.6235f, 8192.0f, 9741.984f, 11585.237f, 13777.247f, - 16384.0f, 19483.969f, 23170.475f, 27554.494f, 32768.0f, - 38967.938f, 46340.95f, 55108.99f, 65536.0f, 77935.875f, - 92681.9f, 110217.98f, 131072.0f, 155871.75f, 185363.8f, - 220435.95f, 262144.0f, 311743.5f, 370727.6f, 440871.9f, - 524288.0f, 623487.0f, 741455.2f, 881743.8f, 1048576.0f, - 1246974.0f, 1482910.4f, 1763487.6f, 2097152.0f, 2493948.0f, - 2965820.8f, 3526975.2f, 4194304.0f, 4987896.0f, 5931641.5f, - 7053950.5f, 8388608.0f, 9975792.0f, 1.1863283E7f, 1.4107901E7f, - 1.6777216E7f, 1.9951584E7f, 2.3726566E7f, 2.8215802E7f, 3.3554432E7f, - 3.9903168E7f, 4.7453132E7f, 5.6431604E7f, 6.7108864E7f, 7.9806336E7f, - 9.4906264E7f, 1.12863208E8f, 1.34217728E8f, 1.59612672E8f, 1.89812528E8f, - 2.25726416E8f, 2.68435456E8f, 3.19225344E8f, 3.79625056E8f, 4.51452832E8f, - 5.3687091E8f, 6.3845069E8f, 7.5925011E8f, 9.0290566E8f, 1.07374182E9f, - 1.27690138E9f, 1.51850022E9f, 1.80581133E9f, 2.14748365E9f, 2.55380275E9f, - 3.03700045E9f, 3.61162266E9f, 4.2949673E9f, 5.1076055E9f, 6.0740009E9f, - 7.2232453E9f, 8.5899346E9f, 1.0215211E10f, 1.21480018E10f, 1.44464906E10f, - 1.71798692E10f, 2.0430422E10f, 2.42960036E10f, 2.88929812E10f, 3.4359738E10f, - 4.0860844E10f, 4.8592007E10f, 5.7785962E10f, 6.8719477E10f, 8.1721688E10f, - 9.7184014E10f, 1.15571925E11f, 1.37438953E11f, 1.63443376E11f, 1.94368029E11f, - 2.3114385E11f, 2.74877907E11f, 3.26886752E11f, 3.88736057E11f, 4.622877E11f, - 5.4975581E11f, 6.537735E11f, 7.7747211E11f, 9.245754E11f, 1.09951163E12f, - 1.30754701E12f, 1.55494423E12f, 1.8491508E12f, 2.19902326E12f, 2.61509402E12f, - 3.10988846E12f, 3.6983016E12f, 4.3980465E12f, 5.230188E12f, 6.2197769E12f, - 7.3966032E12f, 8.796093E12f, 1.04603761E13f, 1.24395538E13f, 1.47932064E13f, - 1.7592186E13f, 2.09207521E13f, 2.48791077E13f, 2.95864128E13f, 3.5184372E13f, - 4.1841504E13f, 4.9758215E13f, 5.9172826E13f, 7.0368744E13f, 8.3683009E13f, - 9.9516431E13f, 1.18345651E14f, 1.40737488E14f, 1.67366017E14f, 1.99032861E14f, - 2.36691302E14f, 2.81474977E14f, 3.34732034E14f, 3.98065723E14f, 4.73382605E14f, - 5.6294995E14f, 6.6946407E14f, 7.9613145E14f, 9.4676521E14f, 1.12589991E15f, - 1.33892814E15f, 1.59226289E15f, 1.89353042E15f, 2.25179981E15f, 2.67785627E15f, - 3.18452578E15f, 3.78706084E15f, 4.5035996E15f, 5.3557125E15f, 6.3690516E15f, - 7.5741217E15f, 9.0071993E15f, 1.07114251E16f, 1.27381031E16f, 1.51482434E16f, - 1.80143985E16f, 2.14228502E16f, 2.54762063E16f, 3.02964867E16f, 3.6028797E16f, - 4.28457E16f, 5.0952413E16f, 6.0592973E16f, 7.2057594E16f, 8.5691401E16f, - 1.01904825E17f, 1.21185947E17f - }; + float[] SCALEFACTOR_TABLE = {8.881784E-16f, 1.0562281E-15f, 1.2560739E-15f, + 1.4937321E-15f, 1.7763568E-15f, 2.1124561E-15f, + 2.5121479E-15f, 2.9874642E-15f, 3.5527137E-15f, 4.2249122E-15f, 5.0242958E-15f, + 5.9749285E-15f, 7.1054274E-15f, 8.4498245E-15f, 1.00485916E-14f, 1.1949857E-14f, + 1.4210855E-14f, 1.6899649E-14f, 2.0097183E-14f, 2.3899714E-14f, 2.842171E-14f, + 3.3799298E-14f, 4.0194366E-14f, 4.7799428E-14f, 5.684342E-14f, 6.7598596E-14f, + 8.038873E-14f, 9.5598856E-14f, 1.1368684E-13f, 1.3519719E-13f, 1.6077747E-13f, + 1.9119771E-13f, 2.2737368E-13f, 2.7039438E-13f, 3.2155493E-13f, 3.8239542E-13f, + 4.5474735E-13f, 5.4078877E-13f, 6.4310986E-13f, 7.6479085E-13f, 9.094947E-13f, + 1.0815775E-12f, 1.2862197E-12f, 1.5295817E-12f, 1.8189894E-12f, 2.163155E-12f, + 2.5724394E-12f, 3.0591634E-12f, 3.6379788E-12f, 4.32631E-12f, 5.144879E-12f, + 6.1183268E-12f, 7.2759576E-12f, 8.65262E-12f, 1.0289758E-11f, 1.22366535E-11f, + 1.4551915E-11f, 1.730524E-11f, 2.0579516E-11f, 2.4473307E-11f, 2.910383E-11f, + 3.461048E-11f, 4.115903E-11f, 4.8946614E-11f, 5.820766E-11f, 6.922096E-11f, + 8.231806E-11f, 9.789323E-11f, 1.1641532E-10f, 1.3844192E-10f, 1.6463612E-10f, + 1.9578646E-10f, 2.3283064E-10f, 2.7688385E-10f, 3.2927225E-10f, 3.915729E-10f, + 4.656613E-10f, 5.537677E-10f, 6.585445E-10f, 7.831458E-10f, 9.313226E-10f, + 1.1075354E-9f, 1.317089E-9f, 1.5662917E-9f, 1.8626451E-9f, 2.2150708E-9f, + 2.634178E-9f, 3.1325833E-9f, 3.7252903E-9f, 4.4301416E-9f, 5.268356E-9f, + 6.2651666E-9f, 7.4505806E-9f, 8.860283E-9f, 1.0536712E-8f, 1.2530333E-8f, + 1.4901161E-8f, 1.7720566E-8f, 2.1073424E-8f, 2.5060666E-8f, 2.9802322E-8f, + 3.5441133E-8f, 4.2146848E-8f, 5.0121333E-8f, 5.9604645E-8f, 7.0882265E-8f, + 8.4293696E-8f, 1.00242666E-7f, 1.1920929E-7f, 1.4176453E-7f, 1.6858739E-7f, + 2.0048533E-7f, 2.3841858E-7f, 2.8352906E-7f, 3.3717478E-7f, 4.0097066E-7f, + 4.7683716E-7f, 5.670581E-7f, 6.7434956E-7f, 8.019413E-7f, 9.536743E-7f, + 1.1341162E-6f, 1.3486991E-6f, 1.6038827E-6f, 1.9073486E-6f, 2.2682325E-6f, + 2.6973983E-6f, 3.2077653E-6f, 3.8146973E-6f, 4.536465E-6f, 5.3947965E-6f, + 6.4155306E-6f, 7.6293945E-6f, 9.07293E-6f, 1.0789593E-5f, 1.2831061E-5f, + 1.5258789E-5f, 1.814586E-5f, 2.1579186E-5f, 2.5662122E-5f, 3.0517578E-5f, + 3.629172E-5f, 4.3158372E-5f, 5.1324245E-5f, 6.1035156E-5f, 7.258344E-5f, + 8.6316744E-5f, 1.0264849E-4f, 1.2207031E-4f, 1.4516688E-4f, 1.7263349E-4f, + 2.0529698E-4f, 2.4414062E-4f, 2.9033376E-4f, 3.4526698E-4f, 4.1059396E-4f, + 4.8828125E-4f, 5.806675E-4f, 6.9053395E-4f, 8.211879E-4f, 9.765625E-4f, + 0.001161335f, 0.0013810679f, 0.0016423758f, 0.001953125f, 0.00232267f, + 0.0027621358f, 0.0032847517f, 0.00390625f, 0.00464534f, 0.0055242716f, + 0.0065695033f, 0.0078125f, 0.00929068f, 0.011048543f, 0.013139007f, + 0.015625f, 0.01858136f, 0.022097087f, 0.026278013f, 0.03125f, + 0.03716272f, 0.044194173f, 0.052556027f, 0.0625f, 0.07432544f, + 0.088388346f, 0.10511205f, 0.125f, 0.14865088f, 0.17677669f, + 0.2102241f, 0.25f, 0.29730177f, 0.35355338f, 0.4204482f, + 0.5f, 0.59460354f, 0.70710677f, 0.8408964f, 1.0f, + 1.1892071f, 1.4142135f, 1.6817929f, 2.0f, 2.3784142f, + 2.828427f, 3.3635857f, 4.0f, 4.7568283f, 5.656854f, + 6.7271714f, 8.0f, 9.513657f, 11.313708f, 13.454343f, + 16.0f, 19.027313f, 22.627417f, 26.908686f, 32.0f, + 38.054626f, 45.254833f, 53.81737f, 64.0f, 76.10925f, + 90.50967f, 107.63474f, 128.0f, 152.2185f, 181.01933f, + 215.26949f, 256.0f, 304.437f, 362.03867f, 430.53897f, + 512.0f, 608.874f, 724.07733f, 861.07794f, 1024.0f, + 1217.748f, 1448.1547f, 1722.1559f, 2048.0f, 2435.496f, + 2896.3093f, 3444.3118f, 4096.0f, 4870.992f, 5792.6187f, + 6888.6235f, 8192.0f, 9741.984f, 11585.237f, 13777.247f, + 16384.0f, 19483.969f, 23170.475f, 27554.494f, 32768.0f, + 38967.938f, 46340.95f, 55108.99f, 65536.0f, 77935.875f, + 92681.9f, 110217.98f, 131072.0f, 155871.75f, 185363.8f, + 220435.95f, 262144.0f, 311743.5f, 370727.6f, 440871.9f, + 524288.0f, 623487.0f, 741455.2f, 881743.8f, 1048576.0f, + 1246974.0f, 1482910.4f, 1763487.6f, 2097152.0f, 2493948.0f, + 2965820.8f, 3526975.2f, 4194304.0f, 4987896.0f, 5931641.5f, + 7053950.5f, 8388608.0f, 9975792.0f, 1.1863283E7f, 1.4107901E7f, + 1.6777216E7f, 1.9951584E7f, 2.3726566E7f, 2.8215802E7f, 3.3554432E7f, + 3.9903168E7f, 4.7453132E7f, 5.6431604E7f, 6.7108864E7f, 7.9806336E7f, + 9.4906264E7f, 1.12863208E8f, 1.34217728E8f, 1.59612672E8f, 1.89812528E8f, + 2.25726416E8f, 2.68435456E8f, 3.19225344E8f, 3.79625056E8f, 4.51452832E8f, + 5.3687091E8f, 6.3845069E8f, 7.5925011E8f, 9.0290566E8f, 1.07374182E9f, + 1.27690138E9f, 1.51850022E9f, 1.80581133E9f, 2.14748365E9f, 2.55380275E9f, + 3.03700045E9f, 3.61162266E9f, 4.2949673E9f, 5.1076055E9f, 6.0740009E9f, + 7.2232453E9f, 8.5899346E9f, 1.0215211E10f, 1.21480018E10f, 1.44464906E10f, + 1.71798692E10f, 2.0430422E10f, 2.42960036E10f, 2.88929812E10f, 3.4359738E10f, + 4.0860844E10f, 4.8592007E10f, 5.7785962E10f, 6.8719477E10f, 8.1721688E10f, + 9.7184014E10f, 1.15571925E11f, 1.37438953E11f, 1.63443376E11f, 1.94368029E11f, + 2.3114385E11f, 2.74877907E11f, 3.26886752E11f, 3.88736057E11f, 4.622877E11f, + 5.4975581E11f, 6.537735E11f, 7.7747211E11f, 9.245754E11f, 1.09951163E12f, + 1.30754701E12f, 1.55494423E12f, 1.8491508E12f, 2.19902326E12f, 2.61509402E12f, + 3.10988846E12f, 3.6983016E12f, 4.3980465E12f, 5.230188E12f, 6.2197769E12f, + 7.3966032E12f, 8.796093E12f, 1.04603761E13f, 1.24395538E13f, 1.47932064E13f, + 1.7592186E13f, 2.09207521E13f, 2.48791077E13f, 2.95864128E13f, 3.5184372E13f, + 4.1841504E13f, 4.9758215E13f, 5.9172826E13f, 7.0368744E13f, 8.3683009E13f, + 9.9516431E13f, 1.18345651E14f, 1.40737488E14f, 1.67366017E14f, 1.99032861E14f, + 2.36691302E14f, 2.81474977E14f, 3.34732034E14f, 3.98065723E14f, 4.73382605E14f, + 5.6294995E14f, 6.6946407E14f, 7.9613145E14f, 9.4676521E14f, 1.12589991E15f, + 1.33892814E15f, 1.59226289E15f, 1.89353042E15f, 2.25179981E15f, 2.67785627E15f, + 3.18452578E15f, 3.78706084E15f, 4.5035996E15f, 5.3557125E15f, 6.3690516E15f, + 7.5741217E15f, 9.0071993E15f, 1.07114251E16f, 1.27381031E16f, 1.51482434E16f, + 1.80143985E16f, 2.14228502E16f, 2.54762063E16f, 3.02964867E16f, 3.6028797E16f, + 4.28457E16f, 5.0952413E16f, 6.0592973E16f, 7.2057594E16f, 8.5691401E16f, + 1.01904825E17f, 1.21185947E17f + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/syntax/SyntacticElements.java b/src/main/java/net/sourceforge/jaad/aac/syntax/SyntacticElements.java index 2249a45b..6c17f6f8 100644 --- a/src/main/java/net/sourceforge/jaad/aac/syntax/SyntacticElements.java +++ b/src/main/java/net/sourceforge/jaad/aac/syntax/SyntacticElements.java @@ -1,411 +1,246 @@ package net.sourceforge.jaad.aac.syntax; -import java.util.logging.Level; -import net.sourceforge.jaad.aac.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; + +import net.sourceforge.jaad.aac.AACException; +import net.sourceforge.jaad.aac.DecoderConfig; import net.sourceforge.jaad.aac.filterbank.FilterBank; -import net.sourceforge.jaad.aac.sbr.SBR; -import net.sourceforge.jaad.aac.tools.IS; -import net.sourceforge.jaad.aac.tools.LTPrediction; -import net.sourceforge.jaad.aac.tools.MS; - -public class SyntacticElements implements Constants { - - //global properties - private DecoderConfig config; - private boolean sbrPresent, psPresent; - private int bitsRead; - //elements - private final PCE pce; - private final Element[] elements; //SCE, LFE and CPE - private final CCE[] cces; - private final DSE[] dses; - private final FIL[] fils; - private int curElem, curCCE, curDSE, curFIL; - private float[][] data; - - public SyntacticElements(DecoderConfig config) { - this.config = config; - - pce = new PCE(); - elements = new Element[4*MAX_ELEMENTS]; - cces = new CCE[MAX_ELEMENTS]; - dses = new DSE[MAX_ELEMENTS]; - fils = new FIL[MAX_ELEMENTS]; - - startNewFrame(); - } - - public final void startNewFrame() { - curElem = 0; - curCCE = 0; - curDSE = 0; - curFIL = 0; - sbrPresent = false; - psPresent = false; - bitsRead = 0; - } - - public void decode(BitStream in) throws AACException { - final int start = in.getPosition(); //should be 0 - - int type; - Element prev = null; - boolean content = true; - if(!config.getProfile().isErrorResilientProfile()) { - while(content&&(type = in.readBits(3))!=ELEMENT_END) { - switch(type) { - case ELEMENT_SCE: - case ELEMENT_LFE: - LOGGER.finest("SCE"); - prev = decodeSCE_LFE(in); - break; - case ELEMENT_CPE: - LOGGER.finest("CPE"); - prev = decodeCPE(in); - break; - case ELEMENT_CCE: - LOGGER.finest("CCE"); - decodeCCE(in); - prev = null; - break; - case ELEMENT_DSE: - LOGGER.finest("DSE"); - decodeDSE(in); - prev = null; - break; - case ELEMENT_PCE: - LOGGER.finest("PCE"); - decodePCE(in); - prev = null; - break; - case ELEMENT_FIL: - LOGGER.finest("FIL"); - decodeFIL(in, prev); - prev = null; - break; - } - } - LOGGER.finest("END"); - content = false; - prev = null; - } - else { - //error resilient raw data block - switch(config.getChannelConfiguration()) { - case CHANNEL_CONFIG_MONO: - decodeSCE_LFE(in); - break; - case CHANNEL_CONFIG_STEREO: - decodeCPE(in); - break; - case CHANNEL_CONFIG_STEREO_PLUS_CENTER: - decodeSCE_LFE(in); - decodeCPE(in); - break; - case CHANNEL_CONFIG_STEREO_PLUS_CENTER_PLUS_REAR_MONO: - decodeSCE_LFE(in); - decodeCPE(in); - decodeSCE_LFE(in); - break; - case CHANNEL_CONFIG_FIVE: - decodeSCE_LFE(in); - decodeCPE(in); - decodeCPE(in); - break; - case CHANNEL_CONFIG_FIVE_PLUS_ONE: - decodeSCE_LFE(in); - decodeCPE(in); - decodeCPE(in); - decodeSCE_LFE(in); - break; - case CHANNEL_CONFIG_SEVEN_PLUS_ONE: - decodeSCE_LFE(in); - decodeCPE(in); - decodeCPE(in); - decodeCPE(in); - decodeSCE_LFE(in); - break; - default: - throw new AACException("unsupported channel configuration for error resilience: "+config.getChannelConfiguration()); - } - } - in.byteAlign(); - - bitsRead = in.getPosition()-start; - } - - private Element decodeSCE_LFE(BitStream in) throws AACException { - if(elements[curElem]==null) elements[curElem] = new SCE_LFE(config.getFrameLength()); - ((SCE_LFE) elements[curElem]).decode(in, config); - curElem++; - return elements[curElem-1]; - } - - private Element decodeCPE(BitStream in) throws AACException { - if(elements[curElem]==null) elements[curElem] = new CPE(config.getFrameLength()); - ((CPE) elements[curElem]).decode(in, config); - curElem++; - return elements[curElem-1]; - } - - private void decodeCCE(BitStream in) throws AACException { - if(curCCE==MAX_ELEMENTS) throw new AACException("too much CCE elements"); - if(cces[curCCE]==null) cces[curCCE] = new CCE(config.getFrameLength()); - cces[curCCE].decode(in, config); - curCCE++; - } - - private void decodeDSE(BitStream in) throws AACException { - if(curDSE==MAX_ELEMENTS) throw new AACException("too much CCE elements"); - if(dses[curDSE]==null) dses[curDSE] = new DSE(); - dses[curDSE].decode(in); - curDSE++; - } - - private void decodePCE(BitStream in) throws AACException { - pce.decode(in); - config.setProfile(pce.getProfile()); - config.setSampleFrequency(pce.getSampleFrequency()); - config.setChannelConfiguration(ChannelConfiguration.forInt(pce.getChannelCount())); - } - - private void decodeFIL(BitStream in, Element prev) throws AACException { - if(curFIL==MAX_ELEMENTS) throw new AACException("too much FIL elements"); - if(fils[curFIL]==null) fils[curFIL] = new FIL(config.isSBRDownSampled()); - fils[curFIL].decode(in, prev, config.getSampleFrequency(), config.isSBREnabled(), config.isSmallFrameUsed()); - curFIL++; - - if(prev!=null&&prev.isSBRPresent()) { - sbrPresent = true; - 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++; - final int mult = sbrPresent ? 2 : 1; - //only reallocate if needed - if(data==null||chs!=data.length||(mult*config.getFrameLength())!=data[0].length) data = new float[chs][mult*config.getFrameLength()]; - - int channel = 0; - Element e; - SCE_LFE scelfe; - CPE cpe; - for(int i = 0; i>8)&BYTE_MASK); - b[off+1] = (byte) (s&BYTE_MASK); - } - else { - b[off+1] = (byte) ((s>>8)&BYTE_MASK); - b[off] = (byte) (s&BYTE_MASK); - } - } - } - - buffer.setData(b, freq, chs, 16, bitsRead); - } + + +public class SyntacticElements { + + static final Logger LOGGER = Logger.getLogger(SyntacticElements.class.getName()); + + //global properties + + private DecoderConfig config; + + private final FilterBank filterBank; + + //elements + + private List cces = new ArrayList<>(); + + private final Map elements = new HashMap<>(); + + private final List audioElements = new ArrayList<>(); //SCE, LFE and CPE + + private List channels = new ArrayList<>(); + + private Element newElement(Element.InstanceTag tag) { + return tag.newElement(config); + } + + private Element getElement(Element.InstanceTag tag) { + return elements.computeIfAbsent(tag, this::newElement); + } + + public SyntacticElements(DecoderConfig config) { + this.config = config; + filterBank = new FilterBank(config.isSmallFrameUsed()); + + startNewFrame(); + } + + public final void startNewFrame() { + audioElements.clear(); + cces.clear(); + channels.clear(); + } + + public void decode(BitStream in) { + if (!config.getProfile().isErrorResilientProfile()) { + +loop: + do { + switch (Element.readType(in)) { + case SCE: + decode(SCE.TAGS, in); + break; + case CPE: + decode(CPE.TAGS, in); + break; + case CCE: + decode(CCE.TAGS, in); + break; + case LFE: + decode(LFE.TAGS, in); + break; + case DSE: + decode(DSE.TAGS, in); + break; + case PCE: + decode(PCE.TAGS, in); + break; + case FIL: + decodeFIL(in); + break; + case END: + break loop; + } + } while (true); + } else { + //error resilient raw data block + switch (config.getChannelConfiguration()) { + case MONO: + decode(SCE.TAGS, in); + break; + case STEREO: + decode(CPE.TAGS, in); + break; + case STEREO_PLUS_CENTER: + decode(SCE.TAGS, in); + decode(CPE.TAGS, in); + break; + case STEREO_PLUS_CENTER_PLUS_REAR_MONO: + decode(SCE.TAGS, in); + decode(CPE.TAGS, in); + decode(LFE.TAGS, in); + break; + case FIVE: + decode(SCE.TAGS, in); + decode(CPE.TAGS, in); + decode(CPE.TAGS, in); + break; + case FIVE_PLUS_ONE: + decode(SCE.TAGS, in); + decode(CPE.TAGS, in); + decode(CPE.TAGS, in); + decode(LFE.TAGS, in); + break; + case SEVEN_PLUS_ONE: + decode(SCE.TAGS, in); + decode(CPE.TAGS, in); + decode(CPE.TAGS, in); + decode(CPE.TAGS, in); + decode(LFE.TAGS, in); + break; + default: + throw new AACException("unsupported channel configuration for error resilience: " + config.getChannelConfiguration()); + } + } + in.byteAlign(); + + LOGGER.finest("END"); + } + + private Element decode(List tags, BitStream in) { + + int id = in.readBits(4); + Element.InstanceTag tag = tags.get(id); + + LOGGER.finest(tag.toString()); + + Element element = getElement(tag); + + element.decode(in); + + if (element instanceof ChannelElement) { + audioElements.add((ChannelElement) element); + } + + if (element instanceof CCE) { + cces.add((CCE) element); + } + + if (element instanceof PCE) { + PCE pce = (PCE) element; + config.setAudioDecoderInfo(pce); + } + + return element; + } + + private static final int EXT_FILL = 0; + private static final int EXT_FILL_DATA = 1; + private static final int EXT_DATA_ELEMENT = 2; + private static final int EXT_DYNAMIC_RANGE = 11; + private static final int EXT_SAC_DATA = 12; + private static final int EXT_SBR_DATA = 13; + private static final int EXT_SBR_DATA_CRC = 14; + + private void decodeFIL(BitStream in) { + + int count = in.readBits(4); + if (count == 15) + count += in.readBits(8) - 1; + + if (count == 0) + return; + + in = in.readSubStream(8 * count); + + int type = in.readBits(4); + + switch (type) { + case EXT_DYNAMIC_RANGE: + decodeDynamicRangeInfo(in); + break; + + case EXT_SBR_DATA: + case EXT_SBR_DATA_CRC: + decodeSBR(in, type); + break; + + case EXT_FILL: + case EXT_FILL_DATA: + break; + + case EXT_SAC_DATA: + decodeSAC(in); + break; + + case EXT_DATA_ELEMENT: + decodeExtData(in); + } + } + + private ChannelElement getLastAudioElement() { + int n = audioElements.size(); + return n == 0 ? null : audioElements.get(n - 1); + } + + private void decodeSBR(BitStream in, int type) { + ChannelElement prev = getLastAudioElement(); + if (prev != null) + prev.decodeSBR(in, (type == EXT_SBR_DATA_CRC)); + } + + // decoded but unused. + private DRC dri; + + private void decodeDynamicRangeInfo(BitStream in) { + if (dri == null) + dri = new DRC(); + + dri.decode(in); + } + + // Spatial Audio Coding (ISO/IEC 23003-1) + private void decodeSAC(BitStream in) { + + } + + private void decodeExtData(BitStream in) { + + } + + public List process() { + + channels.clear(); + + for (ChannelElement e : audioElements) { + e.process(filterBank, cces, channels::add); + } + + // upgrade to stereo + if (channels.size() == 1 && config.getChannelCount() > 1) + channels.add(channels.get(0)); + + return channels; + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/tools/ICPrediction.java b/src/main/java/net/sourceforge/jaad/aac/tools/ICPrediction.java index 9b473023..1da6d177 100644 --- a/src/main/java/net/sourceforge/jaad/aac/tools/ICPrediction.java +++ b/src/main/java/net/sourceforge/jaad/aac/tools/ICPrediction.java @@ -1,143 +1,137 @@ package net.sourceforge.jaad.aac.tools; +import java.util.logging.Level; +import java.util.logging.Logger; + import net.sourceforge.jaad.aac.AACException; import net.sourceforge.jaad.aac.SampleFrequency; import net.sourceforge.jaad.aac.syntax.BitStream; -import net.sourceforge.jaad.aac.syntax.Constants; import net.sourceforge.jaad.aac.syntax.ICSInfo; -import net.sourceforge.jaad.aac.syntax.ICStream; -import java.util.logging.Level; + /** * Intra-channel prediction used in profile Main + * * @author in-somnia */ public class ICPrediction { - private static final float SF_SCALE = 1.0f/-1024.0f; - private static final float INV_SF_SCALE = 1.0f/SF_SCALE; - private static final int MAX_PREDICTORS = 672; - private static final float A = 0.953125f; //61.0 / 64 - private static final float ALPHA = 0.90625f; //29.0 / 32 - private boolean predictorReset; - private int predictorResetGroup; - private boolean[] predictionUsed; - private PredictorState[] states; - - private static final class PredictorState { - - float cor0 = 0.0f; - float cor1 = 0.0f; - float var0 = 0.0f; - float var1 = 0.0f; - float r0 = 1.0f; - float r1 = 1.0f; - } - - public ICPrediction() { - states = new PredictorState[MAX_PREDICTORS]; - resetAllPredictors(); - } - - public void decode(BitStream in, int maxSFB, SampleFrequency sf) throws AACException { - final int predictorCount = sf.getPredictorCount(); - - if(predictorReset = in.readBool()) predictorResetGroup = in.readBits(5); - - final int maxPredSFB = sf.getMaximalPredictionSFB(); - final int length = Math.min(maxSFB, maxPredSFB); - predictionUsed = new boolean[length]; - for(int sfb = 0; sfb1 ? cor0*even(A/var0) : 0; - final float k2 = var1>1 ? cor1*even(A/var1) : 0; - - final float pv = round(k1*r0+k2*r1); - if(output) data[off] += pv*SF_SCALE; - - final float e0 = (data[off]*INV_SF_SCALE); - final float e1 = e0-k1*r0; - - state.cor1 = trunc(ALPHA*cor1+r1*e1); - state.var1 = trunc(ALPHA*var1+0.5f*(r1*r1+e1*e1)); - state.cor0 = trunc(ALPHA*cor0+r0*e0); - state.var0 = trunc(ALPHA*var0+0.5f*(r0*r0+e0*e0)); - - state.r1 = trunc(A*(r0-k1*e0)); - state.r0 = trunc(A*e0); - } - - private float round(float pf) { - return Float.intBitsToFloat((Float.floatToIntBits(pf)+0x00008000)&0xFFFF0000); - } - - private float even(float pf) { - int i = Float.floatToIntBits(pf); - i = (i+0x00007FFF+(i&0x00010000>>16))&0xFFFF0000; - return Float.intBitsToFloat(i); - } - - private float trunc(float pf) { - return Float.intBitsToFloat(Float.floatToIntBits(pf)&0xFFFF0000); - } + static final Logger LOGGER = Logger.getLogger(ICPrediction.class.getName()); + + private static final float SF_SCALE = 1.0f / -1024.0f; + private static final float INV_SF_SCALE = 1.0f / SF_SCALE; + private static final int MAX_PREDICTORS = 672; + private static final float A = 0.953125f; //61.0 / 64 + private static final float ALPHA = 0.90625f; //29.0 / 32 + private boolean predictorReset; + private int predictorResetGroup; + private boolean[] predictionUsed; + private PredictorState[] states; + + private static final class PredictorState { + + float cor0 = 0.0f; + float cor1 = 0.0f; + float var0 = 0.0f; + float var1 = 0.0f; + float r0 = 1.0f; + float r1 = 1.0f; + } + + public ICPrediction() { + states = new PredictorState[MAX_PREDICTORS]; + resetAllPredictors(); + } + + public void decode(BitStream in, int maxSFB, SampleFrequency sf) throws AACException { + int predictorCount = sf.getPredictorCount(); + + if (predictorReset = in.readBool()) predictorResetGroup = in.readBits(5); + + int maxPredSFB = sf.getMaximalPredictionSFB(); + int length = Math.min(maxSFB, maxPredSFB); + predictionUsed = new boolean[length]; + for (int sfb = 0; sfb < length; sfb++) { + predictionUsed[sfb] = in.readBool(); + } + LOGGER.log(Level.WARNING, "ICPrediction: maxSFB={0}, maxPredSFB={1}", new int[] {maxSFB, maxPredSFB}); + } + + public void process(ICSInfo info, float[] data) { + + if (info.isEightShortFrame()) + resetAllPredictors(); + else { + int len = info.getSFB(); + int[] swbOffsets = info.getSWBOffsets(); + for (int sfb = 0; sfb < len; sfb++) { + for (int k = swbOffsets[sfb]; k < swbOffsets[sfb + 1]; k++) { + predict(data, k, predictionUsed[sfb]); + } + } + if (predictorReset) + resetPredictorGroup(predictorResetGroup); + } + } + + private void resetPredictState(int index) { + if (states[index] == null) states[index] = new PredictorState(); + states[index].r0 = 0; + states[index].r1 = 0; + states[index].cor0 = 0; + states[index].cor1 = 0; + states[index].var0 = 0x3F80; + states[index].var1 = 0x3F80; + } + + private void resetAllPredictors() { + for (int i = 0; i < states.length; i++) { + resetPredictState(i); + } + } + + private void resetPredictorGroup(int group) { + for (int i = group - 1; i < states.length; i += 30) { + resetPredictState(i); + } + } + + private void predict(float[] data, int off, boolean output) { + if (states[off] == null) states[off] = new PredictorState(); + PredictorState state = states[off]; + float r0 = state.r0, r1 = state.r1; + float cor0 = state.cor0, cor1 = state.cor1; + float var0 = state.var0, var1 = state.var1; + + float k1 = var0 > 1 ? cor0 * even(A / var0) : 0; + float k2 = var1 > 1 ? cor1 * even(A / var1) : 0; + + float pv = round(k1 * r0 + k2 * r1); + if (output) data[off] += pv * SF_SCALE; + + float e0 = (data[off] * INV_SF_SCALE); + float e1 = e0 - k1 * r0; + + state.cor1 = trunc(ALPHA * cor1 + r1 * e1); + state.var1 = trunc(ALPHA * var1 + 0.5f * (r1 * r1 + e1 * e1)); + state.cor0 = trunc(ALPHA * cor0 + r0 * e0); + state.var0 = trunc(ALPHA * var0 + 0.5f * (r0 * r0 + e0 * e0)); + + state.r1 = trunc(A * (r0 - k1 * e0)); + state.r0 = trunc(A * e0); + } + + private float round(float pf) { + return Float.intBitsToFloat((Float.floatToIntBits(pf) + 0x00008000) & 0xFFFF0000); + } + + private float even(float pf) { + int i = Float.floatToIntBits(pf); + i = (i + 0x00007FFF + (i & 0x00010000 >> 16)) & 0xFFFF0000; + return Float.intBitsToFloat(i); + } + + private float trunc(float pf) { + return Float.intBitsToFloat(Float.floatToIntBits(pf) & 0xFFFF0000); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/tools/IS.java b/src/main/java/net/sourceforge/jaad/aac/tools/IS.java index 2262dc19..9ad1047a 100644 --- a/src/main/java/net/sourceforge/jaad/aac/tools/IS.java +++ b/src/main/java/net/sourceforge/jaad/aac/tools/IS.java @@ -2,56 +2,54 @@ import net.sourceforge.jaad.aac.huffman.HCB; import net.sourceforge.jaad.aac.syntax.CPE; -import net.sourceforge.jaad.aac.syntax.Constants; import net.sourceforge.jaad.aac.syntax.ICSInfo; import net.sourceforge.jaad.aac.syntax.ICStream; + /** * Intensity stereo + * * @author in-somnia */ -public final class IS implements Constants, ISScaleTable, HCB { +public final class IS implements ISScaleTable, HCB { - private IS() { - } + private IS() { + } - public static void process(CPE cpe, float[] specL, float[] specR) { - final ICStream ics = cpe.getRightChannel(); - final ICSInfo info = ics.getInfo(); - final int[] offsets = info.getSWBOffsets(); - final int windowGroups = info.getWindowGroupCount(); - final int maxSFB = info.getMaxSFB(); - final int[] sfbCB = ics.getSfbCB(); - final int[] sectEnd = ics.getSectEnd(); - final float[] scaleFactors = ics.getScaleFactors(); + public static void process(CPE cpe, float[] specL, float[] specR) { + ICStream ics = cpe.getRightChannel(); + ICSInfo info = ics.getInfo(); + int[] offsets = info.getSWBOffsets(); + int windowGroups = info.getWindowGroupCount(); + int maxSFB = info.getMaxSFB(); + int[] sfbCB = ics.getSfbCB(); + int[] sectEnd = ics.getSectEnd(); + float[] scaleFactors = ics.getScaleFactors(); - int w, i, j, c, end, off; - int idx = 0, groupOff = 0; - float scale; - for(int g = 0; g0.25*scaleFactor. + * * @author in-somnia */ interface ISScaleTable { - float[] SCALE_TABLE = { - 1.0f, - 0.8408964152537146f, - 0.7071067811865476f, - 0.5946035575013605f, - 0.5f, - 0.4204482076268573f, - 0.35355339059327373f, - 0.29730177875068026f, - 0.25f, - 0.21022410381342865f, - 0.17677669529663687f, - 0.14865088937534013f, - 0.125f, - 0.10511205190671433f, - 0.08838834764831843f, - 0.07432544468767006f, - 0.0625f, - 0.05255602595335716f, - 0.044194173824159216f, - 0.03716272234383503f, - 0.03125f, - 0.02627801297667858f, - 0.022097086912079608f, - 0.018581361171917516f, - 0.015625f, - 0.01313900648833929f, - 0.011048543456039804f, - 0.009290680585958758f, - 0.0078125f, - 0.006569503244169645f, - 0.005524271728019902f, - 0.004645340292979379f, - 0.00390625f, - 0.0032847516220848227f, - 0.002762135864009951f, - 0.0023226701464896895f, - 0.001953125f, - 0.0016423758110424114f, - 0.0013810679320049755f, - 0.0011613350732448448f, - 9.765625E-4f, - 8.211879055212057E-4f, - 6.905339660024878E-4f, - 5.806675366224224E-4f, - 4.8828125E-4f, - 4.1059395276060284E-4f, - 3.452669830012439E-4f, - 2.903337683112112E-4f, - 2.44140625E-4f, - 2.0529697638030142E-4f, - 1.7263349150062194E-4f, - 1.451668841556056E-4f, - 1.220703125E-4f, - 1.0264848819015071E-4f, - 8.631674575031097E-5f, - 7.25834420778028E-5f, - 6.103515625E-5f, - 5.1324244095075355E-5f, - 4.3158372875155485E-5f, - 3.62917210389014E-5f, - 3.0517578125E-5f, - 2.5662122047537677E-5f, - 2.1579186437577742E-5f, - 1.81458605194507E-5f, - 1.52587890625E-5f, - 1.2831061023768839E-5f, - 1.0789593218788871E-5f, - 9.07293025972535E-6f, - 7.62939453125E-6f, - 6.415530511884419E-6f, - 5.394796609394436E-6f, - 4.536465129862675E-6f, - 3.814697265625E-6f, - 3.2077652559422097E-6f, - 2.697398304697218E-6f, - 2.2682325649313374E-6f, - 1.9073486328125E-6f, - 1.6038826279711048E-6f, - 1.348699152348609E-6f, - 1.1341162824656687E-6f, - 9.5367431640625E-7f, - 8.019413139855524E-7f, - 6.743495761743044E-7f, - 5.670581412328344E-7f, - 4.76837158203125E-7f, - 4.009706569927762E-7f, - 3.371747880871522E-7f, - 2.835290706164172E-7f, - 2.384185791015625E-7f, - 2.004853284963881E-7f, - 1.685873940435761E-7f, - 1.417645353082086E-7f, - 1.1920928955078125E-7f, - 1.0024266424819405E-7f, - 8.429369702178806E-8f, - 7.08822676541043E-8f, - 5.9604644775390625E-8f, - 5.0121332124097026E-8f, - 4.214684851089403E-8f, - 3.544113382705215E-8f, - 2.9802322387695312E-8f, - 2.5060666062048513E-8f, - 2.1073424255447014E-8f, - 1.7720566913526073E-8f, - 1.4901161193847656E-8f, - 1.2530333031024257E-8f, - 1.0536712127723507E-8f, - 8.860283456763037E-9f, - 7.450580596923828E-9f, - 6.265166515512128E-9f, - 5.2683560638617535E-9f, - 4.430141728381518E-9f, - 3.725290298461914E-9f, - 3.132583257756064E-9f, - 2.6341780319308768E-9f, - 2.215070864190759E-9f, - 1.862645149230957E-9f, - 1.566291628878032E-9f, - 1.3170890159654384E-9f, - 1.1075354320953796E-9f, - 9.313225746154785E-10f, - 7.83145814439016E-10f, - 6.585445079827192E-10f, - 5.537677160476898E-10f, - 4.6566128730773926E-10f, - 3.91572907219508E-10f, - 3.292722539913596E-10f, - 2.768838580238449E-10f, - 2.3283064365386963E-10f, - 1.95786453609754E-10f, - 1.646361269956798E-10f, - 1.3844192901192245E-10f, - 1.1641532182693481E-10f, - 9.7893226804877E-11f, - 8.23180634978399E-11f, - 6.922096450596122E-11f, - 5.820766091346741E-11f, - 4.89466134024385E-11f, - 4.115903174891995E-11f, - 3.461048225298061E-11f, - 2.9103830456733704E-11f, - 2.447330670121925E-11f, - 2.0579515874459975E-11f, - 1.7305241126490306E-11f, - 1.4551915228366852E-11f, - 1.2236653350609626E-11f, - 1.0289757937229987E-11f, - 8.652620563245153E-12f, - 7.275957614183426E-12f, - 6.118326675304813E-12f, - 5.144878968614994E-12f, - 4.3263102816225765E-12f, - 3.637978807091713E-12f, - 3.0591633376524064E-12f, - 2.572439484307497E-12f, - 2.1631551408112883E-12f, - 1.8189894035458565E-12f, - 1.5295816688262032E-12f, - 1.2862197421537484E-12f, - 1.0815775704056441E-12f, - 9.094947017729282E-13f, - 7.647908344131016E-13f, - 6.431098710768742E-13f, - 5.407887852028221E-13f, - 4.547473508864641E-13f, - 3.823954172065508E-13f, - 3.215549355384371E-13f, - 2.7039439260141103E-13f, - 2.2737367544323206E-13f, - 1.911977086032754E-13f, - 1.6077746776921855E-13f, - 1.3519719630070552E-13f, - 1.1368683772161603E-13f, - 9.55988543016377E-14f, - 8.038873388460928E-14f, - 6.759859815035276E-14f, - 5.6843418860808015E-14f, - 4.779942715081885E-14f, - 4.019436694230464E-14f, - 3.379929907517638E-14f, - 2.8421709430404007E-14f, - 2.3899713575409425E-14f, - 2.009718347115232E-14f, - 1.689964953758819E-14f, - 1.4210854715202004E-14f, - 1.1949856787704712E-14f, - 1.004859173557616E-14f, - 8.449824768794095E-15f, - 7.105427357601002E-15f, - 5.974928393852356E-15f, - 5.02429586778808E-15f, - 4.2249123843970474E-15f, - 3.552713678800501E-15f, - 2.987464196926178E-15f, - 2.51214793389404E-15f, - 2.1124561921985237E-15f, - 1.7763568394002505E-15f, - 1.493732098463089E-15f, - 1.25607396694702E-15f, - 1.0562280960992619E-15f, - 8.881784197001252E-16f, - 7.468660492315445E-16f, - 6.2803698347351E-16f, - 5.281140480496309E-16f, - 4.440892098500626E-16f, - 3.7343302461577226E-16f, - 3.14018491736755E-16f, - 2.6405702402481546E-16f, - 2.220446049250313E-16f, - 1.8671651230788613E-16f, - 1.570092458683775E-16f, - 1.3202851201240773E-16f, - 1.1102230246251565E-16f, - 9.335825615394307E-17f, - 7.850462293418875E-17f, - 6.601425600620387E-17f, - 5.551115123125783E-17f, - 4.667912807697153E-17f, - 3.925231146709437E-17f, - 3.300712800310193E-17f, - 2.7755575615628914E-17f, - 2.3339564038485766E-17f, - 1.9626155733547187E-17f, - 1.6503564001550966E-17f, - 1.3877787807814457E-17f, - 1.1669782019242883E-17f, - 9.813077866773593E-18f, - 8.251782000775483E-18f, - 6.938893903907228E-18f, - 5.834891009621442E-18f, - 4.906538933386797E-18f, - 4.1258910003877416E-18f, - 3.469446951953614E-18f, - 2.917445504810721E-18f, - 2.4532694666933983E-18f, - 2.0629455001938708E-18f, - 1.734723475976807E-18f, - 1.4587227524053604E-18f, - 1.2266347333466992E-18f, - 1.0314727500969354E-18f, - 8.673617379884035E-19f, - 7.293613762026802E-19f, - 6.133173666733496E-19f, - 5.157363750484677E-19f, - 4.3368086899420177E-19f, - 3.646806881013401E-19f, - 3.066586833366748E-19f, - 2.5786818752423385E-19f, - 2.1684043449710089E-19f, - 1.8234034405067005E-19f, - 1.533293416683374E-19f, - 1.2893409376211693E-19f, - 1.0842021724855044E-19f, - 9.117017202533503E-20f, - 7.66646708341687E-20f - }; + float[] SCALE_TABLE = { + 1.0f, + 0.8408964152537146f, + 0.7071067811865476f, + 0.5946035575013605f, + 0.5f, + 0.4204482076268573f, + 0.35355339059327373f, + 0.29730177875068026f, + 0.25f, + 0.21022410381342865f, + 0.17677669529663687f, + 0.14865088937534013f, + 0.125f, + 0.10511205190671433f, + 0.08838834764831843f, + 0.07432544468767006f, + 0.0625f, + 0.05255602595335716f, + 0.044194173824159216f, + 0.03716272234383503f, + 0.03125f, + 0.02627801297667858f, + 0.022097086912079608f, + 0.018581361171917516f, + 0.015625f, + 0.01313900648833929f, + 0.011048543456039804f, + 0.009290680585958758f, + 0.0078125f, + 0.006569503244169645f, + 0.005524271728019902f, + 0.004645340292979379f, + 0.00390625f, + 0.0032847516220848227f, + 0.002762135864009951f, + 0.0023226701464896895f, + 0.001953125f, + 0.0016423758110424114f, + 0.0013810679320049755f, + 0.0011613350732448448f, + 9.765625E-4f, + 8.211879055212057E-4f, + 6.905339660024878E-4f, + 5.806675366224224E-4f, + 4.8828125E-4f, + 4.1059395276060284E-4f, + 3.452669830012439E-4f, + 2.903337683112112E-4f, + 2.44140625E-4f, + 2.0529697638030142E-4f, + 1.7263349150062194E-4f, + 1.451668841556056E-4f, + 1.220703125E-4f, + 1.0264848819015071E-4f, + 8.631674575031097E-5f, + 7.25834420778028E-5f, + 6.103515625E-5f, + 5.1324244095075355E-5f, + 4.3158372875155485E-5f, + 3.62917210389014E-5f, + 3.0517578125E-5f, + 2.5662122047537677E-5f, + 2.1579186437577742E-5f, + 1.81458605194507E-5f, + 1.52587890625E-5f, + 1.2831061023768839E-5f, + 1.0789593218788871E-5f, + 9.07293025972535E-6f, + 7.62939453125E-6f, + 6.415530511884419E-6f, + 5.394796609394436E-6f, + 4.536465129862675E-6f, + 3.814697265625E-6f, + 3.2077652559422097E-6f, + 2.697398304697218E-6f, + 2.2682325649313374E-6f, + 1.9073486328125E-6f, + 1.6038826279711048E-6f, + 1.348699152348609E-6f, + 1.1341162824656687E-6f, + 9.5367431640625E-7f, + 8.019413139855524E-7f, + 6.743495761743044E-7f, + 5.670581412328344E-7f, + 4.76837158203125E-7f, + 4.009706569927762E-7f, + 3.371747880871522E-7f, + 2.835290706164172E-7f, + 2.384185791015625E-7f, + 2.004853284963881E-7f, + 1.685873940435761E-7f, + 1.417645353082086E-7f, + 1.1920928955078125E-7f, + 1.0024266424819405E-7f, + 8.429369702178806E-8f, + 7.08822676541043E-8f, + 5.9604644775390625E-8f, + 5.0121332124097026E-8f, + 4.214684851089403E-8f, + 3.544113382705215E-8f, + 2.9802322387695312E-8f, + 2.5060666062048513E-8f, + 2.1073424255447014E-8f, + 1.7720566913526073E-8f, + 1.4901161193847656E-8f, + 1.2530333031024257E-8f, + 1.0536712127723507E-8f, + 8.860283456763037E-9f, + 7.450580596923828E-9f, + 6.265166515512128E-9f, + 5.2683560638617535E-9f, + 4.430141728381518E-9f, + 3.725290298461914E-9f, + 3.132583257756064E-9f, + 2.6341780319308768E-9f, + 2.215070864190759E-9f, + 1.862645149230957E-9f, + 1.566291628878032E-9f, + 1.3170890159654384E-9f, + 1.1075354320953796E-9f, + 9.313225746154785E-10f, + 7.83145814439016E-10f, + 6.585445079827192E-10f, + 5.537677160476898E-10f, + 4.6566128730773926E-10f, + 3.91572907219508E-10f, + 3.292722539913596E-10f, + 2.768838580238449E-10f, + 2.3283064365386963E-10f, + 1.95786453609754E-10f, + 1.646361269956798E-10f, + 1.3844192901192245E-10f, + 1.1641532182693481E-10f, + 9.7893226804877E-11f, + 8.23180634978399E-11f, + 6.922096450596122E-11f, + 5.820766091346741E-11f, + 4.89466134024385E-11f, + 4.115903174891995E-11f, + 3.461048225298061E-11f, + 2.9103830456733704E-11f, + 2.447330670121925E-11f, + 2.0579515874459975E-11f, + 1.7305241126490306E-11f, + 1.4551915228366852E-11f, + 1.2236653350609626E-11f, + 1.0289757937229987E-11f, + 8.652620563245153E-12f, + 7.275957614183426E-12f, + 6.118326675304813E-12f, + 5.144878968614994E-12f, + 4.3263102816225765E-12f, + 3.637978807091713E-12f, + 3.0591633376524064E-12f, + 2.572439484307497E-12f, + 2.1631551408112883E-12f, + 1.8189894035458565E-12f, + 1.5295816688262032E-12f, + 1.2862197421537484E-12f, + 1.0815775704056441E-12f, + 9.094947017729282E-13f, + 7.647908344131016E-13f, + 6.431098710768742E-13f, + 5.407887852028221E-13f, + 4.547473508864641E-13f, + 3.823954172065508E-13f, + 3.215549355384371E-13f, + 2.7039439260141103E-13f, + 2.2737367544323206E-13f, + 1.911977086032754E-13f, + 1.6077746776921855E-13f, + 1.3519719630070552E-13f, + 1.1368683772161603E-13f, + 9.55988543016377E-14f, + 8.038873388460928E-14f, + 6.759859815035276E-14f, + 5.6843418860808015E-14f, + 4.779942715081885E-14f, + 4.019436694230464E-14f, + 3.379929907517638E-14f, + 2.8421709430404007E-14f, + 2.3899713575409425E-14f, + 2.009718347115232E-14f, + 1.689964953758819E-14f, + 1.4210854715202004E-14f, + 1.1949856787704712E-14f, + 1.004859173557616E-14f, + 8.449824768794095E-15f, + 7.105427357601002E-15f, + 5.974928393852356E-15f, + 5.02429586778808E-15f, + 4.2249123843970474E-15f, + 3.552713678800501E-15f, + 2.987464196926178E-15f, + 2.51214793389404E-15f, + 2.1124561921985237E-15f, + 1.7763568394002505E-15f, + 1.493732098463089E-15f, + 1.25607396694702E-15f, + 1.0562280960992619E-15f, + 8.881784197001252E-16f, + 7.468660492315445E-16f, + 6.2803698347351E-16f, + 5.281140480496309E-16f, + 4.440892098500626E-16f, + 3.7343302461577226E-16f, + 3.14018491736755E-16f, + 2.6405702402481546E-16f, + 2.220446049250313E-16f, + 1.8671651230788613E-16f, + 1.570092458683775E-16f, + 1.3202851201240773E-16f, + 1.1102230246251565E-16f, + 9.335825615394307E-17f, + 7.850462293418875E-17f, + 6.601425600620387E-17f, + 5.551115123125783E-17f, + 4.667912807697153E-17f, + 3.925231146709437E-17f, + 3.300712800310193E-17f, + 2.7755575615628914E-17f, + 2.3339564038485766E-17f, + 1.9626155733547187E-17f, + 1.6503564001550966E-17f, + 1.3877787807814457E-17f, + 1.1669782019242883E-17f, + 9.813077866773593E-18f, + 8.251782000775483E-18f, + 6.938893903907228E-18f, + 5.834891009621442E-18f, + 4.906538933386797E-18f, + 4.1258910003877416E-18f, + 3.469446951953614E-18f, + 2.917445504810721E-18f, + 2.4532694666933983E-18f, + 2.0629455001938708E-18f, + 1.734723475976807E-18f, + 1.4587227524053604E-18f, + 1.2266347333466992E-18f, + 1.0314727500969354E-18f, + 8.673617379884035E-19f, + 7.293613762026802E-19f, + 6.133173666733496E-19f, + 5.157363750484677E-19f, + 4.3368086899420177E-19f, + 3.646806881013401E-19f, + 3.066586833366748E-19f, + 2.5786818752423385E-19f, + 2.1684043449710089E-19f, + 1.8234034405067005E-19f, + 1.533293416683374E-19f, + 1.2893409376211693E-19f, + 1.0842021724855044E-19f, + 9.117017202533503E-20f, + 7.66646708341687E-20f + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/tools/LTPrediction.java b/src/main/java/net/sourceforge/jaad/aac/tools/LTPrediction.java index 009ffad0..6e3d1072 100644 --- a/src/main/java/net/sourceforge/jaad/aac/tools/LTPrediction.java +++ b/src/main/java/net/sourceforge/jaad/aac/tools/LTPrediction.java @@ -1,144 +1,137 @@ package net.sourceforge.jaad.aac.tools; +import java.util.Arrays; + import net.sourceforge.jaad.aac.AACException; import net.sourceforge.jaad.aac.Profile; -import net.sourceforge.jaad.aac.SampleFrequency; import net.sourceforge.jaad.aac.filterbank.FilterBank; import net.sourceforge.jaad.aac.syntax.BitStream; -import net.sourceforge.jaad.aac.syntax.Constants; import net.sourceforge.jaad.aac.syntax.ICSInfo; import net.sourceforge.jaad.aac.syntax.ICStream; -import java.util.Arrays; + /** * Long-term prediction + * * @author in-somnia */ -public class LTPrediction implements Constants { - - private static final float[] CODEBOOK = { - 0.570829f, - 0.696616f, - 0.813004f, - 0.911304f, - 0.984900f, - 1.067894f, - 1.194601f, - 1.369533f - }; - private final int frameLength; - private final int[] states; - private int coef, lag, lastBand; - private boolean lagUpdate; - private boolean[] shortUsed, shortLagPresent, longUsed; - private int[] shortLag; - - public LTPrediction(int frameLength) { - this.frameLength = frameLength; - states = new int[4*frameLength]; - } - - public void decode(BitStream in, ICSInfo info, Profile profile) throws AACException { - lag = 0; - if(profile.equals(Profile.AAC_LD)) { - lagUpdate = in.readBool(); - if(lagUpdate) lag = in.readBits(10); - } - else lag = in.readBits(11); - if(lag>(frameLength<<1)) throw new AACException("LTP lag too large: "+lag); - coef = in.readBits(3); - - final int windowCount = info.getWindowCount(); - - if(info.isEightShortFrame()) { - shortUsed = new boolean[windowCount]; - shortLagPresent = new boolean[windowCount]; - shortLag = new int[windowCount]; - for(int w = 0; w (frameLength << 1)) throw new AACException("LTP lag too large: " + lag); + coef = in.readBits(3); + + int windowCount = info.getWindowCount(); + + if (info.isEightShortFrame()) { + shortUsed = new boolean[windowCount]; + shortLagPresent = new boolean[windowCount]; + shortLag = new int[windowCount]; + for (int w = 0; w < windowCount; w++) { + if ((shortUsed[w] = in.readBool())) { + shortLagPresent[w] = in.readBool(); + if (shortLagPresent[w]) shortLag[w] = in.readBits(4); + } + } + } else { + lastBand = Math.min(info.getMaxSFB(), MAX_LTP_SFB); + longUsed = new boolean[lastBand]; + for (int i = 0; i < lastBand; i++) { + longUsed[i] = in.readBool(); + } + } + } + + public void process(ICStream ics, FilterBank filterBank) { + if (!isPresent) return; + + float[] data = ics.getInvQuantData(); + + ICSInfo info = ics.getInfo(); + + if (!info.isEightShortFrame()) { + int samples = frameLength << 1; + float[] in = new float[2048]; + float[] out = new float[2048]; + + for (int i = 0; i < samples; i++) { + in[i] = states[samples + i - lag] * CODEBOOK[coef]; + } + + filterBank.processLTP(info.getWindowSequence(), info.getWindowShape(ICSInfo.CURRENT), info.getWindowShape(ICSInfo.PREVIOUS), in, out); + + ics.processTNS(out); + + int[] swbOffsets = info.getSWBOffsets(); + int swbOffsetMax = info.getSWBOffsetMax(); + int low, high, bin; + for (int sfb = 0; sfb < lastBand; sfb++) { + if (longUsed[sfb]) { + low = swbOffsets[sfb]; + high = Math.min(swbOffsets[sfb + 1], swbOffsetMax); + + for (bin = low; bin < high; bin++) { + data[bin] += out[bin]; + } + } + } + } + } + + public void updateState(float[] time, float[] overlap, Profile profile) { + int i; + if (profile.equals(Profile.AAC_LD)) { + for (i = 0; i < frameLength; i++) { + states[i] = states[i + frameLength]; + states[frameLength + i] = states[i + (frameLength * 2)]; + states[(frameLength * 2) + i] = Math.round(time[i]); + states[(frameLength * 3) + i] = Math.round(overlap[i]); + } + } else { + for (i = 0; i < frameLength; i++) { + states[i] = states[i + frameLength]; + states[frameLength + i] = Math.round(time[i]); + states[(frameLength * 2) + i] = Math.round(overlap[i]); + } + } + } + + public static boolean isLTPProfile(Profile profile) { + return profile.equals(Profile.AAC_LTP) || profile.equals(Profile.ER_AAC_LTP) || profile.equals(Profile.AAC_LD); + } + + public void copy(LTPrediction ltp) { + System.arraycopy(ltp.states, 0, states, 0, states.length); + coef = ltp.coef; + lag = ltp.lag; + lastBand = ltp.lastBand; + lagUpdate = ltp.lagUpdate; + shortUsed = Arrays.copyOf(ltp.shortUsed, ltp.shortUsed.length); + shortLagPresent = Arrays.copyOf(ltp.shortLagPresent, ltp.shortLagPresent.length); + shortLag = Arrays.copyOf(ltp.shortLag, ltp.shortLag.length); + longUsed = Arrays.copyOf(ltp.longUsed, ltp.longUsed.length); + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/tools/MS.java b/src/main/java/net/sourceforge/jaad/aac/tools/MS.java index f345ad46..d6107135 100644 --- a/src/main/java/net/sourceforge/jaad/aac/tools/MS.java +++ b/src/main/java/net/sourceforge/jaad/aac/tools/MS.java @@ -2,44 +2,43 @@ import net.sourceforge.jaad.aac.huffman.HCB; import net.sourceforge.jaad.aac.syntax.CPE; -import net.sourceforge.jaad.aac.syntax.Constants; import net.sourceforge.jaad.aac.syntax.ICSInfo; import net.sourceforge.jaad.aac.syntax.ICStream; + /** * Mid/side stereo + * * @author in-somnia */ -public final class MS implements Constants, HCB { +public final class MS implements HCB { - private MS() { - } + private MS() { + } - public static void process(CPE cpe, float[] specL, float[] specR) { - final ICStream ics = cpe.getLeftChannel(); - final ICSInfo info = ics.getInfo(); - final int[] offsets = info.getSWBOffsets(); - final int windowGroups = info.getWindowGroupCount(); - final int maxSFB = info.getMaxSFB(); - final int[] sfbCBl = ics.getSfbCB(); - final int[] sfbCBr = cpe.getRightChannel().getSfbCB(); - int groupOff = 0; - int g, i, w, j, idx = 0; + public static void process(CPE cpe, float[] specL, float[] specR) { + ICStream ics = cpe.getLeftChannel(); + ICSInfo info = ics.getInfo(); + int[] offsets = info.getSWBOffsets(); + int windowGroups = info.getWindowGroupCount(); + int maxSFB = info.getMaxSFB(); + int[] sfbCBl = ics.getSfbCB(); + int[] sfbCBr = cpe.getRightChannel().getSfbCB(); - for(g = 0; g20) throw new AACException("TNS filter out of range: "+order[w][filt]); - else if(order[w][filt]!=0) { - direction[w][filt] = in.readBool(); - coefCompress = in.readBit(); - coefLen = coefRes+3-coefCompress; - tmp = 2*coefCompress+coefRes; - - for(i = 0; i 20) + throw new AACException("TNS filter out of range: " + order[w][filt]); + else if (order[w][filt] != 0) { + direction[w][filt] = in.readBool(); + coefCompress = in.readBit(); + coefLen = coefRes + 3 - coefCompress; + tmp = 2 * coefCompress + coefRes; + + for (i = 0; i < order[w][filt]; i++) { + coef[w][filt][i] = TNS_TABLES[tmp][in.readBits(coefLen)]; + } + } + } + } + } + } + + public void process(ICStream ics, float[] spec, SampleFrequency sf, boolean decode) { + //TODO... + } } diff --git a/src/main/java/net/sourceforge/jaad/aac/tools/TNSTables.java b/src/main/java/net/sourceforge/jaad/aac/tools/TNSTables.java index 9277408a..a84826e4 100644 --- a/src/main/java/net/sourceforge/jaad/aac/tools/TNSTables.java +++ b/src/main/java/net/sourceforge/jaad/aac/tools/TNSTables.java @@ -3,24 +3,25 @@ /** * Tables of coefficients used for TNS. * The suffix indicates the values of coefCompress and coefRes. + * * @author in-somnia */ interface TNSTables { - float[] TNS_COEF_1_3 = { - 0.00000000f, -0.43388373f, 0.64278758f, 0.34202015f,}; - float[] TNS_COEF_0_3 = { - 0.00000000f, -0.43388373f, -0.78183150f, -0.97492790f, - 0.98480773f, 0.86602539f, 0.64278758f, 0.34202015f,}; - float[] TNS_COEF_1_4 = { - 0.00000000f, -0.20791170f, -0.40673664f, -0.58778524f, - 0.67369562f, 0.52643216f, 0.36124167f, 0.18374951f,}; - float[] TNS_COEF_0_4 = { - 0.00000000f, -0.20791170f, -0.40673664f, -0.58778524f, - -0.74314481f, -0.86602539f, -0.95105654f, -0.99452192f, - 0.99573416f, 0.96182561f, 0.89516330f, 0.79801720f, - 0.67369562f, 0.52643216f, 0.36124167f, 0.18374951f,}; - float[][] TNS_TABLES = { - TNS_COEF_0_3, TNS_COEF_0_4, TNS_COEF_1_3, TNS_COEF_1_4 - }; + float[] TNS_COEF_1_3 = { + 0.00000000f, -0.43388373f, 0.64278758f, 0.34202015f,}; + float[] TNS_COEF_0_3 = { + 0.00000000f, -0.43388373f, -0.78183150f, -0.97492790f, + 0.98480773f, 0.86602539f, 0.64278758f, 0.34202015f,}; + float[] TNS_COEF_1_4 = { + 0.00000000f, -0.20791170f, -0.40673664f, -0.58778524f, + 0.67369562f, 0.52643216f, 0.36124167f, 0.18374951f,}; + float[] TNS_COEF_0_4 = { + 0.00000000f, -0.20791170f, -0.40673664f, -0.58778524f, + -0.74314481f, -0.86602539f, -0.95105654f, -0.99452192f, + 0.99573416f, 0.96182561f, 0.89516330f, 0.79801720f, + 0.67369562f, 0.52643216f, 0.36124167f, 0.18374951f,}; + float[][] TNS_TABLES = { + TNS_COEF_0_3, TNS_COEF_0_4, TNS_COEF_1_3, TNS_COEF_1_4 + }; } diff --git a/src/main/java/net/sourceforge/jaad/aac/tools/Utils.java b/src/main/java/net/sourceforge/jaad/aac/tools/Utils.java new file mode 100644 index 00000000..f861fb56 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/aac/tools/Utils.java @@ -0,0 +1,49 @@ +package net.sourceforge.jaad.aac.tools; + +import java.util.*; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 27.12.20 + * Time: 18:59 + */ +public interface Utils { + + boolean isDebug = Boolean.parseBoolean(System.getProperty("net.sourceforge.jaad.debug", "false").toLowerCase(Locale.ROOT)); + + static boolean[] copyOf(boolean[] array) { + return array==null ? null : java.util.Arrays.copyOf(array, array.length); + } + + static int[] copyOf(int[] array) { + return array==null ? null : java.util.Arrays.copyOf(array, array.length); + } + + static float[] copyOf(float[] array) { + return array==null ? null : java.util.Arrays.copyOf(array, array.length); + } + + static void copyRange(int[] array, int srcPos, int destPos, int length) { + System.arraycopy(array, srcPos, array, destPos, length); + } + + static int clip(int idx, int min, int max) { + idx = Math.max(idx, min); + idx = Math.min(idx, max); + return idx; + } + + @SafeVarargs + static List listOf(E... elements) { + if (elements.length == 0) return Collections.emptyList(); + else return Collections.unmodifiableList(Arrays.asList(elements)); + } + + @SuppressWarnings("unchecked") + static List listCopyOf(Collection coll) { + if (coll == Collections.emptyList()) return (List) coll; + else return (List) listOf(coll.toArray()); + } + +} diff --git a/src/main/java/net/sourceforge/jaad/aac/transport/ADIFHeader.java b/src/main/java/net/sourceforge/jaad/aac/transport/ADIFHeader.java index 329e0224..f894d8fb 100644 --- a/src/main/java/net/sourceforge/jaad/aac/transport/ADIFHeader.java +++ b/src/main/java/net/sourceforge/jaad/aac/transport/ADIFHeader.java @@ -1,60 +1,58 @@ package net.sourceforge.jaad.aac.transport; -import net.sourceforge.jaad.aac.AACException; import net.sourceforge.jaad.aac.syntax.BitStream; import net.sourceforge.jaad.aac.syntax.PCE; + public final class ADIFHeader { - private static final long ADIF_ID = 0x41444946; //'ADIF' - private long id; - private boolean copyrightIDPresent; - private byte[] copyrightID; - private boolean originalCopy, home, bitstreamType; - private int bitrate; - private int pceCount; - private int[] adifBufferFullness; - private PCE[] pces; - - public static boolean isPresent(BitStream in) throws AACException { - return in.peekBits(32)==ADIF_ID; - } - - private ADIFHeader() { - copyrightID = new byte[9]; - } - - public static ADIFHeader readHeader(BitStream in) throws AACException { - final ADIFHeader h = new ADIFHeader(); - h.decode(in); - return h; - } - - private void decode(BitStream in) throws AACException { - int i; - id = in.readBits(32); //'ADIF' - copyrightIDPresent = in.readBool(); - if(copyrightIDPresent) { - for(i = 0; i<9; i++) { - copyrightID[i] = (byte) in.readBits(8); - } - } - originalCopy = in.readBool(); - home = in.readBool(); - bitstreamType = in.readBool(); - bitrate = in.readBits(23); - pceCount = in.readBits(4)+1; - pces = new PCE[pceCount]; - adifBufferFullness = new int[pceCount]; - for(i = 0; i0) { - i = in.read(); - left--; - if(i==0xFF) { - i = in.read(); - if((i&0xF6)==0xF0) found = true; - in.unread(i); - } - } - - if(found) frame = new ADTSFrame(din); - return found; - } - - public int getSampleFrequency() { - return frame.getSampleFrequency(); - } - - public int getChannelCount() { - return frame.getChannelCount(); - } + private static final int MAXIMUM_FRAME_SIZE = 6144; + private PushbackInputStream in; + private DataInputStream din; + private boolean first; + private ADTSFrame frame; + + public ADTSDemultiplexer(InputStream in) throws IOException { + this.in = new PushbackInputStream(in); + din = new DataInputStream(this.in); + first = true; + if (!findNextFrame()) throw new IOException("no ADTS header found"); + } + + public byte[] readNextFrame() throws IOException { + if (first) first = false; + else findNextFrame(); + + byte[] b = new byte[frame.getFrameLength()]; + din.readFully(b); + return b; + } + + private boolean findNextFrame() throws IOException { + // find next ADTS ID + boolean found = false; + int left = MAXIMUM_FRAME_SIZE; + int i; + while (!found && left > 0) { + i = in.read(); + left--; + if (i == 0xFF) { + i = in.read(); + if ((i & 0xF6) == 0xF0) found = true; + in.unread(i); + } + } + + if (found) frame = new ADTSFrame(din); + return found; + } + + public int getSampleFrequency() { + return frame.getSampleFrequency().getFrequency(); + } + + public int getChannelCount() { + return frame.getChannelConfiguration().getChannelCount(); + } + + public AudioDecoderInfo getDecoderInfo() { + return frame; + } } diff --git a/src/main/java/net/sourceforge/jaad/adts/ADTSFrame.java b/src/main/java/net/sourceforge/jaad/adts/ADTSFrame.java index 73ce218b..c1364aad 100644 --- a/src/main/java/net/sourceforge/jaad/adts/ADTSFrame.java +++ b/src/main/java/net/sourceforge/jaad/adts/ADTSFrame.java @@ -2,105 +2,97 @@ import java.io.DataInputStream; import java.io.IOException; + +import net.sourceforge.jaad.aac.AudioDecoderInfo; import net.sourceforge.jaad.aac.ChannelConfiguration; +import net.sourceforge.jaad.aac.Profile; import net.sourceforge.jaad.aac.SampleFrequency; -class ADTSFrame { - //fixed - private boolean id, protectionAbsent, privateBit, copy, home; - private int layer, profile, sampleFrequency, channelConfiguration; - //variable - private boolean copyrightIDBit, copyrightIDStart; - private int frameLength, adtsBufferFullness, rawDataBlockCount; - //error check - private int[] rawDataBlockPosition; - private int crcCheck; - //decoder specific info - private byte[] info; +class ADTSFrame implements AudioDecoderInfo { - ADTSFrame(DataInputStream in) throws IOException { - readHeader(in); + // fixed + private boolean id, protectionAbsent, privateBit, copy, home; + private int layer, profile, sampleFrequency, channelConfiguration; + // variable + private boolean copyrightIDBit, copyrightIDStart; + private int frameLength, adtsBufferFullness, rawDataBlockCount; + // error check + private int[] rawDataBlockPosition; + private int crcCheck; + // decoder specific info + private byte[] info; - if(!protectionAbsent) crcCheck = in.readUnsignedShort(); - if(rawDataBlockCount==0) { - //raw_data_block(); - } - else { - int i; - //header error check - if(!protectionAbsent) { - rawDataBlockPosition = new int[rawDataBlockCount]; - for(i = 0; i>3)&0x1)==1; - layer = (i>>1)&0x3; - protectionAbsent = (i&0x1)==1; + if (!protectionAbsent) crcCheck = in.readUnsignedShort(); + if (rawDataBlockCount == 0) { + //raw_data_block(); + } else { + int i; + //header error check + if (!protectionAbsent) { + rawDataBlockPosition = new int[rawDataBlockCount]; + for (i = 0; i < rawDataBlockCount; i++) { + rawDataBlockPosition[i] = in.readUnsignedShort(); + } + crcCheck = in.readUnsignedShort(); + } + //raw data blocks + for (i = 0; i < rawDataBlockCount; i++) { + //raw_data_block(); + if (!protectionAbsent) crcCheck = in.readUnsignedShort(); + } + } + } - //2 bits profile, 4 bits sample frequency, 1 bit private bit - i = in.read(); - profile = ((i>>6)&0x3)+1; - sampleFrequency = (i>>2)&0xF; - privateBit = ((i>>1)&0x1)==1; + private void readHeader(DataInputStream in) throws IOException { + //fixed header: + //1 bit ID, 2 bits layer, 1 bit protection absent + int i = in.read(); + id = ((i >> 3) & 0x1) == 1; + layer = (i >> 1) & 0x3; + protectionAbsent = (i & 0x1) == 1; - //3 bits channel configuration, 1 bit copy, 1 bit home - i = (i<<8)|in.read(); - channelConfiguration = ((i>>6)&0x7); - copy = ((i>>5)&0x1)==1; - home = ((i>>4)&0x1)==1; - //int emphasis = in.readBits(2); + //2 bits profile, 4 bits sample frequency, 1 bit private bit + i = in.read(); + profile = ((i >> 6) & 0x3) + 1; + sampleFrequency = (i >> 2) & 0xF; + privateBit = ((i >> 1) & 0x1) == 1; - //variable header: - //1 bit copyrightIDBit, 1 bit copyrightIDStart, 13 bits frame length, - //11 bits adtsBufferFullness, 2 bits rawDataBlockCount - copyrightIDBit = ((i>>3)&0x1)==1; - copyrightIDStart = ((i>>2)&0x1)==1; - i = (i<<16)|in.readUnsignedShort(); - frameLength = (i>>5)&0x1FFF; - i = (i<<8)|in.read(); - adtsBufferFullness = (i>>2)&0x7FF; - rawDataBlockCount = i&0x3; - } + //3 bits channel configuration, 1 bit copy, 1 bit home + i = (i << 8) | in.read(); + channelConfiguration = ((i >> 6) & 0x7); + copy = ((i >> 5) & 0x1) == 1; + home = ((i >> 4) & 0x1) == 1; + //int emphasis = in.readBits(2); - int getFrameLength() { - return frameLength-(protectionAbsent ? 7 : 9); - } + //variable header: + //1 bit copyrightIDBit, 1 bit copyrightIDStart, 13 bits frame length, + //11 bits adtsBufferFullness, 2 bits rawDataBlockCount + copyrightIDBit = ((i >> 3) & 0x1) == 1; + copyrightIDStart = ((i >> 2) & 0x1) == 1; + i = (i << 16) | in.readUnsignedShort(); + frameLength = (i >> 5) & 0x1FFF; + i = (i << 8) | in.read(); + adtsBufferFullness = (i >> 2) & 0x7FF; + rawDataBlockCount = i & 0x3; + } - byte[] createDecoderSpecificInfo() { - if(info==null) { - //5 bits profile, 4 bits sample frequency, 4 bits channel configuration - info = new byte[2]; - info[0] = (byte) (profile<<3); - info[0] |= (sampleFrequency>>1)&0x7; - info[1] = (byte) ((sampleFrequency&0x1)<<7); - info[1] |= (channelConfiguration<<3); - /*1 bit frame length flag, 1 bit depends on core coder, - 1 bit extension flag (all three currently 0)*/ - } + int getFrameLength() { + return frameLength - (protectionAbsent ? 7 : 9); + } - return info; - } + public Profile getProfile() { + return Profile.forInt(profile); + } - int getSampleFrequency() { - return SampleFrequency.forInt(sampleFrequency).getFrequency(); - } + public SampleFrequency getSampleFrequency() { + return SampleFrequency.forInt(sampleFrequency); + } - int getChannelCount() { - return ChannelConfiguration.forInt(channelConfiguration).getChannelCount(); - } + public ChannelConfiguration getChannelConfiguration() { + return ChannelConfiguration.forInt(channelConfiguration); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/MP4Container.java b/src/main/java/net/sourceforge/jaad/mp4/MP4Container.java index 694affcb..3b0e15b5 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/MP4Container.java +++ b/src/main/java/net/sourceforge/jaad/mp4/MP4Container.java @@ -1,15 +1,10 @@ package net.sourceforge.jaad.mp4; import java.io.IOException; -import java.io.InputStream; -import java.io.RandomAccessFile; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.logging.ConsoleHandler; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.Logger; + import net.sourceforge.jaad.mp4.api.Brand; import net.sourceforge.jaad.mp4.api.Movie; import net.sourceforge.jaad.mp4.boxes.Box; @@ -18,126 +13,107 @@ import net.sourceforge.jaad.mp4.boxes.impl.FileTypeBox; import net.sourceforge.jaad.mp4.boxes.impl.ProgressiveDownloadInformationBox; + /** * The MP4Container is the central class for the MP4 demultiplexer. It reads the * container and gives access to the containing data. - * + *

* The data source can be either an InputStream or a * RandomAccessFile. Since the specification does not decree a * specific order of the content, the data needed for parsing (the sample * tables) may be at the end of the stream. In this case, random access is * needed and reading from an InputSteam will cause an exception. - * Thus, whenever possible, a RandomAccessFile should be used for - * local files. Parsing from an InputStream is useful when reading + * Thus, whenever possible, a RandomAccessFile should be used for + * local files. Parsing from an InputStream is useful when reading * from a network stream. - * + *

* Each MP4Container can return the used file brand (file format * version). Optionally, the following data may be present: *

    *
  • progressive download informations: pairs of download rate and playback - * delay, see {@link #getDownloadInformationPairs() getDownloadInformationPairs()}
  • + * delay, see {@link ProgressiveDownloadInformationBox} *
  • a Movie
  • *
- * - * Additionally it gives access to the underlying MP4 boxes, that can be - * retrieved by getBoxes(). However, it is not recommended to + *

+ * Additionally it gives access to the underlying MP4 boxes, that can be + * retrieved by getBoxes(). However, it is not recommended to * access the boxes directly. - * + * * @author in-somnia */ public class MP4Container { - static { -// Logger log = Logger.getLogger("MP4 API"); -// for(Handler h : log.getHandlers()) { -// log.removeHandler(h); -// } -// log.setLevel(Level.WARNING); -// -// final ConsoleHandler h = new ConsoleHandler(); -// h.setLevel(Level.ALL); -// log.addHandler(h); - } - private final MP4InputStream in; - private final List boxes; - private Brand major, minor; - private Brand[] compatible; - private FileTypeBox ftyp; - private ProgressiveDownloadInformationBox pdin; - private Box moov; - private Movie movie; - - public MP4Container(InputStream in) throws IOException { - this.in = new MP4InputStream(in); - boxes = new ArrayList(); - - readContent(); - } + private final MP4Input in; + private final List boxes; + private Brand major, minor; + private Brand[] compatible; + private FileTypeBox ftyp; + private ProgressiveDownloadInformationBox pdin; + private Box moov; + private Movie movie; - public MP4Container(RandomAccessFile in) throws IOException { - this.in = new MP4InputStream(in); - boxes = new ArrayList(); + public MP4Container(MP4Input in) throws IOException { + this.in = in; + boxes = new ArrayList<>(); - readContent(); - } + readContent(); + } - private void readContent() throws IOException { - //read all boxes - Box box = null; - long type; - boolean moovFound = false; - while(in.hasLeft()) { - box = BoxFactory.parseBox(null, in); - if(boxes.isEmpty()&&box.getType()!=BoxTypes.FILE_TYPE_BOX) throw new MP4Exception("no MP4 signature found"); - boxes.add(box); + private void readContent() throws IOException { + //read all boxes + Box box = null; + long type; + boolean moovFound = false; + while (in.hasLeft()) { + box = BoxFactory.parseBox(null, in); + if (boxes.isEmpty() && box.getType() != BoxTypes.FILE_TYPE_BOX) + throw new MP4Exception("no MP4 signature found"); + boxes.add(box); - type = box.getType(); - if(type==BoxTypes.FILE_TYPE_BOX) { - if(ftyp==null) ftyp = (FileTypeBox) box; - } - else if(type==BoxTypes.MOVIE_BOX) { - if(movie==null) moov = box; - moovFound = true; - } - else if(type==BoxTypes.PROGRESSIVE_DOWNLOAD_INFORMATION_BOX) { - if(pdin==null) pdin = (ProgressiveDownloadInformationBox) box; - } - else if(type==BoxTypes.MEDIA_DATA_BOX) { - if(moovFound) break; - else if(!in.hasRandomAccess()) throw new MP4Exception("movie box at end of file, need random access"); - } - } - } + type = box.getType(); + if (type == BoxTypes.FILE_TYPE_BOX) { + if (ftyp == null) ftyp = (FileTypeBox) box; + } else if (type == BoxTypes.MOVIE_BOX) { + if (movie == null) moov = box; + moovFound = true; + } else if (type == BoxTypes.PROGRESSIVE_DOWNLOAD_INFORMATION_BOX) { + if (pdin == null) pdin = (ProgressiveDownloadInformationBox) box; + } else if (type == BoxTypes.MEDIA_DATA_BOX) { + if (moovFound) break; + else if (!in.hasRandomAccess()) throw new MP4Exception("movie box at end of file, need random access"); + } + } + } - public Brand getMajorBrand() { - if(major==null) major = Brand.forID(ftyp.getMajorBrand()); - return major; - } + public Brand getMajorBrand() { + if (major == null) major = Brand.forID(ftyp.getMajorBrand()); + return major; + } - public Brand getMinorBrand() { - if(minor==null) minor = Brand.forID(ftyp.getMajorBrand()); - return minor; - } + public Brand getMinorBrand() { + if (minor == null) minor = Brand.forID(ftyp.getMajorBrand()); + return minor; + } - public Brand[] getCompatibleBrands() { - if(compatible==null) { - final String[] s = ftyp.getCompatibleBrands(); - compatible = new Brand[s.length]; - for(int i = 0; i getBoxes() { - return Collections.unmodifiableList(boxes); - } + public List getBoxes() { + return Collections.unmodifiableList(boxes); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/MP4Exception.java b/src/main/java/net/sourceforge/jaad/mp4/MP4Exception.java index 388d20f1..b877d756 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/MP4Exception.java +++ b/src/main/java/net/sourceforge/jaad/mp4/MP4Exception.java @@ -2,9 +2,10 @@ import java.io.IOException; + public class MP4Exception extends IOException { - public MP4Exception(String message) { - super(message); - } + public MP4Exception(String message) { + super(message); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/MP4Input.java b/src/main/java/net/sourceforge/jaad/mp4/MP4Input.java new file mode 100644 index 00000000..b2c892b0 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/mp4/MP4Input.java @@ -0,0 +1,225 @@ +package net.sourceforge.jaad.mp4; + +import java.io.IOException; +import java.io.InputStream; +import java.io.RandomAccessFile; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 25.08.18 + * Time: 17:25 + */ +public interface MP4Input extends AutoCloseable { + + static MP4Input open(InputStream in) { + return new MP4InputStream(in); + } + + static MP4Input open(RandomAccessFile in) { + return new MP4RandomAccessStream(in); + } + + String UTF8 = "UTF-8"; + String UTF16 = "UTF-16"; + + /** + * Reads the next byte of data from the input. The value byte is returned as + * an int in the range 0 to 255. If no byte is available because the end of + * the stream has been reached, an EOFException is thrown. This method + * blocks until input data is available, the end of the stream is detected, + * or an I/O error occurs. + * + * @return the next byte of data + * @throws IOException If the end of the stream is detected or any I/O error occurs. + */ + int readByte() throws IOException; + + /** + * Reads len bytes of data from the input into the array + * b. If len is zero, then no bytes are read. + * + * This method blocks until all bytes could be read, the end of the stream + * is detected, or an I/O error occurs. + * + * If the stream ends before len bytes could be read an + * EOFException is thrown. + * + * @param b the buffer into which the data is read. + * @param off the start offset in array b at which the data is written. + * @param len the number of bytes to read. + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + */ + void readBytes(byte[] b, int off, int len) throws IOException; + + /** + * Reads up to eight bytes as a long value. This method blocks until all + * bytes could be read, the end of the stream is detected, or an I/O error + * occurs. + * + * @param n the number of bytes to read >0 and <=8 + * @return the read bytes as a long value + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + * @throws IndexOutOfBoundsException if n is not in the range + * [1...8] inclusive. + */ + long readBytes(int n) throws IOException; + + /** + * Reads data from the input stream and stores them into the buffer array b. + * This method blocks until all bytes could be read, the end of the stream + * is detected, or an I/O error occurs. + * If the length of b is zero, then no bytes are read. + * + * @param b the buffer into which the data is read. + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + */ + + void readBytes(byte[] b) throws IOException; + + /** + * Reads n bytes from the input as a String. The bytes are + * directly converted into characters. If not enough bytes could be read, an + * EOFException is thrown. + * This method blocks until all bytes could be read, the end of the stream + * is detected, or an I/O error occurs. + * + * @param n the length of the String. + * @return the String, that was read + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + */ + String readString(int n) throws IOException; + + /** + * Reads a null-terminated UTF-encoded String from the input. The maximum + * number of bytes that can be read before the null must appear must be + * specified. + * Although the method is preferred for unicode, the encoding can be any + * charset name, that is supported by the system. + * + * This method blocks until all bytes could be read, the end of the stream + * is detected, or an I/O error occurs. + * + * @param max the maximum number of bytes to read, before the null-terminator + * must appear. + * @param encoding the charset used to encode the String + * @return the decoded String + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + */ + String readUTFString(int max, String encoding) throws IOException; + + /** + * Reads a null-terminated UTF-encoded String from the input. The maximum + * number of bytes that can be read before the null must appear must be + * specified. + * The encoding is detected automatically, it may be UTF-8 or UTF-16 + * (determined by a byte order mask at the beginning). + * + * This method blocks until all bytes could be read, the end of the stream + * is detected, or an I/O error occurs. + * + * @param max the maximum number of bytes to read, before the null-terminator + * must appear. + * @return the decoded String + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + */ + String readUTFString(int max) throws IOException; + + /** + * Reads a byte array from the input that is terminated by a specific byte + * (the 'terminator'). The maximum number of bytes that can be read before + * the terminator must appear must be specified. + * + * The terminator will not be included in the returned array. + * + * This method blocks until all bytes could be read, the end of the stream + * is detected, or an I/O error occurs. + * + * @param max the maximum number of bytes to read, before the terminator + * must appear. + * @param terminator the byte that indicates the end of the array + * @return the buffer into which the data is read. + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + */ + byte[] readTerminated(int max, int terminator) throws IOException; + + /** + * Reads a fixed point number from the input. The number is read as a + * m.n value, that results from deviding an integer by + * 2n. + * + * @param m the number of bits before the point + * @param n the number of bits after the point + * @return a floating point number with the same value + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + * @throws IllegalArgumentException if the total number of bits (m+n) is not + * a multiple of eight + */ + double readFixedPoint(int m, int n) throws IOException; + + /** + * Skips n bytes in the input. This method blocks until all + * bytes could be skipped, the end of the stream is detected, or an I/O + * error occurs. + * + * @param n the number of bytes to skip + * @throws IOException If the end of the stream is detected, the input + * stream has been closed, or if some other I/O error occurs. + */ + void skipBytes(long n) throws IOException; + + /** + * Returns the current offset in the stream. + * + * @return the current offset + * @throws IOException if an I/O error occurs (only when using a RandomAccessFile) + */ + long getOffset() throws IOException; + + /** + * Seeks to a specific offset in the stream. This is only possible when + * using a RandomAccessFile. If an InputStream is used, this method throws + * an IOException. + * + * @param pos the offset position, measured in bytes from the beginning of the + * stream + * @throws IOException if an InputStream is used, pos is less than 0 or an + * I/O error occurs + */ + void seek(long pos) throws IOException; + + /** + * Indicates, if random access is available. That is, if this + * MP4InputStream was constructed with a RandomAccessFile. If + * this method returns false, seeking is not possible. + * + * @return true if random access is available + */ + boolean hasRandomAccess(); + + /** + * Indicates, if the input has some data left. + * + * @return true if there is at least one byte left + * @throws IOException if an I/O error occurs + */ + boolean hasLeft() throws IOException; + + + /** + * Closes the input and releases any system resources associated with it. + * Once the stream has been closed, further reading or skipping will throw + * an IOException. Closing a previously closed stream has no effect. + * + * @throws IOException if an I/O error occurs + */ + void close() throws IOException; +} diff --git a/src/main/java/net/sourceforge/jaad/mp4/MP4InputReader.java b/src/main/java/net/sourceforge/jaad/mp4/MP4InputReader.java new file mode 100644 index 00000000..e71fbed6 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/mp4/MP4InputReader.java @@ -0,0 +1,137 @@ +package net.sourceforge.jaad.mp4; + +import java.io.EOFException; +import java.io.IOException; +import java.nio.charset.Charset; +import java.util.Arrays; + +/** + * Created by IntelliJ IDEA. + * User: stueken + * Date: 01.09.18 + * Time: 13:49 + */ +abstract public class MP4InputReader implements MP4Input { + + private static final int BYTE_ORDER_MASK = 0xFEFF; + + // to be implemented + abstract protected int read() throws IOException; + abstract protected int read(byte[] b, int off, int len) throws IOException; + abstract protected long skip(int n) throws IOException; + + @Override + public int readByte() throws IOException { + int i = read(); + + if(i==-1){ + throw new EOFException(); + } + + return i; + } + + @Override + public void readBytes(byte[] b, int off, int len) throws IOException { + int read = 0; + + while(read8) + throw new IndexOutOfBoundsException("invalid number of bytes to read: "+n); + + byte[] b = new byte[n]; + readBytes(b, 0, n); + + long result = 0; + for(int i = 0; i peeked = new LinkedList(); - private long offset; //only used with InputStream - - /** - * Constructs an MP4InputStream that reads from an - * InputStream. It will have no random access, thus seeking - * will not be possible. - * - * @param in an InputStream to read from - */ - MP4InputStream(InputStream in) { - this.in = in; - fin = null; - offset = 0; - } - - /** - * Constructs an MP4InputStream that reads from a - * RandomAccessFile. It will have random access and seeking - * will be possible. - * - * @param in a RandomAccessFile to read from - */ - MP4InputStream(RandomAccessFile fin) { - this.fin = fin; - in = null; - } - - /** - * Peeks the next byte of data from the input. The value byte is returned as - * an int in the range 0 to 255. If no byte is available because the end of - * the stream has been reached, an EOFException is thrown. This method - * blocks until input data is available, the end of the stream is detected, - * or an I/O error occurs. - * - * @return the next byte of data - * @throws IOException If the end of the stream is detected or any I/O error occurs. - */ - public int peek() throws IOException { - int i = 0; - if(!peeked.isEmpty()){ - i = peeked.remove() & MASK8; - } - else if(in!=null){ - i = in.read(); - } - else if(fin!=null){ - long currentFilePointer = fin.getFilePointer(); - try{ - i = fin.read(); - }finally{ - fin.seek(currentFilePointer); - } - } - - if(i==-1){ - throw new EOFException(); - } - peeked.addFirst((byte) i); - return i; - } - - /** - * Reads the next byte of data from the input. The value byte is returned as - * an int in the range 0 to 255. If no byte is available because the end of - * the stream has been reached, an EOFException is thrown. This method - * blocks until input data is available, the end of the stream is detected, - * or an I/O error occurs. - * - * @return the next byte of data - * @throws IOException If the end of the stream is detected or any I/O error occurs. - */ - public int read() throws IOException { - int i = 0; - if(!peeked.isEmpty()){ - i = peeked.remove() & MASK8; - } - else if(in!=null){ - i = in.read(); - } - else if(fin!=null){ - i = fin.read(); - } - - if(i==-1){ - throw new EOFException(); - } - else if(in!=null){ - offset++; - } - return i; - } - - /** - * Peeks len bytes of data from the input into the array - * b. If len is zero, then no bytes are read. - * - * This method blocks until all bytes could be read, the end of the stream - * is detected, or an I/O error occurs. - * - * If the stream ends before len bytes could be read an - * EOFException is thrown. - * - * @param b the buffer into which the data is read. - * @param off the start offset in array b at which the data is written. - * @param len the number of bytes to read. - * @throws IOException If the end of the stream is detected, the input - * stream has been closed, or if some other I/O error occurs. - */ - public void peek(final byte[] b, int off, int len) throws IOException { - int read = 0; - int i = 0; - - while(readlen bytes of data from the input into the array - * b. If len is zero, then no bytes are read. - * - * This method blocks until all bytes could be read, the end of the stream - * is detected, or an I/O error occurs. - * - * If the stream ends before len bytes could be read an - * EOFException is thrown. - * - * @param b the buffer into which the data is read. - * @param off the start offset in array b at which the data is written. - * @param len the number of bytes to read. - * @throws IOException If the end of the stream is detected, the input - * stream has been closed, or if some other I/O error occurs. - */ - public void read(final byte[] b, int off, int len) throws IOException { - int read = 0; - int i = 0; - - while(read0 and <=8 - * @return the read bytes as a long value - * @throws IOException If the end of the stream is detected, the input - * stream has been closed, or if some other I/O error occurs. - * @throws IndexOutOfBoundsException if n is not in the range - * [1...8] inclusive. - */ - public long peekBytes(int n) throws IOException { - if(n<1||n>8) throw new IndexOutOfBoundsException("invalid number of bytes to read: "+n); - final byte[] b = new byte[n]; - peek(b, 0, n); - - long result = 0; - for(int i = 0; i0 and <=8 - * @return the read bytes as a long value - * @throws IOException If the end of the stream is detected, the input - * stream has been closed, or if some other I/O error occurs. - * @throws IndexOutOfBoundsException if n is not in the range - * [1...8] inclusive. - */ - public long readBytes(int n) throws IOException { - if(n<1||n>8) throw new IndexOutOfBoundsException("invalid number of bytes to read: "+n); - final byte[] b = new byte[n]; - read(b, 0, n); - - long result = 0; - for(int i = 0; in bytes from the input as a String. The bytes are - * directly converted into characters. If not enough bytes could be read, an - * EOFException is thrown. - * This method blocks until all bytes could be read, the end of the stream - * is detected, or an I/O error occurs. - * - * @param n the length of the String. - * @return the String, that was read - * @throws IOException If the end of the stream is detected, the input - * stream has been closed, or if some other I/O error occurs. - */ - public String readString(final int n) throws IOException { - int i = -1; - int pos = 0; - char[] c = new char[n]; - while(posm.n value, that results from deviding an integer by - * 2n. - * - * @param m the number of bits before the point - * @param n the number of bits after the point - * @return a floating point number with the same value - * @throws IOException If the end of the stream is detected, the input - * stream has been closed, or if some other I/O error occurs. - * @throws IllegalArgumentException if the total number of bits (m+n) is not - * a multiple of eight - */ - public double readFixedPoint(int m, int n) throws IOException { - final int bits = m+n; - if((bits%8)!=0) throw new IllegalArgumentException("number of bits is not a multiple of 8: "+(m+n)); - final long l = readBytes(bits/8); - final double x = Math.pow(2, n); - double d = ((double) l)/x; - return d; - } - - /** - * Skips n bytes in the input. This method blocks until all - * bytes could be skipped, the end of the stream is detected, or an I/O - * error occurs. - * - * @param n the number of bytes to skip - * @throws IOException If the end of the stream is detected, the input - * stream has been closed, or if some other I/O error occurs. - */ - public void skipBytes(final long n) throws IOException { - long l = 0; - while(lMP4InputStream was constructed with a RandomAccessFile. If - * this method returns false, seeking is not possible. - * - * @return true if random access is available - */ - public boolean hasRandomAccess() { - return fin!=null; - } - - /** - * Indicates, if the input has some data left. - * - * @return true if there is at least one byte left - * @throws IOException if an I/O error occurs - */ - public boolean hasLeft() throws IOException { - final boolean b; - if(!peeked.isEmpty()){ - b = true; - }else if(fin!=null){ - b = fin.getFilePointer()<(fin.length()-1); - } else { - final int i = in.read(); - b = (i!=-1); - if(b) peeked.add((byte) i); - } - return b; - } - - /** - * Closes the input and releases any system resources associated with it. - * Once the stream has been closed, further reading or skipping will throw - * an IOException. Closing a previously closed stream has no effect. - * - * @throws IOException if an I/O error occurs - */ - void close() throws IOException { - peeked.clear(); - if(in!=null) in.close(); - else if(fin!=null) fin.close(); - } +public class MP4InputStream extends MP4InputReader { + + private final InputStream in; + private long offset; + + /** + * Constructs an MP4InputStream that reads from an + * InputStream. It will have no random access, thus seeking + * will not be possible. + * + * @param in an InputStream to read from + */ + MP4InputStream(InputStream in) { + this.in = in; + offset = 0; + } + + @Override + protected int read() throws IOException { + int i = in.read(); + if (i >= 0) + ++offset; + + return i; + } + + @Override + protected int read(byte[] b, int off, int len) throws IOException { + int i = in.read(b, off, len); + + if (i > 0) + offset += i; + + return i; + } + + @Override + protected long skip(int n) throws IOException { + long i = in.skip(n); + + if (i > 0) + offset += i; + + return i; + } + + @Override + public long getOffset() { + return offset; + } + + @Override + public void seek(long pos) throws IOException { + throw new IOException("could not seek: no random access"); + } + + @Override + public boolean hasRandomAccess() { + return false; + } + + @Override + public boolean hasLeft() throws IOException { + return in.available() > 0; + } + + @Override + public void close() throws IOException { + in.close(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/MP4RandomAccessStream.java b/src/main/java/net/sourceforge/jaad/mp4/MP4RandomAccessStream.java new file mode 100644 index 00000000..07e282b5 --- /dev/null +++ b/src/main/java/net/sourceforge/jaad/mp4/MP4RandomAccessStream.java @@ -0,0 +1,61 @@ +package net.sourceforge.jaad.mp4; + +import java.io.IOException; +import java.io.RandomAccessFile; + +public class MP4RandomAccessStream extends MP4InputReader { + + private final RandomAccessFile fin; + + /** + * Constructs an MP4InputStream that reads from a + * RandomAccessFile. It will have random access and seeking + * will be possible. + * + * @param fin a RandomAccessFile to read from + */ + MP4RandomAccessStream(RandomAccessFile fin) { + this.fin = fin; + } + + @Override + protected int read() throws IOException { + return fin.read(); + } + + + @Override + protected int read(byte[] b, int off, int len) throws IOException { + return fin.read(b, off, len); + } + + @Override + protected long skip(int n) throws IOException { + return fin.skipBytes(n); + } + + @Override + public long getOffset() throws IOException { + return fin.getFilePointer(); + } + + @Override + public void seek(long pos) throws IOException { + fin.seek(pos); + } + + @Override + public boolean hasRandomAccess() { + return true; + } + + + @Override + public boolean hasLeft() throws IOException { + return fin.getFilePointer()<(fin.length()-1); + } + + public void close() throws IOException { + fin.close(); + } +} diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/Artwork.java b/src/main/java/net/sourceforge/jaad/mp4/api/Artwork.java index b1bafc43..39041e97 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/Artwork.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/Artwork.java @@ -6,78 +6,82 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; + import net.sourceforge.jaad.mp4.boxes.impl.meta.ITunesMetadataBox.DataType; + public class Artwork { - //TODO: need this enum? it just copies the DataType - public enum Type { + static final Logger LOGGER = Logger.getLogger(Artwork.class.getName()); + + // TODO: need this enum? it just copies the DataType + public enum Type { + + GIF, JPEG, PNG, BMP; - GIF, JPEG, PNG, BMP; + static Type forDataType(DataType dataType) { + Type type; + switch (dataType) { + case GIF: + type = GIF; + break; + case JPEG: + type = JPEG; + break; + case PNG: + type = PNG; + break; + case BMP: + type = BMP; + break; + default: + type = null; + } + return type; + } + } - static Type forDataType(DataType dataType) { - Type type; - switch(dataType) { - case GIF: - type = GIF; - break; - case JPEG: - type = JPEG; - break; - case PNG: - type = PNG; - break; - case BMP: - type = BMP; - break; - default: - type = null; - } - return type; - } - } - private Type type; - private byte[] data; - private Image image; + private Type type; + private byte[] data; + private Image image; - Artwork(Type type, byte[] data) { - this.type = type; - this.data = data; - } + Artwork(Type type, byte[] data) { + this.type = type; + this.data = data; + } - /** - * Returns the type of data in this artwork. - * - * @see Type - * @return the data's type - */ - public Type getType() { - return type; - } + /** + * Returns the type of data in this artwork. + * + * @return the data's type + * @see Type + */ + public Type getType() { + return type; + } - /** - * Returns the encoded data of this artwork. - * - * @return the encoded data - */ - public byte[] getData() { - return data; - } + /** + * Returns the encoded data of this artwork. + * + * @return the encoded data + */ + public byte[] getData() { + return data; + } - /** - * Returns the decoded image, that can be painted. - * - * @return the decoded image - * @throws IOException if decoding fails - */ - public Image getImage() throws IOException { - try { - if(image==null) image = ImageIO.read(new ByteArrayInputStream(data)); - return image; - } - catch(IOException e) { - Logger.getLogger("MP4 API").log(Level.SEVERE, "Artwork.getImage failed: {0}", e.toString()); - throw e; - } - } + /** + * Returns the decoded image, that can be painted. + * + * @return the decoded image + * @throws IOException if decoding fails + */ + public Image getImage() throws IOException { + try { + if (image == null) image = ImageIO.read(new ByteArrayInputStream(data)); + return image; + } catch (IOException e) { + Logger.getLogger("MP4 API").log(Level.SEVERE, "Artwork.getImage failed: {0}", e.toString()); + throw e; + } + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/AudioTrack.java b/src/main/java/net/sourceforge/jaad/mp4/api/AudioTrack.java index 7d910601..f1c2307e 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/AudioTrack.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/AudioTrack.java @@ -1,122 +1,126 @@ package net.sourceforge.jaad.mp4.api; -import net.sourceforge.jaad.mp4.MP4InputStream; +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.Box; import net.sourceforge.jaad.mp4.boxes.BoxTypes; +import net.sourceforge.jaad.mp4.boxes.impl.ESDBox; import net.sourceforge.jaad.mp4.boxes.impl.SampleDescriptionBox; import net.sourceforge.jaad.mp4.boxes.impl.SoundMediaHeaderBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.AudioSampleEntry; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; -import net.sourceforge.jaad.mp4.boxes.impl.ESDBox; + public class AudioTrack extends Track { - public enum AudioCodec implements Codec { - - AAC, - AC3, - AMR, - AMR_WIDE_BAND, - EVRC, - EXTENDED_AC3, - QCELP, - SMV, - UNKNOWN_AUDIO_CODEC; - - static Codec forType(long type) { - final Codec ac; - if(type==BoxTypes.MP4A_SAMPLE_ENTRY) ac = AAC; - else if(type==BoxTypes.AC3_SAMPLE_ENTRY) ac = AC3; - else if(type==BoxTypes.AMR_SAMPLE_ENTRY) ac = AMR; - else if(type==BoxTypes.AMR_WB_SAMPLE_ENTRY) ac = AMR_WIDE_BAND; - else if(type==BoxTypes.EVRC_SAMPLE_ENTRY) ac = EVRC; - else if(type==BoxTypes.EAC3_SAMPLE_ENTRY) ac = EXTENDED_AC3; - else if(type==BoxTypes.QCELP_SAMPLE_ENTRY) ac = QCELP; - else if(type==BoxTypes.SMV_SAMPLE_ENTRY) ac = SMV; - else ac = UNKNOWN_AUDIO_CODEC; - return ac; - } - } - private final SoundMediaHeaderBox smhd; - private final AudioSampleEntry sampleEntry; - private Codec codec; - - public AudioTrack(Box trak, MP4InputStream in) { - super(trak, in); - - final Box mdia = trak.getChild(BoxTypes.MEDIA_BOX); - final Box minf = mdia.getChild(BoxTypes.MEDIA_INFORMATION_BOX); - smhd = (SoundMediaHeaderBox) minf.getChild(BoxTypes.SOUND_MEDIA_HEADER_BOX); - - final Box stbl = minf.getChild(BoxTypes.SAMPLE_TABLE_BOX); - - //sample descriptions: 'mp4a' and 'enca' have an ESDBox, all others have a CodecSpecificBox - final SampleDescriptionBox stsd = (SampleDescriptionBox) stbl.getChild(BoxTypes.SAMPLE_DESCRIPTION_BOX); - if(stsd.getChildren().get(0) instanceof AudioSampleEntry) { - sampleEntry = (AudioSampleEntry) stsd.getChildren().get(0); - final long type = sampleEntry.getType(); - if(sampleEntry.hasChild(BoxTypes.ESD_BOX)) findDecoderSpecificInfo((ESDBox) sampleEntry.getChild(BoxTypes.ESD_BOX)); - else decoderInfo = DecoderInfo.parse((CodecSpecificBox) sampleEntry.getChildren().get(0)); - - if(type==BoxTypes.ENCRYPTED_AUDIO_SAMPLE_ENTRY||type==BoxTypes.DRMS_SAMPLE_ENTRY) { - findDecoderSpecificInfo((ESDBox) sampleEntry.getChild(BoxTypes.ESD_BOX)); - protection = Protection.parse(sampleEntry.getChild(BoxTypes.PROTECTION_SCHEME_INFORMATION_BOX)); - codec = protection.getOriginalFormat(); - } - else codec = AudioCodec.forType(sampleEntry.getType()); - } - else { - sampleEntry = null; - codec = AudioCodec.UNKNOWN_AUDIO_CODEC; - } - } - - @Override - public Type getType() { - return Type.AUDIO; - } - - @Override - public Codec getCodec() { - return codec; - } - - /** - * The balance is a floating-point number that places mono audio tracks in a - * stereo space: 0 is centre (the normal value), full left is -1.0 and full - * right is 1.0. - * - * @return the stereo balance for a this track - */ - public double getBalance() { - return smhd.getBalance(); - } - - /** - * Returns the number of channels in this audio track. - * @return the number of channels - */ - public int getChannelCount() { - return sampleEntry.getChannelCount(); - } - - /** - * Returns the sample rate of this audio track. - * @return the sample rate - */ - public int getSampleRate() { - return sampleEntry.getSampleRate(); - } - - /** - * Returns the sample size in bits for this track. - * @return the sample size - */ - public int getSampleSize() { - return sampleEntry.getSampleSize(); - } - - public double getVolume() { - return tkhd.getVolume(); - } + public enum AudioCodec implements Codec { + + AAC, + AC3, + AMR, + AMR_WIDE_BAND, + EVRC, + EXTENDED_AC3, + QCELP, + SMV, + UNKNOWN_AUDIO_CODEC; + + static Codec forType(long type) { + Codec ac; + if (type == BoxTypes.MP4A_SAMPLE_ENTRY) ac = AAC; + else if (type == BoxTypes.AC3_SAMPLE_ENTRY) ac = AC3; + else if (type == BoxTypes.AMR_SAMPLE_ENTRY) ac = AMR; + else if (type == BoxTypes.AMR_WB_SAMPLE_ENTRY) ac = AMR_WIDE_BAND; + else if (type == BoxTypes.EVRC_SAMPLE_ENTRY) ac = EVRC; + else if (type == BoxTypes.EAC3_SAMPLE_ENTRY) ac = EXTENDED_AC3; + else if (type == BoxTypes.QCELP_SAMPLE_ENTRY) ac = QCELP; + else if (type == BoxTypes.SMV_SAMPLE_ENTRY) ac = SMV; + else ac = UNKNOWN_AUDIO_CODEC; + return ac; + } + } + + private final SoundMediaHeaderBox smhd; + private final AudioSampleEntry sampleEntry; + private Codec codec; + + public AudioTrack(Box trak, MP4Input in) { + super(trak, in); + + Box mdia = trak.getChild(BoxTypes.MEDIA_BOX); + Box minf = mdia.getChild(BoxTypes.MEDIA_INFORMATION_BOX); + smhd = (SoundMediaHeaderBox) minf.getChild(BoxTypes.SOUND_MEDIA_HEADER_BOX); + + Box stbl = minf.getChild(BoxTypes.SAMPLE_TABLE_BOX); + + //sample descriptions: 'mp4a' and 'enca' have an ESDBox, all others have a CodecSpecificBox + SampleDescriptionBox stsd = (SampleDescriptionBox) stbl.getChild(BoxTypes.SAMPLE_DESCRIPTION_BOX); + if (stsd.getChildren().get(0) instanceof AudioSampleEntry) { + sampleEntry = (AudioSampleEntry) stsd.getChildren().get(0); + long type = sampleEntry.getType(); + if (sampleEntry.hasChild(BoxTypes.ESD_BOX)) + findDecoderSpecificInfo((ESDBox) sampleEntry.getChild(BoxTypes.ESD_BOX)); + else decoderInfo = DecoderInfo.parse((CodecSpecificBox) sampleEntry.getChildren().get(0)); + + if (type == BoxTypes.ENCRYPTED_AUDIO_SAMPLE_ENTRY || type == BoxTypes.DRMS_SAMPLE_ENTRY) { + findDecoderSpecificInfo((ESDBox) sampleEntry.getChild(BoxTypes.ESD_BOX)); + protection = Protection.parse(sampleEntry.getChild(BoxTypes.PROTECTION_SCHEME_INFORMATION_BOX)); + codec = protection.getOriginalFormat(); + } else codec = AudioCodec.forType(sampleEntry.getType()); + } else { + sampleEntry = null; + codec = AudioCodec.UNKNOWN_AUDIO_CODEC; + } + } + + @Override + public Type getType() { + return Type.AUDIO; + } + + @Override + public Codec getCodec() { + return codec; + } + + /** + * The balance is a floating-point number that places mono audio tracks in a + * stereo space: 0 is centre (the normal value), full left is -1.0 and full + * right is 1.0. + * + * @return the stereo balance for this track + */ + public double getBalance() { + return smhd.getBalance(); + } + + /** + * Returns the number of channels in this audio track. + * + * @return the number of channels + */ + public int getChannelCount() { + return sampleEntry.getChannelCount(); + } + + /** + * Returns the sample rate of this audio track. + * + * @return the sample rate + */ + public int getSampleRate() { + return sampleEntry.getSampleRate(); + } + + /** + * Returns the sample size in bits for this track. + * + * @return the sample size + */ + public int getSampleSize() { + return sampleEntry.getSampleSize(); + } + + public double getVolume() { + return tkhd.getVolume(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/Brand.java b/src/main/java/net/sourceforge/jaad/mp4/api/Brand.java index 1988e103..767c20ec 100644 Binary files a/src/main/java/net/sourceforge/jaad/mp4/api/Brand.java and b/src/main/java/net/sourceforge/jaad/mp4/api/Brand.java differ diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/DecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/DecoderInfo.java index 6c6346b5..0afeec48 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/DecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/DecoderInfo.java @@ -1,42 +1,50 @@ package net.sourceforge.jaad.mp4.api; -import net.sourceforge.jaad.mp4.api.codec.*; +import net.sourceforge.jaad.mp4.api.codec.AC3DecoderInfo; +import net.sourceforge.jaad.mp4.api.codec.AMRDecoderInfo; +import net.sourceforge.jaad.mp4.api.codec.AVCDecoderInfo; +import net.sourceforge.jaad.mp4.api.codec.EAC3DecoderInfo; +import net.sourceforge.jaad.mp4.api.codec.EVRCDecoderInfo; +import net.sourceforge.jaad.mp4.api.codec.H263DecoderInfo; +import net.sourceforge.jaad.mp4.api.codec.QCELPDecoderInfo; +import net.sourceforge.jaad.mp4.api.codec.SMVDecoderInfo; import net.sourceforge.jaad.mp4.boxes.BoxTypes; -import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.*; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; + /** - * The DecoderInfo object contains the neccessary data to + * The DecoderInfo object contains the neccessary data to * initialize a decoder. A track either contains a DecoderInfo or a * byte-Array called the 'DecoderSpecificInfo', which is e.g. used for AAC. - * - * The DecoderInfo object received from a track is a subclass of + *

+ * The DecoderInfo object received from a track is a subclass of * this class depending on the Codec. - * + * * * AudioTrack track = (AudioTrack) movie.getTrack(AudioCodec.AC3); * AC3DecoderInfo info = (AC3DecoderInfo) track.getDecoderInfo(); * - * + * * @author in-somnia */ public abstract class DecoderInfo { - static DecoderInfo parse(CodecSpecificBox css) { - final long l = css.getType(); + static DecoderInfo parse(CodecSpecificBox css) { + long l = css.getType(); - final DecoderInfo info; - if(l==BoxTypes.H263_SPECIFIC_BOX) info = new H263DecoderInfo(css); - else if(l==BoxTypes.AMR_SPECIFIC_BOX) info = new AMRDecoderInfo(css); - else if(l==BoxTypes.EVRC_SPECIFIC_BOX) info = new EVRCDecoderInfo(css); - else if(l==BoxTypes.QCELP_SPECIFIC_BOX) info = new QCELPDecoderInfo(css); - else if(l==BoxTypes.SMV_SPECIFIC_BOX) info = new SMVDecoderInfo(css); - else if(l==BoxTypes.AVC_SPECIFIC_BOX) info = new AVCDecoderInfo(css); - else if(l==BoxTypes.AC3_SPECIFIC_BOX) info = new AC3DecoderInfo(css); - else if(l==BoxTypes.EAC3_SPECIFIC_BOX) info = new EAC3DecoderInfo(css); - else info = new UnknownDecoderInfo(); - return info; - } + DecoderInfo info; + if (l == BoxTypes.H263_SPECIFIC_BOX) info = new H263DecoderInfo(css); + else if (l == BoxTypes.AMR_SPECIFIC_BOX) info = new AMRDecoderInfo(css); + else if (l == BoxTypes.EVRC_SPECIFIC_BOX) info = new EVRCDecoderInfo(css); + else if (l == BoxTypes.QCELP_SPECIFIC_BOX) info = new QCELPDecoderInfo(css); + else if (l == BoxTypes.SMV_SPECIFIC_BOX) info = new SMVDecoderInfo(css); + else if (l == BoxTypes.AVC_SPECIFIC_BOX) info = new AVCDecoderInfo(css); + else if (l == BoxTypes.AC3_SPECIFIC_BOX) info = new AC3DecoderInfo(css); + else if (l == BoxTypes.EAC3_SPECIFIC_BOX) info = new EAC3DecoderInfo(css); + else info = new UnknownDecoderInfo(); + return info; + } - private static class UnknownDecoderInfo extends DecoderInfo { - } + private static class UnknownDecoderInfo extends DecoderInfo { + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/Frame.java b/src/main/java/net/sourceforge/jaad/mp4/api/Frame.java index 4c3c5282..4c717aab 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/Frame.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/Frame.java @@ -2,45 +2,45 @@ public class Frame implements Comparable { - private final Type type; - private final long offset, size; - private final double time; - private byte[] data; - - Frame(Type type, long offset, long size, double time) { - this.type = type; - this.offset = offset; - this.size = size; - this.time = time; - } - - public Type getType() { - return type; - } - - public long getOffset() { - return offset; - } - - public long getSize() { - return size; - } - - public double getTime() { - return time; - } - - public int compareTo(Frame f) { - final double d = time-f.time; - //0 should not happen, since frames don't have the same timestamps - return (d<0) ? -1 : ((d>0) ? 1 : 0); - } - - public void setData(byte[] data) { - this.data = data; - } - - public byte[] getData() { - return data; - } + private final Type type; + private final long offset, size; + private final double time; + private byte[] data; + + Frame(Type type, long offset, long size, double time) { + this.type = type; + this.offset = offset; + this.size = size; + this.time = time; + } + + public Type getType() { + return type; + } + + public long getOffset() { + return offset; + } + + public long getSize() { + return size; + } + + public double getTime() { + return time; + } + + public int compareTo(Frame f) { + double d = time - f.time; + //0 should not happen, since frames don't have the same timestamps + return (d < 0) ? -1 : ((d > 0) ? 1 : 0); + } + + public void setData(byte[] data) { + this.data = data; + } + + public byte[] getData() { + return data; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/ID3Frame.java b/src/main/java/net/sourceforge/jaad/mp4/api/ID3Frame.java index b2564fb1..0f541461 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/ID3Frame.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/ID3Frame.java @@ -8,192 +8,192 @@ import java.util.Date; import java.util.Locale; + class ID3Frame { - static final int ALBUM_TITLE = 1413565506; //TALB - static final int ALBUM_SORT_ORDER = 1414745921; //TSOA - static final int ARTIST = 1414546737; //TPE1 - static final int ATTACHED_PICTURE = 1095780675; //APIC - static final int AUDIO_ENCRYPTION = 1095061059; //AENC - static final int AUDIO_SEEK_POINT_INDEX = 1095979081; //ASPI - static final int BAND = 1414546738; //TPE2 - static final int BEATS_PER_MINUTE = 1413632077; //TBPM - static final int COMMENTS = 1129270605; //COMM - static final int COMMERCIAL_FRAME = 1129270610; //COMR - static final int COMMERCIAL_INFORMATION = 1464029005; //WCOM - static final int COMPOSER = 1413697357; //TCOM - static final int CONDUCTOR = 1414546739; //TPE3 - static final int CONTENT_GROUP_DESCRIPTION = 1414091825; //TIT1 - static final int CONTENT_TYPE = 1413697358; //TCON - static final int COPYRIGHT = 1464029008; //WCOP - static final int COPYRIGHT_MESSAGE = 1413697360; //TCOP - static final int ENCODED_BY = 1413828163; //TENC - static final int ENCODING_TIME = 1413760334; //TDEN - static final int ENCRYPTION_METHOD_REGISTRATION = 1162756946; //ENCR - static final int EQUALISATION = 1162958130; //EQU2 - static final int EVENT_TIMING_CODES = 1163150159; //ETCO - static final int FILE_OWNER = 1414485838; //TOWN - static final int FILE_TYPE = 1413893204; //TFLT - static final int GENERAL_ENCAPSULATED_OBJECT = 1195724610; //GEOB - static final int GROUP_IDENTIFICATION_REGISTRATION = 1196575044; //GRID - static final int INITIAL_KEY = 1414219097; //TKEY - static final int INTERNET_RADIO_STATION_NAME = 1414681422; //TRSN - static final int INTERNET_RADIO_STATION_OWNER = 1414681423; //TRSO - static final int MODIFIED_BY = 1414546740; //TPE4 - static final int INVOLVED_PEOPLE_LIST = 1414090828; //TIPL - static final int INTERNATIONAL_STANDARD_RECORDING_CODE = 1414746691; //TSRC - static final int LANGUAGES = 1414283598; //TLAN - static final int LENGTH = 1414284622; //TLEN - static final int LINKED_INFORMATION = 1279872587; //LINK - static final int LYRICIST = 1413830740; //TEXT - static final int MEDIA_TYPE = 1414350148; //TMED - static final int MOOD = 1414352719; //TMOO - static final int MPEG_LOCATION_LOOKUP_TABLE = 1296845908; //MLLT - static final int MUSICIAN_CREDITS_LIST = 1414349644; //TMCL - static final int MUSIC_CD_IDENTIFIER = 1296254025; //MCDI - static final int OFFICIAL_ARTIST_WEBPAGE = 1464811858; //WOAR - static final int OFFICIAL_AUDIO_FILE_WEBPAGE = 1464811846; //WOAF - static final int OFFICIAL_AUDIO_SOURCE_WEBPAGE = 1464811859; //WOAS - static final int OFFICIAL_INTERNET_RADIO_STATION_HOMEPAGE = 1464816211; //WORS - static final int ORIGINAL_ALBUM_TITLE = 1414480204; //TOAL - static final int ORIGINAL_ARTIST = 1414484037; //TOPE - static final int ORIGINAL_FILENAME = 1414481486; //TOFN - static final int ORIGINAL_LYRICIST = 1414483033; //TOLY - static final int ORIGINAL_RELEASE_TIME = 1413762898; //TDOR - static final int OWNERSHIP_FRAME = 1331121733; //OWNE - static final int PART_OF_A_SET = 1414549331; //TPOS - static final int PAYMENT = 1464877401; //WPAY - static final int PERFORMER_SORT_ORDER = 1414745936; //TSOP - static final int PLAYLIST_DELAY = 1413762137; //TDLY - static final int PLAY_COUNTER = 1346588244; //PCNT - static final int POPULARIMETER = 1347375181; //POPM - static final int POSITION_SYNCHRONISATION_FRAME = 1347375955; //POSS - static final int PRIVATE_FRAME = 1347570006; //PRIV - static final int PRODUCED_NOTICE = 1414550095; //TPRO - static final int PUBLISHER = 1414550850; //TPUB - static final int PUBLISHERS_OFFICIAL_WEBPAGE = 1464882498; //WPUB - static final int RECOMMENDED_BUFFER_SIZE = 1380078918; //RBUF - static final int RECORDING_TIME = 1413763651; //TDRC - static final int RELATIVE_VOLUME_ADJUSTMENT = 1381384498; //RVA2 - static final int RELEASE_TIME = 1413763660; //TDRL - static final int REVERB = 1381388866; //RVRB - static final int SEEK_FRAME = 1397048651; //SEEK - static final int SET_SUBTITLE = 1414746964; //TSST - static final int SIGNATURE_FRAME = 1397311310; //SIGN - static final int ENCODING_TOOLS_AND_SETTINGS = 1414746949; //TSSE - static final int SUBTITLE = 1414091827; //TIT3 - static final int SYNCHRONISED_LYRIC = 1398361172; //SYLT - static final int SYNCHRONISED_TEMPO_CODES = 1398363203; //SYTC - static final int TAGGING_TIME = 1413764167; //TDTG - static final int TERMS_OF_USE = 1431520594; //USER - static final int TITLE = 1414091826; //TIT2 - static final int TITLE_SORT_ORDER = 1414745940; //TSOT - static final int TRACK_NUMBER = 1414677323; //TRCK - static final int UNIQUE_FILE_IDENTIFIER = 1430669636; //UFID - static final int UNSYNCHRONISED_LYRIC = 1431522388; //USLT - static final int USER_DEFINED_TEXT_INFORMATION_FRAME = 1415075928; //TXXX - static final int USER_DEFINED_URL_LINK_FRAME = 1465407576; //WXXX - private static final String[] TEXT_ENCODINGS = {"ISO-8859-1", "UTF-16"/*BOM*/, "UTF-16", "UTF-8"}; - private static final String[] VALID_TIMESTAMPS = {"yyyy, yyyy-MM", "yyyy-MM-dd", "yyyy-MM-ddTHH", "yyyy-MM-ddTHH:mm", "yyyy-MM-ddTHH:mm:ss"}; - private static final String UNKNOWN_LANGUAGE = "xxx"; - private long size; - private int id, flags, groupID, encryptionMethod; - private byte[] data; - - ID3Frame(DataInputStream in) throws IOException { - id = in.readInt(); - size = ID3Tag.readSynch(in); - flags = in.readShort(); - - if(isInGroup()) groupID = in.read(); - if(isEncrypted()) encryptionMethod = in.read(); - //TODO: data length indicator, unsync - - data = new byte[(int) size]; - in.readFully(data); - } - - //header data - public int getID() { - return id; - } - - public long getSize() { - return size; - } - - public final boolean isInGroup() { - return (flags&0x40)==0x40; - } - - public int getGroupID() { - return groupID; - } - - public final boolean isCompressed() { - return (flags&8)==8; - } - - public final boolean isEncrypted() { - return (flags&4)==4; - } - - public int getEncryptionMethod() { - return encryptionMethod; - } - - //content data - public byte[] getData() { - return data; - } - - public String getText() { - return new String(data, Charset.forName(TEXT_ENCODINGS[0])); - } - - public String getEncodedText() { - //first byte indicates encoding - final int enc = data[0]; - - //charsets 0,3 end with '0'; 1,2 end with '00' - int t = -1; - for(int i = 1; i0) y = new int[]{Integer.parseInt(x.substring(0, i)), Integer.parseInt(x.substring(i+1))}; - else y = new int[]{Integer.parseInt(x)}; - return y; - } - - public Date getDate() { - //timestamp lengths: 4,7,10,13,16,19 - final int i = (int) Math.floor(data.length/3)-1; - final Date date; - if(i>=0&&i 0) y = new int[] {Integer.parseInt(x.substring(0, i)), Integer.parseInt(x.substring(i + 1))}; + else y = new int[] {Integer.parseInt(x)}; + return y; + } + + public Date getDate() { + //timestamp lengths: 4,7,10,13,16,19 + int i = (int) Math.floor(data.length / 3f) - 1; + Date date; + if (i >= 0 && i < VALID_TIMESTAMPS.length) { + SimpleDateFormat sdf = new SimpleDateFormat(VALID_TIMESTAMPS[i]); + date = sdf.parse(new String(data), new ParsePosition(0)); + } else date = null; + return date; + } + + public Locale getLocale() { + String s = new String(data).toLowerCase(); + Locale l; + if (s.equals(UNKNOWN_LANGUAGE)) l = null; + else l = new Locale(s); + return l; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/ID3Tag.java b/src/main/java/net/sourceforge/jaad/mp4/api/ID3Tag.java index 989f5899..8a420299 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/ID3Tag.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/ID3Tag.java @@ -6,50 +6,51 @@ import java.util.Collections; import java.util.List; + class ID3Tag { - private static final int ID3_TAG = 4801587; //'ID3' - private static final int SUPPORTED_VERSION = 4; //id3v2.4 - private final List frames; - private final int tag, flags, len; - - ID3Tag(DataInputStream in) throws IOException { - frames = new ArrayList(); - - //id3v2 header - tag = (in.read()<<16)|(in.read()<<8)|in.read(); //'ID3' - final int majorVersion = in.read(); - in.read(); //revision - flags = in.read(); - len = readSynch(in); - - if(tag==ID3_TAG&&majorVersion<=SUPPORTED_VERSION) { - if((flags&0x40)==0x40) { - //extended header; TODO: parse - final int extSize = readSynch(in); - in.skipBytes(extSize-6); - } - - //read all id3 frames - int left = len; - ID3Frame frame; - while(left>0) { - frame = new ID3Frame(in); - frames.add(frame); - left -= frame.getSize(); - } - } - } - - public List getFrames() { - return Collections.unmodifiableList(frames); - } - - static int readSynch(DataInputStream in) throws IOException { - int x = 0; - for(int i = 0; i<4; i++) { - x |= (in.read()&0x7F); - } - return x; - } + private static final int ID3_TAG = 4801587; //'ID3' + private static final int SUPPORTED_VERSION = 4; //id3v2.4 + private final List frames; + private final int tag, flags, len; + + ID3Tag(DataInputStream in) throws IOException { + frames = new ArrayList<>(); + + //id3v2 header + tag = (in.read() << 16) | (in.read() << 8) | in.read(); //'ID3' + int majorVersion = in.read(); + in.read(); //revision + flags = in.read(); + len = readSynch(in); + + if (tag == ID3_TAG && majorVersion <= SUPPORTED_VERSION) { + if ((flags & 0x40) == 0x40) { + //extended header; TODO: parse + int extSize = readSynch(in); + in.skipBytes(extSize - 6); + } + + //read all id3 frames + int left = len; + ID3Frame frame; + while (left > 0) { + frame = new ID3Frame(in); + frames.add(frame); + left -= frame.getSize(); + } + } + } + + public List getFrames() { + return Collections.unmodifiableList(frames); + } + + static int readSynch(DataInputStream in) throws IOException { + int x = 0; + for (int i = 0; i < 4; i++) { + x |= (in.read() & 0x7F); + } + return x; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/MetaData.java b/src/main/java/net/sourceforge/jaad/mp4/api/MetaData.java index ebc37dbc..252b26e8 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/MetaData.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/MetaData.java @@ -13,6 +13,7 @@ import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; + import net.sourceforge.jaad.mp4.boxes.Box; import net.sourceforge.jaad.mp4.boxes.BoxTypes; import net.sourceforge.jaad.mp4.boxes.impl.CopyrightBox; @@ -23,6 +24,7 @@ import net.sourceforge.jaad.mp4.boxes.impl.meta.ThreeGPPLocationBox; import net.sourceforge.jaad.mp4.boxes.impl.meta.ThreeGPPMetadataBox; + /** * This class contains the metadata for a movie. It parses different metadata * types (iTunes tags, ID3). @@ -33,446 +35,448 @@ */ public class MetaData { - public static class Field { + public static class Field { + + public static final Field ARTIST = new Field<>("Artist"); + public static final Field TITLE = new Field<>("Title"); + public static final Field ALBUM_ARTIST = new Field<>("Album Artist"); + public static final Field ALBUM = new Field<>("Album"); + public static final Field TRACK_NUMBER = new Field<>("Track Number"); + public static final Field TOTAL_TRACKS = new Field<>("Total Tracks"); + public static final Field DISK_NUMBER = new Field<>("Disk Number"); + public static final Field TOTAL_DISKS = new Field<>("Total disks"); + public static final Field COMPOSER = new Field<>("Composer"); + public static final Field COMMENTS = new Field<>("Comments"); + public static final Field TEMPO = new Field<>("Tempo"); + public static final Field LENGTH_IN_MILLISECONDS = new Field<>("Length in milliseconds"); + public static final Field RELEASE_DATE = new Field<>("Release Date"); + public static final Field GENRE = new Field<>("Genre"); + public static final Field ENCODER_NAME = new Field<>("Encoder Name"); + public static final Field ENCODER_TOOL = new Field<>("Encoder Tool"); + public static final Field ENCODING_DATE = new Field<>("Encoding Date"); + public static final Field COPYRIGHT = new Field<>("Copyright"); + public static final Field PUBLISHER = new Field<>("Publisher"); + public static final Field COMPILATION = new Field<>("Part of compilation"); + public static final Field> COVER_ARTWORKS = new Field<>("Cover Artworks"); + public static final Field GROUPING = new Field<>("Grouping"); + public static final Field LOCATION = new Field<>("Location"); + public static final Field LYRICS = new Field<>("Lyrics"); + public static final Field RATING = new Field<>("Rating"); + public static final Field PODCAST = new Field<>("Podcast"); + public static final Field PODCAST_URL = new Field<>("Podcast URL"); + public static final Field CATEGORY = new Field<>("Category"); + public static final Field KEYWORDS = new Field<>("Keywords"); + public static final Field EPISODE_GLOBAL_UNIQUE_ID = new Field<>("Episode Global Unique ID"); + public static final Field DESCRIPTION = new Field<>("Description"); + public static final Field TV_SHOW = new Field<>("TV Show"); + public static final Field TV_NETWORK = new Field<>("TV Network"); + public static final Field TV_EPISODE = new Field<>("TV Episode"); + public static final Field TV_EPISODE_NUMBER = new Field<>("TV Episode Number"); + public static final Field TV_SEASON = new Field<>("TV Season"); + public static final Field INTERNET_RADIO_STATION = new Field<>("Internet Radio Station"); + public static final Field PURCHASE_DATE = new Field<>("Purchase Date"); + public static final Field GAPLESS_PLAYBACK = new Field<>("Gapless Playback"); + public static final Field HD_VIDEO = new Field<>("HD Video"); + public static final Field LANGUAGE = new Field<>("Language"); + //sorting + public static final Field ARTIST_SORT_TEXT = new Field<>("Artist Sort Text"); + public static final Field TITLE_SORT_TEXT = new Field<>("Title Sort Text"); + public static final Field ALBUM_SORT_TEXT = new Field<>("Album Sort Text"); + private String name; - public static final Field ARTIST = new Field("Artist"); - public static final Field TITLE = new Field("Title"); - public static final Field ALBUM_ARTIST = new Field("Album Artist"); - public static final Field ALBUM = new Field("Album"); - public static final Field TRACK_NUMBER = new Field("Track Number"); - public static final Field TOTAL_TRACKS = new Field("Total Tracks"); - public static final Field DISK_NUMBER = new Field("Disk Number"); - public static final Field TOTAL_DISKS = new Field("Total disks"); - public static final Field COMPOSER = new Field("Composer"); - public static final Field COMMENTS = new Field("Comments"); - public static final Field TEMPO = new Field("Tempo"); - public static final Field LENGTH_IN_MILLISECONDS = new Field("Length in milliseconds"); - public static final Field RELEASE_DATE = new Field("Release Date"); - public static final Field GENRE = new Field("Genre"); - public static final Field ENCODER_NAME = new Field("Encoder Name"); - public static final Field ENCODER_TOOL = new Field("Encoder Tool"); - public static final Field ENCODING_DATE = new Field("Encoding Date"); - public static final Field COPYRIGHT = new Field("Copyright"); - public static final Field PUBLISHER = new Field("Publisher"); - public static final Field COMPILATION = new Field("Part of compilation"); - public static final Field> COVER_ARTWORKS = new Field>("Cover Artworks"); - public static final Field GROUPING = new Field("Grouping"); - public static final Field LOCATION = new Field("Location"); - public static final Field LYRICS = new Field("Lyrics"); - public static final Field RATING = new Field("Rating"); - public static final Field PODCAST = new Field("Podcast"); - public static final Field PODCAST_URL = new Field("Podcast URL"); - public static final Field CATEGORY = new Field("Category"); - public static final Field KEYWORDS = new Field("Keywords"); - public static final Field EPISODE_GLOBAL_UNIQUE_ID = new Field("Episode Global Unique ID"); - public static final Field DESCRIPTION = new Field("Description"); - public static final Field TV_SHOW = new Field("TV Show"); - public static final Field TV_NETWORK = new Field("TV Network"); - public static final Field TV_EPISODE = new Field("TV Episode"); - public static final Field TV_EPISODE_NUMBER = new Field("TV Episode Number"); - public static final Field TV_SEASON = new Field("TV Season"); - public static final Field INTERNET_RADIO_STATION = new Field("Internet Radio Station"); - public static final Field PURCHASE_DATE = new Field("Purchase Date"); - public static final Field GAPLESS_PLAYBACK = new Field("Gapless Playback"); - public static final Field HD_VIDEO = new Field("HD Video"); - public static final Field LANGUAGE = new Field("Language"); - //sorting - public static final Field ARTIST_SORT_TEXT = new Field("Artist Sort Text"); - public static final Field TITLE_SORT_TEXT = new Field("Title Sort Text"); - public static final Field ALBUM_SORT_TEXT = new Field("Album Sort Text"); - private String name; + private Field(String name) { + this.name = name; + } - private Field(String name) { - this.name = name; - } + public String getName() { + return name; + } + } - public String getName() { - return name; - } - } - private static final String[] STANDARD_GENRES = { - "undefined", - //IDv1 standard - "blues", - "classic rock", - "country", - "dance", - "disco", - "funk", - "grunge", - "hip hop", - "jazz", - "metal", - "new age", - "oldies", - "other", - "pop", - "r and b", - "rap", - "reggae", - "rock", - "techno", - "industrial", - "alternative", - "ska", - "death metal", - "pranks", - "soundtrack", - "euro techno", - "ambient", - "trip hop", - "vocal", - "jazz funk", - "fusion", - "trance", - "classical", - "instrumental", - "acid", - "house", - "game", - "sound clip", - "gospel", - "noise", - "alternrock", - "bass", - "soul", - "punk", - "space", - "meditative", - "instrumental pop", - "instrumental rock", - "ethnic", - "gothic", - "darkwave", - "techno industrial", - "electronic", - "pop folk", - "eurodance", - "dream", - "southern rock", - "comedy", - "cult", - "gangsta", - "top ", - "christian rap", - "pop funk", - "jungle", - "native american", - "cabaret", - "new wave", - "psychedelic", - "rave", - "showtunes", - "trailer", - "lo fi", - "tribal", - "acid punk", - "acid jazz", - "polka", - "retro", - "musical", - "rock and roll", - //winamp extension - "hard rock", - "folk", - "folk rock", - "national folk", - "swing", - "fast fusion", - "bebob", - "latin", - "revival", - "celtic", - "bluegrass", - "avantgarde", - "gothic rock", - "progressive rock", - "psychedelic rock", - "symphonic rock", - "slow rock", - "big band", - "chorus", - "easy listening", - "acoustic", - "humour", - "speech", - "chanson", - "opera", - "chamber music", - "sonata", - "symphony", - "booty bass", - "primus", - "porn groove", - "satire", - "slow jam", - "club", - "tango", - "samba", - "folklore", - "ballad", - "power ballad", - "rhythmic soul", - "freestyle", - "duet", - "punk rock", - "drum solo", - "a capella", - "euro house", - "dance hall" - }; - private static final String[] NERO_TAGS = { - "artist", "title", "album", "track", "totaltracks", "year", "genre", - "disc", "totaldiscs", "url", "copyright", "comment", "lyrics", - "credits", "rating", "label", "composer", "isrc", "mood", "tempo" - }; - private Map, Object> contents; + private static final String[] STANDARD_GENRES = { + "undefined", + //IDv1 standard + "blues", + "classic rock", + "country", + "dance", + "disco", + "funk", + "grunge", + "hip hop", + "jazz", + "metal", + "new age", + "oldies", + "other", + "pop", + "r and b", + "rap", + "reggae", + "rock", + "techno", + "industrial", + "alternative", + "ska", + "death metal", + "pranks", + "soundtrack", + "euro techno", + "ambient", + "trip hop", + "vocal", + "jazz funk", + "fusion", + "trance", + "classical", + "instrumental", + "acid", + "house", + "game", + "sound clip", + "gospel", + "noise", + "alternrock", + "bass", + "soul", + "punk", + "space", + "meditative", + "instrumental pop", + "instrumental rock", + "ethnic", + "gothic", + "darkwave", + "techno industrial", + "electronic", + "pop folk", + "eurodance", + "dream", + "southern rock", + "comedy", + "cult", + "gangsta", + "top ", + "christian rap", + "pop funk", + "jungle", + "native american", + "cabaret", + "new wave", + "psychedelic", + "rave", + "showtunes", + "trailer", + "lo fi", + "tribal", + "acid punk", + "acid jazz", + "polka", + "retro", + "musical", + "rock and roll", + //winamp extension + "hard rock", + "folk", + "folk rock", + "national folk", + "swing", + "fast fusion", + "bebob", + "latin", + "revival", + "celtic", + "bluegrass", + "avantgarde", + "gothic rock", + "progressive rock", + "psychedelic rock", + "symphonic rock", + "slow rock", + "big band", + "chorus", + "easy listening", + "acoustic", + "humour", + "speech", + "chanson", + "opera", + "chamber music", + "sonata", + "symphony", + "booty bass", + "primus", + "porn groove", + "satire", + "slow jam", + "club", + "tango", + "samba", + "folklore", + "ballad", + "power ballad", + "rhythmic soul", + "freestyle", + "duet", + "punk rock", + "drum solo", + "a capella", + "euro house", + "dance hall" + }; + private static final String[] NERO_TAGS = { + "artist", "title", "album", "track", "totaltracks", "year", "genre", + "disc", "totaldiscs", "url", "copyright", "comment", "lyrics", + "credits", "rating", "label", "composer", "isrc", "mood", "tempo" + }; + private Map, Object> contents; - MetaData() { - contents = new HashMap, Object>(); - } + MetaData() { + contents = new HashMap<>(); + } - /*moov.udta: - * -3gpp boxes - * -meta - * --ilst - * --tags - * --meta (no container!) - * --tseg - * ---tshd - */ - void parse(Box udta, Box meta) { - //standard boxes - if(meta.hasChild(BoxTypes.COPYRIGHT_BOX)) { - CopyrightBox cprt = (CopyrightBox) meta.getChild(BoxTypes.COPYRIGHT_BOX); - put(Field.LANGUAGE, new Locale(cprt.getLanguageCode())); - put(Field.COPYRIGHT, cprt.getNotice()); - } - //3gpp user data - if(udta!=null) parse3GPPData(udta); - //id3, TODO: can be present in different languages - if(meta.hasChild(BoxTypes.ID3_TAG_BOX)) parseID3((ID3TagBox) meta.getChild(BoxTypes.ID3_TAG_BOX)); - //itunes - if(meta.hasChild(BoxTypes.ITUNES_META_LIST_BOX)) parseITunesMetaData(meta.getChild(BoxTypes.ITUNES_META_LIST_BOX)); - //nero tags - if(meta.hasChild(BoxTypes.NERO_METADATA_TAGS_BOX)) parseNeroTags((NeroMetadataTagsBox) meta.getChild(BoxTypes.NERO_METADATA_TAGS_BOX)); - } + /*moov.udta: + * -3gpp boxes + * -meta + * --ilst + * --tags + * --meta (no container!) + * --tseg + * ---tshd + */ + void parse(Box udta, Box meta) { + //standard boxes + if (meta.hasChild(BoxTypes.COPYRIGHT_BOX)) { + CopyrightBox cprt = (CopyrightBox) meta.getChild(BoxTypes.COPYRIGHT_BOX); + put(Field.LANGUAGE, new Locale(cprt.getLanguageCode())); + put(Field.COPYRIGHT, cprt.getNotice()); + } + //3gpp user data + if (udta != null) parse3GPPData(udta); + //id3, TODO: can be present in different languages + if (meta.hasChild(BoxTypes.ID3_TAG_BOX)) parseID3((ID3TagBox) meta.getChild(BoxTypes.ID3_TAG_BOX)); + //itunes + if (meta.hasChild(BoxTypes.ITUNES_META_LIST_BOX)) + parseITunesMetaData(meta.getChild(BoxTypes.ITUNES_META_LIST_BOX)); + //nero tags + if (meta.hasChild(BoxTypes.NERO_METADATA_TAGS_BOX)) + parseNeroTags((NeroMetadataTagsBox) meta.getChild(BoxTypes.NERO_METADATA_TAGS_BOX)); + } - //parses specific children of 'udta': 3GPP - //TODO: handle language codes - private void parse3GPPData(Box udta) { - if(udta.hasChild(BoxTypes.THREE_GPP_ALBUM_BOX)) { - ThreeGPPAlbumBox albm = (ThreeGPPAlbumBox) udta.getChild(BoxTypes.THREE_GPP_ALBUM_BOX); - put(Field.ALBUM, albm.getData()); - put(Field.TRACK_NUMBER, albm.getTrackNumber()); - } - //if(udta.hasChild(BoxTypes.THREE_GPP_AUTHOR_BOX)); - //if(udta.hasChild(BoxTypes.THREE_GPP_CLASSIFICATION_BOX)); - if(udta.hasChild(BoxTypes.THREE_GPP_DESCRIPTION_BOX)) put(Field.DESCRIPTION, ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_DESCRIPTION_BOX)).getData()); - if(udta.hasChild(BoxTypes.THREE_GPP_KEYWORDS_BOX)) put(Field.KEYWORDS, ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_KEYWORDS_BOX)).getData()); - if(udta.hasChild(BoxTypes.THREE_GPP_LOCATION_INFORMATION_BOX)) put(Field.LOCATION, ((ThreeGPPLocationBox) udta.getChild(BoxTypes.THREE_GPP_LOCATION_INFORMATION_BOX)).getPlaceName()); - if(udta.hasChild(BoxTypes.THREE_GPP_PERFORMER_BOX)) put(Field.ARTIST, ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_PERFORMER_BOX)).getData()); - if(udta.hasChild(BoxTypes.THREE_GPP_RECORDING_YEAR_BOX)) { - final String value = ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_RECORDING_YEAR_BOX)).getData(); - try { - put(Field.RELEASE_DATE, new Date(Integer.parseInt(value))); - } - catch(NumberFormatException e) { - Logger.getLogger("MP4 API").log(Level.INFO, "unable to parse 3GPP metadata: recording year value: {0}", value); - } - } - if(udta.hasChild(BoxTypes.THREE_GPP_TITLE_BOX)) put(Field.TITLE, ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_TITLE_BOX)).getData()); - } + //parses specific children of 'udta': 3GPP + //TODO: handle language codes + private void parse3GPPData(Box udta) { + if (udta.hasChild(BoxTypes.THREE_GPP_ALBUM_BOX)) { + ThreeGPPAlbumBox albm = (ThreeGPPAlbumBox) udta.getChild(BoxTypes.THREE_GPP_ALBUM_BOX); + put(Field.ALBUM, albm.getData()); + put(Field.TRACK_NUMBER, albm.getTrackNumber()); + } + //if(udta.hasChild(BoxTypes.THREE_GPP_AUTHOR_BOX)); + //if(udta.hasChild(BoxTypes.THREE_GPP_CLASSIFICATION_BOX)); + if (udta.hasChild(BoxTypes.THREE_GPP_DESCRIPTION_BOX)) + put(Field.DESCRIPTION, ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_DESCRIPTION_BOX)).getData()); + if (udta.hasChild(BoxTypes.THREE_GPP_KEYWORDS_BOX)) + put(Field.KEYWORDS, ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_KEYWORDS_BOX)).getData()); + if (udta.hasChild(BoxTypes.THREE_GPP_LOCATION_INFORMATION_BOX)) + put(Field.LOCATION, ((ThreeGPPLocationBox) udta.getChild(BoxTypes.THREE_GPP_LOCATION_INFORMATION_BOX)).getPlaceName()); + if (udta.hasChild(BoxTypes.THREE_GPP_PERFORMER_BOX)) + put(Field.ARTIST, ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_PERFORMER_BOX)).getData()); + if (udta.hasChild(BoxTypes.THREE_GPP_RECORDING_YEAR_BOX)) { + String value = ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_RECORDING_YEAR_BOX)).getData(); + try { + put(Field.RELEASE_DATE, new Date(Integer.parseInt(value))); + } catch (NumberFormatException e) { + Logger.getLogger("MP4 API").log(Level.FINE, "unable to parse 3GPP metadata: recording year value: {0}", value); + } + } + if (udta.hasChild(BoxTypes.THREE_GPP_TITLE_BOX)) + put(Field.TITLE, ((ThreeGPPMetadataBox) udta.getChild(BoxTypes.THREE_GPP_TITLE_BOX)).getData()); + } - //parses children of 'ilst': iTunes - private void parseITunesMetaData(Box ilst) { - final List boxes = ilst.getChildren(); - long l; - ITunesMetadataBox data; - for(Box box : boxes) { - l = box.getType(); - data = (ITunesMetadataBox) box.getChild(BoxTypes.ITUNES_METADATA_BOX); + //parses children of 'ilst': iTunes + private void parseITunesMetaData(Box ilst) { + List boxes = ilst.getChildren(); + long l; + ITunesMetadataBox data; + for (Box box : boxes) { + l = box.getType(); + data = (ITunesMetadataBox) box.getChild(BoxTypes.ITUNES_METADATA_BOX); - if(l==BoxTypes.ARTIST_NAME_BOX) put(Field.ARTIST, data.getText()); - else if(l==BoxTypes.TRACK_NAME_BOX) put(Field.TITLE, data.getText()); - else if(l==BoxTypes.ALBUM_ARTIST_NAME_BOX) put(Field.ALBUM_ARTIST, data.getText()); - else if(l==BoxTypes.ALBUM_NAME_BOX) put(Field.ALBUM, data.getText()); - else if(l==BoxTypes.TRACK_NUMBER_BOX) { - byte[] b = data.getData(); - put(Field.TRACK_NUMBER, new Integer(b[3])); - put(Field.TOTAL_TRACKS, new Integer(b[5])); - } - else if(l==BoxTypes.DISK_NUMBER_BOX) put(Field.DISK_NUMBER, data.getInteger()); - else if(l==BoxTypes.COMPOSER_NAME_BOX) put(Field.COMPOSER, data.getText()); - else if(l==BoxTypes.COMMENTS_BOX) put(Field.COMMENTS, data.getText()); - else if(l==BoxTypes.TEMPO_BOX) put(Field.TEMPO, data.getInteger()); - else if(l==BoxTypes.RELEASE_DATE_BOX) put(Field.RELEASE_DATE, data.getDate()); - else if(l==BoxTypes.GENRE_BOX||l==BoxTypes.CUSTOM_GENRE_BOX) { - String s = null; - if(data.getDataType()==ITunesMetadataBox.DataType.UTF8) s = data.getText(); - else { - final int i = data.getInteger(); - if(i>0&&i list = new ArrayList(); - list.add(aw); - put(Field.COVER_ARTWORKS, list); - } - } - else if(l==BoxTypes.GROUPING_BOX) put(Field.GROUPING, data.getText()); - else if(l==BoxTypes.LYRICS_BOX) put(Field.LYRICS, data.getText()); - else if(l==BoxTypes.RATING_BOX) put(Field.RATING, data.getInteger()); - else if(l==BoxTypes.PODCAST_BOX) put(Field.PODCAST, data.getInteger()); - else if(l==BoxTypes.PODCAST_URL_BOX) put(Field.PODCAST_URL, data.getText()); - else if(l==BoxTypes.CATEGORY_BOX) put(Field.CATEGORY, data.getText()); - else if(l==BoxTypes.KEYWORD_BOX) put(Field.KEYWORDS, data.getText()); - else if(l==BoxTypes.DESCRIPTION_BOX) put(Field.DESCRIPTION, data.getText()); - else if(l==BoxTypes.LONG_DESCRIPTION_BOX) put(Field.DESCRIPTION, data.getText()); - else if(l==BoxTypes.TV_SHOW_BOX) put(Field.TV_SHOW, data.getText()); - else if(l==BoxTypes.TV_NETWORK_NAME_BOX) put(Field.TV_NETWORK, data.getText()); - else if(l==BoxTypes.TV_EPISODE_BOX) put(Field.TV_EPISODE, data.getText()); - else if(l==BoxTypes.TV_EPISODE_NUMBER_BOX) put(Field.TV_EPISODE_NUMBER, data.getInteger()); - else if(l==BoxTypes.TV_SEASON_BOX) put(Field.TV_SEASON, data.getInteger()); - else if(l==BoxTypes.PURCHASE_DATE_BOX) put(Field.PURCHASE_DATE, data.getText()); - else if(l==BoxTypes.GAPLESS_PLAYBACK_BOX) put(Field.GAPLESS_PLAYBACK, data.getText()); - else if(l==BoxTypes.HD_VIDEO_BOX) put(Field.HD_VIDEO, data.getBoolean()); - else if(l==BoxTypes.ARTIST_SORT_BOX) put(Field.ARTIST_SORT_TEXT, data.getText()); - else if(l==BoxTypes.TRACK_SORT_BOX) put(Field.TITLE_SORT_TEXT, data.getText()); - else if(l==BoxTypes.ALBUM_SORT_BOX) put(Field.ALBUM_SORT_TEXT, data.getText()); - } - } + if (l == BoxTypes.ARTIST_NAME_BOX) put(Field.ARTIST, data.getText()); + else if (l == BoxTypes.TRACK_NAME_BOX) put(Field.TITLE, data.getText()); + else if (l == BoxTypes.ALBUM_ARTIST_NAME_BOX) put(Field.ALBUM_ARTIST, data.getText()); + else if (l == BoxTypes.ALBUM_NAME_BOX) put(Field.ALBUM, data.getText()); + else if (l == BoxTypes.TRACK_NUMBER_BOX) { + byte[] b = data.getData(); + put(Field.TRACK_NUMBER, (int) b[3]); + put(Field.TOTAL_TRACKS, new Integer(b[5])); + } else if (l == BoxTypes.DISK_NUMBER_BOX) put(Field.DISK_NUMBER, data.getInteger()); + else if (l == BoxTypes.COMPOSER_NAME_BOX) put(Field.COMPOSER, data.getText()); + else if (l == BoxTypes.COMMENTS_BOX) put(Field.COMMENTS, data.getText()); + else if (l == BoxTypes.TEMPO_BOX) put(Field.TEMPO, data.getInteger()); + else if (l == BoxTypes.RELEASE_DATE_BOX) put(Field.RELEASE_DATE, data.getDate()); + else if (l == BoxTypes.GENRE_BOX || l == BoxTypes.CUSTOM_GENRE_BOX) { + String s = null; + if (data.getDataType() == ITunesMetadataBox.DataType.UTF8) s = data.getText(); + else { + int i = data.getInteger(); + if (i > 0 && i < STANDARD_GENRES.length) s = STANDARD_GENRES[data.getInteger()]; + } + if (s != null) put(Field.GENRE, s); + } else if (l == BoxTypes.ENCODER_NAME_BOX) put(Field.ENCODER_NAME, data.getText()); + else if (l == BoxTypes.ENCODER_TOOL_BOX) put(Field.ENCODER_TOOL, data.getText()); + else if (l == BoxTypes.COPYRIGHT_BOX) put(Field.COPYRIGHT, data.getText()); + else if (l == BoxTypes.COMPILATION_PART_BOX) put(Field.COMPILATION, data.getBoolean()); + else if (l == BoxTypes.COVER_BOX) { + Artwork aw = new Artwork(Artwork.Type.forDataType(data.getDataType()), data.getData()); + if (contents.containsKey(Field.COVER_ARTWORKS)) get(Field.COVER_ARTWORKS).add(aw); + else { + List list = new ArrayList<>(); + list.add(aw); + put(Field.COVER_ARTWORKS, list); + } + } else if (l == BoxTypes.GROUPING_BOX) put(Field.GROUPING, data.getText()); + else if (l == BoxTypes.LYRICS_BOX) put(Field.LYRICS, data.getText()); + else if (l == BoxTypes.RATING_BOX) put(Field.RATING, data.getInteger()); + else if (l == BoxTypes.PODCAST_BOX) put(Field.PODCAST, data.getInteger()); + else if (l == BoxTypes.PODCAST_URL_BOX) put(Field.PODCAST_URL, data.getText()); + else if (l == BoxTypes.CATEGORY_BOX) put(Field.CATEGORY, data.getText()); + else if (l == BoxTypes.KEYWORD_BOX) put(Field.KEYWORDS, data.getText()); + else if (l == BoxTypes.DESCRIPTION_BOX) put(Field.DESCRIPTION, data.getText()); + else if (l == BoxTypes.LONG_DESCRIPTION_BOX) put(Field.DESCRIPTION, data.getText()); + else if (l == BoxTypes.TV_SHOW_BOX) put(Field.TV_SHOW, data.getText()); + else if (l == BoxTypes.TV_NETWORK_NAME_BOX) put(Field.TV_NETWORK, data.getText()); + else if (l == BoxTypes.TV_EPISODE_BOX) put(Field.TV_EPISODE, data.getText()); + else if (l == BoxTypes.TV_EPISODE_NUMBER_BOX) put(Field.TV_EPISODE_NUMBER, data.getInteger()); + else if (l == BoxTypes.TV_SEASON_BOX) put(Field.TV_SEASON, data.getInteger()); + else if (l == BoxTypes.PURCHASE_DATE_BOX) put(Field.PURCHASE_DATE, data.getText()); + else if (l == BoxTypes.GAPLESS_PLAYBACK_BOX) put(Field.GAPLESS_PLAYBACK, data.getText()); + else if (l == BoxTypes.HD_VIDEO_BOX) put(Field.HD_VIDEO, data.getBoolean()); + else if (l == BoxTypes.ARTIST_SORT_BOX) put(Field.ARTIST_SORT_TEXT, data.getText()); + else if (l == BoxTypes.TRACK_SORT_BOX) put(Field.TITLE_SORT_TEXT, data.getText()); + else if (l == BoxTypes.ALBUM_SORT_BOX) put(Field.ALBUM_SORT_TEXT, data.getText()); + } + } - //parses children of ID3 - private void parseID3(ID3TagBox box) { - try { - final DataInputStream in = new DataInputStream(new ByteArrayInputStream(box.getID3Data())); - ID3Tag tag = new ID3Tag(in); - int[] num; - for(ID3Frame frame : tag.getFrames()) { - switch(frame.getID()) { - case ID3Frame.TITLE: - put(Field.TITLE, frame.getEncodedText()); - break; - case ID3Frame.ALBUM_TITLE: - put(Field.ALBUM, frame.getEncodedText()); - break; - case ID3Frame.TRACK_NUMBER: - num = frame.getNumbers(); - put(Field.TRACK_NUMBER, num[0]); - if(num.length>1) put(Field.TOTAL_TRACKS, num[1]); - break; - case ID3Frame.ARTIST: - put(Field.ARTIST, frame.getEncodedText()); - break; - case ID3Frame.COMPOSER: - put(Field.COMPOSER, frame.getEncodedText()); - break; - case ID3Frame.BEATS_PER_MINUTE: - put(Field.TEMPO, frame.getNumber()); - break; - case ID3Frame.LENGTH: - put(Field.LENGTH_IN_MILLISECONDS, frame.getNumber()); - break; - case ID3Frame.LANGUAGES: - put(Field.LANGUAGE, frame.getLocale()); - break; - case ID3Frame.COPYRIGHT_MESSAGE: - put(Field.COPYRIGHT, frame.getEncodedText()); - break; - case ID3Frame.PUBLISHER: - put(Field.PUBLISHER, frame.getEncodedText()); - break; - case ID3Frame.INTERNET_RADIO_STATION_NAME: - put(Field.INTERNET_RADIO_STATION, frame.getEncodedText()); - break; - case ID3Frame.ENCODING_TIME: - put(Field.ENCODING_DATE, frame.getDate()); - break; - case ID3Frame.RELEASE_TIME: - put(Field.RELEASE_DATE, frame.getDate()); - break; - case ID3Frame.ENCODING_TOOLS_AND_SETTINGS: - put(Field.ENCODER_TOOL, frame.getEncodedText()); - break; - case ID3Frame.PERFORMER_SORT_ORDER: - put(Field.ARTIST_SORT_TEXT, frame.getEncodedText()); - break; - case ID3Frame.TITLE_SORT_ORDER: - put(Field.TITLE_SORT_TEXT, frame.getEncodedText()); - break; - case ID3Frame.ALBUM_SORT_ORDER: - put(Field.ALBUM_SORT_TEXT, frame.getEncodedText()); - break; - } - } - } - catch(IOException e) { - Logger.getLogger("MP4 API").log(Level.SEVERE, "Exception in MetaData.parseID3: {0}", e.toString()); - } - } + //parses children of ID3 + private void parseID3(ID3TagBox box) { + try { + DataInputStream in = new DataInputStream(new ByteArrayInputStream(box.getID3Data())); + ID3Tag tag = new ID3Tag(in); + int[] num; + for (ID3Frame frame : tag.getFrames()) { + switch (frame.getID()) { + case ID3Frame.TITLE: + put(Field.TITLE, frame.getEncodedText()); + break; + case ID3Frame.ALBUM_TITLE: + put(Field.ALBUM, frame.getEncodedText()); + break; + case ID3Frame.TRACK_NUMBER: + num = frame.getNumbers(); + put(Field.TRACK_NUMBER, num[0]); + if (num.length > 1) put(Field.TOTAL_TRACKS, num[1]); + break; + case ID3Frame.ARTIST: + put(Field.ARTIST, frame.getEncodedText()); + break; + case ID3Frame.COMPOSER: + put(Field.COMPOSER, frame.getEncodedText()); + break; + case ID3Frame.BEATS_PER_MINUTE: + put(Field.TEMPO, frame.getNumber()); + break; + case ID3Frame.LENGTH: + put(Field.LENGTH_IN_MILLISECONDS, frame.getNumber()); + break; + case ID3Frame.LANGUAGES: + put(Field.LANGUAGE, frame.getLocale()); + break; + case ID3Frame.COPYRIGHT_MESSAGE: + put(Field.COPYRIGHT, frame.getEncodedText()); + break; + case ID3Frame.PUBLISHER: + put(Field.PUBLISHER, frame.getEncodedText()); + break; + case ID3Frame.INTERNET_RADIO_STATION_NAME: + put(Field.INTERNET_RADIO_STATION, frame.getEncodedText()); + break; + case ID3Frame.ENCODING_TIME: + put(Field.ENCODING_DATE, frame.getDate()); + break; + case ID3Frame.RELEASE_TIME: + put(Field.RELEASE_DATE, frame.getDate()); + break; + case ID3Frame.ENCODING_TOOLS_AND_SETTINGS: + put(Field.ENCODER_TOOL, frame.getEncodedText()); + break; + case ID3Frame.PERFORMER_SORT_ORDER: + put(Field.ARTIST_SORT_TEXT, frame.getEncodedText()); + break; + case ID3Frame.TITLE_SORT_ORDER: + put(Field.TITLE_SORT_TEXT, frame.getEncodedText()); + break; + case ID3Frame.ALBUM_SORT_ORDER: + put(Field.ALBUM_SORT_TEXT, frame.getEncodedText()); + break; + } + } + } catch (IOException e) { + Logger.getLogger("MP4 API").log(Level.SEVERE, "Exception in MetaData.parseID3: {0}", e.toString()); + } + } - //parses children of 'tags': Nero - private void parseNeroTags(NeroMetadataTagsBox tags) { - final Map pairs = tags.getPairs(); - String val; - for(String key : pairs.keySet()) { - val = pairs.get(key); - try { - if(key.equals(NERO_TAGS[0])) put(Field.ARTIST, val); - if(key.equals(NERO_TAGS[1])) put(Field.TITLE, val); - if(key.equals(NERO_TAGS[2])) put(Field.ALBUM, val); - if(key.equals(NERO_TAGS[3])) put(Field.TRACK_NUMBER, Integer.parseInt(val)); - if(key.equals(NERO_TAGS[4])) put(Field.TOTAL_TRACKS, Integer.parseInt(val)); - if(key.equals(NERO_TAGS[5])) { - Calendar c = Calendar.getInstance(); - c.set(Calendar.YEAR, Integer.parseInt(val)); - put(Field.RELEASE_DATE, c.getTime()); - } - if(key.equals(NERO_TAGS[6])) put(Field.GENRE, val); - if(key.equals(NERO_TAGS[7])) put(Field.DISK_NUMBER, Integer.parseInt(val)); - if(key.equals(NERO_TAGS[8])) put(Field.TOTAL_DISKS, Integer.parseInt(val)); - if(key.equals(NERO_TAGS[9])); //url - if(key.equals(NERO_TAGS[10])) put(Field.COPYRIGHT, val); - if(key.equals(NERO_TAGS[11])) put(Field.COMMENTS, val); - if(key.equals(NERO_TAGS[12])) put(Field.LYRICS, val); - if(key.equals(NERO_TAGS[13])); //credits - if(key.equals(NERO_TAGS[14])) put(Field.RATING, Integer.parseInt(val)); - if(key.equals(NERO_TAGS[15])) put(Field.PUBLISHER, val); - if(key.equals(NERO_TAGS[16])) put(Field.COMPOSER, val); - if(key.equals(NERO_TAGS[17])); //isrc - if(key.equals(NERO_TAGS[18])); //mood - if(key.equals(NERO_TAGS[19])) put(Field.TEMPO, Integer.parseInt(val)); - } - catch(NumberFormatException e) { - Logger.getLogger("MP4 API").log(Level.SEVERE, "Exception in MetaData.parseNeroTags: {0}", e.toString()); - } - } - } + //parses children of 'tags': Nero + private void parseNeroTags(NeroMetadataTagsBox tags) { + Map pairs = tags.getPairs(); + String val; + for (String key : pairs.keySet()) { + val = pairs.get(key); + try { + if (key.equals(NERO_TAGS[0])) put(Field.ARTIST, val); + if (key.equals(NERO_TAGS[1])) put(Field.TITLE, val); + if (key.equals(NERO_TAGS[2])) put(Field.ALBUM, val); + if (key.equals(NERO_TAGS[3])) put(Field.TRACK_NUMBER, Integer.parseInt(val)); + if (key.equals(NERO_TAGS[4])) put(Field.TOTAL_TRACKS, Integer.parseInt(val)); + if (key.equals(NERO_TAGS[5])) { + Calendar c = Calendar.getInstance(); + c.set(Calendar.YEAR, Integer.parseInt(val)); + put(Field.RELEASE_DATE, c.getTime()); + } + if (key.equals(NERO_TAGS[6])) put(Field.GENRE, val); + if (key.equals(NERO_TAGS[7])) put(Field.DISK_NUMBER, Integer.parseInt(val)); + if (key.equals(NERO_TAGS[8])) put(Field.TOTAL_DISKS, Integer.parseInt(val)); + if (key.equals(NERO_TAGS[9])) ; //url + if (key.equals(NERO_TAGS[10])) put(Field.COPYRIGHT, val); + if (key.equals(NERO_TAGS[11])) put(Field.COMMENTS, val); + if (key.equals(NERO_TAGS[12])) put(Field.LYRICS, val); + if (key.equals(NERO_TAGS[13])) ; //credits + if (key.equals(NERO_TAGS[14])) put(Field.RATING, Integer.parseInt(val)); + if (key.equals(NERO_TAGS[15])) put(Field.PUBLISHER, val); + if (key.equals(NERO_TAGS[16])) put(Field.COMPOSER, val); + if (key.equals(NERO_TAGS[17])) ; //isrc + if (key.equals(NERO_TAGS[18])) ; //mood + if (key.equals(NERO_TAGS[19])) put(Field.TEMPO, Integer.parseInt(val)); + } catch (NumberFormatException e) { + Logger.getLogger("MP4 API").log(Level.SEVERE, "Exception in MetaData.parseNeroTags: {0}", e.toString()); + } + } + } - private void put(Field field, T value) { - contents.put(field, value); - } + private void put(Field field, T value) { + contents.put(field, value); + } - boolean containsMetaData() { - return !contents.isEmpty(); - } + boolean containsMetaData() { + return !contents.isEmpty(); + } - @SuppressWarnings("unchecked") - public T get(Field field) { - return (T) contents.get(field); - } + @SuppressWarnings("unchecked") + public T get(Field field) { + return (T) contents.get(field); + } - public Map, Object> getAll() { - return Collections.unmodifiableMap(contents); - } + public Map, Object> getAll() { + return Collections.unmodifiableMap(contents); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/Movie.java b/src/main/java/net/sourceforge/jaad/mp4/api/Movie.java index dda2ec48..7a2aab2e 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/Movie.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/Movie.java @@ -5,189 +5,195 @@ import java.util.Collections; import java.util.Date; import java.util.List; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.Box; import net.sourceforge.jaad.mp4.boxes.BoxTypes; import net.sourceforge.jaad.mp4.boxes.impl.HandlerBox; import net.sourceforge.jaad.mp4.boxes.impl.MovieHeaderBox; + public class Movie { - private final MP4InputStream in; - private final MovieHeaderBox mvhd; - private final List tracks; - private final MetaData metaData; - private final List protections; - - public Movie(Box moov, MP4InputStream in) { - this.in = in; - - //create tracks - mvhd = (MovieHeaderBox) moov.getChild(BoxTypes.MOVIE_HEADER_BOX); - List trackBoxes = moov.getChildren(BoxTypes.TRACK_BOX); - tracks = new ArrayList(trackBoxes.size()); - Track track; - for(int i = 0; i(); - if(moov.hasChild(BoxTypes.ITEM_PROTECTION_BOX)) { - Box ipro = moov.getChild(BoxTypes.ITEM_PROTECTION_BOX); - for(Box sinf : ipro.getChildren(BoxTypes.PROTECTION_SCHEME_INFORMATION_BOX)) { - protections.add(Protection.parse(sinf)); - } - } - } - - //TODO: support hint and meta - private Track createTrack(Box trak) { - final HandlerBox hdlr = (HandlerBox) trak.getChild(BoxTypes.MEDIA_BOX).getChild(BoxTypes.HANDLER_BOX); - final Track track; - switch((int) hdlr.getHandlerType()) { - case HandlerBox.TYPE_VIDEO: - track = new VideoTrack(trak, in); - break; - case HandlerBox.TYPE_SOUND: - track = new AudioTrack(trak, in); - break; - default: - track = null; - } - return track; - } - - /** - * Returns an unmodifiable list of all tracks in this movie. The tracks are - * ordered as they appeare in the file/stream. - * - * @return the tracks contained by this movie - */ - public List getTracks() { - return Collections.unmodifiableList(tracks); - } - - /** - * Returns an unmodifiable list of all tracks in this movie with the - * specified type. The tracks are ordered as they appeare in the - * file/stream. - * - * @return the tracks contained by this movie with the passed type - */ - public List getTracks(Type type) { - final List l = new ArrayList(); - for(Track t : tracks) { - if(t.getType().equals(type)) l.add(t); - } - return Collections.unmodifiableList(l); - } - - /** - * Returns an unmodifiable list of all tracks in this movie whose samples - * are encoded with the specified codec. The tracks are ordered as they - * appeare in the file/stream. - * - * @return the tracks contained by this movie with the passed type - */ - public List getTracks(Track.Codec codec) { - final List l = new ArrayList(); - for(Track t : tracks) { - if(t.getCodec().equals(codec)) l.add(t); - } - return Collections.unmodifiableList(l); - } - - /** - * Indicates if this movie contains metadata. If false the MetaData - * object returned by getMetaData() will not contain any field. - * - * @return true if this movie contains any metadata - */ - public boolean containsMetaData() { - return metaData.containsMetaData(); - } - - /** - * Returns the MetaData object for this movie. - * - * @return the MetaData for this movie - */ - public MetaData getMetaData() { - return metaData; - } - - /** - * Returns the ProtectionInformation objects that contains - * details about the DRM systems used. If no protection is present the - * returned list will be empty. - * - * @return a list of protection informations - */ - public List getProtections() { - return Collections.unmodifiableList(protections); - } - - //mvhd - /** - * Returns the time this movie was created. - * @return the creation time - */ - public Date getCreationTime() { - return Utils.getDate(mvhd.getCreationTime()); - } - - /** - * Returns the last time this movie was modified. - * @return the modification time - */ - public Date getModificationTime() { - return Utils.getDate(mvhd.getModificationTime()); - } - - /** - * Returns the duration in seconds. - * @return the duration - */ - public double getDuration() { - return (double) mvhd.getDuration()/(double) mvhd.getTimeScale(); - } - - /** - * Indicates if there are more frames to be read in this movie. - * - * @return true if there is at least one track in this movie that has at least one more frame to read. - */ - public boolean hasMoreFrames() { - for(Track track : tracks) { - if(track.hasMoreFrames()) return true; - } - return false; - } - - /** - * Reads the next frame from this movie (from one of the contained tracks). - * The frame is the next in time-order, thus the next for playback. If none - * of the tracks contains any more frames, null is returned. - * - * @return the next frame or null if there are no more frames to read from this movie. - * @throws IOException if reading fails - */ - public Frame readNextFrame() throws IOException { - Track track = null; - for(Track t : tracks) { - if(t.hasMoreFrames()&&(track==null||t.getNextTimeStamp() tracks; + private final MetaData metaData; + private final List protections; + + public Movie(Box moov, MP4Input in) { + this.in = in; + + //create tracks + mvhd = (MovieHeaderBox) moov.getChild(BoxTypes.MOVIE_HEADER_BOX); + List trackBoxes = moov.getChildren(BoxTypes.TRACK_BOX); + tracks = new ArrayList<>(trackBoxes.size()); + Track track; + for (Box trackBox : trackBoxes) { + track = createTrack(trackBox); + if (track != null) tracks.add(track); + } + + //read metadata: moov.meta/moov.udta.meta + metaData = new MetaData(); + if (moov.hasChild(BoxTypes.META_BOX)) metaData.parse(null, moov.getChild(BoxTypes.META_BOX)); + else if (moov.hasChild(BoxTypes.USER_DATA_BOX)) { + Box udta = moov.getChild(BoxTypes.USER_DATA_BOX); + if (udta.hasChild(BoxTypes.META_BOX)) metaData.parse(udta, udta.getChild(BoxTypes.META_BOX)); + } + + //detect DRM + protections = new ArrayList<>(); + if (moov.hasChild(BoxTypes.ITEM_PROTECTION_BOX)) { + Box ipro = moov.getChild(BoxTypes.ITEM_PROTECTION_BOX); + for (Box sinf : ipro.getChildren(BoxTypes.PROTECTION_SCHEME_INFORMATION_BOX)) { + protections.add(Protection.parse(sinf)); + } + } + } + + // TODO: support hint and meta + private Track createTrack(Box trak) { + HandlerBox hdlr = (HandlerBox) trak.getChild(BoxTypes.MEDIA_BOX).getChild(BoxTypes.HANDLER_BOX); + Track track; + switch ((int) hdlr.getHandlerType()) { + case HandlerBox.TYPE_VIDEO: + track = new VideoTrack(trak, in); + break; + case HandlerBox.TYPE_SOUND: + track = new AudioTrack(trak, in); + break; + default: + track = null; + } + return track; + } + + /** + * Returns an unmodifiable list of all tracks in this movie. The tracks are + * ordered as they appeare in the file/stream. + * + * @return the tracks contained by this movie + */ + public List getTracks() { + return Collections.unmodifiableList(tracks); + } + + /** + * Returns an unmodifiable list of all tracks in this movie with the + * specified type. The tracks are ordered as they appeare in the + * file/stream. + * + * @return the tracks contained by this movie with the passed type + */ + public List getTracks(Type type) { + List l = new ArrayList<>(); + for (Track t : tracks) { + if (t.getType().equals(type)) l.add(t); + } + return Collections.unmodifiableList(l); + } + + /** + * Returns an unmodifiable list of all tracks in this movie whose samples + * are encoded with the specified codec. The tracks are ordered as they + * appeare in the file/stream. + * + * @return the tracks contained by this movie with the passed type + */ + public List getTracks(Track.Codec codec) { + List l = new ArrayList<>(); + for (Track t : tracks) { + if (t.getCodec().equals(codec)) l.add(t); + } + return Collections.unmodifiableList(l); + } + + /** + * Indicates if this movie contains metadata. If false the MetaData + * object returned by getMetaData() will not contain any field. + * + * @return true if this movie contains any metadata + */ + public boolean containsMetaData() { + return metaData.containsMetaData(); + } + + /** + * Returns the MetaData object for this movie. + * + * @return the MetaData for this movie + */ + public MetaData getMetaData() { + return metaData; + } + + /** + * Returns the ProtectionInformation objects that contains + * details about the DRM systems used. If no protection is present the + * returned list will be empty. + * + * @return a list of protection information + */ + public List getProtections() { + return Collections.unmodifiableList(protections); + } + + //mvhd + + /** + * Returns the time this movie was created. + * + * @return the creation time + */ + public Date getCreationTime() { + return Utils.getDate(mvhd.getCreationTime()); + } + + /** + * Returns the last time this movie was modified. + * + * @return the modification time + */ + public Date getModificationTime() { + return Utils.getDate(mvhd.getModificationTime()); + } + + /** + * Returns the duration in seconds. + * + * @return the duration + */ + public double getDuration() { + return (double) mvhd.getDuration() / (double) mvhd.getTimeScale(); + } + + /** + * Indicates if there are more frames to be read in this movie. + * + * @return true if there is at least one track in this movie that has at least one more frame to read. + */ + public boolean hasMoreFrames() { + for (Track track : tracks) { + if (track.hasMoreFrames()) return true; + } + return false; + } + + /** + * Reads the next frame from this movie (from one of the contained tracks). + * The frame is the next in time-order, thus the next for playback. If none + * of the tracks contains any more frames, null is returned. + * + * @return the next frame or null if there are no more frames to read from this movie. + * @throws IOException if reading fails + */ + public Frame readNextFrame() throws IOException { + Track track = null; + for (Track t : tracks) { + if (t.hasMoreFrames() && (track == null || t.getNextTimeStamp() < track.getNextTimeStamp())) track = t; + } + + return (track == null) ? null : track.readNextFrame(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/Protection.java b/src/main/java/net/sourceforge/jaad/mp4/api/Protection.java index 6a268637..cc1abaeb 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/Protection.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/Protection.java @@ -7,61 +7,65 @@ import net.sourceforge.jaad.mp4.boxes.impl.OriginalFormatBox; import net.sourceforge.jaad.mp4.boxes.impl.SchemeTypeBox; + /** * This class contains information about a DRM system. */ public abstract class Protection { - public static enum Scheme { + public enum Scheme { + + ITUNES_FAIR_PLAY(1769239918), + UNKNOWN(-1); + private final long type; - ITUNES_FAIR_PLAY(1769239918), - UNKNOWN(-1); - private long type; + Scheme(long type) { + this.type = type; + } + } - private Scheme(long type) { - this.type = type; - } - } + static Protection parse(Box sinf) { + Protection p = null; + if (sinf.hasChild(BoxTypes.SCHEME_TYPE_BOX)) { + SchemeTypeBox schm = (SchemeTypeBox) sinf.getChild(BoxTypes.SCHEME_TYPE_BOX); + long l = schm.getSchemeType(); + if (l == Scheme.ITUNES_FAIR_PLAY.type) p = new ITunesProtection(sinf); + } - static Protection parse(Box sinf) { - Protection p = null; - if(sinf.hasChild(BoxTypes.SCHEME_TYPE_BOX)) { - final SchemeTypeBox schm = (SchemeTypeBox) sinf.getChild(BoxTypes.SCHEME_TYPE_BOX); - final long l = schm.getSchemeType(); - if(l==Scheme.ITUNES_FAIR_PLAY.type) p = new ITunesProtection(sinf); - } + if (p == null) p = new UnknownProtection(sinf); + return p; + } - if(p==null) p = new UnknownProtection(sinf); - return p; - } - private final Codec originalFormat; + private final Codec originalFormat; - protected Protection(Box sinf) { - //original format - final long type = ((OriginalFormatBox) sinf.getChild(BoxTypes.ORIGINAL_FORMAT_BOX)).getOriginalFormat(); - Codec c; - //TODO: currently it tests for audio and video codec, can do this any other way? - if(!(c = AudioTrack.AudioCodec.forType(type)).equals(AudioTrack.AudioCodec.UNKNOWN_AUDIO_CODEC)) originalFormat = c; - else if(!(c = VideoTrack.VideoCodec.forType(type)).equals(VideoTrack.VideoCodec.UNKNOWN_VIDEO_CODEC)) originalFormat = c; - else originalFormat = null; - } + protected Protection(Box sinf) { + //original format + long type = ((OriginalFormatBox) sinf.getChild(BoxTypes.ORIGINAL_FORMAT_BOX)).getOriginalFormat(); + Codec c; + //TODO: currently it tests for audio and video codec, can do this any other way? + if (!(c = AudioTrack.AudioCodec.forType(type)).equals(AudioTrack.AudioCodec.UNKNOWN_AUDIO_CODEC)) + originalFormat = c; + else if (!(c = VideoTrack.VideoCodec.forType(type)).equals(VideoTrack.VideoCodec.UNKNOWN_VIDEO_CODEC)) + originalFormat = c; + else originalFormat = null; + } - Codec getOriginalFormat() { - return originalFormat; - } + Codec getOriginalFormat() { + return originalFormat; + } - public abstract Scheme getScheme(); + public abstract Scheme getScheme(); - //default implementation for unknown protection schemes - private static class UnknownProtection extends Protection { + //default implementation for unknown protection schemes + private static class UnknownProtection extends Protection { - UnknownProtection(Box sinf) { - super(sinf); - } + UnknownProtection(Box sinf) { + super(sinf); + } - @Override - public Scheme getScheme() { - return Scheme.UNKNOWN; - } - } + @Override + public Scheme getScheme() { + return Scheme.UNKNOWN; + } + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/Track.java b/src/main/java/net/sourceforge/jaad/mp4/api/Track.java index f799bd2c..0fb514b8 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/Track.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/Track.java @@ -1,7 +1,6 @@ package net.sourceforge.jaad.mp4.api; import java.io.EOFException; -import java.util.logging.Logger; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; @@ -11,25 +10,27 @@ import java.util.List; import java.util.Locale; import java.util.logging.Level; -import net.sourceforge.jaad.mp4.MP4InputStream; +import java.util.logging.Logger; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.Box; import net.sourceforge.jaad.mp4.boxes.BoxTypes; import net.sourceforge.jaad.mp4.boxes.impl.ChunkOffsetBox; import net.sourceforge.jaad.mp4.boxes.impl.DataEntryUrlBox; import net.sourceforge.jaad.mp4.boxes.impl.DataReferenceBox; +import net.sourceforge.jaad.mp4.boxes.impl.DecodingTimeToSampleBox; +import net.sourceforge.jaad.mp4.boxes.impl.ESDBox; import net.sourceforge.jaad.mp4.boxes.impl.MediaHeaderBox; import net.sourceforge.jaad.mp4.boxes.impl.SampleSizeBox; import net.sourceforge.jaad.mp4.boxes.impl.SampleToChunkBox; -import net.sourceforge.jaad.mp4.boxes.impl.DecodingTimeToSampleBox; import net.sourceforge.jaad.mp4.boxes.impl.TrackHeaderBox; import net.sourceforge.jaad.mp4.od.DecoderSpecificInfo; -import net.sourceforge.jaad.mp4.boxes.impl.ESDBox; -import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.SampleEntry; import net.sourceforge.jaad.mp4.od.Descriptor; + /** * This class represents a track in a movie. - * + *

* Each track contains either a decoder specific info as a byte array or a * DecoderInfo object that contains necessary information for the * decoder. @@ -39,349 +40,355 @@ //TODO: expand javadoc; use generics for subclasses? public abstract class Track { - public interface Codec { - //TODO: currently only marker interface - } - private final MP4InputStream in; - protected final TrackHeaderBox tkhd; - private final MediaHeaderBox mdhd; - private final boolean inFile; - private final List frames; - private URL location; - private int currentFrame; - //info structures - protected DecoderSpecificInfo decoderSpecificInfo; - protected DecoderInfo decoderInfo; - protected Protection protection; - - Track(Box trak, MP4InputStream in) { - this.in = in; - - tkhd = (TrackHeaderBox) trak.getChild(BoxTypes.TRACK_HEADER_BOX); - - final Box mdia = trak.getChild(BoxTypes.MEDIA_BOX); - mdhd = (MediaHeaderBox) mdia.getChild(BoxTypes.MEDIA_HEADER_BOX); - final Box minf = mdia.getChild(BoxTypes.MEDIA_INFORMATION_BOX); - - final Box dinf = minf.getChild(BoxTypes.DATA_INFORMATION_BOX); - final DataReferenceBox dref = (DataReferenceBox) dinf.getChild(BoxTypes.DATA_REFERENCE_BOX); - //TODO: support URNs - if(dref.hasChild(BoxTypes.DATA_ENTRY_URL_BOX)) { - DataEntryUrlBox url = (DataEntryUrlBox) dref.getChild(BoxTypes.DATA_ENTRY_URL_BOX); - inFile = url.isInFile(); - if(!inFile) { - try { - location = new URL(url.getLocation()); - } - catch(MalformedURLException e) { - Logger.getLogger("MP4 API").log(Level.WARNING, "Parsing URL-Box failed: {0}, url: {1}", new String[]{e.toString(), url.getLocation()}); - location = null; - } - } - } + public interface Codec { + //TODO: currently only marker interface + } + + private final MP4Input in; + protected final TrackHeaderBox tkhd; + private final MediaHeaderBox mdhd; + private final boolean inFile; + private final List frames; + private URL location; + private int currentFrame; + //info structures + protected DecoderSpecificInfo decoderSpecificInfo; + protected DecoderInfo decoderInfo; + protected Protection protection; + + Track(Box trak, MP4Input in) { + this.in = in; + + tkhd = (TrackHeaderBox) trak.getChild(BoxTypes.TRACK_HEADER_BOX); + + Box mdia = trak.getChild(BoxTypes.MEDIA_BOX); + mdhd = (MediaHeaderBox) mdia.getChild(BoxTypes.MEDIA_HEADER_BOX); + Box minf = mdia.getChild(BoxTypes.MEDIA_INFORMATION_BOX); + + Box dinf = minf.getChild(BoxTypes.DATA_INFORMATION_BOX); + DataReferenceBox dref = (DataReferenceBox) dinf.getChild(BoxTypes.DATA_REFERENCE_BOX); + //TODO: support URNs + if (dref.hasChild(BoxTypes.DATA_ENTRY_URL_BOX)) { + DataEntryUrlBox url = (DataEntryUrlBox) dref.getChild(BoxTypes.DATA_ENTRY_URL_BOX); + inFile = url.isInFile(); + if (!inFile) { + try { + location = new URL(url.getLocation()); + } catch (MalformedURLException e) { + Logger.getLogger("MP4 API").log(Level.WARNING, "Parsing URL-Box failed: {0}, url: {1}", new String[] {e.toString(), url.getLocation()}); + location = null; + } + } + } /*else if(dref.containsChild(BoxTypes.DATA_ENTRY_URN_BOX)) { DataEntryUrnBox urn = (DataEntryUrnBox) dref.getChild(BoxTypes.DATA_ENTRY_URN_BOX); inFile = urn.isInFile(); location = urn.getLocation(); }*/ - else { - inFile = true; - location = null; - } - - //sample table - final Box stbl = minf.getChild(BoxTypes.SAMPLE_TABLE_BOX); - if(stbl.hasChildren()) { - frames = new ArrayList(); - parseSampleTable(stbl); - } - else frames = Collections.emptyList(); - currentFrame = 0; - } - - private void parseSampleTable(Box stbl) { - final double timeScale = mdhd.getTimeScale(); - final Type type = getType(); - - //sample sizes - final long[] sampleSizes = ((SampleSizeBox) stbl.getChild(BoxTypes.SAMPLE_SIZE_BOX)).getSampleSizes(); - - //chunk offsets - final ChunkOffsetBox stco; - if(stbl.hasChild(BoxTypes.CHUNK_OFFSET_BOX)) stco = (ChunkOffsetBox) stbl.getChild(BoxTypes.CHUNK_OFFSET_BOX); - else stco = (ChunkOffsetBox) stbl.getChild(BoxTypes.CHUNK_LARGE_OFFSET_BOX); - final long[] chunkOffsets = stco.getChunks(); - - //samples to chunks - final SampleToChunkBox stsc = ((SampleToChunkBox) stbl.getChild(BoxTypes.SAMPLE_TO_CHUNK_BOX)); - final long[] firstChunks = stsc.getFirstChunks(); - final long[] samplesPerChunk = stsc.getSamplesPerChunk(); - - //sample durations/timestamps - final DecodingTimeToSampleBox stts = (DecodingTimeToSampleBox) stbl.getChild(BoxTypes.DECODING_TIME_TO_SAMPLE_BOX); - final long[] sampleCounts = stts.getSampleCounts(); - final long[] sampleDeltas = stts.getSampleDeltas(); - final long[] timeOffsets = new long[sampleSizes.length]; - long tmp = 0; - int off = 0; - for(int i = 0; i children = ed.getChildren(); - List children2; - - for(Descriptor e : children) { - children2 = e.getChildren(); - for(Descriptor e2 : children2) { - switch(e2.getType()) { - case Descriptor.TYPE_DECODER_SPECIFIC_INFO: - decoderSpecificInfo = (DecoderSpecificInfo) e2; - break; - } - } - } - } - - protected void parseSampleEntry(Box sampleEntry, Class clazz) { - T type; - try { - type = clazz.newInstance(); - if(sampleEntry.getClass().isInstance(type)) { - System.out.println("true"); - } - } - catch(InstantiationException ex) { - ex.printStackTrace(); - } - catch(IllegalAccessException ex) { - ex.printStackTrace(); - } - } - - public abstract Type getType(); - - public abstract Codec getCodec(); - - //tkhd - /** - * Returns true if the track is enabled. A disabled track is treated as if - * it were not present. - * @return true if the track is enabled - */ - public boolean isEnabled() { - return tkhd.isTrackEnabled(); - } - - /** - * Returns true if the track is used in the presentation. - * @return true if the track is used - */ - public boolean isUsed() { - return tkhd.isTrackInMovie(); - } - - /** - * Returns true if the track is used in previews. - * @return true if the track is used in previews - */ - public boolean isUsedForPreview() { - return tkhd.isTrackInPreview(); - } - - /** - * Returns the time this track was created. - * @return the creation time - */ - public Date getCreationTime() { - return Utils.getDate(tkhd.getCreationTime()); - } - - /** - * Returns the last time this track was modified. - * @return the modification time - */ - public Date getModificationTime() { - return Utils.getDate(tkhd.getModificationTime()); - } - - //mdhd - /** - * Returns the language for this media. - * @return the language - */ - public Locale getLanguage() { - return new Locale(mdhd.getLanguage()); - } - - /** - * Returns true if the data for this track is present in this file (stream). - * If not, getLocation() returns the URL where the data can be - * found. - * @return true if the data is in this file (stream), false otherwise - */ - public boolean isInFile() { - return inFile; - } - - /** - * If the data for this track is not present in this file (if - * isInFile returns false), this method returns the data's - * location. Else null is returned. - * @return the data's location or null if the data is in this file - */ - public URL getLocation() { - return location; - } - - //info structures - /** - * Returns the decoder specific info, if present. It contains configuration - * data for the decoder. If the decoder specific info is not present, the - * track contains a DecoderInfo. - * - * @see #getDecoderInfo() - * @return the decoder specific info - */ - public byte[] getDecoderSpecificInfo() { - return decoderSpecificInfo.getData(); - } - - /** - * Returns the DecoderInfo, if present. It contains - * configuration information for the decoder. If the structure is not - * present, the track contains a decoder specific info. - * - * @see #getDecoderSpecificInfo() - * @return the codec specific structure - */ - public DecoderInfo getDecoderInfo() { - return decoderInfo; - } - - /** - * Returns the ProtectionInformation object that contains - * details about the DRM system used. If no protection is present this - * method returns null. - * - * @return a ProtectionInformation object or null if no - * protection is used - */ - public Protection getProtection() { - return protection; - } - - //reading - /** - * Indicates if there are more frames to be read in this track. - * - * @return true if there is at least one more frame to read. - */ - public boolean hasMoreFrames() { - return currentFrame0) in.skipBytes(diff); - else if(diff<0) { - if(in.hasRandomAccess()) in.seek(frame.getOffset()); - else { - Logger.getLogger("MP4 API").log(Level.WARNING, "readNextFrame failed: frame {0} already skipped, offset:{1}, stream:{2}", new Object[]{currentFrame, frame.getOffset(), in.getOffset()}); - throw new IOException("frame already skipped and no random access"); - } - } - - final byte[] b = new byte[(int) frame.getSize()]; - try { - in.readBytes(b); - } - catch(EOFException e) { - Logger.getLogger("MP4 API").log(Level.WARNING, "readNextFrame failed: tried to read {0} bytes at {1}", new Long[]{frame.getSize(), in.getOffset()}); - throw e; - } - frame.setData(b); - currentFrame++; - } - return frame; - } - - /** - * This method tries to seek to the frame that is nearest to the given - * timestamp. It returns the timestamp of the frame it seeked to or -1 if - * none was found. - * - * @param timestamp a timestamp to seek to - * @return the frame's timestamp that the method seeked to - */ - public double seek(double timestamp) { - //find first frame > timestamp - Frame frame = null; - for(int i = 0; itimestamp) { - currentFrame = i; - break; - } - } - return (frame==null) ? -1 : frame.getTime(); - } - - /** - * Returns the timestamp of the next frame to be read. This is needed to - * read frames from a movie that contains multiple tracks. - * - * @return the next frame's timestamp - */ - double getNextTimeStamp() { - return frames.get(currentFrame).getTime(); - } + else { + inFile = true; + location = null; + } + + //sample table + Box stbl = minf.getChild(BoxTypes.SAMPLE_TABLE_BOX); + if (stbl.hasChildren()) { + frames = new ArrayList<>(); + parseSampleTable(stbl); + } else frames = Collections.emptyList(); + currentFrame = 0; + } + + private void parseSampleTable(Box stbl) { + double timeScale = mdhd.getTimeScale(); + Type type = getType(); + + //sample sizes + long[] sampleSizes = ((SampleSizeBox) stbl.getChild(BoxTypes.SAMPLE_SIZE_BOX)).getSampleSizes(); + + //chunk offsets + ChunkOffsetBox stco; + if (stbl.hasChild(BoxTypes.CHUNK_OFFSET_BOX)) stco = (ChunkOffsetBox) stbl.getChild(BoxTypes.CHUNK_OFFSET_BOX); + else stco = (ChunkOffsetBox) stbl.getChild(BoxTypes.CHUNK_LARGE_OFFSET_BOX); + long[] chunkOffsets = stco.getChunks(); + + //samples to chunks + SampleToChunkBox stsc = ((SampleToChunkBox) stbl.getChild(BoxTypes.SAMPLE_TO_CHUNK_BOX)); + long[] firstChunks = stsc.getFirstChunks(); + long[] samplesPerChunk = stsc.getSamplesPerChunk(); + + //sample durations/timestamps + DecodingTimeToSampleBox stts = (DecodingTimeToSampleBox) stbl.getChild(BoxTypes.DECODING_TIME_TO_SAMPLE_BOX); + long[] sampleCounts = stts.getSampleCounts(); + long[] sampleDeltas = stts.getSampleDeltas(); + long[] timeOffsets = new long[sampleSizes.length]; + long tmp = 0; + int off = 0; + for (int i = 0; i < sampleCounts.length; i++) { + for (int j = 0; j < sampleCounts[i]; j++) { + timeOffsets[off + j] = tmp; + tmp += sampleDeltas[i]; + } + off += sampleCounts[i]; + } + + //create samples + int current = 0; + int lastChunk; + double timeStamp; + long offset = 0; + //iterate over all chunk groups + for (int i = 0; i < firstChunks.length; i++) { + if (i < firstChunks.length - 1) lastChunk = (int) firstChunks[i + 1] - 1; + else lastChunk = chunkOffsets.length; + + //iterate over all chunks in current group + for (int j = (int) firstChunks[i] - 1; j < lastChunk; j++) { + offset = chunkOffsets[j]; + + //iterate over all samples in current chunk + for (int k = 0; k < samplesPerChunk[i]; k++) { + //create samples + timeStamp = ((double) timeOffsets[current]) / timeScale; + frames.add(new Frame(type, offset, sampleSizes[current], timeStamp)); + offset += sampleSizes[current]; + current++; + } + } + } + + //frames need not to be time-ordered: sort by timestamp + //TODO: is it possible to add them to the specific position? + Collections.sort(frames); + } + + //TODO: implement other entry descriptors + protected void findDecoderSpecificInfo(ESDBox esds) { + Descriptor ed = esds.getEntryDescriptor(); + List children = ed.getChildren(); + List children2; + + for (Descriptor e : children) { + children2 = e.getChildren(); + for (Descriptor e2 : children2) { + switch (e2.getType()) { + case Descriptor.TYPE_DECODER_SPECIFIC_INFO: + decoderSpecificInfo = (DecoderSpecificInfo) e2; + break; + } + } + } + } + + protected void parseSampleEntry(Box sampleEntry, Class clazz) { + T type; + try { + type = clazz.newInstance(); + if (sampleEntry.getClass().isInstance(type)) { + System.out.println("true"); + } + } catch (InstantiationException | IllegalAccessException ex) { + ex.printStackTrace(); + } + } + + public abstract Type getType(); + + public abstract Codec getCodec(); + + //tkhd + + /** + * Returns true if the track is enabled. A disabled track is treated as if + * it were not present. + * + * @return true if the track is enabled + */ + public boolean isEnabled() { + return tkhd.isTrackEnabled(); + } + + /** + * Returns true if the track is used in the presentation. + * + * @return true if the track is used + */ + public boolean isUsed() { + return tkhd.isTrackInMovie(); + } + + /** + * Returns true if the track is used in previews. + * + * @return true if the track is used in previews + */ + public boolean isUsedForPreview() { + return tkhd.isTrackInPreview(); + } + + /** + * Returns the time this track was created. + * + * @return the creation time + */ + public Date getCreationTime() { + return Utils.getDate(tkhd.getCreationTime()); + } + + /** + * Returns the last time this track was modified. + * + * @return the modification time + */ + public Date getModificationTime() { + return Utils.getDate(tkhd.getModificationTime()); + } + + //mdhd + + /** + * Returns the language for this media. + * + * @return the language + */ + public Locale getLanguage() { + return new Locale(mdhd.getLanguage()); + } + + /** + * Returns true if the data for this track is present in this file (stream). + * If not, getLocation() returns the URL where the data can be + * found. + * + * @return true if the data is in this file (stream), false otherwise + */ + public boolean isInFile() { + return inFile; + } + + /** + * If the data for this track is not present in this file (if + * isInFile returns false), this method returns the data's + * location. Else null is returned. + * + * @return the data's location or null if the data is in this file + */ + public URL getLocation() { + return location; + } + + //info structures + + /** + * Returns the decoder specific info, if present. It contains configuration + * data for the decoder. If the decoder specific info is not present, the + * track contains a DecoderInfo. + * + * @return the decoder specific info + * @see #getDecoderInfo() + */ + public DecoderSpecificInfo getDecoderSpecificInfo() { + return decoderSpecificInfo; + } + + /** + * Returns the DecoderInfo, if present. It contains + * configuration information for the decoder. If the structure is not + * present, the track contains a decoder specific info. + * + * @return the codec specific structure + * @see #getDecoderSpecificInfo() + */ + public DecoderInfo getDecoderInfo() { + return decoderInfo; + } + + /** + * Returns the ProtectionInformation object that contains + * details about the DRM system used. If no protection is present this + * method returns null. + * + * @return a ProtectionInformation object or null if no + * protection is used + */ + public Protection getProtection() { + return protection; + } + + //reading + + /** + * Indicates if there are more frames to be read in this track. + * + * @return true if there is at least one more frame to read. + */ + public boolean hasMoreFrames() { + return currentFrame < frames.size(); + } + + /** + * Reads the next frame from this track. If it contains no more frames to + * read, null is returned. + * + * @return the next frame or null if there are no more frames to read + * @throws IOException if reading fails + */ + public Frame readNextFrame() throws IOException { + Frame frame = null; + if (hasMoreFrames()) { + frame = frames.get(currentFrame); + + long diff = frame.getOffset() - in.getOffset(); + if (diff > 0) in.skipBytes(diff); + else if (diff < 0) { + if (in.hasRandomAccess()) in.seek(frame.getOffset()); + else { + Logger.getLogger("MP4 API").log(Level.WARNING, "readNextFrame failed: frame {0} already skipped, offset:{1}, stream:{2}", new Object[] {currentFrame, frame.getOffset(), in.getOffset()}); + throw new IOException("frame already skipped and no random access"); + } + } + + byte[] b = new byte[(int) frame.getSize()]; + try { + in.readBytes(b); + } catch (EOFException e) { + Logger.getLogger("MP4 API").log(Level.WARNING, "readNextFrame failed: tried to read {0} bytes at {1}", new Long[] {frame.getSize(), in.getOffset()}); + throw e; + } + frame.setData(b); + currentFrame++; + } + return frame; + } + + /** + * This method tries to seek to the frame that is nearest to the given + * timestamp. It returns the timestamp of the frame it seeked to or -1 if + * none was found. + * + * @param timestamp a timestamp to seek to + * @return the frame's timestamp that the method seeked to + */ + public double seek(double timestamp) { + //find first frame > timestamp + Frame frame = null; + for (int i = 0; i < frames.size(); i++) { + frame = frames.get(i++); + if (frame.getTime() > timestamp) { + currentFrame = i; + break; + } + } + return (frame == null) ? -1 : frame.getTime(); + } + + /** + * Returns the timestamp of the next frame to be read. This is needed to + * read frames from a movie that contains multiple tracks. + * + * @return the next frame's timestamp + */ + double getNextTimeStamp() { + return frames.get(currentFrame).getTime(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/Type.java b/src/main/java/net/sourceforge/jaad/mp4/api/Type.java index 72286b05..febb5b6a 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/Type.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/Type.java @@ -2,11 +2,11 @@ /** * Represents the data type of a Frame or Track. - * + * * @author in-somnia */ public enum Type { - VIDEO, - AUDIO; + VIDEO, + AUDIO } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/Utils.java b/src/main/java/net/sourceforge/jaad/mp4/api/Utils.java index 0d0fb393..2c541627 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/Utils.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/Utils.java @@ -2,11 +2,12 @@ import java.util.Date; + class Utils { - private static final long DATE_OFFSET = 2082850791998l; + private static final long DATE_OFFSET = 2082850791998L; - static Date getDate(long time) { - return new Date(time*1000-DATE_OFFSET); - } + static Date getDate(long time) { + return new Date(time * 1000 - DATE_OFFSET); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/VideoTrack.java b/src/main/java/net/sourceforge/jaad/mp4/api/VideoTrack.java index 8acf31c2..2745ad5d 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/VideoTrack.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/VideoTrack.java @@ -1,104 +1,111 @@ package net.sourceforge.jaad.mp4.api; -import java.util.List; -import net.sourceforge.jaad.mp4.MP4InputStream; +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.Box; import net.sourceforge.jaad.mp4.boxes.BoxTypes; +import net.sourceforge.jaad.mp4.boxes.impl.ESDBox; import net.sourceforge.jaad.mp4.boxes.impl.SampleDescriptionBox; import net.sourceforge.jaad.mp4.boxes.impl.VideoMediaHeaderBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.VideoSampleEntry; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; -import net.sourceforge.jaad.mp4.boxes.impl.ESDBox; + public class VideoTrack extends Track { - public enum VideoCodec implements Codec { - - AVC, - H263, - MP4_ASP, - UNKNOWN_VIDEO_CODEC; - - static Codec forType(long type) { - final Codec ac; - if(type==BoxTypes.AVC_SAMPLE_ENTRY) ac = AVC; - else if(type==BoxTypes.H263_SAMPLE_ENTRY) ac = H263; - else if(type==BoxTypes.MP4V_SAMPLE_ENTRY) ac = MP4_ASP; - else ac = UNKNOWN_VIDEO_CODEC; - return ac; - } - } - private final VideoMediaHeaderBox vmhd; - private final VideoSampleEntry sampleEntry; - private final Codec codec; - - public VideoTrack(Box trak, MP4InputStream in) { - super(trak, in); - - final Box minf = trak.getChild(BoxTypes.MEDIA_BOX).getChild(BoxTypes.MEDIA_INFORMATION_BOX); - vmhd = (VideoMediaHeaderBox) minf.getChild(BoxTypes.VIDEO_MEDIA_HEADER_BOX); - - final Box stbl = minf.getChild(BoxTypes.SAMPLE_TABLE_BOX); - - //sample descriptions: 'mp4v' has an ESDBox, all others have a CodecSpecificBox - final SampleDescriptionBox stsd = (SampleDescriptionBox) stbl.getChild(BoxTypes.SAMPLE_DESCRIPTION_BOX); - if(stsd.getChildren().get(0) instanceof VideoSampleEntry) { - sampleEntry = (VideoSampleEntry) stsd.getChildren().get(0); - final long type = sampleEntry.getType(); - if(type==BoxTypes.MP4V_SAMPLE_ENTRY) findDecoderSpecificInfo((ESDBox) sampleEntry.getChild(BoxTypes.ESD_BOX)); - else if(type==BoxTypes.ENCRYPTED_VIDEO_SAMPLE_ENTRY||type==BoxTypes.DRMS_SAMPLE_ENTRY) { - findDecoderSpecificInfo((ESDBox) sampleEntry.getChild(BoxTypes.ESD_BOX)); - protection = Protection.parse(sampleEntry.getChild(BoxTypes.PROTECTION_SCHEME_INFORMATION_BOX)); - } - else decoderInfo = DecoderInfo.parse((CodecSpecificBox) sampleEntry.getChildren().get(0)); - - codec = VideoCodec.forType(sampleEntry.getType()); - } - else { - sampleEntry = null; - codec = VideoCodec.UNKNOWN_VIDEO_CODEC; - } - } - - @Override - public Type getType() { - return Type.VIDEO; - } - - @Override - public Codec getCodec() { - return codec; - } - - public int getWidth() { - return (sampleEntry!=null) ? sampleEntry.getWidth() : 0; - } - - public int getHeight() { - return (sampleEntry!=null) ? sampleEntry.getHeight() : 0; - } - - public double getHorizontalResolution() { - return (sampleEntry!=null) ? sampleEntry.getHorizontalResolution() : 0; - } - - public double getVerticalResolution() { - return (sampleEntry!=null) ? sampleEntry.getVerticalResolution() : 0; - } - - public int getFrameCount() { - return (sampleEntry!=null) ? sampleEntry.getFrameCount() : 0; - } - - public String getCompressorName() { - return (sampleEntry!=null) ? sampleEntry.getCompressorName() : ""; - } - - public int getDepth() { - return (sampleEntry!=null) ? sampleEntry.getDepth() : 0; - } - - public int getLayer() { - return tkhd.getLayer(); - } + public enum VideoCodec implements Codec { + + AVC, + H263, + MP4_ASP, + UNKNOWN_VIDEO_CODEC; + + static Codec forType(long type) { + Codec ac; + if (type == BoxTypes.AVC_SAMPLE_ENTRY) ac = AVC; + else if (type == BoxTypes.H263_SAMPLE_ENTRY) ac = H263; + else if (type == BoxTypes.MP4V_SAMPLE_ENTRY) ac = MP4_ASP; + else ac = UNKNOWN_VIDEO_CODEC; + return ac; + } + } + + private final VideoMediaHeaderBox vmhd; + private final VideoSampleEntry sampleEntry; + private final Codec codec; + + public VideoTrack(Box trak, MP4Input in) { + super(trak, in); + + Box minf = trak.getChild(BoxTypes.MEDIA_BOX).getChild(BoxTypes.MEDIA_INFORMATION_BOX); + vmhd = (VideoMediaHeaderBox) minf.getChild(BoxTypes.VIDEO_MEDIA_HEADER_BOX); + + Box stbl = minf.getChild(BoxTypes.SAMPLE_TABLE_BOX); + + // sample descriptions: 'mp4v' has an ESDBox, all others have a CodecSpecificBox + SampleDescriptionBox stsd = (SampleDescriptionBox) stbl.getChild(BoxTypes.SAMPLE_DESCRIPTION_BOX); + if (stsd.getChildren().get(0) instanceof VideoSampleEntry) { + sampleEntry = (VideoSampleEntry) stsd.getChildren().get(0); + long type = sampleEntry.getType(); + if (type == BoxTypes.MP4V_SAMPLE_ENTRY) + findDecoderSpecificInfo((ESDBox) sampleEntry.getChild(BoxTypes.ESD_BOX)); + else if (type == BoxTypes.ENCRYPTED_VIDEO_SAMPLE_ENTRY || type == BoxTypes.DRMS_SAMPLE_ENTRY) { + findDecoderSpecificInfo((ESDBox) sampleEntry.getChild(BoxTypes.ESD_BOX)); + protection = Protection.parse(sampleEntry.getChild(BoxTypes.PROTECTION_SCHEME_INFORMATION_BOX)); + } else { + for (int i = 0; i < sampleEntry.getChildren().size(); i++) { + if (sampleEntry.getChildren().get(i) instanceof CodecSpecificBox) { + decoderInfo = DecoderInfo.parse((CodecSpecificBox) sampleEntry.getChildren().get(i)); + break; + } + } + } + + codec = VideoCodec.forType(sampleEntry.getType()); + } else { + sampleEntry = null; + codec = VideoCodec.UNKNOWN_VIDEO_CODEC; + } + } + + @Override + public Type getType() { + return Type.VIDEO; + } + + @Override + public Codec getCodec() { + return codec; + } + + public int getWidth() { + return (sampleEntry != null) ? sampleEntry.getWidth() : 0; + } + + public int getHeight() { + return (sampleEntry != null) ? sampleEntry.getHeight() : 0; + } + + public double getHorizontalResolution() { + return (sampleEntry != null) ? sampleEntry.getHorizontalResolution() : 0; + } + + public double getVerticalResolution() { + return (sampleEntry != null) ? sampleEntry.getVerticalResolution() : 0; + } + + public int getFrameCount() { + return (sampleEntry != null) ? sampleEntry.getFrameCount() : 0; + } + + public String getCompressorName() { + return (sampleEntry != null) ? sampleEntry.getCompressorName() : ""; + } + + public int getDepth() { + return (sampleEntry != null) ? sampleEntry.getDepth() : 0; + } + + public int getLayer() { + return tkhd.getLayer(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/codec/AC3DecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/codec/AC3DecoderInfo.java index 8a736178..c715dbf2 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/codec/AC3DecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/codec/AC3DecoderInfo.java @@ -4,35 +4,36 @@ import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.AC3SpecificBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; + public class AC3DecoderInfo extends DecoderInfo { - private AC3SpecificBox box; + private AC3SpecificBox box; - public AC3DecoderInfo(CodecSpecificBox box) { - this.box = (AC3SpecificBox) box; - } + public AC3DecoderInfo(CodecSpecificBox box) { + this.box = (AC3SpecificBox) box; + } - public boolean isLfeon() { - return box.isLfeon(); - } + public boolean isLfeon() { + return box.isLfeon(); + } - public int getFscod() { - return box.getFscod(); - } + public int getFscod() { + return box.getFscod(); + } - public int getBsmod() { - return box.getBsmod(); - } + public int getBsmod() { + return box.getBsmod(); + } - public int getBsid() { - return box.getBsid(); - } + public int getBsid() { + return box.getBsid(); + } - public int getBitRateCode() { - return box.getBitRateCode(); - } + public int getBitRateCode() { + return box.getBitRateCode(); + } - public int getAcmod() { - return box.getAcmod(); - } + public int getAcmod() { + return box.getAcmod(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/codec/AMRDecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/codec/AMRDecoderInfo.java index cfdacf91..f472a805 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/codec/AMRDecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/codec/AMRDecoderInfo.java @@ -4,31 +4,32 @@ import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.AMRSpecificBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; + public class AMRDecoderInfo extends DecoderInfo { - private AMRSpecificBox box; + private AMRSpecificBox box; - public AMRDecoderInfo(CodecSpecificBox box) { - this.box = (AMRSpecificBox) box; - } + public AMRDecoderInfo(CodecSpecificBox box) { + this.box = (AMRSpecificBox) box; + } - public int getDecoderVersion() { - return box.getDecoderVersion(); - } + public int getDecoderVersion() { + return box.getDecoderVersion(); + } - public long getVendor() { - return box.getVendor(); - } + public long getVendor() { + return box.getVendor(); + } - public int getModeSet() { - return box.getModeSet(); - } + public int getModeSet() { + return box.getModeSet(); + } - public int getModeChangePeriod() { - return box.getModeChangePeriod(); - } + public int getModeChangePeriod() { + return box.getModeChangePeriod(); + } - public int getFramesPerSample() { - return box.getFramesPerSample(); - } + public int getFramesPerSample() { + return box.getFramesPerSample(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/codec/AVCDecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/codec/AVCDecoderInfo.java index e9b41b5b..5151a4a9 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/codec/AVCDecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/codec/AVCDecoderInfo.java @@ -4,39 +4,40 @@ import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.AVCSpecificBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; + public class AVCDecoderInfo extends DecoderInfo { - private AVCSpecificBox box; + private AVCSpecificBox box; - public AVCDecoderInfo(CodecSpecificBox box) { - this.box = (AVCSpecificBox) box; - } + public AVCDecoderInfo(CodecSpecificBox box) { + this.box = (AVCSpecificBox) box; + } - public int getConfigurationVersion() { - return box.getConfigurationVersion(); - } + public int getConfigurationVersion() { + return box.getConfigurationVersion(); + } - public int getProfile() { - return box.getProfile(); - } + public int getProfile() { + return box.getProfile(); + } - public byte getProfileCompatibility() { - return box.getProfileCompatibility(); - } + public byte getProfileCompatibility() { + return box.getProfileCompatibility(); + } - public int getLevel() { - return box.getLevel(); - } + public int getLevel() { + return box.getLevel(); + } - public int getLengthSize() { - return box.getLengthSize(); - } + public int getLengthSize() { + return box.getLengthSize(); + } - public byte[][] getSequenceParameterSetNALUnits() { - return box.getSequenceParameterSetNALUnits(); - } + public byte[][] getSequenceParameterSetNALUnits() { + return box.getSequenceParameterSetNALUnits(); + } - public byte[][] getPictureParameterSetNALUnits() { - return box.getPictureParameterSetNALUnits(); - } + public byte[][] getPictureParameterSetNALUnits() { + return box.getPictureParameterSetNALUnits(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/codec/EAC3DecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/codec/EAC3DecoderInfo.java index 87abc8a6..1afc6117 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/codec/EAC3DecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/codec/EAC3DecoderInfo.java @@ -2,82 +2,84 @@ import java.util.ArrayList; import java.util.List; + import net.sourceforge.jaad.mp4.api.DecoderInfo; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.EAC3SpecificBox; + public class EAC3DecoderInfo extends DecoderInfo { - private EAC3SpecificBox box; - private IndependentSubstream[] is; - - public EAC3DecoderInfo(CodecSpecificBox box) { - this.box = (EAC3SpecificBox) box; - is = new IndependentSubstream[this.box.getIndependentSubstreamCount()]; - for(int i = 0; i list = new ArrayList(); - for(int i = 0; i<9; i++) { - if(((loc>>(8-i))&1)==1) list.add(DependentSubstream.values()[i]); - } - dependentSubstreams = list.toArray(new DependentSubstream[list.size()]); - } - - public int getFscod() { - return box.getFscods()[index]; - } - - public int getBsid() { - return box.getBsids()[index]; - } - - public int getBsmod() { - return box.getBsmods()[index]; - } - - public int getAcmod() { - return box.getAcmods()[index]; - } - - public boolean isLfeon() { - return box.getLfeons()[index]; - } - - public DependentSubstream[] getDependentSubstreams() { - return dependentSubstreams; - } - } - - public enum DependentSubstream { - - LC_RC_PAIR, - LRS_RRS_PAIR, - CS, - TS, - LSD_RSD_PAIR, - LW_RW_PAIR, - LVH_RVH_PAIR, - CVH, - LFE2 - } + private EAC3SpecificBox box; + private IndependentSubstream[] is; + + public EAC3DecoderInfo(CodecSpecificBox box) { + this.box = (EAC3SpecificBox) box; + is = new IndependentSubstream[this.box.getIndependentSubstreamCount()]; + for (int i = 0; i < is.length; i++) { + is[i] = new IndependentSubstream(i); + } + } + + public int getDataRate() { + return box.getDataRate(); + } + + public IndependentSubstream[] getIndependentSubstreams() { + return is; + } + + public class IndependentSubstream { + + private final int index; + private final DependentSubstream[] dependentSubstreams; + + private IndependentSubstream(int index) { + this.index = index; + + int loc = box.getDependentSubstreamLocation()[index]; + List list = new ArrayList<>(); + for (int i = 0; i < 9; i++) { + if (((loc >> (8 - i)) & 1) == 1) list.add(DependentSubstream.values()[i]); + } + dependentSubstreams = list.toArray(new DependentSubstream[0]); + } + + public int getFscod() { + return box.getFscods()[index]; + } + + public int getBsid() { + return box.getBsids()[index]; + } + + public int getBsmod() { + return box.getBsmods()[index]; + } + + public int getAcmod() { + return box.getAcmods()[index]; + } + + public boolean isLfeon() { + return box.getLfeons()[index]; + } + + public DependentSubstream[] getDependentSubstreams() { + return dependentSubstreams; + } + } + + public enum DependentSubstream { + + LC_RC_PAIR, + LRS_RRS_PAIR, + CS, + TS, + LSD_RSD_PAIR, + LW_RW_PAIR, + LVH_RVH_PAIR, + CVH, + LFE2 + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/codec/EVRCDecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/codec/EVRCDecoderInfo.java index 496b8ffa..b387da85 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/codec/EVRCDecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/codec/EVRCDecoderInfo.java @@ -4,23 +4,24 @@ import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.EVRCSpecificBox; + public class EVRCDecoderInfo extends DecoderInfo { - private EVRCSpecificBox box; + private EVRCSpecificBox box; - public EVRCDecoderInfo(CodecSpecificBox box) { - this.box = (EVRCSpecificBox) box; - } + public EVRCDecoderInfo(CodecSpecificBox box) { + this.box = (EVRCSpecificBox) box; + } - public int getDecoderVersion() { - return box.getDecoderVersion(); - } + public int getDecoderVersion() { + return box.getDecoderVersion(); + } - public long getVendor() { - return box.getVendor(); - } + public long getVendor() { + return box.getVendor(); + } - public int getFramesPerSample() { - return box.getFramesPerSample(); - } + public int getFramesPerSample() { + return box.getFramesPerSample(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/codec/H263DecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/codec/H263DecoderInfo.java index 7f6c62db..470cc803 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/codec/H263DecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/codec/H263DecoderInfo.java @@ -4,27 +4,28 @@ import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.H263SpecificBox; + public class H263DecoderInfo extends DecoderInfo { - private H263SpecificBox box; + private H263SpecificBox box; - public H263DecoderInfo(CodecSpecificBox box) { - this.box = (H263SpecificBox) box; - } + public H263DecoderInfo(CodecSpecificBox box) { + this.box = (H263SpecificBox) box; + } - public int getDecoderVersion() { - return box.getDecoderVersion(); - } + public int getDecoderVersion() { + return box.getDecoderVersion(); + } - public long getVendor() { - return box.getVendor(); - } + public long getVendor() { + return box.getVendor(); + } - public int getLevel() { - return box.getLevel(); - } + public int getLevel() { + return box.getLevel(); + } - public int getProfile() { - return box.getProfile(); - } + public int getProfile() { + return box.getProfile(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/codec/QCELPDecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/codec/QCELPDecoderInfo.java index 943aaa40..f12766db 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/codec/QCELPDecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/codec/QCELPDecoderInfo.java @@ -4,23 +4,24 @@ import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.QCELPSpecificBox; + public class QCELPDecoderInfo extends DecoderInfo { - private QCELPSpecificBox box; + private QCELPSpecificBox box; - public QCELPDecoderInfo(CodecSpecificBox box) { - this.box = (QCELPSpecificBox) box; - } + public QCELPDecoderInfo(CodecSpecificBox box) { + this.box = (QCELPSpecificBox) box; + } - public int getDecoderVersion() { - return box.getDecoderVersion(); - } + public int getDecoderVersion() { + return box.getDecoderVersion(); + } - public long getVendor() { - return box.getVendor(); - } + public long getVendor() { + return box.getVendor(); + } - public int getFramesPerSample() { - return box.getFramesPerSample(); - } + public int getFramesPerSample() { + return box.getFramesPerSample(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/codec/SMVDecoderInfo.java b/src/main/java/net/sourceforge/jaad/mp4/api/codec/SMVDecoderInfo.java index 9d4cc265..934214b6 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/codec/SMVDecoderInfo.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/codec/SMVDecoderInfo.java @@ -4,23 +4,24 @@ import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.CodecSpecificBox; import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.SMVSpecificBox; + public class SMVDecoderInfo extends DecoderInfo { - private SMVSpecificBox box; + private SMVSpecificBox box; - public SMVDecoderInfo(CodecSpecificBox box) { - this.box = (SMVSpecificBox) box; - } + public SMVDecoderInfo(CodecSpecificBox box) { + this.box = (SMVSpecificBox) box; + } - public int getDecoderVersion() { - return box.getDecoderVersion(); - } + public int getDecoderVersion() { + return box.getDecoderVersion(); + } - public long getVendor() { - return box.getVendor(); - } + public long getVendor() { + return box.getVendor(); + } - public int getFramesPerSample() { - return box.getFramesPerSample(); - } + public int getFramesPerSample() { + return box.getFramesPerSample(); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/api/drm/ITunesProtection.java b/src/main/java/net/sourceforge/jaad/mp4/api/drm/ITunesProtection.java index 8ad2094d..1de071f1 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/api/drm/ITunesProtection.java +++ b/src/main/java/net/sourceforge/jaad/mp4/api/drm/ITunesProtection.java @@ -5,52 +5,53 @@ import net.sourceforge.jaad.mp4.boxes.BoxTypes; import net.sourceforge.jaad.mp4.boxes.impl.drm.FairPlayDataBox; + public class ITunesProtection extends Protection { - private final String userID, userName, userKey; - private final byte[] privateKey, initializationVector; - - public ITunesProtection(Box sinf) { - super(sinf); - - final Box schi = sinf.getChild(BoxTypes.SCHEME_INFORMATION_BOX); - userID = new String(((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_USER_ID_BOX)).getData()); - - //user name box is filled with 0 - final byte[] b = ((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_USER_NAME_BOX)).getData(); - int i = 0; - while(b[i]!=0) { - i++; - } - userName = new String(b, 0, i-1); - - userKey = new String(((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_USER_KEY_BOX)).getData()); - privateKey = ((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_PRIVATE_KEY_BOX)).getData(); - initializationVector = ((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_IV_BOX)).getData(); - } - - @Override - public Scheme getScheme() { - return Scheme.ITUNES_FAIR_PLAY; - } - - public String getUserID() { - return userID; - } - - public String getUserName() { - return userName; - } - - public String getUserKey() { - return userKey; - } - - public byte[] getPrivateKey() { - return privateKey; - } - - public byte[] getInitializationVector() { - return initializationVector; - } + private final String userID, userName, userKey; + private final byte[] privateKey, initializationVector; + + public ITunesProtection(Box sinf) { + super(sinf); + + Box schi = sinf.getChild(BoxTypes.SCHEME_INFORMATION_BOX); + userID = new String(((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_USER_ID_BOX)).getData()); + + // user name box is filled with 0 + byte[] b = ((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_USER_NAME_BOX)).getData(); + int i = 0; + while (b[i] != 0) { + i++; + } + userName = new String(b, 0, i - 1); + + userKey = new String(((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_USER_KEY_BOX)).getData()); + privateKey = ((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_PRIVATE_KEY_BOX)).getData(); + initializationVector = ((FairPlayDataBox) schi.getChild(BoxTypes.FAIRPLAY_IV_BOX)).getData(); + } + + @Override + public Scheme getScheme() { + return Scheme.ITUNES_FAIR_PLAY; + } + + public String getUserID() { + return userID; + } + + public String getUserName() { + return userName; + } + + public String getUserKey() { + return userKey; + } + + public byte[] getPrivateKey() { + return privateKey; + } + + public byte[] getInitializationVector() { + return initializationVector; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/Box.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/Box.java index 80ea61b2..eebe9538 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/Box.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/Box.java @@ -2,84 +2,85 @@ import java.util.List; + public interface Box { - Box getParent(); + Box getParent(); - /** - * Returns the size of this box including its header. - * - * @return this box's size - */ - long getSize(); + /** + * Returns the size of this box including its header. + * + * @return this box's size + */ + long getSize(); - /** - * Returns the type of this box as a 4CC converted to a long. - * - * @return this box's type - */ - long getType(); + /** + * Returns the type of this box as a 4CC converted to a long. + * + * @return this box's type + */ + long getType(); - /** - * Returns the offset of this box in the stream/file. This is needed as a - * seek point for random access. - * - * @return this box's offset - */ - long getOffset(); + /** + * Returns the offset of this box in the stream/file. This is needed as a + * seek point for random access. + * + * @return this box's offset + */ + long getOffset(); - /** - * Returns the name of this box as a human-readable string - * (e.g. "Track Header Box"). - * - * @return this box's name - */ - String getName(); + /** + * Returns the name of this box as a human-readable string + * (e.g. "Track Header Box"). + * + * @return this box's name + */ + String getName(); - /** - * Indicates if this box has children. - * - * @return true if this box contains at least one child - */ - boolean hasChildren(); + /** + * Indicates if this box has children. + * + * @return true if this box contains at least one child + */ + boolean hasChildren(); - /** - * Indicated if the box has a child with the given type. - * - * @param type the type of child box to look for - * @return true if this box contains at least one child with the given type - */ - boolean hasChild(long type); + /** + * Indicated if the box has a child with the given type. + * + * @param type the type of child box to look for + * @return true if this box contains at least one child with the given type + */ + boolean hasChild(long type); - /** - * Returns an ordered and unmodifiable list of all direct children of this - * box. The list does not contain the children's children. - * - * @return this box's children - */ - List getChildren(); + /** + * Returns an ordered and unmodifiable list of all direct children of this + * box. The list does not contain the children's children. + * + * @return this box's children + */ + List getChildren(); - /** - * Returns an ordered and unmodifiable list of all direct children of this - * box with the specified type. The list does not contain the children's - * children. If there is no child with the given type, the list will be - * empty. - * - * @param type the type of child boxes to look for - * @return this box's children with the given type - */ - List getChildren(long type); + /** + * Returns an ordered and unmodifiable list of all direct children of this + * box with the specified type. The list does not contain the children's + * children. If there is no child with the given type, the list will be + * empty. + * + * @param type the type of child boxes to look for + * @return this box's children with the given type + */ + List getChildren(long type); - /** - * Returns the child box with the specified type. If this box has no child - * with the given type, null is returned. To check if there is such a child - * hasChild(type) can be used. - * If more than one child exists with the same type, the first one will - * always be returned. A list of all children with that type can be received - * via getChildren(type). - * - * @param type the type of child box to look for - * @return the first child box with the given type, or null if none is found - */ - Box getChild(long type); + /** + * Returns the child box with the specified type. If this box has no child + * with the given type, null is returned. To check if there is such a child + * hasChild(type) can be used. + * If more than one child exists with the same type, the first one will + * always be returned. A list of all children with that type can be received + * via getChildren(type). + * + * @param type the type of child box to look for + * @return the first child box with the given type, or null if none is found + */ + Box getChild(long type); } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxFactory.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxFactory.java index 9d96e6c3..c74ffe31 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxFactory.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxFactory.java @@ -4,441 +4,475 @@ import java.lang.reflect.Constructor; import java.util.HashMap; import java.util.Map; -import java.util.logging.ConsoleHandler; -import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.Logger; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.MP4InputStream; import net.sourceforge.jaad.mp4.boxes.impl.*; -import net.sourceforge.jaad.mp4.boxes.impl.fd.*; -import net.sourceforge.jaad.mp4.boxes.impl.meta.*; -import net.sourceforge.jaad.mp4.boxes.impl.oma.*; -import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.*; -import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.*; -import net.sourceforge.jaad.mp4.boxes.impl.ESDBox; import net.sourceforge.jaad.mp4.boxes.impl.drm.FairPlayDataBox; +import net.sourceforge.jaad.mp4.boxes.impl.fd.FDItemInformationBox; +import net.sourceforge.jaad.mp4.boxes.impl.fd.FDSessionGroupBox; +import net.sourceforge.jaad.mp4.boxes.impl.fd.FECReservoirBox; +import net.sourceforge.jaad.mp4.boxes.impl.fd.FilePartitionBox; +import net.sourceforge.jaad.mp4.boxes.impl.fd.GroupIDToNameBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.EncoderBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.GenreBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ID3TagBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ITunesMetadataBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ITunesMetadataMeanBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ITunesMetadataNameBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.NeroMetadataTagsBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.RatingBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.RequirementBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ThreeGPPAlbumBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ThreeGPPKeywordsBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ThreeGPPLocationBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ThreeGPPMetadataBox; +import net.sourceforge.jaad.mp4.boxes.impl.meta.ThreeGPPRecordingYearBox; +import net.sourceforge.jaad.mp4.boxes.impl.oma.OMAAccessUnitFormatBox; +import net.sourceforge.jaad.mp4.boxes.impl.oma.OMACommonHeadersBox; +import net.sourceforge.jaad.mp4.boxes.impl.oma.OMAContentIDBox; +import net.sourceforge.jaad.mp4.boxes.impl.oma.OMAContentObjectBox; +import net.sourceforge.jaad.mp4.boxes.impl.oma.OMADiscreteMediaHeadersBox; +import net.sourceforge.jaad.mp4.boxes.impl.oma.OMARightsObjectBox; +import net.sourceforge.jaad.mp4.boxes.impl.oma.OMATransactionTrackingBox; +import net.sourceforge.jaad.mp4.boxes.impl.oma.OMAURLBox; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.AudioSampleEntry; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.FDHintSampleEntry; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.MPEGSampleEntry; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.RTPHintSampleEntry; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.TextMetadataSampleEntry; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.VideoSampleEntry; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.XMLMetadataSampleEntry; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.AC3SpecificBox; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.AMRSpecificBox; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.AVCSpecificBox; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.EAC3SpecificBox; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.EVRCSpecificBox; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.H263SpecificBox; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.QCELPSpecificBox; +import net.sourceforge.jaad.mp4.boxes.impl.sampleentries.codec.SMVSpecificBox; + public class BoxFactory implements BoxTypes { - private static final Logger LOGGER = Logger.getLogger("MP4 Boxes"); + private static final Logger LOGGER = Logger.getLogger("MP4 Boxes"); - static { - if (System.getProperty("java.util.logging.config.file", "").isEmpty()) { - for (Handler h : LOGGER.getHandlers()) { - LOGGER.removeHandler(h); - } - LOGGER.setLevel(Level.WARNING); + private static final Map> BOX_CLASSES = new HashMap<>(); + private static final Map[]> BOX_MULTIPLE_CLASSES = new HashMap<>(); + private static final Map PARAMETER = new HashMap<>(); - final ConsoleHandler h = new ConsoleHandler(); - h.setLevel(Level.ALL); - LOGGER.addHandler(h); - } - } - private static final Map> BOX_CLASSES = new HashMap>(); - private static final Map[]> BOX_MULTIPLE_CLASSES = new HashMap[]>(); - private static final Map PARAMETER = new HashMap(); + static { + //classes + BOX_CLASSES.put(ADDITIONAL_METADATA_CONTAINER_BOX, BoxImpl.class); + BOX_CLASSES.put(APPLE_LOSSLESS_BOX, AppleLosslessBox.class); + BOX_CLASSES.put(BINARY_XML_BOX, BinaryXMLBox.class); + BOX_CLASSES.put(BIT_RATE_BOX, BitRateBox.class); + BOX_CLASSES.put(CHAPTER_BOX, ChapterBox.class); + BOX_CLASSES.put(CHUNK_OFFSET_BOX, ChunkOffsetBox.class); + BOX_CLASSES.put(CHUNK_LARGE_OFFSET_BOX, ChunkOffsetBox.class); + BOX_CLASSES.put(CLEAN_APERTURE_BOX, CleanApertureBox.class); + BOX_CLASSES.put(COMPACT_SAMPLE_SIZE_BOX, SampleSizeBox.class); + BOX_CLASSES.put(COMPOSITION_TIME_TO_SAMPLE_BOX, CompositionTimeToSampleBox.class); + BOX_CLASSES.put(COPYRIGHT_BOX, CopyrightBox.class); + BOX_CLASSES.put(DATA_ENTRY_URN_BOX, DataEntryUrnBox.class); + BOX_CLASSES.put(DATA_ENTRY_URL_BOX, DataEntryUrlBox.class); + BOX_CLASSES.put(DATA_INFORMATION_BOX, BoxImpl.class); + BOX_CLASSES.put(DATA_REFERENCE_BOX, DataReferenceBox.class); + BOX_CLASSES.put(DECODING_TIME_TO_SAMPLE_BOX, DecodingTimeToSampleBox.class); + BOX_CLASSES.put(DEGRADATION_PRIORITY_BOX, DegradationPriorityBox.class); + BOX_CLASSES.put(EDIT_BOX, BoxImpl.class); + BOX_CLASSES.put(EDIT_LIST_BOX, EditListBox.class); + BOX_CLASSES.put(FD_ITEM_INFORMATION_BOX, FDItemInformationBox.class); + BOX_CLASSES.put(FD_SESSION_GROUP_BOX, FDSessionGroupBox.class); + BOX_CLASSES.put(FEC_RESERVOIR_BOX, FECReservoirBox.class); + BOX_CLASSES.put(FILE_PARTITION_BOX, FilePartitionBox.class); + BOX_CLASSES.put(FILE_TYPE_BOX, FileTypeBox.class); + BOX_CLASSES.put(FREE_SPACE_BOX, FreeSpaceBox.class); + BOX_CLASSES.put(GROUP_ID_TO_NAME_BOX, GroupIDToNameBox.class); + BOX_CLASSES.put(HANDLER_BOX, HandlerBox.class); + BOX_CLASSES.put(HINT_MEDIA_HEADER_BOX, HintMediaHeaderBox.class); + BOX_CLASSES.put(IPMP_CONTROL_BOX, IPMPControlBox.class); + BOX_CLASSES.put(IPMP_INFO_BOX, IPMPInfoBox.class); + BOX_CLASSES.put(ITEM_INFORMATION_BOX, ItemInformationBox.class); + BOX_CLASSES.put(ITEM_INFORMATION_ENTRY, ItemInformationEntry.class); + BOX_CLASSES.put(ITEM_LOCATION_BOX, ItemLocationBox.class); + BOX_CLASSES.put(ITEM_PROTECTION_BOX, ItemProtectionBox.class); + BOX_CLASSES.put(MEDIA_BOX, BoxImpl.class); + BOX_CLASSES.put(MEDIA_DATA_BOX, MediaDataBox.class); + BOX_CLASSES.put(MEDIA_HEADER_BOX, MediaHeaderBox.class); + BOX_CLASSES.put(MEDIA_INFORMATION_BOX, BoxImpl.class); + BOX_CLASSES.put(META_BOX, MetaBox.class); + BOX_CLASSES.put(META_BOX_RELATION_BOX, MetaBoxRelationBox.class); + BOX_CLASSES.put(MOVIE_BOX, BoxImpl.class); + BOX_CLASSES.put(MOVIE_EXTENDS_BOX, BoxImpl.class); + BOX_CLASSES.put(MOVIE_EXTENDS_HEADER_BOX, MovieExtendsHeaderBox.class); + BOX_CLASSES.put(MOVIE_FRAGMENT_BOX, BoxImpl.class); + BOX_CLASSES.put(MOVIE_FRAGMENT_HEADER_BOX, MovieFragmentHeaderBox.class); + BOX_CLASSES.put(MOVIE_FRAGMENT_RANDOM_ACCESS_BOX, BoxImpl.class); + BOX_CLASSES.put(MOVIE_FRAGMENT_RANDOM_ACCESS_OFFSET_BOX, MovieFragmentRandomAccessOffsetBox.class); + BOX_CLASSES.put(MOVIE_HEADER_BOX, MovieHeaderBox.class); + BOX_CLASSES.put(NERO_METADATA_TAGS_BOX, NeroMetadataTagsBox.class); + BOX_CLASSES.put(NULL_MEDIA_HEADER_BOX, FullBox.class); + BOX_CLASSES.put(ORIGINAL_FORMAT_BOX, OriginalFormatBox.class); + BOX_CLASSES.put(PADDING_BIT_BOX, PaddingBitBox.class); + BOX_CLASSES.put(PARTITION_ENTRY, BoxImpl.class); + BOX_CLASSES.put(PIXEL_ASPECT_RATIO_BOX, PixelAspectRatioBox.class); + BOX_CLASSES.put(PRIMARY_ITEM_BOX, PrimaryItemBox.class); + BOX_CLASSES.put(PROGRESSIVE_DOWNLOAD_INFORMATION_BOX, ProgressiveDownloadInformationBox.class); + BOX_CLASSES.put(PROTECTION_SCHEME_INFORMATION_BOX, BoxImpl.class); + BOX_CLASSES.put(SAMPLE_DEPENDENCY_TYPE_BOX, SampleDependencyTypeBox.class); + BOX_CLASSES.put(SAMPLE_DESCRIPTION_BOX, SampleDescriptionBox.class); + BOX_CLASSES.put(SAMPLE_GROUP_DESCRIPTION_BOX, SampleGroupDescriptionBox.class); + BOX_CLASSES.put(SAMPLE_SCALE_BOX, SampleScaleBox.class); + BOX_CLASSES.put(SAMPLE_SIZE_BOX, SampleSizeBox.class); + BOX_CLASSES.put(SAMPLE_TABLE_BOX, BoxImpl.class); + BOX_CLASSES.put(SAMPLE_TO_CHUNK_BOX, SampleToChunkBox.class); + BOX_CLASSES.put(SAMPLE_TO_GROUP_BOX, SampleToGroupBox.class); + BOX_CLASSES.put(SCHEME_TYPE_BOX, SchemeTypeBox.class); + BOX_CLASSES.put(SCHEME_INFORMATION_BOX, BoxImpl.class); + BOX_CLASSES.put(SHADOW_SYNC_SAMPLE_BOX, ShadowSyncSampleBox.class); + BOX_CLASSES.put(SKIP_BOX, FreeSpaceBox.class); + BOX_CLASSES.put(SOUND_MEDIA_HEADER_BOX, SoundMediaHeaderBox.class); + BOX_CLASSES.put(SUB_SAMPLE_INFORMATION_BOX, SubSampleInformationBox.class); + BOX_CLASSES.put(SYNC_SAMPLE_BOX, SyncSampleBox.class); + BOX_CLASSES.put(TRACK_BOX, BoxImpl.class); + BOX_CLASSES.put(TRACK_EXTENDS_BOX, TrackExtendsBox.class); + BOX_CLASSES.put(TRACK_FRAGMENT_BOX, BoxImpl.class); + BOX_CLASSES.put(TRACK_FRAGMENT_HEADER_BOX, TrackFragmentHeaderBox.class); + BOX_CLASSES.put(TRACK_FRAGMENT_RANDOM_ACCESS_BOX, TrackFragmentRandomAccessBox.class); + BOX_CLASSES.put(TRACK_FRAGMENT_RUN_BOX, TrackFragmentRunBox.class); + BOX_CLASSES.put(TRACK_HEADER_BOX, TrackHeaderBox.class); + BOX_CLASSES.put(TRACK_REFERENCE_BOX, TrackReferenceBox.class); + BOX_CLASSES.put(TRACK_SELECTION_BOX, TrackSelectionBox.class); + BOX_CLASSES.put(USER_DATA_BOX, BoxImpl.class); + BOX_CLASSES.put(VIDEO_MEDIA_HEADER_BOX, VideoMediaHeaderBox.class); + BOX_CLASSES.put(WIDE_BOX, FreeSpaceBox.class); + BOX_CLASSES.put(XML_BOX, XMLBox.class); + BOX_CLASSES.put(OBJECT_DESCRIPTOR_BOX, ObjectDescriptorBox.class); + BOX_CLASSES.put(SAMPLE_DEPENDENCY_BOX, SampleDependencyBox.class); + BOX_CLASSES.put(ID3_TAG_BOX, ID3TagBox.class); + BOX_CLASSES.put(ITUNES_META_LIST_BOX, BoxImpl.class); + BOX_CLASSES.put(CUSTOM_ITUNES_METADATA_BOX, BoxImpl.class); + BOX_CLASSES.put(ITUNES_METADATA_BOX, ITunesMetadataBox.class); + BOX_CLASSES.put(ITUNES_METADATA_NAME_BOX, ITunesMetadataNameBox.class); + BOX_CLASSES.put(ITUNES_METADATA_MEAN_BOX, ITunesMetadataMeanBox.class); + BOX_CLASSES.put(ALBUM_ARTIST_NAME_BOX, BoxImpl.class); + BOX_CLASSES.put(ALBUM_ARTIST_SORT_BOX, BoxImpl.class); + BOX_CLASSES.put(ALBUM_NAME_BOX, BoxImpl.class); + BOX_CLASSES.put(ALBUM_SORT_BOX, BoxImpl.class); + BOX_CLASSES.put(ARTIST_NAME_BOX, BoxImpl.class); + BOX_CLASSES.put(ARTIST_SORT_BOX, BoxImpl.class); + BOX_CLASSES.put(CATEGORY_BOX, BoxImpl.class); + BOX_CLASSES.put(COMMENTS_BOX, BoxImpl.class); + BOX_CLASSES.put(COMPILATION_PART_BOX, BoxImpl.class); + BOX_CLASSES.put(COMPOSER_NAME_BOX, BoxImpl.class); + BOX_CLASSES.put(COMPOSER_SORT_BOX, BoxImpl.class); + BOX_CLASSES.put(COVER_BOX, BoxImpl.class); + BOX_CLASSES.put(CUSTOM_GENRE_BOX, BoxImpl.class); + BOX_CLASSES.put(DESCRIPTION_BOX, BoxImpl.class); + BOX_CLASSES.put(DISK_NUMBER_BOX, BoxImpl.class); + BOX_CLASSES.put(ENCODER_NAME_BOX, EncoderBox.class); + BOX_CLASSES.put(ENCODER_TOOL_BOX, EncoderBox.class); + BOX_CLASSES.put(EPISODE_GLOBAL_UNIQUE_ID_BOX, BoxImpl.class); + BOX_CLASSES.put(GAPLESS_PLAYBACK_BOX, BoxImpl.class); + BOX_CLASSES.put(GENRE_BOX, GenreBox.class); + BOX_CLASSES.put(GROUPING_BOX, BoxImpl.class); + BOX_CLASSES.put(HD_VIDEO_BOX, BoxImpl.class); + BOX_CLASSES.put(ITUNES_PURCHASE_ACCOUNT_BOX, BoxImpl.class); + BOX_CLASSES.put(ITUNES_ACCOUNT_TYPE_BOX, BoxImpl.class); + BOX_CLASSES.put(ITUNES_CATALOGUE_ID_BOX, BoxImpl.class); + BOX_CLASSES.put(ITUNES_COUNTRY_CODE_BOX, BoxImpl.class); + BOX_CLASSES.put(KEYWORD_BOX, BoxImpl.class); + BOX_CLASSES.put(LONG_DESCRIPTION_BOX, BoxImpl.class); + BOX_CLASSES.put(LYRICS_BOX, BoxImpl.class); + BOX_CLASSES.put(META_TYPE_BOX, BoxImpl.class); + BOX_CLASSES.put(PODCAST_BOX, BoxImpl.class); + BOX_CLASSES.put(PODCAST_URL_BOX, BoxImpl.class); + BOX_CLASSES.put(PURCHASE_DATE_BOX, BoxImpl.class); + BOX_CLASSES.put(RATING_BOX, RatingBox.class); + BOX_CLASSES.put(RELEASE_DATE_BOX, BoxImpl.class); + BOX_CLASSES.put(REQUIREMENT_BOX, RequirementBox.class); + BOX_CLASSES.put(TEMPO_BOX, BoxImpl.class); + BOX_CLASSES.put(TRACK_NAME_BOX, BoxImpl.class); + BOX_CLASSES.put(TRACK_NUMBER_BOX, BoxImpl.class); + BOX_CLASSES.put(TRACK_SORT_BOX, BoxImpl.class); + BOX_CLASSES.put(TV_EPISODE_BOX, BoxImpl.class); + BOX_CLASSES.put(TV_EPISODE_NUMBER_BOX, BoxImpl.class); + BOX_CLASSES.put(TV_NETWORK_NAME_BOX, BoxImpl.class); + BOX_CLASSES.put(TV_SEASON_BOX, BoxImpl.class); + BOX_CLASSES.put(TV_SHOW_BOX, BoxImpl.class); + BOX_CLASSES.put(TV_SHOW_SORT_BOX, BoxImpl.class); + BOX_CLASSES.put(THREE_GPP_ALBUM_BOX, ThreeGPPAlbumBox.class); + BOX_CLASSES.put(THREE_GPP_AUTHOR_BOX, ThreeGPPMetadataBox.class); + BOX_CLASSES.put(THREE_GPP_CLASSIFICATION_BOX, ThreeGPPMetadataBox.class); + BOX_CLASSES.put(THREE_GPP_DESCRIPTION_BOX, ThreeGPPMetadataBox.class); + BOX_CLASSES.put(THREE_GPP_KEYWORDS_BOX, ThreeGPPKeywordsBox.class); + BOX_CLASSES.put(THREE_GPP_LOCATION_INFORMATION_BOX, ThreeGPPLocationBox.class); + BOX_CLASSES.put(THREE_GPP_PERFORMER_BOX, ThreeGPPMetadataBox.class); + BOX_CLASSES.put(THREE_GPP_RECORDING_YEAR_BOX, ThreeGPPRecordingYearBox.class); + BOX_CLASSES.put(THREE_GPP_TITLE_BOX, ThreeGPPMetadataBox.class); + BOX_CLASSES.put(GOOGLE_HOST_HEADER_BOX, BoxImpl.class); + BOX_CLASSES.put(GOOGLE_PING_MESSAGE_BOX, BoxImpl.class); + BOX_CLASSES.put(GOOGLE_PING_URL_BOX, BoxImpl.class); + BOX_CLASSES.put(GOOGLE_SOURCE_DATA_BOX, BoxImpl.class); + BOX_CLASSES.put(GOOGLE_START_TIME_BOX, BoxImpl.class); + BOX_CLASSES.put(GOOGLE_TRACK_DURATION_BOX, BoxImpl.class); + BOX_CLASSES.put(MP4V_SAMPLE_ENTRY, VideoSampleEntry.class); + BOX_CLASSES.put(H263_SAMPLE_ENTRY, VideoSampleEntry.class); + BOX_CLASSES.put(ENCRYPTED_VIDEO_SAMPLE_ENTRY, VideoSampleEntry.class); + BOX_CLASSES.put(AVC_SAMPLE_ENTRY, VideoSampleEntry.class); + BOX_CLASSES.put(MP4A_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(AC3_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(EAC3_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(DRMS_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(AMR_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(AMR_WB_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(EVRC_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(QCELP_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(SMV_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(ENCRYPTED_AUDIO_SAMPLE_ENTRY, AudioSampleEntry.class); + BOX_CLASSES.put(MPEG_SAMPLE_ENTRY, MPEGSampleEntry.class); + BOX_CLASSES.put(TEXT_METADATA_SAMPLE_ENTRY, TextMetadataSampleEntry.class); + BOX_CLASSES.put(XML_METADATA_SAMPLE_ENTRY, XMLMetadataSampleEntry.class); + BOX_CLASSES.put(RTP_HINT_SAMPLE_ENTRY, RTPHintSampleEntry.class); + BOX_CLASSES.put(FD_HINT_SAMPLE_ENTRY, FDHintSampleEntry.class); + BOX_CLASSES.put(ESD_BOX, ESDBox.class); + BOX_CLASSES.put(H263_SPECIFIC_BOX, H263SpecificBox.class); + BOX_CLASSES.put(AVC_SPECIFIC_BOX, AVCSpecificBox.class); + BOX_CLASSES.put(AC3_SPECIFIC_BOX, AC3SpecificBox.class); + BOX_CLASSES.put(EAC3_SPECIFIC_BOX, EAC3SpecificBox.class); + BOX_CLASSES.put(AMR_SPECIFIC_BOX, AMRSpecificBox.class); + BOX_CLASSES.put(EVRC_SPECIFIC_BOX, EVRCSpecificBox.class); + BOX_CLASSES.put(QCELP_SPECIFIC_BOX, QCELPSpecificBox.class); + BOX_CLASSES.put(SMV_SPECIFIC_BOX, SMVSpecificBox.class); + BOX_CLASSES.put(OMA_ACCESS_UNIT_FORMAT_BOX, OMAAccessUnitFormatBox.class); + BOX_CLASSES.put(OMA_COMMON_HEADERS_BOX, OMACommonHeadersBox.class); + BOX_CLASSES.put(OMA_CONTENT_ID_BOX, OMAContentIDBox.class); + BOX_CLASSES.put(OMA_CONTENT_OBJECT_BOX, OMAContentObjectBox.class); + BOX_CLASSES.put(OMA_COVER_URI_BOX, OMAURLBox.class); + BOX_CLASSES.put(OMA_DISCRETE_MEDIA_HEADERS_BOX, OMADiscreteMediaHeadersBox.class); + BOX_CLASSES.put(OMA_DRM_CONTAINER_BOX, FullBox.class); + BOX_CLASSES.put(OMA_ICON_URI_BOX, OMAURLBox.class); + BOX_CLASSES.put(OMA_INFO_URL_BOX, OMAURLBox.class); + BOX_CLASSES.put(OMA_LYRICS_URI_BOX, OMAURLBox.class); + BOX_CLASSES.put(OMA_MUTABLE_DRM_INFORMATION_BOX, BoxImpl.class); + BOX_CLASSES.put(OMA_KEY_MANAGEMENT_BOX, FullBox.class); + BOX_CLASSES.put(OMA_RIGHTS_OBJECT_BOX, OMARightsObjectBox.class); + BOX_CLASSES.put(OMA_TRANSACTION_TRACKING_BOX, OMATransactionTrackingBox.class); + BOX_CLASSES.put(FAIRPLAY_USER_ID_BOX, FairPlayDataBox.class); + BOX_CLASSES.put(FAIRPLAY_USER_NAME_BOX, FairPlayDataBox.class); + BOX_CLASSES.put(FAIRPLAY_USER_KEY_BOX, FairPlayDataBox.class); + BOX_CLASSES.put(FAIRPLAY_IV_BOX, FairPlayDataBox.class); + BOX_CLASSES.put(FAIRPLAY_PRIVATE_KEY_BOX, FairPlayDataBox.class); + //parameter + PARAMETER.put(ADDITIONAL_METADATA_CONTAINER_BOX, new String[] {"Additional Metadata Container Box"}); + PARAMETER.put(DATA_INFORMATION_BOX, new String[] {"Data Information Box"}); + PARAMETER.put(EDIT_BOX, new String[] {"Edit Box"}); + PARAMETER.put(MEDIA_BOX, new String[] {"Media Box"}); + PARAMETER.put(MEDIA_INFORMATION_BOX, new String[] {"Media Information Box"}); + PARAMETER.put(MOVIE_BOX, new String[] {"Movie Box"}); + PARAMETER.put(MOVIE_EXTENDS_BOX, new String[] {"Movie Extends Box"}); + PARAMETER.put(MOVIE_FRAGMENT_BOX, new String[] {"Movie Fragment Box"}); + PARAMETER.put(MOVIE_FRAGMENT_RANDOM_ACCESS_BOX, new String[] {"Movie Fragment Random Access Box"}); + PARAMETER.put(NULL_MEDIA_HEADER_BOX, new String[] {"Null Media Header Box"}); + PARAMETER.put(PARTITION_ENTRY, new String[] {"Partition Entry"}); + PARAMETER.put(PROTECTION_SCHEME_INFORMATION_BOX, new String[] {"Protection Scheme Information Box"}); + PARAMETER.put(SAMPLE_TABLE_BOX, new String[] {"Sample Table Box"}); + PARAMETER.put(SCHEME_INFORMATION_BOX, new String[] {"Scheme Information Box"}); + PARAMETER.put(TRACK_BOX, new String[] {"Track Box"}); + PARAMETER.put(TRACK_FRAGMENT_BOX, new String[] {"Track Fragment Box"}); + PARAMETER.put(USER_DATA_BOX, new String[] {"User Data Box"}); + PARAMETER.put(ITUNES_META_LIST_BOX, new String[] {"iTunes Meta List Box"}); + PARAMETER.put(CUSTOM_ITUNES_METADATA_BOX, new String[] {"Custom iTunes Metadata Box"}); + PARAMETER.put(ALBUM_ARTIST_NAME_BOX, new String[] {"Album Artist Name Box"}); + PARAMETER.put(ALBUM_ARTIST_SORT_BOX, new String[] {"Album Artist Sort Box"}); + PARAMETER.put(ALBUM_NAME_BOX, new String[] {"Album Name Box"}); + PARAMETER.put(ALBUM_SORT_BOX, new String[] {"Album Sort Box"}); + PARAMETER.put(ARTIST_NAME_BOX, new String[] {"Artist Name Box"}); + PARAMETER.put(ARTIST_SORT_BOX, new String[] {"Artist Sort Box"}); + PARAMETER.put(CATEGORY_BOX, new String[] {"Category Box"}); + PARAMETER.put(COMMENTS_BOX, new String[] {"Comments Box"}); + PARAMETER.put(COMPILATION_PART_BOX, new String[] {"Compilation Part Box"}); + PARAMETER.put(COMPOSER_NAME_BOX, new String[] {"Composer Name Box"}); + PARAMETER.put(COMPOSER_SORT_BOX, new String[] {"Composer Sort Box"}); + PARAMETER.put(COVER_BOX, new String[] {"Cover Box"}); + PARAMETER.put(CUSTOM_GENRE_BOX, new String[] {"Custom Genre Box"}); + PARAMETER.put(DESCRIPTION_BOX, new String[] {"Description Cover Box"}); + PARAMETER.put(DISK_NUMBER_BOX, new String[] {"Disk Number Box"}); + PARAMETER.put(EPISODE_GLOBAL_UNIQUE_ID_BOX, new String[] {"Episode Global Unique ID Box"}); + PARAMETER.put(GAPLESS_PLAYBACK_BOX, new String[] {"Gapless Playback Box"}); + PARAMETER.put(GROUPING_BOX, new String[] {"Grouping Box"}); + PARAMETER.put(HD_VIDEO_BOX, new String[] {"HD Video Box"}); + PARAMETER.put(ITUNES_PURCHASE_ACCOUNT_BOX, new String[] {"iTunes Purchase Account Box"}); + PARAMETER.put(ITUNES_ACCOUNT_TYPE_BOX, new String[] {"iTunes Account Type Box"}); + PARAMETER.put(ITUNES_CATALOGUE_ID_BOX, new String[] {"iTunes Catalogue ID Box"}); + PARAMETER.put(ITUNES_COUNTRY_CODE_BOX, new String[] {"iTunes Country Code Box"}); + PARAMETER.put(KEYWORD_BOX, new String[] {"Keyword Box"}); + PARAMETER.put(LONG_DESCRIPTION_BOX, new String[] {"Long Description Box"}); + PARAMETER.put(LYRICS_BOX, new String[] {"Lyrics Box"}); + PARAMETER.put(META_TYPE_BOX, new String[] {"Meta Type Box"}); + PARAMETER.put(PODCAST_BOX, new String[] {"Podcast Box"}); + PARAMETER.put(PODCAST_URL_BOX, new String[] {"Podcast URL Box"}); + PARAMETER.put(PURCHASE_DATE_BOX, new String[] {"Purchase Date Box"}); + PARAMETER.put(RELEASE_DATE_BOX, new String[] {"Release Date Box"}); + PARAMETER.put(TEMPO_BOX, new String[] {"Tempo Box"}); + PARAMETER.put(TRACK_NAME_BOX, new String[] {"Track Name Box"}); + PARAMETER.put(TRACK_NUMBER_BOX, new String[] {"Track Number Box"}); + PARAMETER.put(TRACK_SORT_BOX, new String[] {"Track Sort Box"}); + PARAMETER.put(TV_EPISODE_BOX, new String[] {"TV Episode Box"}); + PARAMETER.put(TV_EPISODE_NUMBER_BOX, new String[] {"TV Episode Number Box"}); + PARAMETER.put(TV_NETWORK_NAME_BOX, new String[] {"TV Network Name Box"}); + PARAMETER.put(TV_SEASON_BOX, new String[] {"TV Season Box"}); + PARAMETER.put(TV_SHOW_BOX, new String[] {"TV Show Box"}); + PARAMETER.put(TV_SHOW_SORT_BOX, new String[] {"TV Show Sort Box"}); + PARAMETER.put(THREE_GPP_AUTHOR_BOX, new String[] {"3GPP Author Box"}); + PARAMETER.put(THREE_GPP_CLASSIFICATION_BOX, new String[] {"3GPP Classification Box"}); + PARAMETER.put(THREE_GPP_DESCRIPTION_BOX, new String[] {"3GPP Description Box"}); + PARAMETER.put(THREE_GPP_PERFORMER_BOX, new String[] {"3GPP Performer Box"}); + PARAMETER.put(THREE_GPP_TITLE_BOX, new String[] {"3GPP Title Box"}); + PARAMETER.put(GOOGLE_HOST_HEADER_BOX, new String[] {"Google Host Header Box"}); + PARAMETER.put(GOOGLE_PING_MESSAGE_BOX, new String[] {"Google Ping Message Box"}); + PARAMETER.put(GOOGLE_PING_URL_BOX, new String[] {"Google Ping URL Box"}); + PARAMETER.put(GOOGLE_SOURCE_DATA_BOX, new String[] {"Google Source Data Box"}); + PARAMETER.put(GOOGLE_START_TIME_BOX, new String[] {"Google Start Time Box"}); + PARAMETER.put(GOOGLE_TRACK_DURATION_BOX, new String[] {"Google Track Duration Box"}); + PARAMETER.put(MP4V_SAMPLE_ENTRY, new String[] {"MPEG-4 Video Sample Entry"}); + PARAMETER.put(H263_SAMPLE_ENTRY, new String[] {"H263 Video Sample Entry"}); + PARAMETER.put(ENCRYPTED_VIDEO_SAMPLE_ENTRY, new String[] {"Encrypted Video Sample Entry"}); + PARAMETER.put(AVC_SAMPLE_ENTRY, new String[] {"AVC Video Sample Entry"}); + PARAMETER.put(MP4A_SAMPLE_ENTRY, new String[] {"MPEG- 4Audio Sample Entry"}); + PARAMETER.put(AC3_SAMPLE_ENTRY, new String[] {"AC-3 Audio Sample Entry"}); + PARAMETER.put(EAC3_SAMPLE_ENTRY, new String[] {"Extended AC-3 Audio Sample Entry"}); + PARAMETER.put(DRMS_SAMPLE_ENTRY, new String[] {"DRMS Audio Sample Entry"}); + PARAMETER.put(AMR_SAMPLE_ENTRY, new String[] {"AMR Audio Sample Entry"}); + PARAMETER.put(AMR_WB_SAMPLE_ENTRY, new String[] {"AMR-Wideband Audio Sample Entry"}); + PARAMETER.put(EVRC_SAMPLE_ENTRY, new String[] {"EVC Audio Sample Entry"}); + PARAMETER.put(QCELP_SAMPLE_ENTRY, new String[] {"QCELP Audio Sample Entry"}); + PARAMETER.put(SMV_SAMPLE_ENTRY, new String[] {"SMV Audio Sample Entry"}); + PARAMETER.put(ENCRYPTED_AUDIO_SAMPLE_ENTRY, new String[] {"Encrypted Audio Sample Entry"}); + PARAMETER.put(OMA_COVER_URI_BOX, new String[] {"OMA DRM Cover URI Box"}); + PARAMETER.put(OMA_DRM_CONTAINER_BOX, new String[] {"OMA DRM Container Box"}); + PARAMETER.put(OMA_ICON_URI_BOX, new String[] {"OMA DRM Icon URI Box"}); + PARAMETER.put(OMA_INFO_URL_BOX, new String[] {"OMA DRM Info URL Box"}); + PARAMETER.put(OMA_LYRICS_URI_BOX, new String[] {"OMA DRM Lyrics URI Box"}); + PARAMETER.put(OMA_MUTABLE_DRM_INFORMATION_BOX, new String[] {"OMA DRM Mutable DRM Information Box"}); + } + + public static Box parseBox(Box parent, MP4Input in) throws IOException { + + long offset = in.getOffset(); + long size = in.readBytes(4); + long type = in.readBytes(4); + + return parseBox(parent, offset, size, type, in); + } - static { - //classes - BOX_CLASSES.put(ADDITIONAL_METADATA_CONTAINER_BOX, BoxImpl.class); - BOX_CLASSES.put(APPLE_LOSSLESS_BOX, AppleLosslessBox.class); - BOX_CLASSES.put(BINARY_XML_BOX, BinaryXMLBox.class); - BOX_CLASSES.put(BIT_RATE_BOX, BitRateBox.class); - BOX_CLASSES.put(CHAPTER_BOX, ChapterBox.class); - BOX_CLASSES.put(CHUNK_OFFSET_BOX, ChunkOffsetBox.class); - BOX_CLASSES.put(CHUNK_LARGE_OFFSET_BOX, ChunkOffsetBox.class); - BOX_CLASSES.put(CLEAN_APERTURE_BOX, CleanApertureBox.class); - BOX_CLASSES.put(COMPACT_SAMPLE_SIZE_BOX, SampleSizeBox.class); - BOX_CLASSES.put(COMPOSITION_TIME_TO_SAMPLE_BOX, CompositionTimeToSampleBox.class); - BOX_CLASSES.put(COPYRIGHT_BOX, CopyrightBox.class); - BOX_CLASSES.put(DATA_ENTRY_URN_BOX, DataEntryUrnBox.class); - BOX_CLASSES.put(DATA_ENTRY_URL_BOX, DataEntryUrlBox.class); - BOX_CLASSES.put(DATA_INFORMATION_BOX, BoxImpl.class); - BOX_CLASSES.put(DATA_REFERENCE_BOX, DataReferenceBox.class); - BOX_CLASSES.put(DECODING_TIME_TO_SAMPLE_BOX, DecodingTimeToSampleBox.class); - BOX_CLASSES.put(DEGRADATION_PRIORITY_BOX, DegradationPriorityBox.class); - BOX_CLASSES.put(EDIT_BOX, BoxImpl.class); - BOX_CLASSES.put(EDIT_LIST_BOX, EditListBox.class); - BOX_CLASSES.put(FD_ITEM_INFORMATION_BOX, FDItemInformationBox.class); - BOX_CLASSES.put(FD_SESSION_GROUP_BOX, FDSessionGroupBox.class); - BOX_CLASSES.put(FEC_RESERVOIR_BOX, FECReservoirBox.class); - BOX_CLASSES.put(FILE_PARTITION_BOX, FilePartitionBox.class); - BOX_CLASSES.put(FILE_TYPE_BOX, FileTypeBox.class); - BOX_CLASSES.put(FREE_SPACE_BOX, FreeSpaceBox.class); - BOX_CLASSES.put(GROUP_ID_TO_NAME_BOX, GroupIDToNameBox.class); - BOX_CLASSES.put(HANDLER_BOX, HandlerBox.class); - BOX_CLASSES.put(HINT_MEDIA_HEADER_BOX, HintMediaHeaderBox.class); - BOX_CLASSES.put(IPMP_CONTROL_BOX, IPMPControlBox.class); - BOX_CLASSES.put(IPMP_INFO_BOX, IPMPInfoBox.class); - BOX_CLASSES.put(ITEM_INFORMATION_BOX, ItemInformationBox.class); - BOX_CLASSES.put(ITEM_INFORMATION_ENTRY, ItemInformationEntry.class); - BOX_CLASSES.put(ITEM_LOCATION_BOX, ItemLocationBox.class); - BOX_CLASSES.put(ITEM_PROTECTION_BOX, ItemProtectionBox.class); - BOX_CLASSES.put(MEDIA_BOX, BoxImpl.class); - BOX_CLASSES.put(MEDIA_DATA_BOX, MediaDataBox.class); - BOX_CLASSES.put(MEDIA_HEADER_BOX, MediaHeaderBox.class); - BOX_CLASSES.put(MEDIA_INFORMATION_BOX, BoxImpl.class); - BOX_CLASSES.put(META_BOX, MetaBox.class); - BOX_CLASSES.put(META_BOX_RELATION_BOX, MetaBoxRelationBox.class); - BOX_CLASSES.put(MOVIE_BOX, BoxImpl.class); - BOX_CLASSES.put(MOVIE_EXTENDS_BOX, BoxImpl.class); - BOX_CLASSES.put(MOVIE_EXTENDS_HEADER_BOX, MovieExtendsHeaderBox.class); - BOX_CLASSES.put(MOVIE_FRAGMENT_BOX, BoxImpl.class); - BOX_CLASSES.put(MOVIE_FRAGMENT_HEADER_BOX, MovieFragmentHeaderBox.class); - BOX_CLASSES.put(MOVIE_FRAGMENT_RANDOM_ACCESS_BOX, BoxImpl.class); - BOX_CLASSES.put(MOVIE_FRAGMENT_RANDOM_ACCESS_OFFSET_BOX, MovieFragmentRandomAccessOffsetBox.class); - BOX_CLASSES.put(MOVIE_HEADER_BOX, MovieHeaderBox.class); - BOX_CLASSES.put(NERO_METADATA_TAGS_BOX, NeroMetadataTagsBox.class); - BOX_CLASSES.put(NULL_MEDIA_HEADER_BOX, FullBox.class); - BOX_CLASSES.put(ORIGINAL_FORMAT_BOX, OriginalFormatBox.class); - BOX_CLASSES.put(PADDING_BIT_BOX, PaddingBitBox.class); - BOX_CLASSES.put(PARTITION_ENTRY, BoxImpl.class); - BOX_CLASSES.put(PIXEL_ASPECT_RATIO_BOX, PixelAspectRatioBox.class); - BOX_CLASSES.put(PRIMARY_ITEM_BOX, PrimaryItemBox.class); - BOX_CLASSES.put(PROGRESSIVE_DOWNLOAD_INFORMATION_BOX, ProgressiveDownloadInformationBox.class); - BOX_CLASSES.put(PROTECTION_SCHEME_INFORMATION_BOX, BoxImpl.class); - BOX_CLASSES.put(SAMPLE_DEPENDENCY_TYPE_BOX, SampleDependencyTypeBox.class); - BOX_CLASSES.put(SAMPLE_DESCRIPTION_BOX, SampleDescriptionBox.class); - BOX_CLASSES.put(SAMPLE_GROUP_DESCRIPTION_BOX, SampleGroupDescriptionBox.class); - BOX_CLASSES.put(SAMPLE_SCALE_BOX, SampleScaleBox.class); - BOX_CLASSES.put(SAMPLE_SIZE_BOX, SampleSizeBox.class); - BOX_CLASSES.put(SAMPLE_TABLE_BOX, BoxImpl.class); - BOX_CLASSES.put(SAMPLE_TO_CHUNK_BOX, SampleToChunkBox.class); - BOX_CLASSES.put(SAMPLE_TO_GROUP_BOX, SampleToGroupBox.class); - BOX_CLASSES.put(SCHEME_TYPE_BOX, SchemeTypeBox.class); - BOX_CLASSES.put(SCHEME_INFORMATION_BOX, BoxImpl.class); - BOX_CLASSES.put(SHADOW_SYNC_SAMPLE_BOX, ShadowSyncSampleBox.class); - BOX_CLASSES.put(SKIP_BOX, FreeSpaceBox.class); - BOX_CLASSES.put(SOUND_MEDIA_HEADER_BOX, SoundMediaHeaderBox.class); - BOX_CLASSES.put(SUB_SAMPLE_INFORMATION_BOX, SubSampleInformationBox.class); - BOX_CLASSES.put(SYNC_SAMPLE_BOX, SyncSampleBox.class); - BOX_CLASSES.put(TRACK_BOX, BoxImpl.class); - BOX_CLASSES.put(TRACK_EXTENDS_BOX, TrackExtendsBox.class); - BOX_CLASSES.put(TRACK_FRAGMENT_BOX, BoxImpl.class); - BOX_CLASSES.put(TRACK_FRAGMENT_HEADER_BOX, TrackFragmentHeaderBox.class); - BOX_CLASSES.put(TRACK_FRAGMENT_RANDOM_ACCESS_BOX, TrackFragmentRandomAccessBox.class); - BOX_CLASSES.put(TRACK_FRAGMENT_RUN_BOX, TrackFragmentRunBox.class); - BOX_CLASSES.put(TRACK_HEADER_BOX, TrackHeaderBox.class); - BOX_CLASSES.put(TRACK_REFERENCE_BOX, TrackReferenceBox.class); - BOX_CLASSES.put(TRACK_SELECTION_BOX, TrackSelectionBox.class); - BOX_CLASSES.put(USER_DATA_BOX, BoxImpl.class); - BOX_CLASSES.put(VIDEO_MEDIA_HEADER_BOX, VideoMediaHeaderBox.class); - BOX_CLASSES.put(WIDE_BOX, FreeSpaceBox.class); - BOX_CLASSES.put(XML_BOX, XMLBox.class); - BOX_CLASSES.put(OBJECT_DESCRIPTOR_BOX, ObjectDescriptorBox.class); - BOX_CLASSES.put(SAMPLE_DEPENDENCY_BOX, SampleDependencyBox.class); - BOX_CLASSES.put(ID3_TAG_BOX, ID3TagBox.class); - BOX_CLASSES.put(ITUNES_META_LIST_BOX, BoxImpl.class); - BOX_CLASSES.put(CUSTOM_ITUNES_METADATA_BOX, BoxImpl.class); - BOX_CLASSES.put(ITUNES_METADATA_BOX, ITunesMetadataBox.class); - BOX_CLASSES.put(ITUNES_METADATA_NAME_BOX, ITunesMetadataNameBox.class); - BOX_CLASSES.put(ITUNES_METADATA_MEAN_BOX, ITunesMetadataMeanBox.class); - BOX_CLASSES.put(ALBUM_ARTIST_NAME_BOX, BoxImpl.class); - BOX_CLASSES.put(ALBUM_ARTIST_SORT_BOX, BoxImpl.class); - BOX_CLASSES.put(ALBUM_NAME_BOX, BoxImpl.class); - BOX_CLASSES.put(ALBUM_SORT_BOX, BoxImpl.class); - BOX_CLASSES.put(ARTIST_NAME_BOX, BoxImpl.class); - BOX_CLASSES.put(ARTIST_SORT_BOX, BoxImpl.class); - BOX_CLASSES.put(CATEGORY_BOX, BoxImpl.class); - BOX_CLASSES.put(COMMENTS_BOX, BoxImpl.class); - BOX_CLASSES.put(COMPILATION_PART_BOX, BoxImpl.class); - BOX_CLASSES.put(COMPOSER_NAME_BOX, BoxImpl.class); - BOX_CLASSES.put(COMPOSER_SORT_BOX, BoxImpl.class); - BOX_CLASSES.put(COVER_BOX, BoxImpl.class); - BOX_CLASSES.put(CUSTOM_GENRE_BOX, BoxImpl.class); - BOX_CLASSES.put(DESCRIPTION_BOX, BoxImpl.class); - BOX_CLASSES.put(DISK_NUMBER_BOX, BoxImpl.class); - BOX_CLASSES.put(ENCODER_NAME_BOX, EncoderBox.class); - BOX_CLASSES.put(ENCODER_TOOL_BOX, EncoderBox.class); - BOX_CLASSES.put(EPISODE_GLOBAL_UNIQUE_ID_BOX, BoxImpl.class); - BOX_CLASSES.put(GAPLESS_PLAYBACK_BOX, BoxImpl.class); - BOX_CLASSES.put(GENRE_BOX, GenreBox.class); - BOX_CLASSES.put(GROUPING_BOX, BoxImpl.class); - BOX_CLASSES.put(HD_VIDEO_BOX, BoxImpl.class); - BOX_CLASSES.put(ITUNES_PURCHASE_ACCOUNT_BOX, BoxImpl.class); - BOX_CLASSES.put(ITUNES_ACCOUNT_TYPE_BOX, BoxImpl.class); - BOX_CLASSES.put(ITUNES_CATALOGUE_ID_BOX, BoxImpl.class); - BOX_CLASSES.put(ITUNES_COUNTRY_CODE_BOX, BoxImpl.class); - BOX_CLASSES.put(KEYWORD_BOX, BoxImpl.class); - BOX_CLASSES.put(LONG_DESCRIPTION_BOX, BoxImpl.class); - BOX_CLASSES.put(LYRICS_BOX, BoxImpl.class); - BOX_CLASSES.put(META_TYPE_BOX, BoxImpl.class); - BOX_CLASSES.put(PODCAST_BOX, BoxImpl.class); - BOX_CLASSES.put(PODCAST_URL_BOX, BoxImpl.class); - BOX_CLASSES.put(PURCHASE_DATE_BOX, BoxImpl.class); - BOX_CLASSES.put(RATING_BOX, RatingBox.class); - BOX_CLASSES.put(RELEASE_DATE_BOX, BoxImpl.class); - BOX_CLASSES.put(REQUIREMENT_BOX, RequirementBox.class); - BOX_CLASSES.put(TEMPO_BOX, BoxImpl.class); - BOX_CLASSES.put(TRACK_NAME_BOX, BoxImpl.class); - BOX_CLASSES.put(TRACK_NUMBER_BOX, BoxImpl.class); - BOX_CLASSES.put(TRACK_SORT_BOX, BoxImpl.class); - BOX_CLASSES.put(TV_EPISODE_BOX, BoxImpl.class); - BOX_CLASSES.put(TV_EPISODE_NUMBER_BOX, BoxImpl.class); - BOX_CLASSES.put(TV_NETWORK_NAME_BOX, BoxImpl.class); - BOX_CLASSES.put(TV_SEASON_BOX, BoxImpl.class); - BOX_CLASSES.put(TV_SHOW_BOX, BoxImpl.class); - BOX_CLASSES.put(TV_SHOW_SORT_BOX, BoxImpl.class); - BOX_CLASSES.put(THREE_GPP_ALBUM_BOX, ThreeGPPAlbumBox.class); - BOX_CLASSES.put(THREE_GPP_AUTHOR_BOX, ThreeGPPMetadataBox.class); - BOX_CLASSES.put(THREE_GPP_CLASSIFICATION_BOX, ThreeGPPMetadataBox.class); - BOX_CLASSES.put(THREE_GPP_DESCRIPTION_BOX, ThreeGPPMetadataBox.class); - BOX_CLASSES.put(THREE_GPP_KEYWORDS_BOX, ThreeGPPKeywordsBox.class); - BOX_CLASSES.put(THREE_GPP_LOCATION_INFORMATION_BOX, ThreeGPPLocationBox.class); - BOX_CLASSES.put(THREE_GPP_PERFORMER_BOX, ThreeGPPMetadataBox.class); - BOX_CLASSES.put(THREE_GPP_RECORDING_YEAR_BOX, ThreeGPPRecordingYearBox.class); - BOX_CLASSES.put(THREE_GPP_TITLE_BOX, ThreeGPPMetadataBox.class); - BOX_CLASSES.put(GOOGLE_HOST_HEADER_BOX, BoxImpl.class); - BOX_CLASSES.put(GOOGLE_PING_MESSAGE_BOX, BoxImpl.class); - BOX_CLASSES.put(GOOGLE_PING_URL_BOX, BoxImpl.class); - BOX_CLASSES.put(GOOGLE_SOURCE_DATA_BOX, BoxImpl.class); - BOX_CLASSES.put(GOOGLE_START_TIME_BOX, BoxImpl.class); - BOX_CLASSES.put(GOOGLE_TRACK_DURATION_BOX, BoxImpl.class); - BOX_CLASSES.put(MP4V_SAMPLE_ENTRY, VideoSampleEntry.class); - BOX_CLASSES.put(H263_SAMPLE_ENTRY, VideoSampleEntry.class); - BOX_CLASSES.put(ENCRYPTED_VIDEO_SAMPLE_ENTRY, VideoSampleEntry.class); - BOX_CLASSES.put(AVC_SAMPLE_ENTRY, VideoSampleEntry.class); - BOX_CLASSES.put(MP4A_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(AC3_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(EAC3_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(DRMS_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(AMR_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(AMR_WB_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(EVRC_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(QCELP_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(SMV_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(ENCRYPTED_AUDIO_SAMPLE_ENTRY, AudioSampleEntry.class); - BOX_CLASSES.put(MPEG_SAMPLE_ENTRY, MPEGSampleEntry.class); - BOX_CLASSES.put(TEXT_METADATA_SAMPLE_ENTRY, TextMetadataSampleEntry.class); - BOX_CLASSES.put(XML_METADATA_SAMPLE_ENTRY, XMLMetadataSampleEntry.class); - BOX_CLASSES.put(RTP_HINT_SAMPLE_ENTRY, RTPHintSampleEntry.class); - BOX_CLASSES.put(FD_HINT_SAMPLE_ENTRY, FDHintSampleEntry.class); - BOX_CLASSES.put(ESD_BOX, ESDBox.class); - BOX_CLASSES.put(H263_SPECIFIC_BOX, H263SpecificBox.class); - BOX_CLASSES.put(AVC_SPECIFIC_BOX, AVCSpecificBox.class); - BOX_CLASSES.put(AC3_SPECIFIC_BOX, AC3SpecificBox.class); - BOX_CLASSES.put(EAC3_SPECIFIC_BOX, EAC3SpecificBox.class); - BOX_CLASSES.put(AMR_SPECIFIC_BOX, AMRSpecificBox.class); - BOX_CLASSES.put(EVRC_SPECIFIC_BOX, EVRCSpecificBox.class); - BOX_CLASSES.put(QCELP_SPECIFIC_BOX, QCELPSpecificBox.class); - BOX_CLASSES.put(SMV_SPECIFIC_BOX, SMVSpecificBox.class); - BOX_CLASSES.put(OMA_ACCESS_UNIT_FORMAT_BOX, OMAAccessUnitFormatBox.class); - BOX_CLASSES.put(OMA_COMMON_HEADERS_BOX, OMACommonHeadersBox.class); - BOX_CLASSES.put(OMA_CONTENT_ID_BOX, OMAContentIDBox.class); - BOX_CLASSES.put(OMA_CONTENT_OBJECT_BOX, OMAContentObjectBox.class); - BOX_CLASSES.put(OMA_COVER_URI_BOX, OMAURLBox.class); - BOX_CLASSES.put(OMA_DISCRETE_MEDIA_HEADERS_BOX, OMADiscreteMediaHeadersBox.class); - BOX_CLASSES.put(OMA_DRM_CONTAINER_BOX, FullBox.class); - BOX_CLASSES.put(OMA_ICON_URI_BOX, OMAURLBox.class); - BOX_CLASSES.put(OMA_INFO_URL_BOX, OMAURLBox.class); - BOX_CLASSES.put(OMA_LYRICS_URI_BOX, OMAURLBox.class); - BOX_CLASSES.put(OMA_MUTABLE_DRM_INFORMATION_BOX, BoxImpl.class); - BOX_CLASSES.put(OMA_KEY_MANAGEMENT_BOX, FullBox.class); - BOX_CLASSES.put(OMA_RIGHTS_OBJECT_BOX, OMARightsObjectBox.class); - BOX_CLASSES.put(OMA_TRANSACTION_TRACKING_BOX, OMATransactionTrackingBox.class); - BOX_CLASSES.put(FAIRPLAY_USER_ID_BOX, FairPlayDataBox.class); - BOX_CLASSES.put(FAIRPLAY_USER_NAME_BOX, FairPlayDataBox.class); - BOX_CLASSES.put(FAIRPLAY_USER_KEY_BOX, FairPlayDataBox.class); - BOX_CLASSES.put(FAIRPLAY_IV_BOX, FairPlayDataBox.class); - BOX_CLASSES.put(FAIRPLAY_PRIVATE_KEY_BOX, FairPlayDataBox.class); - //parameter - PARAMETER.put(ADDITIONAL_METADATA_CONTAINER_BOX, new String[]{"Additional Metadata Container Box"}); - PARAMETER.put(DATA_INFORMATION_BOX, new String[]{"Data Information Box"}); - PARAMETER.put(EDIT_BOX, new String[]{"Edit Box"}); - PARAMETER.put(MEDIA_BOX, new String[]{"Media Box"}); - PARAMETER.put(MEDIA_INFORMATION_BOX, new String[]{"Media Information Box"}); - PARAMETER.put(MOVIE_BOX, new String[]{"Movie Box"}); - PARAMETER.put(MOVIE_EXTENDS_BOX, new String[]{"Movie Extends Box"}); - PARAMETER.put(MOVIE_FRAGMENT_BOX, new String[]{"Movie Fragment Box"}); - PARAMETER.put(MOVIE_FRAGMENT_RANDOM_ACCESS_BOX, new String[]{"Movie Fragment Random Access Box"}); - PARAMETER.put(NULL_MEDIA_HEADER_BOX, new String[]{"Null Media Header Box"}); - PARAMETER.put(PARTITION_ENTRY, new String[]{"Partition Entry"}); - PARAMETER.put(PROTECTION_SCHEME_INFORMATION_BOX, new String[]{"Protection Scheme Information Box"}); - PARAMETER.put(SAMPLE_TABLE_BOX, new String[]{"Sample Table Box"}); - PARAMETER.put(SCHEME_INFORMATION_BOX, new String[]{"Scheme Information Box"}); - PARAMETER.put(TRACK_BOX, new String[]{"Track Box"}); - PARAMETER.put(TRACK_FRAGMENT_BOX, new String[]{"Track Fragment Box"}); - PARAMETER.put(USER_DATA_BOX, new String[]{"User Data Box"}); - PARAMETER.put(ITUNES_META_LIST_BOX, new String[]{"iTunes Meta List Box"}); - PARAMETER.put(CUSTOM_ITUNES_METADATA_BOX, new String[]{"Custom iTunes Metadata Box"}); - PARAMETER.put(ALBUM_ARTIST_NAME_BOX, new String[]{"Album Artist Name Box"}); - PARAMETER.put(ALBUM_ARTIST_SORT_BOX, new String[]{"Album Artist Sort Box"}); - PARAMETER.put(ALBUM_NAME_BOX, new String[]{"Album Name Box"}); - PARAMETER.put(ALBUM_SORT_BOX, new String[]{"Album Sort Box"}); - PARAMETER.put(ARTIST_NAME_BOX, new String[]{"Artist Name Box"}); - PARAMETER.put(ARTIST_SORT_BOX, new String[]{"Artist Sort Box"}); - PARAMETER.put(CATEGORY_BOX, new String[]{"Category Box"}); - PARAMETER.put(COMMENTS_BOX, new String[]{"Comments Box"}); - PARAMETER.put(COMPILATION_PART_BOX, new String[]{"Compilation Part Box"}); - PARAMETER.put(COMPOSER_NAME_BOX, new String[]{"Composer Name Box"}); - PARAMETER.put(COMPOSER_SORT_BOX, new String[]{"Composer Sort Box"}); - PARAMETER.put(COVER_BOX, new String[]{"Cover Box"}); - PARAMETER.put(CUSTOM_GENRE_BOX, new String[]{"Custom Genre Box"}); - PARAMETER.put(DESCRIPTION_BOX, new String[]{"Description Cover Box"}); - PARAMETER.put(DISK_NUMBER_BOX, new String[]{"Disk Number Box"}); - PARAMETER.put(EPISODE_GLOBAL_UNIQUE_ID_BOX, new String[]{"Episode Global Unique ID Box"}); - PARAMETER.put(GAPLESS_PLAYBACK_BOX, new String[]{"Gapless Playback Box"}); - PARAMETER.put(GROUPING_BOX, new String[]{"Grouping Box"}); - PARAMETER.put(HD_VIDEO_BOX, new String[]{"HD Video Box"}); - PARAMETER.put(ITUNES_PURCHASE_ACCOUNT_BOX, new String[]{"iTunes Purchase Account Box"}); - PARAMETER.put(ITUNES_ACCOUNT_TYPE_BOX, new String[]{"iTunes Account Type Box"}); - PARAMETER.put(ITUNES_CATALOGUE_ID_BOX, new String[]{"iTunes Catalogue ID Box"}); - PARAMETER.put(ITUNES_COUNTRY_CODE_BOX, new String[]{"iTunes Country Code Box"}); - PARAMETER.put(KEYWORD_BOX, new String[]{"Keyword Box"}); - PARAMETER.put(LONG_DESCRIPTION_BOX, new String[]{"Long Description Box"}); - PARAMETER.put(LYRICS_BOX, new String[]{"Lyrics Box"}); - PARAMETER.put(META_TYPE_BOX, new String[]{"Meta Type Box"}); - PARAMETER.put(PODCAST_BOX, new String[]{"Podcast Box"}); - PARAMETER.put(PODCAST_URL_BOX, new String[]{"Podcast URL Box"}); - PARAMETER.put(PURCHASE_DATE_BOX, new String[]{"Purchase Date Box"}); - PARAMETER.put(RELEASE_DATE_BOX, new String[]{"Release Date Box"}); - PARAMETER.put(TEMPO_BOX, new String[]{"Tempo Box"}); - PARAMETER.put(TRACK_NAME_BOX, new String[]{"Track Name Box"}); - PARAMETER.put(TRACK_NUMBER_BOX, new String[]{"Track Number Box"}); - PARAMETER.put(TRACK_SORT_BOX, new String[]{"Track Sort Box"}); - PARAMETER.put(TV_EPISODE_BOX, new String[]{"TV Episode Box"}); - PARAMETER.put(TV_EPISODE_NUMBER_BOX, new String[]{"TV Episode Number Box"}); - PARAMETER.put(TV_NETWORK_NAME_BOX, new String[]{"TV Network Name Box"}); - PARAMETER.put(TV_SEASON_BOX, new String[]{"TV Season Box"}); - PARAMETER.put(TV_SHOW_BOX, new String[]{"TV Show Box"}); - PARAMETER.put(TV_SHOW_SORT_BOX, new String[]{"TV Show Sort Box"}); - PARAMETER.put(THREE_GPP_AUTHOR_BOX, new String[]{"3GPP Author Box"}); - PARAMETER.put(THREE_GPP_CLASSIFICATION_BOX, new String[]{"3GPP Classification Box"}); - PARAMETER.put(THREE_GPP_DESCRIPTION_BOX, new String[]{"3GPP Description Box"}); - PARAMETER.put(THREE_GPP_PERFORMER_BOX, new String[]{"3GPP Performer Box"}); - PARAMETER.put(THREE_GPP_TITLE_BOX, new String[]{"3GPP Title Box"}); - PARAMETER.put(GOOGLE_HOST_HEADER_BOX, new String[]{"Google Host Header Box"}); - PARAMETER.put(GOOGLE_PING_MESSAGE_BOX, new String[]{"Google Ping Message Box"}); - PARAMETER.put(GOOGLE_PING_URL_BOX, new String[]{"Google Ping URL Box"}); - PARAMETER.put(GOOGLE_SOURCE_DATA_BOX, new String[]{"Google Source Data Box"}); - PARAMETER.put(GOOGLE_START_TIME_BOX, new String[]{"Google Start Time Box"}); - PARAMETER.put(GOOGLE_TRACK_DURATION_BOX, new String[]{"Google Track Duration Box"}); - PARAMETER.put(MP4V_SAMPLE_ENTRY, new String[]{"MPEG-4 Video Sample Entry"}); - PARAMETER.put(H263_SAMPLE_ENTRY, new String[]{"H263 Video Sample Entry"}); - PARAMETER.put(ENCRYPTED_VIDEO_SAMPLE_ENTRY, new String[]{"Encrypted Video Sample Entry"}); - PARAMETER.put(AVC_SAMPLE_ENTRY, new String[]{"AVC Video Sample Entry"}); - PARAMETER.put(MP4A_SAMPLE_ENTRY, new String[]{"MPEG- 4Audio Sample Entry"}); - PARAMETER.put(AC3_SAMPLE_ENTRY, new String[]{"AC-3 Audio Sample Entry"}); - PARAMETER.put(EAC3_SAMPLE_ENTRY, new String[]{"Extended AC-3 Audio Sample Entry"}); - PARAMETER.put(DRMS_SAMPLE_ENTRY, new String[]{"DRMS Audio Sample Entry"}); - PARAMETER.put(AMR_SAMPLE_ENTRY, new String[]{"AMR Audio Sample Entry"}); - PARAMETER.put(AMR_WB_SAMPLE_ENTRY, new String[]{"AMR-Wideband Audio Sample Entry"}); - PARAMETER.put(EVRC_SAMPLE_ENTRY, new String[]{"EVC Audio Sample Entry"}); - PARAMETER.put(QCELP_SAMPLE_ENTRY, new String[]{"QCELP Audio Sample Entry"}); - PARAMETER.put(SMV_SAMPLE_ENTRY, new String[]{"SMV Audio Sample Entry"}); - PARAMETER.put(ENCRYPTED_AUDIO_SAMPLE_ENTRY, new String[]{"Encrypted Audio Sample Entry"}); - PARAMETER.put(OMA_COVER_URI_BOX, new String[]{"OMA DRM Cover URI Box"}); - PARAMETER.put(OMA_DRM_CONTAINER_BOX, new String[]{"OMA DRM Container Box"}); - PARAMETER.put(OMA_ICON_URI_BOX, new String[]{"OMA DRM Icon URI Box"}); - PARAMETER.put(OMA_INFO_URL_BOX, new String[]{"OMA DRM Info URL Box"}); - PARAMETER.put(OMA_LYRICS_URI_BOX, new String[]{"OMA DRM Lyrics URI Box"}); - PARAMETER.put(OMA_MUTABLE_DRM_INFORMATION_BOX, new String[]{"OMA DRM Mutable DRM Information Box"}); - } + public static Box parseBox(Box parent, long offset, long size, long type, MP4Input in) throws IOException { - public static Box parseBox(Box parent, MP4InputStream in) throws IOException { - final long offset = in.getOffset(); + if (size == 1) + size = in.readBytes(8); - long size = in.readBytes(4); - long type = in.readBytes(4); - if(size==1) size = in.readBytes(8); - if(type==EXTENDED_TYPE) in.skipBytes(16); - LOGGER.finest("type: " + typeToString(type) + ", " + size); + if (type == EXTENDED_TYPE) + in.skipBytes(16); - //error protection - if(parent!=null) { - final long parentLeft = (parent.getOffset()+parent.getSize())-offset; - if(size>parentLeft) throw new IOException("error while decoding box '"+typeToString(type)+"' at offset "+offset+": box too large for parent"); - } +LOGGER.finest("type: " + typeToString(type) + ", " + size); - LOGGER.finest("type: " + typeToString(type)); - final BoxImpl box = forType(type, in.getOffset()); - box.setParams(parent, size, type, offset); - box.decode(in); + //error protection + if (parent != null) { + long parentLeft = (parent.getOffset() + parent.getSize()) - offset; + if (size > parentLeft) + throw new IOException("error while decoding box '" + typeToString(type) + "' at offset " + offset + ": box too large for parent"); + } - //if box doesn't contain data it only contains children - final Class cl = box.getClass(); - if(cl==BoxImpl.class||cl==FullBox.class) box.readChildren(in); + LOGGER.finest("type: " + typeToString(type)); + BoxImpl box = forType(type, in.getOffset()); + box.setParams(parent, size, type, offset); + box.decode(in); - //check bytes left - final long left = (box.getOffset()+box.getSize())-in.getOffset(); - if(left>0 - &&!(box instanceof MediaDataBox) - &&!(box instanceof UnknownBox) - &&!(box instanceof FreeSpaceBox)) LOGGER.log(Level.INFO, "bytes left after reading box {0}: left: {1}, offset: {2}", new Object[]{typeToString(type), left, in.getOffset()}); - else if(left<0) LOGGER.log(Level.SEVERE, "box {0} overread: {1} bytes, offset: {2}", new Object[]{typeToString(type), -left, in.getOffset()}); + //if box doesn't contain data it only contains children + Class cl = box.getClass(); + if (cl == BoxImpl.class || cl == FullBox.class) box.readChildren(in); - //if mdat found and no random access, don't skip - if(box.getType()!=MEDIA_DATA_BOX||in.hasRandomAccess()) in.skipBytes(left); - return box; - } + //check bytes left + long left = (box.getOffset() + box.getSize()) - in.getOffset(); + if (left > 0 + && !(box instanceof MediaDataBox) + && !(box instanceof UnknownBox) + && !(box instanceof FreeSpaceBox)) + LOGGER.log(Level.FINE, "bytes left after reading box {0}: left: {1}, offset: {2}", new Object[] {typeToString(type), left, in.getOffset()}); + else if (left < 0) + LOGGER.log(Level.SEVERE, "box {0} overread: {1} bytes, offset: {2}", new Object[] {typeToString(type), -left, in.getOffset()}); - //TODO: remove usages - public static Box parseBox(MP4InputStream in, Class boxClass) throws IOException { - final long offset = in.getOffset(); + //if mdat found and no random access, don't skip + if (box.getType() != MEDIA_DATA_BOX || in.hasRandomAccess()) in.skipBytes(left); + return box; + } - long size = in.readBytes(4); - long type = in.readBytes(4); - if(size==1) size = in.readBytes(8); - if(type==EXTENDED_TYPE) in.skipBytes(16); + // TODO: remove usages + public static Box parseBox(MP4InputStream in, Class boxClass) throws IOException { + long offset = in.getOffset(); - BoxImpl box = null; - try { - box = boxClass.newInstance(); - } - catch(InstantiationException e) { - } - catch(IllegalAccessException e) { - } + long size = in.readBytes(4); + long type = in.readBytes(4); + if (size == 1) size = in.readBytes(8); + if (type == EXTENDED_TYPE) in.skipBytes(16); - if(box!=null) { - box.setParams(null, size, type, offset); - box.decode(in); - final long left = (box.getOffset()+box.getSize())-in.getOffset(); - in.skipBytes(left); - } - return box; - } + BoxImpl box = null; + try { + box = boxClass.newInstance(); + } catch (InstantiationException | IllegalAccessException e) { + } - private static BoxImpl forType(long type, long offset) { - BoxImpl box = null; + if (box != null) { + box.setParams(null, size, type, offset); + box.decode(in); + long left = (box.getOffset() + box.getSize()) - in.getOffset(); + in.skipBytes(left); + } + return box; + } - final Long l = Long.valueOf(type); - if(BOX_CLASSES.containsKey(l)) { - Class cl = BOX_CLASSES.get(l); - if(PARAMETER.containsKey(l)) { - final String[] s = PARAMETER.get(l); - try { - Constructor con = cl.getConstructor(String.class); - box = con.newInstance(s[0]); - } - catch(Exception e) { - LOGGER.log(Level.SEVERE, "BoxFactory: could not call constructor for "+typeToString(type), e); - box = new UnknownBox(); - } - } - else { - try { - box = cl.newInstance(); - } - catch(Exception e) { - LOGGER.log(Level.SEVERE, "BoxFactory: could not instantiate box "+typeToString(type), e); - } - } - } + private static BoxImpl forType(long type, long offset) { + BoxImpl box = null; - if(box==null) { - LOGGER.log(Level.INFO, "BoxFactory: unknown box type: {0}; position: {1}", new Object[]{typeToString(type), offset}); - box = new UnknownBox(); - } - return box; - } + Long l = type; + if (BOX_CLASSES.containsKey(l)) { + Class cl = BOX_CLASSES.get(l); + if (PARAMETER.containsKey(l)) { + String[] s = PARAMETER.get(l); + try { + Constructor con = cl.getConstructor(String.class); + box = con.newInstance(s[0]); + } catch (Exception e) { + LOGGER.log(Level.SEVERE, "BoxFactory: could not call constructor for " + typeToString(type), e); + box = new UnknownBox(); + } + } else { + try { + box = cl.newInstance(); + } catch (Exception e) { + LOGGER.log(Level.SEVERE, "BoxFactory: could not instantiate box " + typeToString(type), e); + } + } + } + + if (box == null) { + LOGGER.log(Level.FINE, "BoxFactory: unknown box type: {0}; position: {1}", new Object[] {typeToString(type), offset}); + box = new UnknownBox(); + } + return box; + } - public static String typeToString(long l) { - byte[] b = new byte[4]; - b[0] = (byte) ((l>>24)&0xFF); - b[1] = (byte) ((l>>16)&0xFF); - b[2] = (byte) ((l>>8)&0xFF); - b[3] = (byte) (l&0xFF); - return new String(b); - } + public static String typeToString(long l) { + // convert bytes to char directly + // first utf16 page is ISO 8859 + byte[] b = new byte[4]; + b[0] = (byte) ((l >> 24) & 0xFF); + b[1] = (byte) ((l >> 16) & 0xFF); + b[2] = (byte) ((l >> 8) & 0xFF); + b[3] = (byte) (l & 0xFF); + return new String(b); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxImpl.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxImpl.java index 5a7e1476..640749a1 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxImpl.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxImpl.java @@ -4,119 +4,126 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; + public class BoxImpl implements Box { - private final String name; - protected long size, type, offset; - protected Box parent; - protected final List children; - - public BoxImpl(String name) { - this.name = name; - - children = new ArrayList(4); - } - - public void setParams(Box parent, long size, long type, long offset) { - this.size = size; - this.type = type; - this.parent = parent; - this.offset = offset; - } - - protected long getLeft(MP4InputStream in) throws IOException { - return (offset+size)-in.getOffset(); - } - - /** - * Decodes the given input stream by reading this box and all of its - * children (if any). - * - * @param in an input stream - * @throws IOException if an error occurs while reading - */ - public void decode(MP4InputStream in) throws IOException { - } - - public long getType() { - return type; - } - - public long getSize() { - return size; - } - - public long getOffset() { - return offset; - } - - public Box getParent() { - return parent; - } - - public String getName() { - return name; - } - - @Override - public String toString() { - return name+" ["+BoxFactory.typeToString(type)+"]"; - } - - //container methods - public boolean hasChildren() { - return children.size()>0; - } - - public boolean hasChild(long type) { - boolean b = false; - for(Box box : children) { - if(box.getType()==type) { - b = true; - break; - } - } - return b; - } - - public Box getChild(long type) { - Box box = null, b = null; - int i = 0; - while(box==null&&i getChildren() { - return Collections.unmodifiableList(children); - } - - public List getChildren(long type) { - List l = new ArrayList(); - for(Box box : children) { - if(box.getType()==type) l.add(box); - } - return l; - } - - protected void readChildren(MP4InputStream in) throws IOException { - Box box; - while(in.getOffset()<(offset+size)) { - box = BoxFactory.parseBox(this, in); - children.add(box); - } - } - - protected void readChildren(MP4InputStream in, int len) throws IOException { - Box box; - for(int i = 0; i children; + + public BoxImpl(String name) { + this.name = name; + + children = new ArrayList<>(4); + } + + public void setParams(Box parent, long size, long type, long offset) { + this.size = size; + this.type = type; + this.parent = parent; + this.offset = offset; + } + + protected long getLeft(MP4Input in) throws IOException { + return (offset + size) - in.getOffset(); + } + + /** + * Decodes the given input stream by reading this box and all of its + * children (if any). + * + * @param in an input stream + * @throws IOException if an error occurs while reading + */ + public void decode(MP4Input in) throws IOException { + } + + public long getType() { + return type; + } + + public long getSize() { + return size; + } + + public long getOffset() { + return offset; + } + + public Box getParent() { + return parent; + } + + public String getName() { + return name; + } + + @Override + public String toString() { + return name + " [" + BoxFactory.typeToString(type) + "]"; + } + + //container methods + public boolean hasChildren() { + return children.size() > 0; + } + + public boolean hasChild(long type) { + boolean b = false; + for (Box box : children) { + if (box.getType() == type) { + b = true; + break; + } + } + return b; + } + + public Box getChild(long type) { + Box box = null, b = null; + int i = 0; + while (box == null && i < children.size()) { + b = children.get(i); + if (b.getType() == type) box = b; + i++; + } + return box; + } + + public List getChildren() { + return Collections.unmodifiableList(children); + } + + public List getChildren(long type) { + List l = new ArrayList<>(); + for (Box box : children) { + if (box.getType() == type) + l.add(box); + } + return l; + } + + protected Box parseBox(MP4Input in) throws IOException { + return BoxFactory.parseBox(this, in); + } + + protected void readChildren(MP4Input in) throws IOException { + Box box; + while (in.getOffset() < (offset + size)) { + box = BoxFactory.parseBox(this, in); + children.add(box); + } + } + + protected void readChildren(MP4Input in, int len) throws IOException { + Box box; + for (int i = 0; i < len; i++) { + box = BoxFactory.parseBox(this, in); + children.add(box); + } + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxTypes.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxTypes.java index 5e757b49..fee2aa9f 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxTypes.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/BoxTypes.java @@ -1,219 +1,224 @@ package net.sourceforge.jaad.mp4.boxes; +import java.util.logging.Logger; + + public interface BoxTypes { - long EXTENDED_TYPE = 1970628964; //uuid - //standard boxes (ISO BMFF) - long ADDITIONAL_METADATA_CONTAINER_BOX = 1835361135l; //meco - long APPLE_LOSSLESS_BOX = 1634492771l; //alac - long BINARY_XML_BOX = 1652059500l; //bxml - long BIT_RATE_BOX = 1651798644l; //btrt - long CHAPTER_BOX = 1667788908l; //chpl - long CHUNK_OFFSET_BOX = 1937007471l; //stco - long CHUNK_LARGE_OFFSET_BOX = 1668232756l; //co64 - long CLEAN_APERTURE_BOX = 1668047216l; //clap - long COMPACT_SAMPLE_SIZE_BOX = 1937013298l; //stz2 - long COMPOSITION_TIME_TO_SAMPLE_BOX = 1668576371l; //ctts - long COPYRIGHT_BOX = 1668313716l; //cprt - long DATA_ENTRY_URN_BOX = 1970433568l; //urn - long DATA_ENTRY_URL_BOX = 1970433056l; //url - long DATA_INFORMATION_BOX = 1684631142l; //dinf - long DATA_REFERENCE_BOX = 1685218662l; //dref - long DECODING_TIME_TO_SAMPLE_BOX = 1937011827l; //stts - long DEGRADATION_PRIORITY_BOX = 1937007728l; //stdp - long EDIT_BOX = 1701082227l; //edts - long EDIT_LIST_BOX = 1701606260l; //elst - long FD_ITEM_INFORMATION_BOX = 1718184302l; //fiin - long FD_SESSION_GROUP_BOX = 1936025458l; //segr - long FEC_RESERVOIR_BOX = 1717920626l; //fecr - long FILE_PARTITION_BOX = 1718641010l; //fpar - long FILE_TYPE_BOX = 1718909296l; //ftyp - long FREE_SPACE_BOX = 1718773093l; //free - long GROUP_ID_TO_NAME_BOX = 1734964334l; //gitn - long HANDLER_BOX = 1751411826l; //hdlr - long HINT_MEDIA_HEADER_BOX = 1752000612l; //hmhd - long IPMP_CONTROL_BOX = 1768975715l; //ipmc - long IPMP_INFO_BOX = 1768778086l; //imif - long ITEM_INFORMATION_BOX = 1768517222l; //iinf - long ITEM_INFORMATION_ENTRY = 1768842853l; //infe - long ITEM_LOCATION_BOX = 1768714083l; //iloc - long ITEM_PROTECTION_BOX = 1768977007l; //ipro - long MEDIA_BOX = 1835297121l; //mdia - long MEDIA_DATA_BOX = 1835295092l; //mdat - long MEDIA_HEADER_BOX = 1835296868l; //mdhd - long MEDIA_INFORMATION_BOX = 1835626086l; //minf - long META_BOX = 1835365473l; //meta - long META_BOX_RELATION_BOX = 1835364965l; //mere - long MOVIE_BOX = 1836019574l; //moov - long MOVIE_EXTENDS_BOX = 1836475768l; //mvex - long MOVIE_EXTENDS_HEADER_BOX = 1835362404l; //mehd - long MOVIE_FRAGMENT_BOX = 1836019558l; //moof - long MOVIE_FRAGMENT_HEADER_BOX = 1835427940l; //mfhd - long MOVIE_FRAGMENT_RANDOM_ACCESS_BOX = 1835430497l; //mfra - long MOVIE_FRAGMENT_RANDOM_ACCESS_OFFSET_BOX = 1835430511l; //mfro - long MOVIE_HEADER_BOX = 1836476516l; //mvhd - long NERO_METADATA_TAGS_BOX = 1952540531l; //tags - long NULL_MEDIA_HEADER_BOX = 1852663908l; //nmhd - long ORIGINAL_FORMAT_BOX = 1718775137l; //frma - long PADDING_BIT_BOX = 1885430882l; //padb - long PARTITION_ENTRY = 1885431150l; //paen - long PIXEL_ASPECT_RATIO_BOX = 1885434736l; //pasp - long PRIMARY_ITEM_BOX = 1885959277l; //pitm - long PROGRESSIVE_DOWNLOAD_INFORMATION_BOX = 1885628782l; //pdin - long PROTECTION_SCHEME_INFORMATION_BOX = 1936289382l; //sinf - long SAMPLE_DEPENDENCY_TYPE_BOX = 1935963248l; //sdtp - long SAMPLE_DESCRIPTION_BOX = 1937011556l; //stsd - long SAMPLE_GROUP_DESCRIPTION_BOX = 1936158820l; //sgpd - long SAMPLE_SCALE_BOX = 1937011564l; //stsl - long SAMPLE_SIZE_BOX = 1937011578l; //stsz - long SAMPLE_TABLE_BOX = 1937007212l; //stbl - long SAMPLE_TO_CHUNK_BOX = 1937011555l; //stsc - long SAMPLE_TO_GROUP_BOX = 1935828848l; //sbgp - long SCHEME_TYPE_BOX = 1935894637l; //schm - long SCHEME_INFORMATION_BOX = 1935894633l; //schi - long SHADOW_SYNC_SAMPLE_BOX = 1937011560l; //stsh - long SKIP_BOX = 1936419184l; //skip - long SOUND_MEDIA_HEADER_BOX = 1936549988l; //smhd - long SUB_SAMPLE_INFORMATION_BOX = 1937072755l; //subs - long SYNC_SAMPLE_BOX = 1937011571l; //stss - long TRACK_BOX = 1953653099l; //trak - long TRACK_EXTENDS_BOX = 1953654136l; //trex - long TRACK_FRAGMENT_BOX = 1953653094l; //traf - long TRACK_FRAGMENT_HEADER_BOX = 1952868452l; //tfhd - long TRACK_FRAGMENT_RANDOM_ACCESS_BOX = 1952871009l; //tfra - long TRACK_FRAGMENT_RUN_BOX = 1953658222l; //trun - long TRACK_HEADER_BOX = 1953196132l; //tkhd - long TRACK_REFERENCE_BOX = 1953654118l; //tref - long TRACK_SELECTION_BOX = 1953719660l; //tsel - long USER_DATA_BOX = 1969517665l; //udta - long VIDEO_MEDIA_HEADER_BOX = 1986881636l; //vmhd - long WIDE_BOX = 2003395685l; //wide - long XML_BOX = 2020437024l; //xml - //mp4 extension - long OBJECT_DESCRIPTOR_BOX = 1768907891l; //iods - long SAMPLE_DEPENDENCY_BOX = 1935959408l; //sdep - //metadata: id3 - long ID3_TAG_BOX = 1768174386l; //id32 - //metadata: itunes - long ITUNES_META_LIST_BOX = 1768715124l; //ilst - long CUSTOM_ITUNES_METADATA_BOX = 757935405l; //---- - long ITUNES_METADATA_BOX = 1684108385l; //data - long ITUNES_METADATA_NAME_BOX = 1851878757l; //name - long ITUNES_METADATA_MEAN_BOX = 1835360622l; //mean - long ALBUM_ARTIST_NAME_BOX = 1631670868l; //aART - long ALBUM_ARTIST_SORT_BOX = 1936679265l; //soaa - long ALBUM_NAME_BOX = 2841734242l; //Šalb - long ALBUM_SORT_BOX = 1936679276l; //soal - long ARTIST_NAME_BOX = 2839630420l; //ŠART - long ARTIST_SORT_BOX = 1936679282l; //soar - long CATEGORY_BOX = 1667331175l; //catg - long COMMENTS_BOX = 2841865588l; //Šcmt - long COMPILATION_PART_BOX = 1668311404l; //cpil - long COMPOSER_NAME_BOX = 2843177588l; //Šwrt - long COMPOSER_SORT_BOX = 1936679791l; //soco - long COVER_BOX = 1668249202l; //covr - long CUSTOM_GENRE_BOX = 2842125678l; //Šgen - long DESCRIPTION_BOX = 1684370275l; //desc - long DISK_NUMBER_BOX = 1684632427l; //disk - long ENCODER_NAME_BOX = 2841996899l; //Šenc - long ENCODER_TOOL_BOX = 2842980207l; //Štoo - long EPISODE_GLOBAL_UNIQUE_ID_BOX = 1701276004l; //egid - long GAPLESS_PLAYBACK_BOX = 1885823344l; //pgap - long GENRE_BOX = 1735291493l; //gnre - long GROUPING_BOX = 2842129008l; //Šgrp - long HD_VIDEO_BOX = 1751414372l; //hdvd - long ITUNES_PURCHASE_ACCOUNT_BOX = 1634748740l; //apID - long ITUNES_ACCOUNT_TYPE_BOX = 1634421060l; //akID - long ITUNES_CATALOGUE_ID_BOX = 1668172100l; //cnID - long ITUNES_COUNTRY_CODE_BOX = 1936083268l; //sfID - long KEYWORD_BOX = 1801812343l; //keyw - long LONG_DESCRIPTION_BOX = 1818518899l; //ldes - long LYRICS_BOX = 2842458482l; //Šlyr - long META_TYPE_BOX = 1937009003l; //stik - long PODCAST_BOX = 1885565812l; //pcst - long PODCAST_URL_BOX = 1886745196l; //purl - long PURCHASE_DATE_BOX = 1886745188l; //purd - long RATING_BOX = 1920233063l; //rtng - long RELEASE_DATE_BOX = 2841928057l; //Šday - long REQUIREMENT_BOX = 2842846577l; //Šreq - long TEMPO_BOX = 1953329263l; //tmpo - long TRACK_NAME_BOX = 2842583405l; //Šnam - long TRACK_NUMBER_BOX = 1953655662l; //trkn - long TRACK_SORT_BOX = 1936682605l; //sonm - long TV_EPISODE_BOX = 1953916275l; //tves - long TV_EPISODE_NUMBER_BOX = 1953916270l; //tven - long TV_NETWORK_NAME_BOX = 1953918574l; //tvnn - long TV_SEASON_BOX = 1953919854l; //tvsn - long TV_SHOW_BOX = 1953919848l; //tvsh - long TV_SHOW_SORT_BOX = 1936683886l; //sosn - //metadata: 3gpp - long THREE_GPP_ALBUM_BOX = 1634493037l; //albm - long THREE_GPP_AUTHOR_BOX = 1635087464l; //auth - long THREE_GPP_CLASSIFICATION_BOX = 1668051814l; //clsf - long THREE_GPP_DESCRIPTION_BOX = 1685283696l; //dscp - long THREE_GPP_KEYWORDS_BOX = 1803122532l; //kywd - long THREE_GPP_LOCATION_INFORMATION_BOX = 1819239273l; //loci - long THREE_GPP_PERFORMER_BOX = 1885696614l; //perf - long THREE_GPP_RECORDING_YEAR_BOX = 2037543523l; //yrrc - long THREE_GPP_TITLE_BOX = 1953068140l; //titl - //metadata: google/youtube - long GOOGLE_HOST_HEADER_BOX = 1735616616l; //gshh - long GOOGLE_PING_MESSAGE_BOX = 1735618669l; //gspm - long GOOGLE_PING_URL_BOX = 1735618677l; //gspu - long GOOGLE_SOURCE_DATA_BOX = 1735619428l; //gssd - long GOOGLE_START_TIME_BOX = 1735619444l; //gsst - long GOOGLE_TRACK_DURATION_BOX = 1735619684l; //gstd - //sample entries - long MP4V_SAMPLE_ENTRY = 1836070006l; //mp4v - long H263_SAMPLE_ENTRY = 1932670515l; //s263 - long ENCRYPTED_VIDEO_SAMPLE_ENTRY = 1701733238l; //encv - long AVC_SAMPLE_ENTRY = 1635148593l; //avc1 - long MP4A_SAMPLE_ENTRY = 1836069985l; //mp4a - long AC3_SAMPLE_ENTRY = 1633889587l; //ac-3 - long EAC3_SAMPLE_ENTRY = 1700998451l; //ec-3 - long DRMS_SAMPLE_ENTRY = 1685220723l; //drms - long AMR_SAMPLE_ENTRY = 1935764850l; //samr - long AMR_WB_SAMPLE_ENTRY = 1935767394l; //sawb - long EVRC_SAMPLE_ENTRY = 1936029283l; //sevc - long QCELP_SAMPLE_ENTRY = 1936810864l; //sqcp - long SMV_SAMPLE_ENTRY = 1936944502l; //ssmv - long ENCRYPTED_AUDIO_SAMPLE_ENTRY = 1701733217l; //enca - long MPEG_SAMPLE_ENTRY = 1836070003l; //mp4s - long TEXT_METADATA_SAMPLE_ENTRY = 1835365492l; //mett - long XML_METADATA_SAMPLE_ENTRY = 1835365496l; //metx - long RTP_HINT_SAMPLE_ENTRY = 1920233504l; //rtp - long FD_HINT_SAMPLE_ENTRY = 1717858336l; //fdp - //codec infos - long ESD_BOX = 1702061171l; //esds - //video codecs - long H263_SPECIFIC_BOX = 1681012275l; //d263 - long AVC_SPECIFIC_BOX = 1635148611l; //avcC - //audio codecs - long AC3_SPECIFIC_BOX = 1684103987l; //dac3 - long EAC3_SPECIFIC_BOX = 1684366131l; //dec3 - long AMR_SPECIFIC_BOX = 1684106610l; //damr - long EVRC_SPECIFIC_BOX = 1684371043l; //devc - long QCELP_SPECIFIC_BOX = 1685152624l; //dqcp - long SMV_SPECIFIC_BOX = 1685286262l; //dsmv - //OMA DRM - long OMA_ACCESS_UNIT_FORMAT_BOX = 1868849510l; //odaf - long OMA_COMMON_HEADERS_BOX = 1869112434l; //ohdr - long OMA_CONTENT_ID_BOX = 1667459428l; //ccid - long OMA_CONTENT_OBJECT_BOX = 1868850273l; //odda - long OMA_COVER_URI_BOX = 1668706933l; //cvru - long OMA_DISCRETE_MEDIA_HEADERS_BOX = 1868851301l; //odhe - long OMA_DRM_CONTAINER_BOX = 1868853869l; //odrm - long OMA_ICON_URI_BOX = 1768124021l; //icnu - long OMA_INFO_URL_BOX = 1768842869l; //infu - long OMA_LYRICS_URI_BOX = 1819435893l; //lrcu - long OMA_MUTABLE_DRM_INFORMATION_BOX = 1835299433l; //mdri - long OMA_KEY_MANAGEMENT_BOX = 1868852077l; //odkm - long OMA_RIGHTS_OBJECT_BOX = 1868853858l; //odrb - long OMA_TRANSACTION_TRACKING_BOX = 1868854388l; //odtt - //iTunes DRM (FairPlay) - long FAIRPLAY_USER_ID_BOX = 1970496882l; //user - long FAIRPLAY_USER_NAME_BOX = 1851878757l; //name - long FAIRPLAY_USER_KEY_BOX = 1801812256l; //key - long FAIRPLAY_IV_BOX = 1769367926l; //iviv - long FAIRPLAY_PRIVATE_KEY_BOX = 1886546294l; //priv + Logger LOGGER = Logger.getLogger(BoxTypes.class.getName()); + + long EXTENDED_TYPE = 1970628964; //uuid + //standard boxes (ISO BMFF) + long ADDITIONAL_METADATA_CONTAINER_BOX = 1835361135L; //meco + long APPLE_LOSSLESS_BOX = 1634492771L; //alac + long BINARY_XML_BOX = 1652059500L; //bxml + long BIT_RATE_BOX = 1651798644L; //btrt + long CHAPTER_BOX = 1667788908L; //chpl + long CHUNK_OFFSET_BOX = 1937007471L; //stco + long CHUNK_LARGE_OFFSET_BOX = 1668232756L; //co64 + long CLEAN_APERTURE_BOX = 1668047216L; //clap + long COMPACT_SAMPLE_SIZE_BOX = 1937013298L; //stz2 + long COMPOSITION_TIME_TO_SAMPLE_BOX = 1668576371L; //ctts + long COPYRIGHT_BOX = 1668313716L; //cprt + long DATA_ENTRY_URN_BOX = 1970433568L; //urn + long DATA_ENTRY_URL_BOX = 1970433056L; //url + long DATA_INFORMATION_BOX = 1684631142L; //dinf + long DATA_REFERENCE_BOX = 1685218662L; //dref + long DECODING_TIME_TO_SAMPLE_BOX = 1937011827L; //stts + long DEGRADATION_PRIORITY_BOX = 1937007728L; //stdp + long EDIT_BOX = 1701082227L; //edts + long EDIT_LIST_BOX = 1701606260L; //elst + long FD_ITEM_INFORMATION_BOX = 1718184302L; //fiin + long FD_SESSION_GROUP_BOX = 1936025458L; //segr + long FEC_RESERVOIR_BOX = 1717920626L; //fecr + long FILE_PARTITION_BOX = 1718641010L; //fpar + long FILE_TYPE_BOX = 1718909296L; //ftyp + long FREE_SPACE_BOX = 1718773093L; //free + long GROUP_ID_TO_NAME_BOX = 1734964334L; //gitn + long HANDLER_BOX = 1751411826L; //hdlr + long HINT_MEDIA_HEADER_BOX = 1752000612L; //hmhd + long IPMP_CONTROL_BOX = 1768975715L; //ipmc + long IPMP_INFO_BOX = 1768778086L; //imif + long ITEM_INFORMATION_BOX = 1768517222L; //iinf + long ITEM_INFORMATION_ENTRY = 1768842853L; //infe + long ITEM_LOCATION_BOX = 1768714083L; //iloc + long ITEM_PROTECTION_BOX = 1768977007L; //ipro + long MEDIA_BOX = 1835297121L; //mdia + long MEDIA_DATA_BOX = 1835295092L; //mdat + long MEDIA_HEADER_BOX = 1835296868L; //mdhd + long MEDIA_INFORMATION_BOX = 1835626086L; //minf + long META_BOX = 1835365473L; //meta + long META_BOX_RELATION_BOX = 1835364965L; //mere + long MOVIE_BOX = 1836019574L; //moov + long MOVIE_EXTENDS_BOX = 1836475768L; //mvex + long MOVIE_EXTENDS_HEADER_BOX = 1835362404L; //mehd + long MOVIE_FRAGMENT_BOX = 1836019558L; //moof + long MOVIE_FRAGMENT_HEADER_BOX = 1835427940L; //mfhd + long MOVIE_FRAGMENT_RANDOM_ACCESS_BOX = 1835430497L; //mfra + long MOVIE_FRAGMENT_RANDOM_ACCESS_OFFSET_BOX = 1835430511L; //mfro + long MOVIE_HEADER_BOX = 1836476516L; //mvhd + long NERO_METADATA_TAGS_BOX = 1952540531L; //tags + long NULL_MEDIA_HEADER_BOX = 1852663908L; //nmhd + long ORIGINAL_FORMAT_BOX = 1718775137L; //frma + long PADDING_BIT_BOX = 1885430882L; //padb + long PARTITION_ENTRY = 1885431150L; //paen + long PIXEL_ASPECT_RATIO_BOX = 1885434736L; //pasp + long PRIMARY_ITEM_BOX = 1885959277L; //pitm + long PROGRESSIVE_DOWNLOAD_INFORMATION_BOX = 1885628782L; //pdin + long PROTECTION_SCHEME_INFORMATION_BOX = 1936289382L; //sinf + long SAMPLE_DEPENDENCY_TYPE_BOX = 1935963248L; //sdtp + long SAMPLE_DESCRIPTION_BOX = 1937011556L; //stsd + long SAMPLE_GROUP_DESCRIPTION_BOX = 1936158820L; //sgpd + long SAMPLE_SCALE_BOX = 1937011564L; //stsl + long SAMPLE_SIZE_BOX = 1937011578L; //stsz + long SAMPLE_TABLE_BOX = 1937007212L; //stbl + long SAMPLE_TO_CHUNK_BOX = 1937011555L; //stsc + long SAMPLE_TO_GROUP_BOX = 1935828848L; //sbgp + long SCHEME_TYPE_BOX = 1935894637L; //schm + long SCHEME_INFORMATION_BOX = 1935894633L; //schi + long SHADOW_SYNC_SAMPLE_BOX = 1937011560L; //stsh + long SKIP_BOX = 1936419184L; //skip + long SOUND_MEDIA_HEADER_BOX = 1936549988L; //smhd + long SUB_SAMPLE_INFORMATION_BOX = 1937072755L; //subs + long SYNC_SAMPLE_BOX = 1937011571L; //stss + long TRACK_BOX = 1953653099L; //trak + long TRACK_EXTENDS_BOX = 1953654136L; //trex + long TRACK_FRAGMENT_BOX = 1953653094L; //traf + long TRACK_FRAGMENT_HEADER_BOX = 1952868452L; //tfhd + long TRACK_FRAGMENT_RANDOM_ACCESS_BOX = 1952871009L; //tfra + long TRACK_FRAGMENT_RUN_BOX = 1953658222L; //trun + long TRACK_HEADER_BOX = 1953196132L; //tkhd + long TRACK_REFERENCE_BOX = 1953654118L; //tref + long TRACK_SELECTION_BOX = 1953719660L; //tsel + long USER_DATA_BOX = 1969517665L; //udta + long VIDEO_MEDIA_HEADER_BOX = 1986881636L; //vmhd + long WIDE_BOX = 2003395685L; //wide + long XML_BOX = 2020437024L; //xml + //mp4 extension + long OBJECT_DESCRIPTOR_BOX = 1768907891L; //iods + long SAMPLE_DEPENDENCY_BOX = 1935959408L; //sdep + //metadata: id3 + long ID3_TAG_BOX = 1768174386L; //id32 + //metadata: itunes + long ITUNES_META_LIST_BOX = 1768715124L; //ilst + long CUSTOM_ITUNES_METADATA_BOX = 757935405L; //---- + long ITUNES_METADATA_BOX = 1684108385L; //data + long ITUNES_METADATA_NAME_BOX = 1851878757L; //name + long ITUNES_METADATA_MEAN_BOX = 1835360622L; //mean + long ALBUM_ARTIST_NAME_BOX = 1631670868L; //aART + long ALBUM_ARTIST_SORT_BOX = 1936679265L; //soaa + long ALBUM_NAME_BOX = 2841734242L; //Šalb + long ALBUM_SORT_BOX = 1936679276L; //soal + long ARTIST_NAME_BOX = 2839630420L; //ŠART + long ARTIST_SORT_BOX = 1936679282L; //soar + long CATEGORY_BOX = 1667331175L; //catg + long COMMENTS_BOX = 2841865588L; //Šcmt + long COMPILATION_PART_BOX = 1668311404L; //cpil + long COMPOSER_NAME_BOX = 2843177588L; //Šwrt + long COMPOSER_SORT_BOX = 1936679791L; //soco + long COVER_BOX = 1668249202L; //covr + long CUSTOM_GENRE_BOX = 2842125678L; //Šgen + long DESCRIPTION_BOX = 1684370275L; //desc + long DISK_NUMBER_BOX = 1684632427L; //disk + long ENCODER_NAME_BOX = 2841996899L; //Šenc + long ENCODER_TOOL_BOX = 2842980207L; //Štoo + long EPISODE_GLOBAL_UNIQUE_ID_BOX = 1701276004L; //egid + long GAPLESS_PLAYBACK_BOX = 1885823344L; //pgap + long GENRE_BOX = 1735291493L; //gnre + long GROUPING_BOX = 2842129008L; //Šgrp + long HD_VIDEO_BOX = 1751414372L; //hdvd + long ITUNES_PURCHASE_ACCOUNT_BOX = 1634748740L; //apID + long ITUNES_ACCOUNT_TYPE_BOX = 1634421060L; //akID + long ITUNES_CATALOGUE_ID_BOX = 1668172100L; //cnID + long ITUNES_COUNTRY_CODE_BOX = 1936083268L; //sfID + long KEYWORD_BOX = 1801812343L; //keyw + long LONG_DESCRIPTION_BOX = 1818518899L; //ldes + long LYRICS_BOX = 2842458482L; //Šlyr + long META_TYPE_BOX = 1937009003L; //stik + long PODCAST_BOX = 1885565812L; //pcst + long PODCAST_URL_BOX = 1886745196L; //purl + long PURCHASE_DATE_BOX = 1886745188L; //purd + long RATING_BOX = 1920233063L; //rtng + long RELEASE_DATE_BOX = 2841928057L; //Šday + long REQUIREMENT_BOX = 2842846577L; //Šreq + long TEMPO_BOX = 1953329263L; //tmpo + long TRACK_NAME_BOX = 2842583405L; //Šnam + long TRACK_NUMBER_BOX = 1953655662L; //trkn + long TRACK_SORT_BOX = 1936682605L; //sonm + long TV_EPISODE_BOX = 1953916275L; //tves + long TV_EPISODE_NUMBER_BOX = 1953916270L; //tven + long TV_NETWORK_NAME_BOX = 1953918574L; //tvnn + long TV_SEASON_BOX = 1953919854L; //tvsn + long TV_SHOW_BOX = 1953919848L; //tvsh + long TV_SHOW_SORT_BOX = 1936683886L; //sosn + //metadata: 3gpp + long THREE_GPP_ALBUM_BOX = 1634493037L; //albm + long THREE_GPP_AUTHOR_BOX = 1635087464L; //auth + long THREE_GPP_CLASSIFICATION_BOX = 1668051814L; //clsf + long THREE_GPP_DESCRIPTION_BOX = 1685283696L; //dscp + long THREE_GPP_KEYWORDS_BOX = 1803122532L; //kywd + long THREE_GPP_LOCATION_INFORMATION_BOX = 1819239273L; //loci + long THREE_GPP_PERFORMER_BOX = 1885696614L; //perf + long THREE_GPP_RECORDING_YEAR_BOX = 2037543523L; //yrrc + long THREE_GPP_TITLE_BOX = 1953068140L; //titl + //metadata: google/youtube + long GOOGLE_HOST_HEADER_BOX = 1735616616L; //gshh + long GOOGLE_PING_MESSAGE_BOX = 1735618669L; //gspm + long GOOGLE_PING_URL_BOX = 1735618677L; //gspu + long GOOGLE_SOURCE_DATA_BOX = 1735619428L; //gssd + long GOOGLE_START_TIME_BOX = 1735619444L; //gsst + long GOOGLE_TRACK_DURATION_BOX = 1735619684L; //gstd + //sample entries + long MP4V_SAMPLE_ENTRY = 1836070006L; //mp4v + long H263_SAMPLE_ENTRY = 1932670515L; //s263 + long ENCRYPTED_VIDEO_SAMPLE_ENTRY = 1701733238L; //encv + long AVC_SAMPLE_ENTRY = 1635148593L; //avc1 + long MP4A_SAMPLE_ENTRY = 1836069985L; //mp4a + long AC3_SAMPLE_ENTRY = 1633889587L; //ac-3 + long EAC3_SAMPLE_ENTRY = 1700998451L; //ec-3 + long DRMS_SAMPLE_ENTRY = 1685220723L; //drms + long AMR_SAMPLE_ENTRY = 1935764850L; //samr + long AMR_WB_SAMPLE_ENTRY = 1935767394L; //sawb + long EVRC_SAMPLE_ENTRY = 1936029283L; //sevc + long QCELP_SAMPLE_ENTRY = 1936810864L; //sqcp + long SMV_SAMPLE_ENTRY = 1936944502L; //ssmv + long ENCRYPTED_AUDIO_SAMPLE_ENTRY = 1701733217L; //enca + long MPEG_SAMPLE_ENTRY = 1836070003L; //mp4s + long TEXT_METADATA_SAMPLE_ENTRY = 1835365492L; //mett + long XML_METADATA_SAMPLE_ENTRY = 1835365496L; //metx + long RTP_HINT_SAMPLE_ENTRY = 1920233504L; //rtp + long FD_HINT_SAMPLE_ENTRY = 1717858336L; //fdp + //codec infos + long ESD_BOX = 1702061171L; //esds + //video codecs + long H263_SPECIFIC_BOX = 1681012275L; //d263 + long AVC_SPECIFIC_BOX = 1635148611L; //avcC + //audio codecs + long AC3_SPECIFIC_BOX = 1684103987L; //dac3 + long EAC3_SPECIFIC_BOX = 1684366131L; //dec3 + long AMR_SPECIFIC_BOX = 1684106610L; //damr + long EVRC_SPECIFIC_BOX = 1684371043L; //devc + long QCELP_SPECIFIC_BOX = 1685152624L; //dqcp + long SMV_SPECIFIC_BOX = 1685286262L; //dsmv + //OMA DRM + long OMA_ACCESS_UNIT_FORMAT_BOX = 1868849510L; //odaf + long OMA_COMMON_HEADERS_BOX = 1869112434L; //ohdr + long OMA_CONTENT_ID_BOX = 1667459428L; //ccid + long OMA_CONTENT_OBJECT_BOX = 1868850273L; //odda + long OMA_COVER_URI_BOX = 1668706933L; //cvru + long OMA_DISCRETE_MEDIA_HEADERS_BOX = 1868851301L; //odhe + long OMA_DRM_CONTAINER_BOX = 1868853869L; //odrm + long OMA_ICON_URI_BOX = 1768124021L; //icnu + long OMA_INFO_URL_BOX = 1768842869L; //infu + long OMA_LYRICS_URI_BOX = 1819435893L; //lrcu + long OMA_MUTABLE_DRM_INFORMATION_BOX = 1835299433L; //mdri + long OMA_KEY_MANAGEMENT_BOX = 1868852077L; //odkm + long OMA_RIGHTS_OBJECT_BOX = 1868853858L; //odrb + long OMA_TRANSACTION_TRACKING_BOX = 1868854388L; //odtt + //iTunes DRM (FairPlay) + long FAIRPLAY_USER_ID_BOX = 1970496882L; //user + long FAIRPLAY_USER_NAME_BOX = 1851878757L; //name + long FAIRPLAY_USER_KEY_BOX = 1801812256L; //key + long FAIRPLAY_IV_BOX = 1769367926L; //iviv + long FAIRPLAY_PRIVATE_KEY_BOX = 1886546294L; //priv } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/FullBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/FullBox.java index acb7d95a..d96b3f87 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/FullBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/FullBox.java @@ -1,19 +1,21 @@ package net.sourceforge.jaad.mp4.boxes; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; + public class FullBox extends BoxImpl { - protected int version, flags; + protected int version, flags; - public FullBox(String name) { - super(name); - } + public FullBox(String name) { + super(name); + } - @Override - public void decode(MP4InputStream in) throws IOException { - version = in.read(); - flags = (int) in.readBytes(3); - } + @Override + public void decode(MP4Input in) throws IOException { + version = in.readByte(); + flags = (int) in.readBytes(3); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/UnknownBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/UnknownBox.java index 14bcd3c0..96222e85 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/UnknownBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/UnknownBox.java @@ -1,21 +1,23 @@ package net.sourceforge.jaad.mp4.boxes; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; + /** * Box implementation that is used for unknown types. - * + * * @author in-somnia */ class UnknownBox extends BoxImpl { - UnknownBox() { - super("unknown"); - } + UnknownBox() { + super("unknown"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - //no need to read, box will be skipped - } + @Override + public void decode(MP4Input in) throws IOException { + //no need to read, box will be skipped + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/Utils.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/Utils.java index f74924e4..505f1288 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/Utils.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/Utils.java @@ -2,21 +2,21 @@ public final class Utils { - private static final long UNDETERMINED = 4294967295l; + private static final long UNDETERMINED = 4294967295L; - public static String getLanguageCode(long l) { - //1 bit padding, 5*3 bits language code (ISO-639-2/T) - char[] c = new char[3]; - c[0] = (char) (((l>>10)&31)+0x60); - c[1] = (char) (((l>>5)&31)+0x60); - c[2] = (char) ((l&31)+0x60); - return new String(c); - } + public static String getLanguageCode(long l) { + //1 bit padding, 5*3 bits language code (ISO-639-2/T) + char[] c = new char[3]; + c[0] = (char) (((l >> 10) & 31) + 0x60); + c[1] = (char) (((l >> 5) & 31) + 0x60); + c[2] = (char) ((l & 31) + 0x60); + return new String(c); + } - public static long detectUndetermined(long l) { - final long x; - if(l==UNDETERMINED) x = -1; - else x = l; - return x; - } + public static long detectUndetermined(long l) { + long x; + if (l == UNDETERMINED) x = -1; + else x = l; + return x; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/AppleLosslessBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/AppleLosslessBox.java index 636660a2..8e8b1c57 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/AppleLosslessBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/AppleLosslessBox.java @@ -1,68 +1,70 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + public class AppleLosslessBox extends FullBox { - private long maxSamplePerFrame, maxCodedFrameSize, bitRate, sampleRate; - private int sampleSize, historyMult, initialHistory, kModifier, channels; - - public AppleLosslessBox() { - super("Apple Lossless Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - maxSamplePerFrame = in.readBytes(4); - in.skipBytes(1); //? - sampleSize = in.read(); - historyMult = in.read(); - initialHistory = in.read(); - kModifier = in.read(); - channels = in.read(); - in.skipBytes(2); //? - maxCodedFrameSize = in.readBytes(4); - bitRate = in.readBytes(4); - sampleRate = in.readBytes(4); - } - - public long getMaxSamplePerFrame() { - return maxSamplePerFrame; - } - - public int getSampleSize() { - return sampleSize; - } - - public int getHistoryMult() { - return historyMult; - } - - public int getInitialHistory() { - return initialHistory; - } - - public int getkModifier() { - return kModifier; - } - - public int getChannels() { - return channels; - } - - public long getMaxCodedFrameSize() { - return maxCodedFrameSize; - } - - public long getBitRate() { - return bitRate; - } - - public long getSampleRate() { - return sampleRate; - } + private long maxSamplePerFrame, maxCodedFrameSize, bitRate, sampleRate; + private int sampleSize, historyMult, initialHistory, kModifier, channels; + + public AppleLosslessBox() { + super("Apple Lossless Box"); + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + + maxSamplePerFrame = in.readBytes(4); + in.skipBytes(1); // ? + sampleSize = in.readByte(); + historyMult = in.readByte(); + initialHistory = in.readByte(); + kModifier = in.readByte(); + channels = in.readByte(); + in.skipBytes(2); // ? + maxCodedFrameSize = in.readBytes(4); + bitRate = in.readBytes(4); + sampleRate = in.readBytes(4); + } + + public long getMaxSamplePerFrame() { + return maxSamplePerFrame; + } + + public int getSampleSize() { + return sampleSize; + } + + public int getHistoryMult() { + return historyMult; + } + + public int getInitialHistory() { + return initialHistory; + } + + public int getkModifier() { + return kModifier; + } + + public int getChannels() { + return channels; + } + + public long getMaxCodedFrameSize() { + return maxCodedFrameSize; + } + + public long getBitRate() { + return bitRate; + } + + public long getSampleRate() { + return sampleRate; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/BinaryXMLBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/BinaryXMLBox.java index 7e7d71cf..989fae6d 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/BinaryXMLBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/BinaryXMLBox.java @@ -1,38 +1,40 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** - * When the primary data is in XML format and it is desired that the XML be + * When the primary data is in XML format, and it is desired that the XML be * stored directly in the meta-box, either the XMLBox or the BinaryXMLBox is * used. The Binary XML Box may only be used when there is a single well-defined * binarization of the XML for that defined format as identified by the handler. * - * @see XMLBox * @author in-somnia + * @see XMLBox */ public class BinaryXMLBox extends FullBox { - private byte[] data; + private byte[] data; - public BinaryXMLBox() { - super("Binary XML Box"); - } + public BinaryXMLBox() { + super("Binary XML Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - data = new byte[(int) getLeft(in)]; - in.readBytes(data); - } + data = new byte[(int) getLeft(in)]; + in.readBytes(data); + } - /** - * The binary data. - */ - public byte[] getData() { - return data; - } + /** + * The binary data. + */ + public byte[] getData() { + return data; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/BitRateBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/BitRateBox.java index d21d0679..40fa99ca 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/BitRateBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/BitRateBox.java @@ -1,45 +1,50 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.BoxImpl; + public class BitRateBox extends BoxImpl { - private long decodingBufferSize, maxBitrate, avgBitrate; - - public BitRateBox() { - super("Bitrate Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - decodingBufferSize = in.readBytes(4); - maxBitrate = in.readBytes(4); - avgBitrate = in.readBytes(4); - } - - /** - * Gives the size of the decoding buffer for the elementary stream in bytes. - * @return the decoding buffer size - */ - public long getDecodingBufferSize() { - return decodingBufferSize; - } - - /** - * Gives the maximum rate in bits/second over any window of one second. - * @return the maximum bitrate - */ - public long getMaximumBitrate() { - return maxBitrate; - } - - /** - * Gives the average rate in bits/second over the entire presentation. - * @return the average bitrate - */ - public long getAverageBitrate() { - return avgBitrate; - } + private long decodingBufferSize, maxBitrate, avgBitrate; + + public BitRateBox() { + super("Bitrate Box"); + } + + @Override + public void decode(MP4Input in) throws IOException { + decodingBufferSize = in.readBytes(4); + maxBitrate = in.readBytes(4); + avgBitrate = in.readBytes(4); + } + + /** + * Gives the size of the decoding buffer for the elementary stream in bytes. + * + * @return the decoding buffer size + */ + public long getDecodingBufferSize() { + return decodingBufferSize; + } + + /** + * Gives the maximum rate in bits/second over any window of one second. + * + * @return the maximum bitrate + */ + public long getMaximumBitrate() { + return maxBitrate; + } + + /** + * Gives the average rate in bits/second over the entire presentation. + * + * @return the average bitrate + */ + public long getAverageBitrate() { + return avgBitrate; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ChapterBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ChapterBox.java index 6f359b4e..c62b3c1d 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ChapterBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ChapterBox.java @@ -3,9 +3,11 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The chapter box allows to specify individual chapters along the main timeline * of a movie. The chapter box occurs within a movie box. @@ -15,38 +17,38 @@ */ public class ChapterBox extends FullBox { - private final Map chapters; - - public ChapterBox() { - super("Chapter Box"); - chapters = new HashMap(); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - in.skipBytes(4); //?? - - final int count = in.read(); - - long timestamp; - int len; - String name; - for(int i = 0; i getChapters() { - return chapters; - } + private final Map chapters; + + public ChapterBox() { + super("Chapter Box"); + chapters = new HashMap<>(); + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + + in.skipBytes(4); //?? + + int count = in.readByte(); + + long timestamp; + int len; + String name; + for (int i = 0; i < count; i++) { + timestamp = in.readBytes(8); + len = in.readByte(); + name = in.readString(len); + chapters.put(timestamp, name); + } + } + + /** + * Returns a map that maps the timestamp of each chapter to its name. + * + * @return the chapters + */ + public Map getChapters() { + return chapters; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ChunkOffsetBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ChunkOffsetBox.java index 3e59713c..77cf5173 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ChunkOffsetBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ChunkOffsetBox.java @@ -1,32 +1,34 @@ package net.sourceforge.jaad.mp4.boxes.impl; +import java.io.IOException; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.BoxTypes; import net.sourceforge.jaad.mp4.boxes.FullBox; -import net.sourceforge.jaad.mp4.MP4InputStream; -import java.io.IOException; + public class ChunkOffsetBox extends FullBox { - private long[] chunks; + private long[] chunks; - public ChunkOffsetBox() { - super("Chunk Offset Box"); - } + public ChunkOffsetBox() { + super("Chunk Offset Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - final int len = (type==BoxTypes.CHUNK_LARGE_OFFSET_BOX) ? 8 : 4; - final int entryCount = (int) in.readBytes(4); - chunks = new long[entryCount]; + int len = (type == BoxTypes.CHUNK_LARGE_OFFSET_BOX) ? 8 : 4; + int entryCount = (int) in.readBytes(4); + chunks = new long[entryCount]; - for(int i = 0; i * The composition time to sample table is optional and must only be present if * DT and CT differ for any samples. - * + *

* Hint tracks do not use this box. - * + * * @author in-somnia */ public class CompositionTimeToSampleBox extends FullBox { - private long[] sampleCounts, sampleOffsets; - - public CompositionTimeToSampleBox() { - super("Time To Sample Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - final int entryCount = (int) in.readBytes(4); - sampleCounts = new long[entryCount]; - sampleOffsets = new long[entryCount]; - - for(int i = 0; i0) location = in.readUTFString((int) getLeft(in), MP4InputStream.UTF8); - } - } + inFile = (flags & 1) == 1; + if (!inFile) { + referenceName = in.readUTFString((int) getLeft(in), MP4Input.UTF8); + if (getLeft(in) > 0) location = in.readUTFString((int) getLeft(in), MP4Input.UTF8); + } + } - public boolean isInFile() { - return inFile; - } + public boolean isInFile() { + return inFile; + } - public String getReferenceName() { - return referenceName; - } + public String getReferenceName() { + return referenceName; + } - public String getLocation() { - return location; - } + public String getLocation() { + return location; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/DataReferenceBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/DataReferenceBox.java index 3fcd5f03..163e8e0e 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/DataReferenceBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/DataReferenceBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The data reference object contains a table of data references (normally URLs) * that declare the location(s) of the media data used within the presentation. @@ -11,21 +13,21 @@ * to the samples in the track. A track may be split over several sources in * this way. * The data entry is either a DataEntryUrnBox or a DataEntryUrlBox. - * + * * @author in-somnia */ public class DataReferenceBox extends FullBox { - public DataReferenceBox() { - super("Data Reference Box"); - } + public DataReferenceBox() { + super("Data Reference Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - final int entryCount = (int) in.readBytes(4); + int entryCount = (int) in.readBytes(4); - readChildren(in, entryCount); //DataEntryUrlBox, DataEntryUrnBox - } + readChildren(in, entryCount); //DataEntryUrlBox, DataEntryUrnBox + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/DecodingTimeToSampleBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/DecodingTimeToSampleBox.java index 1c5ed0d3..90f9800a 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/DecodingTimeToSampleBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/DecodingTimeToSampleBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.boxes.FullBox; -import net.sourceforge.jaad.mp4.MP4InputStream; import java.io.IOException; +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.boxes.FullBox; + + /** * This box contains a compact version of a table that allows indexing from * decoding time to sample number. Other tables give sample sizes and pointers, @@ -20,36 +22,36 @@ * to the overall timescale, and not considering any edit list). * The Edit List Box provides the initial CT value if it is non-empty * (non-zero). - * + * * @author in-somnia */ public class DecodingTimeToSampleBox extends FullBox { - private long[] sampleCounts, sampleDeltas; - - public DecodingTimeToSampleBox() { - super("Time To Sample Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - final int entryCount = (int) in.readBytes(4); - sampleCounts = new long[entryCount]; - sampleDeltas = new long[entryCount]; - - for(int i = 0; iESDBox a * CodecSpecificBox may be present. - * + * * @author in-somnia */ public class ESDBox extends FullBox { - private ESDescriptor esd; + private ESDescriptor esd; + + public ESDBox() { + super("ESD Box"); + } - public ESDBox() { - super("ESD Box"); - } + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - esd = (ESDescriptor) ObjectDescriptor.createDescriptor(in); - } + esd = (ESDescriptor) ObjectDescriptor.createDescriptor(in); + } - public ESDescriptor getEntryDescriptor() { - return esd; - } + public ESDescriptor getEntryDescriptor() { + return esd; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/EditListBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/EditListBox.java index 7a135edf..9be6dc40 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/EditListBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/EditListBox.java @@ -1,24 +1,26 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * This box contains an explicit timeline map. Each entry defines part of the * track time-line: by mapping part of the media time-line, or by indicating * 'empty' time, or by defining a 'dwell', where a single time-point in the * media is held for a period. - * + *

* Starting offsets for tracks (streams) are represented by an initial empty * edit. For example, to play a track from its start for 30 seconds, but at 10 * seconds into the presentation, we have the following edit list: - * + *

* [0]: * Segment-duration = 10 seconds * Media-Time = -1 * Media-Rate = 1 - * + *

* [1]: * Segment-duration = 30 seconds (could be the length of the whole track) * Media-Time = 0 seconds @@ -26,61 +28,61 @@ */ public class EditListBox extends FullBox { - private long[] segmentDuration, mediaTime; - private double[] mediaRate; + private long[] segmentDuration, mediaTime; + private double[] mediaRate; - public EditListBox() { - super("Edit List Box"); - } + public EditListBox() { + super("Edit List Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - final int entryCount = (int) in.readBytes(4); - final int len = (version==1) ? 8 : 4; + int entryCount = (int) in.readBytes(4); + int len = (version == 1) ? 8 : 4; - segmentDuration = new long[entryCount]; - mediaTime = new long[entryCount]; - mediaRate = new double[entryCount]; + segmentDuration = new long[entryCount]; + mediaTime = new long[entryCount]; + mediaRate = new double[entryCount]; - for(int i = 0; i * This box when present within a Meta Box, declares the structure or format of * the 'meta' box contents. - * + *

* There is a general handler for metadata streams of any type; the specific * format is identified by the sample entry, as for video or audio, for example. * If they are in text, then a MIME format is supplied to document their format; * if in XML, each sample is a complete XML document, and the namespace of the * XML is also supplied. + * * @author in-somnia */ public class HandlerBox extends FullBox { - //ISO BMFF types - public static final int TYPE_VIDEO = 1986618469; //vide - public static final int TYPE_SOUND = 1936684398; //soun - public static final int TYPE_HINT = 1751740020; //hint - public static final int TYPE_META = 1835365473; //meta - public static final int TYPE_NULL = 1853189228; //null - //MP4 types - public static final int TYPE_ODSM = 1868854125; //odsm - public static final int TYPE_CRSM = 1668445037; //crsm - public static final int TYPE_SDSM = 1935962989; //sdsm - public static final int TYPE_M7SM = 1832350573; //m7sm - public static final int TYPE_OCSM = 1868788589; //ocsm - public static final int TYPE_IPSM = 1768977261; //ipsm - public static final int TYPE_MJSM = 1835692909; //mjsm - private long handlerType; - private String handlerName; + //ISO BMFF types + public static final int TYPE_VIDEO = 1986618469; //vide + public static final int TYPE_SOUND = 1936684398; //soun + public static final int TYPE_HINT = 1751740020; //hint + public static final int TYPE_META = 1835365473; //meta + public static final int TYPE_NULL = 1853189228; //null + //MP4 types + public static final int TYPE_ODSM = 1868854125; //odsm + public static final int TYPE_CRSM = 1668445037; //crsm + public static final int TYPE_SDSM = 1935962989; //sdsm + public static final int TYPE_M7SM = 1832350573; //m7sm + public static final int TYPE_OCSM = 1868788589; //ocsm + public static final int TYPE_IPSM = 1768977261; //ipsm + public static final int TYPE_MJSM = 1835692909; //mjsm + private long handlerType; + private String handlerName; - public HandlerBox() { - super("Handler Box"); - } + public HandlerBox() { + super("Handler Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - in.skipBytes(4); //pre-defined: 0 + in.skipBytes(4); //pre-defined: 0 - handlerType = in.readBytes(4); + handlerType = in.readBytes(4); - in.readBytes(4); //reserved - in.readBytes(4); //reserved - in.readBytes(4); //reserved + in.readBytes(4); //reserved + in.readBytes(4); //reserved + in.readBytes(4); //reserved - handlerName = in.readUTFString((int) getLeft(in), MP4InputStream.UTF8); - } + handlerName = in.readUTFString((int) getLeft(in), MP4Input.UTF8); + } - /** - * When present in a media box, the handler type is an integer containing - * one of the following values: - *

    - *
  • 'vide': Video track
  • - *
  • 'soun': Audio track
  • - *
  • 'hint': Hint track
  • - *
  • 'meta': Timed Metadata track
  • - *
- * - * When present in a meta box, it contains an appropriate value to indicate - * the format of the meta box contents. The value 'null' can be used in the - * primary meta box to indicate that it is merely being used to hold - * resources. - * - * @return the handler type - */ - public long getHandlerType() { - return handlerType; - } + /** + * When present in a media box, the handler type is an integer containing + * one of the following values: + *
    + *
  • 'vide': Video track
  • + *
  • 'soun': Audio track
  • + *
  • 'hint': Hint track
  • + *
  • 'meta': Timed Metadata track
  • + *
+ *

+ * When present in a meta box, it contains an appropriate value to indicate + * the format of the meta box contents. The value 'null' can be used in the + * primary meta box to indicate that it is merely being used to hold + * resources. + * + * @return the handler type + */ + public long getHandlerType() { + return handlerType; + } - /** - * The name gives a human-readable name for the track type (for debugging - * and inspection purposes). - * - * @return the handler type's name - */ - public String getHandlerName() { - return handlerName; - } + /** + * The name gives a human-readable name for the track type (for debugging + * and inspection purposes). + * + * @return the handler type's name + */ + public String getHandlerName() { + return handlerName; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/HintMediaHeaderBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/HintMediaHeaderBox.java index 2f35d0d2..552dbc38 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/HintMediaHeaderBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/HintMediaHeaderBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The hint media header contains general information, independent of the * protocol, for hint tracks. @@ -12,54 +14,54 @@ */ public class HintMediaHeaderBox extends FullBox { - private long maxPDUsize, avgPDUsize, maxBitrate, avgBitrate; + private long maxPDUsize, avgPDUsize, maxBitrate, avgBitrate; - public HintMediaHeaderBox() { - super("Hint Media Header Box"); - } + public HintMediaHeaderBox() { + super("Hint Media Header Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - maxPDUsize = in.readBytes(2); - avgPDUsize = in.readBytes(2); + maxPDUsize = in.readBytes(2); + avgPDUsize = in.readBytes(2); - maxBitrate = in.readBytes(4); - avgBitrate = in.readBytes(4); + maxBitrate = in.readBytes(4); + avgBitrate = in.readBytes(4); - in.skipBytes(4); //reserved - } + in.skipBytes(4); //reserved + } - /** - * The maximum PDU size gives the size in bytes of the largest PDU (protocol - * data unit) in this hint stream. - */ - public long getMaxPDUsize() { - return maxPDUsize; - } + /** + * The maximum PDU size gives the size in bytes of the largest PDU (protocol + * data unit) in this hint stream. + */ + public long getMaxPDUsize() { + return maxPDUsize; + } - /** - * The average PDU size gives the average size of a PDU over the entire - * presentation. - */ - public long getAveragePDUsize() { - return avgPDUsize; - } + /** + * The average PDU size gives the average size of a PDU over the entire + * presentation. + */ + public long getAveragePDUsize() { + return avgPDUsize; + } - /** - * The maximum bitrate gives the maximum rate in bits/second over any window - * of one second. - */ - public long getMaxBitrate() { - return maxBitrate; - } + /** + * The maximum bitrate gives the maximum rate in bits/second over any window + * of one second. + */ + public long getMaxBitrate() { + return maxBitrate; + } - /** - * The average bitrate gives the average rate in bits/second over the entire - * presentation. - */ - public long getAverageBitrate() { - return avgBitrate; - } + /** + * The average bitrate gives the average rate in bits/second over the entire + * presentation. + */ + public long getAverageBitrate() { + return avgBitrate; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/IPMPControlBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/IPMPControlBox.java index af22f7d1..54a6609e 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/IPMPControlBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/IPMPControlBox.java @@ -1,19 +1,21 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; import net.sourceforge.jaad.mp4.od.Descriptor; + /** * The IPMP Control Box may contain IPMP descriptors which may be referenced by * any stream in the file. - * + *

* The IPMP ToolListDescriptor is defined in ISO/IEC 14496-1, which conveys the * list of IPMP tools required to access the media streams in an ISO Base Media * File or meta-box, and may include a list of alternate IPMP tools or * parametric descriptions of tools required to access the content. - * + *

* The presence of IPMP Descriptor in this IPMPControlBox indicates that media * streams within the file or meta-box are protected by the IPMP Tool described * in the IPMP Descriptor. More than one IPMP Descriptors can be carried here, @@ -23,42 +25,42 @@ */ public class IPMPControlBox extends FullBox { - private /*IPMPToolList*/Descriptor toolList; - private /*IPMP*/Descriptor[] ipmpDescriptors; + private /*IPMPToolList*/ Descriptor toolList; + private /*IPMP*/ Descriptor[] ipmpDescriptors; - public IPMPControlBox() { - super("IPMP Control Box"); - } + public IPMPControlBox() { + super("IPMP Control Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - toolList = /*(IPMPToolListDescriptor)*/ Descriptor.createDescriptor(in); + toolList = /*(IPMPToolListDescriptor)*/ Descriptor.createDescriptor(in); - final int count = in.read(); + int count = in.readByte(); - ipmpDescriptors = new Descriptor[count]; - for(int i = 0; i * The IPMP Descriptor is defined in ISO/IEC 14496-1. This is a part of the * MPEG-4 object descriptors (OD) that describe how an object can be accessed * and decoded. In the ISO Base Media File Format, IPMP Descriptor can be * carried directly in IPMPInfoBox without the need for OD stream. - * + *

* The presence of IPMP Descriptor in this IPMPInfoBox indicates the associated * media stream is protected by the IPMP Tool described in the IPMP Descriptor. - * + *

* Each IPMP Descriptor has an IPMP-toolID, which identifies the required IPMP * tool for protection. An independent registration authority (RA) is used so * any party can register its own IPMP Tool and identify this without * collisions. - * + *

* The IPMP Descriptor carries IPMP information for one or more IPMP Tool * instances, it includes but not limited to IPMP Rights Data, IPMP Key Data, * Tool Configuration Data, etc. - * + *

* More than one IPMP Descriptors can be carried in this IPMPInfoBox if this * media stream is protected by more than one IPMP Tools. * @@ -37,30 +39,32 @@ */ public class IPMPInfoBox extends FullBox { - private List ipmpDescriptors; + private List ipmpDescriptors; - public IPMPInfoBox() { - super("IPMP Info Box"); - } + public IPMPInfoBox() { + super("IPMP Info Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - ipmpDescriptors = new ArrayList(); - /*IPMP*/Descriptor desc; - while(getLeft(in)>0) { - desc = (/*IPMP*/Descriptor) ObjectDescriptor.createDescriptor(in); - ipmpDescriptors.add(desc); - } - } + ipmpDescriptors = new ArrayList<>(); + /*IPMP*/ + Descriptor desc; + while (getLeft(in) > 0) { + /*IPMP*/ + desc = ObjectDescriptor.createDescriptor(in); + ipmpDescriptors.add(desc); + } + } - /** - * The contained list of IPMP descriptors. - * - * @return the IPMP descriptors - */ - public List getIPMPDescriptors() { - return Collections.unmodifiableList(ipmpDescriptors); - } + /** + * The contained list of IPMP descriptors. + * + * @return the IPMP descriptors + */ + public List getIPMPDescriptors() { + return Collections.unmodifiableList(ipmpDescriptors); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemInformationBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemInformationBox.java index 67dbcd55..c702df62 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemInformationBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemInformationBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The item information box provides extra information about selected items, * including symbolic ('file') names. It may optionally occur, but if it does, @@ -12,16 +14,16 @@ * protection are indicated for an item, a reader should first un-protect the * item, and then decode the item's content encoding. If more control is needed, * an IPMP sequence code may be used. - * + *

* This box contains an array of entries, and each entry is formatted as a box. * This array is sorted by increasing item ID in the entry records. - * + *

* Two versions of the item info entry are defined. Version 1 includes * additional information to version 0 as specified by an extension type. For * instance, it shall be used with extension type 'fdel' for items that are * referenced by the file partition box ('fpar'), which is defined for source * file partitionings and applies to file delivery transmissions. - * + *

* If no extension is desired, the box may terminate without the extension type * field and the extension; if, in addition, content encoding is not desired, * that field also may be absent and the box terminate before it. @@ -30,16 +32,16 @@ */ public class ItemInformationBox extends FullBox { - public ItemInformationBox() { - super("Item Information Box"); - } + public ItemInformationBox() { + super("Item Information Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - final int protectionCount = (int) in.readBytes(2); + int protectionCount = (int) in.readBytes(2); - readChildren(in, protectionCount); - } + readChildren(in, protectionCount); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemInformationEntry.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemInformationEntry.java index 74684fad..995bfb66 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemInformationEntry.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemInformationEntry.java @@ -1,205 +1,207 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + public class ItemInformationEntry extends FullBox { - private int itemID, itemProtectionIndex; - private String itemName, contentType, contentEncoding; - private long extensionType; - private Extension extension; - - public ItemInformationEntry() { - super("Item Information Entry"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - if((version==0)||(version==1)) { - itemID = (int) in.readBytes(2); - itemProtectionIndex = (int) in.readBytes(2); - itemName = in.readUTFString((int) getLeft(in), MP4InputStream.UTF8); - contentType = in.readUTFString((int) getLeft(in), MP4InputStream.UTF8); - contentEncoding = in.readUTFString((int) getLeft(in), MP4InputStream.UTF8); //optional - } - if(version==1&&getLeft(in)>0) { - //optional - extensionType = in.readBytes(4); - if(getLeft(in)>0) { - extension = Extension.forType((int) extensionType); - if(extension!=null) extension.decode(in); - } - } - } - - /** - * The item ID contains either 0 for the primary resource (e.g., the XML - * contained in an 'xml ' box) or the ID of the item for which the following - * information is defined. - * - * @return the item ID - */ - public int getItemID() { - return itemID; - } - - /** - * The item protection index contains either 0 for an unprotected item, or - * the one-based index into the item protection box defining the protection - * applied to this item (the first box in the item protection box has the - * index 1). - * - * @return the item protection index - */ - public int getItemProtectionIndex() { - return itemProtectionIndex; - } - - /** - * The item name is a String containing a symbolic name of the item (source - * file for file delivery transmissions). - * - * @return the item name - */ - public String getItemName() { - return itemName; - } - - /** - * The content type is a String with the MIME type of the item. If the item - * is content encoded (see below), then the content type refers to the item - * after content decoding. - * - * @return the content type - */ - public String getContentType() { - return contentType; - } - - /** - * The content encoding is an optional String used to indicate that the - * binary file is encoded and needs to be decoded before interpreted. The - * values are as defined for Content-Encoding for HTTP/1.1. Some possible - * values are "gzip", "compress" and "deflate". An empty string indicates no - * content encoding. Note that the item is stored after the content encoding - * has been applied. - * - * @return the content encoding - */ - public String getContentEncoding() { - return contentEncoding; - } - - /** - * The extension type is a printable four-character code that identifies the - * extension fields of version 1 with respect to version 0 of the item - * information entry. - * - * @return the extension type - */ - public long getExtensionType() { - return extensionType; - } - - /** - * Returns the extension. - */ - public Extension getExtension() { - return extension; - } - - public abstract static class Extension { - - private static final int TYPE_FDEL = 1717855596; //fdel - - static Extension forType(int type) { - final Extension ext; - switch(type) { - case Extension.TYPE_FDEL: - ext = new FDExtension(); - break; - default: - ext = null; - } - return ext; - } - - abstract void decode(MP4InputStream in) throws IOException; - } - - public static class FDExtension extends Extension { - - private String contentLocation, contentMD5; - private long contentLength, transferLength; - private long[] groupID; - - @Override - void decode(MP4InputStream in) throws IOException { - contentLocation = in.readUTFString(100, MP4InputStream.UTF8); - contentMD5 = in.readUTFString(100, MP4InputStream.UTF8); - - contentLength = in.readBytes(8); - transferLength = in.readBytes(8); - - final int entryCount = in.read(); - groupID = new long[entryCount]; - for(int i = 0; i 0) { + //optional + extensionType = in.readBytes(4); + if (getLeft(in) > 0) { + extension = Extension.forType((int) extensionType); + if (extension != null) extension.decode(in); + } + } + } + + /** + * The item ID contains either 0 for the primary resource (e.g., the XML + * contained in an 'xml ' box) or the ID of the item for which the following + * information is defined. + * + * @return the item ID + */ + public int getItemID() { + return itemID; + } + + /** + * The item protection index contains either 0 for an unprotected item, or + * the one-based index into the item protection box defining the protection + * applied to this item (the first box in the item protection box has the + * index 1). + * + * @return the item protection index + */ + public int getItemProtectionIndex() { + return itemProtectionIndex; + } + + /** + * The item name is a String containing a symbolic name of the item (source + * file for file delivery transmissions). + * + * @return the item name + */ + public String getItemName() { + return itemName; + } + + /** + * The content type is a String with the MIME type of the item. If the item + * is content encoded (see below), then the content type refers to the item + * after content decoding. + * + * @return the content type + */ + public String getContentType() { + return contentType; + } + + /** + * The content encoding is an optional String used to indicate that the + * binary file is encoded and needs to be decoded before interpreted. The + * values are as defined for Content-Encoding for HTTP/1.1. Some possible + * values are "gzip", "compress" and "deflate". An empty string indicates no + * content encoding. Note that the item is stored after the content encoding + * has been applied. + * + * @return the content encoding + */ + public String getContentEncoding() { + return contentEncoding; + } + + /** + * The extension type is a printable four-character code that identifies the + * extension fields of version 1 with respect to version 0 of the item + * information entry. + * + * @return the extension type + */ + public long getExtensionType() { + return extensionType; + } + + /** + * Returns the extension. + */ + public Extension getExtension() { + return extension; + } + + public abstract static class Extension { + + private static final int TYPE_FDEL = 1717855596; //fdel + + static Extension forType(int type) { + Extension ext; + switch (type) { + case Extension.TYPE_FDEL: + ext = new FDExtension(); + break; + default: + ext = null; + } + return ext; + } + + abstract void decode(MP4Input in) throws IOException; + } + + public static class FDExtension extends Extension { + + private String contentLocation, contentMD5; + private long contentLength, transferLength; + private long[] groupID; + + @Override + void decode(MP4Input in) throws IOException { + contentLocation = in.readUTFString(100, MP4Input.UTF8); + contentMD5 = in.readUTFString(100, MP4Input.UTF8); + + contentLength = in.readBytes(8); + transferLength = in.readBytes(8); + + int entryCount = in.readByte(); + groupID = new long[entryCount]; + for (int i = 0; i < entryCount; i++) { + groupID[i] = in.readBytes(4); + } + } + + /** + * The content location is a String in containing the URI of the file as + * defined in HTTP/1.1 (RFC 2616). + * + * @return the content location + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * The content MD5 is a string containing an MD5 digest of the file. See + * HTTP/1.1 (RFC 2616) and RFC 1864. + * + * @return the content MD5 + */ + public String getContentMD5() { + return contentMD5; + } + + /** + * The total length (in bytes) of the (un-encoded) file. + * + * @return the content length + */ + public long getContentLength() { + return contentLength; + } + + /** + * The transfer length is the total length (in bytes) of the (encoded) + * file. Note that transfer length is equal to content length if no + * content encoding is applied (see above). + * + * @return the transfer length + */ + public long getTransferLength() { + return transferLength; + } + + /** + * The group ID indicates a file group to which the file item (source + * file) belongs. See 3GPP TS 26.346 for more details on file groups. + * + * @return the group IDs + */ + public long[] getGroupID() { + return groupID; + } + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemLocationBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemLocationBox.java index 120d1f71..6cb296e7 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemLocationBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemLocationBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The item location box provides a directory of resources in this or other * files, by locating their containing file, their offset within that file, and @@ -12,7 +14,7 @@ * (handler) used. For example, a system might integrate all the externally * referenced metadata resources into one file, re-adjusting file offsets and * file references accordingly. - * + *

* Items may be stored fragmented into extents, e.g. to enable interleaving. An * extent is a contiguous subset of the bytes of the resource; the resource is * formed by concatenating the extents. If only one extent is used then either @@ -25,12 +27,12 @@ * items divided into more than one extent, should have an explicit offset and * length, or use a MIME type requiring a different interpretation of the file, * to avoid infinite recursion. - * + *

* The size of the item is the sum of the extent lengths. - * + *

* The data-reference index may take the value 0, indicating a reference into * the same file as this metadata, or an index into the data-reference table. - * + *

* Some referenced data may itself use offset/length techniques to address * resources within it (e.g. an MP4 file might be 'included' in this way). * Normally such offsets are relative to the beginning of the containing file. @@ -44,99 +46,98 @@ */ public class ItemLocationBox extends FullBox { - private int[] itemID, dataReferenceIndex; - private long[] baseOffset; - private long[][] extentOffset, extentLength; + private int[] itemID, dataReferenceIndex; + private long[] baseOffset; + private long[][] extentOffset, extentLength; - public ItemLocationBox() { - super("Item Location Box"); - } + public ItemLocationBox() { + super("Item Location Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); /*4 bits offsetSize 4 bits lengthSize 4 bits baseOffsetSize 4 bits reserved */ - long l = in.readBytes(2); - final int offsetSize = (int) (l>>12)&0xF; - final int lengthSize = (int) (l>>8)&0xF; - final int baseOffsetSize = (int) (l>>4)&0xF; - - final int itemCount = (int) in.readBytes(2); - dataReferenceIndex = new int[itemCount]; - baseOffset = new long[itemCount]; - extentOffset = new long[itemCount][]; - extentLength = new long[itemCount][]; - - int j, extentCount; - for(int i = 0; i> 12) & 0xF; + int lengthSize = (int) (l >> 8) & 0xF; + int baseOffsetSize = (int) (l >> 4) & 0xF; + + int itemCount = (int) in.readBytes(2); + dataReferenceIndex = new int[itemCount]; + baseOffset = new long[itemCount]; + extentOffset = new long[itemCount][]; + extentLength = new long[itemCount][]; + + for (int i = 0; i < itemCount; i++) { + itemID[i] = (int) in.readBytes(2); + dataReferenceIndex[i] = (int) in.readBytes(2); + baseOffset[i] = in.readBytes(baseOffsetSize); + + int extentCount = (int) in.readBytes(2); + extentOffset[i] = new long[extentCount]; + extentLength[i] = new long[extentCount]; + + for (int j = 0; j < extentCount; j++) { + extentOffset[i][j] = in.readBytes(offsetSize); + extentLength[i][j] = in.readBytes(lengthSize); + } + } + } + + /** + * The item ID is an arbitrary integer 'name' for this resource which can be + * used to refer to it (e.g. in a URL). + * + * @return the item ID + */ + public int[] getItemID() { + return itemID; + } + + /** + * The data reference index is either zero ('this file') or a 1-based index + * into the data references in the data information box. + * + * @return the data reference index + */ + public int[] getDataReferenceIndex() { + return dataReferenceIndex; + } + + /** + * The base offset provides a base value for offset calculations within the + * referenced data. + * + * @return the base offsets for all items + */ + public long[] getBaseOffset() { + return baseOffset; + } + + /** + * The extent offset provides the absolute offset in bytes from the + * beginning of the containing file, of this item. + * + * @return the offsets for all extents in all items + */ + public long[][] getExtentOffset() { + return extentOffset; + } + + /** + * The extends length provides the absolute length in bytes of this metadata + * item. If the value is 0, then length of the item is the length of the + * entire referenced file. + * + * @return the lengths for all extends in all items + */ + public long[][] getExtentLength() { + return extentLength; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemProtectionBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemProtectionBox.java index 84952ce7..9b039b12 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemProtectionBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ItemProtectionBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The item protection box provides an array of item protection information, for * use by the Item Information Box. @@ -12,16 +14,16 @@ */ public class ItemProtectionBox extends FullBox { - public ItemProtectionBox() { - super("Item Protection Box"); - } + public ItemProtectionBox() { + super("Item Protection Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - final int protectionCount = (int) in.readBytes(2); + int protectionCount = (int) in.readBytes(2); - readChildren(in, protectionCount); - } + readChildren(in, protectionCount); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MediaDataBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MediaDataBox.java index f6532536..7ee66a03 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MediaDataBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MediaDataBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.boxes.BoxImpl; -import net.sourceforge.jaad.mp4.MP4InputStream; import java.io.IOException; +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.boxes.BoxImpl; + + /** * The Media Data Box contains the media data. In video tracks, this box would * contain video frames. A presentation may contain zero or more Media Data @@ -12,16 +14,17 @@ * There may be any number of these boxes in the file (including zero, if all * the media data is in other files). The metadata refers to media data by its * absolute offset within the file. + * * @author in-somnia */ public class MediaDataBox extends BoxImpl { - public MediaDataBox() { - super("Media Data Box"); - } + public MediaDataBox() { + super("Media Data Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - //if random access: skip, else: do nothing - } + @Override + public void decode(MP4Input in) throws IOException { + //if random access: skip, else: do nothing + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MediaHeaderBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MediaHeaderBox.java index d25d66c6..fa295302 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MediaHeaderBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MediaHeaderBox.java @@ -1,82 +1,88 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.boxes.FullBox; -import net.sourceforge.jaad.mp4.MP4InputStream; import java.io.IOException; + +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.boxes.FullBox; import net.sourceforge.jaad.mp4.boxes.Utils; + /** * The media header declares overall information that is media-independent, and relevant to characteristics of * the media in a track. */ public class MediaHeaderBox extends FullBox { - private long creationTime, modificationTime, timeScale, duration; - private String language; + private long creationTime, modificationTime, timeScale, duration; + private String language; + + public MediaHeaderBox() { + super("Media Header Box"); + } - public MediaHeaderBox() { - super("Media Header Box"); - } + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - final int len = (version==1) ? 8 : 4; - creationTime = in.readBytes(len); - modificationTime = in.readBytes(len); - timeScale = in.readBytes(4); - duration = Utils.detectUndetermined(in.readBytes(len)); + int len = (version == 1) ? 8 : 4; + creationTime = in.readBytes(len); + modificationTime = in.readBytes(len); + timeScale = in.readBytes(4); + duration = Utils.detectUndetermined(in.readBytes(len)); - language = Utils.getLanguageCode(in.readBytes(2)); + language = Utils.getLanguageCode(in.readBytes(2)); - in.skipBytes(2); //pre-defined: 0 - } + in.skipBytes(2); //pre-defined: 0 + } - /** - * The creation time is an integer that declares the creation time of the - * presentation in seconds since midnight, Jan. 1, 1904, in UTC time. - * @return the creation time - */ - public long getCreationTime() { - return creationTime; - } + /** + * The creation time is an integer that declares the creation time of the + * presentation in seconds since midnight, Jan. 1, 1904, in UTC time. + * + * @return the creation time + */ + public long getCreationTime() { + return creationTime; + } - /** - * The modification time is an integer that declares the most recent time - * the presentation was modified in seconds since midnight, Jan. 1, 1904, - * in UTC time. - */ - public long getModificationTime() { - return modificationTime; - } + /** + * The modification time is an integer that declares the most recent time + * the presentation was modified in seconds since midnight, Jan. 1, 1904, + * in UTC time. + */ + public long getModificationTime() { + return modificationTime; + } - /** - * The time-scale is an integer that specifies the time-scale for this - * media; this is the number of time units that pass in one second. For - * example, a time coordinate system that measures time in sixtieths of a - * second has a time scale of 60. - * @return the time-scale - */ - public long getTimeScale() { - return timeScale; - } + /** + * The time-scale is an integer that specifies the time-scale for this + * media; this is the number of time units that pass in one second. For + * example, a time coordinate system that measures time in sixtieths of a + * second has a time scale of 60. + * + * @return the time-scale + */ + public long getTimeScale() { + return timeScale; + } - /** - * The duration is an integer that declares the duration of this media (in - * the scale of the timescale). If the duration cannot be determined then - * duration is set to -1. - * @return the duration of this media - */ - public long getDuration() { - return duration; - } + /** + * The duration is an integer that declares the duration of this media (in + * the scale of the timescale). If the duration cannot be determined then + * duration is set to -1. + * + * @return the duration of this media + */ + public long getDuration() { + return duration; + } - /** - * Language code for this media as defined in ISO 639-2/T. - * @return the language code - */ - public String getLanguage() { - return language; - } + /** + * Language code for this media as defined in ISO 639-2/T. + * + * @return the language code + */ + public String getLanguage() { + return language; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MetaBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MetaBox.java index f6c34ad2..17fa51f4 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MetaBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MetaBox.java @@ -1,28 +1,50 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.boxes.Box; +import net.sourceforge.jaad.mp4.boxes.BoxFactory; import net.sourceforge.jaad.mp4.boxes.BoxTypes; import net.sourceforge.jaad.mp4.boxes.FullBox; + //needs to be defined, because readChildren() is not called by factory /* TODO: this class shouldn't be needed. at least here, things become too complicated. change this!!! */ public class MetaBox extends FullBox { - public MetaBox() { - super("Meta Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - // some encoders (such as Android's MexiaMuxer) do not include - // the version and flags fields in the meta box, instead going - // directly to the hdlr box - long possibleType = in.peekBytes(8) & 0xFFFFFFFFL; - if(possibleType != BoxTypes.HANDLER_BOX){ - super.decode(in); - } - readChildren(in); - } + public MetaBox() { + super("Meta Box"); + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + readChildren(in); + } + + @Override + protected Box parseBox(MP4Input in) throws IOException { + + long offset = in.getOffset(); + long size = in.readBytes(4); + long type = in.readBytes(4); + + // some encoders (such as Android's MexiaMuxer) do not include + // the version and flags fields in the meta box, instead going + // directly to the hdlr box. + // Indication of it that size already contains the type. + // Shift back all parameters by 4 bytes: type <- size <- version:flags <- 0 + + if(children.isEmpty() && size==BoxTypes.HANDLER_BOX) { + offset -= 4; + type = size; + size = (version&(2L*Integer.MAX_VALUE+1))<<24; + size += flags; + version=flags=0; + } + + return BoxFactory.parseBox(this, offset, size, type, in); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MetaBoxRelationBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MetaBoxRelationBox.java index aab50360..4c99c084 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MetaBoxRelationBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MetaBoxRelationBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The metabox relation box indicates a relation between two meta boxes at the * same level, i.e., the top level of the file, the Movie Box, or Track Box. The @@ -15,58 +17,58 @@ */ public class MetaBoxRelationBox extends FullBox { - private long firstMetaboxHandlerType, secondMetaboxHandlerType; - private int metaboxRelation; + private long firstMetaboxHandlerType, secondMetaboxHandlerType; + private int metaboxRelation; - public MetaBoxRelationBox() { - super("Meta Box Relation Box"); - } + public MetaBoxRelationBox() { + super("Meta Box Relation Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - firstMetaboxHandlerType = in.readBytes(4); - secondMetaboxHandlerType = in.readBytes(4); - metaboxRelation = in.read(); - } + firstMetaboxHandlerType = in.readBytes(4); + secondMetaboxHandlerType = in.readBytes(4); + metaboxRelation = in.readByte(); + } - /** - * The first meta box to be related. - */ - public long getFirstMetaboxHandlerType() { - return firstMetaboxHandlerType; - } + /** + * The first meta box to be related. + */ + public long getFirstMetaboxHandlerType() { + return firstMetaboxHandlerType; + } - /** - * The second meta box to be related. - */ - public long getSecondMetaboxHandlerType() { - return secondMetaboxHandlerType; - } + /** + * The second meta box to be related. + */ + public long getSecondMetaboxHandlerType() { + return secondMetaboxHandlerType; + } - /** - * The metabox relation indicates the relation between the two meta boxes. - * The following values are defined: - *

    - *
  1. The relationship between the boxes is unknown (which is the default - * when this box is not present)
  2. - *
  3. the two boxes are semantically un-related (e.g., one is presentation, - * the other annotation)
  4. - *
  5. the two boxes are semantically related but complementary (e.g., two - * disjoint sets of meta-data expressed in two different meta-data systems) - *
  6. - *
  7. the two boxes are semantically related but overlap (e.g., two sets of - * meta-data neither of which is a subset of the other); neither is - * 'preferred' to the other
  8. - *
  9. the two boxes are semantically related but the second is a proper - * subset or weaker version of the first; the first is preferred
  10. - *
  11. the two boxes are semantically related and equivalent (e.g., two - * essentially identical sets of meta-data expressed in two different - * meta-data systems)
  12. - *
- */ - public int getMetaboxRelation() { - return metaboxRelation; - } + /** + * The metabox relation indicates the relation between the two meta boxes. + * The following values are defined: + *
    + *
  1. The relationship between the boxes is unknown (which is the default + * when this box is not present)
  2. + *
  3. the two boxes are semantically un-related (e.g., one is presentation, + * the other annotation)
  4. + *
  5. the two boxes are semantically related but complementary (e.g., two + * disjoint sets of meta-data expressed in two different meta-data systems) + *
  6. + *
  7. the two boxes are semantically related but overlap (e.g., two sets of + * meta-data neither of which is a subset of the other); neither is + * 'preferred' to the other
  8. + *
  9. the two boxes are semantically related but the second is a proper + * subset or weaker version of the first; the first is preferred
  10. + *
  11. the two boxes are semantically related and equivalent (e.g., two + * essentially identical sets of meta-data expressed in two different + * meta-data systems)
  12. + *
+ */ + public int getMetaboxRelation() { + return metaboxRelation; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieExtendsHeaderBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieExtendsHeaderBox.java index 9d030066..fa90fdb0 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieExtendsHeaderBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieExtendsHeaderBox.java @@ -1,44 +1,46 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The Movie Extends Header is optional, and provides the overall duration, * including fragments, of a fragmented movie. If this box is not present, the * overall duration must be computed by examining each fragment. - * + * * @author in-somnia */ public class MovieExtendsHeaderBox extends FullBox { - private long fragmentDuration; - - public MovieExtendsHeaderBox() { - super("Movie Extends Header Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - final int len = (version==1) ? 8 : 4; - fragmentDuration = in.readBytes(len); - } - - /** - * The fragment duration is an integer that declares length of the - * presentation of the whole movie including fragments (in the timescale - * indicated in the Movie Header Box). The value of this field corresponds - * to the duration of the longest track, including movie fragments. If an - * MP4 file is created in real-time, such as used in live streaming, it is - * not likely that the fragment duration is known in advance and this box - * may be omitted. - * - * @return the fragment duration - */ - public long getFragmentDuration() { - return fragmentDuration; - } + private long fragmentDuration; + + public MovieExtendsHeaderBox() { + super("Movie Extends Header Box"); + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + + int len = (version == 1) ? 8 : 4; + fragmentDuration = in.readBytes(len); + } + + /** + * The fragment duration is an integer that declares length of the + * presentation of the whole movie including fragments (in the timescale + * indicated in the Movie Header Box). The value of this field corresponds + * to the duration of the longest track, including movie fragments. If an + * MP4 file is created in real-time, such as used in live streaming, it is + * not likely that the fragment duration is known in advance and this box + * may be omitted. + * + * @return the fragment duration + */ + public long getFragmentDuration() { + return fragmentDuration; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieFragmentHeaderBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieFragmentHeaderBox.java index faa3637d..bac33733 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieFragmentHeaderBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieFragmentHeaderBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The movie fragment header contains a sequence number, as a safety check. The * sequence number usually starts at 1 and must increase for each movie fragment @@ -13,23 +15,23 @@ */ public class MovieFragmentHeaderBox extends FullBox { - private long sequenceNumber; + private long sequenceNumber; - public MovieFragmentHeaderBox() { - super("Movie Fragment Header Box"); - } + public MovieFragmentHeaderBox() { + super("Movie Fragment Header Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - sequenceNumber = in.readBytes(4); - } + sequenceNumber = in.readBytes(4); + } - /** - * The ordinal number of this fragment, in increasing order. - */ - public long getSequenceNumber() { - return sequenceNumber; - } + /** + * The ordinal number of this fragment, in increasing order. + */ + public long getSequenceNumber() { + return sequenceNumber; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieFragmentRandomAccessOffsetBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieFragmentRandomAccessOffsetBox.java index d2761753..0bdd7d91 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieFragmentRandomAccessOffsetBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieFragmentRandomAccessOffsetBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The Movie Fragment Random Access Offset Box provides a copy of the length * field from the enclosing Movie Fragment Random Access Box. It is placed last @@ -17,20 +19,20 @@ */ public class MovieFragmentRandomAccessOffsetBox extends FullBox { - private long byteSize; + private long byteSize; - public MovieFragmentRandomAccessOffsetBox() { - super("Movie Fragment Random Access Offset Box"); - } + public MovieFragmentRandomAccessOffsetBox() { + super("Movie Fragment Random Access Offset Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - byteSize = in.readBytes(4); - } + byteSize = in.readBytes(4); + } - public long getByteSize() { - return byteSize; - } + public long getByteSize() { + return byteSize; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieHeaderBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieHeaderBox.java index 5b7e53b1..46e7d7ac 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieHeaderBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/MovieHeaderBox.java @@ -1,142 +1,151 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.boxes.FullBox; -import net.sourceforge.jaad.mp4.MP4InputStream; import java.io.IOException; + +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.boxes.FullBox; import net.sourceforge.jaad.mp4.boxes.Utils; + /** * The movie header box defines overall information which is media-independent, * and relevant to the entire presentation considered as a whole. + * * @author in-somnia */ public class MovieHeaderBox extends FullBox { - private long creationTime, modificationTime, timeScale, duration; - private double rate, volume; - private double[] matrix; - private long nextTrackID; - - public MovieHeaderBox() { - super("Movie Header Box"); - matrix = new double[9]; - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - final int len = (version==1) ? 8 : 4; - creationTime = in.readBytes(len); - modificationTime = in.readBytes(len); - timeScale = in.readBytes(4); - duration = Utils.detectUndetermined(in.readBytes(len)); - - rate = in.readFixedPoint(16, 16); - volume = in.readFixedPoint(8, 8); - - in.skipBytes(10); //reserved - - for(int i = 0; i<9; i++) { - if(i<6) matrix[i] = in.readFixedPoint(16, 16); - else matrix[i] = in.readFixedPoint(2, 30); - } - - in.skipBytes(24); //reserved - - nextTrackID = in.readBytes(4); - } - - /** - * The creation time is an integer that declares the creation time of the - * presentation in seconds since midnight, Jan. 1, 1904, in UTC time. - * @return the creation time - */ - public long getCreationTime() { - return creationTime; - } - - /** - * The modification time is an integer that declares the most recent time - * the presentation was modified in seconds since midnight, Jan. 1, 1904, - * in UTC time. - */ - public long getModificationTime() { - return modificationTime; - } - - /** - * The time-scale is an integer that specifies the time-scale for the entire - * presentation; this is the number of time units that pass in one second. - * For example, a time coordinate system that measures time in sixtieths of - * a second has a time scale of 60. - * @return the time-scale - */ - public long getTimeScale() { - return timeScale; - } - - /** - * The duration is an integer that declares length of the presentation (in - * the indicated timescale). This property is derived from the - * presentation's tracks: the value of this field corresponds to the - * duration of the longest track in the presentation. If the duration cannot - * be determined then duration is set to -1. - * @return the duration of the longest track - */ - public long getDuration() { - return duration; - } - - /** - * The rate is a floting point number that indicates the preferred rate - * to play the presentation; 1.0 is normal forward playback - * @return the playback rate - */ - public double getRate() { - return rate; - } - - /** - * The volume is a floating point number that indicates the preferred - * playback volume: 0.0 is mute, 1.0 is normal volume. - * @return the volume - */ - public double getVolume() { - return volume; - } - - /** - * Provides a transformation matrix for the video: - * [A,B,U,C,D,V,X,Y,W] - * A: width scale - * B: width rotate - * U: width angle - * C: height rotate - * D: height scale - * V: height angle - * X: position from left - * Y: position from top - * W: divider scale (restricted to 1.0) - * - * The normal values for scale are 1.0 and for rotate 0.0. - * The angles are restricted to 0.0. - * - * @return the transformation matrix for the video - */ - public double[] getTransformationMatrix() { - return matrix; - } - - /** - * The next-track-ID is a non-zero integer that indicates a value to use - * for the track ID of the next track to be added to this presentation. Zero - * is not a valid track ID value. The value shall be larger than the largest - * track-ID in use. If this value is equal to all 1s (32-bit), and a new - * media track is to be added, then a search must be made in the file for an - * unused track identifier. - * @return the ID for the next track - */ - public long getNextTrackID() { - return nextTrackID; - } + private long creationTime, modificationTime, timeScale, duration; + private double rate, volume; + private double[] matrix; + private long nextTrackID; + + public MovieHeaderBox() { + super("Movie Header Box"); + matrix = new double[9]; + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + int len = (version == 1) ? 8 : 4; + creationTime = in.readBytes(len); + modificationTime = in.readBytes(len); + timeScale = in.readBytes(4); + duration = Utils.detectUndetermined(in.readBytes(len)); + + rate = in.readFixedPoint(16, 16); + volume = in.readFixedPoint(8, 8); + + in.skipBytes(10); //reserved + + for (int i = 0; i < 9; i++) { + if (i < 6) matrix[i] = in.readFixedPoint(16, 16); + else matrix[i] = in.readFixedPoint(2, 30); + } + + in.skipBytes(24); //reserved + + nextTrackID = in.readBytes(4); + } + + /** + * The creation time is an integer that declares the creation time of the + * presentation in seconds since midnight, Jan. 1, 1904, in UTC time. + * + * @return the creation time + */ + public long getCreationTime() { + return creationTime; + } + + /** + * The modification time is an integer that declares the most recent time + * the presentation was modified in seconds since midnight, Jan. 1, 1904, + * in UTC time. + */ + public long getModificationTime() { + return modificationTime; + } + + /** + * The time-scale is an integer that specifies the time-scale for the entire + * presentation; this is the number of time units that pass in one second. + * For example, a time coordinate system that measures time in sixtieths of + * a second has a time scale of 60. + * + * @return the time-scale + */ + public long getTimeScale() { + return timeScale; + } + + /** + * The duration is an integer that declares length of the presentation (in + * the indicated timescale). This property is derived from the + * presentation's tracks: the value of this field corresponds to the + * duration of the longest track in the presentation. If the duration cannot + * be determined then duration is set to -1. + * + * @return the duration of the longest track + */ + public long getDuration() { + return duration; + } + + /** + * The rate is a floting point number that indicates the preferred rate + * to play the presentation; 1.0 is normal forward playback + * + * @return the playback rate + */ + public double getRate() { + return rate; + } + + /** + * The volume is a floating point number that indicates the preferred + * playback volume: 0.0 is mute, 1.0 is normal volume. + * + * @return the volume + */ + public double getVolume() { + return volume; + } + + /** + * Provides a transformation matrix for the video: + * [A,B,U,C,D,V,X,Y,W] + * A: width scale + * B: width rotate + * U: width angle + * C: height rotate + * D: height scale + * V: height angle + * X: position from left + * Y: position from top + * W: divider scale (restricted to 1.0) + *

+ * The normal values for scale are 1.0 and for rotate 0.0. + * The angles are restricted to 0.0. + * + * @return the transformation matrix for the video + */ + public double[] getTransformationMatrix() { + return matrix; + } + + /** + * The next-track-ID is a non-zero integer that indicates a value to use + * for the track ID of the next track to be added to this presentation. Zero + * is not a valid track ID value. The value shall be larger than the largest + * track-ID in use. If this value is equal to all 1s (32-bit), and a new + * media track is to be added, then a search must be made in the file for an + * unused track identifier. + * + * @return the ID for the next track + */ + public long getNextTrackID() { + return nextTrackID; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ObjectDescriptorBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ObjectDescriptorBox.java index f13c844d..17fba78f 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ObjectDescriptorBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ObjectDescriptorBox.java @@ -1,25 +1,27 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; import net.sourceforge.jaad.mp4.od.Descriptor; + public class ObjectDescriptorBox extends FullBox { - private Descriptor objectDescriptor; + private Descriptor objectDescriptor; - public ObjectDescriptorBox() { - super("Object Descriptor Box"); - } + public ObjectDescriptorBox() { + super("Object Descriptor Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - objectDescriptor = Descriptor.createDescriptor(in); - } + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + objectDescriptor = Descriptor.createDescriptor(in); + } - public Descriptor getObjectDescriptor() { - return objectDescriptor; - } + public Descriptor getObjectDescriptor() { + return objectDescriptor; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/OriginalFormatBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/OriginalFormatBox.java index 4fee9bdb..a835ad4c 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/OriginalFormatBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/OriginalFormatBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.BoxImpl; + /** * The Original Format Box contains the four-character-code of the original * un-transformed sample description. @@ -12,25 +14,25 @@ */ public class OriginalFormatBox extends BoxImpl { - private long originalFormat; - - public OriginalFormatBox() { - super("Original Format Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - originalFormat = in.readBytes(4); - } - - /** - * The original format is the four-character-code of the original - * un-transformed sample entry (e.g. 'mp4v' if the stream contains protected - * MPEG-4 visual material). - * - * @return the stream's original format - */ - public long getOriginalFormat() { - return originalFormat; - } + private long originalFormat; + + public OriginalFormatBox() { + super("Original Format Box"); + } + + @Override + public void decode(MP4Input in) throws IOException { + originalFormat = in.readBytes(4); + } + + /** + * The original format is the four-character-code of the original + * un-transformed sample entry (e.g. 'mp4v' if the stream contains protected + * MPEG-4 visual material). + * + * @return the stream's original format + */ + public long getOriginalFormat() { + return originalFormat; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PaddingBitBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PaddingBitBox.java index 9713df55..67f8e28f 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PaddingBitBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PaddingBitBox.java @@ -1,58 +1,60 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * In some streams the media samples do not occupy all bits of the bytes given * by the sample size, and are padded at the end to a byte boundary. In some * cases, it is necessary to record externally the number of padding bits used. * This table supplies that information. - * + * * @author in-somnia */ public class PaddingBitBox extends FullBox { - private int[] pad1, pad2; - - public PaddingBitBox() { - super("Padding Bit Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - final int sampleCount = (int) (in.readBytes(4)+1)/2; - pad1 = new int[sampleCount]; - pad2 = new int[sampleCount]; - - byte b; - for(int i = 0; i>4)&7; - //1 bit reserved - //3 bits pad2 - pad2[i] = b&7; - } - } - - /** - * Integer values from 0 to 7, indicating the number of bits at the end of - * sample (i*2)+1. - */ - public int[] getPad1() { - return pad1; - } - - /** - * Integer values from 0 to 7, indicating the number of bits at the end of - * sample (i*2)+2. - */ - public int[] getPad2() { - return pad2; - } + private int[] pad1, pad2; + + public PaddingBitBox() { + super("Padding Bit Box"); + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + + int sampleCount = (int) (in.readBytes(4) + 1) / 2; + pad1 = new int[sampleCount]; + pad2 = new int[sampleCount]; + + byte b; + for (int i = 0; i < sampleCount; i++) { + b = (byte) in.readByte(); + //1 bit reserved + //3 bits pad1 + pad1[i] = (b >> 4) & 7; + //1 bit reserved + //3 bits pad2 + pad2[i] = b & 7; + } + } + + /** + * Integer values from 0 to 7, indicating the number of bits at the end of + * sample (i*2)+1. + */ + public int[] getPad1() { + return pad1; + } + + /** + * Integer values from 0 to 7, indicating the number of bits at the end of + * sample (i*2)+2. + */ + public int[] getPad2() { + return pad2; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PixelAspectRatioBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PixelAspectRatioBox.java index 97f61ffc..a1047580 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PixelAspectRatioBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PixelAspectRatioBox.java @@ -1,29 +1,31 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.BoxImpl; + public class PixelAspectRatioBox extends BoxImpl { - private long hSpacing; - private long vSpacing; + private long hSpacing; + private long vSpacing; - public PixelAspectRatioBox() { - super("Pixel Aspect Ratio Box"); - } + public PixelAspectRatioBox() { + super("Pixel Aspect Ratio Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - hSpacing = in.readBytes(4); - vSpacing = in.readBytes(4); - } + @Override + public void decode(MP4Input in) throws IOException { + hSpacing = in.readBytes(4); + vSpacing = in.readBytes(4); + } - public long getHorizontalSpacing() { - return hSpacing; - } + public long getHorizontalSpacing() { + return hSpacing; + } - public long getVerticalSpacing() { - return vSpacing; - } + public long getVerticalSpacing() { + return vSpacing; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PrimaryItemBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PrimaryItemBox.java index f1c5a4e1..106320f8 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PrimaryItemBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/PrimaryItemBox.java @@ -1,14 +1,16 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * For a given handler, the primary data may be one of the referenced items when * it is desired that it be stored elsewhere, or divided into extents; or the * primary metadata may be contained in the meta-box (e.g. in an XML box). - * + *

* Either this box must occur, or there must be a box within the meta-box (e.g. * an XML box) containing the primary information in the format required by the * identified handler. @@ -17,25 +19,25 @@ */ public class PrimaryItemBox extends FullBox { - private int itemID; + private int itemID; - public PrimaryItemBox() { - super("Primary Item Box"); - } + public PrimaryItemBox() { + super("Primary Item Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - itemID = (int) in.readBytes(2); - } + itemID = (int) in.readBytes(2); + } - /** - * The item ID is the identifier of the primary item. - * - * @return the item ID - */ - public int getItemID() { - return itemID; - } + /** + * The item ID is the identifier of the primary item. + * + * @return the item ID + */ + public int getItemID() { + return itemID; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ProgressiveDownloadInformationBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ProgressiveDownloadInformationBox.java index 50a3f34b..9a99359b 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ProgressiveDownloadInformationBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/ProgressiveDownloadInformationBox.java @@ -3,46 +3,50 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * The Progressive download information box aids the progressive download of an * ISO file. The box contains pairs of numbers (to the end of the box) * specifying combinations of effective file download bitrate in units of * bytes/sec and a suggested initial playback delay in units of milliseconds. - * + *

* The download rate can be estimated from the download rate and obtain an upper * estimate for a suitable initial delay by linear interpolation between pairs, * or by extrapolation from the first or last entry. + * * @author in-somnia */ public class ProgressiveDownloadInformationBox extends FullBox { - private Map pairs; - - public ProgressiveDownloadInformationBox() { - super("Progressive Download Information Box"); - pairs = new HashMap(); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - long rate, initialDelay; - while(getLeft(in)>0) { - rate = in.readBytes(4); - initialDelay = in.readBytes(4); - pairs.put(rate, initialDelay); - } - } - - /** - * The map contains pairs of bitrates and playback delay. - * @return the information pairs - */ - public Map getInformationPairs() { - return pairs; - } + private Map pairs; + + public ProgressiveDownloadInformationBox() { + super("Progressive Download Information Box"); + pairs = new HashMap<>(); + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + + long rate, initialDelay; + while (getLeft(in) > 0) { + rate = in.readBytes(4); + initialDelay = in.readBytes(4); + pairs.put(rate, initialDelay); + } + } + + /** + * The map contains pairs of bitrates and playback delay. + * + * @return the information pairs + */ + public Map getInformationPairs() { + return pairs; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleDependencyBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleDependencyBox.java index e0cbac30..981a9776 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleDependencyBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleDependencyBox.java @@ -1,67 +1,68 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.BoxTypes; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * This box contains the sample dependencies for each switching sample. The * dependencies are stored in the table, one record for each sample. The size of - * the table is taken from the the Sample Size Box ('stsz') or Compact Sample + * the table is taken from the Sample Size Box ('stsz') or Compact Sample * Size Box ('stz2'). * * @author in-somnia */ public class SampleDependencyBox extends FullBox { - private int[] dependencyCount; - private int[][] relativeSampleNumber; + private int[] dependencyCount; + private int[][] relativeSampleNumber; - public SampleDependencyBox() { - super("Sample Dependency Box"); - } + public SampleDependencyBox() { + super("Sample Dependency Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - final int sampleCount = ((SampleSizeBox) parent.getChild(BoxTypes.SAMPLE_SIZE_BOX)).getSampleCount(); + int sampleCount = ((SampleSizeBox) parent.getChild(BoxTypes.SAMPLE_SIZE_BOX)).getSampleCount(); - int j; - for(int i = 0; i @@ -13,7 +15,7 @@ *

  • does this sample contain multiple (redundant) encodings of the data at * this time-instant (possibly with different dependencies)?
  • * - * + *

    * In the absence of this table: *

      *
    • the sync sample table answers the first question; in most video codecs, @@ -21,7 +23,7 @@ *
    • the dependency of other samples on this one is unknown
    • *
    • the existence of redundant coding is unknown
    • *
    - * + *

    * When performing 'trick' modes, such as fast-forward, it is possible to use * the first piece of information to locate independently decodable samples. * Similarly, when performing random access, it may be necessary to locate the @@ -33,82 +35,83 @@ * redundant codings. However, a redundant coding may have different * dependencies from the primary coding; if redundant codings are available, the * value of 'sample depends on' documents only the primary coding. - * + *

    * A Sample Dependency Box may also occur in the Track Fragment Box. - * + * * @author in-somnia */ public class SampleDependencyTypeBox extends FullBox { - private int[] sampleDependsOn, sampleIsDependedOn, sampleHasRedundancy; + private int[] sampleDependsOn, sampleIsDependedOn, sampleHasRedundancy; - public SampleDependencyTypeBox() { - super("Sample Dependency Type Box"); - } + public SampleDependencyTypeBox() { + super("Sample Dependency Type Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - //get number of samples from SampleSizeBox - long sampleCount = -1; - if(parent.hasChild(BoxTypes.SAMPLE_SIZE_BOX)) sampleCount = ((SampleSizeBox) parent.getChild(BoxTypes.SAMPLE_SIZE_BOX)).getSampleCount(); - //TODO: uncomment when CompactSampleSizeBox is implemented - //else if(parent.containsChild(BoxTypes.COMPACT_SAMPLE_SIZE_BOX)) sampleCount = ((CompactSampleSizeBox)parent.getChild(BoxTypes.SAMPLE_SIZE_BOX)).getSampleSize(); - sampleHasRedundancy = new int[(int) sampleCount]; - sampleIsDependedOn = new int[(int) sampleCount]; - sampleDependsOn = new int[(int) sampleCount]; + //get number of samples from SampleSizeBox + long sampleCount = -1; + if (parent.hasChild(BoxTypes.SAMPLE_SIZE_BOX)) + sampleCount = ((SampleSizeBox) parent.getChild(BoxTypes.SAMPLE_SIZE_BOX)).getSampleCount(); + //TODO: uncomment when CompactSampleSizeBox is implemented + //else if(parent.containsChild(BoxTypes.COMPACT_SAMPLE_SIZE_BOX)) sampleCount = ((CompactSampleSizeBox)parent.getChild(BoxTypes.SAMPLE_SIZE_BOX)).getSampleSize(); + sampleHasRedundancy = new int[(int) sampleCount]; + sampleIsDependedOn = new int[(int) sampleCount]; + sampleDependsOn = new int[(int) sampleCount]; - byte b; - for(int i = 0; i>2)&3; - sampleDependsOn[i] = (b>>4)&3; - } - } + byte b; + for (int i = 0; i < sampleCount; i++) { + b = (byte) in.readByte(); + /* 2 bits reserved + * 2 bits sampleDependsOn + * 2 bits sampleIsDependedOn + * 2 bits sampleHasRedundancy + */ + sampleHasRedundancy[i] = b & 3; + sampleIsDependedOn[i] = (b >> 2) & 3; + sampleDependsOn[i] = (b >> 4) & 3; + } + } - /** - * The 'sample depends on' field takes one of the following four values: - * 0: the dependency of this sample is unknown - * 1: this sample does depend on others (not an I picture) - * 2: this sample does not depend on others (I picture) - * 3: reserved - * - * @return a list of 'sample depends on' values for all samples - */ - public int[] getSampleDependsOn() { - return sampleDependsOn; - } + /** + * The 'sample depends on' field takes one of the following four values: + * 0: the dependency of this sample is unknown + * 1: this sample does depend on others (not an I picture) + * 2: this sample does not depend on others (I picture) + * 3: reserved + * + * @return an array of 'sample depends on' values for all samples + */ + public int[] getSampleDependsOn() { + return sampleDependsOn; + } - /** - * The 'sample is depended on' field takes one of the following four values: - * 0: the dependency of other samples on this sample is unknown - * 1: other samples may depend on this one (not disposable) - * 2: no other sample depends on this one (disposable) - * 3: reserved - * - * @return a list of 'sample is depended on' values for all samples - */ - public int[] getSampleIsDependedOn() { - return sampleIsDependedOn; - } + /** + * The 'sample is depended on' field takes one of the following four values: + * 0: the dependency of other samples on this sample is unknown + * 1: other samples may depend on this one (not disposable) + * 2: no other sample depends on this one (disposable) + * 3: reserved + * + * @return an array of 'sample is depended on' values for all samples + */ + public int[] getSampleIsDependedOn() { + return sampleIsDependedOn; + } - /** - * The 'sample has redundancy' field takes one of the following four values: - * 0: it is unknown whether there is redundant coding in this sample - * 1: there is redundant coding in this sample - * 2: there is no redundant coding in this sample - * 3: reserved - * - * @return a list of 'sample has redundancy' values for all samples - */ - public int[] getSampleHasRedundancy() { - return sampleHasRedundancy; - } + /** + * The 'sample has redundancy' field takes one of the following four values: + * 0: it is unknown whether there is redundant coding in this sample + * 1: there is redundant coding in this sample + * 2: there is no redundant coding in this sample + * 3: reserved + * + * @return a list of 'sample has redundancy' values for all samples + */ + public int[] getSampleHasRedundancy() { + return sampleHasRedundancy; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleDescriptionBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleDescriptionBox.java index 1c41d441..c50efee0 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleDescriptionBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleDescriptionBox.java @@ -1,26 +1,29 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.MP4InputStream; -import net.sourceforge.jaad.mp4.boxes.FullBox; import java.io.IOException; +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.boxes.FullBox; + + /** * The sample description table gives detailed information about the coding type * used, and any initialization information needed for that coding. + * * @author in-somnia */ public class SampleDescriptionBox extends FullBox { - public SampleDescriptionBox() { - super("Sample Description Box"); - } + public SampleDescriptionBox() { + super("Sample Description Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - final int entryCount = (int) in.readBytes(4); + int entryCount = (int) in.readBytes(4); - readChildren(in, entryCount); - } + readChildren(in, entryCount); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleGroupDescriptionBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleGroupDescriptionBox.java index 452b7e37..4b7a01ee 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleGroupDescriptionBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleGroupDescriptionBox.java @@ -1,26 +1,24 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.MP4InputStream; -import net.sourceforge.jaad.mp4.boxes.BoxFactory; -import net.sourceforge.jaad.mp4.boxes.BoxImpl; -import net.sourceforge.jaad.mp4.boxes.BoxTypes; -import net.sourceforge.jaad.mp4.boxes.FullBox; -import net.sourceforge.jaad.mp4.boxes.impl.samplegroupentries.*; import java.io.IOException; -import net.sourceforge.jaad.mp4.boxes.Box; + +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.boxes.FullBox; +import net.sourceforge.jaad.mp4.boxes.impl.samplegroupentries.SampleGroupDescriptionEntry; + /** * This description table gives information about the characteristics of sample * groups. The descriptive information is any other information needed to define * or characterize the sample group. - * + *

    * There may be multiple instances of this box if there is more than one sample * grouping for the samples in a track. Each instance of the * SampleGroupDescriptionBox has a type code that distinguishes different sample * groupings. Within a track, there shall be at most one instance of this box * with a particular grouping type. The associated SampleToGroupBox shall * indicate the same value for the grouping type. - * + *

    * The information is stored in the sample group description box after the * entry-count. An abstract entry type is defined and sample groupings shall * define derived types to represent the description of each sample group. For @@ -31,23 +29,23 @@ */ public class SampleGroupDescriptionBox extends FullBox { - private long groupingType, defaultLength, descriptionLength; - private SampleGroupDescriptionEntry[] entries; + private long groupingType, defaultLength, descriptionLength; + private SampleGroupDescriptionEntry[] entries; - public SampleGroupDescriptionBox() { - super("Sample Group Description Box"); - } + public SampleGroupDescriptionBox() { + super("Sample Group Description Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - groupingType = in.readBytes(4); - defaultLength = (version==1)?in.readBytes(4):0; + groupingType = in.readBytes(4); + defaultLength = (version == 1) ? in.readBytes(4) : 0; - final int entryCount = (int) in.readBytes(4); + int entryCount = (int) in.readBytes(4); - //TODO! + //TODO! /*final HandlerBox hdlr = (HandlerBox) parent.getParent().getParent().getChild(BoxTypes.HANDLER_BOX); final int handlerType = (int) hdlr.getHandlerType(); @@ -73,32 +71,33 @@ public void decode(MP4InputStream in) throws IOException { } if(boxClass!=null) { entries[i] = (SampleGroupDescriptionEntry) BoxFactory.parseBox(in, boxClass); - if(entries[i]!=null) left -= entries[i].getSize(); + if(entries[i]!=null) + left -= entries[i].getSize(); } }*/ - } + } - /** - * The grouping type is an integer that identifies the SampleToGroup box - * that is associated with this sample group description. - */ - public long getGroupingType() { - return groupingType; - } + /** + * The grouping type is an integer that identifies the SampleToGroup box + * that is associated with this sample group description. + */ + public long getGroupingType() { + return groupingType; + } - /** - * The default length indicates the length of every group entry (if the - * length is constant), or zero (0) if it is variable. - */ - public long getDefaultLength() { - return defaultLength; - } + /** + * The default length indicates the length of every group entry (if the + * length is constant), or zero (0) if it is variable. + */ + public long getDefaultLength() { + return defaultLength; + } - /** - * The description length indicates the length of an individual group entry, - * in the case it varies from entry to entry and default length is therefore 0. - */ - public long getDescriptionLength() { - return descriptionLength; - } + /** + * The description length indicates the length of an individual group entry, + * in the case it varies from entry to entry and default length is therefore 0. + */ + public long getDescriptionLength() { + return descriptionLength; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleScaleBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleScaleBox.java index 1f0c7ea4..0d8a2564 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleScaleBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleScaleBox.java @@ -1,9 +1,11 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * This box may be present in any visual sample entry. This box indicates the * scaling method that is applied when the width and height of the visual @@ -25,84 +27,85 @@ * in a sequence. The offset values are positive when the desired visual centre * is below or to the right of the image centre, and negative for offsets above * or to the left. - * + * * @author in-somnia */ public class SampleScaleBox extends FullBox { - private boolean constrained; - private int scaleMethod, displayCenterX, displayCenterY; + private boolean constrained; + private int scaleMethod, displayCenterX, displayCenterY; - public SampleScaleBox() { - super("Sample Scale Box"); - } + public SampleScaleBox() { + super("Sample Scale Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - //7 bits reserved, 1 bit flag - constrained = (in.read()&1)==1; + //7 bits reserved, 1 bit flag + constrained = (in.readByte() & 1) == 1; - scaleMethod = in.read(); - displayCenterX = (int) in.readBytes(2); - displayCenterY = (int) in.readBytes(2); - } + scaleMethod = in.readByte(); + displayCenterX = (int) in.readBytes(2); + displayCenterY = (int) in.readBytes(2); + } - /** - * If this flag is set, all samples described by this sample entry shall be - * scaled according to the method specified by the field 'scale_method'. - * Otherwise, it is recommended that all the samples be scaled according to - * the method specified by the field 'scale_method', but can be displayed in - * an implementation dependent way, which may include not scaling the image - * (i.e. neither to the width and height specified in the track header box, - * nor by the method indicated here). - * - * @return true if the samples should be scaled by the scale method - */ - public boolean isConstrained() { - return constrained; - } + /** + * If this flag is set, all samples described by this sample entry shall be + * scaled according to the method specified by the field 'scale_method'. + * Otherwise, it is recommended that all the samples be scaled according to + * the method specified by the field 'scale_method', but can be displayed in + * an implementation dependent way, which may include not scaling the image + * (i.e. neither to the width and height specified in the track header box, + * nor by the method indicated here). + * + * @return true if the samples should be scaled by the scale method + */ + public boolean isConstrained() { + return constrained; + } - /** - * The horizontal offset in pixels of the centre of the region that should - * be displayed by priority relative to the centre of the image. Default - * value is zero. Positive values indicate a display centre to the right of - * the image centre. - * - * @return the horizontal offset - */ - public int getDisplayCenterX() { - return displayCenterX; - } + /** + * The horizontal offset in pixels of the centre of the region that should + * be displayed by priority relative to the centre of the image. Default + * value is zero. Positive values indicate a display centre to the right of + * the image centre. + * + * @return the horizontal offset + */ + public int getDisplayCenterX() { + return displayCenterX; + } - /** - * The vertical offset in pixels of the centre of the region that should be - * displayed by priority relative to the centre of the image. Default value - * is zero. Positive values indicate a display centre below the image - * centre. - * @return the vertical offset - */ - public int getDisplayCenterY() { - return displayCenterY; - } + /** + * The vertical offset in pixels of the centre of the region that should be + * displayed by priority relative to the centre of the image. Default value + * is zero. Positive values indicate a display centre below the image + * centre. + * + * @return the vertical offset + */ + public int getDisplayCenterY() { + return displayCenterY; + } - /** - * The scale method is an integer that defines the scaling mode to be used. - * Of the 256 possible values the values 0 through 127 are reserved for use - * by ISO and values 128 through 255 are user-defined and are not specified - * in this International Standard; they may be used as determined by the - * application. Of the reserved values the following modes are currently - * defined: - * 1: scaling is done by 'fill' mode. - * 2: scaling is done by 'hidden' mode. - * 3: scaling is done by 'meet' mode. - * 4: scaling is done by 'slice' mode in the x-coordinate. - * 5: scaling is done by 'slice' mode in the y-coordinate. - * - * @return the scale method - */ - public int getScaleMethod() { - return scaleMethod; - } + /** + * The scale method is an integer that defines the scaling mode to be used. + * Of the 256 possible values the values 0 through 127 are reserved for use + * by ISO and values 128 through 255 are user-defined and are not specified + * in this International Standard; they may be used as determined by the + * application. Of the reserved values the following modes are currently + * defined: + * 1: scaling is done by 'fill' mode. + * 2: scaling is done by 'hidden' mode. + * 3: scaling is done by 'meet' mode. + * 4: scaling is done by 'slice' mode in the x-coordinate. + * 5: scaling is done by 'slice' mode in the y-coordinate. + * + * @return the scale method + */ + public int getScaleMethod() { + return scaleMethod; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleSizeBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleSizeBox.java index 286b8d6b..ade73b77 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleSizeBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleSizeBox.java @@ -1,63 +1,62 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.boxes.FullBox; -import net.sourceforge.jaad.mp4.MP4InputStream; import java.io.IOException; import java.util.Arrays; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.BoxTypes; +import net.sourceforge.jaad.mp4.boxes.FullBox; + public class SampleSizeBox extends FullBox { - private long sampleCount; - private long[] sampleSizes; - - public SampleSizeBox() { - super("Sample Size Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - final boolean compact = type==BoxTypes.COMPACT_SAMPLE_SIZE_BOX; - - final int sampleSize; - if(compact) { - in.skipBytes(3); - sampleSize = in.read(); - } - else sampleSize = (int) in.readBytes(4); - - sampleCount = in.readBytes(4); - sampleSizes = new long[(int) sampleCount]; - - if(compact) { - //compact: sampleSize can be 4, 8 or 16 bits - if(sampleSize==4) { - int x; - for(int i = 0; i>4)&0xF; - sampleSizes[i+1] = x&0xF; - } - } - else readSizes(in, sampleSize/8); - } - else if(sampleSize==0) readSizes(in, 4); - else Arrays.fill(sampleSizes, sampleSize); - } - - private void readSizes(MP4InputStream in, int len) throws IOException { - for(int i = 0; i> 4) & 0xF; + sampleSizes[i + 1] = x & 0xF; + } + } else readSizes(in, sampleSize / 8); + } else if (sampleSize == 0) readSizes(in, 4); + else Arrays.fill(sampleSizes, sampleSize); + } + + private void readSizes(MP4Input in, int len) throws IOException { + for (int i = 0; i < sampleCount; i++) { + sampleSizes[i] = in.readBytes(len); + } + } + + public int getSampleCount() { + return (int) sampleCount; + } + + public long[] getSampleSizes() { + return sampleSizes; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleToChunkBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleToChunkBox.java index 4114cf45..b8ff4fc7 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleToChunkBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/SampleToChunkBox.java @@ -1,42 +1,44 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.boxes.FullBox; -import net.sourceforge.jaad.mp4.MP4InputStream; import java.io.IOException; +import net.sourceforge.jaad.mp4.MP4Input; +import net.sourceforge.jaad.mp4.boxes.FullBox; + + public class SampleToChunkBox extends FullBox { - private long[] firstChunks, samplesPerChunk, sampleDescriptionIndex; + private long[] firstChunks, samplesPerChunk, sampleDescriptionIndex; - public SampleToChunkBox() { - super("Sample To Chunk Box"); - } + public SampleToChunkBox() { + super("Sample To Chunk Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - final int entryCount = (int) in.readBytes(4); - firstChunks = new long[entryCount]; - samplesPerChunk = new long[entryCount]; - sampleDescriptionIndex = new long[entryCount]; + int entryCount = (int) in.readBytes(4); + firstChunks = new long[entryCount]; + samplesPerChunk = new long[entryCount]; + sampleDescriptionIndex = new long[entryCount]; - for(int i = 0; i * There may be multiple instances of this box if there is more than one sample * grouping for the samples in a track. Each instance of the SampleToGroup box * has a type code that distinguishes different sample groupings. Within a @@ -21,61 +23,61 @@ */ public class SampleToGroupBox extends FullBox { - private long groupingType; - private long[] sampleCount, groupDescriptionIndex; + private long groupingType; + private long[] sampleCount, groupDescriptionIndex; - public SampleToGroupBox() { - super("Sample To Group Box"); - } + public SampleToGroupBox() { + super("Sample To Group Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - groupingType = in.readBytes(4); - final int entryCount = (int) in.readBytes(4); - sampleCount = new long[entryCount]; - groupDescriptionIndex = new long[entryCount]; + groupingType = in.readBytes(4); + int entryCount = (int) in.readBytes(4); + sampleCount = new long[entryCount]; + groupDescriptionIndex = new long[entryCount]; - for(int i = 0; i * Each entry in the ShadowSyncTable consists of a pair of sample numbers. The * first entry (shadowed-sample-number) indicates the number of the sample that * a shadow sync will be defined for. This should always be a non-sync sample * (e.g. a frame difference). The second sample number (sync-sample-number) * indicates the sample number of the sync sample (i.e. key frame) that can be * used when there is a random access at, or before, the shadowed-sample-number. - * + *

    * The entries in the ShadowSyncBox shall be sorted based on the * shadowed-sample-number field. The shadow sync samples are normally placed in * an area of the track that is not presented during normal play (edited out by * means of an edit list), though this is not a requirement. The shadow sync * table can be ignored and the track will play (and seek) correctly if it is * ignored (though perhaps not optimally). - * + *

    * The ShadowSyncSample replaces, not augments, the sample that it shadows (i.e. * the next sample sent is shadowed-sample-number+1). The shadow sync sample is * treated as if it occurred at the time of the sample it shadows, having the * duration of the sample it shadows. - * + *

    * Hinting and transmission might become more complex if a shadow sample is used * also as part of normal playback, or is used more than once as a shadow. In * this case the hint track might need separate shadow syncs, all of which can * get their media data from the one shadow sync in the media track, to allow - * for the different time-stamps etc. needed in their headers. + * for the different time-stamps etc. needed in their headers. * * @author in-somnia */ public class ShadowSyncSampleBox extends FullBox { - private long[][] sampleNumbers; + private long[][] sampleNumbers; + + public ShadowSyncSampleBox() { + super("Shadow Sync Sample Box"); + } - public ShadowSyncSampleBox() { - super("Shadow Sync Sample Box"); - } + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - final int entryCount = (int) in.readBytes(4); - sampleNumbers = new long[entryCount][2]; + int entryCount = (int) in.readBytes(4); + sampleNumbers = new long[entryCount][2]; - for(int i = 0; i * If the sync sample box is not present, every sample is a random access point. * * @author in-somnia */ public class SyncSampleBox extends FullBox { - private long[] sampleNumbers; - - public SyncSampleBox() { - super("Sync Sample Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - final int entryCount = (int) in.readBytes(4); - sampleNumbers = new long[entryCount]; - for(int i = 0; i>24)&3); - } - - /** - * The default 'sample is depended on' value as defined in the - * SampleDependencyTypeBox. - * - * @see SampleDependencyTypeBox#getSampleIsDependedOn() - * @return the default 'sample is depended on' value - */ - public int getSampleIsDependedOn() { - return (int) ((defaultSampleFlags>>22)&3); - } - - /** - * The default 'sample has redundancy' value as defined in the - * SampleDependencyBox. - * - * @see SampleDependencyTypeBox#getSampleHasRedundancy() - * @return the default 'sample has redundancy' value - */ - public int getSampleHasRedundancy() { - return (int) ((defaultSampleFlags>>20)&3); - } - - /** - * The default padding value as defined in the PaddingBitBox. - * - * @see PaddingBitBox#getPad1() - * @return the default padding value - */ - public int getSamplePaddingValue() { - return (int) ((defaultSampleFlags>>17)&7); - } - - public boolean isSampleDifferenceSample() { - return ((defaultSampleFlags>>16)&1)==1; - } - - /** - * The default degradation priority for the samples. - * @return the default degradation priority - */ - public int getSampleDegradationPriority() { - return (int) (defaultSampleFlags&0xFFFF); - } + private long trackID; + private long defaultSampleDescriptionIndex, defaultSampleDuration, defaultSampleSize; + private long defaultSampleFlags; + + public TrackExtendsBox() { + super("Track Extends Box"); + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + + trackID = in.readBytes(4); + defaultSampleDescriptionIndex = in.readBytes(4); + defaultSampleDuration = in.readBytes(4); + defaultSampleSize = in.readBytes(4); + /* 6 bits reserved + * 2 bits sampleDependsOn + * 2 bits sampleIsDependedOn + * 2 bits sampleHasRedundancy + * 3 bits samplePaddingValue + * 1 bit sampleIsDifferenceSample + * 16 bits sampleDegradationPriority + */ + defaultSampleFlags = in.readBytes(4); + } + + /** + * The track ID identifies the track; this shall be the track ID of a track + * in the Movie Box. + * + * @return the track ID + */ + public long getTrackID() { + return trackID; + } + + /** + * The default sample description index used in the track fragments. + * + * @return the default sample description index + */ + public long getDefaultSampleDescriptionIndex() { + return defaultSampleDescriptionIndex; + } + + /** + * The default sample duration used in the track fragments. + * + * @return the default sample duration + */ + public long getDefaultSampleDuration() { + return defaultSampleDuration; + } + + /** + * The default sample size used in the track fragments. + * + * @return the default sample size + */ + public long getDefaultSampleSize() { + return defaultSampleSize; + } + + /** + * The default 'sample depends on' value as defined in the + * SampleDependencyTypeBox. + * + * @return the default 'sample depends on' value + * @see SampleDependencyTypeBox#getSampleDependsOn() + */ + public int getSampleDependsOn() { + return (int) ((defaultSampleFlags >> 24) & 3); + } + + /** + * The default 'sample is depended on' value as defined in the + * SampleDependencyTypeBox. + * + * @return the default 'sample is depended on' value + * @see SampleDependencyTypeBox#getSampleIsDependedOn() + */ + public int getSampleIsDependedOn() { + return (int) ((defaultSampleFlags >> 22) & 3); + } + + /** + * The default 'sample has redundancy' value as defined in the + * SampleDependencyBox. + * + * @return the default 'sample has redundancy' value + * @see SampleDependencyTypeBox#getSampleHasRedundancy() + */ + public int getSampleHasRedundancy() { + return (int) ((defaultSampleFlags >> 20) & 3); + } + + /** + * The default padding value as defined in the PaddingBitBox. + * + * @return the default padding value + * @see PaddingBitBox#getPad1() + */ + public int getSamplePaddingValue() { + return (int) ((defaultSampleFlags >> 17) & 7); + } + + public boolean isSampleDifferenceSample() { + return ((defaultSampleFlags >> 16) & 1) == 1; + } + + /** + * The default degradation priority for the samples. + * + * @return the default degradation priority + */ + public int getSampleDegradationPriority() { + return (int) (defaultSampleFlags & 0xFFFF); + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentHeaderBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentHeaderBox.java index bfd25ff1..f2511216 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentHeaderBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentHeaderBox.java @@ -1,100 +1,102 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * Each movie fragment can add zero or more fragments to each track; and a track * fragment can add zero or more contiguous runs of samples. The track fragment * header sets up information and defaults used for those runs of samples. - * + * * @author in-somnia */ public class TrackFragmentHeaderBox extends FullBox { - private long trackID; - private boolean baseDataOffsetPresent, sampleDescriptionIndexPresent, - defaultSampleDurationPresent, defaultSampleSizePresent, - defaultSampleFlagsPresent; - private boolean durationIsEmpty; - private long baseDataOffset, sampleDescriptionIndex, defaultSampleDuration, - defaultSampleSize, defaultSampleFlags; + private long trackID; + private boolean baseDataOffsetPresent, sampleDescriptionIndexPresent, + defaultSampleDurationPresent, defaultSampleSizePresent, + defaultSampleFlagsPresent; + private boolean durationIsEmpty; + private long baseDataOffset, sampleDescriptionIndex, defaultSampleDuration, + defaultSampleSize, defaultSampleFlags; - public TrackFragmentHeaderBox() { - super("Track Fragment Header Box"); - } + public TrackFragmentHeaderBox() { + super("Track Fragment Header Box"); + } - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); - trackID = in.readBytes(4); + trackID = in.readBytes(4); - //optional fields - baseDataOffsetPresent = ((flags&1)==1); - baseDataOffset = baseDataOffsetPresent ? in.readBytes(8) : 0; + //optional fields + baseDataOffsetPresent = ((flags & 1) == 1); + baseDataOffset = baseDataOffsetPresent ? in.readBytes(8) : 0; - sampleDescriptionIndexPresent = ((flags&2)==2); - sampleDescriptionIndex = sampleDescriptionIndexPresent ? in.readBytes(4) : 0; + sampleDescriptionIndexPresent = ((flags & 2) == 2); + sampleDescriptionIndex = sampleDescriptionIndexPresent ? in.readBytes(4) : 0; - defaultSampleDurationPresent = ((flags&8)==8); - defaultSampleDuration = defaultSampleDurationPresent ? in.readBytes(4) : 0; + defaultSampleDurationPresent = ((flags & 8) == 8); + defaultSampleDuration = defaultSampleDurationPresent ? in.readBytes(4) : 0; - defaultSampleSizePresent = ((flags&16)==16); - defaultSampleSize = defaultSampleSizePresent ? in.readBytes(4) : 0; + defaultSampleSizePresent = ((flags & 16) == 16); + defaultSampleSize = defaultSampleSizePresent ? in.readBytes(4) : 0; - defaultSampleFlagsPresent = ((flags&32)==32); - defaultSampleFlags = defaultSampleFlagsPresent ? in.readBytes(4) : 0; + defaultSampleFlagsPresent = ((flags & 32) == 32); + defaultSampleFlags = defaultSampleFlagsPresent ? in.readBytes(4) : 0; - durationIsEmpty = ((flags&0x10000)==0x10000); - } + durationIsEmpty = ((flags & 0x10000) == 0x10000); + } - public long getTrackID() { - return trackID; - } + public long getTrackID() { + return trackID; + } - public boolean isBaseDataOffsetPresent() { - return baseDataOffsetPresent; - } + public boolean isBaseDataOffsetPresent() { + return baseDataOffsetPresent; + } - public long getBaseDataOffset() { - return baseDataOffset; - } + public long getBaseDataOffset() { + return baseDataOffset; + } - public boolean isSampleDescriptionIndexPresent() { - return sampleDescriptionIndexPresent; - } + public boolean isSampleDescriptionIndexPresent() { + return sampleDescriptionIndexPresent; + } - public long getSampleDescriptionIndex() { - return sampleDescriptionIndex; - } + public long getSampleDescriptionIndex() { + return sampleDescriptionIndex; + } - public boolean isDefaultSampleDurationPresent() { - return defaultSampleDurationPresent; - } + public boolean isDefaultSampleDurationPresent() { + return defaultSampleDurationPresent; + } - public long getDefaultSampleDuration() { - return defaultSampleDuration; - } + public long getDefaultSampleDuration() { + return defaultSampleDuration; + } - public boolean isDefaultSampleSizePresent() { - return defaultSampleSizePresent; - } + public boolean isDefaultSampleSizePresent() { + return defaultSampleSizePresent; + } - public long getDefaultSampleSize() { - return defaultSampleSize; - } + public long getDefaultSampleSize() { + return defaultSampleSize; + } - public boolean isDefaultSampleFlagsPresent() { - return defaultSampleFlagsPresent; - } + public boolean isDefaultSampleFlagsPresent() { + return defaultSampleFlagsPresent; + } - public long getDefaultSampleFlags() { - return defaultSampleFlags; - } + public long getDefaultSampleFlags() { + return defaultSampleFlags; + } - public boolean isDurationIsEmpty() { - return durationIsEmpty; - } + public boolean isDurationIsEmpty() { + return durationIsEmpty; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentRandomAccessBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentRandomAccessBox.java index d7ecff94..dacc9be9 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentRandomAccessBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentRandomAccessBox.java @@ -1,103 +1,105 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + public class TrackFragmentRandomAccessBox extends FullBox { - private long trackID; - private int entryCount; - private long[] times, moofOffsets, trafNumbers, trunNumbers, sampleNumbers; - - public TrackFragmentRandomAccessBox() { - super("Track Fragment Random Access Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - trackID = in.readBytes(4); - //26 bits reserved, 2 bits trafSizeLen, 2 bits trunSizeLen, 2 bits sampleSizeLen - final long l = in.readBytes(4); - final int trafNumberLen = (int) ((l>>4)&0x3)+1; - final int trunNumberLen = (int) ((l>>2)&0x3)+1; - final int sampleNumberLen = (int) (l&0x3)+1; - entryCount = (int) in.readBytes(4); - - final int len = (version==1) ? 8 : 4; - - for(int i = 0; i> 4) & 0x3) + 1; + int trunNumberLen = (int) ((l >> 2) & 0x3) + 1; + int sampleNumberLen = (int) (l & 0x3) + 1; + entryCount = (int) in.readBytes(4); + + int len = (version == 1) ? 8 : 4; + + for (int i = 0; i < entryCount; i++) { + times[i] = in.readBytes(len); + moofOffsets[i] = in.readBytes(len); + trafNumbers[i] = in.readBytes(trafNumberLen); + trunNumbers[i] = in.readBytes(trunNumberLen); + sampleNumbers[i] = in.readBytes(sampleNumberLen); + } + } + + /** + * The track ID is an integer identifying the associated track. + * + * @return the track ID + */ + public long getTrackID() { + return trackID; + } + + public int getEntryCount() { + return entryCount; + } + + /** + * The time is an integer that indicates the presentation time of the random + * access sample in units defined in the 'mdhd' of the associated track. + * + * @return the times of all entries + */ + public long[] getTimes() { + return times; + } + + /** + * The moof-Offset is an integer that gives the offset of the 'moof' used in + * the entry. Offset is the byte-offset between the beginning of the file + * and the beginning of the 'moof'. + * + * @return the offsets for all entries + */ + public long[] getMoofOffsets() { + return moofOffsets; + } + + /** + * The 'traf' number that contains the random accessible sample. The number + * ranges from 1 (the first 'traf' is numbered 1) in each 'moof'. + * + * @return the 'traf' numbers for all entries + */ + public long[] getTrafNumbers() { + return trafNumbers; + } + + /** + * The 'trun' number that contains the random accessible sample. The number + * ranges from 1 in each 'traf'. + * + * @return the 'trun' numbers for all entries + */ + public long[] getTrunNumbers() { + return trunNumbers; + } + + /** + * The sample number that contains the random accessible sample. The number + * ranges from 1 in each 'trun'. + * + * @return the sample numbers for all entries + */ + public long[] getSampleNumbers() { + return sampleNumbers; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentRunBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentRunBox.java index 3e31c08c..b1ee2da7 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentRunBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackFragmentRunBox.java @@ -1,116 +1,118 @@ package net.sourceforge.jaad.mp4.boxes.impl; import java.io.IOException; -import net.sourceforge.jaad.mp4.MP4InputStream; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; + /** * Within the Track Fragment Box, there are zero or more Track Run Boxes. If the * duration-is-empty flag is set in the track fragment box, there are no track * runs. A track run documents a contiguous set of samples for a track. - * + *

    * If the data-offset is not present, then the data for this run starts * immediately after the data of the previous run, or at the base-data-offset * defined by the track fragment header if this is the first run in a track * fragment. * If the data-offset is present, it is relative to the base-data-offset * established in the track fragment header. - * + * * @author in-somnia */ public class TrackFragmentRunBox extends FullBox { - private int sampleCount; - private boolean dataOffsetPresent, firstSampleFlagsPresent; - private long dataOffset, firstSampleFlags; - private boolean sampleDurationPresent, sampleSizePresent, sampleFlagsPresent, - sampleCompositionTimeOffsetPresent; - private long[] sampleDuration, sampleSize, sampleFlags, sampleCompositionTimeOffset; - - public TrackFragmentRunBox() { - super("Track Fragment Run Box"); - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - sampleCount = (int) in.readBytes(4); - - //optional fields - dataOffsetPresent = ((flags&1)==1); - if(dataOffsetPresent) dataOffset = in.readBytes(4); - - firstSampleFlagsPresent = ((flags&4)==4); - if(firstSampleFlagsPresent) firstSampleFlags = in.readBytes(4); - - //all fields are optional - sampleDurationPresent = ((flags&0x100)==0x100); - if(sampleDurationPresent) sampleDuration = new long[sampleCount]; - sampleSizePresent = ((flags&0x200)==0x200); - if(sampleSizePresent) sampleSize = new long[sampleCount]; - sampleFlagsPresent = ((flags&0x400)==0x400); - if(sampleFlagsPresent) sampleFlags = new long[sampleCount]; - sampleCompositionTimeOffsetPresent = ((flags&0x800)==0x800); - if(sampleCompositionTimeOffsetPresent) sampleCompositionTimeOffset = new long[sampleCount]; - - for(int i = 0; i0; i++) { - if(sampleDurationPresent) sampleDuration[i] = in.readBytes(4); - if(sampleSizePresent) sampleSize[i] = in.readBytes(4); - if(sampleFlagsPresent) sampleFlags[i] = in.readBytes(4); - if(sampleCompositionTimeOffsetPresent) sampleCompositionTimeOffset[i] = in.readBytes(4); - } - } - - public int getSampleCount() { - return sampleCount; - } - - public boolean isDataOffsetPresent() { - return dataOffsetPresent; - } - - public long getDataOffset() { - return dataOffset; - } - - public boolean isFirstSampleFlagsPresent() { - return firstSampleFlagsPresent; - } - - public long getFirstSampleFlags() { - return firstSampleFlags; - } - - public boolean isSampleDurationPresent() { - return sampleDurationPresent; - } - - public long[] getSampleDuration() { - return sampleDuration; - } - - public boolean isSampleSizePresent() { - return sampleSizePresent; - } - - public long[] getSampleSize() { - return sampleSize; - } - - public boolean isSampleFlagsPresent() { - return sampleFlagsPresent; - } - - public long[] getSampleFlags() { - return sampleFlags; - } - - public boolean isSampleCompositionTimeOffsetPresent() { - return sampleCompositionTimeOffsetPresent; - } - - public long[] getSampleCompositionTimeOffset() { - return sampleCompositionTimeOffset; - } + private int sampleCount; + private boolean dataOffsetPresent, firstSampleFlagsPresent; + private long dataOffset, firstSampleFlags; + private boolean sampleDurationPresent, sampleSizePresent, sampleFlagsPresent, + sampleCompositionTimeOffsetPresent; + private long[] sampleDuration, sampleSize, sampleFlags, sampleCompositionTimeOffset; + + public TrackFragmentRunBox() { + super("Track Fragment Run Box"); + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + + sampleCount = (int) in.readBytes(4); + + //optional fields + dataOffsetPresent = ((flags & 1) == 1); + if (dataOffsetPresent) dataOffset = in.readBytes(4); + + firstSampleFlagsPresent = ((flags & 4) == 4); + if (firstSampleFlagsPresent) firstSampleFlags = in.readBytes(4); + + //all fields are optional + sampleDurationPresent = ((flags & 0x100) == 0x100); + if (sampleDurationPresent) sampleDuration = new long[sampleCount]; + sampleSizePresent = ((flags & 0x200) == 0x200); + if (sampleSizePresent) sampleSize = new long[sampleCount]; + sampleFlagsPresent = ((flags & 0x400) == 0x400); + if (sampleFlagsPresent) sampleFlags = new long[sampleCount]; + sampleCompositionTimeOffsetPresent = ((flags & 0x800) == 0x800); + if (sampleCompositionTimeOffsetPresent) sampleCompositionTimeOffset = new long[sampleCount]; + + for (int i = 0; i < sampleCount && getLeft(in) > 0; i++) { + if (sampleDurationPresent) sampleDuration[i] = in.readBytes(4); + if (sampleSizePresent) sampleSize[i] = in.readBytes(4); + if (sampleFlagsPresent) sampleFlags[i] = in.readBytes(4); + if (sampleCompositionTimeOffsetPresent) sampleCompositionTimeOffset[i] = in.readBytes(4); + } + } + + public int getSampleCount() { + return sampleCount; + } + + public boolean isDataOffsetPresent() { + return dataOffsetPresent; + } + + public long getDataOffset() { + return dataOffset; + } + + public boolean isFirstSampleFlagsPresent() { + return firstSampleFlagsPresent; + } + + public long getFirstSampleFlags() { + return firstSampleFlags; + } + + public boolean isSampleDurationPresent() { + return sampleDurationPresent; + } + + public long[] getSampleDuration() { + return sampleDuration; + } + + public boolean isSampleSizePresent() { + return sampleSizePresent; + } + + public long[] getSampleSize() { + return sampleSize; + } + + public boolean isSampleFlagsPresent() { + return sampleFlagsPresent; + } + + public long[] getSampleFlags() { + return sampleFlags; + } + + public boolean isSampleCompositionTimeOffsetPresent() { + return sampleCompositionTimeOffsetPresent; + } + + public long[] getSampleCompositionTimeOffset() { + return sampleCompositionTimeOffset; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackHeaderBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackHeaderBox.java index 69d0dd96..c97ca55e 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackHeaderBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackHeaderBox.java @@ -1,10 +1,12 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.MP4InputStream; import java.io.IOException; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.FullBox; import net.sourceforge.jaad.mp4.boxes.Utils; + /** * This box specifies the characteristics of a single track. Exactly one Track * Header Box is contained in a track. In the absence of an edit list, the @@ -19,182 +21,194 @@ * (logically) before any transformation or placement caused by a layup or * composition system. Track (and movie) matrices, if used, also operate in this * uniformly-scaled space. + * * @author in-somnia */ public class TrackHeaderBox extends FullBox { - private boolean enabled, inMovie, inPreview; - private long creationTime, modificationTime, duration; - private int trackID, layer, alternateGroup; - private double volume, width, height; - private double[] matrix; - - public TrackHeaderBox() { - super("Track Header Box"); - matrix = new double[9]; - } - - @Override - public void decode(MP4InputStream in) throws IOException { - super.decode(in); - - enabled = (flags&1)==1; - inMovie = (flags&2)==2; - inPreview = (flags&4)==4; - - final int len = (version==1) ? 8 : 4; - creationTime = in.readBytes(len); - modificationTime = in.readBytes(len); - trackID = (int) in.readBytes(4); - in.skipBytes(4); //reserved - duration = Utils.detectUndetermined(in.readBytes(len)); - - in.skipBytes(8); //reserved - - layer = (int) in.readBytes(2); - alternateGroup = (int) in.readBytes(2); - volume = in.readFixedPoint(8, 8); - - in.skipBytes(2); //reserved - - for(int i = 0; i<9; i++) { - if(i<6) matrix[i] = in.readFixedPoint(16, 16); - else matrix[i] = in.readFixedPoint(2, 30); - } - - width = in.readFixedPoint(16, 16); - height = in.readFixedPoint(16, 16); - } - - /** - * A flag indicating that the track is enabled. A disabled track is treated - * as if it were not present. - * @return true if the track is enabled - */ - public boolean isTrackEnabled() { - return enabled; - } - - /** - * A flag indicating that the track is used in the presentation. - * @return true if the track is used - */ - public boolean isTrackInMovie() { - return inMovie; - } - - /** - * A flag indicating that the track is used when previewing the - * presentation. - * @return true if the track is used in previews - */ - public boolean isTrackInPreview() { - return inPreview; - } - - /** - * The creation time is an integer that declares the creation time of the - * presentation in seconds since midnight, Jan. 1, 1904, in UTC time. - * @return the creation time - */ - public long getCreationTime() { - return creationTime; - } - - /** - * The modification time is an integer that declares the most recent time - * the presentation was modified in seconds since midnight, Jan. 1, 1904, - * in UTC time. - */ - public long getModificationTime() { - return modificationTime; - } - - /** - * The track ID is an integer that uniquely identifies this track over the - * entire life-time of this presentation. Track IDs are never re-used and - * cannot be zero. - * @return the track's ID - */ - public int getTrackID() { - return trackID; - } - - /** - * The duration is an integer that indicates the duration of this track (in - * the timescale indicated in the Movie Header Box). The value of this field - * is equal to the sum of the durations of all of the track's edits. If - * there is no edit list, then the duration is the sum of the sample - * durations, converted into the timescale in the Movie Header Box. If the - * duration of this track cannot be determined then this value is -1. - * @return the duration this track - */ - public long getDuration() { - return duration; - } - - /** - * The layer specifies the front-to-back ordering of video tracks; tracks - * with lower numbers are closer to the viewer. 0 is the normal value, and - * -1 would be in front of track 0, and so on. - * @return the layer - */ - public int getLayer() { - return layer; - } - - /** - * The alternate group is an integer that specifies a group or collection - * of tracks. If this field is 0 there is no information on possible - * relations to other tracks. If this field is not 0, it should be the same - * for tracks that contain alternate data for one another and different for - * tracks belonging to different such groups. Only one track within an - * alternate group should be played or streamed at any one time, and must be - * distinguishable from other tracks in the group via attributes such as - * bitrate, codec, language, packet size etc. A group may have only one - * member. - * @return the alternate group - */ - public int getAlternateGroup() { - return alternateGroup; - } - - /** - * The volume is a floating point number that indicates the preferred - * playback volume: 0.0 is mute, 1.0 is normal volume. - * @return the volume - */ - public double getVolume() { - return volume; - } - - /** - * The width specifies the track's visual presentation width as a floating - * point values. This needs not be the same as the pixel width of the - * images, which is documented in the sample description(s); all images in - * the sequence are scaled to this width, before any overall transformation - * of the track represented by the matrix. The pixel dimensions of the - * images are the default values. - * @return the image width - */ - public double getWidth() { - return width; - } - - /** - * The height specifies the track's visual presentation height as a floating - * point value. This needs not be the same as the pixel height of the - * images, which is documented in the sample description(s); all images in - * the sequence are scaled to this height, before any overall transformation - * of the track represented by the matrix. The pixel dimensions of the - * images are the default values. - * @return the image height - */ - public double getHeight() { - return height; - } - - public double[] getMatrix() { - return matrix; - } + private boolean enabled, inMovie, inPreview; + private long creationTime, modificationTime, duration; + private int trackID, layer, alternateGroup; + private double volume, width, height; + private double[] matrix; + + public TrackHeaderBox() { + super("Track Header Box"); + matrix = new double[9]; + } + + @Override + public void decode(MP4Input in) throws IOException { + super.decode(in); + + enabled = (flags & 1) == 1; + inMovie = (flags & 2) == 2; + inPreview = (flags & 4) == 4; + + int len = (version == 1) ? 8 : 4; + creationTime = in.readBytes(len); + modificationTime = in.readBytes(len); + trackID = (int) in.readBytes(4); + in.skipBytes(4); //reserved + duration = Utils.detectUndetermined(in.readBytes(len)); + + in.skipBytes(8); //reserved + + layer = (int) in.readBytes(2); + alternateGroup = (int) in.readBytes(2); + volume = in.readFixedPoint(8, 8); + + in.skipBytes(2); //reserved + + for (int i = 0; i < 9; i++) { + if (i < 6) matrix[i] = in.readFixedPoint(16, 16); + else matrix[i] = in.readFixedPoint(2, 30); + } + + width = in.readFixedPoint(16, 16); + height = in.readFixedPoint(16, 16); + } + + /** + * A flag indicating that the track is enabled. A disabled track is treated + * as if it were not present. + * + * @return true if the track is enabled + */ + public boolean isTrackEnabled() { + return enabled; + } + + /** + * A flag indicating that the track is used in the presentation. + * + * @return true if the track is used + */ + public boolean isTrackInMovie() { + return inMovie; + } + + /** + * A flag indicating that the track is used when previewing the + * presentation. + * + * @return true if the track is used in previews + */ + public boolean isTrackInPreview() { + return inPreview; + } + + /** + * The creation time is an integer that declares the creation time of the + * presentation in seconds since midnight, Jan. 1, 1904, in UTC time. + * + * @return the creation time + */ + public long getCreationTime() { + return creationTime; + } + + /** + * The modification time is an integer that declares the most recent time + * the presentation was modified in seconds since midnight, Jan. 1, 1904, + * in UTC time. + */ + public long getModificationTime() { + return modificationTime; + } + + /** + * The track ID is an integer that uniquely identifies this track over the + * entire life-time of this presentation. Track IDs are never re-used and + * cannot be zero. + * + * @return the track's ID + */ + public int getTrackID() { + return trackID; + } + + /** + * The duration is an integer that indicates the duration of this track (in + * the timescale indicated in the Movie Header Box). The value of this field + * is equal to the sum of the durations of all of the track's edits. If + * there is no edit list, then the duration is the sum of the sample + * durations, converted into the timescale in the Movie Header Box. If the + * duration of this track cannot be determined then this value is -1. + * + * @return the duration this track + */ + public long getDuration() { + return duration; + } + + /** + * The layer specifies the front-to-back ordering of video tracks; tracks + * with lower numbers are closer to the viewer. 0 is the normal value, and + * -1 would be in front of track 0, and so on. + * + * @return the layer + */ + public int getLayer() { + return layer; + } + + /** + * The alternate group is an integer that specifies a group or collection + * of tracks. If this field is 0 there is no information on possible + * relations to other tracks. If this field is not 0, it should be the same + * for tracks that contain alternate data for one another and different for + * tracks belonging to different such groups. Only one track within an + * alternate group should be played or streamed at any one time, and must be + * distinguishable from other tracks in the group via attributes such as + * bitrate, codec, language, packet size etc. A group may have only one + * member. + * + * @return the alternate group + */ + public int getAlternateGroup() { + return alternateGroup; + } + + /** + * The volume is a floating point number that indicates the preferred + * playback volume: 0.0 is mute, 1.0 is normal volume. + * + * @return the volume + */ + public double getVolume() { + return volume; + } + + /** + * The width specifies the track's visual presentation width as a floating + * point values. This needs not be the same as the pixel width of the + * images, which is documented in the sample description(s); all images in + * the sequence are scaled to this width, before any overall transformation + * of the track represented by the matrix. The pixel dimensions of the + * images are the default values. + * + * @return the image width + */ + public double getWidth() { + return width; + } + + /** + * The height specifies the track's visual presentation height as a floating + * point value. This needs not be the same as the pixel height of the + * images, which is documented in the sample description(s); all images in + * the sequence are scaled to this height, before any overall transformation + * of the track represented by the matrix. The pixel dimensions of the + * images are the default values. + * + * @return the image height + */ + public double getHeight() { + return height; + } + + public double[] getMatrix() { + return matrix; + } } diff --git a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackReferenceBox.java b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackReferenceBox.java index 8cb404ec..65654d24 100644 --- a/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackReferenceBox.java +++ b/src/main/java/net/sourceforge/jaad/mp4/boxes/impl/TrackReferenceBox.java @@ -1,65 +1,70 @@ package net.sourceforge.jaad.mp4.boxes.impl; -import net.sourceforge.jaad.mp4.MP4InputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; + +import net.sourceforge.jaad.mp4.MP4Input; import net.sourceforge.jaad.mp4.boxes.BoxImpl; + /** * The Track Reference Box provides a reference from the containing track to * another track in the presentation. These references are typed. A 'hint' * reference links from the containing hint track to the media data that it * hints. A content description reference 'cdsc' links a descriptive or * metadata track to the content which it describes. - * + *

    * Exactly one Track Reference Box can be contained within the Track Box. - * + *

    * If this box is not present, the track is not referencing any other track in * any way. The reference array is sized to fill the reference type box. + * * @author in-somnia */ public class TrackReferenceBox extends BoxImpl { - private String referenceType; - private List trackIDs; + private String referenceType; + private List trackIDs; - public TrackReferenceBox() { - super("Track Reference Box"); - trackIDs = new ArrayList(); - } + public TrackReferenceBox() { + super("Track Reference Box"); + trackIDs = new ArrayList<>(); + } - @Override - public void decode(MP4InputStream in) throws IOException { - referenceType = in.readString(4); + @Override + public void decode(MP4Input in) throws IOException { + referenceType = in.readString(4); - while(getLeft(in)>3) { - trackIDs.add(in.readBytes(4)); - } - } + while (getLeft(in) > 3) { + trackIDs.add(in.readBytes(4)); + } + } - /** - * The reference type shall be set to one of the following values: - *