<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> There are various artifacts that appear as a result of frame rate adaption.<br>
> One of these is field dominance. This is where the top field is displayed<br>
> for longer than the bottom field. This results in the appearance of<br>
> flickering lines to the viewer.<br>
> If you could determine how long the top field was presented to the user,<br>
> you could maybe make adjustments to make the bottom field appear for a<br>
> similar amount of time.<br>
<br>
</div>Ok, you want to know how long a frame (buffer) has been on.<br>
Presentation timestamp tells you when the frame started to show, so<br>
maybe you could use the presentation timestamp of the next frame as the<br>
ending timestamp for this frame?<br>
<br>
Btw. would you need to know or set the scanout "phase" of top vs. bottom<br>
field for each frame on an interlaced display and video?<br></blockquote><div><br></div><div>On an interlaced display, we would need to make sure we can ensure the phase is correct. I.e. the top field from the media goes into the top field of the scanout.<br>
</div><div>So, I guess the answer is yes. But, I would hope that we could send the full frame, containing a top and bottom field and the hardware ensure it goes to the correct top/bottom scanout.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> So, I would propose the following.<br>
> 1) sequence number the frames at the display rate.<br>
> 2) provide an api for the application to predict the time of each frame<br>
> number in the sequence. I.e The next 5 frames will display at time<br>
> X1,X2,X3,X4,X5. Also provide a way to determine the "frame submited to<br>
> frame displayed" latency. So the user application knows how many frames in<br>
> advance it needs to do the submit.<br>
> 3) provide an api for the application to ensure that a frame it submits<br>
> will get displayed at display rate sequence number X.<br>
> 4) If frame X has already past, only display it if there are now newer<br>
> frames in the quene, otherwise drop it.<br>
<br>
</div>To me, all that sounds like a library API of somewhat higher level than<br>
display server protocol. We just need to make sure the protocol has<br>
everything to support such a library.<br>
<br>
I think item 4 is already implied in the protocol.<br>
<br>
Also, monitor refresh rates may change, which is why I think a<br>
timestamp is better in the protocol than a sequence number tied to a<br>
refresh rate. Another thing missing in the protocol sketch is an event<br>
notifying the client about current output refresh rate changes.<br>
<div class="im"><br>
> Summary:<br>
> For the best video streaming experience, timestamps on the frame are not<br>
> very useful, what is useful is predicting exactly when the frame will<br>
> actually be displayed to the user.<br>
<br>
</div>I hope the three timestamps would allow you to estimate everything you<br>
need:<br>
- when you queued a buffer (sent the request)<br>
- the timestamp you asked the buffer to be presented at<br>
- the timestamp the buffer really was presented<br>
<br>
Plus of course the same for the next buffer, so you know e.g. how long<br>
a buffer was on screen etc.<br>
<br>
How does that sound?<br>
<br></blockquote><div>So, the information you propose, with timestamps, gives us timestamps from events in the past.<br></div><div>Is there any way to deterministically ensure that a particular frame is displayed at a particular scanout that we would decide on in advance.<br>
</div><div>The problem is, if I timestamp a frame for time X and the scan out actually happens as time X - 1 microsecond, I really wanted not to miss that scanout.<br></div><div>It would be easier to be able to specify a particular scanout.<br>
</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
pq<br>
</blockquote></div><br></div></div>