From patchwork Sat Jan 9 07:34:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuo Mi X-Patchwork-Id: 24851 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 7359844A8AC for ; Sat, 9 Jan 2021 09:34:55 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 431BA68A588; Sat, 9 Jan 2021 09:34:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7D2D9689D8E for ; Sat, 9 Jan 2021 09:34:48 +0200 (EET) Received: by mail-pl1-f181.google.com with SMTP id q4so6884107plr.7 for ; Fri, 08 Jan 2021 23:34:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R7wyn92aFPC1XWtLkHXzDJlPzZTqcLUeBb1mvmbEWg4=; b=Gd7alItFT/mPUnh1iBnLudt1nkBWOJ7AQbYnjMSqE89SDn2CqlvzW7JJ1uuJYhCi87 SqC851hyTzfFVRxRdpRz37fOHSzT+cFvX1ZDwibAL7ZHtZot1LUPAIFEy2uAND0myWgZ Vhb0OhT5mLIikc+K0QLOPTf3ciYKoHMmgTk8LPU0SSXAJWDROTxxb1NbuxLL4BJaqDtW 8V3RO0emlAgQaCW23Ug7Czb+RWXHz+/8wBoPiyURChk92OFRaS1K8WVp7R7wzvYeYdFs zJMBIc/HoWUw9UW5Nm9ML7do+E8do23BdjEotr7igsxif22NtMebeL+PAES8pi76q78k WYSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R7wyn92aFPC1XWtLkHXzDJlPzZTqcLUeBb1mvmbEWg4=; b=OH9V05t0/d0p02eChS92Qc25pGbBK+xnYMs78uuvrLBO2u+o84H0q8IQoY4rsVsDL0 HuDUHyZCJWUWjAZT0MyZCTP7r+MUoedzDXqzbnF5kkqWwjD3/HWy/dH/96RzKSm/v+EH d51T1WyzO8V+9Fi2BsMWpZrrCEdaNEKf4QvdIgBtE0803D5xGALBsAXyiKy7/QgnNhL9 ZZWQGURmigdV37gnFpgRq0mpg+069csBBq1opRjHABscT+t/cBvBzOVm1wA6pn8LGjZw 5O/2E1I/dmEV8kbQ7PQn5glARipGfa8QSKLKjr4upEV3LLxUgxVG6jW4p082dLqwF/EQ kpag== X-Gm-Message-State: AOAM532yY6xmT0VRrzbF65bueIhi+W6zjLNy0FgFSBbeASCRukfwHAjG iYljMWOzIFZZnIP2Z6R5nQfFhuqNheeIQQ== X-Google-Smtp-Source: ABdhPJx3Aj0RSi+jFE4ObHSR/yHA4Ag5lL18B7hnG+3AZWRhSPy8ldRUgVGOn/uSj6OYRUZKP8h0xA== X-Received: by 2002:a17:90a:d307:: with SMTP id p7mr7680392pju.214.1610177686692; Fri, 08 Jan 2021 23:34:46 -0800 (PST) Received: from Guangxin-PC.localdomain (23.83.245.51.16clouds.com. [23.83.245.51]) by smtp.gmail.com with ESMTPSA id m15sm11640120pfa.72.2021.01.08.23.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 23:34:46 -0800 (PST) From: Nuo Mi To: ffmpeg-devel@ffmpeg.org Date: Sat, 9 Jan 2021 15:34:12 +0800 Message-Id: <20210109073421.23721-3-nuomi2021@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210109073421.23721-1-nuomi2021@gmail.com> References: <20210109073421.23721-1-nuomi2021@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 02/11] avcodec: add vvc codec id and profiles 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 Cc: Nuo Mi Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavcodec/avcodec.h | 2 ++ libavcodec/codec_desc.c | 8 ++++++++ libavcodec/codec_id.h | 2 ++ libavcodec/profiles.c | 5 +++++ libavcodec/profiles.h | 1 + 5 files changed, 18 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 1d3099d50a..13a3191b53 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1961,6 +1961,8 @@ typedef struct AVCodecContext { #define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3 #define FF_PROFILE_HEVC_REXT 4 +#define FF_PROFILE_VVC_MAIN_10 1 + #define FF_PROFILE_AV1_MAIN 0 #define FF_PROFILE_AV1_HIGH 1 #define FF_PROFILE_AV1_PROFESSIONAL 2 diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 14757bf31b..a7594f9004 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1426,6 +1426,14 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("Microsoft Paint (MSP) version 2"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, }, + { + .id = AV_CODEC_ID_VVC, + .type = AVMEDIA_TYPE_VIDEO, + .name = "vvc", + .long_name = NULL_IF_CONFIG_SMALL("H.266 / VVC (Versatile Video Coding)"), + .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, + .profiles = NULL_IF_CONFIG_SMALL(ff_vvc_profiles), + }, { .id = AV_CODEC_ID_Y41P, .type = AVMEDIA_TYPE_VIDEO, diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 6133e03bb9..7a8a896bfe 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -244,6 +244,8 @@ enum AVCodecID { AV_CODEC_ID_PGX, AV_CODEC_ID_AVS3, AV_CODEC_ID_MSP2, + AV_CODEC_ID_VVC, +#define AV_CODEC_ID_H266 AV_CODEC_ID_VVC AV_CODEC_ID_Y41P = 0x8000, AV_CODEC_ID_AVRP, diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c index e59a3a5c12..6dd6594319 100644 --- a/libavcodec/profiles.c +++ b/libavcodec/profiles.c @@ -74,6 +74,11 @@ const AVProfile ff_h264_profiles[] = { { FF_PROFILE_UNKNOWN }, }; +const AVProfile ff_vvc_profiles[] = { + { FF_PROFILE_VVC_MAIN_10, "Main 10" }, + { FF_PROFILE_UNKNOWN }, +}; + const AVProfile ff_hevc_profiles[] = { { FF_PROFILE_HEVC_MAIN, "Main" }, { FF_PROFILE_HEVC_MAIN_10, "Main 10" }, diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h index 6baaba5701..41a19aa9ad 100644 --- a/libavcodec/profiles.h +++ b/libavcodec/profiles.h @@ -61,6 +61,7 @@ extern const AVProfile ff_dca_profiles[]; extern const AVProfile ff_dnxhd_profiles[]; extern const AVProfile ff_h264_profiles[]; extern const AVProfile ff_hevc_profiles[]; +extern const AVProfile ff_vvc_profiles[]; extern const AVProfile ff_jpeg2000_profiles[]; extern const AVProfile ff_mpeg2_video_profiles[]; extern const AVProfile ff_mpeg4_video_profiles[];