yashsingh1/xdaforums huggingface dataset:
[OnePlus X Themes and Apps] Sultanxda:
This is not how banding works! There is no universal solution to banding!

Let's say your TV emits light at a frequency of 50 Hz. In order to prevent banding from occurring, I would need to set the exposure time to be a multiple of 50, such as 1/50th of a second. However, if I did this, then suddenly everyone in the USA would experience banding from every lightbulb (power grid in the USA oscillates at 60 Hz), and meanwhile you wouldn't see any banding at all.

It doesn't matter if your banding issues didn't occur with the 03-05 build. If you didn't experience banding then that just means that there were tons of other people who experienced it. I didn't change anything related to exposure time since 03-05, but even if I did, it wouldn't matter because a universal fix for banding does not exist.

The frequency that light is emitted at can vary by device too. I'm sure that you can find some screens that caused banding in the 03-05 build but don't cause banding in the 03-07 build.
[OnePlus X Themes and Apps] ERRORR2:
It seems like 4k and 1080p recording is broken in latest build. Video is recorded, but when i try to play it, player shows only first frame. Tested on CM13 with ColorOS camera and Snapdragon camera.
[OnePlus X Themes and Apps] devtry:
[MENTION=4800121]Sultanxda[/MENTION]: I'm on OOS 2.2.0 and on Google Camera taking a photo with HDR causes the app to close (as soon as it finishes the processing). Stock and Snapdragon cameras are OK. Only thing I could try is upgrade to OOS 2.2.0-X, but I doubt that will fix it. What do you think the problem could be? Thanks!
[OnePlus X Themes and Apps] Sultanxda:
Camera HAL is innocent. I flashed the 03-07 build I uploaded just to be certain, and 4K recording works fine for me in both Google Camera and Snapdragon Camera on CM12.1. I haven't made any changes to the camcorder for a while (no changes since 02-26), so my results make sense.

Sounds like something is wrong with the camera in CM13. First HDR was found to be broken, and now this :/

Could I get a logcat?
[OnePlus X Themes and Apps] awildsloth:
Right but it also happens if I make a video at night like in the middle of the street, is that also normal?
[OnePlus X Themes and Apps] Jude Aranha:
Happened with me too on MX Player, try using SW decoder.

Guys, don't bash the Man's hardwork without researching about your issues a little, remember he is doing this for free.

I can confirm that HDR works on CM12.1 & not on CM13.

~Tapatalk'd v¡a my OnePlus X
[OnePlus X Themes and Apps] Sultanxda:
Yes, that is normal; the power grid in your country probably carries a current that oscillates at 50 Hz. Street lights emit light at the frequency of the electrical current that they receive from the power grid. When recording video at night, my camera HAL sets the exposure time to 1/30th of a second; 30 is not a multiple of 50, so banding occurs.

By luck, people using my camera HAL in the USA and other countries with a 60 Hz power grid will not see banding from street lights when recording video at night.
[OnePlus X Themes and Apps] awildsloth:
Alright dude, thanks a lot ;)
[OnePlus X Themes and Apps] ERRORR2:
Thanks for answer and for all your great work) I flashed 2016-03-05 version, where at least videos recorded in full hd playing fine. Also i tried to play 4k videos on PC, and it playing fine too. So i think that there is a problem with 4k playing on CM13, and I hope that CM developers will fix it someday.

It's just a bug report. I dont asking about fixing it (but of course hope on it))). Thanks for your help, but I can't play recorded 4k videos on CM13 in any players, including MX with SW decoder.
[OnePlus X Themes and Apps] devtry:
Sure, there you go, let me know if you need anything else ;)

In particular this happens:

