Subject: Re: Ideas on the audio framework
To: None <tech-kern@NetBSD.org>
From: TAMURA Kent <kent@NetBSD.org>
List: tech-kern
Date: 01/05/2005 14:40:48
--pgp-sign-Multipart_Wed_Jan__5_14:40:45_2005-1
Content-Type: text/plain; charset=US-ASCII


In message "Re: Ideas on the audio framework"
    on 04/12/11, TAMURA Kent <kent@NetBSD.org> writes:
> > > i have one concern about removing the current 6 mulaw functions
> > > and replacing them wih almost certainly slower sequences of
> > > functions?  the platforms that matter are likely those that
> > > will never need anything but these (eg, sparc.)
> > 
> > Now that you mention it, me too. I'd like to see a benchmark on a slow
> > machine at a high sample rate.
> 
> Ok, I'll show a benchmark result. (or a benchmark program?)

I have decided not to decompose mulaw/alaw functions.

In the filter pipeline framework, filter implementations become
more complex code than the current sw_code implementations.  So,
I was afraid many mulaw/alaw functions brought big increase in
the kernel size.  That was one of the reasons why I wanted to
decompose and reduce the number of functions.

I have reduced the number of functions by another approach.  A
filter implementation can know source/destination audio formats,
and I have unified similar conversions to one filter
implementation.

sw_code impls		Unified to a filter
----------------------- --------------------
mulaw_to_slinear16_be	mulaw_to_linear16
mulaw_to_slinear16_le
mulaw_to_ulinear16_be
mulaw_to_ulinear16_le

mulaw_to_slinear8	mulaw_to_linear8
mulaw_to_ulinear8

slinear16_to_mulaw_be	linear16_to_mulaw
slinear16_to_mulaw_le
ulinear16_to_mulaw_be
ulinear16_to_mulaw_le

slinear8_to_mulaw	linear8_to_mulaw
ulinear8_to_mulaw

alaw_to_slinear16_be	alaw_to_linear16
alaw_to_slinear16_le
alaw_to_ulinear16_be
alaw_to_ulinear16_le

alaw_to_slinear8	alaw_to_linear8
alaw_to_ulinear8

slinear16_to_alaw_be	linear16_to_alaw
slinear16_to_alaw_le
ulinear16_to_alaw_be
ulinear16_to_alaw_le

slinear8_to_alaw	linear8_to_alaw
ulinear8_to_alaw

change_sign8		change_sign8

change_sign16_le	change_sign16
change_sign16_be

swap_bytes		swap_bytes

swap_bytes_change_sign16_le swap_bytes_change_sign16
swap_bytes_change_sign16_be
change_sign16_swap_bytes_le
change_sign16_swap_bytes_be

linear16_to_linear8_le	linear16_to_linear8
linear16_to_linear8_be
slinear16_to_ulinear8_le
slinear16_to_ulinear8_be

linear8_to_linear16_le	linear8_to_linear16
linear8_to_linear16_be
ulinear8_to_slinear16_le
ulinear8_to_slinear16_be

-- 
TAMURA Kent <kent_2005 at hauN.org> <kent at NetBSD.org>

--pgp-sign-Multipart_Wed_Jan__5_14:40:45_2005-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iQEVAwUAQdt94H7t9398iwLqAQLstwgApg2NL/9cXk2Fkuqr63q5VXvE/3OKQwzW
tu/etBi9YKhcb3kHTx6DmQ9Wcnbf5Jio14DzWv93ZE5uKezb34k97zjvlakOdFjM
yKgzuGbWIo59cyKE85PwhBRbKkXhzUA5aLH9XUMBu5FafpT4ONh7HH5yjpUdzoaX
yf/WS67XAl61rmMUO1CWOlCzhjESulwxzHyhI+ngqU4dI0Lm/Hi4/mS2oNgZEofj
lTbb4IrRUfWePBkMMSmPqLVLL8B3pTQUxQAO3xw0DkL9Fhoh7+WpRvWrrEVXmcns
XnE6y6gXm3tBZBl5Urqg1yrZE2M7B0+PCsEEoZXuZsPzAmf6YkEDlw==
=BXMU
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Wed_Jan__5_14:40:45_2005-1--