home *** CD-ROM | disk | FTP | other *** search
/ Geek 6 / Geek-006.iso / linux / video / xmovie-1.5.3.tar.gz / xmovie-1.5.3.tar / xmovie-1.5.3 / quicktime / rtjpeg_core.h < prev    next >
C/C++ Source or Header  |  2000-11-29  |  3KB  |  99 lines

  1. /* 
  2.    bttvgrab 0.15.4 [1999-03-23]
  3.    (c) 1998, 1999 by Joerg Walter <trouble@moes.pmnet.uni-oldenburg.de>
  4.    Maintained by: Joerg Walter
  5.    Current version at http:/*moes.pmnet.uni-oldenburg.de/bttvgrab/ */
  6.  
  7.     This program is free software; you can redistribute it and/or modify
  8.     it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 2 of the License, or
  10.     (at your option) any later version.
  11.  
  12.     This program is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program; if not, write to the Free Software
  19.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21.    This file is a modified version of RTjpeg 0.1.2, (C) Justin Schoeman 1998
  22. */
  23.  
  24. #include <asm/types.h>
  25.  
  26. /*#define MMX_TRACE */
  27.  
  28. /*#define MMX */
  29.  
  30. #ifdef MMX
  31. #include "mmx.h"
  32. #endif
  33.  
  34. typedef unsigned char __u8;
  35. typedef signed char __s8;
  36. typedef unsigned short __u16;
  37. typedef signed short __s16;
  38. typedef unsigned long __u32;
  39. typedef signed long __s32;
  40. typedef unsigned long long __u64;
  41.  
  42. typedef struct
  43. {
  44. #ifndef MMX
  45.     static __s32 RTjpeg_ws[64+31];
  46. #endif
  47.     __u8 RTjpeg_alldata[2*64+4*64+4*64+4*64+4*64+32];
  48.  
  49.     __s16 *RTjpeg_block;
  50.     __s32 *RTjpeg_lqt;
  51.     __s32 *RTjpeg_cqt;
  52.     __u32 *RTjpeg_liqt;
  53.     __u32 *RTjpeg_ciqt;
  54.  
  55.     unsigned char RTjpeg_lb8;
  56.     unsigned char RTjpeg_cb8;
  57.     int RTjpeg_width, RTjpeg_height;
  58.     int RTjpeg_Ywidth, RTjpeg_Cwidth;
  59.     int RTjpeg_Ysize, RTjpeg_Csize;
  60.  
  61.     __s16 *RTjpeg_old=NULL;
  62.  
  63. #ifdef MMX
  64.     mmx_t RTjpeg_lmask;
  65.     mmx_t RTjpeg_cmask;
  66. #else
  67.     __u16 RTjpeg_lmask;
  68.     __u16 RTjpeg_cmask;
  69. #endif
  70.     int RTjpeg_mtest=0;
  71.     
  72.     unsigned long tbls[128];
  73. } rtjpeg_t;
  74.  
  75. extern void RTjpeg_init_Q(__u8 Q);
  76. extern void RTjpeg_init_compress(long unsigned int *buf, int width, int height, __u8 Q);
  77. extern void RTjpeg_init_decompress(long unsigned int *buf, int width, int height);
  78. extern int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp);
  79. extern int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp);
  80. extern void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp);
  81. extern void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp);
  82. extern int RTjpeg_compress8(__s8 *sp, unsigned char *bp);
  83. extern void RTjpeg_decompress8(__s8 *sp, __u8 *bp);
  84.  
  85. extern void RTjpeg_init_mcompress(void);
  86. extern int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask);
  87. extern int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask);
  88. extern int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask);
  89. extern void RTjpeg_set_test(int i);
  90.  
  91. extern void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride);
  92. extern void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride);
  93. extern void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride);
  94. extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride);
  95. extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride);
  96. extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride);
  97.           
  98.  
  99.