FFmpeg
Functions | Variables
mpc7.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.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 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]
 
static const uint16_t quant_offsets [MPC7_QUANT_VLC_TABLES *2+1]
 
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_decode_init()

static av_cold int mpc7_decode_init ( AVCodecContext avctx)
static

Definition at line 48 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 142 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 184 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 192 of file mpc7.c.

◆ mpc7_decode_flush()

static void mpc7_decode_flush ( AVCodecContext avctx)
static

Definition at line 315 of file mpc7.c.

◆ mpc7_decode_close()

static av_cold int mpc7_decode_close ( AVCodecContext avctx)
static

Definition at line 323 of file mpc7.c.

Variable Documentation

◆ scfi_vlc

VLC scfi_vlc
static

Definition at line 39 of file mpc7.c.

Referenced by mpc7_decode_frame(), and mpc7_decode_init().

◆ dscf_vlc

VLC dscf_vlc
static

Definition at line 39 of file mpc7.c.

Referenced by get_scale_idx(), and mpc7_decode_init().

◆ hdr_vlc

VLC hdr_vlc
static

Definition at line 39 of file mpc7.c.

Referenced by mpc7_decode_frame(), and mpc7_decode_init().

◆ quant_vlc

VLC quant_vlc[MPC7_QUANT_VLC_TABLES][2]
static

Definition at line 39 of file mpc7.c.

Referenced by idx_to_quant(), and mpc7_decode_init().

◆ quant_offsets

const uint16_t quant_offsets[MPC7_QUANT_VLC_TABLES *2+1]
static
Initial value:
=
{
0, 512, 1024, 1536, 2052, 2564, 3076, 3588, 4100, 4612, 5124,
5636, 6164, 6676, 7224
}

Definition at line 41 of file mpc7.c.

Referenced by mpc7_decode_init().

◆ ff_mpc7_decoder

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,
}

Definition at line 331 of file mpc7.c.

init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:686
MPCContext
Definition: mpc.h:52
mpc7_decode_close
static av_cold int mpc7_decode_close(AVCodecContext *avctx)
Definition: mpc7.c:323
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
mpc7_decode_flush
static void mpc7_decode_flush(AVCodecContext *avctx)
Definition: mpc7.c:315
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:500
mpc7_decode_frame
static int mpc7_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: mpc7.c:192
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:981
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:188
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:48
AV_CODEC_ID_MUSEPACK7
@ AV_CODEC_ID_MUSEPACK7
Definition: avcodec.h:592