From patchwork Tue Aug 27 15:04:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 51189 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c944:0:b0:48e:c0f8:d0de with SMTP id k4csp444075vqt; Tue, 27 Aug 2024 11:50:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWWX2tJB1ODmSUPMpTugXjXNzIvkFwwtJ7J7DUpxrlD6P/bHqO5DRem0m1DV3EjlbqqU5FOXGTeCUkurCHE8v8o@gmail.com X-Google-Smtp-Source: AGHT+IH3lGkACTHxxEPy8kjueWBDzXpof2YLkT+K8VzFnTarcpvHaWzWaDdn7eaijeSICbr+jmDD X-Received: by 2002:a05:6512:1592:b0:52f:c22f:32a4 with SMTP id 2adb3069b0e04-534387c4d01mr4914681e87.6.1724784613408; Tue, 27 Aug 2024 11:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724784613; cv=none; d=google.com; s=arc-20240605; b=Tm4KIr5TtPqmGkCg/biDQwVTps9rG9oXuZI9+roz4c0Vgq1vlughbAQVv/SOksiMm5 YAr7N5r/48/6IjuM/nfQWnrTbhBjHsW+Xq6a4xlIbspfj29Qa+26rzXzcCAPVl4x8pbd MJwxkCrXqln6oEL+DmuPDIzy1g/61o/ECyI2yHJW+RWNc9HoAoZ67o0nbYULPG9MEnQ6 ekQf6eitNERG+PXkaxrdKLdVqLZ4KHXJTMJCWMKCkfiWmFZJZf2oaDWlznNPUFya/Snn xwVspdByy+0/Vhy+BvBmiWCeBRft04pGyJsGvr+bgVgK9SOqmwgSGbvAXw5sMzHfANcr uvnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=hJ/vTHr303sLQmtYp2GqT6yGHdmUY19gNBsLv1uc6pY=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=DNwWkHB1WhD0+drNNnwZyUdy53aKnCb2OrOithRGAxMdt6ge07yT5DUGqN/GhtX7YG Jd5Yj6WnNa9o0SLhJn5jS8o0BokC7WNfyAQo1c6sxTWCS51krSBMQ8KezipXLkZnn2YV hieww9zjeLz3TPmxihYGiLsGHIneyIlmbNXiS2O+7P12slX72soS5eF22cHUwwgY8dak EM7c0ElJe9EskRPkNV34m+19kOauutTiTSj/Hl3F445gO6E3E1vv4vE0q7aBfzzFH3zU hvYnslPFnQrGPUkjPGyof3aEU1JMSlJ8nWQ/f6LKh77HQmAu1hdvRFD2JPjuUSGAA31I /1UA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=atTVheau; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5334ea9c44esi4335170e87.613.2024.08.27.11.50.12; Tue, 27 Aug 2024 11:50:13 -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=@khirnov.net header.s=mail header.b=atTVheau; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F34A468D7AE; Tue, 27 Aug 2024 18:43:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AC04B68DD9A for ; Tue, 27 Aug 2024 18:42:58 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=atTVheau; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id B88CB4E0A for ; Tue, 27 Aug 2024 17:42:56 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id z3rIPNWAtDEl for ; Tue, 27 Aug 2024 17:42:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1724773370; bh=jGhPb//1aX+MIvSrVa1IucsWjPVQ7ElBvZfk3jmGaoc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=atTVheauqRvy0cEGLTvPgkpqiBOWAeuQ0b4R6xBRthqtHChJDwuDXg/hG0xKmY2qq ViuQZN6zQXJE7Ee4xn8rOcGJ5T2Lmqu3n0go8X5oNgydumMxCAQdes4b1APclUGmpv KFaLKii9YbJM28ffWa8pv3M97B+RuYuIbSg0+GjHB3e+PbfXXJf2ttYYc3epmTD9kH dcPJn3XsU77BaxEFtUPpixkAtszM+9S0k3f3vwz+tFMTOqDjIoSTXsE048kXI6pSPf cA7hVR5y+kCh5nFbMPqx1tFOTB+1SpxJ/zJRaRNhz6Crs5S7rlMD+sMl2pFm0vGxeQ JH5Bix+wd+uGQ== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id BF7814E0B for ; Tue, 27 Aug 2024 17:42:48 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id E8C173A293C for ; Tue, 27 Aug 2024 17:42:41 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Aug 2024 17:04:46 +0200 Message-ID: <20240827154041.13846-8-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240827154041.13846-2-anton@khirnov.net> References: <20240827154041.13846-2-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/42] lavc: add HEVC Multiview Main profile 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: aZ0lI+gaM5s5 --- doc/APIchanges | 3 +++ libavcodec/defs.h | 1 + libavcodec/hevc/ps.c | 21 +++++++++------------ libavcodec/profiles.c | 1 + libavcodec/version.h | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index a8f84ca45f..a4cf1bf69f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-xx-xx - xxxxxxx - lavc 61.12.100 - defs.h + Add AV_PROFILE_HEVC_MULTIVIEW_MAIN + 2024-xx-xx - xxxxxxx - lavu 59.37.100 - frame.h Add AV_FRAME_DATA_VIEW_ID. diff --git a/libavcodec/defs.h b/libavcodec/defs.h index 7ddfdcad0b..24250f8af5 100644 --- a/libavcodec/defs.h +++ b/libavcodec/defs.h @@ -160,6 +160,7 @@ #define AV_PROFILE_HEVC_MAIN_10 2 #define AV_PROFILE_HEVC_MAIN_STILL_PICTURE 3 #define AV_PROFILE_HEVC_REXT 4 +#define AV_PROFILE_HEVC_MULTIVIEW_MAIN 6 #define AV_PROFILE_HEVC_SCC 9 #define AV_PROFILE_VVC_MAIN_10 1 diff --git a/libavcodec/hevc/ps.c b/libavcodec/hevc/ps.c index 22042d3e62..dbdfc16cfa 100644 --- a/libavcodec/hevc/ps.c +++ b/libavcodec/hevc/ps.c @@ -29,6 +29,7 @@ #include "h2645_vui.h" #include "data.h" #include "ps.h" +#include "profiles.h" #include "refstruct.h" static const uint8_t default_scaling_list_intra[] = { @@ -244,6 +245,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, PTLCommon *ptl) { + const char *profile_name = NULL; int i; if (get_bits_left(gb) < 2+1+5 + 32 + 4 + 43 + 1) @@ -252,18 +254,13 @@ static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx, ptl->profile_space = get_bits(gb, 2); ptl->tier_flag = get_bits1(gb); ptl->profile_idc = get_bits(gb, 5); - if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN) - av_log(avctx, AV_LOG_DEBUG, "Main profile bitstream\n"); - else if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN_10) - av_log(avctx, AV_LOG_DEBUG, "Main 10 profile bitstream\n"); - else if (ptl->profile_idc == AV_PROFILE_HEVC_MAIN_STILL_PICTURE) - av_log(avctx, AV_LOG_DEBUG, "Main Still Picture profile bitstream\n"); - else if (ptl->profile_idc == AV_PROFILE_HEVC_REXT) - av_log(avctx, AV_LOG_DEBUG, "Range Extension profile bitstream\n"); - else if (ptl->profile_idc == AV_PROFILE_HEVC_SCC) - av_log(avctx, AV_LOG_DEBUG, "Screen Content Coding Extension profile bitstream\n"); - else - av_log(avctx, AV_LOG_WARNING, "Unknown HEVC profile: %d\n", ptl->profile_idc); + for (int i = 0; ff_hevc_profiles[i].profile != AV_PROFILE_UNKNOWN; i++) + if (ff_hevc_profiles[i].profile == ptl->profile_idc) { + profile_name = ff_hevc_profiles[i].name; + break; + } + av_log(avctx, profile_name ? AV_LOG_DEBUG : AV_LOG_WARNING, + "%s profile bitstream\n", profile_name ? profile_name : "Unknown"); for (i = 0; i < 32; i++) { ptl->profile_compatibility_flag[i] = get_bits1(gb); diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c index 44bdf6f85b..3cef82be3b 100644 --- a/libavcodec/profiles.c +++ b/libavcodec/profiles.c @@ -99,6 +99,7 @@ const AVProfile ff_hevc_profiles[] = { { AV_PROFILE_HEVC_MAIN_10, "Main 10" }, { AV_PROFILE_HEVC_MAIN_STILL_PICTURE, "Main Still Picture" }, { AV_PROFILE_HEVC_REXT, "Rext" }, + { AV_PROFILE_HEVC_MULTIVIEW_MAIN, "Multiview Main" }, { AV_PROFILE_HEVC_SCC, "Scc" }, { AV_PROFILE_UNKNOWN }, }; diff --git a/libavcodec/version.h b/libavcodec/version.h index 8b53586be1..da2264a097 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 11 +#define LIBAVCODEC_VERSION_MINOR 12 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \