From owner-svn-ports-all@freebsd.org Fri Feb 2 20:48:19 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BB95EC919B; Fri, 2 Feb 2018 20:48:19 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497227F938; Fri, 2 Feb 2018 20:48:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4466920C0C; Fri, 2 Feb 2018 20:48:19 +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 w12KmJiu094901; Fri, 2 Feb 2018 20:48:19 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w12KmJL5094899; Fri, 2 Feb 2018 20:48:19 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201802022048.w12KmJL5094899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 2 Feb 2018 20:48:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r460753 - in branches/2018Q1/multimedia/libvpx: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in branches/2018Q1/multimedia/libvpx: . files X-SVN-Commit-Revision: 460753 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Feb 2018 20:48:19 -0000 Author: jbeich Date: Fri Feb 2 20:48:18 2018 New Revision: 460753 URL: https://svnweb.freebsd.org/changeset/ports/460753 Log: multimedia/libvpx: backport MULTIRES fix (direct commit) Obtained from: upstream (libvpx 1.7.0, via Firefox 59) Approved by: ports-secteam blanket Added: branches/2018Q1/multimedia/libvpx/files/patch-mozilla-bug1426988 (contents, props changed) Modified: branches/2018Q1/multimedia/libvpx/Makefile Modified: branches/2018Q1/multimedia/libvpx/Makefile ============================================================================== --- branches/2018Q1/multimedia/libvpx/Makefile Fri Feb 2 19:55:50 2018 (r460752) +++ branches/2018Q1/multimedia/libvpx/Makefile Fri Feb 2 20:48:18 2018 (r460753) @@ -4,7 +4,7 @@ PORTNAME= libvpx DISTVERSIONPREFIX= v DISTVERSION= 1.6.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ Added: branches/2018Q1/multimedia/libvpx/files/patch-mozilla-bug1426988 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2018Q1/multimedia/libvpx/files/patch-mozilla-bug1426988 Fri Feb 2 20:48:18 2018 (r460753) @@ -0,0 +1,90 @@ +https://hg.mozilla.org/releases/mozilla-beta/rev/42e8f9c29d3b +https://chromium.googlesource.com/webm/libvpx/+/5b6ae020b6a9%5E!/ +https://chromium.googlesource.com/webm/libvpx/+/004fb91416e3%5E!/ + +--- vpx/src/vpx_encoder.c.orig 2017-01-12 20:27:27 UTC ++++ vpx/src/vpx_encoder.c +@@ -12,8 +12,11 @@ + * \brief Provides the high level interface to wrap encoder algorithms. + * + */ ++#include + #include ++#include + #include ++#include "vp8/common/blockd.h" + #include "vpx_config.h" + #include "vpx/internal/vpx_codec_internal.h" + +@@ -81,6 +84,8 @@ vpx_codec_err_t vpx_codec_enc_init_multi_ver( + int i; + void *mem_loc = NULL; + ++ if (iface->enc.mr_get_mem_loc == NULL) return VPX_CODEC_INCAPABLE; ++ + if (!(res = iface->enc.mr_get_mem_loc(cfg, &mem_loc))) { + for (i = 0; i < num_enc; i++) { + vpx_codec_priv_enc_mr_cfg_t mr_cfg; +@@ -89,28 +94,27 @@ vpx_codec_err_t vpx_codec_enc_init_multi_ver( + if (dsf->num < 1 || dsf->num > 4096 || dsf->den < 1 || + dsf->den > dsf->num) { + res = VPX_CODEC_INVALID_PARAM; +- break; +- } ++ } else { ++ mr_cfg.mr_low_res_mode_info = mem_loc; ++ mr_cfg.mr_total_resolutions = num_enc; ++ mr_cfg.mr_encoder_id = num_enc - 1 - i; ++ mr_cfg.mr_down_sampling_factor.num = dsf->num; ++ mr_cfg.mr_down_sampling_factor.den = dsf->den; + +- mr_cfg.mr_low_res_mode_info = mem_loc; +- mr_cfg.mr_total_resolutions = num_enc; +- mr_cfg.mr_encoder_id = num_enc - 1 - i; +- mr_cfg.mr_down_sampling_factor.num = dsf->num; +- mr_cfg.mr_down_sampling_factor.den = dsf->den; ++ /* Force Key-frame synchronization. Namely, encoder at higher ++ * resolution always use the same frame_type chosen by the ++ * lowest-resolution encoder. ++ */ ++ if (mr_cfg.mr_encoder_id) cfg->kf_mode = VPX_KF_DISABLED; + +- /* Force Key-frame synchronization. Namely, encoder at higher +- * resolution always use the same frame_type chosen by the +- * lowest-resolution encoder. +- */ +- if (mr_cfg.mr_encoder_id) cfg->kf_mode = VPX_KF_DISABLED; ++ ctx->iface = iface; ++ ctx->name = iface->name; ++ ctx->priv = NULL; ++ ctx->init_flags = flags; ++ ctx->config.enc = cfg; ++ res = ctx->iface->init(ctx, &mr_cfg); ++ } + +- ctx->iface = iface; +- ctx->name = iface->name; +- ctx->priv = NULL; +- ctx->init_flags = flags; +- ctx->config.enc = cfg; +- res = ctx->iface->init(ctx, &mr_cfg); +- + if (res) { + const char *error_detail = ctx->priv ? ctx->priv->err_detail : NULL; + /* Destroy current ctx */ +@@ -124,9 +128,13 @@ vpx_codec_err_t vpx_codec_enc_init_multi_ver( + vpx_codec_destroy(ctx); + i--; + } ++#if CONFIG_MULTI_RES_ENCODING ++ assert(mem_loc); ++ free(((LOWER_RES_FRAME_INFO *)mem_loc)->mb_info); ++ free(mem_loc); ++#endif ++ return SAVE_STATUS(ctx, res); + } +- +- if (res) break; + + ctx++; + cfg++;