FFmpeg-soc
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 2010
- 19 participants
- 92 discussions
16 Jul '10
- Log -----------------------------------------------------------------
commit 7f3f81e1f58926e24685bde2a97732f216f7e68f
Author: Naufal <naufal11(a)gmail.com>
Date: Fri Jul 16 18:36:56 2010 +0530
Synthesize speech
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 598a4d3..abe60fc 100755
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -2,6 +2,7 @@
#define ALT_BITSTREAM_READER_LE
#include "get_bits.h"
#include "acelp_vectors.h"
+#include "celp_filters.h"
#include "lsp.h"
#include "g723_1_data.h"
@@ -10,6 +11,7 @@ typedef struct g723_1_context {
int16_t prev_lsp[LPC_ORDER];
int16_t pitch_lag[2];
int16_t prev_excitation[PITCH_MAX];
+ int16_t filter_mem[LPC_ORDER];
G723_1_Subframe subframe[4];
FrameType cur_frame_type;
FrameType past_frame_type;
@@ -778,6 +780,22 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
}
}
+ vector_ptr = out + LPC_ORDER;
+ for (i = 0; i < SUBFRAMES; i++) {
+
+ // Fill with the last 10 values of the output vector
+ memcpy(vector_ptr - LPC_ORDER, p->filter_mem,
+ LPC_ORDER * sizeof(int16_t));
+ // Perform 10th order LPC synthesis
+ ff_celp_lp_synthesis_filter(vector_ptr, &lpc[i * LPC_ORDER + i + 1],
+ vector_ptr, SUBFRAME_LEN, LPC_ORDER,
+ 0, 1, 1 << 12);
+ // Store the last 10 values of the output vector
+ memcpy(p->filter_mem, vector_ptr + SUBFRAME_LEN - LPC_ORDER,
+ LPC_ORDER * sizeof(int16_t));
+
+ vector_ptr += SUBFRAME_LEN;
+ }
return frame_size[p->cur_frame_type];
}
commit 5cb58b347cbdedc05ea3afc0118e9bb0b441f773
Author: Naufal <naufal11(a)gmail.com>
Date: Fri Jul 16 18:17:50 2010 +0530
Make ff_celp_lp_synthesis_filter() usable by G.723.1
diff --git a/libavcodec/celp_filters.c b/libavcodec/celp_filters.c
index 26a62ee..f9e65f4 100644
--- a/libavcodec/celp_filters.c
+++ b/libavcodec/celp_filters.c
@@ -58,7 +58,7 @@ void ff_celp_circ_addf(float *out, const float *in,
int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,
const int16_t *in, int buffer_length,
int filter_length, int stop_on_overflow,
- int rounder)
+ int shift, int rounder)
{
int i,n;
@@ -67,7 +67,7 @@ int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,
for (i = 1; i <= filter_length; i++)
sum -= filter_coeffs[i-1] * out[n-i];
- sum = (sum >> 12) + in[n];
+ sum = ((sum >> 12) + in[n]) >> shift;
if (sum + 0x8000 > 0xFFFFU) {
if (stop_on_overflow)
diff --git a/libavcodec/celp_filters.h b/libavcodec/celp_filters.h
index 7b64fc0..aec5c69 100644
--- a/libavcodec/celp_filters.h
+++ b/libavcodec/celp_filters.h
@@ -63,6 +63,7 @@ void ff_celp_circ_addf(float *out, const float *in,
* @param filter_length filter length (10 for 10th order LP filter)
* @param stop_on_overflow 1 - return immediately if overflow occurs
* 0 - ignore overflows
+ * @param shift result will be shifted right by this value
* @param rounder the amount to add for rounding (usually 0x800 or 0xfff)
*
* @return 1 if overflow occurred, 0 - otherwise
@@ -75,7 +76,7 @@ void ff_celp_circ_addf(float *out, const float *in,
int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,
const int16_t *in, int buffer_length,
int filter_length, int stop_on_overflow,
- int rounder);
+ int shift, int rounder);
/**
* LP synthesis filter.
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index efa62c4..42bfc23 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -212,7 +212,7 @@ static void do_output_subblock(RA144Context *ractx, const uint16_t *lpc_coefs,
10*sizeof(*ractx->curr_sblock));
if (ff_celp_lp_synthesis_filter(ractx->curr_sblock + 10, lpc_coefs,
- block, BLOCKSIZE, 10, 1, 0xfff))
+ block, BLOCKSIZE, 10, 1, 0, 0xfff))
memset(ractx->curr_sblock, 0, 50*sizeof(*ractx->curr_sblock));
}
-----------------------------------------------------------------------
Summary of changes:
libavcodec/celp_filters.c | 4 ++--
libavcodec/celp_filters.h | 3 ++-
libavcodec/g723_1.c | 18 ++++++++++++++++++
libavcodec/ra144.c | 2 +-
4 files changed, 23 insertions(+), 4 deletions(-)
--
http://github.com/naufal/ffmpeg-soc
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via 87a7325cedff834479d827c0d4b887f1374c36b5 (commit)
from 23fbd7867da103378f7c3fd435551c8bc06ce029 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 87a7325cedff834479d827c0d4b887f1374c36b5
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Thu Jul 15 21:45:23 2010 -0300
Write post-processing of excitation and synthesis
diff --git a/libavcodec/amrwbdata.h b/libavcodec/amrwbdata.h
index 6163bba..06e412c 100644
--- a/libavcodec/amrwbdata.h
+++ b/libavcodec/amrwbdata.h
@@ -31,8 +31,11 @@
#define ENERGY_MEAN 30.0 ///< mean innovation energy (dB) in all modes
#define AMRWB_SUBFRAME_SIZE 64 ///< samples per subframe
+#define AMRWB_SAMPLE_BOUND 32768.0 ///< threshold for synthesis overflow
#define PITCH_MAX 231 ///< maximum received pitch delay value
+
+
/* Mode ordering is sensitive, do not change */
enum Mode {
MODE_6k60 = 0, ///< 6.60 kbit/s
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 57965d3..fa86de4 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -23,6 +23,7 @@
#include "get_bits.h"
#include "lsp.h"
#include "celp_math.h"
+#include "celp_filters.h"
#include "acelp_filters.h"
#include "acelp_vectors.h"
#include "acelp_pitch_delay.h"
@@ -67,6 +68,8 @@ typedef struct {
float prev_sparse_fixed_gain; ///< previous fixed gain; used by anti-sparseness to determine "onset"
uint8_t prev_ir_filter_nr; ///< previous impulse response filter "impNr": 0 - strong, 1 - medium, 2 - none
float prev_tr_gain; ///< previous initial gain used by noise enhancer for thresold
+
+ float samples_in[LP_ORDER + AMRWB_SUBFRAME_SIZE]; ///< floating point samples
} AMRWBContext;
static int amrwb_decode_init(AVCodecContext *avctx)
@@ -857,6 +860,61 @@ static void pitch_enhancer(float *fixed_vector, float voice_fac)
}
/**
+ * Conduct 16th order linear predictive coding synthesis from excitation
+ * Return a overflow detection flag
+ *
+ * @param ctx [in] pointer to the AMRWBContext
+ * @param lpc [in] pointer to the LPC coefficients
+ * @param fixed_gain [in] fixed codebook gain for synthesis
+ * @param fixed_vector [in] algebraic codebook vector
+ * @param samples [out] pointer to the output speech samples
+ * @param overflow [in] 16-bit predicted overflow flag
+ */
+static uint8_t synthesis(AMRWBContext *ctx, float *lpc,
+ float fixed_gain, const float *fixed_vector,
+ float *samples, uint8_t overflow)
+{
+ int i;
+ float excitation[AMRWB_SUBFRAME_SIZE];
+
+ // if an overflow has been detected, the pitch vector is scaled down by a
+ // factor of 4
+ if (overflow)
+ for (i = 0; i < AMRWB_SUBFRAME_SIZE; i++)
+ ctx->pitch_vector[i] *= 0.25;
+
+ ff_weighted_vector_sumf(excitation, ctx->pitch_vector, fixed_vector,
+ ctx->pitch_gain[4], fixed_gain, AMRWB_SUBFRAME_SIZE);
+
+ // emphasize pitch vector contribution in low bitrate modes
+ if (ctx->pitch_gain[4] > 0.5 && !overflow && ctx->fr_cur_mode <= MODE_8k85) {
+ float energy = ff_dot_productf(excitation, excitation,
+ AMRWB_SUBFRAME_SIZE);
+
+ // XXX: Weird part in both ref code and spec. A unknown parameter
+ // {beta} seems to be identical to the current pitch gain
+ float pitch_factor = 0.25 * ctx->pitch_gain[4] * ctx->pitch_gain[4];
+
+ for (i = 0; i < AMRWB_SUBFRAME_SIZE; i++)
+ excitation[i] += pitch_factor * ctx->pitch_vector[i];
+
+ ff_scale_vector_to_given_sum_of_squares(excitation, excitation,
+ energy, AMRWB_SUBFRAME_SIZE);
+ }
+
+ ff_celp_lp_synthesis_filterf(samples, lpc, excitation,
+ AMRWB_SUBFRAME_SIZE, LP_ORDER);
+
+ // detect overflow
+ for (i = 0; i < AMRWB_SUBFRAME_SIZE; i++)
+ if (fabsf(samples[i]) > AMRWB_SAMPLE_BOUND) {
+ return 1;
+ }
+
+ return 0;
+}
+
+/**
* Update context state before the next subframe
*/
static void update_sub_state(AMRWBContext *ctx)
@@ -955,6 +1013,13 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
pitch_enhancer(synth_fixed_vector, voice_fac);
+ if (synthesis(ctx, ctx->lp_coef[sub], synth_fixed_gain,
+ synth_fixed_vector, &ctx->samples_in[LP_ORDER], 0))
+ // overflow detected -> rerun synthesis scaling pitch vector down
+ // by a factor of 4, skipping pitch vector contribution emphasis
+ // and adaptive gain control
+ synthesis(ctx, ctx->lp_coef[sub], synth_fixed_gain,
+ synth_fixed_vector, &ctx->samples_in[LP_ORDER], 1);
/* Update buffers and history */
ff_clear_fixed_vector(ctx->fixed_vector, &fixed_sparse,
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdata.h | 3 ++
libavcodec/amrwbdec.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 0 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
Author: spyfeng
Date: Thu Jul 15 18:34:29 2010
New Revision: 5861
Log:
remove the useless code.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Thu Jul 15 18:17:51 2010 (r5860)
+++ mms/mmst.c Thu Jul 15 18:34:29 2010 (r5861)
@@ -26,7 +26,6 @@
#include "libavcodec/bytestream.h"
#include "network.h"
#include "asf.h"
-#include <unistd.h>
#define LOCAL_ADDRESS 0xc0a80081 // FIXME get and use correct local ip address.
#define LOCAL_PORT 1037 // as above.
@@ -208,7 +207,6 @@ static int send_protocol_select(MMSConte
LOCAL_PORT);
mms_put_utf16(mms, data_string);
- bytestream_put_le16(&mms->write_out_ptr, 0);
return send_command_packet(mms);
}
@@ -377,7 +375,6 @@ static int mms_safe_send_recv(MMSContext
const MMSSCPacketType expect_type)
{
MMSSCPacketType type;
- int i;
if(send_fun) {
int ret = send_fun(mms);
if (ret < 0) {
@@ -391,7 +388,6 @@ static int mms_safe_send_recv(MMSContext
} else {
return 0;
}
- return -1;
}
static int send_media_header_request(MMSContext *mms)
1
0
Author: spyfeng
Date: Thu Jul 15 17:25:40 2010
New Revision: 5856
Log:
make send message is 8 bytes aligned to solve the bug that
client receive the message with error code from server side.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Thu Jul 15 17:09:43 2010 (r5855)
+++ mms/mmst.c Thu Jul 15 17:25:40 2010 (r5856)
@@ -150,7 +150,8 @@ static void insert_command_prefixes(MMSC
/** Send a prepared MMST command packet. */
static int send_command_packet(MMSContext *mms)
{
- int exact_length= mms->write_out_ptr - mms->out_buffer;
+ int len= mms->write_out_ptr - mms->out_buffer;
+ int exact_length = (len + 7) & ~7;
int first_length= exact_length - 16;
int len8= first_length/8;
int write_result;
@@ -159,6 +160,7 @@ static int send_command_packet(MMSContex
AV_WL32(mms->out_buffer + 8, first_length);
AV_WL32(mms->out_buffer + 16, len8);
AV_WL32(mms->out_buffer + 32, len8-2);
+ memset(mms->write_out_ptr, 0, exact_length - len);
// write it out.
write_result= url_write(mms->mms_hd, mms->out_buffer, exact_length);
3
2
Author: spyfeng
Date: Thu Jul 15 18:17:51 2010
New Revision: 5860
Log:
remove the manual padd for 8 bytes aligned which will be done in send_command_packet().
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Thu Jul 15 18:02:32 2010 (r5859)
+++ mms/mmst.c Thu Jul 15 18:17:51 2010 (r5860)
@@ -516,9 +516,6 @@ static int send_stream_selection_request
bytestream_put_le16(&mms->write_out_ptr, mms->streams[i].id); // stream id
bytestream_put_le16(&mms->write_out_ptr, 0); // selection
}
-
- bytestream_put_le16(&mms->write_out_ptr, 0);
-
return send_command_packet(mms);
}
1
0
Author: spyfeng
Date: Thu Jul 15 18:02:32 2010
New Revision: 5859
Log:
remove retrying method because the bug has been fixed.
retrying method is not the solution.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Thu Jul 15 17:50:55 2010 (r5858)
+++ mms/mmst.c Thu Jul 15 18:02:32 2010 (r5859)
@@ -30,7 +30,6 @@
#define LOCAL_ADDRESS 0xc0a80081 // FIXME get and use correct local ip address.
#define LOCAL_PORT 1037 // as above.
-#define RETRY_TIMES 10
/** Client to server packet types. */
typedef enum {
CS_PKT_INITIAL = 0x01,
@@ -386,15 +385,12 @@ static int mms_safe_send_recv(MMSContext
return ret;
}
}
- for (i = 0; i < RETRY_TIMES; i++) {
if ((type = get_tcp_server_response(mms)) != expect_type) {
dprintf(NULL,"Unexpected packet type %d with type %d\n", type, expect_type);
- //return -1;
- usleep(50000);
+ return -1;
} else {
return 0;
}
- }
return -1;
}
1
0
Author: spyfeng
Date: Thu Jul 15 17:50:55 2010
New Revision: 5858
Log:
remove stream rate parser because we didn't need it now.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Thu Jul 15 17:42:29 2010 (r5857)
+++ mms/mmst.c Thu Jul 15 17:50:55 2010 (r5858)
@@ -79,7 +79,6 @@ typedef enum {
typedef struct {
int id;
- int rate;
}MMSStream;
typedef struct {
@@ -489,7 +488,6 @@ static int asf_header_parser(MMSContext
chunksize = 46;
} else if (!memcmp(p, ff_asf_stream_bitrate_properties, sizeof(ff_asf_guid))) {
int record_cnt = AV_RL16(p + sizeof(ff_asf_guid) + 8);
- uint8_t *pos;
if (record_cnt*6 + 16 + 8 + 2 > chunksize) {
dprintf(NULL, "Too many stream record count.\n");
return -1;
@@ -502,15 +500,6 @@ static int asf_header_parser(MMSContext
dprintf(NULL, "Too many streams(bitrate properties)\n");
return -1;
}
- pos = p + 24 + 2;
- while(record_cnt > 0) {
- flags = AV_RL16(pos);
- pos += 2;
- stream_id = flags & 0x7F;
- mms->streams[stream_id].rate = AV_RL32(pos);
- pos += 4;
- record_cnt--;
- }
}
p += chunksize;
}
1
0
Author: spyfeng
Date: Thu Jul 15 17:42:29 2010
New Revision: 5857
Log:
set the correct stream info if already know the stream num.
Thanks Ronald for the latest 3 patches.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Thu Jul 15 17:25:40 2010 (r5856)
+++ mms/mmst.c Thu Jul 15 17:42:29 2010 (r5857)
@@ -442,6 +442,7 @@ static int asf_header_parser(MMSContext
{
uint8_t *p = mms->asf_header;
uint8_t *end;
+ int st_idx = 0;
int flags, stream_id, is_stream_num_known = 0;
mms->stream_num = 0;
@@ -476,7 +477,8 @@ static int asf_header_parser(MMSContext
//Please see function send_stream_selection_request().
if (mms->stream_num < MAX_STREAMS &&
46 + mms->stream_num * 6 < sizeof(mms->out_buffer)) {
- mms->streams[mms->stream_num].id = stream_id;
+ st_idx = is_stream_num_known ? st_idx++ : mms->stream_num;
+ mms->streams[st_idx].id = stream_id;
if (!is_stream_num_known)
mms->stream_num++;
} else {
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via 23fbd7867da103378f7c3fd435551c8bc06ce029 (commit)
from e9202459e44d5760dd5fadd8a7fa6ded9af6a398 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 23fbd7867da103378f7c3fd435551c8bc06ce029
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Thu Jul 15 12:17:41 2010 -0300
Write pitch enhancer filter, remove const qualifier from
synth_fixed_vector due to multiple processing
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 7b02188..57965d3 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -714,8 +714,8 @@ static float voice_factor(float *p_vector, float p_gain,
* @param fixed_vector [in] unfiltered fixed vector
* @param out [in] space for modified vector if necessary
*/
-static const float *anti_sparseness(AMRWBContext *ctx,
- const float *fixed_vector, float *out)
+static float *anti_sparseness(AMRWBContext *ctx,
+ float *fixed_vector, float *out)
{
int ir_filter_nr;
@@ -833,6 +833,30 @@ static float noise_enhancer(float fixed_gain, float *prev_tr_gain,
}
/**
+ * Filter the fixed_vector to emphasize the higher frequencies
+ *
+ * @param fixed_vector [in/out] fixed codebook vector
+ * @param voice_fac [in] frame voicing factor
+ */
+static void pitch_enhancer(float *fixed_vector, float voice_fac)
+{
+ int i;
+ float cpe = 0.125 * (1 + voice_fac);
+ float last = fixed_vector[0]; // holds c(i - 1)
+
+ fixed_vector[0] -= cpe * fixed_vector[1];
+
+ for (i = 1; i < AMRWB_SUBFRAME_SIZE - 1; i++) {
+ float cur = fixed_vector[i];
+
+ fixed_vector[i] -= cpe * (last + fixed_vector[i + 1]);
+ last = cur;
+ }
+
+ fixed_vector[AMRWB_SUBFRAME_SIZE - 1] -= cpe * last;
+}
+
+/**
* Update context state before the next subframe
*/
static void update_sub_state(AMRWBContext *ctx)
@@ -851,7 +875,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AMRFixed fixed_sparse = {0}; // fixed vector up to anti-sparseness processing
float spare_vector[AMRWB_SUBFRAME_SIZE]; // extra stack space to hold result from anti-sparseness processing
float fixed_gain_factor; // fixed gain correction factor (gamma)
- const float *synth_fixed_vector; // pointer to the fixed vector that synthesis should use
+ float *synth_fixed_vector; // pointer to the fixed vector that synthesis should use
float synth_fixed_gain; // the fixed gain that synthesis should use
float voice_fac, stab_fac; // parameters used for gain smoothing
int sub, i;
@@ -922,12 +946,17 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
// I did not found a reference of this in the ref decoder
}
+ /* Post-processing of excitation elements */
synth_fixed_gain = noise_enhancer(ctx->fixed_gain[4], &ctx->prev_tr_gain,
voice_fac, stab_fac);
synth_fixed_vector = anti_sparseness(ctx, ctx->fixed_vector,
spare_vector);
+ pitch_enhancer(synth_fixed_vector, voice_fac);
+
+
+ /* Update buffers and history */
ff_clear_fixed_vector(ctx->fixed_vector, &fixed_sparse,
AMRWB_SUBFRAME_SIZE);
update_sub_state(ctx);
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdec.c | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
Author: spyfeng
Date: Thu Jul 15 17:09:43 2010
New Revision: 5855
Log:
check the error code sent back from server.
if hr is not 0x00000000, the message sent from client may be broken.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Fri Jul 9 21:47:19 2010 (r5854)
+++ mms/mmst.c Thu Jul 15 17:09:43 2010 (r5855)
@@ -265,6 +265,7 @@ static MMSSCPacketType get_tcp_server_re
read_result= url_read_complete(mms->mms_hd, mms->in_buffer+8, 4);
if(read_result == 4) {
int length_remaining= AV_RL32(mms->in_buffer+8) + 4;
+ int hr;
dprintf(NULL, "Length remaining is %d\n", length_remaining);
// read the rest of the packet.
@@ -282,6 +283,12 @@ static MMSSCPacketType get_tcp_server_re
dprintf(NULL, "read for packet type failed%d!\n", read_result);
return -1;
}
+ hr = AV_RL32(mms->in_buffer + 40);
+ if (hr)
+ {
+ dprintf(NULL, "The server side send back error code:0x%x\n", hr);
+ return -1;
+ }
} else {
dprintf(NULL, "read for length remaining failed%d!\n", read_result);
return -1;
2
1
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via e9202459e44d5760dd5fadd8a7fa6ded9af6a398 (commit)
via fd34bb941fab51bf3f8ec752bb744647528a827c (commit)
from 4b95cefc49b723ea5e2ce3ac016b0817ec41752f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e9202459e44d5760dd5fadd8a7fa6ded9af6a398
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Wed Jul 14 19:11:02 2010 -0300
Move voice factor out of the subframe update state
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index b1469c4..7b02188 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -276,7 +276,7 @@ static void isf_set_min_dist(float *isf, float min_spacing, int size) {
static void interpolate_isp(double isp_q[4][LP_ORDER], double *isp4_past)
{
int i;
- // XXX: Did not used ff_weighted_vector_sumf because using double
+ // XXX: Did not use ff_weighted_vector_sumf because using double
for (i = 0; i < LP_ORDER; i++)
isp_q[0][i] = 0.55 * isp4_past[i] + 0.45 * isp_q[3][i];
@@ -784,7 +784,6 @@ static const float *anti_sparseness(AMRWBContext *ctx,
}
/**
- * Update context state before the next subframe
* Calculate a stability factor {teta} based on distance between
* current and past isf. A value of 1 shows maximum signal stability.
*/
@@ -803,18 +802,14 @@ static float stability_factor(const float *isf, const float *isf_past)
* Apply a non-linear fixed gain smoothing in order to reduce
* fluctuation in the energy of excitation. Returns smoothed gain.
*
- * @param ctx [in] the context
* @param fixed_gain [in] unsmoothed fixed gain
* @param prev_tr_gain [in/out] previous threshold gain (updated)
* @param voice_fac [in] frame voicing factor
* @param stab_fac [in] frame stability factor
*/
-static void update_sub_state(AMRWBContext *ctx)
static float noise_enhancer(float fixed_gain, float *prev_tr_gain,
float voice_fac, float stab_fac)
{
- ctx->tilt_coef = voice_factor(ctx->pitch_vector, ctx->pitch_gain[4],
- ctx->fixed_vector, ctx->fixed_gain[4]) * 0.25 + 0.25;
float sm_fac = 0.5 * (1 - voice_fac) * stab_fac;
float g0;
@@ -836,6 +831,12 @@ static float noise_enhancer(float fixed_gain, float *prev_tr_gain,
return sm_fac * g0 + (1 - sm_fac) * fixed_gain;
}
+
+/**
+ * Update context state before the next subframe
+ */
+static void update_sub_state(AMRWBContext *ctx)
+{
memmove(&ctx->pitch_gain[0], &ctx->pitch_gain[1], 4 * sizeof(float));
memmove(&ctx->fixed_gain[0], &ctx->fixed_gain[1], 4 * sizeof(float));
}
@@ -905,6 +906,11 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AMRWB_SUBFRAME_SIZE)/AMRWB_SUBFRAME_SIZE,
ctx->prediction_error,
ENERGY_MEAN, energy_pred_fac);
+
+ /* Calculate voice factor and store tilt for next subframe */
+ voice_fac = voice_factor(ctx->pitch_vector, ctx->pitch_gain[4],
+ ctx->fixed_vector, ctx->fixed_gain[4]);
+ ctx->tilt_coef = voice_fac * 0.25 + 0.25;
/* Construct current excitation */
for (i = 0; i < AMRWB_SUBFRAME_SIZE; i++) {
commit fd34bb941fab51bf3f8ec752bb744647528a827c
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Wed Jul 14 19:08:19 2010 -0300
Write a sketch of noise enhancer
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 5469791..b1469c4 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -66,6 +66,7 @@ typedef struct {
float prev_sparse_fixed_gain; ///< previous fixed gain; used by anti-sparseness to determine "onset"
uint8_t prev_ir_filter_nr; ///< previous impulse response filter "impNr": 0 - strong, 1 - medium, 2 - none
+ float prev_tr_gain; ///< previous initial gain used by noise enhancer for thresold
} AMRWBContext;
static int amrwb_decode_init(AVCodecContext *avctx)
@@ -80,7 +81,7 @@ static int amrwb_decode_init(AVCodecContext *avctx)
ctx->isp_sub4_past[i] = isp_init[i] / (float) (1 << 15);
}
- ctx->tilt_coef = 0;
+ ctx->tilt_coef = ctx->prev_tr_gain = 0.0;
for (i = 0; i < 4; i++)
ctx->prediction_error[i] = MIN_ENERGY;
@@ -784,14 +785,57 @@ static const float *anti_sparseness(AMRWBContext *ctx,
/**
* Update context state before the next subframe
+ * Calculate a stability factor {teta} based on distance between
+ * current and past isf. A value of 1 shows maximum signal stability.
+ */
+static float stability_factor(const float *isf, const float *isf_past)
+{
+ int i;
+ float acc = 0.0;
+
+ for (i = 0; i < LP_ORDER - 1; i++)
+ acc += (isf[i] - isf_past[i]) * (isf[i] - isf_past[i]);
+
+ return 1.25 - acc * 0.8 / 256;
+}
+
+/**
+ * Apply a non-linear fixed gain smoothing in order to reduce
+ * fluctuation in the energy of excitation. Returns smoothed gain.
*
* @param ctx [in] the context
+ * @param fixed_gain [in] unsmoothed fixed gain
+ * @param prev_tr_gain [in/out] previous threshold gain (updated)
+ * @param voice_fac [in] frame voicing factor
+ * @param stab_fac [in] frame stability factor
*/
static void update_sub_state(AMRWBContext *ctx)
+static float noise_enhancer(float fixed_gain, float *prev_tr_gain,
+ float voice_fac, float stab_fac)
{
ctx->tilt_coef = voice_factor(ctx->pitch_vector, ctx->pitch_gain[4],
ctx->fixed_vector, ctx->fixed_gain[4]) * 0.25 + 0.25;
+ float sm_fac = 0.5 * (1 - voice_fac) * stab_fac;
+ float g0;
+
+ /* XXX: here it is supposed to "in(de)crement the fixed gain by 1.5dB"
+ * in each case, but the reference source (lines 812 onwards of
+ * dec_main.c) multiplies gain by strange constants that need checking
+ */
+ if (fixed_gain < *prev_tr_gain) {
+ // increment fixed_gain by 1.5dB ?
+ g0 = FFMIN(*prev_tr_gain, fixed_gain + ( fixed_gain *
+ (6226 / (float) (1 << 15))));
+ } else
+ // decrement fixed_gain by 1.5dB ?
+ g0 = FFMAX(*prev_tr_gain, fixed_gain *
+ (27536 / (float) (1 << 15)));
+
+ // update next frame threshold
+ *prev_tr_gain = g0;
+ return sm_fac * g0 + (1 - sm_fac) * fixed_gain;
+}
memmove(&ctx->pitch_gain[0], &ctx->pitch_gain[1], 4 * sizeof(float));
memmove(&ctx->fixed_gain[0], &ctx->fixed_gain[1], 4 * sizeof(float));
}
@@ -807,6 +851,8 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
float spare_vector[AMRWB_SUBFRAME_SIZE]; // extra stack space to hold result from anti-sparseness processing
float fixed_gain_factor; // fixed gain correction factor (gamma)
const float *synth_fixed_vector; // pointer to the fixed vector that synthesis should use
+ float synth_fixed_gain; // the fixed gain that synthesis should use
+ float voice_fac, stab_fac; // parameters used for gain smoothing
int sub, i;
ctx->fr_cur_mode = unpack_bitstream(ctx, buf, buf_size);
@@ -826,6 +872,8 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
else {
decode_isf_indices_46b(cf->isp_id, ctx->isf_quant, ctx->fr_quality);
}
+
+ stab_fac = stability_factor(ctx->isf_quant, ctx->isf_q_past);
isf_add_mean_and_past(ctx->isf_quant, ctx->isf_q_past);
isf_set_min_dist(ctx->isf_quant, MIN_ISF_SPACING, LP_ORDER);
@@ -867,6 +915,9 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
// XXX: Should remove fractional part of excitation like NB?
// I did not found a reference of this in the ref decoder
}
+
+ synth_fixed_gain = noise_enhancer(ctx->fixed_gain[4], &ctx->prev_tr_gain,
+ voice_fac, stab_fac);
synth_fixed_vector = anti_sparseness(ctx, ctx->fixed_vector,
spare_vector);
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdec.c | 71 ++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 64 insertions(+), 7 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
Hi guys,
This adds RTP depacketization of QDM2.
Valgrind is relatively clean, but there seems to be a 16-byte leak
with AAC -- the default conversion is qdm2->aac [1]. Doing "-acodec
copy" to preserve qdm2->qdm2 makes things barf for reasons I haven't
explored yet.
Since this was also RE'd by Ronald, a wiki description is forthcoming.
Fortunately, the comments in the code are pretty thorough.
Josh
[1] ffmpeg -i rtsp://<host>/sample.mov -vn foo.mov
3
9
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via 4b95cefc49b723ea5e2ce3ac016b0817ec41752f (commit)
from 0bfa12bd360d233e9caf7024f0912a4004ad8468 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4b95cefc49b723ea5e2ce3ac016b0817ec41752f
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Wed Jul 14 15:25:32 2010 -0300
Write anti-sparseness processing (6.1.5)
diff --git a/libavcodec/amrwbdata.h b/libavcodec/amrwbdata.h
index c52fe7a..6163bba 100644
--- a/libavcodec/amrwbdata.h
+++ b/libavcodec/amrwbdata.h
@@ -1751,6 +1751,41 @@ static const int16_t qua_gain_7b[128][2] = {
/* 4-tap moving average prediction coefficients in reverse order */
static const float energy_pred_fac[4] = { 0.2, 0.3, 0.4, 0.5 };
+/** impulse response filter tables converted to float from Q15
+ * used for anti-sparseness processing */
+// XXX: Not sure whether it is Q15 indeed
+static const float ir_filter_str[64] = {
+ 0.615906, 0.295807, 0.099792, -0.104889, 0.087402, -0.159912,
+ 0.048492, -0.041412, 0.018311, 0.118805, -0.045685, -0.021301,
+ 0.036713, -0.160187, 0.036591, 0.163910, -0.045410, -0.021515,
+ -0.088104, 0.060303, 0.027405, 0.022003, -0.118286, 0.128998,
+ -0.156006, 0.195312, -0.031494, -0.144196, 0.124908, -0.132812,
+ 0.097809, 0.065002, -0.060913, -0.056000, 0.080811, -0.054504,
+ -0.012390, 0.017487, 0.075806, -0.110107, 0.095795, -0.041595,
+ -0.078308, 0.116211, -0.019501, -0.062592, -0.016510, 0.072510,
+ 0.119995, -0.191101, 0.043701, -0.109894, 0.149200, 0.011292,
+ 0.017303, -0.035492, -0.087097, 0.058411, 0.001190, -0.073792,
+ 0.105408, 0.090790, -0.122711, 0.104706
+};
+
+static const float ir_filter_mid[64] = {
+ 0.735413, 0.319214, -0.160614, -0.023285, 0.062500, -0.028290,
+ 0.053497, -0.101410, 0.067505, 0.019897, -0.065491, 0.075897,
+ -0.108002, 0.125397, -0.064301, -0.011414, -0.019104, 0.130310,
+ -0.167389, 0.068207, 0.056702, -0.084503, 0.022705, 0.034790,
+ -0.023285, -0.049286, 0.123901, -0.139587, 0.091003, -0.035492,
+ 0.022308, -0.033508, 0.024506, 0.005096, -0.021790, 0.018494,
+ -0.017090, 0.019501, 0.001312, -0.053894, 0.098511, -0.084900,
+ 0.020294, 0.023285, 0.007111, -0.061096, 0.039398, 0.057098,
+ -0.105896, 0.031494, 0.082703, -0.123291, 0.110596, -0.128601,
+ 0.161499, -0.130310, 0.047699, 0.003296, -0.017700, 0.050110,
+ -0.075012, 0.029205, 0.016602, 0.077515
+};
+
+static const float *ir_filters_lookup[2] = {
+ ir_filter_str, ir_filter_mid
+};
+
/* Core frame sizes in each mode */
static const uint16_t cf_sizes_wb[] = {
132, 177, 253, 285, 317, 365, 397, 461, 477,
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index c20ef9c..5469791 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -63,6 +63,9 @@ typedef struct {
float fixed_gain[5]; ///< quantified fixed gains for the current and previous four subframes
float tilt_coef; ///< {beta_1} related to the voicing of the previous subframe
+
+ float prev_sparse_fixed_gain; ///< previous fixed gain; used by anti-sparseness to determine "onset"
+ uint8_t prev_ir_filter_nr; ///< previous impulse response filter "impNr": 0 - strong, 1 - medium, 2 - none
} AMRWBContext;
static int amrwb_decode_init(AVCodecContext *avctx)
@@ -701,6 +704,98 @@ static float voice_factor(float *p_vector, float p_gain,
return (p_ener - f_ener) / (p_ener + f_ener);
}
+/**
+ * Reduce fixed vector sparseness by smoothing with one of three IR filters.
+ * Also known as "adaptive phase dispersion".
+ * Returns the filtered fixed vector address
+ *
+ * @param ctx [in] the context
+ * @param fixed_vector [in] unfiltered fixed vector
+ * @param out [in] space for modified vector if necessary
+ */
+static const float *anti_sparseness(AMRWBContext *ctx,
+ const float *fixed_vector, float *out)
+{
+ int ir_filter_nr;
+
+ if (ctx->pitch_gain[4] < 0.6) {
+ ir_filter_nr = 0; // strong filtering
+ } else if (ctx->pitch_gain[4] < 0.9) {
+ ir_filter_nr = 1; // medium filtering
+ } else
+ ir_filter_nr = 2; // no filtering
+
+ // detect 'onset'
+ if (ctx->fixed_gain[4] > 3.0 * ctx->fixed_gain[3]) {
+ if (ir_filter_nr < 2)
+ ir_filter_nr++;
+ } else
+ {
+ int i, count = 0;
+
+ for (i = 0; i < 5; i++)
+ if (ctx->pitch_gain[i] < 0.6)
+ count++;
+ if (count > 2)
+ ir_filter_nr = 0;
+
+ if (ir_filter_nr > ctx->prev_ir_filter_nr + 1)
+ ir_filter_nr--;
+ }
+
+ // update ir filter strength history
+ ctx->prev_ir_filter_nr = ir_filter_nr;
+
+ ir_filter_nr += (ctx->fr_cur_mode == MODE_8k85 ? 1 : 0);
+
+ if (ir_filter_nr < 2) {
+ int i, j;
+ const float *coef = ir_filters_lookup[ir_filter_nr];
+
+ /* Circular convolution code in reference
+ * decoder was modified to avoid using one
+ * extra array. The filtered vector is given by:
+ *
+ * c2(n) = sum(i,0,len-1){ c(i) * coef( (n - i + len) % len ) }
+ */
+
+ /* XXX: Based on ref decoder, I guess it is not neccessary
+ * a function like apply_ir_filter() here since we
+ * already have the fixed codebook in its array form and
+ * moreover, this form already has the pitch sharpening while
+ * the sparse codebook has not */
+
+ memset(out, 0, sizeof(float) * AMRWB_SUBFRAME_SIZE);
+ for (i = 0; i < AMRWB_SUBFRAME_SIZE; i++)
+ if (fixed_vector[i]) {
+ int li = AMRWB_SUBFRAME_SIZE - i;
+
+ for (j = 0; j < li; j++)
+ out[i + j] += fixed_vector[i] * coef[j];
+
+ for (j = 0; j < i; j++)
+ out[j] += fixed_vector[i] * coef[j + li];
+ }
+ fixed_vector = out;
+ }
+
+ return fixed_vector;
+}
+
+/**
+ * Update context state before the next subframe
+ *
+ * @param ctx [in] the context
+ */
+static void update_sub_state(AMRWBContext *ctx)
+{
+ ctx->tilt_coef = voice_factor(ctx->pitch_vector, ctx->pitch_gain[4],
+ ctx->fixed_vector, ctx->fixed_gain[4]) * 0.25 + 0.25;
+
+ memmove(&ctx->pitch_gain[0], &ctx->pitch_gain[1], 4 * sizeof(float));
+ memmove(&ctx->fixed_gain[0], &ctx->fixed_gain[1], 4 * sizeof(float));
+}
+
static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
@@ -709,7 +804,9 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AMRFixed fixed_sparse = {0}; // fixed vector up to anti-sparseness processing
+ float spare_vector[AMRWB_SUBFRAME_SIZE]; // extra stack space to hold result from anti-sparseness processing
float fixed_gain_factor; // fixed gain correction factor (gamma)
+ const float *synth_fixed_vector; // pointer to the fixed vector that synthesis should use
int sub, i;
ctx->fr_cur_mode = unpack_bitstream(ctx, buf, buf_size);
@@ -771,17 +868,17 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
// I did not found a reference of this in the ref decoder
}
+ synth_fixed_vector = anti_sparseness(ctx, ctx->fixed_vector,
+ spare_vector);
+
ff_clear_fixed_vector(ctx->fixed_vector, &fixed_sparse,
AMRWB_SUBFRAME_SIZE);
+ update_sub_state(ctx);
}
// update state for next frame
memcpy(ctx->isp_sub4_past, ctx->isp[3], LP_ORDER * sizeof(ctx->isp[3][0]));
- // calculate tilt coefficient for next subframe
- ctx->tilt_coef = voice_factor(ctx->pitch_vector, ctx->pitch_gain[4],
- ctx->fixed_vector, ctx->fixed_gain[4]) * 0.25 + 0.25;
-
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdata.h | 35 ++++++++++++++++
libavcodec/amrwbdec.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 136 insertions(+), 4 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via 0bfa12bd360d233e9caf7024f0912a4004ad8468 (commit)
via 8410690df1a24fbf7dee5d2f0e19082f0b60367c (commit)
from 265198b39f2332026713aa7ebcf5067a25431d52 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0bfa12bd360d233e9caf7024f0912a4004ad8468
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Tue Jul 13 20:55:07 2010 -0300
Generate excitation from gain-scaled pitch and fixed vectors
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 780d933..c20ef9c 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -710,7 +710,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
int buf_size = avpkt->size;
AMRFixed fixed_sparse = {0}; // fixed vector up to anti-sparseness processing
float fixed_gain_factor; // fixed gain correction factor (gamma)
- int sub;
+ int sub, i;
ctx->fr_cur_mode = unpack_bitstream(ctx, buf, buf_size);
@@ -760,6 +760,19 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AMRWB_SUBFRAME_SIZE)/AMRWB_SUBFRAME_SIZE,
ctx->prediction_error,
ENERGY_MEAN, energy_pred_fac);
+
+ /* Construct current excitation */
+ for (i = 0; i < AMRWB_SUBFRAME_SIZE; i++) {
+ ctx->excitation[i] *= ctx->pitch_gain[4];
+ // XXX: Did not used ff_set_fixed_vector like AMR-NB in order
+ // to retain pitch sharpening done to the fixed_vector
+ ctx->excitation[i] += ctx->fixed_gain[4] * ctx->fixed_vector[i];
+ // XXX: Should remove fractional part of excitation like NB?
+ // I did not found a reference of this in the ref decoder
+ }
+
+ ff_clear_fixed_vector(ctx->fixed_vector, &fixed_sparse,
+ AMRWB_SUBFRAME_SIZE);
}
// update state for next frame
commit 8410690df1a24fbf7dee5d2f0e19082f0b60367c
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Tue Jul 13 13:15:19 2010 -0300
Finish calculation of the fixed gain
diff --git a/libavcodec/amrwbdata.h b/libavcodec/amrwbdata.h
index 92eed65..c52fe7a 100644
--- a/libavcodec/amrwbdata.h
+++ b/libavcodec/amrwbdata.h
@@ -25,8 +25,10 @@
#include <stdint.h>
#define LP_ORDER 16 ///< linear predictive coding filter order
-#define MIN_ISF_SPACING 50.0 /* XXX: Taken from fixed-point 26.173, not sure */
+#define MIN_ISF_SPACING 50.0 // XXX: Taken from fixed-point 26.173, not sure
#define PRED_FACTOR (1.0/3.0)
+#define MIN_ENERGY -14.0 ///< initial innnovation energy (dB)
+#define ENERGY_MEAN 30.0 ///< mean innovation energy (dB) in all modes
#define AMRWB_SUBFRAME_SIZE 64 ///< samples per subframe
#define PITCH_MAX 231 ///< maximum received pitch delay value
@@ -1746,6 +1748,9 @@ static const int16_t qua_gain_7b[128][2] = {
{ 20040, 2841}, { 21234, 19833}
};
+/* 4-tap moving average prediction coefficients in reverse order */
+static const float energy_pred_fac[4] = { 0.2, 0.3, 0.4, 0.5 };
+
/* Core frame sizes in each mode */
static const uint16_t cf_sizes_wb[] = {
132, 177, 253, 285, 317, 365, 397, 461, 477,
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 0530872..780d933 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -25,6 +25,7 @@
#include "celp_math.h"
#include "acelp_filters.h"
#include "acelp_vectors.h"
+#include "acelp_pitch_delay.h"
#include "amrwbdata.h"
@@ -57,6 +58,7 @@ typedef struct {
float pitch_vector[AMRWB_SUBFRAME_SIZE]; ///< adaptive codebook (pitch) vector for current subframe
float fixed_vector[AMRWB_SUBFRAME_SIZE]; ///< algebraic codebook (fixed) vector
+ float prediction_error[4]; ///< quantified prediction errors {20log10(^gamma_gc)} for previous four subframes
float pitch_gain[5]; ///< quantified pitch gains for the current and previous four subframes
float fixed_gain[5]; ///< quantified fixed gains for the current and previous four subframes
@@ -75,6 +77,11 @@ static int amrwb_decode_init(AVCodecContext *avctx)
ctx->isp_sub4_past[i] = isp_init[i] / (float) (1 << 15);
}
+ ctx->tilt_coef = 0;
+
+ for (i = 0; i < 4; i++)
+ ctx->prediction_error[i] = MIN_ENERGY;
+
return 0;
}
@@ -746,6 +753,13 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
&fixed_gain_factor, &ctx->pitch_gain[4]);
pitch_sharpening(ctx, &fixed_sparse, ctx->fixed_vector);
+
+ ctx->fixed_gain[4] =
+ ff_amr_set_fixed_gain(fixed_gain_factor,
+ ff_dot_productf(ctx->fixed_vector, ctx->fixed_vector,
+ AMRWB_SUBFRAME_SIZE)/AMRWB_SUBFRAME_SIZE,
+ ctx->prediction_error,
+ ENERGY_MEAN, energy_pred_fac);
}
// update state for next frame
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdata.h | 7 ++++++-
libavcodec/amrwbdec.c | 29 ++++++++++++++++++++++++++++-
2 files changed, 34 insertions(+), 2 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via 265198b39f2332026713aa7ebcf5067a25431d52 (commit)
from 90058508bef6d5043f0d039c1d9d6e8188079df5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 265198b39f2332026713aa7ebcf5067a25431d52
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Mon Jul 12 17:50:08 2010 -0300
Code for pitch sharpening using voice_factor, added cosmetics
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 4def620..0530872 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -22,6 +22,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "lsp.h"
+#include "celp_math.h"
#include "acelp_filters.h"
#include "acelp_vectors.h"
@@ -48,13 +49,18 @@ typedef struct {
float lp_coef[4][LP_ORDER]; ///< Linear Prediction Coefficients from ISP vector
uint8_t base_pitch_lag; ///< integer part of pitch lag for next relative subframe
+ uint8_t pitch_lag_int; ///< integer part of pitch lag of the previous subframe
float excitation_buf[PITCH_MAX + LP_ORDER + 1 + AMRWB_SUBFRAME_SIZE]; ///< current excitation and all necessary excitation history
float *excitation; ///< points to current excitation in excitation_buf[]
float pitch_vector[AMRWB_SUBFRAME_SIZE]; ///< adaptive codebook (pitch) vector for current subframe
+ float fixed_vector[AMRWB_SUBFRAME_SIZE]; ///< algebraic codebook (fixed) vector
- float pitch_gain[5]; ///< quantified pitch gains for the current and previous four subframes
+ float pitch_gain[5]; ///< quantified pitch gains for the current and previous four subframes
+ float fixed_gain[5]; ///< quantified fixed gains for the current and previous four subframes
+
+ float tilt_coef; ///< {beta_1} related to the voicing of the previous subframe
} AMRWBContext;
static int amrwb_decode_init(AVCodecContext *avctx)
@@ -100,7 +106,7 @@ static enum Mode unpack_bitstream(AMRWBContext *ctx, const uint8_t *buf,
/* AMR-WB Auxiliary Information */
ctx->fr_mode_ind = get_bits(&gb, 4);
ctx->fr_mode_req = get_bits(&gb, 4);
- //XXX: Need to check conformity in mode_ind/mode_req and crc?
+ // XXX: Need to check conformity in mode_ind/mode_req and crc?
ctx->fr_crc = get_bits(&gb, 8);
data = (uint16_t *) &ctx->frame;
@@ -212,7 +218,7 @@ static void decode_isf_indices_46b(uint16_t *ind, float *isf_q, uint8_t fr_q) {
}
/**
- * Apply mean and past ISF values using the predicion factor
+ * Apply mean and past ISF values using the prediction factor
* Updates past ISF vector
*
* @param isf_q [in] current quantized ISF
@@ -259,7 +265,7 @@ static void isf_set_min_dist(float *isf, float min_spacing, int size) {
static void interpolate_isp(double isp_q[4][LP_ORDER], double *isp4_past)
{
int i;
- /* XXX: Did not used ff_weighted_vector_sumf because using double */
+ // XXX: Did not used ff_weighted_vector_sumf because using double
for (i = 0; i < LP_ORDER; i++)
isp_q[0][i] = 0.55 * isp4_past[i] + 0.45 * isp_q[3][i];
@@ -283,7 +289,7 @@ static void isp2lp(double isp[LP_ORDER], float *lp, int lp_half_order) {
double pa[MAX_LP_HALF_ORDER+1], qa[MAX_LP_HALF_ORDER+1];
float *lp2 = lp + (lp_half_order << 1);
double last_isp = isp[2 * lp_half_order - 1];
- double qa_old = 0; /* XXX: qa[i-2] assuming qa[-1] = 0, not mentioned in document */
+ double qa_old = 0; // XXX: qa[i-2] assuming qa[-1] = 0, not mentioned in spec
int i;
ff_lsp2polyf(isp, pa, lp_half_order);
@@ -334,7 +340,7 @@ static void decode_pitch_lag_high(int *lag_int, int *lag_frac, int pitch_index,
*lag_int = (pitch_index + 1) >> 2;
*lag_frac = pitch_index - (*lag_int << 2);
*lag_int += *base_lag_int - 8;
- /* XXX: Doesn't seem to need bounding according to TS 26.190 */
+ // XXX: Doesn't seem to need bounding according to TS 26.190
}
}
@@ -391,7 +397,7 @@ static void decode_pitch_vector(AMRWBContext *ctx,
{
int pitch_lag_int, pitch_lag_frac;
int i;
- float *exc = ctx->excitation;
+ float *exc = ctx->excitation;
enum Mode mode = ctx->fr_cur_mode;
if (mode == MODE_6k60) {
@@ -403,8 +409,9 @@ static void decode_pitch_vector(AMRWBContext *ctx,
} else
decode_pitch_lag_high(&pitch_lag_int, &pitch_lag_frac, amr_subframe->adap,
&ctx->base_pitch_lag, subframe);
-
- pitch_lag_int += pitch_lag_frac > 0;
+
+ ctx->pitch_lag_int = pitch_lag_int;
+ pitch_lag_int += pitch_lag_frac > 0;
/* Calculate the pitch vector by interpolating the past excitation at the
pitch lag using a hamming windowed sinc function. */
@@ -435,7 +442,7 @@ static void decode_pitch_vector(AMRWBContext *ctx,
* @param m [in] (log2) Number of potential positions
* @param off [in] Offset for decoded positions
*/
-//XXX: Some of these functions are simple and recurrent (used inline)
+// XXX: Some of these functions are simple and recurrent (used inline)
static inline void decode_1p_track(int *out, int code, int m, int off)
{ ///code: m+1 bits
@@ -506,7 +513,7 @@ static void decode_5p_track(int *out, int code, int m, int off)
decode_3p_track(out, BIT_STR(code, 2*m, 3*m - 2),
m - 1, off + half_3p);
- //XXX: there seems to be a typo in I3p expoent (from reference)
+ // XXX: there seems to be a typo in I3p expoent (from reference)
decode_2p_track(out + 3, BIT_STR(code, 0, 2*m + 1), m, off);
}
@@ -550,7 +557,7 @@ static void decode_6p_track(int *out, int code, int m, int off)
* Decode the algebraic codebook index to pulse positions and signs,
* then construct the algebraic codebook vector.
*
- * @param fixed_sparse [out] pointer to the algebraic (innovative) codebook
+ * @param fixed_sparse [out] pointer to the algebraic codebook
* @param pulse_hi [in] MSBs part of the pulse index array (higher modes only)
* @param pulse_lo [in] LSBs part of the pulse index array
* @param mode [in] mode of the current frame
@@ -644,11 +651,54 @@ static void decode_gains(const uint8_t vq_gain, const enum Mode mode,
*fixed_gain_factor = gains[1] * (1.0 / 2048.0);
}
+/**
+ * Apply pitch sharpening filters to the fixed vector sparse
+ * representation to output the fixed codebook excitation vector
+ *
+ * @param ctx [in] the context
+ * @param fixed_sparse [in] fixed codebook sparse
+ * @param fixed_vector [out] fixed codebook excitation
+ */
+// XXX: Spec states this procedure should be applied when the pitch
+// lag is less than 64, but this checking seems absent in reference and AMR-NB
+static void pitch_sharpening(AMRWBContext *ctx, AMRFixed *fixed_sparse,
+ float *fixed_vector)
+{
+ /* Periodicity enhancement part */
+ fixed_sparse->pitch_lag = ctx->pitch_lag_int;
+ fixed_sparse->pitch_fac = 0.85;
+
+ ff_set_fixed_vector(fixed_vector, fixed_sparse, 1.0,
+ AMRWB_SUBFRAME_SIZE);
+
+ /* Tilt part */
+ ff_weighted_vector_sumf(fixed_vector + 1, fixed_vector + 1, fixed_vector,
+ 1.0, - ctx->tilt_coef, AMRWB_SUBFRAME_SIZE - 1);
+}
+
+/**
+ * Calculate the voicing factor (-1.0 = unvoiced to 1.0 = voiced)
+ *
+ * @param p_vector, f_vector [in] pitch and fixed excitation vectors
+ * @param p_gain, f_gain [in] pitch and fixed gains
+ */
+// XXX: Function extracted from voice_factor() in reference code
+static float voice_factor(float *p_vector, float p_gain,
+ float *f_vector, float f_gain)
+{
+ double p_ener = (double) ff_dot_productf(p_vector, p_vector,
+ AMRWB_SUBFRAME_SIZE) * p_gain * p_gain;
+ double f_ener = (double) ff_dot_productf(f_vector, f_vector,
+ AMRWB_SUBFRAME_SIZE) * f_gain * f_gain;
+
+ return (p_ener - f_ener) / (p_ener + f_ener);
+}
+
static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
AMRWBContext *ctx = avctx->priv_data;
- AMRWBFrame *cf = &ctx->frame;
+ AMRWBFrame *cf = &ctx->frame;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AMRFixed fixed_sparse = {0}; // fixed vector up to anti-sparseness processing
@@ -694,10 +744,16 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
decode_gains(cur_subframe->vq_gain, ctx->fr_cur_mode,
&fixed_gain_factor, &ctx->pitch_gain[4]);
+
+ pitch_sharpening(ctx, &fixed_sparse, ctx->fixed_vector);
}
- //update state for next frame
- memcpy(ctx->isp_sub4_past, ctx->isp[3], LP_ORDER * sizeof(ctx->isp[3][0]));
+ // update state for next frame
+ memcpy(ctx->isp_sub4_past, ctx->isp[3], LP_ORDER * sizeof(ctx->isp[3][0]));
+
+ // calculate tilt coefficient for next subframe
+ ctx->tilt_coef = voice_factor(ctx->pitch_vector, ctx->pitch_gain[4],
+ ctx->fixed_vector, ctx->fixed_gain[4]) * 0.25 + 0.25;
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdec.c | 86 ++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 71 insertions(+), 15 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
Hi
Is there any way to force more data to be passed to decode_frame() of
a decoder? G.723.1 has 4 frame types, each of size 24, 20, 10 and 1
byte. For a particular frame of type 0, only 16B of data is being
passed to decode_frame() when obviously 24B are needed. Is using a
parser the only solution?
Thanks
Naufal
4
6
11 Jul '10
- Log -----------------------------------------------------------------
commit d130193470ccf5ead3b2bd33d2672fedaad61155
Author: Naufal <naufal11(a)gmail.com>
Date: Mon Jul 12 04:29:00 2010 +0530
Add a parser for G.723.1
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index d3cd00b..25a7b7b 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -552,6 +552,7 @@ OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o
OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o
OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsub_parser.o
OBJS-$(CONFIG_DVDSUB_PARSER) += dvdsub_parser.o
+OBJS-$(CONFIG_G723_1_PARSER) += g723_1_parser.o
OBJS-$(CONFIG_H261_PARSER) += h261_parser.o
OBJS-$(CONFIG_H263_PARSER) += h263_parser.o
OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264.o \
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 696ed3c..efae9ae 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -363,6 +363,7 @@ void avcodec_register_all(void)
REGISTER_PARSER (DNXHD, dnxhd);
REGISTER_PARSER (DVBSUB, dvbsub);
REGISTER_PARSER (DVDSUB, dvdsub);
+ REGISTER_PARSER (G723_1, g723_1);
REGISTER_PARSER (H261, h261);
REGISTER_PARSER (H263, h263);
REGISTER_PARSER (H264, h264);
diff --git a/libavcodec/g723_1_parser.c b/libavcodec/g723_1_parser.c
new file mode 100644
index 0000000..26cae6f
--- /dev/null
+++ b/libavcodec/g723_1_parser.c
@@ -0,0 +1,75 @@
+/*
+ * @file
+ * G.723.1 parser
+ *
+ * Copyright (c) 2003 Fabrice Bellard
+ * Copyright (c) 2003 Michael Niedermayer
+ * Copyright (c) 2010 Martin Storsjo
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "parser.h"
+#include "g723_1_data.h"
+
+typedef struct {
+ ParseContext pc;
+ int frame_size;
+} G723_1_ParseContext;
+
+static int g723_1_parse(AVCodecParserContext *s1,
+ AVCodecContext *avctx,
+ const uint8_t **poutbuf, int *poutbuf_size,
+ const uint8_t *buf, int buf_size)
+{
+ G723_1_ParseContext *s = s1->priv_data;
+ ParseContext *pc = &s->pc;
+ int next = END_NOT_FOUND, i;
+
+ for (i = 0; i < buf_size; ) {
+ if (s->frame_size) {
+ int inc = FFMIN(buf_size - i, s->frame_size);
+ i += inc;
+ s->frame_size -= inc;
+
+ if (!s->frame_size) {
+ next = i;
+ break;
+ }
+ } else {
+ s->frame_size = frame_size[buf[i] & 3];
+ }
+ }
+
+ if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
+ *poutbuf = NULL;
+ *poutbuf_size = 0;
+ return buf_size;
+ }
+
+ *poutbuf = buf;
+ *poutbuf_size = buf_size;
+ return next;
+}
+
+AVCodecParser g723_1_parser = {
+ {CODEC_ID_G723_1},
+ sizeof(G723_1_ParseContext),
+ NULL,
+ g723_1_parse,
+ ff_parse_close,
+};
commit 9864feb61935c4945ab337bb6650603b6c5a557a
Author: Naufal <naufal11(a)gmail.com>
Date: Mon Jul 12 02:02:02 2010 +0530
Make LSP VQ tables 2D
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 90c77ea..44c5a44 100755
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -232,7 +232,7 @@ static int16_t scale_vector(int16_t *vector, int16_t length)
* @param prev_lsp the previous LSP vector
*/
static void inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp,
- int8_t *lsp_index, int bad_frame)
+ uint8_t *lsp_index, int bad_frame)
{
int min_dist, pred;
int i, j, temp1, temp2, stable;
@@ -241,9 +241,6 @@ static void inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp,
if (!bad_frame) {
min_dist = 0x100;
pred = 12288;
- lsp_index[0] *= 3;
- lsp_index[1] *= 3;
- lsp_index[2] *= 4;
} else {
min_dist = 0x200;
pred = 23552;
@@ -251,16 +248,16 @@ static void inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp,
}
// Get the VQ table entry corresponding to the transmitted index
- cur_lsp[0] = lsp_band0[lsp_index[0]];
- cur_lsp[1] = lsp_band0[lsp_index[0] + 1];
- cur_lsp[2] = lsp_band0[lsp_index[0] + 2];
- cur_lsp[3] = lsp_band1[lsp_index[1]];
- cur_lsp[4] = lsp_band1[lsp_index[1] + 1];
- cur_lsp[5] = lsp_band1[lsp_index[1] + 2];
- cur_lsp[6] = lsp_band2[lsp_index[2]];
- cur_lsp[7] = lsp_band2[lsp_index[2] + 1];
- cur_lsp[8] = lsp_band2[lsp_index[2] + 2];
- cur_lsp[9] = lsp_band2[lsp_index[2] + 3];
+ cur_lsp[0] = lsp_band0[lsp_index[0]][0];
+ cur_lsp[1] = lsp_band0[lsp_index[0]][1];
+ cur_lsp[2] = lsp_band0[lsp_index[0]][2];
+ cur_lsp[3] = lsp_band1[lsp_index[1]][0];
+ cur_lsp[4] = lsp_band1[lsp_index[1]][1];
+ cur_lsp[5] = lsp_band1[lsp_index[1]][2];
+ cur_lsp[6] = lsp_band2[lsp_index[2]][0];
+ cur_lsp[7] = lsp_band2[lsp_index[2]][1];
+ cur_lsp[8] = lsp_band2[lsp_index[2]][2];
+ cur_lsp[9] = lsp_band2[lsp_index[2]][3];
// Add predicted vector & DC component to the previously quantized vector
for (i = 0; i < LPC_ORDER; i++) {
diff --git a/libavcodec/g723_1_data.h b/libavcodec/g723_1_data.h
index 402d08f..4daf6d2 100644
--- a/libavcodec/g723_1_data.h
+++ b/libavcodec/g723_1_data.h
@@ -144,781 +144,313 @@ static const int16_t cos_tab[512] = {
/*
* LSP VQ tables
*/
-static const int16_t lsp_band0[LSP_CB_SIZE * 3] = {
- 0, 0, 0,
- -270, -1372, -1032,
- -541, -1650, -1382,
- -723, -2011, -2213,
- -941, -1122, -1942,
- -780, -1145, -2454,
- -884, -1309, -1373,
- -1051, -1523, -1766,
- -1083, -1622, -2300,
- -777, -1377, -2147,
- -935, -1467, -2763,
- -802, -1327, -3471,
- -935, -1959, -3999,
- -240, -89, 222,
- -661, -257, -160,
- -994, -466, -419,
- -188, -164, -278,
- -342, -512, -415,
- -607, -511, -797,
- 16, 19, -716,
- 374, 425, -972,
- -346, 245, -282,
- -265, 506, -754,
- -620, -147, 1955,
- -742, -860, 2597,
- -150, -352, 2704,
- 305, 880, 1954,
- 123, 731, 2766,
- -348, 765, 3327,
- 618, 221, 3258,
- -178, -47, 4219,
- 393, 1304, 3842,
- 698, 1702, 4801,
- 63, -584, 1229,
- -215, -732, 1704,
- 172, -335, 1909,
- -2, 216, 1797,
- 353, 127, 2205,
- -1208, 188, 11,
- -513, -75, -683,
- -973, 222, -646,
- -616, -843, -388,
- -950, -1113, -359,
- -1431, -623, -705,
- -1398, -1063, -178,
- -45, -461, 35,
- -9, -657, -216,
- 127, -1078, 95,
- -950, -1156, 584,
- -1480, -1494, 449,
- -120, -705, 516,
- -368, -961, 727,
- -378, -526, 973,
- -793, -614, 676,
- -801, -755, 1287,
- -1476, -340, 1636,
- -505, -1254, 1543,
- -1243, -1622, 1532,
- -776, -1477, -655,
- -1151, -1296, -823,
- -1153, -1672, -1124,
- -1291, -2003, -1702,
- -622, -1283, 57,
- -471, -1611, 509,
- -1060, -1570, -139,
- -873, -2156, -536,
- -1716, -2021, -364,
- -2150, -3218, -1291,
- -1248, -1945, -2904,
- -1215, -2633, -2855,
- 167, -244, 84,
- 349, -412, -217,
- -40, -352, 632,
- 227, -529, 405,
- 68, -383, -443,
- 167, -558, -706,
- -275, -854, -14,
- -351, -1089, -449,
- 341, -72, -289,
- 603, -106, -474,
- 322, -219, -649,
- 179, -317, -998,
- 450, -291, -996,
- 555, 195, -525,
- 784, 272, -831,
- -148, -384, -849,
- 82, -536, -1357,
- 238, -172, -1354,
- 422, -268, -1841,
- 297, -737, -2079,
- -111, -801, -598,
- 1, -668, -984,
- -131, -818, -1299,
- -329, -521, -1310,
- -151, -778, -1834,
- -93, -352, -1746,
- -568, -640, -1821,
- -509, -941, -2183,
- 464, -815, -1250,
- 79, -1133, -1597,
- -184, -1353, -2123,
- -196, -410, -2427,
- -192, -833, -2810,
- -259, -1382, -3045,
- -217, 4, -1166,
- -800, -325, -1219,
- -363, -830, -898,
- -661, -1134, -960,
- -386, -980, -1501,
- -627, -1159, -1722,
- -903, -829, -855,
- -685, -829, -1313,
- -1065, -959, -1405,
- 441, 25, -847,
- 655, -27, -1181,
- 1159, -110, -705,
- 856, 253, -1671,
- 415, 404, -1,
- 322, 903, -398,
- 670, 499, -292,
- 803, 591, -610,
- 1144, 591, -814,
- 717, 183, 393,
- 857, 381, 106,
- 609, 62, -27,
- 792, 198, -325,
- 735, 805, 88,
- 1142, 812, 78,
- 1028, 366, -292,
- 1309, 743, -237,
- 1615, 589, -79,
- 1010, 639, -243,
- 999, 964, -311,
- 1500, 1137, -615,
- 988, 357, 646,
- 1227, 667, 683,
- 1164, 1565, 894,
- 1392, 2015, 477,
- 1138, 533, 250,
- 1437, 896, 391,
- 1765, 1118, 99,
- 1112, 1090, 802,
- 1596, 846, 1134,
- 937, 1161, 279,
- 1719, 1254, 683,
- 1338, 1086, 35,
- 1419, 1324, 428,
- 1428, 1524, 40,
- 2108, 1594, 89,
- 1015, 544, 1222,
- 1121, 925, 1263,
- 1030, 1318, 1485,
- 1295, 789, 1817,
- 1323, 1272, 1909,
- 1724, 1237, 1803,
- 1797, 1689, 858,
- 2149, 1367, 1301,
- 2302, 1867, 761,
- 2863, 2351, 1053,
- 52, 163, -76,
- 230, 309, -492,
- -71, 619, 39,
- -218, 856, 499,
- -654, 736, -207,
- -535, 1259, 155,
- -480, 1476, 643,
- 262, 1081, 102,
- 309, 1592, -182,
- 627, 1629, 534,
- 337, 643, 456,
- 758, 670, 713,
- 202, 1126, 658,
- 612, 1131, 666,
- 686, 1223, 1136,
- -131, 377, 525,
- 42, 708, 907,
- 87, 1488, 1035,
- 432, 2117, 904,
- 137, 981, 1332,
- -447, 1014, 1136,
- -839, 1793, 1246,
- -559, 297, 198,
- -850, 685, 446,
- -1273, 632, 826,
- -401, -544, 173,
- -753, -793, 144,
- -436, -9, 772,
- -115, -243, 1310,
- -670, -269, 374,
- -1027, -13, 639,
- -887, -81, 1137,
- -1277, -455, 158,
- -1411, -720, 736,
- 172, 88, 403,
- 386, 255, 756,
- -500, 522, 910,
- -958, 659, 1388,
- -395, 301, 1344,
- -356, 768, 1813,
- -613, 841, 2419,
- 445, -122, 252,
- 629, -87, 723,
- 283, -253, 870,
- 456, -116, 1381,
- 757, 180, 1059,
- 532, 408, 1509,
- 947, 288, 1806,
- 1325, 994, 2524,
- 892, 1219, 3023,
- 1397, 1596, 3406,
- 1143, 1552, 2546,
- 1850, 1433, 2710,
- -10, 134, 1002,
- 154, 499, 1323,
- 508, 792, 1117,
- 509, 1340, 1616,
- 762, 862, 1608,
- 787, 740, 2320,
- 794, 1727, 1283,
- 465, 2108, 1660,
- -120, 1451, 1613,
- -386, 2016, 2169,
- 891, 1225, 2050,
- 456, 1480, 2185,
- 1493, 1283, 1209,
- 1397, 1636, 1518,
- 1776, 1738, 1552,
- 1572, 1698, 2141,
- 1389, 2126, 1271,
- 1959, 2413, 1119,
- 1365, 2892, 1505,
- 2206, 1971, 1623,
- 2076, 1950, 2280,
- 1717, 2291, 1867,
- 2366, 2515, 1953,
- 2865, 2838, 2522,
- 2535, 3465, 2011,
- 3381, 4127, 2638,
- 836, 2667, 2289,
- 1761, 2773, 2337,
- 1415, 3325, 2911,
- 2354, 3138, 3126,
- 2659, 4192, 4010,
- 1048, 1786, 1818,
- 1242, 2111, 2240,
- 1512, 2079, 2780,
- 1573, 2491, 3138,
- 2230, 2377, 2782,
- 416, 1773, 2704,
- 725, 2336, 3297,
- 1252, 2373, 3978,
- 2094, 2268, 3568,
- 2011, 2712, 4528,
- 1341, 3507, 3876,
- 1216, 3919, 4922,
- 1693, 4793, 6012,
+static const int16_t lsp_band0[LSP_CB_SIZE][3] = {
+ { 0, 0, 0}, { -270, -1372, -1032}, { -541, -1650, -1382},
+ { -723, -2011, -2213}, { -941, -1122, -1942}, { -780, -1145, -2454},
+ { -884, -1309, -1373}, {-1051, -1523, -1766}, {-1083, -1622, -2300},
+ { -777, -1377, -2147}, { -935, -1467, -2763}, { -802, -1327, -3471},
+ { -935, -1959, -3999}, { -240, -89, 222}, { -661, -257, -160},
+ { -994, -466, -419}, { -188, -164, -278}, { -342, -512, -415},
+ { -607, -511, -797}, { 16, 19, -716}, { 374, 425, -972},
+ { -346, 245, -282}, { -265, 506, -754}, { -620, -147, 1955},
+ { -742, -860, 2597}, { -150, -352, 2704}, { 305, 880, 1954},
+ { 123, 731, 2766}, { -348, 765, 3327}, { 618, 221, 3258},
+ { -178, -47, 4219}, { 393, 1304, 3842}, { 698, 1702, 4801},
+ { 63, -584, 1229}, { -215, -732, 1704}, { 172, -335, 1909},
+ { -2, 216, 1797}, { 353, 127, 2205}, {-1208, 188, 11},
+ { -513, -75, -683}, { -973, 222, -646}, { -616, -843, -388},
+ { -950, -1113, -359}, {-1431, -623, -705}, {-1398, -1063, -178},
+ { -45, -461, 35}, { -9, -657, -216}, { 127, -1078, 95},
+ { -950, -1156, 584}, {-1480, -1494, 449}, { -120, -705, 516},
+ { -368, -961, 727}, { -378, -526, 973}, { -793, -614, 676},
+ { -801, -755, 1287}, {-1476, -340, 1636}, { -505, -1254, 1543},
+ {-1243, -1622, 1532}, { -776, -1477, -655}, {-1151, -1296, -823},
+ {-1153, -1672, -1124}, {-1291, -2003, -1702}, { -622, -1283, 57},
+ { -471, -1611, 509}, {-1060, -1570, -139}, { -873, -2156, -536},
+ {-1716, -2021, -364}, {-2150, -3218, -1291}, {-1248, -1945, -2904},
+ {-1215, -2633, -2855}, { 167, -244, 84}, { 349, -412, -217},
+ { -40, -352, 632}, { 227, -529, 405}, { 68, -383, -443},
+ { 167, -558, -706}, { -275, -854, -14}, { -351, -1089, -449},
+ { 341, -72, -289}, { 603, -106, -474}, { 322, -219, -649},
+ { 179, -317, -998}, { 450, -291, -996}, { 555, 195, -525},
+ { 784, 272, -831}, { -148, -384, -849}, { 82, -536, -1357},
+ { 238, -172, -1354}, { 422, -268, -1841}, { 297, -737, -2079},
+ { -111, -801, -598}, { 1, -668, -984}, { -131, -818, -1299},
+ { -329, -521, -1310}, { -151, -778, -1834}, { -93, -352, -1746},
+ { -568, -640, -1821}, { -509, -941, -2183}, { 464, -815, -1250},
+ { 79, -1133, -1597}, { -184, -1353, -2123}, { -196, -410, -2427},
+ { -192, -833, -2810}, { -259, -1382, -3045}, { -217, 4, -1166},
+ { -800, -325, -1219}, { -363, -830, -898}, { -661, -1134, -960},
+ { -386, -980, -1501}, { -627, -1159, -1722}, { -903, -829, -855},
+ { -685, -829, -1313}, {-1065, -959, -1405}, { 441, 25, -847},
+ { 655, -27, -1181}, { 1159, -110, -705}, { 856, 253, -1671},
+ { 415, 404, -1}, { 322, 903, -398}, { 670, 499, -292},
+ { 803, 591, -610}, { 1144, 591, -814}, { 717, 183, 393},
+ { 857, 381, 106}, { 609, 62, -27}, { 792, 198, -325},
+ { 735, 805, 88}, { 1142, 812, 78}, { 1028, 366, -292},
+ { 1309, 743, -237}, { 1615, 589, -79}, { 1010, 639, -243},
+ { 999, 964, -311}, { 1500, 1137, -615}, { 988, 357, 646},
+ { 1227, 667, 683}, { 1164, 1565, 894}, { 1392, 2015, 477},
+ { 1138, 533, 250}, { 1437, 896, 391}, { 1765, 1118, 99},
+ { 1112, 1090, 802}, { 1596, 846, 1134}, { 937, 1161, 279},
+ { 1719, 1254, 683}, { 1338, 1086, 35}, { 1419, 1324, 428},
+ { 1428, 1524, 40}, { 2108, 1594, 89}, { 1015, 544, 1222},
+ { 1121, 925, 1263}, { 1030, 1318, 1485}, { 1295, 789, 1817},
+ { 1323, 1272, 1909}, { 1724, 1237, 1803}, { 1797, 1689, 858},
+ { 2149, 1367, 1301}, { 2302, 1867, 761}, { 2863, 2351, 1053},
+ { 52, 163, -76}, { 230, 309, -492}, { -71, 619, 39},
+ { -218, 856, 499}, { -654, 736, -207}, { -535, 1259, 155},
+ { -480, 1476, 643}, { 262, 1081, 102}, { 309, 1592, -182},
+ { 627, 1629, 534}, { 337, 643, 456}, { 758, 670, 713},
+ { 202, 1126, 658}, { 612, 1131, 666}, { 686, 1223, 1136},
+ { -131, 377, 525}, { 42, 708, 907}, { 87, 1488, 1035},
+ { 432, 2117, 904}, { 137, 981, 1332}, { -447, 1014, 1136},
+ { -839, 1793, 1246}, { -559, 297, 198}, { -850, 685, 446},
+ {-1273, 632, 826}, { -401, -544, 173}, { -753, -793, 144},
+ { -436, -9, 772}, { -115, -243, 1310}, { -670, -269, 374},
+ {-1027, -13, 639}, { -887, -81, 1137}, {-1277, -455, 158},
+ {-1411, -720, 736}, { 172, 88, 403}, { 386, 255, 756},
+ { -500, 522, 910}, { -958, 659, 1388}, { -395, 301, 1344},
+ { -356, 768, 1813}, { -613, 841, 2419}, { 445, -122, 252},
+ { 629, -87, 723}, { 283, -253, 870}, { 456, -116, 1381},
+ { 757, 180, 1059}, { 532, 408, 1509}, { 947, 288, 1806},
+ { 1325, 994, 2524}, { 892, 1219, 3023}, { 1397, 1596, 3406},
+ { 1143, 1552, 2546}, { 1850, 1433, 2710}, { -10, 134, 1002},
+ { 154, 499, 1323}, { 508, 792, 1117}, { 509, 1340, 1616},
+ { 762, 862, 1608}, { 787, 740, 2320}, { 794, 1727, 1283},
+ { 465, 2108, 1660}, { -120, 1451, 1613}, { -386, 2016, 2169},
+ { 891, 1225, 2050}, { 456, 1480, 2185}, { 1493, 1283, 1209},
+ { 1397, 1636, 1518}, { 1776, 1738, 1552}, { 1572, 1698, 2141},
+ { 1389, 2126, 1271}, { 1959, 2413, 1119}, { 1365, 2892, 1505},
+ { 2206, 1971, 1623}, { 2076, 1950, 2280}, { 1717, 2291, 1867},
+ { 2366, 2515, 1953}, { 2865, 2838, 2522}, { 2535, 3465, 2011},
+ { 3381, 4127, 2638}, { 836, 2667, 2289}, { 1761, 2773, 2337},
+ { 1415, 3325, 2911}, { 2354, 3138, 3126}, { 2659, 4192, 4010},
+ { 1048, 1786, 1818}, { 1242, 2111, 2240}, { 1512, 2079, 2780},
+ { 1573, 2491, 3138}, { 2230, 2377, 2782}, { 416, 1773, 2704},
+ { 725, 2336, 3297}, { 1252, 2373, 3978}, { 2094, 2268, 3568},
+ { 2011, 2712, 4528}, { 1341, 3507, 3876}, { 1216, 3919, 4922},
+ { 1693, 4793, 6012}
};
-static const int16_t lsp_band1[LSP_CB_SIZE * 3] = {
- 0, 0, 0,
- -2114, -1302, 76,
- -2652, -1278, -1368,
- -2847, -828, -349,
- -3812, -2190, -349,
- -3946, -364, -449,
- -2725, -4492, -3607,
- -3495, -4764, -1744,
- -51, -756, 84,
- -153, -1191, 504,
- 108, -1418, 1167,
- -835, -896, 390,
- -569, -1702, 87,
- -1151, -1818, 933,
- -1826, -2547, 411,
- -1842, -1818, 1451,
- -2438, -1611, 781,
- -2747, -2477, 1311,
- -940, 1252, 477,
- -1629, 1688, 602,
- -1202, 617, 280,
- -1737, 393, 580,
- -1528, 1077, 1199,
- -2165, -161, 1408,
- -2504, -1087, 2371,
- -3458, -175, 1395,
- -1397, -98, -843,
- -2252, -177, -1149,
- -1489, -726, -1283,
- -1558, -265, -1744,
- -1867, -821, -1897,
- -2062, -1516, -2340,
- -2595, -1142, -2861,
- 170, 46, -819,
- -193, -204, -1151,
- 326, -196, -1532,
- 780, 329, -816,
- 201, 369, -1243,
- 650, -209, -1060,
- 1144, -15, -1216,
- 1203, -259, -1867,
- -890, -564, -1430,
- -638, -852, -1921,
- 177, -739, -1358,
- -261, -526, -1666,
- 206, -407, -2255,
- 338, -526, -822,
- 421, -1095, -1009,
- 765, -607, -1408,
- 825, -1295, -2004,
- 357, -905, -1815,
- -58, -1248, -1588,
- -596, -1436, -2046,
- -73, -1159, -2116,
- -115, -1382, -2581,
- -160, -1723, -1952,
- -6, -2196, -2954,
- -649, -1705, -2603,
- -617, -1453, -3282,
- -949, -2019, -3102,
- -812, 1544, 1937,
- -1854, 574, 2000,
- -1463, 1140, 2649,
- -2683, 1748, 1452,
- -2486, 2241, 2523,
- 783, 1910, 1435,
- 581, 2682, 1376,
- 236, 2197, 1885,
- -453, 2943, 2057,
- -682, 2178, 2565,
- -1342, 3201, 3328,
- -288, -184, 262,
- 121, -149, -183,
- 758, -412, 206,
- 1038, -204, 853,
- 1577, -457, 700,
- 937, -640, -567,
- 1508, -528, -1024,
- -225, -527, -427,
- -564, -1095, -332,
- -742, -353, -186,
- -1288, -459, 84,
- -1853, -484, -274,
- -1554, -731, 825,
- -2425, -234, 382,
- -1722, 293, -271,
- -2515, 425, -564,
- -2599, 818, 464,
- -358, 118, -375,
- -613, 198, -874,
- -690, 683, -324,
- -1352, 1155, -168,
- -1093, 129, -324,
- -1184, 611, -858,
- 433, 386, -372,
- -120, 486, -634,
- 234, 851, -631,
- 602, 128, 46,
- 1099, 410, 159,
- 715, -145, -424,
- 1198, -85, -593,
- 1390, 367, -358,
- 1683, 362, -964,
- 1711, 622, 45,
- 2033, 833, -383,
- 2890, 549, -506,
- 7, 401, 52,
- 72, 811, 415,
- 566, 668, 41,
- 467, 1218, 130,
- 68, 957, -187,
- -25, 1649, -103,
- -661, 260, 214,
- -925, -94, 612,
- -321, -422, 965,
- -788, -672, 1783,
- 400, -673, 779,
- 741, -595, 1635,
- -161, 307, 657,
- -382, 836, 871,
- -814, 400, 1223,
- 364, 606, 1247,
- 57, 75, 1571,
- 151, 471, 2287,
- -81, 1021, 1502,
- 227, 1470, 1097,
- 658, 1275, 1653,
- 664, 1478, 2377,
- 263, -127, 444,
- 264, 89, 969,
- 794, 171, 576,
- 821, 186, 1226,
- 404, 462, 517,
- 339, 918, 794,
- 1280, 1423, 196,
- 1453, 2019, 365,
- 1615, 1481, 672,
- 2394, 1708, 508,
- 806, 1238, 573,
- 713, 1158, 1078,
- 1285, 1436, 1232,
- 1790, 1188, 1141,
- 765, 643, 864,
- 1032, 797, 1279,
- 900, 563, 1827,
- 1514, 673, 2312,
- 1544, 1129, 3240,
- 1469, 1050, 1594,
- 1945, 1318, 1988,
- 2397, 2026, 2060,
- 3538, 2057, 2620,
- 1249, -118, 74,
- 1727, 194, 421,
- 2078, -50, -463,
- 970, 688, -432,
- 1149, 952, -110,
- 1254, 1275, -651,
- 1386, 929, 401,
- 1960, 1167, 232,
- 407, -752, -243,
- 859, -1118, 172,
- -227, -860, -992,
- -796, -1175, -1380,
- 8, -1282, -388,
- 353, -1781, -1037,
- -732, -397, -807,
- -853, -28, -1342,
- -1229, -1207, -1959,
- -1015, -1125, -2543,
- -1452, -1791, -2725,
- -1891, -2416, -3269,
- -918, -1629, -783,
- -580, -2155, -698,
- -1097, -2364, -96,
- -1387, -1513, 7,
- -1588, -2076, -664,
- -1473, -2740, -784,
- -2378, -3149, -56,
- -2856, -2092, -169,
- -3391, -3708, 316,
- -1176, -890, -614,
- -1944, -1061, -800,
- -299, -1517, -1000,
- -640, -1850, -1526,
- -1454, -1536, -1233,
- -1890, -1955, -1756,
- -1086, -1921, -2122,
- -750, -2325, -2260,
- -1325, -2413, -2673,
- -1114, -2542, -3459,
- -1341, -2901, -3963,
- -1160, -2226, -1393,
- -1001, -2772, -1573,
- -1594, -2641, -1978,
- -1534, -3046, -2624,
- -2224, -2196, -675,
- -2807, -3054, -1102,
- -2008, -2840, -1186,
- -1980, -3332, -1695,
- -1715, -3562, -505,
- -2527, -4000, -1887,
- -2333, -2734, -2296,
- -3440, -2401, -3211,
- -2008, -3528, -3337,
- -2247, -3291, -4510,
- -475, 949, 155,
- -149, 1365, 545,
- -757, 1644, 1083,
- -217, 2053, 1353,
- -1433, 2301, 1462,
- 495, 1661, 529,
- 10, 2037, 740,
- 2082, 1898, 978,
- 2831, 2294, 911,
- 842, 793, 420,
- 1223, 1023, 863,
- 1237, 451, 780,
- 1744, 708, 822,
- 1533, 284, 1384,
- 2135, 609, 1538,
- 2305, 626, 540,
- 2368, 1187, 955,
- 2586, 1255, -7,
- 3116, 1131, 726,
- 3431, 1730, 428,
- 2734, 1648, 1307,
- 2988, 1231, 2010,
- 3523, 2024, 1488,
- 1034, 1657, 871,
- 1206, 2163, 1036,
- 1807, 2372, 1233,
- 1808, 1769, 1493,
- 1573, 2332, 1779,
- 1216, 1609, 1866,
- 1480, 1898, 2513,
- 465, 2708, 2776,
- 771, 3638, 3338,
- 1869, 2599, 2623,
- 2825, 2745, 2468,
- 2638, 2439, 1585,
- 2094, 2970, 1308,
- 2022, 3057, 1999,
- 3428, 2912, 1816,
- 4536, 2974, 2129,
- 1046, 2563, 2086,
- 1363, 3562, 2318,
- 2511, 1891, 2984,
- 1866, 2306, 3986,
- 3272, 2924, 3682,
- 3146, 3564, 2272,
- 3592, 3968, 2822,
- 2431, 3369, 3069,
- 1931, 4709, 3090,
- 2629, 4220, 3986,
- 4639, 4056, 3664,
- 4035, 5334, 4912,
+static const int16_t lsp_band1[LSP_CB_SIZE][3] = {
+ { 0, 0, 0}, {-2114, -1302, 76}, {-2652, -1278, -1368},
+ {-2847, -828, -349}, {-3812, -2190, -349}, {-3946, -364, -449},
+ {-2725, -4492, -3607}, {-3495, -4764, -1744}, { -51, -756, 84},
+ { -153, -1191, 504}, { 108, -1418, 1167}, { -835, -896, 390},
+ { -569, -1702, 87}, {-1151, -1818, 933}, {-1826, -2547, 411},
+ {-1842, -1818, 1451}, {-2438, -1611, 781}, {-2747, -2477, 1311},
+ { -940, 1252, 477}, {-1629, 1688, 602}, {-1202, 617, 280},
+ {-1737, 393, 580}, {-1528, 1077, 1199}, {-2165, -161, 1408},
+ {-2504, -1087, 2371}, {-3458, -175, 1395}, {-1397, -98, -843},
+ {-2252, -177, -1149}, {-1489, -726, -1283}, {-1558, -265, -1744},
+ {-1867, -821, -1897}, {-2062, -1516, -2340}, {-2595, -1142, -2861},
+ { 170, 46, -819}, { -193, -204, -1151}, { 326, -196, -1532},
+ { 780, 329, -816}, { 201, 369, -1243}, { 650, -209, -1060},
+ { 1144, -15, -1216}, { 1203, -259, -1867}, { -890, -564, -1430},
+ { -638, -852, -1921}, { 177, -739, -1358}, { -261, -526, -1666},
+ { 206, -407, -2255}, { 338, -526, -822}, { 421, -1095, -1009},
+ { 765, -607, -1408}, { 825, -1295, -2004}, { 357, -905, -1815},
+ { -58, -1248, -1588}, { -596, -1436, -2046}, { -73, -1159, -2116},
+ { -115, -1382, -2581}, { -160, -1723, -1952}, { -6, -2196, -2954},
+ { -649, -1705, -2603}, { -617, -1453, -3282}, { -949, -2019, -3102},
+ { -812, 1544, 1937}, {-1854, 574, 2000}, {-1463, 1140, 2649},
+ {-2683, 1748, 1452}, {-2486, 2241, 2523}, { 783, 1910, 1435},
+ { 581, 2682, 1376}, { 236, 2197, 1885}, { -453, 2943, 2057},
+ { -682, 2178, 2565}, {-1342, 3201, 3328}, { -288, -184, 262},
+ { 121, -149, -183}, { 758, -412, 206}, { 1038, -204, 853},
+ { 1577, -457, 700}, { 937, -640, -567}, { 1508, -528, -1024},
+ { -225, -527, -427}, { -564, -1095, -332}, { -742, -353, -186},
+ {-1288, -459, 84}, {-1853, -484, -274}, {-1554, -731, 825},
+ {-2425, -234, 382}, {-1722, 293, -271}, {-2515, 425, -564},
+ {-2599, 818, 464}, { -358, 118, -375}, { -613, 198, -874},
+ { -690, 683, -324}, {-1352, 1155, -168}, {-1093, 129, -324},
+ {-1184, 611, -858}, { 433, 386, -372}, { -120, 486, -634},
+ { 234, 851, -631}, { 602, 128, 46}, { 1099, 410, 159},
+ { 715, -145, -424}, { 1198, -85, -593}, { 1390, 367, -358},
+ { 1683, 362, -964}, { 1711, 622, 45}, { 2033, 833, -383},
+ { 2890, 549, -506}, { 7, 401, 52}, { 72, 811, 415},
+ { 566, 668, 41}, { 467, 1218, 130}, { 68, 957, -187},
+ { -25, 1649, -103}, { -661, 260, 214}, { -925, -94, 612},
+ { -321, -422, 965}, { -788, -672, 1783}, { 400, -673, 779},
+ { 741, -595, 1635}, { -161, 307, 657}, { -382, 836, 871},
+ { -814, 400, 1223}, { 364, 606, 1247}, { 57, 75, 1571},
+ { 151, 471, 2287}, { -81, 1021, 1502}, { 227, 1470, 1097},
+ { 658, 1275, 1653}, { 664, 1478, 2377}, { 263, -127, 444},
+ { 264, 89, 969}, { 794, 171, 576}, { 821, 186, 1226},
+ { 404, 462, 517}, { 339, 918, 794}, { 1280, 1423, 196},
+ { 1453, 2019, 365}, { 1615, 1481, 672}, { 2394, 1708, 508},
+ { 806, 1238, 573}, { 713, 1158, 1078}, { 1285, 1436, 1232},
+ { 1790, 1188, 1141}, { 765, 643, 864}, { 1032, 797, 1279},
+ { 900, 563, 1827}, { 1514, 673, 2312}, { 1544, 1129, 3240},
+ { 1469, 1050, 1594}, { 1945, 1318, 1988}, { 2397, 2026, 2060},
+ { 3538, 2057, 2620}, { 1249, -118, 74}, { 1727, 194, 421},
+ { 2078, -50, -463}, { 970, 688, -432}, { 1149, 952, -110},
+ { 1254, 1275, -651}, { 1386, 929, 401}, { 1960, 1167, 232},
+ { 407, -752, -243}, { 859, -1118, 172}, { -227, -860, -992},
+ { -796, -1175, -1380}, { 8, -1282, -388}, { 353, -1781, -1037},
+ { -732, -397, -807}, { -853, -28, -1342}, {-1229, -1207, -1959},
+ {-1015, -1125, -2543}, {-1452, -1791, -2725}, {-1891, -2416, -3269},
+ { -918, -1629, -783}, { -580, -2155, -698}, {-1097, -2364, -96},
+ {-1387, -1513, 7}, {-1588, -2076, -664}, {-1473, -2740, -784},
+ {-2378, -3149, -56}, {-2856, -2092, -169}, {-3391, -3708, 316},
+ {-1176, -890, -614}, {-1944, -1061, -800}, { -299, -1517, -1000},
+ { -640, -1850, -1526}, {-1454, -1536, -1233}, {-1890, -1955, -1756},
+ {-1086, -1921, -2122}, { -750, -2325, -2260}, {-1325, -2413, -2673},
+ {-1114, -2542, -3459}, {-1341, -2901, -3963}, {-1160, -2226, -1393},
+ {-1001, -2772, -1573}, {-1594, -2641, -1978}, {-1534, -3046, -2624},
+ {-2224, -2196, -675}, {-2807, -3054, -1102}, {-2008, -2840, -1186},
+ {-1980, -3332, -1695}, {-1715, -3562, -505}, {-2527, -4000, -1887},
+ {-2333, -2734, -2296}, {-3440, -2401, -3211}, {-2008, -3528, -3337},
+ {-2247, -3291, -4510}, { -475, 949, 155}, { -149, 1365, 545},
+ { -757, 1644, 1083}, { -217, 2053, 1353}, {-1433, 2301, 1462},
+ { 495, 1661, 529}, { 10, 2037, 740}, { 2082, 1898, 978},
+ { 2831, 2294, 911}, { 842, 793, 420}, { 1223, 1023, 863},
+ { 1237, 451, 780}, { 1744, 708, 822}, { 1533, 284, 1384},
+ { 2135, 609, 1538}, { 2305, 626, 540}, { 2368, 1187, 955},
+ { 2586, 1255, -7}, { 3116, 1131, 726}, { 3431, 1730, 428},
+ { 2734, 1648, 1307}, { 2988, 1231, 2010}, { 3523, 2024, 1488},
+ { 1034, 1657, 871}, { 1206, 2163, 1036}, { 1807, 2372, 1233},
+ { 1808, 1769, 1493}, { 1573, 2332, 1779}, { 1216, 1609, 1866},
+ { 1480, 1898, 2513}, { 465, 2708, 2776}, { 771, 3638, 3338},
+ { 1869, 2599, 2623}, { 2825, 2745, 2468}, { 2638, 2439, 1585},
+ { 2094, 2970, 1308}, { 2022, 3057, 1999}, { 3428, 2912, 1816},
+ { 4536, 2974, 2129}, { 1046, 2563, 2086}, { 1363, 3562, 2318},
+ { 2511, 1891, 2984}, { 1866, 2306, 3986}, { 3272, 2924, 3682},
+ { 3146, 3564, 2272}, { 3592, 3968, 2822}, { 2431, 3369, 3069},
+ { 1931, 4709, 3090}, { 2629, 4220, 3986}, { 4639, 4056, 3664},
+ { 4035, 5334, 4912}
};
-static const int16_t lsp_band2[LSP_CB_SIZE * 4] = {
- 0, 0, 0, 0,
- 601, 512, -542, 334,
- 428, 1087, -484, -132,
- 652, 622, -391, -572,
- 378, 799, 141, -860,
- 1040, 409, 112, -554,
- 1123, 670, -75, -847,
- 1421, 494, -315, -1095,
- 787, 1001, 114, -460,
- 988, 1672, 216, -681,
- 1007, 1241, -132, -1247,
- 1073, 399, 186, -5,
- 1262, 193, -694, -129,
- 325, 196, 51, -641,
- 861, -59, 350, -458,
- 1261, 567, 586, -346,
- 1532, 885, 210, -517,
- 2027, 937, 113, -792,
- 1383, 1064, 334, 38,
- 1964, 1468, 459, 133,
- 2062, 1186, -98, -121,
- 2577, 1445, 506, -373,
- 2310, 1682, -2, -960,
- 2876, 1939, 765, 138,
- 3581, 2360, 649, -414,
- 219, 176, -398, -309,
- 434, -78, -435, -880,
- -344, 301, 265, -552,
- -915, 470, 657, -380,
- 419, -432, -163, -453,
- 351, -953, 8, -562,
- 789, -43, 20, -958,
- 302, -594, -352, -1159,
- 1040, 108, -668, -924,
- 1333, 210, -1217, -1663,
- 483, 589, -350, -1140,
- 1003, 824, -802, -1184,
- 745, 58, -589, -1443,
- 346, 247, -915, -1683,
- 270, 796, -720, -2043,
- 1208, 722, -222, -193,
- 1486, 1180, -412, -672,
- 1722, 179, -69, -521,
- 2047, 860, -666, -1410,
- -146, 222, -281, -805,
- -189, 90, -114, -1307,
- -152, 1086, -241, -764,
- -439, 733, -601, -1302,
- -833, -167, -351, -601,
- -856, -422, -411, -1059,
- -747, -355, -582, -1644,
- -837, 210, -916, -1144,
- -1800, 32, -878, -1687,
- -48, -23, -1146, 52,
- -350, -409, -1656, -364,
- 265, -728, -858, -577,
- 458, -247, -1141, -997,
- 691, -407, -1988, -1161,
- -66, -104, -705, -1249,
- -431, -93, -1191, -1844,
- 203, -732, -1000, -1693,
- 10, -832, -1846, -1819,
- 493, -128, -1436, -1768,
- 488, -311, -1730, -2540,
- -653, -532, -1150, -1172,
- -1086, -289, -1706, -1533,
- -699, -1205, -1216, -1766,
- -1032, -1481, -2074, -1523,
- -721, -1220, -2277, -2600,
- 12, -539, -1484, -1131,
- -40, -911, -2106, -441,
- -471, -484, -2267, -1549,
- -141, -988, -3006, -1721,
- -1545, -2102, -583, 342,
- -1383, -2772, -386, -13,
- -2118, -2589, -1205, 72,
- -2147, -3231, -965, 390,
- -2949, -3300, -621, 637,
- -3907, -4138, -865, 803,
- -1287, -845, -375, -548,
- -1416, -1169, -487, -1277,
- -1400, -1690, -1027, -418,
- -2018, -1909, -1188, -1260,
- -1418, -2222, -2029, -128,
- -2067, -2998, -2693, -310,
- -950, -1028, -1538, 185,
- -1616, -915, -2205, -549,
- 19, -821, -1145, 352,
- 184, -1175, -1356, -627,
- -547, -1088, -1661, -911,
- -216, -1502, -2197, -948,
- -795, -1306, -2374, -451,
- -924, -1889, -2796, -680,
- -600, -1614, -3609, -885,
- -2392, -2528, 319, 303,
- -2908, -2095, -310, 573,
- -3460, -2141, 49, -113,
- -2231, -448, 675, -146,
- -2805, -532, 1231, 479,
- -2684, -486, -200, 611,
- -3525, -971, -198, 704,
- -3707, 173, 349, 254,
- -4734, -1447, -34, 880,
- 777, -512, 114, -10,
- 1250, -66, 442, -5,
- 604, 613, 452, -352,
- 1224, 777, 675, -1014,
- -1372, -79, -1208, -238,
- -2389, -17, -1157, -818,
- -1504, -673, -1133, -1060,
- -1984, -799, -2005, -1973,
- -2037, -798, -1068, -105,
- -3190, -899, -1817, -194,
- -156, -886, 394, -318,
- -258, -1283, 551, 202,
- -536, -1729, 910, 331,
- -847, -1109, 795, -163,
- -1171, -1128, 715, 519,
- -1080, -1319, 1685, 668,
- -1000, -1921, 96, 211,
- -1487, -2148, 831, 174,
- -1139, -374, 414, -4,
- -1517, -1383, 396, -352,
- -1012, 439, -59, -967,
- -1812, 706, -440, -1030,
- -1971, -329, -34, -827,
- -2472, -1588, -151, -606,
- -2161, 374, -281, 76,
- -3012, 231, -15, -690,
- 1104, 566, 721, 209,
- 1685, 564, 383, 98,
- 1898, 750, 792, -97,
- 556, -64, 561, -93,
- 876, 162, 913, -22,
- 961, 675, 1296, 140,
- 756, -396, 851, 544,
- 360, -303, 1341, 396,
- 878, -22, 1464, 863,
- -309, -273, 642, -129,
- -686, -82, 842, 454,
- -5, -47, 1069, 998,
- -94, 967, 1277, 298,
- -489, 385, 1473, 746,
- -369, -717, 1333, 242,
- 281, -993, 1726, 924,
- 464, 601, 1575, 1376,
- -250, 206, 2339, 1175,
- -438, 377, -597, -285,
- -1020, 787, -790, -287,
- -458, -410, 215, 295,
- -589, -860, -121, 797,
- -1175, 122, -437, 466,
- -1480, -121, 367, 924,
- 234, 323, 770, -555,
- 145, 30, 996, 26,
- 66, 849, 93, -145,
- -117, 1261, 474, -399,
- -1495, 1051, 218, -506,
- -1390, 694, 994, 88,
- 616, 7, 78, 304,
- 1060, 52, -62, 835,
- 833, 454, 649, 1359,
- -770, 464, 47, 93,
- -574, 1199, -39, 379,
- 114, -98, 488, 485,
- 727, 244, 606, 696,
- -76, 455, 671, 546,
- -565, -13, 145, 819,
- -376, 569, 448, 1128,
- 218, 122, 265, 1167,
- 230, 738, 932, 1003,
- 138, 477, 36, 450,
- 404, 787, -73, 1000,
- 497, 1259, 387, 1231,
- 17, 207, 195, -79,
- 562, 358, 53, -158,
- 493, 387, 478, 189,
- 678, 831, 640, 558,
- -197, 523, 613, 57,
- 429, 894, 769, 111,
- 67, 1174, 568, 511,
- 1242, 824, 251, 840,
- 1419, 1074, 864, 481,
- 924, 1474, 669, 724,
- 1539, 1879, 654, 1590,
- 445, 337, 1111, 541,
- 472, 1421, 1264, 1094,
- 794, 735, 1103, 668,
- 1055, 863, 1192, 1020,
- 778, 1105, 806, 1798,
- 1052, 1527, 1587, 2151,
- 881, 1552, 1265, 391,
- 726, 872, 1812, 601,
- 1469, 280, 1008, 616,
- 1403, 577, 1803, 1244,
- 1650, 1314, 1148, 1072,
- 1297, 1669, 1911, 1026,
- 2093, 1044, 2115, 1189,
- 1644, 1961, 2587, 1512,
- 25, -315, -9, -106,
- 290, -339, 428, -444,
- -68, -783, 735, 772,
- 245, -555, 468, 47,
- 334, -895, 814, 146,
- 235, 368, -964, -959,
- -203, 315, -1566, -1217,
- 801, 17, -276, -354,
- 894, -495, -789, -635,
- 716, 291, -1189, -357,
- 560, -260, -733, -2,
- 679, -508, -1429, 211,
- -51, -62, -428, 557,
- 322, -638, -211, 614,
- -878, -1057, -84, -71,
- -388, -1415, -167, -318,
- -754, -1574, 214, -539,
- -1419, -2004, -92, -787,
- -47, -856, -347, -255,
- 23, -1211, -173, 320,
- -658, -487, -893, 353,
- -783, -1587, -584, 507,
- -1420, -859, -378, 441,
- -2095, -1491, -137, 439,
- -321, -1450, -1288, -12,
- -359, -2113, -553, -8,
- -831, -1918, -1561, 32,
- -1014, -2487, -1359, -939,
- -475, -311, -169, -236,
- -907, -426, 276, -611,
- -96, -400, 50, -710,
- -426, -1022, -10, -985,
- -197, -258, -744, -575,
- -611, -930, -771, -394,
- -267, -776, -612, -939,
- -256, -1346, -802, -1122,
- -796, -1570, -825, -754,
- 712, 876, 141, 227,
- 981, 1509, 85, 124,
- 1462, 1228, 979, -39,
- 1734, 999, 1481, 440,
- 2293, 1116, 769, 440,
- 2504, 1480, 1241, 356,
- 2474, 1909, 1558, 810,
- 917, 1134, 607, -134,
- 509, 1809, 781, -123,
- 1712, 1506, 559, -423,
- 2037, 2317, 726, -155,
- 3031, 2676, 1203, 331,
- 3664, 3274, 1768, 531,
- 1610, 1839, 867, 183,
- 1774, 1972, 1538, 97,
- 1822, 2158, 1282, 659,
- 2222, 2758, 1818, 900,
- 3251, 2124, 1723, 996,
- 3633, 2336, 2408, 1453,
- 2923, 3517, 2567, 1318,
+static const int16_t lsp_band2[LSP_CB_SIZE][4] = {
+ { 0, 0, 0, 0}, { 601, 512, -542, 334},
+ { 428, 1087, -484, -132}, { 652, 622, -391, -572},
+ { 378, 799, 141, -860}, { 1040, 409, 112, -554},
+ { 1123, 670, -75, -847}, { 1421, 494, -315, -1095},
+ { 787, 1001, 114, -460}, { 988, 1672, 216, -681},
+ { 1007, 1241, -132, -1247}, { 1073, 399, 186, -5},
+ { 1262, 193, -694, -129}, { 325, 196, 51, -641},
+ { 861, -59, 350, -458}, { 1261, 567, 586, -346},
+ { 1532, 885, 210, -517}, { 2027, 937, 113, -792},
+ { 1383, 1064, 334, 38}, { 1964, 1468, 459, 133},
+ { 2062, 1186, -98, -121}, { 2577, 1445, 506, -373},
+ { 2310, 1682, -2, -960}, { 2876, 1939, 765, 138},
+ { 3581, 2360, 649, -414}, { 219, 176, -398, -309},
+ { 434, -78, -435, -880}, { -344, 301, 265, -552},
+ { -915, 470, 657, -380}, { 419, -432, -163, -453},
+ { 351, -953, 8, -562}, { 789, -43, 20, -958},
+ { 302, -594, -352, -1159}, { 1040, 108, -668, -924},
+ { 1333, 210, -1217, -1663}, { 483, 589, -350, -1140},
+ { 1003, 824, -802, -1184}, { 745, 58, -589, -1443},
+ { 346, 247, -915, -1683}, { 270, 796, -720, -2043},
+ { 1208, 722, -222, -193}, { 1486, 1180, -412, -672},
+ { 1722, 179, -69, -521}, { 2047, 860, -666, -1410},
+ { -146, 222, -281, -805}, { -189, 90, -114, -1307},
+ { -152, 1086, -241, -764}, { -439, 733, -601, -1302},
+ { -833, -167, -351, -601}, { -856, -422, -411, -1059},
+ { -747, -355, -582, -1644}, { -837, 210, -916, -1144},
+ {-1800, 32, -878, -1687}, { -48, -23, -1146, 52},
+ { -350, -409, -1656, -364}, { 265, -728, -858, -577},
+ { 458, -247, -1141, -997}, { 691, -407, -1988, -1161},
+ { -66, -104, -705, -1249}, { -431, -93, -1191, -1844},
+ { 203, -732, -1000, -1693}, { 10, -832, -1846, -1819},
+ { 493, -128, -1436, -1768}, { 488, -311, -1730, -2540},
+ { -653, -532, -1150, -1172}, {-1086, -289, -1706, -1533},
+ { -699, -1205, -1216, -1766}, {-1032, -1481, -2074, -1523},
+ { -721, -1220, -2277, -2600}, { 12, -539, -1484, -1131},
+ { -40, -911, -2106, -441}, { -471, -484, -2267, -1549},
+ { -141, -988, -3006, -1721}, {-1545, -2102, -583, 342},
+ {-1383, -2772, -386, -13}, {-2118, -2589, -1205, 72},
+ {-2147, -3231, -965, 390}, {-2949, -3300, -621, 637},
+ {-3907, -4138, -865, 803}, {-1287, -845, -375, -548},
+ {-1416, -1169, -487, -1277}, {-1400, -1690, -1027, -418},
+ {-2018, -1909, -1188, -1260}, {-1418, -2222, -2029, -128},
+ {-2067, -2998, -2693, -310}, { -950, -1028, -1538, 185},
+ {-1616, -915, -2205, -549}, { 19, -821, -1145, 352},
+ { 184, -1175, -1356, -627}, { -547, -1088, -1661, -911},
+ { -216, -1502, -2197, -948}, { -795, -1306, -2374, -451},
+ { -924, -1889, -2796, -680}, { -600, -1614, -3609, -885},
+ {-2392, -2528, 319, 303}, {-2908, -2095, -310, 573},
+ {-3460, -2141, 49, -113}, {-2231, -448, 675, -146},
+ {-2805, -532, 1231, 479}, {-2684, -486, -200, 611},
+ {-3525, -971, -198, 704}, {-3707, 173, 349, 254},
+ {-4734, -1447, -34, 880}, { 777, -512, 114, -10},
+ { 1250, -66, 442, -5}, { 604, 613, 452, -352},
+ { 1224, 777, 675, -1014}, {-1372, -79, -1208, -238},
+ {-2389, -17, -1157, -818}, {-1504, -673, -1133, -1060},
+ {-1984, -799, -2005, -1973}, {-2037, -798, -1068, -105},
+ {-3190, -899, -1817, -194}, { -156, -886, 394, -318},
+ { -258, -1283, 551, 202}, { -536, -1729, 910, 331},
+ { -847, -1109, 795, -163}, {-1171, -1128, 715, 519},
+ {-1080, -1319, 1685, 668}, {-1000, -1921, 96, 211},
+ {-1487, -2148, 831, 174}, {-1139, -374, 414, -4},
+ {-1517, -1383, 396, -352}, {-1012, 439, -59, -967},
+ {-1812, 706, -440, -1030}, {-1971, -329, -34, -827},
+ {-2472, -1588, -151, -606}, {-2161, 374, -281, 76},
+ {-3012, 231, -15, -690}, { 1104, 566, 721, 209},
+ { 1685, 564, 383, 98}, { 1898, 750, 792, -97},
+ { 556, -64, 561, -93}, { 876, 162, 913, -22},
+ { 961, 675, 1296, 140}, { 756, -396, 851, 544},
+ { 360, -303, 1341, 396}, { 878, -22, 1464, 863},
+ { -309, -273, 642, -129}, { -686, -82, 842, 454},
+ { -5, -47, 1069, 998}, { -94, 967, 1277, 298},
+ { -489, 385, 1473, 746}, { -369, -717, 1333, 242},
+ { 281, -993, 1726, 924}, { 464, 601, 1575, 1376},
+ { -250, 206, 2339, 1175}, { -438, 377, -597, -285},
+ {-1020, 787, -790, -287}, { -458, -410, 215, 295},
+ { -589, -860, -121, 797}, {-1175, 122, -437, 466},
+ {-1480, -121, 367, 924}, { 234, 323, 770, -555},
+ { 145, 30, 996, 26}, { 66, 849, 93, -145},
+ { -117, 1261, 474, -399}, {-1495, 1051, 218, -506},
+ {-1390, 694, 994, 88}, { 616, 7, 78, 304},
+ { 1060, 52, -62, 835}, { 833, 454, 649, 1359},
+ { -770, 464, 47, 93}, { -574, 1199, -39, 379},
+ { 114, -98, 488, 485}, { 727, 244, 606, 696},
+ { -76, 455, 671, 546}, { -565, -13, 145, 819},
+ { -376, 569, 448, 1128}, { 218, 122, 265, 1167},
+ { 230, 738, 932, 1003}, { 138, 477, 36, 450},
+ { 404, 787, -73, 1000}, { 497, 1259, 387, 1231},
+ { 17, 207, 195, -79}, { 562, 358, 53, -158},
+ { 493, 387, 478, 189}, { 678, 831, 640, 558},
+ { -197, 523, 613, 57}, { 429, 894, 769, 111},
+ { 67, 1174, 568, 511}, { 1242, 824, 251, 840},
+ { 1419, 1074, 864, 481}, { 924, 1474, 669, 724},
+ { 1539, 1879, 654, 1590}, { 445, 337, 1111, 541},
+ { 472, 1421, 1264, 1094}, { 794, 735, 1103, 668},
+ { 1055, 863, 1192, 1020}, { 778, 1105, 806, 1798},
+ { 1052, 1527, 1587, 2151}, { 881, 1552, 1265, 391},
+ { 726, 872, 1812, 601}, { 1469, 280, 1008, 616},
+ { 1403, 577, 1803, 1244}, { 1650, 1314, 1148, 1072},
+ { 1297, 1669, 1911, 1026}, { 2093, 1044, 2115, 1189},
+ { 1644, 1961, 2587, 1512}, { 25, -315, -9, -106},
+ { 290, -339, 428, -444}, { -68, -783, 735, 772},
+ { 245, -555, 468, 47}, { 334, -895, 814, 146},
+ { 235, 368, -964, -959}, { -203, 315, -1566, -1217},
+ { 801, 17, -276, -354}, { 894, -495, -789, -635},
+ { 716, 291, -1189, -357}, { 560, -260, -733, -2},
+ { 679, -508, -1429, 211}, { -51, -62, -428, 557},
+ { 322, -638, -211, 614}, { -878, -1057, -84, -71},
+ { -388, -1415, -167, -318}, { -754, -1574, 214, -539},
+ {-1419, -2004, -92, -787}, { -47, -856, -347, -255},
+ { 23, -1211, -173, 320}, { -658, -487, -893, 353},
+ { -783, -1587, -584, 507}, {-1420, -859, -378, 441},
+ {-2095, -1491, -137, 439}, { -321, -1450, -1288, -12},
+ { -359, -2113, -553, -8}, { -831, -1918, -1561, 32},
+ {-1014, -2487, -1359, -939}, { -475, -311, -169, -236},
+ { -907, -426, 276, -611}, { -96, -400, 50, -710},
+ { -426, -1022, -10, -985}, { -197, -258, -744, -575},
+ { -611, -930, -771, -394}, { -267, -776, -612, -939},
+ { -256, -1346, -802, -1122}, { -796, -1570, -825, -754},
+ { 712, 876, 141, 227}, { 981, 1509, 85, 124},
+ { 1462, 1228, 979, -39}, { 1734, 999, 1481, 440},
+ { 2293, 1116, 769, 440}, { 2504, 1480, 1241, 356},
+ { 2474, 1909, 1558, 810}, { 917, 1134, 607, -134},
+ { 509, 1809, 781, -123}, { 1712, 1506, 559, -423},
+ { 2037, 2317, 726, -155}, { 3031, 2676, 1203, 331},
+ { 3664, 3274, 1768, 531}, { 1610, 1839, 867, 183},
+ { 1774, 1972, 1538, 97}, { 1822, 2158, 1282, 659},
+ { 2222, 2758, 1818, 900}, { 3251, 2124, 1723, 996},
+ { 3633, 2336, 2408, 1453}, { 2923, 3517, 2567, 1318},
};
static const int16_t fixed_cb_gain[GAIN_LEVELS] = {
commit ed90effe80e5142fc19fd7a777b5325920bf4593
Author: Naufal <naufal11(a)gmail.com>
Date: Mon Jul 12 01:51:03 2010 +0530
Revert "Make LSP VQ tables 2D"
This reverts commit 1a2b15e887a1efb7da3188403e4a9eab8445a133.
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 26bc5c4..90c77ea 100755
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -232,7 +232,7 @@ static int16_t scale_vector(int16_t *vector, int16_t length)
* @param prev_lsp the previous LSP vector
*/
static void inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp,
- uint8_t *lsp_index, int bad_frame)
+ int8_t *lsp_index, int bad_frame)
{
int min_dist, pred;
int i, j, temp1, temp2, stable;
@@ -241,6 +241,9 @@ static void inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp,
if (!bad_frame) {
min_dist = 0x100;
pred = 12288;
+ lsp_index[0] *= 3;
+ lsp_index[1] *= 3;
+ lsp_index[2] *= 4;
} else {
min_dist = 0x200;
pred = 23552;
@@ -248,16 +251,16 @@ static void inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp,
}
// Get the VQ table entry corresponding to the transmitted index
- cur_lsp[0] = lsp_band0[lsp_index[0]][0];
- cur_lsp[1] = lsp_band0[lsp_index[0]][1];
- cur_lsp[2] = lsp_band0[lsp_index[0]][2];
- cur_lsp[3] = lsp_band1[lsp_index[1]][0];
- cur_lsp[4] = lsp_band1[lsp_index[1]][1];
- cur_lsp[5] = lsp_band1[lsp_index[1]][2];
- cur_lsp[6] = lsp_band2[lsp_index[2]][0];
- cur_lsp[7] = lsp_band2[lsp_index[2]][1];
- cur_lsp[8] = lsp_band2[lsp_index[2]][2];
- cur_lsp[9] = lsp_band2[lsp_index[2]][3];
+ cur_lsp[0] = lsp_band0[lsp_index[0]];
+ cur_lsp[1] = lsp_band0[lsp_index[0] + 1];
+ cur_lsp[2] = lsp_band0[lsp_index[0] + 2];
+ cur_lsp[3] = lsp_band1[lsp_index[1]];
+ cur_lsp[4] = lsp_band1[lsp_index[1] + 1];
+ cur_lsp[5] = lsp_band1[lsp_index[1] + 2];
+ cur_lsp[6] = lsp_band2[lsp_index[2]];
+ cur_lsp[7] = lsp_band2[lsp_index[2] + 1];
+ cur_lsp[8] = lsp_band2[lsp_index[2] + 2];
+ cur_lsp[9] = lsp_band2[lsp_index[2] + 3];
// Add predicted vector & DC component to the previously quantized vector
for (i = 0; i < LPC_ORDER; i++) {
@@ -776,7 +779,7 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
}
}
- return cur_size;
+ return frame_size[p->cur_frame_type];
}
AVCodec g723_1_decoder = {
diff --git a/libavcodec/g723_1_data.h b/libavcodec/g723_1_data.h
index 4daf6d2..402d08f 100644
--- a/libavcodec/g723_1_data.h
+++ b/libavcodec/g723_1_data.h
@@ -144,313 +144,781 @@ static const int16_t cos_tab[512] = {
/*
* LSP VQ tables
*/
-static const int16_t lsp_band0[LSP_CB_SIZE][3] = {
- { 0, 0, 0}, { -270, -1372, -1032}, { -541, -1650, -1382},
- { -723, -2011, -2213}, { -941, -1122, -1942}, { -780, -1145, -2454},
- { -884, -1309, -1373}, {-1051, -1523, -1766}, {-1083, -1622, -2300},
- { -777, -1377, -2147}, { -935, -1467, -2763}, { -802, -1327, -3471},
- { -935, -1959, -3999}, { -240, -89, 222}, { -661, -257, -160},
- { -994, -466, -419}, { -188, -164, -278}, { -342, -512, -415},
- { -607, -511, -797}, { 16, 19, -716}, { 374, 425, -972},
- { -346, 245, -282}, { -265, 506, -754}, { -620, -147, 1955},
- { -742, -860, 2597}, { -150, -352, 2704}, { 305, 880, 1954},
- { 123, 731, 2766}, { -348, 765, 3327}, { 618, 221, 3258},
- { -178, -47, 4219}, { 393, 1304, 3842}, { 698, 1702, 4801},
- { 63, -584, 1229}, { -215, -732, 1704}, { 172, -335, 1909},
- { -2, 216, 1797}, { 353, 127, 2205}, {-1208, 188, 11},
- { -513, -75, -683}, { -973, 222, -646}, { -616, -843, -388},
- { -950, -1113, -359}, {-1431, -623, -705}, {-1398, -1063, -178},
- { -45, -461, 35}, { -9, -657, -216}, { 127, -1078, 95},
- { -950, -1156, 584}, {-1480, -1494, 449}, { -120, -705, 516},
- { -368, -961, 727}, { -378, -526, 973}, { -793, -614, 676},
- { -801, -755, 1287}, {-1476, -340, 1636}, { -505, -1254, 1543},
- {-1243, -1622, 1532}, { -776, -1477, -655}, {-1151, -1296, -823},
- {-1153, -1672, -1124}, {-1291, -2003, -1702}, { -622, -1283, 57},
- { -471, -1611, 509}, {-1060, -1570, -139}, { -873, -2156, -536},
- {-1716, -2021, -364}, {-2150, -3218, -1291}, {-1248, -1945, -2904},
- {-1215, -2633, -2855}, { 167, -244, 84}, { 349, -412, -217},
- { -40, -352, 632}, { 227, -529, 405}, { 68, -383, -443},
- { 167, -558, -706}, { -275, -854, -14}, { -351, -1089, -449},
- { 341, -72, -289}, { 603, -106, -474}, { 322, -219, -649},
- { 179, -317, -998}, { 450, -291, -996}, { 555, 195, -525},
- { 784, 272, -831}, { -148, -384, -849}, { 82, -536, -1357},
- { 238, -172, -1354}, { 422, -268, -1841}, { 297, -737, -2079},
- { -111, -801, -598}, { 1, -668, -984}, { -131, -818, -1299},
- { -329, -521, -1310}, { -151, -778, -1834}, { -93, -352, -1746},
- { -568, -640, -1821}, { -509, -941, -2183}, { 464, -815, -1250},
- { 79, -1133, -1597}, { -184, -1353, -2123}, { -196, -410, -2427},
- { -192, -833, -2810}, { -259, -1382, -3045}, { -217, 4, -1166},
- { -800, -325, -1219}, { -363, -830, -898}, { -661, -1134, -960},
- { -386, -980, -1501}, { -627, -1159, -1722}, { -903, -829, -855},
- { -685, -829, -1313}, {-1065, -959, -1405}, { 441, 25, -847},
- { 655, -27, -1181}, { 1159, -110, -705}, { 856, 253, -1671},
- { 415, 404, -1}, { 322, 903, -398}, { 670, 499, -292},
- { 803, 591, -610}, { 1144, 591, -814}, { 717, 183, 393},
- { 857, 381, 106}, { 609, 62, -27}, { 792, 198, -325},
- { 735, 805, 88}, { 1142, 812, 78}, { 1028, 366, -292},
- { 1309, 743, -237}, { 1615, 589, -79}, { 1010, 639, -243},
- { 999, 964, -311}, { 1500, 1137, -615}, { 988, 357, 646},
- { 1227, 667, 683}, { 1164, 1565, 894}, { 1392, 2015, 477},
- { 1138, 533, 250}, { 1437, 896, 391}, { 1765, 1118, 99},
- { 1112, 1090, 802}, { 1596, 846, 1134}, { 937, 1161, 279},
- { 1719, 1254, 683}, { 1338, 1086, 35}, { 1419, 1324, 428},
- { 1428, 1524, 40}, { 2108, 1594, 89}, { 1015, 544, 1222},
- { 1121, 925, 1263}, { 1030, 1318, 1485}, { 1295, 789, 1817},
- { 1323, 1272, 1909}, { 1724, 1237, 1803}, { 1797, 1689, 858},
- { 2149, 1367, 1301}, { 2302, 1867, 761}, { 2863, 2351, 1053},
- { 52, 163, -76}, { 230, 309, -492}, { -71, 619, 39},
- { -218, 856, 499}, { -654, 736, -207}, { -535, 1259, 155},
- { -480, 1476, 643}, { 262, 1081, 102}, { 309, 1592, -182},
- { 627, 1629, 534}, { 337, 643, 456}, { 758, 670, 713},
- { 202, 1126, 658}, { 612, 1131, 666}, { 686, 1223, 1136},
- { -131, 377, 525}, { 42, 708, 907}, { 87, 1488, 1035},
- { 432, 2117, 904}, { 137, 981, 1332}, { -447, 1014, 1136},
- { -839, 1793, 1246}, { -559, 297, 198}, { -850, 685, 446},
- {-1273, 632, 826}, { -401, -544, 173}, { -753, -793, 144},
- { -436, -9, 772}, { -115, -243, 1310}, { -670, -269, 374},
- {-1027, -13, 639}, { -887, -81, 1137}, {-1277, -455, 158},
- {-1411, -720, 736}, { 172, 88, 403}, { 386, 255, 756},
- { -500, 522, 910}, { -958, 659, 1388}, { -395, 301, 1344},
- { -356, 768, 1813}, { -613, 841, 2419}, { 445, -122, 252},
- { 629, -87, 723}, { 283, -253, 870}, { 456, -116, 1381},
- { 757, 180, 1059}, { 532, 408, 1509}, { 947, 288, 1806},
- { 1325, 994, 2524}, { 892, 1219, 3023}, { 1397, 1596, 3406},
- { 1143, 1552, 2546}, { 1850, 1433, 2710}, { -10, 134, 1002},
- { 154, 499, 1323}, { 508, 792, 1117}, { 509, 1340, 1616},
- { 762, 862, 1608}, { 787, 740, 2320}, { 794, 1727, 1283},
- { 465, 2108, 1660}, { -120, 1451, 1613}, { -386, 2016, 2169},
- { 891, 1225, 2050}, { 456, 1480, 2185}, { 1493, 1283, 1209},
- { 1397, 1636, 1518}, { 1776, 1738, 1552}, { 1572, 1698, 2141},
- { 1389, 2126, 1271}, { 1959, 2413, 1119}, { 1365, 2892, 1505},
- { 2206, 1971, 1623}, { 2076, 1950, 2280}, { 1717, 2291, 1867},
- { 2366, 2515, 1953}, { 2865, 2838, 2522}, { 2535, 3465, 2011},
- { 3381, 4127, 2638}, { 836, 2667, 2289}, { 1761, 2773, 2337},
- { 1415, 3325, 2911}, { 2354, 3138, 3126}, { 2659, 4192, 4010},
- { 1048, 1786, 1818}, { 1242, 2111, 2240}, { 1512, 2079, 2780},
- { 1573, 2491, 3138}, { 2230, 2377, 2782}, { 416, 1773, 2704},
- { 725, 2336, 3297}, { 1252, 2373, 3978}, { 2094, 2268, 3568},
- { 2011, 2712, 4528}, { 1341, 3507, 3876}, { 1216, 3919, 4922},
- { 1693, 4793, 6012}
+static const int16_t lsp_band0[LSP_CB_SIZE * 3] = {
+ 0, 0, 0,
+ -270, -1372, -1032,
+ -541, -1650, -1382,
+ -723, -2011, -2213,
+ -941, -1122, -1942,
+ -780, -1145, -2454,
+ -884, -1309, -1373,
+ -1051, -1523, -1766,
+ -1083, -1622, -2300,
+ -777, -1377, -2147,
+ -935, -1467, -2763,
+ -802, -1327, -3471,
+ -935, -1959, -3999,
+ -240, -89, 222,
+ -661, -257, -160,
+ -994, -466, -419,
+ -188, -164, -278,
+ -342, -512, -415,
+ -607, -511, -797,
+ 16, 19, -716,
+ 374, 425, -972,
+ -346, 245, -282,
+ -265, 506, -754,
+ -620, -147, 1955,
+ -742, -860, 2597,
+ -150, -352, 2704,
+ 305, 880, 1954,
+ 123, 731, 2766,
+ -348, 765, 3327,
+ 618, 221, 3258,
+ -178, -47, 4219,
+ 393, 1304, 3842,
+ 698, 1702, 4801,
+ 63, -584, 1229,
+ -215, -732, 1704,
+ 172, -335, 1909,
+ -2, 216, 1797,
+ 353, 127, 2205,
+ -1208, 188, 11,
+ -513, -75, -683,
+ -973, 222, -646,
+ -616, -843, -388,
+ -950, -1113, -359,
+ -1431, -623, -705,
+ -1398, -1063, -178,
+ -45, -461, 35,
+ -9, -657, -216,
+ 127, -1078, 95,
+ -950, -1156, 584,
+ -1480, -1494, 449,
+ -120, -705, 516,
+ -368, -961, 727,
+ -378, -526, 973,
+ -793, -614, 676,
+ -801, -755, 1287,
+ -1476, -340, 1636,
+ -505, -1254, 1543,
+ -1243, -1622, 1532,
+ -776, -1477, -655,
+ -1151, -1296, -823,
+ -1153, -1672, -1124,
+ -1291, -2003, -1702,
+ -622, -1283, 57,
+ -471, -1611, 509,
+ -1060, -1570, -139,
+ -873, -2156, -536,
+ -1716, -2021, -364,
+ -2150, -3218, -1291,
+ -1248, -1945, -2904,
+ -1215, -2633, -2855,
+ 167, -244, 84,
+ 349, -412, -217,
+ -40, -352, 632,
+ 227, -529, 405,
+ 68, -383, -443,
+ 167, -558, -706,
+ -275, -854, -14,
+ -351, -1089, -449,
+ 341, -72, -289,
+ 603, -106, -474,
+ 322, -219, -649,
+ 179, -317, -998,
+ 450, -291, -996,
+ 555, 195, -525,
+ 784, 272, -831,
+ -148, -384, -849,
+ 82, -536, -1357,
+ 238, -172, -1354,
+ 422, -268, -1841,
+ 297, -737, -2079,
+ -111, -801, -598,
+ 1, -668, -984,
+ -131, -818, -1299,
+ -329, -521, -1310,
+ -151, -778, -1834,
+ -93, -352, -1746,
+ -568, -640, -1821,
+ -509, -941, -2183,
+ 464, -815, -1250,
+ 79, -1133, -1597,
+ -184, -1353, -2123,
+ -196, -410, -2427,
+ -192, -833, -2810,
+ -259, -1382, -3045,
+ -217, 4, -1166,
+ -800, -325, -1219,
+ -363, -830, -898,
+ -661, -1134, -960,
+ -386, -980, -1501,
+ -627, -1159, -1722,
+ -903, -829, -855,
+ -685, -829, -1313,
+ -1065, -959, -1405,
+ 441, 25, -847,
+ 655, -27, -1181,
+ 1159, -110, -705,
+ 856, 253, -1671,
+ 415, 404, -1,
+ 322, 903, -398,
+ 670, 499, -292,
+ 803, 591, -610,
+ 1144, 591, -814,
+ 717, 183, 393,
+ 857, 381, 106,
+ 609, 62, -27,
+ 792, 198, -325,
+ 735, 805, 88,
+ 1142, 812, 78,
+ 1028, 366, -292,
+ 1309, 743, -237,
+ 1615, 589, -79,
+ 1010, 639, -243,
+ 999, 964, -311,
+ 1500, 1137, -615,
+ 988, 357, 646,
+ 1227, 667, 683,
+ 1164, 1565, 894,
+ 1392, 2015, 477,
+ 1138, 533, 250,
+ 1437, 896, 391,
+ 1765, 1118, 99,
+ 1112, 1090, 802,
+ 1596, 846, 1134,
+ 937, 1161, 279,
+ 1719, 1254, 683,
+ 1338, 1086, 35,
+ 1419, 1324, 428,
+ 1428, 1524, 40,
+ 2108, 1594, 89,
+ 1015, 544, 1222,
+ 1121, 925, 1263,
+ 1030, 1318, 1485,
+ 1295, 789, 1817,
+ 1323, 1272, 1909,
+ 1724, 1237, 1803,
+ 1797, 1689, 858,
+ 2149, 1367, 1301,
+ 2302, 1867, 761,
+ 2863, 2351, 1053,
+ 52, 163, -76,
+ 230, 309, -492,
+ -71, 619, 39,
+ -218, 856, 499,
+ -654, 736, -207,
+ -535, 1259, 155,
+ -480, 1476, 643,
+ 262, 1081, 102,
+ 309, 1592, -182,
+ 627, 1629, 534,
+ 337, 643, 456,
+ 758, 670, 713,
+ 202, 1126, 658,
+ 612, 1131, 666,
+ 686, 1223, 1136,
+ -131, 377, 525,
+ 42, 708, 907,
+ 87, 1488, 1035,
+ 432, 2117, 904,
+ 137, 981, 1332,
+ -447, 1014, 1136,
+ -839, 1793, 1246,
+ -559, 297, 198,
+ -850, 685, 446,
+ -1273, 632, 826,
+ -401, -544, 173,
+ -753, -793, 144,
+ -436, -9, 772,
+ -115, -243, 1310,
+ -670, -269, 374,
+ -1027, -13, 639,
+ -887, -81, 1137,
+ -1277, -455, 158,
+ -1411, -720, 736,
+ 172, 88, 403,
+ 386, 255, 756,
+ -500, 522, 910,
+ -958, 659, 1388,
+ -395, 301, 1344,
+ -356, 768, 1813,
+ -613, 841, 2419,
+ 445, -122, 252,
+ 629, -87, 723,
+ 283, -253, 870,
+ 456, -116, 1381,
+ 757, 180, 1059,
+ 532, 408, 1509,
+ 947, 288, 1806,
+ 1325, 994, 2524,
+ 892, 1219, 3023,
+ 1397, 1596, 3406,
+ 1143, 1552, 2546,
+ 1850, 1433, 2710,
+ -10, 134, 1002,
+ 154, 499, 1323,
+ 508, 792, 1117,
+ 509, 1340, 1616,
+ 762, 862, 1608,
+ 787, 740, 2320,
+ 794, 1727, 1283,
+ 465, 2108, 1660,
+ -120, 1451, 1613,
+ -386, 2016, 2169,
+ 891, 1225, 2050,
+ 456, 1480, 2185,
+ 1493, 1283, 1209,
+ 1397, 1636, 1518,
+ 1776, 1738, 1552,
+ 1572, 1698, 2141,
+ 1389, 2126, 1271,
+ 1959, 2413, 1119,
+ 1365, 2892, 1505,
+ 2206, 1971, 1623,
+ 2076, 1950, 2280,
+ 1717, 2291, 1867,
+ 2366, 2515, 1953,
+ 2865, 2838, 2522,
+ 2535, 3465, 2011,
+ 3381, 4127, 2638,
+ 836, 2667, 2289,
+ 1761, 2773, 2337,
+ 1415, 3325, 2911,
+ 2354, 3138, 3126,
+ 2659, 4192, 4010,
+ 1048, 1786, 1818,
+ 1242, 2111, 2240,
+ 1512, 2079, 2780,
+ 1573, 2491, 3138,
+ 2230, 2377, 2782,
+ 416, 1773, 2704,
+ 725, 2336, 3297,
+ 1252, 2373, 3978,
+ 2094, 2268, 3568,
+ 2011, 2712, 4528,
+ 1341, 3507, 3876,
+ 1216, 3919, 4922,
+ 1693, 4793, 6012,
};
-static const int16_t lsp_band1[LSP_CB_SIZE][3] = {
- { 0, 0, 0}, {-2114, -1302, 76}, {-2652, -1278, -1368},
- {-2847, -828, -349}, {-3812, -2190, -349}, {-3946, -364, -449},
- {-2725, -4492, -3607}, {-3495, -4764, -1744}, { -51, -756, 84},
- { -153, -1191, 504}, { 108, -1418, 1167}, { -835, -896, 390},
- { -569, -1702, 87}, {-1151, -1818, 933}, {-1826, -2547, 411},
- {-1842, -1818, 1451}, {-2438, -1611, 781}, {-2747, -2477, 1311},
- { -940, 1252, 477}, {-1629, 1688, 602}, {-1202, 617, 280},
- {-1737, 393, 580}, {-1528, 1077, 1199}, {-2165, -161, 1408},
- {-2504, -1087, 2371}, {-3458, -175, 1395}, {-1397, -98, -843},
- {-2252, -177, -1149}, {-1489, -726, -1283}, {-1558, -265, -1744},
- {-1867, -821, -1897}, {-2062, -1516, -2340}, {-2595, -1142, -2861},
- { 170, 46, -819}, { -193, -204, -1151}, { 326, -196, -1532},
- { 780, 329, -816}, { 201, 369, -1243}, { 650, -209, -1060},
- { 1144, -15, -1216}, { 1203, -259, -1867}, { -890, -564, -1430},
- { -638, -852, -1921}, { 177, -739, -1358}, { -261, -526, -1666},
- { 206, -407, -2255}, { 338, -526, -822}, { 421, -1095, -1009},
- { 765, -607, -1408}, { 825, -1295, -2004}, { 357, -905, -1815},
- { -58, -1248, -1588}, { -596, -1436, -2046}, { -73, -1159, -2116},
- { -115, -1382, -2581}, { -160, -1723, -1952}, { -6, -2196, -2954},
- { -649, -1705, -2603}, { -617, -1453, -3282}, { -949, -2019, -3102},
- { -812, 1544, 1937}, {-1854, 574, 2000}, {-1463, 1140, 2649},
- {-2683, 1748, 1452}, {-2486, 2241, 2523}, { 783, 1910, 1435},
- { 581, 2682, 1376}, { 236, 2197, 1885}, { -453, 2943, 2057},
- { -682, 2178, 2565}, {-1342, 3201, 3328}, { -288, -184, 262},
- { 121, -149, -183}, { 758, -412, 206}, { 1038, -204, 853},
- { 1577, -457, 700}, { 937, -640, -567}, { 1508, -528, -1024},
- { -225, -527, -427}, { -564, -1095, -332}, { -742, -353, -186},
- {-1288, -459, 84}, {-1853, -484, -274}, {-1554, -731, 825},
- {-2425, -234, 382}, {-1722, 293, -271}, {-2515, 425, -564},
- {-2599, 818, 464}, { -358, 118, -375}, { -613, 198, -874},
- { -690, 683, -324}, {-1352, 1155, -168}, {-1093, 129, -324},
- {-1184, 611, -858}, { 433, 386, -372}, { -120, 486, -634},
- { 234, 851, -631}, { 602, 128, 46}, { 1099, 410, 159},
- { 715, -145, -424}, { 1198, -85, -593}, { 1390, 367, -358},
- { 1683, 362, -964}, { 1711, 622, 45}, { 2033, 833, -383},
- { 2890, 549, -506}, { 7, 401, 52}, { 72, 811, 415},
- { 566, 668, 41}, { 467, 1218, 130}, { 68, 957, -187},
- { -25, 1649, -103}, { -661, 260, 214}, { -925, -94, 612},
- { -321, -422, 965}, { -788, -672, 1783}, { 400, -673, 779},
- { 741, -595, 1635}, { -161, 307, 657}, { -382, 836, 871},
- { -814, 400, 1223}, { 364, 606, 1247}, { 57, 75, 1571},
- { 151, 471, 2287}, { -81, 1021, 1502}, { 227, 1470, 1097},
- { 658, 1275, 1653}, { 664, 1478, 2377}, { 263, -127, 444},
- { 264, 89, 969}, { 794, 171, 576}, { 821, 186, 1226},
- { 404, 462, 517}, { 339, 918, 794}, { 1280, 1423, 196},
- { 1453, 2019, 365}, { 1615, 1481, 672}, { 2394, 1708, 508},
- { 806, 1238, 573}, { 713, 1158, 1078}, { 1285, 1436, 1232},
- { 1790, 1188, 1141}, { 765, 643, 864}, { 1032, 797, 1279},
- { 900, 563, 1827}, { 1514, 673, 2312}, { 1544, 1129, 3240},
- { 1469, 1050, 1594}, { 1945, 1318, 1988}, { 2397, 2026, 2060},
- { 3538, 2057, 2620}, { 1249, -118, 74}, { 1727, 194, 421},
- { 2078, -50, -463}, { 970, 688, -432}, { 1149, 952, -110},
- { 1254, 1275, -651}, { 1386, 929, 401}, { 1960, 1167, 232},
- { 407, -752, -243}, { 859, -1118, 172}, { -227, -860, -992},
- { -796, -1175, -1380}, { 8, -1282, -388}, { 353, -1781, -1037},
- { -732, -397, -807}, { -853, -28, -1342}, {-1229, -1207, -1959},
- {-1015, -1125, -2543}, {-1452, -1791, -2725}, {-1891, -2416, -3269},
- { -918, -1629, -783}, { -580, -2155, -698}, {-1097, -2364, -96},
- {-1387, -1513, 7}, {-1588, -2076, -664}, {-1473, -2740, -784},
- {-2378, -3149, -56}, {-2856, -2092, -169}, {-3391, -3708, 316},
- {-1176, -890, -614}, {-1944, -1061, -800}, { -299, -1517, -1000},
- { -640, -1850, -1526}, {-1454, -1536, -1233}, {-1890, -1955, -1756},
- {-1086, -1921, -2122}, { -750, -2325, -2260}, {-1325, -2413, -2673},
- {-1114, -2542, -3459}, {-1341, -2901, -3963}, {-1160, -2226, -1393},
- {-1001, -2772, -1573}, {-1594, -2641, -1978}, {-1534, -3046, -2624},
- {-2224, -2196, -675}, {-2807, -3054, -1102}, {-2008, -2840, -1186},
- {-1980, -3332, -1695}, {-1715, -3562, -505}, {-2527, -4000, -1887},
- {-2333, -2734, -2296}, {-3440, -2401, -3211}, {-2008, -3528, -3337},
- {-2247, -3291, -4510}, { -475, 949, 155}, { -149, 1365, 545},
- { -757, 1644, 1083}, { -217, 2053, 1353}, {-1433, 2301, 1462},
- { 495, 1661, 529}, { 10, 2037, 740}, { 2082, 1898, 978},
- { 2831, 2294, 911}, { 842, 793, 420}, { 1223, 1023, 863},
- { 1237, 451, 780}, { 1744, 708, 822}, { 1533, 284, 1384},
- { 2135, 609, 1538}, { 2305, 626, 540}, { 2368, 1187, 955},
- { 2586, 1255, -7}, { 3116, 1131, 726}, { 3431, 1730, 428},
- { 2734, 1648, 1307}, { 2988, 1231, 2010}, { 3523, 2024, 1488},
- { 1034, 1657, 871}, { 1206, 2163, 1036}, { 1807, 2372, 1233},
- { 1808, 1769, 1493}, { 1573, 2332, 1779}, { 1216, 1609, 1866},
- { 1480, 1898, 2513}, { 465, 2708, 2776}, { 771, 3638, 3338},
- { 1869, 2599, 2623}, { 2825, 2745, 2468}, { 2638, 2439, 1585},
- { 2094, 2970, 1308}, { 2022, 3057, 1999}, { 3428, 2912, 1816},
- { 4536, 2974, 2129}, { 1046, 2563, 2086}, { 1363, 3562, 2318},
- { 2511, 1891, 2984}, { 1866, 2306, 3986}, { 3272, 2924, 3682},
- { 3146, 3564, 2272}, { 3592, 3968, 2822}, { 2431, 3369, 3069},
- { 1931, 4709, 3090}, { 2629, 4220, 3986}, { 4639, 4056, 3664},
- { 4035, 5334, 4912}
+static const int16_t lsp_band1[LSP_CB_SIZE * 3] = {
+ 0, 0, 0,
+ -2114, -1302, 76,
+ -2652, -1278, -1368,
+ -2847, -828, -349,
+ -3812, -2190, -349,
+ -3946, -364, -449,
+ -2725, -4492, -3607,
+ -3495, -4764, -1744,
+ -51, -756, 84,
+ -153, -1191, 504,
+ 108, -1418, 1167,
+ -835, -896, 390,
+ -569, -1702, 87,
+ -1151, -1818, 933,
+ -1826, -2547, 411,
+ -1842, -1818, 1451,
+ -2438, -1611, 781,
+ -2747, -2477, 1311,
+ -940, 1252, 477,
+ -1629, 1688, 602,
+ -1202, 617, 280,
+ -1737, 393, 580,
+ -1528, 1077, 1199,
+ -2165, -161, 1408,
+ -2504, -1087, 2371,
+ -3458, -175, 1395,
+ -1397, -98, -843,
+ -2252, -177, -1149,
+ -1489, -726, -1283,
+ -1558, -265, -1744,
+ -1867, -821, -1897,
+ -2062, -1516, -2340,
+ -2595, -1142, -2861,
+ 170, 46, -819,
+ -193, -204, -1151,
+ 326, -196, -1532,
+ 780, 329, -816,
+ 201, 369, -1243,
+ 650, -209, -1060,
+ 1144, -15, -1216,
+ 1203, -259, -1867,
+ -890, -564, -1430,
+ -638, -852, -1921,
+ 177, -739, -1358,
+ -261, -526, -1666,
+ 206, -407, -2255,
+ 338, -526, -822,
+ 421, -1095, -1009,
+ 765, -607, -1408,
+ 825, -1295, -2004,
+ 357, -905, -1815,
+ -58, -1248, -1588,
+ -596, -1436, -2046,
+ -73, -1159, -2116,
+ -115, -1382, -2581,
+ -160, -1723, -1952,
+ -6, -2196, -2954,
+ -649, -1705, -2603,
+ -617, -1453, -3282,
+ -949, -2019, -3102,
+ -812, 1544, 1937,
+ -1854, 574, 2000,
+ -1463, 1140, 2649,
+ -2683, 1748, 1452,
+ -2486, 2241, 2523,
+ 783, 1910, 1435,
+ 581, 2682, 1376,
+ 236, 2197, 1885,
+ -453, 2943, 2057,
+ -682, 2178, 2565,
+ -1342, 3201, 3328,
+ -288, -184, 262,
+ 121, -149, -183,
+ 758, -412, 206,
+ 1038, -204, 853,
+ 1577, -457, 700,
+ 937, -640, -567,
+ 1508, -528, -1024,
+ -225, -527, -427,
+ -564, -1095, -332,
+ -742, -353, -186,
+ -1288, -459, 84,
+ -1853, -484, -274,
+ -1554, -731, 825,
+ -2425, -234, 382,
+ -1722, 293, -271,
+ -2515, 425, -564,
+ -2599, 818, 464,
+ -358, 118, -375,
+ -613, 198, -874,
+ -690, 683, -324,
+ -1352, 1155, -168,
+ -1093, 129, -324,
+ -1184, 611, -858,
+ 433, 386, -372,
+ -120, 486, -634,
+ 234, 851, -631,
+ 602, 128, 46,
+ 1099, 410, 159,
+ 715, -145, -424,
+ 1198, -85, -593,
+ 1390, 367, -358,
+ 1683, 362, -964,
+ 1711, 622, 45,
+ 2033, 833, -383,
+ 2890, 549, -506,
+ 7, 401, 52,
+ 72, 811, 415,
+ 566, 668, 41,
+ 467, 1218, 130,
+ 68, 957, -187,
+ -25, 1649, -103,
+ -661, 260, 214,
+ -925, -94, 612,
+ -321, -422, 965,
+ -788, -672, 1783,
+ 400, -673, 779,
+ 741, -595, 1635,
+ -161, 307, 657,
+ -382, 836, 871,
+ -814, 400, 1223,
+ 364, 606, 1247,
+ 57, 75, 1571,
+ 151, 471, 2287,
+ -81, 1021, 1502,
+ 227, 1470, 1097,
+ 658, 1275, 1653,
+ 664, 1478, 2377,
+ 263, -127, 444,
+ 264, 89, 969,
+ 794, 171, 576,
+ 821, 186, 1226,
+ 404, 462, 517,
+ 339, 918, 794,
+ 1280, 1423, 196,
+ 1453, 2019, 365,
+ 1615, 1481, 672,
+ 2394, 1708, 508,
+ 806, 1238, 573,
+ 713, 1158, 1078,
+ 1285, 1436, 1232,
+ 1790, 1188, 1141,
+ 765, 643, 864,
+ 1032, 797, 1279,
+ 900, 563, 1827,
+ 1514, 673, 2312,
+ 1544, 1129, 3240,
+ 1469, 1050, 1594,
+ 1945, 1318, 1988,
+ 2397, 2026, 2060,
+ 3538, 2057, 2620,
+ 1249, -118, 74,
+ 1727, 194, 421,
+ 2078, -50, -463,
+ 970, 688, -432,
+ 1149, 952, -110,
+ 1254, 1275, -651,
+ 1386, 929, 401,
+ 1960, 1167, 232,
+ 407, -752, -243,
+ 859, -1118, 172,
+ -227, -860, -992,
+ -796, -1175, -1380,
+ 8, -1282, -388,
+ 353, -1781, -1037,
+ -732, -397, -807,
+ -853, -28, -1342,
+ -1229, -1207, -1959,
+ -1015, -1125, -2543,
+ -1452, -1791, -2725,
+ -1891, -2416, -3269,
+ -918, -1629, -783,
+ -580, -2155, -698,
+ -1097, -2364, -96,
+ -1387, -1513, 7,
+ -1588, -2076, -664,
+ -1473, -2740, -784,
+ -2378, -3149, -56,
+ -2856, -2092, -169,
+ -3391, -3708, 316,
+ -1176, -890, -614,
+ -1944, -1061, -800,
+ -299, -1517, -1000,
+ -640, -1850, -1526,
+ -1454, -1536, -1233,
+ -1890, -1955, -1756,
+ -1086, -1921, -2122,
+ -750, -2325, -2260,
+ -1325, -2413, -2673,
+ -1114, -2542, -3459,
+ -1341, -2901, -3963,
+ -1160, -2226, -1393,
+ -1001, -2772, -1573,
+ -1594, -2641, -1978,
+ -1534, -3046, -2624,
+ -2224, -2196, -675,
+ -2807, -3054, -1102,
+ -2008, -2840, -1186,
+ -1980, -3332, -1695,
+ -1715, -3562, -505,
+ -2527, -4000, -1887,
+ -2333, -2734, -2296,
+ -3440, -2401, -3211,
+ -2008, -3528, -3337,
+ -2247, -3291, -4510,
+ -475, 949, 155,
+ -149, 1365, 545,
+ -757, 1644, 1083,
+ -217, 2053, 1353,
+ -1433, 2301, 1462,
+ 495, 1661, 529,
+ 10, 2037, 740,
+ 2082, 1898, 978,
+ 2831, 2294, 911,
+ 842, 793, 420,
+ 1223, 1023, 863,
+ 1237, 451, 780,
+ 1744, 708, 822,
+ 1533, 284, 1384,
+ 2135, 609, 1538,
+ 2305, 626, 540,
+ 2368, 1187, 955,
+ 2586, 1255, -7,
+ 3116, 1131, 726,
+ 3431, 1730, 428,
+ 2734, 1648, 1307,
+ 2988, 1231, 2010,
+ 3523, 2024, 1488,
+ 1034, 1657, 871,
+ 1206, 2163, 1036,
+ 1807, 2372, 1233,
+ 1808, 1769, 1493,
+ 1573, 2332, 1779,
+ 1216, 1609, 1866,
+ 1480, 1898, 2513,
+ 465, 2708, 2776,
+ 771, 3638, 3338,
+ 1869, 2599, 2623,
+ 2825, 2745, 2468,
+ 2638, 2439, 1585,
+ 2094, 2970, 1308,
+ 2022, 3057, 1999,
+ 3428, 2912, 1816,
+ 4536, 2974, 2129,
+ 1046, 2563, 2086,
+ 1363, 3562, 2318,
+ 2511, 1891, 2984,
+ 1866, 2306, 3986,
+ 3272, 2924, 3682,
+ 3146, 3564, 2272,
+ 3592, 3968, 2822,
+ 2431, 3369, 3069,
+ 1931, 4709, 3090,
+ 2629, 4220, 3986,
+ 4639, 4056, 3664,
+ 4035, 5334, 4912,
};
-static const int16_t lsp_band2[LSP_CB_SIZE][4] = {
- { 0, 0, 0, 0}, { 601, 512, -542, 334},
- { 428, 1087, -484, -132}, { 652, 622, -391, -572},
- { 378, 799, 141, -860}, { 1040, 409, 112, -554},
- { 1123, 670, -75, -847}, { 1421, 494, -315, -1095},
- { 787, 1001, 114, -460}, { 988, 1672, 216, -681},
- { 1007, 1241, -132, -1247}, { 1073, 399, 186, -5},
- { 1262, 193, -694, -129}, { 325, 196, 51, -641},
- { 861, -59, 350, -458}, { 1261, 567, 586, -346},
- { 1532, 885, 210, -517}, { 2027, 937, 113, -792},
- { 1383, 1064, 334, 38}, { 1964, 1468, 459, 133},
- { 2062, 1186, -98, -121}, { 2577, 1445, 506, -373},
- { 2310, 1682, -2, -960}, { 2876, 1939, 765, 138},
- { 3581, 2360, 649, -414}, { 219, 176, -398, -309},
- { 434, -78, -435, -880}, { -344, 301, 265, -552},
- { -915, 470, 657, -380}, { 419, -432, -163, -453},
- { 351, -953, 8, -562}, { 789, -43, 20, -958},
- { 302, -594, -352, -1159}, { 1040, 108, -668, -924},
- { 1333, 210, -1217, -1663}, { 483, 589, -350, -1140},
- { 1003, 824, -802, -1184}, { 745, 58, -589, -1443},
- { 346, 247, -915, -1683}, { 270, 796, -720, -2043},
- { 1208, 722, -222, -193}, { 1486, 1180, -412, -672},
- { 1722, 179, -69, -521}, { 2047, 860, -666, -1410},
- { -146, 222, -281, -805}, { -189, 90, -114, -1307},
- { -152, 1086, -241, -764}, { -439, 733, -601, -1302},
- { -833, -167, -351, -601}, { -856, -422, -411, -1059},
- { -747, -355, -582, -1644}, { -837, 210, -916, -1144},
- {-1800, 32, -878, -1687}, { -48, -23, -1146, 52},
- { -350, -409, -1656, -364}, { 265, -728, -858, -577},
- { 458, -247, -1141, -997}, { 691, -407, -1988, -1161},
- { -66, -104, -705, -1249}, { -431, -93, -1191, -1844},
- { 203, -732, -1000, -1693}, { 10, -832, -1846, -1819},
- { 493, -128, -1436, -1768}, { 488, -311, -1730, -2540},
- { -653, -532, -1150, -1172}, {-1086, -289, -1706, -1533},
- { -699, -1205, -1216, -1766}, {-1032, -1481, -2074, -1523},
- { -721, -1220, -2277, -2600}, { 12, -539, -1484, -1131},
- { -40, -911, -2106, -441}, { -471, -484, -2267, -1549},
- { -141, -988, -3006, -1721}, {-1545, -2102, -583, 342},
- {-1383, -2772, -386, -13}, {-2118, -2589, -1205, 72},
- {-2147, -3231, -965, 390}, {-2949, -3300, -621, 637},
- {-3907, -4138, -865, 803}, {-1287, -845, -375, -548},
- {-1416, -1169, -487, -1277}, {-1400, -1690, -1027, -418},
- {-2018, -1909, -1188, -1260}, {-1418, -2222, -2029, -128},
- {-2067, -2998, -2693, -310}, { -950, -1028, -1538, 185},
- {-1616, -915, -2205, -549}, { 19, -821, -1145, 352},
- { 184, -1175, -1356, -627}, { -547, -1088, -1661, -911},
- { -216, -1502, -2197, -948}, { -795, -1306, -2374, -451},
- { -924, -1889, -2796, -680}, { -600, -1614, -3609, -885},
- {-2392, -2528, 319, 303}, {-2908, -2095, -310, 573},
- {-3460, -2141, 49, -113}, {-2231, -448, 675, -146},
- {-2805, -532, 1231, 479}, {-2684, -486, -200, 611},
- {-3525, -971, -198, 704}, {-3707, 173, 349, 254},
- {-4734, -1447, -34, 880}, { 777, -512, 114, -10},
- { 1250, -66, 442, -5}, { 604, 613, 452, -352},
- { 1224, 777, 675, -1014}, {-1372, -79, -1208, -238},
- {-2389, -17, -1157, -818}, {-1504, -673, -1133, -1060},
- {-1984, -799, -2005, -1973}, {-2037, -798, -1068, -105},
- {-3190, -899, -1817, -194}, { -156, -886, 394, -318},
- { -258, -1283, 551, 202}, { -536, -1729, 910, 331},
- { -847, -1109, 795, -163}, {-1171, -1128, 715, 519},
- {-1080, -1319, 1685, 668}, {-1000, -1921, 96, 211},
- {-1487, -2148, 831, 174}, {-1139, -374, 414, -4},
- {-1517, -1383, 396, -352}, {-1012, 439, -59, -967},
- {-1812, 706, -440, -1030}, {-1971, -329, -34, -827},
- {-2472, -1588, -151, -606}, {-2161, 374, -281, 76},
- {-3012, 231, -15, -690}, { 1104, 566, 721, 209},
- { 1685, 564, 383, 98}, { 1898, 750, 792, -97},
- { 556, -64, 561, -93}, { 876, 162, 913, -22},
- { 961, 675, 1296, 140}, { 756, -396, 851, 544},
- { 360, -303, 1341, 396}, { 878, -22, 1464, 863},
- { -309, -273, 642, -129}, { -686, -82, 842, 454},
- { -5, -47, 1069, 998}, { -94, 967, 1277, 298},
- { -489, 385, 1473, 746}, { -369, -717, 1333, 242},
- { 281, -993, 1726, 924}, { 464, 601, 1575, 1376},
- { -250, 206, 2339, 1175}, { -438, 377, -597, -285},
- {-1020, 787, -790, -287}, { -458, -410, 215, 295},
- { -589, -860, -121, 797}, {-1175, 122, -437, 466},
- {-1480, -121, 367, 924}, { 234, 323, 770, -555},
- { 145, 30, 996, 26}, { 66, 849, 93, -145},
- { -117, 1261, 474, -399}, {-1495, 1051, 218, -506},
- {-1390, 694, 994, 88}, { 616, 7, 78, 304},
- { 1060, 52, -62, 835}, { 833, 454, 649, 1359},
- { -770, 464, 47, 93}, { -574, 1199, -39, 379},
- { 114, -98, 488, 485}, { 727, 244, 606, 696},
- { -76, 455, 671, 546}, { -565, -13, 145, 819},
- { -376, 569, 448, 1128}, { 218, 122, 265, 1167},
- { 230, 738, 932, 1003}, { 138, 477, 36, 450},
- { 404, 787, -73, 1000}, { 497, 1259, 387, 1231},
- { 17, 207, 195, -79}, { 562, 358, 53, -158},
- { 493, 387, 478, 189}, { 678, 831, 640, 558},
- { -197, 523, 613, 57}, { 429, 894, 769, 111},
- { 67, 1174, 568, 511}, { 1242, 824, 251, 840},
- { 1419, 1074, 864, 481}, { 924, 1474, 669, 724},
- { 1539, 1879, 654, 1590}, { 445, 337, 1111, 541},
- { 472, 1421, 1264, 1094}, { 794, 735, 1103, 668},
- { 1055, 863, 1192, 1020}, { 778, 1105, 806, 1798},
- { 1052, 1527, 1587, 2151}, { 881, 1552, 1265, 391},
- { 726, 872, 1812, 601}, { 1469, 280, 1008, 616},
- { 1403, 577, 1803, 1244}, { 1650, 1314, 1148, 1072},
- { 1297, 1669, 1911, 1026}, { 2093, 1044, 2115, 1189},
- { 1644, 1961, 2587, 1512}, { 25, -315, -9, -106},
- { 290, -339, 428, -444}, { -68, -783, 735, 772},
- { 245, -555, 468, 47}, { 334, -895, 814, 146},
- { 235, 368, -964, -959}, { -203, 315, -1566, -1217},
- { 801, 17, -276, -354}, { 894, -495, -789, -635},
- { 716, 291, -1189, -357}, { 560, -260, -733, -2},
- { 679, -508, -1429, 211}, { -51, -62, -428, 557},
- { 322, -638, -211, 614}, { -878, -1057, -84, -71},
- { -388, -1415, -167, -318}, { -754, -1574, 214, -539},
- {-1419, -2004, -92, -787}, { -47, -856, -347, -255},
- { 23, -1211, -173, 320}, { -658, -487, -893, 353},
- { -783, -1587, -584, 507}, {-1420, -859, -378, 441},
- {-2095, -1491, -137, 439}, { -321, -1450, -1288, -12},
- { -359, -2113, -553, -8}, { -831, -1918, -1561, 32},
- {-1014, -2487, -1359, -939}, { -475, -311, -169, -236},
- { -907, -426, 276, -611}, { -96, -400, 50, -710},
- { -426, -1022, -10, -985}, { -197, -258, -744, -575},
- { -611, -930, -771, -394}, { -267, -776, -612, -939},
- { -256, -1346, -802, -1122}, { -796, -1570, -825, -754},
- { 712, 876, 141, 227}, { 981, 1509, 85, 124},
- { 1462, 1228, 979, -39}, { 1734, 999, 1481, 440},
- { 2293, 1116, 769, 440}, { 2504, 1480, 1241, 356},
- { 2474, 1909, 1558, 810}, { 917, 1134, 607, -134},
- { 509, 1809, 781, -123}, { 1712, 1506, 559, -423},
- { 2037, 2317, 726, -155}, { 3031, 2676, 1203, 331},
- { 3664, 3274, 1768, 531}, { 1610, 1839, 867, 183},
- { 1774, 1972, 1538, 97}, { 1822, 2158, 1282, 659},
- { 2222, 2758, 1818, 900}, { 3251, 2124, 1723, 996},
- { 3633, 2336, 2408, 1453}, { 2923, 3517, 2567, 1318},
+static const int16_t lsp_band2[LSP_CB_SIZE * 4] = {
+ 0, 0, 0, 0,
+ 601, 512, -542, 334,
+ 428, 1087, -484, -132,
+ 652, 622, -391, -572,
+ 378, 799, 141, -860,
+ 1040, 409, 112, -554,
+ 1123, 670, -75, -847,
+ 1421, 494, -315, -1095,
+ 787, 1001, 114, -460,
+ 988, 1672, 216, -681,
+ 1007, 1241, -132, -1247,
+ 1073, 399, 186, -5,
+ 1262, 193, -694, -129,
+ 325, 196, 51, -641,
+ 861, -59, 350, -458,
+ 1261, 567, 586, -346,
+ 1532, 885, 210, -517,
+ 2027, 937, 113, -792,
+ 1383, 1064, 334, 38,
+ 1964, 1468, 459, 133,
+ 2062, 1186, -98, -121,
+ 2577, 1445, 506, -373,
+ 2310, 1682, -2, -960,
+ 2876, 1939, 765, 138,
+ 3581, 2360, 649, -414,
+ 219, 176, -398, -309,
+ 434, -78, -435, -880,
+ -344, 301, 265, -552,
+ -915, 470, 657, -380,
+ 419, -432, -163, -453,
+ 351, -953, 8, -562,
+ 789, -43, 20, -958,
+ 302, -594, -352, -1159,
+ 1040, 108, -668, -924,
+ 1333, 210, -1217, -1663,
+ 483, 589, -350, -1140,
+ 1003, 824, -802, -1184,
+ 745, 58, -589, -1443,
+ 346, 247, -915, -1683,
+ 270, 796, -720, -2043,
+ 1208, 722, -222, -193,
+ 1486, 1180, -412, -672,
+ 1722, 179, -69, -521,
+ 2047, 860, -666, -1410,
+ -146, 222, -281, -805,
+ -189, 90, -114, -1307,
+ -152, 1086, -241, -764,
+ -439, 733, -601, -1302,
+ -833, -167, -351, -601,
+ -856, -422, -411, -1059,
+ -747, -355, -582, -1644,
+ -837, 210, -916, -1144,
+ -1800, 32, -878, -1687,
+ -48, -23, -1146, 52,
+ -350, -409, -1656, -364,
+ 265, -728, -858, -577,
+ 458, -247, -1141, -997,
+ 691, -407, -1988, -1161,
+ -66, -104, -705, -1249,
+ -431, -93, -1191, -1844,
+ 203, -732, -1000, -1693,
+ 10, -832, -1846, -1819,
+ 493, -128, -1436, -1768,
+ 488, -311, -1730, -2540,
+ -653, -532, -1150, -1172,
+ -1086, -289, -1706, -1533,
+ -699, -1205, -1216, -1766,
+ -1032, -1481, -2074, -1523,
+ -721, -1220, -2277, -2600,
+ 12, -539, -1484, -1131,
+ -40, -911, -2106, -441,
+ -471, -484, -2267, -1549,
+ -141, -988, -3006, -1721,
+ -1545, -2102, -583, 342,
+ -1383, -2772, -386, -13,
+ -2118, -2589, -1205, 72,
+ -2147, -3231, -965, 390,
+ -2949, -3300, -621, 637,
+ -3907, -4138, -865, 803,
+ -1287, -845, -375, -548,
+ -1416, -1169, -487, -1277,
+ -1400, -1690, -1027, -418,
+ -2018, -1909, -1188, -1260,
+ -1418, -2222, -2029, -128,
+ -2067, -2998, -2693, -310,
+ -950, -1028, -1538, 185,
+ -1616, -915, -2205, -549,
+ 19, -821, -1145, 352,
+ 184, -1175, -1356, -627,
+ -547, -1088, -1661, -911,
+ -216, -1502, -2197, -948,
+ -795, -1306, -2374, -451,
+ -924, -1889, -2796, -680,
+ -600, -1614, -3609, -885,
+ -2392, -2528, 319, 303,
+ -2908, -2095, -310, 573,
+ -3460, -2141, 49, -113,
+ -2231, -448, 675, -146,
+ -2805, -532, 1231, 479,
+ -2684, -486, -200, 611,
+ -3525, -971, -198, 704,
+ -3707, 173, 349, 254,
+ -4734, -1447, -34, 880,
+ 777, -512, 114, -10,
+ 1250, -66, 442, -5,
+ 604, 613, 452, -352,
+ 1224, 777, 675, -1014,
+ -1372, -79, -1208, -238,
+ -2389, -17, -1157, -818,
+ -1504, -673, -1133, -1060,
+ -1984, -799, -2005, -1973,
+ -2037, -798, -1068, -105,
+ -3190, -899, -1817, -194,
+ -156, -886, 394, -318,
+ -258, -1283, 551, 202,
+ -536, -1729, 910, 331,
+ -847, -1109, 795, -163,
+ -1171, -1128, 715, 519,
+ -1080, -1319, 1685, 668,
+ -1000, -1921, 96, 211,
+ -1487, -2148, 831, 174,
+ -1139, -374, 414, -4,
+ -1517, -1383, 396, -352,
+ -1012, 439, -59, -967,
+ -1812, 706, -440, -1030,
+ -1971, -329, -34, -827,
+ -2472, -1588, -151, -606,
+ -2161, 374, -281, 76,
+ -3012, 231, -15, -690,
+ 1104, 566, 721, 209,
+ 1685, 564, 383, 98,
+ 1898, 750, 792, -97,
+ 556, -64, 561, -93,
+ 876, 162, 913, -22,
+ 961, 675, 1296, 140,
+ 756, -396, 851, 544,
+ 360, -303, 1341, 396,
+ 878, -22, 1464, 863,
+ -309, -273, 642, -129,
+ -686, -82, 842, 454,
+ -5, -47, 1069, 998,
+ -94, 967, 1277, 298,
+ -489, 385, 1473, 746,
+ -369, -717, 1333, 242,
+ 281, -993, 1726, 924,
+ 464, 601, 1575, 1376,
+ -250, 206, 2339, 1175,
+ -438, 377, -597, -285,
+ -1020, 787, -790, -287,
+ -458, -410, 215, 295,
+ -589, -860, -121, 797,
+ -1175, 122, -437, 466,
+ -1480, -121, 367, 924,
+ 234, 323, 770, -555,
+ 145, 30, 996, 26,
+ 66, 849, 93, -145,
+ -117, 1261, 474, -399,
+ -1495, 1051, 218, -506,
+ -1390, 694, 994, 88,
+ 616, 7, 78, 304,
+ 1060, 52, -62, 835,
+ 833, 454, 649, 1359,
+ -770, 464, 47, 93,
+ -574, 1199, -39, 379,
+ 114, -98, 488, 485,
+ 727, 244, 606, 696,
+ -76, 455, 671, 546,
+ -565, -13, 145, 819,
+ -376, 569, 448, 1128,
+ 218, 122, 265, 1167,
+ 230, 738, 932, 1003,
+ 138, 477, 36, 450,
+ 404, 787, -73, 1000,
+ 497, 1259, 387, 1231,
+ 17, 207, 195, -79,
+ 562, 358, 53, -158,
+ 493, 387, 478, 189,
+ 678, 831, 640, 558,
+ -197, 523, 613, 57,
+ 429, 894, 769, 111,
+ 67, 1174, 568, 511,
+ 1242, 824, 251, 840,
+ 1419, 1074, 864, 481,
+ 924, 1474, 669, 724,
+ 1539, 1879, 654, 1590,
+ 445, 337, 1111, 541,
+ 472, 1421, 1264, 1094,
+ 794, 735, 1103, 668,
+ 1055, 863, 1192, 1020,
+ 778, 1105, 806, 1798,
+ 1052, 1527, 1587, 2151,
+ 881, 1552, 1265, 391,
+ 726, 872, 1812, 601,
+ 1469, 280, 1008, 616,
+ 1403, 577, 1803, 1244,
+ 1650, 1314, 1148, 1072,
+ 1297, 1669, 1911, 1026,
+ 2093, 1044, 2115, 1189,
+ 1644, 1961, 2587, 1512,
+ 25, -315, -9, -106,
+ 290, -339, 428, -444,
+ -68, -783, 735, 772,
+ 245, -555, 468, 47,
+ 334, -895, 814, 146,
+ 235, 368, -964, -959,
+ -203, 315, -1566, -1217,
+ 801, 17, -276, -354,
+ 894, -495, -789, -635,
+ 716, 291, -1189, -357,
+ 560, -260, -733, -2,
+ 679, -508, -1429, 211,
+ -51, -62, -428, 557,
+ 322, -638, -211, 614,
+ -878, -1057, -84, -71,
+ -388, -1415, -167, -318,
+ -754, -1574, 214, -539,
+ -1419, -2004, -92, -787,
+ -47, -856, -347, -255,
+ 23, -1211, -173, 320,
+ -658, -487, -893, 353,
+ -783, -1587, -584, 507,
+ -1420, -859, -378, 441,
+ -2095, -1491, -137, 439,
+ -321, -1450, -1288, -12,
+ -359, -2113, -553, -8,
+ -831, -1918, -1561, 32,
+ -1014, -2487, -1359, -939,
+ -475, -311, -169, -236,
+ -907, -426, 276, -611,
+ -96, -400, 50, -710,
+ -426, -1022, -10, -985,
+ -197, -258, -744, -575,
+ -611, -930, -771, -394,
+ -267, -776, -612, -939,
+ -256, -1346, -802, -1122,
+ -796, -1570, -825, -754,
+ 712, 876, 141, 227,
+ 981, 1509, 85, 124,
+ 1462, 1228, 979, -39,
+ 1734, 999, 1481, 440,
+ 2293, 1116, 769, 440,
+ 2504, 1480, 1241, 356,
+ 2474, 1909, 1558, 810,
+ 917, 1134, 607, -134,
+ 509, 1809, 781, -123,
+ 1712, 1506, 559, -423,
+ 2037, 2317, 726, -155,
+ 3031, 2676, 1203, 331,
+ 3664, 3274, 1768, 531,
+ 1610, 1839, 867, 183,
+ 1774, 1972, 1538, 97,
+ 1822, 2158, 1282, 659,
+ 2222, 2758, 1818, 900,
+ 3251, 2124, 1723, 996,
+ 3633, 2336, 2408, 1453,
+ 2923, 3517, 2567, 1318,
};
static const int16_t fixed_cb_gain[GAIN_LEVELS] = {
-----------------------------------------------------------------------
Summary of changes:
libavcodec/Makefile | 1 +
libavcodec/allcodecs.c | 1 +
libavcodec/g723_1.c | 2 +-
libavcodec/g723_1_parser.c | 75 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 78 insertions(+), 1 deletions(-)
create mode 100644 libavcodec/g723_1_parser.c
--
http://github.com/naufal/ffmpeg-soc
1
0
[soc] libavsequencer [PATCH 08/08] Playback handling public API header file.
by Sebastian Vater 11 Jul '10
by Sebastian Vater 11 Jul '10
11 Jul '10
--
Best regards,
:-) Basty/CDGS (-:
2
2
[soc] libavsequencer [PATCH] Playback engine API initial C file (private declarations).
by Sebastian Vater 11 Jul '10
by Sebastian Vater 11 Jul '10
11 Jul '10
--
Best regards,
:-) Basty/CDGS (-:
1
8
11 Jul '10
Author: diego
Date: Thu Jul 8 15:32:31 2010
New Revision: 5849
Log:
Remove unnecessary and harmful explicit filenames from @file doxygen commands.
Modified:
aac-sbr/aacsbr.c
aac-sbr/aacsbr.h
aac-sbr/aacsbr_internal.h
aac-sbr/aacsbrdata.h
aac/aac.c
aac/aac.h
aac/aacdectab.h
aac/aactab.c
aac/aactab.h
aacenc/3gpp-based/aac.h
aacenc/3gpp-based/aacenc.c
aacenc/3gpp-based/aacpsy.c
aacenc/3gpp-based/lowpass.c
aacenc/3gpp-based/lowpass.h
aacenc/aac.h
aacenc/aaccoder.c
aacenc/aacenc.c
aacenc/aacpsy.c
afilters/af_null.c
afilters/af_vol.c
afilters/parseutils.c
afilters/parseutils.h
als/als_data.h
als/alsdec.c
amr/amrfixeddata.h
amr/amrnbdata.h
amr/amrnbdec.c
amr/amrnbfixeddec.c
concat/libavformat/avplaylist.c
concat/libavformat/avplaylist.h
concat/libavformat/concat.c
concat/libavformat/concat.h
concat/libavformat/concatgen.c
concat/libavformat/datanode.c
concat/libavformat/datanode.h
concat/libavformat/m3u.c
concat/libavformat/playlist.c
concat/libavformat/playlist.h
concat/libavformat/pls.c
concat/libavformat/xspf.c
dirac/libavcodec/dirac.c
dirac/libavcodec/dirac.h
dirac/libavcodec/dirac_arith.c
dirac/libavcodec/dirac_arith.h
dirac/libavcodec/dirac_parser.c
dirac/libavcodec/dirac_wavelet.c
dirac/libavcodec/dirac_wavelet.h
dirac/libavcodec/diracdec.c
dirac/libavcodec/diracenc.c
dvbmuxer/ffmpeg_svn.patch
dvbmuxer/mpegpes.h
indeo4/indeo4.c
indeo4/indeo4data.h
indeo5/indeo5.c
indeo5/indeo5data.h
indeo5/ivi_common.c
indeo5/ivi_common.h
indeo5/ivi_dsp.c
indeo5/ivi_dsp.h
jpeg2000/dwt.c
jpeg2000/dwt.h
jpeg2000/j2k.c
jpeg2000/j2k.h
jpeg2000/j2kdec.c
jpeg2000/j2kenc.c
jpeg2000/mqc.c
jpeg2000/mqc.h
jpeg2000/mqcdec.c
jpeg2000/mqcenc.c
libavfilter/vf_rotate.c
libavfilter/vf_transpose.c
nellyenc/nellymoserenc.c
qcelp/qcelp_parser.c
qcelp/qcelpdata.h
qcelp/qcelpdec.c
rtmp/rtmpproto.c
rv40/h264pred.c
rv40/h264pred.h
rv40/rv30.c
rv40/rv30data.h
rv40/rv34.c
rv40/rv34.h
rv40/rv34data.h
rv40/rv34vlc.h
rv40/rv40.c
rv40/rv40data.h
rv40/rv40dsp.c
rv40/rv40vlc2.h
seek_api/utils.c
spdif/spdif.c
vc-1/demuxer/vc1test.c
vc-1/try0/vc1.c
vc-1/try0/vc1data.h
vorbis_enc/vorbis_enc.c
wmapro/wmaprodata.h
wmapro/wmaprodec.c
Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aac-sbr/aacsbr.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file libavcodec/aacsbr.c
+ * @file
* AAC Spectral Band Replication decoding functions
* @author Robert Swain ( rob opendot cl )
*/
Modified: aac-sbr/aacsbr.h
==============================================================================
--- aac-sbr/aacsbr.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aac-sbr/aacsbr.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/aacsbr.h
+ * @file
* AAC Spectral Band Replication definitions and structures
* @author Robert Swain ( rob opendot cl )
*/
Modified: aac-sbr/aacsbr_internal.h
==============================================================================
--- aac-sbr/aacsbr_internal.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aac-sbr/aacsbr_internal.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/aacsbr_internal.h
+ * @file
* AAC Spectral Band Replication function declarations
* @author Robert Swain ( rob opendot cl )
*/
Modified: aac-sbr/aacsbrdata.h
==============================================================================
--- aac-sbr/aacsbrdata.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aac-sbr/aacsbrdata.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/aacsbrdata.h
+ * @file
* AAC Spectral Band Replication decoding data
* @author Robert Swain ( rob opendot cl )
*/
Modified: aac/aac.c
==============================================================================
--- aac/aac.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aac/aac.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file aac.c
+ * @file
* AAC decoder
* @author Oded Shimon ( ods15 ods15 dyndns org )
* @author Maxim Gavrilov ( maxim.gavrilov gmail com )
Modified: aac/aac.h
==============================================================================
--- aac/aac.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aac/aac.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file aac.h
+ * @file
* AAC definitions and structures
* @author Oded Shimon ( ods15 ods15 dyndns org )
* @author Maxim Gavrilov ( maxim.gavrilov gmail com )
Modified: aac/aacdectab.h
==============================================================================
--- aac/aacdectab.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aac/aacdectab.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file aacdectab.h
+ * @file
* AAC decoder data
* @author Oded Shimon ( ods15 ods15 dyndns org )
* @author Maxim Gavrilov ( maxim.gavrilov gmail com )
Modified: aac/aactab.c
==============================================================================
--- aac/aactab.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aac/aactab.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file aactab.c
+ * @file
* AAC data
* @author Oded Shimon ( ods15 ods15 dyndns org )
* @author Maxim Gavrilov ( maxim.gavrilov gmail com )
Modified: aac/aactab.h
==============================================================================
--- aac/aactab.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aac/aactab.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file aactab.h
+ * @file
* AAC data declarations
* @author Oded Shimon ( ods15 ods15 dyndns org )
* @author Maxim Gavrilov ( maxim.gavrilov gmail com )
Modified: aacenc/3gpp-based/aac.h
==============================================================================
--- aacenc/3gpp-based/aac.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/3gpp-based/aac.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file aac.h
+ * @file
* AAC definitions and structures
* @author Oded Shimon ( ods15 ods15 dyndns org )
* @author Maxim Gavrilov ( maxim.gavrilov gmail com )
Modified: aacenc/3gpp-based/aacenc.c
==============================================================================
--- aacenc/3gpp-based/aacenc.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/3gpp-based/aacenc.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file aacenc.c
+ * @file
* AAC encoder
*/
Modified: aacenc/3gpp-based/aacpsy.c
==============================================================================
--- aacenc/3gpp-based/aacpsy.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/3gpp-based/aacpsy.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file aacpsy.c
+ * @file
* AAC encoder psychoacoustic model
*/
Modified: aacenc/3gpp-based/lowpass.c
==============================================================================
--- aacenc/3gpp-based/lowpass.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/3gpp-based/lowpass.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file lowpass.c
+ * @file
* lowpass filter implementation
*/
Modified: aacenc/3gpp-based/lowpass.h
==============================================================================
--- aacenc/3gpp-based/lowpass.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/3gpp-based/lowpass.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file lowpass.h
+ * @file
* lowpass filter interface
*/
Modified: aacenc/aac.h
==============================================================================
--- aacenc/aac.h Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/aac.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file libavcodec/aac.h
+ * @file
* AAC definitions and structures
* @author Oded Shimon ( ods15 ods15 dyndns org )
* @author Maxim Gavrilov ( maxim.gavrilov gmail com )
Modified: aacenc/aaccoder.c
==============================================================================
--- aacenc/aaccoder.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/aaccoder.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/aaccoder.c
+ * @file
* AAC coefficients encoder
*/
Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/aacenc.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/aacenc.c
+ * @file
* AAC encoder
*/
Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c Sun Jul 4 21:08:10 2010 (r5848)
+++ aacenc/aacpsy.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/aacpsy.c
+ * @file
* AAC encoder psychoacoustic model
*/
Modified: afilters/af_null.c
==============================================================================
--- afilters/af_null.c Sun Jul 4 21:08:10 2010 (r5848)
+++ afilters/af_null.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -17,7 +17,7 @@
*/
/**
- * @file libavfilter/vf_null.c
+ * @file
* null filter. used as an example, or for development
*/
Modified: afilters/af_vol.c
==============================================================================
--- afilters/af_vol.c Sun Jul 4 21:08:10 2010 (r5848)
+++ afilters/af_vol.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -17,7 +17,7 @@
*/
/**
- * @file libavfilter/af_vol.c
+ * @file
* null filter. used as an example, or for development
*/
Modified: afilters/parseutils.c
==============================================================================
--- afilters/parseutils.c Sun Jul 4 21:08:10 2010 (r5848)
+++ afilters/parseutils.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -18,7 +18,7 @@
*/
/**
- * @file libavfilter/parseutils.c
+ * @file
* parsing utils
*/
Modified: afilters/parseutils.h
==============================================================================
--- afilters/parseutils.h Sun Jul 4 21:08:10 2010 (r5848)
+++ afilters/parseutils.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -18,7 +18,7 @@
*/
/**
- * @file libavfilter/parseutils.h
+ * @file
* parsing utils
*/
Modified: als/als_data.h
==============================================================================
--- als/als_data.h Sun Jul 4 21:08:10 2010 (r5848)
+++ als/als_data.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -23,7 +23,7 @@
#define AVCODEC_ALS_DATA_H
/**
- * @file libavcodec/als_data.h
+ * @file
* MPEG-4 ALS common data tables
* @author Thilo Borgmann <thilo.borgmann _at_ googlemail.com>
*/
Modified: als/alsdec.c
==============================================================================
--- als/alsdec.c Sun Jul 4 21:08:10 2010 (r5848)
+++ als/alsdec.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/alsdec.c
+ * @file
* MPEG-4 ALS decoder
* @author Thilo Borgmann <thilo.borgmann _at_ googlemail.com>
*/
Modified: amr/amrfixeddata.h
==============================================================================
--- amr/amrfixeddata.h Sun Jul 4 21:08:10 2010 (r5848)
+++ amr/amrfixeddata.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -23,7 +23,7 @@
#define AVCODEC_AMRFIXEDDATA_H
/**
- * @file libavcodec/amrfixeddata.h
+ * @file
* AMR data and definitions
*/
Modified: amr/amrnbdata.h
==============================================================================
--- amr/amrnbdata.h Sun Jul 4 21:08:10 2010 (r5848)
+++ amr/amrnbdata.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -22,7 +22,7 @@
/**
- * @file libavcodec/amrnbdata.h
+ * @file
* AMR narrowband data and definitions
*/
Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c Sun Jul 4 21:08:10 2010 (r5848)
+++ amr/amrnbdec.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -22,7 +22,7 @@
/**
- * @file libavcodec/amrnbdec.c
+ * @file
* AMR narrowband decoder
*
* This decoder uses floats for simplicity and so is not bit-exact. One
Modified: amr/amrnbfixeddec.c
==============================================================================
--- amr/amrnbfixeddec.c Sun Jul 4 21:08:10 2010 (r5848)
+++ amr/amrnbfixeddec.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
/**
- * @file libavcodec/amrnbfixeddec.c
+ * @file
* AMR narrowband decoder
*/
Modified: concat/libavformat/avplaylist.c
==============================================================================
--- concat/libavformat/avplaylist.c Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/avplaylist.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/avplaylist.c
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief General components used by playlist formats
Modified: concat/libavformat/avplaylist.h
==============================================================================
--- concat/libavformat/avplaylist.h Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/avplaylist.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/avplaylist.h
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief General components used by playlist formats
Modified: concat/libavformat/concat.c
==============================================================================
--- concat/libavformat/concat.c Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/concat.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/concat.c
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief Minimal playlist/concatenation demuxer
Modified: concat/libavformat/concat.h
==============================================================================
--- concat/libavformat/concat.h Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/concat.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/concat.h
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief Minimal playlist/concatenation demuxer
Modified: concat/libavformat/concatgen.c
==============================================================================
--- concat/libavformat/concatgen.c Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/concatgen.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/concatgen.c
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief Generic functions used by playlist/concatenation demuxers
Modified: concat/libavformat/datanode.c
==============================================================================
--- concat/libavformat/datanode.c Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/datanode.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/datanode.c
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief Format to represent ini and xml files as doubly linked 2D data nodes
Modified: concat/libavformat/datanode.h
==============================================================================
--- concat/libavformat/datanode.h Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/datanode.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/datanode.h
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief Format to represent ini and xml files as doubly linked 2D data nodes
Modified: concat/libavformat/m3u.c
==============================================================================
--- concat/libavformat/m3u.c Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/m3u.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/m3u.c
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief M3U playlist demuxer
Modified: concat/libavformat/playlist.c
==============================================================================
--- concat/libavformat/playlist.c Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/playlist.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/playlist.c
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief Internal functions used to manipulate playlists
Modified: concat/libavformat/playlist.h
==============================================================================
--- concat/libavformat/playlist.h Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/playlist.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/playlist.h
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief Internal functions used to manipulate playlists
Modified: concat/libavformat/pls.c
==============================================================================
--- concat/libavformat/pls.c Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/pls.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/pls.c
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief PLS playlist demuxer
Modified: concat/libavformat/xspf.c
==============================================================================
--- concat/libavformat/xspf.c Sun Jul 4 21:08:10 2010 (r5848)
+++ concat/libavformat/xspf.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/** @file libavformat/pls.c
+/** @file
* @author Geza Kovacs ( gkovacs mit edu )
*
* @brief XSPF playlist demuxer
Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/dirac.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/dirac.c
+ * @file
* Dirac Decoder
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/dirac.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -23,7 +23,7 @@
#define AVCODEC_DIRAC_H
/**
- * @file libavcodec/dirac.h
+ * @file
* Interfaces to Dirac Decoder/Encoder
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dirac/libavcodec/dirac_arith.c
==============================================================================
--- dirac/libavcodec/dirac_arith.c Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/dirac_arith.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/dirac_arith.c
+ * @file
* Arithmetic decoder for Dirac
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dirac/libavcodec/dirac_arith.h
==============================================================================
--- dirac/libavcodec/dirac_arith.h Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/dirac_arith.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/dirac_arith.h
+ * @file
* Arithmetic decoder for Dirac
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dirac/libavcodec/dirac_parser.c
==============================================================================
--- dirac/libavcodec/dirac_parser.c Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/dirac_parser.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -22,7 +22,7 @@
*/
/**
- * @file libavcodec/dirac_parser.c
+ * @file
* Dirac Parser
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dirac/libavcodec/dirac_wavelet.c
==============================================================================
--- dirac/libavcodec/dirac_wavelet.c Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/dirac_wavelet.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/dirac_wavelet.c
+ * @file
* Dirac wavelet functions
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dirac/libavcodec/dirac_wavelet.h
==============================================================================
--- dirac/libavcodec/dirac_wavelet.h Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/dirac_wavelet.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/dirac_arith.h
+ * @file
* Dirac support interfaces
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/diracdec.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/diracdec.c
+ * @file
* Dirac Decoder
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dirac/libavcodec/diracenc.c
==============================================================================
--- dirac/libavcodec/diracenc.c Sun Jul 4 21:08:10 2010 (r5848)
+++ dirac/libavcodec/diracenc.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/diracenc.c
+ * @file
* Dirac Encoder
* @author Marco Gerards <marco(a)gnu.org>
*/
Modified: dvbmuxer/ffmpeg_svn.patch
==============================================================================
--- dvbmuxer/ffmpeg_svn.patch Sun Jul 4 21:08:10 2010 (r5848)
+++ dvbmuxer/ffmpeg_svn.patch Thu Jul 8 15:32:31 2010 (r5849)
@@ -24,7 +24,7 @@ Index: libavformat/mpegpes.h
+ */
+
+/**
-+ * @file libavformat/mpegpes.h
++ * @file
+ * MPEG PES packetizer API header
+ */
+
Modified: dvbmuxer/mpegpes.h
==============================================================================
--- dvbmuxer/mpegpes.h Sun Jul 4 21:08:10 2010 (r5848)
+++ dvbmuxer/mpegpes.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
*/
/**
- * @file libavformat/mpegpes.h
+ * @file
* MPEG PES packetizer API header
*/
Modified: indeo4/indeo4.c
==============================================================================
--- indeo4/indeo4.c Sun Jul 4 21:08:10 2010 (r5848)
+++ indeo4/indeo4.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/indeo4.c
+ * @file
* Indeo Video Interactive version 4 decoder
*
* Indeo4 data is usually transported within .avi or .mov files.
Modified: indeo4/indeo4data.h
==============================================================================
--- indeo4/indeo4data.h Sun Jul 4 21:08:10 2010 (r5848)
+++ indeo4/indeo4data.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
-* @file libavcodec/indeo4data.h
+* @file
* This file contains data needed for the Indeo4 decoder.
*/
Modified: indeo5/indeo5.c
==============================================================================
--- indeo5/indeo5.c Sun Jul 4 21:08:10 2010 (r5848)
+++ indeo5/indeo5.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/indeo5.c
+ * @file
* Indeo Video Interactive version 5 decoder
*
* Indeo5 data is usually transported within .avi or .mov files.
Modified: indeo5/indeo5data.h
==============================================================================
--- indeo5/indeo5data.h Sun Jul 4 21:08:10 2010 (r5848)
+++ indeo5/indeo5data.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavcodec/indeo5data.h
+ * @file
* This file contains data needed for the Indeo5 decoder.
*/
Modified: indeo5/ivi_common.c
==============================================================================
--- indeo5/ivi_common.c Sun Jul 4 21:08:10 2010 (r5848)
+++ indeo5/ivi_common.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file libavcodec/ivi_common.c
+ * @file
* This file contains functions and data shared by both Indeo4 and
* Indeo5 decoders.
*/
Modified: indeo5/ivi_common.h
==============================================================================
--- indeo5/ivi_common.h Sun Jul 4 21:08:10 2010 (r5848)
+++ indeo5/ivi_common.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file libavcodec/ivi_common.h
+ * @file
* This file contains structures and macros shared by both Indeo4 and
* Indeo5 decoders.
*/
Modified: indeo5/ivi_dsp.c
==============================================================================
--- indeo5/ivi_dsp.c Sun Jul 4 21:08:10 2010 (r5848)
+++ indeo5/ivi_dsp.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file libavcodec/ivi_dsp.c
+ * @file
* DSP functions (inverse transforms, motion compensation, wavelet recompostions)
* for Indeo Video Interactive codecs.
*/
Modified: indeo5/ivi_dsp.h
==============================================================================
--- indeo5/ivi_dsp.h Sun Jul 4 21:08:10 2010 (r5848)
+++ indeo5/ivi_dsp.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file libavcodec/ivi_dsp.h
+ * @file
* DSP functions (inverse transforms, motion compensations, wavelet recompostion)
* for Indeo Video Interactive codecs.
*/
Modified: jpeg2000/dwt.c
==============================================================================
--- jpeg2000/dwt.c Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/dwt.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
/**
* Discrete wavelet transform
- * @file libavcodec/dwt.c
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/dwt.h
==============================================================================
--- jpeg2000/dwt.h Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/dwt.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -24,7 +24,7 @@
/**
* Discrete wavelet transform
- * @file libavcodec/dwt.h
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/j2k.c
==============================================================================
--- jpeg2000/j2k.c Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/j2k.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
/**
* JPEG2000 image encoder and decoder common functions
- * @file libavcodec/j2k.c
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/j2k.h
==============================================================================
--- jpeg2000/j2k.h Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/j2k.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -24,7 +24,7 @@
/**
* JPEG2000 tables
- * @file libavcodec/j2k.h
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/j2kdec.c
==============================================================================
--- jpeg2000/j2kdec.c Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/j2kdec.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
/**
* JPEG2000 image decoder
- * @file libavcodec/j2kdec.c
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/j2kenc.c
==============================================================================
--- jpeg2000/j2kenc.c Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/j2kenc.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
/**
* JPEG2000 image encoder
- * @file libavcodec/j2kenc.c
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/mqc.c
==============================================================================
--- jpeg2000/mqc.c Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/mqc.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
/**
* MQ-coder ecoder and decoder common functions
- * @file libavcodec/mqc.c
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/mqc.h
==============================================================================
--- jpeg2000/mqc.h Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/mqc.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -24,7 +24,7 @@
/**
* MQ-coder
- * @file libavcodec/mqc.h
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/mqcdec.c
==============================================================================
--- jpeg2000/mqcdec.c Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/mqcdec.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
/**
* MQ-coder decoder
- * @file libavcodec/mqcdec.c
+ * @file
* @author Kamil Nowosad
*/
Modified: jpeg2000/mqcenc.c
==============================================================================
--- jpeg2000/mqcenc.c Sun Jul 4 21:08:10 2010 (r5848)
+++ jpeg2000/mqcenc.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
/**
* MQ-coder encoder
- * @file libavcodec/mqcenc.c
+ * @file
* @author Kamil Nowosad
*/
Modified: libavfilter/vf_rotate.c
==============================================================================
--- libavfilter/vf_rotate.c Sun Jul 4 21:08:10 2010 (r5848)
+++ libavfilter/vf_rotate.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavfilter/vf_rotate.c
+ * @file
* rotation filter
*
* @todo copy code from rotozoom.c to remove use of floating-point
Modified: libavfilter/vf_transpose.c
==============================================================================
--- libavfilter/vf_transpose.c Sun Jul 4 21:08:10 2010 (r5848)
+++ libavfilter/vf_transpose.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavfilter/vf_transpose.c
+ * @file
* Transposition filter
*
* @todo handle packed pixel formats
Modified: nellyenc/nellymoserenc.c
==============================================================================
--- nellyenc/nellymoserenc.c Sun Jul 4 21:08:10 2010 (r5848)
+++ nellyenc/nellymoserenc.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -22,7 +22,7 @@
*/
/**
- * @file nellymoserenc.c
+ * @file
* Nellymoser encoder
* by Bartlomiej Wolowiec
*
Modified: qcelp/qcelp_parser.c
==============================================================================
--- qcelp/qcelp_parser.c Sun Jul 4 21:08:10 2010 (r5848)
+++ qcelp/qcelp_parser.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file qcelp_parser.c
+ * @file
* QCELP parser
* @author Reynaldo H. Verdejo Pinochet
*/
Modified: qcelp/qcelpdata.h
==============================================================================
--- qcelp/qcelpdata.h Sun Jul 4 21:08:10 2010 (r5848)
+++ qcelp/qcelpdata.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -23,7 +23,7 @@
#define AVCODEC_QCELPDATA_H
/**
- * @file qcelpdata.h
+ * @file
* Data tables for the QCELP decoder
* @author Reynaldo H. Verdejo Pinochet
* @remark FFmpeg merging spearheaded by Kenan Gillet
Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c Sun Jul 4 21:08:10 2010 (r5848)
+++ qcelp/qcelpdec.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file qcelpdec.c
+ * @file
* QCELP decoder
* @author Reynaldo H. Verdejo Pinochet
* @remark FFmpeg merging spearheaded by Kenan Gillet
Modified: rtmp/rtmpproto.c
==============================================================================
--- rtmp/rtmpproto.c Sun Jul 4 21:08:10 2010 (r5848)
+++ rtmp/rtmpproto.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavformat/rtmpproto.c
+ * @file
* RTMP protocol
*/
Modified: rv40/h264pred.c
==============================================================================
--- rv40/h264pred.c Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/h264pred.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file h264pred.c
+ * @file
* H.264 / AVC / MPEG4 part10 prediction functions.
* @author Michael Niedermayer <michaelni(a)gmx.at>
*/
Modified: rv40/h264pred.h
==============================================================================
--- rv40/h264pred.h Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/h264pred.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file h264pred.h
+ * @file
* H.264 / AVC / MPEG4 prediction functions.
* @author Michael Niedermayer <michaelni(a)gmx.at>
*/
Modified: rv40/rv30.c
==============================================================================
--- rv40/rv30.c Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv30.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv30.c
+ * @file
* RV30 decoder.
*/
Modified: rv40/rv30data.h
==============================================================================
--- rv40/rv30data.h Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv30data.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv30data.h
+ * @file
* miscellaneous RV30 tables
*/
Modified: rv40/rv34.c
==============================================================================
--- rv40/rv34.c Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv34.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv34.c
+ * @file
* RV30/40 decoder common data.
*/
Modified: rv40/rv34.h
==============================================================================
--- rv40/rv34.h Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv34.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv34.h
+ * @file
* RV30 and RV40 decoder common data declarations.
*/
Modified: rv40/rv34data.h
==============================================================================
--- rv40/rv34data.h Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv34data.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv34data.h
+ * @file
* miscellaneous RV30/40 tables
*/
Modified: rv40/rv34vlc.h
==============================================================================
--- rv40/rv34vlc.h Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv34vlc.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv34vlc.h
+ * @file
* RV30/40 VLC tables.
*/
Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv40.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv40.c
+ * @file
* RV40 decoder.
*/
Modified: rv40/rv40data.h
==============================================================================
--- rv40/rv40data.h Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv40data.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv40data.h
+ * @file
* miscellaneous RV40 tables
*/
Modified: rv40/rv40dsp.c
==============================================================================
--- rv40/rv40dsp.c Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv40dsp.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv40dsp.c
+ * @file
* RV40 decoder motion compensation functions
*/
Modified: rv40/rv40vlc2.h
==============================================================================
--- rv40/rv40vlc2.h Sun Jul 4 21:08:10 2010 (r5848)
+++ rv40/rv40vlc2.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file rv40vlc2.h
+ * @file
* RV40 VLC tables used for macroblock information decoding
*/
Modified: seek_api/utils.c
==============================================================================
--- seek_api/utils.c Sun Jul 4 21:08:10 2010 (r5848)
+++ seek_api/utils.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -32,7 +32,7 @@
#include <assert.h>
/**
- * @file libavformat/utils.c
+ * @file
* various utility functions for use within FFmpeg
*/
Modified: spdif/spdif.c
==============================================================================
--- spdif/spdif.c Sun Jul 4 21:08:10 2010 (r5848)
+++ spdif/spdif.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file libavformat/spdif.c
+ * @file
* IEC-61937 encapsulation of various formats, used by S/PDIF
* @author Bartlomiej Wolowiec
*/
Modified: vc-1/demuxer/vc1test.c
==============================================================================
--- vc-1/demuxer/vc1test.c Sun Jul 4 21:08:10 2010 (r5848)
+++ vc-1/demuxer/vc1test.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -20,7 +20,7 @@
*/
/**
- * @file vc1test.c
+ * @file
* VC1 test bitstreams file demuxer
* by Konstantin Shishkov
* Format specified in SMPTE standard 421 Annex L
Modified: vc-1/try0/vc1.c
==============================================================================
--- vc-1/try0/vc1.c Sun Jul 4 21:08:10 2010 (r5848)
+++ vc-1/try0/vc1.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file vc1.c
+ * @file
* VC-1 and WMV3 decoder
*
*/
Modified: vc-1/try0/vc1data.h
==============================================================================
--- vc-1/try0/vc1data.h Sun Jul 4 21:08:10 2010 (r5848)
+++ vc-1/try0/vc1data.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file vc1data.h
+ * @file
* VC-1 tables.
*/
Modified: vorbis_enc/vorbis_enc.c
==============================================================================
--- vorbis_enc/vorbis_enc.c Sun Jul 4 21:08:10 2010 (r5848)
+++ vorbis_enc/vorbis_enc.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -19,7 +19,7 @@
*/
/**
- * @file vorbis_enc.c
+ * @file
* Native Vorbis encoder.
* @author Oded Shimon <ods15(a)ods15.dyndns.org>
*/
Modified: wmapro/wmaprodata.h
==============================================================================
--- wmapro/wmaprodata.h Sun Jul 4 21:08:10 2010 (r5848)
+++ wmapro/wmaprodata.h Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file libavcodec/wmaprodata.h
+ * @file
* @brief tables for wmapro decoding
*/
Modified: wmapro/wmaprodec.c
==============================================================================
--- wmapro/wmaprodec.c Sun Jul 4 21:08:10 2010 (r5848)
+++ wmapro/wmaprodec.c Thu Jul 8 15:32:31 2010 (r5849)
@@ -21,7 +21,7 @@
*/
/**
- * @file libavcodec/wmaprodec.c
+ * @file
* @brief wmapro decoder implementation
* Wmapro is an MDCT based codec comparable to wma standard or AAC.
* The decoding therefore consists of the following steps:
3
2
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via 90058508bef6d5043f0d039c1d9d6e8188079df5 (commit)
from 9c54ab79501afa169d9ef4fb056ce6297ce29c0c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 90058508bef6d5043f0d039c1d9d6e8188079df5
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Sat Jul 10 17:07:03 2010 -0300
Decode vector quantized gains, rename vq to vq_gain
diff --git a/libavcodec/amrwbdata.h b/libavcodec/amrwbdata.h
index ecb748a..92eed65 100644
--- a/libavcodec/amrwbdata.h
+++ b/libavcodec/amrwbdata.h
@@ -51,15 +51,14 @@ enum Mode {
typedef struct {
uint16_t adap; ///< adaptive codebook index
uint8_t ltp; ///< ltp-filtering flag
- uint8_t vq; ///< VQ gain
- uint8_t gain; ///< codebooks gain
+ uint8_t vq_gain; ///< VQ adaptive and innovative gains
uint8_t energy; ///< high-band energy
uint16_t pul_ih[4]; ///< MSBs part of codebook index (high modes only)
uint16_t pul_il[4]; ///< LSBs part of codebook index
} AMRWBSubFrame;
typedef struct {
- uint8_t vad; ///< vad-flag
+ uint8_t vad; ///< voice activity detection flag
uint16_t isp_id[7]; ///< index of ISP subvectors
AMRWBSubFrame subframe[4]; ///< data for subframes
} AMRWBFrame;
@@ -89,19 +88,19 @@ static const uint16_t order_MODE_6k60[] = {
8, AMR_OF(0, adap), 12, 13, 14, 15, 27, 28, 54, 66,
12, AMR_OF(0, pul_il[0]), 84, 92, 100, 108, 116, 124, 85, 96,
104, 112, 120, 128,
- 6, AMR_OF(0, vq), 33, 16, 37, 20, 4, 8,
+ 6, AMR_OF(0, vq_gain), 33, 16, 37, 20, 4, 8,
5, AMR_OF(1, adap), 39, 46, 56, 68, 74,
12, AMR_OF(1, pul_il[0]), 86, 93, 101, 109, 117, 125, 87, 97,
105, 113, 121, 129,
- 6, AMR_OF(1, vq), 29, 17, 35, 21, 5, 9,
+ 6, AMR_OF(1, vq_gain), 29, 17, 35, 21, 5, 9,
5, AMR_OF(2, adap), 42, 47, 53, 55, 67,
12, AMR_OF(2, pul_il[0]), 88, 94, 102, 110, 118, 126, 89, 98,
106, 114, 122, 130,
- 6, AMR_OF(2, vq), 34, 18, 36, 22, 6, 24,
+ 6, AMR_OF(2, vq_gain), 34, 18, 36, 22, 6, 24,
5, AMR_OF(3, adap), 40, 41, 57, 69, 75,
12, AMR_OF(3, pul_il[0]), 90, 95, 103, 111, 119, 127, 91, 99,
107, 115, 123, 131,
- 6, AMR_OF(3, vq), 30, 19, 26, 23, 7, 25,
+ 6, AMR_OF(3, vq_gain), 30, 19, 26, 23, 7, 25,
0
};
@@ -119,25 +118,25 @@ static const uint16_t order_MODE_8k85[] = {
5, AMR_OF(0, pul_il[1]), 98, 117, 133, 149, 165,
5, AMR_OF(0, pul_il[2]), 99, 121, 137, 153, 169,
5, AMR_OF(0, pul_il[3]), 100, 125, 141, 157, 173,
- 6, AMR_OF(0, vq), 12, 32, 20, 24, 28, 16,
+ 6, AMR_OF(0, vq_gain), 12, 32, 20, 24, 28, 16,
5, AMR_OF(1, adap), 41, 64, 69, 75, 90,
5, AMR_OF(1, pul_il[0]), 101, 114, 130, 146, 162,
5, AMR_OF(1, pul_il[1]), 102, 118, 134, 150, 166,
5, AMR_OF(1, pul_il[2]), 103, 122, 138, 154, 170,
5, AMR_OF(1, pul_il[3]), 104, 126, 142, 158, 174,
- 6, AMR_OF(1, vq), 13, 33, 21, 25, 29, 17,
+ 6, AMR_OF(1, vq_gain), 13, 33, 21, 25, 29, 17,
8, AMR_OF(2, adap), 9, 10, 11, 37, 42, 62, 72, 84,
5, AMR_OF(2, pul_il[0]), 105, 115, 131, 147, 163,
5, AMR_OF(2, pul_il[1]), 106, 119, 135, 151, 167,
5, AMR_OF(2, pul_il[2]), 107, 123, 139, 155, 171,
5, AMR_OF(2, pul_il[3]), 108, 127, 143, 159, 175,
- 6, AMR_OF(2, vq), 14, 34, 22, 26, 30, 18,
+ 6, AMR_OF(2, vq_gain), 14, 34, 22, 26, 30, 18,
5, AMR_OF(3, adap), 43, 65, 70, 76, 91,
5, AMR_OF(3, pul_il[0]), 109, 116, 132, 148, 164,
5, AMR_OF(3, pul_il[1]), 110, 120, 136, 152, 168,
5, AMR_OF(3, pul_il[2]), 111, 124, 140, 156, 172,
5, AMR_OF(3, pul_il[3]), 112, 128, 144, 160, 176,
- 6, AMR_OF(3, vq), 15, 35, 23, 27, 31, 19,
+ 6, AMR_OF(3, vq_gain), 15, 35, 23, 27, 31, 19,
0
};
@@ -161,7 +160,7 @@ static const uint16_t order_MODE_12k65[] = {
241,
9, AMR_OF(0, pul_il[3]), 112, 149, 181, 213, 245, 153, 185, 217,
249,
- 7, AMR_OF(0, vq), 3, 20, 42, 28, 32, 38, 24,
+ 7, AMR_OF(0, vq_gain), 3, 20, 42, 28, 32, 38, 24,
6, AMR_OF(2, adap), 36, 49, 72, 77, 83, 98,
1, AMR_OF(2, ltp), 106,
9, AMR_OF(2, pul_il[0]), 113, 126, 158, 190, 222, 130, 162, 194,
@@ -172,7 +171,7 @@ static const uint16_t order_MODE_12k65[] = {
242,
9, AMR_OF(2, pul_il[3]), 116, 150, 182, 214, 246, 154, 186, 218,
250,
- 7, AMR_OF(2, vq), 4, 21, 43, 29, 33, 39, 25,
+ 7, AMR_OF(2, vq_gain), 4, 21, 43, 29, 33, 39, 25,
9, AMR_OF(3, adap), 15, 16, 17, 18, 19, 51, 70, 80,
92,
1, AMR_OF(3, ltp), 107,
@@ -184,7 +183,7 @@ static const uint16_t order_MODE_12k65[] = {
243,
9, AMR_OF(3, pul_il[3]), 120, 151, 183, 215, 247, 155, 187, 219,
251,
- 7, AMR_OF(3, vq), 5, 22, 44, 30, 34, 40, 26,
+ 7, AMR_OF(3, vq_gain), 5, 22, 44, 30, 34, 40, 26,
6, AMR_OF(4, adap), 37, 50, 73, 78, 84, 99,
1, AMR_OF(4, ltp), 108,
9, AMR_OF(4, pul_il[0]), 121, 128, 160, 192, 224, 132, 164, 196,
@@ -195,7 +194,7 @@ static const uint16_t order_MODE_12k65[] = {
244,
9, AMR_OF(4, pul_il[3]), 124, 152, 184, 216, 248, 156, 188, 220,
252,
- 7, AMR_OF(4, vq), 6, 23, 45, 31, 35, 41, 27,
+ 7, AMR_OF(4, vq_gain), 6, 23, 45, 31, 35, 41, 27,
0
};
@@ -219,7 +218,7 @@ static const uint16_t order_MODE_14k25[] = {
277,
9, AMR_OF(0, pul_il[3]), 137, 145, 153, 161, 185, 209, 233, 257,
281,
- 7, AMR_OF(0, vq), 3, 20, 42, 28, 32, 38, 24,
+ 7, AMR_OF(0, vq_gain), 3, 20, 42, 28, 32, 38, 24,
6, AMR_OF(1, adap), 36, 49, 72, 77, 83, 98,
1, AMR_OF(1, ltp), 106,
13, AMR_OF(1, pul_il[0]), 118, 190, 214, 238, 262, 110, 122, 166,
@@ -230,7 +229,7 @@ static const uint16_t order_MODE_14k25[] = {
278,
9, AMR_OF(1, pul_il[3]), 138, 146, 154, 162, 186, 210, 234, 258,
282,
- 7, AMR_OF(1, vq), 4, 21, 43, 29, 33, 39, 25,
+ 7, AMR_OF(1, vq_gain), 4, 21, 43, 29, 33, 39, 25,
9, AMR_OF(2, adap), 15, 16, 17, 18, 19, 51, 70, 80,
92,
1, AMR_OF(2, ltp), 107,
@@ -242,7 +241,7 @@ static const uint16_t order_MODE_14k25[] = {
279,
9, AMR_OF(2, pul_il[3]), 139, 147, 155, 163, 187, 211, 235, 259,
283,
- 7, AMR_OF(2, vq), 5, 22, 44, 30, 34, 40, 26,
+ 7, AMR_OF(2, vq_gain), 5, 22, 44, 30, 34, 40, 26,
6, AMR_OF(3, adap), 37, 50, 73, 78, 84, 99,
1, AMR_OF(3, ltp), 108,
13, AMR_OF(3, pul_il[0]), 120, 192, 216, 240, 264, 112, 124, 168,
@@ -253,7 +252,7 @@ static const uint16_t order_MODE_14k25[] = {
280,
9, AMR_OF(3, pul_il[3]), 140, 148, 156, 164, 188, 212, 236, 260,
284,
- 7, AMR_OF(3, vq), 6, 23, 45, 31, 35, 41, 27,
+ 7, AMR_OF(3, vq_gain), 6, 23, 45, 31, 35, 41, 27,
0
};
@@ -277,7 +276,7 @@ static const uint16_t order_MODE_15k85[] = {
249, 297, 205, 253, 301,
13, AMR_OF(0, pul_il[3]), 137, 169, 209, 257, 305, 153, 121, 213,
261, 309, 217, 265, 313,
- 7, AMR_OF(0, vq), 3, 20, 42, 28, 32, 38, 24,
+ 7, AMR_OF(0, vq_gain), 3, 20, 42, 28, 32, 38, 24,
6, AMR_OF(1, adap), 36, 49, 72, 77, 83, 98,
1, AMR_OF(1, ltp), 106,
13, AMR_OF(1, pul_il[0]), 126, 158, 174, 222, 270, 142, 110, 178,
@@ -288,7 +287,7 @@ static const uint16_t order_MODE_15k85[] = {
250, 298, 206, 254, 302,
13, AMR_OF(1, pul_il[3]), 138, 170, 210, 258, 306, 154, 122, 214,
262, 310, 218, 266, 314,
- 7, AMR_OF(1, vq), 4, 21, 43, 29, 33, 39, 25,
+ 7, AMR_OF(1, vq_gain), 4, 21, 43, 29, 33, 39, 25,
9, AMR_OF(2, adap), 15, 16, 17, 18, 19, 51, 70, 80,
92,
1, AMR_OF(2, ltp), 107,
@@ -300,7 +299,7 @@ static const uint16_t order_MODE_15k85[] = {
251, 299, 207, 255, 303,
13, AMR_OF(2, pul_il[3]), 139, 171, 211, 259, 307, 155, 123, 215,
263, 311, 219, 267, 315,
- 7, AMR_OF(2, vq), 5, 22, 44, 30, 34, 40, 26,
+ 7, AMR_OF(2, vq_gain), 5, 22, 44, 30, 34, 40, 26,
6, AMR_OF(3, adap), 37, 50, 73, 78, 84, 99,
1, AMR_OF(3, ltp), 108,
13, AMR_OF(3, pul_il[0]), 128, 160, 176, 224, 272, 144, 112, 180,
@@ -311,7 +310,7 @@ static const uint16_t order_MODE_15k85[] = {
252, 300, 208, 256, 304,
13, AMR_OF(3, pul_il[3]), 140, 172, 212, 260, 308, 156, 124, 216,
264, 312, 220, 268, 316,
- 7, AMR_OF(3, vq), 6, 23, 45, 31, 35, 41, 27,
+ 7, AMR_OF(3, vq_gain), 6, 23, 45, 31, 35, 41, 27,
0
};
@@ -339,7 +338,7 @@ static const uint16_t order_MODE_18k25[] = {
172, 258, 306, 303, 350, 133,
14, AMR_OF(0, pul_il[3]), 193, 276, 346, 188, 164, 285, 198, 196,
168, 237, 270, 294, 335, 112,
- 7, AMR_OF(0, vq), 3, 20, 42, 28, 32, 38, 24,
+ 7, AMR_OF(0, vq_gain), 3, 20, 42, 28, 32, 38, 24,
6, AMR_OF(1, adap), 36, 49, 72, 77, 83, 98,
1, AMR_OF(1, ltp), 106,
2, AMR_OF(1, pul_ih[0]), 140, 111,
@@ -354,7 +353,7 @@ static const uint16_t order_MODE_18k25[] = {
173, 260, 287, 314, 354, 147,
14, AMR_OF(1, pul_il[3]), 204, 279, 337, 228, 199, 300, 238, 171,
176, 263, 284, 321, 356, 109,
- 7, AMR_OF(1, vq), 4, 21, 43, 29, 33, 39, 25,
+ 7, AMR_OF(1, vq_gain), 4, 21, 43, 29, 33, 39, 25,
9, AMR_OF(2, adap), 15, 16, 17, 18, 19, 51, 70, 80,
92,
1, AMR_OF(2, ltp), 107,
@@ -370,7 +369,7 @@ static const uint16_t order_MODE_18k25[] = {
220, 269, 313, 328, 364, 152,
14, AMR_OF(2, pul_il[3]), 232, 309, 361, 218, 229, 302, 252, 191,
181, 261, 291, 310, 349, 115,
- 7, AMR_OF(2, vq), 5, 22, 44, 30, 34, 40, 26,
+ 7, AMR_OF(2, vq_gain), 5, 22, 44, 30, 34, 40, 26,
6, AMR_OF(3, adap), 37, 50, 73, 78, 84, 99,
1, AMR_OF(3, ltp), 108,
2, AMR_OF(3, pul_ih[0]), 136, 121,
@@ -385,7 +384,7 @@ static const uint16_t order_MODE_18k25[] = {
187, 248, 286, 322, 345, 144,
14, AMR_OF(3, pul_il[3]), 206, 288, 352, 223, 215, 327, 233, 163,
156, 222, 273, 297, 333, 118,
- 7, AMR_OF(3, vq), 6, 23, 45, 31, 35, 41, 27,
+ 7, AMR_OF(3, vq_gain), 6, 23, 45, 31, 35, 41, 27,
0
};
@@ -415,7 +414,7 @@ static const uint16_t order_MODE_19k85[] = {
201, 207, 261, 288, 318, 366,
14, AMR_OF(0, pul_il[3]), 151, 187, 285, 361, 222, 223, 306, 221,
198, 177, 242, 280, 299, 360,
- 7, AMR_OF(0, vq), 3, 20, 42, 28, 32, 38, 24,
+ 7, AMR_OF(0, vq_gain), 3, 20, 42, 28, 32, 38, 24,
6, AMR_OF(1, adap), 36, 49, 72, 77, 83, 98,
1, AMR_OF(1, ltp), 106,
10, AMR_OF(1, pul_ih[0]), 140, 174, 268, 347, 386, 164, 115, 186,
@@ -432,7 +431,7 @@ static const uint16_t order_MODE_19k85[] = {
196, 193, 244, 276, 324, 368,
14, AMR_OF(1, pul_il[3]), 137, 184, 263, 358, 215, 219, 317, 234,
185, 211, 248, 311, 313, 372,
- 7, AMR_OF(1, vq), 4, 21, 43, 29, 33, 39, 25,
+ 7, AMR_OF(1, vq_gain), 4, 21, 43, 29, 33, 39, 25,
9, AMR_OF(2, adap), 15, 16, 17, 18, 19, 51, 70, 80,
92,
1, AMR_OF(2, ltp), 107,
@@ -450,7 +449,7 @@ static const uint16_t order_MODE_19k85[] = {
231, 232, 247, 290, 316, 376,
14, AMR_OF(2, pul_il[3]), 155, 214, 302, 370, 230, 208, 321, 240,
194, 191, 239, 294, 305, 362,
- 7, AMR_OF(2, vq), 5, 22, 44, 30, 34, 40, 26,
+ 7, AMR_OF(2, vq_gain), 5, 22, 44, 30, 34, 40, 26,
6, AMR_OF(3, adap), 37, 50, 73, 78, 84, 99,
1, AMR_OF(3, ltp), 108,
10, AMR_OF(3, pul_ih[0]), 147, 163, 271, 339, 387, 176, 114, 202,
@@ -467,7 +466,7 @@ static const uint16_t order_MODE_19k85[] = {
205, 203, 252, 300, 322, 367,
14, AMR_OF(3, pul_il[3]), 146, 218, 304, 364, 229, 217, 315, 224,
200, 168, 238, 287, 284, 351,
- 7, AMR_OF(3, vq), 6, 23, 45, 31, 35, 41, 27,
+ 7, AMR_OF(3, vq_gain), 6, 23, 45, 31, 35, 41, 27,
0
};
@@ -499,7 +498,7 @@ static const uint16_t order_MODE_23k05[] = {
405, 424, 456,
11, AMR_OF(0, pul_il[3]), 218, 176, 342, 432, 244, 223, 252, 357,
385, 412, 457,
- 7, AMR_OF(0, gain), 3, 20, 42, 28, 32, 38, 24,
+ 7, AMR_OF(0, vq_gain), 3, 20, 42, 28, 32, 38, 24,
6, AMR_OF(1, adap), 36, 49, 72, 77, 83, 98,
1, AMR_OF(1, ltp), 106,
11, AMR_OF(1, pul_ih[0]), 116, 139, 137, 166, 225, 292, 344, 236,
@@ -518,7 +517,7 @@ static const uint16_t order_MODE_23k05[] = {
368, 415, 454,
11, AMR_OF(1, pul_il[3]), 230, 199, 352, 435, 253, 261, 293, 386,
407, 419, 455,
- 7, AMR_OF(1, gain), 4, 21, 43, 29, 33, 39, 25,
+ 7, AMR_OF(1, vq_gain), 4, 21, 43, 29, 33, 39, 25,
9, AMR_OF(2, adap), 15, 16, 17, 18, 19, 51, 70, 80,
92,
1, AMR_OF(2, ltp), 107,
@@ -538,7 +537,7 @@ static const uint16_t order_MODE_23k05[] = {
413, 429, 453,
11, AMR_OF(2, pul_il[3]), 287, 189, 383, 434, 267, 259, 248, 363,
409, 422, 446,
- 7, AMR_OF(2, gain), 5, 22, 44, 30, 34, 40, 26,
+ 7, AMR_OF(2, vq_gain), 5, 22, 44, 30, 34, 40, 26,
6, AMR_OF(3, adap), 37, 50, 73, 78, 84, 99,
1, AMR_OF(3, ltp), 108,
11, AMR_OF(3, pul_ih[0]), 119, 152, 136, 163, 210, 286, 331, 283,
@@ -557,7 +556,7 @@ static const uint16_t order_MODE_23k05[] = {
414, 425, 448,
11, AMR_OF(3, pul_il[3]), 239, 167, 373, 433, 228, 265, 289, 378,
389, 418, 444,
- 7, AMR_OF(3, gain), 6, 23, 45, 31, 35, 41, 27,
+ 7, AMR_OF(3, vq_gain), 6, 23, 45, 31, 35, 41, 27,
0
};
@@ -589,7 +588,7 @@ static const uint16_t order_MODE_23k85[] = {
421, 440, 472,
11, AMR_OF(0, pul_il[3]), 234, 192, 358, 448, 260, 239, 268, 373,
401, 428, 473,
- 7, AMR_OF(0, gain), 3, 20, 42, 28, 32, 38, 24,
+ 7, AMR_OF(0, vq_gain), 3, 20, 42, 28, 32, 38, 24,
4, AMR_OF(0, energy), 72, 73, 74, 75,
6, AMR_OF(1, adap), 36, 49, 88, 93, 99, 114,
1, AMR_OF(1, ltp), 122,
@@ -609,7 +608,7 @@ static const uint16_t order_MODE_23k85[] = {
384, 431, 470,
11, AMR_OF(1, pul_il[3]), 246, 215, 368, 451, 269, 277, 309, 402,
423, 435, 471,
- 7, AMR_OF(1, gain), 4, 21, 43, 29, 33, 39, 25,
+ 7, AMR_OF(1, vq_gain), 4, 21, 43, 29, 33, 39, 25,
4, AMR_OF(1, energy), 76, 77, 78, 79,
9, AMR_OF(2, adap), 15, 16, 17, 18, 19, 51, 70, 96,
108,
@@ -630,7 +629,7 @@ static const uint16_t order_MODE_23k85[] = {
429, 445, 469,
11, AMR_OF(2, pul_il[3]), 303, 205, 399, 450, 283, 275, 264, 379,
425, 438, 462,
- 7, AMR_OF(2, gain), 5, 22, 44, 30, 34, 40, 26,
+ 7, AMR_OF(2, vq_gain), 5, 22, 44, 30, 34, 40, 26,
4, AMR_OF(2, energy), 80, 81, 82, 83,
6, AMR_OF(3, adap), 37, 50, 89, 94, 100, 115,
1, AMR_OF(3, ltp), 124,
@@ -650,7 +649,7 @@ static const uint16_t order_MODE_23k85[] = {
430, 441, 464,
11, AMR_OF(3, pul_il[3]), 255, 183, 389, 449, 244, 281, 305, 394,
405, 434, 460,
- 7, AMR_OF(3, gain), 6, 23, 45, 31, 35, 41, 27,
+ 7, AMR_OF(3, vq_gain), 6, 23, 45, 31, 35, 41, 27,
4, AMR_OF(3, energy), 84, 85, 86, 87,
0
};
@@ -1637,13 +1636,116 @@ static const float ac_inter[65] = {
0.000098, 0.000048, 0.000007, 0.000000
};
-/* [i][j] is the number of pulses in track j at mode i */
+/* [i][j] is the number of pulses present in track j at mode i */
static const int pulses_nb_per_mode_tr[][4] = {
{1, 1, 0, 0}, {1, 1, 1, 1}, {2, 2, 2, 2},
{3, 3, 2, 2}, {3, 3, 3, 3}, {4, 4, 4, 4},
{5, 5, 4, 4}, {6, 6, 6, 6}, {6, 6, 6, 6}
};
+/* Tables for decoding quantized gains {pitch, fixed factor} */
+static const int16_t qua_gain_6b[64][2] = {
+ { 1566, 1332}, { 1577, 3557},
+ { 3071, 6490}, { 4193, 10163},
+ { 4496, 2534}, { 5019, 4488},
+ { 5586, 15614}, { 5725, 1422},
+ { 6453, 580}, { 6724, 6831},
+ { 7657, 3527}, { 8072, 2099},
+ { 8232, 5319}, { 8827, 8775},
+ { 9740, 2868}, { 9856, 1465},
+ { 10087, 12488}, { 10241, 4453},
+ { 10859, 6618}, { 11321, 3587},
+ { 11417, 1800}, { 11643, 2428},
+ { 11718, 988}, { 12312, 5093},
+ { 12523, 8413}, { 12574, 26214},
+ { 12601, 3396}, { 13172, 1623},
+ { 13285, 2423}, { 13418, 6087},
+ { 13459, 12810}, { 13656, 3607},
+ { 14111, 4521}, { 14144, 1229},
+ { 14425, 1871}, { 14431, 7234},
+ { 14445, 2834}, { 14628, 10036},
+ { 14860, 17496}, { 15161, 3629},
+ { 15209, 5819}, { 15299, 2256},
+ { 15518, 4722}, { 15663, 1060},
+ { 15759, 7972}, { 15939, 11964},
+ { 16020, 2996}, { 16086, 1707},
+ { 16521, 4254}, { 16576, 6224},
+ { 16894, 2380}, { 16906, 681},
+ { 17213, 8406}, { 17610, 3418},
+ { 17895, 5269}, { 18168, 11748},
+ { 18230, 1575}, { 18607, 32767},
+ { 18728, 21684}, { 19137, 2543},
+ { 19422, 6577}, { 19446, 4097},
+ { 19450, 9056}, { 20371, 14885}
+};
+
+static const int16_t qua_gain_7b[128][2] = {
+ { 204, 441}, { 464, 1977},
+ { 869, 1077}, { 1072, 3062},
+ { 1281, 4759}, { 1647, 1539},
+ { 1845, 7020}, { 1853, 634},
+ { 1995, 2336}, { 2351, 15400},
+ { 2661, 1165}, { 2702, 3900},
+ { 2710, 10133}, { 3195, 1752},
+ { 3498, 2624}, { 3663, 849},
+ { 3984, 5697}, { 4214, 3399},
+ { 4415, 1304}, { 4695, 2056},
+ { 5376, 4558}, { 5386, 676},
+ { 5518, 23554}, { 5567, 7794},
+ { 5644, 3061}, { 5672, 1513},
+ { 5957, 2338}, { 6533, 1060},
+ { 6804, 5998}, { 6820, 1767},
+ { 6937, 3837}, { 7277, 414},
+ { 7305, 2665}, { 7466, 11304},
+ { 7942, 794}, { 8007, 1982},
+ { 8007, 1366}, { 8326, 3105},
+ { 8336, 4810}, { 8708, 7954},
+ { 8989, 2279}, { 9031, 1055},
+ { 9247, 3568}, { 9283, 1631},
+ { 9654, 6311}, { 9811, 2605},
+ { 10120, 683}, { 10143, 4179},
+ { 10245, 1946}, { 10335, 1218},
+ { 10468, 9960}, { 10651, 3000},
+ { 10951, 1530}, { 10969, 5290},
+ { 11203, 2305}, { 11325, 3562},
+ { 11771, 6754}, { 11839, 1849},
+ { 11941, 4495}, { 11954, 1298},
+ { 11975, 15223}, { 11977, 883},
+ { 11986, 2842}, { 12438, 2141},
+ { 12593, 3665}, { 12636, 8367},
+ { 12658, 1594}, { 12886, 2628},
+ { 12984, 4942}, { 13146, 1115},
+ { 13224, 524}, { 13341, 3163},
+ { 13399, 1923}, { 13549, 5961},
+ { 13606, 1401}, { 13655, 2399},
+ { 13782, 3909}, { 13868, 10923},
+ { 14226, 1723}, { 14232, 2939},
+ { 14278, 7528}, { 14439, 4598},
+ { 14451, 984}, { 14458, 2265},
+ { 14792, 1403}, { 14818, 3445},
+ { 14899, 5709}, { 15017, 15362},
+ { 15048, 1946}, { 15069, 2655},
+ { 15405, 9591}, { 15405, 4079},
+ { 15570, 7183}, { 15687, 2286},
+ { 15691, 1624}, { 15699, 3068},
+ { 15772, 5149}, { 15868, 1205},
+ { 15970, 696}, { 16249, 3584},
+ { 16338, 1917}, { 16424, 2560},
+ { 16483, 4438}, { 16529, 6410},
+ { 16620, 11966}, { 16839, 8780},
+ { 17030, 3050}, { 17033, 18325},
+ { 17092, 1568}, { 17123, 5197},
+ { 17351, 2113}, { 17374, 980},
+ { 17566, 26214}, { 17609, 3912},
+ { 17639, 32767}, { 18151, 7871},
+ { 18197, 2516}, { 18202, 5649},
+ { 18679, 3283}, { 18930, 1370},
+ { 19271, 13757}, { 19317, 4120},
+ { 19460, 1973}, { 19654, 10018},
+ { 19764, 6792}, { 19912, 5135},
+ { 20040, 2841}, { 21234, 19833}
+};
+
/* Core frame sizes in each mode */
static const uint16_t cf_sizes_wb[] = {
132, 177, 253, 285, 317, 365, 397, 461, 477,
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 7b069ce..4def620 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -53,6 +53,8 @@ typedef struct {
float *excitation; ///< points to current excitation in excitation_buf[]
float pitch_vector[AMRWB_SUBFRAME_SIZE]; ///< adaptive codebook (pitch) vector for current subframe
+
+ float pitch_gain[5]; ///< quantified pitch gains for the current and previous four subframes
} AMRWBContext;
static int amrwb_decode_init(AVCodecContext *avctx)
@@ -548,10 +550,10 @@ static void decode_6p_track(int *out, int code, int m, int off)
* Decode the algebraic codebook index to pulse positions and signs,
* then construct the algebraic codebook vector.
*
- * @param fixed_sparse pointer to the algebraic (innovative) codebook
- * @param pulse_hi MSBs part of the pulse index array (used in higher modes)
- * @param pulse_lo LSBs part of the pulse index array
- * @param mode mode of the current frame
+ * @param fixed_sparse [out] pointer to the algebraic (innovative) codebook
+ * @param pulse_hi [in] MSBs part of the pulse index array (higher modes only)
+ * @param pulse_lo [in] LSBs part of the pulse index array
+ * @param mode [in] mode of the current frame
*/
// XXX: For now, uses the same AMRFixed struct from AMR-NB but
// the maximum number of pulses in it was increased to 24
@@ -620,6 +622,28 @@ static void decode_fixed_sparse(AMRFixed *fixed_sparse, const uint16_t *pulse_hi
fixed_sparse->n = pulses_nb;
}
+/**
+ * Decode pitch gain and fixed gain correction factor
+ *
+ * @param vq_gain [in] vector-quantized index for gains
+ * @param mode [in] mode of the current frame
+ * @param fixed_gain_factor [out] decoded fixed gain correction factor
+ * @param pitch_gain [out] decoded pitch gain
+ */
+static void decode_gains(const uint8_t vq_gain, const enum Mode mode,
+ float *fixed_gain_factor, float *pitch_gain)
+{
+ const int16_t *gains;
+
+ if (mode == MODE_6k60 || mode == MODE_8k85)
+ gains = qua_gain_6b[vq_gain];
+ else
+ gains = qua_gain_7b[vq_gain];
+
+ *pitch_gain = gains[0] * (1.0 / 16384.0);
+ *fixed_gain_factor = gains[1] * (1.0 / 2048.0);
+}
+
static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt)
{
@@ -628,6 +652,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AMRFixed fixed_sparse = {0}; // fixed vector up to anti-sparseness processing
+ float fixed_gain_factor; // fixed gain correction factor (gamma)
int sub;
ctx->fr_cur_mode = unpack_bitstream(ctx, buf, buf_size);
@@ -663,9 +688,12 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
/* Decode adaptive codebook */
decode_pitch_vector(ctx, cur_subframe, sub);
- /* Decode innovative codebook */
+ /* Decode innovative codebook (sparse representation) */
decode_fixed_sparse(&fixed_sparse, cur_subframe->pul_ih,
cur_subframe->pul_il, ctx->fr_cur_mode);
+
+ decode_gains(cur_subframe->vq_gain, ctx->fr_cur_mode,
+ &fixed_gain_factor, &ctx->pitch_gain[4]);
}
//update state for next frame
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdata.h | 182 +++++++++++++++++++++++++++++++++++++-----------
libavcodec/amrwbdec.c | 38 +++++++++--
2 files changed, 175 insertions(+), 45 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
Author: mchinen
Date: Fri Jul 9 21:47:19 2010
New Revision: 5854
Log:
Add CBR detection and seeking for post av_build_index seeking
Added:
seek2010/seek2010_07_09_r24145.patch
Added: seek2010/seek2010_07_09_r24145.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ seek2010/seek2010_07_09_r24145.patch Fri Jul 9 21:47:19 2010 (r5854)
@@ -0,0 +1,561 @@
+Index: ffplay.c
+===================================================================
+--- ffplay.c (revision 24145)
++++ ffplay.c (working copy)
+@@ -2392,6 +2392,7 @@
+ AVFormatParameters params, *ap = ¶ms;
+ int eof=0;
+ int pkt_in_play_range = 0;
++ char *index_filename = NULL;
+
+ ic = avformat_alloc_context();
+
+@@ -2508,6 +2509,18 @@
+ goto fail;
+ }
+
++ if(ic->filename){
++ index_filename = av_malloc(strlen(ic->filename) + 5);
++ strcpy(index_filename, ic->filename);
++ strcat(index_filename, ".fdx");
++ }
++
++ if (av_load_index_file(ic, index_filename) < 0 ) {
++ av_build_index(ic, 0); //AV_BUILD_INDEX_PARALLEL);
++ av_save_index_file(ic, index_filename);
++ }
++ av_free(index_filename);
++
+ for(;;) {
+ if (is->abort_request)
+ break;
+Index: libavformat/avformat.h
+===================================================================
+--- libavformat/avformat.h (revision 24145)
++++ libavformat/avformat.h (working copy)
+@@ -535,6 +535,16 @@
+ * Number of frames that have been demuxed during av_find_stream_info()
+ */
+ int codec_info_nb_frames;
++
++ /* new av_seek_frame_table() support */
++#define AV_SEEKTABLE_BUILDING 0x0001 ///< a flag set by av_build_index to mark that the index is being built
++#define AV_SEEKTABLE_CBR 0x0002 ///< a flag set by av_build_index to note that the file is constant bit rate
++#define AV_SEEKTABLE_FINISHED 0x0004 ///< a flag set by av_build_index to note that the complete index table is ready to use
++#define AV_SEEKTABLE_COPIED 0x0008 ///< a flag to note that the seek table has been copied.
++ int seek_table_flags;
++ AVIndexEntry* parallel_index_entries; ///used with AV_BUILD_INDEX_PARALLEL. should not be touched by client
++ int parallel_nb_index_entries;
++ unsigned int parallel_index_entries_allocated_size;
+ } AVStream;
+
+ #define AV_PROGRAM_RUNNING 1
+@@ -1133,6 +1143,26 @@
+ int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
+
+ /**
++ * Builds a complete index for seeking in each stream where it is possible.
++ * Requires that the streams have been opened.
++ * Part of the new seeking api. incomplete.
++ */
++int av_build_index(AVFormatContext *s, int flags);
++#define AV_BUILD_INDEX_PARALLEL 0x0001 ///< Builds the index via a copied demuxer streams. av_build_index with this flag can be called on a seperate thread while decoding is happening on another.
++
++/**
++ * Saves the index table built with av_build_index to a file
++ * Returns 0 if succesful or a negative value on failure.
++ */
++int av_save_index_file(AVFormatContext *ic, const char *filename);
++
++/**
++ * Loads the index saved with av_save_index.
++ * Returns 0 if successful or a negative value on failure.
++ */
++int av_load_index_file(AVFormatContext *ic, const char *filename);
++
++/**
+ * Ensure the index uses less memory than the maximum specified in
+ * AVFormatContext.max_index_size by discarding entries if it grows
+ * too large.
+@@ -1151,6 +1181,15 @@
+ int size, int distance, int flags);
+
+ /**
++ * Perform a dictionary search on the seek table.
++ * av_build_index must be successfully called before using this function.
++ * @param timestamp target timestamp in the time base of the given stream
++ * @param stream_index stream number
++ */
++int av_seek_frame_table(AVFormatContext *s,
++ int stream_index, int64_t timestamp, int flags);
++
++/**
+ * Perform a binary search using av_index_search_timestamp() and
+ * AVCodec.read_timestamp().
+ * This is not supposed to be called directly by a user application,
+Index: libavformat/utils.c
+===================================================================
+--- libavformat/utils.c (revision 24145)
++++ libavformat/utils.c (working copy)
+@@ -1031,7 +1031,6 @@
+ pkt->convergence_duration = pc->convergence_duration;
+ }
+
+-
+ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
+ {
+ AVStream *st;
+@@ -1355,21 +1354,28 @@
+
+ st->index_entries= entries;
+
+- index= av_index_search_timestamp(st, timestamp, AVSEEK_FLAG_ANY);
++ //if we are building the table, the indicies added in order, so we don't have to do expensive searching.
++ if(st->seek_table_flags & AV_SEEKTABLE_BUILDING) {
++ index = st->nb_index_entries++;
++ ie = &st->index_entries[index];
++ }
++ else {
++ index= av_index_search_timestamp(st, timestamp, AVSEEK_FLAG_ANY);
+
+- if(index<0){
+- index= st->nb_index_entries++;
+- ie= &entries[index];
+- assert(index==0 || ie[-1].timestamp < timestamp);
+- }else{
+- ie= &entries[index];
+- if(ie->timestamp != timestamp){
+- if(ie->timestamp <= timestamp)
+- return -1;
+- memmove(entries + index + 1, entries + index, sizeof(AVIndexEntry)*(st->nb_index_entries - index));
+- st->nb_index_entries++;
+- }else if(ie->pos == pos && distance < ie->min_distance) //do not reduce the distance
+- distance= ie->min_distance;
++ if(index<0){
++ index= st->nb_index_entries++;
++ ie= &entries[index];
++ assert(index==0 || ie[-1].timestamp < timestamp);
++ }else{
++ ie= &entries[index];
++ if(ie->timestamp != timestamp){
++ if(ie->timestamp <= timestamp)
++ return -1;
++ memmove(entries + index + 1, entries + index, sizeof(AVIndexEntry)*(st->nb_index_entries - index));
++ st->nb_index_entries++;
++ }else if(ie->pos == pos && distance < ie->min_distance) //do not reduce the distance
++ distance= ie->min_distance;
++ }
+ }
+
+ ie->pos = pos;
+@@ -1705,6 +1711,11 @@
+ timestamp = av_rescale(timestamp, st->time_base.den, AV_TIME_BASE * (int64_t)st->time_base.num);
+ }
+
++ /* if we've built a seek table, use it. */
++ st = s->streams[stream_index];
++ if (st->seek_table_flags & AV_SEEKTABLE_FINISHED)
++ return av_seek_frame_table(s, stream_index, timestamp, flags);
++
+ /* first, we try the format specific seek */
+ if (s->iformat->read_seek)
+ ret = s->iformat->read_seek(s, stream_index, timestamp, flags);
+@@ -1742,6 +1753,398 @@
+ // try some generic seek like av_seek_frame_generic() but with new ts semantics
+ }
+
++int av_seek_frame_table(AVFormatContext *s,
++ int stream_index, int64_t timestamp, int flags)
++{
++ int index;
++ int64_t ret;
++ AVStream *st;
++ AVIndexEntry *ie;
++
++ st = s->streams[stream_index];
++
++ //TODO: see if we can do something with the CBR field.
++ if(st->seek_table_flags & AV_SEEKTABLE_CBR){
++ int64_t target_pos;
++ int64_t start_time;
++ //if there is a constant frame length, we can compute where to jump to, but CBR may not have constant frame length
++
++ start_time = st->start_time == AV_NOPTS_VALUE ? 0 : st->start_time;
++ target_pos = s->data_offset + s->file_size * (timestamp - start_time) * av_q2d(st->time_base) / (st->duration * av_q2d(st->time_base));
++ if ((ret = url_fseek(s->pb, target_pos, SEEK_SET)) < 0)
++ return ret;
++ av_update_cur_dts(s, st, timestamp);
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: cbr seek ok to %lli of %lli bytes\n", target_pos, s->file_size);
++ return 0;
++ }
++
++ //see if we need to move the parallel table over
++ if(st->parallel_index_entries) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: copying over parallel frames\n");
++ av_free(st->index_entries);
++ st->index_entries = st->parallel_index_entries;
++ st->nb_index_entries = st->parallel_nb_index_entries;
++ st->index_entries_allocated_size = st->parallel_index_entries_allocated_size;
++ st->parallel_index_entries = NULL;
++ }
++
++ index = av_index_search_timestamp(st, timestamp, flags);
++
++ /* this function should only be called after the table is complete. */
++ if(index < 0 || index >= st->nb_index_entries-1){
++ return -1;
++ }
++
++ ff_read_frame_flush(s);
++ /* we use the native seek function if it exists, (still have to modify them to use seek_table) */
++ if (s->iformat->read_seek){
++ if(s->iformat->read_seek(s, stream_index, timestamp, flags) >= 0) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: table seeked using native function\n");
++ return 0;
++ }
++ }
++
++ ie = &st->index_entries[index];
++ if ((ret = url_fseek(s->pb, ie->pos, SEEK_SET)) < 0)
++ return ret;
++ av_update_cur_dts(s, st, ie->timestamp);
++
++ {
++ float request_time = (((float)timestamp/st->time_base.den)*st->time_base.num);
++ float actual_time = (((float)ie->timestamp/st->time_base.den)*st->time_base.num);
++ float time_base_inv = ((float)st->time_base.den/st->time_base.num);
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: table seeked to %.2fs (actual request was %.2fs), timebaseinv %f, samplerate of %d\n",actual_time, request_time, time_base_inv, st->codec->sample_rate );
++ }
++ return 0;
++}
++
++//if we don't have the number of frames, we just guess.
++#define AV_DETECT_CBR_FPS_GUESS 10
++static int av_detect_cbr(AVFormatContext *s, AVStream *st) {
++ //check the stream's codec to see if a number of frames are listed, but we can't assume that is available.
++ if(s->data_offset > 0 && s->file_size > 0 && s->data_offset != s->file_size && st->codec && st->duration > 0) {
++ double sec_duration = st->duration * av_q2d(st->time_base);
++ int nb_frames = st->nb_frames?st->nb_frames:(sec_duration*AV_DETECT_CBR_FPS_GUESS);
++ int64_t br_dur_len = (st->codec->bit_rate * sec_duration)/8;
++ int64_t min_len = (s->file_size - s->data_offset) * (1 - 2.0/nb_frames);
++ int64_t max_len = (s->file_size - s->data_offset) * (1 + 2.0/nb_frames);
++
++ if(min_len < br_dur_len && br_dur_len < max_len) {
++ av_log(s, AV_LOG_DEBUG, "cbr ok (%lli < %lli < %lli) with bitrate=%i, timebase=%i/%i, duration = %f(%lli), nb_frames = %lli, offset= %lli\n",
++ min_len, br_dur_len, max_len, st->codec->bit_rate,st->time_base.num,st->time_base.den, st->duration*av_q2d(st->time_base),st->duration,st->nb_frames,s->data_offset);
++ return 1;
++ }
++ av_log(s, AV_LOG_DEBUG, "cbr failed !(%lli < %lli < %lli) with bitrate=%i, timebase=%i/%i, duration = %f(%lli), nb_frames = %lli, offset= %lli\n",
++ min_len, br_dur_len, max_len, st->codec->bit_rate,st->time_base.num,st->time_base.den, st->duration*av_q2d(st->time_base),st->duration,st->nb_frames,s->data_offset);
++ }else {
++ av_log(s, AV_LOG_DEBUG, "no cbr test with bitrate=%i, timebase=%i/%i, duration = %f(%lli), nb_frames = %lli, offset= %lli\n",
++ st->codec?st->codec->bit_rate:-1,st->time_base.num,st->time_base.den, st->duration*av_q2d(st->time_base),st->duration,st->nb_frames,s->data_offset);
++ }
++
++ return 0;
++}
++
++/**
++ * Starts building a index for seeking.
++ * TODO: use a different file pointer so we can do this in a thread-safe manner,
++ * as there are cases when the user will want to playback while building the index
++ **/
++int av_build_index(AVFormatContext *s, int flags)
++{
++ AVStream *st;
++ int ret;
++ int stream_index;
++ int i;
++ int orig_flags;
++
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: starting building index\n");
++ stream_index = av_find_default_stream_index(s);
++ if(stream_index < 0)
++ return -1;
++
++ st = s->streams[stream_index];
++ /* TODO: check if this stream is CBR and the codec has a seek by timestamp. */
++ /* if this is true then we can set a flag and exit here. */
++ if(av_detect_cbr(s,st)) {
++ st->seek_table_flags |= AV_SEEKTABLE_CBR | AV_SEEKTABLE_FINISHED;
++ } else if(0) {
++ /* TODO: for this case see if we have a special method for generating the table */
++ /* specific to a given format. */
++ } else if(st->nb_frames!=0 && st->nb_index_entries > st->nb_frames/2) {
++ /* some demuxers load a complete index upon file open. */
++ st->seek_table_flags |= AV_SEEKTABLE_COPIED;
++ } else {
++ AVFormatContext *build_ic;
++ AVPacket pkt;
++
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: building index from scratch\n");
++
++ /* if the client needs it to be threadsafe, create a new format context to read from. */
++ if(flags & AV_BUILD_INDEX_PARALLEL) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: making thread-safe copy of streams\n");
++ build_ic = avformat_alloc_context();
++ ret = av_open_input_file(&build_ic, s->filename, s->iformat, 0, NULL);
++
++ if(ret < 0) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: error re-opening file/streams: %i\n", ret);
++ goto cleanup;
++ }
++ if(build_ic->nb_streams != s->nb_streams) {
++ ret = -1;
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: cloned AVFormatContext has different number of streams!");
++ goto cleanup;
++ }
++
++ for(i = 0; i < build_ic->nb_streams; i++) {
++ AVStream *build_st= build_ic->streams[i];
++ AVCodecContext *avctx = build_st->codec;
++ AVCodec *pcodec;
++ build_ic->streams[i]->discard = AVDISCARD_DEFAULT;
++
++ //compare with the orignal stream's context, and if opened, copy settings and open the clone
++ if(s->streams[i]->codec->priv_data) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: copying stream based on priv_data\n");
++ if((ret = avcodec_copy_context(avctx, s->streams[i]->codec)) < 0) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: error copying codec:%i\n", ret);
++ goto cleanup;
++ }
++ pcodec = avcodec_find_decoder(avctx->codec_id);
++ if((ret = avcodec_open(avctx,pcodec)) < 0) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: error opening codec:%i\n", ret);
++ goto cleanup;
++ }
++ }
++ }
++ } else {
++ build_ic = s;
++ }
++
++ /* default table generation behavior from av_seek_frame_generic */
++ /* TODO: see why s->data_offset is the file length for avi/mp4 and others */
++ if ((ret = url_fseek(build_ic->pb, 0/*s->data_offset*/, SEEK_SET)) < 0){
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: error building index: %i\n", ret);
++ goto cleanup;
++ }
++
++ orig_flags = build_ic->flags;
++ build_ic->flags |= AVFMT_FLAG_GENPTS;
++ for(i=0;; i++) {
++ do{
++ ret = av_read_frame(build_ic, &pkt);
++ }while(ret == AVERROR(EAGAIN));
++ if(ret<0)
++ break;
++ av_free_packet(&pkt);
++ }
++ build_ic->flags = orig_flags;
++ ret = 0;
++ cleanup:
++ if(flags & AV_BUILD_INDEX_PARALLEL) {
++ //TODO: delay/wait till the main index signals us that we are okay to swap
++ if(build_ic) {
++ //take the index over from our clone
++ for(i = 0; i < build_ic->nb_streams; i++) {
++ if(ret >= 0) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: marking %i frames from parallel stream ready for copy\n", build_ic->streams[i]->nb_index_entries);
++ s->streams[i]->parallel_index_entries = build_ic->streams[i]->index_entries;
++ s->streams[i]->parallel_nb_index_entries = build_ic->streams[i]->nb_index_entries;
++ s->streams[i]->parallel_index_entries_allocated_size = build_ic->streams[i]->index_entries_allocated_size;
++ build_ic->streams[i]->index_entries = NULL;
++ s->streams[i]->seek_table_flags |= AV_SEEKTABLE_FINISHED;
++ }
++ avcodec_close(build_ic->streams[i]->codec);
++ }
++ av_close_input_file(build_ic);
++ }
++ }
++ if(ret < 0)
++ return ret;
++ }
++
++ /* since we may have moved the read cursor to the end, return seek to start of stream for non-parallel clients. Not sure if this the desired behavior. */
++ if( !(flags & AV_BUILD_INDEX_PARALLEL) && !(st->seek_table_flags & AV_SEEKTABLE_COPIED) ) {
++ ff_read_frame_flush(s);
++ for(i=0; i<s->nb_streams;i++)
++ if(s->streams[i]->nb_index_entries)
++ s->streams[i]->seek_table_flags |= AV_SEEKTABLE_FINISHED;
++ if( (ret = av_seek_frame(s, stream_index, st->start_time, 0) ) < 0 ) {
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: finished building index but error seeking: %i,trying url_fseek\n", ret);
++ /* last ditch effort to seek using the file pointer. */
++ if ((ret = url_fseek(s->pb, 0, SEEK_SET)) < 0) {
++ av_log(s,AV_LOG_DEBUG,"SEEK_TABLE_DEBUG: error seeking with url_fseek: %i\n", ret);
++ return ret;
++ }
++ }
++ }
++ av_log(s, AV_LOG_DEBUG, "SEEK_TABLE_DEBUG: finished building index\n");
++ return 0;
++}
++
++/**
++ * Save the flags, size, and differences for the index table
++ */
++#define AV_SAVEINDEX_PACKETSIZE 1000
++static int av_save_index_stream(ByteIOContext *bc, AVStream *st) {
++ AVIndexEntry start_ie;
++ AVIndexEntry *last_ie, *curr_ie;
++ int i;
++
++ //we may need to save something like codec id to be safe.
++ ff_put_v(bc, st->seek_table_flags);
++ //we only write the index if we have a finished table.
++ if(st->seek_table_flags & AV_SEEKTABLE_FINISHED) {
++ ff_put_v(bc, st->nb_index_entries);
++
++ memset(&start_ie, 0, sizeof(AVIndexEntry));
++ last_ie = &start_ie;
++ for(i = 0; i < st->nb_index_entries; i++) {
++ curr_ie = &st->index_entries[i];
++ ff_put_v(bc, curr_ie->pos - last_ie->pos);
++ ff_put_v(bc, curr_ie->timestamp - last_ie->timestamp);
++ ff_put_v(bc, curr_ie->flags - last_ie->pos);
++ ff_put_v(bc, curr_ie->size - last_ie->size);
++ ff_put_v(bc, curr_ie->min_distance - last_ie->min_distance);
++ last_ie = curr_ie;
++ if(i % AV_SAVEINDEX_PACKETSIZE == 0)
++ put_flush_packet(bc);
++ }
++ av_log(NULL, AV_LOG_DEBUG, "successfully wrote index stream with %i entries.\n", st->nb_index_entries);
++ }
++ put_flush_packet(bc);
++
++ return 0;
++}
++
++/**
++ * load the flags, size, and differences for the index table
++ */
++static int av_load_index_stream(ByteIOContext *bc, AVStream *st) {
++ AVIndexEntry *ie, *last_ie;
++ uint64_t v;
++
++ //check to see if we have a table saved in this stream.
++ v = ff_get_v(bc);
++ if(v & AV_SEEKTABLE_FINISHED) {
++ st->seek_table_flags = v;
++ st->nb_index_entries = v = ff_get_v(bc);
++
++ //dump the old index and make the new one.
++ av_free(st->index_entries);
++ st->index_entries = av_malloc(v * sizeof(AVIndexEntry));
++
++ //the first index entry is not a diff, so it gets special treatment.
++ ie = st->index_entries;
++ if(v--) {
++ ie->pos = ff_get_v(bc);
++ ie->timestamp = ff_get_v(bc);
++ ie->flags = ff_get_v(bc);
++ ie->size = ff_get_v(bc);
++ ie->min_distance = ff_get_v(bc);
++ last_ie = ie;
++ ie++;
++ }
++
++ while(v--) {
++ ie->pos = ff_get_v(bc) + last_ie->pos;
++ ie->timestamp = ff_get_v(bc) + last_ie->timestamp;
++ ie->flags = ff_get_v(bc) + last_ie->flags;
++ ie->size = ff_get_v(bc) + last_ie->size;
++ ie->min_distance = ff_get_v(bc) + last_ie->min_distance;
++ last_ie = ie;
++ ie++;
++ }
++ av_log(NULL, AV_LOG_DEBUG, "successfully loaded index stream with %i entries.\n", st->nb_index_entries);
++ }
++ return 0;
++}
++
++/**
++ * Saves the table index built with av_build_index to a file.
++ * Returns 0 if successful, or a negative number if not.
++ * this is not mean to be human-readable
++ * we save the following things in order:
++ * - A strz "FFmpegTableIndex" (17 bytes)
++ * - The libavformat version number
++ * - The file name (null terminated)
++ * - the number of streams (4 bytes)
++ * - each of the streams' index tables via av_save_index_stream
++ */
++#define AV_INDEX_IDENTIFIER "FFmpegTableIndex"
++#define AV_INDEX_NOFILENAME "nofilename"
++static int av_save_index(ByteIOContext *bc, AVFormatContext *ic) {
++ int i, ret;
++
++ put_strz(bc, AV_INDEX_IDENTIFIER);
++ ff_put_v(bc, LIBAVFORMAT_VERSION_INT);
++ put_strz(bc, ic->filename?ic->filename:AV_INDEX_NOFILENAME);
++ ff_put_v(bc, ic->nb_streams);
++ for(i = 0; i< ic->nb_streams; i++) {
++ ret = av_save_index_stream(bc, ic->streams[i]);
++ if(ret < 0)
++ return ret;
++ }
++ put_flush_packet(bc);
++ av_log(ic, AV_LOG_DEBUG, "successfully wrote index.\n");
++ return 0;
++}
++
++static int av_load_index(ByteIOContext *bc, AVFormatContext *ic) {
++ int i, ret;
++ uint64_t v;
++ char read_str[256];
++
++ get_strz(bc, read_str, 255);
++ if( strcmp(read_str, AV_INDEX_IDENTIFIER) )
++ return -1;
++ //version
++ v = ff_get_v(bc);
++ //make sure the filename matches the context we will write to.
++ get_strz(bc, read_str, 255);
++ if( strlen(read_str) < 255 && strcmp(read_str, ic->filename) && strcmp(read_str, AV_INDEX_NOFILENAME) )
++ return -1;
++
++ v = ff_get_v(bc);
++ if( v != ic->nb_streams)
++ return -1;
++ for(i =0; i<v; i++) {
++ ret = av_load_index_stream(bc, ic->streams[i]);
++ if(ret < 0)
++ return ret;
++ }
++ av_log(ic, AV_LOG_DEBUG, "successfully read index.\n");
++ return 0;
++}
++
++int av_save_index_file(AVFormatContext *ic, const char* filename) {
++ ByteIOContext* bc;
++ int i, ret, table_completed = 0;
++
++ //do a first pass to see if we have any tables that need saving.
++ //only write the file if it exists.
++ for(i = 0; i< ic->nb_streams; i++)
++ table_completed |= ic->streams[i]->seek_table_flags & AV_SEEKTABLE_FINISHED;
++ if(!table_completed)
++ return -1;
++
++ if ((ret=url_fopen(&bc, filename, URL_WRONLY)) < 0) {
++ return -1;
++ }
++ ret = av_save_index(bc, ic);
++ url_fclose(bc);
++ return ret;
++}
++
++int av_load_index_file(AVFormatContext *ic, const char* filename) {
++ ByteIOContext* bc;
++ int ret;
++
++ if ((ret=url_fopen(&bc, filename, URL_RDONLY)) < 0) {
++ return -1;
++ }
++ ret = av_load_index(bc, ic);
++ url_fclose(bc);
++ return ret;
++}
+ /*******************************************************/
+
+ /**
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via 9c54ab79501afa169d9ef4fb056ce6297ce29c0c (commit)
via 62edbb15efb610589c2cc3da4c4994f957f5b7e8 (commit)
from e2c98c9adc19b9a7a33fb161da62cd7e25d52a75 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9c54ab79501afa169d9ef4fb056ce6297ce29c0c
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Thu Jul 8 18:46:14 2010 -0300
Finish pulse index decoding for all modes
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index a9d6fad..7b069ce 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -456,7 +456,8 @@ static void decode_3p_track(int *out, int code, int m, int off)
{ ///code: 3m+1 bits
int half_2p = BIT_POS(code, 2*m - 1) << (m - 1);
- decode_2p_track(out, BIT_STR(code, 0, 2*m - 1), m - 1, off + half_2p);
+ decode_2p_track(out, BIT_STR(code, 0, 2*m - 1),
+ m - 1, off + half_2p);
decode_1p_track(out + 2, BIT_STR(code, 2*m, m + 1), m, off);
}
@@ -497,6 +498,52 @@ static void decode_4p_track(int *out, int code, int m, int off)
}
}
+static void decode_5p_track(int *out, int code, int m, int off)
+{ ///code: 5m bits
+ int half_3p = BIT_POS(code, 5*m - 1) << (m - 1);
+
+ decode_3p_track(out, BIT_STR(code, 2*m, 3*m - 2),
+ m - 1, off + half_3p);
+ //XXX: there seems to be a typo in I3p expoent (from reference)
+ decode_2p_track(out + 3, BIT_STR(code, 0, 2*m + 1), m, off);
+}
+
+static void decode_6p_track(int *out, int code, int m, int off)
+{ ///code: 6m-2 bits
+ int b_offset = 1 << (m - 1);
+ /* which half has more pulses in cases 0 to 2 */
+ int half_more = BIT_POS(code, 6*m - 5) << (m - 1);
+ int half_other = b_offset - half_more;
+
+ switch (BIT_STR(code, 6*m - 4, 2)) /* case ID (2 bits) */
+ {
+ case 0: /* 0 pulses in A, 6 pulses in B or vice-versa */
+ decode_1p_track(out, BIT_STR(code, 0, m),
+ m - 1, off + half_more);
+ decode_5p_track(out + 1, BIT_STR(code, m, 5*m - 5),
+ m - 1, off + half_more);
+ break;
+ case 1: /* 1 pulse in A, 5 pulses in B or vice-versa */
+ decode_1p_track(out, BIT_STR(code, 0, m),
+ m - 1, off + half_other);
+ decode_5p_track(out + 1, BIT_STR(code, m, 5*m - 5),
+ m - 1, off + half_more);
+ break;
+ case 2: /* 2 pulses in A, 4 pulses in B or vice-versa */
+ decode_2p_track(out, BIT_STR(code, 0, 2*m - 1),
+ m - 1, off + half_other);
+ decode_4p_track(out + 2, BIT_STR(code, 2*m - 1, 4*m - 4),
+ m - 1, off + half_more);
+ break;
+ case 3: /* 3 pulses in A, 3 pulses in B */
+ decode_3p_track(out, BIT_STR(code, 3*m - 2, 3*m - 2),
+ m - 1, off);
+ decode_3p_track(out + 3, BIT_STR(code, 0, 3*m - 2),
+ m - 1, off + b_offset);
+ break;
+ }
+}
+
/**
* Decode the algebraic codebook index to pulse positions and signs,
* then construct the algebraic codebook vector.
@@ -543,9 +590,23 @@ static void decode_fixed_sparse(AMRFixed *fixed_sparse, const uint16_t *pulse_hi
break;
case MODE_18k25:
for (i = 0; i < 4; i++)
- decode_4p_track(sig_pos[i], (int) pulse_lo[i] +
+ decode_4p_track(sig_pos[i], (int) pulse_lo[i] +
+ ((int) pulse_hi[i] << 14), 4, 0);
+ break;
+ case MODE_19k85:
+ for (i = 0; i < 2; i++)
+ decode_5p_track(sig_pos[i], (int) pulse_lo[i] +
+ ((int) pulse_hi[i] << 10), 4, 0);
+ for (i = 2; i < 4; i++)
+ decode_4p_track(sig_pos[i], (int) pulse_lo[i] +
((int) pulse_hi[i] << 14), 4, 0);
break;
+ case MODE_23k05:
+ case MODE_23k85:
+ for (i = 0; i < 4; i++)
+ decode_6p_track(sig_pos[i], (int) pulse_lo[i] +
+ ((int) pulse_hi[i] << 11), 4, 0);
+ break;
}
for (i = 0; i < 4; i++)
commit 62edbb15efb610589c2cc3da4c4994f957f5b7e8
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Thu Jul 8 18:34:24 2010 -0300
Correct some typos in the reordering tables
diff --git a/libavcodec/amrwbdata.h b/libavcodec/amrwbdata.h
index 632589a..ecb748a 100644
--- a/libavcodec/amrwbdata.h
+++ b/libavcodec/amrwbdata.h
@@ -407,13 +407,13 @@ static const uint16_t order_MODE_19k85[] = {
334, 260,
2, AMR_OF(0, pul_ih[2]), 124, 148,
2, AMR_OF(0, pul_ih[3]), 132, 136,
- 10, AMR_OF(0, pul_ih[0]), 349, 113, 173, 206, 303, 375, 253, 283,
+ 10, AMR_OF(0, pul_il[0]), 349, 113, 173, 206, 303, 375, 253, 283,
338, 384,
10, AMR_OF(0, pul_il[1]), 350, 111, 161, 195, 286, 369, 245, 266,
320, 385,
- 14, AMR_OF(0, pul_ih[2]), 138, 172, 292, 363, 226, 213, 307, 227,
+ 14, AMR_OF(0, pul_il[2]), 138, 172, 292, 363, 226, 213, 307, 227,
201, 207, 261, 288, 318, 366,
- 14, AMR_OF(0, pul_ih[3]), 151, 187, 285, 361, 222, 223, 306, 221,
+ 14, AMR_OF(0, pul_il[3]), 151, 187, 285, 361, 222, 223, 306, 221,
198, 177, 242, 280, 299, 360,
7, AMR_OF(0, vq), 3, 20, 42, 28, 32, 38, 24,
6, AMR_OF(1, adap), 36, 49, 72, 77, 83, 98,
@@ -424,13 +424,13 @@ static const uint16_t order_MODE_19k85[] = {
329, 296,
2, AMR_OF(1, pul_ih[2]), 122, 141,
2, AMR_OF(1, pul_ih[3]), 119, 134,
- 10, AMR_OF(1, pul_ih[0]), 346, 125, 165, 204, 295, 371, 273, 277,
+ 10, AMR_OF(1, pul_il[0]), 346, 125, 165, 204, 295, 371, 273, 277,
319, 382,
10, AMR_OF(1, pul_il[1]), 354, 121, 162, 209, 301, 365, 251, 259,
326, 381,
- 14, AMR_OF(1, pul_ih[2]), 145, 192, 269, 356, 212, 179, 282, 246,
+ 14, AMR_OF(1, pul_il[2]), 145, 192, 269, 356, 212, 179, 282, 246,
196, 193, 244, 276, 324, 368,
- 14, AMR_OF(1, pul_ih[3]), 137, 184, 263, 358, 215, 219, 317, 234,
+ 14, AMR_OF(1, pul_il[3]), 137, 184, 263, 358, 215, 219, 317, 234,
185, 211, 248, 311, 313, 372,
7, AMR_OF(1, vq), 4, 21, 43, 29, 33, 39, 25,
9, AMR_OF(2, adap), 15, 16, 17, 18, 19, 51, 70, 80,
@@ -442,13 +442,13 @@ static const uint16_t order_MODE_19k85[] = {
332, 275,
2, AMR_OF(2, pul_ih[2]), 133, 154,
2, AMR_OF(2, pul_ih[3]), 123, 143,
- 10, AMR_OF(2, pul_ih[0]), 357, 126, 197, 241, 325, 380, 279, 278,
+ 10, AMR_OF(2, pul_il[0]), 357, 126, 197, 241, 325, 380, 279, 278,
331, 393,
10, AMR_OF(2, pul_il[1]), 352, 139, 189, 235, 330, 383, 293, 298,
341, 388,
- 14, AMR_OF(2, pul_ih[2]), 156, 228, 312, 374, 250, 249, 345, 255,
+ 14, AMR_OF(2, pul_il[2]), 156, 228, 312, 374, 250, 249, 345, 255,
231, 232, 247, 290, 316, 376,
- 14, AMR_OF(2, pul_ih[3]), 155, 214, 302, 370, 230, 208, 321, 240,
+ 14, AMR_OF(2, pul_il[3]), 155, 214, 302, 370, 230, 208, 321, 240,
194, 191, 239, 294, 305, 362,
7, AMR_OF(2, vq), 5, 22, 44, 30, 34, 40, 26,
6, AMR_OF(3, adap), 37, 50, 73, 78, 84, 99,
@@ -459,13 +459,13 @@ static const uint16_t order_MODE_19k85[] = {
327, 272,
2, AMR_OF(3, pul_ih[2]), 120, 144,
2, AMR_OF(3, pul_ih[3]), 112, 142,
- 10, AMR_OF(3, pul_ih[0]), 359, 128, 171, 233, 309, 378, 257, 264,
+ 10, AMR_OF(3, pul_il[0]), 359, 128, 171, 233, 309, 378, 257, 264,
335, 377,
10, AMR_OF(3, pul_il[1]), 348, 116, 180, 220, 310, 379, 274, 289,
342, 389,
- 14, AMR_OF(3, pul_ih[2]), 150, 199, 308, 373, 237, 216, 323, 243,
+ 14, AMR_OF(3, pul_il[2]), 150, 199, 308, 373, 237, 216, 323, 243,
205, 203, 252, 300, 322, 367,
- 14, AMR_OF(3, pul_ih[3]), 146, 218, 304, 364, 229, 217, 315, 224,
+ 14, AMR_OF(3, pul_il[3]), 146, 218, 304, 364, 229, 217, 315, 224,
200, 168, 238, 287, 284, 351,
7, AMR_OF(3, vq), 6, 23, 45, 31, 35, 41, 27,
0
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdata.h | 24 +++++++++---------
libavcodec/amrwbdec.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 75 insertions(+), 14 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".
The branch, master has been updated
via e2c98c9adc19b9a7a33fb161da62cd7e25d52a75 (commit)
from 5235ba66ad3c722abe03ed4659a84c54b4e644e3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e2c98c9adc19b9a7a33fb161da62cd7e25d52a75
Author: Marcelo Povoa <marspeoplester(a)gmail.com>
Date: Thu Jul 8 14:46:16 2010 -0300
Decode pulse index for 15k85 18k25, include offset in functions
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 932ab9b..a9d6fad 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -431,35 +431,70 @@ static void decode_pitch_vector(AMRWBContext *ctx,
* @param out [out] Output buffer (writes i elements)
* @param code [in] Pulse index (no. of bits varies, see below)
* @param m [in] (log2) Number of potential positions
+ * @param off [in] Offset for decoded positions
*/
//XXX: Some of these functions are simple and recurrent (used inline)
-static inline void decode_1p_track(int *out, int code, int m) ///code: m+1 bits
-{
- int pos = BIT_STR(code, 0, m);
+static inline void decode_1p_track(int *out, int code, int m, int off)
+{ ///code: m+1 bits
+ int pos = BIT_STR(code, 0, m) + off;
out[0] = BIT_POS(code, m) ? -pos : pos;
}
-static inline void decode_2p_track(int *out, int code, int m) ///code: 2m+1 bits
-{
- int pos0 = BIT_STR(code, m, m);
- int pos1 = BIT_STR(code, 0, m);
+static inline void decode_2p_track(int *out, int code, int m, int off)
+{ ///code: 2m+1 bits
+ int pos0 = BIT_STR(code, m, m) + off;
+ int pos1 = BIT_STR(code, 0, m) + off;
out[0] = BIT_POS(code, 2*m) ? -pos0 : pos0;
out[1] = BIT_POS(code, 2*m) ? -pos1 : pos1;
out[1] = pos0 > pos1 ? -out[1] : out[1];
}
-static void decode_3p_track(int *out, int code, int m) ///code: 3m+1 bits
-{
- int half_2p = BIT_POS(code, 2*m-1) << (m-1);
+static void decode_3p_track(int *out, int code, int m, int off)
+{ ///code: 3m+1 bits
+ int half_2p = BIT_POS(code, 2*m - 1) << (m - 1);
- decode_2p_track(out, BIT_STR(code, 0, 2*m-1), m-1);
- // put two decoded pulses (+ or -) in the correct half
- out[0] += (out[0] > 0) ? half_2p : -half_2p;
- out[1] += (out[1] > 0) ? half_2p : -half_2p;
- decode_1p_track(out + 2, BIT_STR(code, 2*m, m+1), m);
+ decode_2p_track(out, BIT_STR(code, 0, 2*m - 1), m - 1, off + half_2p);
+ decode_1p_track(out + 2, BIT_STR(code, 2*m, m + 1), m, off);
+}
+
+static void decode_4p_track(int *out, int code, int m, int off)
+{ ///code: 4m bits
+ int half_4p, subhalf_2p;
+ int b_offset = 1 << (m - 1);
+
+ switch (BIT_STR(code, 4*m - 2, 2)) /* case ID (2 bits) */
+ {
+ case 0: /* 0 pulses in A, 4 pulses in B or vice-versa */
+ half_4p = BIT_POS(code, 4*m - 3) << (m - 1); /* which has 4 pulses */
+ subhalf_2p = BIT_POS(code, 2*m - 3) << (m - 2);
+
+ decode_2p_track(out, BIT_STR(code, 0, 2*m - 3),
+ m - 2, off + half_4p + subhalf_2p);
+ decode_2p_track(out + 2, BIT_STR(code, 2*m - 2, 2*m - 1),
+ m - 1, off + half_4p);
+ break;
+ case 1: /* 1 pulse in A, 3 pulses in B */
+ decode_1p_track(out, BIT_STR(code, 3*m - 2, m),
+ m - 1, off);
+ decode_3p_track(out + 1, BIT_STR(code, 0, 3*m - 2),
+ m - 1, off + b_offset);
+ break;
+ case 2: /* 2 pulses in each half */
+ decode_2p_track(out, BIT_STR(code, 2*m - 1, 2*m - 1),
+ m - 1, off);
+ decode_2p_track(out + 2, BIT_STR(code, 0, 2*m - 1),
+ m - 1, off + b_offset);
+ break;
+ case 3: /* 3 pulses in A, 1 pulse in B */
+ decode_3p_track(out, BIT_STR(code, m, 3*m - 2),
+ m - 1, off);
+ decode_1p_track(out + 3, BIT_STR(code, 0, m),
+ m - 1, off + b_offset);
+ break;
+ }
}
/**
@@ -486,21 +521,30 @@ static void decode_fixed_sparse(AMRFixed *fixed_sparse, const uint16_t *pulse_hi
switch (mode) {
case MODE_6k60:
for (i = 0; i < 2; i++)
- decode_1p_track(sig_pos[i], pulse_lo[i], 5);
+ decode_1p_track(sig_pos[i], pulse_lo[i], 5, 0);
break;
case MODE_8k85:
for (i = 0; i < 4; i++)
- decode_1p_track(sig_pos[i], pulse_lo[i], 4);
+ decode_1p_track(sig_pos[i], pulse_lo[i], 4, 0);
break;
case MODE_12k65:
for (i = 0; i < 4; i++)
- decode_2p_track(sig_pos[i], pulse_lo[i], 4);
+ decode_2p_track(sig_pos[i], pulse_lo[i], 4, 0);
break;
case MODE_14k25:
for (i = 0; i < 2; i++)
- decode_3p_track(sig_pos[i], pulse_lo[i], 4);
+ decode_3p_track(sig_pos[i], pulse_lo[i], 4, 0);
for (i = 2; i < 4; i++)
- decode_2p_track(sig_pos[i], pulse_lo[i], 4);
+ decode_2p_track(sig_pos[i], pulse_lo[i], 4, 0);
+ break;
+ case MODE_15k85:
+ for (i = 0; i < 4; i++)
+ decode_3p_track(sig_pos[i], pulse_lo[i], 4, 0);
+ break;
+ case MODE_18k25:
+ for (i = 0; i < 4; i++)
+ decode_4p_track(sig_pos[i], (int) pulse_lo[i] +
+ ((int) pulse_hi[i] << 14), 4, 0);
break;
}
-----------------------------------------------------------------------
Summary of changes:
libavcodec/amrwbdec.c | 84 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 64 insertions(+), 20 deletions(-)
hooks/post-receive
--
AMR-WB decoder
1
0
Author: victor
Revision: 5853
Property Name: svn:log
Action: modified
Property diff:
--- old property value
+++ new property value
@@ -1 +1 @@
-svn-23100 in ffmpeg-trunk superseded -vfilter by -vf
+svn-23100 in ffmpeg-trunk superseded -vfilters by -vf
1
0