diff mbox

[FFmpeg-devel,1/3] configure: add cuda-sdk for things requiring full CUDA sdk

Message ID 20170511205921.2172-1-timo@rothenpieler.org
State Superseded
Headers show

Commit Message

Timo Rothenpieler May 11, 2017, 8:59 p.m. UTC
---
 configure | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Philip Langdale May 11, 2017, 11:38 p.m. UTC | #1
On Thu, 11 May 2017 22:59:19 +0200
Timo Rothenpieler <timo@rothenpieler.org> wrote:

> ---
>  configure | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index c347336426..ef2134828b 100755
> --- a/configure
> +++ b/configure
> @@ -297,6 +297,7 @@ External library support:
>    The following libraries provide various hardware acceleration
> features: --disable-audiotoolbox   disable Apple AudioToolbox code
> [autodetect] --disable-cuda           disable dynamically linked
> Nvidia CUDA code [autodetect]
> +  --enable-cuda-sdk        enable CUDA features that require the
> CUDA SDK [no] --disable-cuvid          disable Nvidia CUVID support
> [autodetect] --disable-d3d11va        disable Microsoft Direct3D 11
> video acceleration code [autodetect] --disable-dxva2          disable
> Microsoft DirectX 9 video acceleration code [autodetect] @@ -1598,6
> +1599,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST=" "
>  
>  HWACCEL_LIBRARY_NONFREE_LIST="
> +    cuda_sdk
>      libnpp
>  "
>  
> @@ -2716,7 +2718,7 @@ qsvenc_select="qsv"
>  vaapi_encode_deps="vaapi"
>  
>  hwupload_cuda_filter_deps="cuda"
> -scale_npp_filter_deps="cuda libnpp"
> +scale_npp_filter_deps="cuda_sdk libnpp"
>  nvpp_filter_deps="cuda"
>  
>  nvenc_deps="cuda"
> @@ -5756,7 +5758,7 @@ done
>  enabled avfoundation_indev && { check_header_objcc
> AVFoundation/AVFoundation.h || disable avfoundation_indev; } enabled
> avfoundation_indev && { check_lib avfoundation_indev
> CoreGraphics/CoreGraphics.h CGGetActiveDisplayList -framework
> CoreGraphics || check_lib avfoundation_indev
> ApplicationServices/ApplicationServices.h CGGetActiveDisplayList
> -framework ApplicationServices; } -enabled cuda              &&
> check_header cuda.h # this is not a dependency +enabled
> cuda_sdk          && require cuda_sdk cuda.h cuCtxCreate -lcuda
> enabled cuvid             && { enabled cuda || die "ERROR: CUVID
> requires CUDA"; } enabled chromaprint       && require chromaprint
> chromaprint.h chromaprint_get_version -lchromaprint

Looks good.


--phil
Yogender Gupta May 12, 2017, 5:32 a.m. UTC | #2
>>+    cuda_sdk
>>     libnpp

IMO, Libnpp is part of the CUDA SDK, and we can remove all the libnpp related changes and just replace it by cuda-sdk in the configure/make files.

Thanks,
Yogender
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
Timo Rothenpieler May 12, 2017, 8:21 a.m. UTC | #3
Am 12.05.2017 um 07:32 schrieb Yogender Gupta:
>>> +    cuda_sdk
>>>     libnpp
> 
> IMO, Libnpp is part of the CUDA SDK, and we can remove all the libnpp related changes and just replace it by cuda-sdk in the configure/make files.

True, but I'm not sure if an existing config parameter can be that
easily removed without breaking a bunch of existing build scripts.
James Almer May 12, 2017, 1:34 p.m. UTC | #4
On 5/12/2017 5:21 AM, Timo Rothenpieler wrote:
> Am 12.05.2017 um 07:32 schrieb Yogender Gupta:
>>>> +    cuda_sdk
>>>>     libnpp
>>
>> IMO, Libnpp is part of the CUDA SDK, and we can remove all the libnpp related changes and just replace it by cuda-sdk in the configure/make files.
> 
> True, but I'm not sure if an existing config parameter can be that
> easily removed without breaking a bunch of existing build scripts.

You can keep the option marked as deprecated for a while, while removing
all the relevant internals and making it an alias for cuda_sdk.
Timo Rothenpieler May 12, 2017, 6:31 p.m. UTC | #5
Am 12.05.2017 um 15:34 schrieb James Almer:
> On 5/12/2017 5:21 AM, Timo Rothenpieler wrote:
>> Am 12.05.2017 um 07:32 schrieb Yogender Gupta:
>>>>> +    cuda_sdk
>>>>>      libnpp
>>>
>>> IMO, Libnpp is part of the CUDA SDK, and we can remove all the libnpp related changes and just replace it by cuda-sdk in the configure/make files.
>>
>> True, but I'm not sure if an existing config parameter can be that
>> easily removed without breaking a bunch of existing build scripts.
> 
> You can keep the option marked as deprecated for a while, while removing
> all the relevant internals and making it an alias for cuda_sdk.

Thinking about it, I'd rather keep libnpp separate, as --enable-cuda-sdk 
still results in an ffmpeg binary that only depends on stuff the 
nvidia-driver ships with, while for a build with libnpp it depends on 
some libs that only come with the CUDA SDK.
Michael Niedermayer May 12, 2017, 6:48 p.m. UTC | #6
On Thu, May 11, 2017 at 10:59:19PM +0200, Timo Rothenpieler wrote:
> ---
>  configure | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

This doesnt apply so i cant test this or dependant patches

Applying: configure: add cuda-sdk for things requiring full CUDA sdk
error: sha1 information is lacking or useless (configure).
error: could not build fake ancestor
Patch failed at 0001 configure: add cuda-sdk for things requiring full CUDA sdk
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


[...]
Timo Rothenpieler May 12, 2017, 7:28 p.m. UTC | #7
Am 12.05.2017 um 20:48 schrieb Michael Niedermayer:
> On Thu, May 11, 2017 at 10:59:19PM +0200, Timo Rothenpieler wrote:
>> ---
>>   configure | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> This doesnt apply so i cant test this or dependant patches
> 
> Applying: configure: add cuda-sdk for things requiring full CUDA sdk
> error: sha1 information is lacking or useless (configure).
> error: could not build fake ancestor
> Patch failed at 0001 configure: add cuda-sdk for things requiring full CUDA sdk
> The copy of the patch that failed is found in: .git/rebase-apply/patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".

That's weird, this series was made with format-patch + send-email, 
without any manual modifications in between.

Can also find it on github:
https://github.com/BtbN/FFmpeg/commit/d4e1bc56c40dc4749b8f5cee6f9037d53ffc245d.patch

I can also try re-sending the series, but I don't know anything I could 
potentially do different.
James Almer May 12, 2017, 7:33 p.m. UTC | #8
On 5/12/2017 4:28 PM, Timo Rothenpieler wrote:
> Am 12.05.2017 um 20:48 schrieb Michael Niedermayer:
>> On Thu, May 11, 2017 at 10:59:19PM +0200, Timo Rothenpieler wrote:
>>> ---
>>>   configure | 6 ++++--
>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> This doesnt apply so i cant test this or dependant patches
>>
>> Applying: configure: add cuda-sdk for things requiring full CUDA sdk
>> error: sha1 information is lacking or useless (configure).
>> error: could not build fake ancestor
>> Patch failed at 0001 configure: add cuda-sdk for things requiring full
>> CUDA sdk
>> The copy of the patch that failed is found in: .git/rebase-apply/patch
>> When you have resolved this problem, run "git am --continue".
>> If you prefer to skip this patch, run "git am --skip" instead.
>> To restore the original branch and stop patching, run "git am --abort".
> 
> That's weird, this series was made with format-patch + send-email,
> without any manual modifications in between.
> 
> Can also find it on github:
> https://github.com/BtbN/FFmpeg/commit/d4e1bc56c40dc4749b8f5cee6f9037d53ffc245d.patch
> 
> 
> I can also try re-sending the series, but I don't know anything I could
> potentially do different.

Probably because it's missing
https://github.com/BtbN/FFmpeg/commit/5048e1159a6f5f5d9cf4cbd78535bc73da6b32bc
which modifies configure as well, and generates a conflict that git am
can't work around when you skip it.
Timo Rothenpieler May 12, 2017, 7:35 p.m. UTC | #9
>> I can also try re-sending the series, but I don't know anything I could
>> potentially do different.
> 
> Probably because it's missing
> https://github.com/BtbN/FFmpeg/commit/5048e1159a6f5f5d9cf4cbd78535bc73da6b32bc
> which modifies configure as well, and generates a conflict that git am
> can't work around when you skip it.

Oh, that's not supposed to be in there.
Will fix and re-send.
diff mbox

Patch

diff --git a/configure b/configure
index c347336426..ef2134828b 100755
--- a/configure
+++ b/configure
@@ -297,6 +297,7 @@  External library support:
   The following libraries provide various hardware acceleration features:
   --disable-audiotoolbox   disable Apple AudioToolbox code [autodetect]
   --disable-cuda           disable dynamically linked Nvidia CUDA code [autodetect]
+  --enable-cuda-sdk        enable CUDA features that require the CUDA SDK [no]
   --disable-cuvid          disable Nvidia CUVID support [autodetect]
   --disable-d3d11va        disable Microsoft Direct3D 11 video acceleration code [autodetect]
   --disable-dxva2          disable Microsoft DirectX 9 video acceleration code [autodetect]
@@ -1598,6 +1599,7 @@  HWACCEL_AUTODETECT_LIBRARY_LIST="
 "
 
 HWACCEL_LIBRARY_NONFREE_LIST="
+    cuda_sdk
     libnpp
 "
 
@@ -2716,7 +2718,7 @@  qsvenc_select="qsv"
 vaapi_encode_deps="vaapi"
 
 hwupload_cuda_filter_deps="cuda"
-scale_npp_filter_deps="cuda libnpp"
+scale_npp_filter_deps="cuda_sdk libnpp"
 nvpp_filter_deps="cuda"
 
 nvenc_deps="cuda"
@@ -5756,7 +5758,7 @@  done
 enabled avfoundation_indev && { check_header_objcc AVFoundation/AVFoundation.h || disable avfoundation_indev; }
 enabled avfoundation_indev && { check_lib avfoundation_indev CoreGraphics/CoreGraphics.h CGGetActiveDisplayList -framework CoreGraphics ||
                                 check_lib avfoundation_indev ApplicationServices/ApplicationServices.h CGGetActiveDisplayList -framework ApplicationServices; }
-enabled cuda              && check_header cuda.h # this is not a dependency
+enabled cuda_sdk          && require cuda_sdk cuda.h cuCtxCreate -lcuda
 enabled cuvid             && { enabled cuda ||
                                die "ERROR: CUVID requires CUDA"; }
 enabled chromaprint       && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint