To Flicker or NOT to flicker…

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…)
[01] 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…?)
[01] 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.
[02] Again you attack without knowing half the story…
[03] Yes, “very bad solution” but the only one available up until now…
[04] “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?
[05] And again… it seems you are judge jury & executioner and the beholder of the one & only truth…

Mr. @jcadduono
[DELETED] I’m still waiting for the EFF to come knocking my door & force me to give up everything…. (One of those LOL moments)!
[02] I think proper education and asking nicely will get you a lot more in life than bullying…
[03] Again with the useless bullying…
[04] Ask politely and you shall be given…
[05] DOH!…. LOL…wait wait… LOOOOOOOOOOL!!!!!!!!!
[06] 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.

HOWTO

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 FiX
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“.

You may also like...

9 Responses

  1. kopitalk says:

    Glad that you keep your cool amidst such bad circumstances on your part… and still coming out with the publicity of the coveted “fix”… man, you can just forget about those people!!! But I guess your value is higher than that… kudos for your dedication!

  2. rin says:

    Thanks to you sir….. I see how everyone kinda forgets that there not to expect service & should remember it’s a development community & so many things if not all, is what decent xda members who have taken the time out of their personal life, have created…..

    Many thanks…..

    Very happy note 3 user right now….
    Flashjunkie83

  3. Very nice post. Internet is a place where you can’t slap someone for his misbehaviour and he can’t forcefully take anything from you. Being polite is the best way to be online. Those guys was probably some kids or childish adults. Patience and calm comes with age and experience.

  4. Ehsan Ahmed says:

    Bro when is the new kernel cuming out?

  5. Mike B says:

    @CeKMTL:
    My “fix” was simply using the N3 camera on the N3 (even in ported N5 ROMs), which works wonders, as expected. Your post should put the “flicker” matter to rest, but it probably won’t because the whiners are typically too busy complaining to find time to read. You still care way too much about what people on XDA and anywhere else say. 😉

    @hsan Ahmed:
    We all want to know but we don’t ask. It’ll be ready when it’s ready.

  6. i_guana says:

    Is there knowledge clarifying whether or not the Note 4 suffers from this problem?

%d bloggers like this: