Enums.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. * Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include "Symbols.h"
  8. #include <AK/Types.h>
  9. namespace Video::VP9 {
  10. enum FrameType {
  11. KeyFrame,
  12. NonKeyFrame
  13. };
  14. enum ColorSpace : u8 {
  15. Unknown = 0,
  16. Bt601 = 1,
  17. Bt709 = 2,
  18. Smpte170 = 3,
  19. Smpte240 = 4,
  20. Bt2020 = 5,
  21. Reserved = 6,
  22. RGB = 7
  23. };
  24. enum ColorRange {
  25. StudioSwing,
  26. FullSwing
  27. };
  28. enum InterpolationFilter : u8 {
  29. EightTap = 0,
  30. EightTapSmooth = 1,
  31. EightTapSharp = 2,
  32. Bilinear = 3,
  33. Switchable = 4
  34. };
  35. enum ReferenceFrame : u8 {
  36. // 0 is both INTRA_FRAME and NONE because the value's meaning changes depending on which index they're in on the ref_frame array
  37. None = 0,
  38. IntraFrame = 0,
  39. LastFrame = 1,
  40. GoldenFrame = 2,
  41. AltRefFrame = 3,
  42. };
  43. enum TXMode : u8 {
  44. Only_4x4 = 0,
  45. Allow_8x8 = 1,
  46. Allow_16x16 = 2,
  47. Allow_32x32 = 3,
  48. TXModeSelect = 4,
  49. };
  50. enum TXSize : u8 {
  51. TX_4x4 = 0,
  52. TX_8x8 = 1,
  53. TX_16x16 = 2,
  54. TX_32x32 = 3,
  55. };
  56. enum ReferenceMode : u8 {
  57. SingleReference = 0,
  58. CompoundReference = 1,
  59. ReferenceModeSelect = 2,
  60. };
  61. enum BlockSubsize : u8 {
  62. Block_4x4 = 0,
  63. Block_4x8 = 1,
  64. Block_8x4 = 2,
  65. Block_8x8 = 3,
  66. Block_8x16 = 4,
  67. Block_16x8 = 5,
  68. Block_16x16 = 6,
  69. Block_16x32 = 7,
  70. Block_32x16 = 8,
  71. Block_32x32 = 9,
  72. Block_32x64 = 10,
  73. Block_64x32 = 11,
  74. Block_64x64 = 12,
  75. Block_Invalid = BLOCK_INVALID
  76. };
  77. enum Partition : u8 {
  78. PartitionNone = 0,
  79. PartitionHorizontal = 1,
  80. PartitionVertical = 2,
  81. PartitionSplit = 3,
  82. };
  83. enum IntraMode : u8 {
  84. DcPred = 0,
  85. VPred = 1,
  86. HPred = 2,
  87. D45Pred = 3,
  88. D135Pred = 4,
  89. D117Pred = 5,
  90. D153Pred = 6,
  91. D207Pred = 7,
  92. D63Pred = 8,
  93. TmPred = 9,
  94. };
  95. enum InterMode : u8 {
  96. NearestMv = 0,
  97. NearMv = 1,
  98. ZeroMv = 2,
  99. NewMv = 3,
  100. };
  101. enum MvJoint : u8 {
  102. MvJointZero = 0,
  103. MvJointHnzvz = 1,
  104. MvJointHzvnz = 2,
  105. MvJointHnzvnz = 3,
  106. };
  107. enum MvClass : u8 {
  108. MvClass0 = 0,
  109. MvClass1 = 1,
  110. MvClass2 = 2,
  111. MvClass3 = 3,
  112. MvClass4 = 4,
  113. MvClass5 = 5,
  114. MvClass6 = 6,
  115. MvClass7 = 7,
  116. MvClass8 = 8,
  117. MvClass9 = 9,
  118. MvClass10 = 10,
  119. };
  120. enum Token : u8 {
  121. ZeroToken = 0,
  122. OneToken = 1,
  123. TwoToken = 2,
  124. ThreeToken = 3,
  125. FourToken = 4,
  126. DctValCat1 = 5,
  127. DctValCat2 = 6,
  128. DctValCat3 = 7,
  129. DctValCat4 = 8,
  130. DctValCat5 = 9,
  131. DctValCat6 = 10,
  132. };
  133. }