mpeg5 / xevd

eXtra-fast Essential Video Decoder, MPEG-5 EVC (Essential Video Coding)
Other
71 stars 22 forks source link

Build errors hotfixes #57

Closed dkozinski closed 5 months ago

dariusz-f commented 6 months ago

This should fix #56

wader commented 6 months ago

Hey! thanks for the fixes. Tried build xevd with this branch and xeve master and it seems to build and link with with ffmpeg using --enable-libxeve --enable-libxevd 👍 but i had to do ln -s /usr/local/lib/xeve/libxeve.a /usr/local/lib/libxeve.a to make the linker happy.

I noticed now that the libdir might be wrong in the .pc-files?

$ cat /usr/local/lib/pkgconfig/xeve.pc
# --- xeve.pc.in file ---
prefix=/usr/local
exec_prefix=/usr/local/bin
libdir=/usr/local/lib
includedir=/usr/local/include/xeve

Name: xeve
Description: eXtra-fast Essential Video Encoder (XEVE) (MAIN profile)

Version: 0.4.3

Requires:
Libs: -L${libdir} -lxeve
Libs.private: -lm

Cflags: -I${includedir}

$ cat /usr/local/lib/pkgconfig/xevd.pc
# --- xevd.pc.in file ---
prefix=/usr/local
exec_prefix=/usr/local/bin
libdir=/usr/local/lib
includedir=/usr/local/include/xevd

Name: xevd
Description: eXtra-fast Essential Video Decoder (XEVD) (MAIN profile)

Version: 0.4.1

Requires:
Libs: -L${libdir} -lxevd
Libs.private: -lm

Cflags: -I${includedir}

Should libdir have an ending /xeve etc or alternatively install in /usr/local/lib directly?

Another thing that i noticed is that when using the source release "Source code (tar.gz)" on the release page there is no version.txt file included so had to create one to make it build

wader commented 6 months ago

btw any plan on a new xeve and xevd release?

dkozinski commented 6 months ago

Hey! thanks for the fixes. Tried build xevd with this branch and xeve master and it seems to build and link with with ffmpeg using --enable-libxeve --enable-libxevd 👍 but i had to do ln -s /usr/local/lib/xeve/libxeve.a /usr/local/lib/libxeve.a to make the linker happy.

I noticed now that the libdir might be wrong in the .pc-files?

$ cat /usr/local/lib/pkgconfig/xeve.pc
# --- xeve.pc.in file ---
prefix=/usr/local
exec_prefix=/usr/local/bin
libdir=/usr/local/lib
includedir=/usr/local/include/xeve

Name: xeve
Description: eXtra-fast Essential Video Encoder (XEVE) (MAIN profile)

Version: 0.4.3

Requires:
Libs: -L${libdir} -lxeve
Libs.private: -lm

Cflags: -I${includedir}

$ cat /usr/local/lib/pkgconfig/xevd.pc
# --- xevd.pc.in file ---
prefix=/usr/local
exec_prefix=/usr/local/bin
libdir=/usr/local/lib
includedir=/usr/local/include/xevd

Name: xevd
Description: eXtra-fast Essential Video Decoder (XEVD) (MAIN profile)

Version: 0.4.1

Requires:
Libs: -L${libdir} -lxevd
Libs.private: -lm

Cflags: -I${includedir}

Should libdir have an ending /xeve etc or alternatively install in /usr/local/lib directly?

Another thing that i noticed is that when using the source release "Source code (tar.gz)" on the release page there is no version.txt file included so had to create one to make it build

You can build ffmpeg with static version of libxevd library as follows:

  1. Build and install libxevd cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" .. && make && make install
  2. Build ffmpeg PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -L$HOME/ffmpeg_build/lib/xevd" --extra-libs="-lpthread -lm -lxevd" --bindir="$HOME/bin" --disable-shared --enable-static --enable-gpl --enable-gnutls --enable-libxeve --enable-libxevd --enable-nonfree --enable-ffplay --disable-optimizations --disable-mmx --disable-stripping --extra-cflags=-Og --extra-cflags=-fno-omit-frame-pointer --enable-debug=3 --extra-cflags=-fno-inline && PATH="$HOME/bin:$PATH" make -j $(nproc) && make install
nm ./ffmpeg | grep xevd                                                                                                                                                            
00000000011dcaf8 D ff_libxevd_decoder                                                                                                                                                                              
00000000006ab328 t libxevd_close                                                                                                                                                                                   
00000000006ab668 t libxevd_image_copy                                                                                                                                                                              
00000000006ab928 t libxevd_init                                                                                                                                                                                    
00000000006ab9c0 t libxevd_receive_frame                                                                                                                                                                           
00000000006ab754 t libxevd_return_frame                                                                                                                                                                            
0000000000c051b0 T xevd_DMVR_cost                                                                                                                                                                                  
0000000000c05314 T xevd_DMVR_refine                                                                                                                                                                                
0000000000c055e0 T xevd_SubPelErrorSrfc        
...

This works for me

wader commented 5 months ago

