22
[MOD] Custom camera HAL with 4K video recording on OxygenOS

  1. Sultanxda
    Recognized developer Recognized Developer Jul 20, 2015

    Sultanxda , Jul 20, 2015 :
    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 ROM
    * 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 videos on OxygenOS. This mod is only designed to be used with OxygenOS and ROMs that are based off of OxygenOS.

    It is a custom camera HAL I created from CAF's vanilla camera HAL sources. This is the same camera HAL that I use in my ROM on XDA: http://forum.xda-developers.com/one...m-kernel-unofficial-cyanogenmod-12-1-t3120259

    Notable features:
    • HFR (high-framerate; a.k.a. slow-motion) recording at 60 FPS, 90 FPS, and 120 FPS for 720p, and 60 FPS for 1080p
    • 1080p video recording with the front-facing camera
    • 4K UHD and DCI video recording
    • Manual focus
    • Manual ISO control
    • Slow shutter (ranging from 1/5000th of a second to 2 seconds)
    • Focus works in HDR mode
    • More picture sizes than plain OxygenOS, such as 9.7MP 16:9
    • JPEG quality always forced to 100% for higher-quality images (JPEG quality seems to be capped in the OxygenOS camera HAL, resulting in images that appear overly-compressed)
    Limitations:
    • 4K DCI cannot be recorded with the CameraNext app (when trying to use 4K DCI on CameraNext, CameraNext records at 480P instead; this is a bug with CameraNext, not my camera HAL)
    Changelog:
    October 11, 2015:
    *Fixed camera crashing in Bank of America app
    *Fixed manual ISO control for camera

    October 4, 2015:

    *Fixed incorrect exposure time reported in image details when slow-shutter is used
    *Fixed flashlight not turning off and camera completely breaking when using the flashlight while Trusted Face is enabled

    September 13, 2015:

    *Fixed poor quality with front-facing camera
    *Fixed flashlight not turning off and camera completely breaking when using the flashlight while Trusted Face is enabled

    August 24, 2015:
    *Fixed exposure time getting set to 1/5000th of a second when trying to disable slow-shutter

    August 23, 2015:
    *Added support for slow shutter (ranging from 1/5000th of a second up to 2 seconds)
    *Fixed camera stability issues caused by undefined behavior (this should fix the flashlight reboots)

    August 11, 2015:

    *Fixed touch-to-focus in HDR mode
    *Fixed low framerate when recording 720p video with the front-facing camera
    *Fixed manual focus

    August 4, 2015:
    *Fixed 720p HFR (slow-motion) and HSR (high-speed) video recording at 90FPS and 120FPS with all camera apps

    August 3, 2015:
    *Fixed 720p HFR (slow-motion) recording at both 90FPS and 120FPS
    *Removed option to record 1080p at 90/120FPS (making this work would require modification of the proprietary camera libraries)
    *Fixed focus not working in HDR mode
    *Removed FWVGA camcorder resolution

    July 28, 2015:
    *Added 1080p video recording at 120 FPS
    *Added ability to record video at 90 FPS (for both 720p and 1080p as well)

    July 25, 2015:
    *Added support for 1080P video recording with the front-facing camera
    *Fixed framerate drop when taking picture while recording 4K video

    July 23, 2015:
    *Fixed 4K video recording in all camera apps (such as Google Camera)
    *Fixed several bugs with Google Camera (such as broken photosphere and panorama functionality)

    Installation instructions:
    Simply download and flash in recovery.

    Download: https://www.androidfilehost.com/?w=files&flid=35689&sort_by=date&sort_dir=DESC

    This took several glorious hours of work over the course of many weeks. Enjoy!
     
    Last edited: Oct 11, 2015

    #1
    codgician, gaster, rphlfjrd and 19 others like this.
  2. P.S.@
    Honeycomb Jul 20, 2015

    P.S.@ , Jul 20, 2015 :
    Thank you for sharing and
    Welcome sir ..happy to see you here in forum
     

    #2
  3. Hiraeth
    Ice Cream Sandwich Jul 20, 2015


    #3
    mydroid, mwayner and DaxNagtegaal like this.
  4. Nimit4
    Jelly Bean Jul 20, 2015


    #4
    DaxNagtegaal likes this.
  5. Deactivated User
    Jul 20, 2015


    #5
  6. Hiraeth
    Ice Cream Sandwich Jul 20, 2015

    Hiraeth , Jul 20, 2015 :
    Awesome. @Sultanxda I'm from Cali as well! Nice to meet you friend!
     

    #6
    DaxNagtegaal likes this.
  7. arendon7
    Gingerbread Jul 20, 2015


    #7
  8. reyscott1968
    Jelly Bean Jul 20, 2015


    #8
    Evokkimus, mydroid and DaxNagtegaal like this.
  9. Manav Bhagia
    Ice Cream Sandwich Jul 20, 2015


    #9
  10. ronakchhatwal
    Honeycomb Jul 20, 2015

  11. Sultanxda
    Recognized developer Recognized Developer Jul 20, 2015

  12. camohan
    Marshmallow Moderator Jul 20, 2015

    camohan , Jul 20, 2015 :
    Copy paste is an art. @dsmonteiro @rikardo1979 please merge them.
     

    #12
    DaxNagtegaal and dsmonteiro like this.
  13. rikardo1979
    Community Veteran Jul 20, 2015


    #13
  14. Enyalius
    Jelly Bean Jul 20, 2015

    Enyalius , Jul 20, 2015 :
    Am gonna try this one out... update will follow shortly.

    EDIT: Works like a charm. Your work is appreciated!
     
    Last edited: Jul 20, 2015

    #14
  15. Manav Bhagia
    Ice Cream Sandwich Jul 20, 2015


    #15
    DaxNagtegaal likes this.
  16. Armsheezy
    Jelly Bean Jul 20, 2015

    Armsheezy , Jul 20, 2015 :
    Probably a Red Velvet Cupcake. ;)
     

    #16
    Hiraeth likes this.
  17. Manav Bhagia
    Ice Cream Sandwich Jul 20, 2015

    Last edited: Jul 20, 2015

    #17
  18. Sultanxda
    Recognized developer Recognized Developer Jul 20, 2015

    Sultanxda , Jul 20, 2015 :
    wut, this isn't a ROM

    If you're talking about my CM12.1 ROM on XDA then no, it does not come with gapps.
     

    #18
    DaxNagtegaal likes this.
  19. Manav Bhagia
    Ice Cream Sandwich Jul 20, 2015

    Manav Bhagia , Jul 20, 2015 :
    Yep , I meant that CM 12.1 ROM .
    Thanks.
     

    #19
  20. rikardo1979
    Community Veteran Jul 20, 2015


    #20