GCam Port for Essential PH-1 [Based on different devs]

TheIronLefty

Senior Member
Oct 7, 2014
133
211
0
Tbilisi
Alright some of you have seen my contributions in the magisk thread by aer0zer0 but i seem to update it a lot and seem to spam the thread up, so i decided to make a seperate thread where i can post updates and edits.

//:
Q:Reason for using this over arnovas and cstarks gcams?

A:These settings are made especially for essentials IMX 258 and use more vibrant colors as seen in samples, plus the noise settings are manually tweaked by me and keep getting better as i tinker with them more, as well as the gcams provided by arnova and cstark use custom set blacklevel fix which is not an good idea, tolyan's uses dynamic black level which adjusts the tint values by ISO settings as said when checking the Fix Black level option.
://

Grab my compiled version with preset here- 5.3 https://mega.nz/#!qk4ggYqC!Pb3gY6DW0KNYd6huvbEvIARIGhdRrJckLZYBPnZ8q9I

6.1 Preset build based on MGC_6.1.021_V1d-Advances_test2.apkhttps://drive.google.com/file/d/1QV88P65dzBAy7wJTlozei24owB8mzA5U/view?usp=sharing

Old method below
we are using tolyans builds
https://www.celsoazevedo.com/files/android/google-camera/dev-tolyan009/


1: Advanced Settings
//: Final JPG quality hdr+ = 100%
//: Resampling method = Raisr
//: Fix Black Level = on
//: Enable Motion = on
//: Max BlackLevel offset = 25 or 50

2: Noise Reduction -> tuning back cam

Rev 0.23 - October 9th

//: Tuning master switch = ON
• Apply custom sensor noise model = ON
• Custom sensor noise offset a = 3000
• Custom sensor noise offset b = 22500 (default)
• Custom sensor noise scale a = 2117875
• Custom sensor noise scale b = 113625
//: Apply custom denoise params = ON
• Custom luma denoise at high ISO values = 1.5
• Custom luma denoise at average ISO values = 2
• Custom luma denoise at low ISO values = 0.4
• Custom chroma denoise at high ISO values = 40
• Custom chroma denoise at average ISO values = 10
• Custom chroma denoise at low ISO values = 2.55
• Custom denoise revert factor at high ISO values = 0
• Custom denoise revert factor at average ISO values = 0.05
• Custom denoise revert factor at low ISO values = 0.05

3: Back to Advanced Settings -> Saturation
//: Highlight Saturation: 1.2
//: Shadow Saturation: 2.0

Samples: https://imgur.com/a/O9hYlBh
Noise settings differences: https://i.imgur.com/ICn5fmi.jpg
 
Last edited:

Spey

Senior Member
Nov 9, 2007
50
7
0
Still need the magisk mod, but you can turn it off.
Thx 4 reply.

Will keep using SloMo on GoogleCamera-Pixel2Mod-Arnova8G2-V8.1.apk for time being. Was hoping to find 240fps (120fps only on this Arnova).

Sent from my PH-1 using Tapatalk
 

Skirr

Member
Jun 20, 2008
42
19
0
Huh, this might make me finally install Magisk.

