[codec] Multi-mode running code

"Benjamin M. Schwartz" <bmschwar@fas.harvard.edu> Fri, 05 August 2011 01:13 UTC

Return-Path: <bmschwar@fas.harvard.edu>
X-Original-To: codec@ietfa.amsl.com
Delivered-To: codec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B3FB321F85CA for <codec@ietfa.amsl.com>; Thu, 4 Aug 2011 18:13:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CJz2u8roXU0N for <codec@ietfa.amsl.com>; Thu, 4 Aug 2011 18:13:44 -0700 (PDT)
Received: from us25.unix.fas.harvard.edu (us25.unix.fas.harvard.edu [140.247.35.201]) by ietfa.amsl.com (Postfix) with ESMTP id F182421F859E for <codec@ietf.org>; Thu, 4 Aug 2011 18:13:43 -0700 (PDT)
Received: from us25.unix.fas.harvard.edu (localhost.localdomain [127.0.0.1]) by us25.unix.fas.harvard.edu (Postfix) with ESMTP id 6DAC11D7502 for <codec@ietf.org>; Thu, 4 Aug 2011 21:13:51 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fas.harvard.edu; h= message-id:date:from:reply-to:mime-version:to:subject :content-type; s=mail; bh=gi0vYNXnWlympwHgsr5GctdeCytJy5uHcM7OKk THf0U=; b=Nu1bw+OrkS7qE89SWEnwZ/Ty4QGknG7Z0PW9HSPtOKAKqUHuSIjWi4 WcKttBbpPlJMNQ1dhvoIXrj+wxfzVumReiAFIxGR4pkFAzjg5b8O2sU+7uS9lJqm KA29QAPvgIs1NtqBlNex20XtNp4tzH+fxltDkdvJL8ykVgRRMOqiY=
DomainKey-Signature: a=rsa-sha1; c=simple; d=fas.harvard.edu; h= message-id:date:from:reply-to:mime-version:to:subject :content-type; q=dns; s=mail; b=sbHycWNxZULy+EsvwlxGh6w+HJwtixV+ XClh5qsonkdOwdDEvWxeuFORgJWW7ZEgwxhb6DpQJm5UASqsGk8lElY7VQpWmvvf VBMEtbisZ7azpiO+mDQGjkiRU5WNzJ+clZd7M7egxBh9f4DppYvLrLujA9KS7xGc NFl4I+xtsSE=
Received: from [192.168.0.151] (c-24-128-191-140.hsd1.ma.comcast.net [24.128.191.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: bmschwar@fas) by us25.unix.fas.harvard.edu (Postfix) with ESMTPSA id 6585A1D7446 for <codec@ietf.org>; Thu, 4 Aug 2011 21:13:51 -0400 (EDT)
Message-ID: <4E3B43CB.5090104@fas.harvard.edu>
Date: Thu, 04 Aug 2011 21:13:47 -0400
From: "Benjamin M. Schwartz" <bmschwar@fas.harvard.edu>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11
MIME-Version: 1.0
To: "codec@ietf.org" <codec@ietf.org>
X-Enigmail-Version: 1.1.2
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="------------enigA31F0D1A1809B6D888BBCCF0"
Subject: [codec] Multi-mode running code
X-BeenThere: codec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: bens@alum.mit.edu
List-Id: Codec WG <codec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/codec>, <mailto:codec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/codec>
List-Post: <mailto:codec@ietf.org>
List-Help: <mailto:codec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/codec>, <mailto:codec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Aug 2011 01:13:44 -0000

Following the design previously documented, I have written a patch that
implements packetization of frames with different modes.

There are two parts.  The first [1] implements decoding of packets as
described previously.  I decided to use MC byte 49 instead of 177, as 49
is the lowest reserved value.  I think the code complexity is acceptable.

The second part [2] is a very basic repacketizer that I used for testing
the decode functionality.  This repacketizer only produces multimode
packets, which greatly simplifies the code because it does not need to
consider the mode of incoming packets.  (A more efficient repacketizer
would only use multimode when necessary.)

--Ben

[1]
https://github.com/bemasc/opus-multimode/commit/3e32a69b63d96bca6d14531a146dc006da9de8d0

[2]
https://github.com/bemasc/opus-multimode/commit/d47b8e0569c52da05287a2e3eb8cf73082d47007