From 17fa5af4bef85193fc737f936aca1480f1d30418 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Mon, 9 Sep 2013 10:58:21 +0300 Subject: [PATCH] Add remaining NAL unit type codes. - Fix incorrect type code for NAL_IDR_N_LP. - Unused reserved type codes have been left out. --- src/nal.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/src/nal.h b/src/nal.h index b1ca858e..6387eef7 100644 --- a/src/nal.h +++ b/src/nal.h @@ -13,17 +13,58 @@ #ifndef __NAL_H #define __NAL_H -enum { NAL_TRAIL_N = 0, NAL_TRAIL_R = 1, +/*! + * \brief NAL unit type codes + * + * These are the nal_unit_type codes from Table 7-1 ITU-T H.265 v1.0. + * The type codes have been prefixed with "NAL_". + */ +enum { + NAL_TRAIL_N = 0, + NAL_TRAIL_R = 1, + + NAL_TSA_N = 2, + NAL_TSA_R = 3, + + NAL_STSA_N = 4, + NAL_STSA_R = 5, - NAL_BLA_W_LP = 16, + NAL_RADL_N = 6, + NAL_RADL_R = 7, - NAL_IDR_W_RADL = 19, NAL_IDR_N_LP = 10, + NAL_RASL_N = 8, + NAL_RASL_R = 9, - NAL_RSV_IRAP_VCL23 = 23, + // Reserved RSV_VCL_ N/R 10-15 - /* Parameter sets */ - NAL_VID_PARAMETER_SET = 32, NAL_SEQ_PARAMETER_SET = 33, NAL_PIC_PARAMETER_SET = 34, - NAL_SUFFIT_SEI_NUT = 40 + NAL_BLA_W_LP = 16, + NAL_BLA_W_RADL = 17, + NAL_BLA_N_LP = 18, + + NAL_IDR_W_RADL = 19, + NAL_IDR_N_LP = 20, + + NAL_CRA_NUT = 21, + + // Reserved RSV_IRAP_VCL 22-23 + NAL_RSV_IRAP_VCL23 = 23, + + // Reserved RSV_VCL 24-31 + + NAL_VID_PARAMETER_SET = 32, + NAL_SEQ_PARAMETER_SET = 33, + NAL_PIC_PARAMETER_SET = 34, + + AUD_NUT = 35, + EOS_NUT = 36, + EOB_NUT = 37, + FD_NUT = 38, + + PREFIX_SEI_NUT = 39, + NAL_SUFFIT_SEI_NUT = 40, + + // Reserved RSV_NVCL 41-47 + // Unspecified UNSPEC 48-63 }; void nal_write(FILE* output, uint8_t* buffer, uint32_t buffer_len, uint8_t nal_ref, uint8_t nal_type, uint8_t temporal_id);