zenilib: zenilib/jni/external/libvorbis/lib/block.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
block.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <ogg/ogg.h>`
`#include "vorbis/codec.h"`
`#include "codec_internal.h"`
`#include "window.h"`
`#include "mdct.h"`
`#include "lpc.h"`
`#include "registry.h"`
`#include "misc.h"`

Go to the source code of this file.

## Macros

#define | WORD_ALIGN 8

## Functions

static void | _preextrapolate_helper (vorbis_dsp_state *v)
static int | _vds_shared_init (vorbis_dsp_state *v, vorbis_info *vi, int encp)
void * | _vorbis_block_alloc (vorbis_block *vb, long bytes)
void | _vorbis_block_ripcord (vorbis_block *vb)
static int | ilog2 (unsigned int v)
int | vorbis_analysis_blockout (vorbis_dsp_state *v, vorbis_block *vb)
float ** | vorbis_analysis_buffer (vorbis_dsp_state *v, int vals)
int | vorbis_analysis_init (vorbis_dsp_state *v, vorbis_info *vi)
int | vorbis_analysis_wrote (vorbis_dsp_state *v, int vals)
int | vorbis_block_clear (vorbis_block *vb)
int | vorbis_block_init (vorbis_dsp_state *v, vorbis_block *vb)
void | vorbis_dsp_clear (vorbis_dsp_state *v)
int | vorbis_synthesis_blockin (vorbis_dsp_state *v, vorbis_block *vb)
int | vorbis_synthesis_init (vorbis_dsp_state *v, vorbis_info *vi)
int | vorbis_synthesis_lapout (vorbis_dsp_state *v, float ***pcm)
int | vorbis_synthesis_pcmout (vorbis_dsp_state *v, float ***pcm)
int | vorbis_synthesis_read (vorbis_dsp_state *v, int n)
int | vorbis_synthesis_restart (vorbis_dsp_state *v)
float * | vorbis_window (vorbis_dsp_state *v, int W)

## Macro Definition Documentation

#define WORD_ALIGN 8

Definition at line 85 of file block.c.

Referenced by _vorbis_block_alloc().

## Function Documentation

static void _preextrapolate_helper | ( | vorbis_dsp_state * | v | ) |

static

Definition at line 416 of file block.c.

References vorbis_dsp_state::centerW, vorbis_info::channels, i, j, vorbis_dsp_state::pcm, vorbis_dsp_state::pcm_current, vorbis_dsp_state::preextrapolate, vorbis_dsp_state::vi, vorbis_lpc_from_data(), and vorbis_lpc_predict().

Referenced by vorbis_analysis_wrote().

static int _vds_shared_init | ( | vorbis_dsp_state * | v,
|  | vorbis_info * | vi,
|  | int | encp
| ) |  |

static

Definition at line 181 of file block.c.

References _floor_P, _ogg_calloc, _ogg_malloc, _residue_P, _vp_psy_init(), vorbis_dsp_state::analysisp, vorbis_dsp_state::backend_state, vorbis_info_psy::blockflag, codec_setup_info::blocksizes, codec_setup_info::book_param, codec_setup_info::books, vorbis_dsp_state::centerW, vorbis_info::channels, vorbis_info::codec_setup, drft_init(), private_state::fft_look, codec_setup_info::floor_param, codec_setup_info::floor_type, codec_setup_info::floors, private_state::flr, codec_setup_info::fullbooks, codec_setup_info::halfrate_flag, i, ilog2(), vorbis_dsp_state::lW, mdct_init(), memset, private_state::modebits, codec_setup_info::modes, NULL, vorbis_dsp_state::pcm, vorbis_dsp_state::pcm_current, vorbis_dsp_state::pcm_storage, vorbis_dsp_state::pcmret, private_state::psy, codec_setup_info::psy_g_param, codec_setup_info::psy_param, codec_setup_info::psys, vorbis_info::rate, private_state::residue, codec_setup_info::residue_param, codec_setup_info::residue_type, codec_setup_info::residues, private_state::transform, vorbis_dsp_state::vi, vi, VI_TRANSFORMB, vorbis_book_init_decode(), vorbis_book_init_encode(), vorbis_dsp_clear(), vorbis_staticbook_destroy(), vorbis_dsp_state::W, and private_state::window.

