summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2014-02-11 13:00:17 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-03-05 13:30:11 +0800
commitbf2e1773d4373619232c4c653b8cda19ea329441 (patch)
tree30a2c6b820129755af1337885a0df108a9016a3e
parent511feba2e116882ec216d67fbe21bc8a7e0f6051 (diff)
Libva: Add range parameter flag to reflect the JPEG/JFIF CSC coeff matrix
V3->V4: Update the range flag bit definition to avoid the conflict with the AUTO_NOISEREDUCTION filter flag. V2->V3: Follow Penne to describe the purpose of reduced range and full range V1->V2: Follow Penne and Jonathan to reduce the JPEG flag. Instead it is derived from the combination of the range flag and BT601 CSC standard. At the same time the chroma_siting flag in va_vpp.h is rename as input_surface_flag to hold the corresponding range flag on the input pixel data. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
-rw-r--r--va/va.h11
-rw-r--r--va/va_vpp.h16
2 files changed, 25 insertions, 2 deletions
diff --git a/va/va.h b/va/va.h
index 21ab546..9796e37 100644
--- a/va/va.h
+++ b/va/va.h
@@ -225,6 +225,17 @@ typedef int VAStatus; /* Return status type from functions */
#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);
diff --git a/va/va_vpp.h b/va/va_vpp.h
index 9408b4f..4b4f648 100644
--- a/va/va_vpp.h
+++ b/va/va_vpp.h
@@ -710,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;
/**