Code Search for Developers
 
 
  

mdct.h from NeoEngineNG at Krugle


Show mdct.h syntax highlighted

/********************************************************************
 *                                                                  *
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
 *                                                                  *
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
 * by the XIPHOPHORUS Company http://www.xiph.org/                  *
 *                                                                  *
 ********************************************************************

 function: modified discrete cosine transform prototypes
 last mod: $Id: mdct.h,v 1.1 2004/03/17 18:22:57 arithon Exp $

 ********************************************************************/

#ifndef _OGG_mdct_H_
#define _OGG_mdct_H_

#include "vorbis/codec.h"





/*#define MDCT_INTEGERIZED  <- be warned there could be some hurt left here*/
#ifdef MDCT_INTEGERIZED

#define DATA_TYPE int
#define REG_TYPE  register int
#define TRIGBITS 14
#define cPI3_8 6270
#define cPI2_8 11585
#define cPI1_8 15137

#define FLOAT_CONV(x) ((int)((x)*(1<<TRIGBITS)+.5))
#define MULT_NORM(x) ((x)>>TRIGBITS)
#define HALVE(x) ((x)>>1)

#else

#define DATA_TYPE float
#define REG_TYPE  float
#define cPI3_8 .38268343236508977175F
#define cPI2_8 .70710678118654752441F
#define cPI1_8 .92387953251128675613F

#define FLOAT_CONV(x) (x)
#define MULT_NORM(x) (x)
#define HALVE(x) ((x)*.5f)

#endif


typedef struct {
  int n;
  int log2n;
  
  DATA_TYPE *trig;
  int       *bitrev;

  DATA_TYPE scale;
} mdct_lookup;

extern void mdct_init(mdct_lookup *lookup,int n);
extern void mdct_clear(mdct_lookup *l);
extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);

#endif
















See more files for this project here

NeoEngineNG

NeoenEngine NG (Next Generation) is the evolution of neoengine one,it\'s a different development from NeoEngine2, it\'s a direct inherits from NeoEngine one.\n

Project homepage: http://sourceforge.net/projects/neoengineng
Programming language(s): C,C++
License: other

  books/
    coupled/
      res_books_stereo.h
    floor/
      floor_books.h
    uncoupled/
      res_books_uncoupled.h
  modes/
    floor_all.h
    psych_11.h
    psych_16.h
    psych_44.h
    psych_8.h
    residue_16.h
    residue_44.h
    residue_44u.h
    residue_8.h
    setup_11.h
    setup_16.h
    setup_22.h
    setup_32.h
    setup_44.h
    setup_44u.h
    setup_8.h
    setup_X.h
  analysis.c
  backends.h
  barkmel.c
  bitrate.c
  bitrate.h
  block.c
  codebook.c
  codebook.h
  codec.h
  codec_internal.h
  envelope.c
  envelope.h
  floor0.c
  floor1.c
  highlevel.h
  info.c
  lookup.c
  lookup.h
  lookup_data.h
  lookups.pl
  lpc.c
  lpc.h
  lsp.c
  lsp.h
  mapping0.c
  masking.h
  mdct.c
  mdct.h
  misc.h
  os.h
  psy.c
  psy.h
  psytune.c
  registry.c
  registry.h
  res0.c
  scales.h
  sharedbook.c
  smallft.c
  smallft.h
  synthesis.c
  tone.c
  vorbisenc.c
  vorbisenc.h
  vorbisfile.c
  vorbisfile.h
  window.c
  window.h