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
f57c4076
Commit
f57c4076
authored
Nov 06, 2005
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* sdl_image.c: fixed 8bpp too
parent
5b3632af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
modules/codec/sdl_image.c
modules/codec/sdl_image.c
+9
-13
No files found.
modules/codec/sdl_image.c
View file @
f57c4076
...
...
@@ -175,25 +175,21 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
case
8
:
{
int
i
,
j
;
uint8_t
*
r
=
p_pic
->
p
[
0
].
p_pixels
;
uint8_t
*
g
=
p_pic
->
p
[
0
].
p_pixels
+
1
;
uint8_t
*
b
=
p_pic
->
p
[
0
].
p_pixels
+
2
;
SDL_Palette
*
p_palette
=
p_surface
->
format
->
palette
;
uint8_t
*
p_src
,
*
p_dst
;
uint8_t
r
,
g
,
b
;
for
(
i
=
0
;
i
<
p_surface
->
h
;
i
++
)
{
p_src
=
p_surface
->
pixels
+
i
*
p_surface
->
pitch
;
p_dst
=
p_pic
->
p
[
0
].
p_pixels
+
i
*
p_pic
->
p
[
0
].
i_pitch
;
for
(
j
=
0
;
j
<
p_surface
->
w
;
j
++
)
{
uint8_t
i_index
=
((
uint8_t
*
)
p_surface
->
pixels
)[
j
];
SDL_Color
*
p_color
=
&
p_palette
->
colors
[
i_index
]
;
r
[
j
]
=
p_color
->
r
;
g
[
j
]
=
p_color
->
g
;
b
[
j
]
=
p_color
->
b
;
SDL_GetRGB
(
*
(
p_src
++
),
p_surface
->
format
,
&
r
,
&
g
,
&
b
)
;
*
(
p_dst
++
)
=
r
;
*
(
p_dst
++
)
=
g
;
*
(
p_dst
++
)
=
b
;
}
}
r
+=
p_pic
->
p
[
0
].
i_pitch
;
g
+=
p_pic
->
p
[
0
].
i_pitch
;
b
+=
p_pic
->
p
[
0
].
i_pitch
;
break
;
}
case
16
:
...
...
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