3 * Copyright (c) 2009-2011 Intel Corporation. All Rights Reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sub license, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial portions
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
21 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 #include "va_enc_h264.h"
30 #include "va_backend.h"
32 #include "va_enc_h264.h"
33 #include "va_enc_jpeg.h"
34 #include "va_dec_jpeg.h"
35 #include "va_dec_vp8.h"
44 #include <sys/types.h>
51 * Env. to debug some issue, e.g. the decode/encode issue in a video conference scenerio:
52 * .LIBVA_TRACE=log_file: general VA parameters saved into log_file
53 * .LIBVA_TRACE_BUFDATA: dump all VA data buffer into log_file
54 * .LIBVA_TRACE_CODEDBUF=coded_clip_file: save the coded clip into file coded_clip_file
55 * .LIBVA_TRACE_SURFACE=yuv_file: save surface YUV into file yuv_file. Use file name to determine
56 * decode/encode or jpeg surfaces
57 * .LIBVA_TRACE_SURFACE_GEOMETRY=WIDTHxHEIGHT+XOFF+YOFF: only save part of surface context into file
58 * due to storage bandwidth limitation
66 /* per context settings */
67 struct trace_context {
69 FILE *trace_fp_log; /* save the log into a file */
70 char *trace_log_fn; /* file name */
72 /* LIBVA_TRACE_CODEDBUF */
73 FILE *trace_fp_codedbuf; /* save the encode result into a file */
74 char *trace_codedbuf_fn; /* file name */
76 /* LIBVA_TRACE_SURFACE */
77 FILE *trace_fp_surface; /* save the surface YUV into a file */
78 char *trace_surface_fn; /* file name */
80 VAContextID trace_context; /* current context */
82 VASurfaceID trace_rendertarget; /* current render target */
83 VAProfile trace_profile; /* current profile for buffers */
84 VAEntrypoint trace_entrypoint; /* current entrypoint */
86 unsigned int trace_frame_no; /* current frame NO */
87 unsigned int trace_slice_no; /* current slice NO */
88 unsigned int trace_slice_size; /* current slice buffer size */
90 unsigned int trace_surface_width; /* surface dumping geometry */
91 unsigned int trace_surface_height;
92 unsigned int trace_surface_xoff;
93 unsigned int trace_surface_yoff;
95 unsigned int trace_frame_width; /* current frame width */
96 unsigned int trace_frame_height; /* current frame height */
99 #define TRACE_CTX(dpy) ((struct trace_context *)((VADisplayContextP)dpy)->vatrace)
101 #define DPY2TRACECTX(dpy) \
102 struct trace_context *trace_ctx = TRACE_CTX(dpy); \
104 if (trace_ctx == NULL) \
107 #define TRACE_FUNCNAME(idx) va_TraceMsg(trace_ctx, "==========%s\n", __func__);
109 /* Prototype declarations (functions defined in va.c) */
111 void va_errorMessage(const char *msg, ...);
112 void va_infoMessage(const char *msg, ...);
114 int va_parseConfig(char *env, char *env_value);
116 VAStatus vaBufferInfo(
118 VAContextID context, /* in */
119 VABufferID buf_id, /* in */
120 VABufferType *type, /* out */
121 unsigned int *size, /* out */
122 unsigned int *num_elements /* out */
125 VAStatus vaLockSurface(VADisplay dpy,
127 unsigned int *fourcc, /* following are output argument */
128 unsigned int *luma_stride,
129 unsigned int *chroma_u_stride,
130 unsigned int *chroma_v_stride,
131 unsigned int *luma_offset,
132 unsigned int *chroma_u_offset,
133 unsigned int *chroma_v_offset,
134 unsigned int *buffer_name,
138 VAStatus vaUnlockSurface(VADisplay dpy,
142 #define FILE_NAME_SUFFIX(env_value) \
144 int tmp = strnlen(env_value, sizeof(env_value)); \
145 int left = sizeof(env_value) - tmp; \
147 snprintf(env_value+tmp, \
151 (unsigned long)trace_ctx); \
154 void va_TraceInit(VADisplay dpy)
156 char env_value[1024];
157 unsigned short suffix = 0xffff & ((unsigned int)time(NULL));
160 struct trace_context *trace_ctx = calloc(sizeof(struct trace_context), 1);
162 if (trace_ctx == NULL)
165 if (va_parseConfig("LIBVA_TRACE", &env_value[0]) == 0) {
166 FILE_NAME_SUFFIX(env_value);
167 trace_ctx->trace_log_fn = strdup(env_value);
169 tmp = fopen(env_value, "w");
171 trace_ctx->trace_fp_log = tmp;
172 va_infoMessage("LIBVA_TRACE is on, save log into %s\n", trace_ctx->trace_log_fn);
173 trace_flag = VA_TRACE_FLAG_LOG;
175 va_errorMessage("Open file %s failed (%s)\n", env_value, strerror(errno));
178 /* may re-get the global settings for multiple context */
179 if ((trace_flag & VA_TRACE_FLAG_LOG) && (va_parseConfig("LIBVA_TRACE_BUFDATA", NULL) == 0)) {
180 trace_flag |= VA_TRACE_FLAG_BUFDATA;
181 va_infoMessage("LIBVA_TRACE_BUFDATA is on, dump buffer into log file\n");
184 /* per-context setting */
185 if (va_parseConfig("LIBVA_TRACE_CODEDBUF", &env_value[0]) == 0) {
186 FILE_NAME_SUFFIX(env_value);
187 trace_ctx->trace_codedbuf_fn = strdup(env_value);
188 va_infoMessage("LIBVA_TRACE_CODEDBUF is on, save codedbuf into log file %s\n",
189 trace_ctx->trace_codedbuf_fn);
190 trace_flag |= VA_TRACE_FLAG_CODEDBUF;
193 if (va_parseConfig("LIBVA_TRACE_SURFACE", &env_value[0]) == 0) {
194 FILE_NAME_SUFFIX(env_value);
195 trace_ctx->trace_surface_fn = strdup(env_value);
197 va_infoMessage("LIBVA_TRACE_SURFACE is on, save surface into %s\n",
198 trace_ctx->trace_surface_fn);
200 /* for surface data dump, it is time-consume, and may
201 * cause some side-effect, so only trace the needed surfaces
202 * to trace encode surface, set the trace file name to sth like *enc*
203 * to trace decode surface, set the trace file name to sth like *dec*
204 * if no dec/enc in file name, set both
206 if (strstr(env_value, "dec"))
207 trace_flag |= VA_TRACE_FLAG_SURFACE_DECODE;
208 if (strstr(env_value, "enc"))
209 trace_flag |= VA_TRACE_FLAG_SURFACE_ENCODE;
210 if (strstr(env_value, "jpeg") || strstr(env_value, "jpg"))
211 trace_flag |= VA_TRACE_FLAG_SURFACE_JPEG;
213 if (va_parseConfig("LIBVA_TRACE_SURFACE_GEOMETRY", &env_value[0]) == 0) {
214 char *p = env_value, *q;
216 trace_ctx->trace_surface_width = strtod(p, &q);
217 p = q+1; /* skip "x" */
218 trace_ctx->trace_surface_height = strtod(p, &q);
219 p = q+1; /* skip "+" */
220 trace_ctx->trace_surface_xoff = strtod(p, &q);
221 p = q+1; /* skip "+" */
222 trace_ctx->trace_surface_yoff = strtod(p, &q);
224 va_infoMessage("LIBVA_TRACE_SURFACE_GEOMETRY is on, only dump surface %dx%d+%d+%d content\n",
225 trace_ctx->trace_surface_width,
226 trace_ctx->trace_surface_height,
227 trace_ctx->trace_surface_xoff,
228 trace_ctx->trace_surface_yoff);
232 ((VADisplayContextP)dpy)->vatrace = trace_ctx;
236 void va_TraceEnd(VADisplay dpy)
240 if (trace_ctx->trace_fp_log)
241 fclose(trace_ctx->trace_fp_log);
243 if (trace_ctx->trace_fp_codedbuf)
244 fclose(trace_ctx->trace_fp_codedbuf);
246 if (trace_ctx->trace_fp_surface)
247 fclose(trace_ctx->trace_fp_surface);
249 if (trace_ctx->trace_log_fn)
250 free(trace_ctx->trace_log_fn);
252 if (trace_ctx->trace_codedbuf_fn)
253 free(trace_ctx->trace_codedbuf_fn);
255 if (trace_ctx->trace_surface_fn)
256 free(trace_ctx->trace_surface_fn);
259 ((VADisplayContextP)dpy)->vatrace = NULL;
262 static void va_TraceMsg(struct trace_context *trace_ctx, const char *msg, ...)
266 if (!(trace_flag & VA_TRACE_FLAG_LOG))
272 if (gettimeofday(&tv, NULL) == 0)
273 fprintf(trace_ctx->trace_fp_log, "[%04d.%06d] ",
274 (unsigned int)tv.tv_sec & 0xffff, (unsigned int)tv.tv_usec);
276 vfprintf(trace_ctx->trace_fp_log, msg, args);
279 fflush(trace_ctx->trace_fp_log);
283 static void va_TraceSurface(VADisplay dpy)
286 unsigned int fourcc; /* following are output argument */
287 unsigned int luma_stride;
288 unsigned int chroma_u_stride;
289 unsigned int chroma_v_stride;
290 unsigned int luma_offset;
291 unsigned int chroma_u_offset;
292 unsigned int chroma_v_offset;
293 unsigned int buffer_name;
295 unsigned char *Y_data, *UV_data, *tmp;
297 unsigned char check_sum = 0;
300 if (!trace_ctx->trace_fp_surface)
303 va_TraceMsg(trace_ctx, "==========dump surface data in file %s\n", trace_ctx->trace_surface_fn);
305 va_TraceMsg(trace_ctx, NULL);
307 va_status = vaLockSurface(
309 trace_ctx->trace_rendertarget,
311 &luma_stride, &chroma_u_stride, &chroma_v_stride,
312 &luma_offset, &chroma_u_offset, &chroma_v_offset,
313 &buffer_name, &buffer);
315 if (va_status != VA_STATUS_SUCCESS) {
316 va_TraceMsg(trace_ctx, "Error:vaLockSurface failed\n");
320 va_TraceMsg(trace_ctx, "\tfourcc = 0x%08x\n", fourcc);
321 va_TraceMsg(trace_ctx, "\twidth = %d\n", trace_ctx->trace_frame_width);
322 va_TraceMsg(trace_ctx, "\theight = %d\n", trace_ctx->trace_frame_height);
323 va_TraceMsg(trace_ctx, "\tluma_stride = %d\n", luma_stride);
324 va_TraceMsg(trace_ctx, "\tchroma_u_stride = %d\n", chroma_u_stride);
325 va_TraceMsg(trace_ctx, "\tchroma_v_stride = %d\n", chroma_v_stride);
326 va_TraceMsg(trace_ctx, "\tluma_offset = %d\n", luma_offset);
327 va_TraceMsg(trace_ctx, "\tchroma_u_offset = %d\n", chroma_u_offset);
328 va_TraceMsg(trace_ctx, "\tchroma_v_offset = %d\n", chroma_v_offset);
330 if (buffer == NULL) {
331 va_TraceMsg(trace_ctx, "Error:vaLockSurface return NULL buffer\n");
332 va_TraceMsg(trace_ctx, NULL);
334 vaUnlockSurface(dpy, trace_ctx->trace_rendertarget);
337 va_TraceMsg(trace_ctx, "\tbuffer location = 0x%08x\n", buffer);
338 va_TraceMsg(trace_ctx, NULL);
340 Y_data = (unsigned char*)buffer;
341 UV_data = (unsigned char*)buffer + chroma_u_offset;
343 tmp = Y_data + luma_stride * trace_ctx->trace_surface_yoff;
344 for (i=0; i<trace_ctx->trace_surface_height; i++) {
345 fwrite(tmp + trace_ctx->trace_surface_xoff,
346 trace_ctx->trace_surface_width,
347 1, trace_ctx->trace_fp_surface);
351 tmp = UV_data + chroma_u_stride * trace_ctx->trace_surface_yoff / 2;
352 if (fourcc == VA_FOURCC_NV12) {
353 for (i=0; i<trace_ctx->trace_surface_height/2; i++) {
354 fwrite(tmp + trace_ctx->trace_surface_xoff,
355 trace_ctx->trace_surface_width,
356 1, trace_ctx->trace_fp_surface);
358 tmp += chroma_u_stride;
362 vaUnlockSurface(dpy, trace_ctx->trace_rendertarget);
364 va_TraceMsg(trace_ctx, NULL);
368 void va_TraceInitialize (
370 int *major_version, /* out */
371 int *minor_version /* out */
378 void va_TraceTerminate (
387 void va_TraceCreateConfig(
390 VAEntrypoint entrypoint,
391 VAConfigAttrib *attrib_list,
393 VAConfigID *config_id /* out */
397 int encode, decode, jpeg;
402 va_TraceMsg(trace_ctx, "\tprofile = %d\n", profile);
403 va_TraceMsg(trace_ctx, "\tentrypoint = %d\n", entrypoint);
404 va_TraceMsg(trace_ctx, "\tnum_attribs = %d\n", num_attribs);
406 for (i = 0; i < num_attribs; i++) {
407 va_TraceMsg(trace_ctx, "\t\tattrib_list[%d].type = 0x%08x\n", i, attrib_list[i].type);
408 va_TraceMsg(trace_ctx, "\t\tattrib_list[%d].value = 0x%08x\n", i, attrib_list[i].value);
411 va_TraceMsg(trace_ctx, NULL);
413 trace_ctx->trace_profile = profile;
414 trace_ctx->trace_entrypoint = entrypoint;
416 /* avoid to create so many empty files */
417 encode = (trace_ctx->trace_entrypoint == VAEntrypointEncSlice);
418 decode = (trace_ctx->trace_entrypoint == VAEntrypointVLD);
419 jpeg = (trace_ctx->trace_entrypoint == VAEntrypointEncPicture);
420 if ((encode && (trace_flag & VA_TRACE_FLAG_SURFACE_ENCODE)) ||
421 (decode && (trace_flag & VA_TRACE_FLAG_SURFACE_DECODE)) ||
422 (jpeg && (trace_flag & VA_TRACE_FLAG_SURFACE_JPEG))) {
423 FILE *tmp = fopen(trace_ctx->trace_surface_fn, "w");
426 trace_ctx->trace_fp_surface = tmp;
428 va_errorMessage("Open file %s failed (%s)\n",
429 trace_ctx->trace_surface_fn,
431 trace_ctx->trace_fp_surface = NULL;
432 trace_flag &= ~(VA_TRACE_FLAG_SURFACE);
436 if (encode && (trace_flag & VA_TRACE_FLAG_CODEDBUF)) {
437 FILE *tmp = fopen(trace_ctx->trace_codedbuf_fn, "w");
440 trace_ctx->trace_fp_codedbuf = tmp;
442 va_errorMessage("Open file %s failed (%s)\n",
443 trace_ctx->trace_codedbuf_fn,
445 trace_ctx->trace_fp_codedbuf = NULL;
446 trace_flag &= ~VA_TRACE_FLAG_CODEDBUF;
451 static void va_TraceSurfaceAttributes(
452 struct trace_context *trace_ctx,
453 VASurfaceAttrib *attrib_list,
454 unsigned int *num_attribs
460 if (!attrib_list || !num_attribs)
465 if (num > VASurfaceAttribCount)
466 num = VASurfaceAttribCount;
468 for (i=0; i<num; i++) {
469 int type = p->value.type;
471 va_TraceMsg(trace_ctx, "\tattrib_list[%i] =\n", i);
473 va_TraceMsg(trace_ctx, "\t\ttype = %d\n", p->type);
474 va_TraceMsg(trace_ctx, "\t\tflags = %d\n", p->flags);
475 va_TraceMsg(trace_ctx, "\t\tvalue.type = %d\n", type);
477 case VAGenericValueTypeInteger:
478 va_TraceMsg(trace_ctx, "\t\tvalue.value.i = 0x%08x\n", p->value.value.i);
480 case VAGenericValueTypeFloat:
481 va_TraceMsg(trace_ctx, "\t\tvalue.value.f = %f\n", p->value.value.f);
483 case VAGenericValueTypePointer:
484 va_TraceMsg(trace_ctx, "\t\tvalue.value.p = %p\n", p->value.value.p);
485 if ((p->type == VASurfaceAttribExternalBufferDescriptor) && p->value.value.p) {
486 VASurfaceAttribExternalBuffers *tmp = (VASurfaceAttribExternalBuffers *) p->value.value.p;
489 va_TraceMsg(trace_ctx, "\t\t--VASurfaceAttribExternalBufferDescriptor\n");
490 va_TraceMsg(trace_ctx, "\t\t pixel_format=0x%08x\n", tmp->pixel_format);
491 va_TraceMsg(trace_ctx, "\t\t width=%d\n", tmp->width);
492 va_TraceMsg(trace_ctx, "\t\t height=%d\n", tmp->height);
493 va_TraceMsg(trace_ctx, "\t\t data_size=%d\n", tmp->data_size);
494 va_TraceMsg(trace_ctx, "\t\t num_planes=%d\n", tmp->num_planes);
495 va_TraceMsg(trace_ctx, "\t\t pitches[4]=%d %d %d %d\n",
496 tmp->pitches[0], tmp->pitches[1], tmp->pitches[2], tmp->pitches[3]);
497 va_TraceMsg(trace_ctx, "\t\t offsets[4]=%d %d %d %d\n",
498 tmp->offsets[0], tmp->offsets[1], tmp->offsets[2], tmp->offsets[3]);
499 va_TraceMsg(trace_ctx, "\t\t flags=0x%08x\n", tmp->flags);
500 va_TraceMsg(trace_ctx, "\t\t num_buffers=0x%08x\n", tmp->num_buffers);
501 va_TraceMsg(trace_ctx, "\t\t buffers=%p\n", tmp->buffers);
502 for (j = 0; j < tmp->num_buffers; j++) {
503 va_TraceMsg(trace_ctx, "\t\t\tbuffers[%d]=%p\n", j, tmp->buffers[j]);
507 case VAGenericValueTypeFunc:
508 va_TraceMsg(trace_ctx, "\t\tvalue.value.fn = %p\n", p->value.value.fn);
518 void va_TraceCreateSurfaces(
524 VASurfaceID *surfaces, /* out */
525 VASurfaceAttrib *attrib_list,
526 unsigned int num_attribs
534 va_TraceMsg(trace_ctx, "\twidth = %d\n", width);
535 va_TraceMsg(trace_ctx, "\theight = %d\n", height);
536 va_TraceMsg(trace_ctx, "\tformat = %d\n", format);
537 va_TraceMsg(trace_ctx, "\tnum_surfaces = %d\n", num_surfaces);
540 for (i = 0; i < num_surfaces; i++)
541 va_TraceMsg(trace_ctx, "\t\tsurfaces[%d] = 0x%08x\n", i, surfaces[i]);
544 va_TraceSurfaceAttributes(trace_ctx, attrib_list, &num_attribs);
546 va_TraceMsg(trace_ctx, NULL);
550 void va_TraceDestroySurfaces(
552 VASurfaceID *surface_list,
562 for (i = 0; i < num_surfaces; i++)
563 va_TraceMsg(trace_ctx, "\t\tsurfaces[%d] = 0x%08x\n", i, surface_list[i]);
566 va_TraceMsg(trace_ctx, NULL);
570 void va_TraceCreateContext(
572 VAConfigID config_id,
576 VASurfaceID *render_targets,
577 int num_render_targets,
578 VAContextID *context /* out */
586 va_TraceMsg(trace_ctx, "\tconfig = 0x%08x\n", config_id);
587 va_TraceMsg(trace_ctx, "\twidth = %d\n", picture_width);
588 va_TraceMsg(trace_ctx, "\theight = %d\n", picture_height);
589 va_TraceMsg(trace_ctx, "\tflag = 0x%08x\n", flag);
590 va_TraceMsg(trace_ctx, "\tnum_render_targets = %d\n", num_render_targets);
591 if (render_targets) {
592 for (i=0; i<num_render_targets; i++)
593 va_TraceMsg(trace_ctx, "\t\trender_targets[%d] = 0x%08x\n", i, render_targets[i]);
596 va_TraceMsg(trace_ctx, "\tcontext = 0x%08x\n", *context);
597 trace_ctx->trace_context = *context;
599 trace_ctx->trace_context = VA_INVALID_ID;
601 trace_ctx->trace_frame_no = 0;
602 trace_ctx->trace_slice_no = 0;
604 trace_ctx->trace_frame_width = picture_width;
605 trace_ctx->trace_frame_height = picture_height;
607 if (trace_ctx->trace_surface_width == 0)
608 trace_ctx->trace_surface_width = picture_width;
609 if (trace_ctx->trace_surface_height == 0)
610 trace_ctx->trace_surface_height = picture_height;
614 static char * buffer_type_to_string(int type)
617 case VAPictureParameterBufferType: return "VAPictureParameterBufferType";
618 case VAIQMatrixBufferType: return "VAIQMatrixBufferType";
619 case VABitPlaneBufferType: return "VABitPlaneBufferType";
620 case VASliceGroupMapBufferType: return "VASliceGroupMapBufferType";
621 case VASliceParameterBufferType: return "VASliceParameterBufferType";
622 case VASliceDataBufferType: return "VASliceDataBufferType";
623 case VAProtectedSliceDataBufferType: return "VAProtectedSliceDataBufferType";
624 case VAMacroblockParameterBufferType: return "VAMacroblockParameterBufferType";
625 case VAResidualDataBufferType: return "VAResidualDataBufferType";
626 case VADeblockingParameterBufferType: return "VADeblockingParameterBufferType";
627 case VAImageBufferType: return "VAImageBufferType";
628 case VAQMatrixBufferType: return "VAQMatrixBufferType";
629 case VAHuffmanTableBufferType: return "VAHuffmanTableBufferType";
630 /* Following are encode buffer types */
631 case VAEncCodedBufferType: return "VAEncCodedBufferType";
632 case VAEncSequenceParameterBufferType: return "VAEncSequenceParameterBufferType";
633 case VAEncPictureParameterBufferType: return "VAEncPictureParameterBufferType";
634 case VAEncSliceParameterBufferType: return "VAEncSliceParameterBufferType";
635 case VAEncPackedHeaderParameterBufferType: return "VAEncPackedHeaderParameterBufferType";
636 case VAEncPackedHeaderDataBufferType: return "VAEncPackedHeaderDataBufferType";
637 case VAEncMiscParameterBufferType: return "VAEncMiscParameterBufferType";
638 case VAEncMacroblockParameterBufferType: return "VAEncMacroblockParameterBufferType";
639 case VAProcPipelineParameterBufferType: return "VAProcPipelineParameterBufferType";
640 case VAProcFilterParameterBufferType: return "VAProcFilterParameterBufferType";
641 default: return "UnknowBuffer";
645 void va_TraceCreateBuffer (
647 VAContextID context, /* in */
648 VABufferType type, /* in */
649 unsigned int size, /* in */
650 unsigned int num_elements, /* in */
652 VABufferID *buf_id /* out */
657 /* only trace CodedBuffer */
658 if (type != VAEncCodedBufferType)
662 va_TraceMsg(trace_ctx, "\tbuf_type=%s\n", buffer_type_to_string(type));
664 va_TraceMsg(trace_ctx, "\tbuf_id=0x%x\n", *buf_id);
665 va_TraceMsg(trace_ctx, "\tsize=%d\n", size);
666 va_TraceMsg(trace_ctx, "\tnum_elements=%d\n", num_elements);
668 va_TraceMsg(trace_ctx, NULL);
671 void va_TraceDestroyBuffer (
673 VABufferID buf_id /* in */
678 unsigned int num_elements;
680 VACodedBufferSegment *buf_list;
685 vaBufferInfo(dpy, trace_ctx->trace_context, buf_id, &type, &size, &num_elements);
687 /* only trace CodedBuffer */
688 if (type != VAEncCodedBufferType)
692 va_TraceMsg(trace_ctx, "\tbuf_type=%s\n", buffer_type_to_string(type));
693 va_TraceMsg(trace_ctx, "\tbuf_id=0x%x\n", buf_id);
694 va_TraceMsg(trace_ctx, "\tsize=%d\n", size);
695 va_TraceMsg(trace_ctx, "\tnum_elements=%d\n", num_elements);
697 va_TraceMsg(trace_ctx, NULL);
701 void va_TraceMapBuffer (
703 VABufferID buf_id, /* in */
704 void **pbuf /* out */
709 unsigned int num_elements;
711 VACodedBufferSegment *buf_list;
716 vaBufferInfo(dpy, trace_ctx->trace_context, buf_id, &type, &size, &num_elements);
718 /* only trace CodedBuffer */
719 if (type != VAEncCodedBufferType)
723 va_TraceMsg(trace_ctx, "\tbuf_id=0x%x\n", buf_id);
724 va_TraceMsg(trace_ctx, "\tbuf_type=%s\n", buffer_type_to_string(type));
725 if ((pbuf == NULL) || (*pbuf == NULL))
728 buf_list = (VACodedBufferSegment *)(*pbuf);
729 while (buf_list != NULL) {
730 va_TraceMsg(trace_ctx, "\tCodedbuf[%d] =\n", i++);
732 va_TraceMsg(trace_ctx, "\t size = %d\n", buf_list->size);
733 va_TraceMsg(trace_ctx, "\t bit_offset = %d\n", buf_list->bit_offset);
734 va_TraceMsg(trace_ctx, "\t status = 0x%08x\n", buf_list->status);
735 va_TraceMsg(trace_ctx, "\t reserved = 0x%08x\n", buf_list->reserved);
736 va_TraceMsg(trace_ctx, "\t buf = 0x%08x\n", buf_list->buf);
738 if (trace_ctx->trace_fp_codedbuf) {
739 va_TraceMsg(trace_ctx, "\tDump the content to file\n");
740 fwrite(buf_list->buf, buf_list->size, 1, trace_ctx->trace_fp_codedbuf);
743 buf_list = buf_list->next;
745 va_TraceMsg(trace_ctx, NULL);
748 static void va_TraceVABuffers(
754 unsigned int num_elements,
759 unsigned char *p = pbuf;
763 va_TraceMsg(trace_ctx, "--%s\n", buffer_type_to_string(type));
765 if ((trace_flag & VA_TRACE_FLAG_BUFDATA) && trace_ctx->trace_fp_log) {
766 for (i=0; i<size; i++) {
767 unsigned char value = p[i];
770 fprintf(trace_ctx->trace_fp_log, "\t\t0x%04x:", i);
771 else if ((i%16) == 0)
772 fprintf(trace_ctx->trace_fp_log, "\n\t\t0x%04x:", i);
774 fprintf(trace_ctx->trace_fp_log, " %02x", value);
776 fprintf(trace_ctx->trace_fp_log, "\n");
779 va_TraceMsg(trace_ctx, NULL);
785 static void va_TraceVAPictureParameterBufferMPEG2(
791 unsigned int num_elements,
794 VAPictureParameterBufferMPEG2 *p=(VAPictureParameterBufferMPEG2 *)data;
797 va_TraceMsg(trace_ctx,"VAPictureParameterBufferMPEG2\n");
799 va_TraceMsg(trace_ctx,"\thorizontal size= %d\n", p->horizontal_size);
800 va_TraceMsg(trace_ctx,"\tvertical size= %d\n", p->vertical_size);
801 va_TraceMsg(trace_ctx,"\tforward reference picture= %d\n", p->forward_reference_picture);
802 va_TraceMsg(trace_ctx,"\tbackward reference picture= %d\n", p->backward_reference_picture);
803 va_TraceMsg(trace_ctx,"\tpicture coding type= %d\n", p->picture_coding_type);
804 va_TraceMsg(trace_ctx,"\tf mode= %d\n", p->f_code);
806 va_TraceMsg(trace_ctx,"\tpicture coding extension = %d\n", p->picture_coding_extension.value);
807 va_TraceMsg(trace_ctx,"\tintra_dc_precision= %d\n", p->picture_coding_extension.bits.intra_dc_precision);
808 va_TraceMsg(trace_ctx,"\tpicture_structure= %d\n", p->picture_coding_extension.bits.picture_structure);
809 va_TraceMsg(trace_ctx,"\ttop_field_first= %d\n", p->picture_coding_extension.bits.top_field_first);
810 va_TraceMsg(trace_ctx,"\tframe_pred_frame_dct= %d\n", p->picture_coding_extension.bits.frame_pred_frame_dct);
811 va_TraceMsg(trace_ctx,"\tconcealment_motion_vectors= %d\n", p->picture_coding_extension.bits.concealment_motion_vectors);
812 va_TraceMsg(trace_ctx,"\tq_scale_type= %d\n", p->picture_coding_extension.bits.q_scale_type);
813 va_TraceMsg(trace_ctx,"\tintra_vlc_format= %d\n", p->picture_coding_extension.bits.intra_vlc_format);
814 va_TraceMsg(trace_ctx,"\talternate_scan= %d\n", p->picture_coding_extension.bits.alternate_scan);
815 va_TraceMsg(trace_ctx,"\trepeat_first_field= %d\n", p->picture_coding_extension.bits.repeat_first_field);
816 va_TraceMsg(trace_ctx,"\tprogressive_frame= %d\n", p->picture_coding_extension.bits.progressive_frame);
817 va_TraceMsg(trace_ctx,"\tis_first_field= %d\n", p->picture_coding_extension.bits.is_first_field);
818 va_TraceMsg(trace_ctx, NULL);
824 static void va_TraceVAIQMatrixBufferMPEG2(
830 unsigned int num_elements,
833 VAIQMatrixBufferMPEG2 *p=(VAIQMatrixBufferMPEG2 *)data;
836 va_TraceMsg(trace_ctx,"VAIQMatrixBufferMPEG2\n");
838 va_TraceMsg(trace_ctx,"\tload_intra_quantiser_matrix = %d\n", p->load_intra_quantiser_matrix);
839 va_TraceMsg(trace_ctx,"\tload_non_intra_quantiser_matrix = %d\n", p->load_non_intra_quantiser_matrix);
840 va_TraceMsg(trace_ctx,"\tload_chroma_intra_quantiser_matrix = %d\n", p->load_chroma_intra_quantiser_matrix);
841 va_TraceMsg(trace_ctx,"\tload_chroma_non_intra_quantiser_matrix = %d\n", p->load_chroma_non_intra_quantiser_matrix);
842 va_TraceMsg(trace_ctx,"\tintra_quantiser_matrix = %d\n", p->intra_quantiser_matrix);
843 va_TraceMsg(trace_ctx,"\tnon_intra_quantiser_matrix = %d\n", p->non_intra_quantiser_matrix);
844 va_TraceMsg(trace_ctx,"\tchroma_intra_quantiser_matrix = %d\n", p->chroma_intra_quantiser_matrix);
845 va_TraceMsg(trace_ctx,"\tchroma_non_intra_quantiser_matrix = %d\n", p->chroma_non_intra_quantiser_matrix);
846 va_TraceMsg(trace_ctx, NULL);
852 static void va_TraceVASliceParameterBufferMPEG2(
858 unsigned int num_elements,
861 VASliceParameterBufferMPEG2 *p=(VASliceParameterBufferMPEG2 *)data;
865 trace_ctx->trace_slice_no++;
867 trace_ctx->trace_slice_size = p->slice_data_size;
869 va_TraceMsg(trace_ctx,"VASliceParameterBufferMPEG2\n");
871 va_TraceMsg(trace_ctx,"\tslice_data_size = %d\n", p->slice_data_size);
872 va_TraceMsg(trace_ctx,"\tslice_data_offset = %d\n", p->slice_data_offset);
873 va_TraceMsg(trace_ctx,"\tslice_data_flag = %d\n", p->slice_data_flag);
874 va_TraceMsg(trace_ctx,"\tmacroblock_offset = %d\n", p->macroblock_offset);
875 va_TraceMsg(trace_ctx,"\tslice_horizontal_position = %d\n", p->slice_horizontal_position);
876 va_TraceMsg(trace_ctx,"\tslice_vertical_position = %d\n", p->slice_vertical_position);
877 va_TraceMsg(trace_ctx,"\tquantiser_scale_code = %d\n", p->quantiser_scale_code);
878 va_TraceMsg(trace_ctx,"\tintra_slice_flag = %d\n", p->intra_slice_flag);
879 va_TraceMsg(trace_ctx, NULL);
884 static void va_TraceVAPictureParameterBufferJPEG(
890 unsigned int num_elements,
894 VAPictureParameterBufferJPEGBaseline *p=(VAPictureParameterBufferJPEGBaseline *)data;
897 va_TraceMsg(trace_ctx,"*VAPictureParameterBufferJPEG\n");
898 va_TraceMsg(trace_ctx,"\tpicture_width = %u\n", p->picture_width);
899 va_TraceMsg(trace_ctx,"\tpicture_height = %u\n", p->picture_height);
900 va_TraceMsg(trace_ctx,"\tcomponents = \n");
901 for (i = 0; i < p->num_components && i < 255; ++i) {
902 va_TraceMsg(trace_ctx,"\t\t[%d] component_id = %u\n", i, p->components[i].component_id);
903 va_TraceMsg(trace_ctx,"\t\t[%d] h_sampling_factor = %u\n", i, p->components[i].h_sampling_factor);
904 va_TraceMsg(trace_ctx,"\t\t[%d] v_sampling_factor = %u\n", i, p->components[i].v_sampling_factor);
905 va_TraceMsg(trace_ctx,"\t\t[%d] quantiser_table_selector = %u\n", i, p->components[i].quantiser_table_selector);
909 static void va_TraceVAIQMatrixBufferJPEG(
915 unsigned int num_elements,
919 static char tmp[1024];
920 VAIQMatrixBufferJPEGBaseline *p=(VAIQMatrixBufferJPEGBaseline *)data;
922 va_TraceMsg(trace_ctx,"*VAIQMatrixParameterBufferJPEG\n");
923 va_TraceMsg(trace_ctx,"\tload_quantiser_table =\n");
924 for (i = 0; i < 4; ++i) {
925 va_TraceMsg(trace_ctx,"\t\t[%d] = %u\n", i, p->load_quantiser_table[i]);
927 va_TraceMsg(trace_ctx,"\tquantiser_table =\n");
928 for (i = 0; i < 4; ++i) {
929 memset(tmp, 0, sizeof tmp);
930 for (j = 0; j < 64; ++j) {
931 sprintf(tmp + strlen(tmp), "%u ", p->quantiser_table[i][j]);
933 va_TraceMsg(trace_ctx,"\t\t[%d] = %s\n", i, tmp);
937 static void va_TraceVASliceParameterBufferJPEG(
943 unsigned int num_elements,
947 VASliceParameterBufferJPEGBaseline *p=(VASliceParameterBufferJPEGBaseline *)data;
949 va_TraceMsg(trace_ctx,"*VASliceParameterBufferJPEG\n");
950 va_TraceMsg(trace_ctx,"\tslice_data_size = %u\n", p->slice_data_size);
951 va_TraceMsg(trace_ctx,"\tslice_data_offset = %u\n", p->slice_data_offset);
952 va_TraceMsg(trace_ctx,"\tslice_data_flag = %u\n", p->slice_data_flag);
953 va_TraceMsg(trace_ctx,"\tslice_horizontal_position = %u\n", p->slice_horizontal_position);
954 va_TraceMsg(trace_ctx,"\tslice_vertical_position = %u\n", p->slice_vertical_position);
955 va_TraceMsg(trace_ctx,"\tcomponents = \n");
956 for (i = 0; i < p->num_components && i < 4; ++i) {
957 va_TraceMsg(trace_ctx,"\t\t[%d] component_selector = %u\n", i, p->components[i].component_selector);
958 va_TraceMsg(trace_ctx,"\t\t[%d] dc_table_selector = %u\n", i, p->components[i].dc_table_selector);
959 va_TraceMsg(trace_ctx,"\t\t[%d] ac_table_selector = %u\n", i, p->components[i].ac_table_selector);
961 va_TraceMsg(trace_ctx,"\trestart_interval = %u\n", p->restart_interval);
962 va_TraceMsg(trace_ctx,"\tnum_mcus = %u\n", p->num_mcus);
965 static void va_TraceVAHuffmanTableBufferJPEG(
971 unsigned int num_elements,
975 static char tmp[1024];
976 VAHuffmanTableBufferJPEGBaseline *p=(VAHuffmanTableBufferJPEGBaseline *)data;
978 va_TraceMsg(trace_ctx,"*VAHuffmanTableBufferJPEG\n");
980 for (i = 0; i < 2; ++i) {
981 va_TraceMsg(trace_ctx,"\tload_huffman_table[%d] =%u\n", i, p->load_huffman_table[0]);
982 va_TraceMsg(trace_ctx,"\thuffman_table[%d] =\n", i);
983 memset(tmp, 0, sizeof tmp);
984 for (j = 0; j < 16; ++j) {
985 sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].num_dc_codes[j]);
987 va_TraceMsg(trace_ctx,"\t\tnum_dc_codes =%s\n", tmp);
988 memset(tmp, 0, sizeof tmp);
989 for (j = 0; j < 12; ++j) {
990 sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].dc_values[j]);
992 va_TraceMsg(trace_ctx,"\t\tdc_values =%s\n", tmp);
993 memset(tmp, 0, sizeof tmp);
994 for (j = 0; j < 16; ++j) {
995 sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].num_ac_codes[j]);
997 va_TraceMsg(trace_ctx,"\t\tnum_dc_codes =%s\n", tmp);
998 memset(tmp, 0, sizeof tmp);
999 for (j = 0; j < 162; ++j) {
1000 sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].ac_values[j]);
1002 va_TraceMsg(trace_ctx,"\t\tnum_dc_codes =%s\n", tmp);
1003 memset(tmp, 0, sizeof tmp);
1004 for (j = 0; j < 2; ++j) {
1005 sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].pad[j]);
1007 va_TraceMsg(trace_ctx,"\t\tnum_dc_codes =%s\n", tmp);
1011 static void va_TraceVAPictureParameterBufferMPEG4(
1013 VAContextID context,
1017 unsigned int num_elements,
1021 VAPictureParameterBufferMPEG4 *p=(VAPictureParameterBufferMPEG4 *)data;
1025 va_TraceMsg(trace_ctx,"*VAPictureParameterBufferMPEG4\n");
1026 va_TraceMsg(trace_ctx,"\tvop_width = %d\n", p->vop_width);
1027 va_TraceMsg(trace_ctx,"\tvop_height = %d\n", p->vop_height);
1028 va_TraceMsg(trace_ctx,"\tforward_reference_picture = %d\n", p->forward_reference_picture);
1029 va_TraceMsg(trace_ctx,"\tbackward_reference_picture = %d\n", p->backward_reference_picture);
1030 va_TraceMsg(trace_ctx,"\tvol_fields value = %d\n", p->vol_fields.value);
1031 va_TraceMsg(trace_ctx,"\tshort_video_header= %d\n", p->vol_fields.bits.short_video_header);
1032 va_TraceMsg(trace_ctx,"\tchroma_format= %d\n", p->vol_fields.bits.chroma_format);
1033 va_TraceMsg(trace_ctx,"\tinterlaced= %d\n", p->vol_fields.bits.interlaced);
1034 va_TraceMsg(trace_ctx,"\tobmc_disable= %d\n", p->vol_fields.bits.obmc_disable);
1035 va_TraceMsg(trace_ctx,"\tsprite_enable= %d\n", p->vol_fields.bits.sprite_enable);
1036 va_TraceMsg(trace_ctx,"\tsprite_warping_accuracy= %d\n", p->vol_fields.bits.sprite_warping_accuracy);
1037 va_TraceMsg(trace_ctx,"\tquant_type= %d\n", p->vol_fields.bits.quant_type);
1038 va_TraceMsg(trace_ctx,"\tquarter_sample= %d\n", p->vol_fields.bits.quarter_sample);
1039 va_TraceMsg(trace_ctx,"\tdata_partitioned= %d\n", p->vol_fields.bits.data_partitioned);
1040 va_TraceMsg(trace_ctx,"\treversible_vlc= %d\n", p->vol_fields.bits.reversible_vlc);
1041 va_TraceMsg(trace_ctx,"\tresync_marker_disable= %d\n", p->vol_fields.bits.resync_marker_disable);
1042 va_TraceMsg(trace_ctx,"\tno_of_sprite_warping_points = %d\n", p->no_of_sprite_warping_points);
1043 va_TraceMsg(trace_ctx,"\tsprite_trajectory_du =");
1045 va_TraceMsg(trace_ctx,"\t%d", p->sprite_trajectory_du[i]);
1047 va_TraceMsg(trace_ctx,"\n");
1048 va_TraceMsg(trace_ctx,"\tsprite_trajectory_dv =");
1050 va_TraceMsg(trace_ctx,"\t%d", p->sprite_trajectory_dv[i]);
1051 va_TraceMsg(trace_ctx,"\n");
1052 va_TraceMsg(trace_ctx,"\tvop_fields value = %d\n", p->vop_fields.value);
1053 va_TraceMsg(trace_ctx,"\tvop_coding_type= %d\n", p->vop_fields.bits.vop_coding_type);
1054 va_TraceMsg(trace_ctx,"\tbackward_reference_vop_coding_type= %d\n", p->vop_fields.bits.backward_reference_vop_coding_type);
1055 va_TraceMsg(trace_ctx,"\tvop_rounding_type= %d\n", p->vop_fields.bits.vop_rounding_type);
1056 va_TraceMsg(trace_ctx,"\tintra_dc_vlc_thr= %d\n", p->vop_fields.bits.intra_dc_vlc_thr);
1057 va_TraceMsg(trace_ctx,"\ttop_field_first= %d\n", p->vop_fields.bits.top_field_first);
1058 va_TraceMsg(trace_ctx,"\talternate_vertical_scan_flag= %d\n", p->vop_fields.bits.alternate_vertical_scan_flag);
1059 va_TraceMsg(trace_ctx,"\tvop_fcode_forward = %d\n", p->vop_fcode_forward);
1060 va_TraceMsg(trace_ctx,"\tvop_fcode_backward = %d\n", p->vop_fcode_backward);
1061 va_TraceMsg(trace_ctx,"\tnum_gobs_in_vop = %d\n", p->num_gobs_in_vop);
1062 va_TraceMsg(trace_ctx,"\tnum_macroblocks_in_gob = %d\n", p->num_macroblocks_in_gob);
1063 va_TraceMsg(trace_ctx,"\tTRB = %d\n", p->TRB);
1064 va_TraceMsg(trace_ctx,"\tTRD = %d\n", p->TRD);
1065 va_TraceMsg(trace_ctx, NULL);
1071 static void va_TraceVAIQMatrixBufferMPEG4(
1073 VAContextID context,
1077 unsigned int num_elements,
1081 VAIQMatrixBufferMPEG4 *p=(VAIQMatrixBufferMPEG4 *)data;
1084 va_TraceMsg(trace_ctx,"VAIQMatrixBufferMPEG4\n");
1086 va_TraceMsg(trace_ctx,"\tload_intra_quant_mat = %d\n", p->load_intra_quant_mat);
1087 va_TraceMsg(trace_ctx,"\tload_non_intra_quant_mat = %d\n", p->load_non_intra_quant_mat);
1088 va_TraceMsg(trace_ctx,"\tintra_quant_mat =\n");
1090 va_TraceMsg(trace_ctx,"\t\t%d\n", p->intra_quant_mat[i]);
1092 va_TraceMsg(trace_ctx,"\tnon_intra_quant_mat =\n");
1094 va_TraceMsg(trace_ctx,"\t\t%d\n", p->non_intra_quant_mat[i]);
1095 va_TraceMsg(trace_ctx, NULL);
1100 static void va_TraceVAEncSequenceParameterBufferMPEG4(
1102 VAContextID context,
1106 unsigned int num_elements,
1109 VAEncSequenceParameterBufferMPEG4 *p = (VAEncSequenceParameterBufferMPEG4 *)data;
1112 va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferMPEG4\n");
1114 va_TraceMsg(trace_ctx, "\tprofile_and_level_indication = %d\n", p->profile_and_level_indication);
1115 va_TraceMsg(trace_ctx, "\tintra_period = %d\n", p->intra_period);
1116 va_TraceMsg(trace_ctx, "\tvideo_object_layer_width = %d\n", p->video_object_layer_width);
1117 va_TraceMsg(trace_ctx, "\tvideo_object_layer_height = %d\n", p->video_object_layer_height);
1118 va_TraceMsg(trace_ctx, "\tvop_time_increment_resolution = %d\n", p->vop_time_increment_resolution);
1119 va_TraceMsg(trace_ctx, "\tfixed_vop_rate = %d\n", p->fixed_vop_rate);
1120 va_TraceMsg(trace_ctx, "\tfixed_vop_time_increment = %d\n", p->fixed_vop_time_increment);
1121 va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
1122 va_TraceMsg(trace_ctx, "\tframe_rate = %d\n", p->frame_rate);
1123 va_TraceMsg(trace_ctx, "\tinitial_qp = %d\n", p->initial_qp);
1124 va_TraceMsg(trace_ctx, "\tmin_qp = %d\n", p->min_qp);
1125 va_TraceMsg(trace_ctx, NULL);
1130 static void va_TraceVAEncPictureParameterBufferMPEG4(
1132 VAContextID context,
1136 unsigned int num_elements,
1139 VAEncPictureParameterBufferMPEG4 *p = (VAEncPictureParameterBufferMPEG4 *)data;
1142 va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferMPEG4\n");
1143 va_TraceMsg(trace_ctx, "\treference_picture = 0x%08x\n", p->reference_picture);
1144 va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture);
1145 va_TraceMsg(trace_ctx, "\tcoded_buf = 0x%08x\n", p->coded_buf);
1146 va_TraceMsg(trace_ctx, "\tpicture_width = %d\n", p->picture_width);
1147 va_TraceMsg(trace_ctx, "\tpicture_height = %d\n", p->picture_height);
1148 va_TraceMsg(trace_ctx, "\tmodulo_time_base = %d\n", p->modulo_time_base);
1149 va_TraceMsg(trace_ctx, "\tvop_time_increment = %d\n", p->vop_time_increment);
1150 va_TraceMsg(trace_ctx, "\tpicture_type = %d\n", p->picture_type);
1151 va_TraceMsg(trace_ctx, NULL);
1157 static void va_TraceVASliceParameterBufferMPEG4(
1159 VAContextID context,
1163 unsigned int num_elements,
1166 VASliceParameterBufferMPEG4 *p=(VASliceParameterBufferMPEG4 *)data;
1170 trace_ctx->trace_slice_no++;
1172 trace_ctx->trace_slice_size = p->slice_data_size;
1174 va_TraceMsg(trace_ctx,"VASliceParameterBufferMPEG4\n");
1176 va_TraceMsg(trace_ctx,"\tslice_data_size = %d\n", p->slice_data_size);
1177 va_TraceMsg(trace_ctx,"\tslice_data_offset = %d\n", p->slice_data_offset);
1178 va_TraceMsg(trace_ctx,"\tslice_data_flag = %d\n", p->slice_data_flag);
1179 va_TraceMsg(trace_ctx,"\tmacroblock_offset = %d\n", p->macroblock_offset);
1180 va_TraceMsg(trace_ctx,"\tmacroblock_number = %d\n", p->macroblock_number);
1181 va_TraceMsg(trace_ctx,"\tquant_scale = %d\n", p->quant_scale);
1182 va_TraceMsg(trace_ctx, NULL);
1188 static inline void va_TraceFlagIfNotZero(
1189 struct trace_context *trace_ctx,
1190 const char *name, /* in */
1191 unsigned int flag /* in */
1195 va_TraceMsg(trace_ctx, "%s = %x\n", name, flag);
1200 static void va_TraceVAPictureParameterBufferH264(
1202 VAContextID context,
1206 unsigned int num_elements,
1210 VAPictureParameterBufferH264 *p = (VAPictureParameterBufferH264*)data;
1214 va_TraceMsg(trace_ctx, "\t--VAPictureParameterBufferH264\n");
1216 va_TraceMsg(trace_ctx, "\tCurrPic.picture_id = 0x%08x\n", p->CurrPic.picture_id);
1217 va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.frame_idx);
1218 va_TraceMsg(trace_ctx, "\tCurrPic.flags = %d\n", p->CurrPic.flags);
1219 va_TraceMsg(trace_ctx, "\tCurrPic.TopFieldOrderCnt = %d\n", p->CurrPic.TopFieldOrderCnt);
1220 va_TraceMsg(trace_ctx, "\tCurrPic.BottomFieldOrderCnt = %d\n", p->CurrPic.BottomFieldOrderCnt);
1222 va_TraceMsg(trace_ctx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags:\n");
1223 for (i = 0; i < 16; i++)
1225 if ((p->ReferenceFrames[i].picture_id != VA_INVALID_SURFACE) &&
1226 ((p->ReferenceFrames[i].flags & VA_PICTURE_H264_INVALID) == 0)) {
1227 va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n",
1228 p->ReferenceFrames[i].TopFieldOrderCnt,
1229 p->ReferenceFrames[i].BottomFieldOrderCnt,
1230 p->ReferenceFrames[i].picture_id,
1231 p->ReferenceFrames[i].frame_idx,
1232 p->ReferenceFrames[i].flags);
1236 va_TraceMsg(trace_ctx, "\tpicture_width_in_mbs_minus1 = %d\n", p->picture_width_in_mbs_minus1);
1237 va_TraceMsg(trace_ctx, "\tpicture_height_in_mbs_minus1 = %d\n", p->picture_height_in_mbs_minus1);
1238 va_TraceMsg(trace_ctx, "\tbit_depth_luma_minus8 = %d\n", p->bit_depth_luma_minus8);
1239 va_TraceMsg(trace_ctx, "\tbit_depth_chroma_minus8 = %d\n", p->bit_depth_chroma_minus8);
1240 va_TraceMsg(trace_ctx, "\tnum_ref_frames = %d\n", p->num_ref_frames);
1241 va_TraceMsg(trace_ctx, "\tseq fields = %d\n", p->seq_fields.value);
1242 va_TraceMsg(trace_ctx, "\tchroma_format_idc = %d\n", p->seq_fields.bits.chroma_format_idc);
1243 va_TraceMsg(trace_ctx, "\tresidual_colour_transform_flag = %d\n", p->seq_fields.bits.residual_colour_transform_flag);
1244 va_TraceMsg(trace_ctx, "\tframe_mbs_only_flag = %d\n", p->seq_fields.bits.frame_mbs_only_flag);
1245 va_TraceMsg(trace_ctx, "\tmb_adaptive_frame_field_flag = %d\n", p->seq_fields.bits.mb_adaptive_frame_field_flag);
1246 va_TraceMsg(trace_ctx, "\tdirect_8x8_inference_flag = %d\n", p->seq_fields.bits.direct_8x8_inference_flag);
1247 va_TraceMsg(trace_ctx, "\tMinLumaBiPredSize8x8 = %d\n", p->seq_fields.bits.MinLumaBiPredSize8x8);
1248 va_TraceMsg(trace_ctx, "\tnum_slice_groups_minus1 = %d\n", p->num_slice_groups_minus1);
1249 va_TraceMsg(trace_ctx, "\tslice_group_map_type = %d\n", p->slice_group_map_type);
1250 va_TraceMsg(trace_ctx, "\tslice_group_change_rate_minus1 = %d\n", p->slice_group_change_rate_minus1);
1251 va_TraceMsg(trace_ctx, "\tpic_init_qp_minus26 = %d\n", p->pic_init_qp_minus26);
1252 va_TraceMsg(trace_ctx, "\tpic_init_qs_minus26 = %d\n", p->pic_init_qs_minus26);
1253 va_TraceMsg(trace_ctx, "\tchroma_qp_index_offset = %d\n", p->chroma_qp_index_offset);
1254 va_TraceMsg(trace_ctx, "\tsecond_chroma_qp_index_offset = %d\n", p->second_chroma_qp_index_offset);
1255 va_TraceMsg(trace_ctx, "\tpic_fields = 0x%03x\n", p->pic_fields.value);
1256 va_TraceFlagIfNotZero(trace_ctx, "\t\tentropy_coding_mode_flag", p->pic_fields.bits.entropy_coding_mode_flag);
1257 va_TraceFlagIfNotZero(trace_ctx, "\t\tweighted_pred_flag", p->pic_fields.bits.weighted_pred_flag);
1258 va_TraceFlagIfNotZero(trace_ctx, "\t\tweighted_bipred_idc", p->pic_fields.bits.weighted_bipred_idc);
1259 va_TraceFlagIfNotZero(trace_ctx, "\t\ttransform_8x8_mode_flag", p->pic_fields.bits.transform_8x8_mode_flag);
1260 va_TraceFlagIfNotZero(trace_ctx, "\t\tfield_pic_flag", p->pic_fields.bits.field_pic_flag);
1261 va_TraceFlagIfNotZero(trace_ctx, "\t\tconstrained_intra_pred_flag", p->pic_fields.bits.constrained_intra_pred_flag);
1262 va_TraceFlagIfNotZero(trace_ctx, "\t\tpic_order_present_flag", p->pic_fields.bits.pic_order_present_flag);
1263 va_TraceFlagIfNotZero(trace_ctx, "\t\tdeblocking_filter_control_present_flag", p->pic_fields.bits.deblocking_filter_control_present_flag);
1264 va_TraceFlagIfNotZero(trace_ctx, "\t\tredundant_pic_cnt_present_flag", p->pic_fields.bits.redundant_pic_cnt_present_flag);
1265 va_TraceFlagIfNotZero(trace_ctx, "\t\treference_pic_flag", p->pic_fields.bits.reference_pic_flag);
1266 va_TraceMsg(trace_ctx, "\tframe_num = %d\n", p->frame_num);
1267 va_TraceMsg(trace_ctx, NULL);
1272 static void va_TraceVASliceParameterBufferH264(
1274 VAContextID context,
1278 unsigned int num_elements,
1282 VASliceParameterBufferH264* p = (VASliceParameterBufferH264*)data;
1285 trace_ctx->trace_slice_no++;
1286 trace_ctx->trace_slice_size = p->slice_data_size;
1288 va_TraceMsg(trace_ctx, "\t--VASliceParameterBufferH264\n");
1289 va_TraceMsg(trace_ctx, "\tslice_data_size = %d\n", p->slice_data_size);
1290 va_TraceMsg(trace_ctx, "\tslice_data_offset = %d\n", p->slice_data_offset);
1291 va_TraceMsg(trace_ctx, "\tslice_data_flag = %d\n", p->slice_data_flag);
1292 va_TraceMsg(trace_ctx, "\tslice_data_bit_offset = %d\n", p->slice_data_bit_offset);
1293 va_TraceMsg(trace_ctx, "\tfirst_mb_in_slice = %d\n", p->first_mb_in_slice);
1294 va_TraceMsg(trace_ctx, "\tslice_type = %d\n", p->slice_type);
1295 va_TraceMsg(trace_ctx, "\tdirect_spatial_mv_pred_flag = %d\n", p->direct_spatial_mv_pred_flag);
1296 va_TraceMsg(trace_ctx, "\tnum_ref_idx_l0_active_minus1 = %d\n", p->num_ref_idx_l0_active_minus1);
1297 va_TraceMsg(trace_ctx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
1298 va_TraceMsg(trace_ctx, "\tcabac_init_idc = %d\n", p->cabac_init_idc);
1299 va_TraceMsg(trace_ctx, "\tslice_qp_delta = %d\n", p->slice_qp_delta);
1300 va_TraceMsg(trace_ctx, "\tdisable_deblocking_filter_idc = %d\n", p->disable_deblocking_filter_idc);
1301 va_TraceMsg(trace_ctx, "\tslice_alpha_c0_offset_div2 = %d\n", p->slice_alpha_c0_offset_div2);
1302 va_TraceMsg(trace_ctx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
1304 va_TraceMsg(trace_ctx, "\tRefPicList0 =\n");
1305 for (i = 0; i < 32; i++) {
1306 if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
1307 ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
1308 va_TraceMsg(trace_ctx, "%08d-%08d-0x%08x-%08d-0x%08x\n", p->RefPicList0[i].TopFieldOrderCnt, p->RefPicList0[i].BottomFieldOrderCnt, p->RefPicList0[i].picture_id, p->RefPicList0[i].frame_idx, p->RefPicList0[i].flags);
1312 va_TraceMsg(trace_ctx, "\tRefPicList1 =\n");
1313 for (i = 0; i < 32; i++) {
1314 if ((p->RefPicList1[i].picture_id != VA_INVALID_SURFACE) &&
1315 ((p->RefPicList1[i].flags & VA_PICTURE_H264_INVALID) == 0))
1316 va_TraceMsg(trace_ctx, "%08d-%08d-0x%08x-%08d-0x%08x\n", p->RefPicList1[i].TopFieldOrderCnt, p->RefPicList1[i].BottomFieldOrderCnt, p->RefPicList1[i].picture_id, p->RefPicList1[i].frame_idx, p->RefPicList1[i].flags);
1321 va_TraceMsg(trace_ctx, "\tluma_log2_weight_denom = %d\n", p->luma_log2_weight_denom);
1322 va_TraceMsg(trace_ctx, "\tchroma_log2_weight_denom = %d\n", p->chroma_log2_weight_denom);
1323 va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
1325 for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) {
1326 va_TraceMsg(trace_ctx, "\t\t%d\t%d\n",
1327 p->luma_weight_l0[i],
1328 p->luma_offset_l0[i]);
1332 va_TraceMsg(trace_ctx, "\tchroma_weight_l0_flag = %d\n", p->chroma_weight_l0_flag);
1334 for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) {
1335 va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n",
1336 p->chroma_weight_l0[i][0],
1337 p->chroma_offset_l0[i][0],
1338 p->chroma_weight_l0[i][1],
1339 p->chroma_offset_l0[i][1]);
1343 va_TraceMsg(trace_ctx, "\tluma_weight_l1_flag = %d\n", p->luma_weight_l1_flag);
1345 for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) {
1346 va_TraceMsg(trace_ctx, "\t\t%d\t%d\n",
1347 p->luma_weight_l1[i],
1348 p->luma_offset_l1[i]);
1352 va_TraceMsg(trace_ctx, "\tchroma_weight_l1_flag = %d\n", p->chroma_weight_l1_flag);
1354 for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) {
1355 va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n",
1356 p->chroma_weight_l1[i][0],
1357 p->chroma_offset_l1[i][0],
1358 p->chroma_weight_l1[i][1],
1359 p->chroma_offset_l1[i][1]);
1362 va_TraceMsg(trace_ctx, NULL);
1365 static void va_TraceVAIQMatrixBufferH264(
1367 VAContextID context,
1371 unsigned int num_elements,
1376 VAIQMatrixBufferH264* p = (VAIQMatrixBufferH264* )data;
1380 va_TraceMsg(trace_ctx, "\t--VAIQMatrixBufferH264\n");
1382 va_TraceMsg(trace_ctx, "\tScalingList4x4[6][16]=\n");
1383 for (i = 0; i < 6; i++) {
1384 for (j = 0; j < 16; j++) {
1385 if (trace_ctx->trace_fp_log) {
1386 fprintf(trace_ctx->trace_fp_log, "\t%d", p->ScalingList4x4[i][j]);
1387 if ((j + 1) % 8 == 0)
1388 fprintf(trace_ctx->trace_fp_log, "\n");
1393 va_TraceMsg(trace_ctx, "\tScalingList8x8[2][64]=\n");
1394 for (i = 0; i < 2; i++) {
1395 for (j = 0; j < 64; j++) {
1396 if (trace_ctx->trace_fp_log) {
1397 fprintf(trace_ctx->trace_fp_log,"\t%d", p->ScalingList8x8[i][j]);
1398 if ((j + 1) % 8 == 0)
1399 fprintf(trace_ctx->trace_fp_log, "\n");
1404 va_TraceMsg(trace_ctx, NULL);
1409 static void va_TraceVAEncSequenceParameterBufferH264(
1411 VAContextID context,
1415 unsigned int num_elements,
1418 VAEncSequenceParameterBufferH264 *p = (VAEncSequenceParameterBufferH264 *)data;
1422 va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferH264\n");
1424 va_TraceMsg(trace_ctx, "\tseq_parameter_set_id = %d\n", p->seq_parameter_set_id);
1425 va_TraceMsg(trace_ctx, "\tlevel_idc = %d\n", p->level_idc);
1426 va_TraceMsg(trace_ctx, "\tintra_period = %d\n", p->intra_period);
1427 va_TraceMsg(trace_ctx, "\tintra_idr_period = %d\n", p->intra_idr_period);
1428 va_TraceMsg(trace_ctx, "\tip_period = %d\n", p->ip_period);
1429 va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
1430 va_TraceMsg(trace_ctx, "\tmax_num_ref_frames = %d\n", p->max_num_ref_frames);
1431 va_TraceMsg(trace_ctx, "\tpicture_width_in_mbs = %d\n", p->picture_width_in_mbs);
1432 va_TraceMsg(trace_ctx, "\tpicture_height_in_mbs = %d\n", p->picture_height_in_mbs);
1433 va_TraceMsg(trace_ctx, "\tchroma_format_idc = %d\n", p->seq_fields.bits.chroma_format_idc);
1434 va_TraceMsg(trace_ctx, "\tframe_mbs_only_flag = %d\n", p->seq_fields.bits.frame_mbs_only_flag);
1435 va_TraceMsg(trace_ctx, "\tmb_adaptive_frame_field_flag = %d\n", p->seq_fields.bits.mb_adaptive_frame_field_flag);
1436 va_TraceMsg(trace_ctx, "\tseq_scaling_matrix_present_flag = %d\n", p->seq_fields.bits.seq_scaling_matrix_present_flag);
1437 va_TraceMsg(trace_ctx, "\tdirect_8x8_inference_flag = %d\n", p->seq_fields.bits.direct_8x8_inference_flag);
1438 va_TraceMsg(trace_ctx, "\tlog2_max_frame_num_minus4 = %d\n", p->seq_fields.bits.log2_max_frame_num_minus4);
1439 va_TraceMsg(trace_ctx, "\tpic_order_cnt_type = %d\n", p->seq_fields.bits.pic_order_cnt_type);
1440 va_TraceMsg(trace_ctx, "\tlog2_max_pic_order_cnt_lsb_minus4 = %d\n", p->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4);
1441 va_TraceMsg(trace_ctx, "\tdelta_pic_order_always_zero_flag = %d\n", p->seq_fields.bits.delta_pic_order_always_zero_flag);
1442 va_TraceMsg(trace_ctx, "\tbit_depth_luma_minus8 = %d\n", p->bit_depth_luma_minus8);
1443 va_TraceMsg(trace_ctx, "\tbit_depth_chroma_minus8 = %d\n", p->bit_depth_chroma_minus8);
1444 va_TraceMsg(trace_ctx, "\tnum_ref_frames_in_pic_order_cnt_cycle = %d\n", p->num_ref_frames_in_pic_order_cnt_cycle);
1445 va_TraceMsg(trace_ctx, "\toffset_for_non_ref_pic = %d\n", p->offset_for_non_ref_pic);
1446 va_TraceMsg(trace_ctx, "\toffset_for_top_to_bottom_field = %d\n", p->offset_for_top_to_bottom_field);
1447 for(i = 0; (i < p->max_num_ref_frames) && (i < 32); ++i)
1448 va_TraceMsg(trace_ctx, "\toffset_for_ref_frame[%d] = %d\n", i, p->offset_for_ref_frame[i]);
1449 va_TraceMsg(trace_ctx, "\tframe_cropping_flag = %d\n", p->frame_cropping_flag);
1450 va_TraceMsg(trace_ctx, "\tframe_crop_left_offset = %d\n", p->frame_crop_left_offset);
1451 va_TraceMsg(trace_ctx, "\tframe_crop_right_offset = %d\n", p->frame_crop_right_offset);
1452 va_TraceMsg(trace_ctx, "\tframe_crop_top_offset = %d\n", p->frame_crop_top_offset);
1453 va_TraceMsg(trace_ctx, "\tframe_crop_bottom_offset = %d\n", p->frame_crop_bottom_offset);
1454 va_TraceMsg(trace_ctx, "\tvui_parameters_present_flag = %d\n", p->vui_parameters_present_flag);
1455 va_TraceMsg(trace_ctx, "\taspect_ratio_info_present_flag = %d\n", p->vui_fields.bits.aspect_ratio_info_present_flag);
1456 va_TraceMsg(trace_ctx, "\ttiming_info_present_flag = %d\n", p->vui_fields.bits.timing_info_present_flag);
1457 va_TraceMsg(trace_ctx, "\tbitstream_restriction_flag = %d\n", p->vui_fields.bits.bitstream_restriction_flag);
1458 va_TraceMsg(trace_ctx, "\tlog2_max_mv_length_horizontal = %d\n", p->vui_fields.bits.log2_max_mv_length_horizontal);
1459 va_TraceMsg(trace_ctx, "\tlog2_max_mv_length_vertical = %d\n", p->vui_fields.bits.log2_max_mv_length_vertical);
1460 va_TraceMsg(trace_ctx, "\taspect_ratio_idc = %d\n", p->aspect_ratio_idc);
1461 va_TraceMsg(trace_ctx, "\tsar_width = %d\n", p->sar_width);
1462 va_TraceMsg(trace_ctx, "\tsar_height = %d\n", p->sar_height);
1463 va_TraceMsg(trace_ctx, "\tnum_units_in_tick = %d\n", p->num_units_in_tick);
1464 va_TraceMsg(trace_ctx, "\ttime_scale = %d\n", p->time_scale);
1466 va_TraceMsg(trace_ctx, NULL);
1472 static void va_TraceVAEncPictureParameterBufferH264(
1474 VAContextID context,
1478 unsigned int num_elements,
1481 VAEncPictureParameterBufferH264 *p = (VAEncPictureParameterBufferH264 *)data;
1485 va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferH264\n");
1487 va_TraceMsg(trace_ctx, "\tCurrPic.picture_id = 0x%08x\n", p->CurrPic.picture_id);
1488 va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.frame_idx);
1489 va_TraceMsg(trace_ctx, "\tCurrPic.flags = %d\n", p->CurrPic.flags);
1490 va_TraceMsg(trace_ctx, "\tCurrPic.TopFieldOrderCnt = %d\n", p->CurrPic.TopFieldOrderCnt);
1491 va_TraceMsg(trace_ctx, "\tCurrPic.BottomFieldOrderCnt = %d\n", p->CurrPic.BottomFieldOrderCnt);
1492 va_TraceMsg(trace_ctx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
1493 for (i = 0; i < 16; i++)
1495 if ((p->ReferenceFrames[i].picture_id != VA_INVALID_SURFACE) &&
1496 ((p->ReferenceFrames[i].flags & VA_PICTURE_H264_INVALID) == 0)) {
1497 va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n",
1498 p->ReferenceFrames[i].TopFieldOrderCnt,
1499 p->ReferenceFrames[i].BottomFieldOrderCnt,
1500 p->ReferenceFrames[i].picture_id,
1501 p->ReferenceFrames[i].frame_idx,
1502 p->ReferenceFrames[i].flags
1507 va_TraceMsg(trace_ctx, "\tcoded_buf = %08x\n", p->coded_buf);
1508 va_TraceMsg(trace_ctx, "\tpic_parameter_set_id = %d\n", p->pic_parameter_set_id);
1509 va_TraceMsg(trace_ctx, "\tseq_parameter_set_id = %d\n", p->seq_parameter_set_id);
1510 va_TraceMsg(trace_ctx, "\tlast_picture = 0x%08x\n", p->last_picture);
1511 va_TraceMsg(trace_ctx, "\tframe_num = %d\n", p->frame_num);
1512 va_TraceMsg(trace_ctx, "\tpic_init_qp = %d\n", p->pic_init_qp);
1513 va_TraceMsg(trace_ctx, "\tnum_ref_idx_l0_active_minus1 = %d\n", p->num_ref_idx_l0_active_minus1);
1514 va_TraceMsg(trace_ctx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
1515 va_TraceMsg(trace_ctx, "\tchroma_qp_index_offset = %d\n", p->chroma_qp_index_offset);
1516 va_TraceMsg(trace_ctx, "\tsecond_chroma_qp_index_offset = %d\n", p->second_chroma_qp_index_offset);
1517 va_TraceMsg(trace_ctx, "\tpic_fields = 0x%03x\n", p->pic_fields.value);
1518 va_TraceMsg(trace_ctx, "\tidr_pic_flag = %d\n", p->pic_fields.bits.idr_pic_flag);
1519 va_TraceMsg(trace_ctx, "\treference_pic_flag = %d\n", p->pic_fields.bits.reference_pic_flag);
1520 va_TraceMsg(trace_ctx, "\tentropy_coding_mode_flag = %d\n", p->pic_fields.bits.entropy_coding_mode_flag);
1521 va_TraceMsg(trace_ctx, "\tweighted_pred_flag = %d\n", p->pic_fields.bits.weighted_pred_flag);
1522 va_TraceMsg(trace_ctx, "\tweighted_bipred_idc = %d\n", p->pic_fields.bits.weighted_bipred_idc);
1523 va_TraceMsg(trace_ctx, "\tconstrained_intra_pred_flag = %d\n", p->pic_fields.bits.constrained_intra_pred_flag);
1524 va_TraceMsg(trace_ctx, "\ttransform_8x8_mode_flag = %d\n", p->pic_fields.bits.transform_8x8_mode_flag);
1525 va_TraceMsg(trace_ctx, "\tdeblocking_filter_control_present_flag = %d\n", p->pic_fields.bits.deblocking_filter_control_present_flag);
1526 va_TraceMsg(trace_ctx, "\tredundant_pic_cnt_present_flag = %d\n", p->pic_fields.bits.redundant_pic_cnt_present_flag);
1527 va_TraceMsg(trace_ctx, "\tpic_order_present_flag = %d\n", p->pic_fields.bits.pic_order_present_flag);
1528 va_TraceMsg(trace_ctx, "\tpic_scaling_matrix_present_flag = %d\n", p->pic_fields.bits.pic_scaling_matrix_present_flag);
1530 va_TraceMsg(trace_ctx, NULL);
1535 static void va_TraceVAEncSliceParameterBuffer(
1537 VAContextID context,
1541 unsigned int num_elements,
1544 VAEncSliceParameterBuffer* p = (VAEncSliceParameterBuffer*)data;
1547 va_TraceMsg(trace_ctx, "\t--VAEncSliceParameterBuffer\n");
1549 va_TraceMsg(trace_ctx, "\tstart_row_number = %d\n", p->start_row_number);
1550 va_TraceMsg(trace_ctx, "\tslice_height = %d\n", p->slice_height);
1551 va_TraceMsg(trace_ctx, "\tslice_flags.is_intra = %d\n", p->slice_flags.bits.is_intra);
1552 va_TraceMsg(trace_ctx, "\tslice_flags.disable_deblocking_filter_idc = %d\n", p->slice_flags.bits.disable_deblocking_filter_idc);
1553 va_TraceMsg(trace_ctx, "\tslice_flags.uses_long_term_ref = %d\n", p->slice_flags.bits.uses_long_term_ref);
1554 va_TraceMsg(trace_ctx, "\tslice_flags.is_long_term_ref = %d\n", p->slice_flags.bits.is_long_term_ref);
1555 va_TraceMsg(trace_ctx, NULL);
1560 static void va_TraceVAEncSliceParameterBufferH264(
1562 VAContextID context,
1566 unsigned int num_elements,
1569 VAEncSliceParameterBufferH264* p = (VAEncSliceParameterBufferH264*)data;
1576 va_TraceMsg(trace_ctx, "\t--VAEncSliceParameterBufferH264\n");
1577 va_TraceMsg(trace_ctx, "\tmacroblock_address = %d\n", p->macroblock_address);
1578 va_TraceMsg(trace_ctx, "\tnum_macroblocks = %d\n", p->num_macroblocks);
1579 va_TraceMsg(trace_ctx, "\tmacroblock_info = %08x\n", p->macroblock_info);
1580 va_TraceMsg(trace_ctx, "\tslice_type = %d\n", p->slice_type);
1581 va_TraceMsg(trace_ctx, "\tpic_parameter_set_id = %d\n", p->pic_parameter_set_id);
1582 va_TraceMsg(trace_ctx, "\tidr_pic_id = %d\n", p->idr_pic_id);
1583 va_TraceMsg(trace_ctx, "\tpic_order_cnt_lsb = %d\n", p->pic_order_cnt_lsb);
1584 va_TraceMsg(trace_ctx, "\tdelta_pic_order_cnt_bottom = %d\n", p->delta_pic_order_cnt_bottom);
1585 va_TraceMsg(trace_ctx, "\tdelta_pic_order_cnt[0] = %d\n", p->delta_pic_order_cnt[0]);
1586 va_TraceMsg(trace_ctx, "\tdelta_pic_order_cnt[1] = %d\n", p->delta_pic_order_cnt[1]);
1587 va_TraceMsg(trace_ctx, "\tdirect_spatial_mv_pred_flag = %d\n", p->direct_spatial_mv_pred_flag);
1588 va_TraceMsg(trace_ctx, "\tnum_ref_idx_active_override_flag = %d\n", p->num_ref_idx_active_override_flag);
1589 va_TraceMsg(trace_ctx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
1590 va_TraceMsg(trace_ctx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
1592 va_TraceMsg(trace_ctx, "\tRefPicList0 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
1596 for (i = 0; i < 32; i++) {
1597 if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
1598 ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
1599 va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n",
1600 p->RefPicList0[i].TopFieldOrderCnt,
1601 p->RefPicList0[i].BottomFieldOrderCnt,
1602 p->RefPicList0[i].picture_id,
1603 p->RefPicList0[i].frame_idx,
1604 p->RefPicList0[i].flags);
1609 va_TraceMsg(trace_ctx, "\tRefPicList1 (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
1610 for (i = 0; i < 32; i++) {
1611 if ((p->RefPicList1[i].picture_id != VA_INVALID_SURFACE) &&
1612 ((p->RefPicList1[i].flags & VA_PICTURE_H264_INVALID) == 0))
1613 va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x-%08d-0x%08d\n",
1614 p->RefPicList1[i].TopFieldOrderCnt,
1615 p->RefPicList1[i].BottomFieldOrderCnt,
1616 p->RefPicList1[i].picture_id,
1617 p->RefPicList1[i].frame_idx,
1618 p->RefPicList1[i].flags
1624 va_TraceMsg(trace_ctx, "\tluma_log2_weight_denom = %d\n", p->luma_log2_weight_denom);
1625 va_TraceMsg(trace_ctx, "\tchroma_log2_weight_denom = %d\n", p->chroma_log2_weight_denom);
1626 va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
1627 if (p->luma_weight_l0_flag) {
1628 for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) {
1629 va_TraceMsg(trace_ctx, "\t\t%d\t%d\n",
1630 p->luma_weight_l0[i],
1631 p->luma_offset_l0[i]);
1635 va_TraceMsg(trace_ctx, "\tchroma_weight_l0_flag = %d\n", p->chroma_weight_l0_flag);
1636 if (p->chroma_weight_l0_flag) {
1637 for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) {
1638 va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n",
1639 p->chroma_weight_l0[i][0],
1640 p->chroma_offset_l0[i][0],
1641 p->chroma_weight_l0[i][1],
1642 p->chroma_offset_l0[i][1]);
1646 va_TraceMsg(trace_ctx, "\tluma_weight_l1_flag = %d\n", p->luma_weight_l1_flag);
1647 if (p->luma_weight_l1_flag) {
1648 for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) {
1649 va_TraceMsg(trace_ctx, "\t\t%d\t\t%d\n",
1650 p->luma_weight_l1[i],
1651 p->luma_offset_l1[i]);
1655 va_TraceMsg(trace_ctx, "\tchroma_weight_l1_flag = %d\n", p->chroma_weight_l1_flag);
1656 if (p->chroma_weight_l1_flag && p->num_ref_idx_l1_active_minus1 < 32) {
1657 for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) {
1658 va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n",
1659 p->chroma_weight_l1[i][0],
1660 p->chroma_offset_l1[i][0],
1661 p->chroma_weight_l1[i][1],
1662 p->chroma_offset_l1[i][1]);
1665 va_TraceMsg(trace_ctx, NULL);
1667 va_TraceMsg(trace_ctx, "\tcabac_init_idc = %d\n", p->cabac_init_idc);
1668 va_TraceMsg(trace_ctx, "\tslice_qp_delta = %d\n", p->slice_qp_delta);
1669 va_TraceMsg(trace_ctx, "\tdisable_deblocking_filter_idc = %d\n", p->disable_deblocking_filter_idc);
1670 va_TraceMsg(trace_ctx, "\tslice_alpha_c0_offset_div2 = %d\n", p->slice_alpha_c0_offset_div2);
1671 va_TraceMsg(trace_ctx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
1672 va_TraceMsg(trace_ctx, NULL);
1678 static void va_TraceVAEncPackedHeaderParameterBufferType(
1680 VAContextID context,
1684 unsigned int num_elements,
1687 VAEncPackedHeaderParameterBuffer* p = (VAEncPackedHeaderParameterBuffer*)data;
1693 va_TraceMsg(trace_ctx, "\t--VAEncPackedHeaderParameterBuffer\n");
1694 va_TraceMsg(trace_ctx, "\ttype = 0x%08x\n", p->type);
1695 va_TraceMsg(trace_ctx, "\tbit_length = %d\n", p->bit_length);
1696 va_TraceMsg(trace_ctx, "\thas_emulation_bytes = %d\n", p->has_emulation_bytes);
1697 va_TraceMsg(trace_ctx, NULL);
1702 static void va_TraceVAEncMiscParameterBuffer(
1704 VAContextID context,
1708 unsigned int num_elements,
1711 VAEncMiscParameterBuffer* tmp = (VAEncMiscParameterBuffer*)data;
1714 switch (tmp->type) {
1715 case VAEncMiscParameterTypeFrameRate:
1717 VAEncMiscParameterFrameRate *p = (VAEncMiscParameterFrameRate *)tmp->data;
1718 va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterFrameRate\n");
1719 va_TraceMsg(trace_ctx, "\tframerate = %d\n", p->framerate);
1723 case VAEncMiscParameterTypeRateControl:
1725 VAEncMiscParameterRateControl *p = (VAEncMiscParameterRateControl *)tmp->data;
1727 va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterRateControl\n");
1728 va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
1729 va_TraceMsg(trace_ctx, "\ttarget_percentage = %d\n", p->target_percentage);
1730 va_TraceMsg(trace_ctx, "\twindow_size = %d\n", p->window_size);
1731 va_TraceMsg(trace_ctx, "\tinitial_qp = %d\n", p->initial_qp);
1732 va_TraceMsg(trace_ctx, "\tmin_qp = %d\n", p->min_qp);
1733 va_TraceMsg(trace_ctx, "\tbasic_unit_size = %d\n", p->basic_unit_size);
1734 va_TraceMsg(trace_ctx, "\trc_flags.reset = %d \n", p->rc_flags.bits.reset);
1735 va_TraceMsg(trace_ctx, "\trc_flags.disable_frame_skip = %d\n", p->rc_flags.bits.disable_frame_skip);
1736 va_TraceMsg(trace_ctx, "\trc_flags.disable_bit_stuffing = %d\n", p->rc_flags.bits.disable_bit_stuffing);
1739 case VAEncMiscParameterTypeMaxSliceSize:
1741 VAEncMiscParameterMaxSliceSize *p = (VAEncMiscParameterMaxSliceSize *)tmp->data;
1743 va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterTypeMaxSliceSize\n");
1744 va_TraceMsg(trace_ctx, "\tmax_slice_size = %d\n", p->max_slice_size);
1747 case VAEncMiscParameterTypeAIR:
1749 VAEncMiscParameterAIR *p = (VAEncMiscParameterAIR *)tmp->data;
1751 va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterAIR\n");
1752 va_TraceMsg(trace_ctx, "\tair_num_mbs = %d\n", p->air_num_mbs);
1753 va_TraceMsg(trace_ctx, "\tair_threshold = %d\n", p->air_threshold);
1754 va_TraceMsg(trace_ctx, "\tair_auto = %d\n", p->air_auto);
1757 case VAEncMiscParameterTypeHRD:
1759 VAEncMiscParameterHRD *p = (VAEncMiscParameterHRD *)tmp->data;
1761 va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterHRD\n");
1762 va_TraceMsg(trace_ctx, "\tinitial_buffer_fullness = %d\n", p->initial_buffer_fullness);
1763 va_TraceMsg(trace_ctx, "\tbuffer_size = %d\n", p->buffer_size);
1766 case VAEncMiscParameterTypeMaxFrameSize:
1768 VAEncMiscParameterBufferMaxFrameSize *p = (VAEncMiscParameterBufferMaxFrameSize *)tmp->data;
1770 va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterTypeMaxFrameSize\n");
1771 va_TraceMsg(trace_ctx, "\tmax_frame_size = %d\n", p->max_frame_size);
1775 va_TraceMsg(trace_ctx, "Unknown VAEncMiscParameterBuffer(type = %d):\n", tmp->type);
1776 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, data);
1779 va_TraceMsg(trace_ctx, NULL);
1785 static void va_TraceVAPictureParameterBufferVC1(
1787 VAContextID context,
1791 unsigned int num_elements,
1795 VAPictureParameterBufferVC1* p = (VAPictureParameterBufferVC1*)data;
1798 va_TraceMsg(trace_ctx, "\t--VAPictureParameterBufferVC1\n");
1800 va_TraceMsg(trace_ctx, "\tforward_reference_picture = 0x%08x\n", p->forward_reference_picture);
1801 va_TraceMsg(trace_ctx, "\tbackward_reference_picture = 0x%08x\n", p->backward_reference_picture);
1802 va_TraceMsg(trace_ctx, "\tinloop_decoded_picture = 0x%08x\n", p->inloop_decoded_picture);
1804 va_TraceMsg(trace_ctx, "\tpulldown = %d\n", p->sequence_fields.bits.pulldown);
1805 va_TraceMsg(trace_ctx, "\tinterlace = %d\n", p->sequence_fields.bits.interlace);
1806 va_TraceMsg(trace_ctx, "\ttfcntrflag = %d\n", p->sequence_fields.bits.tfcntrflag);
1807 va_TraceMsg(trace_ctx, "\tfinterpflag = %d\n", p->sequence_fields.bits.finterpflag);
1808 va_TraceMsg(trace_ctx, "\tpsf = %d\n", p->sequence_fields.bits.psf);
1809 va_TraceMsg(trace_ctx, "\tmultires = %d\n", p->sequence_fields.bits.multires);
1810 va_TraceMsg(trace_ctx, "\toverlap = %d\n", p->sequence_fields.bits.overlap);
1811 va_TraceMsg(trace_ctx, "\tsyncmarker = %d\n", p->sequence_fields.bits.syncmarker);
1812 va_TraceMsg(trace_ctx, "\trangered = %d\n", p->sequence_fields.bits.rangered);
1813 va_TraceMsg(trace_ctx, "\tmax_b_frames = %d\n", p->sequence_fields.bits.max_b_frames);
1814 va_TraceMsg(trace_ctx, "\tprofile = %d\n", p->sequence_fields.bits.profile);
1815 va_TraceMsg(trace_ctx, "\tcoded_width = %d\n", p->coded_width);
1816 va_TraceMsg(trace_ctx, "\tcoded_height = %d\n", p->coded_height);
1817 va_TraceMsg(trace_ctx, "\tclosed_entry = %d\n", p->entrypoint_fields.bits.closed_entry);
1818 va_TraceMsg(trace_ctx, "\tbroken_link = %d\n", p->entrypoint_fields.bits.broken_link);
1819 va_TraceMsg(trace_ctx, "\tclosed_entry = %d\n", p->entrypoint_fields.bits.closed_entry);
1820 va_TraceMsg(trace_ctx, "\tpanscan_flag = %d\n", p->entrypoint_fields.bits.panscan_flag);
1821 va_TraceMsg(trace_ctx, "\tloopfilter = %d\n", p->entrypoint_fields.bits.loopfilter);
1822 va_TraceMsg(trace_ctx, "\tconditional_overlap_flag = %d\n", p->conditional_overlap_flag);
1823 va_TraceMsg(trace_ctx, "\tfast_uvmc_flag = %d\n", p->fast_uvmc_flag);
1824 va_TraceMsg(trace_ctx, "\trange_mapping_luma_flag = %d\n", p->range_mapping_fields.bits.luma_flag);
1825 va_TraceMsg(trace_ctx, "\trange_mapping_luma = %d\n", p->range_mapping_fields.bits.luma);
1826 va_TraceMsg(trace_ctx, "\trange_mapping_chroma_flag = %d\n", p->range_mapping_fields.bits.chroma_flag);
1827 va_TraceMsg(trace_ctx, "\trange_mapping_chroma = %d\n", p->range_mapping_fields.bits.chroma);
1828 va_TraceMsg(trace_ctx, "\tb_picture_fraction = %d\n", p->b_picture_fraction);
1829 va_TraceMsg(trace_ctx, "\tcbp_table = %d\n", p->cbp_table);
1830 va_TraceMsg(trace_ctx, "\tmb_mode_table = %d\n", p->mb_mode_table);
1831 va_TraceMsg(trace_ctx, "\trange_reduction_frame = %d\n", p->range_reduction_frame);
1832 va_TraceMsg(trace_ctx, "\trounding_control = %d\n", p->rounding_control);
1833 va_TraceMsg(trace_ctx, "\tpost_processing = %d\n", p->post_processing);
1834 va_TraceMsg(trace_ctx, "\tpicture_resolution_index = %d\n", p->picture_resolution_index);
1835 va_TraceMsg(trace_ctx, "\tluma_scale = %d\n", p->luma_scale);
1836 va_TraceMsg(trace_ctx, "\tluma_shift = %d\n", p->luma_shift);
1837 va_TraceMsg(trace_ctx, "\tpicture_type = %d\n", p->picture_fields.bits.picture_type);
1838 va_TraceMsg(trace_ctx, "\tframe_coding_mode = %d\n", p->picture_fields.bits.frame_coding_mode);
1839 va_TraceMsg(trace_ctx, "\ttop_field_first = %d\n", p->picture_fields.bits.top_field_first);
1840 va_TraceMsg(trace_ctx, "\tis_first_field = %d\n", p->picture_fields.bits.is_first_field);
1841 va_TraceMsg(trace_ctx, "\tintensity_compensation = %d\n", p->picture_fields.bits.intensity_compensation);
1842 va_TraceMsg(trace_ctx, "\tmv_type_mb = %d\n", p->raw_coding.flags.mv_type_mb);
1843 va_TraceMsg(trace_ctx, "\tdirect_mb = %d\n", p->raw_coding.flags.direct_mb);
1844 va_TraceMsg(trace_ctx, "\tskip_mb = %d\n", p->raw_coding.flags.skip_mb);
1845 va_TraceMsg(trace_ctx, "\tfield_tx = %d\n", p->raw_coding.flags.field_tx);
1846 va_TraceMsg(trace_ctx, "\tforward_mb = %d\n", p->raw_coding.flags.forward_mb);
1847 va_TraceMsg(trace_ctx, "\tac_pred = %d\n", p->raw_coding.flags.ac_pred);
1848 va_TraceMsg(trace_ctx, "\toverflags = %d\n", p->raw_coding.flags.overflags);
1849 va_TraceMsg(trace_ctx, "\tbp_mv_type_mb = %d\n", p->bitplane_present.flags.bp_mv_type_mb);
1850 va_TraceMsg(trace_ctx, "\tbp_direct_mb = %d\n", p->bitplane_present.flags.bp_direct_mb);
1851 va_TraceMsg(trace_ctx, "\tbp_skip_mb = %d\n", p->bitplane_present.flags.bp_skip_mb);
1852 va_TraceMsg(trace_ctx, "\tbp_field_tx = %d\n", p->bitplane_present.flags.bp_field_tx);
1853 va_TraceMsg(trace_ctx, "\tbp_forward_mb = %d\n", p->bitplane_present.flags.bp_forward_mb);
1854 va_TraceMsg(trace_ctx, "\tbp_ac_pred = %d\n", p->bitplane_present.flags.bp_ac_pred);
1855 va_TraceMsg(trace_ctx, "\tbp_overflags = %d\n", p->bitplane_present.flags.bp_overflags);
1856 va_TraceMsg(trace_ctx, "\treference_distance_flag = %d\n", p->reference_fields.bits.reference_distance_flag);
1857 va_TraceMsg(trace_ctx, "\treference_distance = %d\n", p->reference_fields.bits.reference_distance);
1858 va_TraceMsg(trace_ctx, "\tnum_reference_pictures = %d\n", p->reference_fields.bits.num_reference_pictures);
1859 va_TraceMsg(trace_ctx, "\treference_field_pic_indicator = %d\n", p->reference_fields.bits.reference_field_pic_indicator);
1860 va_TraceMsg(trace_ctx, "\tmv_mode = %d\n", p->mv_fields.bits.mv_mode);
1861 va_TraceMsg(trace_ctx, "\tmv_mode2 = %d\n", p->mv_fields.bits.mv_mode2);
1862 va_TraceMsg(trace_ctx, "\tmv_table = %d\n", p->mv_fields.bits.mv_table);
1863 va_TraceMsg(trace_ctx, "\ttwo_mv_block_pattern_table = %d\n", p->mv_fields.bits.two_mv_block_pattern_table);
1864 va_TraceMsg(trace_ctx, "\tfour_mv_switch = %d\n", p->mv_fields.bits.four_mv_switch);
1865 va_TraceMsg(trace_ctx, "\tfour_mv_block_pattern_table = %d\n", p->mv_fields.bits.four_mv_block_pattern_table);
1866 va_TraceMsg(trace_ctx, "\textended_mv_flag = %d\n", p->mv_fields.bits.extended_mv_flag);
1867 va_TraceMsg(trace_ctx, "\textended_mv_range = %d\n", p->mv_fields.bits.extended_mv_range);
1868 va_TraceMsg(trace_ctx, "\textended_dmv_flag = %d\n", p->mv_fields.bits.extended_dmv_flag);
1869 va_TraceMsg(trace_ctx, "\textended_dmv_range = %d\n", p->mv_fields.bits.extended_dmv_range);
1870 va_TraceMsg(trace_ctx, "\tdquant = %d\n", p->pic_quantizer_fields.bits.dquant);
1871 va_TraceMsg(trace_ctx, "\tquantizer = %d\n", p->pic_quantizer_fields.bits.quantizer);
1872 va_TraceMsg(trace_ctx, "\thalf_qp = %d\n", p->pic_quantizer_fields.bits.half_qp);
1873 va_TraceMsg(trace_ctx, "\tpic_quantizer_scale = %d\n", p->pic_quantizer_fields.bits.pic_quantizer_scale);
1874 va_TraceMsg(trace_ctx, "\tpic_quantizer_type = %d\n", p->pic_quantizer_fields.bits.pic_quantizer_type);
1875 va_TraceMsg(trace_ctx, "\tdq_frame = %d\n", p->pic_quantizer_fields.bits.dq_frame);
1876 va_TraceMsg(trace_ctx, "\tdq_profile = %d\n", p->pic_quantizer_fields.bits.dq_profile);
1877 va_TraceMsg(trace_ctx, "\tdq_sb_edge = %d\n", p->pic_quantizer_fields.bits.dq_sb_edge);
1878 va_TraceMsg(trace_ctx, "\tdq_db_edge = %d\n", p->pic_quantizer_fields.bits.dq_db_edge);
1879 va_TraceMsg(trace_ctx, "\tdq_binary_level = %d\n", p->pic_quantizer_fields.bits.dq_binary_level);
1880 va_TraceMsg(trace_ctx, "\talt_pic_quantizer = %d\n", p->pic_quantizer_fields.bits.alt_pic_quantizer);
1881 va_TraceMsg(trace_ctx, "\tvariable_sized_transform_flag = %d\n", p->transform_fields.bits.variable_sized_transform_flag);
1882 va_TraceMsg(trace_ctx, "\tmb_level_transform_type_flag = %d\n", p->transform_fields.bits.mb_level_transform_type_flag);
1883 va_TraceMsg(trace_ctx, "\tframe_level_transform_type = %d\n", p->transform_fields.bits.frame_level_transform_type);
1884 va_TraceMsg(trace_ctx, "\ttransform_ac_codingset_idx1 = %d\n", p->transform_fields.bits.transform_ac_codingset_idx1);
1885 va_TraceMsg(trace_ctx, "\ttransform_ac_codingset_idx2 = %d\n", p->transform_fields.bits.transform_ac_codingset_idx2);
1886 va_TraceMsg(trace_ctx, "\tintra_transform_dc_table = %d\n", p->transform_fields.bits.intra_transform_dc_table);
1887 va_TraceMsg(trace_ctx, NULL);
1890 static void va_TraceVASliceParameterBufferVC1(
1892 VAContextID context,
1896 unsigned int num_elements,
1900 VASliceParameterBufferVC1 *p = (VASliceParameterBufferVC1*)data;
1903 trace_ctx->trace_slice_no++;
1904 trace_ctx->trace_slice_size = p->slice_data_size;
1906 va_TraceMsg(trace_ctx, "\t--VASliceParameterBufferVC1\n");
1907 va_TraceMsg(trace_ctx, "\tslice_data_size = %d\n", p->slice_data_size);
1908 va_TraceMsg(trace_ctx, "\tslice_data_offset = %d\n", p->slice_data_offset);
1909 va_TraceMsg(trace_ctx, "\tslice_data_flag = %d\n", p->slice_data_flag);
1910 va_TraceMsg(trace_ctx, "\tmacroblock_offset = %d\n", p->macroblock_offset);
1911 va_TraceMsg(trace_ctx, "\tslice_vertical_position = %d\n", p->slice_vertical_position);
1912 va_TraceMsg(trace_ctx, NULL);
1915 static void va_TraceVAPictureParameterBufferVP8(
1917 VAContextID context,
1921 unsigned int num_elements,
1925 VAPictureParameterBufferVP8 *p = (VAPictureParameterBufferVP8 *)data;
1929 va_TraceMsg(trace_ctx, "\t--VAPictureParameterBufferVP8\n");
1931 va_TraceMsg(trace_ctx, "\tframe_width = %d\n", p->frame_width);
1932 va_TraceMsg(trace_ctx, "\tframe_height = %d\n", p->frame_height);
1933 va_TraceMsg(trace_ctx, "\tlast_ref_frame = %x\n", p->last_ref_frame);
1934 va_TraceMsg(trace_ctx, "\tgolden_ref_frame = %x\n", p->golden_ref_frame);
1935 va_TraceMsg(trace_ctx, "\talt_ref_frame = %x\n", p->alt_ref_frame);
1936 va_TraceMsg(trace_ctx, "\tout_of_loop_frame = %x\n", p->out_of_loop_frame);
1938 va_TraceMsg(trace_ctx, "\tkey_frame = %d\n", p->pic_fields.bits.key_frame);
1939 va_TraceMsg(trace_ctx, "\tversion = %d\n", p->pic_fields.bits.version);
1940 va_TraceMsg(trace_ctx, "\tsegmentation_enabled = %d\n", p->pic_fields.bits.segmentation_enabled);
1941 va_TraceMsg(trace_ctx, "\tupdate_mb_segmentation_map = %d\n", p->pic_fields.bits.update_mb_segmentation_map);
1942 va_TraceMsg(trace_ctx, "\tupdate_segment_feature_data = %d\n", p->pic_fields.bits.update_segment_feature_data);
1943 va_TraceMsg(trace_ctx, "\tfilter_type = %d\n", p->pic_fields.bits.filter_type);
1944 va_TraceMsg(trace_ctx, "\tsharpness_level = %d\n", p->pic_fields.bits.sharpness_level);
1945 va_TraceMsg(trace_ctx, "\tloop_filter_adj_enable = %d\n", p->pic_fields.bits.loop_filter_adj_enable);
1946 va_TraceMsg(trace_ctx, "\tmode_ref_lf_delta_update = %d\n", p->pic_fields.bits.mode_ref_lf_delta_update);
1947 va_TraceMsg(trace_ctx, "\tsign_bias_golden = %d\n", p->pic_fields.bits.sign_bias_golden);
1948 va_TraceMsg(trace_ctx, "\tsign_bias_alternate = %d\n", p->pic_fields.bits.sign_bias_alternate);
1949 va_TraceMsg(trace_ctx, "\tmb_no_coeff_skip = %d\n", p->pic_fields.bits.mb_no_coeff_skip);
1950 va_TraceMsg(trace_ctx, "\tloop_filter_disable = %d\n", p->pic_fields.bits.loop_filter_disable);
1952 va_TraceMsg(trace_ctx, "\tmb_segment_tree_probs: 0x%2x, 0x%2x, 0x%2x\n",
1953 p->mb_segment_tree_probs[0], p->mb_segment_tree_probs[1], p->mb_segment_tree_probs[2]);
1955 va_TraceMsg(trace_ctx, "\tloop_filter_level: %d, %d, %d, %d\n",
1956 p->loop_filter_level[0], p->loop_filter_level[1], p->loop_filter_level[2], p->loop_filter_level[3]);
1958 va_TraceMsg(trace_ctx, "\tloop_filter_deltas_ref_frame: %d, %d, %d, %d\n",
1959 p->loop_filter_deltas_ref_frame[0], p->loop_filter_deltas_ref_frame[1], p->loop_filter_deltas_ref_frame[2], p->loop_filter_deltas_ref_frame[3]);
1961 va_TraceMsg(trace_ctx, "\tloop_filter_deltas_mode: %d, %d, %d, %d\n",
1962 p->loop_filter_deltas_mode[0], p->loop_filter_deltas_mode[1], p->loop_filter_deltas_mode[2], p->loop_filter_deltas_mode[3]);
1964 va_TraceMsg(trace_ctx, "\tprob_skip_false = %2x\n", p->prob_skip_false);
1965 va_TraceMsg(trace_ctx, "\tprob_intra = %2x\n", p->prob_intra);
1966 va_TraceMsg(trace_ctx, "\tprob_last = %2x\n", p->prob_last);
1967 va_TraceMsg(trace_ctx, "\tprob_gf = %2x\n", p->prob_gf);
1969 va_TraceMsg(trace_ctx, "\ty_mode_probs: 0x%2x, 0x%2x, 0x%2x, 0x%2x\n",
1970 p->y_mode_probs[0], p->y_mode_probs[1], p->y_mode_probs[2], p->y_mode_probs[3]);
1972 va_TraceMsg(trace_ctx, "\tuv_mode_probs: 0x%2x, 0x%2x, 0x%2x\n",
1973 p->uv_mode_probs[0], p->uv_mode_probs[1], p->uv_mode_probs[2]);
1975 va_TraceMsg(trace_ctx, "\tmv_probs[2][19]:\n");
1976 for(i = 0; i<2; ++i) {
1977 memset(tmp, 0, sizeof tmp);
1978 for (j=0; j<19; j++)
1979 sprintf(tmp + strlen(tmp), "%2x ", p->mv_probs[i][j]);
1980 va_TraceMsg(trace_ctx,"\t\t[%d] = %s\n", i, tmp);
1983 va_TraceMsg(trace_ctx, "\tbool_coder_ctx: range = %02x, value = %02x, count = %d\n",
1984 p->bool_coder_ctx.range, p->bool_coder_ctx.value, p->bool_coder_ctx.count);
1986 va_TraceMsg(trace_ctx, NULL);
1991 static void va_TraceVASliceParameterBufferVP8(
1993 VAContextID context,
1997 unsigned int num_elements,
2000 VASliceParameterBufferVP8 *p = (VASliceParameterBufferVP8 *)data;
2004 va_TraceMsg(trace_ctx, "\t--VASliceParameterBufferVP8\n");
2006 va_TraceMsg(trace_ctx, "\tslice_data_size = %d\n", p->slice_data_size);
2007 va_TraceMsg(trace_ctx, "\tslice_data_offset = %d\n", p->slice_data_offset);
2008 va_TraceMsg(trace_ctx, "\tslice_data_flag = %d\n", p->slice_data_flag);
2009 va_TraceMsg(trace_ctx, "\tmacroblock_offset = %d\n", p->macroblock_offset);
2010 va_TraceMsg(trace_ctx, "\tnum_of_partitions = %d\n", p->num_of_partitions);
2012 for(i = 0; i<9; ++i)
2013 va_TraceMsg(trace_ctx, "\tpartition_size[%d] = %d\n", i, p->partition_size[i]);
2015 va_TraceMsg(trace_ctx, NULL);
2020 static void va_TraceVAIQMatrixBufferVP8(
2022 VAContextID context,
2026 unsigned int num_elements,
2030 VAIQMatrixBufferVP8 *p = (VAIQMatrixBufferVP8 *)data;
2034 va_TraceMsg(trace_ctx, "\t--VAIQMatrixBufferVP8\n");
2036 va_TraceMsg(trace_ctx, "\tquantization_index[4][6]=\n");
2037 for (i = 0; i < 4; i++) {
2038 memset(tmp, 0, sizeof tmp);
2039 for (j = 0; j < 6; j++)
2040 sprintf(tmp + strlen(tmp), "%4x, ", p->quantization_index[i][j]);
2041 va_TraceMsg(trace_ctx,"\t\t[%d] = %s\n", i, tmp);
2044 va_TraceMsg(trace_ctx, NULL);
2048 static void va_TraceVAProbabilityBufferVP8(
2050 VAContextID context,
2054 unsigned int num_elements,
2058 VAProbabilityDataBufferVP8 *p = (VAProbabilityDataBufferVP8 *)data;
2062 va_TraceMsg(trace_ctx, "\t--VAProbabilityDataBufferVP8\n");
2064 for (i = 0; i < 4; i++)
2065 for (j = 0; j < 8; j++) {
2066 memset(tmp, 0, sizeof tmp);
2068 for (l=0; l<11; l++)
2069 sprintf(tmp + strlen(tmp), "%2x, ", p->dct_coeff_probs[i][j][k][l]);
2070 va_TraceMsg(trace_ctx,"\t\t[%d, %d] = %s\n", i, j, tmp);
2073 va_TraceMsg(trace_ctx, NULL);
2078 void va_TraceBeginPicture(
2080 VAContextID context,
2081 VASurfaceID render_target
2086 TRACE_FUNCNAME(idx);
2088 va_TraceMsg(trace_ctx, "\tcontext = 0x%08x\n", context);
2089 va_TraceMsg(trace_ctx, "\trender_targets = 0x%08x\n", render_target);
2090 va_TraceMsg(trace_ctx, "\tframe_count = #%d\n", trace_ctx->trace_frame_no);
2091 va_TraceMsg(trace_ctx, NULL);
2093 trace_ctx->trace_rendertarget = render_target; /* for surface data dump after vaEndPicture */
2095 trace_ctx->trace_frame_no++;
2096 trace_ctx->trace_slice_no = 0;
2099 static void va_TraceMPEG2Buf(
2101 VAContextID context,
2105 unsigned int num_elements,
2110 case VAPictureParameterBufferType:
2111 va_TraceVAPictureParameterBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf);
2113 case VAIQMatrixBufferType:
2114 va_TraceVAIQMatrixBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf);
2116 case VABitPlaneBufferType:
2117 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2119 case VASliceGroupMapBufferType:
2120 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2122 case VASliceParameterBufferType:
2123 va_TraceVASliceParameterBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf);
2125 case VASliceDataBufferType:
2126 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2128 case VAMacroblockParameterBufferType:
2129 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2131 case VAResidualDataBufferType:
2132 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2134 case VADeblockingParameterBufferType:
2135 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2137 case VAImageBufferType:
2139 case VAProtectedSliceDataBufferType:
2140 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2142 case VAEncCodedBufferType:
2144 case VAEncSequenceParameterBufferType:
2146 case VAEncPictureParameterBufferType:
2148 case VAEncSliceParameterBufferType:
2155 static void va_TraceVAEncSequenceParameterBufferH263(
2157 VAContextID context,
2161 unsigned int num_elements,
2164 VAEncSequenceParameterBufferH263 *p = (VAEncSequenceParameterBufferH263 *)data;
2167 va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferH263\n");
2169 va_TraceMsg(trace_ctx, "\tintra_period = %d\n", p->intra_period);
2170 va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
2171 va_TraceMsg(trace_ctx, "\tframe_rate = %d\n", p->frame_rate);
2172 va_TraceMsg(trace_ctx, "\tinitial_qp = %d\n", p->initial_qp);
2173 va_TraceMsg(trace_ctx, "\tmin_qp = %d\n", p->min_qp);
2174 va_TraceMsg(trace_ctx, NULL);
2180 static void va_TraceVAEncPictureParameterBufferH263(
2182 VAContextID context,
2186 unsigned int num_elements,
2189 VAEncPictureParameterBufferH263 *p = (VAEncPictureParameterBufferH263 *)data;
2192 va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferH263\n");
2193 va_TraceMsg(trace_ctx, "\treference_picture = 0x%08x\n", p->reference_picture);
2194 va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture);
2195 va_TraceMsg(trace_ctx, "\tcoded_buf = %08x\n", p->coded_buf);
2196 va_TraceMsg(trace_ctx, "\tpicture_width = %d\n", p->picture_width);
2197 va_TraceMsg(trace_ctx, "\tpicture_height = %d\n", p->picture_height);
2198 va_TraceMsg(trace_ctx, "\tpicture_type = 0x%08x\n", p->picture_type);
2199 va_TraceMsg(trace_ctx, NULL);
2204 static void va_TraceVAEncPictureParameterBufferJPEG(
2206 VAContextID context,
2210 unsigned int num_elements,
2213 VAEncPictureParameterBufferJPEG *p = (VAEncPictureParameterBufferJPEG *)data;
2218 va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferJPEG\n");
2219 va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture);
2220 va_TraceMsg(trace_ctx, "\tcoded_buf = %08x\n", p->coded_buf);
2221 va_TraceMsg(trace_ctx, "\tpicture_width = %d\n", p->picture_width);
2222 va_TraceMsg(trace_ctx, "\tpicture_height = %d\n", p->picture_height);
2223 va_TraceMsg(trace_ctx, "\tpic_flags.bits.profile = %d\n", p->pic_flags.bits.profile);
2224 va_TraceMsg(trace_ctx, "\tpic_flags.bits.progressive = %d\n", p->pic_flags.bits.profile);
2225 va_TraceMsg(trace_ctx, "\tpic_flags.bits.huffman = %d\n", p->pic_flags.bits.huffman);
2226 va_TraceMsg(trace_ctx, "\tpic_flags.bits.interleaved = %d\n", p->pic_flags.bits.interleaved);
2227 va_TraceMsg(trace_ctx, "\tpic_flags.bits.differential = %d\n", p->pic_flags.bits.differential);
2228 va_TraceMsg(trace_ctx, "\tsample_bit_depth = %d\n", p->sample_bit_depth);
2229 va_TraceMsg(trace_ctx, "\tnum_scan = %d\n", p->num_scan);
2230 va_TraceMsg(trace_ctx, "\tnum_components = %d\n", p->num_components);
2231 for (i=0; i<p->num_components; i++)
2232 va_TraceMsg(trace_ctx, "\tcomponent_id[%d] = %d\n", i, p->component_id[i]);
2235 va_TraceMsg(trace_ctx, "\tquality = %d\n", p->quality);
2237 va_TraceMsg(trace_ctx, "\tquantiser_table_selector[] = %d %d %d %d\n",
2238 p->quantiser_table_selector[0],
2239 p->quantiser_table_selector[1],
2240 p->quantiser_table_selector[2],
2241 p->quantiser_table_selector[3]);
2243 va_TraceMsg(trace_ctx, NULL);
2248 static void va_TraceVAEncQMatrixBufferJPEG(
2250 VAContextID context,
2254 unsigned int num_elements,
2257 VAQMatrixBufferJPEG *p = (VAQMatrixBufferJPEG *)data;
2260 va_TraceMsg(trace_ctx, "\t--VAQMatrixBufferJPEG\n");
2261 va_TraceMsg(trace_ctx, "\tload_lum_quantiser_matrix = %d", p->load_lum_quantiser_matrix);
2262 if (p->load_lum_quantiser_matrix) {
2264 for (i = 0; i < 64; i++) {
2266 va_TraceMsg(trace_ctx, "\n\t");
2267 va_TraceMsg(trace_ctx, "\t0x%02x", p->lum_quantiser_matrix[i]);
2269 va_TraceMsg(trace_ctx, "\n");
2271 va_TraceMsg(trace_ctx, "\tload_chroma_quantiser_matrix = %08x\n", p->load_chroma_quantiser_matrix);
2272 if (p->load_chroma_quantiser_matrix) {
2274 for (i = 0; i < 64; i++) {
2276 va_TraceMsg(trace_ctx, "\n\t");
2277 va_TraceMsg(trace_ctx, "\t0x%02x", p->chroma_quantiser_matrix[i]);
2279 va_TraceMsg(trace_ctx, "\n");
2282 va_TraceMsg(trace_ctx, NULL);
2288 static void va_TraceVAEncSliceParameterBufferJPEG(
2290 VAContextID context,
2294 unsigned int num_elements,
2297 VAEncSliceParameterBufferJPEG *p = (VAEncSliceParameterBufferJPEG *)data;
2302 va_TraceMsg(trace_ctx, "\t--VAEncSliceParameterBufferJPEG\n");
2303 va_TraceMsg(trace_ctx, "\trestart_interval = 0x%04x\n", p->restart_interval);
2304 va_TraceMsg(trace_ctx, "\tnum_components = 0x%08x\n", p->num_components);
2305 for (i=0; i<4; i++) {
2306 va_TraceMsg(trace_ctx, "\tcomponents[%i] =\n ");
2307 va_TraceMsg(trace_ctx, "\t\tcomponent_selector = %d\n", p->components[i].component_selector);
2308 va_TraceMsg(trace_ctx, "\t\tdc_table_selector = %d\n", p->components[i].dc_table_selector);
2309 va_TraceMsg(trace_ctx, "\t\tac_table_selector = %d\n", p->components[i].ac_table_selector);
2312 va_TraceMsg(trace_ctx, NULL);
2318 static void va_TraceH263Buf(
2320 VAContextID context,
2324 unsigned int num_elements,
2329 case VAPictureParameterBufferType:/* print MPEG4 buffer */
2330 va_TraceVAPictureParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2332 case VAIQMatrixBufferType:/* print MPEG4 buffer */
2333 va_TraceVAIQMatrixBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2335 case VABitPlaneBufferType:/* print MPEG4 buffer */
2336 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2338 case VASliceGroupMapBufferType:
2340 case VASliceParameterBufferType:/* print MPEG4 buffer */
2341 va_TraceVASliceParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2343 case VASliceDataBufferType:
2344 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2346 case VAMacroblockParameterBufferType:
2347 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2349 case VAResidualDataBufferType:
2350 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2352 case VADeblockingParameterBufferType:
2353 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2355 case VAImageBufferType:
2357 case VAProtectedSliceDataBufferType:
2358 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2360 case VAEncCodedBufferType:
2362 case VAEncSequenceParameterBufferType:
2363 va_TraceVAEncSequenceParameterBufferH263(dpy, context, buffer, type, size, num_elements, pbuf);
2365 case VAEncPictureParameterBufferType:
2366 va_TraceVAEncPictureParameterBufferH263(dpy, context, buffer, type, size, num_elements, pbuf);
2368 case VAEncSliceParameterBufferType:
2369 va_TraceVAEncSliceParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2371 case VAEncPackedHeaderParameterBufferType:
2372 va_TraceVAEncPackedHeaderParameterBufferType(dpy, context, buffer, type, size, num_elements, pbuf);
2375 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2381 static void va_TraceJPEGBuf(
2383 VAContextID context,
2387 unsigned int num_elements,
2392 case VABitPlaneBufferType:
2393 case VASliceGroupMapBufferType:
2394 case VASliceDataBufferType:
2395 case VAMacroblockParameterBufferType:
2396 case VAResidualDataBufferType:
2397 case VADeblockingParameterBufferType:
2398 case VAImageBufferType:
2399 case VAProtectedSliceDataBufferType:
2400 case VAEncCodedBufferType:
2401 case VAEncSequenceParameterBufferType:
2402 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2404 case VAEncSliceParameterBufferType:
2405 va_TraceVAEncSliceParameterBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2407 case VAPictureParameterBufferType:
2408 va_TraceVAPictureParameterBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2410 case VAIQMatrixBufferType:
2411 va_TraceVAIQMatrixBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2413 case VASliceParameterBufferType:
2414 va_TraceVASliceParameterBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2416 case VAHuffmanTableBufferType:
2417 va_TraceVAHuffmanTableBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2419 case VAEncPictureParameterBufferType:
2420 va_TraceVAEncPictureParameterBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2422 case VAQMatrixBufferType:
2423 va_TraceVAEncQMatrixBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2426 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2431 static void va_TraceMPEG4Buf(
2433 VAContextID context,
2437 unsigned int num_elements,
2442 case VAPictureParameterBufferType:
2443 va_TraceVAPictureParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2445 case VAIQMatrixBufferType:
2446 va_TraceVAIQMatrixBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2448 case VABitPlaneBufferType:
2449 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2451 case VASliceGroupMapBufferType:
2453 case VASliceParameterBufferType:
2454 va_TraceVASliceParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2456 case VASliceDataBufferType:
2457 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2459 case VAMacroblockParameterBufferType:
2460 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2462 case VAResidualDataBufferType:
2463 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2465 case VADeblockingParameterBufferType:
2466 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2468 case VAImageBufferType:
2470 case VAProtectedSliceDataBufferType:
2471 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2473 case VAEncCodedBufferType:
2475 case VAEncSequenceParameterBufferType:
2476 va_TraceVAEncSequenceParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2478 case VAEncPictureParameterBufferType:
2479 va_TraceVAEncPictureParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2481 case VAEncSliceParameterBufferType:
2482 va_TraceVAEncSliceParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2485 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2491 static void va_TraceH264Buf(
2493 VAContextID context,
2497 unsigned int num_elements,
2504 case VAPictureParameterBufferType:
2505 va_TraceVAPictureParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2507 case VAIQMatrixBufferType:
2508 va_TraceVAIQMatrixBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2510 case VABitPlaneBufferType:
2511 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2513 case VASliceGroupMapBufferType:
2514 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2516 case VASliceParameterBufferType:
2517 va_TraceVASliceParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2519 case VASliceDataBufferType:
2520 va_TraceVABuffers(dpy, context, buffer, type, trace_ctx->trace_slice_size, num_elements, pbuf);
2522 case VAMacroblockParameterBufferType:
2523 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2525 case VAResidualDataBufferType:
2526 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2528 case VADeblockingParameterBufferType:
2529 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2531 case VAImageBufferType:
2533 case VAProtectedSliceDataBufferType:
2534 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2536 case VAEncCodedBufferType:
2538 case VAEncSequenceParameterBufferType:
2539 va_TraceVAEncSequenceParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2541 case VAEncPictureParameterBufferType:
2542 va_TraceVAEncPictureParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2544 case VAEncSliceParameterBufferType:
2545 if (size == sizeof(VAEncSliceParameterBuffer))
2546 va_TraceVAEncSliceParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2548 va_TraceVAEncSliceParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2550 case VAEncPackedHeaderParameterBufferType:
2551 va_TraceVAEncPackedHeaderParameterBufferType(dpy, context, buffer, type, size, num_elements, pbuf);
2554 case VAEncMiscParameterBufferType:
2555 va_TraceVAEncMiscParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2558 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2563 static void va_TraceVP8Buf(
2565 VAContextID context,
2569 unsigned int num_elements,
2576 case VAPictureParameterBufferType:
2577 va_TraceVAPictureParameterBufferVP8(dpy, context, buffer, type, size, num_elements, pbuf);
2579 case VAIQMatrixBufferType:
2580 va_TraceVAIQMatrixBufferVP8(dpy, context, buffer, type, size, num_elements, pbuf);
2582 case VABitPlaneBufferType:
2584 case VASliceGroupMapBufferType:
2586 case VASliceParameterBufferType:
2587 va_TraceVASliceParameterBufferVP8(dpy, context, buffer, type, size, num_elements, pbuf);
2589 case VASliceDataBufferType:
2591 case VAProbabilityBufferType:
2592 va_TraceVAProbabilityBufferVP8(dpy, context, buffer, type, size, num_elements, pbuf);
2594 case VAMacroblockParameterBufferType:
2596 case VAResidualDataBufferType:
2598 case VADeblockingParameterBufferType:
2600 case VAImageBufferType:
2602 case VAProtectedSliceDataBufferType:
2604 case VAEncCodedBufferType:
2606 case VAEncSequenceParameterBufferType:
2608 case VAEncPictureParameterBufferType:
2610 case VAEncSliceParameterBufferType:
2612 case VAEncPackedHeaderParameterBufferType:
2614 case VAEncMiscParameterBufferType:
2617 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2622 static void va_TraceVC1Buf(
2624 VAContextID context,
2628 unsigned int num_elements,
2635 case VAPictureParameterBufferType:
2636 va_TraceVAPictureParameterBufferVC1(dpy, context, buffer, type, size, num_elements, pbuf);
2638 case VAIQMatrixBufferType:
2640 case VABitPlaneBufferType:
2641 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2643 case VASliceGroupMapBufferType:
2644 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2646 case VASliceParameterBufferType:
2647 va_TraceVASliceParameterBufferVC1(dpy, context, buffer, type, size, num_elements, pbuf);
2649 case VASliceDataBufferType:
2650 va_TraceVABuffers(dpy, context, buffer, type, trace_ctx->trace_slice_size, num_elements, pbuf);
2652 case VAMacroblockParameterBufferType:
2653 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2655 case VAResidualDataBufferType:
2656 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2658 case VADeblockingParameterBufferType:
2659 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2661 case VAImageBufferType:
2663 case VAProtectedSliceDataBufferType:
2664 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2666 case VAEncCodedBufferType:
2668 case VAEncSequenceParameterBufferType:
2669 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2671 case VAEncPictureParameterBufferType:
2672 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2674 case VAEncSliceParameterBufferType:
2675 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2678 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2684 va_TraceProcFilterParameterBufferDeinterlacing(
2686 VAContextID context,
2687 VAProcFilterParameterBufferBase *base
2690 VAProcFilterParameterBufferDeinterlacing *deint = (VAProcFilterParameterBufferDeinterlacing *)base;
2694 va_TraceMsg(trace_ctx, "\t type = %d\n", deint->type);
2695 va_TraceMsg(trace_ctx, "\t algorithm = %d\n", deint->algorithm);
2696 va_TraceMsg(trace_ctx, "\t flags = %d\n", deint->flags);
2700 va_TraceProcFilterParameterBufferColorBalance(
2702 VAContextID context,
2703 VAProcFilterParameterBufferBase *base
2706 VAProcFilterParameterBufferColorBalance *color_balance = (VAProcFilterParameterBufferColorBalance *)base;
2710 va_TraceMsg(trace_ctx, "\t type = %d\n", color_balance->type);
2711 va_TraceMsg(trace_ctx, "\t attrib = %d\n", color_balance->attrib);
2712 va_TraceMsg(trace_ctx, "\t value = %f\n", color_balance->value);
2716 va_TraceProcFilterParameterBufferBase(
2718 VAContextID context,
2719 VAProcFilterParameterBufferBase *base
2724 va_TraceMsg(trace_ctx, "\t type = %d\n", base->type);
2728 va_TraceProcFilterParameterBuffer(
2730 VAContextID context,
2731 VABufferID *filters,
2732 unsigned int num_filters
2737 unsigned int num_elements;
2738 VAProcFilterParameterBufferBase *base_filter = NULL;
2743 if (num_filters == 0 || filters == NULL) {
2744 va_TraceMsg(trace_ctx, "\t num_filters = %d\n", num_filters);
2745 va_TraceMsg(trace_ctx, "\t filters = %p\n", filters);
2749 va_TraceMsg(trace_ctx, "\t num_filters = %d\n", num_filters);
2751 /* get buffer type information */
2752 for (i = 0; i < num_filters; i++) {
2753 vaBufferInfo(dpy, context, filters[i], &type, &size, &num_elements);
2755 if (type != VAProcFilterParameterBufferType) {
2756 va_TraceMsg(trace_ctx, "\t filters[%d] = 0x%08x (INVALID)\n", i, filters[i]);
2759 va_TraceMsg(trace_ctx, "\t filters[%d] = 0x%08x\n", i, filters[i]);
2763 vaMapBuffer(dpy, filters[i], (void **)&base_filter);
2765 if (base_filter == NULL) {
2766 vaUnmapBuffer(dpy, filters[i]);
2770 switch (base_filter->type) {
2771 case VAProcFilterDeinterlacing:
2772 va_TraceProcFilterParameterBufferDeinterlacing(dpy,
2776 case VAProcFilterColorBalance:
2777 va_TraceProcFilterParameterBufferColorBalance(dpy,
2782 va_TraceProcFilterParameterBufferBase(dpy,
2788 vaUnmapBuffer(dpy, filters[i]);
2793 va_TraceVAProcPipelineParameterBuffer(
2795 VAContextID context,
2799 unsigned int num_elements,
2803 VAProcPipelineParameterBuffer *p = (VAProcPipelineParameterBuffer *)data;
2808 va_TraceMsg(trace_ctx, "\t--VAProcPipelineParameterBuffer\n");
2810 va_TraceMsg(trace_ctx, "\t surface = 0x%08x\n", p->surface);
2812 if (p->surface_region) {
2813 va_TraceMsg(trace_ctx, "\t surface_region\n");
2814 va_TraceMsg(trace_ctx, "\t x = %d\n", p->surface_region->x);
2815 va_TraceMsg(trace_ctx, "\t y = %d\n", p->surface_region->y);
2816 va_TraceMsg(trace_ctx, "\t width = %d\n", p->surface_region->width);
2817 va_TraceMsg(trace_ctx, "\t height = %d\n", p->surface_region->height);
2819 va_TraceMsg(trace_ctx, "\t surface_region = (NULL)\n");
2822 va_TraceMsg(trace_ctx, "\t surface_color_standard = %d\n", p->surface_color_standard);
2824 if (p->output_region) {
2825 va_TraceMsg(trace_ctx, "\t output_region\n");
2826 va_TraceMsg(trace_ctx, "\t x = %d\n", p->output_region->x);
2827 va_TraceMsg(trace_ctx, "\t y = %d\n", p->output_region->y);
2828 va_TraceMsg(trace_ctx, "\t width = %d\n", p->output_region->width);
2829 va_TraceMsg(trace_ctx, "\t height = %d\n", p->output_region->height);
2831 va_TraceMsg(trace_ctx, "\t output_region = (NULL)\n");
2834 va_TraceMsg(trace_ctx, "\t output_background_color = 0x%08x\n", p->output_background_color);
2835 va_TraceMsg(trace_ctx, "\t output_color_standard = %d\n", p->output_color_standard);
2836 va_TraceMsg(trace_ctx, "\t pipeline_flags = 0x%08x\n", p->pipeline_flags);
2837 va_TraceMsg(trace_ctx, "\t filter_flags = 0x%08x\n", p->filter_flags);
2839 va_TraceProcFilterParameterBuffer(dpy, context, p->filters, p->num_filters);
2841 va_TraceMsg(trace_ctx, "\t num_forward_references = 0x%08x\n", p->num_forward_references);
2843 if (p->num_forward_references) {
2844 va_TraceMsg(trace_ctx, "\t forward_references\n");
2846 if (p->forward_references) {
2847 /* only dump the first 5 forward references */
2848 for (i = 0; i < p->num_forward_references && i < 5; i++) {
2849 va_TraceMsg(trace_ctx, "\t forward_references[%d] = 0x%08x\n", i, p->forward_references[i]);
2852 for (i = 0; i < p->num_forward_references && i < 5; i++) {
2853 va_TraceMsg(trace_ctx, "\t forward_references[%d] = (NULL)\n", i);
2858 va_TraceMsg(trace_ctx, "\t num_backward_references = 0x%08x\n", p->num_backward_references);
2860 if (p->num_backward_references) {
2861 va_TraceMsg(trace_ctx, "\t backward_references\n");
2863 if (p->backward_references) {
2864 /* only dump the first 5 backward references */
2865 for (i = 0; i < p->num_backward_references && i < 5; i++) {
2866 va_TraceMsg(trace_ctx, "\t backward_references[%d] = 0x%08x\n", i, p->backward_references[i]);
2869 for (i = 0; i < p->num_backward_references && i < 5; i++) {
2870 va_TraceMsg(trace_ctx, "\t backward_references[%d] = (NULL)\n", i);
2875 /* FIXME: add other info later */
2877 va_TraceMsg(trace_ctx, NULL);
2883 VAContextID context,
2887 unsigned int num_elements,
2894 case VAProcPipelineParameterBufferType:
2895 va_TraceVAProcPipelineParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2898 va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2903 void va_TraceRenderPicture(
2905 VAContextID context,
2906 VABufferID *buffers,
2912 unsigned int num_elements;
2916 TRACE_FUNCNAME(idx);
2918 va_TraceMsg(trace_ctx, "\tcontext = 0x%08x\n", context);
2919 va_TraceMsg(trace_ctx, "\tnum_buffers = %d\n", num_buffers);
2920 if (buffers == NULL)
2923 for (i = 0; i < num_buffers; i++) {
2924 unsigned char *pbuf = NULL;
2927 /* get buffer type information */
2928 vaBufferInfo(dpy, context, buffers[i], &type, &size, &num_elements);
2930 va_TraceMsg(trace_ctx, "\t---------------------------\n");
2931 va_TraceMsg(trace_ctx, "\tbuffers[%d] = 0x%08x\n", i, buffers[i]);
2932 va_TraceMsg(trace_ctx, "\t type = %s\n", buffer_type_to_string(type));
2933 va_TraceMsg(trace_ctx, "\t size = %d\n", size);
2934 va_TraceMsg(trace_ctx, "\t num_elements = %d\n", num_elements);
2936 vaMapBuffer(dpy, buffers[i], (void **)&pbuf);
2940 switch (trace_ctx->trace_profile) {
2941 case VAProfileMPEG2Simple:
2942 case VAProfileMPEG2Main:
2943 for (j=0; j<num_elements; j++) {
2944 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2945 va_TraceMPEG2Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2948 case VAProfileMPEG4Simple:
2949 case VAProfileMPEG4AdvancedSimple:
2950 case VAProfileMPEG4Main:
2951 for (j=0; j<num_elements; j++) {
2952 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2953 va_TraceMPEG4Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2956 case VAProfileH264Baseline:
2957 case VAProfileH264Main:
2958 case VAProfileH264High:
2959 case VAProfileH264ConstrainedBaseline:
2960 for (j=0; j<num_elements; j++) {
2961 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2963 va_TraceH264Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2966 case VAProfileVC1Simple:
2967 case VAProfileVC1Main:
2968 case VAProfileVC1Advanced:
2969 for (j=0; j<num_elements; j++) {
2970 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2972 va_TraceVC1Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2975 case VAProfileH263Baseline:
2976 for (j=0; j<num_elements; j++) {
2977 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2979 va_TraceH263Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2982 case VAProfileJPEGBaseline:
2983 for (j=0; j<num_elements; j++) {
2984 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2986 va_TraceJPEGBuf (dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2991 for (j=0; j<num_elements; j++) {
2992 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2994 va_TraceNoneBuf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2998 case VAProfileVP8Version0_3:
2999 for (j=0; j<num_elements; j++) {
3000 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
3002 va_TraceVP8Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
3010 vaUnmapBuffer(dpy, buffers[i]);
3013 va_TraceMsg(trace_ctx, NULL);
3016 void va_TraceEndPicture(
3018 VAContextID context,
3022 int encode, decode, jpeg;
3025 TRACE_FUNCNAME(idx);
3027 va_TraceMsg(trace_ctx, "\tcontext = 0x%08x\n", context);
3028 va_TraceMsg(trace_ctx, "\trender_targets = 0x%08x\n", trace_ctx->trace_rendertarget);
3030 /* avoid to create so many empty files */
3031 encode = (trace_ctx->trace_entrypoint == VAEntrypointEncSlice);
3032 decode = (trace_ctx->trace_entrypoint == VAEntrypointVLD);
3033 jpeg = (trace_ctx->trace_entrypoint == VAEntrypointEncPicture);
3035 /* trace encode source surface, can do it before HW completes rendering */
3036 if ((encode && (trace_flag & VA_TRACE_FLAG_SURFACE_ENCODE))||
3037 (jpeg && (trace_flag & VA_TRACE_FLAG_SURFACE_JPEG)))
3038 va_TraceSurface(dpy);
3040 /* trace decoded surface, do it after HW completes rendering */
3041 if (decode && ((trace_flag & VA_TRACE_FLAG_SURFACE_DECODE))) {
3042 vaSyncSurface(dpy, trace_ctx->trace_rendertarget);
3043 va_TraceSurface(dpy);
3046 va_TraceMsg(trace_ctx, NULL);
3050 void va_TraceSyncSurface(
3052 VASurfaceID render_target
3057 TRACE_FUNCNAME(idx);
3059 va_TraceMsg(trace_ctx, "\trender_target = 0x%08x\n", render_target);
3060 va_TraceMsg(trace_ctx, NULL);
3063 void va_TraceQuerySurfaceAttributes(
3066 VASurfaceAttrib *attrib_list,
3067 unsigned int *num_attribs
3072 TRACE_FUNCNAME(idx);
3073 va_TraceMsg(trace_ctx, "\tconfig = 0x%08x\n", config);
3074 va_TraceSurfaceAttributes(trace_ctx, attrib_list, num_attribs);
3076 va_TraceMsg(trace_ctx, NULL);
3081 void va_TraceQuerySurfaceStatus(
3083 VASurfaceID render_target,
3084 VASurfaceStatus *status /* out */
3089 TRACE_FUNCNAME(idx);
3091 va_TraceMsg(trace_ctx, "\trender_target = 0x%08x\n", render_target);
3093 va_TraceMsg(trace_ctx, "\tstatus = 0x%08x\n", *status);
3094 va_TraceMsg(trace_ctx, NULL);
3098 void va_TraceQuerySurfaceError(
3100 VASurfaceID surface,
3101 VAStatus error_status,
3102 void **error_info /*out*/
3107 TRACE_FUNCNAME(idx);
3108 va_TraceMsg(trace_ctx, "\tsurface = 0x%08x\n", surface);
3109 va_TraceMsg(trace_ctx, "\terror_status = 0x%08x\n", error_status);
3110 if (error_info && (error_status == VA_STATUS_ERROR_DECODING_ERROR)) {
3111 VASurfaceDecodeMBErrors *p = *error_info;
3112 while (p && (p->status != -1)) {
3113 va_TraceMsg(trace_ctx, "\t\tstatus = %d\n", p->status);
3114 va_TraceMsg(trace_ctx, "\t\tstart_mb = %d\n", p->start_mb);
3115 va_TraceMsg(trace_ctx, "\t\tend_mb = %d\n", p->end_mb);
3116 p++; /* next error record */
3119 va_TraceMsg(trace_ctx, NULL);
3122 void va_TraceMaxNumDisplayAttributes (
3129 TRACE_FUNCNAME(idx);
3131 va_TraceMsg(trace_ctx, "\tmax_display_attributes = %d\n", number);
3132 va_TraceMsg(trace_ctx, NULL);
3135 void va_TraceQueryDisplayAttributes (
3137 VADisplayAttribute *attr_list, /* out */
3138 int *num_attributes /* out */
3145 if (attr_list == NULL || num_attributes == NULL)
3148 va_TraceMsg(trace_ctx, "\tnum_attributes = %d\n", *num_attributes);
3150 for (i=0; i<*num_attributes; i++) {
3151 va_TraceMsg(trace_ctx, "\tattr_list[%d] =\n");
3152 va_TraceMsg(trace_ctx, "\t typ = 0x%08x\n", attr_list[i].type);
3153 va_TraceMsg(trace_ctx, "\t min_value = %d\n", attr_list[i].min_value);
3154 va_TraceMsg(trace_ctx, "\t max_value = %d\n", attr_list[i].max_value);
3155 va_TraceMsg(trace_ctx, "\t value = %d\n", attr_list[i].value);
3156 va_TraceMsg(trace_ctx, "\t flags = %d\n", attr_list[i].flags);
3158 va_TraceMsg(trace_ctx, NULL);
3162 static void va_TraceDisplayAttributes (
3164 VADisplayAttribute *attr_list,
3172 va_TraceMsg(trace_ctx, "\tnum_attributes = %d\n", num_attributes);
3173 if (attr_list == NULL)
3176 for (i=0; i<num_attributes; i++) {
3177 va_TraceMsg(trace_ctx, "\tattr_list[%d] =\n");
3178 va_TraceMsg(trace_ctx, "\t typ = 0x%08x\n", attr_list[i].type);
3179 va_TraceMsg(trace_ctx, "\t min_value = %d\n", attr_list[i].min_value);
3180 va_TraceMsg(trace_ctx, "\t max_value = %d\n", attr_list[i].max_value);
3181 va_TraceMsg(trace_ctx, "\t value = %d\n", attr_list[i].value);
3182 va_TraceMsg(trace_ctx, "\t flags = %d\n", attr_list[i].flags);
3184 va_TraceMsg(trace_ctx, NULL);
3188 void va_TraceGetDisplayAttributes (
3190 VADisplayAttribute *attr_list,
3196 TRACE_FUNCNAME(idx);
3198 va_TraceDisplayAttributes (dpy, attr_list, num_attributes);
3201 void va_TraceSetDisplayAttributes (
3203 VADisplayAttribute *attr_list,
3209 TRACE_FUNCNAME(idx);
3211 va_TraceDisplayAttributes (dpy, attr_list, num_attributes);
3215 void va_TracePutSurface (
3217 VASurfaceID surface,
3218 void *draw, /* the target Drawable */
3221 unsigned short srcw,
3222 unsigned short srch,
3225 unsigned short destw,
3226 unsigned short desth,
3227 VARectangle *cliprects, /* client supplied clip list */
3228 unsigned int number_cliprects, /* number of clip rects in the clip list */
3229 unsigned int flags /* de-interlacing flags */
3234 TRACE_FUNCNAME(idx);
3236 va_TraceMsg(trace_ctx, "\tsurface = 0x%08x\n", surface);
3237 va_TraceMsg(trace_ctx, "\tdraw = 0x%08x\n", draw);
3238 va_TraceMsg(trace_ctx, "\tsrcx = %d\n", srcx);
3239 va_TraceMsg(trace_ctx, "\tsrcy = %d\n", srcy);
3240 va_TraceMsg(trace_ctx, "\tsrcw = %d\n", srcw);
3241 va_TraceMsg(trace_ctx, "\tsrch = %d\n", srch);
3242 va_TraceMsg(trace_ctx, "\tdestx = %d\n", destx);
3243 va_TraceMsg(trace_ctx, "\tdesty = %d\n", desty);
3244 va_TraceMsg(trace_ctx, "\tdestw = %d\n", destw);
3245 va_TraceMsg(trace_ctx, "\tdesth = %d\n", desth);
3246 va_TraceMsg(trace_ctx, "\tcliprects = 0x%08x\n", cliprects);
3247 va_TraceMsg(trace_ctx, "\tnumber_cliprects = %d\n", number_cliprects);
3248 va_TraceMsg(trace_ctx, "\tflags = 0x%08x\n", flags);
3249 va_TraceMsg(trace_ctx, NULL);