Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5362 serge 1
 
2
 * Copyright (c) 2009-2011 Intel Corporation. All Rights Reserved.
3
 *
4
 * Permission is hereby granted, free of charge, to any person obtaining a
5
 * copy of this software and associated documentation files (the
6
 * "Software"), to deal in the Software without restriction, including
7
 * without limitation the rights to use, copy, modify, merge, publish,
8
 * distribute, sub license, and/or sell copies of the Software, and to
9
 * permit persons to whom the Software is furnished to do so, subject to
10
 * the following conditions:
11
 *
12
 * The above copyright notice and this permission notice (including the
13
 * next paragraph) shall be included in all copies or substantial portions
14
 * of the Software.
15
 *
16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19
 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
 */
24
25
 
26
#include "va.h"
27
#include "va_enc_h264.h"
28
#include "va_backend.h"
29
#include "va_trace.h"
30
#include "va_enc_h264.h"
31
#include "va_dec_jpeg.h"
32
#include "va_dec_vp8.h"
33
#include "va_vpp.h"
34
#include 
35
#include 
36
#include 
37
#include 
38
#include 
39
#include 
40
#include 
41
#include 
42
#include 
43
#include 
44
#include 
45
46
 
47
 * Env. to debug some issue, e.g. the decode/encode issue in a video conference scenerio:
48
 * .LIBVA_TRACE=log_file: general VA parameters saved into log_file
49
 * .LIBVA_TRACE_BUFDATA: dump all VA data buffer into log_file
50
 * .LIBVA_TRACE_CODEDBUF=coded_clip_file: save the coded clip into file coded_clip_file
51
 * .LIBVA_TRACE_SURFACE=yuv_file: save surface YUV into file yuv_file. Use file name to determine
52
 *                                decode/encode or jpeg surfaces
53
 * .LIBVA_TRACE_SURFACE_GEOMETRY=WIDTHxHEIGHT+XOFF+YOFF: only save part of surface context into file
54
 *                                due to storage bandwidth limitation
55
 */
56
57
 
58
59
 
60
int trace_flag = 0;
61
62
 
63
struct trace_context {
64
    /* LIBVA_TRACE */
65
    FILE *trace_fp_log; /* save the log into a file */
66
    char *trace_log_fn; /* file name */
67
68
 
69
    FILE *trace_fp_codedbuf; /* save the encode result into a file */
70
    char *trace_codedbuf_fn; /* file name */
71
72
 
73
    FILE *trace_fp_surface; /* save the surface YUV into a file */
74
    char *trace_surface_fn; /* file name */
75
76
 
77
78
 
79
    VAProfile trace_profile; /* current profile for buffers */
80
    VAEntrypoint trace_entrypoint; /* current entrypoint */
81
82
 
83
    unsigned int trace_slice_no; /* current slice NO */
84
    unsigned int trace_slice_size; /* current slice buffer size */
85
86
 
87
    unsigned int trace_surface_height;
88
    unsigned int trace_surface_xoff;
89
    unsigned int trace_surface_yoff;
90
91
 
92
    unsigned int trace_frame_height; /* current frame height */
93
};
94
95
 
96
97
 
98
    struct trace_context *trace_ctx = TRACE_CTX(dpy);   \
99
                                                        \
100
    if (trace_ctx == NULL)                              \
101
        return;                                         \
102
103
 
104
105
 
106
107
 
108
void va_infoMessage(const char *msg, ...);
109
110
 
111
112
 
113
    VADisplay dpy,
114
    VAContextID context,        /* in */
115
    VABufferID buf_id,          /* in */
116
    VABufferType *type,         /* out */
117
    unsigned int *size,         /* out */
118
    unsigned int *num_elements  /* out */
119
    );
120
121
 
122
                       VASurfaceID surface,
123
                       unsigned int *fourcc, /* following are output argument */
124
                       unsigned int *luma_stride,
125
                       unsigned int *chroma_u_stride,
126
                       unsigned int *chroma_v_stride,
127
                       unsigned int *luma_offset,
128
                       unsigned int *chroma_u_offset,
129
                       unsigned int *chroma_v_offset,
130
                       unsigned int *buffer_name,
131
                       void **buffer
132
                       );
133
134
 
135
                         VASurfaceID surface
136
                         );
137
138
 
139
do {                                                    \
140
    int tmp = strnlen(env_value, sizeof(env_value));    \
141
    int left = sizeof(env_value) - tmp;                 \
142
                                                        \
143
    snprintf(env_value+tmp,                             \
144
             left,                                      \
145
             ".%04d.%08lx",                             \
146
             suffix,                                    \
147
             (unsigned long)trace_ctx);                 \
148
} while (0)
149
150
 
151
{
152
    char env_value[1024];
153
    unsigned short suffix = 0xffff & ((unsigned int)time(NULL));
154
    int trace_index = 0;
155
    FILE *tmp;
156
    struct trace_context *trace_ctx = calloc(sizeof(struct trace_context), 1);
157
158
 
159
        return;
160
161
 
162
        FILE_NAME_SUFFIX(env_value);
163
        trace_ctx->trace_log_fn = strdup(env_value);
164
165
 
166
        if (tmp) {
167
            trace_ctx->trace_fp_log = tmp;
168
            va_infoMessage("LIBVA_TRACE is on, save log into %s\n", trace_ctx->trace_log_fn);
169
            trace_flag = VA_TRACE_FLAG_LOG;
170
        } else
171
            va_errorMessage("Open file %s failed (%s)\n", env_value, strerror(errno));
172
    }
173
174
 
175
    if ((trace_flag & VA_TRACE_FLAG_LOG) && (va_parseConfig("LIBVA_TRACE_BUFDATA", NULL) == 0)) {
176
        trace_flag |= VA_TRACE_FLAG_BUFDATA;
177
        va_infoMessage("LIBVA_TRACE_BUFDATA is on, dump buffer into log file\n");
178
    }
179
180
 
181
    if (va_parseConfig("LIBVA_TRACE_CODEDBUF", &env_value[0]) == 0) {
182
        FILE_NAME_SUFFIX(env_value);
183
        trace_ctx->trace_codedbuf_fn = strdup(env_value);
184
        va_infoMessage("LIBVA_TRACE_CODEDBUF is on, save codedbuf into log file %s\n",
185
                       trace_ctx->trace_codedbuf_fn);
186
        trace_flag |= VA_TRACE_FLAG_CODEDBUF;
187
    }
188
189
 
190
        FILE_NAME_SUFFIX(env_value);
191
        trace_ctx->trace_surface_fn = strdup(env_value);
192
193
 
194
                       trace_ctx->trace_surface_fn);
195
196
 
197
         * cause some side-effect, so only trace the needed surfaces
198
         * to trace encode surface, set the trace file name to sth like *enc*
199
         * to trace decode surface, set the trace file name to sth like *dec*
200
         * if no dec/enc in file name, set both
201
         */
202
        if (strstr(env_value, "dec"))
203
            trace_flag |= VA_TRACE_FLAG_SURFACE_DECODE;
204
        if (strstr(env_value, "enc"))
205
            trace_flag |= VA_TRACE_FLAG_SURFACE_ENCODE;
206
        if (strstr(env_value, "jpeg") || strstr(env_value, "jpg"))
207
            trace_flag |= VA_TRACE_FLAG_SURFACE_JPEG;
208
209
 
210
            char *p = env_value, *q;
211
212
 
213
            p = q+1; /* skip "x" */
214
            trace_ctx->trace_surface_height = strtod(p, &q);
215
            p = q+1; /* skip "+" */
216
            trace_ctx->trace_surface_xoff = strtod(p, &q);
217
            p = q+1; /* skip "+" */
218
            trace_ctx->trace_surface_yoff = strtod(p, &q);
219
220
 
221
                           trace_ctx->trace_surface_width,
222
                           trace_ctx->trace_surface_height,
223
                           trace_ctx->trace_surface_xoff,
224
                           trace_ctx->trace_surface_yoff);
225
        }
226
    }
227
228
 
229
}
230
231
 
232
 
233
{
234
    DPY2TRACECTX(dpy);
235
236
 
237
        fclose(trace_ctx->trace_fp_log);
238
239
 
240
        fclose(trace_ctx->trace_fp_codedbuf);
241
242
 
243
        fclose(trace_ctx->trace_fp_surface);
244
245
 
246
        free(trace_ctx->trace_log_fn);
247
248
 
249
        free(trace_ctx->trace_codedbuf_fn);
250
251
 
252
        free(trace_ctx->trace_surface_fn);
253
254
 
255
    ((VADisplayContextP)dpy)->vatrace = NULL;
256
}
257
258
 
259
 
260
{
261
    va_list args;
262
263
 
264
        return;
265
266
 
267
        struct timeval tv;
268
269
 
270
            fprintf(trace_ctx->trace_fp_log, "[%04d.%06d] ",
271
                    (unsigned int)tv.tv_sec & 0xffff, (unsigned int)tv.tv_usec);
272
        va_start(args, msg);
273
        vfprintf(trace_ctx->trace_fp_log, msg, args);
274
        va_end(args);
275
    } else
276
        fflush(trace_ctx->trace_fp_log);
277
}
278
279
 
280
 
281
{
282
    unsigned int i, j;
283
    unsigned int fourcc; /* following are output argument */
284
    unsigned int luma_stride;
285
    unsigned int chroma_u_stride;
286
    unsigned int chroma_v_stride;
287
    unsigned int luma_offset;
288
    unsigned int chroma_u_offset;
289
    unsigned int chroma_v_offset;
290
    unsigned int buffer_name;
291
    void *buffer = NULL;
292
    unsigned char *Y_data, *UV_data, *tmp;
293
    VAStatus va_status;
294
    unsigned char check_sum = 0;
295
    DPY2TRACECTX(dpy);
296
297
 
298
        return;
299
300
 
301
302
 
303
304
 
305
        dpy,
306
        trace_ctx->trace_rendertarget,
307
        &fourcc,
308
        &luma_stride, &chroma_u_stride, &chroma_v_stride,
309
        &luma_offset, &chroma_u_offset, &chroma_v_offset,
310
        &buffer_name, &buffer);
311
312
 
313
        va_TraceMsg(trace_ctx, "Error:vaLockSurface failed\n");
314
        return;
315
    }
316
317
 
318
    va_TraceMsg(trace_ctx, "\twidth = %d\n", trace_ctx->trace_frame_width);
319
    va_TraceMsg(trace_ctx, "\theight = %d\n", trace_ctx->trace_frame_height);
320
    va_TraceMsg(trace_ctx, "\tluma_stride = %d\n", luma_stride);
321
    va_TraceMsg(trace_ctx, "\tchroma_u_stride = %d\n", chroma_u_stride);
322
    va_TraceMsg(trace_ctx, "\tchroma_v_stride = %d\n", chroma_v_stride);
323
    va_TraceMsg(trace_ctx, "\tluma_offset = %d\n", luma_offset);
324
    va_TraceMsg(trace_ctx, "\tchroma_u_offset = %d\n", chroma_u_offset);
325
    va_TraceMsg(trace_ctx, "\tchroma_v_offset = %d\n", chroma_v_offset);
326
327
 
328
        va_TraceMsg(trace_ctx, "Error:vaLockSurface return NULL buffer\n");
329
        va_TraceMsg(trace_ctx, NULL);
330
331
 
332
        return;
333
    }
334
    va_TraceMsg(trace_ctx, "\tbuffer location = 0x%08x\n", buffer);
335
    va_TraceMsg(trace_ctx, NULL);
336
337
 
338
    UV_data = (unsigned char*)buffer + chroma_u_offset;
339
340
 
341
    for (i=0; itrace_surface_height; i++) {
342
        fwrite(tmp + trace_ctx->trace_surface_xoff,
343
               trace_ctx->trace_surface_width,
344
               1, trace_ctx->trace_fp_surface);
345
346
 
347
    }
348
    tmp = UV_data + chroma_u_stride * trace_ctx->trace_surface_yoff / 2;
349
    if (fourcc == VA_FOURCC_NV12) {
350
        for (i=0; itrace_surface_height/2; i++) {
351
            fwrite(tmp + trace_ctx->trace_surface_xoff,
352
                   trace_ctx->trace_surface_width,
353
                   1, trace_ctx->trace_fp_surface);
354
355
 
356
        }
357
    }
358
359
 
360
361
 
362
}
363
364
 
365
 
366
    VADisplay dpy,
367
    int *major_version,     /* out */
368
    int *minor_version      /* out */
369
)
370
{
371
    DPY2TRACECTX(dpy);
372
    TRACE_FUNCNAME(idx);
373
}
374
375
 
376
    VADisplay dpy
377
)
378
{
379
    DPY2TRACECTX(dpy);
380
    TRACE_FUNCNAME(idx);
381
}
382
383
 
384
 
385
    VADisplay dpy,
386
    VAProfile profile,
387
    VAEntrypoint entrypoint,
388
    VAConfigAttrib *attrib_list,
389
    int num_attribs,
390
    VAConfigID *config_id /* out */
391
)
392
{
393
    int i;
394
    int encode, decode, jpeg;
395
    DPY2TRACECTX(dpy);
396
397
 
398
399
 
400
    va_TraceMsg(trace_ctx, "\tentrypoint = %d\n", entrypoint);
401
    va_TraceMsg(trace_ctx, "\tnum_attribs = %d\n", num_attribs);
402
    if (attrib_list) {
403
        for (i = 0; i < num_attribs; i++) {
404
            va_TraceMsg(trace_ctx, "\t\tattrib_list[%d].type = 0x%08x\n", i, attrib_list[i].type);
405
            va_TraceMsg(trace_ctx, "\t\tattrib_list[%d].value = 0x%08x\n", i, attrib_list[i].value);
406
        }
407
    }
408
    va_TraceMsg(trace_ctx, NULL);
409
410
 
411
    trace_ctx->trace_entrypoint = entrypoint;
412
413
 
414
    encode = (trace_ctx->trace_entrypoint == VAEntrypointEncSlice);
415
    decode = (trace_ctx->trace_entrypoint == VAEntrypointVLD);
416
    jpeg = (trace_ctx->trace_entrypoint == VAEntrypointEncPicture);
417
    if ((encode && (trace_flag & VA_TRACE_FLAG_SURFACE_ENCODE)) ||
418
        (decode && (trace_flag & VA_TRACE_FLAG_SURFACE_DECODE)) ||
419
        (jpeg && (trace_flag & VA_TRACE_FLAG_SURFACE_JPEG))) {
420
        FILE *tmp = fopen(trace_ctx->trace_surface_fn, "w");
421
422
 
423
            trace_ctx->trace_fp_surface = tmp;
424
        else {
425
            va_errorMessage("Open file %s failed (%s)\n",
426
                            trace_ctx->trace_surface_fn,
427
                            strerror(errno));
428
            trace_ctx->trace_fp_surface = NULL;
429
            trace_flag &= ~(VA_TRACE_FLAG_SURFACE);
430
        }
431
    }
432
433
 
434
        FILE *tmp = fopen(trace_ctx->trace_codedbuf_fn, "w");
435
436
 
437
            trace_ctx->trace_fp_codedbuf = tmp;
438
        else {
439
            va_errorMessage("Open file %s failed (%s)\n",
440
                            trace_ctx->trace_codedbuf_fn,
441
                            strerror(errno));
442
            trace_ctx->trace_fp_codedbuf = NULL;
443
            trace_flag &= ~VA_TRACE_FLAG_CODEDBUF;
444
        }
445
    }
446
}
447
448
 
449
    struct trace_context *trace_ctx,
450
    VASurfaceAttrib    *attrib_list,
451
    unsigned int       *num_attribs
452
)
453
{
454
    int i, num;
455
    VASurfaceAttrib *p;
456
457
 
458
        return;
459
460
 
461
    num = *num_attribs;
462
    if (num > VASurfaceAttribCount)
463
        num = VASurfaceAttribCount;
464
465
 
466
        int type = p->value.type;
467
468
 
469
470
 
471
        va_TraceMsg(trace_ctx, "\t\tflags = %d\n", p->flags);
472
        va_TraceMsg(trace_ctx, "\t\tvalue.type = %d\n", type);
473
        switch (type) {
474
        case VAGenericValueTypeInteger:
475
            va_TraceMsg(trace_ctx, "\t\tvalue.value.i = 0x%08x\n", p->value.value.i);
476
            break;
477
        case VAGenericValueTypeFloat:
478
            va_TraceMsg(trace_ctx, "\t\tvalue.value.f = %f\n", p->value.value.f);
479
            break;
480
        case VAGenericValueTypePointer:
481
            va_TraceMsg(trace_ctx, "\t\tvalue.value.p = %p\n", p->value.value.p);
482
            if ((p->type == VASurfaceAttribExternalBufferDescriptor) && p->value.value.p) {
483
                VASurfaceAttribExternalBuffers *tmp = (VASurfaceAttribExternalBuffers *) p->value.value.p;
484
                int j;
485
486
 
487
                va_TraceMsg(trace_ctx, "\t\t  pixel_format=0x%08x\n", tmp->pixel_format);
488
                va_TraceMsg(trace_ctx, "\t\t  width=%d\n", tmp->width);
489
                va_TraceMsg(trace_ctx, "\t\t  height=%d\n", tmp->height);
490
                va_TraceMsg(trace_ctx, "\t\t  data_size=%d\n", tmp->data_size);
491
                va_TraceMsg(trace_ctx, "\t\t  num_planes=%d\n", tmp->num_planes);
492
                va_TraceMsg(trace_ctx, "\t\t  pitches[4]=%d %d %d %d\n",
493
                            tmp->pitches[0], tmp->pitches[1], tmp->pitches[2], tmp->pitches[3]);
494
                va_TraceMsg(trace_ctx, "\t\t  offsets[4]=%d %d %d %d\n",
495
                            tmp->offsets[0], tmp->offsets[1], tmp->offsets[2], tmp->offsets[3]);
496
                va_TraceMsg(trace_ctx, "\t\t  flags=0x%08x\n", tmp->flags);
497
                va_TraceMsg(trace_ctx, "\t\t  num_buffers=0x%08x\n", tmp->num_buffers);
498
                va_TraceMsg(trace_ctx, "\t\t  buffers=%p\n", tmp->buffers);
499
                for (j = 0; j < tmp->num_buffers; j++) {
500
                    va_TraceMsg(trace_ctx, "\t\t\tbuffers[%d]=%p\n", j, tmp->buffers[j]);
501
                }
502
            }
503
            break;
504
        case VAGenericValueTypeFunc:
505
            va_TraceMsg(trace_ctx, "\t\tvalue.value.fn = %p\n", p->value.value.fn);
506
            break;
507
        default:
508
            break;
509
        }
510
511
 
512
    }
