summaryrefslogtreecommitdiff
path: root/plugins/gxvideo/gpu_utils.h
blob: 471cc9a512c695faee06301a8a7a1d5088154d4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
 * Copyright (C) 2010 Benoit Gschwind
 * Inspired by original author : Pete Bernert
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 */

#ifndef GPU_UTILS_H_
#define GPU_UTILS_H_

#include <stdint.h>

typedef struct {
	uint16_t rgb16;
} __attribute__((__packed__)) gxv_rgb16;

typedef struct {
	uint8_t r;
	uint8_t g;
	uint8_t b;
} __attribute__((__packed__)) gxv_rgb24;

/* for fast recast ^^ */
typedef union {
	uint8_t * u8;
	int8_t * s8;
	uint16_t * u16;
	int16_t * s16;
	uint32_t * u32;
	int32_t * s32;
	gxv_rgb16 * rgb16;
	gxv_rgb24 * rgb24;
} gxv_pointer_t;

typedef struct {
	int32_t x;
	int32_t y;
} gxv_point_t;

typedef struct {
	int16_t x;
	int16_t y;
} gxv_spoint_t;

typedef struct {
	int16_t x0;
	int16_t x1;
	int16_t y0;
	int16_t y1;
} gxv_rect_t;

typedef struct {
	gxv_point_t position;
	gxv_point_t mode;
	gxv_point_t DrawOffset;
	gxv_rect_t range;
} gxv_display_t;

typedef struct {
	gxv_rect_t Position;
} gxv_win_t;

#endif /* GPU_UTILS_H_ */