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
979cb551
Commit
979cb551
authored
Aug 01, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hevc: Split the sei parsing in 3 functions
parent
043f46f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
20 deletions
+34
-20
hevc_sei.c
libavcodec/hevc_sei.c
+34
-20
No files found.
libavcodec/hevc_sei.c
View file @
979cb551
...
...
@@ -118,6 +118,38 @@ static int decode_nal_sei_display_orientation(HEVCContext *s)
return
0
;
}
static
int
decode_nal_sei_prefix
(
HEVCContext
*
s
,
int
type
,
int
size
)
{
GetBitContext
*
gb
=
&
s
->
HEVClc
.
gb
;
switch
(
type
)
{
case
256
:
// Mismatched value from HM 8.1
return
decode_nal_sei_decoded_picture_hash
(
s
);
case
SEI_TYPE_FRAME_PACKING
:
return
decode_nal_sei_frame_packing_arrangement
(
s
);
case
SEI_TYPE_DISPLAY_ORIENTATION
:
return
decode_nal_sei_display_orientation
(
s
);
default:
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"Skipped PREFIX SEI %d
\n
"
,
type
);
skip_bits_long
(
gb
,
8
*
size
);
return
0
;
}
}
static
int
decode_nal_sei_suffix
(
HEVCContext
*
s
,
int
type
,
int
size
)
{
GetBitContext
*
gb
=
&
s
->
HEVClc
.
gb
;
switch
(
type
)
{
case
SEI_TYPE_DECODED_PICTURE_HASH
:
return
decode_nal_sei_decoded_picture_hash
(
s
);
default:
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"Skipped SUFFIX SEI %d
\n
"
,
type
);
skip_bits_long
(
gb
,
8
*
size
);
return
0
;
}
}
static
int
decode_nal_sei_message
(
HEVCContext
*
s
)
{
GetBitContext
*
gb
=
&
s
->
HEVClc
.
gb
;
...
...
@@ -137,27 +169,9 @@ static int decode_nal_sei_message(HEVCContext *s)
payload_size
+=
byte
;
}
if
(
s
->
nal_unit_type
==
NAL_SEI_PREFIX
)
{
switch
(
payload_type
)
{
case
256
:
// Mismatched value from HM 8.1
return
decode_nal_sei_decoded_picture_hash
(
s
);
case
SEI_TYPE_FRAME_PACKING
:
return
decode_nal_sei_frame_packing_arrangement
(
s
);
case
SEI_TYPE_DISPLAY_ORIENTATION
:
return
decode_nal_sei_display_orientation
(
s
);
default:
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"Skipped PREFIX SEI %d
\n
"
,
payload_type
);
skip_bits
(
gb
,
8
*
payload_size
);
return
0
;
}
return
decode_nal_sei_prefix
(
s
,
payload_type
,
payload_size
);
}
else
{
/* nal_unit_type == NAL_SEI_SUFFIX */
switch
(
payload_type
)
{
case
SEI_TYPE_DECODED_PICTURE_HASH
:
return
decode_nal_sei_decoded_picture_hash
(
s
);
default:
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"Skipped SUFFIX SEI %d
\n
"
,
payload_type
);
skip_bits
(
gb
,
8
*
payload_size
);
return
0
;
}
return
decode_nal_sei_suffix
(
s
,
payload_type
,
payload_size
);
}
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