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.
Good day.
I have serious problem. The phone works perfectly otherwise, except i cant playback movies. they all stutter. I mean i had Xperia X before with SD650, and every single movie works flawlessy smooth, its like grafic proccesor has trouble rendering video. I tried everything. Hardware acceleration, software, force Gpu rendering all.
I flashed stock rom Marshmallow and two other marshmallow roms, tried all Nougat versions too. Same thing everywhere. I used MX player, custom ac3 codec , Bs player, VLC, all programs, i know all, i watch movies forever. first time i have trouble with playback.
Is it software problem, do i have too wait for final Nougat update 7.1.1 or is it my unit defection. Anywone else has this problem?
Video playback isnt smooth, it stutters!!
please help me before i go to servis.
Greetings
Dreadish
Dreadish said:
Good day.
I have serious problem. The phone works perfectly otherwise, except i cant playback movies. they all stutter. I mean i had Xperia X before with SD650, and every single movie works flawlessy smooth, its like grafic proccesor has trouble rendering video. I tried everything. Hardware acceleration, software, force Gpu rendering all.
I flashed stock rom Marshmallow and two other marshmallow roms, tried all Nougat versions too. Same thing everywhere. I used MX player, custom ac3 codec , Bs player, VLC, all programs, i know all, i watch movies forever. first time i have trouble with playback.
Is it software problem, do i have too wait for final Nougat update 7.1.1 or is it my unit defection. Anywone else has this problem?
Video playback isnt smooth, it stutters!!
please help me before i go to servis.
Greetings
Dreadish
Click to expand...
Click to collapse
It's not normal at all, if you properly flashed more roms and the problems are still the same then there could be some hardware issue, install Geekbench, run both CPU and then Compute and show me the results, compute is often good to understand if there is something going wrong in the background.
Geekbench Score
1581
Single-Core Score
3746
Multi-Core Score
Geekbench 4.0.4 for Android AArch64
System Information
Sony F8331
Operating System
Android 6.0.1
Build
39.0.A.1.213
Model
Sony F8331
Model ID
Sony F8331
Motherboard
msm8996
Processor
Qualcomm Qualcomm @ 1.59 GHz
1 Processor, 4 Cores
Processor ID
ARM implementer 81 architecture 8 variant 1 part 517 revision 2
Governor
interactive
Memory
2.69 GB
Single-Core
Crypto Score797
Integer Score1417
Floating Point Score1556
Memory Score2184
AES
797
615.1 MB/sec
LZMA
1283
2.00 MB/sec
JPEG
2326
18.7 Mpixels/sec
Canny
1643
22.8 Mpixels/sec
Lua
1259
1.29 MB/sec
Dijkstra
1882
1.27 MTE/sec
SQLite
1208
33.5 Krows/sec
HTML5 Parse
1473
6.69 MB/sec
HTML5 DOM
412
373.8 KElements/sec
Histogram Equalization
1286
40.2 Mpixels/sec
PDF Rendering
1767
47.0 Mpixels/sec
LLVM
1509
103.8 functions/sec
Camera
2254
6.25 images/sec
SGEMM
528
11.2 Gflops
SFFT
1159
2.89 Gflops
N-Body Physics
1415
1.06 Mpairs/sec
Ray Tracing
1860
271.7 Kpixels/sec
Rigid Body Physics
2232
6534.6 FPS
HDR
2676
9.70 Mpixels/sec
Gaussian Blur
2405
42.1 Mpixels/sec
Speech Recognition
1138
9.74 Words/sec
Face Detection
2042
596.7 Ksubwindows/sec
Memory Copy
2790
7.73 GB/sec
Memory Latency
1782
4.12 Moperations/sec
Memory Bandwidth
2098
11.2 GB/sec
Multi-Core
Crypto Score1985
Integer Score4198
Floating Point Score4106
Memory Score2628
AES
1985
1.50 GB/sec
LZMA
4206
6.57 MB/sec
JPEG
6416
51.6 Mpixels/sec
Canny
5061
70.2 Mpixels/sec
Lua
3739
3.84 MB/sec
Dijkstra
4864
3.29 MTE/sec
SQLite
3424
94.9 Krows/sec
HTML5 Parse
4102
18.6 MB/sec
HTML5 DOM
1616
1.46 MElements/sec
Histogram Equalization
4414
137.9 Mpixels/sec
PDF Rendering
4993
132.7 Mpixels/sec
LLVM
3654
251.3 functions/sec
Camera
6616
18.3 images/sec
SGEMM
1548
32.7 Gflops
SFFT
3160
7.88 Gflops
N-Body Physics
3406
2.54 Mpairs/sec
Ray Tracing
4858
709.4 Kpixels/sec
Rigid Body Physics
5762
16869.8 FPS
HDR
7467
27.1 Mpixels/sec
Gaussian Blur
5308
93.0 Mpixels/sec
Speech Recognition
3575
30.6 Words/sec
Face Detection
5023
1.47 Msubwindows/sec
Memory Copy
3659
10.1 GB/sec
Memory Latency
1573
3.63 Moperations/sec
Memory Bandwidth
3156
16.9 GB/sec
And compute test
Geekbench Score
7023
RenderScript Score
Section Description Compute
RenderScript RenderScript performance 7023
Geekbench 4.0.4 for Android AArch64
System Information
Sony F8331
Operating System
Android 6.0.1
Build
39.0.A.1.213
Model
Sony F8331
Model ID
Sony F8331
Motherboard
msm8996
Processor
Qualcomm Qualcomm @ 1.59 GHz
1 Processor, 4 Cores
Processor ID
ARM implementer 81 architecture 8 variant 1 part 517 revision 2
Governor
interactive
Memory
2.69 GB
RenderScript
Score7023
Sobel
13361
588.6 Mpixels/sec
Histogram Equalization
9520
297.5 Mpixels/sec
SFFT
1653
4.12 Gflops
Gaussian Blur
10684
187.2 Mpixels/sec
Face Detection
4665
1.36 Msubwindows/sec
RAW
6743
65.3 Mpixels/sec
Depth of Field
18964
55.1 Mpixels/sec
Particle Physics
4417
698.3 FPS
I cant believe it. I was in the store testing the mineral black version of sony XZ they have on the shelvs. And that device also has the same issuse. I didnt play smooth. I tested XA wich was there too and it played perfectly smooth and its way lower device in specs. POINT Being. Im testing yet another black version in another store tommorow.
And what my specs showibg above?
I simply refuse to belive that no one came acroos this playback issue. Worked fine and smooth on all previous low specs phones i had (last was Xperia x).
Its like no one is watching movies on phone. Playback skipping frames-stutters video. (maybe its not so in videos u record with camera, but this goes for all type of movies mkv, mp4, divx etc. with either mx player (or other best players outthere).
Not one single user had this issue?
I will test another XZ phone tommorow in another store wich im gonna, and if it will have same issue, i seriously doubt that ALL Xz phones are hardware broken , it would be too much coincidence for thoes three. Then it would surelly be software problem. But why Sony didnt repair this?
Its been like what - 4 updates already since stock.....? Im still waiting for the cooment on my benchmark i posted above...
The values from the benchmarks are completely fine, but I see you're still running MM, there may be something wrong with the regional MM you're running, update the phone to 7.0 and I believe there won't be any problem, I own two XZs, one rooted and one in factory settings+updated, none of them have ever lagged during a single task.
I understand but i already updated for the first time over official phone updates all the way up to 442. Nougat version. It wasnt working, was still skipping frames on movies. After that i tried separately flashin all roms, three nougat versions too. Didnt help.
So u sure this is software problem? All my bencmark dont show anY faults?
Dreadish said:
I understand but i already updated for the first time over official phone updates all the way up to 442. Nougat version. It wasnt working, was still skipping frames on movies. After that i tried separately flashin all roms, three nougat versions too. Didnt help.
So u sure this is software problem? All my bencmark dont show anY faults?
Click to expand...
Click to collapse
Have you tried running the phone in safe mode?
It sounds like a third-party app acting up, and it might be a third party app that comes with a certain region of the FW.
Also, does the playback behave the same reading from internal storage and SD card?
For example, I'm using a customized Greek FW and have no issues with video playback, even tried 4k videos, they run fine.
Reboot the phone into safe mode and see if the issue persists. If not, run it like that in safe mode for at least 2 hours, preferably even longer, and if the problem is still not there, then it's a third party issue.
I do disable a lot of stock apps after fresh FW flash and I barely use any aditional apps, so I can't confirm anything regarding to stock fresh FW with all preinstalled apps.
Keep in mind that running in safe mode will reset some of the UI and user settings to default, also when you revert back to normal mode, some apps might ask you to log in again.
I've had a similar issue with the Z3, it would lag and stutter and drain battery for no reason, ran it in safe mode and everything was great. Then I started removing third-party apps until I identified the one that was causing the issue (some sketchy camera app, it had processes running in the background like crazy).
I tested from SD card and from internal memory of course Yes.
I just tried safe mode again (also i disabled all other apps that i could) with MM213 and still playback stutters frames.
I was limited when using aps, i coudnt use mx player or anything to test, just ALBUM" program too play movies, and they still didnt played smooth. Album dosent support all divx,mkv and other formats anyway. There was one time that one movie did played smooth but that was only one time in album. I tried record 1080 and 4K too, it does play ok" still ocasionaly really small stutter every frames - but its surelly not the same as stuttering and skipping when playing a movie. (is this normal for camera videos?)
Atrax2010 said:
Have you tried running the phone in safe mode?
It sounds like a third-party app acting up, and it might be a third party app that comes with a certain region of the FW.
Also, does the playback behave the same reading from internal storage and SD card?
For example, I'm using a customized Greek FW and have no issues with video playback, even tried 4k videos, they run fine.
Reboot the phone into safe mode and see if the issue persists. If not, run it like that in safe mode for at least 2 hours, preferably even longer, and if the problem is still not there, then it's a third party issue.
I do disable a lot of stock apps after fresh FW flash and I barely use any aditional apps, so I can't confirm anything regarding to stock fresh FW with all preinstalled apps.
Keep in mind that running in safe mode will reset some of the UI and user settings to default, also when you revert back to normal mode, some apps might ask you to log in again.
I've had a similar issue with the Z3, it would lag and stutter and drain battery for no reason, ran it in safe mode and everything was great. Then I started removing third-party apps until I identified the one that was causing the issue (some sketchy camera app, it had processes running in the background like crazy).
Click to expand...
Click to collapse
My god. Today i tested two more XZ models in two different stores front. Both runned Nougat 7.0 version 39.2.A.0.327 . The one Platinum was same as mine-bad stuttering playback, but the other black version in another store with exacly same version was working perfectly - playback and all was very smooth as it should be. So what now? Is it possible that i had bad version, im loading new zeland rom with same version number just another country to test it. Prolly wont make difference.
So this is resoults:
i tested 3 different XZ models in three stores. Two of them were buggs as mine, third one was good when it comes too playback. So this means its hardware problem and i should demand replacement?
Here is Atuntu resoults also. i just test it. main score seems ok. but what about other specs resoults. Can anyone cofirm if this is ok?
View attachment 4085448
Dreadish said:
Here is Atuntu resoults also. i just test it. main score seems ok. but what about other specs resoults. Can anyone cofirm if this is ok?
View attachment 4085448
Click to expand...
Click to collapse
This is my score, on Greece Customized .442, nothing running in the background.
I don't know if this is within the margin of error.
5 of the units in 5 different stores have exacly same issue.I tested that oone again from yesterday that suppose to be ok, but it turns out today its not. Has same issuse. ITS highly unilikely that all came from broken manufactor series. Some were platin , some black from two different suppliers since thoes shops use different suppliers.
I cant believe no one has encountered this issue. Ok movies DO play, but its choppy playback - for some people maybe this is normal but its not. frames are simply not smooth.
I really hope this is software problem - considering that was one or two times on my unit, that movie actually played fine. but that was only two times. Really wierd.
I dont wanna send unit too servis for reason they will tell me its ok and that its software related problem. Im just suspisios, since i dont see users complaining about it. Like no one watches movies.... Or time since release is just too short for Sony too manage too get rid of this issue and gave it low priority with past updates.
Its just too much coincidence that ALL 5 of the phones i tested has broken production. Benchmark shows all ok anyway.
o have xperia xz platinuim rev 2 and i watch alot of 2 hours long movies and i dont have this problem, i guess it is about luck D:
Dreadish said:
5 of the units in 5 different stores have exacly same issue.I tested that oone again from yesterday that suppose to be ok, but it turns out today its not. Has same issuse. ITS highly unilikely that all came from broken manufactor series. Some were platin , some black from two different suppliers since thoes shops use different suppliers.
I cant believe no one has encountered this issue. Ok movies DO play, but its choppy playback - for some people maybe this is normal but its not. frames are simply not smooth.
I really hope this is software problem - considering that was one or two times on my unit, that movie actually played fine. but that was only two times. Really wierd.
I dont wanna send unit too servis for reason they will tell me its ok and that its software related problem. Im just suspisios, since i dont see users complaining about it. Like no one watches movies.... Or time since release is just too short for Sony too manage too get rid of this issue and gave it low priority with past updates.
Its just too much coincidence that ALL 5 of the phones i tested has broken production. Benchmark shows all ok anyway.
Click to expand...
Click to collapse
I'm sure if someone had the issue here they would tell you. I watched couple of movies on my phone an they play normal, 1080p.
Then after you wrote about your issue, I tried a few 4K samples, and they run smooth as butter. For example, this one http://4ksamples.com/honey-bees-96fps-in-4k-ultra-hd/ , you try it.
I seriously don't know what the issue might be.
I just had a similar issue - but having 10% battery and the phone got into Stamina mode. I have the stamina mode set to aggressive. This is why the phone shutters.
Wysłane z mojego F8331 przy użyciu Tapatalka
remmyhi said:
I just had a similar issue - but having 10% battery and the phone got into Stamina mode. I have the stamina mode set to aggressive. This is why the phone shutters.
Wysłane z mojego F8331 przy użyciu Tapatalka
Click to expand...
Click to collapse
No Stamina here. I turned everything off. LTE, Stamina, X reality, everything. (also tried safe mode, but hard too test in safe mode, when u cant use third party apps wich have software too play different type of movie files.
s there any other test i can perform with numbers, wich i didnt already, and would show any hardware or software faults. Currently using 442, latest March update of nougat (tried older roms already too). I have strange feeling that this device is broken - but could it be? when ALL FIVE XZ,s i tested in five different shops in stores have same issue? ( any any other midrange phone different brands works flawlessy playback)?
Dreadish said:
Currently using 442, latest March update of nougat (tried older roms already too). I have strange feeling that this device is broken - but could it be? when ALL FIVE XZ,s i tested in five different shops in stores have same issue? ( any any other midrange phone different brands works flawlessy playback)?
Click to expand...
Click to collapse
Have you tried forcing GPU rendering in developer settings? Its old trick to smooth UI in devices with new/unoptimised systems. Let me know if it helped, because I don't have that issue on CE1 customization.
Dreadish said:
No Stamina here. I turned everything off. LTE, Stamina, X reality, everything. (also tried safe mode, but hard too test in safe mode, when u cant use third party apps wich have software too play different type of movie files.
s there any other test i can perform with numbers, wich i didnt already, and would show any hardware or software faults. Currently using 442, latest March update of nougat (tried older roms already too). I have strange feeling that this device is broken - but could it be? when ALL FIVE XZ,s i tested in five different shops in stores have same issue? ( any any other midrange phone different brands works flawlessy playback)?
Click to expand...
Click to collapse
Does it happen with any video you play? Different recorded resoultions from the phone's own camera, all of the youtube video qualities, ripped movies... Try recording something in [email protected], upload it and I can try play it and see how it works, or some other video you've got issues with.
Forcegpu is the first thing i tried when accounter this playback issue and didnt make any diffdrence. ?