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
0ba8129e
Commit
0ba8129e
authored
May 16, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced vout_InitPicture/Format with their equivalent.
parent
4179a9e5
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
75 additions
and
358 deletions
+75
-358
include/vlc_vout.h
include/vlc_vout.h
+0
-14
modules/access/dc1394.c
modules/access/dc1394.c
+8
-6
modules/access/screen/screen.c
modules/access/screen/screen.c
+5
-5
modules/access/v4l.c
modules/access/v4l.c
+4
-5
modules/codec/mash.cpp
modules/codec/mash.cpp
+3
-3
modules/codec/rawvideo.c
modules/codec/rawvideo.c
+7
-8
modules/demux/rawvid.c
modules/demux/rawvid.c
+2
-3
modules/stream_out/switcher.c
modules/stream_out/switcher.c
+7
-4
modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
...les/video_filter/dynamicoverlay/dynamicoverlay_commands.c
+7
-7
modules/video_output/fb.c
modules/video_output/fb.c
+7
-3
modules/video_output/hd1000v.cpp
modules/video_output/hd1000v.cpp
+3
-3
modules/video_output/vmem.c
modules/video_output/vmem.c
+7
-3
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+5
-4
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+3
-3
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+3
-3
modules/visualization/galaktos/plugin.c
modules/visualization/galaktos/plugin.c
+2
-2
src/libvlccore.sym
src/libvlccore.sym
+0
-2
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+2
-280
No files found.
include/vlc_vout.h
View file @
0ba8129e
...
...
@@ -74,19 +74,6 @@ struct picture_heap_t
* Prototypes
*****************************************************************************/
/**
* Initialise different fields of a picture_t (but does not allocate memory).
* \param p_this a vlc object
* \param p_pic pointer to the picture structure.
* \param i_chroma the wanted chroma for the picture.
* \param i_width the wanted width for the picture.
* \param i_height the wanted height for the picture.
* \param i_aspect the wanted aspect ratio for the picture.
*/
#define vout_InitPicture(a,b,c,d,e,f) \
__vout_InitPicture(VLC_OBJECT(a),b,c,d,e,f)
VLC_EXPORT
(
int
,
__vout_InitPicture
,
(
vlc_object_t
*
p_this
,
picture_t
*
p_pic
,
uint32_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_aspect
)
);
/**
* Initialise different fields of a picture_t and allocates the picture buffer.
* \param p_this a vlc object
...
...
@@ -317,7 +304,6 @@ VLC_EXPORT( int, vout_GetSnapshot, ( vout_thread_t *p_vout,
VLC_EXPORT
(
int
,
vout_ChromaCmp
,
(
uint32_t
,
uint32_t
)
);
VLC_EXPORT
(
picture_t
*
,
vout_CreatePicture
,
(
vout_thread_t
*
,
bool
,
bool
,
unsigned
int
)
);
VLC_EXPORT
(
void
,
vout_InitFormat
,
(
video_frame_format_t
*
,
uint32_t
,
int
,
int
,
int
)
);
VLC_EXPORT
(
void
,
vout_DestroyPicture
,
(
vout_thread_t
*
,
picture_t
*
)
);
VLC_EXPORT
(
void
,
vout_DisplayPicture
,
(
vout_thread_t
*
,
picture_t
*
)
);
VLC_EXPORT
(
void
,
vout_LinkPicture
,
(
vout_thread_t
*
,
picture_t
*
)
);
...
...
modules/access/dc1394.c
View file @
0ba8129e
...
...
@@ -33,7 +33,6 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_input.h>
#include <vlc_vout.h>
#include <vlc_demux.h>
...
...
@@ -215,7 +214,6 @@ static int Open( vlc_object_t *p_this )
int
i
;
int
i_width
;
int
i_height
;
int
i_aspect
;
int
result
=
0
;
if
(
strncmp
(
p_demux
->
psz_access
,
"dc1394"
,
6
)
!=
0
)
...
...
@@ -477,10 +475,14 @@ static int Open( vlc_object_t *p_this )
i_width
=
p_sys
->
camera
.
frame_width
;
i_height
=
p_sys
->
camera
.
frame_height
;
i_aspect
=
vout_InitPicture
(
VLC_OBJECT
(
p_demux
),
&
p_sys
->
pic
,
VLC_CODEC_UYVY
,
i_width
,
i_height
,
i_width
*
VOUT_ASPECT_FACTOR
/
i_height
);
if
(
picture_Setup
(
&
p_sys
->
pic
,
VLC_CODEC_UYVY
,
i_width
,
i_height
,
i_width
*
VOUT_ASPECT_FACTOR
/
i_height
)
)
{
msg_Err
(
p_demux
,
"unknown chroma"
);
Close
(
p_this
);
return
VLC_EGENERIC
;
}
es_format_Init
(
&
fmt
,
VIDEO_ES
,
VLC_CODEC_UYVY
);
...
...
modules/access/screen/screen.c
View file @
0ba8129e
...
...
@@ -336,11 +336,11 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y,
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
if
(
!
p_sys
->
dst
.
i_planes
)
vout_InitPicture
(
p_demux
,
&
p_sys
->
dst
,
p_sys
->
fmt
.
video
.
i_chroma
,
p_sys
->
fmt
.
video
.
i_width
,
p_sys
->
fmt
.
video
.
i_height
,
p_sys
->
fmt
.
video
.
i_aspect
);
picture_Setup
(
&
p_sys
->
dst
,
p_sys
->
fmt
.
video
.
i_chroma
,
p_sys
->
fmt
.
video
.
i_width
,
p_sys
->
fmt
.
video
.
i_height
,
p_sys
->
fmt
.
video
.
i_aspect
);
if
(
!
p_sys
->
p_blend
)
{
p_sys
->
p_blend
=
vlc_object_create
(
p_demux
,
sizeof
(
filter_t
)
);
...
...
modules/access/v4l.c
View file @
0ba8129e
...
...
@@ -37,7 +37,7 @@
#include <vlc_input.h>
#include <vlc_demux.h>
#include <vlc_access.h>
#include <vlc_
vout
.h>
#include <vlc_
picture
.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
...
...
@@ -1072,10 +1072,9 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
else
{
/* Fill in picture_t fields */
vout_InitPicture
(
VLC_OBJECT
(
p_demux
),
&
p_sys
->
pic
,
p_sys
->
i_fourcc
,
p_sys
->
i_width
,
p_sys
->
i_height
,
p_sys
->
i_width
*
VOUT_ASPECT_FACTOR
/
p_sys
->
i_height
);
if
(
!
p_sys
->
pic
.
i_planes
)
if
(
picture_Setup
(
&
p_sys
->
pic
,
p_sys
->
i_fourcc
,
p_sys
->
i_width
,
p_sys
->
i_height
,
p_sys
->
i_width
*
VOUT_ASPECT_FACTOR
/
p_sys
->
i_height
)
)
{
msg_Err
(
p_demux
,
"unsupported chroma"
);
goto
vdev_failed
;
...
...
modules/codec/mash.cpp
View file @
0ba8129e
...
...
@@ -190,9 +190,9 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
{
msg_Dbg
(
p_dec
,
"video size is perhaps %dx%d"
,
i_width
,
i_height
);
v
out_InitFormat
(
&
p_dec
->
fmt_out
.
video
,
VLC_CODEC_I420
,
i_width
,
i_height
,
VOUT_ASPECT_FACTOR
*
i_width
/
i_height
);
v
ideo_format_Setup
(
&
p_dec
->
fmt_out
.
video
,
VLC_CODEC_I420
,
i_width
,
i_height
,
VOUT_ASPECT_FACTOR
*
i_width
/
i_height
);
p_sys
->
b_inited
=
true
;
}
p_pic
=
NULL
;
...
...
modules/codec/rawvideo.c
View file @
0ba8129e
...
...
@@ -31,7 +31,6 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
#include <vlc_vout.h>
/*****************************************************************************
* decoder_sys_t : raw video decoder descriptor
...
...
@@ -157,10 +156,10 @@ static int OpenDecoder( vlc_object_t *p_this )
}
/* Find out p_vdec->i_raw_size */
v
out_InitFormat
(
&
p_dec
->
fmt_out
.
video
,
p_dec
->
fmt_in
.
i_codec
,
p_dec
->
fmt_in
.
video
.
i_width
,
p_dec
->
fmt_in
.
video
.
i_height
,
p_dec
->
fmt_in
.
video
.
i_aspect
);
v
ideo_format_Setup
(
&
p_dec
->
fmt_out
.
video
,
p_dec
->
fmt_in
.
i_codec
,
p_dec
->
fmt_in
.
video
.
i_width
,
p_dec
->
fmt_in
.
video
.
i_height
,
p_dec
->
fmt_in
.
video
.
i_aspect
);
p_sys
->
i_raw_size
=
p_dec
->
fmt_out
.
video
.
i_bits_per_pixel
*
p_dec
->
fmt_out
.
video
.
i_width
*
p_dec
->
fmt_out
.
video
.
i_height
/
8
;
...
...
@@ -321,9 +320,9 @@ static block_t *SendFrame( decoder_t *p_dec, block_t *p_block )
int
i
,
j
;
/* Fill in picture_t fields */
vout_InitPicture
(
VLC_OBJECT
(
p_dec
),
&
pic
,
p_dec
->
fmt_out
.
i_codec
,
p_dec
->
fmt_out
.
video
.
i_width
,
p_dec
->
fmt_out
.
video
.
i_height
,
VOUT_ASPECT_FACTOR
);
picture_Setup
(
&
pic
,
p_dec
->
fmt_out
.
i_codec
,
p_dec
->
fmt_out
.
video
.
i_width
,
p_dec
->
fmt_out
.
video
.
i_height
,
VOUT_ASPECT_FACTOR
);
if
(
!
pic
.
i_planes
)
{
...
...
modules/demux/rawvid.c
View file @
0ba8129e
...
...
@@ -33,7 +33,6 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_demux.h>
#include <vlc_vout.h>
/* vout_InitFormat */
#include <assert.h>
/*****************************************************************************
...
...
@@ -357,8 +356,8 @@ static int Open( vlc_object_t * p_this )
}
es_format_Init
(
&
p_sys
->
fmt_video
,
VIDEO_ES
,
i_chroma
);
v
out_InitFormat
(
&
p_sys
->
fmt_video
.
video
,
i_chroma
,
i_width
,
i_height
,
i_aspect
);
v
ideo_format_Setup
(
&
p_sys
->
fmt_video
.
video
,
i_chroma
,
i_width
,
i_height
,
i_aspect
);
vlc_ureduce
(
&
p_sys
->
fmt_video
.
video
.
i_frame_rate
,
&
p_sys
->
fmt_video
.
video
.
i_frame_rate_base
,
...
...
modules/stream_out/switcher.c
View file @
0ba8129e
...
...
@@ -33,7 +33,6 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_vout.h>
#include <vlc_avcodec.h>
#include <vlc_block.h>
...
...
@@ -613,9 +612,13 @@ static int UnpackFromFile( sout_stream_t *p_stream, const char *psz_file,
return
-
1
;
}
vout_InitPicture
(
VLC_OBJECT
(
p_stream
),
p_pic
,
VLC_CODEC_I420
,
i_width
,
i_height
,
i_width
*
VOUT_ASPECT_FACTOR
/
i_height
);
if
(
picture_Setup
(
p_pic
,
VLC_CODEC_I420
,
i_width
,
i_height
,
i_width
*
VOUT_ASPECT_FACTOR
/
i_height
)
)
{
msg_Err
(
p_stream
,
"unknown chroma"
);
return
-
1
;
}
for
(
i
=
0
;
i
<
p_pic
->
i_planes
;
i
++
)
{
p_pic
->
p
[
i
].
p_pixels
=
malloc
(
p_pic
->
p
[
i
].
i_lines
*
...
...
modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
View file @
0ba8129e
...
...
@@ -56,8 +56,8 @@ overlay_t *OverlayCreate( void )
p_ovl
->
i_x
=
p_ovl
->
i_y
=
0
;
p_ovl
->
i_alpha
=
0xFF
;
p_ovl
->
b_active
=
false
;
v
out_InitFormat
(
&
p_ovl
->
format
,
VLC_FOURCC
(
'\0'
,
'\0'
,
'\0'
,
'\0'
)
,
0
,
0
,
VOUT_ASPECT_FACTOR
);
v
ideo_format_Setup
(
&
p_ovl
->
format
,
VLC_FOURCC
(
'\0'
,
'\0'
,
'\0'
,
'\0'
)
,
0
,
0
,
VOUT_ASPECT_FACTOR
);
p_ovl
->
p_fontstyle
=
text_style_New
();
p_ovl
->
data
.
p_text
=
NULL
;
...
...
@@ -465,8 +465,8 @@ static int exec_DataSharedMem( filter_t *p_filter,
return
VLC_ENOMEM
;
}
v
out_InitFormat
(
&
p_ovl
->
format
,
VLC_CODEC_TEXT
,
0
,
0
,
0
);
v
ideo_format_Setup
(
&
p_ovl
->
format
,
VLC_CODEC_TEXT
,
0
,
0
,
0
);
p_data
=
shmat
(
p_params
->
i_shmid
,
NULL
,
SHM_RDONLY
);
if
(
p_data
==
NULL
)
...
...
@@ -489,9 +489,9 @@ static int exec_DataSharedMem( filter_t *p_filter,
if
(
p_ovl
->
data
.
p_pic
==
NULL
)
return
VLC_ENOMEM
;
v
out_InitFormat
(
&
p_ovl
->
format
,
p_params
->
fourcc
,
p_params
->
i_width
,
p_params
->
i_height
,
VOUT_ASPECT_FACTOR
);
v
ideo_format_Setup
(
&
p_ovl
->
format
,
p_params
->
fourcc
,
p_params
->
i_width
,
p_params
->
i_height
,
VOUT_ASPECT_FACTOR
);
if
(
vout_AllocatePicture
(
p_filter
,
p_ovl
->
data
.
p_pic
,
p_ovl
->
format
.
i_chroma
,
p_params
->
i_width
,
p_params
->
i_height
,
p_ovl
->
format
.
i_aspect
)
)
...
...
modules/video_output/fb.c
View file @
0ba8129e
...
...
@@ -415,9 +415,13 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
}
/* Fill in picture_t fields */
vout_InitPicture
(
VLC_OBJECT
(
p_vout
),
p_pic
,
p_vout
->
output
.
i_chroma
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
output
.
i_aspect
);
if
(
picture_Setup
(
p_pic
,
p_vout
->
output
.
i_chroma
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
output
.
i_aspect
)
)
{
free
(
p_pic
);
return
VLC_EGENERIC
;
}
p_pic
->
p_sys
->
p_data
=
malloc
(
p_vout
->
p_sys
->
i_page_size
);
if
(
!
p_pic
->
p_sys
->
p_data
)
...
...
modules/video_output/hd1000v.cpp
View file @
0ba8129e
...
...
@@ -257,9 +257,9 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
}
/* Fill in picture_t fields */
vout_InitPicture
(
VLC_OBJECT
(
p_vout
),
p_pic
,
p_vout
->
output
.
i_chroma
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
output
.
i_aspect
);
picture_Setup
(
p_pic
,
p_vout
->
output
.
i_chroma
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
output
.
i_aspect
);
p_pic
->
p_sys
->
p_image
=
new
CascadeSharedMemZone
();
if
(
p_pic
->
p_sys
->
p_image
==
NULL
)
...
...
modules/video_output/vmem.c
View file @
0ba8129e
...
...
@@ -231,9 +231,13 @@ static int Init( vout_thread_t *p_vout )
return
VLC_SUCCESS
;
}
vout_InitPicture
(
VLC_OBJECT
(
p_vout
),
p_pic
,
p_vout
->
output
.
i_chroma
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
output
.
i_aspect
);
if
(
picture_Setup
(
p_pic
,
p_vout
->
output
.
i_chroma
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
output
.
i_aspect
)
)
{
free
(
p_pic
);
return
VLC_EGENERIC
;
}
p_pic
->
p
->
i_pitch
=
i_pitch
;
...
...
modules/video_output/x11/xcommon.c
View file @
0ba8129e
...
...
@@ -1865,9 +1865,10 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
#endif
/* Fill in picture_t fields */
vout_InitPicture
(
VLC_OBJECT
(
p_vout
),
p_pic
,
p_vout
->
output
.
i_chroma
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
output
.
i_aspect
);
if
(
picture_Setup
(
p_pic
,
p_vout
->
output
.
i_chroma
,
p_vout
->
output
.
i_width
,
p_vout
->
output
.
i_height
,
p_vout
->
output
.
i_aspect
)
)
return
-
1
;
#ifdef HAVE_SYS_SHM_H
if
(
p_vout
->
p_sys
->
i_shm_opcode
)
...
...
@@ -1965,7 +1966,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
p_pic
->
p
->
i_pitch
=
p_pic
->
p_sys
->
p_image
->
bytes_per_line
;
/* p_pic->p->i_pixel_pitch = 4 for RV24 but this should be set
* properly by
vout_InitPicture
() */
* properly by
picture_Setup
() */
p_pic
->
p
->
i_visible_pitch
=
p_pic
->
p
->
i_pixel_pitch
*
p_pic
->
p_sys
->
p_image
->
width
;
break
;
...
...
modules/video_output/xcb/x11.c
View file @
0ba8129e
...
...
@@ -346,9 +346,9 @@ static int Init (vout_thread_t *vout)
if
(
pic
->
i_status
!=
FREE_PICTURE
)
continue
;
vout_InitPicture
(
vout
,
pic
,
vout
->
output
.
i_chroma
,
vout
->
output
.
i_width
,
vout
->
output
.
i_height
,
vout
->
output
.
i_aspect
);
picture_Setup
(
pic
,
vout
->
output
.
i_chroma
,
vout
->
output
.
i_width
,
vout
->
output
.
i_height
,
vout
->
output
.
i_aspect
);
if
(
PictureAlloc
(
vout
,
pic
,
pic
->
p
->
i_pitch
*
pic
->
p
->
i_lines
,
p_sys
->
shm
?
p_sys
->
conn
:
NULL
))
break
;
...
...
modules/video_output/xcb/xvideo.c
View file @
0ba8129e
...
...
@@ -456,9 +456,9 @@ found_adaptor:
if
(
pic
->
i_status
!=
FREE_PICTURE
)
continue
;
vout_InitPicture
(
vout
,
pic
,
vout
->
output
.
i_chroma
,
att
->
width
,
att
->
height
,
vout
->
fmt_in
.
i_aspect
);
picture_Setup
(
pic
,
vout
->
output
.
i_chroma
,
att
->
width
,
att
->
height
,
vout
->
fmt_in
.
i_aspect
);
if
(
PictureAlloc
(
vout
,
pic
,
att
->
data_size
,
p_sys
->
shm
?
p_sys
->
conn
:
NULL
))
break
;
...
...
modules/visualization/galaktos/plugin.c
View file @
0ba8129e
...
...
@@ -210,8 +210,8 @@ static void* Thread( vlc_object_t *p_this )
vlc_object_attach
(
p_thread
->
p_opengl
,
p_this
);
/* Initialize vout parameters */
v
out_InitFormat
(
&
p_thread
->
p_opengl
->
fmt_in
,
VLC_CODEC_RGB32
,
p_thread
->
i_width
,
p_thread
->
i_height
,
1
);
v
ideo_format_Setup
(
&
p_thread
->
p_opengl
->
fmt_in
,
VLC_CODEC_RGB32
,
p_thread
->
i_width
,
p_thread
->
i_height
,
1
);
p_thread
->
p_opengl
->
i_window_width
=
p_thread
->
i_width
;
p_thread
->
p_opengl
->
i_window_height
=
p_thread
->
i_height
;
p_thread
->
p_opengl
->
render
.
i_width
=
p_thread
->
i_width
;
...
...
src/libvlccore.sym
View file @
0ba8129e
...
...
@@ -529,8 +529,6 @@ vout_DestroyPicture
vout_DisplayPicture
vout_EnableFilter
vout_GetSnapshot
vout_InitFormat
__vout_InitPicture
vout_LinkPicture
vout_OSDIcon
__vout_OSDMessage
...
...
src/video_output/vout_pictures.c
View file @
0ba8129e
This diff is collapsed.
Click to expand it.
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