summaryrefslogtreecommitdiff
path: root/va
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2014-03-26 07:55:34 +0800
committerbuildslave <sys_buildbot@intel.com>2014-04-02 09:18:13 +0000
commit10d94aff40fa7cb9349f839613856ea37327268c (patch)
tree83b46504540c530c213f75fbcf7a46fdb3e0429a /va
parent7560df6c35ea4c1c5f6c7b5f7f9016c183ee825f (diff)
downloadlibva-10d94aff40fa7cb9349f839613856ea37327268c.tar.gz
rebase libva to latest open source version
(jpeg range parameter/VAEntrypointMax removal) BZ: 182224 Change-Id: I1d7e8ab49638b639175d5a11ed09ed96eb20697f Signed-off-by: Austin Yuan <shengquan.yuan@intel.com> Signed-off-by: Jing SUN <jing.a.sun@intel.com>
Diffstat (limited to 'va')
-rwxr-xr-xva/va.h38
-rw-r--r--va/va_enc_h264.h29
-rwxr-xr-xva/va_trace.c4
-rw-r--r--va/va_vpp.h19
-rw-r--r--va/vendor/intel/va_intel_statistics.h13
5 files changed, 53 insertions, 50 deletions
diff --git a/va/va.h b/va/va.h
index dd35b4c..f45c448 100755
--- a/va/va.h
+++ b/va/va.h
@@ -78,6 +78,7 @@
#ifndef _VA_H_
#define _VA_H_
+#include <stdint.h>
#include <va/va_version.h>
#ifdef __cplusplus
@@ -204,9 +205,11 @@ typedef int VAStatus; /* Return status type from functions */
#define VA_CLEAR_DRAWABLE 0x00000008
/* Color space conversion flags for vaPutSurface() */
+#define VA_SRC_COLOR_MASK 0x000000f0
#define VA_SRC_BT601 0x00000010
#define VA_SRC_BT709 0x00000020
#define VA_SRC_SMPTE_240 0x00000040
+#define VA_SRC_BT2020 0x00000080
/* Scaling flags for vaPutSurface() */
#define VA_FILTER_SCALING_DEFAULT 0x00000000
@@ -216,6 +219,23 @@ typedef int VAStatus; /* Return status type from functions */
#define VA_FILTER_SCALING_MASK 0x00000f00
/*
+ * The upper 16 bits are reserved for VPP filter fast path usage.
+ * Flag to enable auto noise reduction.
+ */
+#define VA_FILTER_NOISEREDUCTION_AUTO 0x00010000
+
+/*
+ * This is to indicate that the color-space conversion uses full range or reduced range.
+ * VA_SOURCE_RANGE_FULL(Full range): Y/Cb/Cr is in [0, 255]. It is mainly used
+ * for JPEG/JFIF formats. The combination with the BT601 flag means that
+ * JPEG/JFIF color-space conversion matrix is used.
+ * VA_SOURCE_RANGE_REDUCED(Reduced range): Y is in [16, 235] and Cb/Cr is in [16, 240].
+ * It is mainly used for the YUV->RGB color-space conversion in SDTV/HDTV/UHDTV.
+ */
+#define VA_SOURCE_RANGE_MASK 0x00020000
+#define VA_SOURCE_RANGE_FULL 0x00020000
+#define VA_SOURCE_RANGE_REDUCED 0x00000000
+/*
* Returns a short english description of error_status
*/
const char *vaErrorStr(VAStatus error_status);
@@ -228,6 +248,16 @@ typedef struct _VARectangle
unsigned short height;
} VARectangle;
+/** \brief Generic motion vector data structure. */
+typedef struct _VAMotionVector {
+ /** \mv0[0]: horizontal motion vector for past reference */
+ /** \mv0[1]: vertical motion vector for past reference */
+ /** \mv1[0]: horizontal motion vector for future reference */
+ /** \mv1[1]: vertical motion vector for future reference */
+ unsigned short mv0[2]; /* past reference */
+ unsigned short mv1[2]; /* future reference */
+} VAMotionVector;
+
/*
* Initialization:
* A display must be obtained by calling vaGetDisplay() before calling
@@ -297,10 +327,9 @@ typedef enum
VAProfileH263Baseline = 11,
VAProfileJPEGBaseline = 12,
VAProfileH264ConstrainedBaseline = 13,
- VAProfileH264MultiviewHigh = 14,
- VAProfileH264StereoHigh = 15,
- VAProfileVP8Version0_3 = 16,
- VAProfileMax
+ VAProfileVP8Version0_3 = 14,
+ VAProfileH264MultiviewHigh = 15,
+ VAProfileH264StereoHigh = 16
} VAProfile;
/*
@@ -368,7 +397,6 @@ typedef enum
*
**/
VAEntrypointStatisticsIntel,
- VAEntrypointMax
} VAEntrypoint;
/* Currently defined configuration attribute types */
diff --git a/va/va_enc_h264.h b/va/va_enc_h264.h
index dfeda01..6fe7506 100644
--- a/va/va_enc_h264.h
+++ b/va/va_enc_h264.h
@@ -714,35 +714,6 @@ typedef enum {
VAEncBitstreamAttribMiscMask | 1),
} VAEncBitstreamAttribTypeH264;
-typedef struct _VAEncPictureParameterBufferH264MVC {
- /**
- * \brief Regular H.264 picture parameters
- *
- */
- VAEncPictureParameterBufferH264 base_picture_param;
- /**
- * \brief view id associated with this picture
- *
- */
- unsigned int view_id;
- /**
- * \brief same as H.264 MVC syntax element
- *
- */
- unsigned char anchor_picture_flag;
- /**
- * \brief same as H.264 MVC syntax element
- *
- */
- unsigned char inter_view_flag;
-
- /**
- * \brief Specifies view_id of each element in ReferenceFrames[16]
- *
- */
- unsigned int view_id_dpb[16];
-
-} VAEncPictureParameterBufferH264MVC;
/**
* \brief Allocates a new H.264 bitstream writer.
diff --git a/va/va_trace.c b/va/va_trace.c
index fb52b28..aaa55ac 100755
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -483,7 +483,7 @@ static void va_TraceSurfaceAttributes(
break;
case VAGenericValueTypePointer:
va_TraceMsg(trace_ctx, "\t\tvalue.value.p = %p\n", p->value.value.p);
- if (type == VASurfaceAttribExternalBufferDescriptor) {
+ if ((p->type == VASurfaceAttribExternalBufferDescriptor) && p->value.value.p) {
VASurfaceAttribExternalBuffers *tmp = (VASurfaceAttribExternalBuffers *) p->value.value.p;
int j;
@@ -501,7 +501,7 @@ static void va_TraceSurfaceAttributes(
va_TraceMsg(trace_ctx, "\t\t num_buffers=0x%08x\n", tmp->num_buffers);
va_TraceMsg(trace_ctx, "\t\t buffers=%p\n", tmp->buffers);
for (j = 0; j < tmp->num_buffers; j++) {
- va_TraceMsg(trace_ctx, "\t\t\tbuffers[%j]=%p\n", tmp->buffers[j]);
+ va_TraceMsg(trace_ctx, "\t\t\tbuffers[%d]=%p\n", j, tmp->buffers[j]);
}
}
break;
diff --git a/va/va_vpp.h b/va/va_vpp.h
index e1b6bf0..4b4f648 100644
--- a/va/va_vpp.h
+++ b/va/va_vpp.h
@@ -322,6 +322,8 @@ typedef enum _VAProcColorStandardType {
VAProcColorStandardXVYCC601,
/** \brief xvYCC709. */
VAProcColorStandardXVYCC709,
+ /** \brief ITU-R BT.2020. */
+ VAProcColorStandardBT2020,
/** \brief Number of color standards. */
VAProcColorStandardCount
} VAProcColorStandardType;
@@ -622,6 +624,7 @@ typedef struct _VAProcPipelineParameterBuffer {
* \c VA_SRC_SMPTE_240.
* - Scaling: \c VA_FILTER_SCALING_DEFAULT, \c VA_FILTER_SCALING_FAST,
* \c VA_FILTER_SCALING_HQ, \c VA_FILTER_SCALING_NL_ANAMORPHIC.
+ * - Enable auto noise reduction: \c VA_FILTER_NOISEREDUCTION_AUTO.
*/
unsigned int filter_flags;
/**
@@ -707,8 +710,20 @@ typedef struct _VAProcPipelineParameterBuffer {
VASurfaceID *additional_outputs;
/** \brief Number of additional output surfaces. */
unsigned int num_additional_outputs;
- /** \brief Flag to indicate the chroma siting information. */
- unsigned int chroma_siting_flag;
+ /**
+ * \brief Flag to indicate the input surface flag such as chroma-siting,
+ * range flag and so on.
+ *
+ * The lower 4 bits are still used as chroma-siting flag
+ * The range_flag bit is used to indicate that the range flag of color-space conversion.
+ * -\ref VA_SOURCE_RANGE_FULL(Full range): Y/Cb/Cr is in [0, 255].It is
+ * mainly used for JPEG/JFIF formats. The combination with the BT601 flag
+ * means that JPEG/JFIF color-space conversion matrix is used.
+ * -\ref VA_SOURCE_RANGE_FULL(Reduced range): Y is in [16, 235] and Cb/Cr
+ * is in [16, 240]. It is mainly used for the YUV<->RGB color-space
+ * conversion in SDTV/HDTV/UHDTV.
+ */
+ unsigned int input_surface_flag;
} VAProcPipelineParameterBuffer;
/**
diff --git a/va/vendor/intel/va_intel_statistics.h b/va/vendor/intel/va_intel_statistics.h
index d63ca78..8b326e1 100644
--- a/va/vendor/intel/va_intel_statistics.h
+++ b/va/vendor/intel/va_intel_statistics.h
@@ -111,7 +111,7 @@ typedef struct _VAStatsStatisticsParameter16x16Intel
/** \brief VAStatsMotionVectorBufferTypeIntel. Motion vector buffer layout.
* Motion vector output is per 4x4 block. For each 4x4 block there is a pair of past and future
- * reference MVs as defined in VAMotionVectorIntel. Depending on Subblock partition,
+ * reference MVs as defined in VAMotionVector. Depending on Subblock partition,
* for the shape that is not 4x4, the MV is replicated so each 4x4 block has a pair of MVs.
* If only past reference is used, future MV should be ignored, and vice versa.
* The 16x16 block is in raster scan order, within the 16x16 block, each 4x4 block MV is ordered as below in memory.
@@ -130,17 +130,6 @@ typedef struct _VAStatsStatisticsParameter16x16Intel
*
**/
-/** \brief Motion vector data structure. */
-typedef struct _VAMotionVectorIntel {
- /** \mv0[0]: horizontal motion vector for past reference */
- /** \mv0[1]: vertical motion vector for past reference */
- /** \mv1[0]: horizontal motion vector for future reference */
- /** \mv1[1]: vertical motion vector for future reference */
- unsigned short mv0[2]; /* past reference */
- unsigned short mv1[2]; /* future reference */
-} VAMotionVectorIntel;
-
-
/** \brief VAStatsStatisticsBufferTypeIntel. Statistics buffer layout.
* Statistics output is per 16x16 block. Data structure per 16x16 block is defined below.
* The 16x16 block is in raster scan order. The buffer size shall be greater than or equal to