Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-20 Thread Michael Bradshaw
On Wed, Oct 18, 2017 at 8:21 PM, Michael Bradshaw <
mjbshaw-at-google@ffmpeg.org> wrote:
>
> Updated patch attached (which contains James Almer's suggestion for the
> -DOPJ_STATIC fix; thanks, James!).


Patch pushed. Thanks, all. Please let me know if anyone hits any snags due
to this.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-19 Thread Michael Bradshaw
On Thu, Oct 19, 2017 at 2:28 AM, Moritz Barsnick  wrote:

> On Wed, Oct 18, 2017 at 20:21:21 -0700, Michael Bradshaw wrote:
> > I've added a note to the Changelog. Let me know if there are additional
> > notices that should be made.
>
> It was remarked that pkg-config support was introduced with *2.0.1*,
> not *2.1(.0)*. James's comment:
>

Indeed. I'm intentionally dropping support for 2.0.x.

http://ffmpeg.org/pipermail/ffmpeg-devel/2017-October/218145.html
> where his remark was:
> > OpenJPEG 2.0.1 ships a pkg-config file, so change the second argument to
> > "libopenjp2 >= 2.1.0".
>
> I consider the second line a typo. James?
>
> Indeed, this commit here adds the .pc file to openjpeg2:
> https://github.com/uclouvain/openjpeg/commit/
> 87e09a09da6493b9e25193173091fd56c2063136#diff-
> 20f723280676e973232128ea1ba322ee
> and this commit is included in the repo's "version.2.0.1" tag.
>
> Perhaps you want to relax the check (and the Changelog) - I understand
> that was James's original intent. (Not that I care for that version
> personally.)


There was an API change between 2.0 and 2.1. Since 2.1, the API has been
stable. I want to remove all the #if hacks in our code, so dropping 2.0 is
a necessary part of that.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-19 Thread Moritz Barsnick
On Wed, Oct 18, 2017 at 20:21:21 -0700, Michael Bradshaw wrote:
> I've added a note to the Changelog. Let me know if there are additional
> notices that should be made.

It was remarked that pkg-config support was introduced with *2.0.1*,
not *2.1(.0)*. James's comment:

http://ffmpeg.org/pipermail/ffmpeg-devel/2017-October/218145.html
where his remark was:
> OpenJPEG 2.0.1 ships a pkg-config file, so change the second argument to
> "libopenjp2 >= 2.1.0".

I consider the second line a typo. James?

Indeed, this commit here adds the .pc file to openjpeg2:
https://github.com/uclouvain/openjpeg/commit/87e09a09da6493b9e25193173091fd56c2063136#diff-20f723280676e973232128ea1ba322ee
and this commit is included in the repo's "version.2.0.1" tag.

Perhaps you want to relax the check (and the Changelog) - I understand
that was James's original intent. (Not that I care for that version
personally.)

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


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Michael Bradshaw
On Wed, Oct 18, 2017 at 5:04 PM, Michael Niedermayer  wrote:
>
> i think  the patch should add some note to the release notes or
> changelog
>

I've added a note to the Changelog. Let me know if there are additional
notices that should be made.

Updated patch attached (which contains James Almer's suggestion for the
-DOPJ_STATIC fix; thanks, James!).


0001-lavc-drop-support-for-OpenJPEG-1.3-2.0.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Stephen Hutchinson

On 10/18/2017 6:49 PM, Ricardo Constantino wrote:


There's a few other libs that require static-only Cflags (libxml2, at
least), so openjpeg shouldn't be different. pkgconf does support
Cflags.private, but no one uses it.


To be fair, I did submit a pull request¹ to twolame that would
have -DLIBTWOLAME_STATIC placed under Cflags.private for the
pkgconf case, but got no response after I updated the PR with
that commit.

¹https://github.com/njh/twolame/pull/52
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Michael Niedermayer
On Wed, Oct 18, 2017 at 01:46:59PM -0700, Michael Bradshaw wrote:
> On Wed, Oct 18, 2017 at 1:26 PM, Michael Niedermayer  > wrote:
> >
> > correction, xenial and zesty have 2.1.* under the name libopenjp2-7
> >
> > trusty does not though
> 
> 
> Yeah, Ubuntu 14.04 is stuck on the ancient OpenJPEG 1.3. I think it's fine
> to proceed with this patch since:
> 
> 1) OpenJPEG 1.3 sets AV_CODEC_CAP_EXPERIMENTAL[1], so support for it was
> already kinda experimental.
> 2) This doesn't impact old versions of ffmpeg. If people are building
> ffmpeg 3.5+ on Ubuntu 14.04 on their own, then they can also build OpenJPEG
> 2.1+ on their own.

i think  the patch should add some note to the release notes or
changelog

[...]

-- 
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] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Ricardo Constantino
On 19 October 2017 at 00:14, James Almer  wrote:

> On 10/18/2017 7:49 PM, Ricardo Constantino wrote:
>
> > There's a few other libs that require static-only Cflags (libxml2, at
> > least), so openjpeg shouldn't be different. pkgconf does support
> > Cflags.private, but no one uses it.
>
> Where did you read it's supported? All the references to
> "Cflags.private" i found on google were feature requests, and i just
> tried to add such a line to a pkg-config and it was ignored (using
> pkg-config 0.29.2).
>
> In any case, openjpeg had checks with this cflag in configure before
> this patch. Active maintainers for the wrappers that also need this kind
> of cflag should look into adding them to configure (Should be a matter
> of doing the same thing i did above).
>
>
https://github.com/pkgconf/pkgconf not pkg-config.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread James Almer
On 10/18/2017 7:49 PM, Ricardo Constantino wrote:
> On 18 October 2017 at 23:22, James Almer  wrote:
> 
>> On 10/18/2017 6:56 PM, Michael Bradshaw wrote:
>>> -DOPJ_STATIC was originally added to ffmpeg's configure script for
>> Windows.
>>> Unconditionally adding -DOPJ_STATIC would conflict with people who are
>>> dynamically linking. I'll look into this further. I'll start with the
>>> following:
>>>
>>> enabled libopenjpeg   && {{require_pkg_config libopenjpeg "libopenjp2
 = 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
>>> -DOPJ_STATIC;} ||
>>>   require_pkg_config libopenjpeg "libopenjp2
>>> =
>>> 2.1.0" openjpeg.h opj_version;}
>>>
>>> and see if it works for both static and dynamic builds of OpenJPEG.
>>> Unfortunately, I don't have a Windows system to test on, so if anyone can
>>> validate the above on Windows I'd appreciate it.
>>
>> I have a Windows system. With a shared version of OpenJPEG the configure
>> check seems to succeed with and without -DOPJ_STATIC, but with a static
>> version it only succeed with it.
>> Ideally, pkg-config would have something like a "Cflags.private" field,
>> but it for some reason doesn't, so it's up to us to handle this.
>>
>> It think the following should be enough:
>>
>>> enabled libopenjpeg   && { use_pkg_config libopenjpeg "libopenjp2 >=
>> 2.1.0" openjpeg.h opj_version ||
>>>{ require_pkg_config libopenjpeg
>> "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
>> -DOPJ_STATIC; } }
>>
>> To make sure -DOPJ_STATIC is not used unless strictly necessary.
> 
> 
> There's a few other libs that require static-only Cflags (libxml2, at
> least), so openjpeg shouldn't be different. pkgconf does support
> Cflags.private, but no one uses it.

Where did you read it's supported? All the references to
"Cflags.private" i found on google were feature requests, and i just
tried to add such a line to a pkg-config and it was ignored (using
pkg-config 0.29.2).

In any case, openjpeg had checks with this cflag in configure before
this patch. Active maintainers for the wrappers that also need this kind
of cflag should look into adding them to configure (Should be a matter
of doing the same thing i did above).
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread James Almer
On 10/18/2017 7:49 PM, Reino Wijnsma wrote:
> On 19-10-2017 0:22, James Almer  wrote:
>> It think the following should be enough:
>>> enabled libopenjpeg   && { use_pkg_config libopenjpeg "libopenjp2 >= 
>>> 2.1.0" openjpeg.h opj_version ||
>>>{ require_pkg_config libopenjpeg "libopenjp2 
>>> >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; 
>>> } }
>> To make sure -DOPJ_STATIC is not used unless strictly necessary.
> 
> Works overhere. No errors.
> 
> A bit off-topic, but can you explain to me why you (FFmpeg developers)
> /have/ added -DOPJ_STATIC to libopenjpeg in the past, but /haven't/
> added -DCACA_STATIC, -DMODPLUG_STATIC and -DLIBTWOLAME_STATIC to
> libcaca, libmodplug and libtwolame?

Different developers/maintainers, different amount of users reporting
issues with one library compared to another, etc.

> 
> -- Reino
> ___
> 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] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Ricardo Constantino
On 18 October 2017 at 23:22, James Almer  wrote:

> On 10/18/2017 6:56 PM, Michael Bradshaw wrote:
> > -DOPJ_STATIC was originally added to ffmpeg's configure script for
> Windows.
> > Unconditionally adding -DOPJ_STATIC would conflict with people who are
> > dynamically linking. I'll look into this further. I'll start with the
> > following:
> >
> > enabled libopenjpeg   && {{require_pkg_config libopenjpeg "libopenjp2
> >> = 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
> > -DOPJ_STATIC;} ||
> >   require_pkg_config libopenjpeg "libopenjp2
> >=
> > 2.1.0" openjpeg.h opj_version;}
> >
> > and see if it works for both static and dynamic builds of OpenJPEG.
> > Unfortunately, I don't have a Windows system to test on, so if anyone can
> > validate the above on Windows I'd appreciate it.
>
> I have a Windows system. With a shared version of OpenJPEG the configure
> check seems to succeed with and without -DOPJ_STATIC, but with a static
> version it only succeed with it.
> Ideally, pkg-config would have something like a "Cflags.private" field,
> but it for some reason doesn't, so it's up to us to handle this.
>
> It think the following should be enough:
>
> > enabled libopenjpeg   && { use_pkg_config libopenjpeg "libopenjp2 >=
> 2.1.0" openjpeg.h opj_version ||
> >{ require_pkg_config libopenjpeg
> "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
> -DOPJ_STATIC; } }
>
> To make sure -DOPJ_STATIC is not used unless strictly necessary.


There's a few other libs that require static-only Cflags (libxml2, at
least), so openjpeg shouldn't be different. pkgconf does support
Cflags.private, but no one uses it.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Reino Wijnsma
On 19-10-2017 0:22, James Almer  wrote:
> It think the following should be enough:
>> enabled libopenjpeg   && { use_pkg_config libopenjpeg "libopenjp2 >= 
>> 2.1.0" openjpeg.h opj_version ||
>>{ require_pkg_config libopenjpeg "libopenjp2 
>> >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; 
>> } }
> To make sure -DOPJ_STATIC is not used unless strictly necessary.

Works overhere. No errors.

A bit off-topic, but can you explain to me why you (FFmpeg developers)
/have/ added -DOPJ_STATIC to libopenjpeg in the past, but /haven't/
added -DCACA_STATIC, -DMODPLUG_STATIC and -DLIBTWOLAME_STATIC to
libcaca, libmodplug and libtwolame?

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


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread James Almer
On 10/18/2017 6:56 PM, Michael Bradshaw wrote:
> -DOPJ_STATIC was originally added to ffmpeg's configure script for Windows.
> Unconditionally adding -DOPJ_STATIC would conflict with people who are
> dynamically linking. I'll look into this further. I'll start with the
> following:
> 
> enabled libopenjpeg   && {{require_pkg_config libopenjpeg "libopenjp2
>> = 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
> -DOPJ_STATIC;} ||
>   require_pkg_config libopenjpeg "libopenjp2 >=
> 2.1.0" openjpeg.h opj_version;}
> 
> and see if it works for both static and dynamic builds of OpenJPEG.
> Unfortunately, I don't have a Windows system to test on, so if anyone can
> validate the above on Windows I'd appreciate it.

I have a Windows system. With a shared version of OpenJPEG the configure
check seems to succeed with and without -DOPJ_STATIC, but with a static
version it only succeed with it.
Ideally, pkg-config would have something like a "Cflags.private" field,
but it for some reason doesn't, so it's up to us to handle this.

It think the following should be enough:

> enabled libopenjpeg   && { use_pkg_config libopenjpeg "libopenjp2 >= 
> 2.1.0" openjpeg.h opj_version ||
>{ require_pkg_config libopenjpeg "libopenjp2 
> >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } 
> }

To make sure -DOPJ_STATIC is not used unless strictly necessary.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Michael Bradshaw
On Wed, Oct 18, 2017 at 2:44 PM, Reino Wijnsma  wrote:
>
> Is there a reason you left out -DOPJ_STATIC?
>

I assumed OpenJPEG's pkgconfig file would be smart enough to add it in if
needed. Apparently that's not the case. Dang.

'openjpeg_git/src/lib/openjp2/libopenjp2.pc.cmake.in' doesn't put it in.
> With this patch ./configure therefor fails over here with:
> "test.o:test.c:(.text+0x1): undefined reference to `_imp__opj_version@0'".
>
> enabled libopenjpeg   && require_pkg_config libopenjpeg "libopenjp2
> >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC
>
> This line fixes that.


-DOPJ_STATIC was originally added to ffmpeg's configure script for Windows.
Unconditionally adding -DOPJ_STATIC would conflict with people who are
dynamically linking. I'll look into this further. I'll start with the
following:

enabled libopenjpeg   && {{require_pkg_config libopenjpeg "libopenjp2
>= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
-DOPJ_STATIC;} ||
  require_pkg_config libopenjpeg "libopenjp2 >=
2.1.0" openjpeg.h opj_version;}

and see if it works for both static and dynamic builds of OpenJPEG.
Unfortunately, I don't have a Windows system to test on, so if anyone can
validate the above on Windows I'd appreciate it.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Reino Wijnsma
On 18-10-2017 21:46, Michael Bradshaw 
wrote:
> From fb8334d0cecc889ebce3af968c56a3afbd2f6047 Mon Sep 17 00:00:00 2001
> From: Michael Bradshaw 
> Date: Wed, 18 Oct 2017 11:34:06 -0700
> Subject: [PATCH] lavc: drop support for OpenJPEG 1.3-2.0
>
> We now require 2.1+ with pkg-config.
>
> Signed-off-by: Michael Bradshaw 
> ---
>  Changelog   |   2 +
>  configure   |  16 +
>  libavcodec/libopenjpegdec.c | 103 ++---
>  libavcodec/libopenjpegenc.c | 156 
> +++-
>  4 files changed, 34 insertions(+), 243 deletions(-)
> [...]
> -enabled libopenjpeg   && { { check_lib libopenjpeg 
> openjpeg-2.3/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.3/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.2/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.0/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   { check_lib libopenjpeg 
> openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   { check_lib libopenjpeg openjpeg.h 
> opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
> -   die "ERROR: libopenjpeg not found"; }
> +enabled libopenjpeg   && require_pkg_config libopenjpeg "libopenjp2 >= 
> 2.1.0" openjpeg.h opj_version
Is there a reason you left out -DOPJ_STATIC?
'openjpeg_git/src/lib/openjp2/libopenjp2.pc.cmake.in' doesn't put it in.
With this patch ./configure therefor fails over here with:
"test.o:test.c:(.text+0x1): undefined reference to `_imp__opj_version@0'".

enabled libopenjpeg   && require_pkg_config libopenjpeg "libopenjp2
>= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC

This line fixes that.

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


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread James Almer
On 10/18/2017 5:46 PM, Michael Bradshaw wrote:
> On Wed, Oct 18, 2017 at 1:26 PM, Michael Niedermayer > wrote:
>>
>> correction, xenial and zesty have 2.1.* under the name libopenjp2-7
>>
>> trusty does not though
> 
> 
> Yeah, Ubuntu 14.04 is stuck on the ancient OpenJPEG 1.3. I think it's fine
> to proceed with this patch since:
> 
> 1) OpenJPEG 1.3 sets AV_CODEC_CAP_EXPERIMENTAL[1], so support for it was
> already kinda experimental.
> 2) This doesn't impact old versions of ffmpeg. If people are building
> ffmpeg 3.5+ on Ubuntu 14.04 on their own, then they can also build OpenJPEG
> 2.1+ on their own.

+1

Also, ffmpeg is not in Trusty, so you have to build it yourself
regardless of version to use it there.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Michael Bradshaw
On Wed, Oct 18, 2017 at 1:26 PM, Michael Niedermayer  wrote:
>
> correction, xenial and zesty have 2.1.* under the name libopenjp2-7
>
> trusty does not though


Yeah, Ubuntu 14.04 is stuck on the ancient OpenJPEG 1.3. I think it's fine
to proceed with this patch since:

1) OpenJPEG 1.3 sets AV_CODEC_CAP_EXPERIMENTAL[1], so support for it was
already kinda experimental.
2) This doesn't impact old versions of ffmpeg. If people are building
ffmpeg 3.5+ on Ubuntu 14.04 on their own, then they can also build OpenJPEG
2.1+ on their own.

[1]: https://github.com/FFmpeg/FFmpeg/blob/master/
libavcodec/libopenjpegdec.c#L575
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Michael Niedermayer
On Wed, Oct 18, 2017 at 10:22:13PM +0200, Michael Niedermayer wrote:
> On Wed, Oct 18, 2017 at 12:46:13PM -0700, Michael Bradshaw wrote:
> > Thanks for the review!
> > 
> > On Wed, Oct 18, 2017 at 12:26 PM, James Almer  wrote:
> > >
> > > Add a line to Changelog about dropping support for OpenJPEG <= 2.0.
> > >
> > 
> > Done.
> > 
> > > +enabled libopenjpeg   && require_pkg_config libopenjpeg libopenjp2
> > > openjpeg.h opj_version
> > >
> > > OpenJPEG 2.0.1 ships a pkg-config file, so change the second argument to
> > > "libopenjp2 >= 2.1.0".
> > >
> > 
> > Thanks for catching that; I didn't realize 2.0.1 included pkg-config
> > support. Fixed.
> > 
> > Aside from that LGTM. It's nice to see all the bloat gone and every
> > > future 2.x version being supported without further changes from now on.
> > 
> > 
> > Yeah, I look forward to the decreased maintenance costs!
> > 
> > Attached is an updated patch with the requested changes to configure and
> > Changelog. I plan on pushing this in a few hours (unless, of course, there
> > are additional critiques).
> 
> >  Changelog   |2 
> >  configure   |   16 
> >  libavcodec/libopenjpegdec.c |  103 +
> >  libavcodec/libopenjpegenc.c |  156 
> > +++-
> >  4 files changed, 34 insertions(+), 243 deletions(-)
> > e3a7a5c8ebe0d5c0b0eb92c0e61871ab5e9e285e  
> > 0001-lavc-drop-support-for-OpenJPEG-1.3-2.0.patch
> > From fb8334d0cecc889ebce3af968c56a3afbd2f6047 Mon Sep 17 00:00:00 2001
> > From: Michael Bradshaw 
> > Date: Wed, 18 Oct 2017 11:34:06 -0700
> > Subject: [PATCH] lavc: drop support for OpenJPEG 1.3-2.0
> > 
> > We now require 2.1+ with pkg-config.
> 
> This drops support for all ubuntu versions, there seems to be no
> openjpeg above 1.5 in there
> 
> https://packages.ubuntu.com/search?keywords=openjpeg=names=all=all
> from Package openjpeg-tools, the others are spread over multiple package names
> trusty (14.04LTS) (graphics): command-line tools using the JPEG 2000 
> library [universe]
> 1.3+dfsg-4.7ubuntu1: amd64 arm64 armhf i386 powerpc ppc64el
> xenial (16.04LTS) (graphics): command-line tools using the JPEG 2000 
> library [universe]
> 1:1.5.2-3.1: amd64 arm64 armhf i386 powerpc ppc64el s390x
> zesty (graphics): command-line tools using the JPEG 2000 library 
> [universe]
> 1:1.5.2-3.1 [ports]: powerpc

correction, xenial and zesty have 2.1.* under the name libopenjp2-7

trusty does not though

[...]


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf


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


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Michael Niedermayer
On Wed, Oct 18, 2017 at 12:46:13PM -0700, Michael Bradshaw wrote:
> Thanks for the review!
> 
> On Wed, Oct 18, 2017 at 12:26 PM, James Almer  wrote:
> >
> > Add a line to Changelog about dropping support for OpenJPEG <= 2.0.
> >
> 
> Done.
> 
> > +enabled libopenjpeg   && require_pkg_config libopenjpeg libopenjp2
> > openjpeg.h opj_version
> >
> > OpenJPEG 2.0.1 ships a pkg-config file, so change the second argument to
> > "libopenjp2 >= 2.1.0".
> >
> 
> Thanks for catching that; I didn't realize 2.0.1 included pkg-config
> support. Fixed.
> 
> Aside from that LGTM. It's nice to see all the bloat gone and every
> > future 2.x version being supported without further changes from now on.
> 
> 
> Yeah, I look forward to the decreased maintenance costs!
> 
> Attached is an updated patch with the requested changes to configure and
> Changelog. I plan on pushing this in a few hours (unless, of course, there
> are additional critiques).

>  Changelog   |2 
>  configure   |   16 
>  libavcodec/libopenjpegdec.c |  103 +
>  libavcodec/libopenjpegenc.c |  156 
> +++-
>  4 files changed, 34 insertions(+), 243 deletions(-)
> e3a7a5c8ebe0d5c0b0eb92c0e61871ab5e9e285e  
> 0001-lavc-drop-support-for-OpenJPEG-1.3-2.0.patch
> From fb8334d0cecc889ebce3af968c56a3afbd2f6047 Mon Sep 17 00:00:00 2001
> From: Michael Bradshaw 
> Date: Wed, 18 Oct 2017 11:34:06 -0700
> Subject: [PATCH] lavc: drop support for OpenJPEG 1.3-2.0
> 
> We now require 2.1+ with pkg-config.

This drops support for all ubuntu versions, there seems to be no
openjpeg above 1.5 in there

https://packages.ubuntu.com/search?keywords=openjpeg=names=all=all
from Package openjpeg-tools, the others are spread over multiple package names
trusty (14.04LTS) (graphics): command-line tools using the JPEG 2000 
library [universe]
1.3+dfsg-4.7ubuntu1: amd64 arm64 armhf i386 powerpc ppc64el
xenial (16.04LTS) (graphics): command-line tools using the JPEG 2000 
library [universe]
1:1.5.2-3.1: amd64 arm64 armhf i386 powerpc ppc64el s390x
zesty (graphics): command-line tools using the JPEG 2000 library [universe]
1:1.5.2-3.1 [ports]: powerpc

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable


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


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Michael Bradshaw
Thanks for the review!

On Wed, Oct 18, 2017 at 12:26 PM, James Almer  wrote:
>
> Add a line to Changelog about dropping support for OpenJPEG <= 2.0.
>

Done.

> +enabled libopenjpeg   && require_pkg_config libopenjpeg libopenjp2
> openjpeg.h opj_version
>
> OpenJPEG 2.0.1 ships a pkg-config file, so change the second argument to
> "libopenjp2 >= 2.1.0".
>

Thanks for catching that; I didn't realize 2.0.1 included pkg-config
support. Fixed.

Aside from that LGTM. It's nice to see all the bloat gone and every
> future 2.x version being supported without further changes from now on.


Yeah, I look forward to the decreased maintenance costs!

Attached is an updated patch with the requested changes to configure and
Changelog. I plan on pushing this in a few hours (unless, of course, there
are additional critiques).


0001-lavc-drop-support-for-OpenJPEG-1.3-2.0.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread James Almer
On 10/18/2017 3:43 PM, Michael Bradshaw wrote:
> Hi,
> 
> Attached patch drops support for OpenJPEG 1.3, 1.4, 1.5, and 2.0. After
> this patch, only versions 2.1 and above will be supported (and will require
> pkg-config).
> 
> Tested locally on macOS with OpenJPEG 2.3 by both encoding and decoding a
> jp2 file.
> 
> Please review.
> 
> Thanks,
> 
> --Michael

Add a line to Changelog about dropping support for OpenJPEG <= 2.0.

> From b1f10da6e945c361b181364f396c5051410afcc4 Mon Sep 17 00:00:00 2001
> From: Michael Bradshaw 
> Date: Wed, 18 Oct 2017 11:34:06 -0700
> Subject: [PATCH] lavc: drop support for OpenJPEG 1.3-2.0
> 
> We now require 2.1+ with pkg-config.
> 
> Signed-off-by: Michael Bradshaw 
> ---
>  configure   |  16 +
>  libavcodec/libopenjpegdec.c | 103 ++---
>  libavcodec/libopenjpegenc.c | 156 
> +++-
>  3 files changed, 32 insertions(+), 243 deletions(-)
> 
> diff --git a/configure b/configure
> index e4c4567138..95e7f83e79 100755
> --- a/configure
> +++ b/configure
> @@ -1938,11 +1938,6 @@ HEADERS_LIST="
>  machine_ioctl_meteor_h
>  malloc_h
>  opencv2_core_core_c_h
> -openjpeg_2_3_openjpeg_h
> -openjpeg_2_2_openjpeg_h
> -openjpeg_2_1_openjpeg_h
> -openjpeg_2_0_openjpeg_h
> -openjpeg_1_5_openjpeg_h
>  OpenGL_gl3_h
>  poll_h
>  soundcard_h
> @@ -6034,16 +6029,7 @@ enabled libopencv && { check_header 
> opencv2/core/core_c.h &&
>   require libopencv opencv2/core/core_c.h 
> cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
> require_pkg_config libopencv opencv 
> opencv/cxcore.h cvCreateImageHeader; }
>  enabled libopenh264   && require_pkg_config libopenh264 openh264 
> wels/codec_api.h WelsGetCodecVersion
> -enabled libopenjpeg   && { { check_lib libopenjpeg 
> openjpeg-2.3/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.3/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.2/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   check_lib libopenjpeg openjpeg-2.1/openjpeg.h 
> opj_version -lopenjp2 ||
> -   { check_lib libopenjpeg 
> openjpeg-2.0/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   { check_lib libopenjpeg 
> openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags 
> -DOPJ_STATIC; } ||
> -   { check_lib libopenjpeg openjpeg.h 
> opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
> -   die "ERROR: libopenjpeg not found"; }
> +enabled libopenjpeg   && require_pkg_config libopenjpeg libopenjp2 
> openjpeg.h opj_version

OpenJPEG 2.0.1 ships a pkg-config file, so change the second argument to
"libopenjp2 >= 2.1.0".

Aside from that LGTM. It's nice to see all the bloat gone and every
future 2.x version being supported without further changes from now on.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

2017-10-18 Thread Michael Bradshaw
Hi,

Attached patch drops support for OpenJPEG 1.3, 1.4, 1.5, and 2.0. After
this patch, only versions 2.1 and above will be supported (and will require
pkg-config).

Tested locally on macOS with OpenJPEG 2.3 by both encoding and decoding a
jp2 file.

Please review.

Thanks,

--Michael


0001-lavc-drop-support-for-OpenJPEG-1.3-2.0.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel