From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0872D49AFA for ; Tue, 2 Apr 2024 05:18:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E2BC268CE36; Tue, 2 Apr 2024 08:18:43 +0300 (EEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A9B668CD94 for ; Tue, 2 Apr 2024 08:18:36 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712035122; x=1743571122; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=jCg0tRd167qj4toSey8/jPy9wSgl6LtG/ec0D4JRlwE=; b=F/hLmGahOAXuIYjQgV+L1Wa+KahTTsJAzQyrvAi7r8JBNroJ9CRzZ0Nv M0qz4EWF5wlK/f0Df1Schq7xIcKMRriIJbVom2XA6jVT6W+Z2IXW3ZmCo GTbwieJhnz36Gk0Ig0MvQ1CxhfQn/Va9BH0QTreChH0nzLi5zv/XDUJis U3bFZolHaFpsh4uCEXBIwmmuK2ubrPvT6FbYRXtjnsaOJNOYWqELnBiGd IliNMLSUnPPFQcb7l0G/yGUnSSF7cbbMFrYLJnA3ThCzVTBLbBRQWcnbw TWZSo6oCIsnYRi7+Yu1jcjJaro3fUykhcaqtafdrJoKuJbsvBSmKiWJY+ Q==; X-CSE-ConnectionGUID: jy+2s/74SuC3VpXhlZgf3A== X-CSE-MsgGUID: Q12dP99wQwaCqXfXhuWCMg== X-IronPort-AV: E=McAfee;i="6600,9927,11031"; a="29662441" X-IronPort-AV: E=Sophos;i="6.07,174,1708416000"; d="scan'208";a="29662441" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 22:18:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,174,1708416000"; d="scan'208";a="17995809" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa009.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 01 Apr 2024 22:18:11 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 1 Apr 2024 22:18:10 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Mon, 1 Apr 2024 22:18:10 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.40) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 1 Apr 2024 22:18:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RhUvRCWYfG9Xc5TvQ0M02iu5joRKshz7TcHdNuCFbLmdwbZmHwwoI+NTDvxty+dMVxefBs9kv7fYzGRgFSvtzoM+S4PXgxxywZvkDDKx5BkUVcksiymWvTirTS6P6xHea19kMCiQkJdgvp7EBDY0HvUjfQyJBVPFN55X/tBTw+ZmUqtg/BiTgS9GSAbQaTeiz22m9p5OrJ21KV93HwRMjhNm7gQnmwZzuVTQHc02sQXv9sRhqEmJUqADB6TckC6Rj2B3t3/P9KPutJe7IRIaIM5imjR8kUNQgmaoJqaUssV1m8CH1PlocJpuE+ycQ1sJ+SMmOzW/uf5WNqcyEg50KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jCg0tRd167qj4toSey8/jPy9wSgl6LtG/ec0D4JRlwE=; b=IV5i2sYX2U0T+QVrH6rgYy7d4WSHhaRjc139jCg4S1nDjQYK0gmGKzDLlLX/vhxwZT9GxppPhiVRX9zSshQ0R3B3s1XCIguqWlHrxVqaC5HPJuUydRfAnqQZWz/LN/W3CXTOZYH9ZaKsUnH7bRTsH7+Ofp0gCTn7LloB2ZHKbUkjnTABbqN15WvRUHuB+Uv1k4Nec56q20T5xK4MfsYWJlckUfRUTeL2TGsY1JDm3gDaF3fxJ3T4ziicrjvusAPeuWuG9Uiwl6PR8loOFD2fSQFo0FayietowjTrFyO7LP+eq4XFcBBnau/nbmd2bz5iL7Ijr0/v5tLofa4C5QvYWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH0PR11MB5030.namprd11.prod.outlook.com (2603:10b6:510:41::5) by SA0PR11MB4638.namprd11.prod.outlook.com (2603:10b6:806:73::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.25; Tue, 2 Apr 2024 05:18:08 +0000 Received: from PH0PR11MB5030.namprd11.prod.outlook.com ([fe80::566d:2e2d:1fa3:d511]) by PH0PR11MB5030.namprd11.prod.outlook.com ([fe80::566d:2e2d:1fa3:d511%6]) with mapi id 15.20.7409.031; Tue, 2 Apr 2024 05:18:08 +0000 From: "Wang, Fei W" To: "ffmpeg-devel@ffmpeg.org" Thread-Topic: [FFmpeg-devel] [PATCH v3 2/2] lavc/vaapi_encode_h265: Set general_*_constriaint flags with profile Thread-Index: AQHaeXp5igVfhXyhtUm2DpOVNcx3wrFAUtOAgBOZP4CAAJtfAA== Date: Tue, 2 Apr 2024 05:18:08 +0000 Message-ID: References: <20240318042111.21983-1-fei.w.wang@intel.com> <20240318042111.21983-2-fei.w.wang@intel.com> <4cdd5a84-8547-48ea-b0e5-62ca20da39a3@jkqxz.net> <2632f0803eef7becfaff4458547f967a4578a997.camel@intel.com> <7c92fb71-5033-4607-9269-cbba01b9d552@jkqxz.net> In-Reply-To: <7c92fb71-5033-4607-9269-cbba01b9d552@jkqxz.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.36.5-0ubuntu1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5030:EE_|SA0PR11MB4638:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eC8lCNQ+mUx9MyEPR2MygvE+x0IqkXZnN9okEfFb+q1LcgLtlqKp7mTOEn0xq+OIc+zulamrdVuwVE9LbhvnD0GYbK4G40FlC9KQX54JymOPwekQTP9pnJ2jQjofmm0eRR+ONLTMKlVnKcX/RTDaNS9KIK8+0rkoKkov4o84ruhZeVHOxG/7OkGhtO1Qz/TvWMQ4ldQMnx+M+jxPfIKPQwljGORmB/SG5pvpHhwAcqiwy4VLTl1wDjkLzhlrD9MzBpGdXp2XoFk9GR+UfiBrf2y0ZcrUfSzm/Y4aGHpX16Sv7YEiVTS0xiovpTlXUOXvGUDlFtLHbCbEArPXhKwvxCmL+hehP9hIhWFygqIrFRUvxNjNuMXSG92ELAjWAVVCb2WcpUd76OzVxKr7VXlQsiNnfzMjPwQ+kD1rlntnZ9syNC0OJRboz3/Wq9nT9cTCFQTh368MtWtVj5CXznnBEycWaeA77DIoMvDURmjbUEfc2tARdKoagn8uhLu6i2j6DEQ7lzEIcbJeWuHcPYZqpO/DjxxX2Me/SY4+sfEY7uDbZrf5YSjVpS6q5HyA2HlNHyoT2S4f2BLF5sKxja6ZUn/EfDVBibWRdQAA7jrP0Hc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5030.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(376005)(366007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?UDRZZXRjejhZYnN5ellKSkx2NjVzazdXSnAvRDl3T094cFlaWTVqOHBPWGV2?= =?utf-8?B?Q1h2akxKSEg0Z1dlYjZmYWoxZ1BNUXpGMFFrQk9IcjYyWHZ4bXRnaE4yYzVh?= =?utf-8?B?SUhKTXZUcjBYRkhSZkViL0t3SytJb1F5UGE2cW5WK0VWNDRGOGQ0d1FtZTFp?= =?utf-8?B?Q25hV05zOWV6cHQ3S0wzYXdnaXhUaDJ0emsyMFFOVnNhVDAyNzE4T3pKYVFW?= =?utf-8?B?dEkvSzJGZis0UWwrVkwxU2czUysyWXV1K1ZRN0ZIRGsyd1l6Q3hlZ1hCWDRL?= =?utf-8?B?T2ZobHA2ei9QUW8xR0Zyay9IWE9lZTFFMmhLOHhQSUc0M0JDUU5uanlGRTd6?= =?utf-8?B?czBZaFFnOUFNMllPSVQySVVvV2FqemFvU2xtYmd0d2l0U295QVNRajNxM0U0?= =?utf-8?B?aE95c3UyYnFGTmlabDEyQkJHbjJXN3lOYW5YN3lrTkJTenVLdmhpZVVDRGNh?= =?utf-8?B?RFpLelJNOXFyZWNBNThKWW5pejY5b3RqZk9Mc0tOektVNnAySEpJc1pTcVRs?= =?utf-8?B?K0o4YVMrMU5BMzJoMzNIMXU5RWVyOXBJcmNWdDFDVFRrU3VDdXgwLzhleEZn?= =?utf-8?B?UzlSZzErVHRtbVBxcEU0RGtHY3VmTFNXNkc1dVdKUU9OREpPbjREbE15ZU1I?= =?utf-8?B?L2FwczNxYWxoSlplaWw4VDRjZENzWnY3VzdFTTc1Uk9TZncwTm1lWXduTkFJ?= =?utf-8?B?dEI5alhzUlNkSXJtQStCL0R3RU9teldraVJ0OE12Yzk1VWE5Z3RpTXNsOXNy?= =?utf-8?B?UUVFcmE0bS9CcGhtdCtKdUhzaVd1MzZLSU0wODVMalNwS3hORWdsZTZWMHVU?= =?utf-8?B?NEo2cngvL3ZLUHBheW9TQnpLdklQaDl1R21maXoyTjd4a01hZ2UzdWgzbHNz?= =?utf-8?B?R2JRbnZOSE5FWmYzUGh1OXp3dUg2OXQ3SWNUN2g1bmpkbW1TWjV4WTNWMXVT?= =?utf-8?B?ckd5UElmbWYxemRMREVYUlBuMnFEVnNvSm9KUWVGREdiTytiT0VCeFdJMjdq?= =?utf-8?B?MXNyVGkvMWxPRTlyQ0Z0Q2pheWw5Y0RxSjlvUE5SS2VtTFVEMEovQWxROThT?= =?utf-8?B?WHNrRGt6YUNmMTRtLzRQdGtvaEltQ1J2SlRkanl1T3pCZTEyelB2aEdicS8r?= =?utf-8?B?TXRyMDUreFdwTFR2Sm5YNWVGRVA1dUFMdkpQS1hNOU1mV3BudkRjY0JOelJ0?= =?utf-8?B?MTdEN0gwQkVyWDNBNDdjd3FwVFE0b0dpT2t6TWpZQmJ1cDM2TlpCQ3hBZDZa?= =?utf-8?B?S0FuRDJJMGhDUVFHaXgwOThqMndzaWpXdCsvejRYT1BCam54MURoZHlrWS9j?= =?utf-8?B?T3JUcStHZzVuQ2tjY1lwS0xHM1dRTll5KzhIb2IxUmRqclFGNU9EL1MyYzdu?= =?utf-8?B?dFh1QnM4Um5MOTlQd3pjbmpkZTFEeHNjVmF5VVZ3WGJkVVA5TlFWNHlXUndQ?= =?utf-8?B?YklOMmlSTDY2RjFkWU1leWlQYVBndDd4NHNjb0VuWFgzZlowM2xoUm5hZzRk?= =?utf-8?B?LzBpUDFEWG1wTVh3ektaNjRzTHRaL3pUTWxtUTZCbzZ6Y3dNTVd6WmxObnVk?= =?utf-8?B?YmU4M0ZUbmR2OHV2cnRYQXBhMVY5T2tlV3R1dkZBcHdRQXRlTDlacm1Gc1JH?= =?utf-8?B?allOQ1dxdEJBZ2wwdWQ0dlNoVzBBK1BYSVI0VkNLM2FLRStQWk9PNVpMQkFv?= =?utf-8?B?bjhTSlloeXY0KzlSVDB1Q1ErclhBVWZESnViQ0EvUkJSYllXQWZoYnAzNXow?= =?utf-8?B?bzVLY0pGVWhhWG5yc0FTNVhiK0l0MWIvZGFpTENaL29DZXNUM0RuUXorSWta?= =?utf-8?B?VFJqK29xaTJyZEtaTG1BU3pnby9UYmhycnpKRmNsQkZJQmFTK09GWStHK3ZO?= =?utf-8?B?NjhwRDJ0UlhzcG05S003c01PV0NXbi9uZ0hNZ1VnYTBVaVBFYWZQYmtweXU4?= =?utf-8?B?MWxpWmlHNXBTSTFpS2cyaFoxWE9BdVc2NzlZQnY5eW5YQTI5QjZiWkQzNVlQ?= =?utf-8?B?N2VWMzNDSmxpZnBtVHdmZnVHMmJoalZ3b3NkSEZHdlEzOGk3RFJGV2lCNXBX?= =?utf-8?B?d3R4bWtieWQ1Nkx6Ty9mZWxWSWR0MXY3dS9uZXRFZG1ScGtiTzgyUUIwVWl0?= =?utf-8?B?TXpod0FYa2hvUnlwSTlWOFUwd25oMEtRZk5vNVM2WUsxR25lK1kyNVJwSElo?= =?utf-8?B?NGc9PQ==?= Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5030.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd7b9c57-035b-41ce-1116-08dc52d4488f X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2024 05:18:08.3521 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TsHL4+/hYLFgltw9oogtnqHV6TxvaLahVBpps4LuesgwpVSGG4efFWmM5L/4h0AhgutsXs3JWLA/9f6p6MwifQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4638 X-OriginatorOrg: intel.com Subject: Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/vaapi_encode_h265: Set general_*_constriaint flags with 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 2024-04-01 at 21:02 +0100, Mark Thompson wrote: > On 20/03/2024 08:44, Wang, Fei W wrote: > > On Mon, 2024-03-18 at 21:22 +0000, Mark Thompson wrote: > > > On 18/03/2024 04:21, fei.w.wang-at-intel.com@ffmpeg.org wrote: > > > > From: Fei Wang > > > > > > > > According to Table A.2 in spec. > > > > > > > > Signed-off-by: Fei Wang > > > > --- > > > > libavcodec/vaapi_encode_h265.c | 176 > > > > +++++++++++++++++++++++----- > > > > ----- > > > > 1 file changed, 123 insertions(+), 53 deletions(-) > > > > > > > > diff --git a/libavcodec/vaapi_encode_h265.c > > > > b/libavcodec/vaapi_encode_h265.c > > > > index 43755e2188..5ed317ce11 100644 > > > > --- a/libavcodec/vaapi_encode_h265.c > > > > +++ b/libavcodec/vaapi_encode_h265.c > > > > @@ -258,6 +258,124 @@ fail: > > > > return err; > > > > } > > > > > > > > +static int vaapi_encode_h265_init_ptl(AVCodecContext *avctx) > > > > +{ > > > > + VAAPIEncodeContext *ctx = avctx->priv_data; > > > > + VAAPIEncodeH265Context *priv = avctx->priv_data; > > > > + H265RawVPS *vps = &priv->raw_vps; > > > > + H265RawProfileTierLevel *ptl = &vps->profile_tier_level; > > > > + > > > > + ptl->general_profile_space = 0; > > > > + ptl->general_profile_idc = avctx->profile; > > > > + ptl->general_tier_flag = priv->tier; > > > > + > > > > + ptl->general_profile_compatibility_flag[ptl- > > > > > general_profile_idc] = 1; > > > > + > > > > + if (ptl->general_profile_compatibility_flag[1]) > > > > + ptl->general_profile_compatibility_flag[2] = 1; > > > > + if (ptl->general_profile_compatibility_flag[3]) { > > > > + ptl->general_profile_compatibility_flag[1] = 1; > > > > + ptl->general_profile_compatibility_flag[2] = 1; > > > > + } > > > > + > > > > + ptl->general_progressive_source_flag = 1; > > > > + ptl->general_interlaced_source_flag = 0; > > > > + ptl->general_non_packed_constraint_flag = 1; > > > > + ptl->general_frame_only_constraint_flag = 1; > > > > + > > > > + if (avctx->profile >= 4) { > > > > + ptl->general_intra_constraint_flag = ctx- > > > > > gop_size == 1; > > > > + ptl->general_one_picture_only_constraint_flag = 0; > > > > + ptl->general_lower_bit_rate_constraint_flag = 1; > > > > + ptl->general_max_14bit_constraint_flag = 0; > > > > + > > > > + switch (ctx->va_profile) { > > > > +#if VA_CHECK_VERSION(1, 2, 0) > > > > + case VAProfileHEVCMain12: > > > > + // Main 12 > > > > + ptl->general_max_12bit_constraint_flag = 1; > > > > + ptl->general_max_10bit_constraint_flag = 0; > > > > + ptl->general_max_8bit_constraint_flag = 0; > > > > + ptl->general_max_422chroma_constraint_flag = 1; > > > > + ptl->general_max_420chroma_constraint_flag = 1; > > > > + ptl->general_max_monochrome_constraint_flag = 0; > > > > + break; > > > > + case VAProfileHEVCMain422_10: > > > > + // Main 4:2:2 10 > > > > + ptl->general_max_12bit_constraint_flag = 1; > > > > + ptl->general_max_10bit_constraint_flag = 1; > > > > + ptl->general_max_8bit_constraint_flag = 0; > > > > + ptl->general_max_422chroma_constraint_flag = 1; > > > > + ptl->general_max_420chroma_constraint_flag = 0; > > > > + ptl->general_max_monochrome_constraint_flag = 0; > > > > + break; > > > > + case VAProfileHEVCMain422_12: > > > > + // Main 4:2:2 12 > > > > + ptl->general_max_12bit_constraint_flag = 1; > > > > + ptl->general_max_10bit_constraint_flag = 0; > > > > + ptl->general_max_8bit_constraint_flag = 0; > > > > + ptl->general_max_422chroma_constraint_flag = 1; > > > > + ptl->general_max_420chroma_constraint_flag = 0; > > > > + ptl->general_max_monochrome_constraint_flag = 0; > > > > + break; > > > > + case VAProfileHEVCMain444: > > > > + // Main 4:4:4 > > > > + ptl->general_max_12bit_constraint_flag = 1; > > > > + ptl->general_max_10bit_constraint_flag = 1; > > > > + ptl->general_max_8bit_constraint_flag = 1; > > > > + ptl->general_max_422chroma_constraint_flag = 0; > > > > + ptl->general_max_420chroma_constraint_flag = 0; > > > > + ptl->general_max_monochrome_constraint_flag = 0; > > > > + break; > > > > + case VAProfileHEVCMain444_10: > > > > + // Main 4:4:4 10 > > > > + ptl->general_max_12bit_constraint_flag = 1; > > > > + ptl->general_max_10bit_constraint_flag = 1; > > > > + ptl->general_max_8bit_constraint_flag = 0; > > > > + ptl->general_max_422chroma_constraint_flag = 0; > > > > + ptl->general_max_420chroma_constraint_flag = 0; > > > > + ptl->general_max_monochrome_constraint_flag = 0; > > > > + break; > > > > + case VAProfileHEVCMain444_12: > > > > + // Main 4:4:4 12 > > > > + ptl->general_max_12bit_constraint_flag = 1; > > > > + ptl->general_max_10bit_constraint_flag = 0; > > > > + ptl->general_max_8bit_constraint_flag = 0; > > > > + ptl->general_max_422chroma_constraint_flag = 0; > > > > + ptl->general_max_420chroma_constraint_flag = 0; > > > > + ptl->general_max_monochrome_constraint_flag = 0; > > > > + break; > > > > +#endif > > > > + default: > > > > + av_log(avctx, AV_LOG_ERROR, "Unknown profile to > > > > init > > > > PTL.\n"); > > > > + return AVERROR(EINVAL); > > > > + } > > > > + } > > > > > > Why is this an improvement over the current code which sets the > > > constraint flags based on the actual content of the stream? > > > > > > Note the requirement in A.3.5 for decoder support: > > > > > > general_profile_idc is equal to 4 or > > > general_profile_compatibility_flag[ 4 ] is equal to 1 for the > > > bitstream, and > > > the value of each constraint flag listed in Table A.2 is greater > > > than > > > or equal to the value(s) specified in the row > > > of Table A.2 for the format range extensions profile for which > > > the > > > decoder conformance is evaluated. > > > > > > which says that decoders must be able to support streams which > > > set > > > additional constraint flags beyond those which are specified for > > > a > > > particular profile (in particular, an 8-bit 4:2:2 stream must be > > > decodable by any decoder supporting either "Main 4:2:2 10" or > > > "Main > > > 4:4:4", so ideally it shouldn't be marked to require one of those > > > in > > > particular). > > > > That's a capability request for decoder. For encoder side, I'd > > prefer > > to use the most typical values. The constraint flags in Table > > A.2/3/5 > > are strictly checked to get rext profile in ff_h265_get_profile(), > > and > > seems the constraint flags is the only way to distinguish profiles > > in > > rext(all the rext profiles shares same general_profile_idc or > > general_profile_compatibility_flag[ 4 ]). > > Hmm. I was missing that the VAAPI decoder has fixed matching - it > only accepts things which exactly match the hull of each profile, not > ones inside it which are compatible. That seems worth fixing. > > Do other decoder implementations do the same thing with strict > matching? libavcodec's software decoder doesn't - the profile isn't > really relevant to it. nvdec doesn't obviously do anything there > either because it accepts all rext streams, though presumably some of > them fail later. HEVC bsf also checked them strictly in process metadata(called by ff_h265_guess_level). And VQ Analyzer(a video stream analysis tool https://vicuesoft.com/vq-analyzer/) also report unknown profile if no this fix. Thanks Fei > > Thanks, > > - Mark > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".