Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors wrt latest FFmpeg versions #239

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

fiona-gladwin
Copy link
Contributor

  • Fix errors wrt FFmpeg version > 5
  • Remove deprecated FFmpeg API
  • Introduce a flag to check the FFmpeg version and compile accordingly

@LakshmiKumar23
Copy link
Contributor

@fiona-gladwin still seeing some warnings:

[ 97%] Building CXX object rocAL/CMakeFiles/rocal.dir/caffe_protos.pb.cc.o
/dockerx/work/rocAL/rocAL/source/augmentations/node_ssd_random_crop.cpp: In member function ‘virtual void SSDRandomCropNode::update_node()’:
/dockerx/work/rocAL/rocAL/source/augmentations/node_ssd_random_crop.cpp:142:13: warning: ‘aspect_ratio’ may be used uninitialized [-Wmaybe-uninitialized]
  142 |             if ((aspect_ratio < 0.5) || (aspect_ratio > 2.))
      |             ^~
/dockerx/work/rocAL/rocAL/source/augmentations/node_ssd_random_crop.cpp:132:19: note: ‘aspect_ratio’ was declared here
  132 |             float aspect_ratio;
      |                   ^~~~~~~~~~~~
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
                 from /usr/include/c++/13/bits/stl_tree.h:63,
                 from /usr/include/c++/13/map:62,
                 from /dockerx/work/rocAL/rocAL/include/meta_data/coco_meta_data_reader.h:24,
                 from /dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp:23:
In constructor ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = int&; _U2 = std::__cxx11::basic_string<char>&; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = int; _T2 = std::__cxx11::basic_string<char>]’,
    inlined from ‘virtual void COCOMetaDataReader::read_all(const std::string&)’ at /dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp:197:47:
/usr/include/c++/13/bits/stl_pair.h:688:11: warning: ‘image_id’ may be used uninitialized [-Wmaybe-uninitialized]
  688 |         : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y))
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp: In member function ‘virtual void COCOMetaDataReader::read_all(const std::string&)’:
/dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp:175:17: note: ‘image_id’ was declared here
  175 |             int image_id;
      |                 ^~~~~~~~

@fiona-gladwin
Copy link
Contributor Author

@fiona-gladwin still seeing some warnings:

[ 97%] Building CXX object rocAL/CMakeFiles/rocal.dir/caffe_protos.pb.cc.o
/dockerx/work/rocAL/rocAL/source/augmentations/node_ssd_random_crop.cpp: In member function ‘virtual void SSDRandomCropNode::update_node()’:
/dockerx/work/rocAL/rocAL/source/augmentations/node_ssd_random_crop.cpp:142:13: warning: ‘aspect_ratio’ may be used uninitialized [-Wmaybe-uninitialized]
  142 |             if ((aspect_ratio < 0.5) || (aspect_ratio > 2.))
      |             ^~
/dockerx/work/rocAL/rocAL/source/augmentations/node_ssd_random_crop.cpp:132:19: note: ‘aspect_ratio’ was declared here
  132 |             float aspect_ratio;
      |                   ^~~~~~~~~~~~
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
                 from /usr/include/c++/13/bits/stl_tree.h:63,
                 from /usr/include/c++/13/map:62,
                 from /dockerx/work/rocAL/rocAL/include/meta_data/coco_meta_data_reader.h:24,
                 from /dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp:23:
In constructor ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = int&; _U2 = std::__cxx11::basic_string<char>&; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = int; _T2 = std::__cxx11::basic_string<char>]’,
    inlined from ‘virtual void COCOMetaDataReader::read_all(const std::string&)’ at /dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp:197:47:
/usr/include/c++/13/bits/stl_pair.h:688:11: warning: ‘image_id’ may be used uninitialized [-Wmaybe-uninitialized]
  688 |         : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y))
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp: In member function ‘virtual void COCOMetaDataReader::read_all(const std::string&)’:
/dockerx/work/rocAL/rocAL/source/meta_data/coco_meta_data_reader.cpp:175:17: note: ‘image_id’ was declared here
  175 |             int image_id;
      |                 ^~~~~~~~

@LakshmiKumar23 The warnings are resolved in PR #237

@rrawther
Copy link
Contributor

@fiona-gladwin : Please fix the warnings

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.

4 participants