--------- beginning of crash
3712 [ 03-06 12:31:22.059 6684: 6684 E/AndroidRuntime ]
3713 FATAL EXCEPTION: main
3714 Process: com.google.android.GoogleCamera, PID: 6684
3715 java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.android.camera.PhotoModule$NamedImages$NamedEntity.title' on a null object reference
3716 at com.android.camera.PhotoModule$JpegPictureCallback.saveFinalPhoto(PhotoModule.java:944)
3717 at com.android.camera.PhotoModule$JpegPictureCallback.onPictureTaken(PhotoModule.java:927)
3718 at com.android.ex.camera2.portability.AndroidCameraAgentImpl$AndroidCameraProxyImpl$7$1.run(AndroidCameraAgentImpl.java:916)
3719 at android.os.Handler.handleCallback(Handler.java:739)
3720 at android.os.Handler.dispatchMessage(Handler.java:95)
3721 at android.os.Looper.loop(Looper.java:139)
3722 at android.app.ActivityThread.main(ActivityThread.java:5298)
3723 at java.lang.reflect.Method.invoke(Native Method)
3724 at java.lang.reflect.Method.invoke(Method.java:372)
3725 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
3726 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
3727
3728
3729 [ 03-06 12:31:22.059 6684: 6684 D/AppTracker ]
3730 App Event: crash
3731
3732 [ 03-06 12:31:22.068 260: 6737 E/QCameraParameters ]
3733 int32_t qcamera::QCameraParameters::setAEBracket(const qcamera::QCameraParameters&): scene mode is HDR, overwrite AE bracket setting to off
3734
3735 [ 03-06 12:31:22.073 899: 1873 W/ActivityManager ]
3736 Force finishing activity 1 com.google.android.GoogleCamera/com.android.camera.CameraLauncher
3737
3738 [ 03-06 12:31:22.077 260: 6737 E/QCameraParameters ]
3739 int32_t qcamera::QCameraParameters::setAEBracket(const qcamera::QCameraParameters&): scene mode is HDR, overwrite AE bracket setting to off
3740
3741 [ 03-06 12:31:22.078 899: 6881 D/DropBoxManagerService ]
3742 file :: /data/system/dropbox/data_app_crash@1457263882076.txt
3743
3744 [ 03-06 12:31:22.089 260: 6737 E/QCameraParameters ]
3745 int32_t qcamera::QCameraParameters::setAEBracket(const qcamera::QCameraParameters&): scene mode is HDR, overwrite AE bracket setting to off
3746
3747 [ 03-06 12:31:22.108 899: 920 D/Atlas ]
3748 Validating map...
3749
3750 [ 03-06 12:31:22.112 899: 920 W/ActivityManager ]
3751 Dismiss app error dialog : com.google.android.GoogleCamera
3752
3753 [ 03-06 12:31:22.115 6684: 6684 I/Process ]
3754 Sending signal. PID: 6684 SIG: 9
[OnePlus X Themes and Apps] 73IGH:
Found another bug on oos, when panorama selected i cannot change back to normal camera, needs to be closed and re-opened.

Dont really use panorama, just reporting the bug.
[OnePlus X Themes and Apps] ashwinpilgaonkar:
Have you by any chance flashed blu spark kernel?

I had the same issue and didn't know what was causing it. I restored the stock CM kernel and the issue was rectified.

Its somehow unable to playback videos after flashing this kernel. They play fine on the PC though.
[OnePlus X Themes and Apps] Loureiro:
This just works right on H20S with latest vendor libs.

ISO Controls works just as expected.

HDR works.

Unbelievable Sultanxda. This device's camera is now enjoyable.
[OnePlus X Themes and Apps] psychem:
so this works or not on latest H2OS?
[OnePlus X Themes and Apps] Loureiro:
As I said, with latest vendor libs it works just right.

Just need to extract them from OOS 2.2.0.

I'll send you a flashable zip file if you want. You just need to flash it before this custom camera HAL
[OnePlus X Themes and Apps] psychem:
h2os received a recent OTA. maybe libs were updated? can you upload the libs i dont have oos.
[OnePlus X Themes and Apps] Maxilius123:
I would like to have your flashable zip please ;)
[OnePlus X Themes and Apps] ERRORR2:
Yes, I'm on blu spark. Can't even think that it could be because of kernel. Thanks for this info.
[OnePlus X Themes and Apps] Loureiro:
Here it is

