ImpulseAdventure / JPEGsnoop

JPEGsnoop: JPEG decoder and detailed analysis
http://www.impulseadventure.com/photo/jpeg-snoop.html
GNU General Public License v2.0
499 stars 83 forks source link

RSTn marker not properly shown in detail scan decode #50

Open AlexGuo1998 opened 4 years ago

AlexGuo1998 commented 4 years ago

Hi, thanks for this awesome software!

When I decode an image with RSTn markers, it shows:

Lum (Tbl #0), MCU=[0,1]
[0x000068EC.7]: ZRL=[ 0] Val=[ -695] Coef=[00= DC] Data=[0x 75 FF D0 D5 = 0b (-------1 11111111 11010--- --------)]
                               ^^^^ <- CORRECT                                       ^ ^^^^^^^^ ^^^^^ <- WRONG!
[0x000068F0.6]: ZRL=[ 0] Val=[   -7] Coef=[01..01] Data=[0x 22 0A AA 0A = 0b (------10 0000---- -------- --------)]

The value decoded is right, but the bits on the right of DC coef are wrong. It should be something like:

Lum (Tbl #0), MCU=[0,1]
[0x000068EC.7]: RST0 Marker detected at 0x000068ED, skip 2 bytes, DC prediction reset to 0
[0x000068EF.0]: ZRL=[ 0] Val=[ -695] Coef=[00= DC] Data=[0x D5 22 0A AA = 0b (‭11010101 001000-- -------- --------)]
[0x000068F0.6]: ZRL=[ 0] Val=[   -7] Coef=[01..01] Data=[0x 22 0A AA 0A = 0b (------10 0000---- -------- --------)]

(1101 = DC code 0A, 0101001000 = -695)

Could you please investigate this?