maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   camera-ui2 (now a part of CSSU) (updated 09. May) (https://talk.maemo.org/showthread.php?t=70870)

nicolai 2011-12-20 12:34

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
@mohammad
isn't dspjpegenc the default in gdigicam.conf?

@v_
the gstreamer plugin dspjpegenc doesn't support a quality property.
(if you have gst-tools installed, you can view details about an plugin
with f.example: gst-inspect dspjpegenc ).
So, settings the quality option in gdigicam.conf isn't used.

vi_ 2011-12-20 12:44

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by nicolai (Post 1139919)
@mohammad
isn't dspjpegenc the default in gdigicam.conf?

@v_
the gstreamer plugin dspjpegenc doesn't support a quality property.
(if you have gst-tools installed, you can view details about an plugin
with f.example: gst-inspect dspjpegenc ).
So, settings the quality option in gdigicam.conf isn't used.

Thanks bro, I just found it though.

here.

It is a hardcoded value in the dsp codec source. one of the first #defines on in the code. This begs the obvious question...

Please please please please please someone with the appropriate environment compile it, I will go first and be the test lemming. Just whack it up to 97 or something looney like that.

freemangordon 2011-12-20 13:39

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by vi_ (Post 1139922)
Thanks bro, I just found it though.

here.

It is a hardcoded value in the dsp codec source. one of the first #defines on in the code. This begs the obvious question...

Please please please please please someone with the appropriate environment compile it, I will go first and be the test lemming. Just whack it up to 97 or something looney like that.

That shoud be done via gdigicam/camera-ui, not through default value change. And (as felipec mentioned on 720p thread) dspipp should be included too in gstreamer pipeline. But that is planned after 720p recording is stable.

xes 2011-12-20 13:56

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by vi_ (Post 1139922)
Thanks bro, I just found it though.

here.

It is a hardcoded value in the dsp codec source. one of the first #defines on in the code. This begs the obvious question...

Please please please please please someone with the appropriate environment compile it, I will go first and be the test lemming. Just whack it up to 97 or something looney like that.


...just for fun of the brave one's... here it is mr. quality 97% :cool:

WARNING... not tested, just compiled.

vi_ 2011-12-20 13:57

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by freemangordon (Post 1139946)
That shoud be done via gdigicam/camera-ui, not through default value change. And (as felipec mentioned on 720p thread) dspipp should be included too in gstreamer pipeline. But that is planned after 720p recording is stable.

I agree entirely. However as a low priority bodge that would not take anytime to implement just upping the default value would suffice.

This is good because:

1. It requires little to no effort to implement.
2. Does not break anything now/future (probably).
3. It adds a requested feature.

Thank you for your time.

vi_ 2011-12-20 14:04

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by xes (Post 1139958)
...just for fun of the brave one's... here it is mr. quality 97% :cool:

WARNING... not tested, just compiled.

Wow, that was fast! However I think you need to compile it against freeman gordon's source tree here.

https://meego.gitorious.org/maemo-mu...dsp/trees/HEAD

Or it will not work...

freemangordon 2011-12-20 14:08

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by vi_ (Post 1139962)
Wow, that was fast! However I think you need to compile it against freeman gordon's source tree here.

https://meego.gitorious.org/maemo-mu...dsp/trees/HEAD

Or it will not work...

Here ;) https://meego.gitorious.org/~freeman...mo5-hd-patches

xes 2011-12-20 14:12

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by vi_ (Post 1139962)
Wow, that was fast! However I think you need to compile it against freeman gordon's source tree here.

https://meego.gitorious.org/maemo-mu...dsp/trees/HEAD

Or it will not work...

""The sources are exactly the same... ""
EDIT: wait a minute... path corrected... new build


and...Builded directly into my N900.
(maybe this will produce some speed optimization)

karam 2011-12-20 14:14

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
done
with patches from freemangordon

//EDIT

removed

vi_ 2011-12-20 14:19

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by karam (Post 1139969)
done
with patches from freemangordon

That was fast. Although something is not quite right...FG libgstdsp.so is 158KB and your one is 805KB. Changing 1 single digit in 1 source file should not increase the size of the output by 900%.

