<div dir="auto"><div>Hi,</div><div dir="auto"><br></div><div dir="auto">You are right, I omitted a few details. I have 2 use case where I encountered this bug:</div><div dir="auto">- I use a vout plugin that needs to access frame buffers from RAM (with sw chroma filtering)</div><div dir="auto">- I use the vaapi of my Intel CPU, but my display is plugged to a discrete Nvidia graphics card (this is not my typical use case but I believe I observed the bug in this situation as well)</div><div dir="auto"><br></div><div dir="auto">The copy.c path is obvious for the 1st case. And I guess it makes sense at some point for the 2nd use case.</div><div dir="auto"><br></div><div dir="auto">Quentin C.<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, Mar 8, 2019, 08:38 Thomas Guillem <<a href="mailto:thomas@gllm.fr">thomas@gllm.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u><div><div><br></div><div>On Thu, Mar 7, 2019, at 22:20, Quentin Chateau wrote:<br></div><blockquote type="cite" id="m_-7884691920419144654fastmail-quoted"><div dir="ltr"><div>Hi,<br></div><div><br></div><div>this regression has been picked-up by the Ubuntu 18.04 team and is therefore affecting quite a big number of people. On a machine with a i7 8700k, you cannot even decently play a fullHD video using vaapi (over half of the frames are dropped). The proposed fix restores the expected performances (low CPU usage and no frame drop for 4K60 HDR videos using vaapi).<br></div><div><br></div><div>If there is anything wrong about my patch, please tell and i'll fix it.<br></div></div></blockquote><div><br></div><div>Tested and merged, thanks a lot for you contribution.<br></div><div><br></div><div>By the way, you may have an other problem, the copy.c code path should not be executed if you do a full hardware direct rendering with 0 copy (decoding from GPU + display on GPU without going through the CPU). By default, without any video filters, deinterlace, VLC should do 0 copy. I'm wondering why it's not the case for you. <br></div><div><br></div><blockquote type="cite" id="m_-7884691920419144654fastmail-quoted"><div dir="ltr"><div><br></div><div>Quentin C.<br></div></div><div><br></div><div class="m_-7884691920419144654fastmail-quoted-gmail_quote"><div class="m_-7884691920419144654fastmail-quoted-gmail_attr" dir="ltr">Le ven. 1 mars 2019 à 23:36, Quentin Chateau <<a href="mailto:quentin.chateau@gmail.com" target="_blank" rel="noreferrer">quentin.chateau@gmail.com</a>> a écrit :<br></div><blockquote style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-color:rgb(204,204,204);border-left-style:solid;border-left-width:1px;padding-left:1ex" class="m_-7884691920419144654fastmail-quoted-gmail_quote"><div>regression 09d421a20851e1c49aa98e117957dd118620fae4<br></div><div> ---<br></div><div> modules/video_chroma/copy.c | 8 ++++----<br></div><div> 1 file changed, 4 insertions(+), 4 deletions(-)<br></div><div> <br></div><div> diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c<br></div><div> index e9250b948e..51498f4a06 100644<br></div><div> --- a/modules/video_chroma/copy.c<br></div><div> +++ b/modules/video_chroma/copy.c<br></div><div> @@ -468,7 +468,7 @@ static void SSE_CopyPlane(uint8_t *dst, size_t dst_pitch,<br></div><div> const size_t copy_pitch = __MIN(src_pitch, dst_pitch);<br></div><div> const unsigned w16 = (copy_pitch+15) & ~15;<br></div><div> const unsigned hstep = cache_size / w16;<br></div><div> - const unsigned cache_width = __MIN(src_pitch, hstep);<br></div><div> + const unsigned cache_width = __MIN(src_pitch, cache_size);<br></div><div> assert(hstep > 0);<br></div><div> <br></div><div> /* If SSE4.1: CopyFromUswc is faster than memcpy */<br></div><div> @@ -501,8 +501,8 @@ SSE_InterleavePlanes(uint8_t *dst, size_t dst_pitch,<br></div><div> size_t copy_pitch = __MIN(dst_pitch / 2, srcu_pitch);<br></div><div> unsigned int const w16 = (srcu_pitch+15) & ~15;<br></div><div> unsigned int const hstep = (cache_size) / (2*w16);<br></div><div> - const unsigned cacheu_width = __MIN(srcu_pitch, hstep);<br></div><div> - const unsigned cachev_width = __MIN(srcv_pitch, hstep);<br></div><div> + const unsigned cacheu_width = __MIN(srcu_pitch, cache_size);<br></div><div> + const unsigned cachev_width = __MIN(srcv_pitch, cache_size);<br></div><div> assert(hstep > 0);<br></div><div> <br></div><div> for (unsigned int y = 0; y < height; y += hstep)<br></div><div> @@ -535,7 +535,7 @@ static void SSE_SplitPlanes(uint8_t *dstu, size_t dstu_pitch,<br></div><div> size_t copy_pitch = __MIN(__MIN(src_pitch / 2, dstu_pitch), dstv_pitch);<br></div><div> const unsigned w16 = (src_pitch+15) & ~15;<br></div><div> const unsigned hstep = cache_size / w16;<br></div><div> - const unsigned cache_width = __MIN(src_pitch, hstep);<br></div><div> + const unsigned cache_width = __MIN(src_pitch, cache_size);<br></div><div> assert(hstep > 0);<br></div><div> <br></div><div> for (unsigned y = 0; y < height; y += hstep) {<br></div><div> -- <br></div><div> 2.19.1<br></div><div> <br></div></blockquote></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank" rel="noreferrer">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><br></div></div>_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div></div></div>