r1007: Make configure detect and work on amd64.
[cinelerra_cv/mob.git] / quicktime / rtjpeg_core.h
bloba161a45a4b97823c6e110a9598e38f0ca9bc1112
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/ */
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.
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.
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.
21 This file is a modified version of RTjpeg 0.1.2, (C) Justin Schoeman 1998
24 #include <asm/types.h>
26 /*#define MMX_TRACE */
28 /*#define MMX */
30 #ifdef USE_MMX
31 #include "mmx.h"
32 #endif
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;
42 typedef struct
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];
49 __s16 *RTjpeg_block;
50 __s32 *RTjpeg_lqt;
51 __s32 *RTjpeg_cqt;
52 __u32 *RTjpeg_liqt;
53 __u32 *RTjpeg_ciqt;
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;
61 __s16 *RTjpeg_old=NULL;
63 #ifdef USE_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;
72 unsigned long tbls[128];
73 } rtjpeg_t;
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);
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);
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);