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
141ba6b9
Commit
141ba6b9
authored
Apr 18, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
directfb: simplify rgb setup
parent
00c7be60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
29 deletions
+6
-29
modules/video_output/directfb.c
modules/video_output/directfb.c
+6
-29
No files found.
modules/video_output/directfb.c
View file @
141ba6b9
...
...
@@ -86,16 +86,10 @@ static int Open(vlc_object_t *object)
vout_display_sys_t
*
sys
;
/* Allocate structure */
vd
->
sys
=
sys
=
malloc
(
sizeof
(
*
sys
));
vd
->
sys
=
sys
=
calloc
(
1
,
sizeof
(
*
sys
));
if
(
!
sys
)
return
VLC_ENOMEM
;
sys
->
directfb
=
NULL
;
sys
->
primary
=
NULL
;
sys
->
width
=
0
;
sys
->
height
=
0
;
sys
->
pool
=
NULL
;
/* Init DirectFB */
if
(
DirectFBInit
(
NULL
,
NULL
)
!=
DFB_OK
)
{
msg_Err
(
vd
,
"Cannot init DirectFB"
);
...
...
@@ -116,39 +110,22 @@ static int Open(vlc_object_t *object)
switch
(
sys
->
pixel_format
)
{
case
DSPF_RGB332
:
/* 8 bit RGB (1 byte, red 3@5, green 3@2, blue 2@0) */
fmt
.
i_chroma
=
VLC_CODEC_RGB8
;
fmt
.
i_rmask
=
0x7
<<
5
;
fmt
.
i_gmask
=
0x7
<<
2
;
fmt
.
i_bmask
=
0x3
<<
0
;
break
;
case
DSPF_RGB16
:
/* 16 bit RGB (2 byte, red 5@11, green 6@5, blue 5@0) */
fmt
.
i_chroma
=
VLC_CODEC_RGB16
;
fmt
.
i_rmask
=
0x1f
<<
11
;
fmt
.
i_gmask
=
0x3f
<<
5
;
fmt
.
i_bmask
=
0x1f
<<
0
;
break
;
case
DSPF_RGB24
:
/* 24 bit RGB (3 byte, red 8@16, green 8@8, blue 8@0) */
fmt
.
i_chroma
=
VLC_CODEC_RGB24
;
fmt
.
i_rmask
=
0xff
<<
16
;
fmt
.
i_gmask
=
0xff
<<
8
;
fmt
.
i_bmask
=
0xff
<<
0
;
break
;
case
DSPF_RGB32
:
/* 24 bit RGB (4 byte, nothing@24, red 8@16, green 8@8, blue 8@0) */
fmt
.
i_chroma
=
VLC_CODEC_RGB32
;
fmt
.
i_rmask
=
0xff
<<
16
;
fmt
.
i_gmask
=
0xff
<<
8
;
fmt
.
i_bmask
=
0xff
<<
0
;
break
;
case
DSPF_RGB16
:
fmt
.
i_chroma
=
VLC_CODEC_RGB16
;
break
;
case
DSPF_RGB24
:
fmt
.
i_chroma
=
VLC_CODEC_RGB24
;
break
;
case
DSPF_RGB32
:
fmt
.
i_chroma
=
VLC_CODEC_RGB32
;
break
;
default:
msg_Err
(
vd
,
"unknown screen depth %i"
,
sys
->
pixel_format
);
Close
(
VLC_OBJECT
(
vd
));
return
VLC_EGENERIC
;
}
video_format_FixRgb
(
&
fmt
);
fmt
.
i_width
=
sys
->
width
;
fmt
.
i_height
=
sys
->
height
;
...
...
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