CameraITS: fix RAW10/RAW12 unpacking logic

Test: the RAW10 black level histogram now matches RAW16
Bug: 65959681
Change-Id: Ife436ff73f7aeac96c3f3c6500730b9a3edc8656
diff --git a/apps/CameraITS/pymodules/its/image.py b/apps/CameraITS/pymodules/its/image.py
index d47a995..55b7d2c 100644
--- a/apps/CameraITS/pymodules/its/image.py
+++ b/apps/CameraITS/pymodules/its/image.py
@@ -150,6 +150,8 @@
     lsbs = img[::, 4::5].reshape(h,w/4)
     lsbs = numpy.right_shift(
             numpy.packbits(numpy.unpackbits(lsbs).reshape(h,w/4,4,2),3), 6)
+    # Pair the LSB bits group to pixel 0 instead of pixel 3
+    lsbs = lsbs.reshape(h,w/4,4)[:,:,::-1]
     lsbs = lsbs.reshape(h,w)
     # Fuse the MSBs and LSBs back together
     img16 = numpy.bitwise_or(msbs, lsbs).reshape(h,w)
@@ -200,6 +202,8 @@
     lsbs = img[::, 2::3].reshape(h,w/2)
     lsbs = numpy.right_shift(
             numpy.packbits(numpy.unpackbits(lsbs).reshape(h,w/2,2,4),3), 4)
+    # Pair the LSB bits group to pixel 0 instead of pixel 1
+    lsbs = lsbs.reshape(h,w/2,2)[:,:,::-1]
     lsbs = lsbs.reshape(h,w)
     # Fuse the MSBs and LSBs back together
     img16 = numpy.bitwise_or(msbs, lsbs).reshape(h,w)