@@ -53,7 +53,7 @@ internal class ArithmeticScanDecoder : IJpegScanDecoder
53
53
54
54
private ArithmeticDecodingTable [ ] acDecodingTables ;
55
55
56
- private static readonly byte [ ] FixedBin = { 113 , 0 , 0 , 0 } ;
56
+ private readonly byte [ ] fixedBin = { 113 , 0 , 0 , 0 } ;
57
57
58
58
private readonly CancellationToken cancellationToken ;
59
59
@@ -231,7 +231,7 @@ public void InitDecodingTables(List<ArithmeticDecodingTable> arithmeticDecodingT
231
231
}
232
232
}
233
233
234
- private static ref byte GetFixedBinReference ( ) => ref MemoryMarshal . GetArrayDataReference ( FixedBin ) ;
234
+ private ref byte GetFixedBinReference ( ) => ref MemoryMarshal . GetArrayDataReference ( this . fixedBin ) ;
235
235
236
236
/// <summary>
237
237
/// Decodes the entropy coded data.
@@ -775,7 +775,7 @@ private void DecodeBlockProgressiveDc(ArithmeticDecodingComponent component, ref
775
775
else
776
776
{
777
777
// Refinement scan.
778
- ref byte st = ref GetFixedBinReference ( ) ;
778
+ ref byte st = ref this . GetFixedBinReference ( ) ;
779
779
780
780
blockDataRef |= ( short ) ( this . DecodeBinaryDecision ( ref reader , ref st ) << this . SuccessiveLow ) ;
781
781
}
@@ -821,7 +821,7 @@ private void DecodeBlockProgressiveAc(ArithmeticDecodingComponent component, ref
821
821
822
822
// Figure F.21: Decoding nonzero value v.
823
823
// Figure F.22: Decoding the sign of v.
824
- int sign = this . DecodeBinaryDecision ( ref reader , ref GetFixedBinReference ( ) ) ;
824
+ int sign = this . DecodeBinaryDecision ( ref reader , ref this . GetFixedBinReference ( ) ) ;
825
825
st = ref Unsafe . Add ( ref st , 2 ) ;
826
826
827
827
// Figure F.23: Decoding the magnitude category of v.
@@ -917,7 +917,7 @@ private void ReadBlockProgressiveAcRefined(ArithmeticStatistics acStatistics, re
917
917
918
918
if ( this . DecodeBinaryDecision ( ref reader , ref Unsafe . Add ( ref st , 1 ) ) != 0 )
919
919
{
920
- bool flag = this . DecodeBinaryDecision ( ref reader , ref GetFixedBinReference ( ) ) != 0 ;
920
+ bool flag = this . DecodeBinaryDecision ( ref reader , ref this . GetFixedBinReference ( ) ) != 0 ;
921
921
coef = ( short ) ( coef + ( flag ? m1 : p1 ) ) ;
922
922
923
923
break ;
@@ -1047,7 +1047,7 @@ private void DecodeBlockBaseline(
1047
1047
1048
1048
// Figure F.21: Decoding nonzero value v.
1049
1049
// Figure F.22: Decoding the sign of v.
1050
- int sign = this . DecodeBinaryDecision ( ref reader , ref GetFixedBinReference ( ) ) ;
1050
+ int sign = this . DecodeBinaryDecision ( ref reader , ref this . GetFixedBinReference ( ) ) ;
1051
1051
st = ref Unsafe . Add ( ref st , 2 ) ;
1052
1052
1053
1053
// Figure F.23: Decoding the magnitude category of v.
0 commit comments