Camera: Force software HDR if the camera has hardware HDR
and HW HDR is broken due to broken implementation issues.

Change-Id: Ib520728e453e0167d44e74df2428b0517313f85b
Camera: HDR: convert YUV422P / YV16 format to JPEG

Change-Id: I6310793e5e2d10e2d5e3d374aafe9761273259fc
Camera: HDR: fix low exposure on samsung hardware.

/* samsung actually speficify max HDR range via exposure compinsation */
Change-Id: I48b31965cf5acb6b9abcd2a62b1d341bfcab649c
camera: fix image capture review mode when zsl is enabled

Choosing "Take Photo" to change a contact image doesn't show
the captured imaged after taking a snap if ZSL is enabled.
Also observed on apps that use the native camera to capture
an image like Whatsapp.

In ZSL mode, the preview is not stopped, due to which the
review mode (ImageCapture) doesn't show the captured frame.
Hence stop the preview if ZSL mode is active so that the
preview can be restarted using the onReviewRetakeClicked().

Also, reset the autofocus and set the camera to idle only
when the ZSL mode is active. This fixes issues with non ZSL
cameras where autofocus works even during the review mode
after taking the snap since the camera state is set to idle.

Change-Id: I2aa3f4146575329c6fefb259b09937108084fdab
Camera: HDR:  fix rotation issues.

* fix fake rotate with real rotate by replacing the image with actual rotated image.
* ps2: add more rotation mode

Change-Id: I751cee4b9694180912d3bb0509fd12e295fbcb18
Merge "camera: fix image capture review mode when zsl is enabled" into cm-10.1
Merge remote-tracking branch 'cm/cm-10.1' into Domination