www.pudn.com > wm2.5.zip > nalu.h
/*!
**************************************************************************************
* \file
* nal.h
* WJP FOR NAL
***************************************************************************************
*/
#ifndef _NALU_H_
#define _NALU_H_
#define NALU_TYPE_P_HEADER 1//WJP FOR NALU_TYPE
#define NALU_TYPE_IDR 2
#define NALU_TYPE_SLICE 3//WJP FOR NALU_TYPE
#define NALU_TYPE_SPS 4
#define NALU_TYPE_PPS 5
#define NALU_TYPE_SEI 6
#define NAL_REF_IDC_SPS 3
#define NAL_REF_IDC_PPS 2
#define NAL_REF_IDC_REF 1
#define NAL_REF_IDC_NONREF 0
typedef struct
{
unsigned len; //! Length of the NAL unit (Excluding the start code, which does not belong to the NALU)
int nal_unit_type; //! NALU_TYPE_xxxx
int nal_reference_idc; //! NALU_PRIORITY_xxxx
int forbidden_bit; //! should be always FALSE
Byte *buf; //! conjtains the first byte followed by the EBSP
} NALU_t;
int Form_NALU(NALU_t *nalu, int NAL_type, int NAL_ref_idc, Byte *streamBuffer, int len_data_seq);
int Write_NALU2File(NALU_t *nalu, FILE *f);
//NALU_t *nalu;
NALU_t *AllocNALU();
void FreeNALU(NALU_t *n);
#endif