Identify CM7 HD Recording issue and need help to modify libcameraservice.so - Milestone XT720 General

This post is better to be in xt720 Dev board. But it is a pity that I don't have the privilege to post in that board now. So anybody who kindly help forward to the dev board would be great appreicated.
For quite a long time, we sufferred to HD record issue in CM7. And I spent some days inveistigaing this issue and fortunatelly got some interesting findings to share.
1. 720p HD recording fail becasue of wrong width and height parameter pass to function createOverlay in libsurfaceflinger.so.
02-13 17:38:12.030: D/TIOverlay(1876): overlay_createOverlay:IN w=768 h=432 format=99
02-13 17:38:12.030: I/Overlay(1876): v4l2_overlay_init:: w=480 h=854
02-13 17:38:12.030: I/Overlay(1876): v4l2_overlay_init:: w=768 h=432
02-13 17:38:12.030: I/Overlay(1876): v4l2_overlay_init:: w=768 h=432
Here we see, the paramter passed to createOverly is (768,432). And in comparison with 2.2 stocked Rom, the right parameter should be (1280,720) for HD recording.
2. The wrong width/height parameter is set in libcameraservice.so. Perhaps CM7 forbids HD recording...
02-13 17:38:12.030: D/CameraService(1540): Changing overlay dimensions to 768X432 for 720p recording.
And double check by open libcameraservice.so, we found the matched words in the above at the address of 0x000ae00h. The very possible guess is CM7's libcameraservice.so check width/height parameter, whenever it detect the parameters are for HD record, it reset the paramter to (768,432)!!
Proposed solution:
If someone could kindly help modify the code to comment the piece of code and build a new libcameraservice.so, we may have chance to bring HD recording back.

I forwarded into developpement thread but I don't know if it is the only problem because librairies from 2.1 to 2.2 and 2.3.

Great thanks!
libcameraservice.so is the current blocking issue I have identified. Certainly, there are possible some issues come out after we solved this one.
BTW, I've enabled 720p hardware video decoding in CM7. The phone could now play 720p video smoothly. This should be a good basie to fix HD recording issue.

Interesting. I don't have much to say about this at the moment, but for now I can point you into the source (Line 767):
https://github.com/CyanogenModXT720...ces/camera/libcameraservice/CameraService.cpp
These commits seem relevant (from the "blame" view):
https://github.com/CyanogenModXT720...mmit/a930c3c872cf6eaa57bfdddc923132cf0d48564b
https://github.com/CyanogenModXT720...mmit/cf997d0147228ece729ceb95745d20905664426d
Edit: So, it looks like to set the overlay size to whatever we want, we just change line 74 of CameraService.cpp to put the desired resolution. The other part of the puzzle is to adjust media_profiles.xml to add the HD profile. I had done that in the past by copying settings from decompiled MotoCamera, but the screen would go black and get weird or cause a reboot when the camcorder was switched to HD. I think your finding about the overlay resolution might explain why.
FYI: *Temporarily*, I don't have access to an XT720 (due to a laundry incident that took out both my second XT720 and my wife's Nexus S--so she's using my primary XT720 and I'm luddite mode until we sort out what to do about her phone--surprisingly they both may have survived--they power on, the XT720 boots all the way but no touch (when the screen is on you can see some streaking under the screen so I think possibly some residual moisture is interfering with capacitance so I'm going to let it dry some more--I tore a different XT720 into tiny pieces recently and there's a whole stack of paper-like pieces under the screen and I think they're still somewhat wet) and the NS turns on but get's stuck at the Google logo even when trying to enter recovery so I think it needs to be reloaded, I've only made it as far as fastboot mode on that one due to only having a power-only usb cable handy at the time).

what you mean by 720p playback?
i have tested with youtube videos (searched for 1080p hd
what other test can be made?
btw, hope you will be able soon to post in the devel section

Hi peshovec, I also read your reply in dev board.
As you got the same finding and have already fixed the code, could you please share the new built libcameraservice.so? I don't have CM7 source code at hand, and it will take me several days to sync. Last month, I spent near two weeks to sync CM9 code ...
And one important thing, we might need to keep libcameraswervice.so compatible with old 2.2 driver libcamera.so. libcameraservice.so from other 2.3 Rom contains a new function "_HAL_Camerainfo" ( sorry, did not remember clearly) that does not implemented in old libcamera.so. The trick I saw in the code is to "#define BOARD_USE_FROYO_LIBCAMERA".
I am quite interested to follow-up on this HD record issue with all of you help!

And for 720p playback, I mean to hardware decode some 720p video.
Xt720's CPU is able to support h264 baseline profile, but could not support H264 high profile. So I am afraid for 1080p video and H264 high profile 720p on youtube, our phone still could not play with hardware decode.
The trick to fix 720p hardware decode is to use old xt720 2.1's codec: lib\hw\*, and libOMX.TI.*. The existed libOMX.TI.720P.Decode.so in CM7 support other phones (e.g. Defy) well, but not support xt720.
I tested my phone after the fix of 720p HW decode with one 720p video, and found my phone could play the video smoothly with either Moboplayer or Moto Videoplayer. And before the fix, the playback could only use SW decode, and even overclock to 1GHz, the pictures was still lag behind of voice.

Hi Mioze7Ae, I also did investigations on media_profiles.xml and build.prop.
Acutually, stocked 2.2 xt720 Rom is not necessarily to rely on those settings in either media_profiles.xml or build.prop. As you observed, all resolution parameter was set in Camera.apk. I tested xt720 2.2 Rom without media_profiles.xml and none of related settings in build.prop, 720p HD video still work fine. And for xt711 phone, it even don't have media_profiles.xml in the official Rom.
Ah, 5 post now. Still need 5 other post ...

hhcat said:
Hi peshovec, I also read your reply in dev board.
As you got the same finding and have already fixed the code, could you please share the new built libcameraservice.so? I don't have CM7 source code at hand, and it will take me several days to sync. Last month, I spent near two weeks to sync CM9 code ...
And one important thing, we might need to keep libcameraswervice.so compatible with old 2.2 driver libcamera.so. libcameraservice.so from other 2.3 Rom contains a new function "_HAL_Camerainfo" ( sorry, did not remember clearly) that does not implemented in old libcamera.so. The trick I saw in the code is to "#define BOARD_USE_FROYO_LIBCAMERA".
I am quite interested to follow-up on this HD record issue with all of you help!
Click to expand...
Click to collapse
here is it (attachment)
also here is the mediaprofile.xml (which i use), with high and wide working
https://github.com/CyanogenModXT720...la_sholest/blob/pesh-modif/media_profiles.xml
can you try to search in youtube for 1080p hd videos and try to play some of them? i am curious if they will play on your setup (`couse in my test build i am able to play them...)

Thanks for the attachment! I will have try and give update later.
I tried to play some H264 high profile video: voice only and no pictures.
xt720's CPU fail to HW decode thoese video.
The workaround solution is to download the video, then we could choose SW decode in mediaplayer ( I used moboplayer). But the video play is very terrible, the picture play frame by frame, even though I have overclock to 1GHz.

Haha, the quick update is HD 720p recording preview work fine! Verly clearly and smoothly view from preview window!!
On the way home now, will do some more tests later.
Mark: 9 post now

Yeah, 720p HD recording is perfectly fixed!
Now we could enjoy HD recording in CM7!
BTW, I didn't tested your media_profile.xml. Now I used the one in 2.2 stocked ROM.
10 post now, heihei...
I will packed my Rom and share in Dev board tomorrow.

Great job, it's awesome and sweet.
I‘m looking forward to it!

omg, lol, so can someone confirm that hd video really work on any cm7 ? =)
well, afaik good that you have fixed preview.
Problem now in hd encoder...
Well.. we don't have it.

my fast testing doesn't seems good...
preview ok, but can't focus well (after try-ing to focus, the focus is set to the minimum distance), recording seems to start, preview display freeze. some file is generated trough.....
but that should be just my setup (is motoroi with the moto froyo able to record 1280x720p ? , if yes we can find way*)
p.s. *remark. in my opinion 1280x720 recording is just marketing, also it is not job for the phone to record at this resolution, working wide 848x480 is more than enough...

My phone is able to HD recorde in 2.1 and and 2.2 Rom, but lose this ablity when upgrade to CM7 2.3 Rom.
Not sure whether our phone have some HW difference.

I am uploading my Rom to DEV board.
Have a try.

Related

Defy has MT9P012 ImageSensor 720p Video only lib missing?

China 2.2 Rom missing some file for 720P
libOMX.TI.720P.Decoder.so and libOMX.TI.720P.Encoder.so
I attached files from Milestone 2:
Maybe sombody have an idea to get 720P on Defy
http://webcache.googleusercontent.c...torola.com/message/307129+&cd=6&hl=de&ct=clnk
from BizzaBoy @ supportforums.motorola.com
"The DEFY camera modules is able to do 720p. It's a MT9P012 according to the boot log.
Looking at the kernel sources on opensource.motorola.com (drivers/media/video/mt9p012.c), there is a FRAME_1296_30FPS mode supported which reads in a 1296x972 frame that would be cropped down to 1280x720. From the code it appears that those smaller modes are achieved by skipping pixels. This also explains why there is no 720x480 mode, just a 648x486 internal mode.
Ok, next looking at TI's OMAP3 literature, it says that it can do up to 720p HD.
So at the end of the day the DEFY *should* do 720p, and a 2.2 update *might* enable that.
I personally would be extatic to have 720p. The DEFY is really mindblowing as a allround device, where I can record videos on our weekly ski-trips, but 640x480 @30fps really, really sucks. 640x480 @60fps would be great, or 720p @30fps. Overall the camera/camcorder interface needs some substantial work. You cannot switch to a explicitie white balance (only auto), which is a pain if you record video where the lighting changes and the camera software tries to readjust the white balance. The other thing that drives me nuts is that you cannot adjust the image quality settings for the jpeg encode. "
humm i'll check it too
walter79 said:
I found this in china 2.2 Rom.
/etc/cameraCalDef5M.bin and /etc/cameraCalDef8M.bin
Did Defy maybe have 8 MP Camera like Milestone XT720?
I renamed ...CalDef8M to CalDef5M and replaced the original 5M.bin
Camera is a bit faster.
I will search for a better camera app.
Click to expand...
Click to collapse
This is crazy!! all the stuff cpu overclock 1200Hz, Camara 8 MP, and Gpu!!
Fabulous!!
walter79 said:
I found this in china 2.2 Rom.
/etc/cameraCalDef5M.bin and /etc/cameraCalDef8M.bin
Did Defy maybe have 8 MP Camera like Milestone XT720?
I renamed ...CalDef8M to CalDef5M and replaced the original 5M.bin
Camera is a bit faster.
I will search for a better camera app.
Click to expand...
Click to collapse
Are you sure that quality of photos is better now? Have you seen if the resolution is bigger(in details, after take a photo)?
Sent from my MB525 using Tapatalk
aikidoka90 said:
Are you sure that quality of photos is better now? Have you seen if the resolution is bigger(in details, after take a photo)?
Sent from my MB525 using Tapatalk
Click to expand...
Click to collapse
Resolution is not bigger in default Camera.App But in my opinion cam is a bit faster.
I've taken 2 photo before and after renaming file, and i get the same photo, with same specification and resolution.
I've also tried with Pro Zoom Camera 5X and with Vignette, i get the same picture...
So i think we have "only" 5Mo in hardware...
Ok, it a 5MP Cam but 720p should possible.
Have a look to this page. (only google cache)
http://webcache.googleusercontent.c...torola.com/message/307129+&cd=6&hl=de&ct=clnk
"The DEFY camera modules is able to do 720p. It's a MT9P012 according to the boot log.
Looking at the kernel sources on opensource.motorola.com (drivers/media/video/mt9p012.c), there is a FRAME_1296_30FPS mode supported which reads in a 1296x972 frame that would be cropped down to 1280x720. From the code it appears that those smaller modes are achieved by skipping pixels. This also explains why there is no 720x480 mode, just a 648x486 internal mode.
Ok, next looking at TI's OMAP3 literature, it says that it can do up to 720p HD.
So at the end of the day the DEFY *should* do 720p, and a 2.2 update *might* enable that.
I personally would be extatic to have 720p. The DEFY is really mindblowing as a allround device, where I can record videos on our weekly ski-trips, but 640x480 @30fps really, really sucks. 640x480 @60fps would be great, or 720p @30fps. Overall the camera/camcorder interface needs some substantial work. You cannot switch to a explicitie white balance (only auto), which is a pain if you record video where the lighting changes and the camera software tries to readjust the white balance. The other thing that drives me nuts is that you cannot adjust the image quality settings for the jpeg encode. "
Kernel: https://opensource.motorola.com/sf/go/projects.moto_defy/frs.defy_latam.jorla_u3_6_14_5
Good, there is still a chance we could get 720p camcorder at some point, since both 3630-800 and MT9P012 are capable of it.
wow seems amazing
Have you get it work?
djsven said:
Have you get it work?
Click to expand...
Click to collapse
Have no time more testing this.
Our Camera component can't take pictures biggers than 5M, in the other thread that tal about 720p we can found the URL of datasheet component. Here I will try to paste it (remmember, buy a beer to BizzaBoy! )
trulydisplays. com/ccm/specs/5.0M%20Sensor%20Aptina%20MT9P012%20Spec.pdf
As I wrote , Acer Liquid use the same camera (MT9P012).
But no 720p for liquid but I think Liquid Steam has same camera with 720p support.
Hope this one help..
Thank you for working for us
what's next? i mean, to get VGA @ 120FPS or HD working?
I think must be easy modify the Android Kernel to accept the 120FPS but will be more complicated hack the Camera.apk to add this feature.
I would start to hack for HD Video. Maybe will be complicated for the Kernel but easaly for the application.
i will donate, if this works good
Thanks for your job master!!! i love you!!!!!!!
demolition23 said:
As I wrote , Acer Liquid use the same camera (MT9P012).
But no 720p for liquid but I think Liquid Steam has same camera with 720p support.
Hope this one help..
Click to expand...
Click to collapse
Yes, acer liquid stream is able to record video at 720p...and if it has the same camera, is a good new for us
aikidoka90 said:
Yes, acer liquid stream is able to record video at 720p...and if it has the same camera, is a good new for us
Click to expand...
Click to collapse
And here is the rom dump
http://www.megaupload.com/?d=UFO2LEVV
pls someone take a look..
Please reupload!
Link is no available

[MOD] 720p recording ported from Hancocks ROM

BEFORE YOU READ ANY FURTHER, THIS MOD/PORT (WHATEVER) WILL PROPABLY ONLY WORK ON RED LENSED DEFYS! SORRY BUT IT SEEMS TO BE A HARDWARE THING! AND THERE ALSO MIGHT BE THE SLIGHT POSSIBILITY THAT IT IS LIMITED TO 3.4.2_145-003 VERSION ONLY! (AT LEAST THIS IS THE VERSION HANCOCKS ROM IS BASED ON AND THE SAME I TESTED IT WITH)
to make it short, i (kind of) ported the 720p recording capability of hankocks rom 1.11 to pays rom 3.3 (based on 3.4.2_145-003).
first of all, I AM NO DEVELOPER! so all props go to hankock! what i did was the following:
i took all the libs from hancocks rom which had something to do with camera & encoding (as you can see, not a very devlike procedure) and put them into my system/libs. then i took media_profiles.xml from hancocks rom and put it to my system/etc (of course i changed back permissions afterwards). first i used hancocks patched stock camera app and merged my and his build.prop so that the whole thing would run on my rom. and it worked perfectly. but this solution has 2 drawbacks:
1. hancock used 3gpp container, which is imho inferior to mp4
2. the audio encoding is very bad (amr_nb, 8kbps)
then i found out, that if i used lgcamera instead i would't need to change build.prop anymore and it still worked fine. besides of that, lgcamera is much more customizable settingwise. and by not modifying build.prop, i hope to enhance compatibility of this mod to other froyo versions.
and that is what my package contains:
-all libs with "enc", "cam", "camera" in therr names from hancocks rom (i know, i'm an amateur )
-media_profiles.xml from hancocks rom
-lgcamera 5.25 (free) btw. it works with the latest pro version from the market too
please use tenfars clockwork mod or other custom recovery to flash this update.zip. the built in original recovery won't work (doesn't accept signature). BEFORE YOU START, DON'T FORGET TO MAKE A NADROID BACKUP!!!
here you find an untouched video sample: http://forum.kut-btu.de/video/VIDEO00017.mp4
([email protected],8fps, mp4-container, video: [email protected]~10000kbit/s, audio: [email protected]/s, 44khz)
i know, seems very choppy but this is because i was walking constantly. framerate is quite good. my defy runs at 1,2ghz but i tested 720p rec @ 800mhz too and it worked the same. it might be necessary to apply sdcard read_ahead_kb patch (mine runs at 2560 kb instead of 128) to avoid slow framerate effect which could be observed on hancocks rom.
sadly, recording with .h264 codec is still not possible (and i doubt it ever will). hence the resulting video is no match for the 720p recordings of e.g. the samsung wave but imho it is still a lot better than stock and looks almost great
now i leave it to the real devs to optimize this, whatever it is.
DISCLAIMER:
I WILL NOT BE HELD RESPONSIBLE FOR ANY DAMAGES RESULTING FROM THIS MODIFICATION!
/edit:
mod works fine on the following froyo versions:
-3.4.2-117
-3.4.2-145 (as the mod comes from this version)
-3.4.2-155
mod doesn't work on:
-3.4.3-11
strange behavior detected:
after recording in 720p dmesg shows:
Timed out waiting for DSP suspend 3
pm_op()latform_pm_suspend+0x0/0x54 returns -1
PMevice C6410 failed to suspend:error -1
PM:Some devices failed to suspend
Click to expand...
Click to collapse
don't know, which impact this has on battery drain. after fresh reboot and w/o recording in 720p this problem doesn't show up.
Thnaks for this - i'll have a play with it later today
It works with Barebones 1.4... when im recording it seems little bit choppy, but playing it in MoboPlayer is good (smooth, maybe not 30 fps but its good!).
Thank you!
Antszej said:
It works with Barebones 1.4... when im recording it seems little bit choppy, but playing it in MoboPlayer is good (smooth, maybe not 30 fps but its good!).
Thank you!
Click to expand...
Click to collapse
great! since Barebones 1.4 is based on CEE 3.4.2-155-002 Deblur, we can add it to the compatibility list.
yes, the recording view seems choppy on my system too, but the resulting video is quite smooth (~23-24fps).
http://www.multiupload.com/APEW3UPMI0
Here is the sample.
juuu
I want this for green lens...
insestito said:
juuu
I want this for green lens...
Click to expand...
Click to collapse
sorry. i believe that 720p recording isn't impossible for green lense models. but i do believe that this patch based on hancocks mod will do the trick only for red lens defys. because it isn't just the color of the lens but a totally different sensor. perhaps someone figures out a mod for green lenses too.
But official Froyo is near, just wait, it should have 720p recording for EVERYONE.
I compare it to xd1 ROM files, and find the different files are,
720p_mp4venc_sn.dll64P
libOMX.TI.720P.Encoder.so
libOMX.TI.JPEG.Encoder.so
libOMX.TI.mp4.splt.Encoder.so
libOMX.TI.Video.encoder.so
Hope it can reduce the update size.
Antszej said:
But official Froyo is near, just wait, it should have 720p recording for EVERYONE.
Click to expand...
Click to collapse
what leads you to this assumption?
sunoldman said:
I compare it to xd1 ROM files, and find the different files are,
720p_mp4venc_sn.dll64P
libOMX.TI.720P.Encoder.so
libOMX.TI.JPEG.Encoder.so
libOMX.TI.mp4.splt.Encoder.so
libOMX.TI.Video.encoder.so
Hope it can reduce the update size.
Click to expand...
Click to collapse
feel free to modify the package everyone... my work is done
Worked like a charm for me, thanks!
ToTTenTranz said:
Worked like a charm for me, thanks!
Click to expand...
Click to collapse
u r welcome
Yep it works here too but i cant see much difference between WVGA and this 720p..its almost the same. Is there any app on market that has continuous autofocus while recording video(like barcode scanner) ?
I'll create this patch for the green lens?
insestito said:
I'll create this patch for the green lens?
Click to expand...
Click to collapse
is this a statement or a question?
derbestimmer said:
is this a statement or a question?
Click to expand...
Click to collapse
Question for you or any Dev, sorry...
Google translator is very bad...
insestito said:
Question for you or any Dev, sorry...
Google translator is very bad...
Click to expand...
Click to collapse
i don't think i will be any helpfull, cause i'm no dev. i just took the work of a dev and ported it to another rom. sorry. perhaps someone else is able to do it.
My problem with Hancocks ROM is that lgcamera records very light sound, no matter what encoding I chose (AMR_NB, AMR_WB or AAC). I am not even sure the software records sound on defy with encoding as AMR_WB and AAC.
Video works ok with MPEG4 encoding though with twp slight issues. One is video file bitrate is not the same as configured in lgcamera settings. The other one is framerate is always below 25 - not sure if SD card speed is the bottleneck.
shural said:
My problem with Hancocks ROM is that lgcamera records very light sound, no matter what encoding I chose (AMR_NB, AMR_WB or AAC). I am not even sure the software records sound on defy with encoding as AMR_WB and AAC.
Video works ok with MPEG4 encoding though with twp slight issues. One is video file bitrate is not the same as configured in lgcamera settings. The other one is framerate is always below 25 - not sure if SD card speed is the bottleneck.
Click to expand...
Click to collapse
with light sound, do you mean quiet or bad quality? strange when i set lgcamera from amr_nb to aac, it does use this codec at least the resulting video shows this in codecinfo. and i think the sound quality is slightly better too compared to amr. concerning the other two issues, i have the same experience. the framerate never goes over 23,9fps and when i force it to 25 or even 30, lgcamera won't start recording. youre right the bitrates of the resulting video are mostly lower then the bitrates chosen in lgcamera. 13 prduces ~10, 10 produces ~8 and 8 produces ~6 mbps. but imho there is a difference visible between 13 and 8mbps respectively 10 and 6 in the resulting video. at least on the computer you can see the difference.
Sent from my MB525 using Tapatalk

[Q] How can I fix the HD video recording on my XT720? I'm only getting 21FPS

I stumbled across this video created by khalpowers on the XT720:
http://vodpod.com/watch/5015769-hd-recording-30-fps-xt720
This tells me that it's possible to get 30FPS out of this phone. Mine is only recording at 21fps according to Windows.
Will using one of khalpowers' ROMs fix my camcorder app?
I've tried the lgcamera app and I still get only 21FPS.
If any of you have any insight into this I would really appreciate it.
So I installed khalpowers' camera update and things seem smoother now, but I don't get 30fps. In Fraps I'm getting between 21fps and 24fps. It's better than it was before, but still not quite as smooth as I would like. The shutter lag in the camera is also better after the update.
Is this phone even capable of 30fps at 720p? The specs seem to say it can only do 24fps.
It can only do 24 FPS.
try khals video settings in lgcamerapro app. it allows for recording in 30fps.
SickBeast said:
I stumbled across this video created by khalpowers on the XT720:
http://vodpod.com/watch/5015769-hd-recording-30-fps-xt720
This tells me that it's possible to get 30FPS out of this phone. Mine is only recording at 21fps according to Windows.
Will using one of khalpowers' ROMs fix my camcorder app?
I've tried the lgcamera app and I still get only 21FPS.
If any of you have any insight into this I would really appreciate it.
Click to expand...
Click to collapse
It turns out that the FPS thing is really difficult to evaluate. This is because the phone records variable bit rate. The actual rate recorded seems to depend on how much light is hits the camera sensor (i.e. brighter scenes get higher framerates and darker scenes get lower framerates which makes sense to me).
To make things even more confusing the file contains a number as a "guesstimate" of the frame rate. This guesstimate is what most programs show. Unfortunately, the guesstimate seems to be incorrect most of the time. IIRC the only thing we found that seemed to show us the actual framerate was Windows Media Player in Windows 7.
There's a lot more about this in Dexter's stock221v13 development thread. Page 126 of that thread seems to be in the middle of it http://forum.xda-developers.com/showthread.php?t=939644&page=126 I think it started here: http://forum.xda-developers.com/showthread.php?p=11630078#post11630078 but it's really spread out.
Can someone post a link to kahl's camera update and khal's LGCamera settings. And should I apply the update if I'm running StealEpicBlue, or the ROM already has the update?
Thanks.
Even with lgcamera and khal's settings, the files are still not 30fps. Even watching his sample videos, they don't look any smoother than what I'm getting with his "fix" installed on the default camcorder app.
Anyhow, I can live with 24fps. I just wanted to know if 30fps was possible, and it seems as though it's not.
Thanks everyone for your input.
Perhaps khal can chime in and confirm that his files are indeed 30fps. IMO Fraps is a good way to verify it.
Higher rate on xt just 24fps.....that video from eclair..now can produce better than that with airplane mode ..
So............... does we have Camupdate on StealEpicBlue or not?
Thanks.
yes..complete patches included with cam update...
khalpowers said:
yes..complete patches included with cam update...
Click to expand...
Click to collapse
That's why we all ♥ U!
On stock 2.1.1, I did that :http://forum.xda-developers.com/showthread.php?t=1088297
but, I mean it's already done in khalpowers ROM
Can someone post the best settings for LG Camera, please?
Thanks in advance.

Thinking through CM10 720p Video Recording

This first post from me is going to be short. I welcome additional thoughts, of course. Sorry if this isn't the best place to drop this, but it's not a question and it's not anything in development!
First, an observation: the problem with 720p in CM10 is not bright light, it's the camera's ability to adapt to bright light from low light. In other words, the problem seems to be related to the light sensor. Although this is not completely new, what I noticed from playing around with LGCamera is that if I turn UP the video bitrate, the flickering is not as sever. The flickering will stop and stabilize when filming in consistent light. Any change in light quality will produce more sticking. This makes sense since 720p requires finer adjustments to light and dark than 420p. The other part of the equation is the h264 encoder. I'm guessing that certain values in the light sensor need to match up with the h264 encoder...
Second, I was playing around with these settings today: http://forum.xda-developers.com/showpost.php?p=17791551&postcount=20 I haven't had enough time to verify what makes a difference and what doesn't. I believe that some settings have helped a bit. Also, I felt that changing the ISO to 800 in camera and then switching to video improved the video, but that could be totally imagined! Essentially, what we need is ISO800 for the vidcam... I think!
Suggested fix that was here didn't work. I'm editing to see if I can correct the "Invalid User ID" error I keep getting on my XDA app. Started right after I went to correct this message.
if you think you have found a fix i'd suggest bringing it to the developer's attention, such as indeed posting this in the official thread.
Also your second post got chopped off lol
threi_ said:
if you think you have found a fix i'd suggest bringing it to the developer's attention, such as indeed posting this in the official thread.
Also your second post got chopped off lol
Click to expand...
Click to collapse
I'm just messing around right now. I don't think I've found a fix. A few things I've found: I can't find a way, using the included camera, to film above 25 fps. It doesn't matter what the settings are in media_profiles.xml, 25 is the cap. The cap should be a little above 30. I also can't force the camera to film above a bit rate of 6 Mbits/sec. I averaged around 8 Mbits on the stock camera and 10 in LG camera on GB. These settings will affect light responsiveness! Perhaps the oddest thing I've noticed is that the recording streams are inverted in JB. Everything I've filmed in GB has audio in stream 1 and video in stream 2. JB's streams are the other way around. EDIT: In fact, in GB 480p recordings use Stream 1 (or 0, depending on your player) for video and stream 2 for audio, but 720p recordings use Stream 1 for audio and Stream 2 for video. So, perhaps it's worth looking into the ways in which 720p recording is being "sent" to the codec.
In the process of sorting these things out, it would help if we could find out what the AVC h263 and MPEG4 profiles and levels were in GB. I'm not completely convinced that they are configured optimally for our phone.
[To Forum Mod: Is it possible to move this thread elsewhere? Possibly the Q&A section?]
I've spent more time on this than I intended today, so this will be brief(ish). I don't know if I've found a fix, but I may have discovered a good lead. This is definitely for people who can put together and test out kernel changes faster and more accurately than I can! The other day I thought I'd found something of use, a v4l2 driver modification for Crespo. I sent my findings over to Scotthartbti. The modification may still be of use, but there was an unanswered question: why is vidioc_dqbuf unable to to clear the buffer queue? If it's the preview screen size, the fix I discovered wouldn't repair everything. SO, when I read this morning that the kernel is actually based on a Rogers ROM with limited capabilities, I decided to run another diff on the JB kernel and the GB kernel from Samsung. What I discovered was that certain drivers s3c_bc.c and s3c_bc.h are absent from the JB kernel. These two files (?) contain information that sets screen and buffer size that I couldn't find replicated anywhere in the JB kernel. I don't think it's not there... so, in the process of trying to find out why these files might not be in the JB kernel, I discovered something better: the android exynos 3.4 Git. And surprise surprise! What is it that devs are fixing over there? Quite a few issues to do with s3c buffer size, particularly in s3c-fb, and the problem of the system ignoring preview frame size!
I suspect that some lingering bugs are being addressed here: https://android.googlesource.com/kernel/exynos.git/+/android-exynos-3.4
keep it up.
Thanks for working at this. I just learned how to pull a logcat and I nabbed one while barcode scanner was on. I'm running CM10 now and I ran CM9 until July. I wish I could help, but alas I am merely a padawan.
Thanks, reynaim. Yours looks pretty much like mine. It's useful to have that confirmation!
So, I've been working on this for awhile now, spending much more time than I ever thought I would. I'm not a developer. I taught myself html, css, and php and it looks to be following a similar route with c++ and python! I've learned a fair bit about how our phone works and I have some ideas about the problems with our camera. I'll list what I can here:
1. Google updated their camera code several revisions ago, but it appears Samsung either relied on aging code or has not released the actual code for the camera hal. Several commands that bind the driver layer to software are not up to date in our camera hal and may be part of the cause of the flickering. The way the camera works is that it calls up a preview, then dumps that information before it starts recording. I suspect that the camera is not clearing the buffer queue at that moment as it should. I am attempting to rewrite this portion of the driver, but it's laborious.
2. Let's be clear about what the problems actually are: Flicker in any transition of light conditions. I can get 720p to work in bright light if there are no shadows. The light sensor is not working with the camera correctly. Actually, the problem is the framerate. At the moment, the 720p stream is going through the wrong channel, as if it is running on a PAL device. Hence, not only is the datastream throttled, but the framerate is wrong. I tinkered a bit with the light sensor drivers - changed a few values here and there - but I haven't noticed a difference.
To note here: PAL = 25 fps, NTSC =30fps. Also, PAL = 50Hz, NTSC = 60 Hz. The Infuse may use a mixed mode that runs 30fps and 50Hz.
What you will notice as a user in addition to the flicker and stuck frames is that:
The video stream is stream 1. It should be #2 (you can check this most reliably in VLC on your computer or MX Player on your phone - VLC refers to the streams as 0 and 1).
FPS, despite media_profiles.xml demanding otherwise, will not rise above 25 and may drop to around 15.
Bitrate won't rise above 6Mbits/sec (interestingly, Android sdk has the bitrate capped at 8Mbits/sec). GB would ordinarily record at 10 - 11 Mbits/sec (there is a way to up the bitrate in JB, but it doesn't improve vid quality).
3. Some minor irritations can be corrected by adding the firmware packages back into the system folder. Add a directory called "firmware" to your system folder (so it should look like /system/firmware/), give it the permissions 754 (RWX,R-X,R-X), and add RS_M5LS_OI.bin, RS_M5LS_SI.bin, RS_M5LS_TB.bin (which you may find in an old GB backup). Give those the permissions RWX, R,R (or R-X, R-X for the last two - I'm not sure which is better!). Reboot. This gets rid of that odd lag you've probably noticed when you open up 3rd party cameras and they search for storage and sometimes crash as a result.
4. I don't think - I could be wrong! - that the problem is actually in fimc. Fimc is behaving normally. There are some curiosities in the current camera hal that fimc doesn't like.
5. In fact, it seems the camera hal was not written for an 8MP camera. Why doesn't Samsung release the camera hal? Does anyone know this? My best lead came when I bricked my phone and decided to take a couple of video logcats so I could at least pinch a few values and processes.
Its seems very long since update on this thread
Whizzpopper said:
Thanks, reynaim. Yours looks pretty much like mine. It's useful to have that confirmation!
So, I've been working on this for awhile now, spending much more time than I ever thought I would. I'm not a developer. I taught myself html, css, and php and it looks to be following a similar route with c++ and python! I've learned a fair bit about how our phone works and I have some ideas about the problems with our camera. I'll list what I can here:
1. Google updated their camera code several revisions ago, but it appears Samsung either relied on aging code or has not released the actual code for the camera hal. Several commands that bind the driver layer to software are not up to date in our camera hal and may be part of the cause of the flickering. The way the camera works is that it calls up a preview, then dumps that information before it starts recording. I suspect that the camera is not clearing the buffer queue at that moment as it should. I am attempting to rewrite this portion of the driver, but it's laborious.
2. Let's be clear about what the problems actually are: Flicker in any transition of light conditions. I can get 720p to work in bright light if there are no shadows. The light sensor is not working with the camera correctly. Actually, the problem is the framerate. At the moment, the 720p stream is going through the wrong channel, as if it is running on a PAL device. Hence, not only is the datastream throttled, but the framerate is wrong. I tinkered a bit with the light sensor drivers - changed a few values here and there - but I haven't noticed a difference.
To note here: PAL = 25 fps, NTSC =30fps. Also, PAL = 50Hz, NTSC = 60 Hz. The Infuse may use a mixed mode that runs 30fps and 50Hz.
What you will notice as a user in addition to the flicker and stuck frames is that:
The video stream is stream 1. It should be #2 (you can check this most reliably in VLC on your computer or MX Player on your phone - VLC refers to the streams as 0 and 1).
FPS, despite media_profiles.xml demanding otherwise, will not rise above 25 and may drop to around 15.
Bitrate won't rise above 6Mbits/sec (interestingly, Android sdk has the bitrate capped at 8Mbits/sec). GB would ordinarily record at 10 - 11 Mbits/sec (there is a way to up the bitrate in JB, but it doesn't improve vid quality).
3. Some minor irritations can be corrected by adding the firmware packages back into the system folder. Add a directory called "firmware" to your system folder (so it should look like /system/firmware/), give it the permissions 754 (RWX,R-X,R-X), and add RS_M5LS_OI.bin, RS_M5LS_SI.bin, RS_M5LS_TB.bin (which you may find in an old GB backup). Give those the permissions RWX, R,R (or R-X, R-X for the last two - I'm not sure which is better!). Reboot. This gets rid of that odd lag you've probably noticed when you open up 3rd party cameras and they search for storage and sometimes crash as a result.
4. I don't think - I could be wrong! - that the problem is actually in fimc. Fimc is behaving normally. There are some curiosities in the current camera hal that fimc doesn't like.
5. In fact, it seems the camera hal was not written for an 8MP camera. Why doesn't Samsung release the camera hal? Does anyone know this? My best lead came when I bricked my phone and decided to take a couple of video logcats so I could at least pinch a few values and processes.
Click to expand...
Click to collapse
Hi @Whizzpopper,
I was searching on Google for infuse 4g 720p recording on JB custom ROMs and found your thread,
it seems you had been gone throught very deep on this.
Have you found anything that help us on resolving this issue afterwards ?
yogi.306 said:
Hi @Whizzpopper,
I was searching on Google for infuse 4g 720p recording on JB custom ROMs and found your thread,
it seems you had been gone throught very deep on this.
Have you found anything that help us on resolving this issue afterwards ?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=38355903
Sent from my Galaxy Nexus using xda premium
yogi.306 said:
Hi @Whizzpopper,
I was searching on Google for infuse 4g 720p recording on JB custom ROMs and found your thread,
it seems you had been gone throught very deep on this.
Have you found anything that help us on resolving this issue afterwards ?
Click to expand...
Click to collapse
Indeed, I did leave the Infuse. There are so many variables, it's hard to say. The problem could be in the codec or in the settings used to interact with the codec (the media_profiles.xml or media_codecs.xml) or it could be in the kernel as Scott Hart used to suspect (don't know what he thinks now!). As you know, Samsung did not provide an honest release of the source for the Infuse.
Sorry I couldn't be of more help!
Thanks
Whizzpopper said:
Indeed, I did leave the Infuse. There are so many variables, it's hard to say. The problem could be in the codec or in the settings used to interact with the codec (the media_profiles.xml or media_codecs.xml) or it could be in the kernel as Scott Hart used to suspect (don't know what he thinks now!). As you know, Samsung did not provide an honest release of the source for the Infuse.
Sorry I couldn't be of more help!
Click to expand...
Click to collapse
Thank you for your updates,
Now Scott made a lot of improvement and fixed all most all the bugs for the kernel we are using in infuse 4g,
the only 720p recording and HDMi are not resolved yet, and i guess its not possible due to samasung not provided the source.
Thanks for your efforts on infuse.

[Q] ICS 3Dvideo mods

Using a pc program "mediainfo" I noticed the 3D video encoding has changed from the codec used in gingerbread. The codec is now listed as iso which is common enough, but the codec also uses "frame tripling". The frame rate is 30fps so are we getting a 30fps with 3 frames making 1, effectively 90fps or 10fps with 3 frames duplicated to "make" 30fps.
The new 3D files cause windows explorer to continually try to analyse the mp4 files and will not automatically unmount the sd card as it is continually trying to recognize the file. The same problem also when the 3D videos are transferred to PC and the folder is viewed in explorer, cannot even re-name them with a different extension to stop the lock-ups.
Sorry to say, but 90 fps is not even true. The S3D hardware is limited to only TWO images, so it's basically split-image, either 30fps or 60fps, both left and right images. If you try 90fps, you will have image ghosting which the transparent ceramic plate is timed wrongly against video frames or worse - you will see flashing or wavy patterns which will cause you the headache. And, LCD is normally locked at 60 hertzs, as is the case with non-3D LCDs.
EDIT: The file is basically a MP4 file - with some capable media players, probably like VLC player, it will display two "squeezed" images as seen by two cameras on the 3D phone.
Sent from my LG-P920 using xda premium
I didn't have a problem moving or viewing the 3D files created in gingerbread. It seems the new codec used by ICS is causing windows problems as the codec is not recognized, windows just keeps trying to update the thumnails on the sd card when connected via usb or when removed and in a sd card reader.
Just wondered if anyone has found a way round this problem.
The "frame tripling" that is reported in the pc program {mediainfo} is a part of the codec description and cannot seem to find any mention of it in this forum.
Interesting... I have a modified ICS version of 3D camera, modified for CM10 - will try this. BTW, I don't like using thumbnail feature on Windows - nothing but a PITA.
Sent from my LG-P920 using xda premium
Hmmm. I have Nvidia 3d vision and drivers on my pc and I can watch video directly over hdmi and copy them, etc. Maybe you need the Nvidia drivers???
Or updated Catalyst for AMD Radeon HD 4k or later. I have Radeon 4670, BTW. It's still a great general-purpose video card.
However, I don't have a 3D monitor. Definitely outside of my budget.
Sent from my LG-P920 using xda premium
The "lockup" of file monitoring in widows7 for this new codec is not my main concern,annoying as it may be. I am worried about the mediainfo report of the frame mode is "frame tripling". my own research has been that 3D capture on a 3D camera by panasonic or philips or someone ACTUALLY records at 10fps and each frame is then repeated 3 times to give a 30fps video file This would give a poor motion quality video. I need to confirm that ALL o3D ICS updates have the same frame tripling video recording, as I have some "issues" with my upgrade in other software since upgrading to ICS .If the video recorded by the ICS upgrade is in fact 10fps and multiplied x3 then it is a novelty and not really persuing 3D by upgrading PC or TV to view real 3D.
Thanks for your reply's so far.
Still interesting, however. 10 fps seems slow but here, the first ever stereoscopic 3D camcorders have slower in-order processors, BTW - not as advanced as what's in our phones. So, in reality 90 fps is actually viewable as 30 fps when the 3D LCD timing is factored here.
Sent from my LG-P920 using xda premium
Sorry but don't understand the explanation or translation into english,
keith210350 said:
The "lockup" of file monitoring in widows7 for this new codec is not my main concern,annoying as it may be. I am worried about the mediainfo report of the frame mode is "frame tripling". my own research has been that 3D capture on a 3D camera by panasonic or philips or someone ACTUALLY records at 10fps and each frame is then repeated 3 times to give a 30fps video file This would give a poor motion quality video. I need to confirm that ALL o3D ICS updates have the same frame tripling video recording, as I have some "issues" with my upgrade in other software since upgrading to ICS .If the video recorded by the ICS upgrade is in fact 10fps and multiplied x3 then it is a novelty and not really persuing 3D by upgrading PC or TV to view real 3D.
Thanks for your reply's so far.
Click to expand...
Click to collapse
Indeed "TriDef Media Player" installed with my LG3D monitor can't play 3D movies from ICS but 2D is able to play.
"Stereo Movie Player" http://stereo.jpn.org/eng/index.html can't play 3D from ICS too.
Only "Stereoscopic Player" http://www.3dtv.at/Index_en.aspx can play that video.
Nvidia 3D Vision drivers work for me, but if you have an AMD GPU it may be different.
OK, works very well for me too.
After I uninstalled ffdshow

Categories

Resources