Repository navigation
iOS 27 camera: trace what the preview's pictures hold, in cameracaptured and backboardd (black viewfinder narrowed, not fixed) - #400
Open
claudiusthebot wants to merge 1 commit into
Conversation
…ameracaptured and in backboardd Phone 1's dylib -30 boot (18 November) ran the whole preview pipeline: every node emitted 828x1702 '420f' IOSurfaces, the image queue sink rendered them into its CAImageQueue, backboardd made a YCBCR8_420_2P (500) texture over one, and nothing was refused; the viewfinder was pure black. The traces count samples and never read a pixel, so the console cannot say whether the pictures handed to the image queue are black, whether backboardd's texture reads black, or whether backboardd never draws them. - camera_pixeltrace.c (cam.dylib, cam_trace=1): for each node output's 1st, 30th and 300th sample and the image queue sink's, a 16x16 luma / 8x8 chroma grid read through CoreVideo's read lock, before and after cleaning the picture's cache lines, with the IOSurface ID. - YCbCrTrace.h (StarbiteMetal frontend, always on, 24 lines a process): the same grid as that process reads the surface, when a two-plane YCbCr texture is made over an IOSurface and when an encoder first binds one over each surface. - CAMERA.md: what the -30 console shows, what it cannot, and how one boot with both traces names the step. arch-size.allow: the frontend +3 lines (the hooks; the helpers are in their own header). Reading only; nothing else changes. Built, not run on a phone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The cause is not found yet, and this PR does not fix the camera. It adds the trace that names the step where the
preview turns black.
Phone 1's dylib -30 boot (18 Nov, 24B156,
cam_trace=1 cam_metal=1; consolescion-phone1/evidence/cd-cam30-metalon thebuild Mac) ran the whole preview pipeline, read on 20 Nov at the desk:
BWImageQueueSinkNodeemitted 828x1702420fIOSurfaces, about 8 a second, andnone were dropped. The sink rendered them into its
CAImageQueue(fences on).YCBCR8_420_2P) texture of 828x1702 over the surface.would have shown.
DidDisplayFirstPreviewFrame.SWEET FB: layer Nline and no new framebuffer call. The framebuffer driver would silently drop a
420flayer, but its swap log wasalready used up, so this is not verified.
420fpicture would show green, not black. Pure black fits threeplaces, and the console cannot tell them apart:
backboardd sees them);
What changed (reading only)
tools/ios27/camera/camera_pixeltrace.c(cam.dylib, withcam_trace=1):camera_flowtrace.c.tools/ios27/metal2/YCbCrTrace.h(StarbiteMetal frontend, always on, at most 24 lines a process):surface.
arch-size.allowgoes from 2764 to 2767 for them; the helpers are in their own header.docs/ios27/CAMERA.md: what the -30 console shows and what it cannot, and how one boot with both traces names the step.How it was checked
cam.dylibbuilt withtools/ios27/camera/build.sh:sha256
4fcb6dabae6e6bc2f7d485607b72198d422fbfa691a8d9442d1fc7979a3bbe5c.mk-bundle27.sh(every frontend patch applies), using the 12 Nov bridge:sha256
8e2757a0c60ab1e2dc4b247cb84e7853b136a7277b5f1ba1a1ee171f1c94b101.The frontend also compiles without the patches.
camera_pixeltrace.con CoreVideo buffers: black420f, zeros,420vwith a bright square, BGRA, and an unread2vuy;420f, andxf20, which is not read. "Bound" is said once per surface.provenance-check.py,arch-check.py --report,docs-check.py,boot-args.py --check,drivers-check.py,ios27/builds/builds-test.pyandfullroot/build-lock-test.sh.npm run preflightdoes not apply: this repo has nopackage.json.Built, not phone-tested. The phone test (the root and line of dylib -30, the two files swapped, telemetry on) and the
table that turns its lines into the next step are in
TEST-ON-PHONE.mdof the desk work (~/s9/agents/camera-desk-1120on the build Mac).