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
cba442e2
Commit
cba442e2
authored
May 03, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify a bit vout_ChromaCmp.
parent
d1155aae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
59 deletions
+29
-59
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+29
-59
No files found.
src/video_output/vout_pictures.c
View file @
cba442e2
...
...
@@ -955,72 +955,42 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
*/
int
vout_ChromaCmp
(
vlc_fourcc_t
i_chroma
,
vlc_fourcc_t
i_amorhc
)
{
static
const
vlc_fourcc_t
p_I420
[]
=
{
FOURCC_I420
,
FOURCC_IYUV
,
FOURCC_YV12
,
0
};
static
const
vlc_fourcc_t
p_UYVY
[]
=
{
FOURCC_UYVY
,
FOURCC_UYNV
,
FOURCC_Y422
,
0
};
static
const
vlc_fourcc_t
p_YUYV
[]
=
{
FOURCC_YUY2
,
FOURCC_YUNV
,
0
};
static
const
vlc_fourcc_t
p_GREY
[]
=
{
FOURCC_GREY
,
FOURCC_Y800
,
FOURCC_Y8
,
0
};
static
const
vlc_fourcc_t
*
pp_fcc
[]
=
{
p_I420
,
p_UYVY
,
p_YUYV
,
p_GREY
,
NULL
};
/* If they are the same, they are the same ! */
if
(
i_chroma
==
i_amorhc
)
{
return
1
;
}
/* Check for equivalence classes */
switch
(
i_chroma
)
for
(
int
i
=
0
;
pp_fcc
[
i
]
!=
NULL
;
i
++
)
{
case
FOURCC_I420
:
case
FOURCC_IYUV
:
case
FOURCC_YV12
:
switch
(
i_amorhc
)
{
case
FOURCC_I420
:
case
FOURCC_IYUV
:
case
FOURCC_YV12
:
return
1
;
default:
return
0
;
}
case
FOURCC_UYVY
:
case
FOURCC_UYNV
:
case
FOURCC_Y422
:
switch
(
i_amorhc
)
{
case
FOURCC_UYVY
:
case
FOURCC_UYNV
:
case
FOURCC_Y422
:
return
1
;
default:
return
0
;
}
case
FOURCC_YUY2
:
case
FOURCC_YUNV
:
switch
(
i_amorhc
)
{
case
FOURCC_YUY2
:
case
FOURCC_YUNV
:
return
1
;
default:
return
0
;
}
case
FOURCC_GREY
:
case
FOURCC_Y800
:
case
FOURCC_Y8
:
switch
(
i_amorhc
)
{
case
FOURCC_GREY
:
case
FOURCC_Y800
:
case
FOURCC_Y8
:
return
1
;
default:
return
0
;
}
default:
return
0
;
bool
b_fcc1
=
false
;
bool
b_fcc2
=
false
;
for
(
int
j
=
0
;
pp_fcc
[
i
][
j
]
!=
0
;
j
++
)
{
if
(
i_chroma
==
pp_fcc
[
i
][
j
]
)
b_fcc1
=
true
;
if
(
i_amorhc
==
pp_fcc
[
i
][
j
]
)
b_fcc2
=
true
;
}
if
(
b_fcc1
&&
b_fcc2
)
return
1
;
}
return
0
;
}
/*****************************************************************************
...
...
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