Display - NTSC Frame Rate

Moderators: mdrjr, odroid

Display - NTSC Frame Rate

Unread postby Isard7777 » Sat Sep 15, 2018 12:28 am

Hello,

For my project, I would like to configure my Odroid C2 to change screen recolution and frame rate on-the-fly during code execution on Minimal Ubuntu 18.04.

For some of these format, it is really simple and I only have to write format such as 180p60hz, 720p50hz, ... into /sys/class/display/mode. I've tested all the value that I can get from the file /sys/class/amhdmitx/amhdmitx0/disp_cap (480i60hz,480p60hz,576i50hz,576p50hz,720p50hz,720p60hz,1080i50hz,1080i60hz,1080p50hz,1080p60hz, ...) and , if the monitor I used can manage it, it works.

My problem is that I also need to use fractionnal frame rate (59.94hz, 29.97hz, ...) but I didn't found any information on the capability of the Odroid to use NTSC frame rate. On some forum subjects not necessarily related to the Odroid, I found that some people use the same way I did with 1080p59hz value and so on but, on my platform, it did not work and I'm sure that the monitor I used supports these frame rate.

Does anybody has a solution for my issue because I thought that the Amlogic Cortex A53 chip used on the odroid could use such frequencies and I'm a little bit lost?

Thanks for helping.
Isard7777
 
Posts: 5
Joined: Fri Aug 10, 2018 5:25 pm
languages_spoken: english french
ODROIDs: C2

Re: Display - NTSC Frame Rate

Unread postby rooted » Sat Sep 15, 2018 7:17 am

I believe disp_cap is reading from the monitor edid. What is the exact model of the monitor?
User avatar
rooted
 
Posts: 5458
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Display - NTSC Frame Rate

Unread postby Isard7777 » Tue Sep 18, 2018 4:09 pm

Hello,

I don't think my issue is related with the monitor I use. Actually, I've tested on four types of monitor:

- A consumer screen : Samsung UE40C8700XSXZF
- A SDI Test Screen with an HDMI input : JVC DT-V21G2
- Two test tool : MURIDEO FRESCO SIX-A and a QUANTUM 780C.

On all of these screen, I've never seen something in disp_cap (that is a translation of what it send by the screen edid but I think filtered on some value) that allows me to set the odroid in 59.94hz or 29.97hz.
Isard7777
 
Posts: 5
Joined: Fri Aug 10, 2018 5:25 pm
languages_spoken: english french
ODROIDs: C2

Re: Display - NTSC Frame Rate

Unread postby rooted » Wed Sep 19, 2018 12:45 am

Isard7777 wrote:Hello,

I don't think my issue is related with the monitor I use. Actually, I've tested on four types of monitor:

- A consumer screen : Samsung UE40C8700XSXZF
- A SDI Test Screen with an HDMI input : JVC DT-V21G2
- Two test tool : MURIDEO FRESCO SIX-A and a QUANTUM 780C.

On all of these screen, I've never seen something in disp_cap (that is a translation of what it send by the screen edid but I think filtered on some value) that allows me to set the odroid in 59.94hz or 29.97hz.
You're right, I investigated it further and while my display supports fractional hz I can not use or see them.

Perhaps @joy, @tobetter, @odroid can help.
User avatar
rooted
 
Posts: 5458
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Display - NTSC Frame Rate

Unread postby tobetter » Wed Sep 19, 2018 8:53 am

@isard7777, the framerate which you've mentioned are only switched when a video stream is filmed with the corresponding framerate if my memory is correct. We've worked this with AMLogic on ODROID for C1, and C2 might be the same. So my statement is that technically possible to run the framerate but the code today is for certain case.
What you want to is to set the framerate for regular graphics display as you've tried with other framerate like 60Hz?
tobetter
 
Posts: 2344
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Display - NTSC Frame Rate

Unread postby Isard7777 » Wed Sep 19, 2018 2:39 pm

@tobetter, in fact, I must catch a compress NDI video stream and, after decompress it, send it through the HDMI output (alsa buffer for the sound and directly via framebuffer for the catched frame (by using ge2d for color conversion and directly send yuv422)) by keeping the input format and frame rate. When I get the characteristic of the stream, the most logical thing I think to do is to set the odroid output with them...

I've also a desync between the alsa clock and the framebuffer vsync that I need to manage. So, to avoid such desync, we can't use the ioctl FBIO_WAITFORVSYNC as is...

So, you seems to say that, what I search to do is automatically do depending of the input stream ? On what is it based and how must I code my framebuffer part to force the d├ętection of the frame rate ?
Isard7777
 
Posts: 5
Joined: Fri Aug 10, 2018 5:25 pm
languages_spoken: english french
ODROIDs: C2

Re: Display - NTSC Frame Rate

Unread postby tobetter » Wed Sep 19, 2018 3:30 pm

Isard7777 wrote:@tobetter, in fact, I must catch a compress NDI video stream and, after decompress it, send it through the HDMI output (alsa buffer for the sound and directly via framebuffer for the catched frame (by using ge2d for color conversion and directly send yuv422)) by keeping the input format and frame rate. When I get the characteristic of the stream, the most logical thing I think to do is to set the odroid output with them...

I've also a desync between the alsa clock and the framebuffer vsync that I need to manage. So, to avoid such desync, we can't use the ioctl FBIO_WAITFORVSYNC as is...

So, you seems to say that, what I search to do is automatically do depending of the input stream ? On what is it based and how must I code my framebuffer part to force the d├ętection of the frame rate ?


Let me try to explain my understanding with the code from AMLogic's HDMI driver.
[1] https://github.com/hardkernel/linux/blo ... id.c#L1552
[2] https://github.com/hardkernel/linux/blo ... id.c#L1605

And they are called from [3] when you write a display mode to /sys/class/display/mode which you already know. But still, this does not set the display output mode to 29Hz or 59Hz properly. So normally still graphics are playing at 30Hz or 60Hz.
[3] https://github.com/hardkernel/linux/blo ... ain.c#L337

Later when a video stream which is encoded as 29fps or 59fps, internally the code [4] is called with MISC_FINE_TUNE_HPLL and HDMI PHY set to 29fps or 59fps only while the video stream is playing.
[4] https://github.com/hardkernel/linux/blo ... hw.c#L3534

For your doubt, whether the fractional frame rate is missing at /sys/class/amhdmitx/amhdmitx0/disp_cap, the fractional frame rates are not showing because the table from [2] is not referred in the code [5].
https://github.com/hardkernel/linux/blo ... id.c#L1641

If my understanding is still correct, you can try to fix the code [5] to refer disp_mode_alias_vic_table and compare EDID for fractional frame rate then you would be able to see them at /sys/class/amhdmitx/amhdmitx0/disp_cap. But still I guess, HDMI won't switched to 23fps or 29fps because of [3] so you will need to change the code to force HDMI PHY calling the function [4] to change HPLL.

I'ven't tested or changed them yet, just trying to explain as much as I can if it can help you. :)
Welcome to get your feedback or any other doubts to resolve your issue.
tobetter
 
Posts: 2344
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1


Return to Issues

Who is online

Users browsing this forum: No registered users and 1 guest