dovi_meta.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright (c) 2020 Vacing Fang <vacingfang@tencent.com>
  3. *
  4. * This file is part of FFmpeg.
  5. *
  6. * FFmpeg is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * FFmpeg is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with FFmpeg; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. /**
  21. * @file
  22. * DOVI configuration
  23. */
  24. #ifndef AVUTIL_DOVI_META_H
  25. #define AVUTIL_DOVI_META_H
  26. #include <stdint.h>
  27. #include <stddef.h>
  28. /*
  29. * DOVI configuration
  30. * ref: dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2.1.2
  31. dolby-vision-bitstreams-in-mpeg-2-transport-stream-multiplex-v1.2
  32. * @code
  33. * uint8_t dv_version_major, the major version number that the stream complies with
  34. * uint8_t dv_version_minor, the minor version number that the stream complies with
  35. * uint8_t dv_profile, the Dolby Vision profile
  36. * uint8_t dv_level, the Dolby Vision level
  37. * uint8_t rpu_present_flag
  38. * uint8_t el_present_flag
  39. * uint8_t bl_present_flag
  40. * uint8_t dv_bl_signal_compatibility_id
  41. * @endcode
  42. *
  43. * @note The struct must be allocated with av_dovi_alloc() and
  44. * its size is not a part of the public ABI.
  45. */
  46. typedef struct AVDOVIDecoderConfigurationRecord {
  47. uint8_t dv_version_major;
  48. uint8_t dv_version_minor;
  49. uint8_t dv_profile;
  50. uint8_t dv_level;
  51. uint8_t rpu_present_flag;
  52. uint8_t el_present_flag;
  53. uint8_t bl_present_flag;
  54. uint8_t dv_bl_signal_compatibility_id;
  55. } AVDOVIDecoderConfigurationRecord;
  56. /**
  57. * Allocate a AVDOVIDecoderConfigurationRecord structure and initialize its
  58. * fields to default values.
  59. *
  60. * @return the newly allocated struct or NULL on failure
  61. */
  62. AVDOVIDecoderConfigurationRecord *av_dovi_alloc(size_t *size);
  63. #endif /* AVUTIL_DOVI_META_H */