Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Merge requests
!147
Add configuration to stream, H264 support, codec selection
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add configuration to stream, H264 support, codec selection
feature/configstream
into
master
Overview
0
Commits
6
Pipelines
2
Changes
13
Merged
Nicolas Pope
requested to merge
feature/configstream
into
master
5 years ago
Overview
0
Commits
6
Pipelines
2
Changes
13
Expand
0
0
Merge request reports
Compare
master
version 1
4d48d92b
5 years ago
master (base)
and
latest version
latest version
c7a95492
6 commits,
5 years ago
version 1
4d48d92b
5 commits,
5 years ago
13 files
+
243
−
197
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
components/codecs/include/ftl/codecs/h264.hpp
0 → 100644
+
70
−
0
Options
#ifndef _FTL_CODECS_H264_HPP_
#define _FTL_CODECS_H264_HPP_
namespace
ftl
{
namespace
codecs
{
/**
* H.264 codec utility functions.
*/
namespace
h264
{
/**
* H264 Network Abstraction Layer Unit types.
*/
enum
class
NALType
:
int
{
UNSPECIFIED_0
=
0
,
CODED_SLICE_NON_IDR
=
1
,
CODED_SLICE_PART_A
=
2
,
CODED_SLICE_PART_B
=
3
,
CODED_SLICE_PART_C
=
4
,
CODED_SLICE_IDR
=
5
,
SEI
=
6
,
SPS
=
7
,
PPS
=
8
,
ACCESS_DELIMITER
=
9
,
EO_SEQ
=
10
,
EO_STREAM
=
11
,
FILTER_DATA
=
12
,
SPS_EXT
=
13
,
PREFIX_NAL_UNIT
=
14
,
SUBSET_SPS
=
15
,
RESERVED_16
=
16
,
RESERVED_17
=
17
,
RESERVED_18
=
18
,
CODED_SLICE_AUX
=
19
,
CODED_SLICE_EXT
=
20
,
CODED_SLICE_DEPTH
=
21
,
RESERVED_22
=
22
,
RESERVED_23
=
23
,
UNSPECIFIED_24
=
24
,
UNSPECIFIED_25
,
UNSPECIFIED_26
,
UNSPECIFIED_27
,
UNSPECIFIED_28
,
UNSPECIFIED_29
,
UNSPECIFIED_30
,
UNSPECIFIED_31
};
/**
* Extract the NAL unit type from the first NAL header.
* With NvPipe, the 5th byte contains the NAL Unit header.
*/
inline
NALType
getNALType
(
const
std
::
vector
<
uint8_t
>
&
data
)
{
return
static_cast
<
NALType
>
(
data
[
4
]
&
0x1F
);
}
/**
* Check the H264 bitstream for an I-Frame. With NvPipe, all I-Frames start
* with a SPS NAL unit so just check for this.
*/
inline
bool
isIFrame
(
const
std
::
vector
<
uint8_t
>
&
data
)
{
return
getNALType
(
data
)
==
NALType
::
SPS
;
}
}
}
}
#endif // _FTL_CODECS_H264_HPP_
Loading