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 VLC scfi_vlc
 
static VLC dscf_vlc
 
static VLC hdr_vlc
 
static VLC quant_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 45 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 75 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 125 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 167 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 175 of file mpc7.c.

◆ mpc7_decode_flush()

static void mpc7_decode_flush ( AVCodecContext avctx)
static

Definition at line 296 of file mpc7.c.

◆ mpc7_decode_close()

static av_cold int mpc7_decode_close ( AVCodecContext avctx)
static

Definition at line 304 of file mpc7.c.

Variable Documentation

◆ scfi_vlc

VLC scfi_vlc
static

Definition at line 43 of file mpc7.c.

Referenced by mpc7_decode_frame(), and mpc7_init_static().

◆ dscf_vlc

VLC dscf_vlc
static

Definition at line 43 of file mpc7.c.

Referenced by get_scale_idx(), and mpc7_init_static().

◆ hdr_vlc

VLC hdr_vlc
static

Definition at line 43 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 43 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 312 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:175
MPCContext
Definition: mpc.h:54
mpc7_decode_close
static av_cold int mpc7_decode_close(AVCodecContext *avctx)
Definition: mpc7.c:304
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
mpc7_decode_flush
static void mpc7_decode_flush(AVCodecContext *avctx)
Definition: mpc7.c:296
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
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:75
AV_CODEC_ID_MUSEPACK7
@ AV_CODEC_ID_MUSEPACK7
Definition: codec_id.h:470