FFmpeg.swscale.g.cs 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. #if UNITY_EDITOR || UNITY_STANDALONE
  2. using System;
  3. using System.Runtime.InteropServices;
  4. namespace FFmpeg.AutoGen
  5. {
  6. public unsafe partial struct SwsVector
  7. {
  8. public double* @coeff;
  9. public int @length;
  10. }
  11. public unsafe partial struct SwsFilter
  12. {
  13. public SwsVector* @lumH;
  14. public SwsVector* @lumV;
  15. public SwsVector* @chrH;
  16. public SwsVector* @chrV;
  17. }
  18. public unsafe partial struct SwsContext
  19. {
  20. }
  21. public unsafe static partial class ffmpeg
  22. {
  23. public const int LIBSWSCALE_VERSION_MAJOR = 4;
  24. public const int LIBSWSCALE_VERSION_MINOR = 0;
  25. public const int LIBSWSCALE_VERSION_MICRO = 100;
  26. public const int SWS_FAST_BILINEAR = 1;
  27. public const int SWS_BILINEAR = 2;
  28. public const int SWS_BICUBIC = 4;
  29. public const int SWS_X = 8;
  30. public const int SWS_POINT = 0x10;
  31. public const int SWS_AREA = 0x20;
  32. public const int SWS_BICUBLIN = 0x40;
  33. public const int SWS_GAUSS = 0x80;
  34. public const int SWS_SINC = 0x100;
  35. public const int SWS_LANCZOS = 0x200;
  36. public const int SWS_SPLINE = 0x400;
  37. public const int SWS_SRC_V_CHR_DROP_MASK = 0x30000;
  38. public const int SWS_SRC_V_CHR_DROP_SHIFT = 16;
  39. public const int SWS_PARAM_DEFAULT = 123456;
  40. public const int SWS_PRINT_INFO = 0x1000;
  41. public const int SWS_FULL_CHR_H_INT = 0x2000;
  42. public const int SWS_FULL_CHR_H_INP = 0x4000;
  43. public const int SWS_DIRECT_BGR = 0x8000;
  44. public const int SWS_ACCURATE_RND = 0x40000;
  45. public const int SWS_BITEXACT = 0x80000;
  46. public const int SWS_ERROR_DIFFUSION = 0x800000;
  47. public const double SWS_MAX_REDUCE_CUTOFF = 0.002;
  48. public const int SWS_CS_ITU709 = 1;
  49. public const int SWS_CS_FCC = 4;
  50. public const int SWS_CS_ITU601 = 5;
  51. public const int SWS_CS_ITU624 = 5;
  52. public const int SWS_CS_SMPTE170M = 5;
  53. public const int SWS_CS_SMPTE240M = 7;
  54. public const int SWS_CS_DEFAULT = 5;
  55. #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
  56. private const string libswscale = "EasyMovieTexture";
  57. #else
  58. private const string libswscale = "swscale-4";
  59. #endif
  60. [DllImport(libswscale, EntryPoint = "swscale_version", CallingConvention = CallingConvention.Cdecl)]
  61. public static extern uint swscale_version();
  62. [DllImport(libswscale, EntryPoint = "swscale_configuration", CallingConvention = CallingConvention.Cdecl)]
  63. public static extern string swscale_configuration();
  64. [DllImport(libswscale, EntryPoint = "swscale_license", CallingConvention = CallingConvention.Cdecl)]
  65. public static extern string swscale_license();
  66. [DllImport(libswscale, EntryPoint = "sws_getCoefficients", CallingConvention = CallingConvention.Cdecl)]
  67. public static extern int* sws_getCoefficients(int @colorspace);
  68. [DllImport(libswscale, EntryPoint = "sws_isSupportedInput", CallingConvention = CallingConvention.Cdecl)]
  69. public static extern int sws_isSupportedInput(AVPixelFormat @pix_fmt);
  70. [DllImport(libswscale, EntryPoint = "sws_isSupportedOutput", CallingConvention = CallingConvention.Cdecl)]
  71. public static extern int sws_isSupportedOutput(AVPixelFormat @pix_fmt);
  72. [DllImport(libswscale, EntryPoint = "sws_isSupportedEndiannessConversion", CallingConvention = CallingConvention.Cdecl)]
  73. public static extern int sws_isSupportedEndiannessConversion(AVPixelFormat @pix_fmt);
  74. [DllImport(libswscale, EntryPoint = "sws_alloc_context", CallingConvention = CallingConvention.Cdecl)]
  75. public static extern SwsContext* sws_alloc_context();
  76. [DllImport(libswscale, EntryPoint = "sws_init_context", CallingConvention = CallingConvention.Cdecl)]
  77. public static extern int sws_init_context(SwsContext* @sws_context, SwsFilter* @srcFilter, SwsFilter* @dstFilter);
  78. [DllImport(libswscale, EntryPoint = "sws_freeContext", CallingConvention = CallingConvention.Cdecl)]
  79. public static extern void sws_freeContext(SwsContext* @swsContext);
  80. [DllImport(libswscale, EntryPoint = "sws_getContext", CallingConvention = CallingConvention.Cdecl)]
  81. public static extern SwsContext* sws_getContext(int @srcW, int @srcH, AVPixelFormat @srcFormat, int @dstW, int @dstH, AVPixelFormat @dstFormat, int @flags, SwsFilter* @srcFilter, SwsFilter* @dstFilter, double* @param);
  82. [DllImport(libswscale, EntryPoint = "sws_scale", CallingConvention = CallingConvention.Cdecl)]
  83. public static extern int sws_scale(SwsContext* @c, sbyte** @srcSlice, int* @srcStride, int @srcSliceY, int @srcSliceH, sbyte** @dst, int* @dstStride);
  84. [DllImport(libswscale, EntryPoint = "sws_setColorspaceDetails", CallingConvention = CallingConvention.Cdecl)]
  85. public static extern int sws_setColorspaceDetails(SwsContext* @c, [MarshalAs(UnmanagedType.LPArray, SizeConst=4)] int[] @inv_table, int @srcRange, [MarshalAs(UnmanagedType.LPArray, SizeConst=4)] int[] @table, int @dstRange, int @brightness, int @contrast, int @saturation);
  86. [DllImport(libswscale, EntryPoint = "sws_getColorspaceDetails", CallingConvention = CallingConvention.Cdecl)]
  87. public static extern int sws_getColorspaceDetails(SwsContext* @c, int** @inv_table, int* @srcRange, int** @table, int* @dstRange, int* @brightness, int* @contrast, int* @saturation);
  88. [DllImport(libswscale, EntryPoint = "sws_allocVec", CallingConvention = CallingConvention.Cdecl)]
  89. public static extern SwsVector* sws_allocVec(int @length);
  90. [DllImport(libswscale, EntryPoint = "sws_getGaussianVec", CallingConvention = CallingConvention.Cdecl)]
  91. public static extern SwsVector* sws_getGaussianVec(double @variance, double @quality);
  92. [DllImport(libswscale, EntryPoint = "sws_getConstVec", CallingConvention = CallingConvention.Cdecl)]
  93. public static extern SwsVector* sws_getConstVec(double @c, int @length);
  94. [DllImport(libswscale, EntryPoint = "sws_getIdentityVec", CallingConvention = CallingConvention.Cdecl)]
  95. public static extern SwsVector* sws_getIdentityVec();
  96. [DllImport(libswscale, EntryPoint = "sws_scaleVec", CallingConvention = CallingConvention.Cdecl)]
  97. public static extern void sws_scaleVec(SwsVector* @a, double @scalar);
  98. [DllImport(libswscale, EntryPoint = "sws_normalizeVec", CallingConvention = CallingConvention.Cdecl)]
  99. public static extern void sws_normalizeVec(SwsVector* @a, double @height);
  100. [DllImport(libswscale, EntryPoint = "sws_convVec", CallingConvention = CallingConvention.Cdecl)]
  101. public static extern void sws_convVec(SwsVector* @a, SwsVector* @b);
  102. [DllImport(libswscale, EntryPoint = "sws_addVec", CallingConvention = CallingConvention.Cdecl)]
  103. public static extern void sws_addVec(SwsVector* @a, SwsVector* @b);
  104. [DllImport(libswscale, EntryPoint = "sws_subVec", CallingConvention = CallingConvention.Cdecl)]
  105. public static extern void sws_subVec(SwsVector* @a, SwsVector* @b);
  106. [DllImport(libswscale, EntryPoint = "sws_shiftVec", CallingConvention = CallingConvention.Cdecl)]
  107. public static extern void sws_shiftVec(SwsVector* @a, int @shift);
  108. [DllImport(libswscale, EntryPoint = "sws_cloneVec", CallingConvention = CallingConvention.Cdecl)]
  109. public static extern SwsVector* sws_cloneVec(SwsVector* @a);
  110. [DllImport(libswscale, EntryPoint = "sws_printVec2", CallingConvention = CallingConvention.Cdecl)]
  111. public static extern void sws_printVec2(SwsVector* @a, AVClass* @log_ctx, int @log_level);
  112. [DllImport(libswscale, EntryPoint = "sws_freeVec", CallingConvention = CallingConvention.Cdecl)]
  113. public static extern void sws_freeVec(SwsVector* @a);
  114. [DllImport(libswscale, EntryPoint = "sws_getDefaultFilter", CallingConvention = CallingConvention.Cdecl)]
  115. public static extern SwsFilter* sws_getDefaultFilter(float @lumaGBlur, float @chromaGBlur, float @lumaSharpen, float @chromaSharpen, float @chromaHShift, float @chromaVShift, int @verbose);
  116. [DllImport(libswscale, EntryPoint = "sws_freeFilter", CallingConvention = CallingConvention.Cdecl)]
  117. public static extern void sws_freeFilter(SwsFilter* @filter);
  118. [DllImport(libswscale, EntryPoint = "sws_getCachedContext", CallingConvention = CallingConvention.Cdecl)]
  119. public static extern SwsContext* sws_getCachedContext(SwsContext* @context, int @srcW, int @srcH, AVPixelFormat @srcFormat, int @dstW, int @dstH, AVPixelFormat @dstFormat, int @flags, SwsFilter* @srcFilter, SwsFilter* @dstFilter, double* @param);
  120. [DllImport(libswscale, EntryPoint = "sws_convertPalette8ToPacked32", CallingConvention = CallingConvention.Cdecl)]
  121. public static extern void sws_convertPalette8ToPacked32(sbyte* @src, sbyte* @dst, int @num_pixels, sbyte* @palette);
  122. [DllImport(libswscale, EntryPoint = "sws_convertPalette8ToPacked24", CallingConvention = CallingConvention.Cdecl)]
  123. public static extern void sws_convertPalette8ToPacked24(sbyte* @src, sbyte* @dst, int @num_pixels, sbyte* @palette);
  124. [DllImport(libswscale, EntryPoint = "sws_get_class", CallingConvention = CallingConvention.Cdecl)]
  125. public static extern AVClass* sws_get_class();
  126. }
  127. }
  128. #endif