Thanks! works better but i did ran into this symbol conflict when linking ffmpeg using xeve and xevd 0.5.0:

2024-04-21T20:48:25.9158008Z #135 404.2 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libxeve.a(xevem_mc_sse.c.o): in function `mc_filter_bilin_horz_sse':
2024-04-21T20:48:25.9161015Z #135 404.2 xevem_mc_sse.c:(.text+0x9e0): multiple definition of `mc_filter_bilin_horz_sse'; /usr/local/lib/libxevd.a(xevdm_mc_sse.c.o):xevdm_mc_sse.c:(.text+0xa10): first defined here
2024-04-21T20:48:25.9164245Z #135 404.2 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libxeve.a(xevem_mc_sse.c.o): in function `mc_filter_bilin_vert_sse':
2024-04-21T20:48:25.9167210Z #135 404.2 xevem_mc_sse.c:(.text+0x1f20): multiple definition of `mc_filter_bilin_vert_sse'; /usr/local/lib/libxevd.a(xevdm_mc_sse.c.o):xevdm_mc_sse.c:(.text+0x1f50): first defined here
2024-04-21T20:48:26.0687464Z #135 404.2 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libxeve.a(xevem_mc_sse.c.o): in function `mc_filter_bilin_horz_sse':
2024-04-21T20:48:26.0690729Z #135 404.2 xevem_mc_sse.c:(.text+0x9e0): multiple definition of `mc_filter_bilin_horz_sse'; /usr/local/lib/libxevd.a(xevdm_mc_sse.c.o):xevdm_mc_sse.c:(.text+0xa10): first defined here
2024-04-21T20:48:26.0693623Z #135 404.2 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libxeve.a(xevem_mc_sse.c.o): in function `mc_filter_bilin_vert_sse':
2024-04-21T20:48:26.0696471Z #135 404.2 xevem_mc_sse.c:(.text+0x1f20): multiple definition of `mc_filter_bilin_vert_sse'; /usr/local/lib/libxevd.a(xevdm_mc_sse.c.o):xevdm_mc_sse.c:(.text+0x1f50): first defined here

Worked around it with these built time sed-patches:

sed -i 's/mc_filter_bilin/xevem_mc_filter_bilin/' src_main/sse/xevem_mc_sse.c
sed -i 's/mc_filter_bilin/xevdm_mc_filter_bilin/' src_main/sse/xevdm_mc_sse.c
dkozinski commented 5 months ago

Thanks! works better but i did ran into this symbol conflict when linking ffmpeg using xeve and xevd 0.5.0:

2024-04-21T20:48:25.9158008Z #135 404.2 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libxeve.a(xevem_mc_sse.c.o): in function `mc_filter_bilin_horz_sse':
2024-04-21T20:48:25.9161015Z #135 404.2 xevem_mc_sse.c:(.text+0x9e0): multiple definition of `mc_filter_bilin_horz_sse'; /usr/local/lib/libxevd.a(xevdm_mc_sse.c.o):xevdm_mc_sse.c:(.text+0xa10): first defined here
2024-04-21T20:48:25.9164245Z #135 404.2 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libxeve.a(xevem_mc_sse.c.o): in function `mc_filter_bilin_vert_sse':
2024-04-21T20:48:25.9167210Z #135 404.2 xevem_mc_sse.c:(.text+0x1f20): multiple definition of `mc_filter_bilin_vert_sse'; /usr/local/lib/libxevd.a(xevdm_mc_sse.c.o):xevdm_mc_sse.c:(.text+0x1f50): first defined here
2024-04-21T20:48:26.0687464Z #135 404.2 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libxeve.a(xevem_mc_sse.c.o): in function `mc_filter_bilin_horz_sse':
2024-04-21T20:48:26.0690729Z #135 404.2 xevem_mc_sse.c:(.text+0x9e0): multiple definition of `mc_filter_bilin_horz_sse'; /usr/local/lib/libxevd.a(xevdm_mc_sse.c.o):xevdm_mc_sse.c:(.text+0xa10): first defined here
2024-04-21T20:48:26.0693623Z #135 404.2 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/libxeve.a(xevem_mc_sse.c.o): in function `mc_filter_bilin_vert_sse':
2024-04-21T20:48:26.0696471Z #135 404.2 xevem_mc_sse.c:(.text+0x1f20): multiple definition of `mc_filter_bilin_vert_sse'; /usr/local/lib/libxevd.a(xevdm_mc_sse.c.o):xevdm_mc_sse.c:(.text+0x1f50): first defined here

Worked around it with these built time sed-patches:

sed -i 's/mc_filter_bilin/xevem_mc_filter_bilin/' src_main/sse/xevem_mc_sse.c
sed -i 's/mc_filter_bilin/xevdm_mc_filter_bilin/' src_main/sse/xevdm_mc_sse.c

It has been fixed in PR #58 (libxevd) and PR #102 (libxeve) https://github.com/mpeg5/xevd/pull/58 and https://github.com/mpeg5/xeve/pull/102

wader commented 5 months ago

Great! thanks