Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] aacpsy: fix whitespace and code style (PR #20834)
@ 2025-11-04 10:43 Lynne via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: Lynne via ffmpeg-devel @ 2025-11-04 10:43 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Lynne

PR #20834 opened by Lynne
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20834
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20834.patch

The last merged PR (#20815) contained garbage.


>From fe6cdacc50a33bdbe18bdc6165b84e409cb2e680 Mon Sep 17 00:00:00 2001
From: Lynne <dev@lynne.ee>
Date: Tue, 4 Nov 2025 11:38:56 +0100
Subject: [PATCH] aacpsy: fix whitespace and code style

The last merged patch contained garbage.
---
 libavcodec/aacpsy.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index fb6ff75795..299a0a9f0a 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -913,6 +913,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
                 p = FFMAX(p, fabsf(*pf));
             pch->prev_energy_subshort[i] = energy_subshort[i + PSY_LAME_NUM_SUBBLOCKS] = p;
             energy_short[1 + i / PSY_LAME_NUM_SUBBLOCKS] += p;
+
             /* NOTE: The indexes below are [i + 3 - 2] in the LAME source. Compare each sub-block to sub-block - 2 */
             if (p > energy_subshort[i + PSY_LAME_NUM_SUBBLOCKS - 2])
                 p = p / energy_subshort[i + PSY_LAME_NUM_SUBBLOCKS - 2];
@@ -920,6 +921,7 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
                 p = energy_subshort[i + PSY_LAME_NUM_SUBBLOCKS - 2] / (p * 10.0f);
             else
                 p = 0.0;
+
             attack_intensity[i + PSY_LAME_NUM_SUBBLOCKS] = p;
         }
 
@@ -946,18 +948,18 @@ static FFPsyWindowInfo psy_lame_window(FFPsyContext *ctx, const float *audio,
             }
             att_sum += attacks[i];
         }
-		if (pch->next_attack0_zero)
+
+        if (pch->next_attack0_zero)
             attacks[0] = 0;
-		if (attacks[AAC_NUM_BLOCKS_SHORT] == 0)
-            pch->next_attack0_zero = 1;
-        else
-			pch->next_attack0_zero = 0;
+        pch->next_attack0_zero = !attacks[AAC_NUM_BLOCKS_SHORT];
 
         if (attacks[0] <= pch->prev_attack)
             attacks[0] = 0;
 
         att_sum += attacks[0];
-		/* If the previous attack happened in the last sub-block of the previous sequence, or if there's a new attack, use short window */
+
+        /* If the previous attack happened in the last sub-block of the previous sequence,
+         * or if there's a new attack, use short window */
         if (pch->prev_attack == PSY_LAME_NUM_SUBBLOCKS || att_sum) {
             uselongblock = 0;
 
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-04 10:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-04 10:43 [FFmpeg-devel] [PATCH] aacpsy: fix whitespace and code style (PR #20834) Lynne via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git