From patchwork Thu Oct 5 16:19:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: hydra3333@gmail.com X-Patchwork-Id: 5428 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.76 with SMTP id m12csp2212466jah; Thu, 5 Oct 2017 09:26:01 -0700 (PDT) X-Received: by 10.223.145.166 with SMTP id 35mr23144842wri.51.1507220760972; Thu, 05 Oct 2017 09:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507220760; cv=none; d=google.com; s=arc-20160816; b=VEWXMF/f5Mdamt8EL5ns3qnqwYzkw78sEE4fpNKPAcG+mSXtPehVwSb59NrFwSmPlO Gb03Sd9h0rQ1Y007V8PDvCKogCgJIm06QPZl4b8+mVEeUmpnhYiwYCByrA7rKqIEjF/D dlYR7QK/uvO+dUs9AbWBfXHQOUroujL0bQju8tPDEbfW1NeyXN0ZMgDQUwloHnWTHyru KbS9GVk7zEAT2ktXYUCJZzpcG6cheiWCmqJJLW6FFYkiX9WJQ6CWRBFKPOPaWfBNWiIb t8Z4ECdswcAzw20/iIiK7+4q2ItebyYWvro3iNKudnr/wunT9fYqjQaz6k1s/hvlWmG2 +dEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:importance:mime-version:date:to:from:message-id :dkim-signature:delivered-to:arc-authentication-results; bh=ikCoB/4D3RT7R8rlV1qqONjqSoGysIxnAJ95XI2Vzg8=; b=FCA7g4boKQMJ5LrYxWdz2tVbfsglrRqA0ST/1eMKBQxG84y1womOK8zn7v0X+NDcWD +rjFvfaq72sL1ygo5KCpkN7+9E07BuY31w7EqOlq5PB1/pmRfr5DCxmsuwGME06x9TYj eUyWnMvuXkmpmGlM0V33n0+u+5bBTr7YOh29HBSfoRowkx7Pq0Ex9oEPdhGg7zLTKM3G TwDHa+aY05yzgS/thHmtxihk/BlQNS8kQUray3dIvX22m+r5rhReb1zY58j9J0PJRVWS KpTYECDk5Nq8EsfpvgzOHOUW15xCk3CmLhvD44+fvOYEfzy7cZFoFhaCqRsxqBpvGLbh sP/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=VIHPK45W; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q124si89383wma.146.2017.10.05.09.26.00; Thu, 05 Oct 2017 09:26:00 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=VIHPK45W; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A9AB868A390; Thu, 5 Oct 2017 19:25:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B8DEB68A31D for ; Thu, 5 Oct 2017 19:25:36 +0300 (EEST) Received: by mail-pf0-f171.google.com with SMTP id n14so6276142pfh.8 for ; Thu, 05 Oct 2017 09:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:from:to:subject:date:mime-version:importance :disposition-notification-to; bh=lJLhG8smT1u2JX0oAO+4qoi5hvBTo8h+Y+sWttb08w4=; b=VIHPK45WR2PwMSMv9TwVMyi9REisSj27/v3mJJZjEHejrkZay7dhvnjxaMuHpkGpmn nLks7brk7SqVHTqR4/3AIqR9djp8lDvWZQhEFmu45SLglOAh6fxi7pTaXDZviXrHNFZC 0dGP8RbV2cAbqvZKFMSEh67+V/APqTsYxkaLrdoYApiVXtuB2xMMGUDB89Kyg4dzT8gz jfjR+om2p4tL3JDrcM/XRTmORyz7r3NLnOhU9Ew8KkJ3GiFEU1O3gUtI+O0dbmo9zqVS pjCr4ukDFW6sTqmnjFs8v18o+/FDI3MVHhbL3S0FsnxYleuHQbkpCRu2RMFjoHs/K/VK /COg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:subject:date:mime-version :importance:disposition-notification-to; bh=lJLhG8smT1u2JX0oAO+4qoi5hvBTo8h+Y+sWttb08w4=; b=NyBGCEZAdRk/OpWnX4DSphpnUYLMqoF4IZyrkTABmDrpS3/4tFFZTl1BkD5e9aBaUJ ba85iVQNl1IOZAWu5kboPSj7QwTTGa0NdO7Ugi8VD9NruxqKeOIup4sQIBNCOCfWGxf3 HHX5U9hN/t8vIiheJJ7Q0rc/jMI1Z0hStg9aPXluUtrrGX2pgS2qdBOfJfJ4mg4twiqx K/wVBm5XkmyyrA62SzxILJjScIfoHN9NjyDz6VJ3haz4RQR70RCZY0GR81ZXSnUMBrGv qZePafHunR9DQ4DNgvOGeRoWifOXnLxYP7K6rymMA+nACDzFoG6mOnRak6Sijj47z7Wl ixCw== X-Gm-Message-State: AMCzsaWt3oJxifE6cQNA1hM9k/ZCvrmee1F5he3nTs9baP7HopjxQc1j UdKqtJhirMPo/5/4tIsvwT35KA== X-Google-Smtp-Source: AOwi7QBgm90SXnski7w7tD/gUrhWJT8aXgwHA00JioxRsLviNzWn3tFfq72ODwsfAUuh7z8EzMJjbw== X-Received: by 10.98.55.5 with SMTP id e5mr14690822pfa.21.1507220387954; Thu, 05 Oct 2017 09:19:47 -0700 (PDT) Received: from i3820w10a (CPE-58-175-84-137.bfcz1.lon.bigpond.net.au. [58.175.84.137]) by smtp.gmail.com with ESMTPSA id n2sm30266404pgs.89.2017.10.05.09.19.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Oct 2017 09:19:47 -0700 (PDT) Message-ID: <00B2A43923544EB0BC94E883CECCA258@i3820w10a> From: To: Date: Fri, 6 Oct 2017 02:49:41 +1030 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] update ffmpeg to recognise and build with newest openjpeg available in its git, up from v2.2 to v2.3 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" I have attempted to post my first patch suggestion per https://trac.ffmpeg.org/ticket/6719#comment:1 If I have done something wrong, please feel free to say so (and how to fix it, if possible). Openjpeg git at ​https://github.com/uclouvain/openjpeg is up from v2.2 to v2.3, which means that ffmpeg no longer builds with the openjpeg dependency as built from its git. The patch seems to fix ffmpeg so that it builds with openjpeg v2.3 as a dependency built from its git. From 80412c4b26d197e9627b097443e7032c106de4ff Mon Sep 17 00:00:00 2001 From: hydra3333 Date: Fri, 6 Oct 2017 02:19:34 +1030 Subject: [PATCH] update ffmpeg to recognise and build with newest openjpeg available in its git, up from v2.2 to v2.3 --- configure | 11 +++++++---- libavcodec/libopenjpegdec.c | 8 +++++--- libavcodec/libopenjpegenc.c | 10 ++++++---- 3 files changed, 18 insertions(+), 11 deletions(-) mode change 100755 => 100644 configure diff --git a/configure b/configure old mode 100755 new mode 100644 index 391c141e7a..3c8f84b0c8 --- a/configure +++ b/configure @@ -1930,6 +1930,7 @@ 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 @@ -5910,7 +5911,7 @@ enabled libbs2b && require_pkg_config libbs2b libbs2b bs2b.h bs2b_open enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 && { check_lib libcelt celt/celt.h celt_decoder_create_custom -lcelt0 || die "ERROR: libcelt must be installed and version must be >= 0.11.0."; } -enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas +enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas -DCACA_STATIC && add_cppflags -DCACA_STATIC enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion enabled libfdk_aac && { use_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || @@ -5937,7 +5938,7 @@ enabled libkvazaar && require_pkg_config libkvazaar "kvazaar >= 0.8.1" kv # can find the libraries and headers through other means. enabled libmfx && { use_pkg_config libmfx libmfx "mfx/mfxvideo.h" MFXInit || { require libmfx "mfx/mfxvideo.h" MFXInit -llibmfx && warn "using libmfx without pkg-config"; } } -enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load +enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load -DMODPLUG_STATIC && add_cppflags -DMODPLUG_STATIC enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame enabled libmysofa && require libmysofa "mysofa.h" mysofa_load -lmysofa enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc || @@ -5950,7 +5951,9 @@ enabled libopencv && { check_header opencv2/core/core_c.h && require opencv 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.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } || +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 || @@ -5980,7 +5983,7 @@ enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init -lspeex enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg -enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame && +enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame -DLIBTWOLAME_STATIC && add_cppflags -DLIBTWOLAME_STATIC && { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame || die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; } enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c index 1210123265..67d47bd6a0 100644 --- a/libavcodec/libopenjpegdec.c +++ b/libavcodec/libopenjpegdec.c @@ -34,7 +34,9 @@ #include "internal.h" #include "thread.h" -#if HAVE_OPENJPEG_2_2_OPENJPEG_H +#if HAVE_OPENJPEG_2_3_OPENJPEG_H +# include +#elif HAVE_OPENJPEG_2_2_OPENJPEG_H # include #elif HAVE_OPENJPEG_2_1_OPENJPEG_H # include @@ -46,7 +48,7 @@ # include #endif -#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H +#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H # define OPENJPEG_MAJOR_VERSION 2 # define OPJ(x) OPJ_##x #else @@ -431,7 +433,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, opj_stream_set_read_function(stream, stream_read); opj_stream_set_skip_function(stream, stream_skip); opj_stream_set_seek_function(stream, stream_seek); -#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H +#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H opj_stream_set_user_data(stream, &reader, NULL); #elif HAVE_OPENJPEG_2_0_OPENJPEG_H opj_stream_set_user_data(stream, &reader); diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c index b67e533d1d..92b4433b04 100644 --- a/libavcodec/libopenjpegenc.c +++ b/libavcodec/libopenjpegenc.c @@ -32,7 +32,9 @@ #include "avcodec.h" #include "internal.h" -#if HAVE_OPENJPEG_2_2_OPENJPEG_H +#if HAVE_OPENJPEG_2_3_OPENJPEG_H +# include +#elif HAVE_OPENJPEG_2_2_OPENJPEG_H # include #elif HAVE_OPENJPEG_2_1_OPENJPEG_H # include @@ -44,7 +46,7 @@ # include #endif -#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H +#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H # define OPENJPEG_MAJOR_VERSION 2 # define OPJ(x) OPJ_##x #else @@ -307,7 +309,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx) opj_set_default_encoder_parameters(&ctx->enc_params); -#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H +#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H switch (ctx->cinema_mode) { case OPJ_CINEMA2K_24: ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K; @@ -771,7 +773,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, opj_stream_set_write_function(stream, stream_write); opj_stream_set_skip_function(stream, stream_skip); opj_stream_set_seek_function(stream, stream_seek); -#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H +#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H opj_stream_set_user_data(stream, &writer, NULL); #elif HAVE_OPENJPEG_2_0_OPENJPEG_H opj_stream_set_user_data(stream, &writer);