Skip to contentSkip to conversation

package/ffmpeg: opencv2 support is broken if BR2_ARM_ENABLE_VFP is enabled

PATCH New Bernd Kuhls 3 participants 7 messages Sep 5, 2016 – Sep 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/ffmpeg: opencv2 support is broken if BR2_ARM_ENABLE_VFP is enabled

Fixes
http://autobuild.buildroot.net/results/c32/c32a21240a9933796ee850349a62ff3c2314f25c/
http://autobuild.buildroot.net/results/22a/22a9769d83d2a398bb6b264d342b2077c41c9cc5/

---
 package/ffmpeg/ffmpeg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/ffmpeg/ffmpeg.mk +2 -1
index a90d437..74f783c 100644
@@ -250,7 +250,8 @@ endif
 
 # To avoid a circular dependency only use opencv if opencv itself does
 # not depend on ffmpeg.
-ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx)
+# opencv2 is broken if BR2_ARM_ENABLE_VFP is enabled
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG)x$(BR2_ARM_ENABLE_VFP),yxx)
 FFMPEG_CONF_OPTS += --enable-libopencv
 FFMPEG_DEPENDENCIES += opencv
 else
Signature · 1 line
2.9.3
#1 lore raw

PATCH 2/2 package/ffmpeg: add optional support for opencv3

---
 package/ffmpeg/ffmpeg.mk | 3 +++
 1 file changed, 3 insertions(+)
package/ffmpeg/ffmpeg.mk +3 -0
index 74f783c..e42cceb 100644
@@ -254,6 +254,9 @@ endif
 ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG)x$(BR2_ARM_ENABLE_VFP),yxx)
 FFMPEG_CONF_OPTS += --enable-libopencv
 FFMPEG_DEPENDENCIES += opencv
+else ifeq ($(BR2_PACKAGE_OPENCV3_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV3_WITH_FFMPEG),yx)
+FFMPEG_CONF_OPTS += --enable-libopencv
+FFMPEG_DEPENDENCIES += opencv3
 else
 FFMPEG_CONF_OPTS += --disable-libopencv
 endif
Signature · 1 line
2.9.3
#2 lore raw

PATCH 2/2 package/ffmpeg: add optional support for opencv3

Hello,

package/ffmpeg/ffmpeg.mk endif · line 254

Quoted 11 lines · Bernd Kuhls
---
 package/ffmpeg/ffmpeg.mk | 3 +++
 1 file changed, 3 insertions(+)
package/ffmpeg/ffmpeg.mk +0 -0
index 74f783c..e42cceb 100644
@@ -254,6 +254,9 @@ endif
 ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG)x$(BR2_ARM_ENABLE_VFP),yxx)

Due to this line, this patch didn't apply as-is. But I fixed it up, and applied to master.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 package/ffmpeg: opencv2 support is broken if BR2_ARM_ENABLE_VFP is enabled

In reply to Bernd Kuhls

Hello,

Quoted 14 lines · Bernd Kuhls

Fixes
http://autobuild.buildroot.net/results/c32/c32a21240a9933796ee850349a62ff3c2314f25c/
http://autobuild.buildroot.net/results/22a/22a9769d83d2a398bb6b264d342b2077c41c9cc5/

---
 package/ffmpeg/ffmpeg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/ffmpeg/ffmpeg.mk +0 -0
index a90d437..74f783c 100644

package/ffmpeg/ffmpeg.mk endif · line 254

Quoted 6 lines
package/ffmpeg/ffmpeg.mk +2 -1
@@ -250,7 +250,8 @@ endif
 
 # To avoid a circular dependency only use opencv if opencv itself does
 # not depend on ffmpeg.
-ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx)
+# opencv2 is broken if BR2_ARM_ENABLE_VFP is enabled
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG)x$(BR2_ARM_ENABLE_VFP),yxx)

I'm not really happy with this fix. When you're using OpenCV/FFmpeg on ARM, you definitely want to be able to use the VFP. So I'd prefer to see the problem fixed rather than having this combination disabled.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/2 package/ffmpeg: opencv2 support is broken if BR2_ARM_ENABLE_VFP is enabled

Am Mon, 05 Sep 2016 22:05:40 +0200 schrieb Thomas Petazzoni:

Quoted 5 lines

Hello,

Quoted 2 lines · Bernd Kuhls

Fixes
http://autobuild.buildroot.net/results/c32/

c32a21240a9933796ee850349a62ff3c2314f25c/

Quoted 1 line
Quoted 1 line

http://autobuild.buildroot.net/

results/22a/22a9769d83d2a398bb6b264d342b2077c41c9cc5/

Quoted 7 lines
Quoted 7 lines

Signed-off-by: Bernd Kuhls
<[email protected]>

---
 package/ffmpeg/ffmpeg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 8 lines
Quoted 8 lines
package/ffmpeg/ffmpeg.mk index renamed from package/ffmpeg/ffmpeg.mk +0 -0

a90d437..74f783c 100644 --- a/package/ffmpeg/ffmpeg.mk +++ b/package/ffmpeg/ffmpeg.mk @@ -250,7 +250,8 @@ endif

# To avoid a circular dependency only use opencv if opencv itself does

 # not depend on ffmpeg.
-ifeq
($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x

$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx)

Quoted 2 lines
Quoted 2 lines

+# opencv2 is broken if BR2_ARM_ENABLE_VFP is enabled +ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG)x

$(BR2_ARM_ENABLE_VFP),yxx)

Quoted 6 lines

I'm not really happy with this fix. When you're using OpenCV/FFmpeg on ARM, you definitely want to be able to use the VFP. So I'd prefer to see the problem fixed rather than having this combination disabled.

Thomas

Hi Thomas,

my coding skill are insufficient to fix the problem so I marked my patch as rejected. I tried to compare the ARM_ROUND_DBL function in both opencv2 and opencv3 but the structure of the includes has changed so I was unable to spot the fix which provides working vfp support in opencv3.

Regards, Bernd

#5 lore raw

PATCH 1/2 package/ffmpeg: opencv2 support is broken if BR2_ARM_ENABLE_VFP is enabled

In reply to Thomas Petazzoni
Quoted 18 lines · Thomas Petazzoni

Hello,

Quoted 15 lines · Bernd Kuhls

Fixes
http://autobuild.buildroot.net/results/c32/c32a21240a9933796ee850349a62ff3c2314f25c/
http://autobuild.buildroot.net/results/22a/22a9769d83d2a398bb6b264d342b2077c41c9cc5/

---
 package/ffmpeg/ffmpeg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/ffmpeg/ffmpeg.mk +0 -0
index a90d437..74f783c 100644
@@ -250,7 +250,8 @@ endif
 
Quoted 9 lines

package/ffmpeg/ffmpeg.mk endif · line 254

Quoted 5 lines
package/ffmpeg/ffmpeg.mk +2 -1
 # To avoid a circular dependency only use opencv if opencv itself does
 # not depend on ffmpeg.
-ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx)
+# opencv2 is broken if BR2_ARM_ENABLE_VFP is enabled
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG)x$(BR2_ARM_ENABLE_VFP),yxx)

I'm not really happy with this fix. When you're using OpenCV/FFmpeg on ARM, you definitely want to be able to use the VFP. So I'd prefer to see the problem fixed rather than having this combination disabled.

Well, since there is now the possibility to use opencv3 instead, which has
fixed the issue, I think this isn't much of a problem, no?

Regards,
Arnout

Quoted 3 lines

Thomas

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#6 lore raw

PATCH 1/2 package/ffmpeg: opencv2 support is broken if BR2_ARM_ENABLE_VFP is enabled

Quoted 31 lines · Arnout Vandecappelle
Quoted 18 lines · Thomas Petazzoni

Hello,

Quoted 15 lines · Bernd Kuhls

Fixes
http://autobuild.buildroot.net/results/c32/c32a21240a9933796ee850349a62ff3c2314f25c/
http://autobuild.buildroot.net/results/22a/22a9769d83d2a398bb6b264d342b2077c41c9cc5/

---
 package/ffmpeg/ffmpeg.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/ffmpeg/ffmpeg.mk +0 -0
index a90d437..74f783c 100644
@@ -250,7 +250,8 @@ endif
 
Quoted 9 lines

package/ffmpeg/ffmpeg.mk endif · line 254

Quoted 5 lines
package/ffmpeg/ffmpeg.mk +2 -1
 # To avoid a circular dependency only use opencv if opencv itself does
 # not depend on ffmpeg.
-ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG),yx)
+# opencv2 is broken if BR2_ARM_ENABLE_VFP is enabled
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_IMGPROC)x$(BR2_PACKAGE_OPENCV_WITH_FFMPEG)x$(BR2_ARM_ENABLE_VFP),yxx)

I'm not really happy with this fix. When you're using OpenCV/FFmpeg on ARM, you definitely want to be able to use the VFP. So I'd prefer to see the problem fixed rather than having this combination disabled.

Quoted 2 lines

Well, since there is now the possibility to use opencv3 instead, which has
fixed the issue, I think this isn't much of a problem, no?

But actually, isn't it just a matter of replacing asm with __asm__? ffmpeg
compiles with -std=c99 so asm doesn't exist.

I don't have time to try it now, time to go to sleep ;-)

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF