1 Reply Latest reply on Jan 3, 2018 7:22 AM by jpsollie

    VCE firmware bug?

    jpsollie

      happy 2018 everyone!

      I'm trying to recode an MPEG2 movie to H264 using the AMD VCE on gentoo linux/ ffmpeg/vaapi/amdgpu

      when using the baseline or main profile, everything seems to go well (using sufficient switches, such as disabling B-Frames).

      This is not the case with the high profile: it uses the separate colorplanes feature, making it unplayable on another PC.

      I do not think this is a ffmpeg problem, as libx264 works perfectly on all profiles.

      I do not think this is a software problem, as I do not pass by the CPU recoding the MPEG2 stream (the hardware decodes the MPEG2 stream, and recodes it to H264, no software filters are applied, so the content should stay in GPU memory), and the recoding for the Baseline and Main profiles works perfectly.

      - Is this a firmware bug?

      - Is this a driver bug?

       

      Any information is appreciated, I am willing to help searching the code for the profile -> feature part of the process, but I have no idea where it is done:

      - FFMPEG (tried the 3.3 and 3.4 series)

      - libva (tried the 1.7, 1.8 and 2.0 series)

      -linux amdgpu kernel driver (4.14.8)

      -amdgpu firmware (no idea at all, I do not have the sources)

      - Tonga/Fiji BIOS (yes, tried both of them)

      Thank you

        • Re: VCE firmware bug?
          jpsollie

          I think I found an answer: the firmware of AMD VCEs under Linux is written to not support x264 B-frames, shame on you amdgpu developers!

           

          11:48 < ckoenig> well it is a design bug in VA-API. The profile in the H264 header just says which features *can* be used, not which *must* be used.

          11:48 < ckoenig> so for encoding you could say please use high profile, but no B-frames and you should in theory get a valid stream.

          11:49 < ckoenig> problem is that apart from B-frames the firmware doesn't support a bunch of other things

          11:49 < ckoenig> e.g. for main profile we would only need B-frames

          11:49 < jpsollie> I see

          11:50 < ckoenig> but for high we need B-frames and transformation adaptivity and a bunch of other things.

          so this means:

          -AMD releases an AMF framework which requires windows 7 and visual studio in GPUOpen, and WHICH SUPPORTS B_FRAMES.

               During development, UNIX compatibility was made by the developers: see AMF/TraceAdapter.h at master · GPUOpen-LibrariesAndSDKs/AMF · GitHub -> the #ifndef WIN32 proves some things were done to support other platforms

          -AMD passes a firmware to the linux users which does not support it, and will probably mention this as the reason why AMF is not supported under linux.

           

          I've always been an AMD fan, I have had AMD cpu's for servers, desktops and notebooks, starting from the Athlon XP to the Opteron 6300, and have worked with GPUs from Radeon 4000 till Radeon RX480 but now I am losing trust in the fact that AMD presents itself as an Open Source contributor.  Shame on you AMD!