https://drive.google.com/file/d/0B7oy7TtPPgOsdEFfNnhHRS12TTA/view?usp=docslist_api
[OnePlus X Themes and Apps] Sultanxda:
Not a camera HAL issue. Using the default camera HAL that comes with OxygenOS 2.2.0, taking an HDR photo doesn't crash Google Camera, but it results in a 240x320 resolution image getting dumped out instead (that's 0.1 megapixels). With my camera HAL, taking an HDR photo does crash Google Camera, but a full-sized 13.1 megapixel image is dumped out instead.

Pick your poison :p

Something is wrong with Google Camera and HDR mode in OxygenOS (it works fine in CM12.1 for me). I'd just use a different camera app for HDR if I were you.

I don't have this issue with any of the camera apps I tested. Which camera app/ROM are you using?
[OnePlus X Themes and Apps] devtry:
Yeah, I guess I will just use another camera (stock is actually okay), I just reported the problem so that you could fix it if it was in the HAL ;)

Actually I may abandon OOS sooner or later...

Oh, and thanks! :)
[OnePlus X Themes and Apps] Falcon36:
This is true. The right explanation. [emoji6]

One plus X
[OnePlus X Themes and Apps] Maxilius123:
Awesome, works like a charm.

Thank you!
[OnePlus X Themes and Apps] 73IGH:
Latest OOS, stock camera, BS kernel, xposed.

After more testing it still sometimes sticks on other modes too, not every time though very random, sometimes its fine.
[OnePlus X Themes and Apps] joqinha:
Thanks [MENTION=4800121]Sultanxda[/MENTION]. What a job!

Working perfectly! (OOS 2.2.0-X, blu_spark kernel, snapdragon camera)
[OnePlus X Themes and Apps] awildsloth:
Where did you get the Snapdragon camera dude?

Enviado do meu ONE E1003 através de Tapatalk
[OnePlus X Themes and Apps] joqinha:
Check

http://xdaforums.com/oneplus-x/themes-apps/app-snapdragon-camera-v2-1-t3265539
[OnePlus X Themes and Apps] Murphy7523:
Thank you thank you finally a camera that does not need an apology tour.
[OnePlus X Themes and Apps] Axx0n:
Oh that really sounds tempting! :)

But I'd really miss the possibility of recording instan slow motion videos I have to say!

Is there any Camera App that has this function and is working with this HAL?

I can't seem to find a camera that has this feature. Think the Snapdragon Cam can't do it neither as far as I could tell.
[OnePlus X Themes and Apps] sanjay.ghanchi:
Hope u are not on oxygen os

Download hydrogen camera in app section posted by me

Slow motions works great :)

And if you are on oxygen os then let me knw I can provide you with hydrogen camera clone
[OnePlus X Themes and Apps] Axx0n:
Oh that sounds promising. :o I'm indeed currently running on OOS but will flash the AICP Rom as a daily driver in a few days when i have got some time. Would it work with MM or CM13 based Roms too?

Alternatively flashing the modded HAL with Snapdragon Camera would allow me to record 720p in higher FPS if I'm not mistaken, so then I could get the slow motion by playing it on 30 fps right?:confused:
[OnePlus X Themes and Apps] sohaibshtf:
hey guyz, do i have to root or unlock bootloader to install it, can anyone please guide me how to install this
[OnePlus X Themes and Apps] Axx0n:
You have to flash it via custom recovery (TWRP). But as far as I know you have to unlock your bootloader in order to get this custom recovery.

So yes you will need to unlock your bootloader but rooting afterwards is not a necessity, as far as I know.

There are Guides here in this Forum and over at the OnePlus community for unlocking and flashing via Custom Recovery ;)
[OnePlus X Themes and Apps] sohaibshtf:
thanks buddy, but whatever you said crossed my mind Tangentially ?, i am noob in rooting and flashing, guess I've to do some homework
[OnePlus X Themes and Apps] sanjay.ghanchi:
Yes

But I haven't tested hydrogen camera on any mm roms

Hope it works
[OnePlus X Themes and Apps] awildsloth:
You're awesome! :D
[OnePlus X Themes and Apps] klaboor:
Yes I can confirm exact same behavior and also same for flashlight in video mode, once is ON and you switch mode it will stay ON and you aren't able to switch it OFF without closing the camera app.

