Hi and welcome everyone; I hope you will enjoy a few minutes of fun entertainment here! 😉
It seems, as of lately, there’s a drama going on about the Note5 to Note3 video recording “flickering” problem and, somehow, people are going desperate…
In these lines I’ll do my best to explain what this “Flickering-Gate” story is all about and how to “fix” it so all of humanity can move on and be happy (yes… sarcastic) but first I would like to express my point of vue on this and how it got blown way out of proportions.
About a month and a half ago, I had a select few of my Spanish beta testers try out ShinTo Kernel L09A08 for the 5.1.1 port of master @Darkera13 and they were saying that the rom had one nagging issue with the camera so they asked me if I could look into it.
I’m always strapped for time as I’m doing many different projects (most are not public) but I set aside 1 hour of time to look into it on a Sunday (!).
It took me around 40 minutes from initial hypothesis to final “fix” and 30 of those were invested going through logcat specific log (400 lines to understand the whole camera sequence).
Right after publishing L09A08 with the “fix“, @Darkera13 contacted me (Telegram) and asked me if I could help him out which I gladly did.
Up until yesterday, he’s been the ONLY person to contact me and (politely) ask me for the “fix“.
Good friends of mine over at xda pointed me to some of the most entertaining posts people have written against me and/or ShinTo Kernel :
Mr. @DaOldMan (Interesting conclusion you came up with…)
 Nope not angry but baffeled how ppl would trash talk about me & then tell me that it wasn’t me who came up with the “fix“; it went so out of proportions that even @Darkera13 himself had to intervene 3 times before some ppl would desist in their attitude.
Mr. @Bushido76 (You must be holding a serious grudge against me and/or ShinTo Kernel…?)
 What you express there against me/ShinTo Kernel is wrong on so sooo many levels… btw ShinTo Kernel was never part of xda and it will never be! Someone, who later became a great friend, opened a thread there asking some questions about ShinTo Kernel, I answered and it all snowballed from there.
 Again you attack without knowing half the story…
 Yes, “very bad solution” but the only one available up until now…
 “Warez Kernel” lol… so I guess you should also say that SAMSUNG ROMS are WAREZ as they don’t provide xda with the source code…right?
 And again… it seems you are judge jury & executioner and the beholder of the one & only truth…
[DELETED] I’m still waiting for the EFF to come knocking my door & force me to give up everything…. (One of those LOL moments)!
 I think proper education and asking nicely will get you a lot more in life than bullying…
 But…wait… Mr. @Bushido76 said it would be a “very bad solution” to do it kernel side…right…so?
Sad thing is that instead of contacting me & asking for help/guidance/”The fix“, these 3 gentlemen wasted their precious time on unproductive business.
Ok, so now for the amazing “fix“
First please go read this if you haven’t already as most of the hints for the “fix” were there if you know how to read between the lines 😉
Basically the “flickering issue” is a WRONG COLORSPACE YUV(V4L2_MSM_BUF_FLAG_YUV_601_709_CLAMP) sequence for the Note3 Hardware camera (but the correct one for the Note5 Hardware camera).
The Android (Note5) camera service is constantly sending this request.
When it is received & processed by the kernel, you see the image kinda like whiteish/washed out but after that it goes back to default which is the correct YUV colorspace:
Kernel receives the request for “V4L2_MSM_BUF_FLAG_YUV_601_709_CLAMP“ and switches to it:
-> You see whiteish/washed out image/frame (wrong YUV colorspace for Note3 Camera).
Kernel switches back to default YUV colorspace:
-> You see correct image/frame (proper contrast nice looking, etc).
Android Camera Service sees that and changes back to “V4L2_MSM_BUF_FLAG_YUV_601_709_CLAMP“:
-> Again you see whiteish/washed out image/frame.
Kernel switches back to default YUV….
REPEAT THE WHOLE SEQUENCE = FLICKER.
It gets more apparent when there’s a drastic change in luminance.
Ok, fantastic but tell me how to “fix” it!!!
Well…. there’s nothing broken in the kernel to “fix“ but as Note3 Hardware Camera doesn’t (ever as far as my tests went) use this mode, the “fix” is to basically avoid this mode altogether.
In your kernel sources edit “drivers/media/platform/msm/vidc/msm_vidc_common.c” & do a search for “V4L2_MSM_BUF_FLAG_YUV_601_709_CLAMP“.
You should find it around line 2557.
Comment out that conditional like in the screen capture below and that’s it…
You could of course make it as fancy as you want but for this I just like to follow the KISS Principle.
Recompile, flash your new shiny kernel and BE HAPPY! 🙂
“Flickering-Gate” I command you, BE GOOOOONE!!!!!!!
PS: The second person to ever personally contact me (yesterday) and ask nicely for the “Fix“is @Civato so I thought of writing this post here over at PreCog.me so he and EVERYONE ELSE can make use of it and focus on more important stuff.
PS2: Thank you for offering a donation for the “fix” but I humbly & in good conscience decline any such donation for the “fix“.