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
aaf44146
Commit
aaf44146
authored
Jun 23, 2017
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: Add stream constraint values to the common header
With comments describing the derivation of each value.
parent
defe307f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
h264.h
libavcodec/h264.h
+45
-0
No files found.
libavcodec/h264.h
View file @
aaf44146
...
...
@@ -44,4 +44,49 @@ enum {
H264_NAL_AUXILIARY_SLICE
=
19
,
};
enum
{
// 7.4.2.1.1: seq_parameter_set_id is in [0, 31].
H264_MAX_SPS_COUNT
=
32
,
// 7.4.2.2: pic_parameter_set_id is in [0, 255].
H264_MAX_PPS_COUNT
=
256
,
// A.3: MaxDpbFrames is bounded above by 16.
H264_MAX_DPB_FRAMES
=
16
,
// 7.4.2.1.1: max_num_ref_frames is in [0, MaxDpbFrames], and
// each reference frame can have two fields.
H264_MAX_REFS
=
2
*
H264_MAX_DPB_FRAMES
,
// 7.4.3.1: modification_of_pic_nums_idc is not equal to 3 at most
// num_ref_idx_lN_active_minus1 + 1 times (that is, once for each
// possible reference), then equal to 3 once.
H264_MAX_RPLM_COUNT
=
H264_MAX_REFS
+
1
,
// 7.4.3.3: in the worst case, we begin with a full short-term
// reference picture list. Each picture in turn is moved to the
// long-term list (type 3) and then discarded from there (type 2).
// Then, we set the length of the long-term list (type 4), mark
// the current picture as long-term (type 6) and terminate the
// process (type 0).
H264_MAX_MMCO_COUNT
=
H264_MAX_REFS
*
2
+
3
,
// A.2.1, A.2.3: profiles supporting FMO constrain
// num_slice_groups_minus1 to be in [0, 7].
H264_MAX_SLICE_GROUPS
=
8
,
// E.2.2: cpb_cnt_minus1 is in [0, 31].
H264_MAX_CPB_CNT
=
32
,
// A.3: in table A-1 the highest level allows a MaxFS of 139264.
H264_MAX_MB_PIC_SIZE
=
139264
,
// A.3.1, A.3.2: PicWidthInMbs and PicHeightInMbs are constrained
// to be not greater than sqrt(MaxFS * 8). Hence height/width are
// bounded above by sqrt(139264 * 8) = 1055.5 macroblocks.
H264_MAX_MB_WIDTH
=
1055
,
H264_MAX_MB_HEIGHT
=
1055
,
H264_MAX_WIDTH
=
H264_MAX_MB_WIDTH
*
16
,
H264_MAX_HEIGHT
=
H264_MAX_MB_HEIGHT
*
16
,
};
#endif
/* AVCODEC_H264_H */
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