0004-webrtc.patch 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. From d6e19f51f0ac48898891abd124fcfbbd0131a209 Mon Sep 17 00:00:00 2001
  2. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  3. Date: Wed, 22 Jun 2022 08:41:24 +0000
  4. Subject: [PATCH 1/3] resolve missing c libraries
  5. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  6. ---
  7. audio/utility/channel_mixer.cc | 2 ++
  8. common_video/h264/sps_parser.h | 1 +
  9. modules/include/module_common_types_public.h | 1 +
  10. modules/video_coding/utility/ivf_file_reader.cc | 1 +
  11. 4 files changed, 5 insertions(+)
  12. diff --git a/audio/utility/channel_mixer.cc b/audio/utility/channel_mixer.cc
  13. index 0f1e663873..8e66f90498 100644
  14. --- a/audio/utility/channel_mixer.cc
  15. +++ b/audio/utility/channel_mixer.cc
  16. @@ -8,6 +8,8 @@
  17. * be found in the AUTHORS file in the root of the source tree.
  18. */
  19. +#include <cstring>
  20. +
  21. #include "audio/utility/channel_mixer.h"
  22. #include "audio/utility/channel_mixing_matrix.h"
  23. diff --git a/common_video/h264/sps_parser.h b/common_video/h264/sps_parser.h
  24. index da328b48b0..719da297a9 100644
  25. --- a/common_video/h264/sps_parser.h
  26. +++ b/common_video/h264/sps_parser.h
  27. @@ -11,6 +11,7 @@
  28. #ifndef COMMON_VIDEO_H264_SPS_PARSER_H_
  29. #define COMMON_VIDEO_H264_SPS_PARSER_H_
  30. +#include <cstdint>
  31. #include "absl/types/optional.h"
  32. #include "rtc_base/bitstream_reader.h"
  33. diff --git a/modules/include/module_common_types_public.h b/modules/include/module_common_types_public.h
  34. index 345e45ce12..8338a51462 100644
  35. --- a/modules/include/module_common_types_public.h
  36. +++ b/modules/include/module_common_types_public.h
  37. @@ -11,6 +11,7 @@
  38. #ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
  39. #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
  40. +#include <cstdint>
  41. #include <limits>
  42. #include "absl/types/optional.h"
  43. diff --git a/modules/video_coding/utility/ivf_file_reader.cc b/modules/video_coding/utility/ivf_file_reader.cc
  44. index 85d1fa00d7..262b141b93 100644
  45. --- a/modules/video_coding/utility/ivf_file_reader.cc
  46. +++ b/modules/video_coding/utility/ivf_file_reader.cc
  47. @@ -10,6 +10,7 @@
  48. #include "modules/video_coding/utility/ivf_file_reader.h"
  49. +#include <cstring>
  50. #include <string>
  51. #include <vector>
  52. --
  53. 2.30.2
  54. From ef765f9ab9f52854eeb0233afa2405f9e5cee8a2 Mon Sep 17 00:00:00 2001
  55. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  56. Date: Wed, 22 Jun 2022 08:41:57 +0000
  57. Subject: [PATCH 2/3] add riscv64 arch definition
  58. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  59. ---
  60. rtc_base/system/arch.h | 2 ++
  61. 1 file changed, 2 insertions(+)
  62. diff --git a/rtc_base/system/arch.h b/rtc_base/system/arch.h
  63. index be2367b85f..dfff855bae 100644
  64. --- a/rtc_base/system/arch.h
  65. +++ b/rtc_base/system/arch.h
  66. @@ -68,9 +68,11 @@
  67. #endif
  68. #define WEBRTC_ARCH_BIG_ENDIAN
  69. #elif defined(__riscv) && __riscv_xlen == 64
  70. +#define WEBRTC_ARCH_RISCV_FAMILY
  71. #define WEBRTC_ARCH_64_BITS
  72. #define WEBRTC_ARCH_LITTLE_ENDIAN
  73. #elif defined(__riscv) && __riscv_xlen == 32
  74. +#define WEBRTC_ARCH_RISCV_FAMILY
  75. #define WEBRTC_ARCH_32_BITS
  76. #define WEBRTC_ARCH_LITTLE_ENDIAN
  77. #elif defined(__pnacl__)
  78. --
  79. 2.30.2
  80. From f66ad2fa982e2f8ed53cf552b3e3313768608663 Mon Sep 17 00:00:00 2001
  81. From: Rebecca Chang <rebecca.chang@starfivetech.com>
  82. Date: Thu, 7 Jul 2022 05:26:11 -0400
  83. Subject: [PATCH 3/3] define riscv arch for desktop_capture module
  84. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  85. ---
  86. modules/desktop_capture/differ_block.cc | 2 +-
  87. 1 file changed, 1 insertion(+), 1 deletion(-)
  88. diff --git a/modules/desktop_capture/differ_block.cc b/modules/desktop_capture/differ_block.cc
  89. index 4f0c5430c9..a89fcc9753 100644
  90. --- a/modules/desktop_capture/differ_block.cc
  91. +++ b/modules/desktop_capture/differ_block.cc
  92. @@ -30,7 +30,7 @@ bool VectorDifference(const uint8_t* image1, const uint8_t* image2) {
  93. static bool (*diff_proc)(const uint8_t*, const uint8_t*) = nullptr;
  94. if (!diff_proc) {
  95. -#if defined(WEBRTC_ARCH_ARM_FAMILY) || defined(WEBRTC_ARCH_MIPS_FAMILY)
  96. +#if defined(WEBRTC_ARCH_ARM_FAMILY) || defined(WEBRTC_ARCH_MIPS_FAMILY) || defined(WEBRTC_ARCH_RISCV_FAMILY)
  97. // For ARM and MIPS processors, always use C version.
  98. // TODO(hclam): Implement a NEON version.
  99. diff_proc = &VectorDifference_C;
  100. --
  101. 2.30.2