From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 105145] vaExportSurfaceHandle interaction with surface interlaced flag prevents switching on vaapi deinterlacing dynamically Date: Mon, 19 Feb 2018 07:49:34 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1341041195==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 13BAE6E016 for ; Mon, 19 Feb 2018 07:49:34 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1341041195== Content-Type: multipart/alternative; boundary="15190265740.aAbA780.11850" Content-Transfer-Encoding: 7bit --15190265740.aAbA780.11850 Date: Mon, 19 Feb 2018 07:49:34 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D105145 --- Comment #4 from Christian K=C3=B6nig = --- (In reply to k.philipp from comment #2) > Since we can do weaving on the Kodi side anyway (for VDPAU), would it be > enough to add flags, say VA_EXPORT_SURFACE_TOP_FIELD and > VA_EXPORT_SURFACE_BOTTOM_FIELD, to vaExportSurfaceHandle? Would that then= be > roughly equivalent to what we get with VDPAURegisterVideoSurfaceNV? Yes, exactly that's what's needed. (In reply to k.philipp from comment #3) > Here's what we'll do instead (in case someone comes here looking for a > workaround): > - For 2K video or less: Always do VAAPI postprocessing. If the content tu= rns > out to be progressive, we do an unnecessary copy (as the driver has to > weave). But it enables us to switch deinterlacing on and off on a per-fra= me > basis - needed not only for toggling deinterlacing on user wish, but also > for mixed progressive/interlaced video. If you're very sure there are no > interlaced frames anywhere in the video, postprocessing could also be tur= ned > off (we're usually not). > - For more than 2K video: Start with no VAAPI postprocessing for best > performance. If interlaced frames are encountered, activate VAAPI > postprocessing and reinitialize decoding with fresh surfaces. This means > we'll drop frames and lag around for a bit, but should be OK-ish since >2K > interlaced content is very rare. Sounds like a good plan to me as well. > Also, that VAAPI has to weave the first few textures before they've been > exported once is not very nice. Is there some kind of hint we could give = the > driver that we want to have progressive surfaces? Not that I know of, but feel free to suggest something. General problem with VA-API seems to be that suggestions made by AMD seems to be mostly ignored. Also don't call it interlaced/progressive (that was just me trying to make sense of what the hardware is doing). Instead call it something in the line of FIELD and FRAME, that is the more common terminology at least in the different MPEG standards. --=20 You are receiving this mail because: You are the assignee for the bug.= --15190265740.aAbA780.11850 Date: Mon, 19 Feb 2018 07:49:34 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 4 on bug 10514= 5 from Christian K=C3= =B6nig
(In reply to k.philipp from comment #2)
> Since we can do weaving on the Kodi side anyway =
(for VDPAU), would it be
> enough to add flags, say VA_EXPORT_SURFACE_TOP_FIELD and
> VA_EXPORT_SURFACE_BOTTOM_FIELD, to vaExportSurfaceHandle? Would that t=
hen be
> roughly equivalent to what we get with VDPAURegisterVideoSurfaceNV?

Yes, exactly that's what's needed.

(In reply to k.philipp from comment=
 #3)
> Here's what we'll do instead (in case someone co=
mes here looking for a
> workaround):
> - For 2K video or less: Always do VAAPI postprocessing. If the content=
 turns
> out to be progressive, we do an unnecessary copy (as the driver has to
> weave). But it enables us to switch deinterlacing on and off on a per-=
frame
> basis - needed not only for toggling deinterlacing on user wish, but a=
lso
> for mixed progressive/interlaced video. If you're very sure there are =
no
> interlaced frames anywhere in the video, postprocessing could also be =
turned
> off (we're usually not).
> - For more than 2K video: Start with no VAAPI postprocessing for best
> performance. If interlaced frames are encountered, activate VAAPI
> postprocessing and reinitialize decoding with fresh surfaces. This mea=
ns
> we'll drop frames and lag around for a bit, but should be OK-ish since=
 >2K
> interlaced content is very rare.

Sounds like a good plan to me as well.

> Also, that VAAPI has to weave the first few text=
ures before they've been
> exported once is not very nice. Is there some kind of hint we could gi=
ve the
> driver that we want to have progressive surfaces?

Not that I know of, but feel free to suggest something. General problem with
VA-API seems to be that suggestions made by AMD seems to be mostly ignored.

Also don't call it interlaced/progressive (that was just me trying to make
sense of what the hardware is doing).

Instead call it something in the line of FIELD and FRAME, that is the more
common terminology at least in the different MPEG standards.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15190265740.aAbA780.11850-- --===============1341041195== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1341041195==--