项目作者: ratthapon

项目描述 :
A fractal coding framework for audio data
高级语言: Java
项目地址: git://github.com/ratthapon/fractal-compression.git
创建时间: 2016-08-17T07:41:37Z
项目社区:https://github.com/ratthapon/fractal-compression

开源协议:Other

下载


README

Java Fractal Audio Compression

A hybrid Java-CUDA fractal compression framework for audio coding.

This project includes the CUDA GPU computation to faster compress the audio samples to fractal code. This project introduces these features:

  • Ready to process by using MAVEN.
  • Faster encoding by CUDA devices support from JCuda.
  • Easier audio data processing.
  • MATLAB file extension (.mat), and binary format (.bin) are supported for fractal codes.
  • RAW (.raw) and .WAV audio file formats are supported.
  • Parallel processing is supported.
  • Bin-tree partition is supported.
  • Parameterized parition is supported.
  • Batch processing is supported.

    Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
Install these software for building and launching.

The cuda toolkit maybe exclude if you don’t need to process using GPU.
Installing
Install all aboved prerequisites. Then install by following steps.

  1. Clone the project to your local repository.
    1. git clone https://github.com/ratthapon/java-fractal-audio-compression jfac
  2. Compile the ptx files on your machine by exec these commands in cmd.
    1. cd jfac
    2. ctx-compile-script-2
  3. Install the project using MAVEN.

    1. mvn install

    It will install the program if the tests are passed. You can add -DskipTests if you want to install without gpu support.
    Check the build message, it should be passed.
    Alternative installation using Eclipse

  4. Clone and built as above, then exec these commands.

    1. mvn eclipse:eclipse
  5. Use the Eclipse to open this project then setup the run configuration by following:
  • Run -> Run Configuration -> Java Application -> Main -> Project
    1. jfac
  • Run -> Run Configuration -> Java Application -> Main -> Main Class
    1. th.ac.kmitl.it.prip.fractal.MainExecuter
  • Run -> Run Configuration -> Java Application -> Arguments -> Working directory -> Other
    1. ${workspace_loc:jfac/target}

Then you can use Eclipse to execute this program.

Running the tests

Test the program is built properly by using MAVEN

  1. mvn test

Deployment

This project can be executed by variety of methods. You can use any one that you prefer.

  • Exec by using MAVEN at the cmd,

    1. mvn ecec:exec

    , after the maven built and running the process, give the parameters to cmd and double Enter to run it with given parameters.

  • Exec by MAVEN with a pre-descripted parameter file by following commands,

    1. mvn ecec:exec -Dparam="path_to_param/params.txt"
  • Use as a lib, please see API list. [under development]

    Example Parameters

Each parameter is delimited by newline.
The parameter name and value are delimited by a space as follows.

  1. processname compress
  2. testname actual_synth
  3. infile test-classes//synth-file-list.txt
  4. inpathprefix test-classes//expected//synth_wav//
  5. outdir test-classes//
  6. maxprocess 7
  7. inext raw
  8. outext mat
  9. pthresh 0
  10. reportrate 0
  11. gpu true
  12. coefflimit 1.2
  13. skipifexist false
  14. minr 4
  15. maxr 4

See available parameters list [under development].

Built With

  • MAVEN - Dependency Management

    Fractal compression

Fractal compression is a data compression algorithm. It compress the raw data into smaller “code”. There are many schemes to implement this algorithm but the fractal block coding is the most popular scheme. Fractal block coding store only a self-similarity parameters of each partitioned block. It is so called fractal code. The self-similarity parameters is used to compose the original data from itself.

Contributing

All contribution are gracefully accept.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Rattaphon Hokking - Initial work - ratthapon

See also the list of contributors who participated in this project.

Acknowledgments

  • Thanks to jmatio
  • Thanks to Apache Commons
  • Thanks to JCUDA
  • Thanks to PRIP lab for their resources to develop this project

    Issues

  • CUDA device maybe error while run a long batching.
  • Codes of GPU and CPU compression mismatch (GPU compression uses QR decomposition while CPU compression use Levenberg–Marquardt algorithm in least square optimization process).
  • Repository’s merged commits are lost.

    References

  1. M. F. Barnsley and L. P. Hurd, Fractal image compression. AK Peters, Ldt., 1993.
  2. A. E. Jacquin, “Fractal image coding: a review,” Proceedings of the IEEE, vol. 81, no. 10, pp. 1451–1465, Oct. 1993.
  3. M. F. Barnsley, Fractals Everywhere: New Edition, New edition edition. Dover Publications, 2013.
  4. Y. Fisher, Fractal image compression: theory and application. Springer Science & Business Media, 2012.
  5. R. Hokking, K. Woraratpanya, and Y. Kuroki, “Speech recognition of different sampling rates using fractal code descriptor,” in 2016 13th International Joint Conference on Computer Science and Software Engineering (JCSSE), 2016, pp. 1–5.
    ## License

This project is licensed under the MIT License - see the LICENSE.txt file for details.