Skip to content

valgrind: suppress FFV1 16 bit issue in avcodec-57#22999

Merged
opencv-pushbot merged 1 commit intoopencv:4.xfrom
mshabunin:ffmpeg-valgrind-supp
Dec 21, 2022
Merged

valgrind: suppress FFV1 16 bit issue in avcodec-57#22999
opencv-pushbot merged 1 commit intoopencv:4.xfrom
mshabunin:ffmpeg-valgrind-supp

Conversation

@mshabunin
Copy link
Copy Markdown
Contributor

resolves #22991

Issue is not reproducible with newer FFmpeg version, hence suppressing. Tested with system package from Ubuntu 22.04 (probably 4.4.2):

--     FFMPEG:                      YES
--       avcodec:                   YES (58.134.100)
--       avformat:                  YES (58.76.100)
--       avutil:                    YES (56.70.100)
--       swscale:                   YES (5.9.100)
--       avresample:                NO

Note: suppressing only libavcodec 57

  • TODO: check several FFmpeg versions before and after problematic

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 21, 2022

Problem is still here:

[ RUN      ] videoio_ffmpeg_16bit.basic/0, where GetParam() = ("FFV1", "avi", false, true)
==16301== Conditional jump or move depends on uninitialised value(s)
==16301==    at 0x8E49969: ??? (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100)
==16301==    by 0x8E4E047: ??? (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100)
==16301==    by 0x924DDEE: avcodec_default_execute (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100)
==16301==    by 0x8E503F9: ??? (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100)
==16301==    by 0x8E072B6: avcodec_encode_video2 (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100)
==16301==    by 0x8E0769C: ??? (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100)
==16301==    by 0x8E07849: avcodec_send_frame (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100)
==16301==    by 0x50DDAA8: icv_av_write_frame_FFMPEG(AVFormatContext*, AVStream*, AVCodecContext*, unsigned char*, unsigned int, AVFrame*, int) (cap_ffmpeg_impl.hpp:2325)
==16301==    by 0x50E076F: CvVideoWriter_FFMPEG::writeFrame(unsigned char const*, int, int, int, int, int) (cap_ffmpeg_impl.hpp:2501)
==16301==    by 0x50E098C: cvWriteFrame_FFMPEG (cap_ffmpeg_impl.hpp:3263)
==16301==    by 0x50E0A88: cv::(anonymous namespace)::CvVideoWriter_FFMPEG_proxy::write(cv::_InputArray const&) (cap_ffmpeg.cpp:178)
==16301==    by 0x5080B52: cv::VideoWriter::write(cv::_InputArray const&) (cap.cpp:676)
==16301==  Uninitialised value was created by a stack allocation
==16301==    at 0x8E4967E: ??? (in /usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100)
==16301== 
{
   <insert_a_suppression_name_here>
   Memcheck:Cond
   obj:/usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100
   obj:/usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100
   fun:avcodec_default_execute
   obj:/usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100
   fun:avcodec_encode_video2
   obj:/usr/lib/x86_64-linux-gnu/libavcodec.so.57.107.100
   fun:avcodec_send_frame
   fun:_ZL25icv_av_write_frame_FFMPEGP15AVFormatContextP8AVStreamP14AVCodecContextPhjP7AVFramei
   fun:_ZN20CvVideoWriter_FFMPEG10writeFrameEPKhiiiii
   fun:cvWriteFrame_FFMPEG
   fun:_ZN2cv12_GLOBAL__N_126CvVideoWriter_FFMPEG_proxy5writeERKNS_11_InputArrayE
   fun:_ZN2cv11VideoWriter5writeERKNS_11_InputArrayE
}
[ WARN:0@228.830] global cap_ffmpeg_impl.hpp:1055 open VIDEOIO/FFMPEG: BGR conversion turned OFF, decoded frame will be returned in its original format. Multiplanar formats are not supported by the backend. Only GRAY8/GRAY16LE pixel formats have been tested. Use at your own risk.
[       OK ] videoio_ffmpeg_16bit.basic/0 (6729 ms)
[ RUN      ] videoio_ffmpeg_16bit.basic/1, where GetParam() = ("FFV1", "mkv", false, true)
==16301== 
==16301== More than 10000000 total errors detected.  I'm not reporting any more.
==16301== Final error counts will be inaccurate.  Go fix your program!
==16301== Rerun with --error-limit=no to disable this cutoff.  Note
==16301== that errors may occur in your program without prior warning from
==16301== Valgrind, because errors are no longer being displayed.
==16301== 
[ WARN:0@233.762] global cap_ffmpeg_impl.hpp:1055 open VIDEOIO/FFMPEG: BGR conversion turned OFF, decoded frame will be returned in its original format. Multiplanar formats are not supported by the backend. Only GRAY8/GRAY16LE pixel formats have been tested. Use at your own risk.
[       OK ] videoio_ffmpeg_16bit.basic/1 (4907 ms)

Ref: http://pullrequest.opencv.org/buildbot/builders/master_valgrind-lin64-debug/builds/100003

@mshabunin mshabunin force-pushed the ffmpeg-valgrind-supp branch from 33aaadc to f02bd30 Compare December 21, 2022 10:00
@mshabunin
Copy link
Copy Markdown
Contributor Author

Updated.
I decided to leave full path to FFmpeg library because I've been able to reproduce this issue only with Ubuntu 18. Multiple manually built FFmpeg 3.x versions works without problems.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve whitespace issue.

@mshabunin mshabunin force-pushed the ffmpeg-valgrind-supp branch from f02bd30 to 8e49560 Compare December 21, 2022 12:49
@opencv-pushbot opencv-pushbot merged commit 35e771d into opencv:4.x Dec 21, 2022
@mshabunin mshabunin deleted the ffmpeg-valgrind-supp branch December 21, 2022 17:02
@alalek alalek mentioned this pull request Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

videoio: valgrind issue on ffmpeg_16bit test (2022-12-19)

3 participants