Referenced by vorbis_analysis_init(), and vorbis_synthesis_init().

void* _vorbis_block_alloc | ( | vorbis_block * | vb,
|  | long | bytes
| ) |  |

Definition at line 113 of file block.c.

References _ogg_malloc, vorbis_block::localalloc, vorbis_block::localstore, vorbis_block::localtop, alloc_chain::next, alloc_chain::ptr, vorbis_block::reap, ret, vorbis_block::totaluse, and WORD_ALIGN.

Referenced by _01class(), _01inverse(), _2class(), floor0_inverse1(), floor1_fit(), floor1_interpolate_fit(), floor1_inverse1(), mapping0_forward(), res2_forward(), res2_inverse(), vorbis_analysis_blockout(), and vorbis_synthesis().

void _vorbis_block_ripcord | ( | vorbis_block * | vb | ) |

Definition at line 137 of file block.c.

References _ogg_free, _ogg_realloc, vorbis_block::localalloc, vorbis_block::localstore, vorbis_block::localtop, memset, alloc_chain::next, NULL, alloc_chain::ptr, vorbis_block::reap, and vorbis_block::totaluse.

Referenced by vorbis_analysis_blockout(), vorbis_block_clear(), vorbis_synthesis(), and vorbis_synthesis_trackonly().

static int ilog2 | ( | unsigned int | v | ) |

static

Definition at line 34 of file block.c.

References ret.

Referenced by _vds_shared_init().

int vorbis_analysis_blockout | ( | vorbis_dsp_state * | v,
|  | vorbis_block * | vb
| ) |  |

Definition at line 524 of file block.c.

References _ve_envelope_mark(), _ve_envelope_search(), _ve_envelope_shift(), _vorbis_block_alloc(), _vorbis_block_ripcord(), _vp_ampmax_decay(), vorbis_block_internal::ampmax, vorbis_look_psy_global::ampmax, vorbis_dsp_state::backend_state, codec_setup_info::blocksizes, vorbis_block_internal::blocktype, BLOCKTYPE_IMPULSE, BLOCKTYPE_LONG, BLOCKTYPE_PADDING, BLOCKTYPE_TRANSITION, bp, vorbis_dsp_state::centerW, vorbis_info::channels, vorbis_info::codec_setup, vorbis_dsp_state::eofflag, vorbis_block::eofflag, vorbis_dsp_state::granulepos, vorbis_block::granulepos, i, vorbis_block::internal, vorbis_dsp_state::lW, vorbis_block::lW, memcpy, memmove, vorbis_dsp_state::nW, vorbis_block::nW, vorbis_dsp_state::pcm, vorbis_block::pcm, vorbis_dsp_state::pcm_current, vorbis_block_internal::pcmdelay, vorbis_block::pcmend, vorbis_dsp_state::preextrapolate, private_state::psy_g_look, vorbis_dsp_state::sequence, vorbis_block::sequence, vorbis_block::vd, private_state::ve, vorbis_dsp_state::vi, vi, vorbis_dsp_state::W, and vorbis_block::W.

float** vorbis_analysis_buffer | ( | vorbis_dsp_state * | v,
|  | int | vals
| ) |  |

Definition at line 389 of file block.c.

References _ogg_free, _ogg_realloc, vorbis_dsp_state::backend_state, vorbis_info::channels, private_state::header, private_state::header1, private_state::header2, i, NULL, vorbis_dsp_state::pcm, vorbis_dsp_state::pcm_current, vorbis_dsp_state::pcm_storage, vorbis_dsp_state::pcmret, vorbis_dsp_state::vi, and vi.

