HermanChen / mpp

Rockchip MPP(Media Process Platfrom)
172 stars 72 forks source link

Support for 4K@50hz or 4K@60hz in Android? #4

Closed mo123 closed 2 months ago

mo123 commented 6 years ago

I tried lots of different video samples of 4K@50hz or 4K@60hz (3840x2160) on RK3328 but none can play in that resolution on Android. Most of the time the videos don't open or they play in slow motion, only showing 1 frame in 1080p@60hz in Kodi 18 or SPMC.

4K@24/25/30fps all play correctly in 4K and their correct frame-rate in Kodi 18/SPMC 17.6a2.

Test video not working, 4K 60fps - http://4ksamples.com/ses-astra-uhd-test-1-2160p-uhdtv/

It also fails this test video, 4K 50fps - https://forum.kodi.tv/showthread.php?tid=261768 The background of the video must be grey with lots of small white squares on the background. It plays correct in RKMC that uses libstagefright and bypasses mpp but in Kodi 18, SPMC it shows vertical black and white bars and downscaled to 1080p and plays incorrect with auto frame-rate switching on.

Is there a solution perhaps or frame-rates, bitrates too high for soc with Mediacodec support?

HermanChen commented 6 years ago

I have tested the video SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv from http://4ksamples.com/ses-astra-uhd-test-1-2160p-uhdtv/. It plays well with full frame rate. You can use echo 0x100 > /sys/module/vcodec_service/parameters/debug then play video. You will see the decoding time for each frame is ranged from 10ms to 14ms. It definitely can reach 60fps.

About the 1080p display I think the issue is on the display path for scaling to window size or screen size. The decoder will decode 1080p video but somewhere display device or GPU do a small size scaling. Then it cause the blur.