FreeDcam icon indicating copy to clipboard operation
FreeDcam copied to clipboard

JPG is taken from JPEG stream or manually from RAW?

Open Uzver123 opened this issue 1 year ago • 5 comments

I wonder how JPG is taken using phone JPEG stream or converted from RAW data internally by FreeDCam?

Uzver123 avatar Sep 29 '24 17:09 Uzver123

its using the jpeg stream. freedcam itself dont have a demosaic algo. what you get in the viewer is from libraw. greets

KillerInk avatar Sep 30 '24 03:09 KillerInk

its using the jpeg stream. freedcam itself dont have a demosaic algo. what you get in the viewer is from libraw.

Then how FreeDcam has different options for sharpening from standard off/fast/high/zsl that offered in Camera2API?

image

Uzver123 avatar Sep 30 '24 09:09 Uzver123

well there ist the default camera2 api from android, and there are hidden keys offered by the manufacturs that are device/brand specific. the hidden keys can get read with reflections. https://github.com/KillerInk/FreeDcam/blob/60682b2a086988f291725f8c9866a41350abda91/app/src/main/java/camera2_hidden_keys/VendorKeyParser.java#L30-L50

but if a key is present, it does not mean it works. so there is alot try and error involved. sometimes its also needed, to bring the camera into a different operation mode(opcode) to get a key working.

KillerInk avatar Sep 30 '24 09:09 KillerInk

I have phone OnePlus 8 Pro if i take photo in OpenCamera with sharpening off it shows good on preview, but when i take photo it somehow switches sharpening to max there is no difference between sharpening off and high settings for JPG.

In freeDcam if i set sharpening to zero it really is zero, i wonder what's the difference and if understanding this difference can help me locate the way OnePlus alters JPG so i can disable it (i have root).

Uzver123 avatar Sep 30 '24 15:09 Uzver123

Don't know how good you coding skills are. But you have two possibilities First mod the camera apk you need. Second if it's a qcom socs, mod libchromatix.lib that the jpeg stream don't use sharpening. When I played with it there was only one. But these days I think, is one for every mode.

KillerInk avatar Oct 01 '24 05:10 KillerInk

its using the jpeg stream. freedcam itself dont have a demosaic algo. what you get in the viewer is from libraw. greets

By the way FreeDcam has re-mosaic algo? i know someone who is used it for forcing re-mosaic for camera sensor that had no HW-remosaic in full resolution mode, but when i tried that did not work.

Uzver123 avatar Jan 19 '25 19:01 Uzver123

it have. QUADBAYER_16BIT 7. set that inside the dng profile and set the correct rawsize and it should work.

KillerInk avatar Mar 05 '25 13:03 KillerInk

it have. QUADBAYER_16BIT 7. set that inside the dng profile and set the correct rawsize and it should work.

Do you have detail walk trough how to set up?

Uzver123 avatar Mar 05 '25 15:03 Uzver123

  1. give freedcam sd permission.
  2. open freedcam and set sdcard to external and choose a folder where the "raw" binary data should get stored.
  3. select "raw" as picture format inside freedcam.
  4. select the full resolution and capture a image.
  5. close freedcam and open freedviewer and go to the folder where the "raw" file is.
  6. on the bottom right press the "..." and choose raw to dng, select the "raw"file
  7. enter there all the needed information and save the dng profile. there you can also choose QUADBAYER_16BIT
  8. now you should be able to capture fullsizedngs dequaded

KillerInk avatar Mar 07 '25 10:03 KillerInk