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 "codec_internal.h"
#include "decode.h"
#include "get_bits.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, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 
static void mpc7_decode_flush (AVCodecContext *avctx)
 
static av_cold int mpc7_decode_close (AVCodecContext *avctx)
 

Variables

static VLCElem scfi_vlc [1<< MPC7_SCFI_BITS]
 
static VLCElem dscf_vlc [1<< MPC7_DSCF_BITS]
 
static VLCElem hdr_vlc [1<< MPC7_HDR_BITS]
 
static const VLCElemquant_vlc [MPC7_QUANT_VLC_TABLES][2]
 
const FFCodec 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 48 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 76 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 126 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 168 of file mpc7.c.

Referenced by mpc7_decode_frame().

◆ mpc7_decode_frame()

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

Definition at line 176 of file mpc7.c.

◆ mpc7_decode_flush()

static void mpc7_decode_flush ( AVCodecContext avctx)
static

Definition at line 298 of file mpc7.c.

◆ mpc7_decode_close()

static av_cold int mpc7_decode_close ( AVCodecContext avctx)
static

Definition at line 306 of file mpc7.c.

Variable Documentation

◆ scfi_vlc

VLCElem scfi_vlc[1<< MPC7_SCFI_BITS]
static

Definition at line 43 of file mpc7.c.

Referenced by mpc7_decode_frame(), and mpc7_init_static().

◆ dscf_vlc

VLCElem dscf_vlc[1<< MPC7_DSCF_BITS]
static

Definition at line 44 of file mpc7.c.

Referenced by get_scale_idx(), and mpc7_init_static().

◆ hdr_vlc

VLCElem hdr_vlc[1<< MPC7_HDR_BITS]
static

Definition at line 45 of file mpc7.c.

Referenced by mpc7_decode_frame(), and mpc7_init_static().

◆ quant_vlc

const VLCElem* quant_vlc[MPC7_QUANT_VLC_TABLES][2]
static

Definition at line 46 of file mpc7.c.

Referenced by idx_to_quant(), and mpc7_init_static().

◆ ff_mpc7_decoder

const FFCodec ff_mpc7_decoder
Initial value:
= {
.p.name = "mpc7",
CODEC_LONG_NAME("Musepack SV7"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(MPCContext),
.p.capabilities = AV_CODEC_CAP_DR1,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
}

Definition at line 314 of file mpc7.c.

mpc7_decode_frame
static int mpc7_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: mpc7.c:176
MPCContext
Definition: mpc.h:54
mpc7_decode_close
static av_cold int mpc7_decode_close(AVCodecContext *avctx)
Definition: mpc7.c:306
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
mpc7_decode_flush
static void mpc7_decode_flush(AVCodecContext *avctx)
Definition: mpc7.c:298
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
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
mpc7_decode_init
static av_cold int mpc7_decode_init(AVCodecContext *avctx)
Definition: mpc7.c:76
AV_CODEC_ID_MUSEPACK7
@ AV_CODEC_ID_MUSEPACK7
Definition: codec_id.h:468