mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-06-23 04:59:37 -04:00
ZM_COLOUR_GRAY8, ZM_COLOUR_YUV420P, and ZM_COLOUR_YUVJ420P were all defined to 1, making format identification via colours ambiguous. LocalCamera misidentified YUV420P as GRAY8, causing V4L2 MJPEG cameras to decode to grayscale via expensive sws_scale conversion. Replace the legacy ZM_COLOUR_*/ZM_SUBPIX_ORDER_* integer pair with AVPixelFormat as the single source of truth for pixel format dispatch: - Add src/zm_pixformat.h with central format helpers: zm_pixformat_from_colours, zm_colours_from_pixformat, zm_bytes_per_pixel, zm_db_colours_to_pixformat, zm_is_rgb32, zm_is_rgb24, zm_is_yuv420 - Add AVPixelFormat pixelFormat member + PixelFormat() accessor to Camera - Add PixFormat() accessor to Image, delegate AVPixFormat methods to shared helpers - Migrate all ~100 format dispatch comparisons in zm_image.cpp, zm_local_camera.cpp, zm_ffmpeg_camera.cpp, zm_remote_camera_rtsp.cpp, zm_libvlc_camera.cpp, zm_libvnc_camera.cpp, zm_monitor.cpp, zm_mpeg.cpp from colours/subpixelorder checks to imagePixFormat/ AVPixelFormat checks - Deprecate GetFFMPEGPixelFormat, delegate to zm_pixformat_from_colours - Fix DeColourise bug: imagePixFormat was not updated to GRAY8 - Deprecate ZM_COLOUR_* and ZM_SUBPIX_ORDER_* constants in zm_rgb.h - Add deprecation notice on Monitor.Colours web UI dropdown - Add 13 Catch2 test cases (105 assertions) for format mapping helpers refs #4735 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Modern ZoneMinder Skin
This web frontend to ZoneMinder is a complete rewrite of the classic frontend, based on CakePHP.