Close, but no cigar.

xes 2011-12-20 14:22

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by vi_ (Post 1139973)
That was fast. Although something is not quite right...FG libgstdsp.so is 158KB and your one is 805KB. Changing 1 single digit in 1 source file should not increase the size of the output by 900%.

Close, but no cigar.

..not stripped...
strip libgstdsp.so

Just completed the "make"
97% ...builded on the road

vi_ 2011-12-20 14:38

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by karam (Post 1139969)
done
with patches from freemangordon

OP DELIVERS

http://www.comicbookmovie.com/images...ick_amazon.jpg

And it works! Thank you xes, karam and freemangordon. Barely an hour after I suggested this it has surfaced.

I love all you bros.

no homo.

karam 2011-12-20 14:39

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
1 Attachment(s)
oops
looks like i didn't strip it

anyway
here is a 100 quality instead of 90 (stripped)

xes 2011-12-20 14:40

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by vi_ (Post 1139980)
OP DELIVERS

- IMG -

And it works! Thank you xes, karam and freemangordon. Barely an hour after I suggested this it has surfaced.

I love all you bros.

no homo.


You are welcome...but at the end, which one are you using?
Tested both of them? (to avoid confusion i think is better to remove the untested attachments)

vi_ 2011-12-20 14:42

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
I am using the second 'stripped' version. It seems silly to use an extra 750KB of RAM for nothing.

I am using the 97 version. Above 97 the difference is imperceptible yet the file grows by about 1/3 in size (so around 3MB per photo instead of 2).

freemangordon, would you consider adding this to your source tree so that in the future if you make any alterations I will not lose this marvelous 7 points less of jpeg compression?

xes 2011-12-20 14:50

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
@vi_
If you have some time, make a test also with the "builded inside" version. Performance may be different.

karam 2011-12-20 14:54

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
@xes i think building inside will improve the performance with binaries only


@freemangordon

i have abettercamera app (just like blessN900)
but the HDR photo taking doesn't work with 720p patches
didn't check if it's caused by libgstdsp or the ones inside /lib/dsp

i just did a small script to switch between libraries when launching abettercamera app

hope you can know what is causing the problem

vi_ 2011-12-20 14:59

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by karam (Post 1139995)
@xes i think building inside will improve the performance with binaries only


@freemangordon

i have abettercamera app (just like blessN900)
but the HDR photo taking doesn't work with 720p patches
didn't check if it's caused by libgstdsp or the ones inside /lib/dsp

i just did a small script to switch between libraries when launching abettercamera app

hope you can know what is causing the problem

Abettercamera (ABC) uses the DSP for faster processing. Without knowing what it is ABC is doing with the DSP (i.e. seeing sources) there is nothing that can be done...

|ErosizeD| 2011-12-20 15:25

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Looool.... Forget about the image... THink about the video HIGHER BITRATES!!! omg, doesnt care, how all you optimize the camera, with that bitrates ( arround 5-8MB ) You never get decent quality....

And about the image quality, to much oversharped images, and some kind of extra filters...

Damn xD

xes 2011-12-21 08:39

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
.....hum.... with the build of libgstdsp based on latest sources it seems to be some issue while recording video.... (black screen after some second and then hang of the app)

Please verify this and report.


@freemangordon
I would like to complete the camera-ui interface preparing the icons for the new resolutions settings.
Is it sufficient to prepare the icons and put in the right folders or it is necessary to rebuild the app?
(in this case which are the expected names?)

don_falcone 2011-12-21 09:05

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
I experience this also, but only when the 720p codecs are present.

freemangordon 2011-12-21 09:07

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by xes (Post 1140303)
.....hum.... with the build of libgstdsp based on latest sources it seems to be some issue while recording video.... (black screen after some second and then hang of the app)

Please verify this and report.


@freemangordon
I would like to complete the camera-ui interface preparing the icons for the new resolutions settings.
Is it sufficient to prepare the icons and put in the right folders or it is necessary to rebuild the app?
(in this case which are the expected names?)

Please make sure you are building libgstdsp.so with DSP_API=1 and SN_API=1.

re camera-ui - it is better to clone and test upstream(in CSSU) first, there are lots of changes.

