From patchwork Mon Jan 11 16:33:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nuo Mi X-Patchwork-Id: 24913 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 EB63A44B8FC for ; Mon, 11 Jan 2021 19:37:09 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C45A668ABD9; Mon, 11 Jan 2021 19:37:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 370DD6807D2 for ; Mon, 11 Jan 2021 19:37:03 +0200 (EET) Received: by mail-pg1-f181.google.com with SMTP id n7so130398pgg.2 for ; Mon, 11 Jan 2021 09:37:03 -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=auX4s9WKHMlUpsn8h15Lf/yrulBbgf+bT6HMU5aQELCXY+TNQqZLEQpzaIQfQI9FZx L+lRBoV5tpGslqjVbVgVT50qchVa3d2PGahCXd2QbAkYeAvDvUdyHq2e+K/4bZQkgJcP n8uhCNGKT9MkRAF8KanV/Uksf1wZGObhlKz1BBQ3xHoa3qvgFucH5rF4D4EP2I/fmdNq 3sLmOVp2doL8P7zKVeq7VEfwz9zd+nqtFx8go3Q2ilNAJcq9l+owKIcEyDkH8KBs2vgh w7ZyGNQjLpAJCJ7Q2m1BdTB1+jX8H9jxyreMCwcTd66raEgRhVQk7Mh0FaGouxYzJwgV zMCg== 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=UYALpqzrFzxlIyxg9YybIg+ieGMOg8ntPutrYDU+2B/4zVGYUB+22n4wnWoXKgXwlK Lhe6rP8rXg0ArQy8aqMtr0nnp57uRs9C8u7EwcSaFaeAnUjsYjYweVTiNt9fxrUd0qTz /03/nSAMr+Ug5Xrm8cL1ajehGsH7fr4R4xGGwYFUMW/79M9MPvUypwm8/lrmTMmI8EFc N1REdcyYIRP+LHyo+87H6XUqGO8+xXGgYq3d6PalEkR9xzLeARriUxPeACtzg9eWj90G p92NrLZD8G12gDycNaDRM7OooYOgCKnbgL50tg21KxPLXqaP1jgcyb37c6+bn+JqW441 IlGw== X-Gm-Message-State: AOAM530lE8Tp9Jw4/8RUNfPKEab3cjTaTIic4PicjF+Opu/LLli1zrKj zrDdxgdyZe84Mwq2sKskhRTl547RRMUWlA== X-Google-Smtp-Source: ABdhPJyqe22rrQmwVZUECO7o95vX48E11zzQntRYUnF97Aex5u3AgK183rGZDDtmtj5mETvBzwlXpg== X-Received: by 2002:a63:405:: with SMTP id 5mr390465pge.44.1610382818423; Mon, 11 Jan 2021 08:33:38 -0800 (PST) Received: from smith.tendawifi.com (23.83.245.51.16clouds.com. [23.83.245.51]) by smtp.gmail.com with ESMTPSA id x21sm203205pgi.75.2021.01.11.08.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 08:33:37 -0800 (PST) From: Nuo Mi To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Jan 2021 00:33:10 +0800 Message-Id: <20210111163319.13387-3-nuomi2021@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210111163319.13387-1-nuomi2021@gmail.com> References: <20210109073421.23721-1-nuomi2021@gmail.com> <20210111163319.13387-1-nuomi2021@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 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[];