Re: [FFmpeg-devel] [PATCH] configure: rename cuda to ffnvcodec

2018-03-05 Thread Timo Rothenpieler

Am 04.03.2018 um 20:15 schrieb Compn:

On Sat,  3 Mar 2018 22:39:45 +0100, Timo Rothenpieler
 wrote:


Right now, if someone configures ffmpeg with for example --enable-nvenc they 
will
get an error message complaining about missing cuda.
This is very confusing and already has lead people into installing the CUDA SDK,
even though it's not what they need.

This will make it complain about ffnvcodec instead.


i'm not objecting.

but if you put a error message that explains what a person needs when
it errors , that might also be a good idea (and it would also only be
a one or two line change).

-compn


I looked into doing that, but the code handling those errors in a 
generic way would need quite some ugly special cases to do that.


Still, I might look into giving a better error that at some point.

It being called cuda is inaccurate anyway, so renaming it to ffnvcodec 
is not too terrible.


So for now, I just pushed this, and will look into a more verbose error 
later.




smime.p7s
Description: S/MIME Cryptographic Signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: rename cuda to ffnvcodec

2018-03-04 Thread Compn
On Sat,  3 Mar 2018 22:39:45 +0100, Timo Rothenpieler
 wrote:

> Right now, if someone configures ffmpeg with for example --enable-nvenc they 
> will
> get an error message complaining about missing cuda.
> This is very confusing and already has lead people into installing the CUDA 
> SDK,
> even though it's not what they need.
> 
> This will make it complain about ffnvcodec instead.

i'm not objecting.

but if you put a error message that explains what a person needs when
it errors , that might also be a good idea (and it would also only be
a one or two line change).

-compn
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: rename cuda to ffnvcodec

2018-03-03 Thread Philip Langdale
On Sat,  3 Mar 2018 22:39:45 +0100
Timo Rothenpieler  wrote:

> Right now, if someone configures ffmpeg with for example
> --enable-nvenc they will get an error message complaining about
> missing cuda. This is very confusing and already has lead people into
> installing the CUDA SDK, even though it's not what they need.
> 
> This will make it complain about ffnvcodec instead.
> 
> Signed-off-by: Timo Rothenpieler 

LGTM.

--phil
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] configure: rename cuda to ffnvcodec

2018-03-03 Thread Timo Rothenpieler
Right now, if someone configures ffmpeg with for example --enable-nvenc they 
will
get an error message complaining about missing cuda.
This is very confusing and already has lead people into installing the CUDA SDK,
even though it's not what they need.

This will make it complain about ffnvcodec instead.

Signed-off-by: Timo Rothenpieler 
---
 configure | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/configure b/configure
index fe81ba31b5..5fbab4501d 100755
--- a/configure
+++ b/configure
@@ -307,11 +307,11 @@ External library support:
   The following libraries provide various hardware acceleration features:
   --disable-amfdisable AMF video encoding code [autodetect]
   --disable-audiotoolbox   disable Apple AudioToolbox code [autodetect]
-  --disable-cuda   disable dynamically linked Nvidia CUDA code 
[autodetect]
   --enable-cuda-sdkenable CUDA features that require the CUDA SDK [no]
   --disable-cuvid  disable Nvidia CUVID support [autodetect]
   --disable-d3d11vadisable Microsoft Direct3D 11 video acceleration 
code [autodetect]
   --disable-dxva2  disable Microsoft DirectX 9 video acceleration code 
[autodetect]
+  --disable-ffnvcodec  disable dynamically linked Nvidia code [autodetect]
   --enable-libdrm  enable DRM code (Linux) [no]
   --enable-libmfx  enable Intel MediaSDK (AKA Quick Sync Video) code 
via libmfx [no]
   --enable-libnpp  enable Nvidia Performance Primitives-based code [no]
@@ -1660,6 +1660,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST="
 cuvid
 d3d11va
 dxva2
+ffnvcodec
 nvdec
 nvenc
 vaapi
@@ -2675,11 +2676,12 @@ zmbv_encoder_deps="zlib"
 
 # hardware accelerators
 crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
-cuda_deps_any="libdl LoadLibrary"
-cuvid_deps="cuda"
+cuda_deps="ffnvcodec"
+cuvid_deps="ffnvcodec"
 d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext"
 dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
-nvdec_deps="cuda"
+ffnvcodec_deps_any="libdl LoadLibrary"
+nvdec_deps="ffnvcodec"
 videotoolbox_hwaccel_deps="videotoolbox pthreads"
 videotoolbox_hwaccel_extralibs="-framework QuartzCore"
 xvmc_deps="X11_extensions_XvMClib_h"
@@ -2797,13 +2799,13 @@ qsvvpp_select="qsv"
 vaapi_encode_deps="vaapi"
 v4l2_m2m_deps_any="linux_videodev2_h"
 
-hwupload_cuda_filter_deps="cuda"
-scale_npp_filter_deps="cuda libnpp"
+hwupload_cuda_filter_deps="ffnvcodec"
+scale_npp_filter_deps="ffnvcodec libnpp"
 scale_cuda_filter_deps="cuda_sdk"
 thumbnail_cuda_filter_deps="cuda_sdk"
 
 amf_deps_any="libdl LoadLibrary"
-nvenc_deps="cuda"
+nvenc_deps="ffnvcodec"
 nvenc_deps_any="libdl LoadLibrary"
 nvenc_encoder_deps="nvenc"
 
@@ -3357,7 +3359,7 @@ avformat_deps="avcodec avutil"
 avformat_suggest="libm network zlib"
 avresample_deps="avutil"
 avresample_suggest="libm"
-avutil_suggest="clock_gettime cuda libm libdrm libmfx opencl user32 vaapi 
videotoolbox corefoundation corevideo coremedia wincrypt"
+avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi 
videotoolbox corefoundation corevideo coremedia wincrypt"
 postproc_deps="avutil gpl"
 postproc_suggest="libm"
 swresample_deps="avutil"
@@ -5811,8 +5813,10 @@ check_type "va/va.h va/va_enc_vp9.h"  
"VAEncPictureParameterBufferVP9"
 
 check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
 
-check_pkg_config cuda "ffnvcodec >= 8.0.14.1" \
-"ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h 
ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" ""
+if ! disabled ffnvcodec; then
+check_pkg_config ffnvcodec "ffnvcodec >= 8.0.14.1" \
+"ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h 
ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" ""
+fi
 
 check_cpp_condition windows.h 
"!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" && enable winrt || disable 
winrt
 
@@ -6257,11 +6261,11 @@ if enabled x86; then
 mingw32*|mingw64*|win32|win64|linux|cygwin*)
 ;;
 *)
-disable cuda cuvid nvdec nvenc
+disable ffnvcodec cuvid nvdec nvenc
 ;;
 esac
 else
-disable cuda cuvid nvdec nvenc
+disable ffnvcodec cuvid nvdec nvenc
 fi
 
 enabled nvenc &&
-- 
2.15.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel