Author |
C901 camdriver modded |
cyloh Joined: Sep 08, 2009 Posts: 9 PM |
Here's my modded camdriver for c901.
Original colors
Modded
Changes for v0.4:
- A little programming blunder on my side created a bug that would cause overexposure. Fixed.
Changes for v0.3 are:
- Increased filesize for 5mp JPEG ( Roughly 98% compression -> 2MB )
- Better colors/saturation
- Some code changes around the driver
- Effective compression is Fine mode, selecting Normal or Fine in the camera makes no difference
Have a try and do post some pics or any issues.
Download here
[ This Message was edited by: cyloh on 2009-09-12 12:26 ] |
|
tranced Joined: Jan 19, 2006 Posts: > 500 From: Santo Domingo, wonDeRland PM |
can we see some pics?
|
cyloh Joined: Sep 08, 2009 Posts: 9 PM |
No pics yet. Will try to post some up next day. |
anouk82 Joined: Apr 13, 2009 Posts: > 500 From: Athens,Greece PM |
some comparison pictures between your driver and original one would be nice.Thank's |
code28h4p Joined: Apr 24, 2008 Posts: > 500 From: Republic of Indonesia PM |
Mmm...i see there was no different on both pictures.
There was some question here regarding your camdriver. How you count a jpeg compression? Because i think there is no need to increase file size without change its compression.
|
cyloh Joined: Sep 08, 2009 Posts: 9 PM |
Compare both the pictures. The floor, the face of that female model and also the box.
The colors are abit more.... vivid.
So far as my testing goes, the original camdriver had a variable compression ratio. Using Fine mode
sometimes its 93% sometimes even 90%.
Now mostly its 98%.
What I have found out so far today is....
Using #WRITE_REG(03,0B,??) should be setting ISO. It seems that there is no effect at all to this
one.
My cat (100% crop)
 |
