Merge remote-tracking branch 'qatar/master'

* qatar/master:
  g723.1: fix addition overflow
  g723.1: simplify and fix multiplication overflow
  g723.1: deobfuscate an expression
  g723.1: remove unused #includes
  ARM: add missing "cc" clobber in av_clipl_int32_arm()
  rtmp: Factorize the code by adding handle_invoke_error
  rtmp: Factorize the code by adding handle_invoke_status
  rtmp: Factorize the code by adding handle_invoke_result
  libavutil: remove unused av_abort() macro
  ffmenc: replace if/abort with assert()
  libavutil: drop offsetof() fallback definition
  libavutil: drop fallback definitions of INTxx_MIN/MAX
  configure: Check for a sctp struct instead of just the header
  configure: suncc: Add -xc99 to dependency flags, required on Solaris
  doxygen: Fix function parameter names to match the code
  doc: Drop obsolete shared libs cflags hint to workaround Cygwin gcc bugs
  swf: Move shared table out of the header file
  swf: Move swf_audio_codec_tags table to the only place it is used
  fate: add G.723.1 decoder tests

Conflicts:
	configure
	doc/platform.texi
	libavformat/Makefile
	libavutil/arm/intmath.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/28/head
Michael Niedermayer 12 years ago
commit 18b0c39f99
  1. 2
      configure
  2. 15
      doc/platform.texi
  3. 10
      libavcodec/g723_1.c
  4. 2
      libavcodec/vp8.c
  5. 6
      libavfilter/buffersink.h
  6. 6
      libavformat/Makefile
  7. 5
      libavformat/ffmenc.c
  8. 214
      libavformat/rtmpproto.c
  9. 29
      libavformat/swf.c
  10. 15
      libavformat/swf.h
  11. 11
      libavformat/swfdec.c
  12. 2
      libavformat/swfenc.c
  13. 2
      libavresample/audio_convert.h
  14. 2
      libavresample/audio_mix.h
  15. 2
      libavutil/arm/intmath.h
  16. 40
      libavutil/internal.h
  17. 4
      libavutil/xtea.h
  18. 21
      tests/fate/voice.mak
  19. 3
      tests/ref/fate/g723_1-dec-1
  20. 27
      tests/ref/fate/g723_1-dec-2
  21. 34
      tests/ref/fate/g723_1-dec-3
  22. 5
      tests/ref/fate/g723_1-dec-4
  23. 101
      tests/ref/fate/g723_1-dec-5
  24. 101
      tests/ref/fate/g723_1-dec-6

2
configure vendored

