libavcodec/mpc8.c File Reference

MPEG Audio Layer 1/2 -like codec with frames of 1152 samples divided into 32 subbands. More...

#include "libavutil/channel_layout.h"
#include "libavutil/lfg.h"
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
#include "mpc8data.h"
#include "mpc8huff.h"
Include dependency graph for libavcodec/mpc8.c:

Go to the source code of this file.

Functions

static int mpc8_dec_base (GetBitContext *gb, int k, int n)
 
static int mpc8_dec_enum (GetBitContext *gb, int k, int n)
 
static int mpc8_get_mod_golomb (GetBitContext *gb, int m)
 
static int mpc8_get_mask (GetBitContext *gb, int size, int t)
 
static av_cold int mpc8_decode_init (AVCodecContext *avctx)
 
static int mpc8_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold void mpc8_decode_flush (AVCodecContext *avctx)
 

Variables

static VLC band_vlc
 
static VLC scfi_vlc [2]
 
static VLC dscf_vlc [2]
 
static VLC res_vlc [2]
 
static VLC q1_vlc
 
static VLC q2_vlc [2]
 
static VLC q3_vlc [2]
 
static VLC quant_vlc [4][2]
 
static VLC q9up_vlc
 
static const int q3_offsets [2] = { MPC8_Q3_OFFSET, MPC8_Q4_OFFSET }
 
static const int quant_offsets [6] = { MPC8_Q5_OFFSET, MPC8_Q6_OFFSET, MPC8_Q7_OFFSET, MPC8_Q8_OFFSET }
 
static const uint16_t vlc_offsets [13]
 
AVCodec ff_mpc8_decoder
 

Detailed Description

MPEG Audio Layer 1/2 -like codec with frames of 1152 samples divided into 32 subbands.

Definition in file libavcodec/mpc8.c.

Function Documentation

static int mpc8_dec_base ( GetBitContext gb,
int  k,
int  n 
)
inlinestatic

Definition at line 46 of file libavcodec/mpc8.c.

Referenced by mpc8_dec_enum(), and mpc8_get_mod_golomb().

static int mpc8_dec_enum ( GetBitContext gb,
int  k,
int  n 
)
inlinestatic

Definition at line 57 of file libavcodec/mpc8.c.

Referenced by mpc8_get_mask().

static av_cold void mpc8_decode_flush ( AVCodecContext avctx)
static

Definition at line 430 of file libavcodec/mpc8.c.

static int mpc8_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 241 of file libavcodec/mpc8.c.

static av_cold int mpc8_decode_init ( AVCodecContext avctx)
static

Definition at line 97 of file libavcodec/mpc8.c.

static int mpc8_get_mask ( GetBitContext gb,
int  size,
int  t 
)
static

Definition at line 82 of file libavcodec/mpc8.c.

Referenced by mpc8_decode_frame().

static int mpc8_get_mod_golomb ( GetBitContext gb,
int  m 
)
inlinestatic

Definition at line 76 of file libavcodec/mpc8.c.

Referenced by mpc8_decode_frame().

Variable Documentation

VLC band_vlc
static

Definition at line 40 of file libavcodec/mpc8.c.

VLC dscf_vlc[2]
static

Definition at line 40 of file libavcodec/mpc8.c.

AVCodec ff_mpc8_decoder
Initial value:
= {
.name = "mpc8",
.priv_data_size = sizeof(MPCContext),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
static av_cold int mpc8_decode_init(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold void mpc8_decode_flush(AVCodecContext *avctx)
static int mpc8_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
static void flush(AVCodecContext *avctx)
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49
signed 16 bits, planar
Definition: samplefmt.h:58
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868
struct MPCContext MPCContext

Definition at line 436 of file libavcodec/mpc8.c.

VLC q1_vlc
static

Definition at line 41 of file libavcodec/mpc8.c.

VLC q2_vlc[2]
static

Definition at line 41 of file libavcodec/mpc8.c.

const int q3_offsets[2] = { MPC8_Q3_OFFSET, MPC8_Q4_OFFSET }
static

Definition at line 43 of file libavcodec/mpc8.c.

Referenced by mpc8_decode_frame().

VLC q3_vlc[2]
static

Definition at line 41 of file libavcodec/mpc8.c.

VLC q9up_vlc
static

Definition at line 41 of file libavcodec/mpc8.c.

const int quant_offsets[6] = { MPC8_Q5_OFFSET, MPC8_Q6_OFFSET, MPC8_Q7_OFFSET, MPC8_Q8_OFFSET }
static

Definition at line 44 of file libavcodec/mpc8.c.

Referenced by mpc8_decode_frame().

VLC quant_vlc[4][2]
static

Definition at line 41 of file libavcodec/mpc8.c.

VLC res_vlc[2]
static

Definition at line 40 of file libavcodec/mpc8.c.

VLC scfi_vlc[2]
static

Definition at line 40 of file libavcodec/mpc8.c.

const uint16_t vlc_offsets[13]
static
Initial value:
= {
0, 640, 1184, 1748, 2298, 2426, 2554, 3066, 3578, 4106, 4618, 5196, 5708
}

Definition at line 93 of file libavcodec/mpc8.c.

Referenced by mpc8_decode_init().