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 */
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
;
45 static __s32 RTjpeg_ws
[64+31];
47 __u8 RTjpeg_alldata
[2*64+4*64+4*64+4*64+4*64+32];
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
;
72 unsigned long tbls
[128];
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
);