FFmpeg
Functions | Variables
mpc8.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/lfg.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
#include "mpc8data.h"
#include "mpc8huff.h"

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 void build_vlc (VLC *vlc, unsigned *buf_offset, const uint8_t codes_counts[16], const uint8_t **syms, int offset)
 
static av_cold void mpc8_init_static (void)
 
static av_cold int mpc8_decode_init (AVCodecContext *avctx)
 
static int mpc8_decode_frame (AVCodecContext *avctx, AVFrame *frame, 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
 
const FFCodec ff_mpc8_decoder
 

Detailed Description

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

Definition in file mpc8.c.

Function Documentation

◆ mpc8_dec_base()

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

Definition at line 44 of file mpc8.c.

Referenced by mpc8_dec_enum(), and mpc8_get_mod_golomb().

◆ mpc8_dec_enum()

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

Definition at line 55 of file mpc8.c.

Referenced by mpc8_get_mask().

◆ mpc8_get_mod_golomb()

static int mpc8_get_mod_golomb ( GetBitContext gb,
int  m 
)
inlinestatic

Definition at line 74 of file mpc8.c.

Referenced by mpc8_decode_frame().

◆ mpc8_get_mask()

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

Definition at line 80 of file mpc8.c.

Referenced by mpc8_decode_frame().

◆ build_vlc()

static av_cold void build_vlc ( VLC vlc,
unsigned *  buf_offset,
const uint8_t  codes_counts[16],
const uint8_t **  syms,
int  offset 
)
static

Definition at line 91 of file mpc8.c.

Referenced by mpc8_init_static().

◆ mpc8_init_static()

static av_cold void mpc8_init_static ( void  )
static

Definition at line 112 of file mpc8.c.

Referenced by mpc8_decode_init().

◆ mpc8_decode_init()

static av_cold int mpc8_decode_init ( AVCodecContext avctx)
static

Definition at line 141 of file mpc8.c.

◆ mpc8_decode_frame()

static int mpc8_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 181 of file mpc8.c.

◆ mpc8_decode_flush()

static av_cold void mpc8_decode_flush ( AVCodecContext avctx)
static

Definition at line 380 of file mpc8.c.

Variable Documentation

◆ band_vlc

VLC band_vlc
static

Definition at line 41 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ scfi_vlc

VLC scfi_vlc[2]
static

Definition at line 41 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ dscf_vlc

VLC dscf_vlc[2]
static

Definition at line 41 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ res_vlc

VLC res_vlc[2]
static

Definition at line 41 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ q1_vlc

VLC q1_vlc
static

Definition at line 42 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ q2_vlc

VLC q2_vlc[2]
static

Definition at line 42 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ q3_vlc

VLC q3_vlc[2]
static

Definition at line 42 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ quant_vlc

VLC quant_vlc[4][2]
static

Definition at line 42 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ q9up_vlc

VLC q9up_vlc
static

Definition at line 42 of file mpc8.c.

Referenced by mpc8_decode_frame(), and mpc8_init_static().

◆ ff_mpc8_decoder

const FFCodec ff_mpc8_decoder
Initial value:
= {
.p.name = "mpc8",
CODEC_LONG_NAME("Musepack SV8"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(MPCContext),
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
}

Definition at line 386 of file mpc8.c.

mpc8_decode_flush
static av_cold void mpc8_decode_flush(AVCodecContext *avctx)
Definition: mpc8.c:380
MPCContext
Definition: mpc.h:54
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
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
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AV_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:64
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
AV_CODEC_ID_MUSEPACK8
@ AV_CODEC_ID_MUSEPACK8
Definition: codec_id.h:474
mpc8_decode_init
static av_cold int mpc8_decode_init(AVCodecContext *avctx)
Definition: mpc8.c:141
mpc8_decode_frame
static int mpc8_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: mpc8.c:181