EffectEngine: Effects stutter if smoothing is disabled

  • @redPanther
    Is there a internal limit which leads to a lower framerate then 25fps/30fps?
    We should higher the output of the effectengine.


    Every device should handle the max rate on their own.


    -> My APA102 stutter noticeable without smoothing

  • Hi,
    as I understand the code, there is no "framerate" for effects.


    when you send "setColor" or "setImage" to hyperion core (doesn't matter from where you send, python-effect, proto, json, grabber). It will update the leds according your command once a time immediately. If you not send any new command, leds won't be updated.


    the grabbers have constantly new data, this will send directly to hyperion. Because video signals have some defined constant rate, we will get leds constantly updated -and of course there are options where you can limit fps to fit it toyour needs.



    with effects there is another situation. They don't neccesaily produce new frames in a constant rate. Example: the xmas effect switch between red and white pattern. there is a "sleep" between the change. If sleeptime is low our eyes will smooth the colors. if sleeptime high, framerate drops and we will notice the hard change more strongly. The effect should not "sleep" it should produce intermediate frames (like I does in the cinema lights effects)


    When smoothing is enabled, the setImage/setColor commands are decoupled from output (we discoverd that in another discussion) and smoothing will generate intermediate frames in a constant rate.


    as effect developer it is to much overhead to maintain constant fps and intermediate frame generation.


    -> solution is, activate smoothing, this is exactly for that situation.


    I have a hardware that does smoothing, so I switch smoothing of -> thats another solution ;-)


    hope that clears the thing a bit


    cheers

  • In last line in the loop there is a time.sleep. this loop will generate the frames. Fps depends on sleep time.


    Other reasons:
    in rainbow the increment between colors is calculated and depends on the rotation time and the leds you have the rainbow will be more smooth or not.


    performance - perhaps python effects are less performant and scheduling interrupts the effect to much.
    I wrote a small profiling class to measure execution times in the code (in my logging branch). When I'm done with my logger I will have a look and use the effects as my "code under test"

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!