All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Random corrupt bytes in JPEGS
PostPosted: October 25th, 2022, 14:33 
Offline

Joined: October 29th, 2019, 10:27
Posts: 18
Location: United States
Hi,

I'm dealing with a camera SD card with many jpegs/movs. The card has no read errors (just slow) and the filesystem appears fine.
Almost all of the jpegs are corrupt. Analyzing the files show that there are random corrupt bytes scattered around the files. They do not appear to follow a regular pattern of corruption or spacing (although it looks like it might be just *bit* corruption - some bytes have an extra high nibble where a reference file has a zero high nibble).

I've tried multiple rereads of a few 'bad' sectors of a file (about 10 times) but never see a difference (do SD cards have a cache that needs to be dropped somehow?)

Any ideas as to the cause or ideas how to diagnose?

Thanks.


Top
 Profile  
 
 Post subject: Re: Random corrupt bytes in JPEGS
PostPosted: October 25th, 2022, 14:58 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15528
Location: Australia
Just to rule out the possibility of an interface problem, try reading the card in single-bit mode or SPI mode.

That said, if a sector were bad, wouldn't the card report a read error?

I have written a tool to count the frequency of 1's and 0's in each bit of a file:

http://users.on.net/~fzabkar/FreeBasic_W32/Utils/bitcount32.exe
http://users.on.net/~fzabkar/FreeBasic_W32/Utils/bitcount32.bas

I have also written an entropy calculator:

http://users.on.net/~fzabkar/FreeBasic_W32/Utils/entropy.exe
http://users.on.net/~fzabkar/FreeBasic_W32/Utils/entropy.bas

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Random corrupt bytes in JPEGS
PostPosted: October 25th, 2022, 15:45 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
Try a different reader too, just to be sure.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Random corrupt bytes in JPEGS
PostPosted: October 25th, 2022, 16:45 
Offline

Joined: October 29th, 2019, 10:27
Posts: 18
Location: United States
I'll have to dig out my Raspberry Pi and flash the appropriate image for using an SPI SD reader.


Top
 Profile  
 
 Post subject: Re: Random corrupt bytes in JPEGS
PostPosted: October 26th, 2022, 5:29 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
fzabkar wrote:
Just to rule out the possibility of an interface problem, try reading the card in single-bit mode or SPI mode.

That said, if a sector were bad, wouldn't the card report a read error?

I have written a tool to count the frequency of 1's and 0's in each bit of a file:

http://users.on.net/~fzabkar/FreeBasic_W32/Utils/bitcount32.exe
http://users.on.net/~fzabkar/FreeBasic_W32/Utils/bitcount32.bas

I have also written an entropy calculator:

http://users.on.net/~fzabkar/FreeBasic_W32/Utils/entropy.exe
http://users.on.net/~fzabkar/FreeBasic_W32/Utils/entropy.bas


It should report bad sector yes. So then it's not far fetched to assume data corrupted either before ECC was computed during writing to card, or after ECC was computed while reading. Running Franc's bitflip tool is good idea.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Random corrupt bytes in JPEGS
PostPosted: October 26th, 2022, 10:01 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
Can you perhaps share a few JPEGs (joep@disktuna.com), how badly corrupted are they?

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group