5,595,339 Members 48,582 Now Online
XDA Developers Android and Mobile Development Forum

[MDPI] CM10 720p video recording 30 fps

Tip us?
 
miniuser123
Old
(Last edited by miniuser123; 1st March 2014 at 10:17 PM.)
#1  
Member - OP
Thanks Meter 248
Posts: 51
Join Date: Aug 2012
Default [MDPI] CM10 720p video recording 30 fps

I have been testing 720p recording in CM10 roms recently. It looks like it is not impossible to reach good fps in CM after all.
It was inspired by the maker of MESA kernel an0nym0us_ who used stock camera lib in cm10. Big thanks to him!
My test rom was SJB 8.0 and CM10 nightly 2013.10.06.
Basically I did 3 modifications:
1. Copied camera.semc.so to /system/lib/hw/
2. Modified media_profiles.xml
3. Modified pmem sizes in kernel. Used nAa kernel as base. Free ram is 388 MB at the moment. Still testing it...

The result is good hd recording at near 29.7 fps. The smoothest results come in the camera app found in Super Jelly Bean 8.0. Other apps like stock CM cam and LGCamera produce around 25-27 fps but it can be improved with a tweak.

So here is what to do:
1. Flash kernel (mini_naa720p.img or minipro_naa720p.img or lww_naa720p.img or active_naa720p.img)
2. flash zip in cwm (cm10_enable720p.zip)

https://www.mediafire.com/folder/f28fff1i6i5v1/


Make sure nothing is runnning (like mediascanner) when recording!

Check video fps with ffmpeg in terminal emulator:
Type
Code:
ffmpeg -i videoname.mp4
If fps is only around 25-27 try this in terminal:

Code:
su
renicesflinger.sh 0
Pls report back if it's working for you, I was a bit tired when writing this...


---------------------------------------------------------------------------------------------------

About the kernel: it's based on
https://github.com/nobodyAtall/msm7x30-2.6.32.x-nAa

I changed one file:
arch/arm/mach-msm/board-semc_mogami.c

The changed file can also be found at https://www.mediafire.com/folder/f28fff1i6i5v1/

Current values are these:

Code:
#define MSM_FB_SIZE		0x200000

#define MSM_PMEM_SF_SIZE	0x800000
#define MSM_PMEM_CAMERA_SIZE		0xBE0000
#define MSM_PMEM_ADSP_SIZE			0x1F80000
I think 1 mb more ram can be regained...
The Following 52 Users Say Thank You to miniuser123 For This Useful Post: [ Click to Expand ]
 
karandpr
Old
(Last edited by karandpr; 21st February 2014 at 05:12 AM.)
#2  
karandpr's Avatar
Recognized Contributor
Thanks Meter 751
Posts: 760
Join Date: Feb 2011

 
DONATE TO ME
Impressive work !
Can you document changes in your kernel ?
or can you just make a patch file so it can be used on every CM 10 kernel ?
The Following 4 Users Say Thank You to karandpr For This Useful Post: [ Click to Expand ]
 
RaptorX88
Old
#3  
RaptorX88's Avatar
Member
Thanks Meter 3
Posts: 30
Join Date: Oct 2011
Location: Palghat
Will it work on CM 10.1 based roms, say JV?
DEVICES :

Xperia Mini- JellyVanilla EX 5 (4.2)
Galaxy S II - Chamelleon (4.1)
Xperia ZR - Stock 4.2.2
 
Vynikal
Old
#4  
Vynikal's Avatar
Senior Member
Thanks Meter 283
Posts: 625
Join Date: Sep 2012
Quote:
Originally Posted by RaptorX88 View Post
Will it work on CM 10.1 based roms, say JV?
I think it WILL work, just need to replace ramdisk of kernel.
Anyway, that's great! It definitely worth testing on CM11.
Live with Walkman
ROM: Latest JellyVanilla EX by iiandskater (made a huge piece of work!)
Kernel: by LegacyXperia (3.4.70)
If you like opensource, sign THIS
 
karandpr
Old
(Last edited by karandpr; 21st February 2014 at 08:46 AM.)
#5  
karandpr's Avatar
Recognized Contributor
Thanks Meter 751
Posts: 760
Join Date: Feb 2011

 
DONATE TO ME
Quote:
Originally Posted by Vynikal View Post
I think it WILL work, just need to replace ramdisk of kernel.
Anyway, that's great! It definitely worth testing on CM11.
Wish it were that simple ...Booting with 2.6.x kernel can cause unexpected errors ...CM11 is optimized for kernel 3.4.x...
The Following 2 Users Say Thank You to karandpr For This Useful Post: [ Click to Expand ]
 
blackjack4it
Old
#6  
Member
Thanks Meter 25
Posts: 40
Join Date: Dec 2009
Finally ! Can't wait to be ported to CM11 on Xperia Mini Pro !
 
Vynikal
Old
#7  
Vynikal's Avatar
Senior Member
Thanks Meter 283
Posts: 625
Join Date: Sep 2012
Quote:
Originally Posted by karandpr View Post
Wish it were that simple ...Booting with 2.6.x kernel can cause unexpected errors ...CM11 is optimized for kernel 3.4.x...
I meant, how about raising pmem_adsp in 3.4 kernel like here?
Live with Walkman
ROM: Latest JellyVanilla EX by iiandskater (made a huge piece of work!)
Kernel: by LegacyXperia (3.4.70)
If you like opensource, sign THIS
 
miniuser123
Old
#8  
Member - OP
Thanks Meter 248
Posts: 51
Join Date: Aug 2012
Quote:
Originally Posted by RaptorX88 View Post
Will it work on CM 10.1 based roms, say JV?
The kernel contains a ramdisk for jb4.2 so it's not impossible. You could perhaps try...






Added source change to opening post.
The Following User Says Thank You to miniuser123 For This Useful Post: [ Click to Expand ]
 
RaptorX88
Old
#9  
RaptorX88's Avatar
Member
Thanks Meter 3
Posts: 30
Join Date: Oct 2011
Location: Palghat
Default Test with CM 10.1

Quote:
Originally Posted by miniuser123 View Post
The kernel contains a ramdisk for jb4.2 so it's not impossible. You could perhaps try...



Added source change to opening post.
Nope..It doesnt boot,after the bootanim,a blackscreen comes and stays like that.Tested with JV 6.0(Maybe its because it was based on CM10.1 LX 20131108 NIGHTLY for anzu and coconut ? )
DEVICES :

Xperia Mini- JellyVanilla EX 5 (4.2)
Galaxy S II - Chamelleon (4.1)
Xperia ZR - Stock 4.2.2
 
miniuser123
Old
#10  
Member - OP
Thanks Meter 248
Posts: 51
Join Date: Aug 2012
Quote:
Originally Posted by karandpr View Post
Impressive work !
Can you document changes in your kernel ?
or can you just make a patch file so it can be used on every CM 10 kernel ?
Sure I will,only 3-4 lines changed in board-semc_mogami.c, I will post it when I am at home.
Works with Mesa kernel too.
The Following 2 Users Say Thank You to miniuser123 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes