Opened 3 weeks ago

Last modified 2 weeks ago

#10985 new defect

Divide by zero in libavcodec/dovi_rpuenc.c:251

Reported by: Levon Gevorgyan Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: libsvtav1 avcodec dovi rpuenc
Cc: Levon Gevorgyan Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -i "fail.mkv" -y -pix_fmt yuv420p10le \
    -c:V libsvtav1 -dolbyvision 1 "av1_fail.mkv"

libsvtav1 Cmake flags
-DCMAKE_BUILD_TYPE=Release -DSVT_AV1_LTO=ON \
          -DENABLE_AVX512=ON -DBUILD_TESTING=OFF \
          -DCOVERAGE=OFF \
          -DCMAKE_C_FLAGS="-O3 -march=native" \
          -DCMAKE_CXX_FLAGS="-O3 -march=native"

ffmpeg configure flags
ffmpeg version git-2024-04-29-08781eb
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --enable-libsvtav1 --enable-librav1e \
    --enable-libaom --enable-libvmaf --enable-libdav1d \
    --enable-libopus --arch=x86_64 --cpu=native --enable-lto \
    --extra-cflags='-O3 -march=native' --extra-cxxflags='-O3 -march=native' \
    --disable-doc --disable-htmlpages --disable-podpages --disable-txtpages

This results in a crash of ffmpeg due to divide by zero.

Attachments (3)

gdb.log (74.5 KB ) - added by Levon Gevorgyan 3 weeks ago.
gdb log
valgrind.log (3.1 KB ) - added by Levon Gevorgyan 3 weeks ago.
valgrind log
ffmpeg.log (52.8 KB ) - added by Levon Gevorgyan 3 weeks ago.
verbose ffmpeg log

Download all attachments as: .zip

Change History (9)

by Levon Gevorgyan, 3 weeks ago

Attachment: gdb.log added

gdb log

by Levon Gevorgyan, 3 weeks ago

Attachment: valgrind.log added

valgrind log

by Levon Gevorgyan, 3 weeks ago

Attachment: ffmpeg.log added

verbose ffmpeg log

comment:1 by Balling, 2 weeks ago

What does this have to do with dolby_e?

comment:2 by Levon Gevorgyan, 2 weeks ago

Keywords: avcodec dovi rpuenc added; dolby_e removed

in reply to:  1 comment:3 by Levon Gevorgyan, 2 weeks ago

Replying to Balling:

What does this have to do with dolby_e?

On second look, I think it does not, so I modified my (first) ticket. I just searched for "dolby" in the keyword section and "dolby_e" was an autosuggest, apologies.

comment:4 by Levon Gevorgyan, 2 weeks ago

Priority: importantnormal

comment:5 by Niklas Haas, 2 weeks ago

in reply to:  5 comment:6 by Levon Gevorgyan, 2 weeks ago

Replying to Niklas Haas:

Should be fixed by 1d89de03d6a9273b5d552a02d50f8f23b6c84f9d

I can confirm latest ffmpeg build does not crash like before, so the fix must be working. Thanks!

Note: See TracTickets for help on using tickets.