• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

hardware/intel/libva


Commit MetaInfo

修订版1e497a3ae02a7f4117d746d97147193708c01f21 (tree)
时间2014-03-17 10:41:45
作者Austin Yuan <shengquan.yuan@inte...>
CommiterXiang, Haihao

Log Message

vatrace: refine the log format

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit f78e4a6a84178c4561a5b1c8dbb7773e5a575d0f)

更改概述

差异

--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -1267,8 +1267,6 @@ static void va_TraceVAPictureParameterBufferH264(
12671267 } else
12681268 break;
12691269 }
1270- va_TraceMsg(trace_ctx, "\n");
1271-
12721270 va_TraceMsg(trace_ctx, "\tpicture_width_in_mbs_minus1 = %d\n", p->picture_width_in_mbs_minus1);
12731271 va_TraceMsg(trace_ctx, "\tpicture_height_in_mbs_minus1 = %d\n", p->picture_height_in_mbs_minus1);
12741272 va_TraceMsg(trace_ctx, "\tbit_depth_luma_minus8 = %d\n", p->bit_depth_luma_minus8);
@@ -1337,7 +1335,7 @@ static void va_TraceVASliceParameterBufferH264(
13371335 va_TraceMsg(trace_ctx, "\tslice_alpha_c0_offset_div2 = %d\n", p->slice_alpha_c0_offset_div2);
13381336 va_TraceMsg(trace_ctx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
13391337
1340- va_TraceMsg(trace_ctx, "\tRefPicList0 =");
1338+ va_TraceMsg(trace_ctx, "\tRefPicList0 =\n");
13411339 for (i = 0; i < 32; i++) {
13421340 if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
13431341 ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
@@ -1345,7 +1343,7 @@ static void va_TraceVASliceParameterBufferH264(
13451343 else
13461344 break;
13471345 }
1348- va_TraceMsg(trace_ctx, "\tRefPicList1 =");
1346+ va_TraceMsg(trace_ctx, "\tRefPicList1 =\n");
13491347 for (i = 0; i < 32; i++) {
13501348 if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
13511349 ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
@@ -1359,45 +1357,41 @@ static void va_TraceVASliceParameterBufferH264(
13591357 va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
13601358 if (p->luma_weight_l0_flag) {
13611359 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]);
13641363 }
1365- if (p->num_ref_idx_l0_active_minus1 >= 0)
1366- va_TraceMsg(trace_ctx, "\n");
13671364 }
13681365
13691366 va_TraceMsg(trace_ctx, "\tchroma_weight_l0_flag = %d\n", p->chroma_weight_l0_flag);
13701367 if (p->chroma_weight_l0_flag) {
13711368 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]);
13761374 }
1377- if (p->num_ref_idx_l0_active_minus1 >= 0)
1378- va_TraceMsg(trace_ctx, "\n");
13791375 }
13801376
13811377 va_TraceMsg(trace_ctx, "\tluma_weight_l1_flag = %d\n", p->luma_weight_l1_flag);
13821378 if (p->luma_weight_l1_flag) {
13831379 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]);
13861383 }
1387- if (p->num_ref_idx_l1_active_minus1 >= 0)
1388- va_TraceMsg(trace_ctx, "\n");
13891384 }
13901385
13911386 va_TraceMsg(trace_ctx, "\tchroma_weight_l1_flag = %d\n", p->chroma_weight_l1_flag);
13921387 if (p->chroma_weight_l1_flag) {
13931388 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]);
13981394 }
1399- if (p->num_ref_idx_l1_active_minus1 >= 0)
1400- va_TraceMsg(trace_ctx, "\n");
14011395 }
14021396 va_TraceMsg(trace_ctx, NULL);
14031397 }
@@ -1422,18 +1416,22 @@ static void va_TraceVAIQMatrixBufferH264(
14221416 va_TraceMsg(trace_ctx, "\tScalingList4x4[6][16]=\n");
14231417 for (i = 0; i < 6; i++) {
14241418 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+ }
14281424 }
14291425 }
14301426
14311427 va_TraceMsg(trace_ctx, "\tScalingList8x8[2][64]=\n");
14321428 for (i = 0; i < 2; i++) {
14331429 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+ }
14371435 }
14381436 }
14391437
@@ -1453,7 +1451,7 @@ static void va_TraceVAEncSequenceParameterBufferH264(
14531451 {
14541452 VAEncSequenceParameterBufferH264 *p = (VAEncSequenceParameterBufferH264 *)data;
14551453 DPY2TRACECTX(dpy);
1456- int i;
1454+ unsigned int i;
14571455
14581456 va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferH264\n");
14591457
@@ -1480,7 +1478,7 @@ static void va_TraceVAEncSequenceParameterBufferH264(
14801478 va_TraceMsg(trace_ctx, "\tnum_ref_frames_in_pic_order_cnt_cycle = %d\n", p->num_ref_frames_in_pic_order_cnt_cycle);
14811479 va_TraceMsg(trace_ctx, "\toffset_for_non_ref_pic = %d\n", p->offset_for_non_ref_pic);
14821480 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)
14841482 va_TraceMsg(trace_ctx, "\toffset_for_ref_frame[%d] = %d\n", i, p->offset_for_ref_frame[i]);
14851483 va_TraceMsg(trace_ctx, "\tframe_cropping_flag = %d\n", p->frame_cropping_flag);
14861484 va_TraceMsg(trace_ctx, "\tframe_crop_left_offset = %d\n", p->frame_crop_left_offset);
@@ -1667,45 +1665,41 @@ static void va_TraceVAEncSliceParameterBufferH264(
16671665 va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
16681666 if (p->luma_weight_l0_flag) {
16691667 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]);
16721671 }
1673- if (p->num_ref_idx_l0_active_minus1 >=0)
1674- va_TraceMsg(trace_ctx, "\n");
16751672 }
16761673
16771674 va_TraceMsg(trace_ctx, "\tchroma_weight_l0_flag = %d\n", p->chroma_weight_l0_flag);
16781675 if (p->chroma_weight_l0_flag) {
16791676 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]);
16841682 }
1685- if (p->num_ref_idx_l0_active_minus1 >= 0)
1686- va_TraceMsg(trace_ctx, "\n");
16871683 }
16881684
16891685 va_TraceMsg(trace_ctx, "\tluma_weight_l1_flag = %d\n", p->luma_weight_l1_flag);
16901686 if (p->luma_weight_l1_flag) {
16911687 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]);
16941691 }
1695- if (p->num_ref_idx_l1_active_minus1 >= 0)
1696- va_TraceMsg(trace_ctx, "\n");
16971692 }
16981693
16991694 va_TraceMsg(trace_ctx, "\tchroma_weight_l1_flag = %d\n", p->chroma_weight_l1_flag);
17001695 if (p->chroma_weight_l1_flag && p->num_ref_idx_l1_active_minus1 < 32) {
17011696 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]);
17061702 }
1707- if ( p->num_ref_idx_l1_active_minus1 >=0)
1708- va_TraceMsg(trace_ctx, "\n");
17091703 }
17101704 va_TraceMsg(trace_ctx, NULL);
17111705