UnigramDev / Unigram

Telegram for Windows
https://www.microsoft.com/store/apps/9n97zckpd60q
GNU General Public License v3.0
3.84k stars 448 forks source link

Animated emojis have low frame rate #1692

Closed githubcatw closed 4 years ago

githubcatw commented 4 years ago

Hello. Animated emojis in Unigram have lower frame rate than in TDesktop. Unigram 4.0 (4991), Windows 10 v1909.

FrayxRulez commented 4 years ago

Mind specifying your hardware?

I'm afraid I can't do much more than running a timer every 33 milliseconds.

githubcatw commented 4 years ago

I'm using an HP OMEN 17 (2019) laptop

FrayxRulez commented 4 years ago

What about CPU usage during the stickers playback?

githubcatw commented 4 years ago

Haven't checked, will check and update now

FrayxRulez commented 4 years ago

Actually the 😂 sticker looks fine to me, just the 👍 looks broken, not only the framerate but as a whole, it even stops on the wrong frame.

githubcatw commented 4 years ago

To me the like one looked worse too.

githubcatw commented 4 years ago

Unigram was using ~2.5% (of ~30% total CPU usage) while rendering an animated emoji while TDesktop was using ~3.5% (of ~50% total).

FrayxRulez commented 4 years ago

To me the like one looked worse too.

Did you have the stickers panel open on the side with 60 animated stickers playing in the meanwhile?

githubcatw commented 4 years ago

I closed it, besides the group I was testing in has stickers disabled for normal users

FrayxRulez commented 4 years ago

Unigram was using ~2.5% (of ~30% total CPU usage) while rendering an animated emoji while TDesktop was using ~3.5% (of ~50% total).

So I guess it's really just the 👍. Did you check any other sticker before opening this issue?

githubcatw commented 4 years ago

I tested a few other emojis and stickers too, all of them have low framerates but more stable than the like

FrayxRulez commented 4 years ago

I am not sure if we're talking about the same thing, but in your videos 😂 sticker plays exactly at the same speed in Unigram and in TDesktop.

githubcatw commented 4 years ago

This might be because of my screen recorder recording at 30fps. The animated emojis and stickers were smoother in Desktop.

githubcatw commented 4 years ago

In 3.15 the animated stickers were as smooth as in TDesktop. This started happening in 4.0

FrayxRulez commented 4 years ago

I made a comparison of the two videos you sent: https://media.giphy.com/media/Urn1ydkCepkOgbObhY/giphy.gif

They look exactly the same to me.

githubcatw commented 4 years ago

It's because of my screen recorder. I rerecorded the videos with Game DVR and here you can see that Desktop is smoother.

FrayxRulez commented 4 years ago

But still 😂 looks completely fine. Unigram always played stickers at 30 fps rather than 60, this isn't a news. Ok, 👍 looks in slow motion and I can see this, but 😂 absolutely doesn't. They both take the same amount of time to play, this means that there's no issue there.

githubcatw commented 4 years ago

OK. This seemed new to me.

FrayxRulez commented 4 years ago

To be clear: slow motion isn't correct and it shouldn't happen, so if you're reporting that all your stickers play in slow motion then this is a real issue. But if it's simply about stickers "not being as smooth" this is expected, as 60 fps stickers are actually player at 30 fps, by skipping a frame. Now, at some point I would love to improve this, but I won't consider it a bug.