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
22291c37
Commit
22291c37
authored
Jun 26, 2015
by
Kieran Kunhya
Committed by
Michael Niedermayer
Jun 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: Add support for per-frame AFD output in h264
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b75c0a72
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
h264.c
libavcodec/h264.c
+10
-0
h264.h
libavcodec/h264.h
+3
-0
h264_sei.c
libavcodec/h264_sei.c
+6
-0
No files found.
libavcodec/h264.c
View file @
22291c37
...
...
@@ -608,6 +608,7 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h)
h
->
frame_recovered
=
0
;
h
->
prev_frame_num
=
-
1
;
h
->
sei_fpa
.
frame_packing_arrangement_cancel_flag
=
-
1
;
h
->
has_afd
=
0
;
h
->
next_outputed_poc
=
INT_MIN
;
for
(
i
=
0
;
i
<
MAX_DELAYED_PIC_COUNT
;
i
++
)
...
...
@@ -869,6 +870,15 @@ static void decode_postinit(H264Context *h, int setup_finished)
}
}
if
(
h
->
has_afd
)
{
AVFrameSideData
*
sd
=
av_frame_new_side_data
(
cur
->
f
,
AV_FRAME_DATA_AFD
,
1
);
if
(
sd
)
{
*
sd
->
data
=
h
->
afd
;
h
->
has_afd
=
0
;
}
}
cur
->
mmco_reset
=
h
->
mmco_reset
;
h
->
mmco_reset
=
0
;
...
...
libavcodec/h264.h
View file @
22291c37
...
...
@@ -781,6 +781,9 @@ typedef struct H264Context {
int
missing_fields
;
uint8_t
afd
;
int
has_afd
;
// Timestamp stuff
int
sei_buffering_period_present
;
///< Buffering period SEI flag
...
...
libavcodec/h264_sei.c
View file @
22291c37
...
...
@@ -132,7 +132,13 @@ static int decode_user_data_itu_t_t35(H264Context *h, int size)
return
-
1
;
skip_bits
(
&
h
->
gb
,
4
);
dtg_active_format
=
get_bits
(
&
h
->
gb
,
4
);
#if FF_API_AFD
FF_DISABLE_DEPRECATION_WARNINGS
h
->
avctx
->
dtg_active_format
=
dtg_active_format
;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
/* FF_API_AFD */
h
->
has_afd
=
1
;
h
->
afd
=
dtg_active_format
;
}
else
{
skip_bits
(
&
h
->
gb
,
6
);
}
...
...
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