2010-03-04 17:39:01 +00:00
|
|
|
/*
|
|
|
|
* gstvaapiimageformat.h - VA image format abstraction
|
|
|
|
*
|
2012-01-16 09:41:10 +00:00
|
|
|
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
2013-01-29 13:03:27 +00:00
|
|
|
* Copyright (C) 2011-2012 Intel Corporation
|
2010-03-04 17:39:01 +00:00
|
|
|
*
|
2010-05-03 07:07:27 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2.1
|
|
|
|
* of the License, or (at your option) any later version.
|
2010-03-04 17:39:01 +00:00
|
|
|
*
|
2010-05-03 07:07:27 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2010-03-04 17:39:01 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2010-05-03 07:07:27 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2010-03-04 17:39:01 +00:00
|
|
|
*
|
2010-05-03 07:07:27 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free
|
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA
|
2010-03-04 17:39:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GST_VAAPI_IMAGE_FORMAT_H
|
|
|
|
#define GST_VAAPI_IMAGE_FORMAT_H
|
|
|
|
|
2010-03-24 16:25:56 +00:00
|
|
|
#include <gst/gstvalue.h>
|
2011-12-12 17:13:19 +00:00
|
|
|
#include <gst/video/video.h>
|
2010-03-04 17:39:01 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2010-03-19 15:45:21 +00:00
|
|
|
/**
|
|
|
|
* GstVaapiImageFormat:
|
|
|
|
* @GST_VAAPI_IMAGE_NV12:
|
|
|
|
* planar YUV 4:2:0, 12-bit, 1 plane for Y and 1 plane for UV
|
|
|
|
* @GST_VAAPI_IMAGE_YV12:
|
|
|
|
* planar YUV 4:2:0, 12-bit, 3 planes for Y V U
|
|
|
|
* @GST_VAAPI_IMAGE_I420:
|
|
|
|
* planar YUV 4:2:0, 12-bit, 3 planes for Y U V
|
2010-03-24 14:46:33 +00:00
|
|
|
* @GST_VAAPI_IMAGE_AYUV:
|
|
|
|
* packed YUV 4:4:4, 32-bit, A Y U V, native endian byte-order
|
2010-03-19 15:45:21 +00:00
|
|
|
* @GST_VAAPI_IMAGE_ARGB:
|
|
|
|
* packed RGB 8:8:8, 32-bit, A R G B
|
|
|
|
* @GST_VAAPI_IMAGE_RGBA:
|
|
|
|
* packed RGB 8:8:8, 32-bit, R G B A
|
|
|
|
* @GST_VAAPI_IMAGE_ABGR:
|
|
|
|
* packed RGB 8:8:8, 32-bit, A B G R
|
|
|
|
* @GST_VAAPI_IMAGE_BGRA:
|
|
|
|
* packed RGB 8:8:8, 32-bit, B G R A
|
|
|
|
*
|
|
|
|
* The set of all image formats for #GstVaapiImage.
|
|
|
|
*/
|
2012-09-04 11:40:04 +00:00
|
|
|
typedef enum {
|
2010-03-24 16:25:56 +00:00
|
|
|
GST_VAAPI_IMAGE_NV12 = GST_MAKE_FOURCC('N','V','1','2'),
|
|
|
|
GST_VAAPI_IMAGE_YV12 = GST_MAKE_FOURCC('Y','V','1','2'),
|
|
|
|
GST_VAAPI_IMAGE_I420 = GST_MAKE_FOURCC('I','4','2','0'),
|
|
|
|
GST_VAAPI_IMAGE_AYUV = GST_MAKE_FOURCC('A','Y','U','V'),
|
|
|
|
GST_VAAPI_IMAGE_ARGB = GST_MAKE_FOURCC('A','R','G','B'),
|
|
|
|
GST_VAAPI_IMAGE_RGBA = GST_MAKE_FOURCC('R','G','B','A'),
|
|
|
|
GST_VAAPI_IMAGE_ABGR = GST_MAKE_FOURCC('A','B','G','R'),
|
|
|
|
GST_VAAPI_IMAGE_BGRA = GST_MAKE_FOURCC('B','G','R','A'),
|
2012-09-04 11:40:04 +00:00
|
|
|
} GstVaapiImageFormat;
|
2010-03-04 17:39:01 +00:00
|
|
|
|
|
|
|
gboolean
|
|
|
|
gst_vaapi_image_format_is_rgb(GstVaapiImageFormat format);
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
gst_vaapi_image_format_is_yuv(GstVaapiImageFormat format);
|
|
|
|
|
|
|
|
GstVaapiImageFormat
|
|
|
|
gst_vaapi_image_format(const VAImageFormat *va_format);
|
|
|
|
|
2010-03-12 22:28:01 +00:00
|
|
|
GstVaapiImageFormat
|
|
|
|
gst_vaapi_image_format_from_caps(GstCaps *caps);
|
|
|
|
|
2013-03-20 10:10:31 +00:00
|
|
|
GstVaapiImageFormat
|
|
|
|
gst_vaapi_image_format_from_structure(GstStructure *structure);
|
|
|
|
|
2010-03-04 17:39:01 +00:00
|
|
|
GstVaapiImageFormat
|
|
|
|
gst_vaapi_image_format_from_fourcc(guint32 fourcc);
|
|
|
|
|
2011-12-12 17:13:19 +00:00
|
|
|
GstVaapiImageFormat
|
|
|
|
gst_vaapi_image_format_from_video(GstVideoFormat format);
|
|
|
|
|
2010-03-04 17:39:01 +00:00
|
|
|
const VAImageFormat *
|
|
|
|
gst_vaapi_image_format_get_va_format(GstVaapiImageFormat format);
|
|
|
|
|
2010-03-10 10:41:12 +00:00
|
|
|
GstCaps *
|
|
|
|
gst_vaapi_image_format_get_caps(GstVaapiImageFormat format);
|
|
|
|
|
2010-03-11 12:11:36 +00:00
|
|
|
guint
|
|
|
|
gst_vaapi_image_format_get_score(GstVaapiImageFormat format);
|
|
|
|
|
2010-03-04 17:39:01 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* GST_GST_VAAPI_IMAGE_H */
|