vi_ 2011-12-21 09:16

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by xes (Post 1140303)
.....hum.... with the build of libgstdsp based on latest sources it seems to be some issue while recording video.... (black screen after some second and then hang of the app)

Please verify this and report.


@freemangordon
I would like to complete the camera-ui interface preparing the icons for the new resolutions settings.
Is it sufficient to prepare the icons and put in the right folders or it is necessary to rebuild the app?
(in this case which are the expected names?)

...It works for me...please supply dmesg, syslog and verification of error with no hacks, mods, tweaks etc.

xes 2011-12-21 11:29

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
1 Attachment(s)
Quote:

Originally Posted by freemangordon (Post 1140310)
Please make sure you are building libgstdsp.so with DSP_API=1 and SN_API=1.

re camera-ui - it is better to clone and test upstream(in CSSU) first, there are lots of changes.

Ooops.. Thanks! I didn't specified these parameters..
I apologize to those who installed the previous one, here the new build (verified video recording - built inside the N900 for max optimization).

Concerning camera-ui, does it already exist some development deb in sync with the cssu git?

karam 2011-12-21 12:43

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
@freemangordon

https://meego.gitorious.org/maemo-mu...dsp/trees/HEAD
is this the source if the stock libgstdsp.so ?

i want to build a new lib with quality improved (unmodified with any 720p patches) to use with (ABC) app

PartyboyXP 2011-12-21 13:18

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Please build it in .deb :(

freemangordon 2011-12-21 14:21

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by xes (Post 1140338)
Ooops.. Thanks! I didn't specified that parameters..
I apologize to those who installed the previous one here the new build (verified video recording).

Concerning camera-ui, does it already exist some development deb in sync with the cssu git?

No, you should build it from sources, but please, do not distribute the .debs, I hope next CSSU update will be soon and it will be there.

May I ask you to make a MR against my repo, to keep all the pieces together.

@all - I am about to finish a kernel patch against KP which will allow zerocopy DMA between camera driver, dspbridge driver and OMAP framebuffer(will explain what that means).

I think I found the reason for stutter in recorded videos. AIUI it is the memory copying between different elements in gstreamer pipeline. The recording process is similar to the following(simple descrption):

1. camera(isp) driver captures a frame in an user supplied buffer
2. this bufer is send to all elements in the gstreamer video capture pipeline
3. xvimagesink (the previewer element) copies that buffer into OMAP framebuffer for displaying

I am intentionaly leaving gst-dsp aside, AIUI it does not do memory copy, thus no performance loss.

The problem is that for 1280x720 the frame size is about 2 MB and that should be copied fps times every second, leading to big performance loss. Even for lower resolution there is still a big amount of memory to be copied (because of higher fps), leading to choppy video and lower fps.

The solution to this is to give the camera driver buffer, which is a part of the framebuffer, so when capturing of the frame is complete , the data would not need to be copied , fb driver only needs one ioctl telling him where new frame starts. So no memory copying (i.e. zerocopy) of frame data.

Unfortunately our kernel is not grown enough to support that, so I am preparing a patch to overcome the limitation.

In addition I added XOverlay support to gst-omapfb (thanks again felipec). Will add support in camera-ui for gst-omapfb when it seems stable. And I plan to modify gst-dsp in such a way that it will support both stock and Harmatan DSP binaries.

By combining zerocopy with gst-omapfb i expect a HUGE difference in video smoothness/fps/battery consumtion while recording. Initial testing shows that MAYBE smooth 1280x720@30 is possible.

hadjistyllis 2011-12-21 14:28

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by knobby (Post 1139160)
I don't agree here...i've n900 with 2204 revision and running comfortably without any reboot loop at..
Code:

720:45,480
805:49,520
850:52,560
900:54,600
950:57,600

vdd1=0 and vdd2=0

P.S.. i seldom go above 850 MHz...these results i just remember from previous tests conducted to find out the most stable settings for the recently introduced pali's kp49 and freemangordon's hd work (for which i am highly thankful to them)...
and reboots are b'coz some devices cant handle higher dsp rates at lower frequencies imho (mine is 1 of 'em)

