您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

65 行
1.9KB

  1. #ifndef _mpeg4_hevc_h_
  2. #define _mpeg4_hevc_h_
  3. #include <stdint.h>
  4. #include <stddef.h>
  5. #if defined(__cplusplus)
  6. extern "C" {
  7. #endif
  8. struct mpeg4_hevc_t
  9. {
  10. uint8_t configurationVersion; // 1-only
  11. uint8_t general_profile_space; // 2bit,[0,3]
  12. uint8_t general_tier_flag; // 1bit,[0,1]
  13. uint8_t general_profile_idc; // 5bit,[0,31]
  14. uint32_t general_profile_compatibility_flags;
  15. uint64_t general_constraint_indicator_flags;
  16. uint8_t general_level_idc;
  17. uint16_t min_spatial_segmentation_idc;
  18. uint8_t parallelismType; // 2bit,[0,3]
  19. uint8_t chromaFormat; // 2bit,[0,3]
  20. uint8_t bitDepthLumaMinus8; // 3bit,[0,7]
  21. uint8_t bitDepthChromaMinus8; // 3bit,[0,7]
  22. uint16_t avgFrameRate;
  23. uint8_t constantFrameRate; // 2bit,[0,3]
  24. uint8_t numTemporalLayers; // 3bit,[0,7]
  25. uint8_t temporalIdNested; // 1bit,[0,1]
  26. uint8_t lengthSizeMinusOne; // 2bit,[0,3]
  27. uint8_t numOfArrays;
  28. struct
  29. {
  30. uint8_t array_completeness;
  31. uint8_t type; // nalu type
  32. uint16_t bytes;
  33. uint8_t* data;
  34. } nalu[64];
  35. uint8_t array_completeness;
  36. uint8_t data[4 * 1024];
  37. size_t off;
  38. };
  39. int mpeg4_hevc_decoder_configuration_record_load(const uint8_t* data, size_t bytes, struct mpeg4_hevc_t* hevc);
  40. int mpeg4_hevc_decoder_configuration_record_save(const struct mpeg4_hevc_t* hevc, uint8_t* data, size_t bytes);
  41. int mpeg4_hevc_to_nalu(const struct mpeg4_hevc_t* hevc, uint8_t* data, size_t bytes);
  42. int mpeg4_hevc_codecs(const struct mpeg4_hevc_t* hevc, char* codecs, size_t bytes);
  43. int h265_annexbtomp4(struct mpeg4_hevc_t* hevc, const void* data, size_t bytes, void* out, size_t size, int *vcl, int* update);
  44. int h265_mp4toannexb(const struct mpeg4_hevc_t* hevc, const void* data, size_t bytes, void* out, size_t size);
  45. /// h265_is_new_access_unit H.265 new access unit(frame)
  46. /// @return 1-new access, 0-not a new access
  47. int h265_is_new_access_unit(const uint8_t* nalu, size_t bytes);
  48. #if defined(__cplusplus)
  49. }
  50. #endif
  51. #endif /* !_mpeg4_hevc_h_ */