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
1156b507
Commit
1156b507
authored
Sep 18, 2018
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cbs_h264: Infer default VUI values if VUI parameters are not present
parent
574dafe7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
cbs_h264_syntax_template.c
libavcodec/cbs_h264_syntax_template.c
+42
-0
No files found.
libavcodec/cbs_h264_syntax_template.c
View file @
1156b507
...
...
@@ -213,6 +213,46 @@ static int FUNC(vui_parameters)(CodedBitstreamContext *ctx, RWContext *rw,
return
0
;
}
static
int
FUNC
(
vui_parameters_default
)(
CodedBitstreamContext
*
ctx
,
RWContext
*
rw
,
H264RawVUI
*
current
,
H264RawSPS
*
sps
)
{
infer
(
aspect_ratio_idc
,
0
);
infer
(
video_format
,
5
);
infer
(
video_full_range_flag
,
0
);
infer
(
colour_primaries
,
2
);
infer
(
transfer_characteristics
,
2
);
infer
(
matrix_coefficients
,
2
);
infer
(
chroma_sample_loc_type_top_field
,
0
);
infer
(
chroma_sample_loc_type_bottom_field
,
0
);
infer
(
fixed_frame_rate_flag
,
0
);
infer
(
low_delay_hrd_flag
,
1
);
infer
(
pic_struct_present_flag
,
0
);
infer
(
motion_vectors_over_pic_boundaries_flag
,
1
);
infer
(
max_bytes_per_pic_denom
,
2
);
infer
(
max_bits_per_mb_denom
,
1
);
infer
(
log2_max_mv_length_horizontal
,
15
);
infer
(
log2_max_mv_length_vertical
,
15
);
if
((
sps
->
profile_idc
==
44
||
sps
->
profile_idc
==
86
||
sps
->
profile_idc
==
100
||
sps
->
profile_idc
==
110
||
sps
->
profile_idc
==
122
||
sps
->
profile_idc
==
244
)
&&
sps
->
constraint_set3_flag
)
{
infer
(
max_num_reorder_frames
,
0
);
infer
(
max_dec_frame_buffering
,
0
);
}
else
{
infer
(
max_num_reorder_frames
,
H264_MAX_DPB_FRAMES
);
infer
(
max_dec_frame_buffering
,
H264_MAX_DPB_FRAMES
);
}
return
0
;
}
static
int
FUNC
(
sps
)(
CodedBitstreamContext
*
ctx
,
RWContext
*
rw
,
H264RawSPS
*
current
)
{
...
...
@@ -317,6 +357,8 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
flag
(
vui_parameters_present_flag
);
if
(
current
->
vui_parameters_present_flag
)
CHECK
(
FUNC
(
vui_parameters
)(
ctx
,
rw
,
&
current
->
vui
,
current
));
else
CHECK
(
FUNC
(
vui_parameters_default
)(
ctx
,
rw
,
&
current
->
vui
,
current
));
CHECK
(
FUNC
(
rbsp_trailing_bits
)(
ctx
,
rw
));
...
...
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