diff --git a/.github/workflows/build-ffmpeg.yml b/.github/workflows/build-ffmpeg.yml index bb17aee2..9d798b3f 100644 --- a/.github/workflows/build-ffmpeg.yml +++ b/.github/workflows/build-ffmpeg.yml @@ -104,7 +104,7 @@ jobs: matrix: build: [ "manylinux_", "musllinux_" ] # arch: [ "loongarch64", "ppc64le", "riscv64", "s390x" ] - arch: [ "ppc64le" ] + arch: [ "ppc64le", "riscv64" ] steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 diff --git a/patches/ffmpeg.patch b/patches/ffmpeg.patch index 1f3bb770..631cef2f 100644 --- a/patches/ffmpeg.patch +++ b/patches/ffmpeg.patch @@ -1,8 +1,8 @@ diff --git a/configure b/configure -index 732de59292..136347a0d2 100755 +index 8f9fb04115..a70c24378d 100755 --- a/configure +++ b/configure -@@ -1886,8 +1886,6 @@ EXTERNAL_LIBRARY_GPL_LIST=" +@@ -1996,8 +1996,6 @@ EXTERNAL_LIBRARY_GPL_LIST=" libdvdread librubberband libvidstab @@ -11,12 +11,24 @@ index 732de59292..136347a0d2 100755 libxavs libxavs2 libxvid -@@ -1900,6 +1898,8 @@ EXTERNAL_LIBRARY_NONFREE_LIST=" +@@ -2010,6 +2008,8 @@ EXTERNAL_LIBRARY_NONFREE_LIST=" " - + EXTERNAL_LIBRARY_VERSION3_LIST=" + libx264 + libx265 gmp libaribb24 liblensfun +diff --git a/libavutil/riscv/cpu.c b/libavutil/riscv/cpu.c +index 8cc91625c7..481d63a39f 100644 +--- a/libavutil/riscv/cpu.c ++++ b/libavutil/riscv/cpu.c +@@ -36,6 +36,7 @@ + #include + #elif HAVE_ASM_HWPROBE_H + #include ++#include + #include + #include + diff --git a/scripts/build-ffmpeg.py b/scripts/build-ffmpeg.py index 32a51139..447af2ac 100644 --- a/scripts/build-ffmpeg.py +++ b/scripts/build-ffmpeg.py @@ -280,11 +280,12 @@ def main(): machine = platform.machine().lower() is_arm = machine in {"arm64", "aarch64"} + is_riscv = machine in {"riscv64"} use_alsa = plat == "Linux" # CUDA, AMF, and Intel VPL are not available on ARM64 Windows - use_cuda = plat in {"Linux", "Windows"} and not is_arm - use_amf = plat in {"Linux", "Windows"} and not is_arm + use_cuda = plat in {"Linux", "Windows"} and not is_arm and not is_riscv + use_amf = plat in {"Linux", "Windows"} and not is_arm and not is_riscv # Use Intel VPL (Video Processing Library) if supported to enable Intel QSV (Quick Sync Video) # hardware encoders/decoders on modern integrated and discrete Intel GPUs.