gst-plugins-ugly issueshttps://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues2023-06-20T16:17:42Zhttps://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/36x264enc: core on Intel CPUs with avx512. Missing memory alignment ?2023-06-20T16:17:42ZGruikx264enc: core on Intel CPUs with avx512. Missing memory alignment ?Hello
I am using gtsreamer 1.18.2 built from source using meson, on a Centos 7.5.
Everything is working as expected, except the x264 encoding on CPUs with avx512.
On these hosts, even this simple command line provoke a crash:
`gst-laun...Hello
I am using gtsreamer 1.18.2 built from source using meson, on a Centos 7.5.
Everything is working as expected, except the x264 encoding on CPUs with avx512.
On these hosts, even this simple command line provoke a crash:
`gst-launch-1.0 -v videotestsrc num-buffers=1000 ! x264enc qp-min=18 ! avimux ! filesink location=videotestsrc.avi`
```bash
(gdb) where
#0 0x00007f7e2a778f3d in nanosleep () from /lib64/libpthread.so.0
#1 0x00007f7e2ac4bb58 in g_usleep () from /lib64/libglib-2.0.so.0
#2 0x0000000000404f0a in fault_spin () at ../subprojects/gstreamer/tools/gst-launch.c:131
#3 fault_handler_sighandler (signum=11) at ../subprojects/gstreamer/tools/gst-launch.c:112
#4 <signal handler called>
#5 0x00007f7e22047800 in x264_8_memcpy_aligned_avx512 () from /opt/gstreamer1.18/lib/libx264.so.160
#6 0x00007f7e2209ee5a in rd_cost_mb (h=h@entry=0x7f7e18083cc0, i_lambda2=921) at ../subprojects/x264/encoder/rdo.c:182
#7 0x00007f7e220af3e2 in intra_rd (h=h@entry=0x7f7e18083cc0, a=a@entry=0x7f7e1ea9d1a0, i_satd_thresh=i_satd_thresh@entry=268435456)
at ../subprojects/x264/encoder/analyse.c:991
#8 0x00007f7e220b166f in x264_8_macroblock_analyse (h=h@entry=0x7f7e18083cc0) at ../subprojects/x264/encoder/analyse.c:2941
#9 0x00007f7e220ea692 in slice_write (h=h@entry=0x7f7e18083cc0) at ../subprojects/x264/encoder/encoder.c:2786
#10 0x00007f7e220ecd7d in slices_write (h=0x7f7e18083cc0) at ../subprojects/x264/encoder/encoder.c:3127
#11 0x00007f7e220f7106 in threadpool_thread (pool=0x7f7e180283c0) at ../subprojects/x264/common/threadpool.c:69
#12 0x00007f7e2a771e25 in start_thread () from /lib64/libpthread.so.0
#13 0x00007f7e2a49bbad in clone () from /lib64/libc.so.6
```
When looking at the assembly code where it crashed :
```bash
>│0x7f7e22047800 <x264_8_memcpy_aligned_avx512+32> vmovdqa32 %zmm16,(%rdi,%rdx,1){%k1}
rdx 0x400 1024
rdi 0x7f7e1ea9cb20 140179657050912
```
=> rdi is not a multiple of 64, and AFAIK vmovdqa32 instruction requires a 64 bytes alignment
Is there something I can do to work around ? Other than adding "-Dx264:asm=disabled" ?
I tried to recompile gstreamer with "-Dmemory-alignment=64", but it did not help.https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/20x264enc: High resolution with default settings (cbr and 2Mb/s) produces broke...2023-05-30T10:23:12ZBugzilla Migration Userx264enc: High resolution with default settings (cbr and 2Mb/s) produces broken stream## Submitted by Sebastian Dröge `@slomo`
**[Link to original bug (#797161)](https://bugzilla.gnome.org/show_bug.cgi?id=797161)**
## Description
See below
gst-launch-1.0 videotestsrc ! capsfilter caps=video/x-raw,width=1800,heig...## Submitted by Sebastian Dröge `@slomo`
**[Link to original bug (#797161)](https://bugzilla.gnome.org/show_bug.cgi?id=797161)**
## Description
See below
gst-launch-1.0 videotestsrc ! capsfilter caps=video/x-raw,width=1800,height=1600 ! x264enc ! rtph264pay ! rtph264depay ! queue ! decodebin ! videoconvert ! autovideosink
Lower resolution or not going through RTP makes it work fine.https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/24compiling gst ugly plugin2018-12-18T05:15:04Zjalaj guptacompiling gst ugly pluginrelocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
[error](/uploads/3f11bd63df418bab619e2802870be568/error)relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
[error](/uploads/3f11bd63df418bab619e2802870be568/error)