libavcodec/shorten.c File Reference

Shorten decoder. More...

#include <limits.h>
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"

Go to the source code of this file.

Data Structures

struct  ShortenContext

Defines

#define MAX_CHANNELS   8
#define MAX_BLOCKSIZE   65535
#define OUT_BUFFER_SIZE   16384
#define ULONGSIZE   2
#define WAVE_FORMAT_PCM   0x0001
#define DEFAULT_BLOCK_SIZE   256
#define TYPESIZE   4
#define CHANSIZE   0
#define LPCQSIZE   2
#define ENERGYSIZE   3
#define BITSHIFTSIZE   2
#define TYPE_S16HL   3
#define TYPE_S16LH   5
#define NWRAP   3
#define NSKIPSIZE   1
#define LPCQUANT   5
#define V2LPCQOFFSET   (1 << LPCQUANT)
#define FNSIZE   2
#define FN_DIFF0   0
#define FN_DIFF1   1
#define FN_DIFF2   2
#define FN_DIFF3   3
#define FN_QUIT   4
#define FN_BLOCKSIZE   5
#define FN_BITSHIFT   6
#define FN_QLPC   7
#define FN_ZERO   8
#define FN_VERBATIM   9
#define VERBATIM_CKSIZE_SIZE   5
#define VERBATIM_BYTE_SIZE   8
#define CANONICAL_HEADER_SIZE   44

Functions

static av_cold int shorten_decode_init (AVCodecContext *avctx)
static int allocate_buffers (ShortenContext *s)
static unsigned int get_uint (ShortenContext *s, int k)
static void fix_bitshift (ShortenContext *s, int32_t *buffer)
static void init_offset (ShortenContext *s)
static int get_le32 (GetBitContext *gb)
static short get_le16 (GetBitContext *gb)
static int decode_wave_header (AVCodecContext *avctx, uint8_t *header, int header_size)
static int16_t * interleave_buffer (int16_t *samples, int nchan, int blocksize, int32_t **buffer)
static void decode_subframe_lpc (ShortenContext *s, int channel, int residual_size, int pred_order)
static int shorten_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int shorten_decode_close (AVCodecContext *avctx)
static void shorten_flush (AVCodecContext *avctx)

Variables

AVCodec ff_shorten_decoder


Detailed Description

Shorten decoder.

Author:
Jeff Muizelaar

Definition in file shorten.c.


Define Documentation

#define BITSHIFTSIZE   2

Definition at line 49 of file shorten.c.

Referenced by shorten_decode_frame().

#define CANONICAL_HEADER_SIZE   44

Definition at line 74 of file shorten.c.

Referenced by shorten_decode_frame().

#define CHANSIZE   0

Definition at line 46 of file shorten.c.

Referenced by shorten_decode_frame().

#define DEFAULT_BLOCK_SIZE   256

Definition at line 43 of file shorten.c.

Referenced by shorten_decode_frame().

#define ENERGYSIZE   3

Definition at line 48 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_BITSHIFT   6

Definition at line 67 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_BLOCKSIZE   5

Definition at line 66 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_DIFF0   0

Definition at line 61 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_DIFF1   1

Definition at line 62 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_DIFF2   2

Definition at line 63 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_DIFF3   3

Definition at line 64 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_QLPC   7

Definition at line 68 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_QUIT   4

Definition at line 65 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_VERBATIM   9

Definition at line 70 of file shorten.c.

Referenced by shorten_decode_frame().

#define FN_ZERO   8

Definition at line 69 of file shorten.c.

Referenced by shorten_decode_frame().

#define FNSIZE   2

Definition at line 60 of file shorten.c.

Referenced by shorten_decode_frame().

#define LPCQSIZE   2

Definition at line 47 of file shorten.c.

Referenced by shorten_decode_frame().

#define LPCQUANT   5

Definition at line 57 of file shorten.c.

Referenced by decode_subframe_lpc().

#define MAX_BLOCKSIZE   65535

Definition at line 35 of file shorten.c.

#define MAX_CHANNELS   8

Definition at line 34 of file shorten.c.

#define NSKIPSIZE   1

Definition at line 55 of file shorten.c.

Referenced by shorten_decode_frame().

#define NWRAP   3

Definition at line 54 of file shorten.c.

Referenced by shorten_decode_frame().

#define OUT_BUFFER_SIZE   16384

Definition at line 37 of file shorten.c.

Referenced by shorten_decode_frame().

#define TYPE_S16HL   3

Definition at line 51 of file shorten.c.

Referenced by init_offset().

#define TYPE_S16LH   5

Definition at line 52 of file shorten.c.

Referenced by init_offset().

#define TYPESIZE   4

Definition at line 45 of file shorten.c.

Referenced by shorten_decode_frame().

#define ULONGSIZE   2

Definition at line 39 of file shorten.c.

Referenced by get_uint().

#define V2LPCQOFFSET   (1 << LPCQUANT)

Definition at line 58 of file shorten.c.

Referenced by shorten_decode_frame().

#define VERBATIM_BYTE_SIZE   8

Definition at line 73 of file shorten.c.

Referenced by shorten_decode_frame().

#define VERBATIM_CKSIZE_SIZE   5

Definition at line 72 of file shorten.c.

Referenced by shorten_decode_frame().

#define WAVE_FORMAT_PCM   0x0001

Definition at line 41 of file shorten.c.

Referenced by decode_wave_header().


Function Documentation

static int allocate_buffers ( ShortenContext s  )  [static]

Definition at line 113 of file shorten.c.

static void decode_subframe_lpc ( ShortenContext s,
int  channel,
int  residual_size,
int  pred_order 
) [static]

Definition at line 269 of file shorten.c.

static int decode_wave_header ( AVCodecContext avctx,
uint8_t *  header,
int  header_size 
) [static]

Definition at line 203 of file shorten.c.

Referenced by shorten_decode_frame().

static void fix_bitshift ( ShortenContext s,
int32_t *  buffer 
) [static]

Definition at line 161 of file shorten.c.

Referenced by shorten_decode_frame().

static short get_le16 ( GetBitContext gb  )  [inline, static]

Definition at line 198 of file shorten.c.

Referenced by decode_wave_header().

static int get_le32 ( GetBitContext gb  )  [inline, static]

Definition at line 193 of file shorten.c.

Referenced by decode_wave_header().

static unsigned int get_uint ( ShortenContext s,
int  k 
) [inline, static]

Definition at line 153 of file shorten.c.

Referenced by shorten_decode_frame().

static void init_offset ( ShortenContext s  )  [static]

Definition at line 171 of file shorten.c.

Referenced by shorten_decode_frame().

static int16_t* interleave_buffer ( int16_t *  samples,
int  nchan,
int  blocksize,
int32_t **  buffer 
) [static]

Definition at line 261 of file shorten.c.

Referenced by shorten_decode_frame().

static av_cold int shorten_decode_close ( AVCodecContext avctx  )  [static]

Definition at line 547 of file shorten.c.

static int shorten_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 286 of file shorten.c.

static av_cold int shorten_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 104 of file shorten.c.

static void shorten_flush ( AVCodecContext avctx  )  [static]

Definition at line 562 of file shorten.c.


Variable Documentation

Initial value:

Definition at line 569 of file shorten.c.


Generated on Fri Oct 26 02:39:46 2012 for FFmpeg by  doxygen 1.5.8