FFmpeg
Functions | Variables
mpc7.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
#include "mpc7data.h"

Go to the source code of this file.

Functions

static av_cold void mpc7_init_static (void)
 
static av_cold int mpc7_decode_init (AVCodecContext *avctx)
 
static void idx_to_quant (MPCContext *c, GetBitContext *gb, int idx, int *dst)
 Fill samples for given subband. More...
 
static int get_scale_idx (GetBitContext *gb, int ref)
 
static int mpc7_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static void mpc7_decode_flush (AVCodecContext *avctx)
 
static av_cold int mpc7_decode_close (AVCodecContext *avctx)
 

Variables

static VLC scfi_vlc
 
static VLC dscf_vlc
 
static VLC hdr_vlc
 
static VLC quant_vlc [MPC7_QUANT_VLC_TABLES][2]
 
const AVCodec ff_mpc7_decoder
 

Detailed Description

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

Definition in file mpc7.c.

Function Documentation

◆ mpc7_init_static()

static av_cold void mpc7_init_static ( void  )
static

Definition at line 44 of file mpc7.c.

Referenced by mpc7_decode_init().

◆ mpc7_decode_init()

static av_cold int mpc7_decode_init ( AVCodecContext avctx)
static

Definition at line 74 of file mpc7.c.

◆ idx_to_quant()

static void idx_to_quant ( MPCContext c,
GetBitContext gb,
int  idx,
int dst 
)
inlinestatic

Fill samples for given subband.

Definition at line 123 of file mpc7.c.

Referenced by mpc7_decode_frame().

◆ get_scale_idx()

static int get_scale_idx ( GetBitContext gb,
int  ref 
)
static

Definition at line 165 of file mpc7.c.

Referenced by mpc7_decode_frame().

◆ mpc7_decode_frame()

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

Definition at line 173 of file mpc7.c.

◆ mpc7_decode_flush()

static void mpc7_decode_flush ( AVCodecContext avctx)
static

Definition at line 295 of file mpc7.c.

◆ mpc7_decode_close()

static av_cold int mpc7_decode_close ( AVCodecContext avctx)
static

Definition at line 303 of file mpc7.c.

Variable Documentation

◆ scfi_vlc

VLC scfi_vlc
static

Definition at line 42 of file mpc7.c.

Referenced by mpc7_decode_frame(), and mpc7_init_static().

◆ dscf_vlc

VLC dscf_vlc
static

Definition at line 42 of file mpc7.c.

Referenced by get_scale_idx(), and mpc7_init_static().

◆ hdr_vlc

VLC hdr_vlc
static

Definition at line 42 of file mpc7.c.

Referenced by mpc7_decode_frame(), and mpc7_init_static().

◆ quant_vlc

VLC quant_vlc[MPC7_QUANT_VLC_TABLES][2]
static

Definition at line 42 of file mpc7.c.

Referenced by idx_to_quant(), and mpc7_init_static().

◆ ff_mpc7_decoder

const AVCodec ff_mpc7_decoder
Initial value:
= {
.name = "mpc7",
.long_name = NULL_IF_CONFIG_SMALL("Musepack SV7"),
.priv_data_size = sizeof(MPCContext),
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 311 of file mpc7.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
MPCContext
Definition: mpc.h:54
mpc7_decode_close
static av_cold int mpc7_decode_close(AVCodecContext *avctx)
Definition: mpc7.c:303
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
mpc7_decode_flush
static void mpc7_decode_flush(AVCodecContext *avctx)
Definition: mpc7.c:295
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:593
mpc7_decode_frame
static int mpc7_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: mpc7.c:173
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
AV_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:67
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
mpc7_decode_init
static av_cold int mpc7_decode_init(AVCodecContext *avctx)
Definition: mpc7.c:74
AV_CODEC_ID_MUSEPACK7
@ AV_CODEC_ID_MUSEPACK7
Definition: codec_id.h:450