MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / has_basic_image_integrity

Function has_basic_image_integrity

src/common/image/image_reader.cpp:151–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151static bool has_basic_image_integrity(const uint8_t* data, size_t size, int codec_id) {
152 if (!data || size == 0) {
153 return false;
154 }
155
156 if (codec_id == AV_CODEC_ID_PNG) {
157 return has_valid_png_structure(data, size);
158 }
159 if (codec_id == AV_CODEC_ID_MJPEG) {
160 return has_valid_jpeg_structure(data, size);
161 }
162 return false;
163}
164
165static void resolve_source_format_and_range(AVPixelFormat input_format,
166 AVPixelFormat& resolved_format,

Callers 1

decode_bytesMethod · 0.85

Calls 2

has_valid_png_structureFunction · 0.85
has_valid_jpeg_structureFunction · 0.85

Tested by

no test coverage detected