Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
0aa71424
Commit
0aa71424
authored
Feb 21, 2022
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_dblur: add float formats support
parent
6a9cb5a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
vf_dblur.c
libavfilter/vf_dblur.c
+21
-2
No files found.
libavfilter/vf_dblur.c
View file @
0aa71424
...
...
@@ -131,6 +131,7 @@ static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_GBRP12
,
AV_PIX_FMT_GBRP14
,
AV_PIX_FMT_GBRP16
,
AV_PIX_FMT_GBRAP
,
AV_PIX_FMT_GBRAP10
,
AV_PIX_FMT_GBRAP12
,
AV_PIX_FMT_GBRAP16
,
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_GRAY9
,
AV_PIX_FMT_GRAY10
,
AV_PIX_FMT_GRAY12
,
AV_PIX_FMT_GRAY14
,
AV_PIX_FMT_GRAY16
,
AV_PIX_FMT_GRAYF32
,
AV_PIX_FMT_GBRPF32
,
AV_PIX_FMT_GBRAPF32
,
AV_PIX_FMT_NONE
};
...
...
@@ -214,8 +215,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
float
*
bptr
=
s
->
buffer
;
const
uint8_t
*
src
=
in
->
data
[
plane
];
const
uint16_t
*
src16
=
(
const
uint16_t
*
)
in
->
data
[
plane
];
const
float
*
src32
=
(
const
float
*
)
in
->
data
[
plane
];
uint8_t
*
dst
=
out
->
data
[
plane
];
uint16_t
*
dst16
=
(
uint16_t
*
)
out
->
data
[
plane
];
float
*
dst32
=
(
float
*
)
out
->
data
[
plane
];
int
y
,
x
;
if
(
!
(
s
->
planes
&
(
1
<<
plane
)))
{
...
...
@@ -234,7 +237,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
bptr
+=
width
;
src
+=
in
->
linesize
[
plane
];
}
}
else
{
}
else
if
(
s
->
depth
<=
16
)
{
for
(
y
=
0
;
y
<
height
;
y
++
)
{
for
(
x
=
0
;
x
<
width
;
x
++
)
{
bptr
[
x
]
=
src16
[
x
];
...
...
@@ -242,6 +245,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
bptr
+=
width
;
src16
+=
in
->
linesize
[
plane
]
/
2
;
}
}
else
{
for
(
y
=
0
;
y
<
height
;
y
++
)
{
for
(
x
=
0
;
x
<
width
;
x
++
)
{
memcpy
(
bptr
,
src32
,
width
*
sizeof
(
float
));
}
bptr
+=
width
;
src32
+=
in
->
linesize
[
plane
]
/
4
;
}
}
diriir2d
(
ctx
,
plane
);
...
...
@@ -255,7 +266,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
bptr
+=
width
;
dst
+=
out
->
linesize
[
plane
];
}
}
else
{
}
else
if
(
s
->
depth
<=
16
)
{
for
(
y
=
0
;
y
<
height
;
y
++
)
{
for
(
x
=
0
;
x
<
width
;
x
++
)
{
dst16
[
x
]
=
av_clip_uintp2_c
(
lrintf
(
bptr
[
x
]),
s
->
depth
);
...
...
@@ -263,6 +274,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
bptr
+=
width
;
dst16
+=
out
->
linesize
[
plane
]
/
2
;
}
}
else
{
for
(
y
=
0
;
y
<
height
;
y
++
)
{
for
(
x
=
0
;
x
<
width
;
x
++
)
{
memcpy
(
dst32
,
bptr
,
width
*
sizeof
(
float
));
}
bptr
+=
width
;
dst32
+=
out
->
linesize
[
plane
]
/
4
;
}
}
}
...
...
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