Main Page | Class List | Directories | File List | File Members | Related Pages

mpc_decoder.c File Reference

#include "musepack/musepack.h"
#include "musepack/internal.h"
#include "musepack/requant.h"
#include "musepack/huffman.h"

Go to the source code of this file.

Defines

#define MPC_MULTIPLY_SCF(CcVal, SCF_idx)   MPC_MULTIPLY(CcVal, d->SCF[SCF_idx])

Enumerations

enum  {
  EQ_TAP = 13, DELAY = ((EQ_TAP + 1) / 2), FIR_BANDS = 4, MEMSIZE = MPC_DECODER_MEMSIZE,
  MEMSIZE2 = (MEMSIZE/2), MEMMASK = (MEMSIZE-1)
}

Functions

void mpc_decoder_init_huffman_sv6 (mpc_decoder *d)
void mpc_decoder_init_huffman_sv7 (mpc_decoder *d)
void mpc_decoder_read_bitstream_sv6 (mpc_decoder *d)
void mpc_decoder_read_bitstream_sv7 (mpc_decoder *d)
void mpc_decoder_update_buffer (mpc_decoder *d, mpc_uint32_t RING)
BOOL mpc_decoder_seek_sample (mpc_decoder *d, mpc_int64_t destsample)
void mpc_decoder_requantisierung (mpc_decoder *d, const mpc_int32_t Last_Band)
void mpc_decoder_resort_huff_tables (const mpc_uint32_t elements, HuffmanTyp *Table, const mpc_int32_t offset)
 Sorts huffman-tables by codeword.
mpc_uint32_t mpc_decoder_decode (mpc_decoder *d, MPC_SAMPLE_FORMAT *buffer, mpc_uint32_t *vbr_update_acc, mpc_uint32_t *vbr_update_bits)
void mpc_decoder_setup (mpc_decoder *d, mpc_reader *r)
BOOL mpc_decoder_initialize (mpc_decoder *d, mpc_streaminfo *si)
BOOL mpc_decoder_seek_seconds (mpc_decoder *d, double seconds)
 Seeks to specified position in seconds in the source stream.


Detailed Description

Core decoding routines and logic.

Definition in file mpc_decoder.c.


Function Documentation

mpc_uint32_t mpc_decoder_decode mpc_decoder *  d,
MPC_SAMPLE_FORMAT *  buffer,
mpc_uint32_t *  vbr_update_acc,
mpc_uint32_t *  vbr_update_bits
 

Actually reads data from previously initialized stream. Call this iteratively to decode the mpc stream.

Parameters:
buffer destination buffer for decoded samples
vbr_update_acc 
Todo:
document me
Parameters:
vbr_update_bits 
Todo:
document me
Returns:
-1 if an error is encountered

0 if the stream has been completely decoded successfully and there are no more samples

> 0 to indicate the number of bytes that were actually read from the stream.

Definition at line 422 of file mpc_decoder.c.

BOOL mpc_decoder_initialize mpc_decoder *  d,
mpc_streaminfo *  si
 

Initializes mpc decoder with the supplied stream info parameters. Call this next after calling mpc_decoder_setup.

Parameters:
si streaminfo structure indicating format of source stream
Returns:
TRUE if decoder was initalized successfully, FALSE otherwise

Definition at line 1194 of file mpc_decoder.c.

void mpc_decoder_resort_huff_tables const mpc_uint32_t  elements,
HuffmanTyp Table,
const mpc_int32_t  offset
 

Sorts huffman-tables by codeword.

offset resulting value.

Parameters:
elements 
Table table to sort
offset offset of resulting sort

Definition at line 187 of file mpc_decoder.c.

void mpc_decoder_setup mpc_decoder *  d,
mpc_reader *  r
 

Sets up decoder library. Call this first when preparing to decode an mpc stream.

Parameters:
r reader that will supply raw data to the decoder

Definition at line 1108 of file mpc_decoder.c.


Generated on Sat Jan 22 09:34:07 2005 for libmusepack by  doxygen 1.4.1