@@ -79,15 +79,15 @@ pub type IDCTPtr = fn(&mut [i32; 64], &mut [i16], usize);
7979
8080/// Scan-phase state kept so `decode_into` can retry or replay after SOS.
8181///
82- /// Full replay starts at the first SOS; `rst_checkpoint ` can resume from a
82+ /// Full replay starts at the first SOS; `scan_checkpoint ` can resume from a
8383/// later restart or row boundary when one is still valid.
8484#[ derive( Clone ) ]
8585pub ( crate ) struct ScanDecodeState {
8686 pub ( crate ) scan_start_position : usize ,
8787 pub ( crate ) append_snapshot : HeaderAppendStateSnapshot ,
8888 pub ( crate ) sos_snapshot : SosParamsSnapshot ,
8989 pub ( crate ) header_snapshot : ScanHeaderStateSnapshot ,
90- pub ( crate ) rst_checkpoint : Option < Box < ScanCheckpoint > >
90+ pub ( crate ) scan_checkpoint : Option < Box < ScanCheckpoint > >
9191}
9292
9393/// SOS fields restored before replaying scan data.
@@ -402,15 +402,15 @@ where
402402 append_snapshot,
403403 sos_snapshot,
404404 header_snapshot,
405- rst_checkpoint : None
405+ scan_checkpoint : None
406406 } ) ) ;
407407 Ok ( ( ) )
408408 }
409409
410410 pub ( crate ) fn scan_checkpoint ( & self ) -> Option < & ScanCheckpoint > {
411411 self . scan_state
412412 . as_deref ( )
413- . and_then ( |state| state. rst_checkpoint . as_deref ( ) )
413+ . and_then ( |state| state. scan_checkpoint . as_deref ( ) )
414414 }
415415
416416 // Save a scan checkpoint at the current restart or MCU-row boundary.
@@ -456,9 +456,9 @@ where
456456 dc_predictions,
457457 bitstream_state
458458 } ;
459- match & mut state. rst_checkpoint {
459+ match & mut state. scan_checkpoint {
460460 Some ( existing) => * * existing = snapshot,
461- None => state. rst_checkpoint = Some ( Box :: new ( snapshot) )
461+ None => state. scan_checkpoint = Some ( Box :: new ( snapshot) )
462462 }
463463 }
464464 Ok ( ( ) )
@@ -476,7 +476,7 @@ where
476476 /// replaying from scan start.
477477 pub ( crate ) fn invalidate_scan_checkpoint ( & mut self ) {
478478 if let Some ( state) = self . scan_state . as_mut ( ) {
479- state. rst_checkpoint = None ;
479+ state. scan_checkpoint = None ;
480480 }
481481 }
482482
@@ -1339,7 +1339,7 @@ where
13391339 outer_append_snapshot : state. append_snapshot ,
13401340 outer_sos_snapshot : state. sos_snapshot ,
13411341 outer_header_snapshot : state. header_snapshot . clone ( ) ,
1342- checkpoint_view : state. rst_checkpoint . as_deref ( ) . map ( |checkpoint| {
1342+ checkpoint_view : state. scan_checkpoint . as_deref ( ) . map ( |checkpoint| {
13431343 CheckpointView {
13441344 append_snapshot : checkpoint. append_snapshot ,
13451345 sos_snapshot : checkpoint. sos_snapshot ,
@@ -1461,15 +1461,15 @@ where
14611461
14621462 match result {
14631463 Ok ( ( ) ) => {
1464- // Drop the RST checkpoint so a post-success replay starts
1464+ // Drop the scan checkpoint so a post-success replay starts
14651465 // from scan-start with zeroed DC predictors instead of
14661466 // pointing at stale entropy data.
14671467 debug_assert ! (
14681468 self . scan_state. is_some( ) ,
14691469 "scan_state should be Some after a successful scan decode"
14701470 ) ;
14711471 if let Some ( state) = self . scan_state . as_deref_mut ( ) {
1472- state. rst_checkpoint = None ;
1472+ state. scan_checkpoint = None ;
14731473 }
14741474 self . pixels_decoded = expected_size;
14751475 Ok ( ( ) )
0 commit comments