summaryrefslogtreecommitdiff
path: root/src/i965_output_dri.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2013-11-22 13:39:34 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-12-03 12:09:38 +0800
commitef157465d77b8cb56fb8b1388e7bcf065b05b2ae (patch)
tree6f48b38be76662b4cf7b1b96e9791aa6bee48fc0 /src/i965_output_dri.c
parentb4c9ca6eb7f2858cf8bd0d4799c2eb164f434781 (diff)
downloadlibva-intel-driver-ef157465d77b8cb56fb8b1388e7bcf065b05b2ae.tar.gz
libva-intel-driver-ef157465d77b8cb56fb8b1388e7bcf065b05b2ae.tar.bz2
libva-intel-driver-ef157465d77b8cb56fb8b1388e7bcf065b05b2ae.zip
Support the BT709 color standard for conversion from YUV to RGB
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit 4c43ff9234a0a6f18744078d2e743cfa0cf8f34c)
Diffstat (limited to 'src/i965_output_dri.c')
-rw-r--r--src/i965_output_dri.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/i965_output_dri.c b/src/i965_output_dri.c
index de7be92..1467367 100644
--- a/src/i965_output_dri.c
+++ b/src/i965_output_dri.c
@@ -127,6 +127,7 @@ i965_put_surface_dri(
bool new_region = false;
uint32_t name;
int i, ret;
+ unsigned int color_flag = 0;
/* Currently don't support DRI1 */
if (!VA_CHECK_DRM_AUTH_TYPE(ctx, VA_DRM_AUTH_DRI2))
@@ -179,6 +180,12 @@ i965_put_surface_dri(
assert(ret == 0);
}
+ color_flag = flags & VA_SRC_COLOR_MASK;
+ if (color_flag == 0)
+ color_flag = VA_SRC_BT601;
+
+ pp_flag = color_flag;
+
if ((flags & VA_FILTER_SCALING_MASK) == VA_FILTER_SCALING_NL_ANAMORPHIC)
pp_flag |= I965_PP_FLAG_AVS;