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.

36 lines
1.2KB

  1. #ifndef _webm_vpx_h_
  2. #define _webm_vpx_h_
  3. #include <stdint.h>
  4. #include <stddef.h>
  5. #if defined(__cplusplus)
  6. extern "C" {
  7. #endif
  8. // VP8/VP9/VP10
  9. struct webm_vpx_t
  10. {
  11. uint8_t profile;
  12. uint8_t level;
  13. uint8_t bit_depth;
  14. uint8_t chroma_subsampling; // 0-4:2:0 vertical, 1-4:2:0 colocated with luma (0,0), 2-4:2:2, 3-4:4:4
  15. uint8_t video_full_range_flag; // 0 = legal range (e.g. 16-235 for 8 bit sample depth); 1 = full range (e.g. 0-255 for 8-bit sample depth)
  16. uint8_t colour_primaries; // ISO/IEC 23001-8:2016
  17. uint8_t transfer_characteristics;
  18. uint8_t matrix_coefficients;
  19. uint16_t codec_intialization_data_size; // must be 0
  20. uint8_t codec_intialization_data[1]; // not used for VP8 and VP9
  21. };
  22. int webm_vpx_codec_configuration_record_load(const uint8_t* data, size_t bytes, struct webm_vpx_t* vpx);
  23. int webm_vpx_codec_configuration_record_save(const struct webm_vpx_t* vpx, uint8_t* data, size_t bytes);
  24. int webm_vpx_codec_configuration_record_from_vp8(struct webm_vpx_t* vpx, int* width, int* height, const void* keyframe, size_t bytes);
  25. int webm_vpx_codec_configuration_record_from_vp9(struct webm_vpx_t* vpx, int* width, int* height, const void* keyframe, size_t bytes);
  26. #if defined(__cplusplus)
  27. }
  28. #endif
  29. #endif /* !_webm_vpx_h_ */