Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-29 Thread Matt Oliver
>
> +enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h
> || disable coreimage_filter; }
> +enabled coreimagesrc_filter && { check_header_objcc
> QuartzCore/CoreImage.h || disable coreimagesrc_filter; }
>

Wouldnt it be simpler to just add an item to HEADERS_LIST for
QuartzCore_CoreImage_h then this check only needs to be done once as both
filters can then just depend on the header list entry.
e.g.
coreimage_filter_deps="QuartzCore_CoreImage_h"
...
check_header_objcc QuartzCore/CoreImage.h

This would also remove the need for the duplicate  _extralibs= lines aswell.

VideoToolbox currently does something like this although much more
complicated as it was added as an external lib despite being in a similar
boat to coreimage.

FYI I noticed what looks like an error in check_header_objcc as the code
"enable_safe $headers" I believe should be "enable_safe $header" (no 's').
I dont have OSX to double check this.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-25 Thread Thilo Borgmann
Am 22.03.16 um 11:44 schrieb Thilo Borgmann:
> Am 19.03.16 um 18:26 schrieb Michael Niedermayer:
>> On Sat, Mar 19, 2016 at 04:31:56PM +0100, Thilo Borgmann wrote:
>>> All comments addressed,
>>
>>> linux compilation fixed.
>>
>> confirmed, thx
> 
> If there are no more comments I'll apply soon.

Applied.

Thanks,
Thilo

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-22 Thread pon pon
2016-03-22 19:44 GMT+09:00 Thilo Borgmann :

> Am 19.03.16 um 18:26 schrieb Michael Niedermayer:
>
> If there are no more comments I'll apply soon.

i am looking forward to  your work.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-22 Thread Thilo Borgmann
Am 19.03.16 um 18:26 schrieb Michael Niedermayer:
> On Sat, Mar 19, 2016 at 04:31:56PM +0100, Thilo Borgmann wrote:
>> All comments addressed,
> 
>> linux compilation fixed.
> 
> confirmed, thx

If there are no more comments I'll apply soon.

-Thilo

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-20 Thread Thilo Borgmann
Am 16.03.16 um 22:24 schrieb Thilo Borgmann:
> Am 16.03.16 um 21:10 schrieb Moritz Barsnick:
>> [...]
> 
> All addressed in newest patch, thanks!

Any more comments from anyone?

@Clement: Do you like it better this way?

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-20 Thread Clément Bœsch
On Wed, Mar 16, 2016 at 10:24:09PM +0100, Thilo Borgmann wrote:
[...]

Not sure if I'm commenting on the last version...

> From b6b889c06edc7872f0a31fd0482793a199ddd28e Mon Sep 17 00:00:00 2001
> From: Thilo Borgmann 
> Date: Wed, 16 Mar 2016 22:18:20 +0100

> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>  on OSX.

lavfi, not lavf

> 
> ---
>  Changelog  |   1 +
>  MAINTAINERS|   1 +
>  configure  |   2 +
>  doc/filters.texi   | 165 +++
>  libavfilter/Makefile   |   1 +
>  libavfilter/allfilters.c   |   2 +
>  libavfilter/vf_coreimage.m | 716 
> +
>  7 files changed, 888 insertions(+)
>  create mode 100644 libavfilter/vf_coreimage.m
> 

don't forget lavfi minor version bump.

> diff --git a/Changelog b/Changelog
> index 1f57f5e..5053a86 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -12,6 +12,7 @@ version :
>  - ciescope filter
>  - protocol blacklisting API
>  - MediaCodec H264 decoding
> +- coreimage filter (GPU based image filtering on OSX)
>  
>  
>  version 3.0:
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 531c21d..a993a67 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -370,6 +370,7 @@ Filters:
>vf_colorbalance.c Paul B Mahol
>vf_colorkey.c Timo Rothenpieler
>vf_colorlevels.c  Paul B Mahol
> +  vf_coreimage.mThilo Borgmann
>vf_deband.c   Paul B Mahol
>vf_dejudder.c Nicholas Robbins
>vf_delogo.c   Jean Delvare (CC )
> diff --git a/configure b/configure
> index 1b189328..da51e06 100755
> --- a/configure
> +++ b/configure
> @@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
>  frei0r_src_filter_extralibs='$ldl'
>  ladspa_filter_extralibs='$ldl'
>  nvenc_encoder_extralibs='$ldl'

> +coreimage_filter_extralibs="-framework QuartzCore -framework AppKit 
> -framework OpenGL"

don't you need the same for coreimagesrc?

>  
>  if ! disabled network; then
>  check_func getaddrinfo $network_extralibs
> @@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
> LoadLibrary; } ||
> die "ERROR: LoadLibrary/dlopen not found for 
> avisynth"; }
>  enabled cuda  && check_lib cuda.h cuInit -lcuda
>  enabled chromaprint   && require chromaprint chromaprint.h 
> chromaprint_get_version -lchromaprint
> +enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || 
> disable coreimage_filter; }

ditto

>  enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
> DeckLinkAPI.h header not found"; }
>  enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
> header not found"; }
>  enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
> diff --git a/doc/filters.texi b/doc/filters.texi
> index c093927..f6767ec 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -4955,6 +4955,111 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
> 2:-2 -1 0 -1 1 1 0 1 2:-2 -
>  Copy the input source unchanged to the output. This is mainly useful for
>  testing purposes.
>  
> +@anchor{coreimage}
> +@section coreimage
> +Video filtering on GPU using Apple's CoreImage API on OSX.
> +
> +Hardware acceleration is based on an OpenGL context. Usually, this means it 
> is
> +processed by video hardware. However, software-based OpenGL implementations
> +exist which means there is no guarantee for hardware processing. It depends 
> on
> +the respective OSX.
> +
> +There are many filters and image generators provided by Apple that come with 
> a
> +large variety of options. The filter has to be referenced by its name along
> +with its options.
> +
> +The coreimage filter accepts the following options:
> +@table @option
> +@item list_filters
> +List all available filters and generators along with all their respective
> +options as well as possible minimum and maximum values along with the default
> +values.

> +@example
> +list_filters=true
> +@end example

Indent is done at style level. Same issue below.

[...]
> +The @ref{coreimagesrc} video source can be used for generating input images

The anchor doesn't seem to exist

[...]
> +typedef struct CoreImageContext {
> +const AVClass  *class;
> +

> +intis_video_source; ///< filter is used as video source

nit: unaligned vertically

> +
> +int w, h;   ///< video size
> +AVRational  sar;///< sample aspect ratio
> +AVRational  frame_rate; ///< video frame rate
> +AVRational  time_base;  ///< stream time base
> +int64_t duration;   ///< duration expressed in 
> microseconds
> +unsigned intnb_frame;   ///< sequential frame number
> 

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-20 Thread Thilo Borgmann
Am 16.03.16 um 14:44 schrieb Thilo Borgmann:
> Am 16.03.16 um 14:43 schrieb Thilo Borgmann:
>> Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
>>> Add coreimage filter for OSX.
>>
>> Included all comments so far.
>> Also features a "coreimagesrc" video source like suggested by Nicolas.
> 
> Actually suggested by Clement. Sorry.

av_free_frame() for picref in uninit() locally added.

-Thilo

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-19 Thread pon pon
2016-03-20 0:31 GMT+09:00 Thilo Borgmann :

> All comments addressed, linux compilation fixed.
>
fixed.
can build.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-19 Thread Thilo Borgmann
Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
> Add coreimage filter for OSX.

Included all comments so far.
Also features a "coreimagesrc" video source like suggested by Nicolas.

Updated patch attached, please comment.

-Thilo

From b269b36cf2c5da15e54c11176aaa71361d0f4520 Mon Sep 17 00:00:00 2001
From: Thilo Borgmann 
Date: Wed, 16 Mar 2016 14:38:18 +0100
Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
 on OSX.

---
 Changelog  |   1 +
 MAINTAINERS|   1 +
 configure  |   2 +
 doc/filters.texi   | 153 ++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   2 +
 libavfilter/vf_coreimage.m | 715 +
 7 files changed, 875 insertions(+)
 create mode 100644 libavfilter/vf_coreimage.m

diff --git a/Changelog b/Changelog
index 1f57f5e..5053a86 100644
--- a/Changelog
+++ b/Changelog
@@ -12,6 +12,7 @@ version :
 - ciescope filter
 - protocol blacklisting API
 - MediaCodec H264 decoding
+- coreimage filter (GPU based image filtering on OSX)
 
 
 version 3.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 531c21d..a993a67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,6 +370,7 @@ Filters:
   vf_colorbalance.c Paul B Mahol
   vf_colorkey.c Timo Rothenpieler
   vf_colorlevels.c  Paul B Mahol
+  vf_coreimage.mThilo Borgmann
   vf_deband.c   Paul B Mahol
   vf_dejudder.c Nicholas Robbins
   vf_delogo.c   Jean Delvare (CC )
diff --git a/configure b/configure
index 1b189328..da51e06 100755
--- a/configure
+++ b/configure
@@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
 frei0r_src_filter_extralibs='$ldl'
 ladspa_filter_extralibs='$ldl'
 nvenc_encoder_extralibs='$ldl'
+coreimage_filter_extralibs="-framework QuartzCore -framework AppKit -framework 
OpenGL"
 
 if ! disabled network; then
 check_func getaddrinfo $network_extralibs
@@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
LoadLibrary; } ||
die "ERROR: LoadLibrary/dlopen not found for 
avisynth"; }
 enabled cuda  && check_lib cuda.h cuInit -lcuda
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
+enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || 
disable coreimage_filter; }
 enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; }
 enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
header not found"; }
 enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
diff --git a/doc/filters.texi b/doc/filters.texi
index c093927..06a225e 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4955,6 +4955,106 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
2:-2 -1 0 -1 1 1 0 1 2:-2 -
 Copy the input source unchanged to the output. This is mainly useful for
 testing purposes.
 
