yashsingh1/xdaforums huggingface dataset:
[One (M9) General] hamdir:
Success!! Its working perfectly I tested in indoor light, iso400 and 1600, its working amazing difference :)

I restored all the original tk lib files and then flashed the two files from first section, for people who want to try this, remember you will need to renable HW denoise so remove the QCWBR line from build.prop since we are fixing HTC's s810 HW denoise instead of disabling it

One thing left to do my friend before we package this in a zip file, can we implement it to HDR lib file as well? HDR is the biggest victim of smudging on M9

Do I still need to try the other sections? Will the results differ?
[One (M9) General] defcomg:
No need to try the other section .

Yes i can do it for all the other libs including front camera.

I know sensors differ but now that we know it works you could use Noise Reduction Profiles from any other QCOM device .

will maybe try Kill ABF and Along with ASF should gain some more details.

EDIT

[MENTION=1144067]hamdir[/MENTION] HDR and Night CPP with hex workshop bookmark
[One (M9) General] hamdir:
No need to do more libs mate

also the front camera is better to be left stock as its the 3rd gen UP implementation from HTC and perfect as it is, it has a huge pixel so it doesn't suffer as bad from denoise

Thanks for new cpp I'll test them as well
[One (M9) General] defcomg:
cool :good:
[One (M9) General] hamdir:
Also I'm not sure about killing more stuff, the M9 sensor has a real tiny pixel and suffers from noise so I'm not sure if killing more filters is a good idea, wait till you see my results tomorrow

[MENTION=377973]defcomg[/MENTION], Night mode works but HDR is broken, its freezing :)
[One (M9) General] defcomg:
that's strange i rehexxed the lib make sure its not the permission

iv'e checked the lib in IDA shared object integrity is not broken
[One (M9) General] hamdir:
Its working now thanks :)
[One (M9) General] acidspider:
Looking forward to this
[One (M9) General] Mostafa Wael:
[MENTION=377973]defcomg[/MENTION] [MENTION=1144067]hamdir[/MENTION] so now we have a fully working denoise in auto, night, HDR modes with no smudging and no visible noise, as well as the front camera being perfect as it was ?! That is miraclous !!
[One (M9) General] hamdir:
comeone mate its not magic, no what we did is remove color noise while keeping the luma noise

remember when you disable HW denoise via build.prop and switch to SW denoise you end up with a kind of weak denoise with both luma and color noise evident

the new thing is using HW for color only, so luma noise is there but color noise is not, you guys might not like it but for pixel peeps its still a better more detailed image which you can denoise on your own later with PSX, keep in mind that the daylight gains are huge as you will finally get rid of the muddy bleeding JPG image with weird colors of the M9

anyway before anyone gets over excited just wait for my photos
[One (M9) General] tessut:
Which build.prop lines should be deleted is all 3 right ?
[One (M9) General] defcomg:
Should you want to adjust the lib further [YOUTUBE]P_j7RLP5NDg[/YOUTUBE]
[One (M9) General] throcker:
so, is there any "universal" setting suggested to anyone? I played with build.prop strings but that noise scares me
[One (M9) General] OGhoul:
I'm excited to put this up against my iPhone 6S+ once you two geniuses get it to a "flashable for the masses" state. :)
[One (M9) General] OGhoul:
To be clear, should we remove *all* of build.prop tweaks mentioned previously in the various camera threads, or just this line (persist.camera.qcwnr.enabled=0) ?
[One (M9) General] hamdir:
you didnt have to quote a huge post like that ;)

remove:

- persist.camera.snap.format=0

- persist.camera.snap.format=1

- persist.camera.qcwnr.enabled=0

this one is up to your taste: (motion blur vs weird ghosting)

- camera.eis.enable=0

useless: (has no effect when using HW denoise)

- persist.denoise.process.plates=x

[MENTION=1779752]m4jkee[/MENTION] OP will need a major clean up and rewrite :rolleyes:
[One (M9) General] OGhoul:
Fixed. ;)

