hardware/intel/libva
修订版 | 594f6e2c79748c88c9626453446e0f399666cb4a (tree) |
---|---|
时间 | 2016-05-23 08:35:27 |
作者 | Scott D Phillips <scott.d.phillips@inte...> |
Commiter | Sean V Kelley |
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>
@@ -228,6 +228,11 @@ struct va_trace { | ||
228 | 228 | |
229 | 229 | #define TRACE_FUNCNAME(idx) va_TraceMsg(trace_ctx, "==========%s\n", __func__); |
230 | 230 | |
231 | +#define TRACE_NEWLINE() do { \ | |
232 | + va_TracePrint(trace_ctx, "\n"); \ | |
233 | + va_TraceMsg(trace_ctx, "") ; \ | |
234 | +} while (0) | |
235 | + | |
231 | 236 | /* Prototype declarations (functions defined in va.c) */ |
232 | 237 | |
233 | 238 | void va_errorMessage(const char *msg, ...); |
@@ -1643,7 +1648,7 @@ static void va_TraceVABuffers( | ||
1643 | 1648 | |
1644 | 1649 | DPY2TRACECTX(dpy, context, VA_INVALID_ID); |
1645 | 1650 | |
1646 | - va_TraceMsg(trace_ctx, "--%s\n", buffer_type_to_string(type)); | |
1651 | + va_TracePrint(trace_ctx, "--%s\n", buffer_type_to_string(type)); | |
1647 | 1652 | |
1648 | 1653 | if(trace_ctx->plog_file) |
1649 | 1654 | fp = trace_ctx->plog_file->fp_log; |
@@ -2097,7 +2102,7 @@ static void va_TraceVAPictureParameterBufferHEVC( | ||
2097 | 2102 | |
2098 | 2103 | DPY2TRACECTX(dpy, context, VA_INVALID_ID); |
2099 | 2104 | |
2100 | - va_TraceMsg(trace_ctx, "VAPictureParameterBufferHEVC\n"); | |
2105 | + va_TracePrint(trace_ctx, "VAPictureParameterBufferHEVC\n"); | |
2101 | 2106 | |
2102 | 2107 | va_TraceMsg(trace_ctx, "\tCurrPic.picture_id = 0x%08x\n", p->CurrPic.picture_id); |
2103 | 2108 | va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.pic_order_cnt); |
@@ -2165,19 +2170,21 @@ static void va_TraceVAPictureParameterBufferHEVC( | ||
2165 | 2170 | va_TraceMsg(trace_ctx, "\tnum_tile_rows_minus1 = %d\n", p->num_tile_rows_minus1); |
2166 | 2171 | |
2167 | 2172 | va_TraceMsg(trace_ctx, "\tcolumn_width_minus1[19]=\n"); |
2173 | + va_TraceMsg(trace_ctx, ""); | |
2168 | 2174 | 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]); | |
2170 | 2176 | if ((i + 1) % 8 == 0) |
2171 | - va_TraceMsg(trace_ctx, "\n"); | |
2177 | + TRACE_NEWLINE(); | |
2172 | 2178 | } |
2173 | - va_TraceMsg(trace_ctx, "\n"); | |
2179 | + va_TracePrint(trace_ctx, "\n"); | |
2174 | 2180 | va_TraceMsg(trace_ctx, "\trow_height_minus1[21]=\n"); |
2181 | + va_TraceMsg(trace_ctx, ""); | |
2175 | 2182 | 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]); | |
2177 | 2184 | if ((i + 1) % 8 == 0) |
2178 | - va_TraceMsg(trace_ctx, "\n"); | |
2185 | + TRACE_NEWLINE(); | |
2179 | 2186 | } |
2180 | - va_TraceMsg(trace_ctx, "\n"); | |
2187 | + va_TracePrint(trace_ctx, "\n"); | |
2181 | 2188 | |
2182 | 2189 | va_TraceMsg(trace_ctx, "\tslice_parsing_fields = %d\n", p->slice_parsing_fields.value); |
2183 | 2190 | 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( | ||
2226 | 2233 | trace_ctx->trace_slice_no++; |
2227 | 2234 | trace_ctx->trace_slice_size = p->slice_data_size; |
2228 | 2235 | |
2229 | - va_TraceMsg(trace_ctx, "VASliceParameterBufferHEVC\n"); | |
2236 | + va_TracePrint(trace_ctx, "VASliceParameterBufferHEVC\n"); | |
2230 | 2237 | va_TraceMsg(trace_ctx, "\tslice_data_size = %d\n", p->slice_data_size); |
2231 | 2238 | va_TraceMsg(trace_ctx, "\tslice_data_offset = %d\n", p->slice_data_offset); |
2232 | 2239 | va_TraceMsg(trace_ctx, "\tslice_data_flag = %d\n", p->slice_data_flag); |
@@ -2234,16 +2241,17 @@ static void va_TraceVASliceParameterBufferHEVC( | ||
2234 | 2241 | va_TraceMsg(trace_ctx, "\tslice_segment_address = %d\n", p->slice_segment_address); |
2235 | 2242 | |
2236 | 2243 | va_TraceMsg(trace_ctx, "\tRefPicList[2][15]=\n"); |
2244 | + va_TraceMsg(trace_ctx, ""); | |
2237 | 2245 | for (i = 0; i < 2; i++) { |
2238 | 2246 | 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(); | |
2242 | 2250 | } |
2251 | + TRACE_NEWLINE(); | |
2243 | 2252 | } |
2244 | - va_TraceMsg(trace_ctx, "\n"); | |
2245 | 2253 | |
2246 | - va_TraceMsg(trace_ctx, "\tLongSliceFlags.value = %d\n", p->LongSliceFlags.value); | |
2254 | + va_TracePrint(trace_ctx, "\tLongSliceFlags.value = %d\n", p->LongSliceFlags.value); | |
2247 | 2255 | va_TraceMsg(trace_ctx, "\tLongSliceFlags.fields.LastSliceOfPic = %d\n", p->LongSliceFlags.fields.LastSliceOfPic); |
2248 | 2256 | va_TraceMsg(trace_ctx, "\tLongSliceFlags.fields.dependent_slice_segment_flag = %d\n", p->LongSliceFlags.fields.dependent_slice_segment_flag); |
2249 | 2257 | va_TraceMsg(trace_ctx, "\tLongSliceFlags.fields.slice_type = %d\n", p->LongSliceFlags.fields.slice_type); |
@@ -2270,24 +2278,24 @@ static void va_TraceVASliceParameterBufferHEVC( | ||
2270 | 2278 | |
2271 | 2279 | va_TraceMsg(trace_ctx, "\tnum_ref_idx_l0_active_minus1 = %d\n", p->num_ref_idx_l0_active_minus1); |
2272 | 2280 | 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"); | |
2280 | 2288 | } |
2281 | 2289 | |
2282 | 2290 | va_TraceMsg(trace_ctx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1); |
2283 | 2291 | 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"); | |
2291 | 2299 | } |
2292 | 2300 | |
2293 | 2301 | 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( | ||
2310 | 2318 | |
2311 | 2319 | DPY2TRACECTX(dpy, context, VA_INVALID_ID); |
2312 | 2320 | |
2313 | - va_TraceMsg(trace_ctx, "VAIQMatrixBufferHEVC\n"); | |
2321 | + va_TracePrint(trace_ctx, "VAIQMatrixBufferHEVC\n"); | |
2314 | 2322 | |
2315 | 2323 | va_TraceMsg(trace_ctx, "\tScalingList4x4[6][16]=\n"); |
2324 | + va_TraceMsg(trace_ctx, ""); | |
2316 | 2325 | for (i = 0; i < 6; i++) { |
2317 | 2326 | 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]); | |
2319 | 2328 | if ((j + 1) % 8 == 0) |
2320 | - va_TraceMsg(trace_ctx, "\n"); | |
2329 | + TRACE_NEWLINE(); | |
2321 | 2330 | } |
2322 | 2331 | } |
2323 | 2332 | |
2324 | - va_TraceMsg(trace_ctx, "\tScalingList8x8[6][64]=\n"); | |
2333 | + va_TracePrint(trace_ctx, "\tScalingList8x8[6][64]=\n"); | |
2334 | + va_TraceMsg(trace_ctx, ""); | |
2325 | 2335 | for (i = 0; i < 6; i++) { |
2326 | 2336 | 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]); | |
2328 | 2338 | if ((j + 1) % 8 == 0) |
2329 | - va_TraceMsg(trace_ctx, "\n"); | |
2339 | + TRACE_NEWLINE(); | |
2330 | 2340 | } |
2331 | 2341 | } |
2332 | 2342 | |
2333 | - va_TraceMsg(trace_ctx, "\tScalingList16x16[6][64]=\n"); | |
2343 | + va_TracePrint(trace_ctx, "\tScalingList16x16[6][64]=\n"); | |
2344 | + va_TraceMsg(trace_ctx, ""); | |
2334 | 2345 | for (i = 0; i < 6; i++) { |
2335 | 2346 | 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]); | |
2337 | 2348 | if ((j + 1) % 8 == 0) |
2338 | - va_TraceMsg(trace_ctx, "\n"); | |
2349 | + TRACE_NEWLINE(); | |
2339 | 2350 | } |
2340 | 2351 | } |
2341 | 2352 | |
2342 | - va_TraceMsg(trace_ctx, "\tScalingList32x32[2][64]=\n"); | |
2353 | + va_TracePrint(trace_ctx, "\tScalingList32x32[2][64]=\n"); | |
2354 | + va_TraceMsg(trace_ctx, ""); | |
2343 | 2355 | for (i = 0; i < 2; i++) { |
2344 | 2356 | 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]); | |
2346 | 2358 | if ((j + 1) % 8 == 0) |
2347 | - va_TraceMsg(trace_ctx, "\n"); | |
2359 | + TRACE_NEWLINE(); | |
2348 | 2360 | } |
2349 | 2361 | } |
2350 | 2362 | |
2351 | - va_TraceMsg(trace_ctx, "\tScalingListDC16x16[6]=\n"); | |
2363 | + va_TracePrint(trace_ctx, "\tScalingListDC16x16[6]=\n"); | |
2364 | + va_TraceMsg(trace_ctx, ""); | |
2352 | 2365 | 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]); | |
2354 | 2367 | } |
2368 | + va_TracePrint(trace_ctx, "\n"); | |
2355 | 2369 | va_TraceMsg(trace_ctx, "\tScalingListDC32x32[2]=\n"); |
2370 | + va_TraceMsg(trace_ctx, ""); | |
2356 | 2371 | 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]); | |
2358 | 2373 | } |
2374 | + va_TracePrint(trace_ctx, "\n"); | |
2359 | 2375 | |
2360 | 2376 | va_TraceMsg(trace_ctx, NULL); |
2361 | 2377 | } |
@@ -2376,7 +2392,7 @@ static void va_TraceVAEncSequenceParameterBufferHEVC( | ||
2376 | 2392 | if(!p) |
2377 | 2393 | return; |
2378 | 2394 | |
2379 | - va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferHEVC\n"); | |
2395 | + va_TracePrint(trace_ctx, "\t--VAEncSequenceParameterBufferHEVC\n"); | |
2380 | 2396 | |
2381 | 2397 | va_TraceMsg(trace_ctx, "\tgeneral_profile_idc = %d\n", p->general_profile_idc); |
2382 | 2398 | va_TraceMsg(trace_ctx, "\tgeneral_level_idc = %d\n", p->general_level_idc); |
@@ -2449,7 +2465,7 @@ static void va_TraceVAEncPictureParameterBufferHEVC( | ||
2449 | 2465 | if(!p) |
2450 | 2466 | return; |
2451 | 2467 | |
2452 | - va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferHEVC\n"); | |
2468 | + va_TracePrint(trace_ctx, "\t--VAEncPictureParameterBufferHEVC\n"); | |
2453 | 2469 | |
2454 | 2470 | va_TraceMsg(trace_ctx, "\tdecoded_curr_pic.picture_id = %d\n", p->decoded_curr_pic.picture_id); |
2455 | 2471 | 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( | ||
2529 | 2545 | if(!p) |
2530 | 2546 | return; |
2531 | 2547 | |
2532 | - va_TraceMsg(trace_ctx, "\t--VAEncSliceParameterBufferHEVC\n"); | |
2548 | + va_TracePrint(trace_ctx, "\t--VAEncSliceParameterBufferHEVC\n"); | |
2533 | 2549 | |
2534 | 2550 | va_TraceMsg(trace_ctx, "\tslice_segment_address = %d\n", p->slice_segment_address); |
2535 | 2551 | va_TraceMsg(trace_ctx, "\tnum_ctu_in_slice = %d\n", p->num_ctu_in_slice); |