mpc7.c File Reference

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

#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
#include "mpc7data.h"
Include dependency graph for mpc7.c:

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

static int get_scale_idx ( GetBitContext gb,
int  ref 
)
static

Definition at line 185 of file mpc7.c.

Referenced by mpc7_decode_frame().

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

Fill samples for given subband.

Definition at line 143 of file mpc7.c.

Referenced by mpc7_decode_frame().

static av_cold int mpc7_decode_close ( AVCodecContext avctx)
static

Definition at line 322 of file mpc7.c.

static void mpc7_decode_flush ( AVCodecContext avctx)
static

Definition at line 314 of file mpc7.c.

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

Definition at line 193 of file mpc7.c.

static av_cold int mpc7_decode_init ( AVCodecContext avctx)
static

Definition at line 49 of file mpc7.c.

Variable Documentation

VLC dscf_vlc
static

Definition at line 40 of file mpc7.c.

AVCodec ff_mpc7_decoder
Initial value:
= {
.name = "mpc7",
.priv_data_size = sizeof(MPCContext),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Musepack SV7"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int mpc7_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: mpc7.c:193
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int mpc7_decode_init(AVCodecContext *avctx)
Definition: mpc7.c:49
static void mpc7_decode_flush(AVCodecContext *avctx)
Definition: mpc7.c:314
static void flush(AVCodecContext *avctx)
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
static av_cold int mpc7_decode_close(AVCodecContext *avctx)
Definition: mpc7.c:322
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49
signed 16 bits, planar
Definition: samplefmt.h:58
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868
struct MPCContext MPCContext

Definition at line 330 of file mpc7.c.

VLC hdr_vlc
static

Definition at line 40 of file mpc7.c.

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 42 of file mpc7.c.

Referenced by mpc7_decode_init().

VLC quant_vlc[MPC7_QUANT_VLC_TABLES][2]
static

Definition at line 40 of file mpc7.c.

VLC scfi_vlc
static

Definition at line 40 of file mpc7.c.