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
b84a2b91
Commit
b84a2b91
authored
Mar 23, 2020
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_showinfo: support AV_FRAME_DATA_VIDEO_ENC_PARAMS
parent
991d4176
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
vf_showinfo.c
libavfilter/vf_showinfo.c
+23
-0
No files found.
libavfilter/vf_showinfo.c
View file @
b84a2b91
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "libavutil/timestamp.h"
#include "libavutil/timestamp.h"
#include "libavutil/timecode.h"
#include "libavutil/timecode.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/video_enc_params.h"
#include "avfilter.h"
#include "avfilter.h"
#include "internal.h"
#include "internal.h"
...
@@ -170,6 +171,25 @@ static void dump_content_light_metadata(AVFilterContext *ctx, AVFrameSideData *s
...
@@ -170,6 +171,25 @@ static void dump_content_light_metadata(AVFilterContext *ctx, AVFrameSideData *s
metadata
->
MaxCLL
,
metadata
->
MaxFALL
);
metadata
->
MaxCLL
,
metadata
->
MaxFALL
);
}
}
static
void
dump_video_enc_params
(
AVFilterContext
*
ctx
,
AVFrameSideData
*
sd
)
{
AVVideoEncParams
*
par
=
(
AVVideoEncParams
*
)
sd
->
data
;
int
plane
,
acdc
;
av_log
(
ctx
,
AV_LOG_INFO
,
"video encoding parameters: type %d; "
,
par
->
type
);
if
(
par
->
qp
)
av_log
(
ctx
,
AV_LOG_INFO
,
"qp=%d; "
,
par
->
qp
);
for
(
plane
=
0
;
plane
<
FF_ARRAY_ELEMS
(
par
->
delta_qp
);
plane
++
)
for
(
acdc
=
0
;
acdc
<
FF_ARRAY_ELEMS
(
par
->
delta_qp
[
plane
]);
acdc
++
)
{
int
delta_qp
=
par
->
delta_qp
[
plane
][
acdc
];
if
(
delta_qp
)
av_log
(
ctx
,
AV_LOG_INFO
,
"delta_qp[%d][%d]=%d; "
,
plane
,
acdc
,
delta_qp
);
}
if
(
par
->
nb_blocks
)
av_log
(
ctx
,
AV_LOG_INFO
,
"%u blocks; "
,
par
->
nb_blocks
);
}
static
void
dump_color_property
(
AVFilterContext
*
ctx
,
AVFrame
*
frame
)
static
void
dump_color_property
(
AVFilterContext
*
ctx
,
AVFrame
*
frame
)
{
{
const
char
*
color_range_str
=
av_color_range_name
(
frame
->
color_range
);
const
char
*
color_range_str
=
av_color_range_name
(
frame
->
color_range
);
...
@@ -352,6 +372,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
...
@@ -352,6 +372,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
av_log
(
ctx
,
AV_LOG_INFO
,
"GOP timecode - %s"
,
tcbuf
);
av_log
(
ctx
,
AV_LOG_INFO
,
"GOP timecode - %s"
,
tcbuf
);
break
;
break
;
}
}
case
AV_FRAME_DATA_VIDEO_ENC_PARAMS
:
dump_video_enc_params
(
ctx
,
sd
);
break
;
default:
default:
av_log
(
ctx
,
AV_LOG_WARNING
,
"unknown side data type %d (%d bytes)"
,
av_log
(
ctx
,
AV_LOG_WARNING
,
"unknown side data type %d (%d bytes)"
,
sd
->
type
,
sd
->
size
);
sd
->
type
,
sd
->
size
);
...
...
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