flac.c File Reference
#include "libavutil/crc.h"
#include "flac.h"
#include "flacdata.h"

Go to the source code of this file.

Functions

static int64_t get_utf8 (GetBitContext *gb)
int ff_flac_decode_frame_header (AVCodecContext *avctx, GetBitContext *gb, FLACFrameInfo *fi, int log_level_offset)
 Validate and decode a frame header.
int ff_flac_get_max_frame_size (int blocksize, int ch, int bps)
 Calculate an estimate for the maximum frame size based on verbatim mode.

Variables

static const int8_t sample_size_table [] = { 0, 8, 12, 0, 16, 20, 24, 0 }

Function Documentation

int ff_flac_decode_frame_header ( AVCodecContext avctx,
GetBitContext gb,
FLACFrameInfo fi,
int  log_level_offset 
)

Validate and decode a frame header.

Parameters
avctxAVCodecContext to use as av_log() context
gbGetBitContext from which to read frame header
[out]fiframe information
log_level_offsetlog level offset. can be used to silence error messages.
Returns
non-zero on error, 0 if ok

Definition at line 35 of file flac.c.

Referenced by decode_frame(), and frame_header_is_valid().

int ff_flac_get_max_frame_size ( int  blocksize,
int  ch,
int  bps 
)

Calculate an estimate for the maximum frame size based on verbatim mode.

Parameters
blocksizeblock size, in samples
chnumber of channels
bpsbits-per-sample

Definition at line 132 of file flac.c.

Referenced by flac_decode_frame(), flac_encode_frame(), and flac_encode_init().

static int64_t get_utf8 ( GetBitContext gb)
static

Definition at line 28 of file flac.c.

Referenced by ff_flac_decode_frame_header().

Variable Documentation

const int8_t sample_size_table[] = { 0, 8, 12, 0, 16, 20, 24, 0 }
static

Definition at line 26 of file flac.c.

Referenced by ff_flac_decode_frame_header().