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
66974311
Commit
66974311
authored
Oct 20, 2018
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/show_info : add print of color information (range, color_primaries, color_trc, colorspace)
parent
78f04843
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
vf_showinfo.c
libavfilter/vf_showinfo.c
+35
-0
No files found.
libavfilter/vf_showinfo.c
View file @
66974311
...
@@ -95,6 +95,39 @@ static void dump_stereo3d(AVFilterContext *ctx, AVFrameSideData *sd)
...
@@ -95,6 +95,39 @@ static void dump_stereo3d(AVFilterContext *ctx, AVFrameSideData *sd)
av_log
(
ctx
,
AV_LOG_INFO
,
" (inverted)"
);
av_log
(
ctx
,
AV_LOG_INFO
,
" (inverted)"
);
}
}
static
void
dump_color_property
(
AVFilterContext
*
ctx
,
AVFrame
*
frame
)
{
const
char
*
color_range_str
=
av_color_range_name
(
frame
->
color_range
);
const
char
*
colorspace_str
=
av_color_space_name
(
frame
->
colorspace
);
const
char
*
color_primaries_str
=
av_color_primaries_name
(
frame
->
color_primaries
);
const
char
*
color_trc_str
=
av_color_transfer_name
(
frame
->
color_trc
);
if
(
!
color_range_str
||
frame
->
color_range
==
AVCOL_RANGE_UNSPECIFIED
)
{
av_log
(
ctx
,
AV_LOG_INFO
,
"color_range:unknown"
);
}
else
{
av_log
(
ctx
,
AV_LOG_INFO
,
"color_range:%s"
,
color_range_str
);
}
if
(
!
colorspace_str
||
frame
->
colorspace
==
AVCOL_SPC_UNSPECIFIED
)
{
av_log
(
ctx
,
AV_LOG_INFO
,
" color_space:unknown"
);
}
else
{
av_log
(
ctx
,
AV_LOG_INFO
,
" color_space:%s"
,
colorspace_str
);
}
if
(
!
color_primaries_str
||
frame
->
color_primaries
==
AVCOL_PRI_UNSPECIFIED
)
{
av_log
(
ctx
,
AV_LOG_INFO
,
" color_primaries:unknown"
);
}
else
{
av_log
(
ctx
,
AV_LOG_INFO
,
" color_primaries:%s"
,
color_primaries_str
);
}
if
(
!
color_trc_str
||
frame
->
color_trc
==
AVCOL_TRC_UNSPECIFIED
)
{
av_log
(
ctx
,
AV_LOG_INFO
,
" color_trc:unknown"
);
}
else
{
av_log
(
ctx
,
AV_LOG_INFO
,
" color_trc:%s"
,
color_trc_str
);
}
av_log
(
ctx
,
AV_LOG_INFO
,
"
\n
"
);
}
static
void
update_sample_stats
(
const
uint8_t
*
src
,
int
len
,
int64_t
*
sum
,
int64_t
*
sum2
)
static
void
update_sample_stats
(
const
uint8_t
*
src
,
int
len
,
int64_t
*
sum
,
int64_t
*
sum2
)
{
{
int
i
;
int
i
;
...
@@ -200,6 +233,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
...
@@ -200,6 +233,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
av_log
(
ctx
,
AV_LOG_INFO
,
"
\n
"
);
av_log
(
ctx
,
AV_LOG_INFO
,
"
\n
"
);
}
}
dump_color_property
(
ctx
,
frame
);
return
ff_filter_frame
(
inlink
->
dst
->
outputs
[
0
],
frame
);
return
ff_filter_frame
(
inlink
->
dst
->
outputs
[
0
],
frame
);
}
}
...
...
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