Even at stock dsp is sometimes unstable with lower voltages.
increase voltage at lower frequences and check with higher dsp as see how much stable is.
I run always at 720:600 without reboots with vdd1 & vdd2 enable. VDD gives more battery life even if you lower the voltage to very low.Also run stable until 1100:600 without problem if you disable VDD1. Incrasing voltage solve overclocking problem over 900.

vi_ 2011-12-21 14:43

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by freemangordon (Post 1140397)
No, you should build it from sources, but please, do not distribute the .debs, I hope next CSSU update will be soon and it will be there.

May I ask you to make a MR against my repo, to keep all the pieces together.

@all - I am about to finish a kernel patch against KP which will allow zerocopy DMA between camera driver, dspbridge driver and OMAP framebuffer(will explain what that means).

I think I found the reason for stutter in recorded videos. AIUI it is the memory copying between different elements in gstreamer pipeline. The recording process is similar to the following(simple descrption):

1. camera(isp) driver captures a frame in an user supplied buffer
2. this bufer is send to all elements in the gstreamer video capture pipeline
3. xvimagesink (the previewer element) copies that buffer into OMAP framebuffer for displaying

I am intentionaly leaving gst-dsp aside, AIUI it does not do memory copy, thus no performance loss.

The problem is that for 1280x720 the frame size is about 2 MB and that should be copied fps times every second, leading to big performance loss. Even for lower resolution there is still a big amount of memory to be copied (because of higher fps), leading to choppy video and lower fps.

The solution to this is to give the camera driver buffer, which is a part of the framebuffer, so when capturing of the frame is complete , the data would not need to be copied , fb driver only needs one ioctl telling him where new frame starts. So no memory copying (i.e. zerocopy) of frame data.

Unfortunately our kernel is not grown enough to support that, so I am preparing a patch to overcome the limitation.

In addition I added XOverlay support to gst-omapfb (thanks again felipec). Will add support in camera-ui for gst-omapfb when it seems stable. And I plan to modify gst-dsp in such a way that it will support both stock and Harmatan DSP binaries.

By combining zerocopy with gst-omapfb i expect a HUGE difference in video smoothness/fps/battery consumtion while recording. Initial testing shows that MAYBE smooth 1280x720@30 is possible.

Is it wrong this gives me an epic boner?

xes 2011-12-21 17:04

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by freemangordon (Post 1140397)
No, you should build it from sources, but please, do not distribute the .debs, I hope next CSSU update will be soon and it will be there.

May I ask you to make a MR against my repo, to keep all the pieces together.
.

..make a MR? Sorry, what do you mean?
The latest lib that i attached has been built with you latest sources (sync yesterday) from:
https://meego.gitorious.org/~freeman...mo5-hd-patches

-camera-ui-
WOW great news! ...I'll wait for the release of this new updates.


Thanks...

don_falcone 2011-12-21 17:22

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by PartyboyXP (Post 1140376)
Please build it in .deb :(

Do it yourself, using stock gstreamer0.10-dsp package and it's control files as template. Hint: extracting a .zip archive is way easier for you. At least it should be.

ammyt 2011-12-21 18:05

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by PartyboyXP (Post 1140376)
Please build it in .deb :(

Why not to learn something new?
Oh...my....god....
Why does this frickin' happens to me all the time? I am not frequently opening this forum, and it happens that I am missing all the fun!
So...much...advance...can't...handle....
freemangordon, you do not deserve a beer, at all, but a whole wine factory next to your place!

karam 2011-12-21 18:44

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
1 Attachment(s)
Guys i have compiled new libgstdsp(s)
with quality 100
after testing with 97 and 100 i found that there are no much differences with image size but there is comparing to quality 90 (default) 800kb >~ 1.5mb
and there is an improve with image quality

HOW TO:

Download the attachement to MyDocs


1-) To install with the stock dsp libraries (no 720p) patches
Code:

sudo gainroot
tar xzvf MyDocs/libgstdsp.quality100.tar.gz
cp /usr/lib/gstreamer-0.10/libgstdsp.so ./.libgstdsp.so
cp libgstdsp/libgstdsp.so.stock /usr/lib/gstreamer-0.10/libgstdsp.so
rm -r libgstdsp

2-) To install with 720p dsp libraries
Code:

