• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
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

Revision594f6e2c79748c88c9626453446e0f399666cb4a (tree)
Time2016-05-23 08:35:27
AuthorScott D Phillips <scott.d.phillips@inte...>
CommiterSean V Kelley

Log Message

trace: Cleanup some HEVC prints

Some fields in HEVC buffers had extraneous timestamps interspersed
with the traced data.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>

Change Summary

Incremental Difference

--- a/va/va_trace.c
+++ b/va/va_trace.c
@@ -228,6 +228,11 @@ struct va_trace {
228228
229229 #define TRACE_FUNCNAME(idx) va_TraceMsg(trace_ctx, "==========%s\n", __func__);
230230
231+#define TRACE_NEWLINE() do { \
232+ va_TracePrint(trace_ctx, "\n"); \
233+ va_TraceMsg(trace_ctx, "") ; \
234+} while (0)
235+
231236 /* Prototype declarations (functions defined in va.c) */
232237
233238 void va_errorMessage(const char *msg, ...);
@@ -1643,7 +1648,7 @@ static void va_TraceVABuffers(
16431648
16441649 DPY2TRACECTX(dpy, context, VA_INVALID_ID);
16451650
1646- va_TraceMsg(trace_ctx, "--%s\n", buffer_type_to_string(type));
1651+ va_TracePrint(trace_ctx, "--%s\n", buffer_type_to_string(type));
16471652
16481653 if(trace_ctx->plog_file)
16491654 fp = trace_ctx->plog_file->fp_log;
@@ -2097,7 +2102,7 @@ static void va_TraceVAPictureParameterBufferHEVC(
20972102
20982103 DPY2TRACECTX(dpy, context, VA_INVALID_ID);
20992104
2100- va_TraceMsg(trace_ctx, "VAPictureParameterBufferHEVC\n");
2105+ va_TracePrint(trace_ctx, "VAPictureParameterBufferHEVC\n");
21012106
21022107 va_TraceMsg(trace_ctx, "\tCurrPic.picture_id = 0x%08x\n", p->CurrPic.picture_id);
21032108 va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.pic_order_cnt);
@@ -2165,19 +2170,21 @@ static void va_TraceVAPictureParameterBufferHEVC(
21652170 va_TraceMsg(trace_ctx, "\tnum_tile_rows_minus1 = %d\n", p->num_tile_rows_minus1);
21662171
21672172 va_TraceMsg(trace_ctx, "\tcolumn_width_minus1[19]=\n");
2173+ va_TraceMsg(trace_ctx, "");
21682174 for (i = 0; i < 19; i++) {
2169- va_TraceMsg(trace_ctx, "\t%d", p->column_width_minus1[i]);
2175+ va_TracePrint(trace_ctx, "\t%d", p->column_width_minus1[i]);
21702176 if ((i + 1) % 8 == 0)
2171- va_TraceMsg(trace_ctx, "\n");
2177+ TRACE_NEWLINE();
21722178 }
2173- va_TraceMsg(trace_ctx, "\n");
2179+ va_TracePrint(trace_ctx, "\n");
21742180 va_TraceMsg(trace_ctx, "\trow_height_minus1[21]=\n");
2181+ va_TraceMsg(trace_ctx, "");
21752182 for (i = 0; i < 21; i++) {
2176- va_TraceMsg(trace_ctx, "\t%d", p->row_height_minus1[i]);
2183+ va_TracePrint(trace_ctx, "\t%d", p->row_height_minus1[i]);
21772184 if ((i + 1) % 8 == 0)
2178- va_TraceMsg(trace_ctx, "\n");
2185+ TRACE_NEWLINE();
21792186 }
2180- va_TraceMsg(trace_ctx, "\n");
2187+ va_TracePrint(trace_ctx, "\n");
21812188
21822189 va_TraceMsg(trace_ctx, "\tslice_parsing_fields = %d\n", p->slice_parsing_fields.value);
21832190 va_TraceMsg(trace_ctx, "\tlists_modification_present_flag = %d\n", p->slice_parsing_fields.bits.lists_modification_present_flag);
@@ -2226,7 +2233,7 @@ static void va_TraceVASliceParameterBufferHEVC(
22262233 trace_ctx->trace_slice_no++;
22272234 trace_ctx->trace_slice_size = p->slice_data_size;
22282235
2229- va_TraceMsg(trace_ctx, "VASliceParameterBufferHEVC\n");
2236+ va_TracePrint(trace_ctx, "VASliceParameterBufferHEVC\n");
22302237 va_TraceMsg(trace_ctx, "\tslice_data_size = %d\n", p->slice_data_size);
22312238 va_TraceMsg(trace_ctx, "\tslice_data_offset = %d\n", p->slice_data_offset);
22322239 va_TraceMsg(trace_ctx, "\tslice_data_flag = %d\n", p->slice_data_flag);
@@ -2234,16 +2241,17 @@ static void va_TraceVASliceParameterBufferHEVC(
22342241 va_TraceMsg(trace_ctx, "\tslice_segment_address = %d\n", p->slice_segment_address);
22352242
22362243 va_TraceMsg(trace_ctx, "\tRefPicList[2][15]=\n");
2244+ va_TraceMsg(trace_ctx, "");
22372245 for (i = 0; i < 2; i++) {
22382246 for (j = 0; j < 15; j++) {
2239- va_TraceMsg(trace_ctx, "\t%d", p->RefPicList[i][j]);
2240- if ((i*8 + j + 1) % 8 == 0)
2241- va_TraceMsg(trace_ctx, "\n");
2247+ va_TracePrint(trace_ctx, "\t%d", p->RefPicList[i][j]);
2248+ if ((j + 1) % 8 == 0)
2249+ TRACE_NEWLINE();
22422250 }
2251+ TRACE_NEWLINE();
22432252 }
2244- va_TraceMsg(trace_ctx, "\n");
22452253
2246- va_TraceMsg(trace_ctx, "\tLongSliceFlags.value = %d\n", p->LongSliceFlags.value);
2254+ va_TracePrint(trace_ctx, "\tLongSliceFlags.value = %d\n", p->LongSliceFlags.value);
22472255 va_TraceMsg(trace_ctx, "\tLongSliceFlags.fields.LastSliceOfPic = %d\n", p->LongSliceFlags.fields.LastSliceOfPic);
22482256 va_TraceMsg(trace_ctx, "\tLongSliceFlags.fields.dependent_slice_segment_flag = %d\n", p->LongSliceFlags.fields.dependent_slice_segment_flag);
22492257 va_TraceMsg(trace_ctx, "\tLongSliceFlags.fields.slice_type = %d\n", p->LongSliceFlags.fields.slice_type);
@@ -2270,24 +2278,24 @@ static void va_TraceVASliceParameterBufferHEVC(
22702278
22712279 va_TraceMsg(trace_ctx, "\tnum_ref_idx_l0_active_minus1 = %d\n", p->num_ref_idx_l0_active_minus1);
22722280 for (i = 0; i <= p->num_ref_idx_l0_active_minus1; i++) {
2273- va_TraceMsg(trace_ctx, "\t%d ", p->delta_luma_weight_l0[i]);
2274- va_TraceMsg(trace_ctx, "\t%d ", p->luma_offset_l0[i]);
2275- va_TraceMsg(trace_ctx, "\t%d ", p->delta_chroma_weight_l0[i][0]);
2276- va_TraceMsg(trace_ctx, "\t%d ", p->delta_chroma_weight_l0[i][1]);
2277- va_TraceMsg(trace_ctx, "\t%d ", p->ChromaOffsetL0[i][0]);
2278- va_TraceMsg(trace_ctx, "\t%d ", p->ChromaOffsetL0[i][1]);
2279- va_TraceMsg(trace_ctx, "\n");
2281+ va_TraceMsg(trace_ctx, "\t% d ", p->delta_luma_weight_l0[i]);
2282+ va_TracePrint(trace_ctx, "\t% d ", p->luma_offset_l0[i]);
2283+ va_TracePrint(trace_ctx, "\t% d ", p->delta_chroma_weight_l0[i][0]);
2284+ va_TracePrint(trace_ctx, "\t% d ", p->delta_chroma_weight_l0[i][1]);
2285+ va_TracePrint(trace_ctx, "\t% d ", p->ChromaOffsetL0[i][0]);
2286+ va_TracePrint(trace_ctx, "\t% d ", p->ChromaOffsetL0[i][1]);
2287+ va_TracePrint(trace_ctx, "\n");
22802288 }
22812289
22822290 va_TraceMsg(trace_ctx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
22832291 for (i = 0; i <= p->num_ref_idx_l1_active_minus1; i++) {
2284- va_TraceMsg(trace_ctx, "\t%d ", p->delta_luma_weight_l1[i]);
2285- va_TraceMsg(trace_ctx, "\t%d ", p->luma_offset_l1[i]);
2286- va_TraceMsg(trace_ctx, "\t%d ", p->delta_chroma_weight_l1[i][0]);
2287- va_TraceMsg(trace_ctx, "\t%d ", p->delta_chroma_weight_l1[i][1]);
2288- va_TraceMsg(trace_ctx, "\t%d ", p->ChromaOffsetL1[i][0]);
2289- va_TraceMsg(trace_ctx, "\t%d ", p->ChromaOffsetL1[i][1]);
2290- va_TraceMsg(trace_ctx, "\n");
2292+ va_TraceMsg(trace_ctx, "\t% d ", p->delta_luma_weight_l1[i]);
2293+ va_TracePrint(trace_ctx, "\t% d ", p->luma_offset_l1[i]);
2294+ va_TracePrint(trace_ctx, "\t% d ", p->delta_chroma_weight_l1[i][0]);
2295+ va_TracePrint(trace_ctx, "\t% d ", p->delta_chroma_weight_l1[i][1]);
2296+ va_TracePrint(trace_ctx, "\t% d ", p->ChromaOffsetL1[i][0]);
2297+ va_TracePrint(trace_ctx, "\t% d ", p->ChromaOffsetL1[i][1]);
2298+ va_TracePrint(trace_ctx, "\n");
22912299 }
22922300
22932301 va_TraceMsg(trace_ctx, "\tfive_minus_max_num_merge_cand = %d\n", p->five_minus_max_num_merge_cand);
@@ -2310,52 +2318,60 @@ static void va_TraceVAIQMatrixBufferHEVC(
23102318
23112319 DPY2TRACECTX(dpy, context, VA_INVALID_ID);
23122320
2313- va_TraceMsg(trace_ctx, "VAIQMatrixBufferHEVC\n");
2321+ va_TracePrint(trace_ctx, "VAIQMatrixBufferHEVC\n");
23142322
23152323 va_TraceMsg(trace_ctx, "\tScalingList4x4[6][16]=\n");
2324+ va_TraceMsg(trace_ctx, "");
23162325 for (i = 0; i < 6; i++) {
23172326 for (j = 0; j < 16; j++) {
2318- va_TraceMsg(trace_ctx, "\t%d\t", p->ScalingList4x4[i][j]);
2327+ va_TracePrint(trace_ctx, "\t%d\t", p->ScalingList4x4[i][j]);
23192328 if ((j + 1) % 8 == 0)
2320- va_TraceMsg(trace_ctx, "\n");
2329+ TRACE_NEWLINE();
23212330 }
23222331 }
23232332
2324- va_TraceMsg(trace_ctx, "\tScalingList8x8[6][64]=\n");
2333+ va_TracePrint(trace_ctx, "\tScalingList8x8[6][64]=\n");
2334+ va_TraceMsg(trace_ctx, "");
23252335 for (i = 0; i < 6; i++) {
23262336 for (j = 0; j < 64; j++) {
2327- va_TraceMsg(trace_ctx, "\t%d", p->ScalingList8x8[i][j]);
2337+ va_TracePrint(trace_ctx, "\t%d", p->ScalingList8x8[i][j]);
23282338 if ((j + 1) % 8 == 0)
2329- va_TraceMsg(trace_ctx, "\n");
2339+ TRACE_NEWLINE();
23302340 }
23312341 }
23322342
2333- va_TraceMsg(trace_ctx, "\tScalingList16x16[6][64]=\n");
2343+ va_TracePrint(trace_ctx, "\tScalingList16x16[6][64]=\n");
2344+ va_TraceMsg(trace_ctx, "");
23342345 for (i = 0; i < 6; i++) {
23352346 for (j = 0; j < 64; j++) {
2336- va_TraceMsg(trace_ctx, "\t%d", p->ScalingList16x16[i][j]);
2347+ va_TracePrint(trace_ctx, "\t%d", p->ScalingList16x16[i][j]);
23372348 if ((j + 1) % 8 == 0)
2338- va_TraceMsg(trace_ctx, "\n");
2349+ TRACE_NEWLINE();
23392350 }
23402351 }
23412352
2342- va_TraceMsg(trace_ctx, "\tScalingList32x32[2][64]=\n");
2353+ va_TracePrint(trace_ctx, "\tScalingList32x32[2][64]=\n");
2354+ va_TraceMsg(trace_ctx, "");
23432355 for (i = 0; i < 2; i++) {
23442356 for (j = 0; j < 64; j++) {
2345- va_TraceMsg(trace_ctx, "\t%d", p->ScalingList32x32[i][j]);
2357+ va_TracePrint(trace_ctx, "\t%d", p->ScalingList32x32[i][j]);
23462358 if ((j + 1) % 8 == 0)
2347- va_TraceMsg(trace_ctx, "\n");
2359+ TRACE_NEWLINE();
23482360 }
23492361 }
23502362
2351- va_TraceMsg(trace_ctx, "\tScalingListDC16x16[6]=\n");
2363+ va_TracePrint(trace_ctx, "\tScalingListDC16x16[6]=\n");
2364+ va_TraceMsg(trace_ctx, "");
23522365 for (j = 0; j < 6; j++) {
2353- va_TraceMsg(trace_ctx, "\t%d", p->ScalingListDC16x16[j]);
2366+ va_TracePrint(trace_ctx, "\t%d", p->ScalingListDC16x16[j]);
23542367 }
2368+ va_TracePrint(trace_ctx, "\n");
23552369 va_TraceMsg(trace_ctx, "\tScalingListDC32x32[2]=\n");
2370+ va_TraceMsg(trace_ctx, "");
23562371 for (j = 0; j < 2; j++) {
2357- va_TraceMsg(trace_ctx, "\t%d", p->ScalingListDC32x32[j]);
2372+ va_TracePrint(trace_ctx, "\t%d", p->ScalingListDC32x32[j]);
23582373 }
2374+ va_TracePrint(trace_ctx, "\n");
23592375
23602376 va_TraceMsg(trace_ctx, NULL);
23612377 }
@@ -2376,7 +2392,7 @@ static void va_TraceVAEncSequenceParameterBufferHEVC(
23762392 if(!p)
23772393 return;
23782394
2379- va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferHEVC\n");
2395+ va_TracePrint(trace_ctx, "\t--VAEncSequenceParameterBufferHEVC\n");
23802396
23812397 va_TraceMsg(trace_ctx, "\tgeneral_profile_idc = %d\n", p->general_profile_idc);
23822398 va_TraceMsg(trace_ctx, "\tgeneral_level_idc = %d\n", p->general_level_idc);
@@ -2449,7 +2465,7 @@ static void va_TraceVAEncPictureParameterBufferHEVC(
24492465 if(!p)
24502466 return;
24512467
2452- va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferHEVC\n");
2468+ va_TracePrint(trace_ctx, "\t--VAEncPictureParameterBufferHEVC\n");
24532469
24542470 va_TraceMsg(trace_ctx, "\tdecoded_curr_pic.picture_id = %d\n", p->decoded_curr_pic.picture_id);
24552471 va_TraceMsg(trace_ctx, "\tdecoded_curr_pic.pic_order_cnt = %d\n", p->decoded_curr_pic.pic_order_cnt);
@@ -2529,7 +2545,7 @@ static void va_TraceVAEncSliceParameterBufferHEVC(
25292545 if(!p)
25302546 return;
25312547
2532- va_TraceMsg(trace_ctx, "\t--VAEncSliceParameterBufferHEVC\n");
2548+ va_TracePrint(trace_ctx, "\t--VAEncSliceParameterBufferHEVC\n");
25332549
25342550 va_TraceMsg(trace_ctx, "\tslice_segment_address = %d\n", p->slice_segment_address);
25352551 va_TraceMsg(trace_ctx, "\tnum_ctu_in_slice = %d\n", p->num_ctu_in_slice);