• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Zoran ZR36016 basic configuration functions - header file
4  *
5  * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at>
6  */
7 
8 #ifndef ZR36016_H
9 #define ZR36016_H
10 
11 /* data stored for each zoran jpeg codec chip */
12 struct zr36016 {
13 	char name[32];
14 	int num;
15 	/* io datastructure */
16 	struct videocodec *codec;
17 	// coder status
18 	__u8 version;
19 	// actual coder setup
20 	int mode;
21 
22 	__u16 xoff;
23 	__u16 yoff;
24 	__u16 width;
25 	__u16 height;
26 	__u16 xdec;
27 	__u16 ydec;
28 };
29 
30 /* direct  register addresses */
31 #define ZR016_GOSTOP      0x00
32 #define ZR016_MODE        0x01
33 #define ZR016_IADDR       0x02
34 #define ZR016_IDATA       0x03
35 
36 /* indirect  register addresses */
37 #define ZR016I_SETUP1     0x00
38 #define ZR016I_SETUP2     0x01
39 #define ZR016I_NAX_LO     0x02
40 #define ZR016I_NAX_HI     0x03
41 #define ZR016I_PAX_LO     0x04
42 #define ZR016I_PAX_HI     0x05
43 #define ZR016I_NAY_LO     0x06
44 #define ZR016I_NAY_HI     0x07
45 #define ZR016I_PAY_LO     0x08
46 #define ZR016I_PAY_HI     0x09
47 #define ZR016I_NOL_LO     0x0a
48 #define ZR016I_NOL_HI     0x0b
49 
50 /* possible values for mode register */
51 #define ZR016_RGB444_YUV444  0x00
52 #define ZR016_RGB444_YUV422  0x01
53 #define ZR016_RGB444_YUV411  0x02
54 #define ZR016_RGB444_Y400    0x03
55 #define ZR016_RGB444_RGB444  0x04
56 #define ZR016_YUV444_YUV444  0x08
57 #define ZR016_YUV444_YUV422  0x09
58 #define ZR016_YUV444_YUV411  0x0a
59 #define ZR016_YUV444_Y400    0x0b
60 #define ZR016_YUV444_RGB444  0x0c
61 #define ZR016_YUV422_YUV422  0x11
62 #define ZR016_YUV422_YUV411  0x12
63 #define ZR016_YUV422_Y400    0x13
64 #define ZR016_YUV411_YUV411  0x16
65 #define ZR016_YUV411_Y400    0x17
66 #define ZR016_4444_4444      0x19
67 #define ZR016_100_100        0x1b
68 
69 #define ZR016_RGB444         0x00
70 #define ZR016_YUV444         0x20
71 #define ZR016_YUV422         0x40
72 
73 #define ZR016_COMPRESSION    0x80
74 #define ZR016_EXPANSION      0x80
75 
76 /* possible values for setup 1 register */
77 #define ZR016_CKRT           0x80
78 #define ZR016_VERT           0x40
79 #define ZR016_HORZ           0x20
80 #define ZR016_HRFL           0x10
81 #define ZR016_DSFL           0x08
82 #define ZR016_SBFL           0x04
83 #define ZR016_RSTR           0x02
84 #define ZR016_CNTI           0x01
85 
86 /* possible values for setup 2 register */
87 #define ZR016_SYEN           0x40
88 #define ZR016_CCIR           0x04
89 #define ZR016_SIGN           0x02
90 #define ZR016_YMCS           0x01
91 
92 int zr36016_init_module(void);
93 void zr36016_cleanup_module(void);
94 #endif				/*fndef ZR36016_H */
95