Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer
Submodule .devcontainer updated 59 files
+185 −0 .github/actions/cmake-build/action.yml
+10 −16 .github/wf-templates/xpbuild.yml
+1 −2 .github/wf-templates/xprelease.yml
+61 −17 .github/workflows/README.md
+67 −60 .github/workflows/build-linux.yml
+7 −35 .github/workflows/build-macos.yml
+7 −43 .github/workflows/build-windows.yml
+75 −122 .github/workflows/release-from-build.yml
+288 −0 .windsurf/workflows/manifestUpdate.md
+3 −3 README.md
+0 −40 cmake/Findexdlpro.cmake
+75 −64 cmake/README.md
+1 −1 cmake/cpack/README.md
+78 −13 cmake/deps.cmake
+7 −8 cmake/deps.dot
+ cmake/deps.png
+499 −0 cmake/deps.svg
+0 −0 cmake/legacy/Findscript.cmake.in
+0 −0 cmake/legacy/cmsappendsuffix.cmake
+0 −0 cmake/legacy/cmsconfigurefile.cmake
+0 −0 cmake/legacy/cmscopyfilemd5.cmake
+0 −0 cmake/legacy/cmscopyfiles.cmake
+0 −0 cmake/legacy/cmscopymanuals.cmake
+0 −0 cmake/legacy/cmsdownload.cmake
+0 −0 cmake/legacy/launchWorkflow.cmake
+0 −0 cmake/legacy/macpro.cmake
+1 −2 cmake/legacy/sync.cmake
+0 −0 cmake/legacy/sync.sh.in
+928 −0 cmake/legacy/xpfunmac.cmake
+0 −0 cmake/legacy/xpopts.cmake.in
+0 −0 cmake/legacy/xpsolpkg.cmake
+0 −67 cmake/presets/xpDarwinMakefilesRelease.json
+0 −67 cmake/presets/xpLinuxMakefilesRelease.json
+168 −424 cmake/pros.cmake
+14 −36 cmake/pros.md
+0 −7 cmake/usexp.cmake.in
+0 −22 cmake/usexpdev.cmake.in
+0 −0 cmake/web/NodePath.cmake
+0 −0 cmake/web/version.js.in
+0 −0 cmake/web/version.ts.in
+0 −0 cmake/web/versionjs.cmake
+0 −0 cmake/web/xpweb.cmake
+119 −8 cmake/xpcfg.cmake
+343 −1,050 cmake/xpfunmac.cmake
+6 −0 cmake/xproinc.cmake
+0 −1 cmake/xptoplevel.cmake
+6 −5 cmake/xpuse.cmake.in
+0 −1 compose.bld.sh
+0 −1 compose.ci.sh
+1 −1 compose.gpu.sh
+1 −2 compose.pro.sh
+0 −6 compose.xdl.sh
+7 −73 denv.sh
+66 −32 funcs.sh
+15 −10 graph/graph.dot
+ graph/graph.png
+1 −1 local.dockerfile
+90 −0 tools.sh
+84 −0 xp.svg
18 changes: 9 additions & 9 deletions .github/workflows/xpbuild.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Build
permissions:
contents: read
pull-requests: write
on:
push:
branches: [ "dev" ]
Expand All @@ -7,19 +10,16 @@ on:
workflow_dispatch:
jobs:
linux:
uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.2
permissions:
contents: read
pull-requests: write
packages: write
uses: externpro/externpro/.github/workflows/build-linux.yml@25.07.3
with:
cmake-workflow-preset: LinuxRelease
runon: ubuntu-latest
secrets: inherit
linux-arm64:
uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.2
with:
cmake-workflow-preset: LinuxRelease
runon: ubuntu-24.04-arm
secrets: inherit
macos:
uses: externpro/externpro/.github/workflows/build-macos.yml@25.05.2
uses: externpro/externpro/.github/workflows/build-macos.yml@25.07.3
with:
cmake-workflow-preset: DarwinRelease
secrets: inherit
3 changes: 1 addition & 2 deletions .github/workflows/xprelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ on:
jobs:
# Upload build artifacts as release assets
release-from-build:
uses: externpro/externpro/.github/workflows/release-from-build.yml@25.05.2
uses: externpro/externpro/.github/workflows/release-from-build.yml@25.07.3
with:
workflow_run_url: ${{ github.event.inputs.workflow_run_url }}
artifact_pattern: "*.tar.xz"
permissions:
contents: write
id-token: write
Expand Down
16 changes: 6 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.31)
set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake)
project(FFmpeg)
include(GNUInstallDirs)
include(xpflags)
set(libs # libraries, in linking order
# https://github.com/FFmpeg/FFmpeg/blob/n2.6.2/configure#L2667-L2675
avdevice
Expand All @@ -18,17 +16,15 @@ string(JOIN "\n" EXT1
"# https://github.com/FFmpeg/FFmpeg/blob/n2.6.2/configure#L2667-L2675"
"# TRICKY ffmpeg_all_libs used by FFmpeg-targets.cmake"
"set(ffmpeg_all_libs ${libs})"
"# FFMPEG_LIBRARIES - the FFmpeg libraries"
"set(FFMPEG_LIBRARIES \${ffmpeg_all_libs})"
"list(TRANSFORM FFMPEG_LIBRARIES PREPEND ffmpeg::)"
"list(APPEND reqVars FFMPEG_LIBRARIES)"
""
)
if(NOT DEFINED XP_INSTALL_CMAKEDIR)
set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake)
endif()
set(targetsFile ${PROJECT_NAME}-targets)
xpPackageDevel(TARGETS_FILE ${targetsFile} DEPS openh264)
xpExternPackage(NAMESPACE ffmpeg
TARGETS_FILE ${targetsFile} LIBRARIES ${libs}
BASE n4.3.1 XPDIFF "native(unix)" DEPS openh264 PVT_DEPS yasm
DESC "complete, cross-platform solution to record, convert and stream audio and video (pre-release: no windows package)"
LICENSE "[LGPL-2.1](https://www.ffmpeg.org/legal.html 'LGPL version 2.1 or later')"
)
install(FILES cmake/${targetsFile}.cmake DESTINATION ${XP_INSTALL_CMAKEDIR})
string(TOLOWER ${PROJECT_NAME} prj)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
Expand Down
26 changes: 23 additions & 3 deletions libavcodec/x86/mathops.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
{
int rt, dummy;
if (__builtin_constant_p(shift))
__asm__ (
"imull %3 \n\t"
"shrdl %4, %%edx, %%eax \n\t"
:"=a"(rt), "=d"(dummy)
:"a"(a), "rm"(b), "ci"((uint8_t)shift)
:"a"(a), "rm"(b), "i"(shift & 0x1F)
);
else
__asm__ (
"imull %3 \n\t"
"shrdl %4, %%edx, %%eax \n\t"
:"=a"(rt), "=d"(dummy)
:"a"(a), "rm"(b), "c"((uint8_t)shift)
);
return rt;
}

Expand Down Expand Up @@ -113,19 +121,31 @@ __asm__ volatile(\
// avoid +32 for shift optimization (gcc should do that ...)
#define NEG_SSR32 NEG_SSR32
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
if (__builtin_constant_p(s))
__asm__ ("sarl %1, %0\n\t"
: "+r" (a)
: "ic" ((uint8_t)(-s))
: "i" (-s & 0x1F)
);
else
__asm__ ("sarl %1, %0\n\t"
: "+r" (a)
: "c" ((uint8_t)(-s))
);
return a;
}

#define NEG_USR32 NEG_USR32
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
if (__builtin_constant_p(s))
__asm__ ("shrl %1, %0\n\t"
: "+r" (a)
: "ic" ((uint8_t)(-s))
: "i" (-s & 0x1F)
);
else
__asm__ ("shrl %1, %0\n\t"
: "+r" (a)
: "c" ((uint8_t)(-s))
);
return a;
}

Expand Down