zr36016.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. * ------------------------------------------------------------------------
  21. */
  22. #ifndef ZR36016_H
  23. #define ZR36016_H
  24. /* data stored for each zoran jpeg codec chip */
  25. struct zr36016 {
  26. char name[32];
  27. int num;
  28. /* io datastructure */
  29. struct videocodec *codec;
  30. // coder status
  31. __u8 version;
  32. // actual coder setup
  33. int mode;
  34. __u16 xoff;
  35. __u16 yoff;
  36. __u16 width;
  37. __u16 height;
  38. __u16 xdec;
  39. __u16 ydec;
  40. };
  41. /* direct register addresses */
  42. #define ZR016_GOSTOP 0x00
  43. #define ZR016_MODE 0x01
  44. #define ZR016_IADDR 0x02
  45. #define ZR016_IDATA 0x03
  46. /* indirect register addresses */
  47. #define ZR016I_SETUP1 0x00
  48. #define ZR016I_SETUP2 0x01
  49. #define ZR016I_NAX_LO 0x02
  50. #define ZR016I_NAX_HI 0x03
  51. #define ZR016I_PAX_LO 0x04
  52. #define ZR016I_PAX_HI 0x05
  53. #define ZR016I_NAY_LO 0x06
  54. #define ZR016I_NAY_HI 0x07
  55. #define ZR016I_PAY_LO 0x08
  56. #define ZR016I_PAY_HI 0x09
  57. #define ZR016I_NOL_LO 0x0a
  58. #define ZR016I_NOL_HI 0x0b
  59. /* possible values for mode register */
  60. #define ZR016_RGB444_YUV444 0x00
  61. #define ZR016_RGB444_YUV422 0x01
  62. #define ZR016_RGB444_YUV411 0x02
  63. #define ZR016_RGB444_Y400 0x03
  64. #define ZR016_RGB444_RGB444 0x04
  65. #define ZR016_YUV444_YUV444 0x08
  66. #define ZR016_YUV444_YUV422 0x09
  67. #define ZR016_YUV444_YUV411 0x0a
  68. #define ZR016_YUV444_Y400 0x0b
  69. #define ZR016_YUV444_RGB444 0x0c
  70. #define ZR016_YUV422_YUV422 0x11
  71. #define ZR016_YUV422_YUV411 0x12
  72. #define ZR016_YUV422_Y400 0x13
  73. #define ZR016_YUV411_YUV411 0x16
  74. #define ZR016_YUV411_Y400 0x17
  75. #define ZR016_4444_4444 0x19
  76. #define ZR016_100_100 0x1b
  77. #define ZR016_RGB444 0x00
  78. #define ZR016_YUV444 0x20
  79. #define ZR016_YUV422 0x40
  80. #define ZR016_COMPRESSION 0x80
  81. #define ZR016_EXPANSION 0x80
  82. /* possible values for setup 1 register */
  83. #define ZR016_CKRT 0x80
  84. #define ZR016_VERT 0x40
  85. #define ZR016_HORZ 0x20
  86. #define ZR016_HRFL 0x10
  87. #define ZR016_DSFL 0x08
  88. #define ZR016_SBFL 0x04
  89. #define ZR016_RSTR 0x02
  90. #define ZR016_CNTI 0x01
  91. /* possible values for setup 2 register */
  92. #define ZR016_SYEN 0x40
  93. #define ZR016_CCIR 0x04
  94. #define ZR016_SIGN 0x02
  95. #define ZR016_YMCS 0x01
  96. #endif /*fndef ZR36016_H */