Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
6ed1e2d8
Commit
6ed1e2d8
authored
Jan 13, 2000
by
Vincent Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
YUV 15,16 et 32 bits integr�e au vout (sans le MMX pour le moment).
En 24bpp, � vos risques et perils...
parent
e4263587
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
275 additions
and
61 deletions
+275
-61
include/config.h
include/config.h
+10
-2
include/video.h
include/video.h
+1
-0
include/video_sys.h
include/video_sys.h
+8
-7
src/video_output/video_fb.c
src/video_output/video_fb.c
+37
-3
src/video_output/video_output.c
src/video_output/video_output.c
+205
-18
src/video_output/video_x11.c
src/video_output/video_x11.c
+14
-31
No files found.
include/config.h
View file @
6ed1e2d8
...
@@ -26,10 +26,18 @@
...
@@ -26,10 +26,18 @@
/* Program options */
/* Program options */
#if defined(VIDEO_X11)
#if defined(VIDEO_X11)
#define
PROGRAM_OPTIONS
"X11"
#define
VIDEO_OPTIONS
"X11"
#elif defined(VIDEO_FB)
#elif defined(VIDEO_FB)
#define PROGRAM_OPTIONS "Framebuffer"
#define VIDEO_OPTIONS "Framebuffer"
#else
#define VIDEO_OPTIONS ""
#endif
#endif
#if defined(HAVE_MMX)
#define ARCH_OPTIONS "MMX"
#else
#define ARCH_OPTIONS ""
#endif
#define PROGRAM_OPTIONS VIDEO_OPTIONS " " ARCH_OPTIONS
/* Program version and copyright message */
/* Program version and copyright message */
#define PROGRAM_VERSION "DR 2.1"
#define PROGRAM_VERSION "DR 2.1"
...
...
include/video.h
View file @
6ed1e2d8
...
@@ -29,6 +29,7 @@ typedef struct
...
@@ -29,6 +29,7 @@ typedef struct
/* Type and flags - should NOT be modified except by the vout thread */
/* Type and flags - should NOT be modified except by the vout thread */
int
i_type
;
/* picture type */
int
i_type
;
/* picture type */
int
i_status
;
/* picture flags */
int
i_status
;
/* picture flags */
int
i_matrix_coefficients
;
/* in YUV type, encoding type */
/* Picture properties - those properties are fixed at initialization and
/* Picture properties - those properties are fixed at initialization and
* should NOT be modified. Note that for YUV pictures, i_bytes_per_line is
* should NOT be modified. Note that for YUV pictures, i_bytes_per_line is
...
...
include/video_sys.h
View file @
6ed1e2d8
...
@@ -7,14 +7,15 @@
...
@@ -7,14 +7,15 @@
* Prototypes
* Prototypes
*******************************************************************************/
*******************************************************************************/
#if defined(VIDEO_X11)
#if defined(VIDEO_X11)
int
vout_SysCreate
(
p_vout_thread_t
p_vout
,
char
*
psz_display
,
Window
root_window
);
int
vout_SysCreate
(
p_vout_thread_t
p_vout
,
char
*
psz_display
,
Window
root_window
);
#elif defined(VIDEO_FB)
#elif defined(VIDEO_FB)
int
vout_SysCreate
(
p_vout_thread_t
p_vout
);
int
vout_SysCreate
(
p_vout_thread_t
p_vout
);
#endif
#endif
int
vout_SysInit
(
p_vout_thread_t
p_vout
);
int
vout_SysInit
(
p_vout_thread_t
p_vout
);
void
vout_SysEnd
(
p_vout_thread_t
p_vout
);
void
vout_SysEnd
(
p_vout_thread_t
p_vout
);
void
vout_SysDestroy
(
p_vout_thread_t
p_vout
);
void
vout_SysDestroy
(
p_vout_thread_t
p_vout
);
int
vout_SysManage
(
p_vout_thread_t
p_vout
);
int
vout_SysManage
(
p_vout_thread_t
p_vout
);
void
vout_SysDisplay
(
p_vout_thread_t
p_vout
);
void
vout_SysDisplay
(
p_vout_thread_t
p_vout
);
byte_t
*
vout_SysGetPicture
(
p_vout_thread_t
p_vout
,
int
*
pi_eol_offset
);
src/video_output/video_fb.c
View file @
6ed1e2d8
...
@@ -155,6 +155,20 @@ void vout_SysDisplay( vout_thread_t *p_vout )
...
@@ -155,6 +155,20 @@ void vout_SysDisplay( vout_thread_t *p_vout )
//?? p_vout->p_sys->i_buffer_index = ++p_vout->p_sys->i_buffer_index & 1;
//?? p_vout->p_sys->i_buffer_index = ++p_vout->p_sys->i_buffer_index & 1;
}
}
/*******************************************************************************
* vout_SysGetPicture: get current display buffer informations
*******************************************************************************
* This function returns the address of the current display buffer, and the
* number of samples per line. For 15, 16 and 32 bits displays, this value is
* the number of pixels in a line.
*******************************************************************************/
byte_t
*
vout_SysGetPicture
(
vout_thread_t
*
p_vout
,
int
*
pi_eol_offset
)
{
*
pi_eol_offset
=
p_vout
->
i_width
;
//????
// return( p_vout->p_sys->p_ximage[ p_vout->p_sys->i_buffer_index ].data );
}
/* following functions are local */
/* following functions are local */
/*******************************************************************************
/*******************************************************************************
...
@@ -219,10 +233,30 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
...
@@ -219,10 +233,30 @@ static int FBOpenDisplay( vout_thread_t *p_vout )
p_vout
->
i_width
=
var_info
.
xres
;
p_vout
->
i_width
=
var_info
.
xres
;
p_vout
->
i_height
=
var_info
.
yres
;
p_vout
->
i_height
=
var_info
.
yres
;
p_vout
->
i_screen_depth
=
var_info
.
bits_per_pixel
;
p_vout
->
i_screen_depth
=
var_info
.
bits_per_pixel
;
p_vout
->
p_sys
->
i_page_size
=
var_info
.
xres
*
switch
(
p_vout
->
i_screen_depth
)
var_info
.
yres
*
var_info
.
bits_per_pixel
/
8
;
{
case
15
:
/* 15 bpp (16bpp with a missing green bit) */
case
16
:
/* 16 bpp (65536 colors) */
p_vout
->
i_bytes_per_pixel
=
2
;
break
;
case
24
:
/* 24 bpp (millions of colors) */
p_vout
->
i_bytes_per_pixel
=
3
;
break
;
case
32
:
/* 32 bpp (millions of colors) */
p_vout
->
i_bytes_per_pixel
=
4
;
break
;
default:
/* unsupported screen depth */
intf_ErrMsg
(
"vout error: screen depth %i is not supported
\n
"
,
p_vout
->
i_screen_depth
);
return
(
1
);
break
;
}
p_vout
->
p_sys
->
i_page_size
=
var_info
.
xres
*
var_info
.
yres
*
p_vout
->
i_bytes_per_pixel
;
/* Map two framebuffers a the very beginning of the fb */
/* Map two framebuffers a the very beginning of the fb */
p_vout
->
p_sys
->
p_video
=
mmap
(
0
,
p_vout
->
p_sys
->
i_page_size
*
2
,
p_vout
->
p_sys
->
p_video
=
mmap
(
0
,
p_vout
->
p_sys
->
i_page_size
*
2
,
...
...
src/video_output/video_output.c
View file @
6ed1e2d8
This diff is collapsed.
Click to expand it.
src/video_output/video_x11.c
View file @
6ed1e2d8
...
@@ -58,8 +58,6 @@ typedef struct vout_sys_s
...
@@ -58,8 +58,6 @@ typedef struct vout_sys_s
int
i_buffer_index
;
/* buffer index */
int
i_buffer_index
;
/* buffer index */
XImage
*
p_ximage
[
2
];
/* XImage pointer */
XImage
*
p_ximage
[
2
];
/* XImage pointer */
XShmSegmentInfo
shm_info
[
2
];
/* shared memory zone information */
XShmSegmentInfo
shm_info
[
2
];
/* shared memory zone information */
int
i_completion_type
;
/* ?? */
}
vout_sys_t
;
}
vout_sys_t
;
/*******************************************************************************
/*******************************************************************************
...
@@ -234,6 +232,20 @@ void vout_SysDisplay( vout_thread_t *p_vout )
...
@@ -234,6 +232,20 @@ void vout_SysDisplay( vout_thread_t *p_vout )
p_vout
->
p_sys
->
i_buffer_index
=
++
p_vout
->
p_sys
->
i_buffer_index
&
1
;
p_vout
->
p_sys
->
i_buffer_index
=
++
p_vout
->
p_sys
->
i_buffer_index
&
1
;
}
}
/*******************************************************************************
* vout_SysGetPicture: get current display buffer informations
*******************************************************************************
* This function returns the address of the current display buffer, and the
* number of samples per line. For 15, 16 and 32 bits displays, this value is
* the number of pixels in a line.
*******************************************************************************/
byte_t
*
vout_SysGetPicture
(
vout_thread_t
*
p_vout
,
int
*
pi_eol_offset
)
{
*
pi_eol_offset
=
p_vout
->
i_width
;
return
(
p_vout
->
p_sys
->
p_ximage
[
p_vout
->
p_sys
->
i_buffer_index
]
->
data
);
}
/* following functions are local */
/* following functions are local */
/*******************************************************************************
/*******************************************************************************
...
@@ -256,40 +268,16 @@ static int X11GetProperties( vout_thread_t *p_vout )
...
@@ -256,40 +268,16 @@ static int X11GetProperties( vout_thread_t *p_vout )
switch
(
p_vout
->
i_screen_depth
)
switch
(
p_vout
->
i_screen_depth
)
{
{
case
15
:
/* 15 bpp (16bpp with a missing green bit) */
case
15
:
/* 15 bpp (16bpp with a missing green bit) */
p_vout
->
i_bytes_per_pixel
=
2
;
/*
?? */
break
;
case
16
:
/* 16 bpp (65536 colors) */
case
16
:
/* 16 bpp (65536 colors) */
p_vout
->
i_bytes_per_pixel
=
2
;
p_vout
->
i_bytes_per_pixel
=
2
;
/*
Process_Frame=Translate_Frame;
Process_Top_Field=Translate_Top_Field;
Process_Bottom_Field=Translate_Bottom_Field;
Process_Top_Field420=Translate_Top_Field420;
Process_Bottom_Field420=Translate_Bottom_Field420; ?? */
break
;
break
;
case
24
:
/* 24 bpp (millions of colors) */
case
24
:
/* 24 bpp (millions of colors) */
p_vout
->
i_bytes_per_pixel
=
3
;
p_vout
->
i_bytes_per_pixel
=
3
;
/*
Process_Frame=Translate_Frame;
Process_Top_Field=Translate_Top_Field;
Process_Bottom_Field=Translate_Bottom_Field;
Process_Top_Field420=Translate_Top_Field420;
Process_Bottom_Field420=Translate_Bottom_Field420; ?? */
break
;
break
;
case
32
:
/* 32 bpp (millions of colors) */
case
32
:
/* 32 bpp (millions of colors) */
p_vout
->
i_bytes_per_pixel
=
4
;
p_vout
->
i_bytes_per_pixel
=
4
;
/*
Process_Frame=Translate_Frame;
Process_Top_Field=Translate_Top_Field;
Process_Bottom_Field=Translate_Bottom_Field;
Process_Top_Field420=Translate_Top_Field420;
Process_Bottom_Field420=Translate_Bottom_Field420; ?? */
break
;
break
;
default:
/* unsupported screen depth */
default:
/* unsupported screen depth */
...
@@ -579,11 +567,6 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
...
@@ -579,11 +567,6 @@ static int X11CreateShmImage( vout_thread_t *p_vout, XImage **pp_ximage,
XDestroyImage
(
*
pp_ximage
);
XDestroyImage
(
*
pp_ximage
);
return
(
-
1
);
return
(
-
1
);
}
}
/* ?? don't know what it is. Function XShmGetEventBase prototype is defined
* in mit-shm document, but does not appears in any header. */
p_vout
->
p_sys
->
i_completion_type
=
XShmGetEventBase
(
p_vout
->
p_sys
->
p_display
)
+
ShmCompletion
;
return
(
0
);
return
(
0
);
}
}
...
...
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