상세 컨텐츠

본문 제목

NAL Unit 구조

Codec/H.264

by nowpassion 2008. 6. 27. 14:04

본문

VM14에 나와있는 NAL 유닛 구조입니다.
실제 스트림으로 나오는 것을 캡쳐 해보면, startcode(32bit), NAL Header(8bit)
RBSP 로 이루어 짐을 알 수 있습니다.

typedef
struct
{
int startcodeprefix_len;
 (Excluding the start code, which does not belong to the NALU)
unsigned len;
unsigned max_size; //!< NAL Unit Buffer size
NaluType nal_unit_type; //!< NALU_TYPE_xxxx
NalRefIdc nal_reference_idc; //!< NALU_PRIORITY_xxxx
int forbidden_bit; //!< should be always FALSE
byte *buf; //!< contains the first byte followed by the EBSP
} NALU_t;

typedef
enum {
NALU_PRIORITY_HIGHEST = 3,
NALU_PRIORITY_HIGH = 2,
NALU_PRIORITY_LOW = 1,
NALU_PRIORITY_DISPOSABLE = 0
} NalRefIdc;

//! values for nal_unit_type
typedef enum {
NALU_TYPE_SLICE = 1,
NALU_TYPE_DPA = 2,
NALU_TYPE_DPB = 3,
NALU_TYPE_DPC = 4,
NALU_TYPE_IDR = 5,
NALU_TYPE_SEI = 6,
NALU_TYPE_SPS = 7,
NALU_TYPE_PPS = 8,
NALU_TYPE_AUD = 9,
NALU_TYPE_EOSEQ = 10,
NALU_TYPE_EOSTREAM = 11,
NALU_TYPE_FILL = 12
} NaluType;

'Codec > H.264' 카테고리의 다른 글

SEI Message 구조.  (0) 2008.07.04

관련글 더보기