MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / stbi__jpeg_reset

Function stbi__jpeg_reset

Source/Utils/stb_image.h:2935–2946  ·  view source on GitHub ↗

after a restart interval, stbi__jpeg_reset the entropy decoder and the dc prediction

Source from the content-addressed store, hash-verified

2933// after a restart interval, stbi__jpeg_reset the entropy decoder and
2934// the dc prediction
2935static void stbi__jpeg_reset(stbi__jpeg *j)
2936{
2937 j->code_bits = 0;
2938 j->code_buffer = 0;
2939 j->nomore = 0;
2940 j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0;
2941 j->marker = STBI__MARKER_none;
2942 j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
2943 j->eob_run = 0;
2944 // no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
2945 // since we don't even allow 1<<30 pixels
2946}
2947
2948static int stbi__parse_entropy_coded_data(stbi__jpeg *z)
2949{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected