• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine 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

Revision9171d06d687b1074433650ea137819bbdfd20118 (tree)
Zeit2013-06-19 15:33:22
AutorElaine Wang <elaine.wang@inte...>
CommiterXiang, Haihao

Log Message

va_trace: refine the log format

Signed-off-by: Elaine Wang <elaine.wang@intel.com>
(cherry picked from commit 15a0fca64456d8c7de1f7aca2cb747c4929690cd)

Ändern Zusammenfassung

Diff

--- a/va/va.c
+++ b/va/va.c
@@ -627,7 +627,7 @@ VAStatus vaCreateConfig (
627627 vaStatus = ctx->vtable->vaCreateConfig ( ctx, profile, entrypoint, attrib_list, num_attribs, config_id );
628628
629629 /* 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);
631631 VA_FOOL_FUNC(va_FoolCreateConfig, dpy, profile, entrypoint, attrib_list, num_attribs, config_id);
632632
633633 return vaStatus;
@@ -895,7 +895,7 @@ VAStatus vaCreateContext (
895895 flag, render_targets, num_render_targets, context );
896896
897897 /* 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);
899899
900900 return vaStatus;
901901 }
@@ -1039,7 +1039,7 @@ VAStatus vaBeginPicture (
10391039 CHECK_DISPLAY(dpy);
10401040 ctx = CTX(dpy);
10411041
1042- VA_TRACE_FUNC(va_TraceBeginPicture, dpy, context, render_target);
1042+ VA_TRACE_LOG(va_TraceBeginPicture, dpy, context, render_target);
10431043 VA_FOOL_RETURN();
10441044
10451045 va_status = ctx->vtable->vaBeginPicture( ctx, context, render_target );
--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -931,7 +931,7 @@ static void va_TraceVAEncPictureParameterBufferMPEG4(
931931 va_TraceMsg(idx, "VAEncPictureParameterBufferMPEG4\n");
932932 va_TraceMsg(idx, "\treference_picture = 0x%08x\n", p->reference_picture);
933933 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);
935935 va_TraceMsg(idx, "\tpicture_width = %d\n", p->picture_width);
936936 va_TraceMsg(idx, "\tpicture_height = %d\n", p->picture_height);
937937 va_TraceMsg(idx, "\tmodulo_time_base = %d\n", p->modulo_time_base);
@@ -1273,7 +1273,7 @@ static void va_TraceVAEncPictureParameterBufferH264(
12731273 va_TraceMsg(idx, "\tCurrPic.flags = %d\n", p->CurrPic.flags);
12741274 va_TraceMsg(idx, "\tCurrPic.TopFieldOrderCnt = %d\n", p->CurrPic.TopFieldOrderCnt);
12751275 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");
12771277 for (i = 0; i < 16; i++)
12781278 {
12791279 if (p->ReferenceFrames[i].flags != VA_PICTURE_H264_INVALID) {
@@ -1372,19 +1372,33 @@ static void va_TraceVAEncSliceParameterBufferH264(
13721372 va_TraceMsg(idx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
13731373
13741374 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;
13781385 }
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;
13851399 }
13861400 }
1387-
1401+
13881402 va_TraceMsg(idx, "\tluma_log2_weight_denom = %d\n", p->luma_log2_weight_denom);
13891403 va_TraceMsg(idx, "\tchroma_log2_weight_denom = %d\n", p->chroma_log2_weight_denom);
13901404 va_TraceMsg(idx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
--- a/va/va_trace.h
+++ b/va/va_trace.h
@@ -41,17 +41,13 @@ extern int trace_flag;
4141 VA_TRACE_FLAG_SURFACE_ENCODE | \
4242 VA_TRACE_FLAG_SURFACE_JPEG)
4343
44-#define VA_TRACE_FUNC(trace_func,...) \
45- if (trace_flag) { \
46- trace_func(__VA_ARGS__); \
47- }
4844 #define VA_TRACE_LOG(trace_func,...) \
49- if (trace_flag & VA_TRACE_FLAG_LOG) { \
45+ if (trace_flag & VA_TRACE_FLAG_LOG) { \
5046 trace_func(__VA_ARGS__); \
5147 }
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__); \
5551 }
5652
5753 void va_TraceInit(VADisplay dpy);
--- a/va/x11/va_x11.c
+++ b/va/x11/va_x11.c
@@ -238,9 +238,9 @@ VAStatus vaPutSurface (
238238 CHECK_DISPLAY(dpy);
239239 ctx = CTX(dpy);
240240
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 );
244244
245245 return ctx->vtable->vaPutSurface( ctx, surface, (void *)draw, srcx, srcy, srcw, srch,
246246 destx, desty, destw, desth,