[Libva] [PATCH] va_trace: add traces for vp9encoder
Xiang, Haihao
haihao.xiang at intel.com
Mon Aug 8 08:01:29 UTC 2016
Applied.
Thanks
Haihao
> add trace information for VAEncPictureParameterBufferVP9
> and VAEncSequenceParameterBufferVP9
>
> also add the case for VAEncMiscParameterBufferType on
> va_TraceVP9Buf
>
> Signed-off-by: Daniel Charles <daniel.charles at intel.com>
> ---
> va/va_trace.c | 126
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 126 insertions(+)
>
> diff --git a/va/va_trace.c b/va/va_trace.c
> index 13fc6d2..ff7aa5d 100644
> --- a/va/va_trace.c
> +++ b/va/va_trace.c
> @@ -3542,6 +3542,34 @@ static void
> va_TraceVAEncSequenceParameterBufferVP8(
> return;
> }
>
> +static void va_TraceVAEncSequenceParameterBufferVP9(
> + VADisplay dpy,
> + VAContextID context,
> + VABufferID buffer,
> + VABufferType type,
> + unsigned int size,
> + unsigned int num_elements,
> + void *data)
> +{
> + VAEncSequenceParameterBufferVP9 *p =
> (VAEncSequenceParameterBufferVP9 *)data;
> + DPY2TRACECTX(dpy, context, VA_INVALID_ID);
> + int i;
> +
> + va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferVP9\n");
> +
> + va_TraceMsg(trace_ctx, "\tmax_frame_height = %d\n", p-
> >max_frame_height);
> + va_TraceMsg(trace_ctx, "\tmax_frame_width = %d\n", p-
> >max_frame_width);
> + va_TraceMsg(trace_ctx, "\tkf_auto = %d\n", p->kf_auto);
> + va_TraceMsg(trace_ctx, "\tkf_min_dist = %d\n", p->kf_min_dist);
> + va_TraceMsg(trace_ctx, "\tkf_max_dist = %d\n", p->kf_max_dist);
> + va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p-
> >bits_per_second);
> + va_TraceMsg(trace_ctx, "\tintra_period = %d\n", p-
> >intra_period);
> +
> + va_TraceMsg(trace_ctx, NULL);
> +
> + return;
> +}
> +
> static void va_TraceVAPictureParameterBufferVP9(
> VADisplay dpy,
> VAContextID context,
> @@ -3676,6 +3704,95 @@ static void
> va_TraceVAEncPictureParameterBufferVP8(
> return;
> }
>
> +static void va_TraceVAEncPictureParameterBufferVP9(
> + VADisplay dpy,
> + VAContextID context,
> + VABufferID buffer,
> + VABufferType type,
> + unsigned int size,
> + unsigned int num_elements,
> + void *data)
> +{
> + VAEncPictureParameterBufferVP9 *p =
> (VAEncPictureParameterBufferVP9 *)data;
> + DPY2TRACECTX(dpy, context, VA_INVALID_ID);
> + int i;
> +
> + va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferVP9\n");
> + va_TraceMsg(trace_ctx, "\tframe_width_src = %d\n", p-
> >frame_width_src);
> + va_TraceMsg(trace_ctx, "\tframe_height_src = %d\n", p-
> >frame_height_src);
> + va_TraceMsg(trace_ctx, "\tframe_width_dst = %d\n", p-
> >frame_width_dst);
> + va_TraceMsg(trace_ctx, "\tframe_height_dst = %d\n", p-
> >frame_height_dst);
> + va_TraceMsg(trace_ctx, "\treconstructed_frame = 0x%08x\n", p-
> >reconstructed_frame);
> +
> + for(i=0;i<8;i++)
> + va_TraceMsg(trace_ctx, "\treference_frames[%d] = 0x%08x\n",
> i, p->reference_frames[i]);
> +
> + va_TraceMsg(trace_ctx, "\tcoded_buf = 0x%x\n", p->coded_buf);
> +
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.force_kf = %d\n", p-
> >ref_flags.bits.force_kf);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.ref_frame_ctrl_l0 =
> %d\n", p->ref_flags.bits.ref_frame_ctrl_l0);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.ref_frame_ctrl_l1 =
> %d\n", p->ref_flags.bits.ref_frame_ctrl_l1);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.ref_last_idx = %d\n",
> p->ref_flags.bits.ref_last_idx);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.ref_last_sign_bias =
> %d\n", p->ref_flags.bits.ref_last_sign_bias);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.ref_gf_idx = %d\n", p-
> >ref_flags.bits.ref_gf_idx);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.ref_gf_sign_bias =
> %d\n", p->ref_flags.bits.ref_gf_sign_bias);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.ref_arf_idx = %d\n", p-
> >ref_flags.bits.ref_arf_idx);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.ref_arf_sign_bias =
> %d\n", p->ref_flags.bits.ref_arf_sign_bias);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.temporal_id = %d\n", p-
> >ref_flags.bits.temporal_id);
> + va_TraceMsg(trace_ctx, "\tref_flags.bits.reserved = %d\n", p-
> >ref_flags.bits.reserved);
> +
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.frame_type = %d\n", p-
> >pic_flags.bits.frame_type);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.show_frame = %d\n", p-
> >pic_flags.bits.show_frame);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.error_resilient_mode =
> %d\n", p->pic_flags.bits.error_resilient_mode);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.intra_only = %d\n", p-
> >pic_flags.bits.intra_only);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.allow_high_precision_mv
> = %d\n", p->pic_flags.bits.allow_high_precision_mv);
> +
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.mcomp_filter_type =
> %d\n", p->pic_flags.bits.mcomp_filter_type);
> + va_TraceMsg(trace_ctx,
> "\tpic_flags.bits.frame_parallel_decoding_mode = %d\n", p-
> >pic_flags.bits.frame_parallel_decoding_mode);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.reset_frame_context =
> %d\n", p->pic_flags.bits.reset_frame_context);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.refresh_frame_context =
> %d\n", p->pic_flags.bits.refresh_frame_context);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.frame_context_idx =
> %d\n", p->pic_flags.bits.frame_context_idx);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.segmentation_enabled =
> %d\n", p->pic_flags.bits.segmentation_enabled);
> + va_TraceMsg(trace_ctx,
> "\tpic_flags.bits.segmentation_temporal_update = %d\n", p-
> >pic_flags.bits.segmentation_temporal_update);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.segmentation_update_map
> = %d\n", p->pic_flags.bits.segmentation_update_map);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.lossless_mode = %d\n",
> p->pic_flags.bits.lossless_mode);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.comp_prediction_mode =
> %d\n", p->pic_flags.bits.comp_prediction_mode);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.auto_segmentation =
> %d\n", p->pic_flags.bits.auto_segmentation);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.super_frame_flag =
> %d\n", p->pic_flags.bits.super_frame_flag);
> + va_TraceMsg(trace_ctx, "\tpic_flags.bits.reserved = %d\n", p-
> >pic_flags.bits.reserved);
> +
> + va_TraceMsg(trace_ctx, "\trefresh_frame_flags = %d\n", p-
> >refresh_frame_flags);
> + va_TraceMsg(trace_ctx, "\tluma_ac_qindex = %d\n", p-
> >luma_ac_qindex);
> + va_TraceMsg(trace_ctx, "\tluma_dc_qindex_delta = %d\n", p-
> >luma_dc_qindex_delta);
> + va_TraceMsg(trace_ctx, "\tchroma_ac_qindex_delta = %d\n", p-
> >chroma_ac_qindex_delta);
> + va_TraceMsg(trace_ctx, "\tchroma_dc_qindex_delta = %d\n", p-
> >chroma_dc_qindex_delta);
> + va_TraceMsg(trace_ctx, "\tfilter_level = %d\n", p-
> >filter_level);
> + va_TraceMsg(trace_ctx, "\tsharpness_level = %d\n", p-
> >sharpness_level);
> +
> + for(i=0;i<4;i++)
> + va_TraceMsg(trace_ctx, "\tref_lf_delta[%d] = %d\n", i, p-
> >ref_lf_delta[i]);
> + for(i=0;i<2;i++)
> + va_TraceMsg(trace_ctx, "\tmode_lf_delta[%d] = %d\n", i, p-
> >mode_lf_delta[i]);
> +
> +
> + va_TraceMsg(trace_ctx, "\tbit_offset_ref_lf_delta = %d\n", p-
> >bit_offset_ref_lf_delta);
> + va_TraceMsg(trace_ctx, "\tbit_offset_mode_lf_delta = %d\n", p-
> >bit_offset_mode_lf_delta);
> + va_TraceMsg(trace_ctx, "\tbit_offset_lf_level = %d\n", p-
> >bit_offset_lf_level);
> + va_TraceMsg(trace_ctx, "\tbit_offset_qindex = %d\n", p-
> >bit_offset_qindex);
> + va_TraceMsg(trace_ctx, "\tbit_offset_first_partition_size =
> %d\n", p->bit_offset_first_partition_size);
> + va_TraceMsg(trace_ctx, "\tbit_offset_segmentation = %d\n", p-
> >bit_offset_segmentation);
> + va_TraceMsg(trace_ctx, "\tbit_size_segmentation = %d\n", p-
> >bit_size_segmentation);
> + va_TraceMsg(trace_ctx, "\tlog2_tile_rows = %d\n", p-
> >log2_tile_rows);
> + va_TraceMsg(trace_ctx, "\tlog2_tile_columns = %d\n", p-
> >log2_tile_columns);
> + va_TraceMsg(trace_ctx, "\tskip_frame_flag = %d\n", p-
> >skip_frame_flag);
> + va_TraceMsg(trace_ctx, "\tnumber_skip_frames = %d\n", p-
> >number_skip_frames);
> + va_TraceMsg(trace_ctx, "\tskip_frames_size = %d\n", p-
> >skip_frames_size);
> +
> + va_TraceMsg(trace_ctx, NULL);
> +
> + return;
> +}
> +
> static void va_TraceVASliceParameterBufferVP9(
> VADisplay dpy,
> VAContextID context,
> @@ -4321,9 +4438,18 @@ static void va_TraceVP9Buf(
> case VAPictureParameterBufferType:
> va_TraceVAPictureParameterBufferVP9(dpy, context, buffer,
> type, size, num_elements, pbuf);
> break;
> + case VAEncSequenceParameterBufferType:
> + va_TraceVAEncSequenceParameterBufferVP9(dpy, context,
> buffer, type, size, num_elements, pbuf);
> + break;
> + case VAEncPictureParameterBufferType:
> + va_TraceVAEncPictureParameterBufferVP9(dpy, context, buffer,
> type, size, num_elements, pbuf);
> + break;
> case VASliceParameterBufferType:
> va_TraceVASliceParameterBufferVP9(dpy, context, buffer,
> type, size, num_elements, pbuf);
> break;
> + case VAEncMiscParameterBufferType:
> + va_TraceVAEncMiscParameterBuffer(dpy, context, buffer, type,
> size, num_elements, pbuf);
> + break;
> default:
> va_TraceVABuffers(dpy, context, buffer, type, size,
> num_elements, pbuf);
> break;
More information about the Libva
mailing list