Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
ec17ab38
Commit
ec17ab38
authored
8 years ago
by
Mark Thompson
Browse files
Options
Downloads
Patches
Plain Diff
vaapi_h264: Write bitstream restriction fields
parent
17a0f948
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/vaapi_encode_h264.c
+23
-2
23 additions, 2 deletions
libavcodec/vaapi_encode_h264.c
with
23 additions
and
2 deletions
libavcodec/vaapi_encode_h264.c
+
23
−
2
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment