Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
GSoC
GSoC2018
macOS
vlc
Commits
de5e7b5f
Commit
de5e7b5f
authored
Dec 17, 2018
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i420_rgb: expand constant parameter
parent
0fb3aaef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
modules/video_chroma/Makefile.am
modules/video_chroma/Makefile.am
+0
-1
modules/video_chroma/i420_rgb.c
modules/video_chroma/i420_rgb.c
+3
-9
No files found.
modules/video_chroma/Makefile.am
View file @
de5e7b5f
...
...
@@ -19,7 +19,6 @@ libgrey_yuv_plugin_la_SOURCES = video_chroma/grey_yuv.c
libi420_rgb_plugin_la_SOURCES
=
video_chroma/i420_rgb.c video_chroma/i420_rgb.h
\
video_chroma/i420_rgb8.c video_chroma/i420_rgb16.c video_chroma/i420_rgb_c.h
libi420_rgb_plugin_la_LIBADD
=
$(LIBM)
libi420_yuy2_plugin_la_SOURCES
=
video_chroma/i420_yuy2.c video_chroma/i420_yuy2.h
libi420_yuy2_plugin_la_CPPFLAGS
=
$(AM_CPPFLAGS)
\
...
...
modules/video_chroma/i420_rgb.c
View file @
de5e7b5f
...
...
@@ -30,8 +30,6 @@
# include "config.h"
#endif
#include <math.h>
/* exp(), pow() */
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
...
...
@@ -45,7 +43,6 @@ static picture_t *I420_RGB8_Filter( filter_t *, picture_t * );
static
picture_t
*
I420_RGB16_Filter
(
filter_t
*
,
picture_t
*
);
static
picture_t
*
I420_RGB32_Filter
(
filter_t
*
,
picture_t
*
);
static
void
SetGammaTable
(
int
*
pi_table
,
double
f_gamma
);
static
void
SetYUV
(
filter_t
*
,
const
video_format_t
*
);
static
void
Set8bppPalette
(
filter_t
*
,
uint8_t
*
);
#else
...
...
@@ -314,17 +311,14 @@ VIDEO_FILTER_WRAPPER( I420_RGB32 )
*****************************************************************************
* pi_table is a table of 256 entries from 0 to 255.
*****************************************************************************/
static
void
SetGammaTable
(
int
*
pi_table
,
double
f_gamma
)
static
void
SetGammaTable
(
int
*
pi_table
)
{
int
i_y
;
/* base intensity */
/* Use exp(gamma) instead of gamma */
f_gamma
=
exp
(
f_gamma
);
/* Build gamma table */
for
(
i_y
=
0
;
i_y
<
256
;
i_y
++
)
{
pi_table
[
i_y
]
=
(
int
)(
pow
(
(
double
)
i_y
/
256
,
f_gamma
)
*
256
)
;
pi_table
[
i_y
]
=
i_y
;
}
}
...
...
@@ -341,7 +335,7 @@ static void SetYUV( filter_t *p_filter, const video_format_t *vfmt )
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
/* Build gamma table */
SetGammaTable
(
pi_gamma
,
0
);
//p_filter/*FIXME wasn't used anywhere anyway*/->f_gamma
);
SetGammaTable
(
pi_gamma
);
/*
* Set pointers and build YUV tables
...
...
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