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
50e6d214
Commit
50e6d214
authored
Jul 26, 2011
by
Austin Yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vatrace: trace JPEG encode parameters
Signed-off-by:
Austin Yuan
<
shengquan.yuan@gmail.com
>
parent
270299fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
0 deletions
+109
-0
va/va_trace.c
va/va_trace.c
+109
-0
No files found.
va/va_trace.c
View file @
50e6d214
...
...
@@ -1529,6 +1529,68 @@ static void va_TraceVAEncPictureParameterBufferH263(
return
;
}
static
void
va_TraceVAEncPictureParameterBufferJPEG
(
VADisplay
dpy
,
VAContextID
context
,
VABufferID
buffer
,
VABufferType
type
,
unsigned
int
size
,
unsigned
int
num_elements
,
void
*
data
)
{
VAEncPictureParameterBufferJPEG
*
p
=
(
VAEncPictureParameterBufferJPEG
*
)
data
;
DPY2INDEX
(
dpy
);
va_TraceMsg
(
idx
,
"VAEncPictureParameterBufferJPEG
\n
"
);
va_TraceMsg
(
idx
,
"
\t
reconstructed_picture = 0x%08x
\n
"
,
p
->
reconstructed_picture
);
va_TraceMsg
(
idx
,
"
\t
coded_buf = %08x
\n
"
,
p
->
coded_buf
);
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
,
NULL
);
trace_context
[
idx
].
trace_codedbuf
=
p
->
coded_buf
;
return
;
}
static
void
va_TraceVAEncQMatrixBufferJPEG
(
VADisplay
dpy
,
VAContextID
context
,
VABufferID
buffer
,
VABufferType
type
,
unsigned
int
size
,
unsigned
int
num_elements
,
void
*
data
)
{
VAQMatrixBufferJPEG
*
p
=
(
VAQMatrixBufferJPEG
*
)
data
;
DPY2INDEX
(
dpy
);
va_TraceMsg
(
idx
,
"VAQMatrixBufferJPEG
\n
"
);
va_TraceMsg
(
idx
,
"
\t
load_lum_quantiser_matrix = %d"
,
p
->
load_lum_quantiser_matrix
);
if
(
p
->
load_lum_quantiser_matrix
)
{
int
i
;
for
(
i
=
0
;
i
<
64
;
i
++
)
{
if
((
i
%
8
)
==
0
)
va_TraceMsg
(
idx
,
"
\n\t
"
);
va_TraceMsg
(
idx
,
"
\t
0x%02x"
,
p
->
lum_quantiser_matrix
[
i
]);
}
va_TraceMsg
(
idx
,
"
\n
"
);
}
va_TraceMsg
(
idx
,
"
\t
load_chroma_quantiser_matrix = %08x
\n
"
,
p
->
load_chroma_quantiser_matrix
);
if
(
p
->
load_chroma_quantiser_matrix
)
{
int
i
;
for
(
i
=
0
;
i
<
64
;
i
++
)
{
if
((
i
%
8
)
==
0
)
va_TraceMsg
(
idx
,
"
\n\t
"
);
va_TraceMsg
(
idx
,
"
\t
0x%02x"
,
p
->
chroma_quantiser_matrix
[
i
]);
}
va_TraceMsg
(
idx
,
"
\n
"
);
}
va_TraceMsg
(
idx
,
NULL
);
return
;
}
static
void
va_TraceH263Buf
(
VADisplay
dpy
,
...
...
@@ -1588,6 +1650,45 @@ static void va_TraceH263Buf(
}
}
static
void
va_TraceJPEGBuf
(
VADisplay
dpy
,
VAContextID
context
,
VABufferID
buffer
,
VABufferType
type
,
unsigned
int
size
,
unsigned
int
num_elements
,
void
*
pbuf
)
{
switch
(
type
)
{
case
VAPictureParameterBufferType
:
/* print MPEG4 buffer */
case
VAIQMatrixBufferType
:
/* print MPEG4 buffer */
case
VABitPlaneBufferType
:
/* print MPEG4 buffer */
case
VASliceGroupMapBufferType
:
case
VASliceParameterBufferType
:
/* print MPEG4 buffer */
case
VASliceDataBufferType
:
case
VAMacroblockParameterBufferType
:
case
VAResidualDataBufferType
:
case
VADeblockingParameterBufferType
:
case
VAImageBufferType
:
case
VAProtectedSliceDataBufferType
:
case
VAEncCodedBufferType
:
case
VAEncSequenceParameterBufferType
:
case
VAEncSliceParameterBufferType
:
va_TraceVABuffers
(
dpy
,
context
,
buffer
,
type
,
size
,
num_elements
,
pbuf
);
break
;
case
VAEncPictureParameterBufferType
:
va_TraceVAEncPictureParameterBufferJPEG
(
dpy
,
context
,
buffer
,
type
,
size
,
num_elements
,
pbuf
);
break
;
case
VAQMatrixBufferType
:
va_TraceVAEncQMatrixBufferJPEG
(
dpy
,
context
,
buffer
,
type
,
size
,
num_elements
,
pbuf
);
break
;
default:
break
;
}
}
static
void
va_TraceMPEG4Buf
(
VADisplay
dpy
,
VAContextID
context
,
...
...
@@ -1861,6 +1962,14 @@ void va_TraceRenderPicture(
va_TraceH263Buf
(
dpy
,
context
,
buffers
[
i
],
type
,
size
,
num_elements
,
pbuf
+
size
*
j
);
}
break
;
case
VAProfileJPEGBaseline
:
for
(
j
=
0
;
j
<
num_elements
;
j
++
)
{
va_TraceMsg
(
idx
,
"
\t
---------------------------
\n
"
,
j
);
va_TraceMsg
(
idx
,
"
\t
element[%d] = "
,
j
);
va_TraceJPEGBuf
(
dpy
,
context
,
buffers
[
i
],
type
,
size
,
num_elements
,
pbuf
+
size
*
j
);
}
break
;
default:
break
;
}
...
...
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