Your Digital Media Has Never Looked So Good

 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Mon Aug 08, 2016 11:27 pm

I am playing a 4K@60fps HEVC stream on a Roku-4 device and observing tearing artifacts.

I am using "customvideoplayer" sample application present in Roku SDK package (Link: http://wwwimg.roku.com/static/sdk/RokuSDK.zip). The "customvideoplayer" uses "roVideoPlayer" and "roImageCanvas" for player and user interface respectively. I have connected Roku-4 to a 4K@60fps TV.

I have some questions.

1) How does video rendering happens in Roku? Does it use double buffering logic? Is there any difference in rendering logic for 4K OR 60fps compare to other resolutions/fps?

2) Do I need to provide any extra parameters/flags to player if the stream is 4K OR 60fps?

3) As I mentioned, the sample application uses "roImageCanvas" for user interface. I am not sure whether the player also uses it internally for rendering. In SDK documents, I found "roScreen" component which is used in gaming application and there is an optional flag to enable double buffering. Can I use "roScreen" with player? Will replacing "roImageCanvas" with "roScreen" help to render @ 60fps?
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Tue Aug 09, 2016 9:32 am

kmayur wrote:
1) How does video rendering happens in Roku? Does it use double buffering logic? Is there any difference in rendering logic for 4K OR 60fps compare to other resolutions/fps?
if somebody from Roku replied, i think fair answer would be "nunya business" :)
Video player keeps multiple decoded frames at a time but that's not related to "double buffering logic".

2) Do I need to provide any extra parameters/flags to player if the stream is 4K OR 60fps?
Try first - ask if it doesn't work. (Welcome to Roku world!)

3) As I mentioned, the sample application uses "roImageCanvas" for user interface. I am not sure whether the player also uses it internally for rendering. In SDK documents, I found "roScreen" component which is used in gaming application and there is an optional flag to enable double buffering. Can I use "roScreen" with player? Will replacing "roImageCanvas" with "roScreen" help to render @ 60fps?
No, roScreen will not change your streaming vs roImageCanvas. Video rendering is done on a different plane, which is underneath (z-order) these two.
 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Tue Aug 09, 2016 10:26 pm

Thank you @EnTerr for answering!

EnTerr wrote:
kmayur wrote:
1) How does video rendering happens in Roku? Does it use double buffering logic? Is there any difference in rendering logic for 4K OR 60fps compare to other resolutions/fps?
if somebody from Roku replied, i think fair answer would be "nunya business" :)
Video player keeps multiple decoded frames at a time but that's not related to "double buffering logic".

I know that the app developer has no control over rendering buffers. I asked this question because I am observing tearing issue with 4K @ 60fps stream. I thought decoder might be writing to a buffer which is in rendering process. I wanted to know if that is the cause for tearing artifacts. :)

2) Do I need to provide any extra parameters/flags to player if the stream is 4K OR 60fps?
Try first - ask if it doesn't work. (Welcome to Roku world!)

As I mentioned I am using "customvideoplayer" sample application which is almost 3 years old. I came to know that Roku is not updating it. So wanted to know if any extra configuration parameters to be given for 4K. I did not find any parameters specifically for 4K in SDK documents.

3) As I mentioned, the sample application uses "roImageCanvas" for user interface. I am not sure whether the player also uses it internally for rendering. In SDK documents, I found "roScreen" component which is used in gaming application and there is an optional flag to enable double buffering. Can I use "roScreen" with player? Will replacing "roImageCanvas" with "roScreen" help to render @ 60fps?
No, roScreen will not change your streaming vs roImageCanvas. Video rendering is done on a different plane, which is underneath (z-order) these two.
Yeah. Even I thought so. But I was not sure about it. Thank you :)
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Wed Aug 10, 2016 8:56 am

kmayur wrote:
I know that the app developer has no control over rendering buffers. I asked this question because I am observing tearing issue with 4K @ 60fps stream. I thought decoder might be writing to a buffer which is in rendering process. I wanted to know if that is the cause for tearing artifacts. :)

Can you take/show picture or video of it happening?
(picture is worth a thousand words, they say)
 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Wed Aug 10, 2016 11:56 pm

EnTerr wrote:
Can you take/show picture or video of it happening?
(picture is worth a thousand words, they say)


I don't have the actual picture right now. But the video on TV is as in the picture below. Please observe part of different frames displayed at same time.
Image

I could only upload image of size less than 800X800. You can see the high resolution image at this path:
https://upload.wikimedia.org/wikipedia/ ... ted%29.jpg
 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Mon Aug 15, 2016 11:59 pm

I printed device information and I have copied the log below. I referred ifDeviceInfo to get device information.

*******************************************************************
*****************       Device Information       ******************
*******************************************************************
* GetModel: 4400X
* GetVersion: 177.20E04100A

* GetDisplayType: HDTV

* GetDisplayMode: 720p

* GetDisplayAspectRatio: 16x9

* GetDisplaySize: <Component: roAssociativeArray> =
{
    h:  720
    w:  1280
}

* GetDisplayProperties:
  width= 160
  height= 90
  Hdr10=false
  DolbyVision=false
  internal=false


* GetSupportedGraphicsResolutions:
ReslIndex[ 0]
    width= 1280
    name=HD
    preferred=false
    height= 720
    ui=false
ReslIndex[ 1]
    width= 1920
    name=FHD
    preferred=true
    height= 1080
    ui=true


* GetVideoMode: 2160p30

* GetModelDisplayName: Roku 4

* CanDecodeVideo INPUT:
  profile=high
  codec=hevc
  level=6.2
  CanDecodeVideo OUTPUT:
    level=<Component: roArray> =
[
    4.1
    5.0
    5.1
]

    updated=level
    result=false


* GetUIResolution:
  width= 1920
  name=FHD
  height= 1080

HDMI port connected check passed: true
HDCP 2.2 check passed: true
*******************************************************************

I have connected Roku-4 to a "LG 65EF9500" TV and all HDMI ports are rated as 60Hz on it. My question is: Why Roku is detecting video mode as 4K@30fps? Please observe "GetVideoMode" in the log.
Let me know if I need to check any additional settings.
 
User avatar
RokuMarkn
Roku Engineering
Posts: 1581
Joined: Mon Jun 09, 2008 9:20 am

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Tue Aug 16, 2016 8:17 am

What do you have selected under Settings > Display Type?

--Mark
 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Tue Aug 16, 2016 10:20 pm

RokuMarkn wrote:
What do you have selected under Settings > Display Type?

--Mark

Thank you, @Mark :) . We have tested with both 4K-8bit and 4K-10bit options under Settings > Display type. Please note, we are using 4K-8bit content for testing.

To give a brief note on our testing,
1) We have tested by connecting Roku to a different HDMI ports on the TV and also tested with different HDMI cables.
2) We have played the same 4K@60fps content on the same TV with a different media player device (Not Roku). It plays without any issues. So, it is not the issue with the HDMI port or HDMI cable.
3) We have also tried rebooting Roku while TV is switched ON.

Please let me know if you think any other tests to be done.
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Tue Aug 16, 2016 11:13 pm

Apparently VSYNC issue. And shot in the dark - i suspect due to adaptive V-sync 
(e.g. Roku4 decoded frame rate drops below sync rate), see viewtopic.php?f=34&t=54513#p490795

Can you provide the Co a URL to a sample video that causes the effect?
 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Wed Aug 17, 2016 1:03 am

Hi EnTerr,
EnTerr wrote:
Apparently VSYNC issue. And shot in the dark - i suspect due to adaptive V-sync
(e.g. Roku4 decoded frame rate drops below sync rate), see viewtopic.php?f=34&t=54513#p490795

I am not using "roScreen" in my application and I am not using any openGL APIs. I am not controlling rendering as well. So, I don't know how V-sync is getting affected. Is there any settings for choosing V-sync mode?

EnTerr wrote:
Can you provide the Co a URL to a sample video that causes the effect?

This issue is reproducible with any 4K@60fps stream.

Also, I am more interested about the "GetVideoMode" output. Why it is detecting the HDMI as 30fps? I think that is the root cause of the issue.
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Wed Aug 17, 2016 10:37 am

kmayur wrote:
I am not using "roScreen" in my application and I am not using any openGL APIs. I am not controlling rendering as well. So, I don't know how V-sync is getting affected. Is there any settings for choosing V-sync mode?

