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
bc975106
Commit
bc975106
authored
May 08, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed xcb yv12/i420 UV planes swapping.
parent
7b664151
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/video_output/xcb/xvideo.c
modules/video_output/xcb/xvideo.c
+7
-2
No files found.
modules/video_output/xcb/xvideo.c
View file @
bc975106
...
@@ -86,6 +86,7 @@ struct vout_display_sys_t
...
@@ -86,6 +86,7 @@ struct vout_display_sys_t
uint16_t
width
;
/* display width */
uint16_t
width
;
/* display width */
uint16_t
height
;
/* display height */
uint16_t
height
;
/* display height */
uint32_t
data_size
;
/* picture byte size (for non-SHM) */
uint32_t
data_size
;
/* picture byte size (for non-SHM) */
bool
swap_uv
;
/* U/V pointer must be swapped in a picture */
bool
shm
;
/* whether to use MIT-SHM */
bool
shm
;
/* whether to use MIT-SHM */
bool
visible
;
/* whether it makes sense to draw at all */
bool
visible
;
/* whether it makes sense to draw at all */
...
@@ -319,6 +320,7 @@ static int Open (vlc_object_t *obj)
...
@@ -319,6 +320,7 @@ static int Open (vlc_object_t *obj)
p_sys
->
conn
=
conn
;
p_sys
->
conn
=
conn
;
p_sys
->
att
=
NULL
;
p_sys
->
att
=
NULL
;
p_sys
->
pool
=
NULL
;
p_sys
->
pool
=
NULL
;
p_sys
->
swap_uv
=
false
;
if
(
!
CheckXVideo
(
vd
,
conn
))
if
(
!
CheckXVideo
(
vd
,
conn
))
{
{
...
@@ -398,6 +400,9 @@ static int Open (vlc_object_t *obj)
...
@@ -398,6 +400,9 @@ static int Open (vlc_object_t *obj)
if
(
xfmt
!=
NULL
)
if
(
xfmt
!=
NULL
)
{
{
p_sys
->
id
=
xfmt
->
id
;
p_sys
->
id
=
xfmt
->
id
;
p_sys
->
swap_uv
=
vlc_fourcc_AreUVPlanesSwapped
(
fmt
.
i_chroma
,
chroma
);
if
(
!
p_sys
->
swap_uv
)
fmt
.
i_chroma
=
chroma
;
fmt
.
i_chroma
=
chroma
;
if
(
xfmt
->
type
==
XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB
)
if
(
xfmt
->
type
==
XCB_XV_IMAGE_FORMAT_INFO_TYPE_RGB
)
{
{
...
@@ -611,7 +616,7 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
...
@@ -611,7 +616,7 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
/* We assume that offsets[0] is zero */
/* We assume that offsets[0] is zero */
for
(
int
i
=
1
;
i
<
__MIN
(
p_sys
->
att
->
num_planes
,
PICTURE_PLANE_MAX
);
i
++
)
for
(
int
i
=
1
;
i
<
__MIN
(
p_sys
->
att
->
num_planes
,
PICTURE_PLANE_MAX
);
i
++
)
res
->
p
[
i
].
p_pixels
=
res
->
p
[
0
].
p_pixels
+
offsets
[
i
];
res
->
p
[
i
].
p_pixels
=
res
->
p
[
0
].
p_pixels
+
offsets
[
i
];
if
(
vd
->
fmt
.
i_chroma
==
VLC_CODEC_YV12
)
if
(
p_sys
->
swap_uv
)
{
/* YVU: swap U and V planes */
{
/* YVU: swap U and V planes */
uint8_t
*
buf
=
res
->
p
[
2
].
p_pixels
;
uint8_t
*
buf
=
res
->
p
[
2
].
p_pixels
;
res
->
p
[
2
].
p_pixels
=
res
->
p
[
1
].
p_pixels
;
res
->
p
[
2
].
p_pixels
=
res
->
p
[
1
].
p_pixels
;
...
...
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