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
db6d4f7d
Commit
db6d4f7d
authored
Jan 18, 2000
by
Vincent Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
YUV en couleurs.
parent
ba2a0abb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
184 additions
and
98 deletions
+184
-98
include/video_output.h
include/video_output.h
+2
-2
src/video_output/video_output.c
src/video_output/video_output.c
+10
-10
src/video_output/video_yuv.c
src/video_output/video_yuv.c
+172
-86
No files found.
include/video_output.h
View file @
db6d4f7d
...
...
@@ -22,7 +22,6 @@ typedef struct vout_tables_s
struct
{
u16
*
p_gray
;
}
gray16
;
/* gray 15, 16 bpp */
struct
{
u32
*
p_gray
;
}
gray32
;
/* gray 24, 32 bpp */
}
yuv
;
void
*
p_trans_optimized
;
/* optimized (all colors) */
}
vout_tables_t
;
/*******************************************************************************
...
...
@@ -39,6 +38,7 @@ typedef struct vout_tables_s
* i_eol number of Y samples to reach the next line
* i_pic_eol number or pixels to reach the next line
* i_scale if non 0, vertical scaling is 1 - 1/i_scale
* i_matrix_coefficients matrix coefficients
* Conditions:
* start x + i_width < picture width
* start y + i_height * (scaling factor) < picture height
...
...
@@ -47,7 +47,7 @@ typedef struct vout_tables_s
typedef
void
(
vout_convert_t
)(
p_vout_thread_t
p_vout
,
void
*
p_pic
,
yuv_data_t
*
p_y
,
yuv_data_t
*
p_u
,
yuv_data_t
*
p_v
,
int
i_width
,
int
i_height
,
int
i_eol
,
int
i_pic_eol
,
int
i_scale
);
int
i_scale
,
int
i_matrix_coefficients
);
/*******************************************************************************
* vout_scale_t: scaling function
...
...
src/video_output/video_output.c
View file @
db6d4f7d
...
...
@@ -227,7 +227,7 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, int i_type,
int
i_width
,
int
i_height
)
{
int
i_picture
;
/* picture index */
int
i_chroma_width
;
/* chroma width */
int
i_chroma_width
=
0
;
/* chroma width */
picture_t
*
p_free_picture
=
NULL
;
/* first free picture */
picture_t
*
p_destroyed_picture
=
NULL
;
/* first destroyed picture */
...
...
@@ -294,25 +294,25 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, int i_type,
switch
(
i_type
)
{
case
YUV_420_PICTURE
:
/* YUV 420: 1,1/4,1/4 samples per pixel */
i_chroma_width
=
i_width
/
4
;
p_free_picture
->
p_data
=
malloc
(
i_height
*
i_chroma_width
*
6
*
sizeof
(
yuv_data_t
)
);
i_chroma_width
=
i_width
/
2
;
p_free_picture
->
p_data
=
malloc
(
i_height
*
i_chroma_width
*
3
*
sizeof
(
yuv_data_t
)
);
p_free_picture
->
p_y
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
;
p_free_picture
->
p_u
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
4
;
p_free_picture
->
p_v
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
5
;
p_free_picture
->
p_u
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
4
/
2
;
p_free_picture
->
p_v
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
5
/
2
;
break
;
case
YUV_422_PICTURE
:
/* YUV 422: 1,1/2,1/2 samples per pixel */
i_chroma_width
=
i_width
/
2
;
p_free_picture
->
p_data
=
malloc
(
i_height
*
i_chroma_width
*
4
*
sizeof
(
yuv_data_t
)
);
p_free_picture
->
p_y
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
;
p_free_picture
->
p_u
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
2
;
p_free_picture
->
p_v
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
3
;
p_free_picture
->
p_u
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
2
;
p_free_picture
->
p_v
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
3
;
break
;
case
YUV_444_PICTURE
:
/* YUV 444: 1,1,1 samples per pixel */
i_chroma_width
=
i_width
;
p_free_picture
->
p_data
=
malloc
(
i_height
*
i_chroma_width
*
3
*
sizeof
(
yuv_data_t
)
);
p_free_picture
->
p_y
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
;
p_free_picture
->
p_u
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
;
p_free_picture
->
p_v
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
2
;
p_free_picture
->
p_u
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
;
p_free_picture
->
p_v
=
(
yuv_data_t
*
)
p_free_picture
->
p_data
+
i_height
*
i_chroma_width
*
2
;
break
;
#ifdef DEBUG
default:
...
...
@@ -743,7 +743,7 @@ static void RenderPicture( vout_thread_t *p_vout, picture_t *p_pic )
p_vout
->
p_ConvertYUV420
(
p_vout
,
vout_SysGetPicture
(
p_vout
),
p_pic
->
p_y
,
p_pic
->
p_u
,
p_pic
->
p_v
,
p_pic
->
i_width
,
p_pic
->
i_height
,
0
,
0
,
4
);
4
,
p_pic
->
i_matrix_coefficients
);
break
;
case
YUV_422_PICTURE
:
/* ??? p_vout->p_convert_yuv_420( p_vout,
...
...
src/video_output/video_yuv.c
View file @
db6d4f7d
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