FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
vima.c File Reference

LucasArts VIMA audio decoder. More...

#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "adpcm_data.h"

Go to the source code of this file.

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *pkt)
 

Variables

static int predict_table_init = 0
 
static uint16_t predict_table [5786 *2]
 
static const uint8_t size_table []
 
static const int8_t index_table1 []
 
static const int8_t index_table2 []
 
static const int8_t index_table3 []
 
static const int8_t index_table4 []
 
static const int8_t index_table5 []
 
static const int8_t index_table6 []
 
static const int8_t *const step_index_tables []
 
AVCodec ff_vima_decoder
 

Detailed Description

LucasArts VIMA audio decoder.

Author
Paul B Mahol

Definition in file vima.c.

Function Documentation

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 109 of file vima.c.

static int decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame_ptr,
AVPacket pkt 
)
static

Definition at line 140 of file vima.c.

Variable Documentation

int predict_table_init = 0
static

Definition at line 34 of file vima.c.

Referenced by decode_init().

uint16_t predict_table[5786 *2]
static

Definition at line 35 of file vima.c.

Referenced by decode_frame(), and decode_init().

const uint8_t size_table[]
static
Initial value:
=
{
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
}

Definition at line 37 of file vima.c.

Referenced by decode_frame().

const int8_t index_table1[]
static
Initial value:
=
{
-1, 4, -1, 4
}

Definition at line 47 of file vima.c.

const int8_t index_table2[]
static
Initial value:
=
{
-1, -1, 2, 6, -1, -1, 2, 6
}

Definition at line 52 of file vima.c.

const int8_t index_table3[]
static
Initial value:
=
{
-1, -1, -1, -1, 1, 2, 4, 6,
-1, -1, -1, -1, 1, 2, 4, 6
}

Definition at line 57 of file vima.c.

const int8_t index_table4[]
static
Initial value:
=
{
-1, -1, -1, -1, -1, -1, -1, -1,
1, 1, 1, 2, 2, 4, 5, 6,
-1, -1, -1, -1, -1, -1, -1, -1,
1, 1, 1, 2, 2, 4, 5, 6
}

Definition at line 63 of file vima.c.

const int8_t index_table5[]
static
Initial value:
=
{
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
1, 1, 1, 1, 1, 2, 2, 2,
2, 4, 4, 4, 5, 5, 6, 6,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
1, 1, 1, 1, 1, 2, 2, 2,
2, 4, 4, 4, 5, 5, 6, 6
}

Definition at line 71 of file vima.c.

const int8_t index_table6[]
static
Initial value:
=
{
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 2, 2, 2, 2, 2,
2, 2, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 6, 6, 6, 6,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 2, 2, 2, 2, 2,
2, 2, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 6, 6, 6, 6
}

Definition at line 83 of file vima.c.

const int8_t* const step_index_tables[]
static
Initial value:

Definition at line 103 of file vima.c.

Referenced by decode_frame().

AVCodec ff_vima_decoder
Initial value:
= {
.name = "vima",
.init = decode_init,
.decode = decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio"),
}

Definition at line 231 of file vima.c.