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
ed7bc547
Commit
ed7bc547
authored
May 16, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vignette: add direct rendering.
parent
8a0ba44e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
vf_vignette.c
libavfilter/vf_vignette.c
+8
-2
No files found.
libavfilter/vf_vignette.c
View file @
ed7bc547
...
...
@@ -197,18 +197,23 @@ static inline double get_dither_value(VignetteContext *s)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFrame
*
in
)
{
unsigned
x
,
y
;
unsigned
x
,
y
,
direct
=
0
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
VignetteContext
*
s
=
ctx
->
priv
;
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
AVFrame
*
out
;
if
(
av_frame_is_writable
(
in
))
{
direct
=
1
;
out
=
in
;
}
else
{
out
=
ff_get_video_buffer
(
outlink
,
outlink
->
w
,
outlink
->
h
);
if
(
!
out
)
{
av_frame_free
(
&
in
);
return
AVERROR
(
ENOMEM
);
}
av_frame_copy_props
(
out
,
in
);
}
if
(
s
->
eval_mode
==
EVAL_MODE_FRAME
)
update_context
(
s
,
inlink
,
in
);
...
...
@@ -268,7 +273,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
}
av_frame_free
(
&
in
);
if
(
!
direct
)
av_frame_free
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
}
...
...
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