MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi__get_marker

Function stbi__get_marker

include/stb/stb_image.h:2919–2928  ·  view source on GitHub ↗

if there's a pending marker from the entropy stream, return that otherwise, fetch from the stream and get a marker. if there's no marker, return 0xff, which is never a valid marker value

Source from the content-addressed store, hash-verified

2917// otherwise, fetch from the stream and get a marker. if there's no
2918// marker, return 0xff, which is never a valid marker value
2919static stbi_uc stbi__get_marker(stbi__jpeg *j)
2920{
2921 stbi_uc x;
2922 if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; }
2923 x = stbi__get8(j->s);
2924 if (x != 0xff) return STBI__MARKER_none;
2925 while (x == 0xff)
2926 x = stbi__get8(j->s); // consume repeated 0xff fill bytes
2927 return x;
2928}
2929
2930// in each scan, we'll have scan_n components, and the order
2931// of the components is specified by order[]

Callers 2

stbi__decode_jpeg_headerFunction · 0.85
stbi__decode_jpeg_imageFunction · 0.85

Calls 1

stbi__get8Function · 0.85

Tested by

no test coverage detected