Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile on raspberry pi #7

Closed
Zanderama opened this issue Jul 27, 2019 · 3 comments
Closed

Doesn't compile on raspberry pi #7

Zanderama opened this issue Jul 27, 2019 · 3 comments

Comments

@Zanderama
Copy link

Zanderama commented Jul 27, 2019

Hi,

Not sure how much of an issue this is, but thought to tell you. I tried to compile this on latest raspbian buster, which has libaom etc.

Really looking forward to a basic way to convert avifs to jpeg/png and back etc. Hope this is the project!

Cheers,

Alex

pi@raspberrypi-zero:~/src/libavif-master/libavif_build $ make
Scanning dependencies of target avif
[ 9%] Building C object CMakeFiles/avif.dir/src/avif.c.o
[ 18%] Building C object CMakeFiles/avif.dir/src/colr.c.o
[ 27%] Building C object CMakeFiles/avif.dir/src/mem.c.o
[ 36%] Building C object CMakeFiles/avif.dir/src/rawdata.c.o
[ 45%] Building C object CMakeFiles/avif.dir/src/read.c.o
[ 54%] Building C object CMakeFiles/avif.dir/src/reformat.c.o
[ 63%] Building C object CMakeFiles/avif.dir/src/stream.c.o
[ 72%] Building C object CMakeFiles/avif.dir/src/utils.c.o
[ 81%] Building C object CMakeFiles/avif.dir/src/write.c.o
[ 90%] Building C object CMakeFiles/avif.dir/src/codec_aom.c.o
/home/pi/src/libavif-master/libavif_src/src/codec_aom.c: In function ‘aomCodecGetNextImage’:
/home/pi/src/libavif-master/libavif_src/src/codec_aom.c:133:18: error: ‘AOM_IMG_FMT_YV1216’ undeclared (first use in this function); did you mean ‘AOM_IMG_FMT_YV12’?
case AOM_IMG_FMT_YV1216:
^~~~~~~~~~~~~~~~~~
AOM_IMG_FMT_YV12
/home/pi/src/libavif-master/libavif_src/src/codec_aom.c:133:18: note: each undeclared identifier is reported only once for each function it appears in
In file included from /usr/include/aom/aom_decoder.h:33,
from /home/pi/src/libavif-master/libavif_src/src/codec_aom.c:14:
/home/pi/src/libavif-master/libavif_src/src/codec_aom.c: In function ‘encodeOBU’:
/home/pi/src/libavif-master/libavif_src/src/codec_aom.c:342:40: error: ‘AV1E_SET_ROW_MT’ undeclared (first use in this function); did you mean ‘AV1E_SET_MTU’?
aom_codec_control(&aomEncoder, AV1E_SET_ROW_MT, 1);
^~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/avif.dir/build.make:180: CMakeFiles/avif.dir/src/codec_aom.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/avif.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

@joedrago
Copy link
Collaborator

Unless I'm mistaken, AOM_IMG_FMT_YV1216 was added way back in October. How old is that libaom?

If you want to go easily between AVIF and jpg/png, etc, you can try another project of mine (colorist). Currently avifdec only supports y4m, so you would need to use ffmpeg as an intermediate otherwise.

https://joedrago.github.io/colorist/

@Zanderama
Copy link
Author

Hi,

Thanks for your reply. Yes, that explains it. I believe Raspbian buster is based on Debian buster which was only released July 19th, and I don't believe Raspbian had libaom before then in its 'stretch' release so I thought it was recent.

However, looking at the file ages implies they may be old libraries etc, from June and October 2018.

-rw-r--r-- 1 root root 10092 Jun 26 2018 /usr/include/aom/aomdx.h
-rw-r--r-- 1 root root 14421 Jun 26 2018 /usr/include/aom/aom_image.h
-rw-r--r-- 1 root root 14935 Jun 26 2018 /usr/include/aom/aom_decoder.h
-rw-r--r-- 1 root root 39301 Jun 26 2018 /usr/include/aom/aomcx.h
-rw-r--r-- 1 root root 5388 Jun 26 2018 /usr/include/aom/aom.h
-rw-r--r-- 1 root root 2995 Jun 26 2018 /usr/include/aom/aom_integer.h
-rw-r--r-- 1 root root 3309 Jun 26 2018 /usr/include/aom/aom_frame_buffer.h
-rw-r--r-- 1 root root 17631 Jun 26 2018 /usr/include/aom/aom_codec.h
-rw-r--r-- 1 root root 36928 Jun 26 2018 /usr/include/aom/aom_encoder.h
-rw-r--r-- 1 root root 2258484 Oct 5 2018 /usr/lib/arm-linux-gnueabihf/libaom.so.0
-rw-r--r-- 1 root root 293 Oct 5 2018 /usr/lib/arm-linux-gnueabihf/pkgconfig/aom.pc
lrwxrwxrwx 1 root root 11 Oct 5 2018 /usr/lib/arm-linux-gnueabihf/libaom.so -> libaom.so.0

I will take a look at your Colorist thank you!

I did try compling the most recent aom on the raspberry pi but get lots of 'always_inline' errors, "target specific option mismatch".

@Zanderama
Copy link
Author

Zanderama commented Jul 28, 2019

Hi,

I managed to recompile libaom and libavif for the Raspberry Pi, just needed to the following C Flag.

cmake AOM_SRC -DCMAKE_C_FLAGS="-mfpu=vfp -mfloat-abi=hard"

Then edit CMakeCache.txt and change

ENABLE_NEON:BOOL=OFF

Cheers,

Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants