Skip to content

d3d12: H264/HEVC Encode - Fix PPS frequency and rate control issues

Sil Vilerino requested to merge sivileri/mesa:fix_rc_issues into main

Fixes a couple of issues affecting bitrate control (file size output) on some tests for some platforms. Tested on 3 platforms this does not produce any regressions but now passes the failing tests.

  • Normalize VBV Size and Initial Capacity to target bitrate so all platforms produce similar outputs
  • Do not add a Picture Parameter Set (PPS) header on each frame for HEVC/H264. Decoder keeps the last read PPS as the active one and further PPS in the bitstream replace that one. Only encode a new PPS when it's different from the active one.
  • Skip the GPU buffer upload operation if the current frame didn't get any written headers.

cc @jenatali

Merge request reports