Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
999e487e
Commit
999e487e
authored
Feb 26, 2018
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codec: hxxx_helper: add hxxx_helper_get_chroma_chroma
parent
733e8f7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
modules/codec/hxxx_helper.c
modules/codec/hxxx_helper.c
+31
-0
modules/codec/hxxx_helper.h
modules/codec/hxxx_helper.h
+4
-0
No files found.
modules/codec/hxxx_helper.c
View file @
999e487e
...
...
@@ -930,6 +930,37 @@ hxxx_helper_get_current_profile_level(const struct hxxx_helper *hh,
return
VLC_EGENERIC
;
}
int
hxxx_helper_get_chroma_chroma
(
const
struct
hxxx_helper
*
hh
,
uint8_t
*
pi_chroma_format
,
uint8_t
*
pi_depth_luma
,
uint8_t
*
pi_depth_chroma
)
{
switch
(
hh
->
i_codec
)
{
case
VLC_CODEC_H264
:
{
const
struct
hxxx_helper_nal
*
hsps
=
h264_helper_get_current_sps
(
hh
);
if
(
hsps
==
NULL
)
return
VLC_EGENERIC
;
return
h264_get_chroma_luma
(
hsps
->
h264_sps
,
pi_chroma_format
,
pi_depth_luma
,
pi_depth_chroma
)
==
true
?
VLC_SUCCESS
:
VLC_EGENERIC
;
}
case
VLC_CODEC_HEVC
:
{
const
struct
hxxx_helper_nal
*
hsps
=
&
hh
->
hevc
.
sps_list
[
hh
->
hevc
.
i_current_sps
];
if
(
hsps
==
NULL
||
hsps
->
hevc_sps
==
NULL
)
return
VLC_EGENERIC
;
return
hevc_get_chroma_luma
(
hsps
->
hevc_sps
,
pi_chroma_format
,
pi_depth_luma
,
pi_depth_chroma
)
==
true
?
VLC_SUCCESS
:
VLC_EGENERIC
;
}
default:
vlc_assert_unreachable
();
}
}
int
hxxx_helper_get_colorimetry
(
const
struct
hxxx_helper
*
hh
,
video_color_primaries_t
*
p_primaries
,
...
...
modules/codec/hxxx_helper.h
View file @
999e487e
...
...
@@ -106,6 +106,10 @@ int h264_helper_get_current_dpb_values(const struct hxxx_helper *hh,
int
hxxx_helper_get_current_profile_level
(
const
struct
hxxx_helper
*
hh
,
uint8_t
*
p_profile
,
uint8_t
*
p_level
);
int
hxxx_helper_get_chroma_chroma
(
const
struct
hxxx_helper
*
hh
,
uint8_t
*
pi_chroma_format
,
uint8_t
*
pi_depth_luma
,
uint8_t
*
pi_depth_chroma
);
int
hxxx_helper_get_colorimetry
(
const
struct
hxxx_helper
*
hh
,
video_color_primaries_t
*
p_primaries
,
video_transfer_func_t
*
p_transfer
,
...
...
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