moonlight-android icon indicating copy to clipboard operation
moonlight-android copied to clipboard

About MediaTek Breguet 8100 hardware decoding delay

Open zxc3123857948 opened this issue 2 years ago • 8 comments

The soc of my tablet is MediaTek Tiangui 8100, and its latency is much higher than my phone's Qualcomm Snapdragon 870 when using hardware decoding h264, the decoding latency of Qualcomm Snapdragon 870 is only 5-8ms at 40Mbps bit rate 1080 resolution, but MediaTek has 20-25ms latency, is there any solution?

zxc3123857948 avatar Jan 23 '23 01:01 zxc3123857948

I have a similar problem with mediatek g99 (Infinix Note 12 2023). Decoding time 1080p 60 20mbps - 35-40ms. Image twitches, even if you select the maximum smoothness in the settings. Input lag seems to be higher. Using the steam link, I have about 30ms with the same video parameters with a smooth image and almost imperceptible delay.

svishchev avatar Jan 28 '23 17:01 svishchev

Have you tried both with HEVC enabled and disabled?

cgutman avatar Feb 20 '23 18:02 cgutman

HEVC enabled and disabled?

Yes. I also tried using Parces where there was a 6-8 decode delay and a smooth image. I really want the same results in Moonlingt

svishchev avatar Feb 27 '23 03:02 svishchev

I have MediaTek Tiangui 9000, same problem

moonlight: 20-30ms latency parsec: 5~8ms latency

think2011 avatar Mar 25 '23 09:03 think2011

I found out that it is not possible to set low latency mode for the c2.mtk.hevc.decoder. It looks like there is no option in MediaCodecHelper.java that is suitable for our decoder (if we completely clear the "setDecoderLowLatencyOptions" function, the result does not change). Also in the "findKnownSafeDecoder" function, the decoder is defined as not supporting FEATURE_LowLatency. At the same time, in Parsec and SteamLink, the delays are many times less and work perfectly (they also use c2.mtk.hevc.decoder). I hope there is a way to reduce latency on our devices. Infinix Note 12 2023 (Android 12).

svishchev avatar Jul 03 '23 04:07 svishchev

I have the same issue on my OnePlus Nord 3 5G (Mediatek Dimensity 9000), I get around 30 ms of decoding time regardless of resolution, FPS or bitrate. On my Sony Android TV, which also has a (I definitely think way less powerful) Mediatek SoC I get a fantastic 3 ms. On the overlay I see that the OnePlus uses the c2.mtk.hevc.decoder, while the Sony uses the OMX.MTK.VIDEO.DECODER.HEVC

ktm-91 avatar Aug 24 '23 10:08 ktm-91

Same issue here. Parsec decoding latency is far better than moonlight, just curious if there is any low latency options or code is hidden and we still didn't find out.

AceZero925 avatar Oct 11 '23 17:10 AceZero925

I think this is a duplicate of this issue: https://github.com/moonlight-stream/moonlight-android/issues/1241

There's more traction on it over there, i suggest we close this and track all these Mediatek specific issues over there. They seem to be related to the switch in newer android versions to use: c2.mtk.hevc.decoder instead of the good ol: OMX.MTK.VIDEO.DECODER.HEVC

The omx api had the magic flag vdec-lowlatency passed through via undocumented workarounds. Seems we need to do the same workaround for the new decoder: c2.mtk.hevc.decoder . It seems like parsec has successfully done this as all these devices with this problem appear to have good parsec performance but poor moonlight performance for the same decoder.

peacepenguin avatar Nov 15 '23 22:11 peacepenguin