Using stock Google Camera and OxygenOS 2.2.0-X only rooted, means stock recovery and locked bootloader. Of course flashing the .zip did not work in stock recovery, but I get it done with manual copy/overwrite all of the files and reboot.
[OnePlus X Themes and Apps] sohaibshtf:
how do you make it work without root and locked bootloader

can you please explain me...
[OnePlus X Themes and Apps] klaboor:
Here is guide to do so, but as I said you wont be able to flash zips usual way. You have to replace files manually with some root explorer.
[OnePlus X Themes and Apps] Im_Mattgame:
Why don't you contact OnePlus about this? They gave up trying to fix this but here it is, the fix.

:)
[OnePlus X Themes and Apps] Sultanxda:
They sent me the OPX for free, so I'm assuming they already know (they didn't seem too interested when I told them).

I only know for sure that they gave up on 4K. I don't know if they tried to fix the low-framerate bug.
[OnePlus X Themes and Apps] sneakerspark:
They sent you OPX for free?

In that case what do you think about the potential of this device? Worth upgrading from OPO?
[OnePlus X Themes and Apps] Sultanxda:
I don't think it's worth upgrading from the OPO. The screen on the OPX is much better, its build quality is great, its front camera is better, and its rear camera is better in low lighting (not better in good lighting), but it has some downsides. The OPX's battery is pretty small, and the OPX's battery meter isn't that good. The OPX uses the PMIC (Power Management IC) for battery readings (to make the device cheaper), while the OPO has a chip dedicated to battery statistics that provides much better battery readings than the PMIC.

If the OPX had a larger battery and larger aperture for its rear camera, then I'd probably use it instead of my OPO. But it doesn't, so for now my OPX is a music player and secondary alarm clock :silly:
[OnePlus X Themes and Apps] J0kker:
You forgot to talk about the perfect fit of an opx in the pocket, that's not fair! ?

Envoyé de mon ONE E1003 en utilisant Tapatalk
[OnePlus X Themes and Apps] Dark Passenger:
[MENTION=4800121]Sultanxda[/MENTION] kind of off topic but still since your someone who has ported sucessfully kernel 3.10 to bacon. whats the best fit CAF branch for porting it to the msm8974 chipset ?

So far there doesnt seem to be a branch present even...
[OnePlus X Themes and Apps] devtry:
Or 3.18, might be more worth the effort at this point ;)
[OnePlus X Themes and Apps] awildsloth:
Sultan-senpai, can you confirm that your fix is working with OP's most recent update for OOS? Thanks a lot in advance and sorry if this was already asked!
[OnePlus X Themes and Apps] bundysoat:
Hi Buddies, you have a .zip to revert the camera HAL??, Thanks.
[OnePlus X Themes and Apps] Mojar7070:
Working fine with 2.2.0-x.

---------- Post added at 11:25 AM ---------- Previous post was at 11:25 AM ----------

Sir, been asked a couple of times already. Only way to revert is to flash stock OOS rom.
[OnePlus X Themes and Apps] erorcun:
LA.BF.2.1.2 for Marshmallow. Couldn't get any other branch to work.
[OnePlus X Themes and Apps] :
It is
[OnePlus X Themes and Apps] 73IGH:
Yes still some bugs on OxygenOS 2.2.0-X with stock camera, only minor but if/when they get fixed it will be the best camera ever.
[OnePlus X Themes and Apps] Jude Aranha:
I have a little request, now if any of you know it, the newer Nexus series of devices (shamu, bullhead & angler in particular) have a different UPDATED Google Cam app, I dont know why this is the case, so I went ahead and installed this special APK, and it almost works, except when we switch to video mode, it crashes. So my question being, if it can work perfectly for 80% of the features, why now the remaining 20% ?

We have to swipe right to left for video as seen one the screenshot, but as soon as I do that, the app crashes.

HERE is the APK, at the first launch you'll be greeted with the below screen, it will ask to switch to video mode right away, workaround to get at least photos working is just tap the shutter button. If will capture a pic but other features will be usable, everything except Video. If someone could look into it, would be great :D