sudo gainroot
tar xzvf MyDocs/libgstdsp.quality100.tar.gz
cp /usr/lib/gstreamer-0.10/libgstdsp.so ./.libgstdsp.so
cp libgstdsp/libgstdsp.so.720p /usr/lib/gstreamer-0.10/libgstdsp.so
rm -r libgstdsp

TO REMOVE/REVERSE
Code:

sudo gainroot
mv .libgstdsp.so /usr/lib/gstreamer-0.10/

Hope this will helps someone

woody14619 2011-12-21 19:29

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by freemangordon (Post 1140397)
I think I found the reason for stutter in recorded videos. AIUI it is the memory copying between different elements in gstreamer pipeline.


If the only place it's copying is for the display, a quick verify would be to put a static counter in and only copy every 3 to 10th frame. That would lessen the copy consumption enough to see if it's the root cause, while giving the user a 10 to 3 fps view (which is more than enough for general "point the camera at the target" done while videoing).

The solution you're proposing is of course the better method, but will take more time and hacking vs something like:

Code:

static char s_tick_count=0;
...
if ((++s_tick_count % 8)==0) DoBufferCopy();


freemangordon 2011-12-21 23:02

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by woody14619 (Post 1140498)
If the only place it's copying is for the display, a quick verify would be to put a static counter in and only copy every 3 to 10th frame. That would lessen the copy consumption enough to see if it's the root cause, while giving the user a 10 to 3 fps view (which is more than enough for general "point the camera at the target" done while videoing).

The solution you're proposing is of course the better method, but will take more time and hacking vs something like:

Code:

static char s_tick_count=0;
...
if ((++s_tick_count % 8)==0) DoBufferCopy();


I will keep that as a plan B (if I am unable to do the kernel patch)

xes 2011-12-22 00:06

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by freemangordon (Post 1140557)
I will keep that as a plan B (if I am unable to do the kernel patch)

In fact... maybe only an impression but often it seems that it is the camera preview to use all the resources.

It would be interesting to add a setting to remove completely the preview and replace it with a recording timer and a counter for dropped frames ...just for testing purposes.... or at maximum a pair of frames per second.

Estel 2011-12-22 03:36

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by xes (Post 1140448)
..make a MR? Sorry, what do you mean?

As far as my coding experience goes (~0), this mean merge request.

A nice Mr monkey, that sits in some forgotten Kloster, and hand-rewrite source code, to contain original content modified with your patches. Or at least, that is what non-coders tells their children as story for goodnight ;)

freemangordon 2011-12-22 07:18

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by xes (Post 1140569)
In fact... maybe only an impression but often it seems that it is the camera preview to use all the resources.

It would be interesting to add a setting to remove completely the preview and replace it with a recording timer and a counter for dropped frames ...just for testing purposes.... or at maximum a pair of frames per second.

What I've done is to remove memcpy from gst-omapfb(it is easier than removing preview from the pipeline), the difference is HUGE. That is why I am trying to do it right way.

Dersonne 2011-12-24 00:39

Re: camera-ui2 testers neede
 
Sir,please help me.how to uninstall camera -ui2 update from freemangondon to revert back to nokia stock camera ui.im using a CSSU stable.whats the package or Deb file of stock camera ui.thank you

gepataki 2011-12-25 18:46

Re: camera-ui2 (now a part of CSSU) (updated 09. May)
 
Quote:

Originally Posted by nicolai (Post 1139919)
@mohammad
isn't dspjpegenc the default in gdigicam.conf?

@v_
the gstreamer plugin dspjpegenc doesn't support a quality property.
(if you have gst-tools installed, you can view details about an plugin
with f.example: gst-inspect dspjpegenc ).
So, settings the quality option in gdigicam.conf isn't used.

Nicolai, is it possible to reload the "old" version of camera ui? i mean witch was in the ssu testing? i upgraded to stable, but liked the color-canging possibilities so much...(bw, sepia..)
is a step-by-step version of it?
thx!!
gepataki


All times are GMT. The time now is 23:25.

vBulletin® Version 3.8.8