Referenced by vorbis_analysis_wrote().

int vorbis_analysis_init | ( | vorbis_dsp_state * | v,
|  | vorbis_info * | vi
| ) |  |

Definition at line 295 of file block.c.

References _ogg_calloc, _vds_shared_init(), _ve_envelope_init(), _vp_global_look(), vorbis_dsp_state::backend_state, private_state::bms, NULL, private_state::psy_g_look, vorbis_dsp_state::sequence, private_state::ve, and vorbis_bitrate_init().

int vorbis_analysis_wrote | ( | vorbis_dsp_state * | v,
|  | int | vals
| ) |  |

Definition at line 460 of file block.c.

References _preextrapolate_helper(), codec_setup_info::blocksizes, vorbis_dsp_state::centerW, vorbis_info::channels, vorbis_info::codec_setup, vorbis_dsp_state::eofflag, i, memset, OV_EINVAL, vorbis_dsp_state::pcm, vorbis_dsp_state::pcm_current, vorbis_dsp_state::pcm_storage, vorbis_dsp_state::preextrapolate, vorbis_dsp_state::vi, vi, vorbis_analysis_buffer(), vorbis_lpc_from_data(), and vorbis_lpc_predict().

int vorbis_block_clear | ( | vorbis_block * | vb | ) |

Definition at line 159 of file block.c.

References _ogg_free, _vorbis_block_ripcord(), i, vorbis_block::internal, vorbis_block::localstore, memset, oggpack_writeclear(), vorbis_block_internal::packetblob, and PACKETBLOBS.

Referenced by _decode_clear(), ov_clear(), and ov_halfrate().

int vorbis_block_init | ( | vorbis_dsp_state * | v,
|  | vorbis_block * | vb
| ) |  |

Definition at line 88 of file block.c.

References _ogg_calloc, vorbis_block_internal::ampmax, vorbis_dsp_state::analysisp, i, vorbis_block::internal, vorbis_block::localalloc, vorbis_block::localstore, memset, NULL, oggpack_writeinit(), vorbis_block::opb, vorbis_block_internal::packetblob, PACKETBLOBS, and vorbis_block::vd.

Referenced by _make_decode_ready().

void vorbis_dsp_clear | ( | vorbis_dsp_state * | v | ) |

Definition at line 315 of file block.c.

References _floor_P, _ogg_free, _residue_P, _ve_envelope_clear(), _vp_global_free(), _vp_psy_clear(), vorbis_dsp_state::backend_state, private_state::bms, vorbis_info::channels, vorbis_info::codec_setup, drft_clear(), private_state::fft_look, codec_setup_info::floor_type, codec_setup_info::floors, private_state::flr, private_state::header, private_state::header1, private_state::header2, i, mdct_clear(), memset, NULL, vorbis_dsp_state::pcm, vorbis_dsp_state::pcmret, private_state::psy, private_state::psy_g_look, codec_setup_info::psys, private_state::residue, codec_setup_info::residue_type, codec_setup_info::residues, private_state::transform, private_state::ve, vorbis_dsp_state::vi, vi, and vorbis_bitrate_clear().

Referenced by _decode_clear(), _vds_shared_init(), ov_clear(), ov_halfrate(), and vorbis_synthesis_init().

int vorbis_synthesis_blockin | ( | vorbis_dsp_state * | v,
|  | vorbis_block * | vb
| ) |  |

Definition at line 721 of file block.c.

