mpeg5 / xeve

eXtra-fast Essential Video Encoder, MPEG-5 EVC (Essential Video Coding)
Other
166 stars 39 forks source link

segfault when keyint is not divisible by 16 #136

Closed olokelo closed 3 months ago

olokelo commented 3 months ago

Hello,

Is it possible to set keyint parameter in xeve_app to a value not divisible by 16?

Here's a gdb log of the segfault that occurs when keyint is not multiple of 16

$ gdb --args xeve_app -i dnd.y4m -q 30 --keyint 120 --profile main --preset medium --threads 8 -o dnd.xeve-evc_main_medium_g128_q30.2.evc
GNU gdb (GDB) 15.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/oloke/Downloads/Sources/xeve/build/bin/xeve_app...
(gdb) r
Starting program: /home/oloke/Downloads/Sources/xeve/build/bin/xeve_app -i dnd.y4m -q 30 --keyint 120 --profile main --preset medium --threads 8 -o dnd.xeve-evc_main_medium_g128_q30.2.evc

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
XEVE: eXtra-fast Essential Video Encoder
[xeve_app.c:1149] cannot create XEVE encoder

Program received signal SIGSEGV, Segmentation fault.
imgb_list_free (list=list@entry=0x7fffffff1900) at /home/oloke/Downloads/Sources/xeve/app/xeve_app_util.h:589
589             if(list[i].imgb){ imgb_free(list[i].imgb); list[i].imgb = NULL; }
(gdb) where
#0  imgb_list_free (list=list@entry=0x7fffffff1900) at /home/oloke/Downloads/Sources/xeve/app/xeve_app_util.h:589
#1  0x000055555555c849 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/oloke/Downloads/Sources/xeve/app/xeve_app.c:1442
(gdb) 
dkozinski commented 3 months ago

Confirmed, segfault occurs when keyint is not multiple of 16

kpchoi commented 3 months ago

Currently, key frame interval (keyint) needs be mutiple of gop size. and default gop size is 16.

olokelo commented 3 months ago

Currently, key frame interval (keyint) needs be mutiple of gop size. and default gop size is 16.

That makes sense. Thank you.