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
31d7b17c
Commit
31d7b17c
authored
Jan 23, 2020
by
Praveen Karadugattu
Committed by
Paul B Mahol
Feb 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/hevc: add support for Frame Duplication (Doubling/Tripling)
Parse picture_struct SEI value.
parent
270068b5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
hevc_parser.c
libavcodec/hevc_parser.c
+5
-0
hevc_sei.c
libavcodec/hevc_sei.c
+6
-0
hevc_sei.h
libavcodec/hevc_sei.h
+5
-0
No files found.
libavcodec/hevc_parser.c
View file @
31d7b17c
...
...
@@ -235,6 +235,11 @@ static int parse_nal_units(AVCodecParserContext *s, const uint8_t *buf,
case
HEVC_NAL_RADL_R
:
case
HEVC_NAL_RASL_N
:
case
HEVC_NAL_RASL_R
:
if
(
ctx
->
sei
.
picture_timing
.
picture_struct
==
HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING
)
{
s
->
repeat_pict
=
1
;
}
else
if
(
ctx
->
sei
.
picture_timing
.
picture_struct
==
HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING
)
{
s
->
repeat_pict
=
2
;
}
ret
=
hevc_parse_slice_header
(
s
,
nal
,
avctx
);
if
(
ret
)
return
ret
;
...
...
libavcodec/hevc_sei.c
View file @
31d7b17c
...
...
@@ -144,6 +144,12 @@ static int decode_nal_sei_pic_timing(HEVCSEI *s, GetBitContext *gb, const HEVCPa
}
else
if
(
pic_struct
==
1
||
pic_struct
==
9
||
pic_struct
==
11
)
{
av_log
(
logctx
,
AV_LOG_DEBUG
,
"TOP Field
\n
"
);
h
->
picture_struct
=
AV_PICTURE_STRUCTURE_TOP_FIELD
;
}
else
if
(
pic_struct
==
7
)
{
av_log
(
logctx
,
AV_LOG_DEBUG
,
"Frame/Field Doubling
\n
"
);
h
->
picture_struct
=
HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING
;
}
else
if
(
pic_struct
==
8
)
{
av_log
(
logctx
,
AV_LOG_DEBUG
,
"Frame/Field Tripling
\n
"
);
h
->
picture_struct
=
HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING
;
}
get_bits
(
gb
,
2
);
// source_scan_type
get_bits
(
gb
,
1
);
// duplicate_flag
...
...
libavcodec/hevc_sei.h
View file @
31d7b17c
...
...
@@ -59,6 +59,11 @@ typedef enum {
HEVC_SEI_TYPE_ALPHA_CHANNEL_INFO
=
165
,
}
HEVC_SEI_Type
;
typedef
enum
{
HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING
=
7
,
HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING
=
8
}
HEVC_SEI_PicStructType
;
typedef
struct
HEVCSEIPictureHash
{
uint8_t
md5
[
3
][
16
];
uint8_t
is_md5
;
...
...
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