Just for your information, you might have missed that, another developer going by the name of ArtZ did something similar, just for a regular apk (https://www.celsoazevedo.com/files/android/google-camera/dev-artz/). He developed for the LG G6 which shares the IMX 258 with the PH-1 and very much focused on color reproduction. I've been using his latest apk since its release and always returned to it when testing other ones in between since the color reproduction is much better in HDR+ enhanced compared to other apks, his settings might be of interest to you as well in your development.

Edit: after testing tolyans build with your settings I'm definitely impressed by the speed and noise settings, but color reproduction is still significantly better with the black level settings introduced by ArtZ. The color shift can best be seen when taking a low light picture with HDR+ and HDR+ enhanced, the latter will often have a green tint. ArtZ talked a bit about his settings in this post: https://forum.xda-developers.com/showpost.php?p=75432324&postcount=1568. Integrating a PH-1 specific color fix into a Gcam apk could very well be worth the work.
 
Last edited:

TheIronLefty

Senior Member
Oct 7, 2014
133
211
0
Tbilisi
Huh, this might make me finally install Magisk.

Just for your information, you might have missed that, another developer going by the name of ArtZ did something similar, just for a regular apk (https://www.celsoazevedo.com/files/android/google-camera/dev-artz/). He developed for the LG G6 which shares the IMX 258 with the PH-1 and very much focused on color reproduction. I've been using his latest apk since its release and always returned to it when testing other ones in between since the color reproduction is much better in HDR+ enhanced compared to other apks, his settings might be of interest to you as well in your development.

Edit: after testing tolyans build with your settings I'm definitely impressed by the speed and noise settings, but color reproduction is still significantly better with the black level settings introduced by ArtZ. The color shift can best be seen when taking a low light picture with HDR+ and HDR+ enhanced, the latter will often have a green tint. ArtZ talked a bit about his settings in this post: https://forum.xda-developers.com/showpost.php?p=75432324&postcount=1568. Integrating a PH-1 specific color fix into a Gcam apk could very well be worth the work.

My settings are based of Artz's, in my testing i never got green or magenta tint on my settings, however i did have those issues when u used to use ArtZ's last builds
 

aer0zer0

Recognized Contributor
Sep 20, 2013
3,284
2,503
253
Cortland NY
Huh, this might make me finally install Magisk.

Just for your information, you might have missed that, another developer going by the name of ArtZ did something similar, just for a regular apk (https://www.celsoazevedo.com/files/android/google-camera/dev-artz/). He developed for the LG G6 which shares the IMX 258 with the PH-1 and very much focused on color reproduction. I've been using his latest apk since its release and always returned to it when testing other ones in between since the color reproduction is much better in HDR+ enhanced compared to other apks, his settings might be of interest to you as well in your development.

Edit: after testing tolyans build with your settings I'm definitely impressed by the speed and noise settings, but color reproduction is still significantly better with the black level settings introduced by ArtZ. The color shift can best be seen when taking a low light picture with HDR+ and HDR+ enhanced, the latter will often have a green tint. ArtZ talked a bit about his settings in this post: https://forum.xda-developers.com/showpost.php?p=75432324&postcount=1568. Integrating a PH-1 specific color fix into a Gcam apk could very well be worth the work.
If you don't care about slomo or hevc, you don't need magisk
 
  • Like
Reactions: Robinottawa

Skirr

Member
Jun 20, 2008
42
19
0
My settings are based of Artz's, in my testing i never got green or magenta tint on my settings, however i did have those issues when u used to use ArtZ's last builds
The settings you describe though do only cover chroma and luminance noise handling, right? There are no IMX 258 specific black level offsett settings (aside from activating "Fix Black Level") applied like the ones ArtZ describes:

Release (default is 64.0 for all)
0x427F70A4 # 63.86f
0x427FB852 # 63.93f
0x427FB852 # 63.93f
0x428047AE # 64.14f
(Decimals are very important. There's visible differences using for instance 63.85 instead of 63.86!!!)

I haven't found that option in tolyans build, but I remember some apks would let you change these 4 values in 0.1 intervals. I tried the upper values in a few of those builds a while ago but they never gave the same result compared to the ArtZ apk, probably because ArtZ directly integrated them in the build including the second digit.

I'll try to whip up a quick comparison album this evening between the Essential cam, ArtZ v3.0 Taimen and the tolyan build with your settings to illustrate what I mean with respect to the green tint.
In the meantime, here is an older album I created this February with a few different ports, including the ArtZ v3.1 (which, oddly enough, is older than the v3.0). You can cleary see how most ports handle HDR+ (which i dubbed ZSL in the image descriptions back then) similarily but differentiate heavily when using HDR+ enhanced (HDR+ in the image description): https://photos.app.goo.gl/iGKAjwAD6PbUrgia2

If you don't care about slomo or hevc, you don't need magisk
You're right of course, I initially misread and thought the settings described by TheIronLefty were part of a specific magisk gcam module, not "just" settings for tolyans build.
 
Last edited:

TheIronLefty

Senior Member
Oct 7, 2014
133
211
0
Tbilisi
The settings you describe though do only cover chroma and luminance noise handling, right? There are no IMX 258 specific black level offsett settings (aside from activating "Fix Black Level") applied like the ones ArtZ describes:

Release (default is 64.0 for all)
0x427F70A4 # 63.86f
0x427FB852 # 63.93f
0x427FB852 # 63.93f
0x428047AE # 64.14f
(Decimals are very important. There's visible differences using for instance 63.85 instead of 63.86!!!)

I haven't found that option in tolyans build, but I remember some apks would let you change these 4 values in 0.1 intervals. I tried the upper values in a few of those builds a while ago but they never gave the same result compared to the ArtZ apk, probably because ArtZ directly integrated them in the build including the second digit.

I'll try to whip up a quick comparison album this evening between the Essential cam, ArtZ v3.0 Taimen and the tolyan build with your settings to illustrate what I mean with respect to the green tint.
In the meantime, here is an older album I created this February with a few different ports, including the ArtZ v3.1 (which, oddly enough, is older than the v3.0). You can cleary see how most ports handle HDR+ (which i dubbed ZSL in the image descriptions back then) similarily but differentiate heavily when using HDR+ enhanced (HDR+ in the image description).
I tried using those settings on arthurs build, i even discussed about it in magisk thread, but i never got the same results too. Besides i cant really do anything about integrating it, since i dont know how to work with java.
 

NummerEinsNerd

Senior Member
Aug 20, 2016
221
54
0
When I try to install tolyans build, it says "update existing application" and I am unable to install it... Any fixes?

Sent from my PH-1 using XDA Labs