@ -2442,7 +2442,7 @@ probe_cc(){
_type=suncc
_ident=$($_cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
_DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
_DEPFLAGS='-xM1'
_DEPFLAGS='-xM1 -xc99'
_ldflags='-std=c99'
_cflags_speed='-O5'
_cflags_size='-O5 -xspace'

@ -323,21 +323,6 @@ In order to run FATE you will also need the following "Utils" packages:
bc, diffutils
@end example
Then run
@example
./configure
@end example
to make a static build.
To build shared libraries add a special compiler flag to work around current
@code{gcc4-core} package bugs in addition to the normal configure flags:
@example
./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
@end example
If you want to build FFmpeg with additional libraries, download Cygwin
"Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
@example

@ -35,7 +35,6 @@
#include "acelp_vectors.h"
#include "celp_filters.h"
#include "celp_math.h"
#include "lsp.h"
#include "g723_1_data.h"
typedef struct g723_1_context {
@ -924,7 +923,7 @@ static void formant_postfilter(G723_1_Context *p, int16_t *lpc, int16_t *buf)
signal_ptr = filter_signal + LPC_ORDER;
for (i = 0; i < SUBFRAMES; i++) {
int16_t temp_vector[SUBFRAME_LEN];
int16_t temp;
int temp;
int auto_corr[2];
int scale, energy;
@ -943,13 +942,12 @@ static void formant_postfilter(G723_1_Context *p, int16_t *lpc, int16_t *buf)
if (temp) {
temp = (auto_corr[0] >> 2) / temp;
}
p->reflection_coef = ((p->reflection_coef << 2) - p->reflection_coef +
temp + 2) >> 2;
temp = (p->reflection_coef * 0xffffc >> 3) & 0xfffc;
p->reflection_coef = (3 * p->reflection_coef + temp + 2) >> 2;
temp = -p->reflection_coef >> 1 & ~3;
/* Compensation filter */
for (j = 0; j < SUBFRAME_LEN; j++) {
buf_ptr[j] = av_clipl_int32(signal_ptr[j] +
buf_ptr[j] = av_clipl_int32((int64_t)signal_ptr[j] +
((signal_ptr[j - 1] >> 16) *
temp << 1)) >> 16;
}

@ -752,7 +752,7 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y,
#ifndef decode_block_coeffs_internal
/**
* @param c arithmetic bitstream reader context
* @param r arithmetic bitstream reader context
* @param block destination for block coefficients
* @param probs probabilities to use when reading trees from the bitstream
* @param i initial coeff index, 0 unless a separate DC block is coded

@ -110,7 +110,7 @@ AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx);
/**
* Get a buffer with filtered data from sink and put it in buf.
*
* @param sink pointer to a context of a buffersink or abuffersink AVFilter.
* @param ctx pointer to a context of a buffersink or abuffersink AVFilter.
* @param buf pointer to the buffer will be written here if buf is non-NULL. buf
* must be freed by the caller using avfilter_unref_buffer().
* Buf may also be NULL to query whether a buffer is ready to be
@ -119,14 +119,14 @@ AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx);
* @return >= 0 in case of success, a negative AVERROR code in case of
* failure.
*/
int av_buffersink_read(AVFilterContext *sink, AVFilterBufferRef **buf);
int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf);
/**
* Same as av_buffersink_read, but with the ability to specify the number of
* samples read. This function is less efficient than av_buffersink_read(),
* because it copies the data around.
*
* @param sink pointer to a context of the abuffersink AVFilter.
* @param ctx pointer to a context of the abuffersink AVFilter.
* @param buf pointer to the buffer will be written here if buf is non-NULL. buf
* must be freed by the caller using avfilter_unref_buffer(). buf
* will contain exactly nb_samples audio samples, except at the end

@ -53,7 +53,7 @@ OBJS-$(CONFIG_AU_MUXER) += au.o
OBJS-$(CONFIG_AVI_DEMUXER) += avidec.o
OBJS-$(CONFIG_AVI_MUXER) += avienc.o
OBJS-$(CONFIG_AVISYNTH) += avisynth.o
OBJS-$(CONFIG_AVM2_MUXER) += swfenc.o
OBJS-$(CONFIG_AVM2_MUXER) += swfenc.o swf.o
OBJS-$(CONFIG_AVS_DEMUXER) += avs.o vocdec.o voc.o
OBJS-$(CONFIG_BETHSOFTVID_DEMUXER) += bethsoftvid.o
OBJS-$(CONFIG_BFI_DEMUXER) += bfi.o
@ -326,8 +326,8 @@ OBJS-$(CONFIG_SRT_DEMUXER) += srtdec.o
OBJS-$(CONFIG_SRT_MUXER) += srtenc.o
OBJS-$(CONFIG_STR_DEMUXER) += psxstr.o
OBJS-$(CONFIG_SUBVIEWER_DEMUXER) += subviewerdec.o
OBJS-$(CONFIG_SWF_DEMUXER) += swfdec.o
OBJS-$(CONFIG_SWF_MUXER) += swfenc.o
OBJS-$(CONFIG_SWF_DEMUXER) += swfdec.o swf.o
OBJS-$(CONFIG_SWF_MUXER) += swfenc.o swf.o
OBJS-$(CONFIG_THP_DEMUXER) += thp.o
OBJS-$(CONFIG_TIERTEXSEQ_DEMUXER) += tiertexseq.o
OBJS-$(CONFIG_MKVTIMESTAMP_V2_MUXER) += mkvtimestamp_v2.o

@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <assert.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "libavutil/avassert.h"
@ -35,8 +37,7 @@ static void flush_packet(AVFormatContext *s)
fill_size = ffm->packet_end - ffm->packet_ptr;
memset(ffm->packet_ptr, 0, fill_size);
if (avio_tell(pb) % ffm->packet_size)
av_abort();
assert(avio_tell(pb) % ffm->packet_size == 0);
/* put header */
avio_wb16(pb, PACKET_ID);

@ -1021,121 +1021,149 @@ static int handle_server_bw(URLContext *s, RTMPPacket *pkt)
return 0;
}
static int handle_invoke(URLContext *s, RTMPPacket *pkt)
static int handle_invoke_error(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
int i, t;
const uint8_t *data_end = pkt->data + pkt->data_size;
uint8_t tmpstr[256];
if (!ff_amf_get_field_value(pkt->data + 9, data_end,
"description", tmpstr, sizeof(tmpstr))) {
av_log(s, AV_LOG_ERROR, "Server error: %s\n", tmpstr);
return -1;
}
return 0;
}
static int handle_invoke_result(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
char *tracked_method = NULL;
GetByteContext gbc;
double pkt_id;
int ret = 0;
int i;
//TODO: check for the messages sent for wrong state?
if (!memcmp(pkt->data, "\002\000\006_error", 9)) {
uint8_t tmpstr[256];
bytestream2_init(&gbc, pkt->data + 10, pkt->data_size);
if ((ret = ff_amf_read_number(&gbc, &pkt_id)) < 0)
return ret;
if (!ff_amf_get_field_value(pkt->data + 9, data_end,
"description", tmpstr, sizeof(tmpstr)))
av_log(s, AV_LOG_ERROR, "Server error: %s\n",tmpstr);
return -1;
} else if (!memcmp(pkt->data, "\002\000\007_result", 10)) {
GetByteContext gbc;
double pkt_id;
for (i = 0; i < rt->nb_tracked_methods; i++) {
if (rt->tracked_methods[i].id != pkt_id)
continue;
bytestream2_init(&gbc, pkt->data + 10, pkt->data_size);
if ((ret = ff_amf_read_number(&gbc, &pkt_id)) < 0)
return ret;
tracked_method = rt->tracked_methods[i].name;
del_tracked_method(rt, i);
break;
}
for (i = 0; i < rt->nb_tracked_methods; i++) {
if (rt->tracked_methods[i].id != pkt_id)
continue;
if (!tracked_method) {
/* Ignore this reply when the current method is not tracked. */
return ret;
}
tracked_method = rt->tracked_methods[i].name;
del_tracked_method(rt, i);
break;
}
if (!memcmp(tracked_method, "connect", 7)) {
if (!rt->is_input) {
if ((ret = gen_release_stream(s, rt)) < 0)
goto fail;
if (!tracked_method) {
/* Ignore this reply when the current method is not tracked. */
return 0;
if ((ret = gen_fcpublish_stream(s, rt)) < 0)
goto fail;
} else {
if ((ret = gen_server_bw(s, rt)) < 0)
goto fail;
}
if (!memcmp(tracked_method, "connect", 7)) {
if (!rt->is_input) {
if ((ret = gen_release_stream(s, rt)) < 0)
goto invoke_fail;
if ((ret = gen_fcpublish_stream(s, rt)) < 0)
goto invoke_fail;
} else {
if ((ret = gen_server_bw(s, rt)) < 0)
goto invoke_fail;
}
if ((ret = gen_create_stream(s, rt)) < 0)
goto invoke_fail;
if (rt->is_input) {
/* Send the FCSubscribe command when the name of live
* stream is defined by the user or if it's a live stream. */
if (rt->subscribe) {
if ((ret = gen_fcsubscribe_stream(s, rt,
rt->subscribe)) < 0)
goto invoke_fail;
} else if (rt->live == -1) {
if ((ret = gen_fcsubscribe_stream(s, rt,
rt->playpath)) < 0)
goto invoke_fail;
}
}
} else if (!memcmp(tracked_method, "createStream", 12)) {
//extract a number from the result
if (pkt->data[10] || pkt->data[19] != 5 || pkt->data[20]) {
av_log(s, AV_LOG_WARNING, "Unexpected reply on connect()\n");
} else {
rt->main_channel_id = av_int2double(AV_RB64(pkt->data + 21));
}
if ((ret = gen_create_stream(s, rt)) < 0)
goto fail;
if (!rt->is_input) {
if ((ret = gen_publish(s, rt)) < 0)
goto invoke_fail;
} else {
if ((ret = gen_play(s, rt)) < 0)
goto invoke_fail;
if ((ret = gen_buffer_time(s, rt)) < 0)
goto invoke_fail;
if (rt->is_input) {
/* Send the FCSubscribe command when the name of live
* stream is defined by the user or if it's a live stream. */
if (rt->subscribe) {
if ((ret = gen_fcsubscribe_stream(s, rt, rt->subscribe)) < 0)
goto fail;
} else if (rt->live == -1) {
if ((ret = gen_fcsubscribe_stream(s, rt, rt->playpath)) < 0)
goto fail;
}
}
} else if (!memcmp(pkt->data, "\002\000\010onStatus", 11)) {
const uint8_t* ptr = pkt->data + 11;
uint8_t tmpstr[256];
for (i = 0; i < 2; i++) {
t = ff_amf_tag_size(ptr, data_end);
if (t < 0)
return 1;
ptr += t;
} else if (!memcmp(tracked_method, "createStream", 12)) {
//extract a number from the result
if (pkt->data[10] || pkt->data[19] != 5 || pkt->data[20]) {
av_log(s, AV_LOG_WARNING, "Unexpected reply on connect()\n");
} else {
rt->main_channel_id = av_int2double(AV_RB64(pkt->data + 21));
}
t = ff_amf_get_field_value(ptr, data_end,
"level", tmpstr, sizeof(tmpstr));
if (!t && !strcmp(tmpstr, "error")) {
if (!ff_amf_get_field_value(ptr, data_end,
"description", tmpstr, sizeof(tmpstr)))
av_log(s, AV_LOG_ERROR, "Server error: %s\n",tmpstr);
return -1;
if (!rt->is_input) {
if ((ret = gen_publish(s, rt)) < 0)
goto fail;
} else {
if ((ret = gen_play(s, rt)) < 0)
goto fail;
if ((ret = gen_buffer_time(s, rt)) < 0)
goto fail;
}
t = ff_amf_get_field_value(ptr, data_end,
"code", tmpstr, sizeof(tmpstr));
if (!t && !strcmp(tmpstr, "NetStream.Play.Start")) rt->state = STATE_PLAYING;
if (!t && !strcmp(tmpstr, "NetStream.Play.Stop")) rt->state = STATE_STOPPED;
if (!t && !strcmp(tmpstr, "NetStream.Play.UnpublishNotify")) rt->state = STATE_STOPPED;
if (!t && !strcmp(tmpstr, "NetStream.Publish.Start")) rt->state = STATE_PUBLISHING;
}
fail:
av_free(tracked_method);
return ret;
}
static int handle_invoke_status(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
const uint8_t *data_end = pkt->data + pkt->data_size;
const uint8_t *ptr = pkt->data + 11;
uint8_t tmpstr[256];
int i, t;
for (i = 0; i < 2; i++) {
t = ff_amf_tag_size(ptr, data_end);
if (t < 0)
return 1;
ptr += t;
}
t = ff_amf_get_field_value(ptr, data_end, "level", tmpstr, sizeof(tmpstr));
if (!t && !strcmp(tmpstr, "error")) {
if (!ff_amf_get_field_value(ptr, data_end,
"description", tmpstr, sizeof(tmpstr)))
av_log(s, AV_LOG_ERROR, "Server error: %s\n", tmpstr);
return -1;
}
t = ff_amf_get_field_value(ptr, data_end, "code", tmpstr, sizeof(tmpstr));
if (!t && !strcmp(tmpstr, "NetStream.Play.Start")) rt->state = STATE_PLAYING;
if (!t && !strcmp(tmpstr, "NetStream.Play.Stop")) rt->state = STATE_STOPPED;
if (!t && !strcmp(tmpstr, "NetStream.Play.UnpublishNotify")) rt->state = STATE_STOPPED;
if (!t && !strcmp(tmpstr, "NetStream.Publish.Start")) rt->state = STATE_PUBLISHING;
return 0;
}
static int handle_invoke(URLContext *s, RTMPPacket *pkt)
{
RTMPContext *rt = s->priv_data;
int ret = 0;
//TODO: check for the messages sent for wrong state?
if (!memcmp(pkt->data, "\002\000\006_error", 9)) {
if ((ret = handle_invoke_error(s, pkt)) < 0)
return ret;
} else if (!memcmp(pkt->data, "\002\000\007_result", 10)) {
if ((ret = handle_invoke_result(s, pkt)) < 0)
return ret;
} else if (!memcmp(pkt->data, "\002\000\010onStatus", 11)) {
if ((ret = handle_invoke_status(s, pkt)) < 0)
return ret;
} else if (!memcmp(pkt->data, "\002\000\010onBWDone", 11)) {
if ((ret = gen_check_bw(s, rt)) < 0)
return ret;
}
invoke_fail:
av_free(tracked_method);
return ret;
}

@ -0,0 +1,29 @@
/*
* Flash Compatible Streaming Format
* Copyright (c) 2000 Fabrice Bellard
* Copyright (c) 2003 Tinic Uro
*
* 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 "internal.h"
const AVCodecTag ff_swf_codec_tags[] = {
{ CODEC_ID_FLV1, 0x02 },
{ CODEC_ID_VP6F, 0x04 },
{ CODEC_ID_NONE, 0 },
};

@ -91,19 +91,6 @@ typedef struct {
#endif
} SWFContext;
static const AVCodecTag swf_codec_tags[] = {
{ AV_CODEC_ID_FLV1, 0x02},
{ AV_CODEC_ID_VP6F, 0x04},
{ AV_CODEC_ID_NONE, 0},
};
static const AVCodecTag swf_audio_codec_tags[] = {
{ AV_CODEC_ID_PCM_S16LE, 0x00},
{ AV_CODEC_ID_ADPCM_SWF, 0x01},
{ AV_CODEC_ID_MP3, 0x02},
{ AV_CODEC_ID_PCM_S16LE, 0x03},
//{ AV_CODEC_ID_NELLYMOSER, 0x06},
{ AV_CODEC_ID_NONE, 0},
};
extern const AVCodecTag ff_swf_codec_tags[];
#endif /* AVFORMAT_SWF_H */

@ -23,6 +23,15 @@
#include "libavutil/intreadwrite.h"
#include "swf.h"
static const AVCodecTag swf_audio_codec_tags[] = {
{ CODEC_ID_PCM_S16LE, 0x00 },
{ CODEC_ID_ADPCM_SWF, 0x01 },
{ CODEC_ID_MP3, 0x02 },
{ CODEC_ID_PCM_S16LE, 0x03 },
// { CODEC_ID_NELLYMOSER, 0x06 },
{ CODEC_ID_NONE, 0 },
};
static int get_swf_tag(AVIOContext *pb, int *len_ptr)
{
int tag, len;
@ -164,7 +173,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
return -1;
vst->id = ch_id;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, avio_r8(pb));
vst->codec->codec_id = ff_codec_get_id(ff_swf_codec_tags, avio_r8(pb));
avpriv_set_pts_info(vst, 16, 256, swf->frame_rate);
len -= 8;
} else if (tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2) {

@ -348,7 +348,7 @@ static int swf_write_video(AVFormatContext *s,
avio_wl16(pb, enc->width);
avio_wl16(pb, enc->height);
avio_w8(pb, 0);
avio_w8(pb,ff_codec_get_tag(swf_codec_tags,enc->codec_id));
avio_w8(pb,ff_codec_get_tag(ff_swf_codec_tags, enc->codec_id));
put_swf_end_tag(s);
/* place the video object for the first time */

@ -42,7 +42,7 @@ typedef struct AudioConvert AudioConvert;
* @param in_fmt input sample format
* @param channels number of channels, or 0 for any number of channels
* @param ptr_align buffer pointer alignment, in bytes
* @param sample_align buffer size alignment, in samples
* @param samples_align buffer size alignment, in samples
* @param descr function type description (e.g. "C" or "SSE")
* @param conv conversion function pointer
*/

@ -69,7 +69,7 @@ typedef struct AudioMix {
* @param in_channels number of input channels, or 0 for any number of channels
* @param out_channels number of output channels, or 0 for any number of channels
* @param ptr_align buffer pointer alignment, in bytes
* @param sample_align buffer size alignment, in samples
* @param samples_align buffer size alignment, in samples
* @param descr function type description (e.g. "C" or "SSE")
* @param mix_func mixing function pointer
*/

@ -108,7 +108,7 @@ static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
"mvnne %1, #1<<31 \n\t"
"moveq %0, %Q2 \n\t"
"eorne %0, %1, %R2, asr #31 \n\t"
: "=r"(x), "=&r"(y) : "r"(a):"cc");
: "=r"(x), "=&r"(y) : "r"(a) : "cc");
return x;
}

@ -53,50 +53,10 @@ struct AVDictionary {
#endif
#endif
#ifndef INT16_MIN
#define INT16_MIN (-0x7fff - 1)
#endif
#ifndef INT16_MAX
#define INT16_MAX 0x7fff
#endif
#ifndef INT32_MIN
#define INT32_MIN (-0x7fffffff - 1)
#endif
#ifndef INT32_MAX
#define INT32_MAX 0x7fffffff
#endif
#ifndef UINT32_MAX
#define UINT32_MAX 0xffffffff
#endif
#ifndef INT64_MIN
#define INT64_MIN (-0x7fffffffffffffffLL - 1)
#endif
#ifndef INT64_MAX
#define INT64_MAX INT64_C(9223372036854775807)
#endif
#ifndef UINT64_MAX
#define UINT64_MAX UINT64_C(0xFFFFFFFFFFFFFFFF)
#endif
#ifndef INT_BIT
# define INT_BIT (CHAR_BIT * sizeof(int))
#endif
#ifndef offsetof
# define offsetof(T, F) ((unsigned int)((char *)&((T *)0)->F))
#endif
/* debug stuff */
#define av_abort() do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)
/* avoid usage of dangerous/inappropriate system functions */
#undef malloc
#define malloc please_use_av_malloc

@ -37,7 +37,7 @@ typedef struct AVXTEA {
/**
* Initialize an AVXTEA context.
*
* @param x an AVXTEA context
* @param ctx an AVXTEA context
* @param key a key of 16 bytes used for encryption/decryption
*/
void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
@ -45,7 +45,7 @@ void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
/**
* Encrypt or decrypt a buffer using a previously initialized context.
*
* @param x an AVXTEA context
* @param ctx an AVXTEA context
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst
* @param count number of 8 byte blocks

@ -9,6 +9,27 @@ fate-g722-encode: CMD = enc_dec_pcm wav md5 s16le $(SRC) -c:a g722
FATE_VOICE += $(FATE_G722)
fate-g722: $(FATE_G722)
FATE_G723_1 += fate-g723_1-dec-1
fate-g723_1-dec-1: CMD = framecrc -postfilter 0 -i $(SAMPLES)/g723_1/ineqd53.tco
FATE_G723_1 += fate-g723_1-dec-2
fate-g723_1-dec-2: CMD = framecrc -postfilter 0 -i $(SAMPLES)/g723_1/overd53.tco
FATE_G723_1 += fate-g723_1-dec-3
fate-g723_1-dec-3: CMD = framecrc -postfilter 1 -i $(SAMPLES)/g723_1/overd63p.tco
FATE_G723_1 += fate-g723_1-dec-4
fate-g723_1-dec-4: CMD = framecrc -postfilter 0 -i $(SAMPLES)/g723_1/pathd53.tco
FATE_G723_1 += fate-g723_1-dec-5
fate-g723_1-dec-5: CMD = framecrc -postfilter 1 -i $(SAMPLES)/g723_1/pathd63p.tco
FATE_G723_1 += fate-g723_1-dec-6
fate-g723_1-dec-6: CMD = framecrc -postfilter 1 -i $(SAMPLES)/g723_1/tamed63p.tco
FATE_SAMPLES_AVCONV += $(FATE_G723_1)
fate-g723_1: $(FATE_G723_1)
FATE_G726 += fate-g726-encode-2bit
fate-g726-encode-2bit: tests/data/asynth-8000-1.wav
fate-g726-encode-2bit: SRC = tests/data/asynth-8000-1.wav

@ -0,0 +1,3 @@
#tb 0: 1/8000
0, 0, 0, 240, 480, 0x7f6f3970
0, 240, 240, 240, 480, 0x1105a0d3

@ -0,0 +1,27 @@
#tb 0: 1/8000
0, 0, 0, 240, 480, 0x5d9d9091
0, 240, 240, 240, 480, 0x425095b7
0, 480, 480, 240, 480, 0xe7b6a1a7
0, 720, 720, 240, 480, 0x9397af19
0, 960, 960, 240, 480, 0xe671adf7
0, 1200, 1200, 240, 480, 0x77deb313
0, 1440, 1440, 240, 480, 0x64abbb5f
0, 1680, 1680, 240, 480, 0x000bc879
0, 1920, 1920, 240, 480, 0x5a88c7aa
0, 2160, 2160, 240, 480, 0xb041cbad
0, 2400, 2400, 240, 480, 0x3257cd54
0, 2640, 2640, 240, 480, 0xd6e7d4b3
0, 2880, 2880, 240, 480, 0x0054d6b6
0, 3120, 3120, 240, 480, 0x10bcd58e
0, 3360, 3360, 240, 480, 0x702ed981
0, 3600, 3600, 240, 480, 0x9870d4e3
0, 3840, 3840, 240, 480, 0x9c12d6d1
0, 4080, 4080, 240, 480, 0xc41be449
0, 4320, 4320, 240, 480, 0xf4bddc5a
0, 4560, 4560, 240, 480, 0x1c03e0d4
0, 4800, 4800, 240, 480, 0xc287e4f8
0, 5040, 5040, 240, 480, 0xf705ec20
0, 5280, 5280, 240, 480, 0x7835f458
0, 5520, 5520, 240, 480, 0xa8b3e632
0, 5760, 5760, 240, 480, 0xd358df57
0, 6000, 6000, 240, 480, 0x934dab80

@ -0,0 +1,34 @@
#tb 0: 1/8000
0, 0, 0, 240, 480, 0xce908869
0, 240, 240, 240, 480, 0xfa63588e
0, 480, 480, 240, 480, 0x11ce850c
0, 720, 720, 240, 480, 0x76c459cf
0, 960, 960, 240, 480, 0x13ed8bf0
0, 1200, 1200, 240, 480, 0x33d10b77
0, 1440, 1440, 240, 480, 0xdf41e03c
0, 1680, 1680, 240, 480, 0xa31aad71
0, 1920, 1920, 240, 480, 0x83c2b48d
0, 2160, 2160, 240, 480, 0xaf41ba01
0, 2400, 2400, 240, 480, 0xeeecbadc
0, 2640, 2640, 240, 480, 0xe253c7e1
0, 2880, 2880, 240, 480, 0x672cbf0a
0, 3120, 3120, 240, 480, 0x5f32aa27
0, 3360, 3360, 240, 480, 0x0b3da147
0, 3600, 3600, 240, 480, 0x4819e5bc
0, 3840, 3840, 240, 480, 0x423dec60
0, 4080, 4080, 240, 480, 0xafefe289
0, 4320, 4320, 240, 480, 0x8dc5f136
0, 4560, 4560, 240, 480, 0x549cee78
0, 4800, 4800, 240, 480, 0xe589ebdc
0, 5040, 5040, 240, 480, 0x786cef17
0, 5280, 5280, 240, 480, 0xdafded31
0, 5520, 5520, 240, 480, 0xe58bedf8
0, 5760, 5760, 240, 480, 0x44daf26c
0, 6000, 6000, 240, 480, 0x03fcf149
0, 6240, 6240, 240, 480, 0x97a5f4ae
0, 6480, 6480, 240, 480, 0x2114f4f6
0, 6720, 6720, 240, 480, 0x9a44f234
0, 6960, 6960, 240, 480, 0x5b47f339
0, 7200, 7200, 240, 480, 0x9248edcb
0, 7440, 7440, 240, 480, 0x47caf226
0, 7680, 7680, 240, 480, 0x73d4ef48

@ -0,0 +1,5 @@
#tb 0: 1/8000
0, 0, 0, 240, 480, 0xa697b314
0, 240, 240, 240, 480, 0x43c5dc5a
0, 480, 480, 240, 480, 0xd2438147
0, 720, 720, 240, 480, 0x3b1ead64

@ -0,0 +1,101 @@
#tb 0: 1/8000
0, 0, 0, 240, 480, 0x4dce9773
0, 240, 240, 240, 480, 0xe6367ab8
0, 480, 480, 240, 480, 0xf36a589d
0, 720, 720, 240, 480, 0xf94efd31
0, 960, 960, 240, 480, 0x984e6d33
0, 1200, 1200, 240, 480, 0x84eaa191
0, 1440, 1440, 240, 480, 0xed6e0c10
0, 1680, 1680, 240, 480, 0x3627e7a0
0, 1920, 1920, 240, 480, 0x2421b42d
0, 2160, 2160, 240, 480, 0x71e00d6f
0, 2400, 2400, 240, 480, 0xd49cdb95
0, 2640, 2640, 240, 480, 0xa167e890
0, 2880, 2880, 240, 480, 0xbb3fd7c0
0, 3120, 3120, 240, 480, 0xa3d5bc27
0, 3360, 3360, 240, 480, 0x8107ca9c
0, 3600, 3600, 240, 480, 0xcd4ce998
0, 3840, 3840, 240, 480, 0x14e3ee73
0, 4080, 4080, 240, 480, 0x5fc3eaf0
0, 4320, 4320, 240, 480, 0xf166f33d
0, 4560, 4560, 240, 480, 0xe8b3f701
0, 4800, 4800, 240, 480, 0x50aaeafd
0, 5040, 5040, 240, 480, 0xc7f2daec
0, 5280, 5280, 240, 480, 0x3960e5d0
0, 5520, 5520, 240, 480, 0xadc8ec32
0, 5760, 5760, 240, 480, 0x8741e7b0
0, 6000, 6000, 240, 480, 0x1a1bd910
0, 6240, 6240, 240, 480, 0x76a4ef7f
0, 6480, 6480, 240, 480, 0x19e6e5f5
0, 6720, 6720, 240, 480, 0x6365e871
0, 6960, 6960, 240, 480, 0xb2bee161
0, 7200, 7200, 240, 480, 0x5098cba4
0, 7440, 7440, 240, 480, 0x1009c4c5
0, 7680, 7680, 240, 480, 0xbf20cfe3
0, 7920, 7920, 240, 480, 0x91ddd028
0, 8160, 8160, 240, 480, 0x4fedce37
0, 8400, 8400, 240, 480, 0x43bcd4d8
0, 8640, 8640, 240, 480, 0x41b3e782
0, 8880, 8880, 240, 480, 0xa272f4a6
0, 9120, 9120, 240, 480, 0x46b2f2cb
0, 9360, 9360, 240, 480, 0xc47dee7d
0, 9600, 9600, 240, 480, 0x699fe668
0, 9840, 9840, 240, 480, 0x72b5daf8
0, 10080, 10080, 240, 480, 0x0c0cf25e
0, 10320, 10320, 240, 480, 0xdafff519
0, 10560, 10560, 240, 480, 0xf1f2e42f
0, 10800, 10800, 240, 480, 0xe04fe7f4
0, 11040, 11040, 240, 480, 0x1157d789
0, 11280, 11280, 240, 480, 0xe598ede6
0, 11520, 11520, 240, 480, 0xbd06dc2f
0, 11760, 11760, 240, 480, 0x2aa6d2d9
0, 12000, 12000, 240, 480, 0xa61ff1a3
0, 12240, 12240, 240, 480, 0x6f57eb35
0, 12480, 12480, 240, 480, 0x68c1f4a9
0, 12720, 12720, 240, 480, 0x5c0ae6f2
0, 12960, 12960, 240, 480, 0xdffbef45
0, 13200, 13200, 240, 480, 0xf0daf893
0, 13440, 13440, 240, 480, 0x680cf0c4
0, 13680, 13680, 240, 480, 0xbbc1d42f
0, 13920, 13920, 240, 480, 0x9b66eddd
0, 14160, 14160, 240, 480, 0xc18be7a3
0, 14400, 14400, 240, 480, 0x1deae025
0, 14640, 14640, 240, 480, 0x6c12e002
0, 14880, 14880, 240, 480, 0x004bf27e
0, 15120, 15120, 240, 480, 0xc97de444
0, 15360, 15360, 240, 480, 0xc650de6b
0, 15600, 15600, 240, 480, 0xe614ecd6
0, 15840, 15840, 240, 480, 0x2c20d111
0, 16080, 16080, 240, 480, 0x8562c091
0, 16320, 16320, 240, 480, 0x4fcddd08
0, 16560, 16560, 240, 480, 0xc1b2c3cb
0, 16800, 16800, 240, 480, 0x5dcfdf24
0, 17040, 17040, 240, 480, 0xf348d7be
0, 17280, 17280, 240, 480, 0x31b3ead7
0, 17520, 17520, 240, 480, 0xb30dee68
0, 17760, 17760, 240, 480, 0x1f44e9ac
0, 18000, 18000, 240, 480, 0x3cafe61e
0, 18240, 18240, 240, 480, 0x5800ea95
0, 18480, 18480, 240, 480, 0xeaeeec19
0, 18720, 18720, 240, 480, 0x47f9eff3
0, 18960, 18960, 240, 480, 0xdc10edf1
0, 19200, 19200, 240, 480, 0x5b1bd3ff
0, 19440, 19440, 240, 480, 0x039bea64
0, 19680, 19680, 240, 480, 0xa93ac953
0, 19920, 19920, 240, 480, 0x1b55f01c
0, 20160, 20160, 240, 480, 0x32b7db90
0, 20400, 20400, 240, 480, 0x2f8ce0a8
0, 20640, 20640, 240, 480, 0x53f4f7d5
0, 20880, 20880, 240, 480, 0x880ee517
0, 21120, 21120, 240, 480, 0xe793f2fd
0, 21360, 21360, 240, 480, 0x498beaf5
0, 21600, 21600, 240, 480, 0x8c25f623
0, 21840, 21840, 240, 480, 0xdc0df527
0, 22080, 22080, 240, 480, 0x9d21e9b4
0, 22320, 22320, 240, 480, 0x6d51d9e6
0, 22560, 22560, 240, 480, 0xaf3ee6ba
0, 22800, 22800, 240, 480, 0xbef0ea44
0, 23040, 23040, 240, 480, 0x50c6e9ab
0, 23280, 23280, 240, 480, 0x76a7d80c
0, 23520, 23520, 240, 480, 0x8d68ef94
0, 23760, 23760, 240, 480, 0x213ce600

@ -0,0 +1,101 @@
#tb 0: 1/8000
0, 0, 0, 240, 480, 0x4fa1aed9
0, 240, 240, 240, 480, 0x6d7ef391
0, 480, 480, 240, 480, 0xaecaf2c1
0, 720, 720, 240, 480, 0xd3b2ed0a
0, 960, 960, 240, 480, 0x33dceb4e
0, 1200, 1200, 240, 480, 0xc10eeb64
0, 1440, 1440, 240, 480, 0x7c0febff
0, 1680, 1680, 240, 480, 0x0c09eecd
0, 1920, 1920, 240, 480, 0xa5efdcf8
0, 2160, 2160, 240, 480, 0xb643edd2
0, 2400, 2400, 240, 480, 0x46bef26d
0, 2640, 2640, 240, 480, 0x4310f101
0, 2880, 2880, 240, 480, 0x3664ec16
0, 3120, 3120, 240, 480, 0xcc17e5e8
0, 3360, 3360, 240, 480, 0xff4cf35b
0, 3600, 3600, 240, 480, 0xdf4cf2e5
0, 3840, 3840, 240, 480, 0x093bf570
0, 4080, 4080, 240, 480, 0xd950ec75
0, 4320, 4320, 240, 480, 0xa469f2f8
0, 4560, 4560, 240, 480, 0x3558ee9d
0, 4800, 4800, 240, 480, 0x4102f252
0, 5040, 5040, 240, 480, 0xf9dff318
0, 5280, 5280, 240, 480, 0xd7cbef4d
0, 5520, 5520, 240, 480, 0x76c4eed3
0, 5760, 5760, 240, 480, 0xe3d6e9d1
0, 6000, 6000, 240, 480, 0x63baf340
0, 6240, 6240, 240, 480, 0xd2dff2ff
0, 6480, 6480, 240, 480, 0x3355ebc4
0, 6720, 6720, 240, 480, 0x7183ed76
0, 6960, 6960, 240, 480, 0x9806eff7
0, 7200, 7200, 240, 480, 0xc090ec04
0, 7440, 7440, 240, 480, 0xe76ff174
0, 7680, 7680, 240, 480, 0x2cdfe8f1
0, 7920, 7920, 240, 480, 0xbb69ee8a
0, 8160, 8160, 240, 480, 0x3e03f522
0, 8400, 8400, 240, 480, 0xe7e6e659
0, 8640, 8640, 240, 480, 0x4dbaf063
0, 8880, 8880, 240, 480, 0xc9b9f381
0, 9120, 9120, 240, 480, 0x3866edc9
0, 9360, 9360, 240, 480, 0x7e0defca
0, 9600, 9600, 240, 480, 0xa88bf700
0, 9840, 9840, 240, 480, 0x65a7f029
0, 10080, 10080, 240, 480, 0xaf8cf09d
0, 10320, 10320, 240, 480, 0x679bee1e
0, 10560, 10560, 240, 480, 0x8dc1e9a4
0, 10800, 10800, 240, 480, 0xe3c2f0ac
0, 11040, 11040, 240, 480, 0x35d0eb14
0, 11280, 11280, 240, 480, 0xfeb3ed00
0, 11520, 11520, 240, 480, 0x9da3ecb4
0, 11760, 11760, 240, 480, 0xa0e3f3c2
0, 12000, 12000, 240, 480, 0x05ffe9de
0, 12240, 12240, 240, 480, 0xf7adef05
0, 12480, 12480, 240, 480, 0x71bef669
0, 12720, 12720, 240, 480, 0x4b9feca8
0, 12960, 12960, 240, 480, 0x85e5ecd8
0, 13200, 13200, 240, 480, 0xa4cbe90e
0, 13440, 13440, 240, 480, 0xe689f958
0, 13680, 13680, 240, 480, 0xa936f168
0, 13920, 13920, 240, 480, 0x496ff059
0, 14160, 14160, 240, 480, 0x0bb6eb82
0, 14400, 14400, 240, 480, 0x7727ef53
0, 14640, 14640, 240, 480, 0xede3eaab
0, 14880, 14880, 240, 480, 0xe961ef58
0, 15120, 15120, 240, 480, 0x454fef58
0, 15360, 15360, 240, 480, 0x9305e76d
0, 15600, 15600, 240, 480, 0xfe5ce6ed
0, 15840, 15840, 240, 480, 0x84d1efdc
0, 16080, 16080, 240, 480, 0x4b23ed7a
0, 16320, 16320, 240, 480, 0x1380eb91
0, 16560, 16560, 240, 480, 0xf705eca3
0, 16800, 16800, 240, 480, 0x26f7e707
0, 17040, 17040, 240, 480, 0x3fe3f27f
0, 17280, 17280, 240, 480, 0xa030f177
0, 17520, 17520, 240, 480, 0xaf72ed92
0, 17760, 17760, 240, 480, 0x00b8f1e7
0, 18000, 18000, 240, 480, 0x681fecca
0, 18240, 18240, 240, 480, 0x3ca1ef63
0, 18480, 18480, 240, 480, 0xd6fcedac
0, 18720, 18720, 240, 480, 0x6928ed04
0, 18960, 18960, 240, 480, 0x8bdeeebe
0, 19200, 19200, 240, 480, 0x24b6f59d
0, 19440, 19440, 240, 480, 0xd49deebf
0, 19680, 19680, 240, 480, 0xe798f2c8
0, 19920, 19920, 240, 480, 0x280fefb8
0, 20160, 20160, 240, 480, 0xe0a8f40d
0, 20400, 20400, 240, 480, 0x4d48f511
0, 20640, 20640, 240, 480, 0x6bf3eef0
0, 20880, 20880, 240, 480, 0x1573f1cd
0, 21120, 21120, 240, 480, 0x6245e961
0, 21360, 21360, 240, 480, 0xe05af091
0, 21600, 21600, 240, 480, 0xfcc3e9e3
0, 21840, 21840, 240, 480, 0x6d5febae
0, 22080, 22080, 240, 480, 0x4a96ef58
0, 22320, 22320, 240, 480, 0x1586f156
0, 22560, 22560, 240, 480, 0x50b0e99e
0, 22800, 22800, 240, 480, 0xf25dfa9b
0, 23040, 23040, 240, 480, 0x49b5f932
0, 23280, 23280, 240, 480, 0xe1ddef32
0, 23520, 23520, 240, 480, 0x2307ed94
0, 23760, 23760, 240, 480, 0x6a2beb17
Loading…
Cancel
Save