right now I use those patches and Slackbuild for compiling on my x86
slackware...

change from J to X was inspired by libdv patch doing reverse of this for
gcc 4.1:

https://sourceforge.net/p/libdv/mailman/message/2320559/

I also tried 'n' but build was failing too  ..

some description for those constraints:

https://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html#s6

On Saturday, April 16, 2022, Andrew Randrianasulu <randrianas...@gmail.com>
wrote:

> hold on, I am not sure what going on - I tried again with slightly
> modified cin.Slackbuild and build was failing again until I replaced 'i'
> with 'X' (anything goes here asm constrain).
>
> it seems to work afterwards - mpeg 2 / 4:2:2 encoding working at 7.5 fps
> for fullhd vid.. but I want to double-check (uname -m must return i686 for
> this code to even compile...)
>
> On Friday, April 15, 2022, Andrew Randrianasulu <randrianas...@gmail.com>
> wrote:
>
>> sorry, there was 4th patch
>>
>> On Friday, April 15, 2022, Andrew Randrianasulu <randrianas...@gmail.com>
>> wrote:
>>
>>> due to X libs/headers located in /usr/X11R7...
>>>
>>> but also due to some asm error in mpeg2enc when I build for i686
>>> target...
>>>
>>> http://forum.tinycorelinux.net/index.php/topic,18142.0.html?
>>> PHPSESSID=cd4712cf278ad777dc1c3a2356e0bf9d
>>>
>>>
>>>
>>> I added -fomit-frame-pointer to only mpeg2enc cflags and it compiled...
>>> not sure why I was not hit by this earlier, may be because I already had
>>> this in cflags?
>>>
>>>
>>>
From d65312b7a0efcca01c60a5d3f5e2043ab14b1932 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <gu...@slax.example.net>
Date: Fri, 15 Apr 2022 18:35:56 +0300
Subject: [PATCH 1/3] fix x11 linking in libzmpeg3 on my system

---
 cinelerra-5.1/libzmpeg3/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cinelerra-5.1/libzmpeg3/Makefile b/cinelerra-5.1/libzmpeg3/Makefile
index b92a33b..d854fa9 100644
--- a/cinelerra-5.1/libzmpeg3/Makefile
+++ b/cinelerra-5.1/libzmpeg3/Makefile
@@ -89,7 +89,7 @@ endif
 LIBS += $(lib_a52dec) $(lib_djbfft) $(lib_libbthread)
 
 ifeq ($(DYNAMIC_FONTS), 1)
-LIBS += -lX11
+LIBS += -lX11 `pkg-config --libs x11`
 else
 CFLAGS += -DBUILTIN_FONT_DATA 
 OBJS += $(OBJDIR)/xfont1.o
-- 
2.14.5

From 48679d63a68637195acf14fff706c613f17d7e50 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <gu...@slax.example.net>
Date: Fri, 15 Apr 2022 18:37:32 +0300
Subject: [PATCH 2/3] Fix i686 build on gcc 5

---
 cinelerra-5.1/mpeg2enc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cinelerra-5.1/mpeg2enc/Makefile b/cinelerra-5.1/mpeg2enc/Makefile
index 54fd1a3..f517e52 100644
--- a/cinelerra-5.1/mpeg2enc/Makefile
+++ b/cinelerra-5.1/mpeg2enc/Makefile
@@ -7,7 +7,7 @@ CC = gcc
 CFLAGS += -I$(TOPDIR)/libzmpeg3
 
 ifeq ($(OBJDIR), i686)
-CFLAGS += -DX86_CPU
+CFLAGS += -DX86_CPU -march=i686 -mcpu=i686 -fomit-frame-pointer
 NASMOBJ = \
 	$(OBJDIR)/bdist1_mmx.o \
 	$(OBJDIR)/bdist2_mmx.o \
-- 
2.14.5

From 7d049f50f9b9f28feab876dc2043fa1cbddae221 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <gu...@slax.example.net>
Date: Fri, 15 Apr 2022 18:38:17 +0300
Subject: [PATCH 3/3] fix libva libs for internal ffmpeg on my machine

---
 cinelerra-5.1/configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index 37607b1..1b064d3 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -1079,12 +1079,12 @@ fi
 
 FFMPEG_EXTRA_LDFLAGS=""
 if test "x$WANT_VAAPI" != "xno" -a "x$HAVE_VAAPI" = "xyes"; then
-  FFMPEG_EXTRA_LDFLAGS+=' -lva'
-  EXTRA_LIBS+=' -lva'
+  FFMPEG_EXTRA_LDFLAGS+=' -lva `pkg-config --libs libva`'
+  EXTRA_LIBS+=' -lva '
   WANT_VAAPI="yes"
   if test "x$HAVE_vaapi_x11" = "xyes"; then
     FFMPEG_EXTRA_LDFLAGS+=' -lva-x11'
-    EXTRA_LIBS+=' -lva-x11'
+    EXTRA_LIBS+=' -lva-x11 `pkg-config --libs x11`'
   fi
   if test "x$HAVE_vaapi_drm" = "xyes"; then
     FFMPEG_EXTRA_LDFLAGS+=' -lva-drm'
-- 
2.14.5

diff --git a/cinelerra-5.1/mpeg2enc/mmx.h b/cinelerra-5.1/mpeg2enc/mmx.h
index c78e185..bb3c191 100644
--- a/cinelerra-5.1/mpeg2enc/mmx.h
+++ b/cinelerra-5.1/mpeg2enc/mmx.h
@@ -43,7 +43,7 @@ typedef	union {
 #define	mmx_si2r(op,imm,reg) \
 	__asm__ __volatile__ (#op " %0, %%" #reg \
 			      : /* nothing */ \
-			      : "J" (imm) )
+			      : "X" (imm) )
 
 #define	mmx_m2r(op,mem,reg) \
 	__asm__ __volatile__ (#op " %0, %%" #reg \

Attachment: cin.SlackBuild
Description: Binary data

-- 
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin

Reply via email to