So camera.eis.enable=0 would result in motion blur, correct? I think I'd rather have that sort of artifact that we're used to, than ghosting.
[One (M9) General] m4jkee:
I`ll jump on it during the weekend. Or tomorrow morning (Europe morning) :)

Thank you for testing and reviewing. ;)
[One (M9) General] OGhoul:
https://flic.kr/s/aHsknjPhdR

There ya go. A to B comparisons.

Edit: I'm flipping through them now as time allows, and I have to say, I didn't know that the M9 was capable of such great shots (so far). Bravo to you guys.
[One (M9) General] defcomg:
i believe there may still be more details that can be pulled from the M9 once i turn off Chroma Filter and ABF.

On My device what i did was Turn off these Post Process stuff then enabled some feature called bright region which over exposes the image by a little bit then i modified the HDR Mode to only recover highlight data.

There is another Feature called Luma Adaptation which acts kinda like the highlights and shadows slider in Lightroom i set it to recover some shadow data and highlights from the raw data within the isp. So Now HDR Permanently on the final image vs how the stock cam are worlds apart OEM's simply don't calibrate these devices properly
[One (M9) General] OGhoul:
Amazing. One thing I've noticed is that the iPhone was consistently more accurate with color reproduction. Is that something you can wrench on as well?
[One (M9) General] defcomg:
This would require proper calibration but they maybe a work around.

The Calibration is stored in the with suffix name common but in the snapshot lib theres CCT Profiles/White balance profiles.

These values work on dcraw so we could take pure bayer raw files load it into dcraw/freedcam Image Viewer then using the profiles stored in the snapshot correct the color. then get an image of a grey patch card then run the auto color correction get the calculated colors copy them back into the snapshot file.

theres also some other config called Color tint correction

the below option seems simpler from what i see in the images on flickr it seems like its a just a hue shift

/******************************************************************************/
// Feature name: Color tint correction.
// Applicable chipset(s): ALL with color tint correction.
// Applicable operation mode: color tint correction feature turned on.
//
// Variable name: tint_correction_mode.
// Select the mode of color tint correction.
// Default value: 0.
// Data range: 0 or 1.
// Constraints: Boolean type (0 or 1).
// Effect: Mode 0 works for most cases, it has short latency and reasonable accuracy.
// Mode 1 has higher correction accuracy but with longer latency.
//
// Variable name: tint_correction_strength.
// Control the strength of color tint correction.
// Default value: 4.
// Data range: 0 or 10.
// Constraints: Default value is highly recommended.
// Effect: Increasing this number will increase the color tint correction strength meaning
// more severe color tint can be corrected, but it may desaturate some colors when it’s too high.
//
// Variable name: tint_correction_accuracy_degree.
// Control the accuracy degree of color tint correction.
// Default value: 8.
// Data range: 1 or 16.
// Constraints: Default value is highly recommended.
// Effect: Increasing this number will increase the color tint correction accuracy. However,
// when the setting is too high some trailing color tint may happen for video or viewfinder mode
// when camera or objects move.
[One (M9) General] OGhoul:
I apologize that I can't offer more a more technical description than the M9 seems undersaturated and washed out compared to the iPhone, and that the iPhone is near spot on to what I'm viewing with my naked eye.
[One (M9) General] defcomg:
i see on is there no saturation option on htc camera?
[One (M9) General] OGhoul:
There is, however my tests with it (before today's tweaks) didn't result in accurate color, just more intense color.
[One (M9) General] hamdir:
Just keep in mind that the iPhone has auto HDR by default, so its not apple to apple comparison
[One (M9) General] OGhoul:
Correct, which is why whenever it was used, I shot again with it disabled. :)
[One (M9) General] hamdir:
Did you at least notice the much greater detail coming from M9 though @ 1:1
[One (M9) General] OGhoul:
Easily. The difference between these tweaks and how the camera was shooting yesterday is night and day. This compared to base 2.10, 1.40, or 1.32 would be astounding.

I haven't been able to pixel peep (because I'm at work) but the paint daub/water color effect does not appear to be there anymore.

:highfive:
[One (M9) General] hamdir:
Though the luma does need a little bit of denoise and not more detail :D there M9 is already drooling with detail and we are reducing them :) I will try (but I don't promise) to understand the tutorial video you posted in order to tweak it a little
[One (M9) General] hamdir:
Honestly I'm looking forward to check your photos tomorrow on my workstation, I didn't get the chance to test it outdoor and you provided the perfect samples

I actually meant that its offering greater detail than the iPhone
[One (M9) General] Mostafa Wael:
[MENTION=5224400]OGhoul[/MENTION] [MENTION=1144067]hamdir[/MENTION] [MENTION=377973]defcomg[/MENTION]

Concerning the "washed out" and weak color production problem, can't we bump up the saturation to +0.5 or +1 ?!
[One (M9) General] defcomg:
the long and cortrect way http://wenku.baidu.com/view/b8b932cb941ea76e58fa0476.html?from=search if only one could find chromatix tool
[One (M9) General] japjaan:
Definitely more detail!

edit: made a mistake
[One (M9) General] hamdir:
[MENTION=6190374]japjaan[/MENTION]

WRONG :)

the moment i saw your photo i've realized that you did something is wrong, so i downloaded it to double check the EXIF

you didnt not cap the ISO at 400, the photo was taken at ISO1600 hence the horrible noise

it's essential to cap the ISO with this mod otherwise don't use it

please amend your post so you dont confuse others, your photo is ISO1600
[One (M9) General] japjaan:
Thanks for noticing.. lets see what went wrong then. I always load the "awesome xda camera" and i set max iso 400 in the preferences. I'll try again tonight, thanks
[One (M9) General] hamdir:
whats the awesome xda camera? these mods are for the HTC camera app

i already took low light food photos and photos at the mall with the mod or the sw mod, the results are highly usable

here we have two photos with the old SW mod (persist.camera.qcwnr.enabled=0), the HW mode would have given an even better result

and here are some samples with the HW mod, lazy shots last night as i was testing it in low light, highly effective as long as you cap the ISO to 400

this is a phenomenal upgrade over the ****ty stock HTC auto mode quality especially in low light, in fact the M9 camera is now perfect except in two areas: lack of auto HDR and the lack of OIS, as in low light it's still very hard not to motion blur your image
[One (M9) General] japjaan:
Very nice!

That's just how I saved the custom camera settings, you know, Medium 10:7, Sharpness -1 etc..
[One (M9) General] hamdir:
refresh my post

if you dont see the MaxISO400 cap on your viewfinder it means there is something off
[One (M9) General] japjaan:
Yep, awesome! I will try again tonight, probably saved the wrong settings or something.
[One (M9) General] hamdir:
about motion blur, the only best solution for motion blur in low light at the moment is to take multiple shots, one of them will always stick, i personally made a habit out of it

otherwise we need to stabilize the phone on a surface
[One (M9) General] OGhoul:
I just saw your post in the Megatech thread, and I have to say that I'm floored. I didn't expect that result. How is noise in darker areas though?
[One (M9) General] hamdir:
[MENTION=377973]defcomg[/MENTION] i watched the video you've posted, now i know how to load the bookmarks and locate the table, but i have few questions:

- when copying the saved table, you started dragging inside the CCP file from Enable SW420 line and not from the top of the bookmarks? (in order to paste, minute 2:29)

- which values should i touch in order to increase the luma denoise just a little? i saw you locate few float places in minute (3:50) but i am little confused on how exactly to change the value

---------- Post added at 01:24 PM ---------- Previous post was at 01:11 PM ----------

this: http://xdaforums.com/showpost.php?p=63327902&postcount=30488

you are floored even though what we are doing in the recommended settings is to lower the detail :laugh:

i am recommending medium plus sharpness -1 to reduce the exaggeration of the luma noise, however the M9 is able to destroy the iPhone in full detail, because we have a 20MP and a surprisingly excellent sharpness algorithm

so i hope we can tweak the luma denoise a little more to go back to 20MP
[One (M9) General] OGhoul:
I guess I thought we'd never be able to overcome what HTC broke (for whatever reason). I also noticed that the information was passed on to HTC. That's awesome.
[One (M9) General] defcomg:
do you have team viewer installed ? it would be much easier to watch live
[One (M9) General] Mostafa Wael:
Man the M9 is just awesome now!! Thank you guys for the phenomenal work :)

Keep it up!
[One (M9) General] hamdir:
yes but its my job's workstation i can't give access to it
[One (M9) General] defcomg:
pm sent
[One (M9) General] japjaan:
Tested again [MENTION=1144067]hamdir[/MENTION] result is amazing! Thanks a lot. Unfortunately there is no way to cap iso in hdr afaik?
[One (M9) General] davidtm0:
Sounds very exciting! This may be asking too much, but is there any way we can get HTC to incorporate these changes for us non-rooted folks?
[One (M9) General] hamdir:
Probably not as HTC can not get away with extreme noise at high iso, people will nag and cry
[One (M9) General] l7777:
How hard would it be though to scale up the NR at high ISO and back down for low ISO. As a person who's done some development I find it extremely lazy to use a one size fits all approach to things like this. If you don't want to program it automatically then how about just giving control of the NR and other post processing things to the user. Mind boggling that their testers accepted a product that had end results like the default. This isn't just a problem with HTC either. I've had plenty of products that I couldn't believe were released to the public with such glaring issues.
[One (M9) General] m4jkee:
sorry guys. didnt have time to update op. got some weekend family stuf. but definetly, on monday we will have proper op. once again sorry for being late :(
[One (M9) General] muayyadf1:
That's the differece between HTC and other top phone camera makers. You just can't serve oversized meals to everyone. It shouldn't be hard to make different levels of NR when you already have levels of ISO. It should follow the same principal. HTC is really lazy when it comes to camera software. we have seen that in every flagship release. There is always an update to fix camera problems. Makes me wonder what is their procedure in testing before release. If they are comparing results with previous HTC devices, they are doing it wrong. They should copy camera performance of the iPhone next time. Not just the design, lol. Let's hope they use OV's new 13 mp sensor with larger pixels in the A9. At least noise should be less.
[One (M9) General] hamdir:
Look every OEM including apple takes time to improve the software side of anew sensor

Apple will surely impress you more next year when they reuse the same sensor but optimize it better

HTC did the same from M7 to M8, the M8 didn't need software updates

Also the only flagship where HTC wawed us in camera was the One X, they went the extra mile

Anyway the problem is that this year it's all mishmash random sensors for HTC

Finally I have a feeling that the denoise issue is coming from Qualcomm as they are badly advising the values

I saw the internal memo which led to 1.40 update HTC themselves said there is lack of detail and its water paint, the software team responded by making an excellent sharpness algorithm but still kept the insane denoise, the fix was verified by Qualcomm, sadly Qualcomm is advertising their "ground breaking" denoise, so their focus on killing the grain and I guess they would blame the sensor for the noise which led them to squash it this way

..its a vicious loop of conflicting interests
[One (M9) General] s7icky.com:
F_VIDEO=1920x1088,1280x720,960x544,800x480,768x432 ,720x480,640x480,480x320,352x288,320x240,176x144

needs to be

F_VIDEO=1920x1080,1280x720,960x544,800x480,768x432 ,720x480,640x480,480x320,352x288,320x240,176x144

1080 not 1088
[One (M9) General] muayyadf1:
Still, HTC is not a small or new smartphone maker. They were used to be the benchmark of cameras. They have eyes and brains to see and decide if a solution is working or not. The M8 was the last device which they fully tested before release and it was also the most leaked about which could be the reason of rushing the release of the M9. Let the public know before release but make something successful like the M8.
[One (M9) General] acidspider:
With regards to colour. How difficult would it be to have setting for custom White balance
[One (M9) General] troopii:
M9 cam itself support wbcct. But htc app not ??
[One (M9) General] richierich:
Would just like to say a HUGE thank you to all the devs who worked tirelessly to improve this camera, as it was a huge disappointment when first released, but is absolutely fantastic now. As a photographer I can appreciate the level of work that has gone into it, and since installing this mod, I've been shooting like mad with it. What with a new baby boy in the house, this is just timed to perfection. Yes its still not perfect (what camera phone is???) and yes, perhaps further improvements could be made, but I just want to take some time to appreciate what we have here now. Keep up the good work guys, its nice to see the spirit and endeavour of xda-developers still doing what it was originally set up for, working together to make things better!!

RR
[One (M9) General] fmedrano1977:
Is this compatible with build 2.7.531.6, TmobileUS build? Camera app crashes with 4.9 shutter speed.

HTC One M9
[One (M9) General] m4jkee:
new week

OP UPDATED - I tried to make it more MODDY ;)

_______________________________________________________

Did you use manual import with attached libs or did you used HEX editor? Or did you used starbases flashable zips? Did you tried 3 seconds? Did it work? Or 4? Thank you for testing compatibility.
[One (M9) General] fmedrano1977:
Used the flashable Zip, only works upto 3.5

HTC One M9
[One (M9) General] Ajxx16:
Seriously awesome work guys. Thank you.

Just for clarification, are the buildprop tweaks not needed with the denoise mod?
[One (M9) General] m4jkee:
YES. Actualy denoise mod wont work with disabled denoise via build.prop. And since denoise mod is better than SW tweaks via build.prop, we dont need build.prop tweaks anymore :)
[One (M9) General] Ajxx16:
Sweet deal, thanks for clearing that up.
[One (M9) General] Digitalman:
I have a question, i see in the startpost the download link LE-ViperOne_3.50_2.10.401.1.zip. I assume it is for users who are running ViperOne 3.50 rom but what does this zip do when installing?

Do i have to install it togther with Hw denoise mod and exposure mod?
[One (M9) General] m4jkee:
LE-ViperOne_3.50_2.10.401.1.zip is for manual setting Long Exposure. Before we have flashable zip. In this thread are 2 mods. One is for hw denoise and second is for long exposure. You dont need any of those tweaks to get worked another one. Its all matter of choice. If you want hw denoise or long exposure or both. Its up to you. Please follow install instructions. :)
[One (M9) General] OGhoul:
Silly question.

Are both of these flashable at the same time? (In other words, one won't overwrite the other's changes?)
[One (M9) General] hamdir:
Just a small remark: only EIS disable can be used with this mod, I personally prefer it off over the weirdo EIS effect of HTC

Also SW denoise might be preferred by some for better color accuracy at the expense of color noise
[One (M9) General] m4jkee:
OK, I`ll add old build.prop tweaks into OP tomorrow evening.. but still I think this is more easier and better than stock. More amateur user friendly :) But still.
[One (M9) General] OGhoul:
I'd still say that it's leaps and bounds better than the build.prop tweaks. Also, are we still setting resolution to Medium?
[One (M9) General] hamdir:
Yes sharpness -1 and medium, the idea is to reduce the luma noise a little
[One (M9) General] defcomg:
try these see if any lets you go past 4 seconds
[MENTION=456666]starbase64[/MENTION]

