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.

95 lines
3.4KB

  1. /*
  2. * HEVC Supplementary Enhancement Information messages
  3. *
  4. * This file is part of Libav.
  5. *
  6. * Libav 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. * Libav 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 Libav; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifndef AVCODEC_HEVC_SEI_H
  21. #define AVCODEC_HEVC_SEI_H
  22. #include <stdint.h>
  23. #include "get_bits.h"
  24. /**
  25. * SEI message types
  26. */
  27. typedef enum {
  28. HEVC_SEI_TYPE_BUFFERING_PERIOD = 0,
  29. HEVC_SEI_TYPE_PICTURE_TIMING = 1,
  30. HEVC_SEI_TYPE_PAN_SCAN_RECT = 2,
  31. HEVC_SEI_TYPE_FILLER_PAYLOAD = 3,
  32. HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35 = 4,
  33. HEVC_SEI_TYPE_USER_DATA_UNREGISTERED = 5,
  34. HEVC_SEI_TYPE_RECOVERY_POINT = 6,
  35. HEVC_SEI_TYPE_SCENE_INFO = 9,
  36. HEVC_SEI_TYPE_FULL_FRAME_SNAPSHOT = 15,
  37. HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START = 16,
  38. HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END = 17,
  39. HEVC_SEI_TYPE_FILM_GRAIN_CHARACTERISTICS = 19,
  40. HEVC_SEI_TYPE_POST_FILTER_HINT = 22,
  41. HEVC_SEI_TYPE_TONE_MAPPING_INFO = 23,
  42. HEVC_SEI_TYPE_FRAME_PACKING = 45,
  43. HEVC_SEI_TYPE_DISPLAY_ORIENTATION = 47,
  44. HEVC_SEI_TYPE_SOP_DESCRIPTION = 128,
  45. HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS = 129,
  46. HEVC_SEI_TYPE_DECODING_UNIT_INFO = 130,
  47. HEVC_SEI_TYPE_TEMPORAL_LEVEL0_INDEX = 131,
  48. HEVC_SEI_TYPE_DECODED_PICTURE_HASH = 132,
  49. HEVC_SEI_TYPE_SCALABLE_NESTING = 133,
  50. HEVC_SEI_TYPE_REGION_REFRESH_INFO = 134,
  51. HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO = 137,
  52. HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO = 144,
  53. HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
  54. } HEVC_SEI_Type;
  55. typedef struct HEVCSEIPictureHash {
  56. uint8_t md5[3][16];
  57. uint8_t is_md5;
  58. } HEVCSEIPictureHash;
  59. typedef struct HEVCSEIFramePacking {
  60. int present;
  61. int arrangement_type;
  62. int content_interpretation_type;
  63. int quincunx_subsampling;
  64. int current_frame_is_frame0_flag;
  65. } HEVCSEIFramePacking;
  66. typedef struct HEVCSEIDisplayOrientation {
  67. int present;
  68. int anticlockwise_rotation;
  69. int hflip, vflip;
  70. } HEVCSEIDisplayOrientation;
  71. typedef struct HEVCSEIAlternativeTransfer {
  72. int present;
  73. int preferred_transfer_characteristics;
  74. } HEVCSEIAlternativeTransfer;
  75. typedef struct HEVCSEI {
  76. HEVCSEIPictureHash picture_hash;
  77. HEVCSEIFramePacking frame_packing;
  78. HEVCSEIDisplayOrientation display_orientation;
  79. HEVCSEIAlternativeTransfer alternative_transfer;
  80. } HEVCSEI;
  81. int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s,
  82. int type);
  83. #endif /* AVCODEC_HEVC_SEI_H */