@@ -237,17 +237,16 @@ public void EncodeGrayscale<TPixel>(Image<TPixel> pixels, ref Block8x8F luminanc
237237 /// <typeparam name="TPixel">The pixel format.</typeparam>
238238 /// <param name="pixels">The pixel accessor providing access to the image pixels.</param>
239239 /// <param name="luminanceQuantTable">Luminance quantization table provided by the callee.</param>
240- /// <param name="chrominanceQuantTable">Chrominance quantization table provided by the callee.</param>
241240 /// <param name="cancellationToken">The token to monitor for cancellation.</param>
242- public void EncodeRgb < TPixel > ( Image < TPixel > pixels , ref Block8x8F luminanceQuantTable , ref Block8x8F chrominanceQuantTable , CancellationToken cancellationToken )
241+ public void EncodeRgb < TPixel > ( Image < TPixel > pixels , ref Block8x8F luminanceQuantTable , CancellationToken cancellationToken )
243242 where TPixel : unmanaged, IPixel < TPixel >
244243 {
245244 this . huffmanTables = HuffmanLut . TheHuffmanLut ;
246245
247246 var unzig = ZigZag . CreateUnzigTable ( ) ;
248247
249248 // ReSharper disable once InconsistentNaming
250- int prevDCY = 0 , prevDCCb = 0 , prevDCCr = 0 ;
249+ int prevDCR = 0 , prevDCG = 0 , prevDCB = 0 ;
251250
252251 ImageFrame < TPixel > frame = pixels . Frames . RootFrame ;
253252 Buffer2D < TPixel > pixelBuffer = frame . PixelBuffer ;
@@ -264,25 +263,25 @@ public void EncodeRgb<TPixel>(Image<TPixel> pixels, ref Block8x8F luminanceQuant
264263 {
265264 pixelConverter . Convert ( x , y , ref currentRows ) ;
266265
267- prevDCY = this . WriteBlock (
266+ prevDCR = this . WriteBlock (
268267 QuantIndex . Luminance ,
269- prevDCY ,
268+ prevDCR ,
270269 ref pixelConverter . R ,
271270 ref luminanceQuantTable ,
272271 ref unzig ) ;
273272
274- prevDCCb = this . WriteBlock (
275- QuantIndex . Chrominance ,
276- prevDCCb ,
273+ prevDCG = this . WriteBlock (
274+ QuantIndex . Luminance ,
275+ prevDCG ,
277276 ref pixelConverter . G ,
278- ref chrominanceQuantTable ,
277+ ref luminanceQuantTable ,
279278 ref unzig ) ;
280279
281- prevDCCr = this . WriteBlock (
282- QuantIndex . Chrominance ,
283- prevDCCr ,
280+ prevDCB = this . WriteBlock (
281+ QuantIndex . Luminance ,
282+ prevDCB ,
284283 ref pixelConverter . B ,
285- ref chrominanceQuantTable ,
284+ ref luminanceQuantTable ,
286285 ref unzig ) ;
287286 }
288287 }
0 commit comments