Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c8363465
Commit
c8363465
authored
Jan 09, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/video_output/sdl.c: fixed visible picture pitch calculation.
parent
f86eec5a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
18 deletions
+20
-18
modules/video_output/sdl.c
modules/video_output/sdl.c
+20
-18
No files found.
modules/video_output/sdl.c
View file @
c8363465
...
...
@@ -2,7 +2,7 @@
* sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: sdl.c,v 1.
5 2002/12/23 21:58:33 jpsaman
Exp $
* $Id: sdl.c,v 1.
6 2003/01/09 14:05:31 sam
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
...
...
@@ -95,7 +95,8 @@ static void Display ( vout_thread_t *, picture_t * );
static
int
OpenDisplay
(
vout_thread_t
*
);
static
void
CloseDisplay
(
vout_thread_t
*
);
static
int
NewPicture
(
vout_thread_t
*
,
picture_t
*
);
static
void
SetPalette
(
vout_thread_t
*
,
u16
*
,
u16
*
,
u16
*
);
static
void
SetPalette
(
vout_thread_t
*
,
uint16_t
*
,
uint16_t
*
,
uint16_t
*
);
/*****************************************************************************
* Module descriptor
...
...
@@ -864,45 +865,45 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
{
case
SDL_YV12_OVERLAY
:
p_pic
->
p
[
Y_PLANE
].
i_pixel_pitch
=
1
;
p_pic
->
p
[
Y_PLANE
].
i_visible_pitch
=
p_pic
->
p
[
Y_PLANE
].
i_pitch
;
p_pic
->
p
[
Y_PLANE
].
i_visible_pitch
=
p_pic
->
p
_sys
->
p_overlay
->
w
;
p_pic
->
U_PIXELS
=
p_pic
->
p_sys
->
p_overlay
->
pixels
[
2
];
p_pic
->
p
[
U_PLANE
].
i_lines
=
p_pic
->
p_sys
->
p_overlay
->
h
/
2
;
p_pic
->
p
[
U_PLANE
].
i_pitch
=
p_pic
->
p_sys
->
p_overlay
->
pitches
[
2
];
p_pic
->
p
[
U_PLANE
].
i_pixel_pitch
=
1
;
p_pic
->
p
[
U_PLANE
].
i_visible_pitch
=
p_pic
->
p
[
U_PLANE
].
i_pitch
;
p_pic
->
p
[
U_PLANE
].
i_visible_pitch
=
p_pic
->
p
_sys
->
p_overlay
->
w
/
2
;
p_pic
->
V_PIXELS
=
p_pic
->
p_sys
->
p_overlay
->
pixels
[
1
];
p_pic
->
p
[
V_PLANE
].
i_lines
=
p_pic
->
p_sys
->
p_overlay
->
h
/
2
;
p_pic
->
p
[
V_PLANE
].
i_pitch
=
p_pic
->
p_sys
->
p_overlay
->
pitches
[
1
];
p_pic
->
p
[
V_PLANE
].
i_pixel_pitch
=
1
;
p_pic
->
p
[
V_PLANE
].
i_visible_pitch
=
p_pic
->
p
[
V_PLANE
].
i_pitch
;
p_pic
->
p
[
V_PLANE
].
i_visible_pitch
=
p_pic
->
p
_sys
->
p_overlay
->
w
/
2
;
p_pic
->
i_planes
=
3
;
break
;
case
SDL_IYUV_OVERLAY
:
p_pic
->
p
[
Y_PLANE
].
i_pixel_pitch
=
1
;
p_pic
->
p
[
Y_PLANE
].
i_visible_pitch
=
p_pic
->
p
[
Y_PLANE
].
i_pitch
;
p_pic
->
p
[
Y_PLANE
].
i_visible_pitch
=
p_pic
->
p
_sys
->
p_overlay
->
w
;
p_pic
->
U_PIXELS
=
p_pic
->
p_sys
->
p_overlay
->
pixels
[
1
];
p_pic
->
p
[
U_PLANE
].
i_lines
=
p_pic
->
p_sys
->
p_overlay
->
h
/
2
;
p_pic
->
p
[
U_PLANE
].
i_pitch
=
p_pic
->
p_sys
->
p_overlay
->
pitches
[
1
];
p_pic
->
p
[
U_PLANE
].
i_pixel_pitch
=
1
;
p_pic
->
p
[
U_PLANE
].
i_visible_pitch
=
p_pic
->
p
[
U_PLANE
].
i_pitch
;
p_pic
->
p
[
U_PLANE
].
i_visible_pitch
=
p_pic
->
p
_sys
->
p_overlay
->
w
/
2
;
p_pic
->
V_PIXELS
=
p_pic
->
p_sys
->
p_overlay
->
pixels
[
2
];
p_pic
->
p
[
V_PLANE
].
i_lines
=
p_pic
->
p_sys
->
p_overlay
->
h
/
2
;
p_pic
->
p
[
V_PLANE
].
i_pitch
=
p_pic
->
p_sys
->
p_overlay
->
pitches
[
2
];
p_pic
->
p
[
V_PLANE
].
i_pixel_pitch
=
1
;
p_pic
->
p
[
V_PLANE
].
i_visible_pitch
=
p_pic
->
p
[
V_PLANE
].
i_pitch
;
p_pic
->
p
[
V_PLANE
].
i_visible_pitch
=
p_pic
->
p
_sys
->
p_overlay
->
w
/
2
;
p_pic
->
i_planes
=
3
;
break
;
default:
p_pic
->
p
[
Y_PLANE
].
i_pixel_pitch
=
2
;
p_pic
->
p
[
Y_PLANE
].
i_visible_pitch
=
p_pic
->
p
[
Y_PLANE
].
i_pitch
;
p_pic
->
p
[
U_PLANE
].
i_visible_pitch
=
p_pic
->
p_sys
->
p_overlay
->
w
*
2
;
p_pic
->
i_planes
=
1
;
break
;
...
...
@@ -915,7 +916,8 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
/*****************************************************************************
* SetPalette: sets an 8 bpp palette
*****************************************************************************/
static
void
SetPalette
(
vout_thread_t
*
p_vout
,
u16
*
red
,
u16
*
green
,
u16
*
blue
)
static
void
SetPalette
(
vout_thread_t
*
p_vout
,
uint16_t
*
red
,
uint16_t
*
green
,
uint16_t
*
blue
)
{
SDL_Color
colors
[
256
];
int
i
;
...
...
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