Skip to content
Snippets Groups Projects
Commit fbaabc13 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

IETF draft update, minor bugfix to the encoder

parent 8ba2a779
No related branches found
No related tags found
No related merge requests found
......@@ -5,5 +5,5 @@ celt:
(cd celt; make)
silk:
(cd celt; silk)
(cd silk; make)
......@@ -18,20 +18,22 @@
<code></code>
<country>Canada</country>
</postal>
<phone>+1 514 383-8858</phone>
<email>jean-marc.valin@octasic.com</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>koen.vos@skype.net</email>
</address>
</author>
......@@ -78,6 +80,31 @@ not prevent inclusion of code from other codecs as well.
<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 @@ Three frames of different *durations*:
</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>
......
/* 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
......
/* 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 @@ int hybrid_encode(HybridEncoder *st, const short *pcm, int frame_size,
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 @@ int hybrid_encode(HybridEncoder *st, const short *pcm, int frame_size,
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment