From patchwork Sat Dec 18 11:09:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ridley Combs X-Patchwork-Id: 32704 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp2464516iog; Sat, 18 Dec 2021 03:10:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbW2qIjljZKnW6093bOsZgL2OZ+NzbEuVq1mEnv3Ju/3X/WQ+k6o1pt69n9kfGzeClIjpx X-Received: by 2002:a17:907:1b1f:: with SMTP id mp31mr5579407ejc.247.1639825833373; Sat, 18 Dec 2021 03:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639825833; cv=none; d=google.com; s=arc-20160816; b=sFWhjfb8vGYVGJaxKve6mqD9zBbQG3Q/mCOR6lWG7GxsIwtdMFqMM/HDjTWWG/iE9v vCvl70swiXJfLeDrxu70OZF3SQvEbCr5i/WaUs4AIDhZxqOF7w0pgb25SkUpis3EVaAJ viB867Yn9CUXHdV2Rwg2wAjXO/O84C7yEQRZ1TtfMixYSZqf5UZ7RYrLDN+4yBmvYG2E k01NfaqmzFirrB2ZT+o14VJ2U9PclhXrE2sVgW+af1lGLlu5bTIUwcXyhgQexvD/DN0/ evr1tps//oxIzElxUrx7Z6F693VGB/EvRFbdQ6wYqpmbatitMcaFbVaj883aY91qLcng cy4A== 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:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=8WESTBaQqPL28XsH/wv+pTtexzbd0yKEDVz6GBzO+8U=; b=dKyfiHCeD7vAuuny6VoqnCjQ4oGKFi/QGT1zkojSD2PFqfq7XffSEmEO3KZp/gHqeu DQae+rWcfkgzxiGqqXemEIWaaK3xzLDHaOWgpx98IsktSQxrOvSiupK5cSPPZ7HHbwXv TxY0LIurbe1JZqohlMMeWn4es7lhcDo0SXkqutqqhsOjPm2yRmbC9oTCQ1rnc13DneCS GDeD8o07uG1PskDybdZp62uDijzboOdhmhIak4x5BS/ZUsZOqZa/nwhnR+/mHQV28FiW jHyh/UBZipM8Fu1Gc+pZPuGwmXk8e21urX+fOpTLgGWJmGGtFOweugavDfyfBk20tTYo sv7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@rcombs.me header.s=google header.b=pZ6lmM2O; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e3si7967440ejs.547.2021.12.18.03.10.32; Sat, 18 Dec 2021 03:10:33 -0800 (PST) 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=@rcombs.me header.s=google header.b=pZ6lmM2O; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=rcombs.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3D42E68AF8B; Sat, 18 Dec 2021 13:10:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 495D868A255 for ; Sat, 18 Dec 2021 13:10:14 +0200 (EET) Received: by mail-qv1-f50.google.com with SMTP id kc16so4810376qvb.3 for ; Sat, 18 Dec 2021 03:10:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=lomkcRrRiOcjmDUfp1yUNssnu3hevyWnHfCrDaE1WIU=; b=pZ6lmM2Os6Uu56KBmbfhij56+tNfsaJ1bDhlg7b7aTJlEW6nR4zgat6qYJq1q0EylY 3JqjrRbSrfKrj0puqdBHjsKs5eOzfFCbRZJWzxeuqffdsr16k5lAFMUtO7V0GrhE7tNd QgSQTSYL7lQN90AMUIl5eB2QfrFOdNBSqlYuYrlP99e1fbmt2xFi1gTsGiRIvNVhUuef 4XKGdPUUGPRAXgSPZPCP4T0a7q5J1Hlv7wLoMdZLYTW+iGcNWYwb4oc2rLWX7Wb7cBd+ yAhoiN941+uy/j221Dj/BJa3FH3UejKivXkDHecQ+ht2ePNco0mrgnaoLTJgfsJVReJc Xeew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lomkcRrRiOcjmDUfp1yUNssnu3hevyWnHfCrDaE1WIU=; b=YiJdyRhSahvjSpApivaRc783Io6eAPsOC3QGikc0lvtJ6YDjPWoL6KBL8NIhc9uT/y B59JYkpfCeuTcpg1fd+HnGl0QccAnXoiKBDijijBcCjMxo3f0OqbQOVvjzo4E08csTpy a+0ApDXIMDOxITlyk28cfWGbkqajvJ4oQ6TrbcUWjF8p9/keBHFrsFUAj29H6XnYmPrR sjJFqKwiiWXPjJiFoByKoBa8YJyCrbuHTpJNY3xNnZ1iowcFTfkQKysLbDSa24eYq2wI SjoE/9tct0/XzI8sfo+9UysC3I+Hv7qQMzrZHSdHVObxNkjiVyy+S1bnyYoV9PklTCaI WDzA== X-Gm-Message-State: AOAM531zmapG2qHXe0cEPO13rmc8iFAHzQVqRr5PgcKyk/nJ+dA1O76b lVPH/BOuh7j8xzrC+7DA+nxsiTfigXg70+o= X-Received: by 2002:a0c:fa91:: with SMTP id o17mr2870131qvn.58.1639825812666; Sat, 18 Dec 2021 03:10:12 -0800 (PST) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:70a5:b034:a3a1:e733]) by smtp.gmail.com with ESMTPSA id h19sm9571162qth.63.2021.12.18.03.10.11 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 18 Dec 2021 03:10:12 -0800 (PST) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Sat, 18 Dec 2021 05:09:52 -0600 Message-Id: <20211218110953.30751-2-rcombs@rcombs.me> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211218110953.30751-1-rcombs@rcombs.me> References: <20211218110953.30751-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] lavc/videotoolbox: expose routine to set CVPixelBufferRef metadata X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: Yy3boD+el9sa --- doc/APIchanges | 3 +++ libavutil/hwcontext_videotoolbox.c | 6 ++++++ libavutil/hwcontext_videotoolbox.h | 7 +++++++ libavutil/version.h | 2 +- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index af2fbaafcf..c7b5591f6a 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,9 @@ libavutil: 2021-04-27 API changes, most recent first: +2021-12-xx - xxxxxxxxxx - lavu 57.12.100 - hwcontext_videotoolbox.h + Add av_vt_pixbuf_set_attachments + 2021-12-xx - xxxxxxxxxx - lavu 57.12.100 - hwcontext_videotoolbox.h Add av_map_videotoolbox_chroma_loc_from_av Add av_map_videotoolbox_color_matrix_from_av diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c index 4c6d37304c..2d42ff6f4c 100644 --- a/libavutil/hwcontext_videotoolbox.c +++ b/libavutil/hwcontext_videotoolbox.c @@ -571,6 +571,12 @@ static int vt_pixbuf_set_attachments(void *log_ctx, return 0; } +int av_vt_pixbuf_set_attachments(void *log_ctx, + CVPixelBufferRef pixbuf, const AVFrame *src) +{ + return vt_pixbuf_set_attachments(log_ctx, pixbuf, src); +} + static int vt_map_frame(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src, int flags) { diff --git a/libavutil/hwcontext_videotoolbox.h b/libavutil/hwcontext_videotoolbox.h index 916899e97d..b6bdcf243d 100644 --- a/libavutil/hwcontext_videotoolbox.h +++ b/libavutil/hwcontext_videotoolbox.h @@ -85,4 +85,11 @@ CFStringRef av_map_videotoolbox_color_primaries_from_av(enum AVColorPrimaries pr */ CFStringRef av_map_videotoolbox_color_trc_from_av(enum AVColorTransferCharacteristic trc); +/** + * Update a CVPixelBufferRef's metadata to based on an AVFrame. + * Returns 0 if no known equivalent was found. + */ +int av_vt_pixbuf_set_attachments(void *log_ctx, + CVPixelBufferRef pixbuf, const struct AVFrame *src); + #endif /* AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H */ diff --git a/libavutil/version.h b/libavutil/version.h index 0e7b36865a..668f9206fe 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 57 -#define LIBAVUTIL_VERSION_MINOR 11 +#define LIBAVUTIL_VERSION_MINOR 12 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \