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 9519442C29 for ; Mon, 1 Aug 2022 02:37:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A0B2968BA96; Mon, 1 Aug 2022 05:37:36 +0300 (EEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A68D868B9AA for ; Mon, 1 Aug 2022 05:37:29 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659321454; x=1690857454; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=Hwm7V0YbbPZu2zTU5e5MhT1Hyt2a1p8F92kQYSEjGZk=; b=oJi911UphovNphMa/BccJ9poPCSbzS2XLAxBKNJrFiJnME7KarhV2nT1 KC2FEAuRZJwuEo8bembhK+HPbm7oLHlgdNN2xOGYpcQOaBzJO7oLdGj6p dG9VkrGwXgsAxmievLFqI27vANJU3mAdpI/Ti+MbVomBrnFRfhZO5tlxs SGTUYc/3bcsZEAGjmJkP3DsXeCG2RgUQSW/Nusrsra3nb8pj5wkUQBjP4 ylfzny37hLNvU1zoNN6cfyjwT/XREy7XSVunuNs5xnX7RX2Z2V1X707GZ 1Dqn1+6x0F8qPK+ZwahR7DkeAyATNBGewxpOe74wVo69/UuJabjRYSlxj w==; X-IronPort-AV: E=McAfee;i="6400,9594,10425"; a="275948305" X-IronPort-AV: E=Sophos;i="5.93,206,1654585200"; d="scan'208";a="275948305" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2022 19:37:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,206,1654585200"; d="scan'208";a="704815907" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga002.fm.intel.com with ESMTP; 31 Jul 2022 19:37:25 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sun, 31 Jul 2022 19:37:25 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sun, 31 Jul 2022 19:37:24 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Sun, 31 Jul 2022 19:37:24 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Sun, 31 Jul 2022 19:37:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mMCopyJUw1Mh7bvVXk8Uo6h3XFYYi4qaRwLV6QIxLQb/Hz+WACoAia29+XNbdKeRSx/BBz7fVaNBn6x9U+BJuxH4/TOgD1b8dF+suDL5H2tB6akIuJ9RbpMQaOx6izDnos9G0d6WjdF4hExQO7gjZgEGnZIjI/Snh6lt7IaptDyfVytbykTpoYVuLQ+bYztFUQD4s2pcHNjaruw0yICyMbbVUguGVsN6wleERdcXHR5Rm7kkzaZ9AFQNUsUzg4slqrU6nkWE58GhMRDQ/Bdhl/w8Rx3f0FBkpR99B4Xqmkh2hZWbrePxUYdZ8N+QLEX2cVBIE7nzwIUdZAsex26m5w== 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=Hwm7V0YbbPZu2zTU5e5MhT1Hyt2a1p8F92kQYSEjGZk=; b=n1AiqLIStPrcb3Z8rcZfhbt+b4yNya7yl9ny0t4BqmkFk3IYU8xOzB57Glwb/Dgf0MTsquNjqr0dlPzHbs9a05dOV8x5K7G8PZi6zW5xSry5LWvfNXBqwuBwHpNf+2sbmQdScV7TV0VcnDjlUd6kTCOqOJckQHYYL8bNg2WLfBrSB0ZwQjC+jfVoDjqSAU5rUErxqSBYIctkXkbgnqsYZu5zBQrNeHuRL6yAZ2DY/rweX9DBTJTRnYlD97kmCIemegXW7p2JyNRamclXnlLpbYLibV5wclGkPm0WGqmDKfS1wwyLkXoEV/Isl8vgyOmoYB9wEozaGqIt6keaJhpbrw== 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 BN9PR11MB5515.namprd11.prod.outlook.com (2603:10b6:408:104::8) by BL3PR11MB6483.namprd11.prod.outlook.com (2603:10b6:208:3be::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Mon, 1 Aug 2022 02:37:17 +0000 Received: from BN9PR11MB5515.namprd11.prod.outlook.com ([fe80::8444:e015:794f:441b]) by BN9PR11MB5515.namprd11.prod.outlook.com ([fe80::8444:e015:794f:441b%3]) with mapi id 15.20.5482.016; Mon, 1 Aug 2022 02:37:17 +0000 From: "Xiang, Haihao" To: "ffmpeg-devel@ffmpeg.org" Thread-Topic: [FFmpeg-devel] [PATCH v3 2/2] ffmpeg_opt: consider HW acceleration method when selecting decoder Thread-Index: AQHYn99jc/dnEsghc0iKqxd9ts1uoK2VDTwAgAADgoCAAA+sgIAEMowAgAAGIQCAAAZigA== Date: Mon, 1 Aug 2022 02:37:17 +0000 Message-ID: References: <20220725043051.9692-1-haihao.xiang@intel.com> <20220725043051.9692-2-haihao.xiang@intel.com> <2ab2f6906d871909652d1ca224054c06d02ca4a0.camel@intel.com> In-Reply-To: Accept-Language: en-AS, zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Evolution 3.28.5-0ubuntu0.18.04.2 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4d36aa23-e6b0-410a-d8d8-08da7366c04d x-ms-traffictypediagnostic: BL3PR11MB6483:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zB+gDhN529TO7Y/sL5YD5LTtYA+PCrHGYXbZWzYSKTJi1u93rBqD9R/Ixnvz5lTd+lXPZdGl3cIbIOSODgOepN79dA3DqdS8uBllRJ4uoW4DmH0SgWFtuJXDep1n0bM42frCynKBMrdNlgWYhzN7f4kfweSott5ekh2aLoSzDvVousv7sGFQLIAJTBSDlUHrIsZowvUU2VBjT19WaqlZJ9qhLStsK++dptG6Qf2QlqCk7qfqcxU4WRj6O+dhSb61ED08WCwgYiLn4kDpUQvTr2ygT8jHV/NtxHOzLytVm401uNlZhLxr6MjlgkCbIg/iCSOxtZi4NjSbQzz4b3/bzZC0v7V1+AUd3CpTDj1yKBn8nkEMfnWLdbzTpDf3n53zbbnS/a/8yhfDpdAV4B2z16eUooIllMYHZwoqlP6doRenMT0nYNsv+q71GWIhzKhUeRXctFhSTFg4fcHAOZ65e1xEs8Cf1EsWKSRVqvU+nkKxdmcjgbsDJJnNQtTTJaUlOkM4fvhLe/D0N9lpuNo8kyuPbPnE+esq5YxBelrx3mHphzjODKrrHcSOaFAXPlPRwH2jDWix0LF4lFCQz32ZZ1Vn45wnzV2bT7ddWR1Ua92OyMQAUzyZ4/WT980FFSLKJs5xlDbmfyjS2Sb134lTEkNVQTTQWRZuE+805MKWip3trj1ssszUxDSIeG3eoUEmuXjpIzyMZpEsybS6lLQnBScFF5lwyoI7iqH8EsIvRZGKDPSaRiJNtb4SeswiTcgjGsDopuael2FcajX6/uwcFUVQFNiduzVttpAwGRYnoLNmsJ3ZgN44v53RbZ2Y/UrB560oxC058hHSy3msx/GXuhS4iL0yThBLXnDaSu4q9Jg= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR11MB5515.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(39860400002)(376002)(346002)(366004)(396003)(26005)(36756003)(6486002)(66946007)(82960400001)(41300700001)(5660300002)(966005)(316002)(76116006)(66476007)(66446008)(53546011)(66556008)(8676002)(38100700002)(186003)(8936002)(38070700005)(6916009)(83380400001)(2906002)(2616005)(6506007)(91956017)(478600001)(71200400001)(6512007)(64756008)(86362001)(122000001)(99106002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?TkVVVzY4cHBETGJBaHFEZExxQzZjcWFydXM1OVhHWkF5UjdYSkVoQ3ZpcmFW?= =?utf-8?B?ais4RzN4SW43ZlFRbVlDNVNqTWduZFlWUjJYYkNuNyt6NkNJZyttLzdEZXIy?= =?utf-8?B?elRxTXJSbUFTdHhtTXBBcStrdnZFZWhJeDZpaHAyd0hsejk1VE1HcE42VlVT?= =?utf-8?B?aTlWQXpSMXN0SVp5NERFL2NlUmczRlV5bVR3b1QvRlFnVnZXNUdIYUJpYmlY?= =?utf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rK096ZWlsdStTR0N2ejkw?= =?utf-8?B?UittSjRiOHpmcm4vZjM1R2QzOUliamhnM1MwNml1bk85Q25SWVJJRDVaUnl6?= =?utf-8?B?aHgzbFFqL1VidTUwczJGenhRQlZZZDllTU96RDJabVlrK1h3TnowMmhNMmlK?= =?utf-8?B?Q2c9PQ==?= Content-ID: <7926AAA08BEEFE40925A6CF7AC376F76@namprd11.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5515.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d36aa23-e6b0-410a-d8d8-08da7366c04d X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2022 02:37:17.6375 (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: BoxCHPdhY403MUqC7b5XP5IiqRhiLSOLSvGaEt3q5CFS7F5czBdtGZsCoOlasqTROLGH80QsCWdi/0p+4dZahw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6483 X-OriginatorOrg: intel.com Subject: Re: [FFmpeg-devel] [PATCH v3 2/2] ffmpeg_opt: consider HW acceleration method when selecting decoder 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, 2022-08-01 at 02:14 +0000, Soft Works wrote: > > -----Original Message----- > > From: ffmpeg-devel On Behalf Of > > Xiang, Haihao > > Sent: Monday, August 1, 2022 3:53 AM > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH v3 2/2] ffmpeg_opt: consider HW > > acceleration method when selecting decoder > > > > On Fri, 2022-07-29 at 09:46 +0000, Soft Works wrote: > > > > -----Original Message----- > > > > From: ffmpeg-devel On Behalf Of > > > > Ronald S. Bultje > > > > Sent: Friday, July 29, 2022 10:50 AM > > > > To: FFmpeg development discussions and patches > > > devel@ffmpeg.org> > > > > Subject: Re: [FFmpeg-devel] [PATCH v3 2/2] ffmpeg_opt: consider > > > > HW > > > > acceleration method when selecting decoder > > > > > > > > Hi, > > > > > > > > On Fri, Jul 29, 2022 at 4:38 PM Xiang, Haihao < > > > > haihao.xiang-at-intel.com@ffmpeg.org> wrote: > > > > > > > > > libdav1d is the preferred AV1 decoder in FFmpeg, libdav1d is > > > > always > > > > > > > > used > > > > > when > > > > > running the command below even if user expects vaapi or other > > > > HW > > > > > acceleration > > > > > methods. > > > > > > > > > > > > > I think that is a pretty serious issue. Don't we always want to > > > > prefer a hw > > > > decoder by default? I agree there should also be ways to force- > > > > select > > > > specific hw/sw decoders, but shouldn't hw be the default? > > > > > > I don't think that this would be reasonably possible in any way. > > > There are a lot of questions which ffmpeg cannot answer, e.g.: > > > > > > - Which hwaccel to choose? > > > - Which hwaccel is available? > > > - Which parameters are required for selecting a device > > > that is working? > > > - Is the auto-selected device even capable to decode a certain > > > input? > > > (pixel format, bit depth, codec profile, frame size, ...) > > > > > > For the user who is creating the command line, it is important to > > > be able to rely on what is going to happen. If they can't command > > > lines will fail: > > > > > > - The outputs of hw decoders vary. Some output to hw format, some > > > to sw format by default. You may need to specify > > > > hwaccel_output_format > > > or use hwdownload > > > - Depending on the hwaccel, a totally different set of filters > > > may be required (not to speak of encoders) > > > - How would you specify that you want a sw decoder instead? > > > > > > IMO, predictability is the topmost important behavioral aspect > > > for users (be it humans of machines.. ;-) > > > > > > I agree with you it would be better not to make hw the default if > > user doesn't > > ask for. However '-hwaccel arg' is used to specify hw acceleration > > method in the > > examples. According to doc ( > > https://github.com/FFmpeg/FFmpeg/blob/master/doc/ffmpeg.texi#L1260- > > L1262), a hwdecoder is expected. > > > > "@item -hwaccel[:@var{stream_specifier}] @var{hwaccel} > > (@emph{input,per-stream}) > > Use hardware acceleration to decode the matching stream(s). " > > > > This patch is to fix the issue that a SW decoder is chosen even if > > user is > > expecting a hw method, not to make hw the default in any case. > > > > Thanks > > Haihao > > > > Oh, I'm in no way opposed to your patch, I just talked about the > idea of a general automatic selection of hardware decoders. > Sorry for misreading your email and thanks for your clarifying. > I agree that the behavior for AV1 should be the same as for the other > decoders. Thanks, I will push it if no more comment in a few days. - Haihao _______________________________________________ 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".