FFmpeg
Functions | Variables
vima.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/thread.h"
#include "adpcm_data.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"

Go to the source code of this file.

Functions

static av_cold void predict_table_init (void)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt)
 

Variables

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 []
 
const FFCodec ff_adpcm_vima_decoder
 

Detailed Description

LucasArts VIMA audio decoder

Author
Paul B Mahol

Definition in file vima.c.

Function Documentation

◆ predict_table_init()

static av_cold void predict_table_init ( void  )
static

Definition at line 88 of file vima.c.

Referenced by decode_init().

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 109 of file vima.c.

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
AVFrame frame,
int *  got_frame_ptr,
AVPacket pkt 
)
static

Definition at line 120 of file vima.c.

Variable Documentation

◆ predict_table

uint16_t predict_table[5786 *2]
static

Definition at line 37 of file vima.c.

Referenced by decode_frame(), and predict_table_init().

◆ size_table

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 39 of file vima.c.

Referenced by decode_frame().

◆ index_table1

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

Definition at line 48 of file vima.c.

◆ index_table2

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

Definition at line 52 of file vima.c.

◆ index_table3

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 56 of file vima.c.

◆ index_table4

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 60 of file vima.c.

◆ index_table5

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 65 of file vima.c.

◆ index_table6

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 72 of file vima.c.

◆ step_index_tables

const int8_t* const step_index_tables[]
static
Initial value:

Definition at line 83 of file vima.c.

Referenced by decode_frame().

◆ ff_adpcm_vima_decoder

const FFCodec ff_adpcm_vima_decoder
Initial value:
= {
.p.name = "adpcm_vima",
CODEC_LONG_NAME("LucasArts VIMA audio"),
.p.type = AVMEDIA_TYPE_AUDIO,
.init = decode_init,
}

Definition at line 210 of file vima.c.

index_table2
static const int8_t index_table2[]
Definition: vima.c:52
index_table4
static const int8_t index_table4[]
Definition: vima.c:60
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt)
Definition: vima.c:120
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
index_table5
static const int8_t index_table5[]
Definition: vima.c:65
index_table1
static const int8_t index_table1[]
Definition: vima.c:48
AV_CODEC_ID_ADPCM_VIMA
@ AV_CODEC_ID_ADPCM_VIMA
Definition: codec_id.h:403
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:106
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
index_table6
static const int8_t index_table6[]
Definition: vima.c:72
index_table3
static const int8_t index_table3[]
Definition: vima.c:56
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: vima.c:109