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
7157d959
Commit
7157d959
authored
Feb 11, 2018
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cbs_h264: Move slice_group_id array out of PPS structure
It's very large, and is only used in some FMO streams.
parent
78fa0b90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
cbs_h264.h
libavcodec/cbs_h264.h
+3
-1
cbs_h2645.c
libavcodec/cbs_h2645.c
+9
-1
cbs_h264_syntax_template.c
libavcodec/cbs_h264_syntax_template.c
+3
-0
No files found.
libavcodec/cbs_h264.h
View file @
7157d959
...
...
@@ -195,7 +195,9 @@ typedef struct H264RawPPS {
uint8_t
slice_group_change_direction_flag
;
uint16_t
slice_group_change_rate_minus1
;
uint16_t
pic_size_in_map_units_minus1
;
uint8_t
slice_group_id
[
H264_MAX_MB_PIC_SIZE
];
uint8_t
*
slice_group_id
;
AVBufferRef
*
slice_group_id_ref
;
uint8_t
num_ref_idx_l0_default_active_minus1
;
uint8_t
num_ref_idx_l1_default_active_minus1
;
...
...
libavcodec/cbs_h2645.c
View file @
7157d959
...
...
@@ -394,6 +394,13 @@ static int cbs_h2645_read_more_rbsp_data(BitstreamContext *bc)
#undef allocate
static
void
cbs_h264_free_pps
(
void
*
unit
,
uint8_t
*
content
)
{
H264RawPPS
*
pps
=
(
H264RawPPS
*
)
content
;
av_buffer_unref
(
&
pps
->
slice_group_id_ref
);
av_freep
(
&
content
);
}
static
void
cbs_h264_free_sei_payload
(
H264RawSEIPayload
*
payload
)
{
switch
(
payload
->
payload_type
)
{
...
...
@@ -725,7 +732,8 @@ static int cbs_h264_read_nal_unit(CodedBitstreamContext *ctx,
{
H264RawPPS
*
pps
;
err
=
ff_cbs_alloc_unit_content
(
ctx
,
unit
,
sizeof
(
*
pps
),
NULL
);
err
=
ff_cbs_alloc_unit_content
(
ctx
,
unit
,
sizeof
(
*
pps
),
&
cbs_h264_free_pps
);
if
(
err
<
0
)
return
err
;
pps
=
unit
->
content
;
...
...
libavcodec/cbs_h264_syntax_template.c
View file @
7157d959
...
...
@@ -404,6 +404,9 @@ static int FUNC(pps)(CodedBitstreamContext *ctx, RWContext *rw,
ue
(
slice_group_change_rate_minus1
,
0
,
pic_size
-
1
);
}
else
if
(
current
->
slice_group_map_type
==
6
)
{
ue
(
pic_size_in_map_units_minus1
,
pic_size
-
1
,
pic_size
-
1
);
allocate
(
current
->
slice_group_id
,
current
->
pic_size_in_map_units_minus1
+
1
);
for
(
i
=
0
;
i
<=
current
->
pic_size_in_map_units_minus1
;
i
++
)
u
(
av_log2
(
2
*
current
->
num_slice_groups_minus1
+
1
),
slice_group_id
[
i
],
0
,
current
->
num_slice_groups_minus1
);
...
...
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