"It doesn't matter" :) I mean Vsync-ing is a very low level thing in producing video signal (below roScreen, OGL, video decoding). It's not configurable. And if it's that and there were a way to disable the "adaptive" mode of Vsync - mind you that would be worse overall because it will decrease effective FPS.

EnTerr wrote:
Can you provide the Co a URL to a sample video that causes the effect?

This issue is reproducible with any 4K@60fps stream.

I understand the annoyance when asked to provide sample for something "obvious" but it may help your case. Metaphorically, you know how "class lawsuits" cover everyone from a group? Well they still need a few real humans as "representatives" in the court proceedings, to represent the plaintiff class. The picture you showed is a simulated("fake") image from wikipedia, not the real effect - it would be good if there is something tangible for a Co' person to look at.

Also, I am more interested about the "GetVideoMode" output. Why it is detecting the HDMI as 30fps? I think that is the root cause of the issue.

That is a good question, though that by itself would not cause tearing.
 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Mon Aug 22, 2016 2:07 am

Hi @EnTerr,
EnTerr:
"It doesn't matter" 
[img=15x15]https://forums.roku.com/images/smilies/icon_smile.gif[/img] I mean Vsync-ing is a very low level thing in producing video signal (below roScreen, OGL, video decoding). It's not configurable. And if it's that and there were a way to disable the "adaptive" mode of Vsync - mind you that would be worse overall because it will decrease effective FPS.

As per my understanding, Adaptive V-sync will be turned ON if the stream has variable frame rate. But my streams have fixed 60fps frame rate, so I don't think it is turned ON. However, as you mentioned it is not configurable and hence I don't think that is the issue I am facing.

EnTerr wrote:
I understand the annoyance when asked to provide sample for something "obvious" but it may help your case. Metaphorically, you know how "class lawsuits" cover everyone from a group? Well they still need a few real humans as "representatives" in the court proceedings, to represent the plaintiff class. The picture you showed is a simulated("fake") image from wikipedia, not the real effect - it would be good if there is something tangible for a Co' person to look at.

I am using some customer's stream stream for testing. I have checked with them and I am not able to share them with you. According to me, the issues are reproducible with any 4K@60fps stream.


EnTerr wrote:
That is a good question, though that by itself would not cause tearing.

 I think this is the issue because display is configured for 30fps and rendering is at 60fps. Decoder might be writing to a buffer when the buffer is being used by the display. 
Last edited by kmayur on Mon Aug 22, 2016 3:20 am, edited 1 time in total.
 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Mon Aug 22, 2016 2:13 am

kmayur wrote:
RokuMarkn wrote:
What do you have selected under Settings > Display Type?

--Mark

Thank you, @Mark :) . We have tested with both 4K-8bit and 4K-10bit options under Settings > Display type. Please note, we are using 4K-8bit content for testing.

To give a brief note on our testing,
1) We have tested by connecting Roku to a different HDMI ports on the TV and also tested with different HDMI cables.
2) We have played the same 4K@60fps content on the same TV with a different media player device (Not Roku). It plays without any issues. So, it is not the issue with the HDMI port or HDMI cable.
3) We have also tried rebooting Roku while TV is switched ON.

Please let me know if you think any other tests to be done.

Hi @Mark,
Any update on this issue?
As I mentioned, I expected "GetVideoMode" would return "2160p60" for 8-bit and "2160p60b10" for 10-bit display type selection. I am not sure what is going wrong here. Also please let me know if you need any other information.
 
User avatar
RokuJoel
Posts: 1758
Joined: Mon Nov 14, 2011 5:22 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Wed Aug 24, 2016 6:32 pm

After chatting with @RokuMarkN I've filed a bug with the media team on your issue, linking to this thread.

 - Joel
 
kmayur
Topic Author
Posts: 14
Joined: Thu Aug 04, 2016 11:20 pm

Re: Observing tearing artifacts on Roku-4 with 4k @ 60fps HEVC stream

Thu Aug 25, 2016 3:04 am

RokuJoel wrote:
After chatting with @RokuMarkN I've filed a bug with the media team on your issue, linking to this thread.

 - Joel

Thank you, RokuJoel.

Regards,
Mayur

Who is online

Users browsing this forum: No registered users and 8 guests