summaryrefslogtreecommitdiff
path: root/src/gen8_post_processing.c
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2015-11-03 15:05:26 +0000
committerSean V Kelley <seanvk@posteo.de>2015-11-09 14:21:12 -0800
commitc886cff70566ba96ba0b451629f97a51e8e9b2e1 (patch)
treed1ff5632d4c1a46fc2138467a1530a74f8c2a728 /src/gen8_post_processing.c
parent70c6eb87741d4145244cd816300063e48eef3d82 (diff)
downloadlibva-intel-driver-c886cff70566ba96ba0b451629f97a51e8e9b2e1.tar.gz
vpp: gen8/9: send yuv to rgb coefs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Diffstat (limited to 'src/gen8_post_processing.c')
-rw-r--r--src/gen8_post_processing.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c
index 569232d3..1fbc3171 100644
--- a/src/gen8_post_processing.c
+++ b/src/gen8_post_processing.c
@@ -39,6 +39,7 @@
#include "i965_drv_video.h"
#include "i965_post_processing.h"
#include "i965_render.h"
+#include "i965_yuv_coefs.h"
#include "intel_media.h"
#define SURFACE_STATE_PADDED_SIZE SURFACE_STATE_PADDED_SIZE_GEN8
@@ -780,6 +781,8 @@ gen8_pp_plx_avs_initialize(VADriverContextP ctx, struct i965_post_processing_con
unsigned char *cc_ptr;
AVSState * const avs = &pp_avs_context->state;
float sx, sy;
+ const float * yuv_to_rgb_coefs;
+ size_t yuv_to_rgb_coefs_size;
memset(pp_static_parameter, 0, sizeof(struct gen7_pp_static_parameter));
@@ -1065,6 +1068,11 @@ gen8_pp_plx_avs_initialize(VADriverContextP ctx, struct i965_post_processing_con
gen7_update_src_surface_uv_offset(ctx, pp_context, dst_surface);
+ yuv_to_rgb_coefs = i915_color_standard_to_coefs (i915_filter_to_color_standard (src_surface->flags &
+ VA_SRC_COLOR_MASK),
+ &yuv_to_rgb_coefs_size);
+ memcpy(&pp_static_parameter->grf7, yuv_to_rgb_coefs, yuv_to_rgb_coefs_size);
+
dst_surface->flags = src_surface->flags;
return VA_STATUS_SUCCESS;