Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
250b122e
Commit
250b122e
authored
Nov 28, 2012
by
Anton Khirnov
Committed by
Michael Niedermayer
Nov 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_boxblur: switch to filter_frame, boxblur did not support slices
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
05945c7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
vf_boxblur.c
libavfilter/vf_boxblur.c
+21
-17
No files found.
libavfilter/vf_boxblur.c
View file @
250b122e
...
@@ -302,34 +302,39 @@ static void vblur(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_li
...
@@ -302,34 +302,39 @@ static void vblur(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_li
h
,
radius
,
power
,
temp
);
h
,
radius
,
power
,
temp
);
}
}
static
int
null_draw_slice
(
AVFilterLink
*
inlink
,
int
y
,
int
h
,
int
slice_dir
)
{
return
0
;
}
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
in
)
static
int
end_frame
(
AVFilterLink
*
inlink
)
{
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
BoxBlurContext
*
boxblur
=
ctx
->
priv
;
BoxBlurContext
*
boxblur
=
ctx
->
priv
;
AVFilterLink
*
outlink
=
inlink
->
dst
->
outputs
[
0
];
AVFilterLink
*
outlink
=
inlink
->
dst
->
outputs
[
0
];
AVFilterBufferRef
*
inpicref
=
inlink
->
cur_buf
;
AVFilterBufferRef
*
out
;
AVFilterBufferRef
*
outpicref
=
outlink
->
out_buf
;
int
plane
;
int
plane
;
int
cw
=
inlink
->
w
>>
boxblur
->
hsub
,
ch
=
in
link
->
h
>>
boxblur
->
vsub
;
int
cw
=
inlink
->
w
>>
boxblur
->
hsub
,
ch
=
in
->
video
->
h
>>
boxblur
->
vsub
;
int
w
[
4
]
=
{
inlink
->
w
,
cw
,
cw
,
inlink
->
w
};
int
w
[
4
]
=
{
inlink
->
w
,
cw
,
cw
,
inlink
->
w
};
int
h
[
4
]
=
{
in
link
->
h
,
ch
,
ch
,
inlink
->
h
};
int
h
[
4
]
=
{
in
->
video
->
h
,
ch
,
ch
,
in
->
video
->
h
};
for
(
plane
=
0
;
inpicref
->
data
[
plane
]
&&
plane
<
4
;
plane
++
)
out
=
ff_get_video_buffer
(
outlink
,
AV_PERM_WRITE
,
outlink
->
w
,
outlink
->
h
);
hblur
(
outpicref
->
data
[
plane
],
outpicref
->
linesize
[
plane
],
if
(
!
out
)
{
inpicref
->
data
[
plane
],
inpicref
->
linesize
[
plane
],
avfilter_unref_bufferp
(
&
in
);
return
AVERROR
(
ENOMEM
);
}
avfilter_copy_buffer_ref_props
(
out
,
in
);
for
(
plane
=
0
;
in
->
data
[
plane
]
&&
plane
<
4
;
plane
++
)
hblur
(
out
->
data
[
plane
],
out
->
linesize
[
plane
],
in
->
data
[
plane
],
in
->
linesize
[
plane
],
w
[
plane
],
h
[
plane
],
boxblur
->
radius
[
plane
],
boxblur
->
power
[
plane
],
w
[
plane
],
h
[
plane
],
boxblur
->
radius
[
plane
],
boxblur
->
power
[
plane
],
boxblur
->
temp
);
boxblur
->
temp
);
for
(
plane
=
0
;
in
picref
->
data
[
plane
]
&&
plane
<
4
;
plane
++
)
for
(
plane
=
0
;
in
->
data
[
plane
]
&&
plane
<
4
;
plane
++
)
vblur
(
out
picref
->
data
[
plane
],
outpicref
->
linesize
[
plane
],
vblur
(
out
->
data
[
plane
],
out
->
linesize
[
plane
],
out
picref
->
data
[
plane
],
outpicref
->
linesize
[
plane
],
out
->
data
[
plane
],
out
->
linesize
[
plane
],
w
[
plane
],
h
[
plane
],
boxblur
->
radius
[
plane
],
boxblur
->
power
[
plane
],
w
[
plane
],
h
[
plane
],
boxblur
->
radius
[
plane
],
boxblur
->
power
[
plane
],
boxblur
->
temp
);
boxblur
->
temp
);
ff_draw_slice
(
outlink
,
0
,
inlink
->
h
,
1
);
avfilter_unref_bufferp
(
&
in
);
return
ff_end_frame
(
outlink
);
return
ff_filter_frame
(
outlink
,
out
);
}
}
static
const
AVFilterPad
avfilter_vf_boxblur_inputs
[]
=
{
static
const
AVFilterPad
avfilter_vf_boxblur_inputs
[]
=
{
...
@@ -337,8 +342,7 @@ static const AVFilterPad avfilter_vf_boxblur_inputs[] = {
...
@@ -337,8 +342,7 @@ static const AVFilterPad avfilter_vf_boxblur_inputs[] = {
.
name
=
"default"
,
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
config_props
=
config_input
,
.
config_props
=
config_input
,
.
draw_slice
=
null_draw_slice
,
.
filter_frame
=
filter_frame
,
.
end_frame
=
end_frame
,
.
min_perms
=
AV_PERM_READ
.
min_perms
=
AV_PERM_READ
},
},
{
NULL
}
{
NULL
}
...
...
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