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
bd2d71dc
Commit
bd2d71dc
authored
Apr 04, 2017
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packetizer: hevc: parse pic timing
parent
ec9de0f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
1 deletion
+53
-1
modules/packetizer/hevc_nal.c
modules/packetizer/hevc_nal.c
+43
-0
modules/packetizer/hevc_nal.h
modules/packetizer/hevc_nal.h
+10
-1
No files found.
modules/packetizer/hevc_nal.c
View file @
bd2d71dc
...
...
@@ -1307,3 +1307,46 @@ int hevc_compute_picture_order_count( const hevc_sequence_parameter_set_t *p_sps
return
pocMSB
+
p_slice
->
pic_order_cnt_lsb
;
}
struct
hevc_sei_pic_timing_t
{
nal_u4_t
pic_struct
;
};
void
hevc_release_sei_pic_timing
(
hevc_sei_pic_timing_t
*
p_timing
)
{
free
(
p_timing
);
}
hevc_sei_pic_timing_t
*
hevc_decode_sei_pic_timing
(
bs_t
*
p_bs
,
const
hevc_sequence_parameter_set_t
*
p_sps
)
{
hevc_sei_pic_timing_t
*
p_timing
=
malloc
(
sizeof
(
*
p_timing
));
if
(
p_timing
)
{
if
(
p_sps
->
vui
.
frame_field_info_present_flag
)
p_timing
->
pic_struct
=
bs_read
(
p_bs
,
4
);
else
p_timing
->
pic_struct
=
0
;
}
return
p_timing
;
}
uint8_t
hevc_get_num_clock_ts
(
const
hevc_sequence_parameter_set_t
*
p_sps
,
const
hevc_sei_pic_timing_t
*
p_timing
)
{
if
(
p_sps
->
vui
.
frame_field_info_present_flag
&&
p_timing
&&
p_timing
->
pic_struct
<
13
)
{
/* !WARN modified with units_field_based_flag (D.3.25) for values 0, 7 and 8 */
const
uint8_t
rgi_numclock
[
13
]
=
{
2
,
1
,
1
,
2
,
2
,
3
,
3
,
4
,
6
,
1
,
1
,
1
,
1
};
return
rgi_numclock
[
p_timing
->
pic_struct
];
}
if
(
p_sps
->
vui_parameters_present_flag
)
{
if
(
p_sps
->
vui
.
field_seq_flag
)
return
1
;
/* D.3.27 */
}
return
2
;
}
modules/packetizer/hevc_nal.h
View file @
bd2d71dc
...
...
@@ -20,8 +20,8 @@
#ifndef HEVC_NAL_H
# define HEVC_NAL_H
# include <vlc_common.h>
# include <vlc_es.h>
# include <vlc_bits.h>
#define HEVC_VPS_ID_MAX 15
#define HEVC_SPS_ID_MAX 15
...
...
@@ -213,4 +213,13 @@ int hevc_compute_picture_order_count( const hevc_sequence_parameter_set_t *p_sps
const
hevc_slice_segment_header_t
*
slice
,
hevc_poc_ctx_t
*
ctx
);
typedef
struct
hevc_sei_pic_timing_t
hevc_sei_pic_timing_t
;
hevc_sei_pic_timing_t
*
hevc_decode_sei_pic_timing
(
bs_t
*
,
const
hevc_sequence_parameter_set_t
*
);
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 */
);
#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