PIX 2015

Sony RX1 RAW file issue? An investigative report...

Started Dec 27, 2012 | Discussions thread
Shop cameras & lenses ▾
Iliah Borg
Forum ProPosts: 17,973
Like?
Re: Sony RX1 RAW file issue? An investigative report...
In reply to tesilab, Jan 1, 2013

The relevant piece of code to unpack ARW2 format

  • To comment on the code,
    • Pixels with odd and even numbers within one scan line are processed separately as they belong to different colour channels.
    • The scan line is cut into blocks each containing 16 sequential pixels belonging to the same colour channel.
    • For a 16-byte block the following data is recorded:
      • 11-bit maximimum value for this block.
      • 11-bit minimum value for this block.
      • 4-bit indices of min and max pixels in the block, that allows precise coding of those values using 4 bits.
      • 14 7-bit delta values, delta relative to the min value.
    • 7-bit data is converted to 11 bits by shifting to the left (0..4 bits shift) and adding min value from the block.
  • That is:
    • If the variations within the block are small (less than 128 ADC units) the compression is lossless. Even gradients should be rendered without any visual posterisation..
    • If the block contains a sharp edge or some pixel is noisy - the coding precision is 7 bits.
  • 11-bit data ("locally 7-bit data") is shifted 1 bit to the left and rendered through decompression curve.

For the Russian version and discussion please see Alex Tutubalin's blogĀ http://blog.lexa.ru/2012/12/29/o_sortakh_raw_u_sony.html

Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark post MMy threads
Color scheme? Blue / Yellow