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
62a31aec
Commit
62a31aec
authored
Jul 24, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/curves: pass log ctx as void* instead of AVFilterContext*
parent
39c6d4a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vf_curves.c
libavfilter/vf_curves.c
+4
-4
No files found.
libavfilter/vf_curves.c
View file @
62a31aec
...
@@ -211,7 +211,7 @@ static int get_nb_points(const struct keypoint *d)
...
@@ -211,7 +211,7 @@ static int get_nb_points(const struct keypoint *d)
#define CLIP(v) (nbits == 8 ? av_clip_uint8(v) : av_clip_uint16(v))
#define CLIP(v) (nbits == 8 ? av_clip_uint8(v) : av_clip_uint16(v))
static
inline
int
interpolate
(
AVFilterContext
*
ctx
,
uint16_t
*
y
,
static
inline
int
interpolate
(
void
*
log_
ctx
,
uint16_t
*
y
,
const
struct
keypoint
*
points
,
int
nbits
)
const
struct
keypoint
*
points
,
int
nbits
)
{
{
int
i
,
ret
=
0
;
int
i
,
ret
=
0
;
...
@@ -315,7 +315,7 @@ static inline int interpolate(AVFilterContext *ctx, uint16_t *y,
...
@@ -315,7 +315,7 @@ static inline int interpolate(AVFilterContext *ctx, uint16_t *y,
const
double
xx
=
(
x
-
x_start
)
*
1
.
/
scale
;
const
double
xx
=
(
x
-
x_start
)
*
1
.
/
scale
;
const
double
yy
=
a
+
b
*
xx
+
c
*
xx
*
xx
+
d
*
xx
*
xx
*
xx
;
const
double
yy
=
a
+
b
*
xx
+
c
*
xx
*
xx
+
d
*
xx
*
xx
*
xx
;
y
[
x
]
=
CLIP
(
yy
*
scale
);
y
[
x
]
=
CLIP
(
yy
*
scale
);
av_log
(
ctx
,
AV_LOG_DEBUG
,
"f(%f)=%f -> y[%d]=%d
\n
"
,
xx
,
yy
,
x
,
y
[
x
]);
av_log
(
log_
ctx
,
AV_LOG_DEBUG
,
"f(%f)=%f -> y[%d]=%d
\n
"
,
xx
,
yy
,
x
,
y
[
x
]);
}
}
point
=
point
->
next
;
point
=
point
->
next
;
...
@@ -334,10 +334,10 @@ end:
...
@@ -334,10 +334,10 @@ end:
}
}
#define DECLARE_INTERPOLATE_FUNC(nbits) \
#define DECLARE_INTERPOLATE_FUNC(nbits) \
static const int interpolate##nbits(
AVFilterContext *ctx, uint16_t *y,
\
static const int interpolate##nbits(
void *log_ctx, uint16_t *y,
\
const struct keypoint *points) \
const struct keypoint *points) \
{ \
{ \
return interpolate(
ctx, y, points, nbits);
\
return interpolate(
log_ctx, y, points, nbits);
\
}
}
DECLARE_INTERPOLATE_FUNC
(
8
)
DECLARE_INTERPOLATE_FUNC
(
8
)
...
...
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