Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2227376/?format=api
{ "id": 2227376, "url": "http://patchwork.ozlabs.org/api/patches/2227376/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260423-audio-v1-2-e1d6b65c76f9@rsg.ci.i.u-tokyo.ac.jp/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260423-audio-v1-2-e1d6b65c76f9@rsg.ci.i.u-tokyo.ac.jp>", "list_archive_url": null, "date": "2026-04-23T13:55:22", "name": "[2/3] audio: Clamp unsigned sample conversion", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "15074db73ee4a92b78dc38237c210c47710588e8", "submitter": { "id": 90980, "url": "http://patchwork.ozlabs.org/api/people/90980/?format=api", "name": "Akihiko Odaki", "email": "odaki@rsg.ci.i.u-tokyo.ac.jp" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260423-audio-v1-2-e1d6b65c76f9@rsg.ci.i.u-tokyo.ac.jp/mbox/", "series": [ { "id": 501200, "url": "http://patchwork.ozlabs.org/api/series/501200/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501200", "date": "2026-04-23T13:55:20", "name": "audio: Fix unsigned PCM conversion edge cases", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501200/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2227376/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2227376/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"key not found in DNS\" header.d=rsg.ci.i.u-tokyo.ac.jp\n header.i=@rsg.ci.i.u-tokyo.ac.jp header.a=rsa-sha256 header.s=rs20250326\n header.b=GclSL170;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1d2R0Y51z1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 23:57:33 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wFuXu-0005c7-Hw; Thu, 23 Apr 2026 09:56:47 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <odaki@rsg.ci.i.u-tokyo.ac.jp>)\n id 1wFuX6-0005Wf-EH\n for qemu-devel@nongnu.org; Thu, 23 Apr 2026 09:56:06 -0400", "from www3579.sakura.ne.jp ([49.212.243.89])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <odaki@rsg.ci.i.u-tokyo.ac.jp>)\n id 1wFuWu-0000cN-IL\n for qemu-devel@nongnu.org; Thu, 23 Apr 2026 09:55:49 -0400", "from h205.csg.ci.i.u-tokyo.ac.jp (h205.csg.ci.i.u-tokyo.ac.jp\n [133.11.54.205]) (authenticated bits=0)\n by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 63NDtV0N080520\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);\n Thu, 23 Apr 2026 22:55:32 +0900 (JST)\n (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp)" ], "DKIM-Signature": "a=rsa-sha256; bh=NJ8Xrq7/Gr7dXbQuNBgr3d2k02Fayw0AHQFCtvpC830=;\n c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp;\n h=From:Message-Id:To:Subject:Date;\n s=rs20250326; t=1776952532; v=1;\n b=GclSL17061g855ue3rXOR6amc/B3nq3XfO9xZ8kr6JMX9tCpn0TXWlow0rLDnssP\n 8EyP/Ss2FR3jRoPKHTyXasb2+VOsp0yRVm+Rda3pzX9EVdMRbXfv5c25OCX0ryml\n 0k6A+Q85CsKD7HGr/hUXGpyKX9XU/X/4XMi9ln/4ZUtQylNxetA2OsL7ePyF6V/Q\n 5oHPiWRak/N5SPvMoHxcKY1L3fGGPrJAXE2oSyYtNxB7BTrDexqs01fU+oHQAGeT\n nM6GcVUW/ph4ehtbUFaA1JPJ7YxX0GcxA6R6H2qJUIHCidOkZDq10NQjEzbDNzk1\n AAuGnMvdyYfdXsjV0mcv0g==", "From": "Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>", "Date": "Thu, 23 Apr 2026 22:55:22 +0900", "Subject": "[PATCH 2/3] audio: Clamp unsigned sample conversion", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260423-audio-v1-2-e1d6b65c76f9@rsg.ci.i.u-tokyo.ac.jp>", "References": "<20260423-audio-v1-0-e1d6b65c76f9@rsg.ci.i.u-tokyo.ac.jp>", "In-Reply-To": "<20260423-audio-v1-0-e1d6b65c76f9@rsg.ci.i.u-tokyo.ac.jp>", "To": "qemu-devel@nongnu.org", "Cc": "Gerd Hoffmann <kraxel@redhat.com>,\n =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>", "X-Mailer": "b4 0.16-dev-16047", "Received-SPF": "pass client-ip=49.212.243.89;\n envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp", "X-Spam_score_int": "-16", "X-Spam_score": "-1.7", "X-Spam_bar": "-", "X-Spam_report": "(-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,\n DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=no autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "clip_*_uint32_t() returns 0 when v == 1.f because it computes the result\nas (IN_T)((v * ((mixeng_real)IN_MAX / 2.f)) + HALF):\n\n- (v * ((mixeng_real)IN_MAX / 2.f)) + HALF == 0x100000000.f, which does\n not fit in uint32_t.\n- (v * ((mixeng_real)IN_MAX / 2.f)) == 0x80000000.f\n- ((mixeng_real)IN_MAX / 2.f) == 0x80000000.f\n- (mixeng_real)IN_MAX == 0x100000000.f because 0xffffffff cannot be\n represented exactly in float.\n- HALF == 0x7fffffff, which is implicitly converted to 0x80000000.f.\n\nClamp the result to avoid the overflow.\n\nSigned-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>\n---\n audio/mixeng_template.h | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)", "diff": "diff --git a/audio/mixeng_template.h b/audio/mixeng_template.h\nindex 881653c44bfb..5b0014bdd9af 100644\n--- a/audio/mixeng_template.h\n+++ b/audio/mixeng_template.h\n@@ -65,7 +65,9 @@ static inline IN_T glue (clip_, ET) (mixeng_real v)\n #ifdef SIGNED\n return ENDIAN_CONVERT((IN_T)(v * (((mixeng_real)IN_MAX - IN_MIN) / 2.f)));\n #else\n- return ENDIAN_CONVERT((IN_T)((v * ((mixeng_real)IN_MAX / 2.f)) + HALF));\n+ return ENDIAN_CONVERT(MIN((int64_t)((v * ((mixeng_real)IN_MAX / 2.f)) +\n+ HALF),\n+ IN_MAX));\n #endif\n }\n \n", "prefixes": [ "2/3" ] }