<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>On Thu, Mar 7, 2019, at 22:20, Quentin Chateau wrote:<br></div><blockquote type="cite" id="fastmail-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="fastmail-quoted"><div dir="ltr"><div><br></div><div>Quentin C.<br></div></div><div><br></div><div class="fastmail-quoted-gmail_quote"><div class="fastmail-quoted-gmail_attr" dir="ltr">Le ven. 1 mars 2019 à 23:36, Quentin Chateau <<a href="mailto:quentin.chateau@gmail.com">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="fastmail-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>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>