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 C580545E5E for ; Thu, 13 Apr 2023 12:59:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 130B468BC29; Thu, 13 Apr 2023 15:59:01 +0300 (EEST) Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 664026882C0 for ; Thu, 13 Apr 2023 15:58:54 +0300 (EEST) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-1842e278605so17740835fac.6 for ; Thu, 13 Apr 2023 05:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681390732; x=1683982732; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=dv1MTGppUZjF+MDHtHByVjstpVhKguti13W2Q/TEP50=; b=EpZAoAw5lwVimG74VoUUcTpkjkw4FIEHDNxVmzsc8hUG5k4h4467n36h4ZUzlP0HGh AbnIDxe8XxAp2wYzoTmyF6sBTU3CzSY4miQJwqOrUNVFONeErXCzbQmhKfWOvCRAyBCv Jqrl5cTMMDc9d9tRYbUzJygLj7dItmqud67UspFsQI8Z0KoilAM5+BrNWKwMYvlrYg// 4D78dMkL1bVDKgveBV4RzPa8yTpsxJdkkcNSn+5JDbQ3UMQ959QyanLtIgbQQ2vf1kYE MyNH8SS2sfoCifxi9uAQPz/G7JspVnFoJX02jFQNWyu8dFqJOQrCEPct8K3tBdWgq2iK ePaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681390732; x=1683982732; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dv1MTGppUZjF+MDHtHByVjstpVhKguti13W2Q/TEP50=; b=MxfpmFoqOFOGQF8NqNsdPPUU3Ks/FE23FJp5PyCtBlwQ791dKcwTDTfyvnGMN7O+jU K+3f0Jje/lmgNY07ndFwnBgb9ImvFQaO6LLQL7z5yxeM02ePsaLtrwky0zfYdyYONNTc tbXw8PFRe1B6SDxdgikrM6PPh8GUlcpemWLpxKwukXTkwPvNAuX8Rqubt/dmuJXUEJsM VM7yFwxyL+uPaoehUdgJW3A6xR9/IYdQ9dLfAPloGcs1/s3hovuNQFZxZdRvBPLkf6EH HhFoY+oxQ0q4PjCPG5NbZYlDqNDFyPp739PigITu8JOpADG1WVW2mMl6RS/wGa1/OeLZ ASpg== X-Gm-Message-State: AAQBX9eox+/+DIWlPW9F+hxH388dTUP9Dbs4cqv+NdHEk8vGN4jqxf+e UEhfSa1PD8SNs/l/cv1rh42j/SvON4I= X-Google-Smtp-Source: AKy350aA+w2MccCYQNHKkyydm0hLbfHkPG8ZV1BlgbeUYyzYBnzf84MYjBBDPU4Uo+28EmFqkPVf5Q== X-Received: by 2002:a05:6870:8307:b0:177:a4d0:e389 with SMTP id p7-20020a056870830700b00177a4d0e389mr1647141oae.28.1681390732354; Thu, 13 Apr 2023 05:58:52 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id p1-20020a4a8e81000000b00541854ce607sm544239ook.28.2023.04.13.05.58.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 05:58:51 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 Apr 2023 09:58:39 -0300 Message-Id: <20230413125839.3396-1-jamrial@gmail.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/aacpsy: clip global_quality within the psy_vbr_map array boundaries 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: Fixes ticket #10317. Signed-off-by: James Almer --- libavcodec/aacpsy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c index 4c5ab2c9d5..933369e445 100644 --- a/libavcodec/aacpsy.c +++ b/libavcodec/aacpsy.c @@ -267,7 +267,7 @@ static av_cold void lame_window_init(AacPsyContext *ctx, AVCodecContext *avctx) AacPsyChannel *pch = &ctx->ch[i]; if (avctx->flags & AV_CODEC_FLAG_QSCALE) - pch->attack_threshold = psy_vbr_map[avctx->global_quality / FF_QP2LAMBDA].st_lrm; + pch->attack_threshold = psy_vbr_map[av_clip(avctx->global_quality / FF_QP2LAMBDA, 0, 10)].st_lrm; else pch->attack_threshold = lame_calc_attack_threshold(avctx->bit_rate / avctx->ch_layout.nb_channels / 1000); -- 2.40.0 _______________________________________________ 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".