trying to bypass some htc code thats used to set intergration time
[One (M9) General] fmedrano1977:
I tried all four, they all snapped quick photos even after setting shutter speed at 4.9

HTC One M9
[One (M9) General] Digitalman:
[MENTION=1779752]m4jkee[/MENTION]: Thanks for your quick answer. Mods work like a charm!
[One (M9) General] brittoking:
I apologize if this is an uneducated question but as I have twins under a year old and a 3 yr old toddler my camera is extremely important to me so id rather look foolish asking a question than miss out on a permanent memory with any of them (and yes I have made a twrp Backup of course but you never know with kids when that awesome photo op will present itself!). That being said I have installed the denoise mod/set my settings to the recommended #'s and LOVE IT! I'm interested in trying the longer exposure mod but I'm unclear as to how that one is actually used or activated? Is it always on? Or only on a certain photo mode to capture the longer exposure? Thanks in advance and thanks again for revitalizing my camera!!
[One (M9) General] m4jkee:
Long exposure is shutter speed. You can set it in manual or RAW photo mode. If you want to take long exposure picture, I recomend RAW. Its better than manual. You can edit the raw file (.dng) in photoshop express and even if you only open the file and save it to galery (it saves as jpeg), you get much more detailed picture, than in manual mode.

So there are no wories, you can still take pictures of your kid via auto mode. Long exposure is good to be used at night, on tripod (must stay without any move). For example here is a long exposure night shot.
[One (M9) General] brittoking:
Much obliged and thank you for such a detailed response. Downloading and flashing now! Thanks again
[One (M9) General] LLegion:
actually i was about to ask the same, now i have the answer thanks so much for it!!! =D
[One (M9) General] fmedrano1977:
What exposure setting did you use on that pic?

