Hello community,
here is the log from the commit of package celt for openSUSE:Factory checked in at 2015-06-24 20:35:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/celt (Old)
and /work/SRC/openSUSE:Factory/.celt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "celt"
Changes:
--------
--- /work/SRC/openSUSE:Factory/celt/celt.changes 2012-09-21 14:34:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.celt.new/celt.changes 2015-06-24 20:35:46.000000000 +0200
@@ -1,0 +2,8 @@
+Tue Jun 16 11:30:04 UTC 2015 - mpluskal@suse.com
+
+- Update to 0.11.3
+ * no upstream changelog provided
+- Cleanup spec file with spec-cleaner
+- Update baselibs.conf
+
+-------------------------------------------------------------------
Old:
----
celt-0.11.1.tar.gz
New:
----
celt-0.11.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ celt.spec ++++++
--- /var/tmp/diff_new_pack.l6I7ox/_old 2015-06-24 20:35:47.000000000 +0200
+++ /var/tmp/diff_new_pack.l6I7ox/_new 2015-06-24 20:35:47.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package celt
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,18 +16,18 @@
#
-
Name: celt
-Version: 0.11.1
-Release: 1
+Version: 0.11.3
+Release: 0
+Summary: Ultra-Low Delay Audio Codec
License: BSD-2-Clause
Group: Productivity/Multimedia/Other
-Summary: Ultra-Low Delay Audio Codec
Url: http://www.celt-codec.org/
Source: http://downloads.xiph.org/releases/celt/%{name}-%{version}.tar.gz
Source1: baselibs.conf
-BuildRequires: libogg-devel pkg-config
+BuildRequires: libogg-devel
BuildRequires: libtool
+BuildRequires: pkg-config
Requires: libcelt0-2 = %{version}-%{release}
# Patch configure.ac to remove the "0" suffix from libcelt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -37,17 +37,18 @@
speech and audio communication.
%package -n libcelt-devel
-License: BSD-2-Clause
Summary: Ultra-Low Delay Audio Codec
Group: Development/Libraries/C and C++
-Requires: celt = %{version}-%{release} libcelt0-2 = %{version}-%{release} glibc-devel pkg-config
+Requires: celt = %{version}-%{release}
+Requires: glibc-devel
+Requires: libcelt0-2 = %{version}-%{release}
+Requires: pkg-config
%description -n libcelt-devel
The CELT codec is an experimental audio codec for use in low-delay
speech and audio communication.
%package -n libcelt0-2
-License: BSD-2-Clause
Summary: Ultra-Low Delay Audio Codec
Group: System/Libraries
@@ -59,15 +60,15 @@
%setup -q
%build
-autoreconf -f -i
+autoreconf -fiv
%configure\
--disable-static\
--with-pic
make %{?_smp_mflags}
%install
-make DESTDIR=%buildroot install
-rm -f %{buildroot}%{_libdir}/*.la
+make DESTDIR=%{buildroot} install %{?_smp_mflags}
+find %{buildroot} -type f -name "*.la" -delete -print
%post -n libcelt0-2 -p /sbin/ldconfig
++++++ baselibs.conf ++++++
--- /var/tmp/diff_new_pack.l6I7ox/_old 2015-06-24 20:35:47.000000000 +0200
+++ /var/tmp/diff_new_pack.l6I7ox/_new 2015-06-24 20:35:47.000000000 +0200
@@ -1,4 +1,4 @@
libcelt0-2
-celt-devel
+libcelt-devel
requires -celt-<targettype>
requires "libcelt0-2-<targettype> = <version>"
++++++ celt-0.11.1.tar.gz -> celt-0.11.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/Doxyfile new/celt-0.11.3/Doxyfile
--- old/celt-0.11.1/Doxyfile 2011-02-15 05:57:24.000000000 +0100
+++ new/celt-0.11.3/Doxyfile 2011-03-14 23:04:40.000000000 +0100
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = CELT
-PROJECT_NUMBER = 0.11.1
+PROJECT_NUMBER = 0.11.3
OUTPUT_DIRECTORY = doc/API
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/Doxyfile.devel new/celt-0.11.3/Doxyfile.devel
--- old/celt-0.11.1/Doxyfile.devel 2011-02-15 05:57:27.000000000 +0100
+++ new/celt-0.11.3/Doxyfile.devel 2011-03-14 23:04:47.000000000 +0100
@@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = CELT
-PROJECT_NUMBER = 0.11.1
+PROJECT_NUMBER = 0.11.3
OUTPUT_DIRECTORY = doc/devel
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/configure new/celt-0.11.3/configure
--- old/celt-0.11.1/configure 2011-02-15 06:15:57.000000000 +0100
+++ new/celt-0.11.3/configure 2011-03-14 23:05:13.000000000 +0100
@@ -2513,7 +2513,7 @@
CELT_MAJOR_VERSION=0
CELT_MINOR_VERSION=11
-CELT_MICRO_VERSION=1
+CELT_MICRO_VERSION=3
CELT_EXTRA_VERSION=
CELT_VERSION=$CELT_MAJOR_VERSION.$CELT_MINOR_VERSION.$CELT_MICRO_VERSION$CELT_EXTRA_VERSION
LIBCELT_SUFFIX=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/configure.ac new/celt-0.11.3/configure.ac
--- old/celt-0.11.1/configure.ac 2011-02-15 05:57:11.000000000 +0100
+++ new/celt-0.11.3/configure.ac 2011-03-14 23:04:17.000000000 +0100
@@ -6,7 +6,7 @@
CELT_MAJOR_VERSION=0
CELT_MINOR_VERSION=11
-CELT_MICRO_VERSION=1
+CELT_MICRO_VERSION=3
CELT_EXTRA_VERSION=
CELT_VERSION=$CELT_MAJOR_VERSION.$CELT_MINOR_VERSION.$CELT_MICRO_VERSION$CELT_EXTRA_VERSION
LIBCELT_SUFFIX=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/bands.c new/celt-0.11.3/libcelt/bands.c
--- old/celt-0.11.1/libcelt/bands.c 2011-02-15 03:10:37.000000000 +0100
+++ new/celt-0.11.3/libcelt/bands.c 2011-03-04 16:29:37.000000000 +0100
@@ -1161,7 +1161,7 @@
void quant_all_bands(int encode, const CELTMode *m, int start, int end,
celt_norm *_X, celt_norm *_Y, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses,
int shortBlocks, int spread, int dual_stereo, int intensity, int *tf_res, int resynth,
- celt_int32 total_bits, celt_int32 balance, ec_ctx *ec, int LM, int codedBands, ec_uint32 *seed)
+ celt_int32 total_bits, celt_int32 balance, ec_ctx *ec, int LM, int codedBands, celt_uint32 *seed)
{
int i;
celt_int32 remaining_bits;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/bands.h new/celt-0.11.3/libcelt/bands.h
--- old/celt-0.11.1/libcelt/bands.h 2011-02-10 02:33:09.000000000 +0100
+++ new/celt-0.11.3/libcelt/bands.h 2011-03-04 16:29:37.000000000 +0100
@@ -84,7 +84,7 @@
void quant_all_bands(int encode, const CELTMode *m, int start, int end,
celt_norm * X, celt_norm * Y, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses,
int time_domain, int fold, int dual_stereo, int intensity, int *tf_res, int resynth,
- celt_int32 total_bits, celt_int32 balance, ec_ctx *ec, int M, int codedBands, ec_uint32 *seed);
+ celt_int32 total_bits, celt_int32 balance, ec_ctx *ec, int M, int codedBands, celt_uint32 *seed);
void stereo_decision(const CELTMode *m, celt_norm * restrict X, int *stereo_mode, int len, int M);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/celt.c new/celt-0.11.3/libcelt/celt.c
--- old/celt-0.11.1/libcelt/celt.c 2011-02-12 06:37:30.000000000 +0100
+++ new/celt-0.11.3/libcelt/celt.c 2011-03-11 23:38:07.000000000 +0100
@@ -108,12 +108,13 @@
celt_int32 bitrate;
int vbr;
+ int signalling;
int constrained_vbr; /* If zero, VBR can do whatever it likes with the rate */
/* Everything beyond this point gets cleared on a reset */
#define ENCODER_RESET_START rng
- ec_uint32 rng;
+ celt_uint32 rng;
int spread_decision;
int delayedIntra;
int tonal_average;
@@ -226,6 +227,8 @@
st->upsample = 1;
st->start = 0;
st->end = st->mode->effEBands;
+ st->signalling = 1;
+
st->constrained_vbr = 1;
st->clip = 1;
@@ -317,9 +320,9 @@
for (i=0;istorage*8;
tell = ec_tell(enc);
logp = isTransient ? 2 : 4;
@@ -727,8 +730,8 @@
int tf_select_rsv;
int tf_changed;
int logp;
- ec_uint32 budget;
- ec_uint32 tell;
+ celt_uint32 budget;
+ celt_uint32 tell;
budget = dec->storage*8;
tell = ec_tell(dec);
@@ -915,13 +918,12 @@
int anti_collapse_rsv;
int anti_collapse_on=0;
int silence=0;
+ ALLOC_STACK;
SAVE_STACK;
if (nbCompressedBytes<2 || pcm==NULL)
return CELT_BAD_ARG;
- /* Can't produce more than 1275 output bytes */
- nbCompressedBytes = IMIN(nbCompressedBytes,1275);
frame_size *= st->upsample;
for (LM=0;LM<=st->mode->maxLM;LM++)
if (st->mode->shortMdctSize<>3;
}
+
+ if (st->signalling && enc==NULL)
+ {
+ int tmp = (st->mode->effEBands-st->end)>>1;
+ st->end = IMAX(1, st->mode->effEBands-tmp);
+ compressed[0] = tmp<<5;
+ compressed[0] |= LM<<3;
+ compressed[0] |= (C==2)<<2;
+ compressed++;
+ nbCompressedBytes--;
+ }
+
+ /* Can't produce more than 1275 output bytes */
+ nbCompressedBytes = IMIN(nbCompressedBytes,1275);
nbAvailableBytes = nbCompressedBytes - nbFilledBytes;
if (st->vbr)
{
celt_int32 den=st->mode->Fs>>BITRES;
vbr_rate=(st->bitrate*frame_size+(den>>1))/den;
- effectiveBytes = vbr_rate>>3;
+ if (st->signalling)
+ vbr_rate -= 8<>(3+BITRES);
} else {
celt_int32 tmp;
vbr_rate = 0;
@@ -960,7 +978,7 @@
if (tell>1)
tmp += tell;
nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes,
- (tmp+4*st->mode->Fs)/(8*st->mode->Fs)));
+ (tmp+4*st->mode->Fs)/(8*st->mode->Fs)-!!st->signalling));
effectiveBytes = nbCompressedBytes;
}
@@ -1603,6 +1621,9 @@
it's already filled with zeros */
ec_enc_done(enc);
+ if (st->signalling)
+ nbCompressedBytes++;
+
RESTORE_STACK;
if (ec_get_error(enc))
return CELT_CORRUPTED_DATA;
@@ -1758,6 +1779,12 @@
st->stream_channels = value;
}
break;
+ case CELT_SET_SIGNALLING_REQUEST:
+ {
+ celt_int32 value = va_arg(ap, celt_int32);
+ st->signalling = value;
+ }
+ break;
case CELT_RESET_STATE:
{
CELT_MEMSET((char*)&st->ENCODER_RESET_START, 0,
@@ -1806,11 +1833,12 @@
int downsample;
int start, end;
+ int signalling;
/* Everything beyond this point gets cleared on a reset */
#define DECODER_RESET_START rng
- ec_uint32 rng;
+ celt_uint32 rng;
int last_pitch_index;
int loss_count;
int postfilter_period;
@@ -1906,6 +1934,7 @@
st->downsample = 1;
st->start = 0;
st->end = st->mode->effEBands;
+ st->signalling = 1;
st->loss_count = 0;
@@ -1967,17 +1996,26 @@
log2Amp(st->mode, st->start, st->end, bandE, backgroundLogE, C);
seed = st->rng;
- for (i=0;i>20;
+ for (i=0;i<st->mode->effEBands;i++)
+ {
+ int j;
+ int boffs;
+ int blen;
+ boffs = N*c+(st->mode->eBands[i]<mode->eBands[i+1]-st->mode->eBands[i])<>20;
+ }
+ renormalise_vector(X+boffs, blen, Q15ONE);
+ }
}
st->rng = seed;
- for (c=0;cnbEBands;i++)
- renormalise_vector(X+N*c+(st->mode->eBands[i]<mode->eBands[i+1]-st->mode->eBands[i])<mode, X, freq, bandE, st->mode->nbEBands, C, 1<mode, X, freq, bandE, st->mode->effEBands, C, 1<mode, 0, freq, out_syn, overlap_mem, C, LM);
plc = 0;
@@ -2194,20 +2232,11 @@
int anti_collapse_rsv;
int anti_collapse_on=0;
int silence;
- const int C = CHANNELS(st->stream_channels);
-
+ int C = CHANNELS(st->stream_channels);
+ ALLOC_STACK;
SAVE_STACK;
- if (len<0 || len>1275 || pcm==NULL)
- return CELT_BAD_ARG;
-
frame_size *= st->downsample;
- for (LM=0;LM<=st->mode->maxLM;LM++)
- if (st->mode->shortMdctSize<st->mode->maxLM)
- return CELT_BAD_ARG;
- M=1<_decode_mem + c*(DECODE_BUFFER_SIZE+st->overlap);
@@ -2220,6 +2249,31 @@
oldLogE2 = oldLogE + CC*st->mode->nbEBands;
backgroundLogE = oldLogE2 + CC*st->mode->nbEBands;
+ if (st->signalling && data!=NULL)
+ {
+ st->end = IMAX(1, st->mode->effEBands-2*(data[0]>>5));
+ LM = (data[0]>>3)&0x3;
+ C = 1 + ((data[0]>>2)&0x1);
+ data++;
+ len--;
+ if (LM>st->mode->maxLM)
+ return CELT_CORRUPTED_DATA;
+ if (frame_size < st->mode->shortMdctSize<mode->shortMdctSize<mode->maxLM;LM++)
+ if (st->mode->shortMdctSize<st->mode->maxLM)
+ return CELT_BAD_ARG;
+ }
+ M=1<1275 || pcm==NULL)
+ return CELT_BAD_ARG;
+
N = M*st->mode->shortMdctSize;
effEnd = st->end;
@@ -2248,7 +2302,7 @@
RESTORE_STACK;
return CELT_BAD_ARG;
}
-
+
if (dec == NULL)
{
ec_dec_init(&_dec,(unsigned char*)data,len);
@@ -2500,7 +2554,7 @@
if (ec_tell(dec) > 8*len || ec_get_error(dec))
return CELT_CORRUPTED_DATA;
else
- return CELT_OK;
+ return frame_size/st->downsample;
}
#ifdef FIXED_POINT
@@ -2521,8 +2575,8 @@
ALLOC(out, C*N, celt_int16);
ret=celt_decode_with_ec(st, data, len, out, frame_size, dec);
- if (ret==0)
- for (j=0;j0)
+ for (j=0;j0)
+ for (j=0;jstream_channels = value;
}
break;
+ case CELT_SET_SIGNALLING_REQUEST:
+ {
+ celt_int32 value = va_arg(ap, celt_int32);
+ st->signalling = value;
+ }
+ break;
case CELT_RESET_STATE:
{
CELT_MEMSET((char*)&st->DECODER_RESET_START, 0,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/celt.h new/celt-0.11.3/libcelt/celt.h
--- old/celt-0.11.1/libcelt/celt.h 2011-02-10 02:33:29.000000000 +0100
+++ new/celt-0.11.3/libcelt/celt.h 2011-03-11 23:37:14.000000000 +0100
@@ -113,6 +113,9 @@
#define CELT_SET_CHANNELS_REQUEST 10002
#define CELT_SET_CHANNELS(x) CELT_SET_CHANNELS_REQUEST, _celt_check_int(x)
+#define CELT_SET_SIGNALLING_REQUEST 10003
+#define CELT_SET_SIGNALLING(x) CELT_SET_SIGNALLING_REQUEST, _celt_check_int(x)
+
/** GET the lookahead used in the current mode */
#define CELT_GET_LOOKAHEAD 1001
/** GET the sample rate used in the current mode */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/cwrs.c new/celt-0.11.3/libcelt/cwrs.c
--- old/celt-0.11.1/libcelt/cwrs.c 2011-02-10 02:34:01.000000000 +0100
+++ new/celt-0.11.3/libcelt/cwrs.c 2011-03-04 16:29:37.000000000 +0100
@@ -42,7 +42,7 @@
with frac bits of fractional precision.
Tested for all possible 32-bit inputs with frac=4, where the maximum
overestimation is 0.06254243 bits.*/
-int log2_frac(ec_uint32 val, int frac)
+int log2_frac(celt_uint32 val, int frac)
{
int l;
l=EC_ILOG(val);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/cwrs.h new/celt-0.11.3/libcelt/cwrs.h
--- old/celt-0.11.1/libcelt/cwrs.h 2011-02-10 02:34:05.000000000 +0100
+++ new/celt-0.11.3/libcelt/cwrs.h 2011-03-04 16:29:37.000000000 +0100
@@ -35,7 +35,7 @@
#include "entenc.h"
#include "entdec.h"
-int log2_frac(ec_uint32 val, int frac);
+int log2_frac(celt_uint32 val, int frac);
void get_required_bits(celt_int16 *bits, int N, int K, int frac);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/ecintrin.h new/celt-0.11.3/libcelt/ecintrin.h
--- old/celt-0.11.1/libcelt/ecintrin.h 2011-02-10 02:34:13.000000000 +0100
+++ new/celt-0.11.3/libcelt/ecintrin.h 2011-03-04 16:29:37.000000000 +0100
@@ -26,6 +26,7 @@
*/
/*Some common macros for potential platform-specific optimization.*/
+#include "celt_types.h"
#include
#include
#if !defined(_ecintrin_H)
@@ -81,6 +82,9 @@
All other code should use EC_ILOG() instead.*/
#if defined(_MSC_VER)
# include
+/*In _DEBUG mode this is not an intrinsic by default.*/
+# pragma intrinsic(_BitScanReverse)
+
static __inline int ec_bsr(unsigned long _x){
unsigned long ret;
_BitScanReverse(&ret,_x);
@@ -111,6 +115,8 @@
When we need to, it can be special cased.*/
# define EC_ILOG(_x) (EC_CLZ0-EC_CLZ(_x))
#else
+int ec_ilog(celt_uint32 _v);
+
# define EC_ILOG(_x) (ec_ilog(_x))
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/entcode.c new/celt-0.11.3/libcelt/entcode.c
--- old/celt-0.11.1/libcelt/entcode.c 2011-02-10 02:34:17.000000000 +0100
+++ new/celt-0.11.3/libcelt/entcode.c 2011-03-04 16:29:37.000000000 +0100
@@ -34,7 +34,7 @@
#if !defined(EC_CLZ)
-int ec_ilog(ec_uint32 _v){
+int ec_ilog(celt_uint32 _v){
/*On a Pentium M, this branchless version tested as the fastest on
1,000,000,000 random 32-bit integers, edging out a similar version with
branches, and a 256-entry LUT version.*/
@@ -59,11 +59,11 @@
#endif
-ec_uint32 ec_tell_frac(ec_ctx *_this){
- ec_uint32 nbits;
- ec_uint32 r;
- int l;
- int i;
+celt_uint32 ec_tell_frac(ec_ctx *_this){
+ celt_uint32 nbits;
+ celt_uint32 r;
+ int l;
+ int i;
/*To handle the non-integral number of bits still left in the encoder/decoder
state, we compute the worst-case number of bits of val that must be
encoded to ensure that the value is inside the range for any possible
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/entcode.h new/celt-0.11.3/libcelt/entcode.h
--- old/celt-0.11.1/libcelt/entcode.h 2011-02-10 02:34:21.000000000 +0100
+++ new/celt-0.11.3/libcelt/entcode.h 2011-03-04 16:29:37.000000000 +0100
@@ -35,8 +35,8 @@
-typedef celt_int32 ec_int32;
-typedef celt_uint32 ec_uint32;
+/*OPT: ec_window must be at least 32 bits, but if you have fast arithmetic on a
+ larger type, you can speed up the decoder by using it here.*/
typedef celt_uint32 ec_window;
typedef struct ec_ctx ec_ctx;
typedef struct ec_ctx ec_enc;
@@ -44,8 +44,6 @@
-/*OPT: This must be at least 32 bits, but if you have fast arithmetic on a
- larger type, you can speed up the decoder by using it for ec_window.*/
# define EC_WINDOW_SIZE ((int)sizeof(ec_window)*CHAR_BIT)
/*The number of bits to use for the range-coded part of unsigned integers.*/
@@ -64,9 +62,9 @@
/*Buffered input/output.*/
unsigned char *buf;
/*The size of the buffer.*/
- ec_uint32 storage;
+ celt_uint32 storage;
/*The offset at which the last byte containing raw bits was read/written.*/
- ec_uint32 end_offs;
+ celt_uint32 end_offs;
/*Bits that will be read from/written at the end.*/
ec_window end_window;
/*Number of valid bits in end_window.*/
@@ -75,16 +73,16 @@
This does not include partial bits currently in the range coder.*/
int nbits_total;
/*The offset at which the next range coder byte will be read/written.*/
- ec_uint32 offs;
+ celt_uint32 offs;
/*The number of values in the current range.*/
- ec_uint32 rng;
+ celt_uint32 rng;
/*In the decoder: the difference between the top of the current range and
the input value, minus one.
In the encoder: the low end of the current range.*/
- ec_uint32 val;
+ celt_uint32 val;
/*In the decoder: the saved normalization factor from ec_decode().
In the encoder: the number of oustanding carry propagating symbols.*/
- ec_uint32 ext;
+ celt_uint32 ext;
/*A buffered input/output symbol, awaiting carry propagation.*/
int rem;
/*Nonzero if an error occurred.*/
@@ -97,7 +95,7 @@
_this->offs=_this->end_offs=0;
}
-static inline ec_uint32 ec_range_bytes(ec_ctx *_this){
+static inline celt_uint32 ec_range_bytes(ec_ctx *_this){
return _this->offs;
}
@@ -125,8 +123,6 @@
Return: The number of bits scaled by 2**BITRES.
This will always be slightly larger than the exact value (e.g., all
rounding error is in the positive direction).*/
-ec_uint32 ec_tell_frac(ec_ctx *_this);
-
-int ec_ilog(ec_uint32 _v);
+celt_uint32 ec_tell_frac(ec_ctx *_this);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/entdec.c new/celt-0.11.3/libcelt/entdec.c
--- old/celt-0.11.1/libcelt/entdec.c 2011-02-10 02:34:24.000000000 +0100
+++ new/celt-0.11.3/libcelt/entdec.c 2011-03-04 16:29:37.000000000 +0100
@@ -125,7 +125,7 @@
}
}
-void ec_dec_init(ec_dec *_this,unsigned char *_buf,ec_uint32 _storage){
+void ec_dec_init(ec_dec *_this,unsigned char *_buf,celt_uint32 _storage){
_this->buf=_buf;
_this->storage=_storage;
_this->end_offs=0;
@@ -160,7 +160,7 @@
}
void ec_dec_update(ec_dec *_this,unsigned _fl,unsigned _fh,unsigned _ft){
- ec_uint32 s;
+ celt_uint32 s;
s=IMUL32(_this->ext,_ft-_fh);
_this->val-=s;
_this->rng=_fl>0?IMUL32(_this->ext,_fh-_fl):_this->rng-s;
@@ -169,10 +169,10 @@
/*The probability of having a "one" is 1/(1<<_logp).*/
int ec_dec_bit_logp(ec_dec *_this,unsigned _logp){
- ec_uint32 r;
- ec_uint32 d;
- ec_uint32 s;
- int ret;
+ celt_uint32 r;
+ celt_uint32 d;
+ celt_uint32 s;
+ int ret;
r=_this->rng;
d=_this->val;
s=r>>_logp;
@@ -184,11 +184,11 @@
}
int ec_dec_icdf(ec_dec *_this,const unsigned char *_icdf,unsigned _ftb){
- ec_uint32 r;
- ec_uint32 d;
- ec_uint32 s;
- ec_uint32 t;
- int ret;
+ celt_uint32 r;
+ celt_uint32 d;
+ celt_uint32 s;
+ celt_uint32 t;
+ int ret;
s=_this->rng;
d=_this->val;
r=s>>_ftb;
@@ -204,7 +204,7 @@
return ret;
}
-ec_uint32 ec_dec_uint(ec_dec *_this,ec_uint32 _ft){
+celt_uint32 ec_dec_uint(ec_dec *_this,celt_uint32 _ft){
unsigned ft;
unsigned s;
int ftb;
@@ -213,12 +213,12 @@
_ft--;
ftb=EC_ILOG(_ft);
if(ftb>EC_UINT_BITS){
- ec_uint32 t;
+ celt_uint32 t;
ftb-=EC_UINT_BITS;
ft=(unsigned)(_ft>>ftb)+1;
s=ec_decode(_this,ft);
ec_dec_update(_this,s,s+1,ft);
- t=(ec_uint32)s<error=1;
return _ft;
@@ -231,10 +231,10 @@
}
}
-ec_uint32 ec_dec_bits(ec_dec *_this,unsigned _bits){
- ec_window window;
- int available;
- ec_uint32 ret;
+celt_uint32 ec_dec_bits(ec_dec *_this,unsigned _bits){
+ ec_window window;
+ int available;
+ celt_uint32 ret;
window=_this->end_window;
available=_this->nend_bits;
if(available<_bits){
@@ -244,7 +244,7 @@
}
while(available<=EC_WINDOW_SIZE-EC_SYM_BITS);
}
- ret=(ec_uint32)window&((ec_uint32)1<<_bits)-1;
+ ret=(celt_uint32)window&((celt_uint32)1<<_bits)-1;
window>>=_bits;
available-=_bits;
_this->end_window=window;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/entdec.h new/celt-0.11.3/libcelt/entdec.h
--- old/celt-0.11.1/libcelt/entdec.h 2011-02-10 02:34:28.000000000 +0100
+++ new/celt-0.11.3/libcelt/entdec.h 2011-03-04 16:29:37.000000000 +0100
@@ -35,7 +35,7 @@
/*Initializes the decoder.
_buf: The input buffer to use.
Return: 0 on success, or a negative value on error.*/
-void ec_dec_init(ec_dec *_this,unsigned char *_buf,ec_uint32 _storage);
+void ec_dec_init(ec_dec *_this,unsigned char *_buf,celt_uint32 _storage);
/*Calculates the cumulative frequency for the next symbol.
This can then be fed into the probability model to determine what that
@@ -89,7 +89,7 @@
_ft: The number of integers that can be decoded (one more than the max).
This must be at least one, and no more than 2**32-1.
Return: The decoded bits.*/
-ec_uint32 ec_dec_uint(ec_dec *_this,ec_uint32 _ft);
+celt_uint32 ec_dec_uint(ec_dec *_this,celt_uint32 _ft);
/*Extracts a sequence of raw bits from the stream.
The bits must have been encoded with ec_enc_bits().
@@ -97,6 +97,6 @@
_ftb: The number of bits to extract.
This must be between 0 and 25, inclusive.
Return: The decoded bits.*/
-ec_uint32 ec_dec_bits(ec_dec *_this,unsigned _ftb);
+celt_uint32 ec_dec_bits(ec_dec *_this,unsigned _ftb);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/entenc.c new/celt-0.11.3/libcelt/entenc.c
--- old/celt-0.11.1/libcelt/entenc.c 2011-02-15 03:10:37.000000000 +0100
+++ new/celt-0.11.3/libcelt/entenc.c 2011-03-04 16:29:37.000000000 +0100
@@ -114,7 +114,7 @@
}
}
-void ec_enc_init(ec_enc *_this,unsigned char *_buf,ec_uint32 _size){
+void ec_enc_init(ec_enc *_this,unsigned char *_buf,celt_uint32 _size){
_this->buf=_buf;
_this->end_offs=0;
_this->end_window=0;
@@ -131,7 +131,7 @@
}
void ec_encode(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _ft){
- ec_uint32 r;
+ celt_uint32 r;
r=_this->rng/_ft;
if(_fl>0){
_this->val+=_this->rng-IMUL32(r,(_ft-_fl));
@@ -142,7 +142,7 @@
}
void ec_encode_bin(ec_enc *_this,unsigned _fl,unsigned _fh,unsigned _bits){
- ec_uint32 r;
+ celt_uint32 r;
r=_this->rng>>_bits;
if(_fl>0){
_this->val+=_this->rng-IMUL32(r,((1<<_bits)-_fl));
@@ -154,9 +154,9 @@
/*The probability of having a "one" is 1/(1<<_logp).*/
void ec_enc_bit_logp(ec_enc *_this,int _val,unsigned _logp){
- ec_uint32 r;
- ec_uint32 s;
- ec_uint32 l;
+ celt_uint32 r;
+ celt_uint32 s;
+ celt_uint32 l;
r=_this->rng;
l=_this->val;
s=r>>_logp;
@@ -167,7 +167,7 @@
}
void ec_enc_icdf(ec_enc *_this,int _s,const unsigned char *_icdf,unsigned _ftb){
- ec_uint32 r;
+ celt_uint32 r;
r=_this->rng>>_ftb;
if(_s>0){
_this->val+=_this->rng-IMUL32(r,_icdf[_s-1]);
@@ -177,7 +177,7 @@
ec_enc_normalize(_this);
}
-void ec_enc_uint(ec_enc *_this,ec_uint32 _fl,ec_uint32 _ft){
+void ec_enc_uint(ec_enc *_this,celt_uint32 _fl,celt_uint32 _ft){
unsigned ft;
unsigned fl;
int ftb;
@@ -190,12 +190,12 @@
ft=(_ft>>ftb)+1;
fl=(unsigned)(_fl>>ftb);
ec_encode(_this,fl,fl+1,ft);
- ec_enc_bits(_this,_fl&((ec_uint32)1<end_window;
@@ -231,14 +231,14 @@
}
else if(_this->rng<=EC_CODE_TOP>>shift){
/*The renormalization loop has never been run.*/
- _this->val=_this->val&~((ec_uint32)mask<val=_this->val&~((celt_uint32)mask<error=-1;
}
-void ec_enc_shrink(ec_enc *_this,ec_uint32 _size){
+void ec_enc_shrink(ec_enc *_this,celt_uint32 _size){
celt_assert(_this->offs+_this->end_offs<=_size);
CELT_MOVE(_this->buf+_size-_this->end_offs,
_this->buf+_this->storage-_this->end_offs,_this->end_offs);
@@ -246,11 +246,11 @@
}
void ec_enc_done(ec_enc *_this){
- ec_window window;
- int used;
- ec_uint32 msk;
- ec_uint32 end;
- int l;
+ ec_window window;
+ int used;
+ celt_uint32 msk;
+ celt_uint32 end;
+ int l;
/*We output the minimum number of bits that ensures that the symbols encoded
thus far will be decoded correctly regardless of the bits that follow.*/
l=EC_CODE_BITS-EC_ILOG(_this->rng);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/entenc.h new/celt-0.11.3/libcelt/entenc.h
--- old/celt-0.11.1/libcelt/entenc.h 2011-02-15 03:10:37.000000000 +0100
+++ new/celt-0.11.3/libcelt/entenc.h 2011-03-04 16:29:37.000000000 +0100
@@ -35,7 +35,7 @@
/*Initializes the encoder.
_buf: The buffer to store output bytes in.
_size: The size of the buffer, in chars.*/
-void ec_enc_init(ec_enc *_this,unsigned char *_buf,ec_uint32 _size);
+void ec_enc_init(ec_enc *_this,unsigned char *_buf,celt_uint32 _size);
/*Encodes a symbol given its frequency information.
The frequency information must be discernable by the decoder, assuming it
has read only the previous symbols from the stream.
@@ -70,13 +70,13 @@
_fl: The integer to encode.
_ft: The number of integers that can be encoded (one more than the max).
This must be at least one, and no more than 2**32-1.*/
-void ec_enc_uint(ec_enc *_this,ec_uint32 _fl,ec_uint32 _ft);
+void ec_enc_uint(ec_enc *_this,celt_uint32 _fl,celt_uint32 _ft);
/*Encodes a sequence of raw bits in the stream.
_fl: The bits to encode.
_ftb: The number of bits to encode.
This must be between 0 and 25, inclusive.*/
-void ec_enc_bits(ec_enc *_this,ec_uint32 _fl,unsigned _ftb);
+void ec_enc_bits(ec_enc *_this,celt_uint32 _fl,unsigned _ftb);
/*Overwrites a few bits at the very start of an existing stream, after they
have already been encoded.
@@ -102,7 +102,7 @@
_size: The number of bytes in the new buffer.
This must be large enough to contain the bits already written, and
must be no larger than the existing size.*/
-void ec_enc_shrink(ec_enc *_this,ec_uint32 _size);
+void ec_enc_shrink(ec_enc *_this,celt_uint32 _size);
/*Indicates that there are no more symbols to encode.
All reamining output bytes are flushed to the output buffer.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/kiss_fft.c new/celt-0.11.3/libcelt/kiss_fft.c
--- old/celt-0.11.1/libcelt/kiss_fft.c 2011-02-10 02:35:21.000000000 +0100
+++ new/celt-0.11.3/libcelt/kiss_fft.c 2011-03-11 23:37:14.000000000 +0100
@@ -644,10 +644,13 @@
void kiss_fft_free(const kiss_fft_state *cfg)
{
- celt_free((celt_int16*)cfg->bitrev);
- if (cfg->shift < 0)
- celt_free((kiss_twiddle_cpx*)cfg->twiddles);
- celt_free((kiss_fft_state*)cfg);
+ if (cfg)
+ {
+ celt_free((celt_int16*)cfg->bitrev);
+ if (cfg->shift < 0)
+ celt_free((kiss_twiddle_cpx*)cfg->twiddles);
+ celt_free((kiss_fft_state*)cfg);
+ }
}
#endif /* CUSTOM_MODES */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/mfrngcod.h new/celt-0.11.3/libcelt/mfrngcod.h
--- old/celt-0.11.1/libcelt/mfrngcod.h 2011-02-10 02:36:09.000000000 +0100
+++ new/celt-0.11.3/libcelt/mfrngcod.h 2011-03-04 16:29:37.000000000 +0100
@@ -40,17 +40,17 @@
/*Bits to shift by to move a symbol into the high-order position.*/
# define EC_CODE_SHIFT (EC_CODE_BITS-EC_SYM_BITS-1)
/*Carry bit of the high-order range symbol.*/
-# define EC_CODE_TOP (((ec_uint32)1U)<>EC_SYM_BITS)
/*Code for which propagating carries are possible.*/
-# define EC_CODE_CARRY (((ec_uint32)EC_SYM_MAX)<> 1;
for (j=end;j-->start;)
{
+ int bitsj;
int N = m->eBands[j+1]-m->eBands[j];
- bits1[j] = C*N*m->allocVectors[mid*len+j]<<LM>>2;
- if (bits1[j] > 0)
- bits1[j] = IMAX(0, bits1[j] + trim_offset[j]);
- bits1[j] += offsets[j];
- if (bits1[j] >= thresh[j] || done)
+ bitsj = C*N*m->allocVectors[mid*len+j]<<LM>>2;
+ if (bitsj > 0)
+ bitsj = IMAX(0, bitsj + trim_offset[j]);
+ bitsj += offsets[j];
+ if (bitsj >= thresh[j] || done)
{
done = 1;
/* Don't allocate more than we can actually use */
- psum += IMIN(bits1[j], cap[j]);
+ psum += IMIN(bitsj, cap[j]);
} else {
- if (bits1[j] >= C<= C<eBands[j+1]-m->eBands[j];
- bits1[j] = C*N*m->allocVectors[lo*len+j]<<LM>>2;
- bits2[j] = hi>=m->nbAllocVectors ?
+ bits1j = C*N*m->allocVectors[lo*len+j]<<LM>>2;
+ bits2j = hi>=m->nbAllocVectors ?
cap[j] : C*N*m->allocVectors[hi*len+j]<<LM>>2;
- if (bits1[j] > 0)
- bits1[j] = IMAX(0, bits1[j] + trim_offset[j]);
- if (bits2[j] > 0)
- bits2[j] = IMAX(0, bits2[j] + trim_offset[j]);
+ if (bits1j > 0)
+ bits1j = IMAX(0, bits1j + trim_offset[j]);
+ if (bits2j > 0)
+ bits2j = IMAX(0, bits2j + trim_offset[j]);
if (lo > 0)
- bits1[j] += offsets[j];
- bits2[j] += offsets[j];
+ bits1j += offsets[j];
+ bits2j += offsets[j];
if (offsets[j]>0)
skip_start = j;
- bits2[j] = IMAX(0,bits2[j]-bits1[j]);
+ bits2j = IMAX(0,bits2j-bits1j);
+ bits1[j] = bits1j;
+ bits2[j] = bits2j;
}
codedBands = interp_bits2pulses(m, start, end, skip_start, bits1, bits2, thresh, cap,
total, balance, skip_rsv, intensity, intensity_rsv, dual_stereo, dual_stereo_rsv,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/libcelt/testcelt.c new/celt-0.11.3/libcelt/testcelt.c
--- old/celt-0.11.1/libcelt/testcelt.c 2011-02-15 03:09:58.000000000 +0100
+++ new/celt-0.11.3/libcelt/testcelt.c 2011-03-11 23:37:14.000000000 +0100
@@ -53,7 +53,7 @@
unsigned char data[MAX_PACKET];
int rate;
int complexity;
-#if !(defined (FIXED_POINT) && !defined(CUSTOM_MODES))
+#if !(defined (FIXED_POINT) && !defined(CUSTOM_MODES)) && defined(RESYNTH)
int i;
double rmsd = 0;
#endif
@@ -126,6 +126,7 @@
while (!feof(fin))
{
+ int ret;
err = fread(in, sizeof(short), frame_size*channels, fin);
if (feof(fin))
break;
@@ -160,24 +161,24 @@
/* This is to simulate packet loss */
if (argc==9 && rand()%10001)
prediction=1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/celt-0.11.1/tools/wave_out.h new/celt-0.11.3/tools/wave_out.h
--- old/celt-0.11.1/tools/wave_out.h 2011-02-15 05:57:52.000000000 +0100
+++ new/celt-0.11.3/tools/wave_out.h 2011-03-14 23:05:02.000000000 +0100
@@ -39,7 +39,7 @@
#include
#endif
-#define VERSION_STRING "\n 0.11.1\n"
+#define VERSION_STRING "\n 0.11.3\n"
#define Cdecl __cdecl
#define __attribute__(x)