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
3121eb4c
Commit
3121eb4c
authored
Oct 02, 2017
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packetizer: hevc_nal: retrieve source scan
parent
39ff9cce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
modules/packetizer/hevc_nal.c
modules/packetizer/hevc_nal.c
+27
-0
modules/packetizer/hevc_nal.h
modules/packetizer/hevc_nal.h
+2
-0
No files found.
modules/packetizer/hevc_nal.c
View file @
3121eb4c
...
...
@@ -1308,6 +1308,7 @@ int hevc_compute_picture_order_count( const hevc_sequence_parameter_set_t *p_sps
struct
hevc_sei_pic_timing_t
{
nal_u4_t
pic_struct
;
nal_u2_t
source_scan_type
;
};
void
hevc_release_sei_pic_timing
(
hevc_sei_pic_timing_t
*
p_timing
)
...
...
@@ -1322,13 +1323,39 @@ hevc_sei_pic_timing_t * hevc_decode_sei_pic_timing( bs_t *p_bs,
if
(
p_timing
)
{
if
(
p_sps
->
vui
.
frame_field_info_present_flag
)
{
p_timing
->
pic_struct
=
bs_read
(
p_bs
,
4
);
p_timing
->
source_scan_type
=
bs_read
(
p_bs
,
2
);
}
else
{
p_timing
->
pic_struct
=
0
;
p_timing
->
source_scan_type
=
1
;
}
}
return
p_timing
;
}
bool
hevc_frame_is_progressive
(
const
hevc_sequence_parameter_set_t
*
p_sps
,
const
hevc_sei_pic_timing_t
*
p_timing
)
{
if
(
p_sps
->
vui_parameters_present_flag
&&
p_sps
->
vui
.
field_seq_flag
)
return
false
;
if
(
p_sps
->
profile_tier_level
.
general
.
interlaced_source_flag
&&
!
p_sps
->
profile_tier_level
.
general
.
progressive_source_flag
)
return
false
;
if
(
p_timing
&&
p_sps
->
vui
.
frame_field_info_present_flag
)
{
if
(
p_timing
->
source_scan_type
<
2
)
return
p_timing
->
source_scan_type
!=
0
;
}
return
true
;
}
uint8_t
hevc_get_num_clock_ts
(
const
hevc_sequence_parameter_set_t
*
p_sps
,
const
hevc_sei_pic_timing_t
*
p_timing
)
{
...
...
modules/packetizer/hevc_nal.h
View file @
3121eb4c
...
...
@@ -221,5 +221,7 @@ void hevc_release_sei_pic_timing( hevc_sei_pic_timing_t * );
uint8_t
hevc_get_num_clock_ts
(
const
hevc_sequence_parameter_set_t
*
,
const
hevc_sei_pic_timing_t
*
/* can be NULL */
);
bool
hevc_frame_is_progressive
(
const
hevc_sequence_parameter_set_t
*
,
const
hevc_sei_pic_timing_t
*
/* can be NULL */
);
#endif
/* HEVC_NAL_H */
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