Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Rectify an error in mulaw/alaw conversion to big end...
details: https://anonhg.NetBSD.org/src/rev/834d528700d3
branches: trunk
changeset: 354710:834d528700d3
user: nat <nat%NetBSD.org@localhost>
date: Mon Jun 26 11:45:46 2017 +0000
description:
Rectify an error in mulaw/alaw conversion to big endian. The atf audio
test should pass on sparc again.
diffstat:
sys/dev/mulaw.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r b7dbf8ebfff7 -r 834d528700d3 sys/dev/mulaw.c
--- a/sys/dev/mulaw.c Mon Jun 26 08:01:53 2017 +0000
+++ b/sys/dev/mulaw.c Mon Jun 26 11:45:46 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mulaw.c,v 1.30 2017/06/25 02:16:41 nat Exp $ */
+/* $NetBSD: mulaw.c,v 1.31 2017/06/26 11:45:46 nat Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.30 2017/06/25 02:16:41 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mulaw.c,v 1.31 2017/06/26 11:45:46 nat Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -324,7 +324,7 @@
j = hw - 2; \
d[0] = mulawtolin16[s[0]][0]; \
d[1] = mulawtolin16[s[0]][1]; \
- while (j < hw) \
+ while (j > 0 && j < hw) \
d[j++] = 0; \
} FILTER_LOOP_EPILOGUE(this->src, dst); \
break; \
@@ -342,7 +342,7 @@
j = hw - 2; \
d[0] = mulawtolin16[s[0]][0] ^ 0x80; \
d[1] = mulawtolin16[s[0]][1]; \
- while (j < hw) \
+ while (j > 0 && j < hw) \
d[j++] = 0; \
} FILTER_LOOP_EPILOGUE(this->src, dst); \
break; \
@@ -459,7 +459,7 @@
j = hw - 2; \
d[0] = alawtolin16[s[0]][0]; \
d[1] = alawtolin16[s[0]][1]; \
- while (j < hw) \
+ while (j > 0 && j < hw) \
d[j++] = 0; \
} FILTER_LOOP_EPILOGUE(this->src, dst); \
break; \
@@ -477,7 +477,7 @@
j = hw - 2; \
d[0] = alawtolin16[s[0]][0] ^ 0x80; \
d[1] = alawtolin16[s[0]][1]; \
- while (j < hw) \
+ while (j > 0 && j < hw) \
d[j++] = 0; \
} FILTER_LOOP_EPILOGUE(this->src, dst); \
break; \
Home |
Main Index |
Thread Index |
Old Index