Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

mfwddct.c File Reference

#include "all.h"
#include "dct.h"
#include "mtypes.h"
#include "opts.h"

Go to the source code of this file.


Defines

#define EIGHT_BIT_SAMPLES
#define LG2_DCT_SCALE   16
#define ONE   ((int32) 1)
#define DCT_SCALE   (ONE << LG2_DCT_SCALE)
#define LG2_OVERSCALE   2
#define OVERSCALE   (ONE << LG2_OVERSCALE)
#define OVERSHIFT(x)   ((x) <<= LG2_OVERSCALE)
#define FIX(x)   ((int32) ((x) * DCT_SCALE + 0.5))
#define FIXO(x)   ((int32) ((x) * DCT_SCALE / OVERSCALE + 0.5))
#define UNFIX(x)   RIGHT_SHIFT((x) + (ONE << (LG2_DCT_SCALE-1)), LG2_DCT_SCALE)
#define UNFIXH(x)   RIGHT_SHIFT((x) + (ONE << LG2_DCT_SCALE), LG2_DCT_SCALE+1)
#define UNFIXO(x)
#define SIN_1_4   FIX(0.707106781)
#define COS_1_4   SIN_1_4
#define SIN_1_8   FIX(0.382683432)
#define COS_1_8   FIX(0.923879533)
#define SIN_3_8   COS_1_8
#define COS_3_8   SIN_1_8
#define SIN_1_16   FIX(0.195090322)
#define COS_1_16   FIX(0.980785280)
#define SIN_7_16   COS_1_16
#define COS_7_16   SIN_1_16
#define SIN_3_16   FIX(0.555570233)
#define COS_3_16   FIX(0.831469612)
#define SIN_5_16   COS_3_16
#define COS_5_16   SIN_3_16
#define OSIN_1_4   FIXO(0.707106781)
#define OCOS_1_4   OSIN_1_4
#define OSIN_1_8   FIXO(0.382683432)
#define OCOS_1_8   FIXO(0.923879533)
#define OSIN_3_8   OCOS_1_8
#define OCOS_3_8   OSIN_1_8
#define OSIN_1_16   FIXO(0.195090322)
#define OCOS_1_16   FIXO(0.980785280)
#define OSIN_7_16   OCOS_1_16
#define OCOS_7_16   OSIN_1_16
#define OSIN_3_16   FIXO(0.555570233)
#define OCOS_3_16   FIXO(0.831469612)
#define OSIN_5_16   OCOS_3_16
#define OCOS_5_16   OSIN_3_16
#define PI   3.14159265358979323846

Functions

void reference_fwd_dct _ANSI_ARGS_ ((Block block, Block dest))
void mp_fwd_dct_fast _ANSI_ARGS_ ((Block data2d, Block dest2d))
void init_fdct _ANSI_ARGS_ ((void))
void mp_fwd_dct_block2 (data, dest) Block data
void init_fdct ()
void reference_fwd_dct (block, dest) Block block

Variables

boolean pureDCT
void dest
 dest2d

Define Documentation

#define COS_1_16   FIX(0.980785280)
 

Definition at line 95 of file mfwddct.c.

#define COS_1_4   SIN_1_4
 

Definition at line 87 of file mfwddct.c.

#define COS_1_8   FIX(0.923879533)
 

Definition at line 90 of file mfwddct.c.

#define COS_3_16   FIX(0.831469612)
 

Definition at line 100 of file mfwddct.c.

#define COS_3_8   SIN_1_8
 

Definition at line 92 of file mfwddct.c.

#define COS_5_16   SIN_3_16
 

Definition at line 102 of file mfwddct.c.

#define COS_7_16   SIN_1_16
 

Definition at line 97 of file mfwddct.c.

#define DCT_SCALE   (ONE << LG2_DCT_SCALE)
 

Definition at line 55 of file mfwddct.c.

#define EIGHT_BIT_SAMPLES
 

Definition at line 46 of file mfwddct.c.

#define FIX      ((int32) ((x) * DCT_SCALE + 0.5))
 

Definition at line 65 of file mfwddct.c.

#define FIXO      ((int32) ((x) * DCT_SCALE / OVERSCALE + 0.5))
 

Definition at line 70 of file mfwddct.c.

#define LG2_DCT_SCALE   16
 

Definition at line 48 of file mfwddct.c.

