Opened 7 months ago

Last modified 7 months 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 7 months ago.
gdb log
valgrind.log (3.1 KB ) - added by Levon Gevorgyan 7 months ago.
valgrind log
ffmpeg.log (52.8 KB ) - added by Levon Gevorgyan 7 months ago.
verbose ffmpeg log

Download all attachments as: .zip

Change History (9)

by Levon Gevorgyan, 7 months ago

Attachment: gdb.log added

gdb log

by Levon Gevorgyan, 7 months ago

Attachment: valgrind.log added

valgrind log

by Levon Gevorgyan, 7 months ago

Attachment: ffmpeg.log added

verbose ffmpeg log

comment:1 by Balling, 7 months ago

What does this have to do with dolby_e?

comment:2 by Levon Gevorgyan, 7 months ago

Keywords: avcodec dovi rpuenc added; dolby_e removed

in reply to:  1 comment:3 by Levon Gevorgyan, 7 months 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, 7 months ago

Priority: importantnormal

comment:5 by Niklas Haas, 7 months ago

in reply to:  5 comment:6 by Levon Gevorgyan, 7 months 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.