Create compilable Visual Studio project and enhance the Lame encoder/decoder

Completado Publicado Dec 8, 2011 Pagado a la entrega
Completado Pagado a la entrega

This project has two parts: **1) create an easily compilable Visual Studio project for the Lame MP3 encoder/decoder; and 2) replace the huffman component in the code with proprietary C++ classes.**

## Deliverables

**Create compilable Visual Studio project and enhance the Lame encoder/decoder**

This project has two parts: **1) create an easily compilable Visual Studio project for the Lame MP3 encoder/decoder; and 2) replace the huffman component in the code with proprietary C++ classes.**

**1. Create a compilable Visual Studio project for the Lame encoder/decoder**

A. Target IDE is Visual Studio 2010.

B. Start by downloading the latest Lame project from SourceForge (suggest the link at [url removed, login to view]). Also download the latest Gtk project (suggest the link at [url removed, login to view]).

C. Make Gtk part of the Lame solution.

D. Everything must compile and run from Visual Studio 2010.

E. If additional steps such as changing the PATH environmental variable are necessary, clear steps must be notated.

F. Summary: from Visual Studio 2010, the Lame/Gtk project must compile. Applications that are part of the project must run from within Visual Studio 2010. Components such as .LIB and .DLL files must be usable as linked or loaded objects from other projects. (Provide easy steps for using static .LIB and dynamic .DLL files.)

G. if the deliverable does not work for employer as specified, steps to get it to work must be taken by the worker and employer together.

**2. Replace current huffman code in Lame encoder/decoder with proprietary C++ classes.**

A. There are two C++ classes that must be used to output and input the data as huffman codes.

i. CBitIO - provides bit i/o for disk or memory access

ii. CCompactorHuffman - provides the byte reading and writing for compression

B. Here is a code sample to compress a file:

// Open data file that will be compressed into RAM

unsigned char *pBuffer;

int nBufferSize;

FILE *fp = fopen( szOutputFilePath, "rb" );

nBufferSize = filelength( fileno( fp ) );

pBuffer = new unsigned char[nBufferSize];

fread( pBuffer, sizeof( char ), nBufferSize, fp );

fclose( fp );

// Create CBitIO object.

CBitIO io;

// Open the output file.

[url removed, login to view]( "[url removed, login to view]" );

// Create the CCompactorHuffman object.

CCompactorHuffman huff;

// Associate the bit io and huffman objects.

[url removed, login to view]( &io );

// Write the data out.

for( int i=0; i<nBufferSize; i++ )

{

[url removed, login to view]( pBuffer[i] );

}

// Close up.

[url removed, login to view]();

// Clean up.

delete [] pBuffer;

C. Here is code to decompress a file:

unsigned char *pBuffer2 = new unsigned char[nBufferSize];

CBitIO io2;

// Open file (could open memory buffer).

[url removed, login to view]( "[url removed, login to view]" );

CCompactorHuffman huff2;

[url removed, login to view]( &io2 );

int i = 0;

int nInByte;

while( ( nInByte = [url removed, login to view]() ) != -1 )

{

// Place in memory buffer.

pBuffer2[i++] = (unsigned char)nInByte;

// Or write to disk.

}

[url removed, login to view]();

// Clean up.

delete [] pBuffer2;

D. There is a sample project that is included named **DemonstrateUseOfCompactorHuffmanAndBitIO** that does a simple compress and decompress using the two classes.

E. Note that the compression and compression can be done to and from disk file or memory.

Windows Desktop

Nº del proyecto: #3743036

Sobre el proyecto

2 propuestas Proyecto remoto Activo Dec 10, 2011

Adjudicado a:

vano101

See private message.

$59.5 USD en 7 días
(359 comentarios)
6.3

2 freelancers están ofertando un promedio de $136 por este trabajo

tulebaev

See private message.

$212.5 USD en 7 días
(16 comentarios)
4.0