Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libdevice
vaapi
VaapiImageFormat.h
Go to the documentation of this file.
1
// VaapiImageFormat.h: VA image format abstraction
2
//
3
// Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
4
//
5
// This program is free software; you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation; either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
//
19
20
#ifndef GNASH_VAAPIIMAGEFORMAT_H
21
#define GNASH_VAAPIIMAGEFORMAT_H
22
23
#include "
dsodefs.h
"
24
#include "
vaapi_common.h
"
25
27
enum
VaapiColorspace
{
28
VAAPI_COLORSPACE_UNKNOWN
,
29
VAAPI_COLORSPACE_YUV
,
30
VAAPI_COLORSPACE_RGB
31
};
32
34
enum
VaapiImageFormat
{
36
VAAPI_IMAGE_NONE
= 0,
38
VAAPI_IMAGE_NV12
= VA_FOURCC(
'N'
,
'V'
,
'1'
,
'2'
),
40
VAAPI_IMAGE_YV12
= VA_FOURCC(
'Y'
,
'V'
,
'1'
,
'2'
),
42
VAAPI_IMAGE_I420
= VA_FOURCC(
'I'
,
'4'
,
'2'
,
'0'
),
44
VAAPI_IMAGE_ARGB
= VA_FOURCC(
'A'
,
'R'
,
'G'
,
'B'
),
46
VAAPI_IMAGE_RGBA
= VA_FOURCC(
'R'
,
'G'
,
'B'
,
'A'
),
48
VAAPI_IMAGE_ABGR
= VA_FOURCC(
'A'
,
'B'
,
'G'
,
'R'
),
50
VAAPI_IMAGE_BGRA
= VA_FOURCC(
'B'
,
'G'
,
'R'
,
'A'
),
52
VAAPI_IMAGE_RGB32
= VA_FOURCC(
'R'
,
'G'
,
'B'
, 32),
54
VAAPI_IMAGE_RGB24
= VA_FOURCC(
'R'
,
'G'
,
'B'
, 24)
55
};
56
58
VaapiColorspace
DSOEXPORT
59
vaapi_image_format_get_colorspace
(
VaapiImageFormat
format);
60
62
static
inline
bool
vaapi_image_format_is_rgb(
VaapiImageFormat
format)
63
{
64
return
vaapi_image_format_get_colorspace
(format) ==
VAAPI_COLORSPACE_RGB
;
65
}
66
68
static
inline
bool
vaapi_image_format_is_yuv(
VaapiImageFormat
format)
69
{
70
return
vaapi_image_format_get_colorspace
(format) ==
VAAPI_COLORSPACE_YUV
;
71
}
72
74
VaapiImageFormat
vaapi_get_image_format
(VAImageFormat
const
&format);
75
76
#endif // GNASH_VAAPIIMAGEFORMAT_H
77
78
// local Variables:
79
// mode: C++
80
// indent-tabs-mode: nil
81
// End:
82
83
Generated on Thu Apr 4 2013 16:43:49 for Gnash by
1.8.3.1