Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
032bbe05
Commit
032bbe05
authored
Apr 19, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
visual: reduce symbols count
parent
6c636f2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
43 deletions
+33
-43
modules/visualization/visual/effects.c
modules/visualization/visual/effects.c
+20
-10
modules/visualization/visual/visual.c
modules/visualization/visual/visual.c
+5
-20
modules/visualization/visual/visual.h
modules/visualization/visual/visual.h
+8
-13
No files found.
modules/visualization/visual/effects.c
View file @
032bbe05
...
@@ -48,8 +48,8 @@
...
@@ -48,8 +48,8 @@
/*****************************************************************************
/*****************************************************************************
* dummy_Run
* dummy_Run
*****************************************************************************/
*****************************************************************************/
int
dummy_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
static
int
dummy_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
{
{
VLC_UNUSED
(
p_effect
);
VLC_UNUSED
(
p_aout
);
VLC_UNUSED
(
p_buffer
);
VLC_UNUSED
(
p_effect
);
VLC_UNUSED
(
p_aout
);
VLC_UNUSED
(
p_buffer
);
VLC_UNUSED
(
p_picture
);
VLC_UNUSED
(
p_picture
);
...
@@ -59,8 +59,8 @@ int dummy_Run( visual_effect_t * p_effect, vlc_object_t *p_aout,
...
@@ -59,8 +59,8 @@ int dummy_Run( visual_effect_t * p_effect, vlc_object_t *p_aout,
/*****************************************************************************
/*****************************************************************************
* spectrum_Run: spectrum analyser
* spectrum_Run: spectrum analyser
*****************************************************************************/
*****************************************************************************/
int
spectrum_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
static
int
spectrum_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
{
{
spectrum_data
*
p_data
=
p_effect
->
p_data
;
spectrum_data
*
p_data
=
p_effect
->
p_data
;
float
p_output
[
FFT_BUFFER_SIZE
];
/* Raw FFT Result */
float
p_output
[
FFT_BUFFER_SIZE
];
/* Raw FFT Result */
...
@@ -336,8 +336,8 @@ int spectrum_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
...
@@ -336,8 +336,8 @@ int spectrum_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
/*****************************************************************************
/*****************************************************************************
* spectrometer_Run: derivative spectrum analysis
* spectrometer_Run: derivative spectrum analysis
*****************************************************************************/
*****************************************************************************/
int
spectrometer_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
static
int
spectrometer_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
{
{
#define Y(R,G,B) ((uint8_t)( (R * .299) + (G * .587) + (B * .114) ))
#define Y(R,G,B) ((uint8_t)( (R * .299) + (G * .587) + (B * .114) ))
#define U(R,G,B) ((uint8_t)( (R * -.169) + (G * -.332) + (B * .500) + 128 ))
#define U(R,G,B) ((uint8_t)( (R * -.169) + (G * -.332) + (B * .500) + 128 ))
...
@@ -793,8 +793,8 @@ int spectrometer_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
...
@@ -793,8 +793,8 @@ int spectrometer_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
/*****************************************************************************
/*****************************************************************************
* scope_Run: scope effect
* scope_Run: scope effect
*****************************************************************************/
*****************************************************************************/
int
scope_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
static
int
scope_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
{
{
VLC_UNUSED
(
p_aout
);
VLC_UNUSED
(
p_aout
);
...
@@ -850,8 +850,8 @@ int scope_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
...
@@ -850,8 +850,8 @@ int scope_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
/*****************************************************************************
/*****************************************************************************
* vuMeter_Run: vu meter effect
* vuMeter_Run: vu meter effect
*****************************************************************************/
*****************************************************************************/
int
vuMeter_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
static
int
vuMeter_Run
(
visual_effect_t
*
p_effect
,
vlc_object_t
*
p_aout
,
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
const
block_t
*
p_buffer
,
picture_t
*
p_picture
)
{
{
VLC_UNUSED
(
p_aout
);
VLC_UNUSED
(
p_aout
);
float
i_value_l
=
0
;
float
i_value_l
=
0
;
...
@@ -985,3 +985,13 @@ int vuMeter_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
...
@@ -985,3 +985,13 @@ int vuMeter_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
return
0
;
return
0
;
}
}
/* Table of effects */
const
struct
visual_cb_t
effectv
[]
=
{
{
"scope"
,
scope_Run
},
{
"vuMeter"
,
vuMeter_Run
},
{
"spectrum"
,
spectrum_Run
},
{
"spectrometer"
,
spectrometer_Run
},
{
"dummy"
,
dummy_Run
},
};
const
unsigned
effectc
=
sizeof
(
effectv
)
/
sizeof
(
effectv
[
0
]);
modules/visualization/visual/visual.c
View file @
032bbe05
...
@@ -156,20 +156,6 @@ vlc_module_end ()
...
@@ -156,20 +156,6 @@ vlc_module_end ()
* Local prototypes
* Local prototypes
*****************************************************************************/
*****************************************************************************/
static
block_t
*
DoWork
(
filter_t
*
,
block_t
*
);
static
block_t
*
DoWork
(
filter_t
*
,
block_t
*
);
static
const
struct
{
const
char
*
psz_name
;
int
(
*
pf_run
)(
visual_effect_t
*
,
vlc_object_t
*
,
const
block_t
*
,
picture_t
*
);
}
pf_effect_run
[]
=
{
{
"scope"
,
scope_Run
},
{
"vuMeter"
,
vuMeter_Run
},
{
"spectrum"
,
spectrum_Run
},
{
"spectrometer"
,
spectrometer_Run
},
{
"dummy"
,
dummy_Run
},
{
NULL
,
dummy_Run
}
};
struct
filter_sys_t
struct
filter_sys_t
{
{
...
@@ -227,14 +213,13 @@ static int Open( vlc_object_t *p_this )
...
@@ -227,14 +213,13 @@ static int Open( vlc_object_t *p_this )
p_effect
->
pf_run
=
NULL
;
p_effect
->
pf_run
=
NULL
;
p_effect
->
psz_name
=
NULL
;
p_effect
->
psz_name
=
NULL
;
for
(
int
i
=
0
;
pf_effect_run
[
i
].
psz_name
!=
NULL
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
effectc
;
i
++
)
{
{
if
(
!
strncasecmp
(
psz_parser
,
if
(
!
strncasecmp
(
psz_parser
,
effectv
[
i
].
name
,
pf_effect_run
[
i
].
psz_name
,
strlen
(
effectv
[
i
].
name
)
)
)
strlen
(
pf_effect_run
[
i
].
psz_name
)
)
)
{
{
p_effect
->
pf_run
=
pf_effect_run
[
i
].
pf_run
;
p_effect
->
pf_run
=
effectv
[
i
].
run_cb
;
p_effect
->
psz_name
=
pf_effect_run
[
i
].
psz_
name
;
p_effect
->
psz_name
=
effectv
[
i
].
name
;
break
;
break
;
}
}
}
}
...
...
modules/visualization/visual/visual.h
View file @
032bbe05
...
@@ -54,16 +54,11 @@ typedef struct
...
@@ -54,16 +54,11 @@ typedef struct
int16_t
*
p_prev_s16_buff
;
int16_t
*
p_prev_s16_buff
;
}
spectrometer_data
;
}
spectrometer_data
;
/* Prototypes */
typedef
int
(
*
visual_run_t
)(
visual_effect_t
*
,
vlc_object_t
*
,
int
scope_Run
const
block_t
*
,
picture_t
*
);
(
visual_effect_t
*
,
vlc_object_t
*
,
const
block_t
*
,
picture_t
*
);
extern
const
struct
visual_cb_t
int
vuMeter_Run
{
(
visual_effect_t
*
,
vlc_object_t
*
,
const
block_t
*
,
picture_t
*
);
char
name
[
16
];
int
dummy_Run
visual_run_t
run_cb
;
(
visual_effect_t
*
,
vlc_object_t
*
,
const
block_t
*
,
picture_t
*
);
}
effectv
[];
int
random_Run
extern
const
unsigned
effectc
;
(
visual_effect_t
*
,
vlc_object_t
*
,
const
block_t
*
,
picture_t
*
);
int
spectrum_Run
(
visual_effect_t
*
,
vlc_object_t
*
,
const
block_t
*
,
picture_t
*
);
int
spectrometer_Run
(
visual_effect_t
*
,
vlc_object_t
*
,
const
block_t
*
,
picture_t
*
);
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