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
c303d097
Commit
c303d097
authored
Oct 07, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_normalize: typedef all structs
parent
651a0f63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
vf_normalize.c
libavfilter/vf_normalize.c
+13
-9
No files found.
libavfilter/vf_normalize.c
View file @
c303d097
...
@@ -81,6 +81,17 @@
...
@@ -81,6 +81,17 @@
#include "internal.h"
#include "internal.h"
#include "video.h"
#include "video.h"
typedef
struct
NormalizeHistory
{
uint8_t
*
history
;
// History entries.
uint32_t
history_sum
;
// Sum of history entries.
}
NormalizeHistory
;
typedef
struct
NormalizeLocal
{
uint8_t
in
;
// Original input byte value for this frame.
float
smoothed
;
// Smoothed input value [0,255].
float
out
;
// Output value [0,255]
}
NormalizeLocal
;
typedef
struct
NormalizeContext
{
typedef
struct
NormalizeContext
{
const
AVClass
*
class
;
const
AVClass
*
class
;
...
@@ -98,10 +109,7 @@ typedef struct NormalizeContext {
...
@@ -98,10 +109,7 @@ typedef struct NormalizeContext {
int
frame_num
;
// Increments on each frame, starting from 0.
int
frame_num
;
// Increments on each frame, starting from 0.
// Per-extremum, per-channel history, for temporal smoothing.
// Per-extremum, per-channel history, for temporal smoothing.
struct
{
NormalizeHistory
min
[
3
],
max
[
3
];
// Min and max for each channel in {R,G,B}.
uint8_t
*
history
;
// History entries.
uint32_t
history_sum
;
// Sum of history entries.
}
min
[
3
],
max
[
3
];
// Min and max for each channel in {R,G,B}.
uint8_t
*
history_mem
;
// Single allocation for above history entries
uint8_t
*
history_mem
;
// Single allocation for above history entries
}
NormalizeContext
;
}
NormalizeContext
;
...
@@ -126,11 +134,7 @@ AVFILTER_DEFINE_CLASS(normalize);
...
@@ -126,11 +134,7 @@ AVFILTER_DEFINE_CLASS(normalize);
static
void
normalize
(
NormalizeContext
*
s
,
AVFrame
*
in
,
AVFrame
*
out
)
static
void
normalize
(
NormalizeContext
*
s
,
AVFrame
*
in
,
AVFrame
*
out
)
{
{
// Per-extremum, per-channel local variables.
// Per-extremum, per-channel local variables.
struct
{
NormalizeLocal
min
[
3
],
max
[
3
];
// Min and max for each channel in {R,G,B}.
uint8_t
in
;
// Original input byte value for this frame.
float
smoothed
;
// Smoothed input value [0,255].
float
out
;
// Output value [0,255].
}
min
[
3
],
max
[
3
];
// Min and max for each channel in {R,G,B}.
float
rgb_min_smoothed
;
// Min input range for linked normalization
float
rgb_min_smoothed
;
// Min input range for linked normalization
float
rgb_max_smoothed
;
// Max input range for linked normalization
float
rgb_max_smoothed
;
// Max input range for linked normalization
...
...
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