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
975257ff
Commit
975257ff
authored
Jul 22, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libx264: Export choosen pict_type
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
caba19a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
libx264.c
libavcodec/libx264.c
+11
-6
No files found.
libavcodec/libx264.c
View file @
975257ff
...
@@ -253,6 +253,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
...
@@ -253,6 +253,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
x264_nal_t
*
nal
;
x264_nal_t
*
nal
;
int
nnal
,
i
,
ret
;
int
nnal
,
i
,
ret
;
x264_picture_t
pic_out
=
{
0
};
x264_picture_t
pic_out
=
{
0
};
int
pict_type
;
x264_picture_init
(
&
x4
->
pic
);
x264_picture_init
(
&
x4
->
pic
);
x4
->
pic
.
img
.
i_csp
=
x4
->
params
.
i_csp
;
x4
->
pic
.
img
.
i_csp
=
x4
->
params
.
i_csp
;
...
@@ -287,27 +288,31 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
...
@@ -287,27 +288,31 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
pkt
->
pts
=
pic_out
.
i_pts
;
pkt
->
pts
=
pic_out
.
i_pts
;
pkt
->
dts
=
pic_out
.
i_dts
;
pkt
->
dts
=
pic_out
.
i_dts
;
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
switch
(
pic_out
.
i_type
)
{
switch
(
pic_out
.
i_type
)
{
case
X264_TYPE_IDR
:
case
X264_TYPE_IDR
:
case
X264_TYPE_I
:
case
X264_TYPE_I
:
ctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
pict_type
=
AV_PICTURE_TYPE_I
;
break
;
break
;
case
X264_TYPE_P
:
case
X264_TYPE_P
:
ctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_P
;
pict_type
=
AV_PICTURE_TYPE_P
;
break
;
break
;
case
X264_TYPE_B
:
case
X264_TYPE_B
:
case
X264_TYPE_BREF
:
case
X264_TYPE_BREF
:
ctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_B
;
pict_type
=
AV_PICTURE_TYPE_B
;
break
;
break
;
default:
pict_type
=
AV_PICTURE_TYPE_NONE
;
}
}
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
ctx
->
coded_frame
->
pict_type
=
pict_type
;
FF_ENABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
#endif
pkt
->
flags
|=
AV_PKT_FLAG_KEY
*
pic_out
.
b_keyframe
;
pkt
->
flags
|=
AV_PKT_FLAG_KEY
*
pic_out
.
b_keyframe
;
if
(
ret
)
{
if
(
ret
)
{
ff_side_data_set_encoder_stats
(
pkt
,
(
pic_out
.
i_qpplus1
-
1
)
*
FF_QP2LAMBDA
,
NULL
,
0
,
0
);
ff_side_data_set_encoder_stats
(
pkt
,
(
pic_out
.
i_qpplus1
-
1
)
*
FF_QP2LAMBDA
,
NULL
,
0
,
pict_type
);
#if FF_API_CODED_FRAME
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
FF_DISABLE_DEPRECATION_WARNINGS
...
...
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