You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 line
1.7KB

  1. #ifndef _aom_av1_h_
  2. #define _aom_av1_h_
  3. #include <stdint.h>
  4. #include <stddef.h>
  5. #if defined(__cplusplus)
  6. extern "C" {
  7. #endif
  8. struct aom_av1_t
  9. {
  10. uint32_t marker : 1;
  11. uint32_t version : 7;
  12. uint32_t seq_profile : 3;
  13. uint32_t seq_level_idx_0 : 5;
  14. uint32_t seq_tier_0 : 1;
  15. uint32_t high_bitdepth : 1;
  16. uint32_t twelve_bit : 1;
  17. uint32_t monochrome : 1;
  18. uint32_t chroma_subsampling_x : 1;
  19. uint32_t chroma_subsampling_y : 1;
  20. uint32_t chroma_sample_position : 2;
  21. uint32_t reserved : 3;
  22. uint32_t initial_presentation_delay_present : 1;
  23. uint32_t initial_presentation_delay_minus_one : 4;
  24. uint8_t buffer_delay_length_minus_1; // decoder_model_info
  25. uint32_t width; // max_frame_width_minus_1
  26. uint32_t height; // max_frame_height_minus_1
  27. uint16_t bytes;
  28. uint8_t data[2 * 1024];
  29. };
  30. /// Create av1 codec configuration record from Sequence Header OBU
  31. /// @param[in] data av1 low overhead bitstream format
  32. /// @return 0-ok, other-error
  33. int aom_av1_codec_configuration_record_init(struct aom_av1_t* av1, const void* data, size_t bytes);
  34. int aom_av1_codec_configuration_record_load(const uint8_t* data, size_t bytes, struct aom_av1_t* av1);
  35. int aom_av1_codec_configuration_record_save(const struct aom_av1_t* av1, uint8_t* data, size_t bytes);
  36. /// @param[in] data av1 split low overhead/annexb bitstream format to obu
  37. int aom_av1_obu_split(const uint8_t* data, size_t bytes, int (*handler)(void* param, const uint8_t* obu, size_t bytes), void* param);
  38. int aom_av1_annexb_split(const uint8_t* data, size_t bytes, int (*handler)(void* param, const uint8_t* obu, size_t bytes), void* param);
  39. int aom_av1_codecs(const struct aom_av1_t* av1, char* codecs, size_t bytes);
  40. #if defined(__cplusplus)
  41. }
  42. #endif
  43. #endif /* !_aom_av1_h_ */