Skip to content

decoder/stateless/h265: output buffers computation does not look correct #87

@Gnurou

Description

@Gnurou

We currently need to add 16 to the Sps reported max_dpb_size in order for all Fluster tests to pass. RPS_E_qualcomm_5.bit is the only one that requires this.

In order to avoid wasting memory we don't submit the workaround, but here it is:

diff --git a/src/decoder/stateless/h265/vaapi.rs b/src/decoder/stateless/h265/vaapi.rs
index 43e5a1914..fb337d11c 100644
--- a/src/decoder/stateless/h265/vaapi.rs
+++ b/src/decoder/stateless/h265/vaapi.rs
@@ -124,7 +124,9 @@ impl VaStreamInfo for &Sps {
     }

     fn min_num_surfaces(&self) -> usize {
-        self.max_dpb_size() + 4
+        // TODO: + 16 is needed to make Fluster's RPS_E_qualcomm_5.bit test pass. Other tests are
+        // happy with + 4. We should investigate why this is the case.
+        self.max_dpb_size() + 16
     }

     fn coded_size(&self) -> (u32, u32) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions