FFmpeg
Classes | Macros | Typedefs | Functions | Variables
vorbisdec.c File Reference

Vorbis I decoder. More...

#include <inttypes.h>
#include <math.h>
#include "libavutil/avassert.h"
#include "libavutil/float_dsp.h"
#include "avcodec.h"
#include "fft.h"
#include "get_bits.h"
#include "internal.h"
#include "vorbis.h"
#include "vorbisdsp.h"
#include "xiph.h"

Classes

struct  vorbis_codebook
 
struct  vorbis_floor
 
union  vorbis_floor::vorbis_floor_u
 
struct  vorbis_floor::vorbis_floor_u::vorbis_floor0_s
 
struct  vorbis_floor::vorbis_floor_u::vorbis_floor1_s
 
struct  vorbis_residue
 
struct  vorbis_mapping
 
struct  vorbis_mode
 
struct  vorbis_context_s
 

Macros

#define BITSTREAM_READER_LE
 
#define V_NB_BITS   8
 
#define V_NB_BITS2   11
 
#define V_MAX_VLCS   (1 << 16)
 
#define V_MAX_PARTITIONS   (1 << 20)
 
#define BARK(x)   (13.1f * atan(0.00074f * (x)) + 2.24f * atan(1.85e-8f * (x) * (x)) + 1e-4f * (x))
 
#define VALIDATE_INDEX(idx, limit)
 
#define GET_VALIDATED_INDEX(idx, bits, limit)
 

Typedefs

typedef struct vorbis_codebook vorbis_codebook
 
typedef union vorbis_floor_u vorbis_floor_data
 
typedef struct vorbis_floor0_s vorbis_floor0
 
typedef struct vorbis_floor1_s vorbis_floor1
 
typedef int(* vorbis_floor_decode_func) (struct vorbis_context_s *, vorbis_floor_data *, float *)
 
typedef struct vorbis_floor vorbis_floor
 
typedef struct vorbis_residue vorbis_residue
 
typedef struct vorbis_mapping vorbis_mapping
 
typedef struct vorbis_mode vorbis_mode
 
typedef struct vorbis_context_s vorbis_context
 

Functions

void ff_vorbis_inverse_coupling (float *mag, float *ang, intptr_t blocksize)
 

Variables

AVCodec ff_vorbis_decoder
 

Detailed Description

Vorbis I decoder.

Author
Denes Balatoni ( dbalatoni programozo hu )

This file is part of FFmpeg.

FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Author
Denes Balatoni ( dbalatoni programozo hu )

Macro Definition Documentation

§ GET_VALIDATED_INDEX

#define GET_VALIDATED_INDEX (   idx,
  bits,
  limit 
)
Value:
{\
idx = get_bits(gb, bits);\
VALIDATE_INDEX(idx, limit)\
}

§ VALIDATE_INDEX

#define VALIDATE_INDEX (   idx,
  limit 
)
Value:
if (idx >= limit) {\
av_log(vc->avctx, AV_LOG_ERROR,\
idx_err_str,\
(int)(idx), (int)(limit - 1), #idx, __FILE__, __LINE__);\
}
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176

Variable Documentation

§ ff_vorbis_decoder

AVCodec ff_vorbis_decoder
Initial value:
= {
.name = "vorbis",
.long_name = NULL_IF_CONFIG_SMALL("Vorbis"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_VORBIS,
.priv_data_size = sizeof(vorbis_context),
.init = vorbis_decode_init,
.close = vorbis_decode_close,
.decode = vorbis_decode_frame,
.flush = vorbis_decode_flush,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.channel_layouts = ff_vorbis_channel_layouts,
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
}
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
float, planar
Definition: samplefmt.h:69
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
Definition: vorbisdec.c:125
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959