513
}
514
515
 
516
    VADisplay dpy,
517
    int width,
518
    int height,
519
    int format,
520
    int num_surfaces,
521
    VASurfaceID *surfaces,    /* out */
522
    VASurfaceAttrib    *attrib_list,
523
    unsigned int        num_attribs
524
)
525
{
526
    int i;
527
    DPY2TRACECTX(dpy);
528
529
 
530
531
 
532
    va_TraceMsg(trace_ctx, "\theight = %d\n", height);
533
    va_TraceMsg(trace_ctx, "\tformat = %d\n", format);
534
    va_TraceMsg(trace_ctx, "\tnum_surfaces = %d\n", num_surfaces);
535
536
 
537
        for (i = 0; i < num_surfaces; i++)
538
            va_TraceMsg(trace_ctx, "\t\tsurfaces[%d] = 0x%08x\n", i, surfaces[i]);
539
    }
540
541
 
542
543
 
544
}
545
546
 
547
 
548
    VADisplay dpy,
549
    VASurfaceID *surface_list,
550
    int num_surfaces
551
)
552
{
553
    int i;
554
    DPY2TRACECTX(dpy);
555
556
 
557
558
 
559
        for (i = 0; i < num_surfaces; i++)
560
            va_TraceMsg(trace_ctx, "\t\tsurfaces[%d] = 0x%08x\n", i, surface_list[i]);
561
    }
562
563
 
564
}
565
566
 
567
 
568
    VADisplay dpy,
569
    VAConfigID config_id,
570
    int picture_width,
571
    int picture_height,
572
    int flag,
573
    VASurfaceID *render_targets,
574
    int num_render_targets,
575
    VAContextID *context        /* out */
576
)
577
{
578
    int i;
579
    DPY2TRACECTX(dpy);
580
581
 
582
583
 
584
    va_TraceMsg(trace_ctx, "\twidth = %d\n", picture_width);
585
    va_TraceMsg(trace_ctx, "\theight = %d\n", picture_height);
586
    va_TraceMsg(trace_ctx, "\tflag = 0x%08x\n", flag);
587
    va_TraceMsg(trace_ctx, "\tnum_render_targets = %d\n", num_render_targets);
588
    if (render_targets) {
589
        for (i=0; i
590
            va_TraceMsg(trace_ctx, "\t\trender_targets[%d] = 0x%08x\n", i, render_targets[i]);
591
    }
592
    if (context) {
593
        va_TraceMsg(trace_ctx, "\tcontext = 0x%08x\n", *context);
594
        trace_ctx->trace_context = *context;
595
    } else
596
        trace_ctx->trace_context = VA_INVALID_ID;
597
598
 
599
    trace_ctx->trace_slice_no = 0;
600
601
 
602
    trace_ctx->trace_frame_height = picture_height;
603
604
 
605
        trace_ctx->trace_surface_width = picture_width;
606
    if (trace_ctx->trace_surface_height == 0)
607
        trace_ctx->trace_surface_height = picture_height;
608
}
609
610
 
611
 
612
{
613
    switch (type) {
614
    case VAPictureParameterBufferType: return "VAPictureParameterBufferType";
615
    case VAIQMatrixBufferType: return "VAIQMatrixBufferType";
616
    case VABitPlaneBufferType: return "VABitPlaneBufferType";
617
    case VASliceGroupMapBufferType: return "VASliceGroupMapBufferType";
618
    case VASliceParameterBufferType: return "VASliceParameterBufferType";
619
    case VASliceDataBufferType: return "VASliceDataBufferType";
620
    case VAProtectedSliceDataBufferType: return "VAProtectedSliceDataBufferType";
621
    case VAMacroblockParameterBufferType: return "VAMacroblockParameterBufferType";
622
    case VAResidualDataBufferType: return "VAResidualDataBufferType";
623
    case VADeblockingParameterBufferType: return "VADeblockingParameterBufferType";
624
    case VAImageBufferType: return "VAImageBufferType";
625
    case VAQMatrixBufferType: return "VAQMatrixBufferType";
626
    case VAHuffmanTableBufferType: return "VAHuffmanTableBufferType";
627
/* Following are encode buffer types */
628
    case VAEncCodedBufferType: return "VAEncCodedBufferType";
629
    case VAEncSequenceParameterBufferType: return "VAEncSequenceParameterBufferType";
630
    case VAEncPictureParameterBufferType: return "VAEncPictureParameterBufferType";
631
    case VAEncSliceParameterBufferType: return "VAEncSliceParameterBufferType";
632
    case VAEncPackedHeaderParameterBufferType: return "VAEncPackedHeaderParameterBufferType";
633
    case VAEncPackedHeaderDataBufferType: return "VAEncPackedHeaderDataBufferType";
634
    case VAEncMiscParameterBufferType: return "VAEncMiscParameterBufferType";
635
    case VAEncMacroblockParameterBufferType: return "VAEncMacroblockParameterBufferType";
636
    case VAProcPipelineParameterBufferType: return "VAProcPipelineParameterBufferType";
637
    case VAProcFilterParameterBufferType: return "VAProcFilterParameterBufferType";
638
    default: return "UnknowBuffer";
639
    }
640
}
641
642
 
643
    VADisplay dpy,
644
    VAContextID context,	/* in */
645
    VABufferType type,		/* in */
646
    unsigned int size,		/* in */
647
    unsigned int num_elements,	/* in */
648
    void *data,			/* in */
649
    VABufferID *buf_id		/* out */
650
)
651
{
652
    DPY2TRACECTX(dpy);
653
654
 
655
    if (type != VAEncCodedBufferType)
656
        return;
657
658
 
659
    va_TraceMsg(trace_ctx, "\tbuf_type=%s\n", buffer_type_to_string(type));
660
    if (buf_id)
661
        va_TraceMsg(trace_ctx, "\tbuf_id=0x%x\n", *buf_id);
662
    va_TraceMsg(trace_ctx, "\tsize=%d\n", size);
663
    va_TraceMsg(trace_ctx, "\tnum_elements=%d\n", num_elements);
664
665
 
666
}
667
668
 
669
    VADisplay dpy,
670
    VABufferID buf_id    /* in */
671
)
672
{
673
    VABufferType type;
674
    unsigned int size;
675
    unsigned int num_elements;
676
677
 
678
    int i = 0;
679
680
 
681
682
 
683
684
 
685
    if (type != VAEncCodedBufferType)
686
        return;
687
688
 
689
    va_TraceMsg(trace_ctx, "\tbuf_type=%s\n", buffer_type_to_string(type));
690
    va_TraceMsg(trace_ctx, "\tbuf_id=0x%x\n", buf_id);
691
    va_TraceMsg(trace_ctx, "\tsize=%d\n", size);
692
    va_TraceMsg(trace_ctx, "\tnum_elements=%d\n", num_elements);
693
694
 
695
}
696
697
 
698
 
699
    VADisplay dpy,
700
    VABufferID buf_id,    /* in */
701
    void **pbuf           /* out */
702
)
703
{
704
    VABufferType type;
705
    unsigned int size;
706
    unsigned int num_elements;
707
708
 
709
    int i = 0;
710
711
 
712
713
 
714
715
 
716
    if (type != VAEncCodedBufferType)
717
        return;
718
719
 
720
    va_TraceMsg(trace_ctx, "\tbuf_id=0x%x\n", buf_id);
721
    va_TraceMsg(trace_ctx, "\tbuf_type=%s\n", buffer_type_to_string(type));
722
    if ((pbuf == NULL) || (*pbuf == NULL))
723
        return;
724
725
 
726
    while (buf_list != NULL) {
727
        va_TraceMsg(trace_ctx, "\tCodedbuf[%d] =\n", i++);
728
729
 
730
        va_TraceMsg(trace_ctx, "\t   bit_offset = %d\n", buf_list->bit_offset);
731
        va_TraceMsg(trace_ctx, "\t   status = 0x%08x\n", buf_list->status);
732
        va_TraceMsg(trace_ctx, "\t   reserved = 0x%08x\n", buf_list->reserved);
733
        va_TraceMsg(trace_ctx, "\t   buf = 0x%08x\n", buf_list->buf);
734
735
 
736
            va_TraceMsg(trace_ctx, "\tDump the content to file\n");
737
            fwrite(buf_list->buf, buf_list->size, 1, trace_ctx->trace_fp_codedbuf);
738
        }
739
740
 
741
    }
742
    va_TraceMsg(trace_ctx, NULL);
743
}
744
745
 
746
    VADisplay dpy,
747
    VAContextID context,
748
    VABufferID buffer,
749
    VABufferType type,
750
    unsigned int size,
751
    unsigned int num_elements,
752
    void *pbuf
753
)
754
{
755
    unsigned int i;
756
    unsigned char *p = pbuf;
757
758
 
759
760
 
761
762
 
763
        for (i=0; i
764
            unsigned char value =  p[i];
765
766
 
767
                fprintf(trace_ctx->trace_fp_log, "\t\t0x%04x:", i);
768
            else if ((i%16) == 0)
769
                fprintf(trace_ctx->trace_fp_log, "\n\t\t0x%04x:", i);
770
771
 
772
        }
773
        fprintf(trace_ctx->trace_fp_log, "\n");
774
    }
775
776
 
777
778
 
779
}
780
781
 
782
 
783
    VADisplay dpy,
784
    VAContextID context,
785
    VABufferID buffer,
786
    VABufferType type,
787
    unsigned int size,
788
    unsigned int num_elements,
789
    void *data)
790
{
791
    VAPictureParameterBufferMPEG2 *p=(VAPictureParameterBufferMPEG2 *)data;
792
    DPY2TRACECTX(dpy);
793
794
 
795
796
 
797
    va_TraceMsg(trace_ctx,"\tvertical size= %d\n", p->vertical_size);
798
    va_TraceMsg(trace_ctx,"\tforward reference picture= %d\n", p->forward_reference_picture);
799
    va_TraceMsg(trace_ctx,"\tbackward reference picture= %d\n", p->backward_reference_picture);
800
    va_TraceMsg(trace_ctx,"\tpicture coding type= %d\n", p->picture_coding_type);
801
    va_TraceMsg(trace_ctx,"\tf mode= %d\n", p->f_code);
802
803
 
804
    va_TraceMsg(trace_ctx,"\tintra_dc_precision= %d\n", p->picture_coding_extension.bits.intra_dc_precision);
805
    va_TraceMsg(trace_ctx,"\tpicture_structure= %d\n", p->picture_coding_extension.bits.picture_structure);
806
    va_TraceMsg(trace_ctx,"\ttop_field_first= %d\n", p->picture_coding_extension.bits.top_field_first);
807
    va_TraceMsg(trace_ctx,"\tframe_pred_frame_dct= %d\n", p->picture_coding_extension.bits.frame_pred_frame_dct);
808
    va_TraceMsg(trace_ctx,"\tconcealment_motion_vectors= %d\n", p->picture_coding_extension.bits.concealment_motion_vectors);
809
    va_TraceMsg(trace_ctx,"\tq_scale_type= %d\n", p->picture_coding_extension.bits.q_scale_type);
810
    va_TraceMsg(trace_ctx,"\tintra_vlc_format= %d\n", p->picture_coding_extension.bits.intra_vlc_format);
811
    va_TraceMsg(trace_ctx,"\talternate_scan= %d\n", p->picture_coding_extension.bits.alternate_scan);
812
    va_TraceMsg(trace_ctx,"\trepeat_first_field= %d\n", p->picture_coding_extension.bits.repeat_first_field);
813
    va_TraceMsg(trace_ctx,"\tprogressive_frame= %d\n", p->picture_coding_extension.bits.progressive_frame);
814
    va_TraceMsg(trace_ctx,"\tis_first_field= %d\n", p->picture_coding_extension.bits.is_first_field);
815
    va_TraceMsg(trace_ctx, NULL);
816
817
 
818
}
819
820
 
821
 
822
    VADisplay dpy,
823
    VAContextID context,
824
    VABufferID buffer,
825
    VABufferType type,
826
    unsigned int size,
827
    unsigned int num_elements,
828
    void *data)
829
{
830
    VAIQMatrixBufferMPEG2 *p=(VAIQMatrixBufferMPEG2 *)data;
831
    DPY2TRACECTX(dpy);
832
833
 
834
835
 
836
    va_TraceMsg(trace_ctx,"\tload_non_intra_quantiser_matrix = %d\n", p->load_non_intra_quantiser_matrix);
837
    va_TraceMsg(trace_ctx,"\tload_chroma_intra_quantiser_matrix = %d\n", p->load_chroma_intra_quantiser_matrix);
838
    va_TraceMsg(trace_ctx,"\tload_chroma_non_intra_quantiser_matrix = %d\n", p->load_chroma_non_intra_quantiser_matrix);
839
    va_TraceMsg(trace_ctx,"\tintra_quantiser_matrix = %d\n", p->intra_quantiser_matrix);
840
    va_TraceMsg(trace_ctx,"\tnon_intra_quantiser_matrix = %d\n", p->non_intra_quantiser_matrix);
841
    va_TraceMsg(trace_ctx,"\tchroma_intra_quantiser_matrix = %d\n", p->chroma_intra_quantiser_matrix);
842
    va_TraceMsg(trace_ctx,"\tchroma_non_intra_quantiser_matrix = %d\n", p->chroma_non_intra_quantiser_matrix);
843
    va_TraceMsg(trace_ctx, NULL);
844
845
 
846
}
847
848
 
849
 
850
    VADisplay dpy,
851
    VAContextID context,
852
    VABufferID buffer,
853
    VABufferType type,
854
    unsigned int size,
855
    unsigned int num_elements,
856
    void *data)
857
{
858
    VASliceParameterBufferMPEG2 *p=(VASliceParameterBufferMPEG2 *)data;
859
860
 
861
862
 
863
864
 
865
866
 
867
868
 
869
    va_TraceMsg(trace_ctx,"\tslice_data_offset = %d\n", p->slice_data_offset);
870
    va_TraceMsg(trace_ctx,"\tslice_data_flag = %d\n", p->slice_data_flag);
871
    va_TraceMsg(trace_ctx,"\tmacroblock_offset = %d\n", p->macroblock_offset);
872
    va_TraceMsg(trace_ctx,"\tslice_horizontal_position = %d\n", p->slice_horizontal_position);
873
    va_TraceMsg(trace_ctx,"\tslice_vertical_position = %d\n", p->slice_vertical_position);
874
    va_TraceMsg(trace_ctx,"\tquantiser_scale_code = %d\n", p->quantiser_scale_code);
875
    va_TraceMsg(trace_ctx,"\tintra_slice_flag = %d\n", p->intra_slice_flag);
876
    va_TraceMsg(trace_ctx, NULL);
877
878
 
879
}
880
881
 
882
    VADisplay dpy,
883
    VAContextID context,
884
    VABufferID buffer,
885
    VABufferType type,
886
    unsigned int size,
887
    unsigned int num_elements,
888
    void *data)
889
{
890
    int i;
891
    VAPictureParameterBufferJPEGBaseline *p=(VAPictureParameterBufferJPEGBaseline *)data;
892
    DPY2TRACECTX(dpy);
893
894
 
895
    va_TraceMsg(trace_ctx,"\tpicture_width = %u\n", p->picture_width);
896
    va_TraceMsg(trace_ctx,"\tpicture_height = %u\n", p->picture_height);
897
    va_TraceMsg(trace_ctx,"\tcomponents = \n");
898
    for (i = 0; i < p->num_components && i < 255; ++i) {
899
        va_TraceMsg(trace_ctx,"\t\t[%d] component_id = %u\n", i, p->components[i].component_id);
900
        va_TraceMsg(trace_ctx,"\t\t[%d] h_sampling_factor = %u\n", i, p->components[i].h_sampling_factor);
901
        va_TraceMsg(trace_ctx,"\t\t[%d] v_sampling_factor = %u\n", i, p->components[i].v_sampling_factor);
902
        va_TraceMsg(trace_ctx,"\t\t[%d] quantiser_table_selector = %u\n", i, p->components[i].quantiser_table_selector);
903
    }
904
}
905
906
 
907
    VADisplay dpy,
908
    VAContextID context,
909
    VABufferID buffer,
910
    VABufferType type,
911
    unsigned int size,
912
    unsigned int num_elements,
913
    void *data)
914
{
915
    int i, j;
916
    static char tmp[1024];
917
    VAIQMatrixBufferJPEGBaseline *p=(VAIQMatrixBufferJPEGBaseline *)data;
918
    DPY2TRACECTX(dpy);
919
    va_TraceMsg(trace_ctx,"*VAIQMatrixParameterBufferJPEG\n");
920
    va_TraceMsg(trace_ctx,"\tload_quantiser_table =\n");
921
    for (i = 0; i < 4; ++i) {
922
        va_TraceMsg(trace_ctx,"\t\t[%d] = %u\n", i, p->load_quantiser_table[i]);
923
    }
924
    va_TraceMsg(trace_ctx,"\tquantiser_table =\n");
925
    for (i = 0; i < 4; ++i) {
926
        memset(tmp, 0, sizeof tmp);
927
        for (j = 0; j < 64; ++j) {
928
            sprintf(tmp + strlen(tmp), "%u ", p->quantiser_table[i][j]);
929
        }
930
        va_TraceMsg(trace_ctx,"\t\t[%d] = %s\n", i, tmp);
931
    }
932
}
933
934
 
935
    VADisplay dpy,
936
    VAContextID context,
937
    VABufferID buffer,
938
    VABufferType type,
939
    unsigned int size,
940
    unsigned int num_elements,
941
    void *data)
942
{
943
    int i;
944
    VASliceParameterBufferJPEGBaseline *p=(VASliceParameterBufferJPEGBaseline *)data;
945
    DPY2TRACECTX(dpy);
946
    va_TraceMsg(trace_ctx,"*VASliceParameterBufferJPEG\n");
947
    va_TraceMsg(trace_ctx,"\tslice_data_size = %u\n", p->slice_data_size);
948
    va_TraceMsg(trace_ctx,"\tslice_data_offset = %u\n", p->slice_data_offset);
949
    va_TraceMsg(trace_ctx,"\tslice_data_flag = %u\n", p->slice_data_flag);
950
    va_TraceMsg(trace_ctx,"\tslice_horizontal_position = %u\n", p->slice_horizontal_position);
951
    va_TraceMsg(trace_ctx,"\tslice_vertical_position = %u\n", p->slice_vertical_position);
952
    va_TraceMsg(trace_ctx,"\tcomponents = \n");
953
    for (i = 0; i < p->num_components && i < 4; ++i) {
954
        va_TraceMsg(trace_ctx,"\t\t[%d] component_selector = %u\n", i, p->components[i].component_selector);
955
        va_TraceMsg(trace_ctx,"\t\t[%d] dc_table_selector = %u\n", i, p->components[i].dc_table_selector);
956
        va_TraceMsg(trace_ctx,"\t\t[%d] ac_table_selector = %u\n", i, p->components[i].ac_table_selector);
957
    }
958
    va_TraceMsg(trace_ctx,"\trestart_interval = %u\n", p->restart_interval);
959
    va_TraceMsg(trace_ctx,"\tnum_mcus = %u\n", p->num_mcus);
960
}
961
962
 
963
    VADisplay dpy,
964
    VAContextID context,
965
    VABufferID buffer,
966
    VABufferType type,
967
    unsigned int size,
968
    unsigned int num_elements,
969
    void *data)
970
{
971
    int i, j;
972
    static char tmp[1024];
973
    VAHuffmanTableBufferJPEGBaseline *p=(VAHuffmanTableBufferJPEGBaseline *)data;
974
    DPY2TRACECTX(dpy);
975
    va_TraceMsg(trace_ctx,"*VAHuffmanTableBufferJPEG\n");
976
977
 
978
        va_TraceMsg(trace_ctx,"\tload_huffman_table[%d] =%u\n", i, p->load_huffman_table[0]);
979
        va_TraceMsg(trace_ctx,"\thuffman_table[%d] =\n", i);
980
        memset(tmp, 0, sizeof tmp);
981
        for (j = 0; j < 16; ++j) {
982
            sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].num_dc_codes[j]);
983
        }
984
        va_TraceMsg(trace_ctx,"\t\tnum_dc_codes =%s\n", tmp);
985
        memset(tmp, 0, sizeof tmp);
986
        for (j = 0; j < 12; ++j) {
987
            sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].dc_values[j]);
988
        }
989
        va_TraceMsg(trace_ctx,"\t\tdc_values =%s\n", tmp);
990
        memset(tmp, 0, sizeof tmp);
991
        for (j = 0; j < 16; ++j) {
992
            sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].num_ac_codes[j]);
993
        }
994
        va_TraceMsg(trace_ctx,"\t\tnum_dc_codes =%s\n", tmp);
995
        memset(tmp, 0, sizeof tmp);
996
        for (j = 0; j < 162; ++j) {
997
            sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].ac_values[j]);
998
        }
999
        va_TraceMsg(trace_ctx,"\t\tnum_dc_codes =%s\n", tmp);
1000
        memset(tmp, 0, sizeof tmp);
1001
        for (j = 0; j < 2; ++j) {
1002
            sprintf(tmp + strlen(tmp), "%u ", p->huffman_table[i].pad[j]);
1003
        }
1004
        va_TraceMsg(trace_ctx,"\t\tnum_dc_codes =%s\n", tmp);
1005
    }
1006
}
1007
1008
 
1009
    VADisplay dpy,
1010
    VAContextID context,
1011
    VABufferID buffer,
1012
    VABufferType type,
1013
    unsigned int size,
1014
    unsigned int num_elements,
1015
    void *data)
1016
{
1017
    int i;
1018
    VAPictureParameterBufferMPEG4 *p=(VAPictureParameterBufferMPEG4 *)data;
1019
1020
 
1021
1022
 
1023
    va_TraceMsg(trace_ctx,"\tvop_width = %d\n", p->vop_width);
1024
    va_TraceMsg(trace_ctx,"\tvop_height = %d\n", p->vop_height);
1025
    va_TraceMsg(trace_ctx,"\tforward_reference_picture = %d\n", p->forward_reference_picture);
1026
    va_TraceMsg(trace_ctx,"\tbackward_reference_picture = %d\n", p->backward_reference_picture);
1027
    va_TraceMsg(trace_ctx,"\tvol_fields value = %d\n", p->vol_fields.value);
1028
    va_TraceMsg(trace_ctx,"\tshort_video_header= %d\n", p->vol_fields.bits.short_video_header);
1029
    va_TraceMsg(trace_ctx,"\tchroma_format= %d\n", p->vol_fields.bits.chroma_format);
1030
    va_TraceMsg(trace_ctx,"\tinterlaced= %d\n", p->vol_fields.bits.interlaced);
1031
    va_TraceMsg(trace_ctx,"\tobmc_disable= %d\n", p->vol_fields.bits.obmc_disable);
1032
    va_TraceMsg(trace_ctx,"\tsprite_enable= %d\n", p->vol_fields.bits.sprite_enable);
1033
    va_TraceMsg(trace_ctx,"\tsprite_warping_accuracy= %d\n", p->vol_fields.bits.sprite_warping_accuracy);
1034
    va_TraceMsg(trace_ctx,"\tquant_type= %d\n", p->vol_fields.bits.quant_type);
1035
    va_TraceMsg(trace_ctx,"\tquarter_sample= %d\n", p->vol_fields.bits.quarter_sample);
1036
    va_TraceMsg(trace_ctx,"\tdata_partitioned= %d\n", p->vol_fields.bits.data_partitioned);
1037
    va_TraceMsg(trace_ctx,"\treversible_vlc= %d\n", p->vol_fields.bits.reversible_vlc);
1038
    va_TraceMsg(trace_ctx,"\tresync_marker_disable= %d\n", p->vol_fields.bits.resync_marker_disable);
1039
    va_TraceMsg(trace_ctx,"\tno_of_sprite_warping_points = %d\n", p->no_of_sprite_warping_points);
1040
    va_TraceMsg(trace_ctx,"\tsprite_trajectory_du =");
1041
    for(i=0;i<3;i++)
1042
        va_TraceMsg(trace_ctx,"\t%d", p->sprite_trajectory_du[i]);
1043
1044
 
1045
    va_TraceMsg(trace_ctx,"\tsprite_trajectory_dv =");
1046
    for(i=0;i<3;i++)
1047
        va_TraceMsg(trace_ctx,"\t%d", p->sprite_trajectory_dv[i]);
1048
    va_TraceMsg(trace_ctx,"\n");
1049
    va_TraceMsg(trace_ctx,"\tvop_fields value = %d\n", p->vop_fields.value);
1050
    va_TraceMsg(trace_ctx,"\tvop_coding_type= %d\n", p->vop_fields.bits.vop_coding_type);
1051
    va_TraceMsg(trace_ctx,"\tbackward_reference_vop_coding_type= %d\n", p->vop_fields.bits.backward_reference_vop_coding_type);
1052
    va_TraceMsg(trace_ctx,"\tvop_rounding_type= %d\n", p->vop_fields.bits.vop_rounding_type);
1053
    va_TraceMsg(trace_ctx,"\tintra_dc_vlc_thr= %d\n", p->vop_fields.bits.intra_dc_vlc_thr);
1054
    va_TraceMsg(trace_ctx,"\ttop_field_first= %d\n", p->vop_fields.bits.top_field_first);
1055
    va_TraceMsg(trace_ctx,"\talternate_vertical_scan_flag= %d\n", p->vop_fields.bits.alternate_vertical_scan_flag);
1056
    va_TraceMsg(trace_ctx,"\tvop_fcode_forward = %d\n", p->vop_fcode_forward);
1057
    va_TraceMsg(trace_ctx,"\tvop_fcode_backward = %d\n", p->vop_fcode_backward);
1058
    va_TraceMsg(trace_ctx,"\tnum_gobs_in_vop = %d\n", p->num_gobs_in_vop);
1059
    va_TraceMsg(trace_ctx,"\tnum_macroblocks_in_gob = %d\n", p->num_macroblocks_in_gob);
1060
    va_TraceMsg(trace_ctx,"\tTRB = %d\n", p->TRB);
1061
    va_TraceMsg(trace_ctx,"\tTRD = %d\n", p->TRD);
1062
    va_TraceMsg(trace_ctx, NULL);
1063
1064
 
1065
}
1066
1067
 
1068
 
1069
    VADisplay dpy,
1070
    VAContextID context,
1071
    VABufferID buffer,
1072
    VABufferType type,
1073
    unsigned int size,
1074
    unsigned int num_elements,
1075
    void *data)
1076
{
1077
    int i;
1078
    VAIQMatrixBufferMPEG4 *p=(VAIQMatrixBufferMPEG4 *)data;
1079
    DPY2TRACECTX(dpy);
1080
1081
 
1082
1083
 
1084
    va_TraceMsg(trace_ctx,"\tload_non_intra_quant_mat = %d\n", p->load_non_intra_quant_mat);
1085
    va_TraceMsg(trace_ctx,"\tintra_quant_mat =\n");
1086
    for(i=0;i<64;i++)
1087
        va_TraceMsg(trace_ctx,"\t\t%d\n", p->intra_quant_mat[i]);
1088
1089
 
1090
    for(i=0;i<64;i++)
1091
        va_TraceMsg(trace_ctx,"\t\t%d\n", p->non_intra_quant_mat[i]);
1092
    va_TraceMsg(trace_ctx, NULL);
1093
1094
 
1095
}
1096
1097
 
1098
    VADisplay dpy,
1099
    VAContextID context,
1100
    VABufferID buffer,
1101
    VABufferType type,
1102
    unsigned int size,
1103
    unsigned int num_elements,
1104
    void *data)
1105
{
1106
    VAEncSequenceParameterBufferMPEG4 *p = (VAEncSequenceParameterBufferMPEG4 *)data;
1107
    DPY2TRACECTX(dpy);
1108
1109
 
1110
1111
 
1112
    va_TraceMsg(trace_ctx, "\tintra_period = %d\n", p->intra_period);
1113
    va_TraceMsg(trace_ctx, "\tvideo_object_layer_width = %d\n", p->video_object_layer_width);
1114
    va_TraceMsg(trace_ctx, "\tvideo_object_layer_height = %d\n", p->video_object_layer_height);
1115
    va_TraceMsg(trace_ctx, "\tvop_time_increment_resolution = %d\n", p->vop_time_increment_resolution);
1116
    va_TraceMsg(trace_ctx, "\tfixed_vop_rate = %d\n", p->fixed_vop_rate);
1117
    va_TraceMsg(trace_ctx, "\tfixed_vop_time_increment = %d\n", p->fixed_vop_time_increment);
1118
    va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
1119
    va_TraceMsg(trace_ctx, "\tframe_rate = %d\n", p->frame_rate);
1120
    va_TraceMsg(trace_ctx, "\tinitial_qp = %d\n", p->initial_qp);
1121
    va_TraceMsg(trace_ctx, "\tmin_qp = %d\n", p->min_qp);
1122
    va_TraceMsg(trace_ctx, NULL);
1123
1124
 
1125
}
1126
1127
 
1128
    VADisplay dpy,
1129
    VAContextID context,
1130
    VABufferID buffer,
1131
    VABufferType type,
1132
    unsigned int size,
1133
    unsigned int num_elements,
1134
    void *data)
1135
{
1136
    VAEncPictureParameterBufferMPEG4 *p = (VAEncPictureParameterBufferMPEG4 *)data;
1137
    DPY2TRACECTX(dpy);
1138
1139
 
1140
    va_TraceMsg(trace_ctx, "\treference_picture = 0x%08x\n", p->reference_picture);
1141
    va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture);
1142
    va_TraceMsg(trace_ctx, "\tcoded_buf = 0x%08x\n", p->coded_buf);
1143
    va_TraceMsg(trace_ctx, "\tpicture_width = %d\n", p->picture_width);
1144
    va_TraceMsg(trace_ctx, "\tpicture_height = %d\n", p->picture_height);
1145
    va_TraceMsg(trace_ctx, "\tmodulo_time_base = %d\n", p->modulo_time_base);
1146
    va_TraceMsg(trace_ctx, "\tvop_time_increment = %d\n", p->vop_time_increment);
1147
    va_TraceMsg(trace_ctx, "\tpicture_type = %d\n", p->picture_type);
1148
    va_TraceMsg(trace_ctx, NULL);
1149
1150
 
1151
}
1152
1153
 
1154
 
1155
    VADisplay dpy,
1156
    VAContextID context,
1157
    VABufferID buffer,
1158
    VABufferType type,
1159
    unsigned int size,
1160
    unsigned int num_elements,
1161
    void *data)
1162
{
1163
    VASliceParameterBufferMPEG4 *p=(VASliceParameterBufferMPEG4 *)data;
1164
1165
 
1166
1167
 
1168
1169
 
1170
1171
 
1172
1173
 
1174
    va_TraceMsg(trace_ctx,"\tslice_data_offset = %d\n", p->slice_data_offset);
1175
    va_TraceMsg(trace_ctx,"\tslice_data_flag = %d\n", p->slice_data_flag);
1176
    va_TraceMsg(trace_ctx,"\tmacroblock_offset = %d\n", p->macroblock_offset);
1177
    va_TraceMsg(trace_ctx,"\tmacroblock_number = %d\n", p->macroblock_number);
1178
    va_TraceMsg(trace_ctx,"\tquant_scale = %d\n", p->quant_scale);
1179
    va_TraceMsg(trace_ctx, NULL);
1180
1181
 
1182
}
1183
1184
 
1185
 
1186
    struct trace_context *trace_ctx,
1187
    const char *name,   /* in */
1188
    unsigned int flag   /* in */
1189
)
1190
{
1191
    if (flag != 0) {
1192
        va_TraceMsg(trace_ctx, "%s = %x\n", name, flag);
1193
    }
1194
}
1195
1196
 
1197
 
1198
    VADisplay dpy,
1199
    VAContextID context,
1200
    VABufferID buffer,
1201
    VABufferType type,
1202
    unsigned int size,
1203
    unsigned int num_elements,
1204
    void *data)
1205
{
1206
    int i;
1207
    VAPictureParameterBufferH264 *p = (VAPictureParameterBufferH264*)data;
1208
1209
 
1210
1211
 
1212
1213
 
1214
    va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.frame_idx);
1215
    va_TraceMsg(trace_ctx, "\tCurrPic.flags = %d\n", p->CurrPic.flags);
1216
    va_TraceMsg(trace_ctx, "\tCurrPic.TopFieldOrderCnt = %d\n", p->CurrPic.TopFieldOrderCnt);
1217
    va_TraceMsg(trace_ctx, "\tCurrPic.BottomFieldOrderCnt = %d\n", p->CurrPic.BottomFieldOrderCnt);
1218
1219
 
1220
    for (i = 0; i < 16; i++)
1221
    {
1222
        if ((p->ReferenceFrames[i].picture_id != VA_INVALID_SURFACE) &&
1223
            ((p->ReferenceFrames[i].flags & VA_PICTURE_H264_INVALID) == 0)) {
1224
            va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n",
1225
                        p->ReferenceFrames[i].TopFieldOrderCnt,
1226
                        p->ReferenceFrames[i].BottomFieldOrderCnt,
1227
                        p->ReferenceFrames[i].picture_id,
1228
                        p->ReferenceFrames[i].frame_idx,
1229
                        p->ReferenceFrames[i].flags);
1230
        } else
1231
            break;
1232
    }
1233
    va_TraceMsg(trace_ctx, "\tpicture_width_in_mbs_minus1 = %d\n", p->picture_width_in_mbs_minus1);
1234
    va_TraceMsg(trace_ctx, "\tpicture_height_in_mbs_minus1 = %d\n", p->picture_height_in_mbs_minus1);
1235
    va_TraceMsg(trace_ctx, "\tbit_depth_luma_minus8 = %d\n", p->bit_depth_luma_minus8);
1236
    va_TraceMsg(trace_ctx, "\tbit_depth_chroma_minus8 = %d\n", p->bit_depth_chroma_minus8);
1237
    va_TraceMsg(trace_ctx, "\tnum_ref_frames = %d\n", p->num_ref_frames);
1238
    va_TraceMsg(trace_ctx, "\tseq fields = %d\n", p->seq_fields.value);
1239
    va_TraceMsg(trace_ctx, "\tchroma_format_idc = %d\n", p->seq_fields.bits.chroma_format_idc);
1240
    va_TraceMsg(trace_ctx, "\tresidual_colour_transform_flag = %d\n", p->seq_fields.bits.residual_colour_transform_flag);
1241
    va_TraceMsg(trace_ctx, "\tframe_mbs_only_flag = %d\n", p->seq_fields.bits.frame_mbs_only_flag);
1242
    va_TraceMsg(trace_ctx, "\tmb_adaptive_frame_field_flag = %d\n", p->seq_fields.bits.mb_adaptive_frame_field_flag);
1243
    va_TraceMsg(trace_ctx, "\tdirect_8x8_inference_flag = %d\n", p->seq_fields.bits.direct_8x8_inference_flag);
1244
    va_TraceMsg(trace_ctx, "\tMinLumaBiPredSize8x8 = %d\n", p->seq_fields.bits.MinLumaBiPredSize8x8);
1245
    va_TraceMsg(trace_ctx, "\tnum_slice_groups_minus1 = %d\n", p->num_slice_groups_minus1);
1246
    va_TraceMsg(trace_ctx, "\tslice_group_map_type = %d\n", p->slice_group_map_type);
1247
    va_TraceMsg(trace_ctx, "\tslice_group_change_rate_minus1 = %d\n", p->slice_group_change_rate_minus1);
1248
    va_TraceMsg(trace_ctx, "\tpic_init_qp_minus26 = %d\n", p->pic_init_qp_minus26);
1249
    va_TraceMsg(trace_ctx, "\tpic_init_qs_minus26 = %d\n", p->pic_init_qs_minus26);
1250
    va_TraceMsg(trace_ctx, "\tchroma_qp_index_offset = %d\n", p->chroma_qp_index_offset);
1251
    va_TraceMsg(trace_ctx, "\tsecond_chroma_qp_index_offset = %d\n", p->second_chroma_qp_index_offset);
1252
    va_TraceMsg(trace_ctx, "\tpic_fields = 0x%03x\n", p->pic_fields.value);
1253
    va_TraceFlagIfNotZero(trace_ctx, "\t\tentropy_coding_mode_flag", p->pic_fields.bits.entropy_coding_mode_flag);
1254
    va_TraceFlagIfNotZero(trace_ctx, "\t\tweighted_pred_flag", p->pic_fields.bits.weighted_pred_flag);
1255
    va_TraceFlagIfNotZero(trace_ctx, "\t\tweighted_bipred_idc", p->pic_fields.bits.weighted_bipred_idc);
1256
    va_TraceFlagIfNotZero(trace_ctx, "\t\ttransform_8x8_mode_flag", p->pic_fields.bits.transform_8x8_mode_flag);
1257
    va_TraceFlagIfNotZero(trace_ctx, "\t\tfield_pic_flag", p->pic_fields.bits.field_pic_flag);
1258
    va_TraceFlagIfNotZero(trace_ctx, "\t\tconstrained_intra_pred_flag", p->pic_fields.bits.constrained_intra_pred_flag);
1259
    va_TraceFlagIfNotZero(trace_ctx, "\t\tpic_order_present_flag", p->pic_fields.bits.pic_order_present_flag);
1260
    va_TraceFlagIfNotZero(trace_ctx, "\t\tdeblocking_filter_control_present_flag", p->pic_fields.bits.deblocking_filter_control_present_flag);
1261
    va_TraceFlagIfNotZero(trace_ctx, "\t\tredundant_pic_cnt_present_flag", p->pic_fields.bits.redundant_pic_cnt_present_flag);
1262
    va_TraceFlagIfNotZero(trace_ctx, "\t\treference_pic_flag", p->pic_fields.bits.reference_pic_flag);
1263
    va_TraceMsg(trace_ctx, "\tframe_num = %d\n", p->frame_num);
1264
    va_TraceMsg(trace_ctx, NULL);
1265
1266
 
1267
}
1268
1269
 
1270
    VADisplay dpy,
1271
    VAContextID context,
1272
    VABufferID buffer,
1273
    VABufferType type,
1274
    unsigned int size,
1275
    unsigned int num_elements,
1276
    void *data)
1277
{
1278
    int i;
1279
    VASliceParameterBufferH264* p = (VASliceParameterBufferH264*)data;
1280
    DPY2TRACECTX(dpy);
1281
1282
 
1283
    trace_ctx->trace_slice_size = p->slice_data_size;
1284
1285
 
1286
    va_TraceMsg(trace_ctx, "\tslice_data_size = %d\n", p->slice_data_size);
1287
    va_TraceMsg(trace_ctx, "\tslice_data_offset = %d\n", p->slice_data_offset);
1288
    va_TraceMsg(trace_ctx, "\tslice_data_flag = %d\n", p->slice_data_flag);
1289
    va_TraceMsg(trace_ctx, "\tslice_data_bit_offset = %d\n", p->slice_data_bit_offset);
1290
    va_TraceMsg(trace_ctx, "\tfirst_mb_in_slice = %d\n", p->first_mb_in_slice);
1291
    va_TraceMsg(trace_ctx, "\tslice_type = %d\n", p->slice_type);
1292
    va_TraceMsg(trace_ctx, "\tdirect_spatial_mv_pred_flag = %d\n", p->direct_spatial_mv_pred_flag);
1293
    va_TraceMsg(trace_ctx, "\tnum_ref_idx_l0_active_minus1 = %d\n", p->num_ref_idx_l0_active_minus1);
1294
    va_TraceMsg(trace_ctx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
1295
    va_TraceMsg(trace_ctx, "\tcabac_init_idc = %d\n", p->cabac_init_idc);
1296
    va_TraceMsg(trace_ctx, "\tslice_qp_delta = %d\n", p->slice_qp_delta);
1297
    va_TraceMsg(trace_ctx, "\tdisable_deblocking_filter_idc = %d\n", p->disable_deblocking_filter_idc);
1298
    va_TraceMsg(trace_ctx, "\tslice_alpha_c0_offset_div2 = %d\n", p->slice_alpha_c0_offset_div2);
1299
    va_TraceMsg(trace_ctx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
1300
1301
 
1302
    for (i = 0; i < 32; i++) {
1303
        if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
1304
            ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
1305
        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);
1306
        else
1307
            break;
1308
    }
1309
    va_TraceMsg(trace_ctx, "\tRefPicList1 =\n");
1310
    for (i = 0; i < 32; i++) {
1311
        if ((p->RefPicList1[i].picture_id != VA_INVALID_SURFACE) &&
1312
            ((p->RefPicList1[i].flags & VA_PICTURE_H264_INVALID) == 0))
1313
            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);
1314
        else
1315
            break;
1316
    }
1317
1318
 
1319
    va_TraceMsg(trace_ctx, "\tchroma_log2_weight_denom = %d\n", p->chroma_log2_weight_denom);
1320
    va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
1321
1322
 
1323
        va_TraceMsg(trace_ctx, "\t\t%d\t%d\n",
1324
            p->luma_weight_l0[i],
1325
            p->luma_offset_l0[i]);
1326
    }
1327
1328
 
1329
 
1330
1331
 
1332
        va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n",
1333
            p->chroma_weight_l0[i][0],
1334
            p->chroma_offset_l0[i][0],
1335
            p->chroma_weight_l0[i][1],
1336
            p->chroma_offset_l0[i][1]);
1337
    }
1338
1339
 
1340
 
1341
1342
 
1343
        va_TraceMsg(trace_ctx, "\t\t%d\t%d\n",
1344
            p->luma_weight_l1[i],
1345
            p->luma_offset_l1[i]);
1346
    }
1347
1348
 
1349
 
1350
1351
 
1352
        va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n",
1353
            p->chroma_weight_l1[i][0],
1354
            p->chroma_offset_l1[i][0],
1355
            p->chroma_weight_l1[i][1],
1356
            p->chroma_offset_l1[i][1]);
1357
1358
 
1359
    va_TraceMsg(trace_ctx, NULL);
1360
}
1361
1362
 
1363
    VADisplay dpy,
1364
    VAContextID context,
1365
    VABufferID buffer,
1366
    VABufferType type,
1367
    unsigned int size,
1368
    unsigned int num_elements,
1369
    void *data
1370
)
1371
{
1372
    int i, j;
1373
    VAIQMatrixBufferH264* p = (VAIQMatrixBufferH264* )data;
1374
1375
 
1376
1377
 
1378
1379
 
1380
    for (i = 0; i < 6; i++) {
1381
        for (j = 0; j < 16; j++) {
1382
            if (trace_ctx->trace_fp_log) {
1383
                fprintf(trace_ctx->trace_fp_log, "\t%d", p->ScalingList4x4[i][j]);
1384
                if ((j + 1) % 8 == 0)
1385
                    fprintf(trace_ctx->trace_fp_log, "\n");
1386
            }
1387
        }
1388
    }
1389
1390
 
1391
    for (i = 0; i < 2; i++) {
1392
        for (j = 0; j < 64; j++) {
1393
            if (trace_ctx->trace_fp_log) {
1394
                fprintf(trace_ctx->trace_fp_log,"\t%d", p->ScalingList8x8[i][j]);
1395
                if ((j + 1) % 8 == 0)
1396
                    fprintf(trace_ctx->trace_fp_log, "\n");
1397
            }
1398
        }
1399
    }
1400
1401
 
1402
}
1403
1404
 
1405
 
1406
 
1407
    VADisplay dpy,
1408
    VAContextID context,
1409
    VABufferID buffer,
1410
    VABufferType type,
1411
    unsigned int size,
1412
    unsigned int num_elements,
1413
    void *data)
1414
{
1415
    VAEncSequenceParameterBufferH264 *p = (VAEncSequenceParameterBufferH264 *)data;
1416
    DPY2TRACECTX(dpy);
1417
    unsigned int i;
1418
1419
 
1420
1421
 
1422
    va_TraceMsg(trace_ctx, "\tlevel_idc = %d\n", p->level_idc);
1423
    va_TraceMsg(trace_ctx, "\tintra_period = %d\n", p->intra_period);
1424
    va_TraceMsg(trace_ctx, "\tintra_idr_period = %d\n", p->intra_idr_period);
1425
    va_TraceMsg(trace_ctx, "\tip_period = %d\n", p->ip_period);
1426
    va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
1427
    va_TraceMsg(trace_ctx, "\tmax_num_ref_frames = %d\n", p->max_num_ref_frames);
1428
    va_TraceMsg(trace_ctx, "\tpicture_width_in_mbs = %d\n", p->picture_width_in_mbs);
1429
    va_TraceMsg(trace_ctx, "\tpicture_height_in_mbs = %d\n", p->picture_height_in_mbs);
1430
    va_TraceMsg(trace_ctx, "\tchroma_format_idc = %d\n", p->seq_fields.bits.chroma_format_idc);
1431
    va_TraceMsg(trace_ctx, "\tframe_mbs_only_flag = %d\n", p->seq_fields.bits.frame_mbs_only_flag);
1432
    va_TraceMsg(trace_ctx, "\tmb_adaptive_frame_field_flag = %d\n", p->seq_fields.bits.mb_adaptive_frame_field_flag);
1433
    va_TraceMsg(trace_ctx, "\tseq_scaling_matrix_present_flag = %d\n", p->seq_fields.bits.seq_scaling_matrix_present_flag);
1434
    va_TraceMsg(trace_ctx, "\tdirect_8x8_inference_flag = %d\n", p->seq_fields.bits.direct_8x8_inference_flag);
1435
    va_TraceMsg(trace_ctx, "\tlog2_max_frame_num_minus4 = %d\n", p->seq_fields.bits.log2_max_frame_num_minus4);
1436
    va_TraceMsg(trace_ctx, "\tpic_order_cnt_type = %d\n", p->seq_fields.bits.pic_order_cnt_type);
1437
    va_TraceMsg(trace_ctx, "\tlog2_max_pic_order_cnt_lsb_minus4 = %d\n", p->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4);
1438
    va_TraceMsg(trace_ctx, "\tdelta_pic_order_always_zero_flag = %d\n", p->seq_fields.bits.delta_pic_order_always_zero_flag);
1439
    va_TraceMsg(trace_ctx, "\tbit_depth_luma_minus8 = %d\n", p->bit_depth_luma_minus8);
1440
    va_TraceMsg(trace_ctx, "\tbit_depth_chroma_minus8 = %d\n", p->bit_depth_chroma_minus8);
1441
    va_TraceMsg(trace_ctx, "\tnum_ref_frames_in_pic_order_cnt_cycle = %d\n", p->num_ref_frames_in_pic_order_cnt_cycle);
1442
    va_TraceMsg(trace_ctx, "\toffset_for_non_ref_pic = %d\n", p->offset_for_non_ref_pic);
1443
    va_TraceMsg(trace_ctx, "\toffset_for_top_to_bottom_field = %d\n", p->offset_for_top_to_bottom_field);
1444
    for(i = 0; (i < p->max_num_ref_frames) && (i < 32); ++i)
1445
        va_TraceMsg(trace_ctx, "\toffset_for_ref_frame[%d] = %d\n", i, p->offset_for_ref_frame[i]);
1446
    va_TraceMsg(trace_ctx, "\tframe_cropping_flag = %d\n", p->frame_cropping_flag);
1447
    va_TraceMsg(trace_ctx, "\tframe_crop_left_offset = %d\n", p->frame_crop_left_offset);
1448
    va_TraceMsg(trace_ctx, "\tframe_crop_right_offset = %d\n", p->frame_crop_right_offset);
1449
    va_TraceMsg(trace_ctx, "\tframe_crop_top_offset = %d\n", p->frame_crop_top_offset);
1450
    va_TraceMsg(trace_ctx, "\tframe_crop_bottom_offset = %d\n", p->frame_crop_bottom_offset);
1451
    va_TraceMsg(trace_ctx, "\tvui_parameters_present_flag = %d\n", p->vui_parameters_present_flag);
1452
    va_TraceMsg(trace_ctx, "\taspect_ratio_info_present_flag = %d\n", p->vui_fields.bits.aspect_ratio_info_present_flag);
1453
    va_TraceMsg(trace_ctx, "\ttiming_info_present_flag = %d\n", p->vui_fields.bits.timing_info_present_flag);
1454
    va_TraceMsg(trace_ctx, "\tbitstream_restriction_flag = %d\n", p->vui_fields.bits.bitstream_restriction_flag);
1455
    va_TraceMsg(trace_ctx, "\tlog2_max_mv_length_horizontal = %d\n", p->vui_fields.bits.log2_max_mv_length_horizontal);
1456
    va_TraceMsg(trace_ctx, "\tlog2_max_mv_length_vertical = %d\n", p->vui_fields.bits.log2_max_mv_length_vertical);
1457
    va_TraceMsg(trace_ctx, "\taspect_ratio_idc = %d\n", p->aspect_ratio_idc);
1458
    va_TraceMsg(trace_ctx, "\tsar_width = %d\n", p->sar_width);
1459
    va_TraceMsg(trace_ctx, "\tsar_height = %d\n", p->sar_height);
1460
    va_TraceMsg(trace_ctx, "\tnum_units_in_tick = %d\n", p->num_units_in_tick);
1461
    va_TraceMsg(trace_ctx, "\ttime_scale = %d\n", p->time_scale);
1462
1463
 
1464
1465
 
1466
}
1467
1468
 
1469
 
1470
    VADisplay dpy,
1471
    VAContextID context,
1472
    VABufferID buffer,
1473
    VABufferType type,
1474
    unsigned int size,
1475
    unsigned int num_elements,
1476
    void *data)
1477
{
1478
    VAEncPictureParameterBufferH264 *p = (VAEncPictureParameterBufferH264 *)data;
1479
    DPY2TRACECTX(dpy);
1480
    int i;
1481
1482
 
1483
1484
 
1485
    va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", p->CurrPic.frame_idx);
1486
    va_TraceMsg(trace_ctx, "\tCurrPic.flags = %d\n", p->CurrPic.flags);
1487
    va_TraceMsg(trace_ctx, "\tCurrPic.TopFieldOrderCnt = %d\n", p->CurrPic.TopFieldOrderCnt);
1488
    va_TraceMsg(trace_ctx, "\tCurrPic.BottomFieldOrderCnt = %d\n", p->CurrPic.BottomFieldOrderCnt);
1489
    va_TraceMsg(trace_ctx, "\tReferenceFrames (TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
1490
    for (i = 0; i < 16; i++)
1491
    {
1492
        if ((p->ReferenceFrames[i].picture_id != VA_INVALID_SURFACE) &&
1493
            ((p->ReferenceFrames[i].flags & VA_PICTURE_H264_INVALID) == 0)) {
1494
            va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n",
1495
                        p->ReferenceFrames[i].TopFieldOrderCnt,
1496
                        p->ReferenceFrames[i].BottomFieldOrderCnt,
1497
                        p->ReferenceFrames[i].picture_id,
1498
                        p->ReferenceFrames[i].frame_idx,
1499
                        p->ReferenceFrames[i].flags
1500
                        );
1501
        } else
1502
            break;
1503
    }
1504
    va_TraceMsg(trace_ctx, "\tcoded_buf = %08x\n", p->coded_buf);
1505
    va_TraceMsg(trace_ctx, "\tpic_parameter_set_id = %d\n", p->pic_parameter_set_id);
1506
    va_TraceMsg(trace_ctx, "\tseq_parameter_set_id = %d\n", p->seq_parameter_set_id);
1507
    va_TraceMsg(trace_ctx, "\tlast_picture = 0x%08x\n", p->last_picture);
1508
    va_TraceMsg(trace_ctx, "\tframe_num = %d\n", p->frame_num);
1509
    va_TraceMsg(trace_ctx, "\tpic_init_qp = %d\n", p->pic_init_qp);
1510
    va_TraceMsg(trace_ctx, "\tnum_ref_idx_l0_active_minus1 = %d\n", p->num_ref_idx_l0_active_minus1);
1511
    va_TraceMsg(trace_ctx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
1512
    va_TraceMsg(trace_ctx, "\tchroma_qp_index_offset = %d\n", p->chroma_qp_index_offset);
1513
    va_TraceMsg(trace_ctx, "\tsecond_chroma_qp_index_offset = %d\n", p->second_chroma_qp_index_offset);
1514
    va_TraceMsg(trace_ctx, "\tpic_fields = 0x%03x\n", p->pic_fields.value);
1515
    va_TraceMsg(trace_ctx, "\tidr_pic_flag = %d\n", p->pic_fields.bits.idr_pic_flag);
1516
    va_TraceMsg(trace_ctx, "\treference_pic_flag = %d\n", p->pic_fields.bits.reference_pic_flag);
1517
    va_TraceMsg(trace_ctx, "\tentropy_coding_mode_flag = %d\n", p->pic_fields.bits.entropy_coding_mode_flag);
1518
    va_TraceMsg(trace_ctx, "\tweighted_pred_flag = %d\n", p->pic_fields.bits.weighted_pred_flag);
1519
    va_TraceMsg(trace_ctx, "\tweighted_bipred_idc = %d\n", p->pic_fields.bits.weighted_bipred_idc);
1520
    va_TraceMsg(trace_ctx, "\tconstrained_intra_pred_flag = %d\n", p->pic_fields.bits.constrained_intra_pred_flag);
1521
    va_TraceMsg(trace_ctx, "\ttransform_8x8_mode_flag = %d\n", p->pic_fields.bits.transform_8x8_mode_flag);
1522
    va_TraceMsg(trace_ctx, "\tdeblocking_filter_control_present_flag = %d\n", p->pic_fields.bits.deblocking_filter_control_present_flag);
1523
    va_TraceMsg(trace_ctx, "\tredundant_pic_cnt_present_flag = %d\n", p->pic_fields.bits.redundant_pic_cnt_present_flag);
1524
    va_TraceMsg(trace_ctx, "\tpic_order_present_flag = %d\n", p->pic_fields.bits.pic_order_present_flag);
1525
    va_TraceMsg(trace_ctx, "\tpic_scaling_matrix_present_flag = %d\n", p->pic_fields.bits.pic_scaling_matrix_present_flag);
1526
1527
 
1528
1529
 
1530
}
1531
1532
 
1533
    VADisplay dpy,
1534
    VAContextID context,
1535
    VABufferID buffer,
1536
    VABufferType type,
1537
    unsigned int size,
1538
    unsigned int num_elements,
1539
    void *data)
1540
{
1541
    VAEncSliceParameterBuffer* p = (VAEncSliceParameterBuffer*)data;
1542
    DPY2TRACECTX(dpy);
1543
1544
 
1545
1546
 
1547
    va_TraceMsg(trace_ctx, "\tslice_height = %d\n", p->slice_height);
1548
    va_TraceMsg(trace_ctx, "\tslice_flags.is_intra = %d\n", p->slice_flags.bits.is_intra);
1549
    va_TraceMsg(trace_ctx, "\tslice_flags.disable_deblocking_filter_idc = %d\n", p->slice_flags.bits.disable_deblocking_filter_idc);
1550
    va_TraceMsg(trace_ctx, "\tslice_flags.uses_long_term_ref = %d\n", p->slice_flags.bits.uses_long_term_ref);
1551
    va_TraceMsg(trace_ctx, "\tslice_flags.is_long_term_ref = %d\n", p->slice_flags.bits.is_long_term_ref);
1552
    va_TraceMsg(trace_ctx, NULL);
1553
1554
 
1555
}
1556
1557
 
1558
    VADisplay dpy,
1559
    VAContextID context,
1560
    VABufferID buffer,
1561
    VABufferType type,
1562
    unsigned int size,
1563
    unsigned int num_elements,
1564
    void *data)
1565
{
1566
    VAEncSliceParameterBufferH264* p = (VAEncSliceParameterBufferH264*)data;
1567
    DPY2TRACECTX(dpy);
1568
    int i;
1569
1570
 
1571
        return;
1572
1573
 
1574
    va_TraceMsg(trace_ctx, "\tmacroblock_address = %d\n", p->macroblock_address);
1575
    va_TraceMsg(trace_ctx, "\tnum_macroblocks = %d\n", p->num_macroblocks);
1576
    va_TraceMsg(trace_ctx, "\tmacroblock_info = %08x\n", p->macroblock_info);
1577
    va_TraceMsg(trace_ctx, "\tslice_type = %d\n", p->slice_type);
1578
    va_TraceMsg(trace_ctx, "\tpic_parameter_set_id = %d\n", p->pic_parameter_set_id);
1579
    va_TraceMsg(trace_ctx, "\tidr_pic_id = %d\n", p->idr_pic_id);
1580
    va_TraceMsg(trace_ctx, "\tpic_order_cnt_lsb = %d\n", p->pic_order_cnt_lsb);
1581
    va_TraceMsg(trace_ctx, "\tdelta_pic_order_cnt_bottom = %d\n", p->delta_pic_order_cnt_bottom);
1582
    va_TraceMsg(trace_ctx, "\tdelta_pic_order_cnt[0] = %d\n", p->delta_pic_order_cnt[0]);
1583
    va_TraceMsg(trace_ctx, "\tdelta_pic_order_cnt[1] = %d\n", p->delta_pic_order_cnt[1]);
1584
    va_TraceMsg(trace_ctx, "\tdirect_spatial_mv_pred_flag = %d\n", p->direct_spatial_mv_pred_flag);
1585
    va_TraceMsg(trace_ctx, "\tnum_ref_idx_active_override_flag = %d\n", p->num_ref_idx_active_override_flag);
1586
    va_TraceMsg(trace_ctx, "\tnum_ref_idx_l1_active_minus1 = %d\n", p->num_ref_idx_l1_active_minus1);
1587
    va_TraceMsg(trace_ctx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
1588
1589
 
1590
1591
 
1592
 
1593
 
1594
        if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
1595
            ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
1596
            va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x-%08d-0x%08x\n",
1597
                        p->RefPicList0[i].TopFieldOrderCnt,
1598
                        p->RefPicList0[i].BottomFieldOrderCnt,
1599
                        p->RefPicList0[i].picture_id,
1600
                        p->RefPicList0[i].frame_idx,
1601
                        p->RefPicList0[i].flags);
1602
        else
1603
            break;
1604
    }
1605
1606
 
1607
    for (i = 0; i < 32; i++) {
1608
        if ((p->RefPicList1[i].picture_id != VA_INVALID_SURFACE) &&
1609
            ((p->RefPicList1[i].flags & VA_PICTURE_H264_INVALID) == 0))
1610
            va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x-%08d-0x%08d\n",
1611
                        p->RefPicList1[i].TopFieldOrderCnt,
1612
                        p->RefPicList1[i].BottomFieldOrderCnt,
1613
                        p->RefPicList1[i].picture_id,
1614
                        p->RefPicList1[i].frame_idx,
1615
                        p->RefPicList1[i].flags
1616
                        );
1617
        else
1618
            break;
1619
    }
1620
1621
 
1622
    va_TraceMsg(trace_ctx, "\tchroma_log2_weight_denom = %d\n", p->chroma_log2_weight_denom);
1623
    va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", p->luma_weight_l0_flag);
1624
    if (p->luma_weight_l0_flag) {
1625
        for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) {
1626
            va_TraceMsg(trace_ctx, "\t\t%d\t%d\n",
1627
                        p->luma_weight_l0[i],
1628
                        p->luma_offset_l0[i]);
1629
        }
1630
    }
1631
1632
 
1633
    if (p->chroma_weight_l0_flag) {
1634
        for (i = 0; (i <= p->num_ref_idx_l0_active_minus1) && (i<32); i++) {
1635
            va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n",
1636
                        p->chroma_weight_l0[i][0],
1637
                        p->chroma_offset_l0[i][0],
1638
                        p->chroma_weight_l0[i][1],
1639
                        p->chroma_offset_l0[i][1]);
1640
        }
1641
    }
1642
1643
 
1644
    if (p->luma_weight_l1_flag) {
1645
        for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) {
1646
            va_TraceMsg(trace_ctx, "\t\t%d\t\t%d\n",
1647
                        p->luma_weight_l1[i],
1648
                        p->luma_offset_l1[i]);
1649
        }
1650
    }
1651
1652
 
1653
    if (p->chroma_weight_l1_flag && p->num_ref_idx_l1_active_minus1 < 32) {
1654
        for (i = 0; (i <= p->num_ref_idx_l1_active_minus1) && (i<32); i++) {
1655
            va_TraceMsg(trace_ctx, "\t\t%d\t%d\t%d\t%d\n",
1656
                        p->chroma_weight_l1[i][0],
1657
                        p->chroma_offset_l1[i][0],
1658
                        p->chroma_weight_l1[i][1],
1659
                        p->chroma_offset_l1[i][1]);
1660
        }
1661
    }
1662
    va_TraceMsg(trace_ctx, NULL);
1663
1664
 
1665
    va_TraceMsg(trace_ctx, "\tslice_qp_delta = %d\n", p->slice_qp_delta);
1666
    va_TraceMsg(trace_ctx, "\tdisable_deblocking_filter_idc = %d\n", p->disable_deblocking_filter_idc);
1667
    va_TraceMsg(trace_ctx, "\tslice_alpha_c0_offset_div2 = %d\n", p->slice_alpha_c0_offset_div2);
1668
    va_TraceMsg(trace_ctx, "\tslice_beta_offset_div2 = %d\n", p->slice_beta_offset_div2);
1669
    va_TraceMsg(trace_ctx, NULL);
1670
1671
 
1672
}
1673
1674
 
1675
 
1676
    VADisplay dpy,
1677
    VAContextID context,
1678
    VABufferID buffer,
1679
    VABufferType type,
1680
    unsigned int size,
1681
    unsigned int num_elements,
1682
    void *data)
1683
{
1684
    VAEncPackedHeaderParameterBuffer* p = (VAEncPackedHeaderParameterBuffer*)data;
1685
    DPY2TRACECTX(dpy);
1686
    int i;
1687
1688
 
1689
        return;
1690
    va_TraceMsg(trace_ctx, "\t--VAEncPackedHeaderParameterBuffer\n");
1691
    va_TraceMsg(trace_ctx, "\ttype = 0x%08x\n", p->type);
1692
    va_TraceMsg(trace_ctx, "\tbit_length = %d\n", p->bit_length);
1693
    va_TraceMsg(trace_ctx, "\thas_emulation_bytes = %d\n", p->has_emulation_bytes);
1694
    va_TraceMsg(trace_ctx, NULL);
1695
1696
 
1697
}
1698
1699
 
1700
    VADisplay dpy,
1701
    VAContextID context,
1702
    VABufferID buffer,
1703
    VABufferType type,
1704
    unsigned int size,
1705
    unsigned int num_elements,
1706
    void *data)
1707
{
1708
    VAEncMiscParameterBuffer* tmp = (VAEncMiscParameterBuffer*)data;
1709
    DPY2TRACECTX(dpy);
1710
1711
 
1712
    case VAEncMiscParameterTypeFrameRate:
1713
    {
1714
        VAEncMiscParameterFrameRate *p = (VAEncMiscParameterFrameRate *)tmp->data;
1715
        va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterFrameRate\n");
1716
        va_TraceMsg(trace_ctx, "\tframerate = %d\n", p->framerate);
1717
1718
 
1719
    }
1720
    case VAEncMiscParameterTypeRateControl:
1721
    {
1722
        VAEncMiscParameterRateControl *p = (VAEncMiscParameterRateControl *)tmp->data;
1723
1724
 
1725
        va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
1726
        va_TraceMsg(trace_ctx, "\ttarget_percentage = %d\n", p->target_percentage);
1727
        va_TraceMsg(trace_ctx, "\twindow_size = %d\n", p->window_size);
1728
        va_TraceMsg(trace_ctx, "\tinitial_qp = %d\n", p->initial_qp);
1729
        va_TraceMsg(trace_ctx, "\tmin_qp = %d\n", p->min_qp);
1730
        va_TraceMsg(trace_ctx, "\tbasic_unit_size = %d\n", p->basic_unit_size);
1731
        va_TraceMsg(trace_ctx, "\trc_flags.reset = %d \n", p->rc_flags.bits.reset);
1732
        va_TraceMsg(trace_ctx, "\trc_flags.disable_frame_skip = %d\n", p->rc_flags.bits.disable_frame_skip);
1733
        va_TraceMsg(trace_ctx, "\trc_flags.disable_bit_stuffing = %d\n", p->rc_flags.bits.disable_bit_stuffing);
1734
        break;
1735
    }
1736
    case VAEncMiscParameterTypeMaxSliceSize:
1737
    {
1738
        VAEncMiscParameterMaxSliceSize *p = (VAEncMiscParameterMaxSliceSize *)tmp->data;
1739
1740
 
1741
        va_TraceMsg(trace_ctx, "\tmax_slice_size = %d\n", p->max_slice_size);
1742
        break;
1743
    }
1744
    case VAEncMiscParameterTypeAIR:
1745
    {
1746
        VAEncMiscParameterAIR *p = (VAEncMiscParameterAIR *)tmp->data;
1747
1748
 
1749
        va_TraceMsg(trace_ctx, "\tair_num_mbs = %d\n", p->air_num_mbs);
1750
        va_TraceMsg(trace_ctx, "\tair_threshold = %d\n", p->air_threshold);
1751
        va_TraceMsg(trace_ctx, "\tair_auto = %d\n", p->air_auto);
1752
        break;
1753
    }
1754
    case VAEncMiscParameterTypeHRD:
1755
    {
1756
        VAEncMiscParameterHRD *p = (VAEncMiscParameterHRD *)tmp->data;
1757
1758
 
1759
        va_TraceMsg(trace_ctx, "\tinitial_buffer_fullness = %d\n", p->initial_buffer_fullness);
1760
        va_TraceMsg(trace_ctx, "\tbuffer_size = %d\n", p->buffer_size);
1761
        break;
1762
    }
1763
    case VAEncMiscParameterTypeMaxFrameSize:
1764
    {
1765
        VAEncMiscParameterBufferMaxFrameSize *p = (VAEncMiscParameterBufferMaxFrameSize *)tmp->data;
1766
1767
 
1768
        va_TraceMsg(trace_ctx, "\tmax_frame_size = %d\n", p->max_frame_size);
1769
        break;
1770
    }
1771
    default:
1772
        va_TraceMsg(trace_ctx, "Unknown VAEncMiscParameterBuffer(type = %d):\n", tmp->type);
1773
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, data);
1774
        break;
1775
    }
1776
    va_TraceMsg(trace_ctx, NULL);
1777
1778
 
1779
}
1780
1781
 
1782
 
1783
    VADisplay dpy,
1784
    VAContextID context,
1785
    VABufferID buffer,
1786
    VABufferType type,
1787
    unsigned int size,
1788
    unsigned int num_elements,
1789
    void *data
1790
)
1791
{
1792
    VAPictureParameterBufferVC1* p = (VAPictureParameterBufferVC1*)data;
1793
    DPY2TRACECTX(dpy);
1794
1795
 
1796
1797
 
1798
    va_TraceMsg(trace_ctx, "\tbackward_reference_picture = 0x%08x\n", p->backward_reference_picture);
1799
    va_TraceMsg(trace_ctx, "\tinloop_decoded_picture = 0x%08x\n", p->inloop_decoded_picture);
1800
1801
 
1802
    va_TraceMsg(trace_ctx, "\tinterlace = %d\n", p->sequence_fields.bits.interlace);
1803
    va_TraceMsg(trace_ctx, "\ttfcntrflag = %d\n", p->sequence_fields.bits.tfcntrflag);
1804
    va_TraceMsg(trace_ctx, "\tfinterpflag = %d\n", p->sequence_fields.bits.finterpflag);
1805
    va_TraceMsg(trace_ctx, "\tpsf = %d\n", p->sequence_fields.bits.psf);
1806
    va_TraceMsg(trace_ctx, "\tmultires = %d\n", p->sequence_fields.bits.multires);
1807
    va_TraceMsg(trace_ctx, "\toverlap = %d\n", p->sequence_fields.bits.overlap);
1808
    va_TraceMsg(trace_ctx, "\tsyncmarker = %d\n", p->sequence_fields.bits.syncmarker);
1809
    va_TraceMsg(trace_ctx, "\trangered = %d\n", p->sequence_fields.bits.rangered);
1810
    va_TraceMsg(trace_ctx, "\tmax_b_frames = %d\n", p->sequence_fields.bits.max_b_frames);
1811
    va_TraceMsg(trace_ctx, "\tprofile = %d\n", p->sequence_fields.bits.profile);
1812
    va_TraceMsg(trace_ctx, "\tcoded_width = %d\n", p->coded_width);
1813
    va_TraceMsg(trace_ctx, "\tcoded_height = %d\n", p->coded_height);
1814
    va_TraceMsg(trace_ctx, "\tclosed_entry = %d\n", p->entrypoint_fields.bits.closed_entry);
1815
    va_TraceMsg(trace_ctx, "\tbroken_link = %d\n", p->entrypoint_fields.bits.broken_link);
1816
    va_TraceMsg(trace_ctx, "\tclosed_entry = %d\n", p->entrypoint_fields.bits.closed_entry);
1817
    va_TraceMsg(trace_ctx, "\tpanscan_flag = %d\n", p->entrypoint_fields.bits.panscan_flag);
1818
    va_TraceMsg(trace_ctx, "\tloopfilter = %d\n", p->entrypoint_fields.bits.loopfilter);
1819
    va_TraceMsg(trace_ctx, "\tconditional_overlap_flag = %d\n", p->conditional_overlap_flag);
1820
    va_TraceMsg(trace_ctx, "\tfast_uvmc_flag = %d\n", p->fast_uvmc_flag);
1821
    va_TraceMsg(trace_ctx, "\trange_mapping_luma_flag = %d\n", p->range_mapping_fields.bits.luma_flag);
1822
    va_TraceMsg(trace_ctx, "\trange_mapping_luma = %d\n", p->range_mapping_fields.bits.luma);
1823
    va_TraceMsg(trace_ctx, "\trange_mapping_chroma_flag = %d\n", p->range_mapping_fields.bits.chroma_flag);
1824
    va_TraceMsg(trace_ctx, "\trange_mapping_chroma = %d\n", p->range_mapping_fields.bits.chroma);
1825
    va_TraceMsg(trace_ctx, "\tb_picture_fraction = %d\n", p->b_picture_fraction);
1826
    va_TraceMsg(trace_ctx, "\tcbp_table = %d\n", p->cbp_table);
1827
    va_TraceMsg(trace_ctx, "\tmb_mode_table = %d\n", p->mb_mode_table);
1828
    va_TraceMsg(trace_ctx, "\trange_reduction_frame = %d\n", p->range_reduction_frame);
1829
    va_TraceMsg(trace_ctx, "\trounding_control = %d\n", p->rounding_control);
1830
    va_TraceMsg(trace_ctx, "\tpost_processing = %d\n", p->post_processing);
1831
    va_TraceMsg(trace_ctx, "\tpicture_resolution_index = %d\n", p->picture_resolution_index);
1832
    va_TraceMsg(trace_ctx, "\tluma_scale = %d\n", p->luma_scale);
1833
    va_TraceMsg(trace_ctx, "\tluma_shift = %d\n", p->luma_shift);
1834
    va_TraceMsg(trace_ctx, "\tpicture_type = %d\n", p->picture_fields.bits.picture_type);
1835
    va_TraceMsg(trace_ctx, "\tframe_coding_mode = %d\n", p->picture_fields.bits.frame_coding_mode);
1836
    va_TraceMsg(trace_ctx, "\ttop_field_first = %d\n", p->picture_fields.bits.top_field_first);
1837
    va_TraceMsg(trace_ctx, "\tis_first_field = %d\n", p->picture_fields.bits.is_first_field);
1838
    va_TraceMsg(trace_ctx, "\tintensity_compensation = %d\n", p->picture_fields.bits.intensity_compensation);
1839
    va_TraceMsg(trace_ctx, "\tmv_type_mb = %d\n", p->raw_coding.flags.mv_type_mb);
1840
    va_TraceMsg(trace_ctx, "\tdirect_mb = %d\n", p->raw_coding.flags.direct_mb);
1841
    va_TraceMsg(trace_ctx, "\tskip_mb = %d\n", p->raw_coding.flags.skip_mb);
1842
    va_TraceMsg(trace_ctx, "\tfield_tx = %d\n", p->raw_coding.flags.field_tx);
1843
    va_TraceMsg(trace_ctx, "\tforward_mb = %d\n", p->raw_coding.flags.forward_mb);
1844
    va_TraceMsg(trace_ctx, "\tac_pred = %d\n", p->raw_coding.flags.ac_pred);
1845
    va_TraceMsg(trace_ctx, "\toverflags = %d\n", p->raw_coding.flags.overflags);
1846
    va_TraceMsg(trace_ctx, "\tbp_mv_type_mb = %d\n", p->bitplane_present.flags.bp_mv_type_mb);
1847
    va_TraceMsg(trace_ctx, "\tbp_direct_mb = %d\n", p->bitplane_present.flags.bp_direct_mb);
1848
    va_TraceMsg(trace_ctx, "\tbp_skip_mb = %d\n", p->bitplane_present.flags.bp_skip_mb);
1849
    va_TraceMsg(trace_ctx, "\tbp_field_tx = %d\n", p->bitplane_present.flags.bp_field_tx);
1850
    va_TraceMsg(trace_ctx, "\tbp_forward_mb = %d\n", p->bitplane_present.flags.bp_forward_mb);
1851
    va_TraceMsg(trace_ctx, "\tbp_ac_pred = %d\n", p->bitplane_present.flags.bp_ac_pred);
1852
    va_TraceMsg(trace_ctx, "\tbp_overflags = %d\n", p->bitplane_present.flags.bp_overflags);
1853
    va_TraceMsg(trace_ctx, "\treference_distance_flag = %d\n", p->reference_fields.bits.reference_distance_flag);
1854
    va_TraceMsg(trace_ctx, "\treference_distance = %d\n", p->reference_fields.bits.reference_distance);
1855
    va_TraceMsg(trace_ctx, "\tnum_reference_pictures = %d\n", p->reference_fields.bits.num_reference_pictures);
1856
    va_TraceMsg(trace_ctx, "\treference_field_pic_indicator = %d\n", p->reference_fields.bits.reference_field_pic_indicator);
1857
    va_TraceMsg(trace_ctx, "\tmv_mode = %d\n", p->mv_fields.bits.mv_mode);
1858
    va_TraceMsg(trace_ctx, "\tmv_mode2 = %d\n", p->mv_fields.bits.mv_mode2);
1859
    va_TraceMsg(trace_ctx, "\tmv_table = %d\n", p->mv_fields.bits.mv_table);
1860
    va_TraceMsg(trace_ctx, "\ttwo_mv_block_pattern_table = %d\n", p->mv_fields.bits.two_mv_block_pattern_table);
1861
    va_TraceMsg(trace_ctx, "\tfour_mv_switch = %d\n", p->mv_fields.bits.four_mv_switch);
1862
    va_TraceMsg(trace_ctx, "\tfour_mv_block_pattern_table = %d\n", p->mv_fields.bits.four_mv_block_pattern_table);
1863
    va_TraceMsg(trace_ctx, "\textended_mv_flag = %d\n", p->mv_fields.bits.extended_mv_flag);
1864
    va_TraceMsg(trace_ctx, "\textended_mv_range = %d\n", p->mv_fields.bits.extended_mv_range);
1865
    va_TraceMsg(trace_ctx, "\textended_dmv_flag = %d\n", p->mv_fields.bits.extended_dmv_flag);
1866
    va_TraceMsg(trace_ctx, "\textended_dmv_range = %d\n", p->mv_fields.bits.extended_dmv_range);
1867
    va_TraceMsg(trace_ctx, "\tdquant = %d\n", p->pic_quantizer_fields.bits.dquant);
1868
    va_TraceMsg(trace_ctx, "\tquantizer = %d\n", p->pic_quantizer_fields.bits.quantizer);
1869
    va_TraceMsg(trace_ctx, "\thalf_qp = %d\n", p->pic_quantizer_fields.bits.half_qp);
1870
    va_TraceMsg(trace_ctx, "\tpic_quantizer_scale = %d\n", p->pic_quantizer_fields.bits.pic_quantizer_scale);
1871
    va_TraceMsg(trace_ctx, "\tpic_quantizer_type = %d\n", p->pic_quantizer_fields.bits.pic_quantizer_type);
1872
    va_TraceMsg(trace_ctx, "\tdq_frame = %d\n", p->pic_quantizer_fields.bits.dq_frame);
1873
    va_TraceMsg(trace_ctx, "\tdq_profile = %d\n", p->pic_quantizer_fields.bits.dq_profile);
1874
    va_TraceMsg(trace_ctx, "\tdq_sb_edge = %d\n", p->pic_quantizer_fields.bits.dq_sb_edge);
1875
    va_TraceMsg(trace_ctx, "\tdq_db_edge = %d\n", p->pic_quantizer_fields.bits.dq_db_edge);
1876
    va_TraceMsg(trace_ctx, "\tdq_binary_level = %d\n", p->pic_quantizer_fields.bits.dq_binary_level);
1877
    va_TraceMsg(trace_ctx, "\talt_pic_quantizer = %d\n", p->pic_quantizer_fields.bits.alt_pic_quantizer);
1878
    va_TraceMsg(trace_ctx, "\tvariable_sized_transform_flag = %d\n", p->transform_fields.bits.variable_sized_transform_flag);
1879
    va_TraceMsg(trace_ctx, "\tmb_level_transform_type_flag = %d\n", p->transform_fields.bits.mb_level_transform_type_flag);
1880
    va_TraceMsg(trace_ctx, "\tframe_level_transform_type = %d\n", p->transform_fields.bits.frame_level_transform_type);
1881
    va_TraceMsg(trace_ctx, "\ttransform_ac_codingset_idx1 = %d\n", p->transform_fields.bits.transform_ac_codingset_idx1);
1882
    va_TraceMsg(trace_ctx, "\ttransform_ac_codingset_idx2 = %d\n", p->transform_fields.bits.transform_ac_codingset_idx2);
1883
    va_TraceMsg(trace_ctx, "\tintra_transform_dc_table = %d\n", p->transform_fields.bits.intra_transform_dc_table);
1884
    va_TraceMsg(trace_ctx, NULL);
1885
}
1886
1887
 
1888
    VADisplay dpy,
1889
    VAContextID context,
1890
    VABufferID buffer,
1891
    VABufferType type,
1892
    unsigned int size,
1893
    unsigned int num_elements,
1894
    void* data
1895
)
1896
{
1897
    VASliceParameterBufferVC1 *p = (VASliceParameterBufferVC1*)data;
1898
    DPY2TRACECTX(dpy);
1899
1900
 
1901
    trace_ctx->trace_slice_size = p->slice_data_size;
1902
1903
 
1904
    va_TraceMsg(trace_ctx, "\tslice_data_size = %d\n", p->slice_data_size);
1905
    va_TraceMsg(trace_ctx, "\tslice_data_offset = %d\n", p->slice_data_offset);
1906
    va_TraceMsg(trace_ctx, "\tslice_data_flag = %d\n", p->slice_data_flag);
1907
    va_TraceMsg(trace_ctx, "\tmacroblock_offset = %d\n", p->macroblock_offset);
1908
    va_TraceMsg(trace_ctx, "\tslice_vertical_position = %d\n", p->slice_vertical_position);
1909
    va_TraceMsg(trace_ctx, NULL);
1910
}
1911
1912
 
1913
    VADisplay dpy,
1914
    VAContextID context,
1915
    VABufferID buffer,
1916
    VABufferType type,
1917
    unsigned int size,
1918
    unsigned int num_elements,
1919
    void *data)
1920
{
1921
    char tmp[1024];
1922
    VAPictureParameterBufferVP8 *p = (VAPictureParameterBufferVP8 *)data;
1923
    DPY2TRACECTX(dpy);
1924
    int i,j;
1925
1926
 
1927
1928
 
1929
    va_TraceMsg(trace_ctx, "\tframe_height = %d\n", p->frame_height);
1930
    va_TraceMsg(trace_ctx, "\tlast_ref_frame = %x\n", p->last_ref_frame);
1931
    va_TraceMsg(trace_ctx, "\tgolden_ref_frame = %x\n", p->golden_ref_frame);
1932
    va_TraceMsg(trace_ctx, "\talt_ref_frame = %x\n", p->alt_ref_frame);
1933
    va_TraceMsg(trace_ctx, "\tout_of_loop_frame = %x\n", p->out_of_loop_frame);
1934
1935
 
1936
    va_TraceMsg(trace_ctx, "\tversion = %d\n", p->pic_fields.bits.version);
1937
    va_TraceMsg(trace_ctx, "\tsegmentation_enabled = %d\n", p->pic_fields.bits.segmentation_enabled);
1938
    va_TraceMsg(trace_ctx, "\tupdate_mb_segmentation_map = %d\n", p->pic_fields.bits.update_mb_segmentation_map);
1939
    va_TraceMsg(trace_ctx, "\tupdate_segment_feature_data = %d\n", p->pic_fields.bits.update_segment_feature_data);
1940
    va_TraceMsg(trace_ctx, "\tfilter_type = %d\n", p->pic_fields.bits.filter_type);
1941
    va_TraceMsg(trace_ctx, "\tsharpness_level = %d\n", p->pic_fields.bits.sharpness_level);
1942
    va_TraceMsg(trace_ctx, "\tloop_filter_adj_enable = %d\n", p->pic_fields.bits.loop_filter_adj_enable);
1943
    va_TraceMsg(trace_ctx, "\tmode_ref_lf_delta_update = %d\n", p->pic_fields.bits.mode_ref_lf_delta_update);
1944
    va_TraceMsg(trace_ctx, "\tsign_bias_golden = %d\n", p->pic_fields.bits.sign_bias_golden);
1945
    va_TraceMsg(trace_ctx, "\tsign_bias_alternate = %d\n", p->pic_fields.bits.sign_bias_alternate);
1946
    va_TraceMsg(trace_ctx, "\tmb_no_coeff_skip = %d\n", p->pic_fields.bits.mb_no_coeff_skip);
1947
    va_TraceMsg(trace_ctx, "\tloop_filter_disable = %d\n", p->pic_fields.bits.loop_filter_disable);
1948
1949
 
1950
        p->mb_segment_tree_probs[0], p->mb_segment_tree_probs[1], p->mb_segment_tree_probs[2]);
1951
1952
 
1953
        p->loop_filter_level[0], p->loop_filter_level[1], p->loop_filter_level[2], p->loop_filter_level[3]);
1954
1955
 
1956
        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]);
1957
1958
 
1959
        p->loop_filter_deltas_mode[0], p->loop_filter_deltas_mode[1], p->loop_filter_deltas_mode[2], p->loop_filter_deltas_mode[3]);
1960
1961
 
1962
    va_TraceMsg(trace_ctx, "\tprob_intra = %2x\n", p->prob_intra);
1963
    va_TraceMsg(trace_ctx, "\tprob_last = %2x\n", p->prob_last);
1964
    va_TraceMsg(trace_ctx, "\tprob_gf = %2x\n", p->prob_gf);
1965
1966
 
1967
        p->y_mode_probs[0], p->y_mode_probs[1], p->y_mode_probs[2], p->y_mode_probs[3]);
1968
1969
 
1970
        p->uv_mode_probs[0], p->uv_mode_probs[1], p->uv_mode_probs[2]);
1971
1972
 
1973
    for(i = 0; i<2; ++i) {
1974
        memset(tmp, 0, sizeof tmp);
1975
        for (j=0; j<19; j++)
1976
            sprintf(tmp + strlen(tmp), "%2x ", p->mv_probs[i][j]);
1977
        va_TraceMsg(trace_ctx,"\t\t[%d] = %s\n", i, tmp);
1978
    }
1979
1980
 
1981
        p->bool_coder_ctx.range, p->bool_coder_ctx.value, p->bool_coder_ctx.count);
1982
1983
 
1984
1985
 
1986
}
1987
1988
 
1989
    VADisplay dpy,
1990
    VAContextID context,
1991
    VABufferID buffer,
1992
    VABufferType type,
1993
    unsigned int size,
1994
    unsigned int num_elements,
1995
    void *data)
1996
{
1997
    VASliceParameterBufferVP8 *p = (VASliceParameterBufferVP8 *)data;
1998
    DPY2TRACECTX(dpy);
1999
    int i;
2000
2001
 
2002
2003
 
2004
    va_TraceMsg(trace_ctx, "\tslice_data_offset = %d\n", p->slice_data_offset);
2005
    va_TraceMsg(trace_ctx, "\tslice_data_flag = %d\n", p->slice_data_flag);
2006
    va_TraceMsg(trace_ctx, "\tmacroblock_offset = %d\n", p->macroblock_offset);
2007
    va_TraceMsg(trace_ctx, "\tnum_of_partitions = %d\n", p->num_of_partitions);
2008
2009
 
2010
        va_TraceMsg(trace_ctx, "\tpartition_size[%d] = %d\n", i, p->partition_size[i]);
2011
2012
 
2013
2014
 
2015
}
2016
2017
 
2018
    VADisplay dpy,
2019
    VAContextID context,
2020
    VABufferID buffer,
2021
    VABufferType type,
2022
    unsigned int size,
2023
    unsigned int num_elements,
2024
    void *data)
2025
{
2026
    char tmp[1024];
2027
    VAIQMatrixBufferVP8 *p = (VAIQMatrixBufferVP8 *)data;
2028
    DPY2TRACECTX(dpy);
2029
    int i,j;
2030
2031
 
2032
2033
 
2034
    for (i = 0; i < 4; i++) {
2035
        memset(tmp, 0, sizeof tmp);
2036
        for (j = 0; j < 6; j++)
2037
            sprintf(tmp + strlen(tmp), "%4x, ", p->quantization_index[i][j]);
2038
        va_TraceMsg(trace_ctx,"\t\t[%d] = %s\n", i, tmp);
2039
    }
2040
2041
 
2042
2043
 
2044
}
2045
static void va_TraceVAProbabilityBufferVP8(
2046
    VADisplay dpy,
2047
    VAContextID context,
2048
    VABufferID buffer,
2049
    VABufferType type,
2050
    unsigned int size,
2051
    unsigned int num_elements,
2052
    void *data)
2053
{
2054
    char tmp[1024];
2055
    VAProbabilityDataBufferVP8 *p = (VAProbabilityDataBufferVP8 *)data;
2056
    DPY2TRACECTX(dpy);
2057
    int i,j,k,l;
2058
2059
 
2060
2061
 
2062
        for (j = 0; j < 8; j++) {
2063
            memset(tmp, 0, sizeof tmp);
2064
            for (k=0; k<3; k++)
2065
                for (l=0; l<11; l++)
2066
                    sprintf(tmp + strlen(tmp), "%2x, ", p->dct_coeff_probs[i][j][k][l]);
2067
            va_TraceMsg(trace_ctx,"\t\t[%d, %d] = %s\n", i, j, tmp);
2068
        }
2069
2070
 
2071
2072
 
2073
}
2074
2075
 
2076
    VADisplay dpy,
2077
    VAContextID context,
2078
    VASurfaceID render_target
2079
)
2080
{
2081
    DPY2TRACECTX(dpy);
2082
2083
 
2084
2085
 
2086
    va_TraceMsg(trace_ctx, "\trender_targets = 0x%08x\n", render_target);
2087
    va_TraceMsg(trace_ctx, "\tframe_count  = #%d\n", trace_ctx->trace_frame_no);
2088
    va_TraceMsg(trace_ctx, NULL);
2089
2090
 
2091
2092
 
2093
    trace_ctx->trace_slice_no = 0;
2094
}
2095
2096
 
2097
    VADisplay dpy,
2098
    VAContextID context,
2099
    VABufferID buffer,
2100
    VABufferType type,
2101
    unsigned int size,
2102
    unsigned int num_elements,
2103
    void *pbuf
2104
)
2105
{
2106
    switch (type) {
2107
    case VAPictureParameterBufferType:
2108
        va_TraceVAPictureParameterBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf);
2109
        break;
2110
    case VAIQMatrixBufferType:
2111
        va_TraceVAIQMatrixBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf);
2112
        break;
2113
    case VABitPlaneBufferType:
2114
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2115
        break;
2116
    case VASliceGroupMapBufferType:
2117
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2118
        break;
2119
    case VASliceParameterBufferType:
2120
        va_TraceVASliceParameterBufferMPEG2(dpy, context, buffer, type, size, num_elements, pbuf);
2121
        break;
2122
    case VASliceDataBufferType:
2123
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2124
        break;
2125
    case VAMacroblockParameterBufferType:
