Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-10 Thread Gyan Doshi


On 12/11/2017 12:06 AM, Mark Thompson wrote:


--disable-hwaccels does not disable hardware codecs: it disables hwaccels only, 
decoders and encoders will still be present.

If you want to disable decoder and encoder wrappers as well then you will need 
to either use --disable-decoders --disable-encoders or disable them 
individually.


Sounds unwieldy. All solutions seem to me to require creating new lists. 
Patch withdrawn.



Under what circumstances does a user want to disable autodetect for some subset 
of libraries while allowing it for others?  There can still be surprise 
dependencies, which is presumably the thing they want to avoid.


Not surprise deps but deadweights. If nvdec wrapper isn't enabled then 
nvdec shouldn't be linked.  Not a concern for most libs which are 
manually enabled.


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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-10 Thread Mark Thompson
On 10/12/17 18:22, Gyan Doshi wrote:
> On 12/10/2017 10:44 PM, Mark Thompson wrote:
> 
>> Can you explain what you actually want to achieve here?  It sounds more like 
>> you want --disable-autodetect (hardware libraries are not the only ones 
>> which can give surprise dependencies).
> 
> If the ffmpeg HW decoder/encoder wrappers are disabled, then associated 
> libraries cuda, d3d11.. should also be disabled.
> 
> They are not because of autodetect. configure picks up 6 libs here. And since 
> they are AD, users may not realize that they are included - I didn't; I 
> thought disable-hwaccels did that - till I happened to check configure's 
> result for another lib I was linking.

--disable-hwaccels does not disable hardware codecs: it disables hwaccels only, 
decoders and encoders will still be present.

If you want to disable decoder and encoder wrappers as well then you will need 
to either use --disable-decoders --disable-encoders or disable them 
individually.

(And that still doesn't disable filtering or hwcontext generic support using 
these libraries, which can be used separately.)

> --disable-autodetect disables others besides the HW libs. The users may not 
> know if they want/need these other libs, but if HW codecs are disabled, then 
> those libs used exclusively by them, should not get linked.
Under what circumstances does a user want to disable autodetect for some subset 
of libraries while allowing it for others?  There can still be surprise 
dependencies, which is presumably the thing they want to avoid.

> P.S. Isn't AMF for providing support for AMD GPU decoder/encoders?

Just encoders, but yes.

- Mark

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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-10 Thread Gyan Doshi

On 12/10/2017 10:44 PM, Mark Thompson wrote:


Can you explain what you actually want to achieve here?  It sounds more like 
you want --disable-autodetect (hardware libraries are not the only ones which 
can give surprise dependencies).


If the ffmpeg HW decoder/encoder wrappers are disabled, then associated 
libraries cuda, d3d11.. should also be disabled.


They are not because of autodetect. configure picks up 6 libs here. And 
since they are AD, users may not realize that they are included - I 
didn't; I thought disable-hwaccels did that - till I happened to check 
configure's result for another lib I was linking.


--disable-autodetect disables others besides the HW libs. The users may 
not know if they want/need these other libs, but if HW codecs are 
disabled, then those libs used exclusively by them, should not get linked.



Regards,
Gyan

P.S. Isn't AMF for providing support for AMD GPU decoder/encoders?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-10 Thread Mark Thompson
On 07/12/17 09:31, Gyan Doshi wrote:
> On 12/7/2017 12:59 PM, Tobias Rapp wrote:
>>
>> Why not add the HWACCEL_AUTODETECT_LIBRARY_LIST to --disable-hwaccels?
> 
> That is a better choice but there wasn't a bespoke case for 
> '--disable-hwaccels', so originally ignored that possibility. Added it in 
> attached (new) patch.
> 
> Either one - this or original patch - works for me.
> 
> From f5c02c73ad3560a2173611ec1e76a460cf70d944 Mon Sep 17 00:00:00 2001
> From: Gyan Doshi 
> Date: Thu, 7 Dec 2017 14:44:01 +0530
> Subject: [PATCH] configure - extend disable_hwaccels to disable autodetected
>  hwaccel libs
> 
> ---
>  configure | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index d05388638d..77812759fd 100755
> --- a/configure
> +++ b/configure
> @@ -159,7 +159,7 @@ Individual component options:
>--disable-decoders   disable all decoders
>--disable-hwaccel=NAME   disable hwaccel NAME
>--enable-hwaccel=NAMEenable hwaccel NAME
> -  --disable-hwaccels   disable all hwaccels
> +  --disable-hwaccels   disable all hwaccels and autodetected hwaccel libs
>--disable-muxer=NAME disable muxer NAME
>--enable-muxer=NAME  enable muxer NAME
>--disable-muxers disable all muxers
> @@ -3630,6 +3630,9 @@ for opt do
>  --extra-libs=*)
>  add_extralibs $optval
>  ;;
> +--disable-hwaccels)
> +disable $HWACCEL_LIST $HWACCEL_AUTODETECT_LIBRARY_LIST
> +;;
>  --disable-devices)
>  disable $INDEV_LIST $OUTDEV_LIST
>  ;;
> -- 
> 2.11.1.windows.1

