From owner-svn-ports-head@freebsd.org Wed Sep 28 02:13:51 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3367BECA74; Wed, 28 Sep 2016 02:13:51 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 623C0ED6; Wed, 28 Sep 2016 02:13:51 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S2DoYg009197; Wed, 28 Sep 2016 02:13:50 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S2DoOZ009195; Wed, 28 Sep 2016 02:13:50 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201609280213.u8S2DoOZ009195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Wed, 28 Sep 2016 02:13:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r422841 - in head/multimedia/ffmpeg: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 02:13:51 -0000 Author: jbeich Date: Wed Sep 28 02:13:50 2016 New Revision: 422841 URL: https://svnweb.freebsd.org/changeset/ports/422841 Log: multimedia/ffmpeg: add KVAZAAR option (another HEVC implementation) Added: head/multimedia/ffmpeg/files/patch-kvazaar-0.7 (contents, props changed) Modified: head/multimedia/ffmpeg/Makefile (contents, props changed) Modified: head/multimedia/ffmpeg/Makefile ============================================================================== --- head/multimedia/ffmpeg/Makefile Wed Sep 28 02:13:33 2016 (r422840) +++ head/multimedia/ffmpeg/Makefile Wed Sep 28 02:13:50 2016 (r422841) @@ -27,7 +27,7 @@ PORTSCOUT= limit:^2\. OPTIONS_DEFINE= AACPLUS ALSA AMR_NB AMR_WB ASS BS2B CACA CDIO CELT DC1394 \ DEBUG DOCS FAAC FDK_AAC FFSERVER FLITE FONTCONFIG \ - FREETYPE FREI0R FRIBIDI GME GSM ICONV ILBC JACK LADSPA \ + FREETYPE FREI0R FRIBIDI GME GSM ICONV ILBC JACK KVAZAAR LADSPA \ LAME LIBBLURAY MODPLUG OPENAL OPENCL OPENCV OPENGL \ OPENH264 OPENJPEG OPTIMIZED_CFLAGS OPUS PULSEAUDIO QUVI \ RTCPU RTMP SCHROEDINGER SDL SMB SNAPPY SPEEX SSH \ @@ -61,6 +61,7 @@ FLITE_DESC= Voice synthesis support via GME_DESC= Game Music Emu demuxer GPL3_DESC= Allow (L)GPL version 3 code(cs) ILBC_DESC= Internet Low Bit Rate codec +KVAZAAR_DESC= H.265 video codec support via Kvazaar LICENSE_DESC= Licensing options NEON_DESC= Enable Media Processing Engine instructions NONFREE_DESC= Allow use of nonfree code @@ -186,6 +187,10 @@ ILBC_CONFIGURE_ENABLE= libilbc JACK_LIB_DEPENDS= libjack.so:audio/jack JACK_CONFIGURE_OFF= --disable-indev=jack +# kvazaar +KVAZAAR_LIB_DEPENDS= libkvazaar.so:multimedia/kvazaar +KVAZAAR_CONFIGURE_ENABLE= libkvazaar + # ladspa LADSPA_BUILD_DEPENDS= ${LOCALBASE}/include/ladspa.h:audio/ladspa LADSPA_RUN_DEPENDS= ${LOCALBASE}/lib/ladspa/amp.so:audio/ladspa Added: head/multimedia/ffmpeg/files/patch-kvazaar-0.7 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/ffmpeg/files/patch-kvazaar-0.7 Wed Sep 28 02:13:50 2016 (r422841) @@ -0,0 +1,73 @@ +From b3777b2c2eb5d04386992c0388985914d5bbebba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arttu=20Yl=C3=A4-Outinen?= +Date: Mon, 28 Sep 2015 10:55:14 +0300 +Subject: libkvazaar: Update to work with the latest version +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Function encoder_encode in Kvazaar API was changed to have new output +parameters: source picture and frame info. Frame info is used to set the +keyframe flag and source picture is ignored. + +Signed-off-by: Arttu Ylä-Outinen +--- + libavcodec/libkvazaar.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git configure configure +index 4cc45ad..af3fbf4 100755 +--- configure ++++ configure +@@ -5237,7 +5237,7 @@ + check_lib "${gsm_hdr}" gsm_create -lgsm && break; + done || die "ERROR: libgsm not found"; } + enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc +-enabled libkvazaar && require_pkg_config "kvazaar < 0.7.0" kvazaar.h kvz_api_get ++enabled libkvazaar && require_pkg_config "kvazaar >= 0.7.0" kvazaar.h kvz_api_get + enabled libmfx && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit + enabled libmodplug && require_pkg_config libmodplug libmodplug/modplug.h ModPlug_Load + enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame +diff --git libavcodec/libkvazaar.c libavcodec/libkvazaar.c +index 9fb5be7..7430e0a 100644 +--- libavcodec/libkvazaar.c ++++ libavcodec/libkvazaar.c +@@ -137,8 +137,11 @@ static int libkvazaar_encode(AVCodecContext *avctx, + { + int retval = 0; + kvz_picture *img_in = NULL; ++ + kvz_data_chunk *data_out = NULL; + uint32_t len_out = 0; ++ kvz_frame_info frame_info; ++ + LibkvazaarContext *ctx = avctx->priv_data; + + *got_packet_ptr = 0; +@@ -173,7 +176,10 @@ static int libkvazaar_encode(AVCodecContext *avctx, + } + } + +- if (!ctx->api->encoder_encode(ctx->encoder, img_in, &data_out, &len_out, NULL)) { ++ if (!ctx->api->encoder_encode(ctx->encoder, img_in, ++ &data_out, &len_out, ++ NULL, NULL, ++ &frame_info)) { + av_log(avctx, AV_LOG_ERROR, "Failed to encode frame.\n"); + retval = AVERROR_EXTERNAL; + goto done; +@@ -198,6 +204,14 @@ static int libkvazaar_encode(AVCodecContext *avctx, + + ctx->api->chunk_free(data_out); + data_out = NULL; ++ ++ avpkt->flags = 0; ++ // IRAP VCL NAL unit types span the range ++ // [BLA_W_LP (16), RSV_IRAP_VCL23 (23)]. ++ if (frame_info.nal_unit_type >= KVZ_NAL_BLA_W_LP && ++ frame_info.nal_unit_type <= KVZ_NAL_RSV_IRAP_VCL23) { ++ avpkt->flags |= AV_PKT_FLAG_KEY; ++ } + } + + done: