HW5 Camera/HW5 Camera/stb_image.h
// after a restart interval, stbi__jpeg_reset the entropy decoder and
// the dc prediction
after a restart interval, stbi__jpeg_reset the entropy decoder and
the dc prediction
after a restart interval stbi__jpeg_reset the entropy decoder and the dc prediction
static void stbi__jpeg_reset(stbi__jpeg *j)
{
	j->code_bits = 0;
	j->code_buffer = 0;
	j->nomore = 0;
	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;
	j->marker = STBI__MARKER_none;
	j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
	j->eob_run = 0;
}
static void stbi__jpeg_reset ( stbi__jpeg * j ) { j -> code_bits = 0 ; j -> code_buffer = 0 ; j -> nomore = 0 ; 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 ; j -> marker = STBI__MARKER_none ; j -> todo = j -> restart_interval ? j -> restart_interval : 0x7fffffff ; j -> eob_run = 0 ; }
after a restart interval, stbi__jpeg_reset the entropy decoder and
the dc prediction
after a restart interval stbi__jpeg_reset the entropy decoder and the dc prediction
// no more than 1<<31 MCUs if no restart_interal? that's plenty safe, // since we don't even allow 1<<30 pixels