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 D9C0E45A87 for ; Wed, 14 Jun 2023 02:58:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8DD6C68C444; Wed, 14 Jun 2023 05:58:49 +0300 (EEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 532A168C2A6 for ; Wed, 14 Jun 2023 05:58:42 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686711528; x=1718247528; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=ZtVa/CoBwQUuAeBkZuJ4ER1wQOjVFNJPXmaV4adgb2Q=; b=IU7s/6tVRiHBFvTKT3sMogBcKKynB0xXxO2gFviQ5wyJmjKXpR/ZPJD4 b5uk57Ek/8Oo/g3Lz8vFGhXwrwLD/62+2oclVAYfwfh6I87Fa0WlFMIbl gxNXfcSQX33M0o+8guQtwG4Fz+hzNEOkfmKsaNAuIAicfmREzmEmYMP3o TmD6znHWCIVndJGT0g4Ujwsfl8yCCH9hdv46us3rmnLAA5s7HIGo0CRKM Iq00T2ELJAKkFMOpOdJboiaNygi+cC9yj4doX4Sha0x5BotxFjgOtODe+ iFcb8G3II9UnvnY2CsEYIOetZXqyjJ8lKtpGMpTLi3yzmwO+SoIcSQfTz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="424388618" X-IronPort-AV: E=Sophos;i="6.00,241,1681196400"; d="scan'208";a="424388618" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2023 19:58:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10740"; a="781924344" X-IronPort-AV: E=Sophos;i="6.00,241,1681196400"; d="scan'208";a="781924344" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga004.fm.intel.com with ESMTP; 13 Jun 2023 19:58:39 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 13 Jun 2023 19:58:39 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.2507.23 via Frontend Transport; Tue, 13 Jun 2023 19:58:39 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.43) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Tue, 13 Jun 2023 19:58:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eG2rbmmuwKS4WRSD3/qbk1qzXdNg1WjsBKL0pYdPDJIxDTI4+L4jWMPc9JsjKODbOKlIPaLhwhhk0vAdxox9vjknaS0TovN/Xpn0FSp6dJGHDxAeZxnUZVgmy1oN7l3Z2r/kW3MrNcL2LxHlJsoCt8sxroLzDsN1ZUwwilJEV1Lg/ksi79EQhZ21fO9EQHMwVGMHz5K7QBrbuDrZ/kxZlyIJ3l/kL3Stx7C1VPYFkbc7QFsUY1woJAkgRemZjyk0Rp3AFXTDW6CtC1BlaiVvjlv3pWhXPq7IssJgcEw/8e9WEC7SS712GEtDasJh2AGmquZoIyuvahfFkAxQpzDLxg== 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=ZtVa/CoBwQUuAeBkZuJ4ER1wQOjVFNJPXmaV4adgb2Q=; b=Af4H1nxMEKwhWOQ6qqkRKWsJ1/i63qlnZMqhnx1uUwlvOJNaqyT2Q5nYqcgKMEWpmxtMjUMc1PVn69RGDOHQ/g1nWgW4MXulFR14RleoonW0ScujT6h8RDCSyjUs39pnAhZRcqzJWPeT81s9YXGoog6qc+XXpbjQGZY8s/VrCvIvL65MGzZgjTYKbDn1RVkEawqhQpHHRZQC7+C65Sxef/R+lEjmTAb+w6CB81L7mb+kYdyaN7dJU/yOtC6tGfYjkrTo4MHWfhVrgRSuedyOeXS4T+bIqdckCtTvPfby4RrhrJRPMW53/0SAQqy4Bl7pzdwce5jyyj+iHu7k+4Chjg== 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 DM4PR11MB6381.namprd11.prod.outlook.com (2603:10b6:8:bd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.42; Wed, 14 Jun 2023 02:58:31 +0000 Received: from PH0PR11MB5030.namprd11.prod.outlook.com ([fe80::f8ae:2ef7:e0e7:dca4]) by PH0PR11MB5030.namprd11.prod.outlook.com ([fe80::f8ae:2ef7:e0e7:dca4%4]) with mapi id 15.20.6477.028; Wed, 14 Jun 2023 02:58:31 +0000 From: "Wang, Fei W" To: "ffmpeg-devel@ffmpeg.org" Thread-Topic: [FFmpeg-devel] [PATCH v1 3/3] lavfi/{denoise, procamp, scale, sharpness}_vaapi: Add passthrough mode Thread-Index: AQHZko35bN4Kk55mcEexOsaykcjSk6+G2QoAgALZ/gA= Date: Wed, 14 Jun 2023 02:58:31 +0000 Message-ID: References: <20230530002950.1590409-1-fei.w.wang@intel.com> <20230530002950.1590409-3-fei.w.wang@intel.com> <31de0ca0022dc90f4ece7127cad1c3ec85a35c92.camel@intel.com> In-Reply-To: <31de0ca0022dc90f4ece7127cad1c3ec85a35c92.camel@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.36.5-0ubuntu1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR11MB5030:EE_|DM4PR11MB6381:EE_ x-ms-office365-filtering-correlation-id: 3e4ac0cc-3fbf-4fe9-a2c7-08db6c833cba x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AmGMJuHGIYLIsXxxYdg7LgzjGyTQYXAQL9ACcAiud21BhHigSUiztbwqhECS2T1kFBumzzEC6YEDaEy930dlb6XY9LlBjtc+Y5A7cbMxetV6YZ+qbsUZM40rcKy7Z06DtRsLyOVTce6vw9ApzskK5iGmHIJTt2DrGQrXMVDCCJIfzUM0CjoSzxBMGnat3C8Ud/7MwUJ/qbBOL0YFoUEVPfK4MdduBLl+y0/2VBnSqIICFUumwrVJuVmEKir83uM0Gp2Lm4lEN64yqaQ5Lpvy+iGKkpUCDfrhdhvETCtPZyMK1y688CeLBftuyRpN+40FljuOYaAX+eYIurkWAZ9CMqackqewNrlTbrfAsVBcFiKJs9O3Es6lv26Onp4IhxDuwJSyvA6WeFi59MK9ugdwwtGG49dd88Ty25CV7T2zMIahey45vgUOE0e63JPEDc1+GyBp9aFhoE9Ad7VOza/s79jD7KbWpQT4sVOUvYbFCBBVFCJ7T7S2t6XQ9wqV0fDloFoO8Vyv3YBR3C8E0vbHMzmU8s/zePfmIm7uEPQo2LtG//LSsOoKzHqft0xP1NjyKSd4Mhn9yO28Y9+VkpAbNGmEmHXDyzVpKSF8mlcU9Q0= 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:(13230028)(346002)(39860400002)(376002)(136003)(366004)(396003)(451199021)(966005)(478600001)(82960400001)(66556008)(91956017)(122000001)(66476007)(66446008)(8676002)(38100700002)(8936002)(6916009)(41300700001)(2616005)(316002)(64756008)(76116006)(66946007)(71200400001)(186003)(6486002)(26005)(6506007)(83380400001)(6512007)(86362001)(5660300002)(2906002)(38070700005)(36756003)(66899021); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?NXlyQ3BYL1R3NldGZGV4VnZJRjQzb1hISkVWZEw3SVJqZ2IvNlltZ0ZZOWlx?= =?utf-8?B?R2VsZ09MVURYdGFpQTlaUE1icEtTS09lUVpqemFVajN1MEtIYnVFQ3lGL2p0?= =?utf-8?B?MXh6TDU3MjlCNVAwZysxcHNsUUVuTVRXNEd1WEk2cHVUTTcyQTJVTjdWeWla?= =?utf-8?B?ZEFEbk92OG9SeDNSL0FCbllWbXZsUmxLb0txR25OYTI2WlJuMDJERFJTOFdT?= =?utf-8?B?OFBYODFyMUtxdjQyMTN0bVZ1YWVBYW9QV3BWUVFDMjR3Q3lRSHNDRnFwUXdz?= =?utf-8?B?MjZQV0kwb200L1VTYWdxWHFMRjJRWEV6TFR6cDBNR25jQW1rL2pvUUtYeEpM?= =?utf-8?B?dUxHTWtLOUhHcmNNMG5vZGF5UU02emo2YXJIcmZNUERRZFpwR01uSjYyL0Zw?= =?utf-8?B?Ui9UVXN6Z2t1bjdzZnlUNEt1NDZONE5rS2VBdlMyZUJUYlh3TEVCTHpUQVk1?= =?utf-8?B?TkZENWRLamhFdVErVUZ2dlVkL21kWll3OU5Wa3QyOWl2UWsxZk5hQ3ZoYU4y?= =?utf-8?B?V09KSzBjSmZuQ2RWZ3lLMVFHR0FCZGNSdGVyVE5wUHpTdUFrWlF0ajFSOWNI?= =?utf-8?B?RjdKWHA1NllMUnVSRUdIK0NrVXFxRTJLQVNLSjBDOVhjT2hxRVA0MHNZakVN?= =?utf-8?B?WjdoVnhkNVdPNUp4ZGVvR2x2dWpSdktiZmFJTE9VVEZZZ2k3V2JKU3hoMlM2?= =?utf-8?B?bWhSaXJ3bjRUQ3liVmV1Q2U2Qmt6ZWZLUUoydE9IeUFhbytuU2lwNFlDclcx?= =?utf-8?B?a3VUcjlCNC9EOVNYYjMzSUN0SXdKSEJTTU5ZRzBsNFhxblZRZzJqNkl5bUdR?= =?utf-8?B?d0lQOVBYa3B1RTBNZzNSRUhRbUNtenoyNDJsL3NFd3lPUmNmWFhZTUlBSmVv?= =?utf-8?B?Ny9Cdk1OYVdUNy9xRmVybUhqcFNTQjFwZExJQXB4SEdwUk5sV202MGtuSU1X?= =?utf-8?B?cGUyRCtSbWxLc1FrdTB5WnhVWWljd1pmUU01aW5uWVRCN1BXOGdEbSs2Rk10?= =?utf-8?B?bHIwSXRwcE5LaFNQTmMyVlpwbWtoZXBQSngyN0cwdTRLaC9NeWRSQm9MdlBM?= =?utf-8?B?MExjeUJtaXlWYjIwYlAwVU5qMjhldm4xSmxjby9xektzS3NyV1NLZnZsNnho?= =?utf-8?B?MkVWQ1Q5bGF4RTlxM1JuU0NDMXZOMjFKdlFhMHRYWTFLdmRKcytXa3l6Nm1P?= =?utf-8?B?N1h1MDA1bWdlT2kwclRnREFyYWlWY3BmVzJab1dnWWxMemFwcTMrMFFHUGhX?= =?utf-8?B?MVk1VmNrRnlEQ2dOaUh2VnV1NHVtOHR5Wk5LMHhHNHNTK2w3NW1xTTIveE1G?= =?utf-8?B?Z2ljaHp3WkducW54Y3N6OS9laEVmNEJaODFnSjUxS2svK2JFaWtYZ2kwSFg3?= =?utf-8?B?anloQk5BMm0yMmQ2MkE2elFQTjJ4K3d4ajF1WGpZQit5MExEdVhTT3libWNs?= =?utf-8?B?VTRteGgwdXBGRDhhNFNRaTBxbnJxTTdHUVoyMTNydDh4RGpUMjExWC91UTNm?= =?utf-8?B?b004RlNxMUduMXE3VHlhaUdqb2pPVS8xZktvdmZaeUE3ajZoZ0pXMDdiUFBZ?= =?utf-8?B?SElYUFJ6QWg5WmtlMWZpQlBabnkzK3pmMGVDR085eGllSDF0WnhzdlJRaFBJ?= =?utf-8?B?Y3dFSi9FQ0JHMGFUNGg4TDJnTldLV0FYbHpuUW1za3o3NUtXVUJUNXY4MVN5?= =?utf-8?B?Q2N5RlhoS0lOVllNbTN5Q3FNSC9aQTdXT2czT2ZVT0lGaUU2UUJEUGhCMlFx?= =?utf-8?B?cVo3S3RaeW95b24xeWxtTHp2TWtIMDI1WjhVVUExYzdDTGR5UlFML2kxa2dv?= =?utf-8?B?bnRsNHRTWW5OVm5oSDNQdUhUQXhXelNYcmQwSGhOdHNXTFNxbGc2NmtTMmU3?= =?utf-8?B?RjVkTGlyc3RQYlhuNmxtODE3bXNobVR3WkZmTFhHbXYvdXBZUjk1QjJuT0F1?= =?utf-8?B?YThSbEpSb08wSkh6aWwrV2RBS1N4ZHh0eXA3S1ZaWGlaeDY2L0cxU1A1M2tK?= =?utf-8?B?emtkS1hEOUZkb052TVNPSFY4MnBlaVF5UjRpWU14MmI0dnp1WXVZTFg4SEVm?= =?utf-8?B?QVFHRmFLRTRkb2ZBSmNRVlZsZDNsbktRTk85dUNEN0ZCZEdVTm9ONzlKRjhk?= =?utf-8?Q?CH8EiGD/MTxGTGpurMR/60TVz?= 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: 3e4ac0cc-3fbf-4fe9-a2c7-08db6c833cba X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jun 2023 02:58:31.8058 (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: hoJGN4M57/AKAx8n89zhTZs4zl8/fAunRBR614LT/+k7r5qeyIj6+r0UkS/gIDwbIsaNjscfCsnHeahLn+Jt2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6381 X-OriginatorOrg: intel.com Subject: Re: [FFmpeg-devel] [PATCH v1 3/3] lavfi/{denoise, procamp, scale, sharpness}_vaapi: Add passthrough mode 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, 2023-06-12 at 07:25 +0000, Xiang, Haihao wrote: > On Di, 2023-05-30 at 08:29 +0800, Fei Wang wrote: > > Signed-off-by: Fei Wang > > --- > > libavfilter/vaapi_vpp.c | 15 ++++++++++++--- > > libavfilter/vaapi_vpp.h | 2 ++ > > libavfilter/vf_misc_vaapi.c | 9 +++++++++ > > libavfilter/vf_procamp_vaapi.c | 10 ++++++++++ > > libavfilter/vf_scale_vaapi.c | 9 +++++++++ > > 5 files changed, 42 insertions(+), 3 deletions(-) > > > > diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c > > index 4de19564e9..cf2592e068 100644 > > --- a/libavfilter/vaapi_vpp.c > > +++ b/libavfilter/vaapi_vpp.c > > @@ -95,6 +95,7 @@ int ff_vaapi_vpp_config_input(AVFilterLink > > *inlink) > > int ff_vaapi_vpp_config_output(AVFilterLink *outlink) > > { > > AVFilterContext *avctx = outlink->src; > > + AVFilterLink *inlink = avctx->inputs[0]; > > VAAPIVPPContext *ctx = avctx->priv; > > AVVAAPIHWConfig *hwconfig = NULL; > > AVHWFramesConstraints *constraints = NULL; > > @@ -111,6 +112,17 @@ int ff_vaapi_vpp_config_output(AVFilterLink > > *outlink) > > if (!ctx->output_height) > > ctx->output_height = avctx->inputs[0]->h; > > > > + outlink->w = ctx->output_width; > > + outlink->h = ctx->output_height; > > + > > + if (ctx->passthrough) { > > + if (inlink->hw_frames_ctx) > > + outlink->hw_frames_ctx = av_buffer_ref(inlink- > > >hw_frames_ctx); > > + av_log(ctx, AV_LOG_VERBOSE, "Using VAAPI filter > > passthrough > > mode.\n"); > > + > > + return 0; > > + } > > + > > av_assert0(ctx->input_frames); > > ctx->device_ref = av_buffer_ref(ctx->input_frames- > > >device_ref); > > if (!ctx->device_ref) { > > @@ -214,9 +226,6 @@ int ff_vaapi_vpp_config_output(AVFilterLink > > *outlink) > > return AVERROR(EIO); > > } > > > > - outlink->w = ctx->output_width; > > - outlink->h = ctx->output_height; > > - > > if (ctx->build_filter_params) { > > err = ctx->build_filter_params(avctx); > > if (err < 0) > > diff --git a/libavfilter/vaapi_vpp.h b/libavfilter/vaapi_vpp.h > > index cc845b854c..6764ab0c39 100644 > > --- a/libavfilter/vaapi_vpp.h > > +++ b/libavfilter/vaapi_vpp.h > > @@ -56,6 +56,8 @@ typedef struct VAAPIVPPContext { > > VABufferID filter_buffers[VAProcFilterCount]; > > int nb_filter_buffers; > > > > + int passthrough; > > + > > int (*build_filter_params)(AVFilterContext *avctx); > > > > void (*pipeline_uninit)(AVFilterContext *avctx); > > diff --git a/libavfilter/vf_misc_vaapi.c > > b/libavfilter/vf_misc_vaapi.c > > index db3e69679a..0a4c174ab9 100644 > > --- a/libavfilter/vf_misc_vaapi.c > > +++ b/libavfilter/vf_misc_vaapi.c > > @@ -131,6 +131,9 @@ static int misc_vaapi_filter_frame(AVFilterLink > > *inlink, > > AVFrame *input_frame) > > av_get_pix_fmt_name(input_frame->format), > > input_frame->width, input_frame->height, input_frame- > > >pts); > > > > + if (vpp_ctx->passthrough) > > + return ff_filter_frame(outlink, input_frame); > > + > > if (vpp_ctx->va_context == VA_INVALID_ID) > > return AVERROR(EINVAL); > > > > @@ -176,11 +179,14 @@ fail: > > static av_cold int denoise_vaapi_init(AVFilterContext *avctx) > > { > > VAAPIVPPContext *vpp_ctx = avctx->priv; > > + DenoiseVAAPIContext *ctx = avctx->priv; > > > > ff_vaapi_vpp_ctx_init(avctx); > > vpp_ctx->pipeline_uninit = ff_vaapi_vpp_pipeline_uninit; > > vpp_ctx->build_filter_params = > > denoise_vaapi_build_filter_params; > > vpp_ctx->output_format = AV_PIX_FMT_NONE; > > + if (!ctx->denoise) > > + vpp_ctx->passthrough = 1; > > > > return 0; > > } > > @@ -188,11 +194,14 @@ static av_cold int > > denoise_vaapi_init(AVFilterContext > > *avctx) > > static av_cold int sharpness_vaapi_init(AVFilterContext *avctx) > > { > > VAAPIVPPContext *vpp_ctx = avctx->priv; > > + SharpnessVAAPIContext *ctx = avctx->priv; > > > > ff_vaapi_vpp_ctx_init(avctx); > > vpp_ctx->pipeline_uninit = ff_vaapi_vpp_pipeline_uninit; > > vpp_ctx->build_filter_params = > > sharpness_vaapi_build_filter_params; > > vpp_ctx->output_format = AV_PIX_FMT_NONE; > > + if (!ctx->sharpness) > > + vpp_ctx->passthrough = 1; > > > > return 0; > > } > > diff --git a/libavfilter/vf_procamp_vaapi.c > > b/libavfilter/vf_procamp_vaapi.c > > index 4a3b9d0766..82c446dc76 100644 > > --- a/libavfilter/vf_procamp_vaapi.c > > +++ b/libavfilter/vf_procamp_vaapi.c > > @@ -136,6 +136,9 @@ static int > > procamp_vaapi_filter_frame(AVFilterLink > > *inlink, AVFrame *input_frame > > av_get_pix_fmt_name(input_frame->format), > > input_frame->width, input_frame->height, input_frame- > > >pts); > > > > + if (vpp_ctx->passthrough) > > + return ff_filter_frame(outlink, input_frame); > > + > > if (vpp_ctx->va_context == VA_INVALID_ID) > > return AVERROR(EINVAL); > > > > @@ -179,11 +182,18 @@ fail: > > static av_cold int procamp_vaapi_init(AVFilterContext *avctx) > > { > > VAAPIVPPContext *vpp_ctx = avctx->priv; > > + ProcampVAAPIContext *ctx = avctx->priv; > > + float eps = 0.0001; > > Use a smaller eps, e.g. 1.0e-10f ? Will fix in V2. > > > > > ff_vaapi_vpp_ctx_init(avctx); > > vpp_ctx->pipeline_uninit = ff_vaapi_vpp_pipeline_uninit; > > vpp_ctx->build_filter_params = > > procamp_vaapi_build_filter_params; > > vpp_ctx->output_format = AV_PIX_FMT_NONE; > > + if (fabs(ctx->saturation - SATURATION_DEFAULT) < eps && > > + fabs(ctx->bright - BRIGHTNESS_DEFAULT) < eps && > > + fabs(ctx->contrast - CONTRAST_DEFAULT) < eps && > > + fabs(ctx->hue - HUE_DEFAULT) < eps) > > + vpp_ctx->passthrough = 1; > > > > return 0; > > } > > diff --git a/libavfilter/vf_scale_vaapi.c > > b/libavfilter/vf_scale_vaapi.c > > index a371077ee0..aa18891c56 100644 > > --- a/libavfilter/vf_scale_vaapi.c > > +++ b/libavfilter/vf_scale_vaapi.c > > @@ -85,6 +85,15 @@ static int > > scale_vaapi_config_output(AVFilterLink *outlink) > > ff_scale_adjust_dimensions(inlink, &vpp_ctx->output_width, > > &vpp_ctx- > > > output_height, > > ctx->force_original_aspect_ratio, > > ctx- > > > force_divisible_by); > > > > + if (inlink->w == outlink->w && inlink->h == outlink->w && > > 'inlink->h == outlink->w' should be typo of > 'inlink->h == outlink->h' > > BTW outlink->w and outlink-h are set in ff_vaapi_vpp_config_output, > here both > outlink->w and outlink->h are 0. Will fix in V2. > > > + vpp_ctx->input_frames->sw_format == vpp_ctx->output_format > > && > > + ctx->colour_primaries == AVCOL_PRI_UNSPECIFIED && > > + ctx->colour_transfer == AVCOL_TRC_UNSPECIFIED && > > + ctx->colour_matrix == AVCOL_SPC_UNSPECIFIED && > > + ctx->colour_range == AVCOL_RANGE_UNSPECIFIED && > > + ctx->chroma_location == AVCHROMA_LOC_UNSPECIFIED) > > + vpp_ctx->passthrough = 1; > > + > > May we enable passthrough when ctx->mode is not 0 ? The default of ctx->mode is HQ(512), scale vaapi filter should use passthrough mode if there is no option specificed. Thanks Fei > > Thanks > Haihao > > > err = ff_vaapi_vpp_config_output(outlink); > > if (err < 0) > > return err; > > _______________________________________________ > 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".