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
3d9fc21e
Commit
3d9fc21e
authored
Dec 13, 2013
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: Refactor decode_frame_packing_arrangement
Directly set the fields when necessary.
parent
3a149e23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
h264_sei.c
libavcodec/h264_sei.c
+7
-16
No files found.
libavcodec/h264_sei.c
View file @
3d9fc21e
...
...
@@ -178,35 +178,26 @@ static int decode_buffering_period(H264Context *h)
static
int
decode_frame_packing_arrangement
(
H264Context
*
h
)
{
int
cancel
;
int
quincunx
=
0
;
int
content
=
-
1
;
int
type
=
-
1
;
get_ue_golomb
(
&
h
->
gb
);
// frame_packing_arrangement_id
cancel
=
get_bits1
(
&
h
->
gb
);
// frame_packing_arrangement_cancel_flag
if
(
cancel
==
0
)
{
type
=
get_bits
(
&
h
->
gb
,
7
);
// frame_packing_arrangement_type
quincunx
=
get_bits1
(
&
h
->
gb
);
// quincunx_sampling_flag
content
=
get_bits
(
&
h
->
gb
,
6
);
// content_interpretation_type
h
->
sei_frame_packing_present
=
!
get_bits1
(
&
h
->
gb
);
if
(
h
->
sei_frame_packing_present
)
{
h
->
frame_packing_arrangement_type
=
get_bits
(
&
h
->
gb
,
7
);
h
->
quincunx_subsampling
=
get_bits1
(
&
h
->
gb
);
h
->
content_interpretation_type
=
get_bits
(
&
h
->
gb
,
6
);
// the following skips: spatial_flipping_flag, frame0_flipped_flag,
// field_views_flag, current_frame_is_frame0_flag,
// frame0_self_contained_flag, frame1_self_contained_flag
skip_bits
(
&
h
->
gb
,
6
);
if
(
quincunx
==
0
&&
type
!=
5
)
if
(
!
h
->
quincunx_subsampling
&&
h
->
frame_packing_arrangement_
type
!=
5
)
skip_bits
(
&
h
->
gb
,
16
);
// frame[01]_grid_position_[xy]
skip_bits
(
&
h
->
gb
,
8
);
// frame_packing_arrangement_reserved_byte
get_ue_golomb
(
&
h
->
gb
);
// frame_packing_arrangement_repetition_period
}
skip_bits1
(
&
h
->
gb
);
// frame_packing_arrangement_extension_flag
h
->
sei_frame_packing_present
=
(
cancel
==
0
);
h
->
frame_packing_arrangement_type
=
type
;
h
->
content_interpretation_type
=
content
;
h
->
quincunx_subsampling
=
quincunx
;
return
0
;
}
...
...
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