code28h4p Joined: Apr 24, 2008 Posts: > 500 From: Republic of Indonesia PM |
cat photos looks good at 100% crop. But what i've found in yours camdriver in EXIF section, it seems like a wrong character goes there...(sorry if im wrong...)...please take a look at there....
|
cyloh Joined: Sep 08, 2009 Posts: 9 PM |
you mean in this section of code??
// Property 12, EXIF 2
//----------------------------------------------------
seq_get_prop_c =
$"CAMDRIVER0: seq_get_prop_c_begin"
#READ_REG(07,2F) $m3 4 // Q-value
$cf.03 1 $s2 01 $cx // flash
#READ_REG(07,2D) $m1 4 // subject distance range
#READ_REG(06,02) // white balance
$c4 01 // auto?
$s0 00
$cl
$s0 01
¦‰ $cx
$"CAMDRIVER0: seq_get_prop_c_end_%3_%2_%1_%0"
; |
code28h4p Joined: Apr 24, 2008 Posts: > 500 From: Republic of Indonesia PM |
Yupz...those line.
At 0.4 why are you remove forced flash feature?
Could you just tweak jpeg compression without change filesize?
About iso settings syntax there, i had told you before that it wasn't affect anything. C901's has drive me mad even you have succesfully rewrite it, i still didn't got its secret yet except add forced flash and increase filesize (nowaday i think it was wasteful to change filesize and buffering)
CMIIW...
|
cyloh Joined: Sep 08, 2009 Posts: 9 PM |
There is no way to increase % of compression yet.
Raiderski was right that any changes to the Q tables are useless... the camere uses variable tables.
Increasing the filesize will help in increasing the % of compression for now.
Forced flash has not been removed. I've moved it as a macro now.
No worries, the camdriver drives me nuts too. Still looking around and figuring things out myself. |
code28h4p Joined: Apr 24, 2008 Posts: > 500 From: Republic of Indonesia PM |
thats why i ask you before how did you managed to change compression levels. And how do you know that compression has changed by increasing file size? FYI, I did this way a long ago (Just a couple days after i've got this C901) and compare two shots (original and mine), and it seems nothing different even we look it at 100% cropped picture.
Remember, increase file size (without do anything) just eat more spaces in your memory.
I've tested your macro and still no forced flash there. Maybe it was removed...
CMIIW
|
cyloh Joined: Sep 08, 2009 Posts: 9 PM |
use a software like JPEGSnoop and you'll find out the compression levels.
I have a rough idea which i'll try implement soon. will drop the filesize back to the default values.
1.6mb is more than enough for 100% quality on 5mpix. I will test out further on how to bump up
the quality without changing buffer and file size.
I wonder instead of #WRITE_REG(03,0B,??) if we use #COM_INT(03,0B,??) it'll force the ISO values.
As for macro... I'm still a beginner here, which part of the code is for macro mode/focus? |
code28h4p Joined: Apr 24, 2008 Posts: > 500 From: Republic of Indonesia PM |
My pc was broken, so i couldn't see through camdriver for a while.
|
Goldmen Joined: Oct 07, 2007 Posts: > 500 From: Bulgaria PM, WWW
|
cyloh & code28h4p
Found a few interesting post
from Raiderski about K800 compression settings:
On 2008-10-03 15:59:51, Raiderski wrote:
guys, leave these compression settings. you will not squeeze nothing more from K800. moreover if you will stress out compression algorithm using too high values (big quality and file size) result will be opposite from planned (lower quality and small file size)
it's not possible to use 100%. of course you can always use higher value than 91% but you should remember about compression system:
1. rule #1: max jpeg file size
2. rule #2: jpeg quality
3. rule #3: both rules restrict each other
SE phones have variable compression, this means that final quality is calculated from 3 above rules. that's why your pictures don't have constant quality. variable quality is the result of fulfilled rules. ok, simple examples what can happen with 91% quality and 900kb buffer:
1. jpeg can be created with 91% and in ~900kb file
2. 91% is too much for ~900kb, quality will be decreased
3. 91% is good but file size will be much smaller than ~900kb, quality will be increased
results can be various. 800kb file with 75%-97% quality is nothing strange. now look at Goldmen's picture. he wrote that used driver had declared 100% quality, what happened in compression system? something like this:
- can I compress picture at 100% quality in ~900kb?
- no, increase compression and try again
- can I compress picture at 98% quality in ~900kb?
- no, increase compression and try again
- can I compress picture at 93% quality in ~900kb?
- no, increase compression and try again
- can I compress picture at 85% quality in ~900kb?
- no, increase compression and try again
- can I compress picture at 75% quality in ~900kb?
- yes
final result is 75% quality (according to EXIF). good conclusion...
of course we can force compression system to use very high quality but this will be useless. variable compression is really smart thing, no matter of what you won't force it to do impossibe things
On 2008-07-30 23:56:05, Raiderski wrote:
SE phones are equipped in very nice algorithm and great feature - variable compression. it is seeking the best quality % level. question: seeking? yes, this means that quality of all your pictures can be different (therefore name is variable compression). question: so, what for is 91% quality defined in driver? well, this is nothing more than simple tip for the algorithm, in this way it knows where to start process of seeking. question: ok, it knows where to start but where it ends? it's trying to predict jpeg file size with various combinations of quality % levels. predicted file size is then compared to jpeg file size rules (defined by modders in driver). if comparision will be positive then jpeg can be created, otherwise quality % level is increased (if predicted result is below defined file size rules) or decreased (if predicted result is above defined file size rules) for next file size prediction. question: does this means that defined file size rules in driver are major parameters? yes, they are, quality % level will be adequate to max file size we want to have. you can set in driver quality 100% but in fact this level of quality is unreachable in 900kb file (you can check this with EXIF readers). question: no matter of what can I set quality 100%? yes you can but for what? this is only initial stress for compression algorithm and it will blow out into dust your dreams about 100% quality
my observations:
- average file size is ~820kb (many folders, more than 100 files in each folder)
- average file size of shots with flash or low detailed scenery is ~680kb
so, I can push the rules a bit higher in next version. top quality range 90 - 95% in cameraphone? madness! with SE you guys are really in jpeg's compression heaven even if you don't believe
May be JPEG compression settings in C901 uses (almost) the same algorithm and here not major changes...
[ This Message was edited by: Goldmen on 2009-09-13 11:06 ] |
Raiderski Joined: Jul 03, 2006 Posts: > 500 From: Poland, Hell, Mountains PM, WWW
|
yes it is. you can play with parameters of compression (they aren't connected with Q tables defined in driver)
|
|