Skip to content

fix(v2d): reject unaligned bitblit destination origins - #52

Open
mingjie-wu-spacemit wants to merge 1 commit into
mainfrom
fix/v2d-bitblit-crop-alignment
Open

mingjie-wu-spacemit wants to merge 1 commit into
mainfrom
fix/v2d-bitblit-crop-alignment

Conversation

@mingjie-wu-spacemit

Copy link
Copy Markdown
Collaborator

V2D_AddBitblitTask uses the destination rectangle as the hardware output crop. A non-16-aligned origin, such as (0, 140) for a 640x360 RGB image in a 640x640 destination, can trigger a V2D hardware error and corrupt the output even when V2D_EndJob returns success.

Reject unaligned destination X/Y origins with V2D_ERR_INVALID_PARAM before queuing the task, log the coordinates and alignment requirement, and document the restriction in the public API. Source rectangle origins are unaffected.

Validation on SpacemiT K3:

  • Built the mpp_v2d target from this main-based branch.
  • Checked unaligned X, Y, and combined offsets: all return -4; rejected jobs remain empty.
  • Checked aligned destinations and an unaligned source origin: validation succeeds.
  • Linked the reproduction against the rebuilt V2D object: y=140 is rejected with the expected log; y=0 and y=144 retain zero content and border mismatches.
  • git diff --check passes.

@spacemit-robot-ci

spacemit-robot-ci Bot commented Sep 16, 2026

Copy link
Copy Markdown

Robot CI AI Review

结论:暂无明确问题。

备注:worker-cache review 失败,已回退 baseline review:worker-cache review failed: snode5: fetch base failed: From github.com:spacemit-com/mpp
! [rejected] main -> refs/robot-ci/base/main (non-fast-forward); From github.com:spacemit-com/mpp
! [rejected] main -> refs/robot-ci/base/main (non-fast-forward); hp-probook: sync worker helper failed: ssh: connect to host 10.0.91.193 port 22: No route to host

@mingjie-wu-spacemit
mingjie-wu-spacemit force-pushed the fix/v2d-bitblit-crop-alignment branch from 878f684 to 4e2cc95 Compare September 16, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant