From patchwork Mon Jun 26 14:40:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 4124 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.1.76 with SMTP id 73csp950606vsb; Mon, 26 Jun 2017 07:40:22 -0700 (PDT) X-Received: by 10.28.230.211 with SMTP id e80mr311613wmi.17.1498488022276; Mon, 26 Jun 2017 07:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498488022; cv=none; d=google.com; s=arc-20160816; b=c3g6XqoBhWWfD4XxwZ/TWH6FMt10B5kasBiflcINQswqWkv99PGuBKRE2pK+DLw6C+ 0gjxvEFkhlq5ysvS4ebcdhmTNDhNYNWxuPiX+Y7FFu6verx9ePX9lingmNNCaStJWNr1 lZMHi86KL3X1RsU5ZoUIfKye1mtZam2tLFyB3VAwiCUvf0tOtdYSzdSaBaYdW0S3Fx1B j0tVe9kmiNA6Dp/dWhrL66e2EALlHiymqI4pxbWQ4NtWtgR9WwvLTpf2stcyd2yE0YAq PIno0Sb5OI/e/Aad541X4nmDcEUm+4Lxg9iL/05cmHCKnAzWOJfwOAQWZ4GNUU1fIZIn cXhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=GWE65lYkcXNuUF7VQRvtfUS+AC0SpF4Jqn0RC8zjbI4=; b=Ujfpgeji9HMewXwqwKWPM+4tx1sTNS3UdlGBxW4bKV/9Wsk/YaLtqePHywzj3BxbOm XUVGOlqEtkMGWwiIE/Y9UDhSUh+xfbXCOfzQFI/dkugAjPBYLcVY3690An10A9CRYodg RJpQpk8xSmB7md1mjXvMuAxlA6IJyX6/lytlY0pyovSh4hdqCa7pRsRZdbJ6YJ1GJkkM 4EVXl3ibH+QP1ihj8iZgWbP2wPCThqGixPPUjZN+UbZ82bEww/+xYMx58q6Qnv0Y4esh 0v6nfwLIIgd+93DZbZomomaKfznVAyOhQYj5kGyh2CvYiGmUr3DdGvAFlKkvidod4jIX Pzag== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.b=nwV54HCd; 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 x2si9183740wrd.189.2017.06.26.07.40.21; Mon, 26 Jun 2017 07:40:22 -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.b=nwV54HCd; 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 27B7D68A283; Mon, 26 Jun 2017 17:40:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 81202689B29 for ; Mon, 26 Jun 2017 17:40:10 +0300 (EEST) Received: by mail-wr0-f194.google.com with SMTP id z45so29607418wrb.2 for ; Mon, 26 Jun 2017 07:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=3vo8wMPZP35+w/Ew1blw0tsmd8yDJh7PR4IFfSoO8KQ=; b=nwV54HCdf0bJAy3XJ02AnZeue8AS9thLkkItB4Do6NzHkb1dNYot3s2J79vzChif3g 4pziY1XHeHdqzOtvALbJ99RoX5X13BN16qoTThRY4nNIsedMiFO0RBydl9TYHlP1xPac kf7ebilj0SdvXPBfMyZVeawcYYF8wJSnQPzxdlu/AO2ELinmeqKTxBPG2vs0AuM6X5yr k1rH+ink0CSsEKhkypgD4jTR6BCrUMgfTPAXnyTFl+cGVju7yI6O0T+kg0n/dg9QDhih 8hJSjUFZnG9pPFyXsxPLMx2el91gjHNiEubGZTXg5KESwMufCw4OqlKpAFej5wLHxn7m CXmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=3vo8wMPZP35+w/Ew1blw0tsmd8yDJh7PR4IFfSoO8KQ=; b=gYCu6XGvYWJIENm5OWsbQ8xgdlemaZceATWwn1FR6+BXjiz7iOeknR2oRve/CkrjgK pHkdFjf6moR76u4LHzggAW8w0yB4d+YXv7Dl0VoGABG2wiUjiJQbnlfe22mEmsZm41Sz crOMGcFnNyi0EN3GirftdcsSDkkNi35BFCCjYK1NJAtglJ7I+7nIU5AmR2BzEEuX4MyY 3LZDnh4GZLxA5orRn7jjUF4vuQ+ixBQBYSCJBLFNfyoXLS8e0Z+3YQpQxQ8bCIDY3J1Q EsA4ewlK0tOZM0f6Rfzn8xns9KB+Z2RxxhdklV2qjcHHcFbdNq03pg6h5mE5k8YBBJa8 199Q== X-Gm-Message-State: AKS2vOwVLdxp3bHmA8JUo1DlgftXyQf6MfwCPFy+tcKdbXcN0YiJHmG9 sy1zNSsxK37PVs4z X-Received: by 10.223.155.205 with SMTP id e13mr13660973wrc.33.1498488011330; Mon, 26 Jun 2017 07:40:11 -0700 (PDT) Received: from localhost.localdomain ([94.250.174.60]) by smtp.gmail.com with ESMTPSA id m26sm19465989wrm.4.2017.06.26.07.40.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2017 07:40:10 -0700 (PDT) From: Paul B Mahol To: ffmpeg-devel@ffmpeg.org Date: Mon, 26 Jun 2017 16:40:00 +0200 Message-Id: <20170626144000.5431-1-onemda@gmail.com> X-Mailer: git-send-email 2.9.3 Subject: [FFmpeg-devel] [PATCH] avcodec/proresenc_kostya: add 4444XQ profile 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Paul B Mahol --- doc/encoders.texi | 1 + libavcodec/proresenc_kostya.c | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index a8bee09..9f03c0c 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -2381,6 +2381,7 @@ Select the ProRes profile to encode @item standard @item hq @item 4444 +@item 4444xq @end table @item quant_mat @var{integer} diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 09bb611..149dc81 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -46,6 +46,7 @@ enum { PRORES_PROFILE_STANDARD, PRORES_PROFILE_HQ, PRORES_PROFILE_4444, + PRORES_PROFILE_4444XQ, }; enum { @@ -124,7 +125,7 @@ static const struct prores_profile { int max_quant; int br_tab[NUM_MB_LIMITS]; int quant; -} prores_profile_info[5] = { +} prores_profile_info[6] = { { .full_name = "proxy", .tag = MKTAG('a', 'p', 'c', 'o'), @@ -164,6 +165,14 @@ static const struct prores_profile { .max_quant = 6, .br_tab = { 2350, 1828, 1600, 1425 }, .quant = QUANT_MAT_HQ, + }, + { + .full_name = "4444XQ", + .tag = MKTAG('a', 'p', '4', 'x'), + .min_quant = 1, + .max_quant = 6, + .br_tab = { 3525, 2742, 2400, 2137 }, + .quant = QUANT_MAT_HQ, } }; @@ -1155,7 +1164,8 @@ FF_ENABLE_DEPRECATION_WARNINGS : "HQ profile to keep best quality"); } if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_ALPHA) { - if (ctx->profile != PRORES_PROFILE_4444) { + if (ctx->profile != PRORES_PROFILE_4444 && + ctx->profile != PRORES_PROFILE_4444XQ) { // force alpha and warn av_log(avctx, AV_LOG_WARNING, "Profile selected will not " "encode alpha. Override with -profile if needed.\n"); @@ -1298,7 +1308,7 @@ static const AVOption options[] = { AV_OPT_TYPE_INT, { .i64 = 8 }, 1, MAX_MBS_PER_SLICE, VE }, { "profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = PRORES_PROFILE_AUTO }, - PRORES_PROFILE_AUTO, PRORES_PROFILE_4444, VE, "profile" }, + PRORES_PROFILE_AUTO, PRORES_PROFILE_4444XQ, VE, "profile" }, { "auto", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_AUTO }, 0, 0, VE, "profile" }, { "proxy", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_PROXY }, @@ -1311,6 +1321,8 @@ static const AVOption options[] = { 0, 0, VE, "profile" }, { "4444", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_4444 }, 0, 0, VE, "profile" }, + { "4444xq", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_4444XQ }, + 0, 0, VE, "profile" }, { "vendor", "vendor ID", OFFSET(vendor), AV_OPT_TYPE_STRING, { .str = "Lavc" }, CHAR_MIN, CHAR_MAX, VE }, { "bits_per_mb", "desired bits per macroblock", OFFSET(bits_per_mb),