[FFmpeg-devel] Support master branch of OpenJPEG and Grok J2K codecs

Aaron Boxer boxerab at gmail.com
Mon Apr 4 14:02:28 CEST 2016


On Mon, Apr 4, 2016 at 3:39 AM, Tobias Rapp <t.rapp at noa-archive.com> wrote:

> On 04.04.2016 02:36, Aaron Boxer wrote:
>
>> [...]
>>
> >
>
>> Thanks, Michael. Here is an updated patch with the bpp change removed.
>>
>> Aaron
>>
>> From fb7551a8f9fe6a5317f01c9f33a76f8ae67ad979 Mon Sep 17 00:00:00 2001
>> From: Aaron Boxer <boxerab at gmail.com>
>> Date: Sun, 3 Apr 2016 20:30:04 -0400
>> Subject: [PATCH] Support the following jpeg 2000 codecs:
>>
>> a) latest release of openjpeg (2.1)
>> b) master branch of openjpeg
>> c) grok (https://github.com/GrokImageCompression/grok)
>>
>> The following changes were made:
>>
>> 1. Removed OPJ_STATIC flag in configure: in master branch of openjpeg and
>> in grok, this flag indicates a static build, so codec API functions are
>> marked as hidden. This prevents FFmpeg from using a dynamic build of these
>> codecs.
>> 2. link to libdl. This is needed by grok, as it supports a plugin
>> architecture that allows plugins to be dynamically loaded at runtime.
>>
>> I have tested these changes with openjpeg 2.1, openjpeg master, and grok
>> master.Test was to make sure ./configure and make showed no errors, and
>> then to decompress a J2K file.  Everything worked for all three
>> configurations, with no errors.
>> ---
>>  configure                   | 2 +-
>>  libavcodec/libopenjpegdec.c | 2 +-
>>  libavcodec/libopenjpegenc.c | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 94a66d8..4e81385 100755
>> --- a/configure
>> +++ b/configure
>> @@ -5561,7 +5561,7 @@ enabled libopencv         && { check_header
>> opencv2/core/core_c.h &&
>>                                   require opencv opencv2/core/core_c.h
>> cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
>>                                 require_pkg_config opencv opencv/cxcore.h
>> cvCreateImageHeader; }
>>  enabled libopenh264       && require_pkg_config openh264
>> wels/codec_api.h WelsGetCodecVersion
>> -enabled libopenjpeg       && { check_lib openjpeg-2.1/openjpeg.h
>> opj_version -lopenjp2 -DOPJ_STATIC ||
>> +enabled libopenjpeg       && { check_lib openjpeg-2.1/openjpeg.h
>> opj_version -lopenjp2 -ldl ||
>>
>
> This breaks (cross-)compilation of FFmpeg and OpenJpeg-2.1 with mingw-64
> on my machine.
>

Thanks, I will take a look.

Cheers,
Aaron


More information about the ffmpeg-devel mailing list