ROCm / MIVisionX

MIVisionX toolkit is a set of comprehensive computer vision and machine intelligence libraries, utilities, and applications bundled into a single toolkit. AMD MIVisionX also delivers a highly optimized open-source implementation of the Khronos OpenVX™ and OpenVX™ Extensions.
https://rocm.docs.amd.com/projects/MIVisionX/en/latest/
MIT License
186 stars 73 forks source link

[amd_media] Build error with `ffmpeg>4` #774

Closed acxz closed 1 year ago

acxz commented 2 years ago
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.4.4/amd_openvx_extensions/amd_media/decoder.cpp: In member function ‘vx_status CLoomIoMediaDecoder::Initialize()’:
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.4.4/amd_openvx_extensions/amd_media/decoder.cpp:481:78: error: invalid conversion from ‘AVCodec**’ to ‘const AVCodec**’ [-fpermissive]
  481 |         err = av_find_best_stream(formatContext, AVMEDIA_TYPE_VIDEO, -1, -1, &decoder, 0);
      |                                                                              ^~~~~~~~
      |                                                                              |
      |                                                                              AVCodec**
In file included from /home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.4.4/amd_openvx_extensions/amd_media/kernels.h:33,
                 from /home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.4.4/amd_openvx_extensions/amd_media/decoder.cpp:24:
/usr/include/libavformat/avformat.h:2083:41: note:   initializing argument 5 of ‘int av_find_best_stream(AVFormatContext*, AVMediaType, int, int, const AVCodec**, int)’
 2083 |                         const AVCodec **decoder_ret,
      |                         ~~~~~~~~~~~~~~~~^~~~~~~~~~~
/home/acxz/vcs/git/github/rocm-arch/rocm-arch/mivisionx/src/MIVisionX-rocm-5.4.4/amd_openvx_extensions/amd_media/decoder.cpp:491:68: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
  491 |                 AVCodecContext * vcc = formatContext->streams[si]->codec;
      |                                                                    ^~~~~

sysinfo: OS: ArchLinux ffmpeg: 6.0 gcc: 12.2.1

acxz commented 2 years ago

I tested this again with the latest rocm release 5.2.0 and I am still experiencing this error. @rrawther is it possible to look into this?

kiritigowda commented 1 year ago

Hi @acxz if you still see this issue with TOT master, please reopen this issue. Currently we are using FFMPEG n4.4.2

acxz commented 1 year ago

Tested with 5.4.0 and the issue still exists, @kiritigowda. tested with ffmpeg 6.0