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 7D23846864 for ; Sat, 17 Feb 2024 19:53:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 99D6268D2E1; Sat, 17 Feb 2024 21:53:40 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 79D7668CDBE for ; Sat, 17 Feb 2024 21:53:33 +0200 (EET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id D571F1060229 for ; Sat, 17 Feb 2024 19:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1708199612; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=zn8sPcIYKX+3bJxxaT+mX1yjgfw4VjpivV/iv7oFOLM=; b=TfH9CjJRFcDQ/ch0uxZMIKsRPwVympF7jz7nbSsxr165II2nYK8SSyoGBXQEep57 6hJtz8g8zzZdDV6coOsk0IZ1UL9419MmP8ZzAoYUOe0RKsvhN5X8qouMgQyJKaOblhT IpnVMB0J+H66mWuNxwAOdAGfF9pzkW/JSqQ8UIEtFM438Y1k9avhNdQtz/yJPQrtMd5 yltw0+ZLNVN6kAqyTh9a865r9rMCn4jbI16Vttrwda+bmdMGMxI9vZGujwMsj1LqfQQ POStBZLa4wKWHbWM1y2Awyn4/vm09Dzhoax4/EOYBOMywhFqtdk0pe0EINLKrjZz/wk CJV6y06PTQ== Date: Sat, 17 Feb 2024 20:53:32 +0100 (CET) From: Lynne To: Ffmpeg Devel Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_302272_70250745.1708199612304" Subject: [FFmpeg-devel] [PATCH] lavu/tx: correctly use a default scale parameter for all transform types 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: ------=_Part_302272_70250745.1708199612304 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit This fixes the previous commit and adds more cases (DCT-I and DST-I). I am holding off on defining a scale parameter for FFTs as I'd like to use a complex value for them. Patch attached. ------=_Part_302272_70250745.1708199612304 Content-Type: text/x-diff; charset=us-ascii; name=0001-lavu-tx-correctly-use-a-default-scale-parameter-for-.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-lavu-tx-correctly-use-a-default-scale-parameter-for-.patch >From 5b58ac6995cd52c3d61d46f5d4eca42a686752b7 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sat, 17 Feb 2024 20:50:48 +0100 Subject: [PATCH] lavu/tx: correctly use a default scale parameter for all transform types This fixes the previous commit and adds more cases (DCT-I and DST-I). I am holding off on defining a scale parameter for FFTs as I'd like to use a complex value for them. --- libavutil/tx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavutil/tx.c b/libavutil/tx.c index cc360cff31..f991618b4b 100644 --- a/libavutil/tx.c +++ b/libavutil/tx.c @@ -914,10 +914,12 @@ av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, if (!(flags & AV_TX_INPLACE)) flags |= FF_TX_OUT_OF_PLACE; - if (!scale && ((type == AV_TX_FLOAT_MDCT) || (type == AV_TX_INT32_MDCT) || (type == AV_TX_FLOAT_RDFT) || (AV_TX_INT32_RDFT))) - scale = &default_scale_f; - else if (!scale && ((type == AV_TX_DOUBLE_MDCT) || (type == AV_TX_DOUBLE_RDFT))) + if (!scale && ((type == AV_TX_DOUBLE_MDCT) || (type == AV_TX_DOUBLE_DCT) || + (type == AV_TX_DOUBLE_DCT_I) || (type == AV_TX_DOUBLE_DST_I) || + (type == AV_TX_DOUBLE_RDFT))) scale = &default_scale_d; + else if (!scale && !TYPE_IS(FFT, type)) + scale = &default_scale_f; ret = ff_tx_init_subtx(&tmp, type, flags, NULL, len, inv, scale); if (ret < 0) -- 2.43.0.381.gb435a96ce8 ------=_Part_302272_70250745.1708199612304 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". ------=_Part_302272_70250745.1708199612304--