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
109db265
Commit
109db265
authored
Dec 17, 2018
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i420_rgb: recompute shifts from masks
parent
8356890a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
modules/video_chroma/i420_rgb.c
modules/video_chroma/i420_rgb.c
+9
-3
No files found.
modules/video_chroma/i420_rgb.c
View file @
109db265
...
@@ -58,9 +58,9 @@ static picture_t *I420_A8B8G8R8_Filter( filter_t *, picture_t * );
...
@@ -58,9 +58,9 @@ static picture_t *I420_A8B8G8R8_Filter( filter_t *, picture_t * );
* RGB2PIXEL: assemble RGB components to a pixel value, returns a uint32_t
* RGB2PIXEL: assemble RGB components to a pixel value, returns a uint32_t
*****************************************************************************/
*****************************************************************************/
#define RGB2PIXEL( p_filter, i_r, i_g, i_b ) \
#define RGB2PIXEL( p_filter, i_r, i_g, i_b ) \
((((i_r) >>
vfmt->i_rrshift) << vfmt->
i_lrshift) \
((((i_r) >>
i_rrshift) <<
i_lrshift) \
| (((i_g) >>
vfmt->i_rgshift) << vfmt->
i_lgshift) \
| (((i_g) >>
i_rgshift) <<
i_lgshift) \
| (((i_b) >>
vfmt->i_rbshift) << vfmt->
i_lbshift))
| (((i_b) >>
i_rbshift) <<
i_lbshift))
/*****************************************************************************
/*****************************************************************************
* Module descriptor.
* Module descriptor.
...
@@ -309,6 +309,12 @@ VIDEO_FILTER_WRAPPER( I420_RGB32 )
...
@@ -309,6 +309,12 @@ VIDEO_FILTER_WRAPPER( I420_RGB32 )
static
void
SetYUV
(
filter_t
*
p_filter
,
const
video_format_t
*
vfmt
)
static
void
SetYUV
(
filter_t
*
p_filter
,
const
video_format_t
*
vfmt
)
{
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
unsigned
i_lrshift
=
ctz
(
vfmt
->
i_rmask
);
unsigned
i_lgshift
=
ctz
(
vfmt
->
i_gmask
);
unsigned
i_lbshift
=
ctz
(
vfmt
->
i_bmask
);
unsigned
i_rrshift
=
8
-
vlc_popcount
(
vfmt
->
i_rmask
);
unsigned
i_rgshift
=
8
-
vlc_popcount
(
vfmt
->
i_gmask
);
unsigned
i_rbshift
=
8
-
vlc_popcount
(
vfmt
->
i_bmask
);
/*
/*
* Set pointers and build YUV tables
* 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