hardware/intel/libva
修訂 | 1d1da291df2b895dfc7cfe964575ef13b68913a4 (tree) |
---|---|
時間 | 2013-06-19 15:35:04 |
作者 | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Xiang, Haihao |
vatrace: only print info of valid reference frames
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit 67c489f323188df1370f8ba2d4063bc86153cce7)
@@ -1013,7 +1013,8 @@ static void va_TraceVAPictureParameterBufferH264( | ||
1013 | 1013 | va_TraceMsg(idx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags:\n"); |
1014 | 1014 | for (i = 0; i < 16; i++) |
1015 | 1015 | { |
1016 | - if (p->ReferenceFrames[i].flags != VA_PICTURE_H264_INVALID) { | |
1016 | + if ((p->ReferenceFrames[i].picture_id != VA_INVALID_SURFACE) && | |
1017 | + ((p->ReferenceFrames[i].flags & VA_PICTURE_H264_INVALID) == 0)) { | |
1017 | 1018 | va_TraceMsg(idx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n", |
1018 | 1019 | p->ReferenceFrames[i].TopFieldOrderCnt, |
1019 | 1020 | p->ReferenceFrames[i].BottomFieldOrderCnt, |
@@ -1277,7 +1278,8 @@ static void va_TraceVAEncPictureParameterBufferH264( | ||
1277 | 1278 | va_TraceMsg(idx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n"); |
1278 | 1279 | for (i = 0; i < 16; i++) |
1279 | 1280 | { |
1280 | - if (p->ReferenceFrames[i].flags != VA_PICTURE_H264_INVALID) { | |
1281 | + if ((p->ReferenceFrames[i].picture_id != VA_INVALID_SURFACE) && | |
1282 | + ((p->ReferenceFrames[i].flags & VA_PICTURE_H264_INVALID) == 0)) { | |
1281 | 1283 | va_TraceMsg(idx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n", |
1282 | 1284 | p->ReferenceFrames[i].TopFieldOrderCnt, |
1283 | 1285 | p->ReferenceFrames[i].BottomFieldOrderCnt, |
@@ -1286,7 +1288,7 @@ static void va_TraceVAEncPictureParameterBufferH264( | ||
1286 | 1288 | p->ReferenceFrames[i].flags |
1287 | 1289 | ); |
1288 | 1290 | } else |
1289 | - va_TraceMsg(idx, "\t\tinv-inv-inv-inv\n"); | |
1291 | + va_TraceMsg(idx, "\t\tinv-inv-inv-inv-inv\n"); | |
1290 | 1292 | } |
1291 | 1293 | va_TraceMsg(idx, "\tcoded_buf = %08x\n", p->coded_buf); |
1292 | 1294 | va_TraceMsg(idx, "\tpic_parameter_set_id = %d\n", p->pic_parameter_set_id); |
@@ -1377,14 +1379,15 @@ static void va_TraceVAEncSliceParameterBufferH264( | ||
1377 | 1379 | if (p->slice_type == 0 || p->slice_type == 1) { |
1378 | 1380 | va_TraceMsg(idx, "\tRefPicList0 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n"); |
1379 | 1381 | for (i = 0; i < 32; i++) { |
1380 | - if (p->RefPicList0[i].flags != VA_PICTURE_H264_INVALID) { | |
1382 | + if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) && | |
1383 | + ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0)) | |
1381 | 1384 | va_TraceMsg(idx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n", |
1382 | 1385 | p->RefPicList0[i].TopFieldOrderCnt, |
1383 | 1386 | p->RefPicList0[i].BottomFieldOrderCnt, |
1384 | 1387 | p->RefPicList0[i].picture_id, |
1385 | 1388 | p->RefPicList0[i].frame_idx, |
1386 | 1389 | p->RefPicList0[i].flags); |
1387 | - } else | |
1390 | + else | |
1388 | 1391 | break; |
1389 | 1392 | } |
1390 | 1393 | } |
@@ -1392,7 +1395,8 @@ static void va_TraceVAEncSliceParameterBufferH264( | ||
1392 | 1395 | if (p->slice_type == 1) { |
1393 | 1396 | va_TraceMsg(idx, "\tRefPicList1 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n"); |
1394 | 1397 | for (i = 0; i < 32; i++) { |
1395 | - if (p->RefPicList1[i].flags != VA_PICTURE_H264_INVALID) | |
1398 | + if ((p->RefPicList1[i].picture_id != VA_INVALID_SURFACE) && | |
1399 | + ((p->RefPicList1[i].flags & VA_PICTURE_H264_INVALID) == 0)) | |
1396 | 1400 | va_TraceMsg(idx, "\t\t%08d-%08d-0x%08x-%08d-0x%08d\n", |
1397 | 1401 | p->RefPicList1[i].TopFieldOrderCnt, |
1398 | 1402 | p->RefPicList1[i].BottomFieldOrderCnt, |