From patchwork Thu May 9 19:40:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 13044 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 D368D448706 for ; Thu, 9 May 2019 22:40:30 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9DE926898D1; Thu, 9 May 2019 22:40:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065104.outbound.protection.outlook.com [40.92.65.104]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C58D8680714 for ; Thu, 9 May 2019 22:40:23 +0300 (EEST) Received: from DB5EUR01FT022.eop-EUR01.prod.protection.outlook.com (10.152.4.60) by DB5EUR01HT196.eop-EUR01.prod.protection.outlook.com (10.152.5.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1856.11; Thu, 9 May 2019 19:40:22 +0000 Received: from DB8PR03MB5898.eurprd03.prod.outlook.com (10.152.4.56) by DB5EUR01FT022.mail.protection.outlook.com (10.152.4.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1856.11 via Frontend Transport; Thu, 9 May 2019 19:40:22 +0000 Received: from DB8PR03MB5898.eurprd03.prod.outlook.com ([fe80::fc8e:9afe:1a49:c86d]) by DB8PR03MB5898.eurprd03.prod.outlook.com ([fe80::fc8e:9afe:1a49:c86d%3]) with mapi id 15.20.1878.019; Thu, 9 May 2019 19:40:22 +0000 From: Jonas Karlman To: "ffmpeg-devel@ffmpeg.org" Thread-Topic: [PATCH 1/4] hwcontext_drm: Add AVDRMFrameDescriptor.format field Thread-Index: AQHVBp8KtIjaNYEtOE2qSHwE1VmXYA== Date: Thu, 9 May 2019 19:40:22 +0000 Message-ID: References: In-Reply-To: Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0602CA0022.eurprd06.prod.outlook.com (2603:10a6:203:a3::32) To DB8PR03MB5898.eurprd03.prod.outlook.com (2603:10a6:10:e7::18) x-incomingtopheadermarker: OriginalChecksum:2B4FF786D9EB523BA1086891200128FC430A783F7939725F215E8867DC02ABD5; UpperCasedChecksum:51CC5CF4224FC04ABF45E3F2456797C1F76A79955B8360AF0193C085D5416C31; SizeAsReceived:7492; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-tmn: [iqhj3qRzWeqEI50TcsQm4zUjnp4Sp6ax] x-microsoft-original-message-id: <20190509194004.878-1-jonas@kwiboo.se> x-ms-publictraffictype: Email x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045); SRVR:DB5EUR01HT196; x-ms-traffictypediagnostic: DB5EUR01HT196: x-microsoft-antispam-message-info: SP32aRPlR9MHtLI3PFPTcG/rF937r1Vys853zpsjajNJu1EMR9vBnUfho2V1goRLVrdg/SXiqoAwbq+h9YCbipaOPAVYQAxN1MTa2kLOZEsifNk8wFeTXitmgoum/ZqAto9Gvi+8t/Aw1UDkLtwXPxuIdpCTz/9mh8vb//EF5asQh0V5GbaQ8af6Qi2jrXm6 MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: e9ceac78-84f5-46c7-b701-08d6d4b62ccf X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 May 2019 19:40:22.5344 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR01HT196 Subject: [FFmpeg-devel] [PATCH 1/4] hwcontext_drm: Add AVDRMFrameDescriptor.format field 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: Jonas Karlman Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" A AVDRMFrameDescriptor for a NV12 frame may be described in a single layer descriptor with multiple planes, (AVDRMFrameDescriptor) { .nb_layers = 1, .layers[0] = { .format = DRM_FORMAT_NV12, .nb_planes = 2, .planes[0] = { .object_index = 0, }, .planes[1] = { .object_index = 0, }, }, } or a multi-layer descriptor with one plane in each layer. (AVDRMFrameDescriptor) { .nb_layers = 2, .layers[0] = { .format = DRM_FORMAT_R8, .nb_planes = 1, .planes[0] = { .object_index = 0, }, }, .layers[1] = { .format = DRM_FORMAT_RG88, .nb_planes = 1, .planes[0] = { .object_index = 1, }, }, } With a multi-layer descriptor, the frame format is missing. Add a AVDRMFrameDescriptor.format field to remove any ambiguity of what frame format a multi-layer descriptor may have. Signed-off-by: Jonas Karlman --- doc/APIchanges | 3 +++ libavutil/hwcontext_drm.h | 4 ++++ libavutil/version.h | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/doc/APIchanges b/doc/APIchanges index e75c4044ce..d9c21ec030 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2019-05-08 - xxxxxxxxxx - lavu 56.27.100 - hwcontext_drm.h + Add AVDRMFrameDescriptor.format. + 2019-04-20 - 3153a6502a - lavc 58.52.100 - avcodec.h Add AV_CODEC_FLAG_DROPCHANGED to allow avcodec_receive_frame to drop frames whose parameters differ from first decoded frame in stream. diff --git a/libavutil/hwcontext_drm.h b/libavutil/hwcontext_drm.h index 42709f215e..0ccbd19acc 100644 --- a/libavutil/hwcontext_drm.h +++ b/libavutil/hwcontext_drm.h @@ -147,6 +147,10 @@ typedef struct AVDRMFrameDescriptor { * Array of layers in the frame. */ AVDRMLayerDescriptor layers[AV_DRM_MAX_PLANES]; + /** + * Format of the frame (DRM_FORMAT_*). + */ + uint32_t format; } AVDRMFrameDescriptor; /** diff --git a/libavutil/version.h b/libavutil/version.h index c0968de621..12b4f9fc3a 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,8 +79,8 @@ */ #define LIBAVUTIL_VERSION_MAJOR 56 -#define LIBAVUTIL_VERSION_MINOR 26 -#define LIBAVUTIL_VERSION_MICRO 101 +#define LIBAVUTIL_VERSION_MINOR 27 +#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \