Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
ce998b14
Commit
ce998b14
authored
Jun 07, 2011
by
Alexander Osin
Committed by
Austin Yuan
Jun 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected trace prints (updated, change format, etc), replaced \t by spaces in source code
parent
f7848e8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
116 additions
and
62 deletions
+116
-62
va/va_trace.c
va/va_trace.c
+116
-62
No files found.
va/va_trace.c
View file @
ce998b14
/*
* Copyright (c) 2009 Intel Corporation. All Rights Reserved.
* Copyright (c) 2009
-2011
Intel Corporation. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
...
...
@@ -47,7 +47,7 @@
* .LIBVA_TRACE_CODEDBUF=coded_clip_file: save the coded clip into file coded_clip_file
* .LIBVA_TRACE_SURFACE=decoded_yuv_file: save the decoded YUV file decoded_yuv_file
* .LIBVA_TRACE_LOGSIZE=numeric number: truncate the log_file or coded_clip_file, or decoded_yuv_file
*
when the size is bigger than the number
*
when the size is bigger than the number
*/
...
...
@@ -116,11 +116,11 @@ int va_parseConfig(char *env, char *env_value);
VAStatus
vaBufferInfo
(
VADisplay
dpy
,
VAContextID
context
,
/* in */
VABufferID
buf_id
,
/* in */
VABufferType
*
type
,
/* out */
unsigned
int
*
size
,
/* out */
unsigned
int
*
num_elements
/* out */
VAContextID
context
,
/* in */
VABufferID
buf_id
,
/* in */
VABufferType
*
type
,
/* out */
unsigned
int
*
size
,
/* out */
unsigned
int
*
num_elements
/* out */
);
VAStatus
vaLockSurface
(
VADisplay
dpy
,
...
...
@@ -159,13 +159,13 @@ void va_TraceInit(VADisplay dpy)
trace_flag
=
1
;
/*Check if there is still room for suffix .%d.%d*/
if
(
strnlen
(
env_value
,
1024
)
<
(
1024
-
8
))
snprintf
(
env_value
+
strnlen
(
env_value
,
1024
),
(
1025
-
8
-
strnlen
(
env_value
,
1024
)),
".%d.%d"
,
trace_index
,
suffix
);
if
(
strnlen
(
env_value
,
1024
)
<
(
1024
-
8
))
snprintf
(
env_value
+
strnlen
(
env_value
,
1024
),
(
1025
-
8
-
strnlen
(
env_value
,
1024
)),
".%d.%d"
,
trace_index
,
suffix
);
tmp
=
fopen
(
env_value
,
"w"
);
if
(
tmp
)
{
if
(
tmp
)
{
trace_context
[
trace_index
].
trace_fp_log
=
tmp
;
strcpy
(
trace_context
[
trace_index
].
trace_log_fn
,
env_value
);
}
else
{
...
...
@@ -193,10 +193,10 @@ void va_TraceInit(VADisplay dpy)
/* per-context setting */
if
(
va_parseConfig
(
"LIBVA_TRACE_CODEDBUF"
,
&
env_value
[
0
])
==
0
)
{
if
(
strnlen
(
env_value
,
1024
)
<
(
1024
-
8
))
snprintf
(
env_value
+
strnlen
(
env_value
,
1024
),
(
1025
-
8
-
strnlen
(
env_value
,
1024
)),
".%d.%d"
,
trace_index
,
suffix
);
if
(
strnlen
(
env_value
,
1024
)
<
(
1024
-
8
))
snprintf
(
env_value
+
strnlen
(
env_value
,
1024
),
(
1025
-
8
-
strnlen
(
env_value
,
1024
)),
".%d.%d"
,
trace_index
,
suffix
);
tmp
=
fopen
(
env_value
,
"w"
);
...
...
@@ -247,6 +247,7 @@ void va_TraceEnd(VADisplay dpy)
memset
(
&
trace_context
[
idx
],
sizeof
(
struct
_trace_context
),
0
);
}
static
unsigned
int
file_size
(
FILE
*
fp
)
{
struct
stat
buf
;
...
...
@@ -269,7 +270,7 @@ void va_TraceMsg(int idx, const char *msg, ...)
if
(
file_size
(
trace_context
[
idx
].
trace_fp_log
)
>=
trace_logsize
)
truncate_file
(
trace_context
[
idx
].
trace_fp_log
);
if
(
msg
)
{
va_start
(
args
,
msg
);
vfprintf
(
trace_context
[
idx
].
trace_fp_log
,
msg
,
args
);
...
...
@@ -316,6 +317,7 @@ void va_TraceCodedBuf(VADisplay dpy)
vaUnmapBuffer
(
dpy
,
trace_context
[
idx
].
trace_codedbuf
);
va_TraceMsg
(
idx
,
"
\t
checksum = 0x%02x
\n
"
,
check_sum
);
va_TraceMsg
(
idx
,
NULL
);
}
...
...
@@ -342,6 +344,7 @@ void va_TraceSurface(VADisplay dpy)
va_TraceMsg
(
idx
,
"==========truncate file %s
\n
"
,
trace_context
[
idx
].
trace_surface_fn
);
truncate_file
(
trace_context
[
idx
].
trace_fp_surface
);
}
va_TraceMsg
(
idx
,
NULL
);
va_status
=
vaLockSurface
(
dpy
,
...
...
@@ -368,11 +371,13 @@ void va_TraceSurface(VADisplay dpy)
if
(
buffer
==
NULL
)
{
va_TraceMsg
(
idx
,
"Error:vaLockSurface return NULL buffer
\n
"
);
va_TraceMsg
(
idx
,
NULL
);
vaUnlockSurface
(
dpy
,
trace_context
[
idx
].
trace_rendertarget
);
return
;
}
va_TraceMsg
(
idx
,
"
\t
buffer location = 0x%08x
\n
"
,
buffer
);
va_TraceMsg
(
idx
,
NULL
);
Y_data
=
(
unsigned
char
*
)
buffer
;
UV_data
=
(
unsigned
char
*
)
buffer
+
chroma_u_offset
;
...
...
@@ -404,13 +409,14 @@ void va_TraceSurface(VADisplay dpy)
vaUnlockSurface
(
dpy
,
trace_context
[
idx
].
trace_rendertarget
);
va_TraceMsg
(
idx
,
"
\t
checksum = 0x%02x
\n
"
,
check_sum
&
0xff
);
va_TraceMsg
(
idx
,
NULL
);
}
void
va_TraceInitialize
(
VADisplay
dpy
,
int
*
major_version
,
/* out */
int
*
minor_version
/* out */
int
*
major_version
,
/* out */
int
*
minor_version
/* out */
)
{
DPY2INDEX
(
dpy
);
...
...
@@ -444,9 +450,10 @@ void va_TraceCreateConfig(
va_TraceMsg
(
idx
,
"
\t
entrypoint = %d
\n
"
,
entrypoint
);
va_TraceMsg
(
idx
,
"
\t
num_attribs = %d
\n
"
,
num_attribs
);
for
(
i
=
0
;
i
<
num_attribs
;
i
++
)
{
va_TraceMsg
(
idx
,
"
\t\t
attrib_list[%d].type = 0x%08x
\n
"
,
i
,
attrib_list
[
i
].
type
);
va_TraceMsg
(
idx
,
"
\t\t
attrib_list[%d].type = 0x%08x
\n
"
,
i
,
attrib_list
[
i
].
type
);
va_TraceMsg
(
idx
,
"
\t\t
attrib_list[%d].value = 0x%08x
\n
"
,
i
,
attrib_list
[
i
].
value
);
}
va_TraceMsg
(
idx
,
NULL
);
trace_context
[
idx
].
trace_profile
=
profile
;
trace_context
[
idx
].
trace_entrypoint
=
entrypoint
;
...
...
@@ -459,7 +466,7 @@ void va_TraceCreateSurface(
int
height
,
int
format
,
int
num_surfaces
,
VASurfaceID
*
surfaces
/* out */
VASurfaceID
*
surfaces
/* out */
)
{
int
i
;
...
...
@@ -474,6 +481,8 @@ void va_TraceCreateSurface(
for
(
i
=
0
;
i
<
num_surfaces
;
i
++
)
va_TraceMsg
(
idx
,
"
\t\t
surfaces[%d] = 0x%08x
\n
"
,
i
,
surfaces
[
i
]);
va_TraceMsg
(
idx
,
NULL
);
}
...
...
@@ -485,7 +494,7 @@ void va_TraceCreateContext(
int
flag
,
VASurfaceID
*
render_targets
,
int
num_render_targets
,
VAContextID
*
context
/* out */
VAContextID
*
context
/* out */
)
{
int
i
;
...
...
@@ -500,7 +509,7 @@ void va_TraceCreateContext(
for
(
i
=
0
;
i
<
num_render_targets
;
i
++
)
va_TraceMsg
(
idx
,
"
\t\t
render_targets[%d] = 0x%08x
\n
"
,
i
,
render_targets
[
i
]);
va_TraceMsg
(
idx
,
"
\t
context = 0x%08x
\n
"
,
*
context
);
va_TraceMsg
(
idx
,
NULL
);
trace_context
[
idx
].
trace_context
=
*
context
;
...
...
@@ -537,8 +546,8 @@ static char * buffer_type_to_string(int type)
void
va_TraceMapBuffer
(
VADisplay
dpy
,
VABufferID
buf_id
,
/* in */
void
**
pbuf
/* out */
VABufferID
buf_id
,
/* in */
void
**
pbuf
/* out */
)
{
VABufferType
type
;
...
...
@@ -574,6 +583,7 @@ void va_TraceMapBuffer (
buf_list
=
buf_list
->
next
;
}
va_TraceMsg
(
idx
,
NULL
);
}
static
void
va_TraceVABuffers
(
...
...
@@ -606,6 +616,7 @@ static void va_TraceVABuffers(
}
va_TraceMsg
(
idx
,
"
\t
checksum = 0x%02x
\n
"
,
check_sum
&
0xff
);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
...
...
@@ -644,6 +655,7 @@ static void va_TraceVAPictureParameterBufferMPEG2(
va_TraceMsg
(
idx
,
"
\t
repeat_first_field= %d
\n
"
,
p
->
picture_coding_extension
.
bits
.
repeat_first_field
);
va_TraceMsg
(
idx
,
"
\t
progressive_frame= %d
\n
"
,
p
->
picture_coding_extension
.
bits
.
progressive_frame
);
va_TraceMsg
(
idx
,
"
\t
is_first_field= %d
\n
"
,
p
->
picture_coding_extension
.
bits
.
is_first_field
);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
...
...
@@ -671,6 +683,7 @@ static void va_TraceVAIQMatrixBufferMPEG2(
va_TraceMsg
(
idx
,
"
\t
non_intra_quantiser_matrix = %d
\n
"
,
p
->
non_intra_quantiser_matrix
);
va_TraceMsg
(
idx
,
"
\t
chroma_intra_quantiser_matrix = %d
\n
"
,
p
->
chroma_intra_quantiser_matrix
);
va_TraceMsg
(
idx
,
"
\t
chroma_non_intra_quantiser_matrix = %d
\n
"
,
p
->
chroma_non_intra_quantiser_matrix
);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
...
...
@@ -703,12 +716,12 @@ static void va_TraceVASliceParameterBufferMPEG2(
va_TraceMsg
(
idx
,
"
\t
slice_vertical_position = %d
\n
"
,
p
->
slice_vertical_position
);
va_TraceMsg
(
idx
,
"
\t
quantiser_scale_code = %d
\n
"
,
p
->
quantiser_scale_code
);
va_TraceMsg
(
idx
,
"
\t
intra_slice_flag = %d
\n
"
,
p
->
intra_slice_flag
);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
static
void
va_TraceVAPictureParameterBufferMPEG4
(
VADisplay
dpy
,
VAContextID
context
,
...
...
@@ -749,7 +762,7 @@ static void va_TraceVAPictureParameterBufferMPEG4(
va_TraceMsg
(
idx
,
"
\t
sprite_trajectory_dv ="
);
for
(
i
=
0
;
i
<
3
;
i
++
)
va_TraceMsg
(
idx
,
"
\t
%d"
,
p
->
sprite_trajectory_dv
[
i
]);
va_TraceMsg
(
idx
,
"
\n
"
);
va_TraceMsg
(
idx
,
"
\n
"
);
va_TraceMsg
(
idx
,
"
\t
vop_fields value = %d
\n
"
,
p
->
vop_fields
.
value
);
va_TraceMsg
(
idx
,
"
\t
vop_coding_type= %d
\n
"
,
p
->
vop_fields
.
bits
.
vop_coding_type
);
va_TraceMsg
(
idx
,
"
\t
backward_reference_vop_coding_type= %d
\n
"
,
p
->
vop_fields
.
bits
.
backward_reference_vop_coding_type
);
...
...
@@ -763,6 +776,7 @@ static void va_TraceVAPictureParameterBufferMPEG4(
va_TraceMsg
(
idx
,
"
\t
num_macroblocks_in_gob = %d
\n
"
,
p
->
num_macroblocks_in_gob
);
va_TraceMsg
(
idx
,
"
\t
TRB = %d
\n
"
,
p
->
TRB
);
va_TraceMsg
(
idx
,
"
\t
TRD = %d
\n
"
,
p
->
TRD
);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
...
...
@@ -792,6 +806,7 @@ static void va_TraceVAIQMatrixBufferMPEG4(
va_TraceMsg
(
idx
,
"
\t
non_intra_quant_mat =
\n
"
);
for
(
i
=
0
;
i
<
64
;
i
++
)
va_TraceMsg
(
idx
,
"
\t\t
%d
\n
"
,
p
->
non_intra_quant_mat
[
i
]);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
...
...
@@ -822,11 +837,24 @@ static void va_TraceVASliceParameterBufferMPEG4(
va_TraceMsg
(
idx
,
"
\t
macroblock_offset = %d
\n
"
,
p
->
macroblock_offset
);
va_TraceMsg
(
idx
,
"
\t
macroblock_number = %d
\n
"
,
p
->
macroblock_number
);
va_TraceMsg
(
idx
,
"
\t
quant_scale = %d
\n
"
,
p
->
quant_scale
);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
static
inline
void
va_TraceFlagIfNotZero
(
int
idx
,
/* in */
const
char
*
name
,
/* in */
unsigned
int
flag
/* in */
)
{
if
(
flag
!=
0
)
{
va_TraceMsg
(
idx
,
"%s = %x
\n
"
,
name
,
flag
);
}
}
static
void
va_TraceVAPictureParameterBufferH264
(
VADisplay
dpy
,
VAContextID
context
,
...
...
@@ -843,7 +871,7 @@ static void va_TraceVAPictureParameterBufferH264(
va_TraceMsg
(
idx
,
"VAPictureParameterBufferH264
\n
"
);
va_TraceMsg
(
idx
,
"
\t
CurrPic.picture_id =
%d
\n
"
,
p
->
CurrPic
.
picture_id
);
va_TraceMsg
(
idx
,
"
\t
CurrPic.picture_id =
0x%08x
\n
"
,
p
->
CurrPic
.
picture_id
);
va_TraceMsg
(
idx
,
"
\t
CurrPic.frame_idx = %d
\n
"
,
p
->
CurrPic
.
frame_idx
);
va_TraceMsg
(
idx
,
"
\t
CurrPic.flags = %d
\n
"
,
p
->
CurrPic
.
flags
);
va_TraceMsg
(
idx
,
"
\t
CurrPic.TopFieldOrderCnt = %d
\n
"
,
p
->
CurrPic
.
TopFieldOrderCnt
);
...
...
@@ -853,7 +881,7 @@ static void va_TraceVAPictureParameterBufferH264(
for
(
i
=
0
;
i
<
16
;
i
++
)
{
if
(
p
->
ReferenceFrames
[
i
].
flags
!=
VA_PICTURE_H264_INVALID
)
{
va_TraceMsg
(
idx
,
"
\t\t
%d-%d-
%d
-%d
\n
"
,
va_TraceMsg
(
idx
,
"
\t\t
%d-%d-
0x%08x
-%d
\n
"
,
p
->
ReferenceFrames
[
i
].
TopFieldOrderCnt
,
p
->
ReferenceFrames
[
i
].
BottomFieldOrderCnt
,
p
->
ReferenceFrames
[
i
].
picture_id
,
...
...
@@ -882,14 +910,19 @@ static void va_TraceVAPictureParameterBufferH264(
va_TraceMsg
(
idx
,
"
\t
pic_init_qs_minus26 = %d
\n
"
,
p
->
pic_init_qs_minus26
);
va_TraceMsg
(
idx
,
"
\t
chroma_qp_index_offset = %d
\n
"
,
p
->
chroma_qp_index_offset
);
va_TraceMsg
(
idx
,
"
\t
second_chroma_qp_index_offset = %d
\n
"
,
p
->
second_chroma_qp_index_offset
);
va_TraceMsg
(
idx
,
"
\t
pic_fields = %d
\n
"
,
p
->
pic_fields
.
value
);
va_TraceMsg
(
idx
,
"
\t
entropy_coding_mode_flag = %d
\n
"
,
p
->
pic_fields
.
bits
.
entropy_coding_mode_flag
);
va_TraceMsg
(
idx
,
"
\t
weighted_pred_flag = %d
\n
"
,
p
->
pic_fields
.
bits
.
weighted_pred_flag
);
va_TraceMsg
(
idx
,
"
\t
weighted_bipred_idc = %d
\n
"
,
p
->
pic_fields
.
bits
.
weighted_bipred_idc
);
va_TraceMsg
(
idx
,
"
\t
transform_8x8_mode_flag = %d
\n
"
,
p
->
pic_fields
.
bits
.
transform_8x8_mode_flag
);
va_TraceMsg
(
idx
,
"
\t
field_pic_flag = %d
\n
"
,
p
->
pic_fields
.
bits
.
field_pic_flag
);
va_TraceMsg
(
idx
,
"
\t
constrained_intra_pred_flag = %d
\n
"
,
p
->
pic_fields
.
bits
.
constrained_intra_pred_flag
);
va_TraceMsg
(
idx
,
"
\t
pic_fields = 0x%03x
\n
"
,
p
->
pic_fields
.
value
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
entropy_coding_mode_flag"
,
p
->
pic_fields
.
bits
.
entropy_coding_mode_flag
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
weighted_pred_flag"
,
p
->
pic_fields
.
bits
.
weighted_pred_flag
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
weighted_bipred_idc"
,
p
->
pic_fields
.
bits
.
weighted_bipred_idc
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
transform_8x8_mode_flag"
,
p
->
pic_fields
.
bits
.
transform_8x8_mode_flag
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
field_pic_flag"
,
p
->
pic_fields
.
bits
.
field_pic_flag
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
constrained_intra_pred_flag"
,
p
->
pic_fields
.
bits
.
constrained_intra_pred_flag
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
pic_order_present_flag"
,
p
->
pic_fields
.
bits
.
pic_order_present_flag
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
deblocking_filter_control_present_flag"
,
p
->
pic_fields
.
bits
.
deblocking_filter_control_present_flag
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
redundant_pic_cnt_present_flag"
,
p
->
pic_fields
.
bits
.
redundant_pic_cnt_present_flag
);
va_TraceFlagIfNotZero
(
idx
,
"
\t\t
reference_pic_flag"
,
p
->
pic_fields
.
bits
.
reference_pic_flag
);
va_TraceMsg
(
idx
,
"
\t
frame_num = %d
\n
"
,
p
->
frame_num
);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
...
...
@@ -924,18 +957,18 @@ static void va_TraceVASliceParameterBufferH264(
va_TraceMsg
(
idx
,
"
\t
slice_qp_delta = %d
\n
"
,
p
->
slice_qp_delta
);
va_TraceMsg
(
idx
,
"
\t
disable_deblocking_filter_idc = %d
\n
"
,
p
->
disable_deblocking_filter_idc
);
va_TraceMsg
(
idx
,
"
\t
slice_alpha_c0_offset_div2 = %d
\n
"
,
p
->
slice_alpha_c0_offset_div2
);
va_TraceMsg
(
idx
,
"
\t
slice_beta_offset_div2 = %d
\n
"
,
p
->
slice_beta_offset_div2
);
va_TraceMsg
(
idx
,
"
\t
slice_beta_offset_div2 = %d
\n
"
,
p
->
slice_beta_offset_div2
);
if
(
p
->
slice_type
==
0
||
p
->
slice_type
==
1
)
{
va_TraceMsg
(
idx
,
"
\t
RefPicList0 ="
);
for
(
i
=
0
;
i
<
p
->
num_ref_idx_l0_active_minus1
+
1
;
i
++
)
{
va_TraceMsg
(
idx
,
"%d-%d-
%d
-%d
\n
"
,
p
->
RefPicList0
[
i
].
TopFieldOrderCnt
,
p
->
RefPicList0
[
i
].
BottomFieldOrderCnt
,
p
->
RefPicList0
[
i
].
picture_id
,
p
->
RefPicList0
[
i
].
frame_idx
);
va_TraceMsg
(
idx
,
"%d-%d-
0x%08x
-%d
\n
"
,
p
->
RefPicList0
[
i
].
TopFieldOrderCnt
,
p
->
RefPicList0
[
i
].
BottomFieldOrderCnt
,
p
->
RefPicList0
[
i
].
picture_id
,
p
->
RefPicList0
[
i
].
frame_idx
);
}
if
(
p
->
slice_type
==
1
)
{
va_TraceMsg
(
idx
,
"
\t
RefPicList1 ="
);
for
(
i
=
0
;
i
<
p
->
num_ref_idx_l1_active_minus1
+
1
;
i
++
)
{
va_TraceMsg
(
idx
,
"%d-%d-
%d
-%d
\n
"
,
p
->
RefPicList1
[
i
].
TopFieldOrderCnt
,
p
->
RefPicList1
[
i
].
BottomFieldOrderCnt
,
p
->
RefPicList1
[
i
].
picture_id
,
p
->
RefPicList1
[
i
].
frame_idx
);
va_TraceMsg
(
idx
,
"%d-%d-
0x%08x
-%d
\n
"
,
p
->
RefPicList1
[
i
].
TopFieldOrderCnt
,
p
->
RefPicList1
[
i
].
BottomFieldOrderCnt
,
p
->
RefPicList1
[
i
].
picture_id
,
p
->
RefPicList1
[
i
].
frame_idx
);
}
}
}
...
...
@@ -949,7 +982,7 @@ static void va_TraceVASliceParameterBufferH264(
va_TraceMsg
(
idx
,
"
\t
%d "
,
p
->
luma_offset_l0
[
i
]);
}
}
va_TraceMsg
(
idx
,
"
\t
chroma_weight_l0_flag = %d
\n
"
,
p
->
chroma_weight_l0_flag
);
if
(
p
->
chroma_weight_l0_flag
)
{
for
(
i
=
0
;
i
<=
p
->
num_ref_idx_l0_active_minus1
;
i
++
)
{
...
...
@@ -976,8 +1009,9 @@ static void va_TraceVASliceParameterBufferH264(
va_TraceMsg
(
idx
,
"
\t\t
%d "
,
p
->
chroma_weight_l1
[
i
][
1
]);
va_TraceMsg
(
idx
,
"
\t\t
%d "
,
p
->
chroma_offset_l1
[
i
][
1
]);
}
va_TraceMsg
(
idx
,
"
\n
"
);
}
va_TraceMsg
(
idx
,
"
\n
"
);
}
va_TraceMsg
(
idx
,
NULL
);
}
static
void
va_TraceVAIQMatrixBufferH264
(
...
...
@@ -1012,8 +1046,10 @@ static void va_TraceVAIQMatrixBufferH264(
va_TraceMsg
(
idx
,
"
\t
%d"
,
p
->
ScalingList8x8
[
i
][
j
]);
if
((
j
+
1
)
%
8
==
0
)
va_TraceMsg
(
idx
,
"
\n
"
);
}
}
}
va_TraceMsg
(
idx
,
NULL
);
}
static
void
va_TraceVAEncSequenceParameterBufferH264
(
...
...
@@ -1043,10 +1079,11 @@ static void va_TraceVAEncSequenceParameterBufferH264(
va_TraceMsg
(
idx
,
"
\t
min_qp = %d
\n
"
,
p
->
min_qp
);
va_TraceMsg
(
idx
,
"
\t
basic_unit_size = %d
\n
"
,
p
->
basic_unit_size
);
va_TraceMsg
(
idx
,
"
\t
vui_flag = %d
\n
"
,
p
->
vui_flag
);
va_TraceMsg
(
idx
,
NULL
);
/* start a new sequce, coded log file can be truncated */
trace_context
[
idx
].
trace_sequence_start
=
1
;
return
;
}
...
...
@@ -1069,6 +1106,7 @@ static void va_TraceVAEncPictureParameterBufferH264(
va_TraceMsg
(
idx
,
"
\t
picture_width = %d
\n
"
,
p
->
picture_width
);
va_TraceMsg
(
idx
,
"
\t
picture_height = %d
\n
"
,
p
->
picture_height
);
va_TraceMsg
(
idx
,
"
\t
last_picture = 0x%08x
\n
"
,
p
->
last_picture
);
va_TraceMsg
(
idx
,
NULL
);
trace_context
[
idx
].
trace_codedbuf
=
p
->
coded_buf
;
...
...
@@ -1096,7 +1134,8 @@ static void va_TraceVAEncSliceParameterBuffer(
va_TraceMsg
(
idx
,
"
\t
slice_flags.disable_deblocking_filter_idc = %d
\n
"
,
p
->
slice_flags
.
bits
.
disable_deblocking_filter_idc
);
va_TraceMsg
(
idx
,
"
\t
slice_flags.uses_long_term_ref = %d
\n
"
,
p
->
slice_flags
.
bits
.
uses_long_term_ref
);
va_TraceMsg
(
idx
,
"
\t
slice_flags.is_long_term_ref = %d
\n
"
,
p
->
slice_flags
.
bits
.
is_long_term_ref
);
va_TraceMsg
(
idx
,
NULL
);
return
;
}
...
...
@@ -1154,7 +1193,8 @@ static void va_TraceVAEncMiscParameterBuffer(
va_TraceMsg
(
idx
,
"invalid VAEncMiscParameterBuffer type = %d
\n
"
,
tmp
->
type
);
break
;
}
va_TraceMsg
(
idx
,
NULL
);
return
;
}
...
...
@@ -1188,6 +1228,7 @@ static void va_TraceVAPictureParameterBufferVC1(
va_TraceMsg
(
idx
,
"
\t
syncmarker = %d
\n
"
,
p
->
sequence_fields
.
bits
.
syncmarker
);
va_TraceMsg
(
idx
,
"
\t
rangered = %d
\n
"
,
p
->
sequence_fields
.
bits
.
rangered
);
va_TraceMsg
(
idx
,
"
\t
max_b_frames = %d
\n
"
,
p
->
sequence_fields
.
bits
.
max_b_frames
);
va_TraceMsg
(
idx
,
"
\t
profile = %d
\n
"
,
p
->
sequence_fields
.
bits
.
profile
);
va_TraceMsg
(
idx
,
"
\t
coded_width = %d
\n
"
,
p
->
coded_width
);
va_TraceMsg
(
idx
,
"
\t
coded_height = %d
\n
"
,
p
->
coded_height
);
va_TraceMsg
(
idx
,
"
\t
closed_entry = %d
\n
"
,
p
->
entrypoint_fields
.
bits
.
closed_entry
);
...
...
@@ -1260,6 +1301,7 @@ static void va_TraceVAPictureParameterBufferVC1(
va_TraceMsg
(
idx
,
"
\t
transform_ac_codingset_idx1 = %d
\n
"
,
p
->
transform_fields
.
bits
.
transform_ac_codingset_idx1
);
va_TraceMsg
(
idx
,
"
\t
transform_ac_codingset_idx2 = %d
\n
"
,
p
->
transform_fields
.
bits
.
transform_ac_codingset_idx2
);
va_TraceMsg
(
idx
,
"
\t
intra_transform_dc_table = %d
\n
"
,
p
->
transform_fields
.
bits
.
intra_transform_dc_table
);
va_TraceMsg
(
idx
,
NULL
);
}
static
void
va_TraceVASliceParameterBufferVC1
(
...
...
@@ -1284,6 +1326,7 @@ static void va_TraceVASliceParameterBufferVC1(
va_TraceMsg
(
idx
,
"
\t
slice_data_flag = %d
\n
"
,
p
->
slice_data_flag
);
va_TraceMsg
(
idx
,
"
\t
macroblock_offset = %d
\n
"
,
p
->
macroblock_offset
);
va_TraceMsg
(
idx
,
"
\t
slice_vertical_position = %d
\n
"
,
p
->
slice_vertical_position
);
va_TraceMsg
(
idx
,
NULL
);
}
void
va_TraceBeginPicture
(
...
...
@@ -1299,6 +1342,7 @@ void va_TraceBeginPicture(
va_TraceMsg
(
idx
,
"
\t
context = 0x%08x
\n
"
,
context
);
va_TraceMsg
(
idx
,
"
\t
render_targets = 0x%08x
\n
"
,
render_target
);
va_TraceMsg
(
idx
,
"
\t
frame_count = #%d
\n
"
,
trace_context
[
idx
].
trace_frame_no
);
va_TraceMsg
(
idx
,
NULL
);
trace_context
[
idx
].
trace_rendertarget
=
render_target
;
/* for surface data dump after vaEndPicture */
...
...
@@ -1645,6 +1689,8 @@ void va_TraceRenderPicture(
vaUnmapBuffer
(
dpy
,
buffers
[
i
]);
}
va_TraceMsg
(
idx
,
NULL
);
}
...
...
@@ -1660,7 +1706,6 @@ void va_TraceEndPicture(
va_TraceMsg
(
idx
,
"
\t
context = 0x%08x
\n
"
,
context
);
va_TraceMsg
(
idx
,
"
\t
render_targets = 0x%08x
\n
"
,
trace_context
[
idx
].
trace_rendertarget
);
/* want to trace codedbuf, and it is encode */
if
(
trace_context
[
idx
].
trace_fp_codedbuf
&&
((
trace_context
[
idx
].
trace_entrypoint
==
VAEntrypointEncSlice
)
||
...
...
@@ -1677,6 +1722,8 @@ void va_TraceEndPicture(
va_TraceSurface
(
dpy
);
}
va_TraceMsg
(
idx
,
NULL
);
}
void
va_TraceSyncSurface
(
...
...
@@ -1689,13 +1736,14 @@ void va_TraceSyncSurface(
TRACE_FUNCNAME
(
idx
);
va_TraceMsg
(
idx
,
"
\t
render_target = 0x%08x
\n
"
,
render_target
);
va_TraceMsg
(
idx
,
NULL
);
}
void
va_TraceQuerySurfaceStatus
(
VADisplay
dpy
,
VASurfaceID
render_target
,
VASurfaceStatus
*
status
/* out */
VASurfaceStatus
*
status
/* out */
)
{
DPY2INDEX
(
dpy
);
...
...
@@ -1704,14 +1752,15 @@ void va_TraceQuerySurfaceStatus(
va_TraceMsg
(
idx
,
"
\t
render_target = 0x%08x
\n
"
,
render_target
);
va_TraceMsg
(
idx
,
"
\t
status = 0x%08x
\n
"
,
*
status
);
va_TraceMsg
(
idx
,
NULL
);
}
void
va_TraceQuerySurfaceError
(
VADisplay
dpy
,
VASurfaceID
surface
,
VAStatus
error_status
,
void
**
error_info
/*out*/
VADisplay
dpy
,
VASurfaceID
surface
,
VAStatus
error_status
,
void
**
error_info
/*out*/
)
{
DPY2INDEX
(
dpy
);
...
...
@@ -1720,14 +1769,15 @@ void va_TraceQuerySurfaceError(
va_TraceMsg
(
idx
,
"
\t
surface = 0x%08x
\n
"
,
surface
);
va_TraceMsg
(
idx
,
"
\t
error_status = 0x%08x
\n
"
,
error_status
);
if
(
error_status
==
VA_STATUS_ERROR_DECODING_ERROR
)
{
VASurfaceDecodeMBErrors
*
p
=
*
error_info
;
while
(
p
->
status
!=
-
1
)
{
va_TraceMsg
(
idx
,
"
\t\t
status = %d
\n
"
,
p
->
status
);
va_TraceMsg
(
idx
,
"
\t\t
start_mb = %d
\n
"
,
p
->
start_mb
);
va_TraceMsg
(
idx
,
"
\t\t
end_mb = %d
\n
"
,
p
->
end_mb
);
p
++
;
/* next error record */
}
VASurfaceDecodeMBErrors
*
p
=
*
error_info
;
while
(
p
->
status
!=
-
1
)
{
va_TraceMsg
(
idx
,
"
\t\t
status = %d
\n
"
,
p
->
status
);
va_TraceMsg
(
idx
,
"
\t\t
start_mb = %d
\n
"
,
p
->
start_mb
);
va_TraceMsg
(
idx
,
"
\t\t
end_mb = %d
\n
"
,
p
->
end_mb
);
p
++
;
/* next error record */
}
}
va_TraceMsg
(
idx
,
NULL
);
}
void
va_TraceMaxNumDisplayAttributes
(
...
...
@@ -1740,12 +1790,13 @@ void va_TraceMaxNumDisplayAttributes (
TRACE_FUNCNAME
(
idx
);
va_TraceMsg
(
idx
,
"
\t
max_display_attributes = %d
\n
"
,
number
);
va_TraceMsg
(
idx
,
NULL
);
}
void
va_TraceQueryDisplayAttributes
(
VADisplay
dpy
,
VADisplayAttribute
*
attr_list
,
/* out */
int
*
num_attributes
/* out */
VADisplayAttribute
*
attr_list
,
/* out */
int
*
num_attributes
/* out */
)
{
int
i
;
...
...
@@ -1762,6 +1813,7 @@ void va_TraceQueryDisplayAttributes (
va_TraceMsg
(
idx
,
"
\t
value = %d
\n
"
,
attr_list
[
i
].
value
);
va_TraceMsg
(
idx
,
"
\t
flags = %d
\n
"
,
attr_list
[
i
].
flags
);
}
va_TraceMsg
(
idx
,
NULL
);
}
...
...
@@ -1784,6 +1836,7 @@ static void va_TraceDisplayAttributes (
va_TraceMsg
(
idx
,
"
\t
value = %d
\n
"
,
attr_list
[
i
].
value
);
va_TraceMsg
(
idx
,
"
\t
flags = %d
\n
"
,
attr_list
[
i
].
flags
);
}
va_TraceMsg
(
idx
,
NULL
);
}
...
...
@@ -1848,4 +1901,5 @@ void va_TracePutSurface (
va_TraceMsg
(
idx
,
"
\t
cliprects = 0x%08x
\n
"
,
cliprects
);
va_TraceMsg
(
idx
,
"
\t
number_cliprects = %d
\n
"
,
number_cliprects
);
va_TraceMsg
(
idx
,
"
\t
flags = 0x%08x
\n
"
,
flags
);
va_TraceMsg
(
idx
,
NULL
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment