Skip to content

Commit

Permalink
va/va_trace: add trace support for ROI(region of interest).
Browse files Browse the repository at this point in the history
Signed-off-by: Decai Lin <[email protected]>
  • Loading branch information
dlin2 authored and XinfengZhang committed Mar 5, 2019
1 parent aa2feb4 commit b369467
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions va/va_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3269,6 +3269,24 @@ static void va_TraceVAEncMiscParameterBuffer(
va_TraceMsg(trace_ctx, "\tquality_level = %d\n", p->quality_level);
break;
}
case VAEncMiscParameterTypeROI:
{
VAEncMiscParameterBufferROI *p = (VAEncMiscParameterBufferROI *)tmp->data;

va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterBufferROI\n");
va_TraceMsg(trace_ctx, "\tnum_roi = %d\n", p->num_roi);
va_TraceMsg(trace_ctx, "\tmax_delta_qp = %d\n", p->max_delta_qp);
va_TraceMsg(trace_ctx, "\tmin_delta_qp = %d\n", p->min_delta_qp);
va_TraceMsg(trace_ctx, "\troi_flags.bits.roi_value_is_qp_delta = %d\n", p->roi_flags.bits.roi_value_is_qp_delta);
for (int i = 0; i < p->num_roi; i++) {
va_TraceMsg(trace_ctx, "\troi[%d].roi_rectangle.x = %d\n", i, p->roi[i].roi_rectangle.x);
va_TraceMsg(trace_ctx, "\troi[%d].roi_rectangle.y = %d\n", i, p->roi[i].roi_rectangle.y);
va_TraceMsg(trace_ctx, "\troi[%d].roi_rectangle.width = %d\n", i, p->roi[i].roi_rectangle.width);
va_TraceMsg(trace_ctx, "\troi[%d].roi_rectangle.height = %d\n", i, p->roi[i].roi_rectangle.height);
va_TraceMsg(trace_ctx, "\troi[%d].roi_value = %d\n", i, p->roi[i].roi_value);
}
break;
}
default:
va_TraceMsg(trace_ctx, "Unknown VAEncMiscParameterBuffer(type = %d):\n", tmp->type);
va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, data);
Expand Down

0 comments on commit b369467

Please sign in to comment.