GNOME Bugzilla – Bug 722082
encoder: h264: calculate a better slice_qp_delta in running time
Last modified: 2018-11-03 15:44:26 UTC
gstvaapi H.264 encoder need set a proper slice_qp_delta in encoding slices. The currently code only set a fixed value. It's better to make slice_qp_delta more flexible in running. some possible options. 1. CQP mode, keep 0. 2. bitrate control mode, need to check the bitrate fluctution. always keep a window size there and compare the summary of last few encoded frame size, if larger than window, set slice_qp_delta > 0 to reduce next frame size. If less than avg, set to < 0 try to fill the window, but make sure init_qp + slice_qp_delta >= min_qp. 3. none rate-control mode, maybe set to 0, or random between [init_qp - n, init_qp + m]. certainly if can consider about quality changes should be much better. Any suggestions/comments welcome.
The problem is the analysis based on the past frames may not be suitable for the future frames. That's probably why a two-pass encoding mode could be appealing, with some additional heuristics. A more fine-grained option could be worth exploring FEI-based encoding. Though, this is beyond the scope of 0.5.9 release, defering to a later stage.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/8.