source: trunk/kernel/ksh/sgiImg.h @ 68

Last change on this file since 68 was 1, checked in by alain, 8 years ago

First import

File size: 1.5 KB
RevLine 
[1]1/*
2   This file is part of MutekP.
3 
4   MutekP is free software; you can redistribute it and/or modify it
5   under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8 
9   MutekP is distributed in the hope that it will be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   General Public License for more details.
13 
14   You should have received a copy of the GNU General Public License
15   along with MutekP; if not, write to the Free Software Foundation,
16   Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 
18   UPMC / LIP6 / SOC (c) 2008
19   Copyright Ghassan Almaless <ghassan.almaless@lip6.fr>
20*/
21
22#ifndef _SGI_IMG_H_
23#define _SGI_IMG_H_
24
25#include <stdint.h>
26
27#define SGI_ALIGN4(val)                         \
28  (((val) & 0x000000FF) << 24  |                \
29   ((val) & 0x0000FF00) << 8   |                \
30   ((val) & 0x00FF0000) >> 8   |                \
31   (val) >> 24)
32
33#define SGI_ALIGN2(val)                         \
34  (((val) & 0x00FF)     << 8   |                \
35   (val) >> 8)
36
37#define SGI_TO_LE2(val)                         \
38  (((val) & 0xFF00)     >> 8   |                \
39   (val) << 8)
40
41struct sgi_info_s
42{
43  uint16_t   magic;
44  uint8_t    storage;
45  uint8_t    bpc;
46  uint16_t   dimension;
47  uint16_t   x_size;
48  uint16_t   y_size;
49  uint16_t   z_size;
50  uint32_t   pix_min;
51  uint32_t   pix_max;
52  uint32_t   dummy1;
53  uint8_t    img_name[80];
54  uint32_t   color_map;
55  uint8_t    dummy2[404];
56} __attribute__ ((packed));
57
58
59#endif
Note: See TracBrowser for help on using the repository browser.