hardware/intel/libva
修订版 | 1e497a3ae02a7f4117d746d97147193708c01f21 (tree) |
---|---|
时间 | 2014-03-17 10:41:45 |
作者 | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Xiang, Haihao |
vatrace: refine the log format
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit f78e4a6a84178c4561a5b1c8dbb7773e5a575d0f)
@@ -1267,8 +1267,6 @@ static void va_TraceVAPictureParameterBufferH264( | ||
1267 | 1267 | } else |
1268 | 1268 | break; |
1269 | 1269 | } |
1270 | - va_TraceMsg(trace_ctx, "\n"); | |
1271 | - | |
1272 | 1270 | va_TraceMsg(trace_ctx, "\tpicture_width_in_mbs_minus1 = %d\n", p->picture_width_in_mbs_minus1); |
1273 | 1271 | va_TraceMsg(trace_ctx, "\tpicture_height_in_mbs_minus1 = %d\n", p->picture_height_in_mbs_minus1); |
1274 | 1272 | va_TraceMsg(trace_ctx, "\tbit_depth_luma_minus8 = %d\n", p->bit_depth_luma_minus8); |
@@ -1337,7 +1335,7 @@ static void va_TraceVASliceParameterBufferH264( | ||
1337 | 1335 | va_TraceMsg(trace_ctx, "\tslice_alpha_c0_offset_div2 = %d\n", p->slice_alpha_c0_offset_div2); |
1338 | 1336 | va_TraceMsg(trace_ctx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2); |
1339 | 1337 | |
1340 | - va_TraceMsg(trace_ctx, "\tRefPicList0 ="); | |
1338 | + va_TraceMsg(trace_ctx, "\tRefPicList0 =\n"); | |
1341 | 1339 | for (i = 0; i < 32; i++) { |
1342 | 1340 | if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) && |
1343 | 1341 | ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0)) |
@@ -1345,7 +1343,7 @@ static void va_TraceVASliceParameterBufferH264( | ||
1345 | 1343 | else |
1346 | 1344 | break; |
1347 | 1345 | } |
1348 | - va_TraceMsg(trace_ctx, "\tRefPicList1 ="); | |
1346 | + va_TraceMsg(trace_ctx, "\tRefPicList1 =\n"); | |
1349 | 1347 | for (i = 0; i < 32; i++) { |
1350 | 1348 | if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) && |
1351 | 1349 | ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0)) |
@@ -1359,45 +1357,41 @@ static void va_TraceVASliceParameterBufferH264( | ||
1359 | 1357 | va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag); |
1360 | 1358 | if (p->luma_weight_l0_flag) { |
1361 | 1359 | for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) { |
1362 | - va_TraceMsg(trace_ctx, "\t%d ", p->luma_weight_l0[i]); | |
1363 | - va_TraceMsg(trace_ctx, "\t%d ", p->luma_offset_l0[i]); | |
1360 | + va_TraceMsg(trace_ctx, "\t\t%d\t%d\n", | |
1361 | + p->luma_weight_l0[i], | |
1362 | + p->luma_offset_l0[i]); | |
1364 | 1363 | } |
1365 | - if (p->num_ref_idx_l0_active_minus1 >= 0) | |
1366 | - va_TraceMsg(trace_ctx, "\n"); | |
1367 | 1364 | } |
1368 | 1365 | |
1369 | 1366 | va_TraceMsg(trace_ctx, "\tchroma_weight_l0_flag = %d\n", p->chroma_weight_l0_flag); |
1370 | 1367 | if (p->chroma_weight_l0_flag) { |
1371 | 1368 | for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) { |
1372 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_weight_l0[i][0]); | |
1373 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_offset_l0[i][0]); | |
1374 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_weight_l0[i][1]); | |
1375 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_offset_l0[i][1]); | |
1369 | + va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n", | |
1370 | + p->chroma_weight_l0[i][0], | |
1371 | + p->chroma_offset_l0[i][0], | |
1372 | + p->chroma_weight_l0[i][1], | |
1373 | + p->chroma_offset_l0[i][1]); | |
1376 | 1374 | } |
1377 | - if (p->num_ref_idx_l0_active_minus1 >= 0) | |
1378 | - va_TraceMsg(trace_ctx, "\n"); | |
1379 | 1375 | } |
1380 | 1376 | |
1381 | 1377 | va_TraceMsg(trace_ctx, "\tluma_weight_l1_flag = %d\n", p->luma_weight_l1_flag); |
1382 | 1378 | if (p->luma_weight_l1_flag) { |
1383 | 1379 | for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) { |
1384 | - va_TraceMsg(trace_ctx, "\t%d ", p->luma_weight_l1[i]); | |
1385 | - va_TraceMsg(trace_ctx, "\t%d ", p->luma_offset_l1[i]); | |
1380 | + va_TraceMsg(trace_ctx, "\t\t%d\t%d\n", | |
1381 | + p->luma_weight_l1[i], | |
1382 | + p->luma_offset_l1[i]); | |
1386 | 1383 | } |
1387 | - if (p->num_ref_idx_l1_active_minus1 >= 0) | |
1388 | - va_TraceMsg(trace_ctx, "\n"); | |
1389 | 1384 | } |
1390 | 1385 | |
1391 | 1386 | va_TraceMsg(trace_ctx, "\tchroma_weight_l1_flag = %d\n", p->chroma_weight_l1_flag); |
1392 | 1387 | if (p->chroma_weight_l1_flag) { |
1393 | 1388 | for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) { |
1394 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_weight_l1[i][0]); | |
1395 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_offset_l1[i][0]); | |
1396 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_weight_l1[i][1]); | |
1397 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_offset_l1[i][1]); | |
1389 | + va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n", | |
1390 | + p->chroma_weight_l1[i][0], | |
1391 | + p->chroma_offset_l1[i][0], | |
1392 | + p->chroma_weight_l1[i][1], | |
1393 | + p->chroma_offset_l1[i][1]); | |
1398 | 1394 | } |
1399 | - if (p->num_ref_idx_l1_active_minus1 >= 0) | |
1400 | - va_TraceMsg(trace_ctx, "\n"); | |
1401 | 1395 | } |
1402 | 1396 | va_TraceMsg(trace_ctx, NULL); |
1403 | 1397 | } |
@@ -1422,18 +1416,22 @@ static void va_TraceVAIQMatrixBufferH264( | ||
1422 | 1416 | va_TraceMsg(trace_ctx, "\tScalingList4x4[6][16]=\n"); |
1423 | 1417 | for (i = 0; i < 6; i++) { |
1424 | 1418 | for (j = 0; j < 16; j++) { |
1425 | - va_TraceMsg(trace_ctx, "\t%d\t", p->ScalingList4x4[i][j]); | |
1426 | - if ((j + 1) % 8 == 0) | |
1427 | - va_TraceMsg(trace_ctx, "\n"); | |
1419 | + if (trace_ctx->trace_fp_log) { | |
1420 | + fprintf(trace_ctx->trace_fp_log, "\t%d", p->ScalingList4x4[i][j]); | |
1421 | + if ((j + 1) % 8 == 0) | |
1422 | + fprintf(trace_ctx->trace_fp_log, "\n"); | |
1423 | + } | |
1428 | 1424 | } |
1429 | 1425 | } |
1430 | 1426 | |
1431 | 1427 | va_TraceMsg(trace_ctx, "\tScalingList8x8[2][64]=\n"); |
1432 | 1428 | for (i = 0; i < 2; i++) { |
1433 | 1429 | for (j = 0; j < 64; j++) { |
1434 | - va_TraceMsg(trace_ctx, "\t%d", p->ScalingList8x8[i][j]); | |
1435 | - if ((j + 1) % 8 == 0) | |
1436 | - va_TraceMsg(trace_ctx, "\n"); | |
1430 | + if (trace_ctx->trace_fp_log) { | |
1431 | + fprintf(trace_ctx->trace_fp_log,"\t%d", p->ScalingList8x8[i][j]); | |
1432 | + if ((j + 1) % 8 == 0) | |
1433 | + fprintf(trace_ctx->trace_fp_log, "\n"); | |
1434 | + } | |
1437 | 1435 | } |
1438 | 1436 | } |
1439 | 1437 |
@@ -1453,7 +1451,7 @@ static void va_TraceVAEncSequenceParameterBufferH264( | ||
1453 | 1451 | { |
1454 | 1452 | VAEncSequenceParameterBufferH264 *p = (VAEncSequenceParameterBufferH264 *)data; |
1455 | 1453 | DPY2TRACECTX(dpy); |
1456 | - int i; | |
1454 | + unsigned int i; | |
1457 | 1455 | |
1458 | 1456 | va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferH264\n"); |
1459 | 1457 |
@@ -1480,7 +1478,7 @@ static void va_TraceVAEncSequenceParameterBufferH264( | ||
1480 | 1478 | va_TraceMsg(trace_ctx, "\tnum_ref_frames_in_pic_order_cnt_cycle = %d\n", p->num_ref_frames_in_pic_order_cnt_cycle); |
1481 | 1479 | va_TraceMsg(trace_ctx, "\toffset_for_non_ref_pic = %d\n", p->offset_for_non_ref_pic); |
1482 | 1480 | va_TraceMsg(trace_ctx, "\toffset_for_top_to_bottom_field = %d\n", p->offset_for_top_to_bottom_field); |
1483 | - for(i = 0; i< p->max_num_ref_frames; ++i) | |
1481 | + for(i = 0; (i < p->max_num_ref_frames) && (i < 32); ++i) | |
1484 | 1482 | va_TraceMsg(trace_ctx, "\toffset_for_ref_frame[%d] = %d\n", i, p->offset_for_ref_frame[i]); |
1485 | 1483 | va_TraceMsg(trace_ctx, "\tframe_cropping_flag = %d\n", p->frame_cropping_flag); |
1486 | 1484 | va_TraceMsg(trace_ctx, "\tframe_crop_left_offset = %d\n", p->frame_crop_left_offset); |
@@ -1667,45 +1665,41 @@ static void va_TraceVAEncSliceParameterBufferH264( | ||
1667 | 1665 | va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag); |
1668 | 1666 | if (p->luma_weight_l0_flag) { |
1669 | 1667 | for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) { |
1670 | - va_TraceMsg(trace_ctx, "\t%d ", p->luma_weight_l0[i]); | |
1671 | - va_TraceMsg(trace_ctx, "\t%d ", p->luma_offset_l0[i]); | |
1668 | + va_TraceMsg(trace_ctx, "\t\t%d\t%d\n", | |
1669 | + p->luma_weight_l0[i], | |
1670 | + p->luma_offset_l0[i]); | |
1672 | 1671 | } |
1673 | - if (p->num_ref_idx_l0_active_minus1 >=0) | |
1674 | - va_TraceMsg(trace_ctx, "\n"); | |
1675 | 1672 | } |
1676 | 1673 | |
1677 | 1674 | va_TraceMsg(trace_ctx, "\tchroma_weight_l0_flag = %d\n", p->chroma_weight_l0_flag); |
1678 | 1675 | if (p->chroma_weight_l0_flag) { |
1679 | 1676 | for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) { |
1680 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_weight_l0[i][0]); | |
1681 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_offset_l0[i][0]); | |
1682 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_weight_l0[i][1]); | |
1683 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_offset_l0[i][1]); | |
1677 | + va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n", | |
1678 | + p->chroma_weight_l0[i][0], | |
1679 | + p->chroma_offset_l0[i][0], | |
1680 | + p->chroma_weight_l0[i][1], | |
1681 | + p->chroma_offset_l0[i][1]); | |
1684 | 1682 | } |
1685 | - if (p->num_ref_idx_l0_active_minus1 >= 0) | |
1686 | - va_TraceMsg(trace_ctx, "\n"); | |
1687 | 1683 | } |
1688 | 1684 | |
1689 | 1685 | va_TraceMsg(trace_ctx, "\tluma_weight_l1_flag = %d\n", p->luma_weight_l1_flag); |
1690 | 1686 | if (p->luma_weight_l1_flag) { |
1691 | 1687 | for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) { |
1692 | - va_TraceMsg(trace_ctx, "\t\t%d ", p->luma_weight_l1[i]); | |
1693 | - va_TraceMsg(trace_ctx, "\t\t%d ", p->luma_offset_l1[i]); | |
1688 | + va_TraceMsg(trace_ctx, "\t\t%d\t\t%d\n", | |
1689 | + p->luma_weight_l1[i], | |
1690 | + p->luma_offset_l1[i]); | |
1694 | 1691 | } |
1695 | - if (p->num_ref_idx_l1_active_minus1 >= 0) | |
1696 | - va_TraceMsg(trace_ctx, "\n"); | |
1697 | 1692 | } |
1698 | 1693 | |
1699 | 1694 | va_TraceMsg(trace_ctx, "\tchroma_weight_l1_flag = %d\n", p->chroma_weight_l1_flag); |
1700 | 1695 | if (p->chroma_weight_l1_flag && p->num_ref_idx_l1_active_minus1 < 32) { |
1701 | 1696 | for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) { |
1702 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_weight_l1[i][0]); | |
1703 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_offset_l1[i][0]); | |
1704 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_weight_l1[i][1]); | |
1705 | - va_TraceMsg(trace_ctx, "\t%d ", p->chroma_offset_l1[i][1]); | |
1697 | + va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n", | |
1698 | + p->chroma_weight_l1[i][0], | |
1699 | + p->chroma_offset_l1[i][0], | |
1700 | + p->chroma_weight_l1[i][1], | |
1701 | + p->chroma_offset_l1[i][1]); | |
1706 | 1702 | } |
1707 | - if ( p->num_ref_idx_l1_active_minus1 >=0) | |
1708 | - va_TraceMsg(trace_ctx, "\n"); | |
1709 | 1703 | } |
1710 | 1704 | va_TraceMsg(trace_ctx, NULL); |
1711 | 1705 |