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
2fc89606
Commit
2fc89606
authored
Dec 08, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packetizer: hevc: move NAL unit values to header
parent
826338ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
37 deletions
+39
-37
modules/packetizer/Makefile.am
modules/packetizer/Makefile.am
+2
-1
modules/packetizer/hevc.c
modules/packetizer/hevc.c
+2
-36
modules/packetizer/hevc_nal.h
modules/packetizer/hevc_nal.h
+35
-0
No files found.
modules/packetizer/Makefile.am
View file @
2fc89606
...
...
@@ -11,7 +11,8 @@ libpacketizer_vc1_plugin_la_SOURCES = packetizer/vc1.c
libpacketizer_mlp_plugin_la_SOURCES
=
packetizer/mlp.c
libpacketizer_dirac_plugin_la_SOURCES
=
packetizer/dirac.c
libpacketizer_flac_plugin_la_SOURCES
=
packetizer/flac.c
libpacketizer_hevc_plugin_la_SOURCES
=
packetizer/hevc.c
libpacketizer_hevc_plugin_la_SOURCES
=
packetizer/hevc.c
\
packetizer/hevc_nal.h
libpacketizer_avparser_plugin_la_SOURCES
=
packetizer/avparser.c
\
packetizer/avparser.h
\
...
...
modules/packetizer/hevc.c
View file @
2fc89606
...
...
@@ -37,6 +37,7 @@
#include <vlc_bits.h>
#include <vlc_block_helper.h>
#include "packetizer_helper.h"
#include "hevc_nal.h"
/*****************************************************************************
* Module descriptor
...
...
@@ -72,41 +73,6 @@ struct decoder_sys_t
};
/* NAL types from https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.265-201304-I!!PDF-E&type=items */
enum
nal_unit_type_e
{
TRAIL_N
=
0
,
TRAIL_R
=
1
,
TSA_N
=
2
,
TSA_R
=
3
,
STSA_N
=
4
,
STSA_R
=
5
,
RADL_N
=
6
,
RADL_R
=
7
,
RASL_N
=
8
,
RASL_R
=
9
,
/* 10 to 15 reserved */
/* Key frames */
BLA_W_LP
=
16
,
BLA_W_RADL
=
17
,
BLA_N_LP
=
18
,
IDR_W_RADL
=
19
,
IDR_N_LP
=
20
,
CRA
=
21
,
/* 22 to 31 reserved */
/* Non VCL NAL*/
VPS
=
32
,
SPS
=
33
,
PPS
=
34
,
AUD
=
35
,
/* Access unit delimiter */
EOS
=
36
,
/* End of sequence */
EOB
=
37
,
/* End of bitstream */
FD
=
38
,
/* Filler data*/
PREF_SEI
=
39
,
/* Prefix SEI */
SUFF_SEI
=
40
,
/* Suffix SEI */
UNKNOWN_NAL
};
static
const
uint8_t
p_hevc_startcode
[
3
]
=
{
0x00
,
0x00
,
0x01
};
/*****************************************************************************
...
...
@@ -209,7 +175,7 @@ static block_t *PacketizeParse(void *p_private, bool *pb_ts_used, block_t *p_blo
uint32_t
nalu_type
=
bs_read
(
&
bs
,
6
);
bs_skip
(
&
bs
,
9
);
if
(
nalu_type
<
VPS
)
if
(
nalu_type
<
HEVC_NAL_
VPS
)
{
/* NAL is a VCL NAL */
p_sys
->
b_vcl
=
true
;
...
...
modules/packetizer/hevc_nal.h
View file @
2fc89606
...
...
@@ -28,6 +28,41 @@
# include <vlc_common.h>
# include <vlc_codec.h>
/* NAL types from https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.265-201304-I!!PDF-E&type=items */
enum
hevc_nal_unit_type_e
{
HEVC_NAL_TRAIL_N
=
0
,
HEVC_NAL_TRAIL_R
=
1
,
HEVC_NAL_TSA_N
=
2
,
HEVC_NAL_TSA_R
=
3
,
HEVC_NAL_STSA_N
=
4
,
HEVC_NAL_STSA_R
=
5
,
HEVC_NAL_RADL_N
=
6
,
HEVC_NAL_RADL_R
=
7
,
HEVC_NAL_RASL_N
=
8
,
HEVC_NAL_RASL_R
=
9
,
/* 10 to 15 reserved */
/* Key frames */
HEVC_NAL_BLA_W_LP
=
16
,
HEVC_NAL_BLA_W_RADL
=
17
,
HEVC_NAL_BLA_N_LP
=
18
,
HEVC_NAL_IDR_W_RADL
=
19
,
HEVC_NAL_IDR_N_LP
=
20
,
HEVC_NAL_CRA
=
21
,
/* 22 to 31 reserved */
/* Non VCL NAL*/
HEVC_NAL_VPS
=
32
,
HEVC_NAL_SPS
=
33
,
HEVC_NAL_PPS
=
34
,
HEVC_NAL_AUD
=
35
,
/* Access unit delimiter */
HEVC_NAL_EOS
=
36
,
/* End of sequence */
HEVC_NAL_EOB
=
37
,
/* End of bitstream */
HEVC_NAL_FD
=
38
,
/* Filler data*/
HEVC_NAL_PREF_SEI
=
39
,
/* Prefix SEI */
HEVC_NAL_SUFF_SEI
=
40
,
/* Suffix SEI */
HEVC_NAL_UNKNOWN
};
/* Parse the hvcC Metadata and convert it to annex b format */
int
convert_hevc_nal_units
(
decoder_t
*
p_dec
,
const
uint8_t
*
p_buf
,
uint32_t
i_buf_size
,
uint8_t
*
p_out_buf
,
...
...
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