Skip to content

Bug: RFI test fails on ANV (Intel) and RADV (AMD) #39

Closed

Description

@DatCaptainHorse

Found a bug that seems to predate any of my work while running tests.

On ANV (Intel Arc A310):

Generating testdata/test_frames_320x240_yuv420p.yuv...
H264: FAIL: post-recovery PSNR 18.76 dB below 30 dB (decoder desynced)
H265: PASS — recovered with a P-frame, full-stream PSNR 62.08 dB
AV1: FAIL: post-recovery PSNR 9.09 dB below 30 dB (decoder desynced)
Error: "RFI verification failed: H264: post-recovery PSNR 18.76 dB below 30 dB (decoder desynced); AV1: post-recovery PSNR 9.09 dB below 30 dB (decoder desynced)"

on RADV (AMD Radeon 9060 XT)

Generating testdata/test_frames_320x240_yuv420p.yuv...
H264: FAIL: recovery frame 12 fell back to a keyframe (RFI did not engage)
H265: FAIL: recovery frame 12 fell back to a keyframe (RFI did not engage)
AV1: FAIL: recovery frame 12 fell back to a keyframe (RFI did not engage)
Error: "RFI verification failed: H264: recovery frame 12 fell back to a keyframe (RFI did not engage); H265: recovery frame 12 fell back to a keyframe (RFI did not engage); AV1: recovery frame 12 fell back to a keyframe (RFI did not engage)"

Activity

  1. hgaiser commented on Sep 18, 2026

    @hgaiser
    Owner

    Is this from a recent commit? The tests seem to work fine for me :\ (NVIDIA)

  2. DatCaptainHorse commented on Sep 18, 2026

    @DatCaptainHorse
    ContributorAuthor

    I tried both the commit where it was introduced and latest, same deal. Seems that it "works on my machine" situation but for NVIDIA?

  3. hgaiser commented on Sep 18, 2026

    @hgaiser
    Owner

    I tried both the commit where it was introduced and latest, same deal. Seems that it "works on my machine" situation but for NVIDIA?

    That'd be a rare 'W' for NVIDIA 🤔

  4. DatCaptainHorse commented on Sep 18, 2026

    @DatCaptainHorse
    ContributorAuthor

    Hm.. what's your ffmpeg version?

  5. hgaiser commented on Sep 18, 2026

    @hgaiser
    Owner

    9.0

  6. DatCaptainHorse commented on Sep 18, 2026

    @DatCaptainHorse
    ContributorAuthor

    Same for me.. hm, I'll leave the issue open, see if I get time to dig into it since I got Intel + Radeon here.

  7. DatCaptainHorse commented on Sep 21, 2026

    @DatCaptainHorse
    ContributorAuthor

    RADV only supports 2 references for H.264 and AV1, but only 1 for H.265, causing the RFI test to fail since it invalidates all the frames instead of calculating the supported amount from device info. This is hardware limit of AMD GPUs from looking into Mesa sources.

    ANV is just plain neglected from looks of it, not supporting even rate-control methods (atleast on Alchemist), which I feel pixelforge could check against (it currenty assumes CBR,VBR,QP and such exist, ANV has none).

  8. porkloin commented on Nov 2, 2026

    @porkloin
    Contributor

    Reproduced on RADV with a different GPU and a newer Mesa, on current main (0c462fe) while testing #50:

    • AMD Radeon RX 7900 XTX (RADV NAVI31)
    • Mesa 26.2.6, Vulkan 1.4.354
    • cargo test --test rfi -- --ignored --nocapture --test-threads=1, with the validation layer on (no validation errors from this test)
    Generating testdata/test_frames_320x240_yuv420p.yuv...
    H264: FAIL: recovery frame 12 fell back to a keyframe (RFI did not engage)
    H265: FAIL: recovery frame 12 fell back to a keyframe (RFI did not engage)
    AV1: FAIL: recovery frame 12 fell back to a keyframe (RFI did not engage)
    Error: "RFI verification failed: H264: recovery frame 12 fell back to a keyframe (RFI did not engage); H265: recovery frame 12 fell back to a keyframe (RFI did not engage); AV1: recovery frame 12 fell back to a keyframe (RFI did not engage)"
    

    This matches the 9060 XT output above line for line, so it looks like it affects RADV in general, not one card.

  9. hgaiser commented on Nov 4, 2026

    @hgaiser
    Owner

    I added a commit on top of #50 to decouple the amount of reference frames we store from the amount of frames we actually intend to use, which mimics nvenc. That should also fix the issue reported here 🤞 . I couldn't test it explicitly because I have no RADV GPU nearby, but I could simulate it on my RTX GPU.

    @DatCaptainHorse could you test again ?

    ps. I don't expect this to change AV1 behavior, but we'll see.

  10. DatCaptainHorse commented on Nov 5, 2026

    @DatCaptainHorse
    ContributorAuthor

    @hgaiser Here, looks like it fixes most, AV1 is expected with how ANV is currently.

    running 1 test
    test rfi ... PixelForge Reference Frame Invalidation verification
    
    Generating testdata/test_frames_320x240_yuv420p.yuv...
    H264: PASS — recovered with a P-frame, full-stream PSNR 44.90 dB
    H265: PASS — recovered with a P-frame, full-stream PSNR 63.27 dB
    AV1: FAIL: post-recovery PSNR 9.09 dB below 30 dB (decoder desynced)
    Error: "RFI verification failed: AV1: post-recovery PSNR 9.09 dB below 30 dB (decoder desynced)"
    FAILED
    
    failures:
    
    failures:
        rfi
    
    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.49s
  11. hgaiser commented on Nov 5, 2026

    @hgaiser
    Owner

    Awesome, thanks @DatCaptainHorse . Are we comfortable saying the ANV AV1 issue is in the ANV driver and therefore we can close this issue?

  12. DatCaptainHorse commented on Nov 5, 2026

    @DatCaptainHorse
    ContributorAuthor

    Yep I agree with that, I'll try to keep up with news regarding ANV Vulkan Video support and see if it (ever) improves 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions