From 7424651b9637082f71deab9fcc87111e2d9df13f Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Mon, 29 May 2017 09:48:10 -0700 Subject: vo_opengl: hwdec_cuda: Support separate decode and display devices In a multi GPU scenario, it may be desirable to use different GPUs for decode and display responsibilities. For example, if a secondary GPU has better video decoding capabilities. In such a scenario, we need to initialise a separate context for each GPU, and use the display context in hwdec_cuda, while passing the decode context to avcodec. Once that's done, the actually hand-off between the two GPUs is transparent to us (It happens during the cuMemcpy2D operation which copies the decoded frame from a cuda buffer to the OpenGL texture). In the end, the bulk of the work is around introducing a new configuration option to specify the decode device. --- DOCS/man/options.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 925c501881..2e781e2272 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4802,6 +4802,16 @@ The following video options are currently all specific to ``--vo=opengl`` and This option might be silently removed in the future, if ANGLE fixes shader compilation speed. +``--cuda-decode-device=`` + Choose the GPU device used for decoding when using the ``cuda`` hwdec. + + By default, the device that is being used to provide OpenGL output will + also be used for decoding (and in the vast majority of cases, only one + GPU will be present). + + Note that when using the ``cuda-copy`` hwdec, a different option must be + passed: ``--vd-lavc-o=gpu=<0..>``. + Miscellaneous ------------- -- cgit v1.2.3