+@anchor{coreimage}
+@section coreimage
+Video filtering on GPU using Apple's CoreImage API on OSX.
+
+Hardware acceleration is based on an OpenGL context. Usually, this means it is
+processed by video hardware. However, software-based OpenGL implementations
+exist which means there is no guarantee for hardware processing. It depends on
+the respective OSX.
+
+There are many filters and image generators provided by Apple that come with a
+large variety of options. The filter has to be referenced by its name along
+with its options.
+
+The coreimage filter accepts the following options:
+@table @option
+@item list_filters
+List all available filters along with all their respective options as well as
+possible minimum and maximum values along with the default values.
+@example
+list_filters=true
+@end example
+
+@item filter
+Specify all filters by their respective name and options.
+Use @var{list_filters} to determine all valid filter names and options.
+Numerical options are specified by a float value and are automatically clamped
+to their respective value range.  Vector and color options have to be specified
+by a list of space separated float values. Character escaping has to be done.
+A special option name @code{default} is available to use default options for a
+filter.
+It is required to specify either @code{default} or at least one of the filter 
options.
+All omitted options are used with their default values.
+The syntax of the filter string is as follows:
+@example
+filter=@@=[@@=][@@...][#@@=[@@=][@@...]][#...]
+@end example
+
+@item output_rect
+Specify a rectangle where the output of the filter chain is copied into the
+input image. It is given by a list of space separated float values:
+@example
+output_rect=x\ y\ width\ height
+@end example
+If not given, the output rectangle 

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-19 Thread Thilo Borgmann
Am 16.03.16 um 21:10 schrieb Moritz Barsnick:
> [...]

All addressed in newest patch, thanks!

> - You have a variable by the same name as a function (list_filters),
>   but Objective C may not mind. (Does ffmpeg coding style mind?)

I've done it in the OSX/iOS devices as well and nobody complained...
The compilers don't complain either because it is either struct.varname
or (*varname)().

Updated patch attached.

-Thilo
From b6b889c06edc7872f0a31fd0482793a199ddd28e Mon Sep 17 00:00:00 2001
From: Thilo Borgmann 
Date: Wed, 16 Mar 2016 22:18:20 +0100
Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
 on OSX.

---
 Changelog  |   1 +
 MAINTAINERS|   1 +
 configure  |   2 +
 doc/filters.texi   | 165 +++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   2 +
 libavfilter/vf_coreimage.m | 716 +
 7 files changed, 888 insertions(+)
 create mode 100644 libavfilter/vf_coreimage.m

diff --git a/Changelog b/Changelog
index 1f57f5e..5053a86 100644
--- a/Changelog
+++ b/Changelog
@@ -12,6 +12,7 @@ version :
 - ciescope filter
 - protocol blacklisting API
 - MediaCodec H264 decoding
+- coreimage filter (GPU based image filtering on OSX)
 
 
 version 3.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 531c21d..a993a67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,6 +370,7 @@ Filters:
   vf_colorbalance.c Paul B Mahol
   vf_colorkey.c Timo Rothenpieler
   vf_colorlevels.c  Paul B Mahol
+  vf_coreimage.mThilo Borgmann
   vf_deband.c   Paul B Mahol
   vf_dejudder.c Nicholas Robbins
   vf_delogo.c   Jean Delvare (CC )
diff --git a/configure b/configure
index 1b189328..da51e06 100755
--- a/configure
+++ b/configure
@@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
 frei0r_src_filter_extralibs='$ldl'
 ladspa_filter_extralibs='$ldl'
 nvenc_encoder_extralibs='$ldl'
+coreimage_filter_extralibs="-framework QuartzCore -framework AppKit -framework 
OpenGL"
 
 if ! disabled network; then
 check_func getaddrinfo $network_extralibs
@@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
LoadLibrary; } ||
die "ERROR: LoadLibrary/dlopen not found for 
avisynth"; }
 enabled cuda  && check_lib cuda.h cuInit -lcuda
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
+enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || 
disable coreimage_filter; }
 enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; }
 enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
header not found"; }
 enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
diff --git a/doc/filters.texi b/doc/filters.texi
index c093927..f6767ec 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4955,6 +4955,111 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
2:-2 -1 0 -1 1 1 0 1 2:-2 -
 Copy the input source unchanged to the output. This is mainly useful for
 testing purposes.
 
+@anchor{coreimage}
+@section coreimage
+Video filtering on GPU using Apple's CoreImage API on OSX.
+
+Hardware acceleration is based on an OpenGL context. Usually, this means it is
+processed by video hardware. However, software-based OpenGL implementations
+exist which means there is no guarantee for hardware processing. It depends on
+the respective OSX.
+
+There are many filters and image generators provided by Apple that come with a
+large variety of options. The filter has to be referenced by its name along
+with its options.
+
+The coreimage filter accepts the following options:
+@table @option
+@item list_filters
+List all available filters and generators along with all their respective
+options as well as possible minimum and maximum values along with the default
+values.
+@example
+list_filters=true
+@end example
+
+@item filter
+Specify all filters by their respective name and options.
+Use @var{list_filters} to determine all valid filter names and options.
+Numerical options are specified by a float value and are automatically clamped
+to their respective value range.  Vector and color options have to be specified
+by a list of space separated float values. Character escaping has to be done.
+A special option name @code{default} is available to use default options for a
+filter.
+
+It is required to specify either @code{default} or at least one of the filter 
options.
+All omitted options are used with their default values.
+The syntax of the filter string is as follows:
+@example
+filter=@@=[@@=][@@...][#@@=[@@=][@@...]][#...]
+@end example
+
+@item output_rect
+Specify a rectangle where the 

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-19 Thread Michael Niedermayer
On Wed, Mar 16, 2016 at 10:24:09PM +0100, Thilo Borgmann wrote:
> Am 16.03.16 um 21:10 schrieb Moritz Barsnick:
> > [...]
> 
> All addressed in newest patch, thanks!
> 
> > - You have a variable by the same name as a function (list_filters),
> >   but Objective C may not mind. (Does ffmpeg coding style mind?)
> 
> I've done it in the OSX/iOS devices as well and nobody complained...
> The compilers don't complain either because it is either struct.varname
> or (*varname)().
> 
> Updated patch attached.
> 
> -Thilo

>  Changelog  |1 
>  MAINTAINERS|1 
>  configure  |2 
>  doc/filters.texi   |  165 ++
>  libavfilter/Makefile   |1 
>  libavfilter/allfilters.c   |2 
>  libavfilter/vf_coreimage.m |  716 
> +
>  7 files changed, 888 insertions(+)
> a09186f591e02bb162a605a8fc0add3490323dd5  
> 0002-lavf-Add-coreimage-filter-for-GPU-based-image-filter.patch
> From b6b889c06edc7872f0a31fd0482793a199ddd28e Mon Sep 17 00:00:00 2001
> From: Thilo Borgmann 
> Date: Wed, 16 Mar 2016 22:18:20 +0100
> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>  on OSX.

breaks build on linux
LD  ffmpeg_g
libavfilter/libavfilter.a(allfilters.o): In function `avfilter_register_all':
ffmpeg/libavfilter/allfilters.c:306: undefined reference to 
`ff_vsrc_coreimagesrc'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates


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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-19 Thread Michael Niedermayer
On Sat, Mar 19, 2016 at 04:31:56PM +0100, Thilo Borgmann wrote:
> All comments addressed,

> linux compilation fixed.

confirmed, thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-18 Thread pon pon
build error under osx1095 and clang37

HTMLdoc/libavutil.html
HTMLdoc/libswscale.html
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffplay-all.html] Error 1
make: *** Waiting for unfinished jobs
HTMLdoc/libswresample.html
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffmpeg-all.html] Error 1
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffprobe-all.html] Error 1
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffserver-all.html] Error 1
doc/filters.texi:13909: misplaced {
doc/filters.texi:13909: misplaced }
doc/filters.texi:5028: @ref reference to nonexistent node `coreimagesrc'
make: *** [doc/ffmpeg-filters.html] Error 1

ponpon


2016-03-17 6:24 GMT+09:00 Thilo Borgmann :

> Am 16.03.16 um 21:10 schrieb Moritz Barsnick:
> > [...]
>
> All addressed in newest patch, thanks!
>
> > - You have a variable by the same name as a function (list_filters),
> >   but Objective C may not mind. (Does ffmpeg coding style mind?)
>
> I've done it in the OSX/iOS devices as well and nobody complained...
> The compilers don't complain either because it is either struct.varname
> or (*varname)().
>
> Updated patch attached.
>
> -Thilo
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-18 Thread Moritz Barsnick
On Wed, Mar 16, 2016 at 14:43:23 +0100, Thilo Borgmann wrote:

> +by a list of space separated float values. Character escaping has to be done.
> +A special option name @code{default} is available to use default options for 
> a
> +filter.
> +It is required to specify either @code{default} or at least one of the 
> filter options.
> +All omitted options are used with their default values.

To force paragraphs, you need to insert an empty line. Here, the
sentence "It is required ..." will be directly attached to the one
before, in the same paragraph.

> +Currently, only filters with zero (generators) or exactly one (filters) input
> +image and one output image are supported.
> +Also, transition filters are not yet usable as intended.
[...]
> +For image generators, the size of the output image is determined by the given
> +input image. The generators do not use the pixel information of the input 
> image
> +to generate their output. However, the generated output is blended onto the
> +input image, resulting in partial or complete coverage of the output image.

I don't understand, first it is explained that generators have zero
inputs, then that they use the "input image". Did this confuse
generators and filters?

> +The @ref{coreimagesrc} video source can be used for filtering based on
> +generator output without an existing input video.

This I understand quite well, but I would have put it differently. Hard
to say how though. Something like
  for generating input directly linked to the filters, instead of
  providing an input video.
but the real explanation comes below anyway...

> +.inputs= NULL,//vf_coreimage_inputs,

Stray debug remainder, commented out?

Furthermore:
- You should document list_generators in the coreimagesrc section.
- You have a variable by the same name as a function (list_filters),
  but Objective C may not mind. (Does ffmpeg coding style mind?)

Too bad I don't have OSX. :-)

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Moritz Barsnick
On Mon, Mar 14, 2016 at 19:37:33 +0100, Thilo Borgmann wrote:
> > So
> >   if (x)
> >   SafeCFRelease(a);
> >   else
> >   SafeCFRelease(b);
> > 
> > can work.
> 
> At least the clang preprocessor keeps the outer {} so that this should work.
> I'm not arguing - if experience says compilers act differently here, so
> be it. I already changed it locally...

I think it's not about the compilers, it's about providing a macro
which safely behaves like a function in every usecase, without any need
for care or syntax around its usage. This explanation is quite okay:
http://stackoverflow.com/a/154264/3974309

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Thilo Borgmann
Am 14.03.16 um 16:31 schrieb Clément Bœsch:
> On Mon, Mar 14, 2016 at 03:38:52PM +0100, Thilo Borgmann wrote:
>> Am 14.03.16 um 13:56 schrieb Clément Bœsch:
>>> On Mon, Mar 14, 2016 at 01:46:52PM +0100, Thilo Borgmann wrote:
 Am 14.03.16 um 11:22 schrieb Clément Bœsch:
> [...]
>> +./ffmpeg -f lavfi -i 
>> nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@@inputMessage=https\://FFmpeg.org/@@inputCorrectionLevel=H
>>  -frames:v 1 QRCode.png
>
> remove ./
>
> also, it's probably better to have 2 filters: one for usage as a source,
> and another one for filtering (coreimagesrc vs coreimage).

 I want to extend it later to allow the user to define an output size 
 avoiding
 the need to have it defined by input iamge size. Then it could be used as 
 an
 image source, too. However, I'll have to think about many more cases for 
 that to
 work good. Thus I really want to do it as further work.

 Also, if we split out the generator category into coreimagesrc, the 
 following
 would not work anymore without GPU-HOST transfer:

 coreimage=filter=boxblur@default#qrcode@whatever@somewhere

 Instead the user would have to use a complex filter:

 coreimagesrc=filter=qrcode@whatever [qr],
 [v:0] coreimage=filter=boxblur@default [blur],
 [blur][qr]overlay=somewhere [output]

 To do it without transfer then would require to allow coreimage to do 
 generators
 like coreimagesrc - which would void the argument for a seperated src 
 because
 complete feature duplication, don't you think?

>>>
>>> If you can hold the picture into a CVPixelBuffer, you could use
>>> AV_PIX_FMT_VIDEOTOOLBOX, which make it possible to create one single
>>> apple filter per coreimage instance in the filtergraph.
>>>
>>> It's probably a cleaner design. You'll probably need a
>>> AV_PIX_FMT_VIDEOTOOLBOX to AV_PIX_FMT_RGBA (or whatever) convert filter
>>> (transparently in vf scale, or maybe simply a coreimage=torgba)
>>
>> Spec says: "A Core Video pixel buffer is an image buffer that holds pixels in
>> main memory." A more valid choice could be CVImageBuffer.
>>
> 
> You'll need a new pixel format then probably, but this makes me wonder why
> we are casting CVImageBufferRef into CVPixelBufferRef in
> lavc/videotoolbox...
> 
>> Anyway, the object itself should be retainable across filter instances, also 
>> as
>> a CIImage object. The filter would also have to know about the complete 
>> filter
>> chain to know if the image should be kept as CIImage object (probably in 
>> VRAM)
>> for further processing or if it has to be transferred to the host... and 
>> where
>> in the chain is the current instance? Did it correctly retain an image for 
>> this
>> instance? What if an error occurs in between? Do we know that?
>>
>> There is just missing some work for making a nullsrc in before avoidable. The
>> alternative might bring object conversion (PIX_FMT & toRGB filters?), much 
>> more
>> complex code and filter graph parsing together with a distinct modularization
>> with almost the same code. I see this much more error prone and way harder to
>> debug and maintain. Once the user can specify an output size the existing 
>> code
>> would already perfectly serve as an image source.
>>
> 
> The filter negotiation is already present in lavfi which should already be
> capable of inserting a scaling (convert) filter automatically where it
> matters.
> 
> An AV_PIX_FMT_VIDEOTOOLBOX is simply a frame with data[3]=CVPixelBufferRef
> so you can transmit them between filter instances. They are refcounted so
> properly wrapped in AVFrame (see ff_videotoolbox_buffer_create())

The more I think about it, the more problems I see. Yes, pixel format
converters are auto inserted, but all the other aspects? I don't have an
answer for these without another profound look into what _might_ be
possible. _At least_ the filter internal code becomes much more
complicated. But what for? To have a coreimagesrc filter chained before
possible other coreimage filters, managing the logic to have the
coreimagesrc output passed to coreimage without transfer _instead_
having a single filter instance with
"coreimage=filter=generator@default@img_size=wxh@out_rect=off_x off_y
width height#somefilter@default"..

Clement, I might just don't get your point in what would be beneficial
in this. If I'm not totally wrong we get all features of a coreimagesrc
for free in a coreimage with no-doubt-GPU-based filter chains with
simple code.

Would you be more pleased if I would implement the extended  capabilites
for generator usage so that a nullsrc before could be avoided?
I would much more like to implement this than to complicate the filter
by adding "non-related" object types and the need to look before and
beyond the filters in-/output pads...


>>>[...]
>>> #define SafeCFRelease(ptr) do { \
>>> if (ptr) {  \
>>> 

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Thilo Borgmann
Am 14.03.16 um 13:56 schrieb Clément Bœsch:
> On Mon, Mar 14, 2016 at 01:46:52PM +0100, Thilo Borgmann wrote:
>> Am 14.03.16 um 11:22 schrieb Clément Bœsch:
>>> [...]
 +./ffmpeg -f lavfi -i 
 nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@@inputMessage=https\://FFmpeg.org/@@inputCorrectionLevel=H
  -frames:v 1 QRCode.png
>>>
>>> remove ./
>>>
>>> also, it's probably better to have 2 filters: one for usage as a source,
>>> and another one for filtering (coreimagesrc vs coreimage).
>>
>> I want to extend it later to allow the user to define an output size avoiding
>> the need to have it defined by input iamge size. Then it could be used as an
>> image source, too. However, I'll have to think about many more cases for 
>> that to
>> work good. Thus I really want to do it as further work.
>>
>> Also, if we split out the generator category into coreimagesrc, the following
>> would not work anymore without GPU-HOST transfer:
>>
>> coreimage=filter=boxblur@default#qrcode@whatever@somewhere
>>
>> Instead the user would have to use a complex filter:
>>
>> coreimagesrc=filter=qrcode@whatever [qr],
>> [v:0] coreimage=filter=boxblur@default [blur],
>> [blur][qr]overlay=somewhere [output]
>>
>> To do it without transfer then would require to allow coreimage to do 
>> generators
>> like coreimagesrc - which would void the argument for a seperated src because
>> complete feature duplication, don't you think?
>>
> 
> If you can hold the picture into a CVPixelBuffer, you could use
> AV_PIX_FMT_VIDEOTOOLBOX, which make it possible to create one single
> apple filter per coreimage instance in the filtergraph.
> 
> It's probably a cleaner design. You'll probably need a
> AV_PIX_FMT_VIDEOTOOLBOX to AV_PIX_FMT_RGBA (or whatever) convert filter
> (transparently in vf scale, or maybe simply a coreimage=torgba)

Spec says: "A Core Video pixel buffer is an image buffer that holds pixels in
main memory." A more valid choice could be CVImageBuffer.

Anyway, the object itself should be retainable across filter instances, also as
a CIImage object. The filter would also have to know about the complete filter
chain to know if the image should be kept as CIImage object (probably in VRAM)
for further processing or if it has to be transferred to the host... and where
in the chain is the current instance? Did it correctly retain an image for this
instance? What if an error occurs in between? Do we know that?

There is just missing some work for making a nullsrc in before avoidable. The
alternative might bring object conversion (PIX_FMT & toRGB filters?), much more
complex code and filter graph parsing together with a distinct modularization
with almost the same code. I see this much more error prone and way harder to
debug and maintain. Once the user can specify an output size the existing code
would already perfectly serve as an image source.

Sorry, I don't think it would be the better choice.


 +#define SafeCFRelease(ptr) { \
 +if (ptr) {   \
 +CFRelease(ptr);  \
 +ptr = NULL;  \
 +}\
 +}
>>>
>>> please use do while(0) form
>>
>> I don't understand how do while(0) form could be applied here, please 
>> explain.
>>
> 
> #define SafeCFRelease(ptr) do { \
> if (ptr) {  \
> CFRelease(ptr); \
> ptr = NULL; \
> }   \
> } while (0)

I don't know why this is beneficial but I'll change it locally.

-Thilo

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Clément Bœsch
On Mon, Mar 14, 2016 at 01:46:52PM +0100, Thilo Borgmann wrote:
> Am 14.03.16 um 11:22 schrieb Clément Bœsch:
> > [...]
> >> +./ffmpeg -f lavfi -i 
> >> nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@@inputMessage=https\://FFmpeg.org/@@inputCorrectionLevel=H
> >>  -frames:v 1 QRCode.png
> > 
> > remove ./
> > 
> > also, it's probably better to have 2 filters: one for usage as a source,
> > and another one for filtering (coreimagesrc vs coreimage).
> 
> I want to extend it later to allow the user to define an output size avoiding
> the need to have it defined by input iamge size. Then it could be used as an
> image source, too. However, I'll have to think about many more cases for that 
> to
> work good. Thus I really want to do it as further work.
> 
> Also, if we split out the generator category into coreimagesrc, the following
> would not work anymore without GPU-HOST transfer:
> 
> coreimage=filter=boxblur@default#qrcode@whatever@somewhere
> 
> Instead the user would have to use a complex filter:
> 
> coreimagesrc=filter=qrcode@whatever [qr],
> [v:0] coreimage=filter=boxblur@default [blur],
> [blur][qr]overlay=somewhere [output]
> 
> To do it without transfer then would require to allow coreimage to do 
> generators
> like coreimagesrc - which would void the argument for a seperated src because
> complete feature duplication, don't you think?
> 

If you can hold the picture into a CVPixelBuffer, you could use
AV_PIX_FMT_VIDEOTOOLBOX, which make it possible to create one single
apple filter per coreimage instance in the filtergraph.

It's probably a cleaner design. You'll probably need a
AV_PIX_FMT_VIDEOTOOLBOX to AV_PIX_FMT_RGBA (or whatever) convert filter
(transparently in vf scale, or maybe simply a coreimage=torgba)

> 
> >> +#define SafeCFRelease(ptr) { \
> >> +if (ptr) {   \
> >> +CFRelease(ptr);  \
> >> +ptr = NULL;  \
> >> +}\
> >> +}
> > 
> > please use do while(0) form
> 
> I don't understand how do while(0) form could be applied here, please explain.
> 

#define SafeCFRelease(ptr) do { \
if (ptr) {  \
CFRelease(ptr); \
ptr = NULL; \
}   \
} while (0)

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Thilo Borgmann
Am 14.03.16 um 11:22 schrieb Clément Bœsch:
> [...]
>> +./ffmpeg -f lavfi -i 
>> nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@@inputMessage=https\://FFmpeg.org/@@inputCorrectionLevel=H
>>  -frames:v 1 QRCode.png
> 
> remove ./
> 
> also, it's probably better to have 2 filters: one for usage as a source,
> and another one for filtering (coreimagesrc vs coreimage).

I want to extend it later to allow the user to define an output size avoiding
the need to have it defined by input iamge size. Then it could be used as an
image source, too. However, I'll have to think about many more cases for that to
work good. Thus I really want to do it as further work.

Also, if we split out the generator category into coreimagesrc, the following
would not work anymore without GPU-HOST transfer:

coreimage=filter=boxblur@default#qrcode@whatever@somewhere

Instead the user would have to use a complex filter:

coreimagesrc=filter=qrcode@whatever [qr],
[v:0] coreimage=filter=boxblur@default [blur],
[blur][qr]overlay=somewhere [output]

To do it without transfer then would require to allow coreimage to do generators
like coreimagesrc - which would void the argument for a seperated src because
complete feature duplication, don't you think?


>> +#define SafeCFRelease(ptr) { \
>> +if (ptr) {   \
>> +CFRelease(ptr);  \
>> +ptr = NULL;  \
>> +}\
>> +}
> 
> please use do while(0) form

I don't understand how do while(0) form could be applied here, please explain.


Everything else committed locally, thanks!

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread wm4
On Mon, 14 Mar 2016 11:23:16 +0100
Clément Bœsch  wrote:

> On Mon, Mar 14, 2016 at 10:19:59AM +0100, Thilo Borgmann wrote:
> > Am 13.03.16 um 22:01 schrieb Clément Bœsch:  
> > > On Sun, Mar 13, 2016 at 09:09:39PM +0100, Thilo Borgmann wrote:  
> > >> Am 13.03.16 um 20:55 schrieb Nicolas George:  
> > >>> Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :  
> >  +{ "list_filters", "list available filters",  
> >  OFFSET(list_filters), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = 
> >  FLAGS, "list_filters" },
> >  +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
> >  "list_filters" },
> >  +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
> >  "list_filters" },  
> > >>>
> > >>> You forgot to remove the constants.  
> > >>
> > >> Removed. Patch attached.
> > >>
> > >> -Thilo
> > >>  
> > >   
> > >> From 4aef8c0d09e109cedd92e17cc04a6ef6236c07ab Mon Sep 17 00:00:00 2001
> > >> From: Thilo Borgmann 
> > >> Date: Sun, 13 Mar 2016 21:08:18 +0100
> > >> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image 
> > >> filtering
> > >>  on OSX.
> > >>
> > >> ---
> > >>  Changelog  |   1 +
> > >>  MAINTAINERS|   1 +
> > >>  configure  |   2 +
> > >>  doc/filters.texi   |  67 ++
> > >>  libavfilter/Makefile   |   1 +
> > >>  libavfilter/allfilters.c   |   1 +  
> > >   
> > >>  libavfilter/vf_coreimage.m | 551 
> > >> +  
> > > 
> > > Sorry to raise that now, but isn't this API available in C as well (just
> > > like VT)?  
> > 
> > IIRC I've read somewhere that it is possible to access all the Objective-C 
> > API
> > directly via C... however, I find it in Apple's docs only for Core Audio so 
> > far
> > (which says something about C++).
> > 
> > Reference in C seems not to be there, and I assume Apple does not tell much
> > about using C neither cares much about such users. Also maintainability 
> > should
> > suffer from using C, you won't find much about using it and possible 
> > pitfalls in
> > the internet. On the contrary, I think Apple would much more like to see 
> > using
> > swift which would make it even further away from C... as long as we can 
> > stick to
> > Objective-C most of us should be familiar enough with it and I think it 
> > should
> > therefore be our choice.
> >   
> 
> Well, my concern is that we are a C project, and most people here
> (including me) can't really review not maintain this stuff properly.
> 

To be fair, at least Objective-C is 100% compatible to C99. It's not
like with C++.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Thilo Borgmann
Am 14.03.16 um 11:23 schrieb Clément Bœsch:
> On Mon, Mar 14, 2016 at 10:19:59AM +0100, Thilo Borgmann wrote:
>> Am 13.03.16 um 22:01 schrieb Clément Bœsch:
>>> On Sun, Mar 13, 2016 at 09:09:39PM +0100, Thilo Borgmann wrote:
 Am 13.03.16 um 20:55 schrieb Nicolas George:
> Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
>> +{ "list_filters", "list available filters",  OFFSET(list_filters), 
>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
>> +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
>> "list_filters" },
>> +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
>> "list_filters" },
>
> You forgot to remove the constants.

 Removed. Patch attached.

 -Thilo

>>>
 From 4aef8c0d09e109cedd92e17cc04a6ef6236c07ab Mon Sep 17 00:00:00 2001
 From: Thilo Borgmann 
 Date: Sun, 13 Mar 2016 21:08:18 +0100
 Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image 
 filtering
  on OSX.

 ---
  Changelog  |   1 +
  MAINTAINERS|   1 +
  configure  |   2 +
  doc/filters.texi   |  67 ++
  libavfilter/Makefile   |   1 +
  libavfilter/allfilters.c   |   1 +
>>>
  libavfilter/vf_coreimage.m | 551 
 +
>>>
>>> Sorry to raise that now, but isn't this API available in C as well (just
>>> like VT)?
>>
>> IIRC I've read somewhere that it is possible to access all the Objective-C 
>> API
>> directly via C... however, I find it in Apple's docs only for Core Audio so 
>> far
>> (which says something about C++).
>>
>> Reference in C seems not to be there, and I assume Apple does not tell much
>> about using C neither cares much about such users. Also maintainability 
>> should
>> suffer from using C, you won't find much about using it and possible 
>> pitfalls in
>> the internet. On the contrary, I think Apple would much more like to see 
>> using
>> swift which would make it even further away from C... as long as we can 
>> stick to
>> Objective-C most of us should be familiar enough with it and I think it 
>> should
>> therefore be our choice.
>>
> 
> Well, my concern is that we are a C project, and most people here
> (including me) can't really review not maintain this stuff properly.

Mine too. However, the alternatives appear to be worse.

-Thilo

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Clément Bœsch
On Mon, Mar 14, 2016 at 10:19:59AM +0100, Thilo Borgmann wrote:
> Am 13.03.16 um 22:01 schrieb Clément Bœsch:
> > On Sun, Mar 13, 2016 at 09:09:39PM +0100, Thilo Borgmann wrote:
> >> Am 13.03.16 um 20:55 schrieb Nicolas George:
> >>> Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
>  +{ "list_filters", "list available filters",  OFFSET(list_filters), 
>  AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
>  +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
>  "list_filters" },
>  +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
>  "list_filters" },
> >>>
> >>> You forgot to remove the constants.
> >>
> >> Removed. Patch attached.
> >>
> >> -Thilo
> >>
> > 
> >> From 4aef8c0d09e109cedd92e17cc04a6ef6236c07ab Mon Sep 17 00:00:00 2001
> >> From: Thilo Borgmann 
> >> Date: Sun, 13 Mar 2016 21:08:18 +0100
> >> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image 
> >> filtering
> >>  on OSX.
> >>
> >> ---
> >>  Changelog  |   1 +
> >>  MAINTAINERS|   1 +
> >>  configure  |   2 +
> >>  doc/filters.texi   |  67 ++
> >>  libavfilter/Makefile   |   1 +
> >>  libavfilter/allfilters.c   |   1 +
> > 
> >>  libavfilter/vf_coreimage.m | 551 
> >> +
> > 
> > Sorry to raise that now, but isn't this API available in C as well (just
> > like VT)?
> 
> IIRC I've read somewhere that it is possible to access all the Objective-C API
> directly via C... however, I find it in Apple's docs only for Core Audio so 
> far
> (which says something about C++).
> 
> Reference in C seems not to be there, and I assume Apple does not tell much
> about using C neither cares much about such users. Also maintainability should
> suffer from using C, you won't find much about using it and possible pitfalls 
> in
> the internet. On the contrary, I think Apple would much more like to see using
> swift which would make it even further away from C... as long as we can stick 
> to
> Objective-C most of us should be familiar enough with it and I think it should
> therefore be our choice.
> 

Well, my concern is that we are a C project, and most people here
(including me) can't really review not maintain this stuff properly.

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Clément Bœsch
On Sun, Mar 13, 2016 at 09:09:39PM +0100, Thilo Borgmann wrote:
> Am 13.03.16 um 20:55 schrieb Nicolas George:
> > Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
> >> +{ "list_filters", "list available filters",  OFFSET(list_filters), 
> >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
> >> +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
> >> "list_filters" },
> >> +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
> >> "list_filters" },
> > 
> > You forgot to remove the constants.
> 
> Removed. Patch attached.
> 
> -Thilo
> 

> From 4aef8c0d09e109cedd92e17cc04a6ef6236c07ab Mon Sep 17 00:00:00 2001
> From: Thilo Borgmann 
> Date: Sun, 13 Mar 2016 21:08:18 +0100
> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>  on OSX.
> 
> ---
>  Changelog  |   1 +
>  MAINTAINERS|   1 +
>  configure  |   2 +
>  doc/filters.texi   |  67 ++
>  libavfilter/Makefile   |   1 +
>  libavfilter/allfilters.c   |   1 +
>  libavfilter/vf_coreimage.m | 551 
> +
>  7 files changed, 624 insertions(+)
>  create mode 100644 libavfilter/vf_coreimage.m
> 
> diff --git a/Changelog b/Changelog
> index 1f57f5e..5053a86 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -12,6 +12,7 @@ version :
>  - ciescope filter
>  - protocol blacklisting API
>  - MediaCodec H264 decoding
> +- coreimage filter (GPU based image filtering on OSX)
>  
>  
>  version 3.0:
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 531c21d..a993a67 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -370,6 +370,7 @@ Filters:
>vf_colorbalance.c Paul B Mahol
>vf_colorkey.c Timo Rothenpieler
>vf_colorlevels.c  Paul B Mahol
> +  vf_coreimage.mThilo Borgmann
>vf_deband.c   Paul B Mahol
>vf_dejudder.c Nicholas Robbins
>vf_delogo.c   Jean Delvare (CC )
> diff --git a/configure b/configure
> index 1b189328..da51e06 100755
> --- a/configure
> +++ b/configure
> @@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
>  frei0r_src_filter_extralibs='$ldl'
>  ladspa_filter_extralibs='$ldl'
>  nvenc_encoder_extralibs='$ldl'
> +coreimage_filter_extralibs="-framework QuartzCore -framework AppKit 
> -framework OpenGL"
>  
>  if ! disabled network; then
>  check_func getaddrinfo $network_extralibs
> @@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
> LoadLibrary; } ||
> die "ERROR: LoadLibrary/dlopen not found for 
> avisynth"; }
>  enabled cuda  && check_lib cuda.h cuInit -lcuda
>  enabled chromaprint   && require chromaprint chromaprint.h 
> chromaprint_get_version -lchromaprint
> +enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || 
> disable coreimage_filter; }
>  enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
> DeckLinkAPI.h header not found"; }
>  enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
> header not found"; }
>  enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
> diff --git a/doc/filters.texi b/doc/filters.texi
> index d5d619e..7d0bb26 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -4955,6 +4955,73 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
> 2:-2 -1 0 -1 1 1 0 1 2:-2 -
>  Copy the input source unchanged to the output. This is mainly useful for
>  testing purposes.
>  
> +@anchor{coreimage}
> +@section coreimage
> +
> +Video filtering on GPU using Apple's CoreImage API on OSX.
> +
> +Hardware acceleration is based on an OpenGL context. Usually, this means it 
> is processed by video hardware. However, software-based OpenGL 
> implementations exist which means there is no guarantee for hardware 
> processing. It depends on the respective OSX.
> +

can you wrap? (hint: select and "gq" in vim, dunno other editors).

> +There are many filters and image generators provided by Apple that come with 
> a large variety of options. The filter has to be referenced by its name along 
> with its options.
> +
> +The coreimage filter accepts the following options:
> +@table @option
> +@item list_filters
> +List all available filters along with all their respective options as well 
> as possible minimum and maximum values along with the default values.
> +@example
> +coreimage=list_filters=true
> +@end example
> +
> +@item filter
> +Specifiy all filters by their respective name and options.

Specify

> +Use @var{list_filters} to determine all valid filter names and options.
> +Numerical options are specified by a float value and are automatically 
> clamped to their respective value range.
> +Vector and color options have to be specified by a list of space 

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-14 Thread Thilo Borgmann
Am 13.03.16 um 22:01 schrieb Clément Bœsch:
> On Sun, Mar 13, 2016 at 09:09:39PM +0100, Thilo Borgmann wrote:
>> Am 13.03.16 um 20:55 schrieb Nicolas George:
>>> Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
 +{ "list_filters", "list available filters",  OFFSET(list_filters), 
 AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
 +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
 "list_filters" },
 +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
 "list_filters" },
>>>
>>> You forgot to remove the constants.
>>
>> Removed. Patch attached.
>>
>> -Thilo
>>
> 
>> From 4aef8c0d09e109cedd92e17cc04a6ef6236c07ab Mon Sep 17 00:00:00 2001
>> From: Thilo Borgmann 
>> Date: Sun, 13 Mar 2016 21:08:18 +0100
>> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>>  on OSX.
>>
>> ---
>>  Changelog  |   1 +
>>  MAINTAINERS|   1 +
>>  configure  |   2 +
>>  doc/filters.texi   |  67 ++
>>  libavfilter/Makefile   |   1 +
>>  libavfilter/allfilters.c   |   1 +
> 
>>  libavfilter/vf_coreimage.m | 551 
>> +
> 
> Sorry to raise that now, but isn't this API available in C as well (just
> like VT)?

IIRC I've read somewhere that it is possible to access all the Objective-C API
directly via C... however, I find it in Apple's docs only for Core Audio so far
(which says something about C++).

Reference in C seems not to be there, and I assume Apple does not tell much
about using C neither cares much about such users. Also maintainability should
suffer from using C, you won't find much about using it and possible pitfalls in
the internet. On the contrary, I think Apple would much more like to see using
swift which would make it even further away from C... as long as we can stick to
Objective-C most of us should be familiar enough with it and I think it should
therefore be our choice.

-Thilo

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-13 Thread Clément Bœsch
On Sun, Mar 13, 2016 at 09:09:39PM +0100, Thilo Borgmann wrote:
> Am 13.03.16 um 20:55 schrieb Nicolas George:
> > Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
> >> +{ "list_filters", "list available filters",  OFFSET(list_filters), 
> >> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
> >> +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
> >> "list_filters" },
> >> +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
> >> "list_filters" },
> > 
> > You forgot to remove the constants.
> 
> Removed. Patch attached.
> 
> -Thilo
> 

> From 4aef8c0d09e109cedd92e17cc04a6ef6236c07ab Mon Sep 17 00:00:00 2001
> From: Thilo Borgmann 
> Date: Sun, 13 Mar 2016 21:08:18 +0100
> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>  on OSX.
> 
> ---
>  Changelog  |   1 +
>  MAINTAINERS|   1 +
>  configure  |   2 +
>  doc/filters.texi   |  67 ++
>  libavfilter/Makefile   |   1 +
>  libavfilter/allfilters.c   |   1 +

>  libavfilter/vf_coreimage.m | 551 
> +

Sorry to raise that now, but isn't this API available in C as well (just
like VT)?

[...]

-- 
Clément B.


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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-13 Thread Thilo Borgmann
Am 13.03.16 um 20:55 schrieb Nicolas George:
> Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
>> +{ "list_filters", "list available filters",  OFFSET(list_filters), 
>> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
>> +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
>> "list_filters" },
>> +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
>> "list_filters" },
> 
> You forgot to remove the constants.

Removed. Patch attached.

-Thilo

From 4aef8c0d09e109cedd92e17cc04a6ef6236c07ab Mon Sep 17 00:00:00 2001
From: Thilo Borgmann 
Date: Sun, 13 Mar 2016 21:08:18 +0100
Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
 on OSX.

---
 Changelog  |   1 +
 MAINTAINERS|   1 +
 configure  |   2 +
 doc/filters.texi   |  67 ++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_coreimage.m | 551 +
 7 files changed, 624 insertions(+)
 create mode 100644 libavfilter/vf_coreimage.m

diff --git a/Changelog b/Changelog
index 1f57f5e..5053a86 100644
--- a/Changelog
+++ b/Changelog
@@ -12,6 +12,7 @@ version :
 - ciescope filter
 - protocol blacklisting API
 - MediaCodec H264 decoding
+- coreimage filter (GPU based image filtering on OSX)
 
 
 version 3.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 531c21d..a993a67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,6 +370,7 @@ Filters:
   vf_colorbalance.c Paul B Mahol
   vf_colorkey.c Timo Rothenpieler
   vf_colorlevels.c  Paul B Mahol
+  vf_coreimage.mThilo Borgmann
   vf_deband.c   Paul B Mahol
   vf_dejudder.c Nicholas Robbins
   vf_delogo.c   Jean Delvare (CC )
diff --git a/configure b/configure
index 1b189328..da51e06 100755
--- a/configure
+++ b/configure
@@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
 frei0r_src_filter_extralibs='$ldl'
 ladspa_filter_extralibs='$ldl'
 nvenc_encoder_extralibs='$ldl'
+coreimage_filter_extralibs="-framework QuartzCore -framework AppKit -framework 
OpenGL"
 
 if ! disabled network; then
 check_func getaddrinfo $network_extralibs
@@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
LoadLibrary; } ||
die "ERROR: LoadLibrary/dlopen not found for 
avisynth"; }
 enabled cuda  && check_lib cuda.h cuInit -lcuda
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
+enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || 
disable coreimage_filter; }
 enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; }
 enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
header not found"; }
 enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
diff --git a/doc/filters.texi b/doc/filters.texi
index d5d619e..7d0bb26 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4955,6 +4955,73 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
2:-2 -1 0 -1 1 1 0 1 2:-2 -
 Copy the input source unchanged to the output. This is mainly useful for
 testing purposes.
 
+@anchor{coreimage}
+@section coreimage
+
+Video filtering on GPU using Apple's CoreImage API on OSX.
+
+Hardware acceleration is based on an OpenGL context. Usually, this means it is 
processed by video hardware. However, software-based OpenGL implementations 
exist which means there is no guarantee for hardware processing. It depends on 
the respective OSX.
+
+There are many filters and image generators provided by Apple that come with a 
large variety of options. The filter has to be referenced by its name along 
with its options.
+
+The coreimage filter accepts the following options:
+@table @option
+@item list_filters
+List all available filters along with all their respective options as well as 
possible minimum and maximum values along with the default values.
+@example
+coreimage=list_filters=true
+@end example
+
+@item filter
+Specifiy all filters by their respective name and options.
+Use @var{list_filters} to determine all valid filter names and options.
+Numerical options are specified by a float value and are automatically clamped 
to their respective value range.
+Vector and color options have to be specified by a list of space separated 
float values. Character escaping has to be done.
+A special option name @code{default} is available to use default options for a 
filter.
+It is required to specify either @code{default} or at least one of the filter 
options.
+All omitted options are used with their default values.
+The syntax of the filter string is as follows:
+@example

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-13 Thread Nicolas George
Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
> +{ "list_filters", "list available filters",  OFFSET(list_filters), 
> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
> +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
> "list_filters" },
> +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
> "list_filters" },

You forgot to remove the constants.

Regards,

-- 
  Nicolas George


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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-13 Thread Thilo Borgmann
Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
> Add coreimage filter for OSX.

Option type set to bool (Nicolas)
Proper Texinfo escaping (comments on trac ticket #4143)

New patch attached.

-Thilo

From 32198ec9a0522f181ac8a4974b7b36de4e08596d Mon Sep 17 00:00:00 2001
From: Thilo Borgmann 
Date: Sun, 13 Mar 2016 20:49:59 +0100
Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
 on OSX.

---
 Changelog  |   1 +
 MAINTAINERS|   1 +
 configure  |   2 +
 doc/filters.texi   |  67 ++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_coreimage.m | 553 +
 7 files changed, 626 insertions(+)
 create mode 100644 libavfilter/vf_coreimage.m

diff --git a/Changelog b/Changelog
index 1f57f5e..5053a86 100644
--- a/Changelog
+++ b/Changelog
@@ -12,6 +12,7 @@ version :
 - ciescope filter
 - protocol blacklisting API
 - MediaCodec H264 decoding
+- coreimage filter (GPU based image filtering on OSX)
 
 
 version 3.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 531c21d..a993a67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,6 +370,7 @@ Filters:
   vf_colorbalance.c Paul B Mahol
   vf_colorkey.c Timo Rothenpieler
   vf_colorlevels.c  Paul B Mahol
+  vf_coreimage.mThilo Borgmann
   vf_deband.c   Paul B Mahol
   vf_dejudder.c Nicholas Robbins
   vf_delogo.c   Jean Delvare (CC )
diff --git a/configure b/configure
index 1b189328..da51e06 100755
--- a/configure
+++ b/configure
@@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
 frei0r_src_filter_extralibs='$ldl'
 ladspa_filter_extralibs='$ldl'
 nvenc_encoder_extralibs='$ldl'
+coreimage_filter_extralibs="-framework QuartzCore -framework AppKit -framework 
OpenGL"
 
 if ! disabled network; then
 check_func getaddrinfo $network_extralibs
@@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
LoadLibrary; } ||
die "ERROR: LoadLibrary/dlopen not found for 
avisynth"; }
 enabled cuda  && check_lib cuda.h cuInit -lcuda
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
+enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || 
disable coreimage_filter; }
 enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; }
 enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
header not found"; }
 enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
diff --git a/doc/filters.texi b/doc/filters.texi
index d5d619e..a48b27b 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4955,6 +4955,73 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
2:-2 -1 0 -1 1 1 0 1 2:-2 -
 Copy the input source unchanged to the output. This is mainly useful for
 testing purposes.
 
+@anchor{coreimage}
+@section coreimage
+
+Video filtering on GPU using Apple's CoreImage API on OSX.
+
+Hardware acceleration is based on an OpenGL context. Usually, this means it is 
processed by video hardware. However, software-based OpenGL implementations 
exist which means there is no guarantee for hardware processing. It depends on 
the respective OSX.
+
+There are many filters and image generators provided by Apple that come with a 
large variety of options. The filter has to be referenced by its name along 
with its options.
+
+The coreimage filter accepts the following options:
+@table @option
+@item list_filters
+List all available filters along with all their respective options as well as 
possible minimum and maximum values along with the default values.
+@example
+coreimage=list_filters=true
+@end example
+
+@item filter
+Specifiy all filters by their respective name and options.
+Use @var{list_filters} to determine all valid filter names and options.
+Numerical options are specified by a float value and are automatically clamped 
to their respective value range.
+Vector and color options have to be specified by a list of space separated 
float values. Character escaping has to be done.
+A special option name @code{default} is available to use default options for a 
filter.
+It is required to specify either @code{default} or at least one of the filter 
options.
+All omitted options are used with their default values.
+The syntax of the filter string is as follows:
+@example
+filter=@@=[@@=][@@...][#@@=[@@=][@@...]]
+@end example
+@end table
+
+Several filters can be chained for successive processing without GPU-HOST 
transfers allowing for fast processing of complex filter chains.
+Currently, only filters with zero (generators) or exactly one (filters) input 
image and one output image are supported.
+Also, transition 

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-13 Thread Thilo Borgmann
Am 13.03.16 um 09:41 schrieb Nicolas George:
> Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
>> +static const AVOption coreimage_options[] = {
>> +{ "list_filters", "list available filters",  OFFSET(list_filters), 
>> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
>> +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
>> "list_filters" },
>> +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
>> "list_filters" },
> 
> AV_OPT_TYPE_BOOL?

Changed locally.

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-13 Thread Nicolas George
Le quartidi 24 ventôse, an CCXXIV, Thilo Borgmann a écrit :
> +static const AVOption coreimage_options[] = {
> +{ "list_filters", "list available filters",  OFFSET(list_filters), 
> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = FLAGS, "list_filters" },
> +{ "true", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, 
> "list_filters" },
> +{ "false", "", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, 
> "list_filters" },

AV_OPT_TYPE_BOOL?

Regards,

-- 
  Nicolas George


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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-12 Thread Thilo Borgmann
Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
> Add coreimage filter for OSX.

Should now also work with Linux based configure.

-Thilo
From af0bbaebb1a04be203338fa7bf199c26a7dfa3df Mon Sep 17 00:00:00 2001
From: Thilo Borgmann 
Date: Sun, 13 Mar 2016 00:35:25 +0100
Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
 on OSX.

---
 Changelog  |   1 +
 MAINTAINERS|   1 +
 configure  |   2 +
 doc/filters.texi   |  67 ++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_coreimage.m | 553 +
 7 files changed, 626 insertions(+)
 create mode 100644 libavfilter/vf_coreimage.m

diff --git a/Changelog b/Changelog
index 1f57f5e..5053a86 100644
--- a/Changelog
+++ b/Changelog
@@ -12,6 +12,7 @@ version :
 - ciescope filter
 - protocol blacklisting API
 - MediaCodec H264 decoding
+- coreimage filter (GPU based image filtering on OSX)
 
 
 version 3.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 531c21d..a993a67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,6 +370,7 @@ Filters:
   vf_colorbalance.c Paul B Mahol
   vf_colorkey.c Timo Rothenpieler
   vf_colorlevels.c  Paul B Mahol
+  vf_coreimage.mThilo Borgmann
   vf_deband.c   Paul B Mahol
   vf_dejudder.c Nicholas Robbins
   vf_delogo.c   Jean Delvare (CC )
diff --git a/configure b/configure
index 1b189328..da51e06 100755
--- a/configure
+++ b/configure
@@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
 frei0r_src_filter_extralibs='$ldl'
 ladspa_filter_extralibs='$ldl'
 nvenc_encoder_extralibs='$ldl'
+coreimage_filter_extralibs="-framework QuartzCore -framework AppKit -framework 
OpenGL"
 
 if ! disabled network; then
 check_func getaddrinfo $network_extralibs
@@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
LoadLibrary; } ||
die "ERROR: LoadLibrary/dlopen not found for 
avisynth"; }
 enabled cuda  && check_lib cuda.h cuInit -lcuda
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
+enabled coreimage_filter  && { check_header_objcc QuartzCore/CoreImage.h || 
disable coreimage_filter; }
 enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; }
 enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
header not found"; }
 enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
diff --git a/doc/filters.texi b/doc/filters.texi
index d5d619e..7fdbe61 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4955,6 +4955,73 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
2:-2 -1 0 -1 1 1 0 1 2:-2 -
 Copy the input source unchanged to the output. This is mainly useful for
 testing purposes.
 
+@anchor{coreimage}
+@section coreimage
+
+Video filtering on GPU using Apple's CoreImage API on OSX.
+
+Hardware acceleration is based on an OpenGL context. Usually, this means it is 
processed by video hardware. However, software-based OpenGL implementations 
exist which means there is no guarantee for hardware processing. It depends on 
the respective OSX.
+
+There are many filters and image generators provided by Apple that come with a 
large variety of options. The filter has to be referenced by its name along 
with its options.
+
+The coreimage filter accepts the following options:
+@table @option
+@item list_filters
+List all available filters along with all their respective options as well as 
possible minimum and maximum values along with the default values.
+@example
+coreimage=list_filters=true
+@end example
+
+@item filter
+Specifiy all filters by their respective name and options.
+Use @option{list_filters} to determine all valid filter names and options.
+Numerical options are specified by a float value and are automatically clamped 
to their respective value range.
+Vector and color options have to be specified by a list of space separated 
float values. Character escaping has to be done.
+A special option name @code{default} is available to use default options for a 
filter.
+It is required to specify either @code{default} or at least one of the filter 
options.
+All omitted options are used with their default values.
+The syntax of the filter string is as follows:
+@example
+filter=@=[@=][@...][#@=[@=][@...]]
+@end example
+@end table
+
+Several filters can be chained for successive processing without GPU-HOST 
transfers allowing for fast processing of complex filter chains.
+Currently, only filters with zero (generators) or exactly one (filters) input 
image and one output image are supported.
+Also, transition filters are not yet usable as intended.
+
+Some filters generate 

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-12 Thread Thilo Borgmann
Am 13.03.16 um 00:29 schrieb James Almer:
> On 3/12/2016 7:59 PM, Thilo Borgmann wrote:
>> Am 12.03.16 um 23:45 schrieb James Almer:
 On 3/12/2016 7:09 PM, Thilo Borgmann wrote:
>> Am 12.03.16 um 21:45 schrieb Michael Niedermayer:
>> On Sat, Mar 12, 2016 at 03:19:11PM +0100, Thilo Borgmann wrote:
>> Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
>> [...]
>> also breaks build on linux
>> ./configure && make -j12
>> ...
>> libavfilter/vaf_spectrumsynth.c:434:9: warning: ‘ret’ may be used 
>> uninitialized in this function [-Wuninitialized]
>> CC  libavfilter/vf_copy.o
>> OBJCC   libavfilter/vf_coreimage.o
>> gcc: error trying to exec 'cc1obj': execvp: No such file or directory
>> make: *** [libavfilter/vf_coreimage.o] Error 1
>> make: *** Waiting for unfinished jobs
>> Should be fixed in attached patch.

 No, it isn't. vf_coreimage must depend on coreimage, otherwise it will be 
 enabled for
 every platform.
 Also, coreimage is not a component listed in any list, so it's always 
 disabled. Look
 for example at chromaprint to get an idea of what's missing.
>> I'm sorry, I've no linux right now to test it on...
>> coreimage is no external lib, I don't think chromaprint analogies would fit.
>> It is more like avfoundation. However, I think I made one more mistake
>> that has been changed.
>>
>> Please test again the attached patch.
>>
>> Thanks!
>>
>> -Thilo
>>
>>
>> 0002-lavf-Add-coreimage-filter-for-GPU-based-image-filter.patch
>>
>>
>> From 76d67f19f1f537ca20ee86047d318558fe3a36cd Mon Sep 17 00:00:00 2001
>> From: Thilo Borgmann 
>> Date: Sat, 12 Mar 2016 23:55:50 +0100
>> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>>  on OSX.
>>
>> ---
>>  Changelog  |   1 +
>>  MAINTAINERS|   1 +
>>  configure  |   2 +
>>  doc/filters.texi   |  67 ++
>>  libavfilter/Makefile   |   1 +
>>  libavfilter/allfilters.c   |   1 +
>>  libavfilter/vf_coreimage.m | 553 
>> +
>>  7 files changed, 626 insertions(+)
>>  create mode 100644 libavfilter/vf_coreimage.m
>>
>> diff --git a/Changelog b/Changelog
>> index 1f57f5e..5053a86 100644
>> --- a/Changelog
>> +++ b/Changelog
>> @@ -12,6 +12,7 @@ version :
>>  - ciescope filter
>>  - protocol blacklisting API
>>  - MediaCodec H264 decoding
>> +- coreimage filter (GPU based image filtering on OSX)
>>  
>>  
>>  version 3.0:
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 531c21d..a993a67 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -370,6 +370,7 @@ Filters:
>>vf_colorbalance.c Paul B Mahol
>>vf_colorkey.c Timo Rothenpieler
>>vf_colorlevels.c  Paul B Mahol
>> +  vf_coreimage.mThilo Borgmann
>>vf_deband.c   Paul B Mahol
>>vf_dejudder.c Nicholas Robbins
>>vf_delogo.c   Jean Delvare (CC 
>> )
>> diff --git a/configure b/configure
>> index 1b189328..d21d22d 100755
>> --- a/configure
>> +++ b/configure
>> @@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
>>  frei0r_src_filter_extralibs='$ldl'
>>  ladspa_filter_extralibs='$ldl'
>>  nvenc_encoder_extralibs='$ldl'
>> +coreimage_filter_extralibs="-framework QuartzCore -framework AppKit 
>> -framework OpenGL"
>>  
>>  if ! disabled network; then
>>  check_func getaddrinfo $network_extralibs
>> @@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 
>> "windows.h" LoadLibrary; } ||
>> die "ERROR: LoadLibrary/dlopen not found for 
>> avisynth"; }
>>  enabled cuda  && check_lib cuda.h cuInit -lcuda
>>  enabled chromaprint   && require chromaprint chromaprint.h 
>> chromaprint_get_version -lchromaprint
>> +enabled coreimage_filter  && { check_header_objcc CoreImage/CoreImage.h || 
>> disable avfoundation_indev; }
> 
> I assume avfoundation_indev here is a copy-paste mistake? But yes, it
> should be ok after changing that into coreimage_filter.

Indeed and found another bug. It never really checked on OSX.

In the mean time I could test Linux & OSX, now it seems to work.
Will attach the works-for-me patch in a seperate mail.

Thanks!

-Thilo

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-12 Thread James Almer
On 3/12/2016 7:59 PM, Thilo Borgmann wrote:
> Am 12.03.16 um 23:45 schrieb James Almer:
>> > On 3/12/2016 7:09 PM, Thilo Borgmann wrote:
>>> >> Am 12.03.16 um 21:45 schrieb Michael Niedermayer:
>  On Sat, Mar 12, 2016 at 03:19:11PM +0100, Thilo Borgmann wrote:
>>> >> Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
>  [...]
>  also breaks build on linux
>  ./configure && make -j12
>  ...
>  libavfilter/vaf_spectrumsynth.c:434:9: warning: ‘ret’ may be used 
>  uninitialized in this function [-Wuninitialized]
>  CC  libavfilter/vf_copy.o
>  OBJCC   libavfilter/vf_coreimage.o
>  gcc: error trying to exec 'cc1obj': execvp: No such file or directory
>  make: *** [libavfilter/vf_coreimage.o] Error 1
>  make: *** Waiting for unfinished jobs
>>> >> Should be fixed in attached patch.
>> > 
>> > No, it isn't. vf_coreimage must depend on coreimage, otherwise it will be 
>> > enabled for
>> > every platform.
>> > Also, coreimage is not a component listed in any list, so it's always 
>> > disabled. Look
>> > for example at chromaprint to get an idea of what's missing.
> I'm sorry, I've no linux right now to test it on...
> coreimage is no external lib, I don't think chromaprint analogies would fit.
> It is more like avfoundation. However, I think I made one more mistake
> that has been changed.
> 
> Please test again the attached patch.
> 
> Thanks!
> 
> -Thilo
> 
> 
> 0002-lavf-Add-coreimage-filter-for-GPU-based-image-filter.patch
> 
> 
> From 76d67f19f1f537ca20ee86047d318558fe3a36cd Mon Sep 17 00:00:00 2001
> From: Thilo Borgmann 
> Date: Sat, 12 Mar 2016 23:55:50 +0100
> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>  on OSX.
> 
> ---
>  Changelog  |   1 +
>  MAINTAINERS|   1 +
>  configure  |   2 +
>  doc/filters.texi   |  67 ++
>  libavfilter/Makefile   |   1 +
>  libavfilter/allfilters.c   |   1 +
>  libavfilter/vf_coreimage.m | 553 
> +
>  7 files changed, 626 insertions(+)
>  create mode 100644 libavfilter/vf_coreimage.m
> 
> diff --git a/Changelog b/Changelog
> index 1f57f5e..5053a86 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -12,6 +12,7 @@ version :
>  - ciescope filter
>  - protocol blacklisting API
>  - MediaCodec H264 decoding
> +- coreimage filter (GPU based image filtering on OSX)
>  
>  
>  version 3.0:
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 531c21d..a993a67 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -370,6 +370,7 @@ Filters:
>vf_colorbalance.c Paul B Mahol
>vf_colorkey.c Timo Rothenpieler
>vf_colorlevels.c  Paul B Mahol
> +  vf_coreimage.mThilo Borgmann
>vf_deband.c   Paul B Mahol
>vf_dejudder.c Nicholas Robbins
>vf_delogo.c   Jean Delvare (CC )
> diff --git a/configure b/configure
> index 1b189328..d21d22d 100755
> --- a/configure
> +++ b/configure
> @@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
>  frei0r_src_filter_extralibs='$ldl'
>  ladspa_filter_extralibs='$ldl'
>  nvenc_encoder_extralibs='$ldl'
> +coreimage_filter_extralibs="-framework QuartzCore -framework AppKit 
> -framework OpenGL"
>  
>  if ! disabled network; then
>  check_func getaddrinfo $network_extralibs
> @@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
> LoadLibrary; } ||
> die "ERROR: LoadLibrary/dlopen not found for 
> avisynth"; }
>  enabled cuda  && check_lib cuda.h cuInit -lcuda
>  enabled chromaprint   && require chromaprint chromaprint.h 
> chromaprint_get_version -lchromaprint
> +enabled coreimage_filter  && { check_header_objcc CoreImage/CoreImage.h || 
> disable avfoundation_indev; }

I assume avfoundation_indev here is a copy-paste mistake? But yes, it
should be ok after changing that into coreimage_filter.

>  enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
> DeckLinkAPI.h header not found"; }
>  enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
> header not found"; }
>  enabled gmp   && require2 gmp gmp.h mpz_export -lgmp

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-12 Thread Thilo Borgmann
Am 12.03.16 um 23:45 schrieb James Almer:
> On 3/12/2016 7:09 PM, Thilo Borgmann wrote:
>> Am 12.03.16 um 21:45 schrieb Michael Niedermayer:
 On Sat, Mar 12, 2016 at 03:19:11PM +0100, Thilo Borgmann wrote:
>> Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
 [...]
 also breaks build on linux
 ./configure && make -j12
 ...
 libavfilter/vaf_spectrumsynth.c:434:9: warning: ‘ret’ may be used 
 uninitialized in this function [-Wuninitialized]
 CC  libavfilter/vf_copy.o
 OBJCC   libavfilter/vf_coreimage.o
 gcc: error trying to exec 'cc1obj': execvp: No such file or directory
 make: *** [libavfilter/vf_coreimage.o] Error 1
 make: *** Waiting for unfinished jobs
>> Should be fixed in attached patch.
> 
> No, it isn't. vf_coreimage must depend on coreimage, otherwise it will be 
> enabled for
> every platform.
> Also, coreimage is not a component listed in any list, so it's always 
> disabled. Look
> for example at chromaprint to get an idea of what's missing.

I'm sorry, I've no linux right now to test it on...
coreimage is no external lib, I don't think chromaprint analogies would fit.
It is more like avfoundation. However, I think I made one more mistake
that has been changed.

Please test again the attached patch.

Thanks!

-Thilo
From 76d67f19f1f537ca20ee86047d318558fe3a36cd Mon Sep 17 00:00:00 2001
From: Thilo Borgmann 
Date: Sat, 12 Mar 2016 23:55:50 +0100
Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
 on OSX.

---
 Changelog  |   1 +
 MAINTAINERS|   1 +
 configure  |   2 +
 doc/filters.texi   |  67 ++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_coreimage.m | 553 +
 7 files changed, 626 insertions(+)
 create mode 100644 libavfilter/vf_coreimage.m

diff --git a/Changelog b/Changelog
index 1f57f5e..5053a86 100644
--- a/Changelog
+++ b/Changelog
@@ -12,6 +12,7 @@ version :
 - ciescope filter
 - protocol blacklisting API
 - MediaCodec H264 decoding
+- coreimage filter (GPU based image filtering on OSX)
 
 
 version 3.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 531c21d..a993a67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,6 +370,7 @@ Filters:
   vf_colorbalance.c Paul B Mahol
   vf_colorkey.c Timo Rothenpieler
   vf_colorlevels.c  Paul B Mahol
+  vf_coreimage.mThilo Borgmann
   vf_deband.c   Paul B Mahol
   vf_dejudder.c Nicholas Robbins
   vf_delogo.c   Jean Delvare (CC )
diff --git a/configure b/configure
index 1b189328..d21d22d 100755
--- a/configure
+++ b/configure
@@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
 frei0r_src_filter_extralibs='$ldl'
 ladspa_filter_extralibs='$ldl'
 nvenc_encoder_extralibs='$ldl'
+coreimage_filter_extralibs="-framework QuartzCore -framework AppKit -framework 
OpenGL"
 
 if ! disabled network; then
 check_func getaddrinfo $network_extralibs
@@ -5483,6 +5484,7 @@ enabled avisynth  && { { check_lib2 "windows.h" 
LoadLibrary; } ||
die "ERROR: LoadLibrary/dlopen not found for 
avisynth"; }
 enabled cuda  && check_lib cuda.h cuInit -lcuda
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
+enabled coreimage_filter  && { check_header_objcc CoreImage/CoreImage.h || 
disable avfoundation_indev; }
 enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; }
 enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
header not found"; }
 enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
diff --git a/doc/filters.texi b/doc/filters.texi
index d5d619e..7fdbe61 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4955,6 +4955,73 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
2:-2 -1 0 -1 1 1 0 1 2:-2 -
 Copy the input source unchanged to the output. This is mainly useful for
 testing purposes.
 
+@anchor{coreimage}
+@section coreimage
+
+Video filtering on GPU using Apple's CoreImage API on OSX.
+
+Hardware acceleration is based on an OpenGL context. Usually, this means it is 
processed by video hardware. However, software-based OpenGL implementations 
exist which means there is no guarantee for hardware processing. It depends on 
the respective OSX.
+
+There are many filters and image generators provided by Apple that come with a 
large variety of options. The filter has to be referenced by its name along 
with its options.
+
+The coreimage filter accepts the following options:
+@table @option
+@item list_filters
+List all available filters along with all their respective options as well as 
possible minimum and maximum values along with 

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-12 Thread James Almer
On 3/12/2016 7:09 PM, Thilo Borgmann wrote:
> Am 12.03.16 um 21:45 schrieb Michael Niedermayer:
>> > On Sat, Mar 12, 2016 at 03:19:11PM +0100, Thilo Borgmann wrote:
>>> >> Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
 >>> Add coreimage filter for OSX.
>>> >>
>>> >> Corrected patch attached.
>>> >>
>>> >> -Thilo
>>> >>
>> > 
>>> >>  Changelog  |1 
>>> >>  MAINTAINERS|1 
>>> >>  configure  |3 
>>> >>  doc/filters.texi   |   67 +
>>> >>  libavfilter/Makefile   |1 
>>> >>  libavfilter/allfilters.c   |1 
>>> >>  libavfilter/vf_coreimage.m |  553 
>>> >> +
>>> >>  7 files changed, 627 insertions(+)
>>> >> 2bc3194273f31211d7ee3effc2af6c6d1b393db2  
>>> >> 0002-lavf-Add-coreimage-filter-for-GPU-based-image-filter.patch
>>> >> From 124fb0ce2a30c965ec28c8fbff1c04a872f33bc6 Mon Sep 17 00:00:00 2001
>>> >> From: Thilo Borgmann 
>>> >> Date: Sat, 12 Mar 2016 15:18:04 +0100
>>> >> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image 
>>> >> filtering
>>> >>  on OSX.
>>> >>
>>> >> ---
>>> >>  Changelog  |   1 +
>>> >>  MAINTAINERS|   1 +
>>> >>  configure  |   3 +
>>> >>  doc/filters.texi   |  67 ++
>>> >>  libavfilter/Makefile   |   1 +
>>> >>  libavfilter/allfilters.c   |   1 +
>>> >>  libavfilter/vf_coreimage.m | 553 
>>> >> +
>>> >>  7 files changed, 627 insertions(+)
>>> >>  create mode 100644 libavfilter/vf_coreimage.m
>>> >>
>>> >> diff --git a/Changelog b/Changelog
>>> >> index 1f57f5e..5053a86 100644
>>> >> --- a/Changelog
>>> >> +++ b/Changelog
>>> >> @@ -12,6 +12,7 @@ version :
>>> >>  - ciescope filter
>>> >>  - protocol blacklisting API
>>> >>  - MediaCodec H264 decoding
>>> >> +- coreimage filter (GPU based image filtering on OSX)
>>> >>  
>>> >>  
>>> >>  version 3.0:
>>> >> diff --git a/MAINTAINERS b/MAINTAINERS
>>> >> index 531c21d..a993a67 100644
>>> >> --- a/MAINTAINERS
>>> >> +++ b/MAINTAINERS
>>> >> @@ -370,6 +370,7 @@ Filters:
>>> >>vf_colorbalance.c Paul B Mahol
>>> >>vf_colorkey.c Timo Rothenpieler
>>> >>vf_colorlevels.c  Paul B Mahol
>>> >> +  vf_coreimage.mThilo Borgmann
>>> >>vf_deband.c   Paul B Mahol
>>> >>vf_dejudder.c Nicholas Robbins
>>> >>vf_delogo.c   Jean Delvare (CC 
>>> >> )
>>> >> diff --git a/configure b/configure
>>> >> index 1b189328..fe96215 100755
>>> >> --- a/configure
>>> >> +++ b/configure
>>> >> @@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
>>> >>  frei0r_src_filter_extralibs='$ldl'
>>> >>  ladspa_filter_extralibs='$ldl'
>>> >>  nvenc_encoder_extralibs='$ldl'
>>> >> +coreimage_filter_extralibs="-framework QuartzCore -framework AppKit 
>>> >> -framework OpenGL"
>>> >>  
>>> >>  if ! disabled network; then
>>> >>  check_func getaddrinfo $network_extralibs
>> > 
>>> >> @@ -5483,6 +5484,8 @@ enabled avisynth  && { { check_lib2 
>>> >> "windows.h" LoadLibrary; } ||
>>> >> die "ERROR: LoadLibrary/dlopen not found 
>>> >> for avisynth"; }
>>> >>  enabled cuda  && check_lib cuda.h cuInit -lcuda
>>> >>  enabled chromaprint   && require chromaprint chromaprint.h 
>>> >> chromaprint_get_version -lchromaprint
>>> >> +enabled coreimage && { check_header_oc CoreImage/CoreImage.h || 
>>> >> die "ERROR: CoreImage.h header not found"; }
>>> >> +#enabled coreimage && { check_lib2 CoreImage/CoreImage.h 
>>> >> CGGetActiveDisplayList -framework CoreImage; }
>> > 
>> > this looks suspect
> Removed.
> 
>> > also breaks build on linux
>> > ./configure && make -j12
>> > ...
>> > libavfilter/vaf_spectrumsynth.c:434:9: warning: ‘ret’ may be used 
>> > uninitialized in this function [-Wuninitialized]
>> > CC  libavfilter/vf_copy.o
>> > OBJCC   libavfilter/vf_coreimage.o
>> > gcc: error trying to exec 'cc1obj': execvp: No such file or directory
>> > make: *** [libavfilter/vf_coreimage.o] Error 1
>> > make: *** Waiting for unfinished jobs
> Should be fixed in attached patch.

No, it isn't. vf_coreimage must depend on coreimage, otherwise it will be 
enabled for
every platform.
Also, coreimage is not a component listed in any list, so it's always disabled. 
Look
for example at chromaprint to get an idea of what's missing.

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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-12 Thread Thilo Borgmann
Am 12.03.16 um 21:45 schrieb Michael Niedermayer:
> On Sat, Mar 12, 2016 at 03:19:11PM +0100, Thilo Borgmann wrote:
>> Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
>>> Add coreimage filter for OSX.
>>
>> Corrected patch attached.
>>
>> -Thilo
>>
> 
>>  Changelog  |1 
>>  MAINTAINERS|1 
>>  configure  |3 
>>  doc/filters.texi   |   67 +
>>  libavfilter/Makefile   |1 
>>  libavfilter/allfilters.c   |1 
>>  libavfilter/vf_coreimage.m |  553 
>> +
>>  7 files changed, 627 insertions(+)
>> 2bc3194273f31211d7ee3effc2af6c6d1b393db2  
>> 0002-lavf-Add-coreimage-filter-for-GPU-based-image-filter.patch
>> From 124fb0ce2a30c965ec28c8fbff1c04a872f33bc6 Mon Sep 17 00:00:00 2001
>> From: Thilo Borgmann 
>> Date: Sat, 12 Mar 2016 15:18:04 +0100
>> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>>  on OSX.
>>
>> ---
>>  Changelog  |   1 +
>>  MAINTAINERS|   1 +
>>  configure  |   3 +
>>  doc/filters.texi   |  67 ++
>>  libavfilter/Makefile   |   1 +
>>  libavfilter/allfilters.c   |   1 +
>>  libavfilter/vf_coreimage.m | 553 
>> +
>>  7 files changed, 627 insertions(+)
>>  create mode 100644 libavfilter/vf_coreimage.m
>>
>> diff --git a/Changelog b/Changelog
>> index 1f57f5e..5053a86 100644
>> --- a/Changelog
>> +++ b/Changelog
>> @@ -12,6 +12,7 @@ version :
>>  - ciescope filter
>>  - protocol blacklisting API
>>  - MediaCodec H264 decoding
>> +- coreimage filter (GPU based image filtering on OSX)
>>  
>>  
>>  version 3.0:
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 531c21d..a993a67 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -370,6 +370,7 @@ Filters:
>>vf_colorbalance.c Paul B Mahol
>>vf_colorkey.c Timo Rothenpieler
>>vf_colorlevels.c  Paul B Mahol
>> +  vf_coreimage.mThilo Borgmann
>>vf_deband.c   Paul B Mahol
>>vf_dejudder.c Nicholas Robbins
>>vf_delogo.c   Jean Delvare (CC 
>> )
>> diff --git a/configure b/configure
>> index 1b189328..fe96215 100755
>> --- a/configure
>> +++ b/configure
>> @@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
>>  frei0r_src_filter_extralibs='$ldl'
>>  ladspa_filter_extralibs='$ldl'
>>  nvenc_encoder_extralibs='$ldl'
>> +coreimage_filter_extralibs="-framework QuartzCore -framework AppKit 
>> -framework OpenGL"
>>  
>>  if ! disabled network; then
>>  check_func getaddrinfo $network_extralibs
> 
>> @@ -5483,6 +5484,8 @@ enabled avisynth  && { { check_lib2 
>> "windows.h" LoadLibrary; } ||
>> die "ERROR: LoadLibrary/dlopen not found for 
>> avisynth"; }
>>  enabled cuda  && check_lib cuda.h cuInit -lcuda
>>  enabled chromaprint   && require chromaprint chromaprint.h 
>> chromaprint_get_version -lchromaprint
>> +enabled coreimage && { check_header_oc CoreImage/CoreImage.h || die 
>> "ERROR: CoreImage.h header not found"; }
>> +#enabled coreimage && { check_lib2 CoreImage/CoreImage.h 
>> CGGetActiveDisplayList -framework CoreImage; }
> 
> this looks suspect

Removed.

> also breaks build on linux
> ./configure && make -j12
> ...
> libavfilter/vaf_spectrumsynth.c:434:9: warning: ‘ret’ may be used 
> uninitialized in this function [-Wuninitialized]
> CC  libavfilter/vf_copy.o
> OBJCC   libavfilter/vf_coreimage.o
> gcc: error trying to exec 'cc1obj': execvp: No such file or directory
> make: *** [libavfilter/vf_coreimage.o] Error 1
> make: *** Waiting for unfinished jobs

Should be fixed in attached patch.

-Thilo

From 3238a251ddd10dce64ed27abf30cf5d4b78f1b87 Mon Sep 17 00:00:00 2001
From: Thilo Borgmann 
Date: Sat, 12 Mar 2016 22:53:33 +0100
Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
 on OSX.

---
 Changelog  |   1 +
 MAINTAINERS|   1 +
 configure  |   2 +
 doc/filters.texi   |  67 ++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_coreimage.m | 553 +
 7 files changed, 626 insertions(+)
 create mode 100644 libavfilter/vf_coreimage.m

diff --git a/Changelog b/Changelog
index 1f57f5e..5053a86 100644
--- a/Changelog
+++ b/Changelog
@@ -12,6 +12,7 @@ version :
 - ciescope filter
 - protocol blacklisting API
 - MediaCodec H264 decoding
+- coreimage filter (GPU based image filtering on OSX)
 
 
 version 3.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 531c21d..a993a67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,6 +370,7 @@ Filters:
   vf_colorbalance.c Paul B Mahol
   vf_colorkey.c

Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-12 Thread Michael Niedermayer
On Sat, Mar 12, 2016 at 03:19:11PM +0100, Thilo Borgmann wrote:
> Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
> > Add coreimage filter for OSX.
> 
> Corrected patch attached.
> 
> -Thilo
> 

>  Changelog  |1 
>  MAINTAINERS|1 
>  configure  |3 
>  doc/filters.texi   |   67 +
>  libavfilter/Makefile   |1 
>  libavfilter/allfilters.c   |1 
>  libavfilter/vf_coreimage.m |  553 
> +
>  7 files changed, 627 insertions(+)
> 2bc3194273f31211d7ee3effc2af6c6d1b393db2  
> 0002-lavf-Add-coreimage-filter-for-GPU-based-image-filter.patch
> From 124fb0ce2a30c965ec28c8fbff1c04a872f33bc6 Mon Sep 17 00:00:00 2001
> From: Thilo Borgmann 
> Date: Sat, 12 Mar 2016 15:18:04 +0100
> Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
>  on OSX.
> 
> ---
>  Changelog  |   1 +
>  MAINTAINERS|   1 +
>  configure  |   3 +
>  doc/filters.texi   |  67 ++
>  libavfilter/Makefile   |   1 +
>  libavfilter/allfilters.c   |   1 +
>  libavfilter/vf_coreimage.m | 553 
> +
>  7 files changed, 627 insertions(+)
>  create mode 100644 libavfilter/vf_coreimage.m
> 
> diff --git a/Changelog b/Changelog
> index 1f57f5e..5053a86 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -12,6 +12,7 @@ version :
>  - ciescope filter
>  - protocol blacklisting API
>  - MediaCodec H264 decoding
> +- coreimage filter (GPU based image filtering on OSX)
>  
>  
>  version 3.0:
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 531c21d..a993a67 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -370,6 +370,7 @@ Filters:
>vf_colorbalance.c Paul B Mahol
>vf_colorkey.c Timo Rothenpieler
>vf_colorlevels.c  Paul B Mahol
> +  vf_coreimage.mThilo Borgmann
>vf_deband.c   Paul B Mahol
>vf_dejudder.c Nicholas Robbins
>vf_delogo.c   Jean Delvare (CC )
> diff --git a/configure b/configure
> index 1b189328..fe96215 100755
> --- a/configure
> +++ b/configure
> @@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
>  frei0r_src_filter_extralibs='$ldl'
>  ladspa_filter_extralibs='$ldl'
>  nvenc_encoder_extralibs='$ldl'
> +coreimage_filter_extralibs="-framework QuartzCore -framework AppKit 
> -framework OpenGL"
>  
>  if ! disabled network; then
>  check_func getaddrinfo $network_extralibs

> @@ -5483,6 +5484,8 @@ enabled avisynth  && { { check_lib2 "windows.h" 
> LoadLibrary; } ||
> die "ERROR: LoadLibrary/dlopen not found for 
> avisynth"; }
>  enabled cuda  && check_lib cuda.h cuInit -lcuda
>  enabled chromaprint   && require chromaprint chromaprint.h 
> chromaprint_get_version -lchromaprint
> +enabled coreimage && { check_header_oc CoreImage/CoreImage.h || die 
> "ERROR: CoreImage.h header not found"; }
> +#enabled coreimage && { check_lib2 CoreImage/CoreImage.h 
> CGGetActiveDisplayList -framework CoreImage; }

this looks suspect

also breaks build on linux
./configure && make -j12
...
libavfilter/vaf_spectrumsynth.c:434:9: warning: ‘ret’ may be used uninitialized 
in this function [-Wuninitialized]
CC  libavfilter/vf_copy.o
OBJCC   libavfilter/vf_coreimage.o
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
make: *** [libavfilter/vf_coreimage.o] Error 1
make: *** Waiting for unfinished jobs

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein


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


Re: [FFmpeg-devel] [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering on OSX.

2016-03-12 Thread Thilo Borgmann
Am 12.03.16 um 15:14 schrieb Thilo Borgmann:
> Add coreimage filter for OSX.

Corrected patch attached.

-Thilo

From 124fb0ce2a30c965ec28c8fbff1c04a872f33bc6 Mon Sep 17 00:00:00 2001
From: Thilo Borgmann 
Date: Sat, 12 Mar 2016 15:18:04 +0100
Subject: [PATCH 2/2] lavf: Add coreimage filter for GPU based image filtering
 on OSX.

---
 Changelog  |   1 +
 MAINTAINERS|   1 +
 configure  |   3 +
 doc/filters.texi   |  67 ++
 libavfilter/Makefile   |   1 +
 libavfilter/allfilters.c   |   1 +
 libavfilter/vf_coreimage.m | 553 +
 7 files changed, 627 insertions(+)
 create mode 100644 libavfilter/vf_coreimage.m

diff --git a/Changelog b/Changelog
index 1f57f5e..5053a86 100644
--- a/Changelog
+++ b/Changelog
@@ -12,6 +12,7 @@ version :
 - ciescope filter
 - protocol blacklisting API
 - MediaCodec H264 decoding
+- coreimage filter (GPU based image filtering on OSX)
 
 
 version 3.0:
diff --git a/MAINTAINERS b/MAINTAINERS
index 531c21d..a993a67 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -370,6 +370,7 @@ Filters:
   vf_colorbalance.c Paul B Mahol
   vf_colorkey.c Timo Rothenpieler
   vf_colorlevels.c  Paul B Mahol
+  vf_coreimage.mThilo Borgmann
   vf_deband.c   Paul B Mahol
   vf_dejudder.c Nicholas Robbins
   vf_delogo.c   Jean Delvare (CC )
diff --git a/configure b/configure
index 1b189328..fe96215 100755
--- a/configure
+++ b/configure
@@ -5255,6 +5255,7 @@ frei0r_filter_extralibs='$ldl'
 frei0r_src_filter_extralibs='$ldl'
 ladspa_filter_extralibs='$ldl'
 nvenc_encoder_extralibs='$ldl'
+coreimage_filter_extralibs="-framework QuartzCore -framework AppKit -framework 
OpenGL"
 
 if ! disabled network; then
 check_func getaddrinfo $network_extralibs
@@ -5483,6 +5484,8 @@ enabled avisynth  && { { check_lib2 "windows.h" 
LoadLibrary; } ||
die "ERROR: LoadLibrary/dlopen not found for 
avisynth"; }
 enabled cuda  && check_lib cuda.h cuInit -lcuda
 enabled chromaprint   && require chromaprint chromaprint.h 
chromaprint_get_version -lchromaprint
+enabled coreimage && { check_header_oc CoreImage/CoreImage.h || die 
"ERROR: CoreImage.h header not found"; }
+#enabled coreimage && { check_lib2 CoreImage/CoreImage.h 
CGGetActiveDisplayList -framework CoreImage; }
 enabled decklink  && { check_header DeckLinkAPI.h || die "ERROR: 
DeckLinkAPI.h header not found"; }
 enabled frei0r&& { check_header frei0r.h || die "ERROR: frei0r.h 
header not found"; }
 enabled gmp   && require2 gmp gmp.h mpz_export -lgmp
diff --git a/doc/filters.texi b/doc/filters.texi
index d5d619e..7fdbe61 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -4955,6 +4955,73 @@ convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 
2:-2 -1 0 -1 1 1 0 1 2:-2 -
 Copy the input source unchanged to the output. This is mainly useful for
 testing purposes.
 
+@anchor{coreimage}
+@section coreimage
+
+Video filtering on GPU using Apple's CoreImage API on OSX.
+
+Hardware acceleration is based on an OpenGL context. Usually, this means it is 
processed by video hardware. However, software-based OpenGL implementations 
exist which means there is no guarantee for hardware processing. It depends on 
the respective OSX.
+
+There are many filters and image generators provided by Apple that come with a 
large variety of options. The filter has to be referenced by its name along 
with its options.
+
+The coreimage filter accepts the following options:
+@table @option
+@item list_filters
+List all available filters along with all their respective options as well as 
possible minimum and maximum values along with the default values.
+@example
+coreimage=list_filters=true
+@end example
+
+@item filter
+Specifiy all filters by their respective name and options.
+Use @option{list_filters} to determine all valid filter names and options.
+Numerical options are specified by a float value and are automatically clamped 
to their respective value range.
+Vector and color options have to be specified by a list of space separated 
float values. Character escaping has to be done.
+A special option name @code{default} is available to use default options for a 
filter.
+It is required to specify either @code{default} or at least one of the filter 
options.
+All omitted options are used with their default values.
+The syntax of the filter string is as follows:
+@example
+filter=@=[@=][@...][#@=[@=][@...]]
+@end example
+@end table
+
+Several filters can be chained for successive processing without GPU-HOST 
transfers allowing for fast processing of complex filter chains.
+Currently, only filters with zero (generators) or exactly one (filters) input 
image and one output