hardware/intel/libva
Révision | 9171d06d687b1074433650ea137819bbdfd20118 (tree) |
---|---|
l'heure | 2013-06-19 15:33:22 |
Auteur | Elaine Wang <elaine.wang@inte...> |
Commiter | Xiang, Haihao |
va_trace: refine the log format
Signed-off-by: Elaine Wang <elaine.wang@intel.com>
(cherry picked from commit 15a0fca64456d8c7de1f7aca2cb747c4929690cd)
@@ -627,7 +627,7 @@ VAStatus vaCreateConfig ( | ||
627 | 627 | vaStatus = ctx->vtable->vaCreateConfig ( ctx, profile, entrypoint, attrib_list, num_attribs, config_id ); |
628 | 628 | |
629 | 629 | /* record the current entrypoint for further trace/fool determination */ |
630 | - VA_TRACE_FUNC(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id); | |
630 | + VA_TRACE_LOG(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id); | |
631 | 631 | VA_FOOL_FUNC(va_FoolCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id); |
632 | 632 | |
633 | 633 | return vaStatus; |
@@ -895,7 +895,7 @@ VAStatus vaCreateContext ( | ||
895 | 895 | flag, render_targets, num_render_targets, context ); |
896 | 896 | |
897 | 897 | /* keep current encode/decode resoluton */ |
898 | - VA_TRACE_FUNC(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context); | |
898 | + VA_TRACE_LOG(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context); | |
899 | 899 | |
900 | 900 | return vaStatus; |
901 | 901 | } |
@@ -1039,7 +1039,7 @@ VAStatus vaBeginPicture ( | ||
1039 | 1039 | CHECK_DISPLAY(dpy); |
1040 | 1040 | ctx = CTX(dpy); |
1041 | 1041 | |
1042 | - VA_TRACE_FUNC(va_TraceBeginPicture, dpy, context, render_target); | |
1042 | + VA_TRACE_LOG(va_TraceBeginPicture, dpy, context, render_target); | |
1043 | 1043 | VA_FOOL_RETURN(); |
1044 | 1044 | |
1045 | 1045 | va_status = ctx->vtable->vaBeginPicture( ctx, context, render_target ); |
@@ -931,7 +931,7 @@ static void va_TraceVAEncPictureParameterBufferMPEG4( | ||
931 | 931 | va_TraceMsg(idx, "VAEncPictureParameterBufferMPEG4\n"); |
932 | 932 | va_TraceMsg(idx, "\treference_picture = 0x%08x\n", p->reference_picture); |
933 | 933 | va_TraceMsg(idx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture); |
934 | - va_TraceMsg(idx, "\tcoded_buf = %08x\n", p->coded_buf); | |
934 | + va_TraceMsg(idx, "\tcoded_buf = 0x%08x\n", p->coded_buf); | |
935 | 935 | va_TraceMsg(idx, "\tpicture_width = %d\n", p->picture_width); |
936 | 936 | va_TraceMsg(idx, "\tpicture_height = %d\n", p->picture_height); |
937 | 937 | va_TraceMsg(idx, "\tmodulo_time_base = %d\n", p->modulo_time_base); |
@@ -1273,7 +1273,7 @@ static void va_TraceVAEncPictureParameterBufferH264( | ||
1273 | 1273 | va_TraceMsg(idx, "\tCurrPic.flags = %d\n", p->CurrPic.flags); |
1274 | 1274 | va_TraceMsg(idx, "\tCurrPic.TopFieldOrderCnt = %d\n", p->CurrPic.TopFieldOrderCnt); |
1275 | 1275 | va_TraceMsg(idx, "\tCurrPic.BottomFieldOrderCnt = %d\n", p->CurrPic.BottomFieldOrderCnt); |
1276 | - va_TraceMsg(idx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx:\n"); | |
1276 | + va_TraceMsg(idx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx):\n"); | |
1277 | 1277 | for (i = 0; i < 16; i++) |
1278 | 1278 | { |
1279 | 1279 | if (p->ReferenceFrames[i].flags != VA_PICTURE_H264_INVALID) { |
@@ -1372,19 +1372,33 @@ static void va_TraceVAEncSliceParameterBufferH264( | ||
1372 | 1372 | va_TraceMsg(idx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2); |
1373 | 1373 | |
1374 | 1374 | if (p->slice_type == 0 || p->slice_type == 1) { |
1375 | - va_TraceMsg(idx, "\tRefPicList0 ="); | |
1376 | - for (i = 0; i < p->num_ref_idx_l0_active_minus1 + 1 && i < 32; i++) { | |
1377 | - va_TraceMsg(idx, "%d-%d-0x%08x-%d\n", p->RefPicList0[i].TopFieldOrderCnt, p->RefPicList0[i].BottomFieldOrderCnt, p->RefPicList0[i].picture_id, p->RefPicList0[i].frame_idx); | |
1375 | + va_TraceMsg(idx, "\tRefPicList0 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx):\n"); | |
1376 | + for (i = 0; i < 32; i++) { | |
1377 | + if (p->RefPicList0[i].flags != VA_PICTURE_H264_INVALID) { | |
1378 | + va_TraceMsg(idx, "\t\t%d-%d-0x%08x-%d\n", | |
1379 | + p->RefPicList0[i].TopFieldOrderCnt, | |
1380 | + p->RefPicList0[i].BottomFieldOrderCnt, | |
1381 | + p->RefPicList0[i].picture_id, | |
1382 | + p->RefPicList0[i].frame_idx); | |
1383 | + } else | |
1384 | + break; | |
1378 | 1385 | } |
1379 | - if (p->slice_type == 1) { | |
1380 | - va_TraceMsg(idx, "\tRefPicList1 ="); | |
1381 | - for (i = 0; i < p->num_ref_idx_l1_active_minus1 + 1 && i < 32; i++) | |
1382 | - { | |
1383 | - va_TraceMsg(idx, "%d-%d-0x%08x-%d\n", p->RefPicList1[i].TopFieldOrderCnt, p->RefPicList1[i].BottomFieldOrderCnt, p->RefPicList1[i].picture_id, p->RefPicList1[i].frame_idx); | |
1384 | - } | |
1386 | + } | |
1387 | + | |
1388 | + if (p->slice_type == 1) { | |
1389 | + va_TraceMsg(idx, "\tRefPicList1 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx):\n"); | |
1390 | + for (i = 0; i < 32; i++) { | |
1391 | + if (p->RefPicList1[i].flags != VA_PICTURE_H264_INVALID) | |
1392 | + va_TraceMsg(idx, "\t\t%d-%d-0x%08x-%d\n", | |
1393 | + p->RefPicList1[i].TopFieldOrderCnt, | |
1394 | + p->RefPicList1[i].BottomFieldOrderCnt, | |
1395 | + p->RefPicList1[i].picture_id, | |
1396 | + p->RefPicList1[i].frame_idx); | |
1397 | + else | |
1398 | + break; | |
1385 | 1399 | } |
1386 | 1400 | } |
1387 | - | |
1401 | + | |
1388 | 1402 | va_TraceMsg(idx, "\tluma_log2_weight_denom = %d\n", p->luma_log2_weight_denom); |
1389 | 1403 | va_TraceMsg(idx, "\tchroma_log2_weight_denom = %d\n", p->chroma_log2_weight_denom); |
1390 | 1404 | va_TraceMsg(idx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag); |
@@ -41,17 +41,13 @@ extern int trace_flag; | ||
41 | 41 | VA_TRACE_FLAG_SURFACE_ENCODE | \ |
42 | 42 | VA_TRACE_FLAG_SURFACE_JPEG) |
43 | 43 | |
44 | -#define VA_TRACE_FUNC(trace_func,...) \ | |
45 | - if (trace_flag) { \ | |
46 | - trace_func(__VA_ARGS__); \ | |
47 | - } | |
48 | 44 | #define VA_TRACE_LOG(trace_func,...) \ |
49 | - if (trace_flag & VA_TRACE_FLAG_LOG) { \ | |
45 | + if (trace_flag & VA_TRACE_FLAG_LOG) { \ | |
50 | 46 | trace_func(__VA_ARGS__); \ |
51 | 47 | } |
52 | -#define VA_TRACE_SURFACE(trace_func,...) \ | |
53 | - if (trace_flag & (VA_TRACE_FLAG_SURFACE | VA_TRACE_FLAG_CODEDBUF)) { \ | |
54 | - trace_func(__VA_ARGS__); \ | |
48 | +#define VA_TRACE_SURFACE(trace_func,...) \ | |
49 | + if (trace_flag & (VA_TRACE_FLAG_SURFACE | VA_TRACE_FLAG_CODEDBUF)) { \ | |
50 | + trace_func(__VA_ARGS__); \ | |
55 | 51 | } |
56 | 52 | |
57 | 53 | void va_TraceInit(VADisplay dpy); |
@@ -238,9 +238,9 @@ VAStatus vaPutSurface ( | ||
238 | 238 | CHECK_DISPLAY(dpy); |
239 | 239 | ctx = CTX(dpy); |
240 | 240 | |
241 | - VA_TRACE_FUNC(va_TracePutSurface, dpy, surface, (void *)draw, srcx, srcy, srcw, srch, | |
242 | - destx, desty, destw, desth, | |
243 | - cliprects, number_cliprects, flags ); | |
241 | + VA_TRACE_LOG(va_TracePutSurface, dpy, surface, (void *)draw, srcx, srcy, srcw, srch, | |
242 | + destx, desty, destw, desth, | |
243 | + cliprects, number_cliprects, flags ); | |
244 | 244 | |
245 | 245 | return ctx->vtable->vaPutSurface( ctx, surface, (void *)draw, srcx, srcy, srcw, srch, |
246 | 246 | destx, desty, destw, desth, |