~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Open Mash Cross Reference
mash/codec/dct.h

Component: ~ [ mash ] ~ [ apps ] ~ [ gsm ] ~ [ lib ] ~ [ otcl ] ~ [ srm ] ~ [ tcl8.3 ] ~ [ tclcl ] ~ [ tk8.3 ] ~ [ tutorials ] ~

  1 /*
  2  * dct.h --
  3  *
  4  *      Header file for the DCT code
  5  *
  6  * Copyright (c) 1994-2002 The Regents of the University of California.
  7  * All rights reserved.
  8  *
  9  * Redistribution and use in source and binary forms, with or without
 10  * modification, are permitted provided that the following conditions are met:
 11  *
 12  * A. Redistributions of source code must retain the above copyright notice,
 13  *    this list of conditions and the following disclaimer.
 14  * B. Redistributions in binary form must reproduce the above copyright notice,
 15  *    this list of conditions and the following disclaimer in the documentation
 16  *    and/or other materials provided with the distribution.
 17  * C. Neither the names of the copyright holders nor the names of its
 18  *    contributors may be used to endorse or promote products derived from this
 19  *    software without specific prior written permission.
 20  *
 21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
 22  * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 23  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 24  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
 25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 31  * POSSIBILITY OF SUCH DAMAGE.
 32  *
 33  * @(#) $Header: /usr/mash/src/repository/mash/mash-1/codec/dct.h,v 1.12 2002/02/03 03:13:32 lim Exp $
 34  */
 35 
 36 /*
 37  * Ck = cos(k pi / 16)
 38  * Sk = sin(k pi / 16)
 39  */
 40 #define C1 0.98078528
 41 #define C2 0.92387953
 42 #define C3 0.83146961
 43 #define C4 0.70710678
 44 #define C5 0.55557023
 45 #define C6 0.38268343
 46 #define C7 0.19509032
 47 #define S1 C7
 48 #define S3 C5
 49 #define S6 C2
 50 #define C_1 C1
 51 #define S_1 (-S1)
 52 #define C_3 C3
 53 #define S_3 (-S3)
 54 
 55 /* the following line enables MMX code.  if your cpu supports MMX, change this to 1 */
 56 #define MMX_DCT_ENABLED 0
 57 
 58 void fdct(const u_char* in, int stride, short* out, const float* qt);
 59 
 60 #ifdef INT_64
 61 void rdct(short* coef, INT_64 mask, u_char* out, int stride, const int* qt);
 62 void rdct(short* coef, INT_64 mask, u_char* out, int stride, const u_char* in);
 63 #else
 64 void rdct(short* coef, u_int m0, u_int m1, u_char* out,
 65           int stride, const int* qt);
 66 void rdct(short* coef, u_int m0, u_int m1, u_char* out,
 67           int stride, const u_char* in);
 68 #endif
 69 
 70 void dcfill(int dc, u_char* out, int stride);
 71 void dcsum(int dc, u_char* in, u_char* out, int stride);
 72 void dcsum2(int dc, u_char* in, u_char* out, int stride);
 73 void dct_decimate(const short* in0, const short* in1, short* out);
 74 
 75 /*FIXME*/
 76 void rdct_fold_q(const int* in, int* qt);
 77 void fdct_fold_q(const int* in, float* qt);
 78 
 79 extern const u_char ROWZAG[];
 80 extern const u_char COLZAG[];
 81 
 82 /*FIXME*/
 83 extern void j_fwd_dct (short* data);
 84 
 85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.