Browse Source

h264: add write functions for NAL header

master
Christophe Massiot 8 years ago
parent
commit
fe4e1b8991
2 changed files with 24 additions and 0 deletions
  1. +7
    -0
      NEWS
  2. +17
    -0
      mpeg/h264.h

+ 7
- 0
NEWS View File

@ -1,3 +1,10 @@
1.3
===
- Add support for avcC and hvcC structures
- Add support for LOAS AAC
- Improve support for RTP
- Use ISO 6937 as default DVB charset
1.2 (31 Jan 2017)
=================
- Add partial support for ITU-T H.265

+ 17
- 0
mpeg/h264.h View File

@ -92,11 +92,28 @@ static inline uint8_t h264nal_get_type(const uint8_t *p_h264nal)
return p_h264nal[3] & 0x1f;
}
static inline void h264nalst_init(uint8_t *p_start)
{
p_start[0] = 0;
}
static inline void h264nalst_set_ref(uint8_t *p_start, uint8_t ref)
{
p_start[0] &= 0x1f;
p_start[0] |= ref << 5;
}
static inline uint8_t h264nalst_get_ref(uint8_t start)
{
return (start & 0x60) >> 5;
}
static inline void h264nalst_set_type(uint8_t *p_start, uint8_t type)
{
p_start[0] &= 0xe0;
p_start[0] |= type;
}
static inline uint8_t h264nalst_get_type(uint8_t start)
{
return start & 0x1f;

Loading…
Cancel
Save