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
f159aca3
Commit
f159aca3
authored
May 06, 2011
by
Xiang, Haihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/encode/avcenc: fix for VAEncSequenceParameterBufferH264
parent
0cfff4e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
test/encode/avcenc.c
test/encode/avcenc.c
+9
-6
No files found.
test/encode/avcenc.c
View file @
f159aca3
...
@@ -55,8 +55,8 @@ static VADisplay va_dpy;
...
@@ -55,8 +55,8 @@ static VADisplay va_dpy;
static
VAContextID
context_id
;
static
VAContextID
context_id
;
static
VAConfigID
config_id
;
static
VAConfigID
config_id
;
static
int
picture_width
;
static
int
picture_width
,
picture_width_in_mbs
;
static
int
picture_height
;
static
int
picture_height
,
picture_height_in_mbs
;
static
int
frame_size
;
static
int
frame_size
;
static
unsigned
char
*
newImageBuffer
=
0
;
static
unsigned
char
*
newImageBuffer
=
0
;
static
int
codedbuf_size
;
static
int
codedbuf_size
;
...
@@ -171,8 +171,9 @@ static void alloc_encode_resource()
...
@@ -171,8 +171,9 @@ static void alloc_encode_resource()
VAEncSequenceParameterBufferH264
seq_h264
=
{
0
};
VAEncSequenceParameterBufferH264
seq_h264
=
{
0
};
seq_h264
.
level_idc
=
30
;
seq_h264
.
level_idc
=
30
;
seq_h264
.
picture_width_in_mbs
=
picture_width
/
16
;
seq_h264
.
picture_width_in_mbs
=
picture_width_in_mbs
;
seq_h264
.
picture_height_in_mbs
=
picture_height
/
16
;
seq_h264
.
picture_height_in_mbs
=
picture_height_in_mbs
;
seq_h264
.
bits_per_second
=
384
*
1000
;
seq_h264
.
bits_per_second
=
384
*
1000
;
seq_h264
.
initial_qp
=
qp_value
;
seq_h264
.
initial_qp
=
qp_value
;
seq_h264
.
min_qp
=
3
;
seq_h264
.
min_qp
=
3
;
...
@@ -508,8 +509,8 @@ static void sps_rbsp(bitstream *bs)
...
@@ -508,8 +509,8 @@ static void sps_rbsp(bitstream *bs)
int
frame_crop_bottom_offset
=
0
;
int
frame_crop_bottom_offset
=
0
;
int
profile_idc
=
PROFILE_IDC_MAIN
;
int
profile_idc
=
PROFILE_IDC_MAIN
;
mb_width
=
(
picture_width
+
15
)
/
16
;
mb_width
=
picture_width_in_mbs
;
mb_height
=
(
picture_height
+
15
)
/
16
;
mb_height
=
picture_height_in_mbs
;
if
(
mb_height
*
16
-
picture_height
)
{
if
(
mb_height
*
16
-
picture_height
)
{
frame_cropping_flag
=
1
;
frame_cropping_flag
=
1
;
...
@@ -757,6 +758,8 @@ int main(int argc, char *argv[])
...
@@ -757,6 +758,8 @@ int main(int argc, char *argv[])
picture_width
=
atoi
(
argv
[
1
]);
picture_width
=
atoi
(
argv
[
1
]);
picture_height
=
atoi
(
argv
[
2
]);
picture_height
=
atoi
(
argv
[
2
]);
picture_width_in_mbs
=
(
picture_width
+
15
)
/
16
;
picture_height_in_mbs
=
(
picture_height
+
15
)
/
16
;
if
(
argc
==
6
)
if
(
argc
==
6
)
qp_value
=
atoi
(
argv
[
5
]);
qp_value
=
atoi
(
argv
[
5
]);
...
...
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