[MOD] Custom camera HAL with 4K UHD/DCI and 30 FPS video recording [Apr. 22, 2016]

Search This thread

oneplusx

Senior Member
Nov 26, 2015
89
17
The snapdragon camera app can not click pics why? :(
(I am not rooted so I flashed the zip)
Is there any other camera app which can be used with this mod?
I really wanted to click pics through snapdragon app but I cant :(

Sent from my ONE E1003 using XDA-Developers mobile app
 

Sultanxda

Recognized Developer
I just flashed the latest HAL and Snapdragon Camera for the first time today. The UHD and DCI modes work nicely. However both the highspeed and slowmo 1080p 60 fps modes only produce a 38fps video. I can get 60fps only on 720p. Since the phone is capable of 4K 30fps video I suppose it is not due to insufficient hardware. Is it maybe due to the HAL?

I'm seeing 57 FPS (1080p @ 60) and 117 FPS (720p @ 120) in CM12.1 and CM13. I don't know which ROM you're using, but it's working fine for me.
 
  • Like
Reactions: johnny.tifosi

alansupra94

Senior Member
Oct 1, 2007
78
19
What camera are you guys using for CM13.1? I can't seem to find a decent one that works. Snapdragon does not want to start so I gave up on it.
 

phoberus

Senior Member
Oct 21, 2013
965
260
When I want to use this with CM13 and the stock camera, I must flash this mod and the oxygen cam or only this?
 

oneplusx

Senior Member
Nov 26, 2015
89
17
This is a HAL mod, not a camera apk, so you must install the camera by yourself and flash the HAL mod.
Hello,
I flashed Snapdragon app v2.0 and it takes great vids but as soon as I click a pic it just hangs on the pic and doesn't take the pic.. If you have used the app can you confirm that if I am the only one facing this issue and also tried Google Camera v2.7 it force closes when clicking a pic video is fine but can't record fhd with 60fps on any app other than Snapdragon cam
Would like to know which app runs perfect with this mod for me SD cam doesn't take pics at all.
Am I wrong somewhere?
Thanks!

Sent from my ONE E1003 using XDA-Developers mobile app
 

Odysseus Rex

Senior Member
Apr 19, 2016
85
102
Hello,
I flashed Snapdragon app v2.0 and it takes great vids but as soon as I click a pic it just hangs on the pic and doesn't take the pic.. If you have used the app can you confirm that if I am the only one facing this issue and also tried Google Camera v2.7 it force closes when clicking a pic video is fine but can't record fhd with 60fps on any app other than Snapdragon cam
Would like to know which app runs perfect with this mod for me SD cam doesn't take pics at all.
Am I wrong somewhere?
Thanks!

Sent from my ONE E1003 using XDA-Developers mobile app

Never had any problem with camera or hal (I'm using Snapdragoncam from cm13 tree). I really don't know what your problem could be.

Did you try cleaning the camera cache after flashing the HAL?
 

oneplusx

Senior Member
Nov 26, 2015
89
17
Never had any problem with camera or hal (I'm using Snapdragoncam from cm13 tree). I really don't know what your problem could be.

Did you try cleaning the camera cache after flashing the HAL?
The SD camera app always shows 0 data and 0 cache so option of clearing data and cache is blacked out (on OOS 2.2.1 and flashed the SD app zip)

Sent from my ONE E1003 using XDA-Developers mobile app

---------- Post added at 09:16 PM ---------- Previous post was at 09:14 PM ----------

Is the SD cam not compatible with OOS?

Sent from my ONE E1003 using XDA-Developers mobile app
 

derhendrik

Member
Apr 10, 2016
6
1
Thank you so much Sultan =)

Just installed the hal mod and the blue tint is completely gone!

To add to johnny.tifosi and jejzve: I am using OOS 2.2.1 as well, getting also 38 fps in FHD
 

jejzve

New member
Apr 21, 2016
4
0
im using SD camera. only 720p recordings are at 60fps. 1080p is 38fps and 720p 120fps slowmotion is like 80fps.

what rom do you have?
 
Last edited:

Sultanxda

Recognized Developer
I just flashed the latest HAL and Snapdragon Camera for the first time today. The UHD and DCI modes work nicely. However both the highspeed and slowmo 1080p 60 fps modes only produce a 38fps video. I can get 60fps only on 720p. Since the phone is capable of 4K 30fps video I suppose it is not due to insufficient hardware. Is it maybe due to the HAL?

Nope, it is NOT an issue with the camera HAL. I tested the stock OxygenOS camera HAL and it has the same issue. This is a bug in OxygenOS (it is not recording all of the frames properly).

Is the SD cam not compatible with OOS?

No, it is not. I originally built it for CM12.1 on my OPO, not for OxygenOS on the OPX.

im using SD camera. only 720p recordings are at 60fps. 1080p is 38fps and 720p 120fps slowmotion is like 80fps.

what rom do you have?

This is NOT an issue with the camera HAL. This is a bug in OxygenOS (it is not recording all of the frames properly).

Thank you Sultan for bringing 4K to Oneplus X.

I am on Oxygen 2.2.0, with SD camera i am getting 38 fps /1080p.

This is NOT an issue with the camera HAL. This is a bug in OxygenOS (it is not recording all of the frames properly).

well i have the same problem. i have to slow it manually in vlc but its still not 120fps on oxygenos.

This is NOT an issue with the camera HAL. Install the stock OxygenOS camera HAL and try to record a real 120 FPS video using Snapdragon Camera (hint: you cannot).

Hello,
I flashed Snapdragon app v2.0 and it takes great vids but as soon as I click a pic it just hangs on the pic and doesn't take the pic.. If you have used the app can you confirm that if I am the only one facing this issue and also tried Google Camera v2.7 it force closes when clicking a pic video is fine but can't record fhd with 60fps on any app other than Snapdragon cam
Would like to know which app runs perfect with this mod for me SD cam doesn't take pics at all.
Am I wrong somewhere?
Thanks!

Sent from my ONE E1003 using XDA-Developers mobile app

Snapdragon Camera was never meant for OxygenOS. This Snapdragon Camera app was actually built by me, for my CM12.1 ROM for the OPO. I programmed it to be compatible with CM12.1 on the OPO, not OxygenOS on the OPX.

im getting only 38fps in 1080p instead of 60fps.

This is NOT an issue with the camera HAL. This is a bug in OxygenOS (it is not recording all of the frames properly).
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 175
    Code:
    /*
    * Your warranty is... still valid?
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this mod
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    *
    */

    Installing this mod will give you the ability to record 4K UHD/DCI videos on your OnePlus X, as well as record videos at a consistent 30 frames per second in all lighting conditions (no more frame drops/stuttering when recording videos at night). This mod is compatible with most ROMs.

    This is a custom camera HAL I created using CAF's vanilla camera HAL sources. As a lot of reverse engineering was involved in this, there are some caveats (see below).

    Do NOT install this on my CM13 ROM!

    Note that some ROMs using older proprietary camera libraries (such as the newest version of H2OS) will not benefit from 30 FPS video or my anti-shake algorithm.

    If the 4K option does not appear in the camera app you're using, or your camera stops working, then clear data for the camera app that you're using.


    Notable features:
    • 4K UHD and DCI video recording
    • Consistent 30 FPS video recording in all lighting conditions
    • Intelligent anti-shake algorithm (significantly reduces motion blur when capturing photos)
    • Faster autofocus in low lighting conditions
    • No stuttering in camera viewfinder
    • Improved photo quality
    • Photo capture up to 4208x3120 resolution (instead of 4160x3120)

    Caveats:
    • No ClearImage
    • No manual mode only in the OnePlus Camera app (other apps that support manual ISO and manual exposure work fine)

    Installation instructions:
    Install the 60 Hz Anti-banding file if you are in any of the following countries:

    American Samoa
    Anguilla
    Antigua
    Aruba
    Bahamas
    Belize
    Bermuda
    Brazil
    Canada
    Cayman Islands
    Colombia
    Costa Rica
    Cuba
    Dominican Republic
    Ecuador
    El Salvador
    Guam
    Guatemala
    Guyana
    Haiti
    Honduras
    Liberia
    Mexico
    Micronesia
    Montserrat Islands
    Nicaragua
    Okinawa
    Palmyra Atoll
    Panama
    Peru
    Philippines
    Puerto Rico
    St. Kitts & Nevis Islands
    Saudi Arabia
    South Korea
    Suriname
    Tahiti
    Taiwan
    Trinidad & Tobago
    United States
    Venezuela
    Virgin Islands


    Instructions:
    1. Download the camera HAL and copy it to your device
    2. Reboot to recovery
    3. Install the camera HAL
    4. OPTIONAL install the 60 Hz Anti-banding file ONLY if you are in any of the countries listed above
    5. Reboot

    Downloads:
    Camera HAL: http://xdaforums.com/devdb/project/dl/?id=18115

    60 Hz Anti-banding: http://xdaforums.com/devdb/project/dl/?id=17356


    XDA:DevDB Information
    Custom camera HAL for OPX, Device Specific App for the OnePlus X

    Contributors
    Sultanxda

    Version Information
    Status: Stable

    Created 2016-02-15
    Last Updated 2016-08-10
    49
    Changelog:

    April 22, 2016:
    *Fixed slow-motion recording in the OnePlus Camera app (for OxygenOS)
    *Fixed delay when moving camera while recording high-speed and slow-motion videos
    *Fewer frames are dropped when recording high-speed and slow-motion videos now

    April 20, 2016:
    *Fixed blue tint when recording slow-motion and high-speed videos (60 FPS and 120 FPS videos)

    April 17, 2016:
    *Made anti-shake algorithm even less aggressive (images are less noisy and better quality now)

    March 26, 2016:
    *Made anti-shake algorithm less aggressive (images are less noisy and better quality now)
    *Reduced JPEG quality to 95% (image files are smaller with no visible impact to quality)
    *Improved image clarity

    March 13, 2016:
    *Fixed anti-banding setting in camera apps
    *Set default anti-banding mode to 50 Hz (for Europe)
    *Added flashable zip to change default anti-banding mode to 60 Hz (for the USA; see the installation instructions for details)
    *Fixed rare flashing in camera viewfinder

    March 7, 2016:
    *Fixed graphical glitches when using HDR
    *Fixed graphical glitches when taking photos with the front camera
    *Fixed many other minor bugs

    March 6, 2016:
    *Fixed noisy HDR photos
    *Fixed incorrect maker, model, and aperture displayed in image info

    March 5, 2016:
    *Fixed HDR
    *Fixed manual exposure control
    *Fixed manual ISO control

    February 26, 2016:
    *Implemented stronger, more intelligent anti-shake algorithm (significantly reduces motion blur when capturing photos)
    *Fixed Panorama mode not working in Google Camera after recording video
    *Fixed Photo Sphere mode not working in Google Camera after recording video
    *Fixed photo capture not working while recording 4K video

    February 22, 2016:
    *Fixed compatibility with H2OS (note: 30 FPS video is not guaranteed in H2OS, as well as some out-of-date ROMs)
    *Fixed long delay when turning off the flashlight in some ROMs
    *Fixed long delay when switching between the front and back camera in some ROMs
    *Improved image sharpness and clarity

    February 16, 2016:
    *Fixed compatibility with all ROMs

    February 15, 2016:
    *Initial release
    42
    New build uploaded. All of the major caveats have been fixed! HDR, manual ISO, and manual exposure are all working now :victory:
    28
    New build uploaded. In addition to bug fixes in Google Camera, I have written a smarter/stronger anti-shake algorithm that makes it much easier to capture clear photos indoors or in poor lighting conditions in general.

    Please let me know how it goes :)
    26
    If the camera had the capability to record to 4k,why didn't one plus include it in oos?

    They didn't know how to fix it. There's a software bug with 4k on Snapdragon 800/801 chips that causes the 4k video to record at 7 FPS. This is a very difficult bug to fix (took me weeks to originally fix it on my OPO), so it isn't surprising that they decided to move on to other things instead of trying to solve it.

    Flashed on temasek v4.0 and had a bootloop after that. Needed to reflash the rom.

    The media_profiles.xml that comes with my package probably has some things in it that your ROM doesn't like. I'll have to test it myself to get a log so I can fix it.

    Holy crap the legendary sultan developing for the one x?!?! Any plans for a oneplus x rom as well?

    Not enough time/energy/motivation for that right now. Have a camera HAL instead :p