Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Analysis image corrupted and 'Target image is already colourised' warning when saving analysis JPEGs with native YUV420 capture #4995

Copy link
Copy link

Description

@connortechnology
Issue body actions

With save analysis JPEGs enabled, zmc logs:

WAR [zmc_m5] [Target image is already colourised, colours: 1]

Cause: since decoder-native passthrough, packet->image is typically YUV420P/YUVJ420P regardless of the monitor's configured Colours. The zone alarm highlight is still built in the configured format (RGB24/RGB32), so Image::Overlay() dispatches the RGB-highlight-onto-YUV420-target combination into the 'target is 1 byte per pixel' branches, which call Colourise(). Colourise() refuses on non-GRAY8 targets (the logged warning) and returns, after which the overlay loop walks the planar YUV buffer as packed RGB, corrupting the saved analysis frames.

Fix: in Image::Overlay(), gate the Colourise() branches to true GRAY8 targets and add YUV420-target branches that convert only the marked (non-black) RGB highlight pixels to YUV (luma + shared chroma), honouring the highlight's subpixel order.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.