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 "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, 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",
.p.long_name = NULL_IF_CONFIG_SMALL("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,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

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
init
static int init
Definition: av_tx.c:47
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
mpc7_decode_flush
static void mpc7_decode_flush(AVCodecContext *avctx)
Definition: mpc7.c:296
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: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
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: codec_internal.h:31
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:453