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
de23953d
Commit
de23953d
authored
Oct 09, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/select: store scene score in buf ref metadata.
parent
6fb2fd89
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
version.h
libavfilter/version.h
+1
-1
vf_select.c
libavfilter/vf_select.c
+6
-1
filter.mak
tests/fate/filter.mak
+10
-0
filter-metadata-scenedetect
tests/ref/fate/filter-metadata-scenedetect
+11
-0
No files found.
libavfilter/version.h
View file @
de23953d
...
...
@@ -30,7 +30,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 20
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_select.c
View file @
de23953d
...
...
@@ -241,8 +241,13 @@ static int select_frame(AVFilterContext *ctx, AVFilterBufferRef *picref)
AVFilterLink
*
inlink
=
ctx
->
inputs
[
0
];
double
res
;
if
(
CONFIG_AVCODEC
&&
select
->
do_scene_detect
)
if
(
CONFIG_AVCODEC
&&
select
->
do_scene_detect
)
{
char
buf
[
32
];
select
->
var_values
[
VAR_SCENE
]
=
get_scene_score
(
ctx
,
picref
);
// TODO: document metadata
snprintf
(
buf
,
sizeof
(
buf
),
"%f"
,
select
->
var_values
[
VAR_SCENE
]);
av_dict_set
(
&
picref
->
metadata
,
"lavfi.scene_score"
,
buf
,
0
);
}
if
(
isnan
(
select
->
var_values
[
VAR_START_PTS
]))
select
->
var_values
[
VAR_START_PTS
]
=
TS2D
(
picref
->
pts
);
if
(
isnan
(
select
->
var_values
[
VAR_START_T
]))
...
...
tests/fate/filter.mak
View file @
de23953d
...
...
@@ -44,5 +44,15 @@ fate-filter-yadif-mode1: CMD = framecrc -flags bitexact -idct simple -i $(SAMPLE
FATE_FILTER-$(CONFIG_YADIF_FILTER) += $(FATE_YADIF)
#
# Metadata tests
#
FILTER_METADATA_COMMAND = ffprobe$(EXESUF) -show_frames -of compact=nk=1:p=0 -bitexact -f lavfi
FATE_FILTER-$(call ALLYES, FFPROBE LAVFI_INDEV MOVIE_FILTER SELECT_FILTER AVCODEC MOV_DEMUXER SVQ3_DECODER ZLIB) += fate-filter-metadata-scenedetect
fate-filter-metadata-scenedetect: SRC = $(SAMPLES)/svq3/Vertical400kbit.sorenson3.mov
fate-filter-metadata-scenedetect: CMD = run $(FILTER_METADATA_COMMAND) "movie=$(SRC),select=gt(scene\,.4)"
FATE_SAMPLES_AVCONV += $(FATE_FILTER-yes)
fate-filter: $(FATE_FILTER-yes)
tests/ref/fate/filter-metadata-scenedetect
0 → 100644
View file @
de23953d
video|1|20|0.033333|20|0.033333|1|0.001667|29927|320|240|rgb24|1:1|I|0|0|0|0|0|0|1.000000
video|1|1640|2.733333|1640|2.733333|1|0.001667|164269|320|240|rgb24|1:1|I|0|0|0|0|0|0|1.000000
video|1|4160|6.933333|4160|6.933333|1|0.001667|808833|320|240|rgb24|1:1|I|0|0|0|0|0|0|0.870000
video|1|5820|9.700000|5820|9.700000|1|0.001667|933313|320|240|rgb24|1:1|I|0|0|0|0|0|0|1.000000
video|1|6740|11.233333|6740|11.233333|1|0.001667|1040437|320|240|rgb24|1:1|I|0|0|0|0|0|0|0.460000
video|1|8180|13.633333|8180|13.633333|1|0.001667|1248589|320|240|rgb24|1:1|I|0|0|0|0|0|0|1.000000
video|1|9780|16.300000|9780|16.300000|1|0.001667|1348821|320|240|rgb24|1:1|I|0|0|0|0|0|0|1.000000
video|1|14100|23.500000|14100|23.500000|1|0.001667|2006431|320|240|rgb24|1:1|I|0|0|0|0|0|0|0.850000
video|1|15720|26.200000|15720|26.200000|1|0.001667|2151283|320|240|rgb24|1:1|I|0|0|0|0|0|0|1.000000
video|1|18520|30.866667|18520|30.866667|1|0.001667|2515017|320|240|rgb24|1:1|I|0|0|0|0|0|0|0.470000
video|1|21780|36.300000|21780|36.300000|1|0.001667|2933379|320|240|rgb24|1:1|I|0|0|0|0|0|0|1.000000
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