Gnash  0.8.11dev
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 
31 };
32 
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 
60 
62 static inline bool vaapi_image_format_is_rgb(VaapiImageFormat format)
63 {
65 }
66 
68 static inline bool vaapi_image_format_is_yuv(VaapiImageFormat format)
69 {
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 
Packed RGB 8:8:8, 32-bit, R G B A.
Definition: VaapiImageFormat.h:46
Best format for the underlying hardware.
Definition: VaapiImageFormat.h:36
Definition: VaapiImageFormat.h:28
Planar YUV 4:2:0, 12-bit, 3 planes for Y V U.
Definition: VaapiImageFormat.h:40
VaapiImageFormat
Image types.
Definition: VaapiImageFormat.h:34
YUV colorspace.
Definition: VaapiImageFormat.h:30
Packed RGB 8:8:8, 32-bit, A R G B, native endian byte-order.
Definition: VaapiImageFormat.h:52
#define DSOEXPORT
Definition: dsodefs.h:55
VaapiImageFormat vaapi_get_image_format(VAImageFormat const &format)
Return image format from a VA image format.
Definition: VaapiImageFormat.cpp:43
VaapiColorspace DSOEXPORT vaapi_image_format_get_colorspace(VaapiImageFormat format)
Get colorspace for the specified image format.
Definition: VaapiImageFormat.cpp:23
Packed RGB 8:8:8, 24-bit, R G B.
Definition: VaapiImageFormat.h:54
Planar YUV 4:2:0, 12-bit, 3 planes for Y U V.
Definition: VaapiImageFormat.h:42
Planar YUV 4:2:0, 12-bit, 1 plane for Y and 1 plane for UV.
Definition: VaapiImageFormat.h:38
Packed RGB 8:8:8, 32-bit, R G B A.
Definition: VaapiImageFormat.h:50
Packed RGB 8:8:8, 32-bit, A R G B.
Definition: VaapiImageFormat.h:44
VaapiColorspace
Color spaces.
Definition: VaapiImageFormat.h:27
Unknown colorspace.
Definition: VaapiImageFormat.h:29
Packed RGB 8:8:8, 32-bit, A R G B.
Definition: VaapiImageFormat.h:48