Repository navigation
Conversation
…match The process memory grows with each QVideoFrame::toImage() on some computers and is only given back by restarting PA: 10-13 KB a conversion, 0.3-1.6 GB an hour while a program with screen watchers runs (Windows, Intel UHD 630, a 1280 x 720 NV12 capture card, Qt 6.10.2). With PA open and no program running the memory stays flat for hours. Isolation tests of 10 minutes (about 8,000 conversions each): toImage() +77 MB, on the computation_realtime pool +101 MB, map() + toImage() +104 MB; the CPU conversion below -7 MB, SnapshotManager using it -27 MB. VideoFrameConverter (used by SnapshotManager::convert()) converts NV12, NV21, YUV420P, YV12, YUYV and UYVY on the CPU. On the first 8 frames with colors (at most one a second) it compares 8 ways (BT.601/BT.709, limited/full range, nearest/bilinear chroma) with toImage() and uses the best one from then on if its mean color difference is at most 1.5 of 255; otherwise, and for other formats, toImage() stays. The decision is logged. PA_QT_FRAME_CONVERSION=1 keeps toImage(). On the computer above toImage() matched BT.709 limited range with bilinear chroma (its GPU path): mean difference 0.17, largest 2 of 255. A 720p frame takes about 9 ms, as toImage() did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFpKyhKsEg9bJNoPWQzjJJ
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.
…match
The process memory grows with each QVideoFrame::toImage() on some computers and is only given back by restarting PA: 10-13 KB a conversion, 0.3-1.6 GB an hour while a program with screen watchers runs (Windows, Intel UHD 630, a 1280 x 720 NV12 capture card, Qt 6.10.2). With PA open and no program running the memory stays flat for hours. Isolation tests of 10 minutes (about 8,000 conversions each): toImage() +77 MB, on the computation_realtime pool +101 MB, map() + toImage() +104 MB; the CPU conversion below -7 MB, SnapshotManager using it -27 MB.
VideoFrameConverter (used by SnapshotManager::convert()) converts NV12, NV21, YUV420P, YV12, YUYV and UYVY on the CPU. On the first 8 frames with colors (at most one a second) it compares 8 ways (BT.601/BT.709, limited/full range, nearest/bilinear chroma) with toImage() and uses the best one from then on if its mean color difference is at most 1.5 of 255; otherwise, and for other formats, toImage() stays. The decision is logged. PA_QT_FRAME_CONVERSION=1 keeps toImage().
On the computer above toImage() matched BT.709 limited range with bilinear chroma (its GPU path): mean difference 0.17, largest 2 of 255. A 720p frame takes about 9 ms, as toImage() did.