Void Sentry
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
jpeg_check.h File Reference

Cheap integrity check for camera JPEG frames (pure C++20, no platform headers). More...

#include <cstdint>
#include <span>

Go to the source code of this file.

Functions

bool frames::is_complete_jpeg (std::span< const uint8_t > data)
 True if the buffer starts with the JPEG SOI marker (FF D8) and ends with the EOI marker (FF D9).
 

Detailed Description

Cheap integrity check for camera JPEG frames (pure C++20, no platform headers).

Function Documentation

◆ is_complete_jpeg()

bool frames::is_complete_jpeg ( std::span< const uint8_t > data)
inline

True if the buffer starts with the JPEG SOI marker (FF D8) and ends with the EOI marker (FF D9).

A frame cut off mid-transfer has no EOI and fails this check.