Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5ac54ff authored by Vignesh Venkatasubramanian's avatar Vignesh Venkatasubramanian
Browse files

C2SoftGav1Dec: Disallow bitdepth > 10

This is a temporary change that will be over-written when
support for 12-bit is added.

Bug: 268505204
Test: AV1 and AVIF CTS tests pass
Change-Id: Ia2ac55bddabfa20046862e5cb1816449ae9429d9
parent 970056e9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -773,6 +773,14 @@ bool C2SoftGav1Dec::outputBuffer(const std::shared_ptr<C2BlockPool> &pool,
    return false;
  }

  if (buffer->bitdepth > 10) {
    ALOGE("bitdepth %d is not supported", buffer->bitdepth);
    mSignalledError = true;
    work->workletsProcessed = 1u;
    work->result = C2_CORRUPTED;
    return false;
  }

  const int width = buffer->displayed_width[0];
  const int height = buffer->displayed_height[0];
  if (width != mWidth || height != mHeight) {