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

[Issue]: rocDecode integration - Warnings #282

Open
kiritigowda opened this issue Feb 7, 2025 · 2 comments
Open

[Issue]: rocDecode integration - Warnings #282

kiritigowda opened this issue Feb 7, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@kiritigowda
Copy link
Collaborator

Problem Description

[ 97%] Building CXX object rocAL/CMakeFiles/rocal.dir/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp.o
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp:27:67: warning: initializer order does not match the declaration order [-Wreorder-ctor]
   27 |               device_id_{device_id}, out_mem_type_(out_mem_type), codec_id_(codec), b_force_zero_latency_(force_zero_latency), 
      |                                                                   ^~~~~~~~~~~~~~~~
      |                                                                   b_extract_sei_message_(extract_user_sei_Message)
   28 |               b_extract_sei_message_(extract_user_sei_Message), disp_delay_(disp_delay), max_width_ (max_width), max_height_(max_height) {
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~
      |               disp_delay_(disp_delay)                           codec_id_(codec)
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp:27:67: note: field 'codec_id_' will be initialized after field 'b_force_zero_latency_'
   27 |               device_id_{device_id}, out_mem_type_(out_mem_type), codec_id_(codec), b_force_zero_latency_(force_zero_latency), 
      |                                                                   ^~~~~~~~~~~~~~~~
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp:27:85: note: field 'b_force_zero_latency_' will be initialized after field 'b_extract_sei_message_'
   27 |               device_id_{device_id}, out_mem_type_(out_mem_type), codec_id_(codec), b_force_zero_latency_(force_zero_latency), 
      |                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp:658:59: warning: converting the enum constant to a boolean [-Wint-in-bool-context]
  658 |                     if (codec_id_ == rocDecVideoCodec_AVC || rocDecVideoCodec_HEVC) {
      |                                                           ^
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp:880:15: warning: unused variable 'mapped_frame_ptr' [-Wunused-variable]
  880 |         void *mapped_frame_ptr = fb->frame_ptr;
      |               ^~~~~~~~~~~~~~~~
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.cpp:1072:22: warning: unused variable 'result' [-Wunused-variable]
 1072 |         rocDecStatus result = rocDecGetDecodeStatus(roc_decoder_, last_decode_surf_idx_, &dec_status);
      |                      ^~~~~~
4 warnings generated.

Operating System

ALL

CPU

ALL

GPU

ALL

ROCm Version

ROCm 6.4+

ROCm Component

No response

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@kiritigowda kiritigowda added the bug Something isn't working label Feb 7, 2025
@kiritigowda
Copy link
Collaborator Author

[ 47%] Building CXX object rocAL/CMakeFiles/rocal.dir/source/loaders/audio/audio_loader.cpp.o
In file included from /root/hostDrive/rocAL-kiriti/rocal/rocAL/source/decoders/video/rocdec_video_decoder.cpp:24:
In file included from /root/hostDrive/rocAL-kiriti/rocal/rocAL/include/decoders/video/rocdec_video_decoder.h:31:
In file included from /opt/rocm-6.4.0/share/rocdecode/utils/video_post_process.h:27:
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.h:75:9: warning: 'ERR' macro redefined [-Wmacro-redefined]
   75 | #define ERR(X) std::cerr << "[ERR] "  << " {" << __func__ <<"} " << " " << X << std::endl;
      |         ^
/root/hostDrive/rocAL-kiriti/rocal/rocAL/include/pipeline/log.h:43:9: note: previous definition is here
   43 | #define ERR(X) std::cerr << "[ERR] "                 \
      |         ^
In file included from /root/hostDrive/rocAL-kiriti/rocal/rocAL/source/decoders/video/rocdec_video_decoder.cpp:23:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/iomanip:40:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ios_base.h:41:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/locale_classes.h:40:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/string:53:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/basic_string.h:39:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/ext/alloc_traits.h:34:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/alloc_traits.h:33:
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_construct.h:151:7: warning: destructor called on non-final 'RocVideoDecoder' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
  151 |       __pointer->~_Tp();
      |       ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/alloc_traits.h:648:9: note: in instantiation of function template specialization 'std::_Destroy<RocVideoDecoder>' requested here
  648 |         { std::_Destroy(__p); }
      |                ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:613:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<RocVideoDecoder>' requested here
  613 |         allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr());
      |                                   ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:599:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<RocVideoDecoder, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here
  599 |         _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
      |         ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:972:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<RocVideoDecoder, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<int &, OutputSurfaceMemoryType_enum &, rocDecVideoCodec_enum &, int, std::nullptr_t, int>' requested here
  972 |             _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...);
      |             ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:1712:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<RocVideoDecoder, std::allocator<void>, int &, OutputSurfaceMemoryType_enum &, rocDecVideoCodec_enum &, int, std::nullptr_t, int>' requested here
 1712 |         : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...)
      |                     ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr.h:464:4: note: in instantiation of function template specialization 'std::__shared_ptr<RocVideoDecoder>::__shared_ptr<std::allocator<void>, int &, OutputSurfaceMemoryType_enum &, rocDecVideoCodec_enum &, int, std::nullptr_t, int>' requested here
  464 |         : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...)
      |           ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr.h:1009:14: note: in instantiation of function template specialization 'std::shared_ptr<RocVideoDecoder>::shared_ptr<std::allocator<void>, int &, OutputSurfaceMemoryType_enum &, rocDecVideoCodec_enum &, int, std::nullptr_t, int>' requested here
 1009 |       return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a},
      |              ^
