summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElaine Wang <elaine.wang@intel.com>2013-04-27 21:43:06 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-06-25 13:53:58 +0800
commit1148655089b0196fd095b99087e9293810e0c5d4 (patch)
tree38d8884b90b0e62d0b0be48caf33f79c58cdd62b
parent47ae954514066e55d320a77975ef61acf8238d78 (diff)
h264encode: add some comments
Signed-off-by: Elaine Wang <elaine.wang@intel.com>
-rw-r--r--test/encode/h264encode.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/encode/h264encode.c b/test/encode/h264encode.c
index c06d066..c75b57e 100644
--- a/test/encode/h264encode.c
+++ b/test/encode/h264encode.c
@@ -1283,9 +1283,9 @@ static int render_picture(void)
pic_param.CurrPic.BottomFieldOrderCnt = pic_param.CurrPic.TopFieldOrderCnt;
CurrentCurrPic = pic_param.CurrPic;
- if (getenv("TO_DEL")) {
- update_RefPicList();
- memset(pic_param.ReferenceFrames, 1, 16 * sizeof(VAPictureH264));
+ if (getenv("TO_DEL")) { /* set RefPicList into ReferenceFrames */
+ update_RefPicList(); /* calc RefPicList */
+ memset(pic_param.ReferenceFrames, 0xff, 16 * sizeof(VAPictureH264)); /* invalid all */
if (current_frame_type == FRAME_P) {
pic_param.ReferenceFrames[0] = RefPicList0_P[0];
} else if (current_frame_type == FRAME_B) {
@@ -1533,14 +1533,6 @@ static int render_slice(void)
}
}
- if (getenv("NOREF")) {
- for (i = 0; i < 32; i++) {
- slice_param.RefPicList0[i].picture_id = VA_INVALID_SURFACE;
- slice_param.RefPicList1[i].picture_id = VA_INVALID_SURFACE;
- }
- }
-
-
slice_param.slice_alpha_c0_offset_div2 = 2;
slice_param.slice_beta_offset_div2 = 2;
slice_param.pic_order_cnt_lsb = current_frame_display % MaxPicOrderCntLsb;