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
0bcd380a
Commit
0bcd380a
authored
Oct 11, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added vlc_fourcc_GetRGBFallback.
parent
09bb05db
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
5 deletions
+77
-5
include/vlc_fourcc.h
include/vlc_fourcc.h
+8
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/misc/fourcc.c
src/misc/fourcc.c
+68
-5
No files found.
include/vlc_fourcc.h
View file @
0bcd380a
...
...
@@ -365,6 +365,14 @@ VLC_EXPORT( const char *, vlc_fourcc_GetDescription, ( int i_cat, vlc_fourcc_t i
*/
VLC_EXPORT
(
const
vlc_fourcc_t
*
,
vlc_fourcc_GetYUVFallback
,
(
vlc_fourcc_t
)
);
/**
* It returns a list (terminated with the value 0) of RGB fourccs in
* decreasing priority order for the given chroma.
*
* It will always return a non NULL pointer that must not be freed.
*/
VLC_EXPORT
(
const
vlc_fourcc_t
*
,
vlc_fourcc_GetRGBFallback
,
(
vlc_fourcc_t
)
);
/**
* It returns true if the given fourcc is YUV and false otherwise.
*/
...
...
src/libvlccore.sym
View file @
0bcd380a
...
...
@@ -486,6 +486,7 @@ vlc_fourcc_GetCodecAudio
vlc_fourcc_GetCodecFromString
vlc_fourcc_GetDescription
vlc_fourcc_IsYUV
vlc_fourcc_GetRGBFallback
vlc_fourcc_GetYUVFallback
vlc_fourcc_AreUVPlanesSwapped
vlc_gai_strerror
...
...
src/misc/fourcc.c
View file @
0bcd380a
...
...
@@ -1425,14 +1425,77 @@ static const vlc_fourcc_t p_list_YUV[] = {
0
,
};
const
vlc_fourcc_t
*
vlc_fourcc_GetYUVFallback
(
vlc_fourcc_t
i_fourcc
)
/* */
static
const
vlc_fourcc_t
p_RGB32_fallback
[]
=
{
VLC_CODEC_RGB32
,
VLC_CODEC_RGB24
,
VLC_CODEC_RGB16
,
VLC_CODEC_RGB15
,
VLC_CODEC_RGB8
,
0
,
};
static
const
vlc_fourcc_t
p_RGB24_fallback
[]
=
{
VLC_CODEC_RGB24
,
VLC_CODEC_RGB32
,
VLC_CODEC_RGB16
,
VLC_CODEC_RGB15
,
VLC_CODEC_RGB8
,
0
,
};
static
const
vlc_fourcc_t
p_RGB16_fallback
[]
=
{
VLC_CODEC_RGB16
,
VLC_CODEC_RGB24
,
VLC_CODEC_RGB32
,
VLC_CODEC_RGB15
,
VLC_CODEC_RGB8
,
0
,
};
static
const
vlc_fourcc_t
p_RGB15_fallback
[]
=
{
VLC_CODEC_RGB15
,
VLC_CODEC_RGB16
,
VLC_CODEC_RGB24
,
VLC_CODEC_RGB32
,
VLC_CODEC_RGB8
,
0
,
};
static
const
vlc_fourcc_t
p_RGB8_fallback
[]
=
{
VLC_CODEC_RGB8
,
VLC_CODEC_RGB15
,
VLC_CODEC_RGB16
,
VLC_CODEC_RGB24
,
VLC_CODEC_RGB32
,
0
,
};
static
const
vlc_fourcc_t
*
pp_RGB_fallback
[]
=
{
p_RGB32_fallback
,
p_RGB24_fallback
,
p_RGB16_fallback
,
p_RGB15_fallback
,
p_RGB8_fallback
,
NULL
,
};
/* */
static
const
vlc_fourcc_t
*
GetFallback
(
vlc_fourcc_t
i_fourcc
,
const
vlc_fourcc_t
*
pp_fallback
[],
const
vlc_fourcc_t
p_list
[]
)
{
for
(
unsigned
i
=
0
;
pp_
YUV_
fallback
[
i
];
i
++
)
for
(
unsigned
i
=
0
;
pp_fallback
[
i
];
i
++
)
{
if
(
pp_
YUV_
fallback
[
i
][
0
]
==
i_fourcc
)
return
pp_
YUV_
fallback
[
i
];
if
(
pp_fallback
[
i
][
0
]
==
i_fourcc
)
return
pp_fallback
[
i
];
}
return
p_list_YUV
;
return
p_list
;
}
const
vlc_fourcc_t
*
vlc_fourcc_GetYUVFallback
(
vlc_fourcc_t
i_fourcc
)
{
return
GetFallback
(
i_fourcc
,
pp_YUV_fallback
,
p_list_YUV
);
}
const
vlc_fourcc_t
*
vlc_fourcc_GetRGBFallback
(
vlc_fourcc_t
i_fourcc
)
{
return
GetFallback
(
i_fourcc
,
pp_RGB_fallback
,
p_RGB32_fallback
);
}
bool
vlc_fourcc_AreUVPlanesSwapped
(
vlc_fourcc_t
a
,
vlc_fourcc_t
b
)
...
...
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