• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/intel-driver


Commit MetaInfo

Revisiónbabb2db34a42daccbcfa26baa4ff975761ecf92c (tree)
Tiempo2014-12-14 01:42:17
AutorXiang, Haihao <haihao.xiang@inte...>
CommiterXiang, Haihao

Log Message

HEVC: gen9_hcpd_surface_state()

Set the frame buffer pitch and the offset to the chroma component in
HCP_SURFACE_STATE. Only surface id 0 is used for HEVC decoding

v2: Fix the command payload

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 657d5999179e70b290db08ea4ca4399d26f52c2c)

Cambiar Resumen

Diferencia incremental

--- a/src/gen9_mfd.c
+++ b/src/gen9_mfd.c
@@ -196,6 +196,32 @@ gen9_hcpd_pipe_mode_select(VADriverContextP ctx,
196196 ADVANCE_BCS_BATCH(batch);
197197 }
198198
199+static void
200+gen9_hcpd_surface_state(VADriverContextP ctx,
201+ struct decode_state *decode_state,
202+ struct gen9_hcpd_context *gen9_hcpd_context)
203+{
204+ struct intel_batchbuffer *batch = gen9_hcpd_context->base.batch;
205+ struct object_surface *obj_surface = decode_state->render_object;
206+ unsigned int y_cb_offset;
207+
208+ assert(obj_surface);
209+
210+ y_cb_offset = obj_surface->y_cb_offset;
211+
212+ BEGIN_BCS_BATCH(batch, 3);
213+
214+ OUT_BCS_BATCH(batch, HCP_SURFACE_STATE | (3 - 2));
215+ OUT_BCS_BATCH(batch,
216+ (0 << 28) | /* surface id */
217+ (obj_surface->width - 1)); /* pitch - 1 */
218+ OUT_BCS_BATCH(batch,
219+ (SURFACE_FORMAT_PLANAR_420_8 << 28) |
220+ y_cb_offset);
221+
222+ ADVANCE_BCS_BATCH(batch);
223+}
224+
199225 static VAStatus
200226 gen9_hcpd_hevc_decode_picture(VADriverContextP ctx,
201227 struct decode_state *decode_state,
@@ -213,6 +239,7 @@ gen9_hcpd_hevc_decode_picture(VADriverContextP ctx,
213239 intel_batchbuffer_emit_mi_flush(batch);
214240
215241 gen9_hcpd_pipe_mode_select(ctx, decode_state, HCP_CODEC_HEVC, gen9_hcpd_context);
242+ gen9_hcpd_surface_state(ctx, decode_state, gen9_hcpd_context);
216243
217244 intel_batchbuffer_end_atomic(batch);
218245 intel_batchbuffer_flush(batch);