ref: fbaabc13f0111296a64e565f7b8779b7f67602ca
parent: 8ba2a779eafd7996810ce9a8e8d75f05ecddd78a
author: Jean-Marc Valin <[email protected]>
date: Mon Jul 5 11:47:04 EDT 2010
IETF draft update, minor bugfix to the encoder
--- a/Makefile
+++ b/Makefile
@@ -5,5 +5,5 @@
(cd celt; make)
silk:
- (cd celt; silk)
+ (cd silk; make)
--- a/doc/draft-valin-codec-prototype.xml
+++ b/doc/draft-valin-codec-prototype.xml
@@ -18,20 +18,22 @@
<code></code>
<country>Canada</country>
</postal>
+<phone>+1 514 383-8858</phone>
<email>[email protected]</email>
</address>
</author>
<author initials="K." surname="Vos" fullname="Koen Vos">
-<organization>Skype</organization>
+<organization>Skype Technologies S.A.</organization>
<address>
<postal>
-<street></street>
-<city></city>
+<street>Stadsgaarden 6</street>
+<city>Stockholm</city>
<region></region>
-<code></code>
-<country></country>
+<code>11645</code>
+<country>SE</country>
</postal>
+<phone>+46 855 921 989</phone>
<email>[email protected]</email>
</address>
</author>
@@ -78,6 +80,31 @@
<t>This is a work in progress.</t>
</section>
+<section anchor="hybrid" title="Hybrid Codec">
+
+<t>
+In hybrid mode, each frame is coded first by the LP layer and then by the MDCT
+layer. In the current prototype, the cutoff frequency is 8 kHz. In the MDCT
+layer, all bands below 8 kHz are discarded, such that there is no coding
+redundancy between the two layers. Also both layers use the same instance of
+the range coder to encode the signal, which ensures that no "padding bits" are
+wasted.
+</t>
+
+<section title="Source Code">
+<t>
+The source code is currently available in a
+<eref target='git://git.xiph.org/users/jm/ietfcodec.git'>Git repository</eref>
+which references two other
+repositories (for SILK and CELT). Although the build system is very primitive
+(and inconsistent), some instructions are provided in the toplevel README file.
+This is very early development so both the quality and feature set should
+greatly improve over time.
+</t>
+</section>
+
+</section>
+
<section anchor="modes" title="Codec Modes">
<t>
There are three possible operating modes for the proposed prototype:
@@ -217,13 +244,6 @@
</t>
</section>
-<section anchor="coding-frames" title="Coding of Frames">
-
-<t>
-In hybrid mode, each frame is coded first by the LP layer and then by the MDCT layer -- which discards the frequency components already encoded. Both use the same instance of the range coder to encode the signal.
-</t>
-
-</section>
</section>
--- a/src/hybrid_decoder.c
+++ b/src/hybrid_decoder.c
@@ -1,5 +1,5 @@
-/* Copyright (c) 2010 Xiph.Org Foundation
- Written by Jean-Marc Valin */
+/* Copyright (c) 2010 Xiph.Org Foundation, Skype Limited
+ Written by Jean-Marc Valin and Koen Vos */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
--- a/src/hybrid_encoder.c
+++ b/src/hybrid_encoder.c
@@ -1,5 +1,5 @@
-/* Copyright (c) 2010 Xiph.Org Foundation
- Written by Jean-Marc Valin */
+/* Copyright (c) 2010 Xiph.Org Foundation, Skype Limited
+ Written by Jean-Marc Valin and Koen Vos */
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@@ -34,6 +34,7 @@
#endif
#include <stdlib.h>
+#include <stdio.h>
#include "hybrid_encoder.h"
#include "celt/libcelt/entenc.h"
#include "celt/libcelt/modes.h"
@@ -92,8 +93,10 @@
st->encControl.bitRate = 30000;
/* Call SILK encoder for the low band */
+ nBytes = bytes_per_packet;
silk_ret = SKP_Silk_SDK_Encode( st->silk_enc, &st->encControl, pcm, 960, &enc, &nBytes );
if( silk_ret ) {
+ fprintf (stderr, "SILK encode error\n");
/* Handle error */
}
@@ -101,6 +104,7 @@
celt_encoder_ctl(st->celt_enc, CELT_SET_START_BAND(13));
/* Encode high band with CELT */
+ /* FIXME: Do some delay compensation here */
celt_ret = celt_encode_with_ec(st->celt_enc, pcm, NULL, frame_size, data, bytes_per_packet, &enc);
return celt_ret;