/root/hostDrive/rocAL-kiriti/rocal/rocAL/source/decoders/video/rocdec_video_decoder.cpp:71:28: note: in instantiation of function template specialization 'std::make_shared<RocVideoDecoder, int &, OutputSurfaceMemoryType_enum &, rocDecVideoCodec_enum &, int, std::nullptr_t, int>' requested here
   71 |     _rocvid_decoder = std::make_shared<RocVideoDecoder>(device_id, mem_type, rocdec_codec_id, 0, nullptr, 0);
      |                            ^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_construct.h:151:19: note: qualify call to silence this warning
  151 |       __pointer->~_Tp();
      |                   ^
[ 48%] Building CXX object rocAL/CMakeFiles/rocal.dir/source/loaders/audio/audio_loader_sharded.cpp.o
In file included from /root/hostDrive/rocAL-kiriti/rocal/rocAL/source/decoders/video/video_decoder_factory.cpp:26:
In file included from /root/hostDrive/rocAL-kiriti/rocal/rocAL/include/decoders/video/rocdec_video_decoder.h:31:
In file included from /opt/rocm-6.4.0/share/rocdecode/utils/video_post_process.h:27:
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.h:75:9: warning: 'ERR' macro redefined [-Wmacro-redefined]
   75 | #define ERR(X) std::cerr << "[ERR] "  << " {" << __func__ <<"} " << " " << X << std::endl;
      |         ^
/root/hostDrive/rocAL-kiriti/rocal/rocAL/include/pipeline/log.h:43:9: note: previous definition is here
   43 | #define ERR(X) std::cerr << "[ERR] "                 \
      |         ^
[ 48%] Building CXX object rocAL/CMakeFiles/rocal.dir/source/loaders/audio/audio_read_and_decode.cpp.o
In file included from /root/hostDrive/rocAL-kiriti/rocal/rocAL/source/decoders/video/video_decoder_factory.cpp:29:
In file included from /root/hostDrive/rocAL-kiriti/rocal/rocAL/include/pipeline/commons.h:34:
/root/hostDrive/rocAL-kiriti/rocal/rocAL/include/pipeline/exception.h:39:9: warning: 'THROW' macro redefined [-Wmacro-redefined]
   39 | #define THROW(X) throw RocalException(" { " + std::string(__func__) + " } " + X);
      |         ^
/opt/rocm-6.4.0/share/rocdecode/utils/rocvideodecode/roc_video_dec.h:131:9: note: previous definition is here
  131 | #define THROW(X) throw RocVideoDecodeException(" { " + std::string(__func__) + " } " + X);
      |         ^

@fiona-gladwin
Copy link
Contributor

@LakshmiKumar23 @rrawther @kiritigowda
The warnings appearing in rocAL build, is because of the files included in rocAL from rocDecode utils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants