<!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, Sep 19, 2019, at 14:08, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>I disagree and I don't think that's what was said in the workshop at all.<br></div></blockquote><div><br></div><div>We decided to do like VAAPI, that is the most "complexe" case and will cover all others case.<br></div><div><br></div><div>There is a VaDisplay, created from X11/Wayland or via DRM. That is our decoder device. A decoder device is created via a window (X11/Wayland) or without (DRM).<br></div><div><br></div><div>Then there is VaContext, tied to the decoded video format. That is our video context.<br></div><div><br></div><div>One instance of our decode device could be used by several instances of video context. In parallel or not. This will happen when the decoder module is reloaded due to a format change spotted by the packetizer.<br></div><div><br></div><blockquote type="cite" id="qt"><div><br></div><div class="qt-gmail_quote"><div>Le 19 septembre 2019 14:22:33 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>I agree with this commit and with what Steve said. For me, that is exactly what we planned in the workshop.<br></div><div>And yes, maybe we should change the name of the decoder device.<br></div><div><br></div><div>On Thu, Sep 19, 2019, at 12:53, Steve Lhomme wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(114, 159, 207);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>On 2019-09-19 10:51, Alexandre Janniaux wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(173, 127, 168);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>Hi,<br></div><div><br></div><div>VAAPI display is intended to link the client decoder/encoder to the<br></div><div>hardware that will run the actual processing. On a classical X11<br></div><div>windowed system, it would have to go through the X11 connection,<br></div><div>meaning through the window system. So it makes sense to link the<br></div><div>decoder device to the windowing system.<br></div><div><br></div><div>For transcoding, you don't have the window, but you still have to<br></div><div>indicate where you want to decode and where you want to encode.<br></div><div>For the most common use case, the ideal situation is having both<br></div><div>at the same place, meaning that they share and use a common decoder<br></div><div>device.<br></div><div><br></div><div>The window=NULL case would likely create a decoder device on top of<br></div><div>a DRM connection, which could be used by the filter chain (opengl,<br></div><div>vulkan), the decoder (VAAPI) and the encoder (VAAPI).<br></div><div><br></div><div>In my opinion, solutions like splitting vout_window doesn't make<br></div><div>much sense as it is exactly what decoder device is for. The main<br></div><div>questions gravitate around the type of decoder device that we<br></div><div>want. VAAPI seems to cache the VADisplay corresponding to the<br></div><div>display/DRM connector used. Same for EGL, so maybe we can have<br></div><div>X11/Wayland/DRM decoder device instead of VAAPI one ?<br></div></blockquote><div>Not sure what you mean by cache here. The VADisplay is at least used to <br></div><div>check whether the codec+profile is supported by the device. It is really <br></div><div>tied to the hardware device. So whatever you have on the window/display <br></div><div>side you want to match the hardware device with what is used for <br></div><div>displaying. That's what the hint is for.<br></div><div><br></div><div>(in D3D the hint is used to make sure the same device is used on both <br></div><div>sides, if they mismatch the copy/render API's don't work and we need to <br></div><div>do the copy ourself)<br></div><div><br></div><div>Now I think what you mean is that the translation from XID to VADisplay <br></div><div>or Wayland to VADisplay or DRM to VADisplay is currently done in the <br></div><div>decoder device, but it doesn't have to be. There could be a XID "decoder <br></div><div>device/hint", a Wayland "decoder device/hint" and a DRM "decoder <br></div><div>device/hint". The VAAPI decoder could use each of them and translate <br></div><div>them to VADisplay by itself (the translation currently done in the VAAPI <br></div><div>decoder device).<br></div><div><br></div><div>That would be a shift compared to what we said so far: --dec-dev will <br></div><div>replace the --avcodec-hw option (which doesn't work with nvdec for <br></div><div>example). For now the --dec-dev is used to tell "I want to use this <br></div><div>decoder API in the pipeline". It works because there is a one to one <br></div><div>correspondence between the "decoder device" and the video context types. <br></div><div>What you propose is that there is no such correspondence anymore. That <br></div><div>would leave the possibility to select both the decoder/filter API type <br></div><div>and the buffering type.<br></div><div><br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(173, 127, 168);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>Regards,<br></div><div>--<br></div><div>Alexandre Janniaux<br></div><div>Videolabs<br></div><div><br></div><div>On Thu, Sep 19, 2019 at 09:19:13AM +0200, Steve Lhomme wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(138, 226, 52);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>On 2019-09-19 8:40, Rémi Denis-Courmont wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(252, 175, 62);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote">It's called "decoder device" because it's for the decoder.<br></blockquote><div> The name itself is not correct. As explained, it is also used by filters to<br></div><div> create video context from scratch (that will output pictures compatible with<br></div><div> the "decoder device" used by the display module). We could call it "output<br></div><div> device" or even "output adapter" since it seems to always be tied to a<br></div><div> display adapter.<br></div><div><br></div><div> In the case of transcoding it's actually the device used by the encoder,<br></div><div> that the decoder needs to try to match.<br></div><div><br></div><div> As Alexandre reminded, it's mostly a hint for the decoder (and filters) to<br></div><div> match the output. So we could also call it "device hint".<br></div><div><br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(252, 175, 62);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote">And the decoder device does not have to come from a window. That's not how it's going to work for transcoding.<br></blockquote><div> It doesn't have to in most cases. But for devices like VAAPI it needs to<br></div><div> know the type and ID of the window so the decoder can actually be used (not<br></div><div> sure if there are encoders for VAAPI and if they can use a dummy VADisplay<br></div><div> value). See the Open() of the VAAPI decoder device [1]. No window => no<br></div><div> "decoder device". No "decoder device" => no decoder.<br></div><div><br></div><div> We actually designed the "decoder device" during the workshop because of<br></div><div> that. I did not originally go that way since on Windows I never need to know<br></div><div> the window (and in fact I can't know the adapter from the HWND).<br></div><div><br></div><div> [1] <a href="https://code.videolan.org/videolan/vlc/blob/master/modules/hw/vaapi/decoder_device.c#L223">https://code.videolan.org/videolan/vlc/blob/master/modules/hw/vaapi/decoder_device.c#L223</a><br></div><div><br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(252, 175, 62);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>Le 19 septembre 2019 09:30:30 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(233, 185, 110);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>On 2019-09-19 8:11, Steve Lhomme wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>On 2019-09-18 18:16, Rémi Denis-Courmont wrote:<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote">Le keskiviikkona 18. syyskuuta 2019, 17.13.18 EEST Steve Lhomme a<br></blockquote></blockquote><div>écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote">The decoder device ("dec-dev") should be tied to the lifecyle of<br></blockquote></blockquote></blockquote><div>the<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote">window.<br></blockquote><div>Well, no. It's tied to an enabled window, which is longer than a<br></div></blockquote></blockquote><div>vout,<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>but<br></div><div>shorter than a window.<br></div></blockquote><div> I can change it to:<br></div><div> The decoder device ("dec-dev") should be tied to the lifecyle of an<br></div><div> enabled window.<br></div><div><br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><div>And AFAIK, the vout should not know about the decoder or decoder<br></div><div>device at<br></div><div>all. It should use the video context only.<br></div></blockquote><div>And how do you plan to convey this decoder device instance to the<br></div><div>decoder/filters without going through the vout ?<br></div></blockquote><div>For the record, the decoder device is created with a vout_window_t,<br></div><div>because in some cases (VAAPI for example) it needs to know about which<br></div><div>window is used. This vout_window_t is created and stored by the vout.<hr>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">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div> --<br></div><div> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.<hr> 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">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div><div><br></div></blockquote><div><hr>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">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><hr>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">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div><div><br></div></blockquote><div><hr>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">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote><div><hr>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">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></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>