• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

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

hardware/intel/libva


Commit MetaInfo

修訂398abf60c4b43deadcdaaf55bac4285cc3fa5896 (tree)
時間2013-06-24 17:46:16
作者Zhao Yakui <yakui.zhao@inte...>
CommiterXiang, Haihao

Log Message

AVCENC: Pass the H264 RefPicList0/1 by using slice_param instead of hacked DPB reference

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 968a9bf006679ad8d752fa1ddcd4bb80fc8c5e51)

Change Summary

差異

--- a/test/encode/avcenc.c
+++ b/test/encode/avcenc.c
@@ -151,6 +151,8 @@ static struct {
151151 int i_dpb_output_delay_length;
152152 } avcenc_context;
153153
154+static VAPictureH264 ReferenceFrames[16], RefPicList0[32], RefPicList1[32];
155+
154156 static void create_encode_pipe()
155157 {
156158 VAEntrypoint entrypoints[5];
@@ -442,6 +444,23 @@ static void avcenc_update_slice_parameter(int slice_type)
442444 slice_param->idr_pic_id = 0;
443445
444446 /* FIXME: fill other fields */
447+ if ((slice_type == SLICE_TYPE_P) || (slice_type == SLICE_TYPE_B)) {
448+ int j;
449+ slice_param->RefPicList0[0].picture_id = surface_ids[SID_REFERENCE_PICTURE_L0];
450+ for (j = 1; j < 32; j++) {
451+ slice_param->RefPicList0[j].picture_id = VA_INVALID_SURFACE;
452+ slice_param->RefPicList0[j].flags = VA_PICTURE_H264_INVALID;
453+ }
454+ }
455+
456+ if ((slice_type == SLICE_TYPE_B)) {
457+ int j;
458+ slice_param->RefPicList1[0].picture_id = surface_ids[SID_REFERENCE_PICTURE_L1];
459+ for (j = 1; j < 32; j++) {
460+ slice_param->RefPicList1[j].picture_id = VA_INVALID_SURFACE;
461+ slice_param->RefPicList1[j].flags = VA_PICTURE_H264_INVALID;
462+ }
463+ }
445464
446465 va_status = vaCreateBuffer(va_dpy,
447466 avcenc_context.context_id,