2126
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2127
        break;
2128
    case VAResidualDataBufferType:
2129
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2130
        break;
2131
    case VADeblockingParameterBufferType:
2132
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2133
        break;
2134
    case VAImageBufferType:
2135
        break;
2136
    case VAProtectedSliceDataBufferType:
2137
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2138
        break;
2139
    case VAEncCodedBufferType:
2140
        break;
2141
    case VAEncSequenceParameterBufferType:
2142
        break;
2143
    case VAEncPictureParameterBufferType:
2144
        break;
2145
    case VAEncSliceParameterBufferType:
2146
        break;
2147
    default:
2148
        break;
2149
    }
2150
}
2151
2152
 
2153
    VADisplay dpy,
2154
    VAContextID context,
2155
    VABufferID buffer,
2156
    VABufferType type,
2157
    unsigned int size,
2158
    unsigned int num_elements,
2159
    void *data)
2160
{
2161
    VAEncSequenceParameterBufferH263 *p = (VAEncSequenceParameterBufferH263 *)data;
2162
    DPY2TRACECTX(dpy);
2163
2164
 
2165
2166
 
2167
    va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
2168
    va_TraceMsg(trace_ctx, "\tframe_rate = %d\n", p->frame_rate);
2169
    va_TraceMsg(trace_ctx, "\tinitial_qp = %d\n", p->initial_qp);
2170
    va_TraceMsg(trace_ctx, "\tmin_qp = %d\n", p->min_qp);
2171
    va_TraceMsg(trace_ctx, NULL);
2172
2173
 
2174
}
2175
2176
 
2177
 
2178
    VADisplay dpy,
2179
    VAContextID context,
2180
    VABufferID buffer,
2181
    VABufferType type,
2182
    unsigned int size,
2183
    unsigned int num_elements,
2184
    void *data)
2185
{
2186
    VAEncPictureParameterBufferH263 *p = (VAEncPictureParameterBufferH263 *)data;
2187
    DPY2TRACECTX(dpy);
2188
2189
 
2190
    va_TraceMsg(trace_ctx, "\treference_picture = 0x%08x\n", p->reference_picture);
2191
    va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture);
2192
    va_TraceMsg(trace_ctx, "\tcoded_buf = %08x\n", p->coded_buf);
2193
    va_TraceMsg(trace_ctx, "\tpicture_width = %d\n", p->picture_width);
2194
    va_TraceMsg(trace_ctx, "\tpicture_height = %d\n", p->picture_height);
2195
    va_TraceMsg(trace_ctx, "\tpicture_type = 0x%08x\n", p->picture_type);
2196
    va_TraceMsg(trace_ctx, NULL);
2197
2198
 
2199
}
2200
2201
 
2202
    VADisplay dpy,
2203
    VAContextID context,
2204
    VABufferID buffer,
2205
    VABufferType type,
2206
    unsigned int size,
2207
    unsigned int num_elements,
2208
    void *data)
2209
{
2210
    VAEncPictureParameterBufferJPEG *p = (VAEncPictureParameterBufferJPEG *)data;
2211
    int i;
2212
2213
 
2214
2215
 
2216
    va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", p->reconstructed_picture);
2217
    va_TraceMsg(trace_ctx, "\tcoded_buf = %08x\n", p->coded_buf);
2218
    va_TraceMsg(trace_ctx, "\tpicture_width = %d\n", p->picture_width);
2219
    va_TraceMsg(trace_ctx, "\tpicture_height = %d\n", p->picture_height);
2220
2221
 
2222
2223
 
2224
}
2225
2226
 
2227
    VADisplay dpy,
2228
    VAContextID context,
2229
    VABufferID buffer,
2230
    VABufferType type,
2231
    unsigned int size,
2232
    unsigned int num_elements,
2233
    void *data)
2234
{
2235
    VAQMatrixBufferJPEG *p = (VAQMatrixBufferJPEG *)data;
2236
    DPY2TRACECTX(dpy);
2237
2238
 
2239
    va_TraceMsg(trace_ctx, "\tload_lum_quantiser_matrix = %d", p->load_lum_quantiser_matrix);
2240
    if (p->load_lum_quantiser_matrix) {
2241
        int i;
2242
        for (i = 0; i < 64; i++) {
2243
            if ((i % 8) == 0)
2244
                va_TraceMsg(trace_ctx, "\n\t");
2245
            va_TraceMsg(trace_ctx, "\t0x%02x", p->lum_quantiser_matrix[i]);
2246
        }
2247
        va_TraceMsg(trace_ctx, "\n");
2248
    }
2249
    va_TraceMsg(trace_ctx, "\tload_chroma_quantiser_matrix = %08x\n", p->load_chroma_quantiser_matrix);
2250
    if (p->load_chroma_quantiser_matrix) {
2251
        int i;
2252
        for (i = 0; i < 64; i++) {
2253
            if ((i % 8) == 0)
2254
                va_TraceMsg(trace_ctx, "\n\t");
2255
            va_TraceMsg(trace_ctx, "\t0x%02x", p->chroma_quantiser_matrix[i]);
2256
        }
2257
        va_TraceMsg(trace_ctx, "\n");
2258
    }
2259
2260
 
2261
2262
 
2263
}
2264
2265
 
2266
    VADisplay dpy,
2267
    VAContextID context,
2268
    VABufferID buffer,
2269
    VABufferType type,
2270
    unsigned int size,
2271
    unsigned int num_elements,
2272
    void *pbuf
2273
)
2274
{
2275
    switch (type) {
2276
    case VAPictureParameterBufferType:/* print MPEG4 buffer */
2277
        va_TraceVAPictureParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2278
        break;
2279
    case VAIQMatrixBufferType:/* print MPEG4 buffer */
2280
        va_TraceVAIQMatrixBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2281
        break;
2282
    case VABitPlaneBufferType:/* print MPEG4 buffer */
2283
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2284
        break;
2285
    case VASliceGroupMapBufferType:
2286
        break;
2287
    case VASliceParameterBufferType:/* print MPEG4 buffer */
2288
        va_TraceVASliceParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2289
        break;
2290
    case VASliceDataBufferType:
2291
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2292
        break;
2293
    case VAMacroblockParameterBufferType:
2294
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2295
        break;
2296
    case VAResidualDataBufferType:
2297
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2298
        break;
2299
    case VADeblockingParameterBufferType:
2300
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2301
        break;
2302
    case VAImageBufferType:
2303
        break;
2304
    case VAProtectedSliceDataBufferType:
2305
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2306
        break;
2307
    case VAEncCodedBufferType:
2308
        break;
2309
    case VAEncSequenceParameterBufferType:
2310
        va_TraceVAEncSequenceParameterBufferH263(dpy, context, buffer, type, size, num_elements, pbuf);
2311
        break;
2312
    case VAEncPictureParameterBufferType:
2313
        va_TraceVAEncPictureParameterBufferH263(dpy, context, buffer, type, size, num_elements, pbuf);
2314
        break;
2315
    case VAEncSliceParameterBufferType:
2316
        va_TraceVAEncSliceParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2317
        break;
2318
    case VAEncPackedHeaderParameterBufferType:
2319
        va_TraceVAEncPackedHeaderParameterBufferType(dpy, context, buffer, type, size, num_elements, pbuf);
2320
        break;
2321
    default:
2322
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2323
        break;
2324
    }
2325
}
2326
2327
 
2328
 
2329
    VADisplay dpy,
2330
    VAContextID context,
2331
    VABufferID buffer,
2332
    VABufferType type,
2333
    unsigned int size,
2334
    unsigned int num_elements,
2335
    void *pbuf
2336
)
2337
{
2338
    switch (type) {
2339
    case VABitPlaneBufferType:
2340
    case VASliceGroupMapBufferType:
2341
    case VASliceDataBufferType:
2342
    case VAMacroblockParameterBufferType:
2343
    case VAResidualDataBufferType:
2344
    case VADeblockingParameterBufferType:
2345
    case VAImageBufferType:
2346
    case VAProtectedSliceDataBufferType:
2347
    case VAEncCodedBufferType:
2348
    case VAEncSequenceParameterBufferType:
2349
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2350
        break;
2351
    case VAEncSliceParameterBufferType:
2352
        va_TraceVAEncPictureParameterBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2353
        break;
2354
    case VAPictureParameterBufferType:
2355
        va_TraceVAPictureParameterBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2356
        break;
2357
    case VAIQMatrixBufferType:
2358
        va_TraceVAIQMatrixBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2359
        break;
2360
    case VASliceParameterBufferType:
2361
        va_TraceVASliceParameterBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2362
        break;
2363
    case VAHuffmanTableBufferType:
2364
        va_TraceVAHuffmanTableBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2365
        break;
2366
    case VAEncPictureParameterBufferType:
2367
        va_TraceVAEncPictureParameterBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2368
        break;
2369
    case VAQMatrixBufferType:
2370
        va_TraceVAEncQMatrixBufferJPEG(dpy, context, buffer, type, size, num_elements, pbuf);
2371
        break;
2372
    default:
2373
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2374
        break;
2375
    }
2376
}
2377
2378
 
2379
    VADisplay dpy,
2380
    VAContextID context,
2381
    VABufferID buffer,
2382
    VABufferType type,
2383
    unsigned int size,
2384
    unsigned int num_elements,
2385
    void *pbuf
2386
)
2387
{
2388
    switch (type) {
2389
    case VAPictureParameterBufferType:
2390
        va_TraceVAPictureParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2391
        break;
2392
    case VAIQMatrixBufferType:
2393
        va_TraceVAIQMatrixBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2394
        break;
2395
    case VABitPlaneBufferType:
2396
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2397
        break;
2398
    case VASliceGroupMapBufferType:
2399
        break;
2400
    case VASliceParameterBufferType:
2401
        va_TraceVASliceParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2402
        break;
2403
    case VASliceDataBufferType:
2404
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2405
        break;
2406
    case VAMacroblockParameterBufferType:
2407
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2408
        break;
2409
    case VAResidualDataBufferType:
2410
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2411
        break;
2412
    case VADeblockingParameterBufferType:
2413
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2414
        break;
2415
    case VAImageBufferType:
2416
        break;
2417
    case VAProtectedSliceDataBufferType:
2418
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2419
        break;
2420
    case VAEncCodedBufferType:
2421
        break;
2422
    case VAEncSequenceParameterBufferType:
2423
        va_TraceVAEncSequenceParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2424
        break;
2425
    case VAEncPictureParameterBufferType:
2426
        va_TraceVAEncPictureParameterBufferMPEG4(dpy, context, buffer, type, size, num_elements, pbuf);
2427
        break;
2428
    case VAEncSliceParameterBufferType:
2429
        va_TraceVAEncSliceParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2430
        break;
2431
    default:
2432
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2433
        break;
2434
    }
2435
}
2436
2437
 
2438
 
2439
    VADisplay dpy,
2440
    VAContextID context,
2441
    VABufferID buffer,
2442
    VABufferType type,
2443
    unsigned int size,
2444
    unsigned int num_elements,
2445
    void *pbuf
2446
)
2447
{
2448
    DPY2TRACECTX(dpy);
2449
2450
 
2451
    case VAPictureParameterBufferType:
2452
        va_TraceVAPictureParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2453
        break;
2454
    case VAIQMatrixBufferType:
2455
        va_TraceVAIQMatrixBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2456
        break;
2457
    case VABitPlaneBufferType:
2458
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2459
        break;
2460
    case VASliceGroupMapBufferType:
2461
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2462
        break;
2463
    case VASliceParameterBufferType:
2464
        va_TraceVASliceParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2465
        break;
2466
    case VASliceDataBufferType:
2467
        va_TraceVABuffers(dpy, context, buffer, type, trace_ctx->trace_slice_size, num_elements, pbuf);
2468
        break;
2469
    case VAMacroblockParameterBufferType:
2470
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2471
        break;
2472
    case VAResidualDataBufferType:
2473
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2474
        break;
2475
    case VADeblockingParameterBufferType:
2476
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2477
        break;
2478
    case VAImageBufferType:
2479
        break;
2480
    case VAProtectedSliceDataBufferType:
2481
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2482
        break;
2483
    case VAEncCodedBufferType:
2484
        break;
2485
    case VAEncSequenceParameterBufferType:
2486
        va_TraceVAEncSequenceParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2487
        break;
2488
    case VAEncPictureParameterBufferType:
2489
        va_TraceVAEncPictureParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2490
        break;
2491
    case VAEncSliceParameterBufferType:
2492
        if (size == sizeof(VAEncSliceParameterBuffer))
2493
            va_TraceVAEncSliceParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2494
        else
2495
            va_TraceVAEncSliceParameterBufferH264(dpy, context, buffer, type, size, num_elements, pbuf);
2496
        break;
2497
    case VAEncPackedHeaderParameterBufferType:
2498
        va_TraceVAEncPackedHeaderParameterBufferType(dpy, context, buffer, type, size, num_elements, pbuf);
2499
        break;
2500
2501
 
2502
        va_TraceVAEncMiscParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2503
        break;
2504
    default:
2505
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2506
        break;
2507
    }
2508
}
2509
2510
 
2511
    VADisplay dpy,
2512
    VAContextID context,
2513
    VABufferID buffer,
2514
    VABufferType type,
2515
    unsigned int size,
2516
    unsigned int num_elements,
2517
    void *pbuf
2518
)
2519
{
2520
    DPY2TRACECTX(dpy);
2521
2522
 
2523
    case VAPictureParameterBufferType:
2524
        va_TraceVAPictureParameterBufferVP8(dpy, context, buffer, type, size, num_elements, pbuf);
2525
        break;
2526
    case VAIQMatrixBufferType:
2527
        va_TraceVAIQMatrixBufferVP8(dpy, context, buffer, type, size, num_elements, pbuf);
2528
        break;
2529
    case VABitPlaneBufferType:
2530
        break;
2531
    case VASliceGroupMapBufferType:
2532
        break;
2533
    case VASliceParameterBufferType:
2534
        va_TraceVASliceParameterBufferVP8(dpy, context, buffer, type, size, num_elements, pbuf);
2535
        break;
2536
    case VASliceDataBufferType:
2537
        break;
2538
    case VAProbabilityBufferType:
2539
        va_TraceVAProbabilityBufferVP8(dpy, context, buffer, type, size, num_elements, pbuf);
2540
        break;
2541
    case VAMacroblockParameterBufferType:
2542
        break;
2543
    case VAResidualDataBufferType:
2544
        break;
2545
    case VADeblockingParameterBufferType:
2546
        break;
2547
    case VAImageBufferType:
2548
        break;
2549
    case VAProtectedSliceDataBufferType:
2550
        break;
2551
    case VAEncCodedBufferType:
2552
        break;
2553
    case VAEncSequenceParameterBufferType:
2554
        break;
2555
    case VAEncPictureParameterBufferType:
2556
        break;
2557
    case VAEncSliceParameterBufferType:
2558
        break;
2559
    case VAEncPackedHeaderParameterBufferType:
2560
        break;
2561
    case VAEncMiscParameterBufferType:
2562
        break;
2563
    default:
2564
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2565
        break;
2566
    }
2567
}
2568
2569
 
2570
    VADisplay dpy,
2571
    VAContextID context,
2572
    VABufferID buffer,
2573
    VABufferType type,
2574
    unsigned int size,
2575
    unsigned int num_elements,
2576
    void *pbuf
2577
)
2578
{
2579
    DPY2TRACECTX(dpy);
2580
2581
 
2582
    case VAPictureParameterBufferType:
2583
        va_TraceVAPictureParameterBufferVC1(dpy, context, buffer, type, size, num_elements, pbuf);
2584
        break;
2585
    case VAIQMatrixBufferType:
2586
        break;
2587
    case VABitPlaneBufferType:
2588
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2589
        break;
2590
    case VASliceGroupMapBufferType:
2591
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2592
        break;
2593
    case VASliceParameterBufferType:
2594
        va_TraceVASliceParameterBufferVC1(dpy, context, buffer, type, size, num_elements, pbuf);
2595
        break;
2596
    case VASliceDataBufferType:
2597
        va_TraceVABuffers(dpy, context, buffer, type, trace_ctx->trace_slice_size, num_elements, pbuf);
2598
        break;
2599
    case VAMacroblockParameterBufferType:
2600
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2601
        break;
2602
    case VAResidualDataBufferType:
2603
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2604
        break;
2605
    case VADeblockingParameterBufferType:
2606
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2607
        break;
2608
    case VAImageBufferType:
2609
        break;
2610
    case VAProtectedSliceDataBufferType:
2611
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2612
        break;
2613
    case VAEncCodedBufferType:
2614
        break;
2615
    case VAEncSequenceParameterBufferType:
2616
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2617
        break;
2618
    case VAEncPictureParameterBufferType:
2619
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2620
        break;
2621
    case VAEncSliceParameterBufferType:
2622
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2623
        break;
2624
    default:
2625
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2626
        break;
2627
    }
2628
}
2629
2630
 
2631
va_TraceProcFilterParameterBufferDeinterlacing(
2632
    VADisplay dpy,
2633
    VAContextID context,
2634
    VAProcFilterParameterBufferBase *base
2635
)
2636
{
2637
    VAProcFilterParameterBufferDeinterlacing *deint = (VAProcFilterParameterBufferDeinterlacing *)base;
2638
2639
 
2640
2641
 
2642
    va_TraceMsg(trace_ctx, "\t    algorithm = %d\n", deint->algorithm);
2643
    va_TraceMsg(trace_ctx, "\t    flags = %d\n", deint->flags);
2644
}
2645
2646
 
2647
va_TraceProcFilterParameterBufferColorBalance(
2648
    VADisplay dpy,
2649
    VAContextID context,
2650
    VAProcFilterParameterBufferBase *base
2651
)
2652
{
2653
    VAProcFilterParameterBufferColorBalance *color_balance = (VAProcFilterParameterBufferColorBalance *)base;
2654
2655
 
2656
2657
 
2658
    va_TraceMsg(trace_ctx, "\t    attrib = %d\n", color_balance->attrib);
2659
    va_TraceMsg(trace_ctx, "\t    value = %f\n", color_balance->value);
2660
}
2661
2662
 
