zr36016.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * Zoran ZR36016 basic configuration functions - header file
  3. *
  4. * Copyright (C) 2001 Wolfgang Scherr <scherr@net4you.at>
  5. *
  6. * $Id: zr36016.h,v 1.1.2.3 2003/01/14 21:18:07 rbultje Exp $
  7. *
  8. * ------------------------------------------------------------------------
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23. *
  24. * ------------------------------------------------------------------------
  25. */
  26. #ifndef ZR36016_H
  27. #define ZR36016_H
  28. /* data stored for each zoran jpeg codec chip */
  29. struct zr36016 {
  30. char name[32];
  31. int num;
  32. /* io datastructure */
  33. struct videocodec *codec;
  34. // coder status
  35. __u8 version;
  36. // actual coder setup
  37. int mode;
  38. __u16 xoff;
  39. __u16 yoff;
  40. __u16 width;
  41. __u16 height;
  42. __u16 xdec;
  43. __u16 ydec;
  44. };
  45. /* direct register addresses */
  46. #define ZR016_GOSTOP 0x00
  47. #define ZR016_MODE 0x01
  48. #define ZR016_IADDR 0x02
  49. #define ZR016_IDATA 0x03
  50. /* indirect register addresses */
  51. #define ZR016I_SETUP1 0x00
  52. #define ZR016I_SETUP2 0x01
  53. #define ZR016I_NAX_LO 0x02
  54. #define ZR016I_NAX_HI 0x03
  55. #define ZR016I_PAX_LO 0x04
  56. #define ZR016I_PAX_HI 0x05
  57. #define ZR016I_NAY_LO 0x06
  58. #define ZR016I_NAY_HI 0x07
  59. #define ZR016I_PAY_LO 0x08
  60. #define ZR016I_PAY_HI 0x09
  61. #define ZR016I_NOL_LO 0x0a
  62. #define ZR016I_NOL_HI 0x0b
  63. /* possible values for mode register */
  64. #define ZR016_RGB444_YUV444 0x00
  65. #define ZR016_RGB444_YUV422 0x01
  66. #define ZR016_RGB444_YUV411 0x02
  67. #define ZR016_RGB444_Y400 0x03
  68. #define ZR016_RGB444_RGB444 0x04
  69. #define ZR016_YUV444_YUV444 0x08
  70. #define ZR016_YUV444_YUV422 0x09
  71. #define ZR016_YUV444_YUV411 0x0a
  72. #define ZR016_YUV444_Y400 0x0b
  73. #define ZR016_YUV444_RGB444 0x0c
  74. #define ZR016_YUV422_YUV422 0x11
  75. #define ZR016_YUV422_YUV411 0x12
  76. #define ZR016_YUV422_Y400 0x13
  77. #define ZR016_YUV411_YUV411 0x16
  78. #define ZR016_YUV411_Y400 0x17
  79. #define ZR016_4444_4444 0x19
  80. #define ZR016_100_100 0x1b
  81. #define ZR016_RGB444 0x00
  82. #define ZR016_YUV444 0x20
  83. #define ZR016_YUV422 0x40
  84. #define ZR016_COMPRESSION 0x80
  85. #define ZR016_EXPANSION 0x80
  86. /* possible values for setup 1 register */
  87. #define ZR016_CKRT 0x80
  88. #define ZR016_VERT 0x40
  89. #define ZR016_HORZ 0x20
  90. #define ZR016_HRFL 0x10
  91. #define ZR016_DSFL 0x08
  92. #define ZR016_SBFL 0x04
  93. #define ZR016_RSTR 0x02
  94. #define ZR016_CNTI 0x01
  95. /* possible values for setup 2 register */
  96. #define ZR016_SYEN 0x40
  97. #define ZR016_CCIR 0x04
  98. #define ZR016_SIGN 0x02
  99. #define ZR016_YMCS 0x01
  100. #endif /*fndef ZR36016_H */