h264hwd_nal_unit.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. --
  16. -- Abstract : Decode NAL unit header
  17. --
  18. --------------------------------------------------------------------------------
  19. --
  20. -- Version control information, please leave untouched.
  21. --
  22. -- $RCSfile: h264hwd_nal_unit.h,v $
  23. -- $Date: 2008/03/13 12:48:06 $
  24. -- $Revision: 1.1 $
  25. --
  26. ------------------------------------------------------------------------------*/
  27. /*------------------------------------------------------------------------------
  28. Table of contents
  29. 1. Include headers
  30. 2. Module defines
  31. 3. Data types
  32. 4. Function prototypes
  33. ------------------------------------------------------------------------------*/
  34. #ifndef H264HWD_NAL_UNIT_H
  35. #define H264HWD_NAL_UNIT_H
  36. /*------------------------------------------------------------------------------
  37. 1. Include headers
  38. ------------------------------------------------------------------------------*/
  39. #include "basetype.h"
  40. #include "h264hwd_stream.h"
  41. /*------------------------------------------------------------------------------
  42. 2. Module defines
  43. ------------------------------------------------------------------------------*/
  44. /* macro to determine if NAL unit pointed by pNalUnit contains an IDR slice */
  45. #define IS_IDR_NAL_UNIT(pNalUnit) \
  46. ((pNalUnit)->nalUnitType == NAL_CODED_SLICE_IDR)
  47. /*------------------------------------------------------------------------------
  48. 3. Data types
  49. ------------------------------------------------------------------------------*/
  50. typedef enum
  51. {
  52. NAL_UNSPECIFIED = 0,
  53. NAL_CODED_SLICE = 1,
  54. NAL_CODED_SLICE_DP_A = 2,
  55. NAL_CODED_SLICE_DP_B = 3,
  56. NAL_CODED_SLICE_DP_C = 4,
  57. NAL_CODED_SLICE_IDR = 5,
  58. NAL_SEI = 6,
  59. NAL_SEQ_PARAM_SET = 7,
  60. NAL_PIC_PARAM_SET = 8,
  61. NAL_ACCESS_UNIT_DELIMITER = 9,
  62. NAL_END_OF_SEQUENCE = 10,
  63. NAL_END_OF_STREAM = 11,
  64. NAL_FILLER_DATA = 12,
  65. NAL_SPS_EXT = 13,
  66. NAL_CODED_SLICE_AUX = 19,
  67. NAL_MAX_TYPE_VALUE = 31
  68. } nalUnitType_e;
  69. typedef struct
  70. {
  71. nalUnitType_e nalUnitType;
  72. u32 nalRefIdc;
  73. } nalUnit_t;
  74. /*------------------------------------------------------------------------------
  75. 4. Function prototypes
  76. ------------------------------------------------------------------------------*/
  77. u32 h264bsdDecodeNalUnit(strmData_t * pStrmData, nalUnit_t * pNalUnit);
  78. #endif /* #ifdef H264HWD_NAL_UNIT_H */