The --disable-foos options consistently disable all foos, I don't think it 
should magically do something else as well.  This is also confusing the 
internal concept of hwaccels (AVHWAccel) with other things providing access to 
hardware features (e.g. you are making it disable AMF and V4L2 M2M, which are 
not hwaccels).

Can you explain what you actually want to achieve here?  It sounds more like 
you want --disable-autodetect (hardware libraries are not the only ones which 
can give surprise dependencies).

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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-10 Thread Carl Eugen Hoyos
2017-12-10 13:00 GMT+01:00 Gyan Doshi :

> Ping for the patch

Threaten to apply and wait a few days.

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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-10 Thread Gyan Doshi


On 12/8/2017 6:18 PM, Gyan Doshi wrote:


On 12/8/2017 4:56 PM, Tobias Rapp wrote:

includes autodetected hwaccels, but that's just my personal opinion. I 
leave it to the maintainer of the file to decide what to push.


Speaking of which, who is the maintainer of configure? Neither the file 
nor MAINTAINERS has a name.


Regards,
Gyan


Ping for the patch, and the question.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-08 Thread Gyan Doshi


On 12/8/2017 4:56 PM, Tobias Rapp wrote:

includes autodetected hwaccels, but that's just my personal opinion. I 
leave it to the maintainer of the file to decide what to push.


Speaking of which, who is the maintainer of configure? Neither the file 
nor MAINTAINERS has a name.


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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-08 Thread Tobias Rapp

On 07.12.2017 10:31, Gyan Doshi wrote:

On 12/7/2017 12:59 PM, Tobias Rapp wrote:


Why not add the HWACCEL_AUTODETECT_LIBRARY_LIST to --disable-hwaccels?


That is a better choice but there wasn't a bespoke case for 
'--disable-hwaccels', so originally ignored that possibility. Added it 
in attached (new) patch.


Either one - this or original patch - works for me.


This one makes more sense to me as "disable all hwaccels" implicitly 
includes autodetected hwaccels, but that's just my personal opinion. I 
leave it to the maintainer of the file to decide what to push.


Regards,
Tobias

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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-07 Thread Gyan Doshi

On 12/7/2017 12:59 PM, Tobias Rapp wrote:


Why not add the HWACCEL_AUTODETECT_LIBRARY_LIST to --disable-hwaccels?


That is a better choice but there wasn't a bespoke case for 
'--disable-hwaccels', so originally ignored that possibility. Added it 
in attached (new) patch.


Either one - this or original patch - works for me.

Regards,
Gyan
From f5c02c73ad3560a2173611ec1e76a460cf70d944 Mon Sep 17 00:00:00 2001
From: Gyan Doshi 
Date: Thu, 7 Dec 2017 14:44:01 +0530
Subject: [PATCH] configure - extend disable_hwaccels to disable autodetected
 hwaccel libs

---
 configure | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index d05388638d..77812759fd 100755
--- a/configure
+++ b/configure
@@ -159,7 +159,7 @@ Individual component options:
   --disable-decoders   disable all decoders
   --disable-hwaccel=NAME   disable hwaccel NAME
   --enable-hwaccel=NAMEenable hwaccel NAME
-  --disable-hwaccels   disable all hwaccels
+  --disable-hwaccels   disable all hwaccels and autodetected hwaccel libs
   --disable-muxer=NAME disable muxer NAME
   --enable-muxer=NAME  enable muxer NAME
   --disable-muxers disable all muxers
@@ -3630,6 +3630,9 @@ for opt do
 --extra-libs=*)
 add_extralibs $optval
 ;;
+--disable-hwaccels)
+disable $HWACCEL_LIST $HWACCEL_AUTODETECT_LIBRARY_LIST
+;;
 --disable-devices)
 disable $INDEV_LIST $OUTDEV_LIST
 ;;
-- 
2.11.1.windows.1___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-06 Thread Tobias Rapp

On 30.11.2017 11:58, Gyan Doshi wrote:

On 11/30/2017 4:19 PM, Clément Bœsch wrote:


Is --disable-autodetect broken/not complete for you?


This disables more than just the hwaccel libs. I've tested my patch 
locally and configure lists no entries under External Libraries 
Providing Hardware Acceleration, unlike with --disable-hwaccels.


Why not add the HWACCEL_AUTODETECT_LIBRARY_LIST to --disable-hwaccels?

Regards,
Tobias

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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-06 Thread Gyan Doshi

On 12/4/2017 9:47 AM, Gyan Doshi wrote:


On 11/30/2017 3:58 PM, Gyan Doshi wrote:
I added --disable-hwaccels during configure and noticed that all 
autodetected hwaccel libs were still being linked - 6 in my case, 
which makes for a more bloated binary than warranted.


Turns out the option only disables native components which make use of 
the hwaccel libs. The reporter of ticket #3906 had a similar concern.


Added option to disable all autodetected hwaccel libs.

Regards,
Gyan


Ping.


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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-12-03 Thread Gyan Doshi


On 11/30/2017 3:58 PM, Gyan Doshi wrote:
I added --disable-hwaccels during configure and noticed that all 
autodetected hwaccel libs were still being linked - 6 in my case, which 
makes for a more bloated binary than warranted.


Turns out the option only disables native components which make use of 
the hwaccel libs. The reporter of ticket #3906 had a similar concern.


Added option to disable all autodetected hwaccel libs.

Regards,
Gyan


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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-11-30 Thread Gyan Doshi



On 11/30/2017 4:19 PM, Clément Bœsch wrote:


Is --disable-autodetect broken/not complete for you?


This disables more than just the hwaccel libs. I've tested my patch 
locally and configure lists no entries under External Libraries 
Providing Hardware Acceleration, unlike with --disable-hwaccels.


It builds without error (on Win7-64 / MinGW64).

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


Re: [FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-11-30 Thread Clément Bœsch
On Thu, Nov 30, 2017 at 03:58:21PM +0530, Gyan Doshi wrote:
> I added --disable-hwaccels during configure and noticed that all
> autodetected hwaccel libs were still being linked - 6 in my case, which
> makes for a more bloated binary than warranted.
> 
> Turns out the option only disables native components which make use of the
> hwaccel libs. The reporter of ticket #3906 had a similar concern.
> 
> Added option to disable all autodetected hwaccel libs.
> 

Is --disable-autodetect broken/not complete for you?

The autodetect handling in the configure is rather sensible as it needs to
work properly in combination with other options (see for instance around
lines 3720-3740), which makes me believe that the patch you're proposing
may not be enough.

Regards,

-- 
Clément B.


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] configure: Allow users to disable all hwaccel libraries

2017-11-30 Thread Gyan Doshi
I added --disable-hwaccels during configure and noticed that all 
autodetected hwaccel libs were still being linked - 6 in my case, which 
makes for a more bloated binary than warranted.


Turns out the option only disables native components which make use of 
the hwaccel libs. The reporter of ticket #3906 had a similar concern.


Added option to disable all autodetected hwaccel libs.

Regards,
Gyan
From e89ed9ec2f476457552290315171bd2ef89490a5 Mon Sep 17 00:00:00 2001
From: Gyan Doshi 
Date: Thu, 30 Nov 2017 13:48:57 +0530
Subject: [PATCH] configure: Allow users to disable all autodetected libraries
 providing hardware acceleration.

---
 configure | 4 
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index 1fa16e9dba..e5b390c955 100755
--- a/configure
+++ b/configure
@@ -304,6 +304,7 @@ External library support:
   --disable-zlib   disable zlib [autodetect]
 
   The following libraries provide various hardware acceleration features:
+  --disable-hwaccel-libs   disable all autodetected hwaccel libraries
   --disable-amfdisable AMF video encoding code [autodetect]
   --disable-audiotoolbox   disable Apple AudioToolbox code [autodetect]
   --disable-cuda   disable dynamically linked Nvidia CUDA code 
[autodetect]
@@ -3629,6 +3630,9 @@ for opt do
 --extra-libs=*)
 add_extralibs $optval
 ;;
+--disable-hwaccel-libs)
+disable $HWACCEL_AUTODETECT_LIBRARY_LIST
+;;
 --disable-devices)
 disable $INDEV_LIST $OUTDEV_LIST
 ;;
-- 
2.11.1.windows.1___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel