PageRenderTime 30ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/H264Dec/source/h264bsd_nal_unit.h

http://github.com/mbebenita/Broadway
C Header | 76 lines | 25 code | 13 blank | 38 comment | 1 complexity | 130a7cb11c49de6782c301575d7d3c57 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. /*
  2. * Copyright (C) 2009 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*------------------------------------------------------------------------------
  17. Table of contents
  18. 1. Include headers
  19. 2. Module defines
  20. 3. Data types
  21. 4. Function prototypes
  22. ------------------------------------------------------------------------------*/
  23. #ifndef H264SWDEC_NAL_UNIT_H
  24. #define H264SWDEC_NAL_UNIT_H
  25. /*------------------------------------------------------------------------------
  26. 1. Include headers
  27. ------------------------------------------------------------------------------*/
  28. #include "basetype.h"
  29. #include "h264bsd_stream.h"
  30. /*------------------------------------------------------------------------------
  31. 2. Module defines
  32. ------------------------------------------------------------------------------*/
  33. /* macro to determine if NAL unit pointed by pNalUnit contains an IDR slice */
  34. #define IS_IDR_NAL_UNIT(pNalUnit) \
  35. ((pNalUnit)->nalUnitType == NAL_CODED_SLICE_IDR)
  36. /*------------------------------------------------------------------------------
  37. 3. Data types
  38. ------------------------------------------------------------------------------*/
  39. typedef enum {
  40. NAL_CODED_SLICE = 1,
  41. NAL_CODED_SLICE_IDR = 5,
  42. NAL_SEI = 6,
  43. NAL_SEQ_PARAM_SET = 7,
  44. NAL_PIC_PARAM_SET = 8,
  45. NAL_ACCESS_UNIT_DELIMITER = 9,
  46. NAL_END_OF_SEQUENCE = 10,
  47. NAL_END_OF_STREAM = 11,
  48. NAL_FILLER_DATA = 12,
  49. NAL_MAX_TYPE_VALUE = 31
  50. } nalUnitType_e;
  51. typedef struct
  52. {
  53. nalUnitType_e nalUnitType;
  54. u32 nalRefIdc;
  55. } nalUnit_t;
  56. /*------------------------------------------------------------------------------
  57. 4. Function prototypes
  58. ------------------------------------------------------------------------------*/
  59. u32 h264bsdDecodeNalUnit(strmData_t *pStrmData, nalUnit_t *pNalUnit);
  60. #endif /* #ifdef H264SWDEC_NAL_UNIT_H */