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
90cd0205
Commit
90cd0205
authored
Jan 07, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/deshake: use FF_CEIL_RSHIFT()
parent
84a967df
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
vf_deshake.c
libavfilter/vf_deshake.c
+5
-5
No files found.
libavfilter/vf_deshake.c
View file @
90cd0205
...
...
@@ -62,9 +62,6 @@
#include "deshake.h"
#include "deshake_opencl.h"
#define CHROMA_WIDTH(link) (-((-(link)->w) >> av_pix_fmt_desc_get((link)->format)->log2_chroma_w))
#define CHROMA_HEIGHT(link) (-((-(link)->h) >> av_pix_fmt_desc_get((link)->format)->log2_chroma_h))
#define OFFSET(x) offsetof(DeshakeContext, x)
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
...
...
@@ -439,6 +436,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
float
alpha
=
2
.
0
/
deshake
->
refcount
;
char
tmp
[
256
];
int
ret
=
0
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
link
->
format
);
const
int
chroma_width
=
FF_CEIL_RSHIFT
(
link
->
w
,
desc
->
log2_chroma_w
);
const
int
chroma_height
=
FF_CEIL_RSHIFT
(
link
->
h
,
desc
->
log2_chroma_h
);
out
=
ff_get_video_buffer
(
outlink
,
outlink
->
w
,
outlink
->
h
);
if
(
!
out
)
{
...
...
@@ -527,9 +527,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
// Generate a luma transformation matrix
avfilter_get_matrix
(
t
.
vec
.
x
,
t
.
vec
.
y
,
t
.
angle
,
1
.
0
+
t
.
zoom
/
100
.
0
,
matrix_y
);
// Generate a chroma transformation matrix
avfilter_get_matrix
(
t
.
vec
.
x
/
(
link
->
w
/
CHROMA_WIDTH
(
link
)),
t
.
vec
.
y
/
(
link
->
h
/
CHROMA_HEIGHT
(
link
)
),
t
.
angle
,
1
.
0
+
t
.
zoom
/
100
.
0
,
matrix_uv
);
avfilter_get_matrix
(
t
.
vec
.
x
/
(
link
->
w
/
chroma_width
),
t
.
vec
.
y
/
(
link
->
h
/
chroma_height
),
t
.
angle
,
1
.
0
+
t
.
zoom
/
100
.
0
,
matrix_uv
);
// Transform the luma and chroma planes
ret
=
deshake
->
transform
(
link
->
dst
,
link
->
w
,
link
->
h
,
CHROMA_WIDTH
(
link
),
CHROMA_HEIGHT
(
link
)
,
ret
=
deshake
->
transform
(
link
->
dst
,
link
->
w
,
link
->
h
,
chroma_width
,
chroma_height
,
matrix_y
,
matrix_uv
,
INTERPOLATE_BILINEAR
,
deshake
->
edge
,
in
,
out
);
// Cleanup the old reference frame
...
...
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