#define LG2_OVERSCALE   2
 

Definition at line 60 of file mfwddct.c.

#define OCOS_1_16   FIXO(0.980785280)
 

Definition at line 116 of file mfwddct.c.

#define OCOS_1_4   OSIN_1_4
 

Definition at line 108 of file mfwddct.c.

#define OCOS_1_8   FIXO(0.923879533)
 

Definition at line 111 of file mfwddct.c.

#define OCOS_3_16   FIXO(0.831469612)
 

Definition at line 121 of file mfwddct.c.

#define OCOS_3_8   OSIN_1_8
 

Definition at line 113 of file mfwddct.c.

#define OCOS_5_16   OSIN_3_16
 

Definition at line 123 of file mfwddct.c.

#define OCOS_7_16   OSIN_1_16
 

Definition at line 118 of file mfwddct.c.

#define ONE   ((int32) 1)
 

Definition at line 53 of file mfwddct.c.

#define OSIN_1_16   FIXO(0.195090322)
 

Definition at line 115 of file mfwddct.c.

#define OSIN_1_4   FIXO(0.707106781)
 

Definition at line 107 of file mfwddct.c.

#define OSIN_1_8   FIXO(0.382683432)
 

Definition at line 110 of file mfwddct.c.

#define OSIN_3_16   FIXO(0.555570233)
 

Definition at line 120 of file mfwddct.c.

#define OSIN_3_8   OCOS_1_8
 

Definition at line 112 of file mfwddct.c.

#define OSIN_5_16   OCOS_3_16
 

Definition at line 122 of file mfwddct.c.

#define OSIN_7_16   OCOS_1_16
 

Definition at line 117 of file mfwddct.c.

#define OVERSCALE   (ONE << LG2_OVERSCALE)
 

Definition at line 61 of file mfwddct.c.

#define OVERSHIFT      ((x) <<= LG2_OVERSCALE)
 

Definition at line 62 of file mfwddct.c.

#define PI   3.14159265358979323846
 

#define SIN_1_16   FIX(0.195090322)
 

Definition at line 94 of file mfwddct.c.

#define SIN_1_4   FIX(0.707106781)
 

Definition at line 86 of file mfwddct.c.

#define SIN_1_8   FIX(0.382683432)
 

Definition at line 89 of file mfwddct.c.

#define SIN_3_16   FIX(0.555570233)
 

Definition at line 99 of file mfwddct.c.

#define SIN_3_8   COS_1_8
 

Definition at line 91 of file mfwddct.c.

#define SIN_5_16   COS_3_16
 

Definition at line 101 of file mfwddct.c.

#define SIN_7_16   COS_1_16
 

Definition at line 96 of file mfwddct.c.

#define UNFIX      RIGHT_SHIFT((x) + (ONE << (LG2_DCT_SCALE-1)), LG2_DCT_SCALE)
 

Definition at line 73 of file mfwddct.c.

#define UNFIXH      RIGHT_SHIFT((x) + (ONE << LG2_DCT_SCALE), LG2_DCT_SCALE+1)
 

Definition at line 76 of file mfwddct.c.

#define UNFIXO  
 

Value:

Definition at line 79 of file mfwddct.c.


Function Documentation

void init_fdct _ANSI_ARGS_ (void)   
 

void mp_fwd_dct_fast _ANSI_ARGS_ (Block data2d, Block dest2d  
 

void reference_fwd_dct _ANSI_ARGS_ (Block block, Block dest  
 

void init_fdct  
 

Definition at line 329 of file mfwddct.c.

References i.

Referenced by Tune_Init().

00330 {
00331   int i, j;
00332   double s;
00333 
00334   for (i=0; i<8; i++)
00335   {
00336     s = (i==0) ? sqrt(0.125) : 0.5;
00337 
00338     for (j=0; j<8; j++)
00339       trans_coef[i][j] = s * cos((PI/8.0)*i*(j+0.5));
00340   }
00341 }

void mp_fwd_dct_block2 data   ,
dest   
 

void reference_fwd_dct block   ,
dest   
 


Variable Documentation

void dest
 

Definition at line 344 of file mfwddct.c.

dest2d
 

Definition at line 171 of file mfwddct.c.

boolean pureDCT
 

Definition at line 143 of file mfwddct.c.

 

Powered by Plone

This site conforms to the following standards: