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
d4005e22
Commit
d4005e22
authored
Oct 04, 2011
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deshake: misc style fixes.
parent
b0f270fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
vf_deshake.c
libavfilter/vf_deshake.c
+7
-7
No files found.
libavfilter/vf_deshake.c
View file @
d4005e22
...
...
@@ -251,7 +251,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
int
contrast
;
int
pos
;
double
*
angles
=
av_malloc
(
sizeof
(
double
)
*
width
*
height
/
(
16
*
deshake
->
blocksize
));
double
*
angles
=
av_malloc
(
sizeof
(
*
angles
)
*
width
*
height
/
(
16
*
deshake
->
blocksize
));
double
totalangles
=
0
;
int
center_x
=
0
,
center_y
=
0
;
...
...
@@ -333,7 +333,7 @@ static void find_motion(DeshakeContext *deshake, uint8_t *src1, uint8_t *src2,
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
,
void
*
opaque
)
{
DeshakeContext
*
deshake
=
ctx
->
priv
;
char
filename
[
256
]
=
{
0
};
char
filename
[
256
]
=
{
0
};
deshake
->
rx
=
16
;
deshake
->
ry
=
16
;
...
...
@@ -356,9 +356,9 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
deshake
->
contrast
=
av_clip
(
deshake
->
contrast
,
1
,
255
);
deshake
->
search
=
av_clip
(
deshake
->
search
,
EXHAUSTIVE
,
SEARCH_COUNT
-
1
);
}
if
(
strlen
(
filename
))
if
(
strlen
(
filename
))
deshake
->
fp
=
fopen
(
filename
,
"w"
);
if
(
deshake
->
fp
)
if
(
deshake
->
fp
)
fwrite
(
"Ori x, Avg x, Fin x, Ori y, Avg y, Fin y, Ori angle, Avg angle, Fin angle, Ori zoom, Avg zoom, Fin zoom
\n
"
,
sizeof
(
char
),
104
,
deshake
->
fp
);
av_log
(
ctx
,
AV_LOG_INFO
,
"rx: %d, ry: %d, edge: %d blocksize: %d contrast: %d search: %d
\n
"
,
...
...
@@ -390,7 +390,7 @@ static int config_props(AVFilterLink *link)
deshake
->
last
.
angle
=
0
;
deshake
->
last
.
zoom
=
0
;
deshake
->
avctx
=
avcodec_alloc_context3
(
NULL
);
deshake
->
avctx
=
avcodec_alloc_context3
(
NULL
);
dsputil_init
(
&
deshake
->
c
,
deshake
->
avctx
);
return
0
;
...
...
@@ -401,7 +401,7 @@ static av_cold void uninit(AVFilterContext *ctx)
DeshakeContext
*
deshake
=
ctx
->
priv
;
avfilter_unref_buffer
(
deshake
->
ref
);
if
(
deshake
->
fp
)
if
(
deshake
->
fp
)
fclose
(
deshake
->
fp
);
}
...
...
@@ -444,7 +444,7 @@ static void end_frame(AVFilterLink *link)
t
.
angle
*=
-
1
;
// Write statistics to file
if
(
deshake
->
fp
)
{
if
(
deshake
->
fp
)
{
snprintf
(
tmp
,
256
,
"%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f
\n
"
,
orig
.
vector
.
x
,
deshake
->
avg
.
vector
.
x
,
t
.
vector
.
x
,
orig
.
vector
.
y
,
deshake
->
avg
.
vector
.
y
,
t
.
vector
.
y
,
orig
.
angle
,
deshake
->
avg
.
angle
,
t
.
angle
,
orig
.
zoom
,
deshake
->
avg
.
zoom
,
t
.
zoom
);
fwrite
(
tmp
,
sizeof
(
char
),
strlen
(
tmp
),
deshake
->
fp
);
}
...
...
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