• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

VaapiImageFormat.h

Go to the documentation of this file.
00001 // VaapiImageFormat.h: VA image format abstraction
00002 // 
00003 // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 //
00019 
00020 #ifndef GNASH_VAAPIIMAGEFORMAT_H
00021 #define GNASH_VAAPIIMAGEFORMAT_H
00022 
00023 #include "vaapi_common.h"
00024 
00026 enum VaapiColorspace {
00027     VAAPI_COLORSPACE_UNKNOWN,   
00028     VAAPI_COLORSPACE_YUV,       
00029     VAAPI_COLORSPACE_RGB        
00030 };
00031 
00033 enum VaapiImageFormat {
00035     VAAPI_IMAGE_NONE  = 0,
00037     VAAPI_IMAGE_NV12  = VA_FOURCC('N','V','1','2'),
00039     VAAPI_IMAGE_YV12  = VA_FOURCC('Y','V','1','2'),
00041     VAAPI_IMAGE_I420  = VA_FOURCC('I','4','2','0'),
00043     VAAPI_IMAGE_ARGB  = VA_FOURCC('A','R','G','B'),
00045     VAAPI_IMAGE_RGBA  = VA_FOURCC('R','G','B','A'),
00047     VAAPI_IMAGE_ABGR  = VA_FOURCC('A','B','G','R'),
00049     VAAPI_IMAGE_BGRA  = VA_FOURCC('B','G','R','A'),
00051     VAAPI_IMAGE_RGB32 = VA_FOURCC('R','G','B', 32),
00053     VAAPI_IMAGE_RGB24 = VA_FOURCC('R','G','B', 24)
00054 };
00055 
00057 VaapiColorspace vaapi_image_format_get_colorspace(VaapiImageFormat format);
00058 
00060 static inline bool vaapi_image_format_is_rgb(VaapiImageFormat format)
00061 {
00062     return vaapi_image_format_get_colorspace(format) == VAAPI_COLORSPACE_RGB;
00063 }
00064 
00066 static inline bool vaapi_image_format_is_yuv(VaapiImageFormat format)
00067 {
00068     return vaapi_image_format_get_colorspace(format) == VAAPI_COLORSPACE_YUV;
00069 }
00070 
00072 VaapiImageFormat vaapi_get_image_format(VAImageFormat const &format);
00073 
00074 #endif // GNASH_VAAPIIMAGEFORMAT_H
00075 
00076 // local Variables:
00077 // mode: C++
00078 // indent-tabs-mode: nil
00079 // End:
00080 
00081 

Generated on Fri Mar 16 2012 15:46:13 for Gnash by  doxygen 1.7.1