2663
va_TraceProcFilterParameterBufferBase(
2664
    VADisplay dpy,
2665
    VAContextID context,
2666
    VAProcFilterParameterBufferBase *base
2667
)
2668
{
2669
    DPY2TRACECTX(dpy);
2670
2671
 
2672
}
2673
2674
 
2675
va_TraceProcFilterParameterBuffer(
2676
    VADisplay dpy,
2677
    VAContextID context,
2678
    VABufferID *filters,
2679
    unsigned int num_filters
2680
)
2681
{
2682
    VABufferType type;
2683
    unsigned int size;
2684
    unsigned int num_elements;
2685
    VAProcFilterParameterBufferBase *base_filter = NULL;
2686
    int i;
2687
2688
 
2689
2690
 
2691
        va_TraceMsg(trace_ctx, "\t  num_filters = %d\n", num_filters);
2692
        va_TraceMsg(trace_ctx, "\t  filters = %p\n", filters);
2693
        return;
2694
    }
2695
2696
 
2697
2698
 
2699
    for (i = 0; i < num_filters; i++) {
2700
        vaBufferInfo(dpy, context, filters[i], &type, &size, &num_elements);
2701
2702
 
2703
            va_TraceMsg(trace_ctx, "\t  filters[%d] = 0x%08x (INVALID)\n", i, filters[i]);
2704
            return;
2705
        } else {
2706
            va_TraceMsg(trace_ctx, "\t  filters[%d] = 0x%08x\n", i, filters[i]);
2707
        }
2708
2709
 
2710
        vaMapBuffer(dpy, filters[i], (void **)&base_filter);
2711
2712
 
2713
            vaUnmapBuffer(dpy, filters[i]);
2714
            return;
2715
        }
2716
2717
 
2718
        case VAProcFilterDeinterlacing:
2719
            va_TraceProcFilterParameterBufferDeinterlacing(dpy,
2720
                                                           context,
2721
                                                           base_filter);
2722
            break;
2723
        case VAProcFilterColorBalance:
2724
            va_TraceProcFilterParameterBufferColorBalance(dpy,
2725
                                                          context,
2726
                                                          base_filter);
2727
            break;
2728
        default:
2729
            va_TraceProcFilterParameterBufferBase(dpy,
2730
                                                  context,
2731
                                                  base_filter);
2732
            break;
2733
        }
2734
2735
 
2736
    }
2737
}
2738
2739
 
2740
va_TraceVAProcPipelineParameterBuffer(
2741
    VADisplay dpy,
2742
    VAContextID context,
2743
    VABufferID buffer,
2744
    VABufferType type,
2745
    unsigned int size,
2746
    unsigned int num_elements,
2747
    void *data
2748
)
2749
{
2750
    VAProcPipelineParameterBuffer *p = (VAProcPipelineParameterBuffer *)data;
2751
    int i;
2752
2753
 
2754
2755
 
2756
2757
 
2758
2759
 
2760
        va_TraceMsg(trace_ctx, "\t  surface_region\n");
2761
        va_TraceMsg(trace_ctx, "\t    x = %d\n", p->surface_region->x);
2762
        va_TraceMsg(trace_ctx, "\t    y = %d\n", p->surface_region->y);
2763
        va_TraceMsg(trace_ctx, "\t    width = %d\n", p->surface_region->width);
2764
        va_TraceMsg(trace_ctx, "\t    height = %d\n", p->surface_region->height);
2765
    } else {
2766
        va_TraceMsg(trace_ctx, "\t  surface_region = (NULL)\n");
2767
    }
2768
2769
 
2770
2771
 
2772
        va_TraceMsg(trace_ctx, "\t  output_region\n");
2773
        va_TraceMsg(trace_ctx, "\t    x = %d\n", p->output_region->x);
2774
        va_TraceMsg(trace_ctx, "\t    y = %d\n", p->output_region->y);
2775
        va_TraceMsg(trace_ctx, "\t    width = %d\n", p->output_region->width);
2776
        va_TraceMsg(trace_ctx, "\t    height = %d\n", p->output_region->height);
2777
    } else {
2778
        va_TraceMsg(trace_ctx, "\t  output_region = (NULL)\n");
2779
    }
2780
2781
 
2782
    va_TraceMsg(trace_ctx, "\t  output_color_standard = %d\n", p->output_color_standard);
2783
    va_TraceMsg(trace_ctx, "\t  pipeline_flags = 0x%08x\n", p->pipeline_flags);
2784
    va_TraceMsg(trace_ctx, "\t  filter_flags = 0x%08x\n", p->filter_flags);
2785
2786
 
2787
2788
 
2789
2790
 
2791
        va_TraceMsg(trace_ctx, "\t  forward_references\n");
2792
2793
 
2794
            /* only dump the first 5 forward references */
2795
            for (i = 0; i < p->num_forward_references && i < 5; i++) {
2796
                va_TraceMsg(trace_ctx, "\t    forward_references[%d] = 0x%08x\n", i, p->forward_references[i]);
2797
            }
2798
        } else {
2799
            for (i = 0; i < p->num_forward_references && i < 5; i++) {
2800
                va_TraceMsg(trace_ctx, "\t    forward_references[%d] = (NULL)\n", i);
2801
            }
2802
        }
2803
    }
2804
2805
 
2806
2807
 
2808
        va_TraceMsg(trace_ctx, "\t  backward_references\n");
2809
2810
 
2811
            /* only dump the first 5 backward references */
2812
            for (i = 0; i < p->num_backward_references && i < 5; i++) {
2813
                va_TraceMsg(trace_ctx, "\t    backward_references[%d] = 0x%08x\n", i, p->backward_references[i]);
2814
            }
2815
        } else {
2816
            for (i = 0; i < p->num_backward_references && i < 5; i++) {
2817
                va_TraceMsg(trace_ctx, "\t    backward_references[%d] = (NULL)\n", i);
2818
            }
2819
        }
2820
    }
2821
2822
 
2823
2824
 
2825
}
2826
2827
 
2828
va_TraceNoneBuf(
2829
    VADisplay dpy,
2830
    VAContextID context,
2831
    VABufferID buffer,
2832
    VABufferType type,
2833
    unsigned int size,
2834
    unsigned int num_elements,
2835
    void *pbuf
2836
)
2837
{
2838
    DPY2TRACECTX(dpy);
2839
2840
 
2841
    case VAProcPipelineParameterBufferType:
2842
        va_TraceVAProcPipelineParameterBuffer(dpy, context, buffer, type, size, num_elements, pbuf);
2843
        break;
2844
    default:
2845
        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, pbuf);
2846
        break;
2847
    }
2848
}
2849
2850
 
2851
    VADisplay dpy,
2852
    VAContextID context,
2853
    VABufferID *buffers,
2854
    int num_buffers
2855
)
2856
{
2857
    VABufferType type;
2858
    unsigned int size;
2859
    unsigned int num_elements;
2860
    int i;
2861
    DPY2TRACECTX(dpy);
2862
2863
 
2864
2865
 
2866
    va_TraceMsg(trace_ctx, "\tnum_buffers = %d\n", num_buffers);
2867
    if (buffers == NULL)
2868
        return;
2869
2870
 
2871
        unsigned char *pbuf = NULL;
2872
        unsigned int j;
2873
2874
 
2875
        vaBufferInfo(dpy, context, buffers[i], &type, &size, &num_elements);
2876
2877
 
2878
        va_TraceMsg(trace_ctx, "\tbuffers[%d] = 0x%08x\n", i, buffers[i]);
2879
        va_TraceMsg(trace_ctx, "\t  type = %s\n", buffer_type_to_string(type));
2880
        va_TraceMsg(trace_ctx, "\t  size = %d\n", size);
2881
        va_TraceMsg(trace_ctx, "\t  num_elements = %d\n", num_elements);
2882
2883
 
2884
        if (pbuf == NULL)
2885
            continue;
2886
2887
 
2888
        case VAProfileMPEG2Simple:
2889
        case VAProfileMPEG2Main:
2890
            for (j=0; j
2891
                va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2892
                va_TraceMPEG2Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2893
            }
2894
            break;
2895
        case VAProfileMPEG4Simple:
2896
        case VAProfileMPEG4AdvancedSimple:
2897
        case VAProfileMPEG4Main:
2898
            for (j=0; j
2899
                va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2900
                va_TraceMPEG4Buf(dpy, context, buffers[i], type, size, num_elements, pbuf + size*j);
2901
            }
2902
            break;
2903
        case VAProfileH264Baseline:
2904
        case VAProfileH264Main:
2905
        case VAProfileH264High:
2906
        case VAProfileH264ConstrainedBaseline:
2907
            for (j=0; j
2908
                va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2909
2910
 
2911
            }
2912
            break;
2913
        case VAProfileVC1Simple:
2914
        case VAProfileVC1Main:
2915
        case VAProfileVC1Advanced:
2916
            for (j=0; j
2917
                va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2918
2919
 
2920
            }
2921
            break;
2922
        case VAProfileH263Baseline:
2923
            for (j=0; j
2924
                va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2925
2926
 
2927
            }
2928
            break;
2929
        case VAProfileJPEGBaseline:
2930
            for (j=0; j
2931
                va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2932
2933
 
2934
            }
2935
            break;
2936
2937
 
2938
            for (j=0; j
2939
                va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2940
2941
 
2942
            }
2943
            break;
2944
2945
 
2946
            for (j=0; j
2947
                va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
2948
2949
 
2950
            }
2951
            break;
2952
2953
 
2954
            break;
2955
        }
2956
2957
 
2958
    }
2959
2960
 
2961
}
2962
2963
 
2964
    VADisplay dpy,
2965
    VAContextID context,
2966
    int endpic_done
2967
)
2968
{
2969
    int encode, decode, jpeg;
2970
    DPY2TRACECTX(dpy);
2971
2972
 
2973
2974
 
2975
    va_TraceMsg(trace_ctx, "\trender_targets = 0x%08x\n", trace_ctx->trace_rendertarget);
2976
2977
 
2978
    encode = (trace_ctx->trace_entrypoint == VAEntrypointEncSlice);
2979
    decode = (trace_ctx->trace_entrypoint == VAEntrypointVLD);
2980
    jpeg = (trace_ctx->trace_entrypoint == VAEntrypointEncPicture);
2981
2982
 
2983
    if ((encode && (trace_flag & VA_TRACE_FLAG_SURFACE_ENCODE))||
2984
        (jpeg && (trace_flag & VA_TRACE_FLAG_SURFACE_JPEG)))
2985
        va_TraceSurface(dpy);
2986
2987
 
2988
    if (decode && ((trace_flag & VA_TRACE_FLAG_SURFACE_DECODE))) {
2989
        vaSyncSurface(dpy, trace_ctx->trace_rendertarget);
2990
        va_TraceSurface(dpy);
2991
    }
2992
2993
 
2994
}
2995
2996
 
2997
 
2998
    VADisplay dpy,
2999
    VASurfaceID render_target
3000
)
3001
{
3002
    DPY2TRACECTX(dpy);
3003
3004
 
3005
3006
 
3007
    va_TraceMsg(trace_ctx, NULL);
3008
}
3009
3010
 
3011
    VADisplay           dpy,
3012
    VAConfigID          config,
3013
    VASurfaceAttrib    *attrib_list,
3014
    unsigned int       *num_attribs
3015
)
3016
{
3017
    DPY2TRACECTX(dpy);
3018
3019
 
3020
    va_TraceMsg(trace_ctx, "\tconfig = 0x%08x\n", config);
3021
    va_TraceSurfaceAttributes(trace_ctx, attrib_list, num_attribs);
3022
3023
 
3024
3025
 
3026
3027
 
3028
 
3029
    VADisplay dpy,
3030
    VASurfaceID render_target,
3031
    VASurfaceStatus *status    /* out */
3032
)
3033
{
3034
    DPY2TRACECTX(dpy);
3035
3036
 
3037
3038
 
3039
    if (status)
3040
        va_TraceMsg(trace_ctx, "\tstatus = 0x%08x\n", *status);
3041
    va_TraceMsg(trace_ctx, NULL);
3042
}
3043
3044
 
3045
 
3046
    VADisplay dpy,
3047
    VASurfaceID surface,
3048
    VAStatus error_status,
3049
    void **error_info       /*out*/
3050
)
3051
{
3052
    DPY2TRACECTX(dpy);
3053
3054
 
3055
    va_TraceMsg(trace_ctx, "\tsurface = 0x%08x\n", surface);
3056
    va_TraceMsg(trace_ctx, "\terror_status = 0x%08x\n", error_status);
3057
    if (error_info && (error_status == VA_STATUS_ERROR_DECODING_ERROR)) {
3058
        VASurfaceDecodeMBErrors *p = *error_info;
3059
        while (p && (p->status != -1)) {
3060
            va_TraceMsg(trace_ctx, "\t\tstatus = %d\n", p->status);
3061
            va_TraceMsg(trace_ctx, "\t\tstart_mb = %d\n", p->start_mb);
3062
            va_TraceMsg(trace_ctx, "\t\tend_mb = %d\n", p->end_mb);
3063
            p++; /* next error record */
3064
        }
3065
    }
3066
    va_TraceMsg(trace_ctx, NULL);
3067
}
3068
3069
 
3070
    VADisplay dpy,
3071
    int number
3072
)
3073
{
3074
    DPY2TRACECTX(dpy);
3075
3076
 
3077
3078
 
3079
    va_TraceMsg(trace_ctx, NULL);
3080
}
3081
3082
 
3083
    VADisplay dpy,
3084
    VADisplayAttribute *attr_list,    /* out */
3085
    int *num_attributes               /* out */
3086
)
3087
{
3088
    int i;
3089
3090
 
3091
3092
 
3093
        return;
3094
3095
 
3096
3097
 
3098
        va_TraceMsg(trace_ctx, "\tattr_list[%d] =\n");
3099
        va_TraceMsg(trace_ctx, "\t  typ = 0x%08x\n", attr_list[i].type);
3100
        va_TraceMsg(trace_ctx, "\t  min_value = %d\n", attr_list[i].min_value);
3101
        va_TraceMsg(trace_ctx, "\t  max_value = %d\n", attr_list[i].max_value);
3102
        va_TraceMsg(trace_ctx, "\t  value = %d\n", attr_list[i].value);
3103
        va_TraceMsg(trace_ctx, "\t  flags = %d\n", attr_list[i].flags);
3104
    }
3105
    va_TraceMsg(trace_ctx, NULL);
3106
}
3107
3108
 
3109
 
3110
    VADisplay dpy,
3111
    VADisplayAttribute *attr_list,
3112
    int num_attributes
3113
)
3114
{
3115
    int i;
3116
3117
 
3118
3119
 
3120
    if (attr_list == NULL)
3121
        return;
3122
3123
 
3124
        va_TraceMsg(trace_ctx, "\tattr_list[%d] =\n");
3125
        va_TraceMsg(trace_ctx, "\t  typ = 0x%08x\n", attr_list[i].type);
3126
        va_TraceMsg(trace_ctx, "\t  min_value = %d\n", attr_list[i].min_value);
3127
        va_TraceMsg(trace_ctx, "\t  max_value = %d\n", attr_list[i].max_value);
3128
        va_TraceMsg(trace_ctx, "\t  value = %d\n", attr_list[i].value);
3129
        va_TraceMsg(trace_ctx, "\t  flags = %d\n", attr_list[i].flags);
3130
    }
3131
    va_TraceMsg(trace_ctx, NULL);
3132
}
3133
3134
 
3135
 
3136
    VADisplay dpy,
3137
    VADisplayAttribute *attr_list,
3138
    int num_attributes
3139
)
3140
{
3141
    DPY2TRACECTX(dpy);
3142
3143
 
3144
3145
 
3146
}
3147
3148
 
3149
    VADisplay dpy,
3150
    VADisplayAttribute *attr_list,
3151
    int num_attributes
3152
)
3153
{
3154
    DPY2TRACECTX(dpy);
3155
3156
 
3157
3158
 
3159
}
3160
3161
 
3162
 
3163
    VADisplay dpy,
3164
    VASurfaceID surface,
3165
    void *draw, /* the target Drawable */
3166
    short srcx,
3167
    short srcy,
3168
    unsigned short srcw,
3169
    unsigned short srch,
3170
    short destx,
3171
    short desty,
3172
    unsigned short destw,
3173
    unsigned short desth,
3174
    VARectangle *cliprects, /* client supplied clip list */
3175
    unsigned int number_cliprects, /* number of clip rects in the clip list */
3176
    unsigned int flags /* de-interlacing flags */
3177
)
3178
{
3179
    DPY2TRACECTX(dpy);
3180
3181
 
3182
3183
 
3184
    va_TraceMsg(trace_ctx, "\tdraw = 0x%08x\n", draw);
3185
    va_TraceMsg(trace_ctx, "\tsrcx = %d\n", srcx);
3186
    va_TraceMsg(trace_ctx, "\tsrcy = %d\n", srcy);
3187
    va_TraceMsg(trace_ctx, "\tsrcw = %d\n", srcw);
3188
    va_TraceMsg(trace_ctx, "\tsrch = %d\n", srch);
3189
    va_TraceMsg(trace_ctx, "\tdestx = %d\n", destx);
3190
    va_TraceMsg(trace_ctx, "\tdesty = %d\n", desty);
3191
    va_TraceMsg(trace_ctx, "\tdestw = %d\n", destw);
3192
    va_TraceMsg(trace_ctx, "\tdesth = %d\n", desth);
3193
    va_TraceMsg(trace_ctx, "\tcliprects = 0x%08x\n", cliprects);
3194
    va_TraceMsg(trace_ctx, "\tnumber_cliprects = %d\n", number_cliprects);
3195
    va_TraceMsg(trace_ctx, "\tflags = 0x%08x\n", flags);
3196
    va_TraceMsg(trace_ctx, NULL);
3197
}
3198
>