summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2015-10-22 16:13:36 +0100
committerSean V Kelley <seanvk@posteo.de>2015-11-09 14:21:07 -0800
commit70c6eb87741d4145244cd816300063e48eef3d82 (patch)
treead568db2b937755199185669e94ae01f4c593f8d
parentac409c85430d7eb569bf3d4719402d4d7edad1c4 (diff)
vpp: gen7: 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>
-rwxr-xr-xsrc/i965_post_processing.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
index e1d96d4..ea3d350 100755
--- a/src/i965_post_processing.c
+++ b/src/i965_post_processing.c
@@ -38,6 +38,7 @@
#include "i965_drv_video.h"
#include "i965_post_processing.h"
#include "i965_render.h"
+#include "i965_yuv_coefs.h"
#include "intel_media.h"
extern VAStatus
@@ -3073,6 +3074,8 @@ gen7_pp_plx_avs_initialize(VADriverContextP ctx, struct i965_post_processing_con
int src_width, src_height;
AVSState * const avs = &pp_avs_context->state;
float sx, sy;
+ const float * yuv_to_rgb_coefs;
+ size_t yuv_to_rgb_coefs_size;
/* source surface */
gen7_pp_set_media_rw_message_surface(ctx, pp_context, src_surface, 0, 0,
@@ -3305,6 +3308,11 @@ gen7_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;