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
4cd0b036
Commit
4cd0b036
authored
Apr 18, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed picture_heap_t::i_aspect/width/height/chroma.
parent
47e1d944
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
85 deletions
+28
-85
include/vlc_vout.h
include/vlc_vout.h
+0
-10
src/video_output/video_output.c
src/video_output/video_output.c
+11
-41
src/video_output/video_widgets.c
src/video_output/video_widgets.c
+9
-7
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+0
-10
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+3
-4
src/video_output/vout_wrapper.c
src/video_output/vout_wrapper.c
+5
-13
No files found.
include/vlc_vout.h
View file @
4cd0b036
...
@@ -43,16 +43,6 @@ struct picture_heap_t
...
@@ -43,16 +43,6 @@ struct picture_heap_t
{
{
int
i_pictures
;
/**< current heap size */
int
i_pictures
;
/**< current heap size */
/* \name Picture static properties
* Those properties are fixed at initialization and should NOT be modified
* @{
*/
unsigned
int
i_width
;
/**< picture width */
unsigned
int
i_height
;
/**< picture height */
vlc_fourcc_t
i_chroma
;
/**< picture chroma */
unsigned
int
i_aspect
;
/**< aspect ratio */
/**@}*/
/* Real pictures */
/* Real pictures */
picture_t
*
pp_picture
[
VOUT_MAX_PICTURES
];
/**< pictures */
picture_t
*
pp_picture
[
VOUT_MAX_PICTURES
];
/**< pictures */
int
i_last_used_pic
;
/**< last used pic in heap */
int
i_last_used_pic
;
/**< last used pic in heap */
...
...
src/video_output/video_output.c
View file @
4cd0b036
...
@@ -241,12 +241,6 @@ vout_thread_t *vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
...
@@ -241,12 +241,6 @@ vout_thread_t *vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout,
p_vout
->
fmt_render
.
i_sar_num
=
i_sar_num
;
p_vout
->
fmt_render
.
i_sar_num
=
i_sar_num
;
p_vout
->
fmt_render
.
i_sar_den
=
i_sar_den
;
p_vout
->
fmt_render
.
i_sar_den
=
i_sar_den
;
p_vout
->
render
.
i_aspect
=
(
int64_t
)
i_sar_num
*
p_vout
->
fmt_render
.
i_width
*
VOUT_ASPECT_FACTOR
/
i_sar_den
/
p_vout
->
fmt_render
.
i_height
;
p_vout
->
i_changes
|=
VOUT_ASPECT_CHANGE
;
p_vout
->
i_changes
|=
VOUT_ASPECT_CHANGE
;
}
}
vlc_mutex_unlock
(
&
p_vout
->
change_lock
);
vlc_mutex_unlock
(
&
p_vout
->
change_lock
);
...
@@ -289,26 +283,19 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
...
@@ -289,26 +283,19 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
int
i_index
;
/* loop variable */
int
i_index
;
/* loop variable */
vlc_value_t
text
;
vlc_value_t
text
;
unsigned
int
i_width
=
p_fmt
->
i_width
;
unsigned
int
i_height
=
p_fmt
->
i_height
;
vlc_fourcc_t
i_chroma
=
vlc_fourcc_GetCodec
(
VIDEO_ES
,
p_fmt
->
i_chroma
);
config_chain_t
*
p_cfg
;
config_chain_t
*
p_cfg
;
char
*
psz_parser
;
char
*
psz_parser
;
char
*
psz_name
;
char
*
psz_name
;
if
(
i_width
<=
0
||
i_height
<=
0
)
if
(
p_fmt
->
i_width
<=
0
||
p_fmt
->
i_height
<=
0
)
return
NULL
;
return
NULL
;
const
vlc_fourcc_t
i_chroma
=
vlc_fourcc_GetCodec
(
VIDEO_ES
,
p_fmt
->
i_chroma
);
vlc_ureduce
(
&
p_fmt
->
i_sar_num
,
&
p_fmt
->
i_sar_den
,
vlc_ureduce
(
&
p_fmt
->
i_sar_num
,
&
p_fmt
->
i_sar_den
,
p_fmt
->
i_sar_num
,
p_fmt
->
i_sar_den
,
50000
);
p_fmt
->
i_sar_num
,
p_fmt
->
i_sar_den
,
50000
);
if
(
p_fmt
->
i_sar_num
<=
0
||
p_fmt
->
i_sar_den
<=
0
)
if
(
p_fmt
->
i_sar_num
<=
0
||
p_fmt
->
i_sar_den
<=
0
)
return
NULL
;
return
NULL
;
unsigned
int
i_aspect
=
(
int64_t
)
p_fmt
->
i_sar_num
*
i_width
*
VOUT_ASPECT_FACTOR
/
p_fmt
->
i_sar_den
/
i_height
;
/* Allocate descriptor */
/* Allocate descriptor */
static
const
char
typename
[]
=
"video output"
;
static
const
char
typename
[]
=
"video output"
;
...
@@ -340,22 +327,15 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
...
@@ -340,22 +327,15 @@ vout_thread_t * vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
p_vout
->
fmt_render
=
*
p_fmt
;
/* FIXME palette */
p_vout
->
fmt_render
=
*
p_fmt
;
/* FIXME palette */
p_vout
->
fmt_in
=
*
p_fmt
;
/* FIXME palette */
p_vout
->
fmt_in
=
*
p_fmt
;
/* FIXME palette */
p_vout
->
fmt_render
.
i_chroma
=
p_vout
->
fmt_in
.
i_chroma
=
i_chroma
;
video_format_FixRgb
(
&
p_vout
->
fmt_render
);
video_format_FixRgb
(
&
p_vout
->
fmt_render
);
video_format_FixRgb
(
&
p_vout
->
fmt_in
);
video_format_FixRgb
(
&
p_vout
->
fmt_in
);
p_vout
->
render
.
i_width
=
i_width
;
p_vout
->
render
.
i_height
=
i_height
;
p_vout
->
render
.
i_chroma
=
i_chroma
;
p_vout
->
render
.
i_aspect
=
i_aspect
;
p_vout
->
render
.
i_last_used_pic
=
-
1
;
p_vout
->
render
.
i_last_used_pic
=
-
1
;
/* Zero the output heap */
/* Zero the output heap */
I_OUTPUTPICTURES
=
0
;
I_OUTPUTPICTURES
=
0
;
p_vout
->
output
.
i_width
=
0
;
p_vout
->
output
.
i_height
=
0
;
p_vout
->
output
.
i_chroma
=
0
;
p_vout
->
output
.
i_aspect
=
0
;
/* Initialize misc stuff */
/* Initialize misc stuff */
p_vout
->
i_changes
=
0
;
p_vout
->
i_changes
=
0
;
...
@@ -778,22 +758,12 @@ static int InitThread( vout_thread_t *p_vout )
...
@@ -778,22 +758,12 @@ static int InitThread( vout_thread_t *p_vout )
msg_Dbg
(
p_vout
,
"got %i direct buffer(s)"
,
I_OUTPUTPICTURES
);
msg_Dbg
(
p_vout
,
"got %i direct buffer(s)"
,
I_OUTPUTPICTURES
);
if
(
!
p_vout
->
fmt_out
.
i_width
||
!
p_vout
->
fmt_out
.
i_height
)
assert
(
p_vout
->
fmt_out
.
i_width
>
0
&&
p_vout
->
fmt_out
.
i_height
>
0
);
{
p_vout
->
fmt_out
.
i_width
=
p_vout
->
fmt_out
.
i_visible_width
=
p_vout
->
output
.
i_width
;
p_vout
->
fmt_out
.
i_height
=
p_vout
->
fmt_out
.
i_visible_height
=
p_vout
->
output
.
i_height
;
p_vout
->
fmt_out
.
i_x_offset
=
p_vout
->
fmt_out
.
i_y_offset
=
0
;
p_vout
->
fmt_out
.
i_chroma
=
p_vout
->
output
.
i_chroma
;
}
if
(
!
p_vout
->
fmt_out
.
i_sar_num
||
!
p_vout
->
fmt_out
.
i_sar_num
)
if
(
!
p_vout
->
fmt_out
.
i_sar_num
||
!
p_vout
->
fmt_out
.
i_sar_num
)
{
{
p_vout
->
fmt_out
.
i_sar_num
=
p_vout
->
output
.
i_aspect
*
/* FIXME is it possible to end up here ? */
p_vout
->
fmt_out
.
i_height
;
p_vout
->
fmt_out
.
i_sar_num
=
1
;
p_vout
->
fmt_out
.
i_sar_den
=
VOUT_ASPECT_FACTOR
*
p_vout
->
fmt_out
.
i_sar_den
=
1
;
p_vout
->
fmt_out
.
i_width
;
}
}
vlc_ureduce
(
&
p_vout
->
fmt_out
.
i_sar_num
,
&
p_vout
->
fmt_out
.
i_sar_den
,
vlc_ureduce
(
&
p_vout
->
fmt_out
.
i_sar_num
,
&
p_vout
->
fmt_out
.
i_sar_den
,
...
@@ -833,9 +803,9 @@ static int InitThread( vout_thread_t *p_vout )
...
@@ -833,9 +803,9 @@ static int InitThread( vout_thread_t *p_vout )
p_vout
->
fmt_out
.
i_sar_num
,
p_vout
->
fmt_out
.
i_sar_den
,
p_vout
->
fmt_out
.
i_sar_num
,
p_vout
->
fmt_out
.
i_sar_den
,
p_vout
->
fmt_out
.
i_rmask
,
p_vout
->
fmt_out
.
i_gmask
,
p_vout
->
fmt_out
.
i_bmask
);
p_vout
->
fmt_out
.
i_rmask
,
p_vout
->
fmt_out
.
i_gmask
,
p_vout
->
fmt_out
.
i_bmask
);
assert
(
p_vout
->
output
.
i_width
==
p_vout
->
render
.
i_width
&&
assert
(
p_vout
->
fmt_out
.
i_width
==
p_vout
->
fmt_
render
.
i_width
&&
p_vout
->
output
.
i_height
==
p_vout
->
render
.
i_height
&&
p_vout
->
fmt_out
.
i_height
==
p_vout
->
fmt_
render
.
i_height
&&
p_vout
->
output
.
i_chroma
==
p_vout
->
render
.
i_chroma
);
p_vout
->
fmt_out
.
i_chroma
==
p_vout
->
fmt_
render
.
i_chroma
);
/* Check whether we managed to create direct buffers similar to
/* Check whether we managed to create direct buffers similar to
* the render buffers, ie same size and chroma */
* the render buffers, ie same size and chroma */
...
...
src/video_output/video_widgets.c
View file @
4cd0b036
...
@@ -46,8 +46,10 @@ void vout_OSDSlider( vlc_object_t *p_caller, int i_channel, int i_position,
...
@@ -46,8 +46,10 @@ void vout_OSDSlider( vlc_object_t *p_caller, int i_channel, int i_position,
if
(
p_vout
&&
(
var_InheritBool
(
p_caller
,
"osd"
)
&&
(
i_position
>=
0
)
)
)
if
(
p_vout
&&
(
var_InheritBool
(
p_caller
,
"osd"
)
&&
(
i_position
>=
0
)
)
)
{
{
osd_Slider
(
p_caller
,
vout_GetSpu
(
p_vout
),
p_vout
->
render
.
i_width
,
osd_Slider
(
p_caller
,
vout_GetSpu
(
p_vout
),
p_vout
->
render
.
i_height
,
p_vout
->
fmt_in
.
i_x_offset
,
p_vout
->
fmt_render
.
i_width
,
p_vout
->
fmt_render
.
i_height
,
p_vout
->
fmt_in
.
i_x_offset
,
p_vout
->
fmt_in
.
i_height
-
p_vout
->
fmt_in
.
i_visible_height
p_vout
->
fmt_in
.
i_height
-
p_vout
->
fmt_in
.
i_visible_height
-
p_vout
->
fmt_in
.
i_y_offset
,
-
p_vout
->
fmt_in
.
i_y_offset
,
i_channel
,
i_position
,
i_type
);
i_channel
,
i_position
,
i_type
);
...
@@ -70,8 +72,8 @@ void vout_OSDIcon( vlc_object_t *p_caller, int i_channel, short i_type )
...
@@ -70,8 +72,8 @@ void vout_OSDIcon( vlc_object_t *p_caller, int i_channel, short i_type )
{
{
osd_Icon
(
p_caller
,
osd_Icon
(
p_caller
,
vout_GetSpu
(
p_vout
),
vout_GetSpu
(
p_vout
),
p_vout
->
render
.
i_width
,
p_vout
->
fmt_
render
.
i_width
,
p_vout
->
render
.
i_height
,
p_vout
->
fmt_
render
.
i_height
,
p_vout
->
fmt_in
.
i_width
-
p_vout
->
fmt_in
.
i_visible_width
p_vout
->
fmt_in
.
i_width
-
p_vout
->
fmt_in
.
i_visible_width
-
p_vout
->
fmt_in
.
i_x_offset
,
-
p_vout
->
fmt_in
.
i_x_offset
,
p_vout
->
fmt_in
.
i_y_offset
,
p_vout
->
fmt_in
.
i_y_offset
,
...
...
src/video_output/vout_intf.c
View file @
4cd0b036
...
@@ -817,10 +817,6 @@ static int AspectCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -817,10 +817,6 @@ static int AspectCallback( vlc_object_t *p_this, char const *psz_cmd,
/* Restore defaults */
/* Restore defaults */
p_vout
->
fmt_in
.
i_sar_num
=
p_vout
->
fmt_render
.
i_sar_num
;
p_vout
->
fmt_in
.
i_sar_num
=
p_vout
->
fmt_render
.
i_sar_num
;
p_vout
->
fmt_in
.
i_sar_den
=
p_vout
->
fmt_render
.
i_sar_den
;
p_vout
->
fmt_in
.
i_sar_den
=
p_vout
->
fmt_render
.
i_sar_den
;
p_vout
->
render
.
i_aspect
=
(
int64_t
)
p_vout
->
fmt_render
.
i_sar_num
*
p_vout
->
fmt_render
.
i_width
*
VOUT_ASPECT_FACTOR
/
p_vout
->
fmt_render
.
i_sar_den
/
p_vout
->
fmt_render
.
i_height
;
if
(
!
psz_parser
)
goto
aspect_end
;
if
(
!
psz_parser
)
goto
aspect_end
;
...
@@ -835,18 +831,12 @@ static int AspectCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -835,18 +831,12 @@ static int AspectCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_ureduce
(
&
i_sar_num
,
&
i_sar_den
,
i_sar_num
,
i_sar_den
,
0
);
vlc_ureduce
(
&
i_sar_num
,
&
i_sar_den
,
i_sar_num
,
i_sar_den
,
0
);
p_vout
->
fmt_in
.
i_sar_num
=
i_sar_num
;
p_vout
->
fmt_in
.
i_sar_num
=
i_sar_num
;
p_vout
->
fmt_in
.
i_sar_den
=
i_sar_den
;
p_vout
->
fmt_in
.
i_sar_den
=
i_sar_den
;
p_vout
->
render
.
i_aspect
=
i_aspect_num
*
VOUT_ASPECT_FACTOR
/
i_aspect_den
;
aspect_end:
aspect_end:
if
(
p_vout
->
p
->
i_par_num
&&
p_vout
->
p
->
i_par_den
)
if
(
p_vout
->
p
->
i_par_num
&&
p_vout
->
p
->
i_par_den
)
{
{
p_vout
->
fmt_in
.
i_sar_num
*=
p_vout
->
p
->
i_par_den
;
p_vout
->
fmt_in
.
i_sar_num
*=
p_vout
->
p
->
i_par_den
;
p_vout
->
fmt_in
.
i_sar_den
*=
p_vout
->
p
->
i_par_num
;
p_vout
->
fmt_in
.
i_sar_den
*=
p_vout
->
p
->
i_par_num
;
p_vout
->
render
.
i_aspect
=
(
int64_t
)
p_vout
->
fmt_in
.
i_sar_num
*
p_vout
->
fmt_in
.
i_width
*
VOUT_ASPECT_FACTOR
/
p_vout
->
fmt_in
.
i_sar_den
/
p_vout
->
fmt_in
.
i_height
;
}
}
p_vout
->
i_changes
|=
VOUT_ASPECT_CHANGE
;
p_vout
->
i_changes
|=
VOUT_ASPECT_CHANGE
;
...
...
src/video_output/vout_pictures.c
View file @
4cd0b036
...
@@ -167,10 +167,9 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
...
@@ -167,10 +167,9 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
if
(
p_freepic
!=
NULL
)
if
(
p_freepic
!=
NULL
)
{
{
vout_AllocatePicture
(
VLC_OBJECT
(
p_vout
),
vout_AllocatePicture
(
VLC_OBJECT
(
p_vout
),
p_freepic
,
p_vout
->
render
.
i_chroma
,
p_freepic
,
p_vout
->
fmt_render
.
i_chroma
,
p_vout
->
render
.
i_width
,
p_vout
->
render
.
i_height
,
p_vout
->
fmt_render
.
i_width
,
p_vout
->
fmt_render
.
i_height
,
p_vout
->
render
.
i_aspect
*
p_vout
->
render
.
i_height
,
p_vout
->
fmt_in
.
i_sar_num
,
p_vout
->
fmt_in
.
i_sar_den
);
/* The right AR is in fmt_in and not fmt_render */
VOUT_ASPECT_FACTOR
*
p_vout
->
render
.
i_width
);
if
(
p_freepic
->
i_planes
)
if
(
p_freepic
->
i_planes
)
{
{
...
...
src/video_output/vout_wrapper.c
View file @
4cd0b036
...
@@ -146,19 +146,13 @@ int vout_InitWrapper(vout_thread_t *vout)
...
@@ -146,19 +146,13 @@ int vout_InitWrapper(vout_thread_t *vout)
/* */
/* */
video_format_t
source
=
vd
->
source
;
video_format_t
source
=
vd
->
source
;
vout
->
output
.
i_chroma
=
source
.
i_chroma
;
vout
->
fmt_out
.
i_chroma
=
source
.
i_chroma
;
vout
->
output
.
i_width
=
source
.
i_width
;
vout
->
output
.
i_height
=
source
.
i_height
;
vout
->
output
.
i_aspect
=
(
int64_t
)
source
.
i_sar_num
*
source
.
i_width
*
VOUT_ASPECT_FACTOR
/
source
.
i_sar_den
/
source
.
i_height
;
/* also set fmt_out (completly broken API) */
vout
->
fmt_out
.
i_chroma
=
vout
->
output
.
i_chroma
;
vout
->
fmt_out
.
i_width
=
vout
->
fmt_out
.
i_width
=
vout
->
fmt_out
.
i_visible_width
=
vout
->
output
.
i_width
;
vout
->
fmt_out
.
i_visible_width
=
source
.
i_width
;
vout
->
fmt_out
.
i_height
=
vout
->
fmt_out
.
i_height
=
vout
->
fmt_out
.
i_visible_height
=
vout
->
output
.
i_height
;
vout
->
fmt_out
.
i_visible_height
=
source
.
i_height
;
vout
->
fmt_out
.
i_sar_num
=
vout
->
output
.
i_aspect
*
vout
->
output
.
i_height
;
vout
->
fmt_out
.
i_sar_num
=
source
.
i_sar_num
;
vout
->
fmt_out
.
i_sar_den
=
VOUT_ASPECT_FACTOR
*
vout
->
output
.
i_width
;
vout
->
fmt_out
.
i_sar_den
=
source
.
i_sar_den
;
vout
->
fmt_out
.
i_x_offset
=
0
;
vout
->
fmt_out
.
i_x_offset
=
0
;
vout
->
fmt_out
.
i_y_offset
=
0
;
vout
->
fmt_out
.
i_y_offset
=
0
;
vout
->
fmt_out
.
i_rmask
=
source
.
i_rmask
;
vout
->
fmt_out
.
i_rmask
=
source
.
i_rmask
;
...
@@ -277,8 +271,6 @@ int vout_ManageWrapper(vout_thread_t *vout)
...
@@ -277,8 +271,6 @@ int vout_ManageWrapper(vout_thread_t *vout)
vout
->
i_changes
&=
~
VOUT_FULLSCREEN_CHANGE
;
vout
->
i_changes
&=
~
VOUT_FULLSCREEN_CHANGE
;
}
}
if
(
vout
->
i_changes
&
VOUT_ASPECT_CHANGE
)
{
if
(
vout
->
i_changes
&
VOUT_ASPECT_CHANGE
)
{
vout
->
output
.
i_aspect
=
(
int64_t
)
vout
->
fmt_in
.
i_sar_num
*
vout
->
fmt_in
.
i_width
*
VOUT_ASPECT_FACTOR
/
vout
->
fmt_in
.
i_sar_den
/
vout
->
fmt_in
.
i_height
;
vout
->
fmt_out
.
i_sar_num
=
vout
->
fmt_in
.
i_sar_num
;
vout
->
fmt_out
.
i_sar_num
=
vout
->
fmt_in
.
i_sar_num
;
vout
->
fmt_out
.
i_sar_den
=
vout
->
fmt_in
.
i_sar_den
;
vout
->
fmt_out
.
i_sar_den
=
vout
->
fmt_in
.
i_sar_den
;
...
...
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