References _vorbis_window_get(), vorbis_dsp_state::backend_state, codec_setup_info::blocksizes, vorbis_dsp_state::centerW, vorbis_info::channels, vorbis_info::codec_setup, vorbis_dsp_state::eofflag, vorbis_block::eofflag, vorbis_dsp_state::floor_bits, vorbis_block::floor_bits, vorbis_dsp_state::glue_bits, vorbis_block::glue_bits, vorbis_dsp_state::granulepos, vorbis_block::granulepos, codec_setup_info::halfrate_flag, i, j, vorbis_dsp_state::lW, vorbis_dsp_state::nW, OV_EINVAL, vorbis_dsp_state::pcm, vorbis_block::pcm, vorbis_dsp_state::pcm_current, vorbis_dsp_state::pcm_returned, vorbis_dsp_state::res_bits, vorbis_block::res_bits, private_state::sample_count, vorbis_dsp_state::sequence, vorbis_block::sequence, vorbis_dsp_state::time_bits, vorbis_block::time_bits, vorbis_dsp_state::vi, vi, vorbis_dsp_state::W, vorbis_block::W, and private_state::window.

Referenced by _fetch_and_process_packet(), and ov_pcm_seek().

int vorbis_synthesis_init | ( | vorbis_dsp_state * | v,
|  | vorbis_info * | vi
| ) |  |

Definition at line 708 of file block.c.

References _vds_shared_init(), vorbis_dsp_clear(), and vorbis_synthesis_restart().

Referenced by _make_decode_ready().

int vorbis_synthesis_lapout | ( | vorbis_dsp_state * | v,
|  | float *** | pcm
| ) |  |

Definition at line 963 of file block.c.

References codec_setup_info::blocksizes, vorbis_dsp_state::centerW, vorbis_info::channels, vorbis_info::codec_setup, d, codec_setup_info::halfrate_flag, i, j, vorbis_dsp_state::lW, vorbis_dsp_state::pcm, vorbis_dsp_state::pcm_current, vorbis_dsp_state::pcm_returned, vorbis_dsp_state::pcmret, vorbis_dsp_state::vi, vi, and vorbis_dsp_state::W.

Referenced by _ov_64_seek_lap(), _ov_d_seek_lap(), _ov_getlap(), and ov_crosslap().

int vorbis_synthesis_pcmout | ( | vorbis_dsp_state * | v,
|  | float *** | pcm
| ) |  |

Definition at line 937 of file block.c.

References vorbis_info::channels, i, vorbis_dsp_state::pcm, vorbis_dsp_state::pcm_current, vorbis_dsp_state::pcm_returned, vorbis_dsp_state::pcmret, vorbis_dsp_state::vi, and vi.

Referenced by _fetch_and_process_packet(), _ov_getlap(), _ov_initprime(), ov_pcm_seek(), ov_read_filter(), and ov_read_float().

int vorbis_synthesis_read | ( | vorbis_dsp_state * | v,
|  | int | n
| ) |  |

Definition at line 952 of file block.c.

References OV_EINVAL, vorbis_dsp_state::pcm_current, and vorbis_dsp_state::pcm_returned.

Referenced by _ov_getlap(), ov_pcm_seek(), ov_read_filter(), and ov_read_float().

int vorbis_synthesis_restart | ( | vorbis_dsp_state * | v | ) |

Definition at line 685 of file block.c.

References vorbis_dsp_state::backend_state, codec_setup_info::blocksizes, vorbis_dsp_state::centerW, vorbis_info::codec_setup, vorbis_dsp_state::eofflag, vorbis_dsp_state::granulepos, codec_setup_info::halfrate_flag, vorbis_dsp_state::pcm_current, vorbis_dsp_state::pcm_returned, vorbis_dsp_state::sequence, vorbis_dsp_state::vi, and vi.

Referenced by ov_pcm_seek_page(), ov_raw_seek(), and vorbis_synthesis_init().

float* vorbis_window | ( | vorbis_dsp_state * | v,
|  | int | W
| ) |  |

Definition at line 1038 of file block.c.

References _vorbis_window_get(), vorbis_dsp_state::backend_state, vorbis_info::codec_setup, codec_setup_info::halfrate_flag, NULL, vorbis_dsp_state::vi, vi, and private_state::window.

Referenced by _ov_64_seek_lap(), _ov_d_seek_lap(), and ov_crosslap().