summaryrefslogtreecommitdiff
path: root/va
diff options
context:
space:
mode:
authorElaine Wang <elaine.wang@intel.com>2013-04-18 00:02:10 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-06-19 14:33:22 +0800
commit9171d06d687b1074433650ea137819bbdfd20118 (patch)
treeaed669d72537d7e6bd607455db6ab0884338a198 /va
parent6af4c9bc68fe63bb6e776bc954f07312856217db (diff)
va_trace: refine the log format
Signed-off-by: Elaine Wang <elaine.wang@intel.com> (cherry picked from commit 15a0fca64456d8c7de1f7aca2cb747c4929690cd)
Diffstat (limited to 'va')
-rw-r--r--va/va.c6
-rw-r--r--va/va_trace.c38
-rw-r--r--va/va_trace.h12
-rw-r--r--va/x11/va_x11.c6
4 files changed, 36 insertions, 26 deletions
diff --git a/va/va.c b/va/va.c
index 8031092..400273e 100644
--- a/va/va.c
+++ b/va/va.c
@@ -627,7 +627,7 @@ VAStatus vaCreateConfig (
vaStatus = ctx->vtable->vaCreateConfig ( ctx, profile, entrypoint, attrib_list, num_attribs, config_id );
/* record the current entrypoint for further trace/fool determination */
- VA_TRACE_FUNC(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id);
+ VA_TRACE_LOG(va_TraceCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id);
VA_FOOL_FUNC(va_FoolCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id);
return vaStatus;
@@ -895,7 +895,7 @@ VAStatus vaCreateContext (
flag, render_targets, num_render_targets, context );
/* keep current encode/decode resoluton */
- VA_TRACE_FUNC(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context);
+ VA_TRACE_LOG(va_TraceCreateContext, dpy, config_id, picture_width, picture_height, flag, render_targets, num_render_targets, context);
return vaStatus;
}
@@ -1039,7 +1039,7 @@ VAStatus vaBeginPicture (
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
- VA_TRACE_FUNC(va_TraceBeginPicture, dpy, context, render_target);
+ VA_TRACE_LOG(va_TraceBeginPicture, dpy, context, render_target);
VA_FOOL_RETURN();
va_status = ctx->vtable->vaBeginPicture( ctx, context, render_target );
diff --git a/va/va_trace.c b/va/va_trace.c
index 2a05e02..5e2ed65 100644
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -931,7 +931,7 @@ static void va_TraceVAEncPictureParameterBufferMPEG4(
va_TraceMsg(idx, "VAEncPictureParameterBufferMPEG4\n");
va_TraceMsg(idx, "\treference_picture = 0x%08x\n", p->reference_picture);
va_TraceMsg(idx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture);
- va_TraceMsg(idx, "\tcoded_buf = %08x\n", p->coded_buf);
+ va_TraceMsg(idx, "\tcoded_buf = 0x%08x\n", p->coded_buf);
va_TraceMsg(idx, "\tpicture_width = %d\n", p->picture_width);
va_TraceMsg(idx, "\tpicture_height = %d\n", p->picture_height);
va_TraceMsg(idx, "\tmodulo_time_base = %d\n", p->modulo_time_base);
@@ -1273,7 +1273,7 @@ static void va_TraceVAEncPictureParameterBufferH264(
va_TraceMsg(idx, "\tCurrPic.flags = %d\n", p->CurrPic.flags);
va_TraceMsg(idx, "\tCurrPic.TopFieldOrderCnt = %d\n", p->CurrPic.TopFieldOrderCnt);
va_TraceMsg(idx, "\tCurrPic.BottomFieldOrderCnt = %d\n", p->CurrPic.BottomFieldOrderCnt);
- va_TraceMsg(idx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx:\n");
+ va_TraceMsg(idx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx):\n");
for (i = 0; i < 16; i++)
{
if (p->ReferenceFrames[i].flags != VA_PICTURE_H264_INVALID) {
@@ -1372,19 +1372,33 @@ static void va_TraceVAEncSliceParameterBufferH264(
va_TraceMsg(idx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
if (p->slice_type == 0 || p->slice_type == 1) {
- va_TraceMsg(idx, "\tRefPicList0 =");
- for (i = 0; i < p->num_ref_idx_l0_active_minus1 + 1 && i < 32; i++) {
- 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);
+ va_TraceMsg(idx, "\tRefPicList0 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx):\n");
+ for (i = 0; i < 32; i++) {
+ if (p->RefPicList0[i].flags != VA_PICTURE_H264_INVALID) {
+ va_TraceMsg(idx, "\t\t%d-%d-0x%08x-%d\n",
+ p->RefPicList0[i].TopFieldOrderCnt,
+ p->RefPicList0[i].BottomFieldOrderCnt,
+ p->RefPicList0[i].picture_id,
+ p->RefPicList0[i].frame_idx);
+ } else
+ break;
}
- if (p->slice_type == 1) {
- va_TraceMsg(idx, "\tRefPicList1 =");
- for (i = 0; i < p->num_ref_idx_l1_active_minus1 + 1 && i < 32; i++)
- {
- 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);
- }
+ }
+
+ if (p->slice_type == 1) {
+ va_TraceMsg(idx, "\tRefPicList1 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx):\n");
+ for (i = 0; i < 32; i++) {
+ if (p->RefPicList1[i].flags != VA_PICTURE_H264_INVALID)
+ va_TraceMsg(idx, "\t\t%d-%d-0x%08x-%d\n",
+ p->RefPicList1[i].TopFieldOrderCnt,
+ p->RefPicList1[i].BottomFieldOrderCnt,
+ p->RefPicList1[i].picture_id,
+ p->RefPicList1[i].frame_idx);
+ else
+ break;
}
}
-
+
va_TraceMsg(idx, "\tluma_log2_weight_denom = %d\n", p->luma_log2_weight_denom);
va_TraceMsg(idx, "\tchroma_log2_weight_denom = %d\n", p->chroma_log2_weight_denom);
va_TraceMsg(idx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
diff --git a/va/va_trace.h b/va/va_trace.h
index a211c82..29599ea 100644
--- a/va/va_trace.h
+++ b/va/va_trace.h
@@ -41,17 +41,13 @@ extern int trace_flag;
VA_TRACE_FLAG_SURFACE_ENCODE | \
VA_TRACE_FLAG_SURFACE_JPEG)
-#define VA_TRACE_FUNC(trace_func,...) \
- if (trace_flag) { \
- trace_func(__VA_ARGS__); \
- }
#define VA_TRACE_LOG(trace_func,...) \
- if (trace_flag & VA_TRACE_FLAG_LOG) { \
+ if (trace_flag & VA_TRACE_FLAG_LOG) { \
trace_func(__VA_ARGS__); \
}
-#define VA_TRACE_SURFACE(trace_func,...) \
- if (trace_flag & (VA_TRACE_FLAG_SURFACE | VA_TRACE_FLAG_CODEDBUF)) { \
- trace_func(__VA_ARGS__); \
+#define VA_TRACE_SURFACE(trace_func,...) \
+ if (trace_flag & (VA_TRACE_FLAG_SURFACE | VA_TRACE_FLAG_CODEDBUF)) { \
+ trace_func(__VA_ARGS__); \
}
void va_TraceInit(VADisplay dpy);
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
index 625ab7e..44c3330 100644
--- a/va/x11/va_x11.c
+++ b/va/x11/va_x11.c
@@ -238,9 +238,9 @@ VAStatus vaPutSurface (
CHECK_DISPLAY(dpy);
ctx = CTX(dpy);
- VA_TRACE_FUNC(va_TracePutSurface, dpy, surface, (void *)draw, srcx, srcy, srcw, srch,
- destx, desty, destw, desth,
- cliprects, number_cliprects, flags );
+ VA_TRACE_LOG(va_TracePutSurface, dpy, surface, (void *)draw, srcx, srcy, srcw, srch,
+ destx, desty, destw, desth,
+ cliprects, number_cliprects, flags );
return ctx->vtable->vaPutSurface( ctx, surface, (void *)draw, srcx, srcy, srcw, srch,
destx, desty, destw, desth,