Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
bb545321
Commit
bb545321
authored
Jan 19, 2000
by
Vincent Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API vout_DateImage (mais �a ne marche pas)
Suite nettoyage
parent
3c6ac119
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
54 deletions
+63
-54
include/config.h
include/config.h
+3
-5
include/video.h
include/video.h
+5
-9
include/video_output.h
include/video_output.h
+19
-18
src/interface/interface.c
src/interface/interface.c
+10
-10
src/video_output/video_output.c
src/video_output/video_output.c
+26
-12
No files found.
include/config.h
View file @
bb545321
...
...
@@ -121,12 +121,10 @@
/* Step for changing gamma, and minimum and maximum values */
#define INTF_GAMMA_STEP .1
#define INTF_GAMMA_
MAX
3
#define INTF_GAMMA_
LIMIT
3
/* Factor for changing aspect ratio, and minimum and maximum values */
#define INTF_RATIO_FACTOR 1.1
#define INTF_RATIO_MIN .1
#define INTF_RATIO_MAX 10
/* Scaling modifier limits */
#define INTF_SCALE_LIMIT 10
/*
* X11 settings
...
...
include/video.h
View file @
bb545321
...
...
@@ -30,6 +30,11 @@ typedef struct picture_s
int
i_type
;
/* picture type */
int
i_status
;
/* picture flags */
int
i_matrix_coefficients
;
/* in YUV type, encoding type */
/* Picture management properties - these properties can be modified using
* the video output thread API, but should ne be written directly */
int
i_refcount
;
/* link reference counter */
mtime_t
date
;
/* display date */
/* Picture static properties - those properties are fixed at initialization
* and should NOT be modified */
...
...
@@ -45,20 +50,11 @@ typedef struct picture_s
int
i_display_height
;
/* useful picture height */
int
i_aspect_ratio
;
/* aspect ratio */
/* Link reference counter - it can be modified using vout_Link and
* vout_Unlink functions, or directly if the picture is independant */
int
i_refcount
;
/* link reference counter */
/* Macroblock counter - the decoder use it to verify if it has
* decoded all the macroblocks of the picture */
int
i_deccount
;
vlc_mutex_t
lock_deccount
;
/* Video properties - those properties should not be modified once
* the picture is in a heap, but can be freely modified if it is
* independant */
mtime_t
date
;
/* display date */
/* Picture data - data can always be freely modified. p_data itself
* (the pointer) should NEVER be modified. In YUV format, the p_y, p_u and
* p_v data pointers refers to different areas of p_data, and should not
...
...
include/video_output.h
View file @
bb545321
...
...
@@ -50,26 +50,26 @@ typedef void (vout_convert_t)( p_vout_thread_t p_vout, void *p_pic,
int
i_scale
,
int
i_matrix_coefficients
);
/*******************************************************************************
* vout_scale_t: scaling function
* vout_scale_t:
horizontal
scaling function
*******************************************************************************
* When a picture can't be scaled unsing the fast i_y_scale parameter of a
* transformation, it is rendered in a temporary buffer then scaled using a
* totally accurate (but also very slow) method.
* This is the prototype common to all scaling functions. The types of p_buffer
* and p_pic will change depending of the screen depth treated.
* The convertion function only perform a vertical scaling. Horizontal scaling
* is done later using this function.
* Parameters:
* p_vout video output thread
* p_pic picture address (start address in picture)
* p_buffer source picture
* i_width buffer width
* i_height buffer height
* i_eol number of pixels to reach next buffer line
* i_pic_eol number of pixels to reach next picture line
* f_alpha, f_beta horizontal and vertical scaling factors
* p_src source address (start address in picture)
* p_dst destination address (start address in picture)
* i_width source width
* i_height source height
* i_line_width source total pixels per line
* i_dst_line_width destination total pixels per line
* i_scale if non 0, horizontal scaling is 1 - 1/i_scale
* Conditions:
* i_height % 16
* i_scale < 0 if p_src == p_dst
*******************************************************************************/
typedef
void
(
vout_scale_t
)(
p_vout_thread_t
p_vout
,
void
*
p_
pic
,
void
*
p_buffer
,
int
i_width
,
int
i_height
,
int
i_
eol
,
int
i_pic_eol
,
float
f_alpha
,
float
f_beta
);
typedef
void
(
vout_scale_t
)(
p_vout_thread_t
p_vout
,
void
*
p_
src
,
void
*
p_dst
,
int
i_width
,
int
i_height
,
int
i_
line_width
,
int
i_dst_line_width
,
int
i_scale
);
/*******************************************************************************
* vout_thread_t: video output thread descriptor
...
...
@@ -99,8 +99,8 @@ typedef struct vout_thread_s
int
i_bytes_per_line
;
/* bytes per line (including virtual) */
int
i_screen_depth
;
/* bits per pixel */
int
i_bytes_per_pixel
;
/* real screen depth */
float
f_x_ratio
;
/* horizontal display ratio
*/
float
f_y_ratio
;
/* vertical display ratio
*/
int
i_horizontal_scale
;
/* horizontal display scale
*/
int
i_vertical_scale
;
/* vertical display scale
*/
float
f_gamma
;
/* gamma */
#ifdef STATS
...
...
@@ -146,6 +146,7 @@ picture_t * vout_CreatePicture ( vout_thread_t *p_vout, int i_type,
int
i_width
,
int
i_height
);
void
vout_DestroyPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
);
void
vout_DisplayPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
);
void
vout_DatePicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
mtime_t
date
);
void
vout_LinkPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
);
void
vout_UnlinkPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
);
subtitle_t
*
vout_CreateSubtitle
(
vout_thread_t
*
p_vout
,
int
i_type
,
int
i_size
);
...
...
src/interface/interface.c
View file @
bb545321
...
...
@@ -196,7 +196,7 @@ int intf_ProcessKey( intf_thread_t *p_intf, int i_key )
// ??
break
;
case
'g'
:
/* gamma - */
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_gamma
>
-
INTF_GAMMA_
MAX
)
)
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_gamma
>
-
INTF_GAMMA_
LIMIT
)
)
{
vlc_mutex_lock
(
&
p_intf
->
p_vout
->
change_lock
);
p_intf
->
p_vout
->
f_gamma
-=
INTF_GAMMA_STEP
;
...
...
@@ -205,7 +205,7 @@ int intf_ProcessKey( intf_thread_t *p_intf, int i_key )
}
break
;
case
'G'
:
/* gamma + */
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_gamma
<
INTF_GAMMA_
MAX
)
)
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_gamma
<
INTF_GAMMA_
LIMIT
)
)
{
vlc_mutex_lock
(
&
p_intf
->
p_vout
->
change_lock
);
p_intf
->
p_vout
->
f_gamma
+=
INTF_GAMMA_STEP
;
...
...
@@ -223,37 +223,37 @@ int intf_ProcessKey( intf_thread_t *p_intf, int i_key )
}
break
;
case
'x'
:
/* horizontal aspect ratio - */
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_x_ratio
>
INTF_RATIO_MIN
)
)
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
i_horizontal_scale
>
-
INTF_SCALE_LIMIT
)
)
{
vlc_mutex_lock
(
&
p_intf
->
p_vout
->
change_lock
);
p_intf
->
p_vout
->
f_x_ratio
/=
INTF_RATIO_FACTOR
;
p_intf
->
p_vout
->
i_horizontal_scale
--
;
p_intf
->
p_vout
->
i_changes
|=
VOUT_RATIO_CHANGE
;
vlc_mutex_unlock
(
&
p_intf
->
p_vout
->
change_lock
);
}
break
;
case
'X'
:
/* horizontal aspect ratio + */
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_x_ratio
<
INTF_RATIO_MAX
)
)
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
i_horizontal_scale
<
INTF_SCALE_LIMIT
)
)
{
vlc_mutex_lock
(
&
p_intf
->
p_vout
->
change_lock
);
p_intf
->
p_vout
->
f_x_ratio
*=
INTF_RATIO_FACTOR
;
p_intf
->
p_vout
->
i_horizontal_scale
++
;
p_intf
->
p_vout
->
i_changes
|=
VOUT_RATIO_CHANGE
;
vlc_mutex_unlock
(
&
p_intf
->
p_vout
->
change_lock
);
}
break
;
case
'y'
:
/* vertical aspect ratio - */
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_y_ratio
>
INTF_RATIO_MIN
)
)
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
i_vertical_scale
>
-
INTF_SCALE_LIMIT
)
)
{
vlc_mutex_lock
(
&
p_intf
->
p_vout
->
change_lock
);
p_intf
->
p_vout
->
f_y_ratio
/=
INTF_RATIO_FACTOR
;
p_intf
->
p_vout
->
i_vertical_scale
--
;
p_intf
->
p_vout
->
i_changes
|=
VOUT_RATIO_CHANGE
;
vlc_mutex_unlock
(
&
p_intf
->
p_vout
->
change_lock
);
}
break
;
case
'Y'
:
/* horizontal aspect ratio + */
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
f_y_ratio
<
INTF_RATIO_MAX
)
)
if
(
(
p_intf
->
p_vout
!=
NULL
)
&&
(
p_intf
->
p_vout
->
i_vertical_scale
<
INTF_SCALE_LIMIT
)
)
{
vlc_mutex_lock
(
&
p_intf
->
p_vout
->
change_lock
);
p_intf
->
p_vout
->
f_y_ratio
*=
INTF_RATIO_FACTOR
;
p_intf
->
p_vout
->
i_vertical_scale
++
;
p_intf
->
p_vout
->
i_changes
|=
VOUT_RATIO_CHANGE
;
vlc_mutex_unlock
(
&
p_intf
->
p_vout
->
change_lock
);
}
...
...
src/video_output/video_output.c
View file @
bb545321
...
...
@@ -83,13 +83,13 @@ vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_
p_vout
->
i_bytes_per_line
=
i_width
*
2
;
p_vout
->
i_screen_depth
=
15
;
p_vout
->
i_bytes_per_pixel
=
2
;
p_vout
->
f_x_ratio
=
1
;
p_vout
->
f_y_ratio
=
1
;
p_vout
->
i_horizontal_scale
=
0
;
p_vout
->
i_vertical_scale
=
0
;
p_vout
->
f_gamma
=
VOUT_GAMMA
;
intf_DbgMsg
(
"wished configuration: %dx%d,%d (%d bytes/pixel, %d bytes/line),
ratio %.2f:%.2f
, gray=%d
\n
"
,
intf_DbgMsg
(
"wished configuration: %dx%d,%d (%d bytes/pixel, %d bytes/line),
scaling %+d:%+d
, gray=%d
\n
"
,
p_vout
->
i_width
,
p_vout
->
i_height
,
p_vout
->
i_screen_depth
,
p_vout
->
i_bytes_per_pixel
,
p_vout
->
i_bytes_per_line
,
p_vout
->
f_x_ratio
,
p_vout
->
f_y_ratio
,
p_vout
->
b_grayscale
);
p_vout
->
i_horizontal_scale
,
p_vout
->
i_vertical_scale
,
p_vout
->
b_grayscale
);
/* Create and initialize system-dependant method - this function issues its
* own error messages */
...
...
@@ -98,11 +98,11 @@ vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_
free
(
p_vout
);
return
(
NULL
);
}
intf_DbgMsg
(
"actual configuration: %dx%d,%d (%d bytes/pixel, %d bytes/line),
ratio %.2f:%.2f
, gray=%d
\n
"
,
intf_DbgMsg
(
"actual configuration: %dx%d,%d (%d bytes/pixel, %d bytes/line),
scaling %+d:%+d
, gray=%d
\n
"
,
p_vout
->
i_width
,
p_vout
->
i_height
,
p_vout
->
i_screen_depth
,
p_vout
->
i_bytes_per_pixel
,
p_vout
->
i_bytes_per_line
,
p_vout
->
f_x_ratio
,
p_vout
->
f_y_ratio
,
p_vout
->
b_grayscale
);
p_vout
->
i_horizontal_scale
,
p_vout
->
i_vertical_scale
,
p_vout
->
b_grayscale
);
#ifdef STATS
/* Initialize statistics fields */
p_vout
->
render_time
=
0
;
...
...
@@ -253,7 +253,8 @@ void vout_DestroySubtitle( vout_thread_t *p_vout, subtitle_t *p_sub )
*******************************************************************************
* Remove the reservation flag of a picture, which will cause it to be ready for
* display. The picture does not need to be locked, since it is ignored by
* the output thread if is reserved.
* the output thread if is reserved. The picture won't be displayed until
* vout_DatePicture has been called.
*******************************************************************************/
void
vout_DisplayPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
...
...
@@ -279,6 +280,19 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
#endif
}
/*******************************************************************************
* vout_DatePicture: date a picture
*******************************************************************************
* Remove the reservation flag of a picture, which will cause it to be ready for
* display. The picture does not need to be locked, since it is ignored by
* the output thread if is reserved. The picture won't be displayed until
* vout_DisplayPicture has been called.
*******************************************************************************/
void
vout_DatePicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
,
mtime_t
date
)
{
//??
}
/*******************************************************************************
* vout_CreatePicture: allocate a picture in the video output heap.
*******************************************************************************
...
...
@@ -996,11 +1010,11 @@ static int RenderInfo( vout_thread_t *p_vout, boolean_t b_blank )
break
;
}
}
sprintf
(
psz_buffer
,
"%s %dx%d:%d
%.2f:%.2f
g%+.2f pic: %d/%d/%d"
,
sprintf
(
psz_buffer
,
"%s %dx%d:%d
scaling %+d:%+d
g%+.2f pic: %d/%d/%d"
,
p_vout
->
b_grayscale
?
"gray"
:
"rgb"
,
p_vout
->
i_width
,
p_vout
->
i_height
,
p_vout
->
i_
screen_depth
,
p_vout
->
f_x_ratio
,
p_vout
->
f_y_ratio
,
p_vout
->
f_gamma
,
i_reserved_pic
,
i_ready_pic
,
p_vout
->
i_width
,
p_vout
->
i_height
,
p_vout
->
i_screen_depth
,
p_vout
->
i_
horizontal_scale
,
p_vout
->
i_vertical_scale
,
p_vout
->
f_gamma
,
i_reserved_pic
,
i_ready_pic
,
VOUT_MAX_PICTURES
);
vout_SysPrint
(
p_vout
,
0
,
p_vout
->
i_height
,
-
1
,
1
,
psz_buffer
);
#endif
...
...
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