Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ec17ab38
Commit
ec17ab38
authored
Oct 01, 2016
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vaapi_h264: Write bitstream restriction fields
parent
17a0f948
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
vaapi_encode_h264.c
libavcodec/vaapi_encode_h264.c
+23
-2
No files found.
libavcodec/vaapi_encode_h264.c
View file @
ec17ab38
...
...
@@ -84,7 +84,12 @@ typedef struct VAAPIEncodeH264MiscSequenceParams {
char
vcl_hrd_parameters_present_flag
;
char
low_delay_hrd_flag
;
char
pic_struct_present_flag
;
char
bitstream_restriction_flag
;
char
motion_vectors_over_pic_boundaries_flag
;
unsigned
int
max_bytes_per_pic_denom
;
unsigned
int
max_bits_per_mb_denom
;
unsigned
int
max_num_reorder_frames
;
unsigned
int
max_dec_pic_buffering
;
unsigned
int
cpb_cnt_minus1
;
unsigned
int
bit_rate_scale
;
...
...
@@ -263,7 +268,13 @@ static void vaapi_encode_h264_write_vui(PutBitContext *pbc,
u
(
1
,
vvui_field
(
bitstream_restriction_flag
));
if
(
vseq
->
vui_fields
.
bits
.
bitstream_restriction_flag
)
{
av_assert0
(
0
&&
"bitstream restrictions not supported"
);
u
(
1
,
mseq_var
(
motion_vectors_over_pic_boundaries_flag
));
ue
(
mseq_var
(
max_bytes_per_pic_denom
));
ue
(
mseq_var
(
max_bits_per_mb_denom
));
ue
(
vvui_field
(
log2_max_mv_length_horizontal
));
ue
(
vvui_field
(
log2_max_mv_length_vertical
));
ue
(
mseq_var
(
max_num_reorder_frames
));
ue
(
mseq_var
(
max_dec_pic_buffering
));
}
}
...
...
@@ -831,6 +842,16 @@ static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
mseq
->
matrix_coefficients
=
avctx
->
colorspace
;
}
vseq
->
vui_fields
.
bits
.
bitstream_restriction_flag
=
1
;
mseq
->
motion_vectors_over_pic_boundaries_flag
=
1
;
mseq
->
max_bytes_per_pic_denom
=
0
;
mseq
->
max_bits_per_mb_denom
=
0
;
vseq
->
vui_fields
.
bits
.
log2_max_mv_length_horizontal
=
16
;
vseq
->
vui_fields
.
bits
.
log2_max_mv_length_vertical
=
16
;
mseq
->
max_num_reorder_frames
=
(
avctx
->
max_b_frames
>
0
);
mseq
->
max_dec_pic_buffering
=
vseq
->
max_num_ref_frames
;
vseq
->
bits_per_second
=
avctx
->
bit_rate
;
vseq
->
vui_fields
.
bits
.
timing_info_present_flag
=
1
;
...
...
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