diff mbox

[FFmpeg-devel,1/4] configure: require external ffnvcodec headers

Message ID 20171204194145.20754-1-timo@rothenpieler.org
State New
Headers show

Commit Message

Timo Rothenpieler Dec. 4, 2017, 7:41 p.m. UTC
The external headers can be found at
https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git
---
 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Carl Eugen Hoyos Dec. 4, 2017, 7:58 p.m. UTC | #1
2017-12-04 20:41 GMT+01:00 Timo Rothenpieler <timo@rothenpieler.org>:
> The external headers can be found at
> https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git

Afaict, 1, 2 and four should be merged.

Could you explain (repeat) why this is necessary?
I suspect this will hit many users.

Thank you, Carl Eugen
Timo Rothenpieler Dec. 4, 2017, 8:12 p.m. UTC | #2
Am 04.12.2017 um 20:58 schrieb Carl Eugen Hoyos:
> 2017-12-04 20:41 GMT+01:00 Timo Rothenpieler <timo@rothenpieler.org>:
>> The external headers can be found at
>> https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git
> 
> Afaict, 1, 2 and four should be merged.
> 
> Could you explain (repeat) why this is necessary?
> I suspect this will hit many users.
> 
> Thank you, Carl Eugen

You mean leaving the headers in tree for now, even though they are 
completely unused after 1 and 2?
Carl Eugen Hoyos Dec. 4, 2017, 8:18 p.m. UTC | #3
2017-12-04 21:12 GMT+01:00 Timo Rothenpieler <timo@rothenpieler.org>:
> Am 04.12.2017 um 20:58 schrieb Carl Eugen Hoyos:
>>
>> 2017-12-04 20:41 GMT+01:00 Timo Rothenpieler <timo@rothenpieler.org>:
>>>
>>> The external headers can be found at
>>> https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git
>>
>>
>> Afaict, 1, 2 and four should be merged.
>>
>> Could you explain (repeat) why this is necessary?
>> I suspect this will hit many users.
>>
>> Thank you, Carl Eugen
>
>
> You mean leaving the headers in tree for now, even
> though they are completely unused after 1 and 2?

Patches 1, 2 and four should be merged, patch 3 can
be a separate patch (or could be merged).

Since the first commit will hit a large number of users,
the commit message should contain some explanation.
A longer explanation in the email suggesting the change
is imo useful.

Carl Eugen
wm4 Dec. 4, 2017, 9:48 p.m. UTC | #4
On Mon,  4 Dec 2017 20:41:42 +0100
Timo Rothenpieler <timo@rothenpieler.org> wrote:

> The external headers can be found at
> https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git
> ---

LGTM, although I would have preferred giving the include paths a name
not specific to ffmpeg. But as I understand, the headers contain
multiple modifications anyway, and are not the same as nvidia's, so
should be ok.
Michael Niedermayer Dec. 5, 2017, 2:45 p.m. UTC | #5
On Mon, Dec 04, 2017 at 08:41:42PM +0100, Timo Rothenpieler wrote:
> The external headers can be found at
> https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git
> ---
>  configure | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

i cloned the repo referenced and did a make install
but

./configure --enable-nvenc
ERROR: nvenc requested, but not all dependencies are satisfied: cuda

ls -alF /usr/local/include/ffnvcodec/
ls: cannot open directory /usr/local/include/ffnvcodec/: Permission denied


[...]
diff mbox

Patch

diff --git a/configure b/configure
index d05388638d..b4d82f1df6 100755
--- a/configure
+++ b/configure
@@ -2662,6 +2662,7 @@  zmbv_encoder_deps="zlib"
 
 # hardware accelerators
 crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
+cuda_deps="ffnvcodec"
 cuda_deps_any="libdl LoadLibrary"
 cuvid_deps="cuda"
 d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext"
@@ -5743,6 +5744,9 @@  check_type "va/va.h va/va_enc_vp9.h"  "VAEncPictureParameterBufferVP9"
 
 check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
 
+check_pkg_config ffnvcodec "ffnvcodec >= 8.0" \
+    "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" ""
+
 check_cpp_condition windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" && enable winrt || disable winrt
 
 if ! disabled w32threads && ! enabled pthreads; then
@@ -6196,7 +6200,7 @@  fi
 
 enabled nvenc &&
     check_cc -I$source_path <<EOF || disable nvenc
-#include "compat/nvenc/nvEncodeAPI.h"
+#include <ffnvcodec/nvEncodeAPI.h>
 NV_ENCODE_API_FUNCTION_LIST flist;
 void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } }; }
 int main(void) { return 0; }