summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2016-07-25 16:53:08 +0800
committerSean V Kelley <seanvk@posteo.de>2016-07-29 14:48:20 -0700
commit1cd67951974c944b060e2d5d88a76abb34c0c99b (patch)
tree6b0cc1ed9a2ca792037e821864631470f60e3d80
parenta478779c8c6b296c2069ab0fbc6f71c2e55c6a85 (diff)
Encode: Set cost for MODE_CHROMA_INTRA/MODE_REFID_COST
This fixes the remaining issues mentioned in https://bugs.freedesktop.org/show_bug.cgi?id=96703 after applying commit 3699c14 On GEN75+, driver copies vme_context->vme_state_message to VME kernel curbe buffer and VME kernel uses the data in curbe buffer to initialize VME message payload. vme_context->vme_state_message is set up in intel_vme_update_mbmv_cost(), which doesn't set all costs for used modes in VME kernels. The uninitialized mode cost will result in difference in VME output. Thanks for Elaine's finding that the issue disappears after initializing VME state message buffer with zeros. Signed-off-by: Elaine Wang <elaine.wang@intel.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de> Tested-by: Mingruo Sun <mingruo.sun@intel.com>
-rw-r--r--src/gen6_mfc_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gen6_mfc_common.c b/src/gen6_mfc_common.c
index 2f9f761..c3e4d80 100644
--- a/src/gen6_mfc_common.c
+++ b/src/gen6_mfc_common.c
@@ -790,6 +790,11 @@ void intel_vme_update_mbmv_cost(VADriverContextP ctx,
assert(qp <= QP_MAX);
lambda = intel_lambda_qp(qp);
+
+ m_cost = lambda;
+ vme_state_message[MODE_CHROMA_INTRA] = intel_format_lutvalue(m_cost, 0x8f);
+ vme_state_message[MODE_REFID_COST] = intel_format_lutvalue(m_cost, 0x8f);
+
if (slice_type == SLICE_TYPE_I) {
vme_state_message[MODE_INTRA_16X16] = 0;
m_cost = lambda * 4;