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
28478438
Commit
28478438
authored
Nov 01, 2014
by
Kevin Mitchell
Committed by
Michael Niedermayer
Nov 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/idet: add metadata to "current" frame instead of "next" frame
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8d9277c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
version.h
libavfilter/version.h
+1
-1
vf_idet.c
libavfilter/vf_idet.c
+13
-11
No files found.
libavfilter/version.h
View file @
28478438
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 2
#define LIBAVFILTER_VERSION_MINOR 2
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_MICRO 10
1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_idet.c
View file @
28478438
...
@@ -82,6 +82,7 @@ static void filter(AVFilterContext *ctx)
...
@@ -82,6 +82,7 @@ static void filter(AVFilterContext *ctx)
int64_t
delta
=
0
;
int64_t
delta
=
0
;
Type
type
,
best_type
;
Type
type
,
best_type
;
int
match
=
0
;
int
match
=
0
;
AVDictionary
**
metadata
=
avpriv_frame_get_metadatap
(
idet
->
cur
);
for
(
i
=
0
;
i
<
idet
->
csp
->
nb_components
;
i
++
)
{
for
(
i
=
0
;
i
<
idet
->
csp
->
nb_components
;
i
++
)
{
int
w
=
idet
->
cur
->
width
;
int
w
=
idet
->
cur
->
width
;
...
@@ -147,14 +148,25 @@ static void filter(AVFilterContext *ctx)
...
@@ -147,14 +148,25 @@ static void filter(AVFilterContext *ctx)
idet
->
prestat
[
type
]
++
;
idet
->
prestat
[
type
]
++
;
idet
->
poststat
[
idet
->
last_type
]
++
;
idet
->
poststat
[
idet
->
last_type
]
++
;
av_log
(
ctx
,
AV_LOG_DEBUG
,
"Single frame:%s, Multi frame:%s
\n
"
,
type2str
(
type
),
type2str
(
idet
->
last_type
));
av_log
(
ctx
,
AV_LOG_DEBUG
,
"Single frame:%s, Multi frame:%s
\n
"
,
type2str
(
type
),
type2str
(
idet
->
last_type
));
av_dict_set_int
(
metadata
,
"lavfi.idet.single.tff"
,
idet
->
prestat
[
TFF
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.single.bff"
,
idet
->
prestat
[
BFF
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.single.progressive"
,
idet
->
prestat
[
PROGRESSIVE
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.single.undetermined"
,
idet
->
prestat
[
UNDETERMINED
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.multiple.tff"
,
idet
->
poststat
[
TFF
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.multiple.bff"
,
idet
->
poststat
[
BFF
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.multiple.progressive"
,
idet
->
poststat
[
PROGRESSIVE
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.multiple.undetermined"
,
idet
->
poststat
[
UNDETERMINED
],
0
);
}
}
static
int
filter_frame
(
AVFilterLink
*
link
,
AVFrame
*
picref
)
static
int
filter_frame
(
AVFilterLink
*
link
,
AVFrame
*
picref
)
{
{
AVFilterContext
*
ctx
=
link
->
dst
;
AVFilterContext
*
ctx
=
link
->
dst
;
IDETContext
*
idet
=
ctx
->
priv
;
IDETContext
*
idet
=
ctx
->
priv
;
AVDictionary
**
metadata
=
avpriv_frame_get_metadatap
(
picref
);
if
(
idet
->
prev
)
if
(
idet
->
prev
)
av_frame_free
(
&
idet
->
prev
);
av_frame_free
(
&
idet
->
prev
);
...
@@ -178,16 +190,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
...
@@ -178,16 +190,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
filter
(
ctx
);
filter
(
ctx
);
av_dict_set_int
(
metadata
,
"lavfi.idet.single.tff"
,
idet
->
prestat
[
TFF
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.single.bff"
,
idet
->
prestat
[
BFF
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.single.progressive"
,
idet
->
prestat
[
PROGRESSIVE
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.single.undetermined"
,
idet
->
prestat
[
UNDETERMINED
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.multiple.tff"
,
idet
->
poststat
[
TFF
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.multiple.bff"
,
idet
->
poststat
[
BFF
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.multiple.progressive"
,
idet
->
poststat
[
PROGRESSIVE
],
0
);
av_dict_set_int
(
metadata
,
"lavfi.idet.multiple.undetermined"
,
idet
->
poststat
[
UNDETERMINED
],
0
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
av_frame_clone
(
idet
->
cur
));
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
av_frame_clone
(
idet
->
cur
));
}
}
...
...
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