VideoStitch.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. //
  2. // Notice Regarding Standards. AMD does not provide a license or sublicense to
  3. // any Intellectual Property Rights relating to any standards, including but not
  4. // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4;
  5. // AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3
  6. // (collectively, the "Media Technologies"). For clarity, you will pay any
  7. // royalties due for such third party technologies, which may include the Media
  8. // Technologies that are owed as a result of AMD providing the Software to you.
  9. //
  10. // MIT license
  11. //
  12. //
  13. // Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
  14. //
  15. // Permission is hereby granted, free of charge, to any person obtaining a copy
  16. // of this software and associated documentation files (the "Software"), to deal
  17. // in the Software without restriction, including without limitation the rights
  18. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  19. // copies of the Software, and to permit persons to whom the Software is
  20. // furnished to do so, subject to the following conditions:
  21. //
  22. // The above copyright notice and this permission notice shall be included in
  23. // all copies or substantial portions of the Software.
  24. //
  25. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  26. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  27. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  28. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  29. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  30. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  31. // THE SOFTWARE.
  32. //
  33. /**
  34. ***************************************************************************************************
  35. * @file VideoStitch.h
  36. * @brief AMFVideoStitch interface declaration
  37. ***************************************************************************************************
  38. */
  39. #ifndef AMF_VideoStitch_h
  40. #define AMF_VideoStitch_h
  41. #pragma once
  42. #include "public/include/components/Component.h"
  43. #define AMFVideoStitch L"AMFVideoStitch" //Component name
  44. // static properties
  45. #define AMF_VIDEO_STITCH_OUTPUT_FORMAT L"OutputFormat" // Values, AMF_SURFACE_BGRA or AMF_SURFACE_RGBA
  46. #define AMF_VIDEO_STITCH_MEMORY_TYPE L"MemoryType" // Values, only AMF_MEMORY_DX11 is supported for now.
  47. #define AMF_VIDEO_STITCH_OUTPUT_SIZE L"OutputSize" // AMFSize, (width, height) in pixels. default= (0,0), will be the same size as input.
  48. #define AMF_VIDEO_STITCH_INPUTCOUNT L"InputCount" // amf_uint64, number of camera inputs.
  49. // individual camera direction and location
  50. #define AMF_VIDEO_CAMERA_ANGLE_PITCH L"CameraPitch" // double, in radians, default = 0, camera pitch orientation
  51. #define AMF_VIDEO_CAMERA_ANGLE_YAW L"CameraYaw" // double, in radians, default = 0, camera yaw orientation
  52. #define AMF_VIDEO_CAMERA_ANGLE_ROLL L"CameraRoll" // double, in radians, default = 0, camera roll orientation
  53. #define AMF_VIDEO_CAMERA_OFFSET_X L"CameraOffsetX" // double, in pixels, default = 0, X offset of camera center of the lens from the center of the rig.
  54. #define AMF_VIDEO_CAMERA_OFFSET_Y L"CameraOffsetY" // double, in pixels, default = 0, Y offset of camera center of the lens from the center of the rig.
  55. #define AMF_VIDEO_CAMERA_OFFSET_Z L"CameraOffsetZ" // double, in pixels, default = 0, Z offset of camera center of the lens from the center of the rig.
  56. #define AMF_VIDEO_CAMERA_HFOV L"CameraHFOV" // double, in radians, default = PI, - horizontal field of view
  57. #define AMF_VIDEO_CAMERA_SCALE L"CameraScale" // double, default = 1, scale coeff
  58. // lens correction parameters
  59. #define AMF_VIDEO_STITCH_LENS_CORR_K1 L"LensK1" // double, default = 0.
  60. #define AMF_VIDEO_STITCH_LENS_CORR_K2 L"LensK2" // double, default = 0.
  61. #define AMF_VIDEO_STITCH_LENS_CORR_K3 L"LensK3" // double, default = 0.
  62. #define AMF_VIDEO_STITCH_LENS_CORR_OFFX L"LensOffX" // double, default = 0.
  63. #define AMF_VIDEO_STITCH_LENS_CORR_OFFY L"LensOffY" // double, default = 0.
  64. #define AMF_VIDEO_STITCH_CROP L"Crop" //AMFRect, in pixels default = (0,0,0,0).
  65. #define AMF_VIDEO_STITCH_LENS_MODE L"LensMode" // Values, AMF_VIDEO_STITCH_LENS_CORR_MODE_ENUM, (default = AMF_VIDEO_STITCH_LENS_CORR_MODE_RADIAL)
  66. #define AMF_VIDEO_STITCH_OUTPUT_MODE L"OutputMode" // AMF_VIDEO_STITCH_OUTPUT_MODE_ENUM (default=AMF_VIDEO_STITCH_OUTPUT_MODE_PREVIEW)
  67. #define AMF_VIDEO_STITCH_COMBINED_SOURCE L"CombinedSource" // bool, (default=false) video sources are combined in one stream
  68. #define AMF_VIDEO_STITCH_COMPUTE_DEVICE L"ComputeDevice" // amf_int64(AMF_MEMORY_TYPE) Values, AMF_MEMORY_DX11, AMF_MEMORY_COMPUTE_FOR_DX11, AMF_MEMORY_OPENCL
  69. //for debug
  70. #define AMF_VIDEO_STITCH_WIRE_RENDER L"Wire" // bool (default=false) reder wireframe
  71. //view angle
  72. #define AMF_VIDEO_STITCH_VIEW_ROTATE_X L"AngleX" // double, in radians, default = 0 - delta from current position / automatilcally reset to 0 inside SetProperty() call
  73. #define AMF_VIDEO_STITCH_VIEW_ROTATE_Y L"AngleY" // double, in radians, default = 0 - delta from current position / automatilcally reset to 0 inside SetProperty() call
  74. #define AMF_VIDEO_STITCH_VIEW_ROTATE_Z L"AngleZ" // double, in radians, default = 0 - delta from current position / automatilcally reset to 0 inside SetProperty() call
  75. #define AMF_VIDEO_STITCH_COLOR_BALANCE L"ColorBalance" // bool (default=true) enables color balance
  76. //lens mode
  77. enum AMF_VIDEO_STITCH_LENS_ENUM
  78. {
  79. AMF_VIDEO_STITCH_LENS_RECTILINEAR = 0, //rect linear lens
  80. AMF_VIDEO_STITCH_LENS_FISHEYE_FULLFRAME = 1, //fisheye full frame
  81. AMF_VIDEO_STITCH_LENS_FISHEYE_CIRCULAR = 2, //fisheye, circular
  82. };
  83. //Output Mode
  84. enum AMF_VIDEO_STITCH_OUTPUT_MODE_ENUM
  85. {
  86. AMF_VIDEO_STITCH_OUTPUT_MODE_PREVIEW = 0, //preview mode
  87. AMF_VIDEO_STITCH_OUTPUT_MODE_EQUIRECTANGULAR = 1, //equirectangular mode
  88. AMF_VIDEO_STITCH_OUTPUT_MODE_CUBEMAP = 2, //cubemap mode
  89. AMF_VIDEO_STITCH_OUTPUT_MODE_LAST = AMF_VIDEO_STITCH_OUTPUT_MODE_CUBEMAP,
  90. };
  91. //audio mode
  92. enum AMF_VIDEO_STITCH_AUDIO_MODE_ENUM
  93. {
  94. AMF_VIDEO_STITCH_AUDIO_MODE_NONE = 0, //no audio
  95. AMF_VIDEO_STITCH_AUDIO_MODE_VIDEO = 1, //using audio from video stream
  96. AMF_VIDEO_STITCH_AUDIO_MODE_FILE = 2, //using audio from file
  97. AMF_VIDEO_STITCH_AUDIO_MODE_CAPTURE = 3, //using audio from capture device
  98. AMF_VIDEO_STITCH_AUDIO_MODE_INVALID = -1, //invalid
  99. };
  100. #if defined(_M_AMD64)
  101. #define STITCH_DLL_NAME L"amf-stitch-64.dll"
  102. #else
  103. #define STITCH_DLL_NAME L"amf-stitch-32.dll"
  104. #endif
  105. #endif //#ifndef AMF_VideoStitch_h