HTC One M9
[One (M9) General] LLegion:
I have to express the same, you ARE awesomeeeeeeeeeeeeeeeeeeee!!!!
[One (M9) General] m4jkee:
That photo was taken on old base (2.7....) and it was 4,9 ... ISO about 400 if I remember it right. But anyway its edited via photoshop express. ;) But you guys should definitely try it at your own at night. Dont forget to put phone somewhere still. :)
[One (M9) General] fmedrano1977:
Yeah, I'm running the Tmobile US 2.7 but can only go upto 3.5, any higher and the camera crashes. I've tried at night, definitely like the results.

HTC One M9
[One (M9) General] OGhoul:
1. Can the original post be edited to include the date of the files attached?

2. Can both mods be flashed and both work at the same time?
[One (M9) General] defcomg:
thanks for testing

it might be possible to bypass it as seen with test libs they break the manual expo but will require some logcat

will post some build.prop lines to enable camera libs logging later. :good:
[One (M9) General] m4jkee:
1. Why you need date? files attached in OP are tested and if you would click on some links in op, you would find original posts where those files were attached ;)

2. Mods work together, because long exposure is ONLY and ONLY for MANUAL and RAW mode. Its logical, because in auto or HDR or selfie or whatever, you dont have an option for setting shutter speed ;) Hardware denoise mod is for auto, hdr and night mode.