~Tapatalk'd v¡a my OnePlus X
[OnePlus X Themes and Apps] awildsloth:
Is 2.2.0-X the latest version where OP implemented the camera corruption fix? Because that's my current version and I still haven't updated.

Enviado do meu ONE E1003 através de Tapatalk

---------- Post added at 11:17 PM ---------- Previous post was at 11:10 PM ----------

Do I have to reflash the fix after updating? Thanks in advance :)

Enviado do meu ONE E1003 através de Tapatalk

---------- Post added at 11:19 PM ---------- Previous post was at 11:17 PM ----------

Maybe it's because the update is meant for MM and not for LP?

Enviado do meu ONE E1003 através de Tapatalk
[OnePlus X Themes and Apps] Jude Aranha:
This is Ressurection Remix, as stated in my Signature.
[OnePlus X Themes and Apps] Dark Passenger:
Hi thanks so the 8064 branch.
[OnePlus X Themes and Apps] erorcun:
It's apq8084.
[OnePlus X Themes and Apps] awildsloth:
It didn't show up on Tapatalk, sorry.
[OnePlus X Themes and Apps] Sultan0274:
how to reverse it please provide any zip file or a solution i need manual settings and it is not showing up
[OnePlus X Themes and Apps] sanjay.ghanchi:
Flash back ur ROM again

N manual settings work great just use some different camera app like snapdragon camera
[OnePlus X Themes and Apps] sohaibshtf:
its because that cam is for marshmallow and specially for Nexus devices only, i tried to install it on my dad's Moto G3 and got the same error although it was running on Marshmallow
[OnePlus X Themes and Apps] mundano:
[MENTION=4800121]Sultanxda[/MENTION] , I understand your choices, but in Europe, where the power grid works at 50Hz, the end results under artificial light are just unusable, since the banding is really visible and intrusive... I can get somewhat satisfying results in places illuminated by old incandescent lights, but under LED or fluorescent lights there's just too much banding. Considering that incandescent lights are not sold anymore due to environmental regulations, the banding problem occurs virtually anywhere except in daylight....

Here is a quick example of the results, and this is not in the worse scenario, because there was some natural light coming from the window: https://youtu.be/p6UHa64a0Po

When using the camera HAL that comes with OxygenOS, theres no banding at all.. So they either are using separate settings for European and American versions, or they implemented an Auto-Anti-Banding mechanism that switches between 60 and 50 Hz like most modern cameras do...

So, my question is: Do you know how OnePlus avoids the banding? Can you implement a similar mechanism? Or at least can you make a European version of your Camera HAL with video frame-rate fixed at 25fps in low light conditions?
[OnePlus X Themes and Apps] Sultanxda:
OnePlus avoids the banding because of their low frame-rate issue. The proprietary camera libraries might have a working auto-antibanding routine (though I've never seen it properly compensate for 60 Hz banding on the OPO), but we can't use it because we'd be pushed back to step 1 and be stuck with the low frame-rate problem again.

I'm already planning on addressing the banding in the next update.
[OnePlus X Themes and Apps] Im_Mattgame:
Oh I see, it's just that two weeks ago the OnePlus X was featured in the gadget show and the user who was trying it said it was really nice except for the camera which is why it lost. At that moment I wanted to link them this :D

---------- Post added at 12:45 PM ---------- Previous post was at 12:41 PM ----------

When I film in 4k and turn the phone the fps aren't low but there is a slight trail if you see what I mean.
[OnePlus X Themes and Apps] 73IGH:
Were you able to replicate the bug where the camera randomly would stick while changing between modes? it still happens randomly on latest OOS and stock camera mainly after selecting panorama.

Will still use this even if the small bugs aren't fixed, amazing job!
[OnePlus X Themes and Apps] Sultanxda:
No, I'm not using OOS and I'd rather not spend hours trying to replicate bugs with the buggy OOS camera.

If you can reproduce the issue, give me a log and I'll look at it. Otherwise, just use a different camera app.

I don't know what you're talking about. How would I even fix a "bug" like this in the first place?

None of the 4K tests on YouTube show anything even resembling a problem like this, so there is no bug.
[OnePlus X Themes and Apps] 73IGH:
I have similar probs with google camera, hdr hangs or fc after taking picture and cannot view pics taken with photosphere - get error saying picture has no panorama metadata or something, panorama pics are fine.

This is why i use oneplus camera, its a little less buggy for me.

BTW, what os and camera do you use on your OPX?
[OnePlus X Themes and Apps] Sultanxda:
New build uploaded with an anti-banding solution in place. Since there are more countries in the world with a 50 Hz power grid than those with a 60 Hz power grid, the default anti-banding mode has been set to 50 Hz. I have made a flashable zip that will change the default anti-banding mode to 60 Hz if you are in any of the countries listed under the installation instructions in the OP.

[MENTION=5803620]73IGH[/MENTION] I'm using CM12.1 and Snapdragon Camera. OOS is known to have issues with HDR mode in Google Camera; see my post about it here: http://xdaforums.com/showpost.php?p=65687743&postcount=232
[OnePlus X Themes and Apps] 73IGH:
Ok, I thought you were on oos, my bad.

I could try snapdragon camera but im sure it has issues on oos also.

Not ready to try CM yet, I will try 13 when an official snapshot is out.
[OnePlus X Themes and Apps] Manelit:
This new update changed my keys xD back button and all apps button are switched after the flash!!

[MENTION=7127115]Sultan0274[/MENTION] now im all confused ahah
[OnePlus X Themes and Apps] Sultanxda:
There is literally nothing in the new update that could cause that.
[OnePlus X Themes and Apps] Manelit:
Everything was fine until i flashed the new update. Something there must have gone wrong
[OnePlus X Themes and Apps] awildsloth:
Noob question: did you wipe cache and dalvik? [emoji13]

Enviado do meu ONE E1003 através de Tapatalk
[OnePlus X Themes and Apps] Manelit:
Sure! I do that everytime..
[OnePlus X Themes and Apps] awildsloth:
Try restoring and re-flashing the update dude

Enviado do meu ONE E1003 através de Tapatalk
[OnePlus X Themes and Apps] Manelit:
already doing that! Im waiting for it to finish to update here.

Update: Everything stays the same. Keys switched.
[OnePlus X Themes and Apps] ChavitoArg:
This happened to me as well with previous versions, could TWRP be causing this?

Solution: switch keys in oos, reboot, switch keys and so until is fixed. [emoji1]

Enviado desde mi ONE E1005 mediante Tapatalk
[OnePlus X Themes and Apps] Manelit:
I'm not using oos! Actually my bad for not saying it. Using CM13 with Blue_Spark 104 kernel.
[OnePlus X Themes and Apps] lakyboss:
/system/usr/keylayout/synaptics-rmi.kl

Open the above file in any root explorer

Change

key 139 APP_SWITCH VIRTUAL

key 158 BACK VIRTUAL

key 172 HOME VIRTUAL

To

key 158 APP_SWITCH VIRTUAL

key 139 BACK VIRTUAL

key 172 HOME VIRTUAL

Save the file and reboot.

Found it in Temasek's ROM thread
[OnePlus X Themes and Apps] Manelit:
THANK YOUU A LOT!! Been searching for this til now!
[OnePlus X Themes and Apps] mundano:
Now it's perfect... 4K working, no more frame drops, no banding, HDR... Thanks a lot for your effort..

BTW, it works great on the latest build of CM13 with Google Camera, previous builds lacked a lot of libraries related to the camera, but that's fixed in the latest one.
[OnePlus X Themes and Apps] sphoenixp:
What is this banding? Why only those countries? what did other countries do wrong?
[OnePlus X Themes and Apps] matwaking:
If you want to know about banding ,I suggest you to either google it or read some prev pages here.

Also the countries mentioned in op are having 60hz banding rates as opposed to 50 hz commonly found,so if you reside in any of these then flash the hal with 60hz fix or else flash the normal one ie with 50hz anti-banding.
[OnePlus X Themes and Apps] ERRORR2:
[MENTION=4800121]Sultanxda[/MENTION] thanks for new build! Only one question: can you explain why camera app starts working very slow and laggy, when I choose manual values for ISO? I'm on CM13 with Snapdragon Camera.