[Help Needed][Developers] ImplementingCustom Camera HAL/Drivers for 60+ FPS Recording - Nexus 6 Q&A, Help & Troubleshooting

Hi everyone, hope you're all doing fine.
As you might have heard of, Sultanxda has built his own Camera HAL for OnePlus devices, and therefore has enabled native 60,90 and 120 FPS recording by implementing this Camera HAL on his own unofficial CM-based ROMs. He is the only developer to date to build custom Camera HAL for a device.
Here's a little bit of a background of what Camera HAL is and what it basically does:
The HAL sits between the camera driver and the higher level Android framework and defines an interface you must implement so apps can correctly operate the camera hardware.
Fast forward to today, I and @defcomg have tried many ways and methods to enable HFR(High Frame rate) recording(http://forum.xda-developers.com/showthread.php?t=3489084), but it seems like the Camera driver needs to be built from the Source.
@defcomg recently found out that Lenovo had leaked a .zip file containing the Camera HAL/Driver sources for imx214 sensors, particularly Nexus 6's camera sensor.
What I'm asking from developers(or any user that might help) is to try to reach me on Telegram( @blinqipa) so I can share the .zip Camera HAL source(since it is Qualcomm proprietary, and uploading it elsewhere would just be taken down sooner or later) to implement on a custom ROM (preferably CM based).
Some CM commits regarding Camera drivers and HAL1:
http://review.cyanogenmod.org/#/c/167484
http://review.cyanogenmod.org/#/c/167485
http://review.cyanogenmod.org/#/c/167486/"
Edit: Attaching some Screenshots from the .zip file just in case someone needs as proof.
http://imgur.com/a/2qyFr
http://m.imgur.com/Q666mGK

blinqipa said:
Hi everyone, hope you're all doing fine.
As you might have heard of, Sultanxda has built his own Camera HAL for OnePlus devices, and therefore has enabled native 60,90 and 120 FPS recording by implementing this Camera HAL on his own unofficial CM-based ROMs. He is the only developer to date to build custom Camera HAL for a device.
Here's a little bit of a background of what Camera HAL is and what it basically does:
The HAL sits between the camera driver and the higher level Android framework and defines an interface you must implement so apps can correctly operate the camera hardware.
Fast forward to today, I and @defcomg have tried many ways and methods to enable HFR(High Frame rate) recording(http://forum.xda-developers.com/showthread.php?t=3489084), but it seems like the Camera driver needs to be built from the Source.
@defcomg recently found out that Lenovo had leaked a .zip file containing the Camera HAL/Driver sources for imx214 sensors, particularly Nexus 6's camera sensor.
What I'm asking from developers(or any user that might help) is to try to reach me on Telegram( @blinqipa) so I can share the .zip Camera HAL source(since it is Qualcomm proprietary, and uploading it elsewhere would just be taken down sooner or later) to implement on a custom ROM (preferably CM based).
Some CM commits regarding Camera drivers and HAL1:
http://review.cyanogenmod.org/#/c/167484
http://review.cyanogenmod.org/#/c/167485
http://review.cyanogenmod.org/#/c/167486/"
Edit: Attaching some Screenshots from the .zip file just in case someone needs as proof.
http://imgur.com/a/2qyFr
http://m.imgur.com/Q666mGK
Click to expand...
Click to collapse
Your biggest issue will be finding someone to take this up being CM based. Most have stopped using CM as a base for anything except the theme engine due to the rest of the code being garbage.

zelendel said:
Your biggest issue will be finding someone to take this up being CM based. Most have stopped using CM as a base for anything except the theme engine due to the rest of the code being garbage.
Click to expand...
Click to collapse
Yeah you're right, but I think CM is more flexible.
Sent from my Nexus 6 using Tapatalk

blinqipa said:
Yeah you're right, but I think CM is more flexible.
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
Not really. They are the least flexible. Not to mention no one is gonna mess with the blobs for a device. Not only will it cause issues but it is alot of work for something that gets changed with every update.
And building the driver from source is almost impossible as there is no source code for it.

zelendel said:
Not really. They are the least flexible. Not to mention no one is gonna mess with the blobs for a device. Not only will it cause issues but it is alot of work for something that gets changed with every update.
And building the driver from source is almost impossible as there is no source code for it.
Click to expand...
Click to collapse
I have access to the zip file which contains imx214 drivers ready to be built.
Sent from my Nexus 6 using Tapatalk

I mentioned this in the previous thread, but the OnePlus one uses the same sensor as the Nexus 6, why not just pull the already built driver from Sultanxda's ROM?

Hi
Can anyone help me in creating a custom camera Hal for zuk z1?
It has the same sensor as the nexus 6 and oneplus one
I like the manual camera controls on the one

Related

Android 8.0 for Sony Xperia Z1

Hi did anyone saw anything about the Android 8.0 on Sony Xperia Z1?
there isn't even a fully working (bug free) android 7 version for the Z1 ..
solved said:
there isn't even a fully working (bug free) android 7 version for the Z1 ..
Click to expand...
Click to collapse
oh, really? And what are the bugs that prevent you from using eg my Lineage build as daily driver?
We're waiting until some fixes get merged and generally all the common bugs get resolved. I don't really see a reason why should we release half working rom that would get installed by people who don't understand a thing and spam the thread with useless complains.
Just take my word that z1 will get oreo, when it gets released I don't know.
Lineage works great on my device, didn't notice any issues
miXXed404 said:
Lineage works great on my device, didn't notice any issues
Click to expand...
Click to collapse
How about Camera...? in Lineage ROM. is there any bugs or is it great camera with bugs free like stock.
giriz1c said:
How about Camera...? in Lineage ROM. is there any bugs or is it great camera with bugs free like stock.
Click to expand...
Click to collapse
There is a good camera quality but not that good as on stock.
giriz1c said:
How about Camera...? in Lineage ROM. is there any bugs or is it great camera with bugs free like stock.
Click to expand...
Click to collapse
The camera work as it should. But for recognition its not. Like face detection, scene detection. So better on manual. But i want to suggest something to @SuperLamic , can you port the camera saturation and sharpness option. On old RR, XOSP, LOS, DU nougat rom the camera is lag and quite unstable, but those option like saturation and sharpness are working and with steady hand the pics looks awesome.
X-Tsubasa said:
The camera work as it should. But for recognition its not. Like face detection, scene detection. So better on manual. But i want to suggest something to @SuperLamic , can you port the camera saturation and sharpness option. On old RR, XOSP, LOS, DU nougat rom the camera is lag and quite unstable, but those option like saturation and sharpness are working and with steady hand the pics looks awesome.
Click to expand...
Click to collapse
Well, we're still missing camera wrapper that was activating some sony proprietary features and maybe more (haven't really thoroughly looked on it). I guess that can help? If not, then it won't be available.
Btw older roms are using blobs released within Sony Opensource Developer Project (sodp) and it's completely different implementation (that is not completely opensource). So we can't use it (or any part of it). My rom isn't an improvement for what we had, it's completely different.
X-Tsubasa said:
The camera work as it should. But for recognition its not. Like face detection, scene detection. So better on manual. But i want to suggest something to @SuperLamic , can you port the camera saturation and sharpness option. On old RR, XOSP, LOS, DU nougat rom the camera is lag and quite unstable, but those option like saturation and sharpness are working and with steady hand the pics looks awesome.
Click to expand...
Click to collapse
To add to what SuperLamic said, the SODP blobs had support for the Camera2 API, since they were custom made. We use stock blobs on the newer ROMs that use the 3.4 kernel. Since we never had support for Camera2 API on stock (because we were dropped at 5.1.1), we probably never will have those features on custom ROMs.

Google Camera (HDR+) Port on Moto X4

As you guys know, camera performance on the Moto X4, put bluntly, has been less than stellar. Also of note: the Google Camera app (Auto HDR+) has been ported to multiple other Android devices, and it seems as though any device able to utilize the Camera2 API with a Hexagon DSP and Spectra ISP is compatible with the ported camera app. As of a few days ago, the Modded Google Camera ported apk was found to work with the Moto X4, as seen on Reddit in the links below:
https://www.reddit.com/r/ProjectFi/...orted_hdr_pixel_camera_apk_works_for_moto_x4/
https://www.reddit.com/r/MotoX4/comments/77vn3w/psa_google_camera_port_hdr_from_pixel_works_on_x4/
As discussed already, the performance of the Moto X4's camera with the port is much better all round (especially low-light photography) than it is with Motorola's own camera app, which is slow and lacks good processing. Now, listed on some of the posts of the Reddit links above (much more information on the matter there) are links to all of the different apks (some fully functioning, some as test versions, some that are manual and configurable) of the Ported Google Camera app; credits to developers B-S-G and Ivanich for making this possible. Mind you, the most stable apk (Ivanich v1.4 Full PXL2) is configured for the OnePlus 3 most natively, which doesn't seem to support as many newer features of the Google Camera app as the Moto X4 does. That said, if a more stable apk of the ported Google Camera app can be configured to best go along with the hardware of the Moto X4's camera (as has been done with the Xiaomi Mi A1), then for those who aren't concerned about using the secondary camera, there will be a viable option for much improved photography on the Moto X4 as well, that takes advantage of the hardware present more effectively. Again, much more detailed explanation of these concepts on Reddit, in the links provided above. I wanted to bring attention to this for those who are interested over here.
Only deficiency of the apk...
You have the option to delete photos while HDR+ is still processing them. If you do, it seems to get stuck in the notification bar. I don't know if this impacts anything, but just a note.
Great find! Mine comes in tomorrow, and I can't wait to try this out!
I wonder: is anybody working on configuring an apk better suited for the Moto X4's camera hardware, and/or is anyone willing to? As of right now, these are the config options that work most effectively on the Moto X4's hardware (as posted in the r/projectfi [1st] Reddit link):
Phone Model - Nexus 6P. All work here, but the 6P option seems to be the best in low light.
Config camera - Pixel 2017 Zsl HDR #1 and #2 options can crash the app (if you crash it, clear data/cache). All the others seem to work. ZSL is for HDR Auto mode. Pixel 2016 Zsl HDR is most optimal.
Buffers Size - 15 (optimal)
Note: this is the configurable mod below:
https://www.celsoazevedo.com/files/...GCB_7.0H_C2API_v.4.0_AllinOne_Full_Manual.apk
crazyates said:
Great find! Mine comes in tomorrow, and I can't wait to try this out!
Click to expand...
Click to collapse
When you do try it out, if you can compare picture/video quality to the stock Motorola app, that'd be great, and something I suggest you do anyway to see how you feel about it.
Crashes
Anyone else seeing frequent crashes?
Update: These settings at least seem to keep my moto x4 from crashing for now. I usually can make them happen with some settings by force closing the camera app then starting it again.
Model - 6P
Config camera - Pixel 2017 Hardware Zsl (DR Dogfood)
Buffers size - 15 optimal
Total imagereader image coung - 14 (AllPixel+AllExp)
hdr+ burst frame count - 8 (nexus 6)
Calculation hdr+ image count - Pixel, PixelXL
dirtygreek said:
Anyone else seeing frequent crashes?
Update: These settings at least seem to keep my moto x4 from crashing for now. I usually can make them happen with some settings by force closing the camera app then starting it again.
Model - 6P
Config camera - Pixel 2017 Hardware Zsl (DR Dogfood)
Buffers size - 15 optimal
Total imagereader image coung - 14 (AllPixel+AllExp)
hdr+ burst frame count - 8 (nexus 6)
Calculation hdr+ image count - Pixel, PixelXL
Click to expand...
Click to collapse
Those settings work well also, and don't have problems with crashing either.
Can someone please post some comparison shots with motocam vs gcam ? thanks
kraatus90 said:
Can someone please post some comparison shots with motocam vs gcam ? thanks
Click to expand...
Click to collapse
See my pics Here.
crazyates said:
See my pics Here.
Click to expand...
Click to collapse
Can you try this gcam mod ? set hdr+ to on. and shoot.
https://www.androidfilehost.com/?fid=889964283620761630
kraatus90 said:
Can you try this gcam mod ? set hdr+ to on. and shoot.
https://www.androidfilehost.com/?fid=889964283620761630
Click to expand...
Click to collapse
That G5 camera crashes instantly when you open it. I'm not sure the G5 camera is the same one we have?
crazyates said:
That G5 camera crashes instantly when you open it. I'm not sure the G5 camera is the same one we have?
Click to expand...
Click to collapse
No it's not the same , what you tried was probably gcam4.4 based, the apk i gave link to is based on gcam 4.2 arm version. anyway thanks for trying.
Update: the new Arnova8G2 manual gcam apk works for this device as well. From what I've been told, it provides a similar image quality with better color processing than other gcam ports, and better video quality. This is MUCH better performing in most every aspect that Motorola's stock app. It can be found in the first Reddit link in the original post in this thread (I'm the OP), or directly from here: https://www.celsoazevedo.com/files/android/google-camera/. The Arnova8G2 manual mod is based off of a newer version of Gcam, that being 5.1.014 I believe, as opposed to 4.2.x, as the BSG and Ivanich mods are based off of.
TurboBot247 said:
Update: the new Arnova8G2 manual gcam apk works for this device as well. From what I've been told, it provides a similar image quality with better color processing than other gcam ports, and better video quality. This is MUCH better performing in most every aspect that Motorola's stock app. It can be found in the first Reddit link in the original post in this thread (I'm the OP), or directly from here: https://www.celsoazevedo.com/files/android/google-camera/. The Arnova8G2 manual mod is based off of a newer version of Gcam, that being 5.1.014 I believe, as opposed to 4.2.x, as the BSG and Ivanich mods are based off of.
Click to expand...
Click to collapse
Thanks! I'll try it out.
crazyates said:
Thanks! I'll try it out.
Click to expand...
Click to collapse
So far, how do you feel about the image and video quality with the updated version of this app? Also, how do you feel it stacks up against other devices that you've worked with in the past?
Just tried the newly released v9.1 version. Very impressive with low light indoors. Pictures came out looking like the room was well lit, when it was in fact dimly lit. Also, switching to 60fps on video provides a much brighter/clearer image.
TurboBot247 said:
So far, how do you feel about the image and video quality with the updated version of this app? Also, how do you feel it stacks up against other devices that you've worked with in the past?
Click to expand...
Click to collapse
I meant to try it out, but I haven't had the time. I was using the older version of the Gcam to record video at a wedding this past weekend: VERY dark lit dance floor with strobe/lights moving all around, and fast movement. Even at the brightest setting, it was still too dark to see almost anything. I know this is a worst case video scenario, but if the new apk improves video low-light, that would be great!
crazyates said:
I meant to try it out, but I haven't had the time. I was using the older version of the Gcam to record video at a wedding this past weekend: VERY dark lit dance floor with strobe/lights moving all around, and fast movement. Even at the brightest setting, it was still too dark to see almost anything. I know this is a worst case video scenario, but if the new apk improves video low-light, that would be great!
Click to expand...
Click to collapse
The Arnova8G2 manual apk should improve the dark image of video in 30FPS, as seen with other mods.
TurboBot247 said:
The Arnova8G2 manual apk should improve the dark image of video in 30FPS, as seen with other mods.
Click to expand...
Click to collapse
Need some help here, if you own Android one edition. can you share System/vendor/lib and lib64 folder ? you don't need root for it just copy those folder to internal storage and zip it. you can use free version of solid explorer for it. thanks.
i want to see if there's any difference between retail and android one edition regarding image post processing etc.
kraatus90 said:
Need some help here, if you own Android one edition. can you share System/vendor/lib and lib64 folder ? you don't need root for it just copy those folder to internal storage and zip it. you can use free version of solid explorer for it. thanks.
i want to see if there's any difference between retail and android one edition regarding image post processing etc.
Click to expand...
Click to collapse
Nope, don't own one yet. There is no difference in image processing between the two, as they both run the same versions of Motorola's camera software and have the same hardware in tow as well; there'd be no reason for the app to process images differently on the regular version than on the Android One version. They both have poorly optimized camera software in common.

Difference in picture quality

The developers and actual 3t users,
I want to know,
is there any difference in the camera picture quality from the ported google camera apk installed on oxygen OS as compared to the same google camera app installed on the custom ROM like OMNI, Lineage or any other.
Actually, I want to know does the ROM decide the quality produced by apk camera application or the ported google camera apk produces the quality as per hardware (which is SD 821 in 3t)
If there was no difference in post processing between the Ported Version and the Play Store version, why would developers bother doing ports at all? Of course there's a difference, the post processing of HDR+ highly increases picture quality.
The ROM has an important role in camera, as the Camera HAL used by the ROM will only show the quality. Most ROMs use SultanXDA's HAL as it is much better than OOS HAL. This is a debatable matter. Some rarely updated ROMs use their own HAL's which may be better or worse. The only way to test it is via trail and error.
Please try to do research on this before you post new questions here, as you can test camera quality on your own, or read others experience here (https://forum.xda-developers.com/on...oogle-camera-hdr-60fps-video-t3658552/page235)

Google Camera Port for Xperia X Performance

Since Google Pixel 3 launched, the modder tried to port the camera app to the another Android devices, I'm so excited about it. But unfortunately until now the app not coming even to single Sony devices. So, anyone's here please make it available for Sony Xperia X Performance.
Devices that got Google Camera app
https://www.xda-developers.com/google-camera-port-hub/
You can use it as long as youre in aosp.
The right version for dora
hasbyduryea said:
You can use it as long as youre in aosp.
Click to expand...
Click to collapse
I wonder though: which version of that port is suitable for X Performance?
Presumably need to find the device that has the same SoC and camera
With kind regards.
UPD #1: GCam_5.3.015-Pixel3Mod-Arnova8G2-v4Beta1 - this version is working for X Performance, testing further on Oreo 8.1 AOSP with kernel v4.9
UPD #2: also installed HEVC+SloMo GCam (Magisk) from the OnePlus 3/3T section via Magisk, the app does not crash or anything, safe to use I guess....
UPD #3: HDR+ is not working, maybe need some tweaking in the Advanced section of Settings
UPD #4: At the very first switcing to 60 fps mode the app reports a crash; after a re-launch the mode persists as set, video records fine, no idea if it is actually 60fps
Anyways, test out, guys!
P.S. HDR+ engine seems funky for the device: the camera snaps the original picture just fine, but the processing messes the picture up in the end. Maybe should talk to the developer of the port.
Aray21 said:
Since Google Pixel 3 launched, the modder tried to port the camera app to the another Android devices, I'm so excited about it. But unfortunately until now the app not coming even to single Sony devices. So, anyone's here please make it available for Sony Xperia X Performance.
Devices that got Google Camera app
https://www.xda-developers.com/google-camera-port-hub/
Click to expand...
Click to collapse
Which one i can use to x performance ?
On a disturbing case of blindness
Ontrinity said:
Which one i can use to x performance ?
Click to expand...
Click to collapse
Hello, @Ontrinity,
you can look up to post #3 and see that I have already replied to your question (much earlier than you even asked it). Please use the instructions.
In the meantime, consult a doctor on the matter of your eyesight - I think it's alarmingly poor and you might need to use some glasses or lenses.
Have a very nice day, and thank you for your time.

Mi A3 Config File for Parrot's GCam 7.0.x

PMGC_7.0.009_ConfigsVersion_V3
Mi A3 xml config
Source : https://www.celsoazevedo.com/files/android/google-camera/f/configs-parrot-01/
I have it, but what does exactly?
papafan said:
I have it, but what does exactly?
Click to expand...
Click to collapse
Xml file config this gcam to give best pictures
But how import this config xml file?
Sorry i found it.
Where should i put it ?
Press the links ppl. Don't be lazy
sotmax said:
Press the links ppl. Don't be lazy
Click to expand...
Click to collapse
Ya i already have placed it in the gcamconfig folder is there anything else i have to fo ?
Has anyone tried Astrophotography with this or any GCam version? I'm not able to enable it
I think that simply select fron the pop up menu the infinity option in nightsight mode.
zenkhas said:
Has anyone tried Astrophotography with this or any GCam version? I'm not able to enable it
Click to expand...
Click to collapse
I think it's not present in this version of gcam
zenkhas said:
Has anyone tried Astrophotography with this or any GCam version? I'm not able to enable it
Click to expand...
Click to collapse
Astrophotography isn't that easy to port. A major reason why even Pixel 2 and OG Pixel will not receive this feature is because of hardware limitations. Even if the developers manage to port the feature somehow, it won't give you optimal results. Although the image processing highly depends on the software, but the hardware capability plays a very crucial role as well. For now, I would say, have patience and see how the porting scene rolls out.
I have a Pixel 3 XL (Which is supposed to get the feature) too with the latest official Google Camera 7.2 installed, still no sign of Astrophotography on my end. I am not a developer but have read enough on the topic because I can't purchase the Pixel 4 here in India, so looking out for as many P4 camera features to be available for my Pixel 3. Sadly, Live HDR+ and Dual Exposure controls won't be available for my device too.
Update: cstark27 has released a port of GCam version 7.2 and has managed to enable Astrophotography on the Pixel 2 (of course, the port is universal like always), along with several other changes. It's worth trying the port on the Mi A3 too. Here's the link to the release notes.
DJBhardwaj said:
Astrophotography isn't that easy to port. A major reason why even Pixel 2 and OG Pixel will not receive this feature is because of hardware limitations. Even if the developers manage to port the feature somehow, it won't give you optimal results. Although the image processing highly depends on the software, but the hardware capability plays a very crucial role as well. For now, I would say, have patience and see how the porting scene rolls out.
I have a Pixel 3 XL (Which is supposed to get the feature) too with the latest official Google Camera 7.2 installed, still no sign of Astrophotography on my end. I am not a developer but have read enough on the topic because I can't purchase the Pixel 4 here in India, so looking out for as many P4 camera features to be available for my Pixel 3. Sadly, Live HDR+ and Dual Exposure controls won't be available for my device too.
Update: cstark27 has released a port of GCam version 7.2 and has managed to enable Astrophotography on the Pixel 2 (of course, the port is universal like always), along with several other changes. It's worth trying the port on the Mi A3 too. Here's the link to the release notes.
Click to expand...
Click to collapse
When it comes to Google, everything is done by Software. Astrophotography ports are already available for Poco F1, i hope somebody works on them to support A3 too.
zenkhas said:
When it comes to Google, everything is done by Software. Astrophotography ports are already available for Poco F1, i hope somebody works on them to support A3 too.
Click to expand...
Click to collapse
Yes, but what I meant was that the results would not be as good as seen on the Pixel 4/Pixel 3/3a due to hardware. And yes, it works. You can even force-enable the Astrophotography feature in GCam.
Which mod has Focus at infinity option?

Categories

Resources