aboutsummaryrefslogtreecommitdiffstats
path: root/codecs/codec_g722.c
AgeCommit message (Collapse)AuthorFilesLines
2008-03-07Merged revisions 106501 via svnmerge from russell1-2/+6
https://origsvn.digium.com/svn/asterisk/trunk ........ r106501 | russell | 2008-03-06 18:24:58 -0600 (Thu, 06 Mar 2008) | 28 lines Merge changes from team/russell/g722-sillyness ... Fix a number of other places where the number of samples in a G722 frame was not properly handled because of various reasons. main/rtp.c: - When a G722 frame is read from the smoother, the number of samples in the frame must be divided by 2 before being sent out over the network. Even though G722 is 16 kHz, an error in some previous spec has made it so that we have to list the number of samples such as if it was 8 kHz. main/file.c: - When scheduling the next time to expect a frame, take into account that the format of the file we're reading from may not be 8 kHz. codecs/codec_g722.c: - When converting from G722 to slinear, g722_decode() expects its samples parameter to be in the silly (real samples / 2) format. Make it so. - When converting from slinear to G722, properly set the number of samples in the frame to be the number of bytes of output * 2. formats/format_pcm.c: - This format module handles G722, among a number of other formats. However, the read() and seek() functions did not account for the fact that G722 has 2 samples per byte. (closes issue #12130, reported by rickross, patched by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106502 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11At one point during working on this module, I had the lin/lin16 versions of therussell1-34/+2
framein callbacks different. However, they are now the same again, so remove the duplicate code and use the same functions for the lin/lin16 versions. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11 - Fix the last set of places where incorrect assumptions were made about therussell1-5/+9
sample length with g722. It is _2_ samples per byte, not 1. This was all over the place, and I believed it, and it is what caused me to take so long to figure out what was broken. - Update copyright information on codec_g722. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98081 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Fix various issues in codec_g722.russell1-15/+50
- The most common fix being made here is to fix all of the places where the number of output samples and output bytes gets updated in the translator state structure. - Fix a number of other places where the number of samples provided as an initialization value to a struct was incorrect. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97975 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27I went looking for where we downloaded the g722 implementation and came acrossrussell1-0/+3
these two links. So, I'm adding them so they are available for reference later. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94877 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-21codecs.conf really shouldn't be mandatory.. it never had been before, so ↵qwell1-1/+1
let's go back to being optional. A big "thank you" to pnlarsson on IRC for allowing me access to his system to debug this. Closes issue #11584. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94541 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22remove a number of #include <fcntl.h> which are eitherrizzo1-2/+0
useless or done elsewhere git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89516 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19remove some useless includes from codecsrizzo1-4/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89428 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyrizzo1-1/+0
were included almost everywhere. Remove some of the instances. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-4/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06Commit some cleanups to the format type code.tilghman1-1/+75
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits. - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution. (This doesn't affect anything immediately, until another codec has wb support.) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89071 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-31More changes to change return values from load_module functions.qwell1-9/+15
(issue #11096) Patches: codec_adpcm.c.patch uploaded by moy (license 222) codec_alaw.c.patch uploaded by moy (license 222) codec_a_mu.c.patch uploaded by moy (license 222) codec_g722.c.patch uploaded by moy (license 222) codec_g726.c.diff uploaded by moy (license 222) codec_gsm.c.patch uploaded by moy (license 222) codec_ilbc.c.patch uploaded by moy (license 222) codec_lpc10.c.patch uploaded by moy (license 222) codec_speex.c.patch uploaded by moy (license 222) codec_ulaw.c.patch uploaded by moy (license 222) codec_zap.c.patch uploaded by moy (license 222) format_g723.c.patch uploaded by moy (license 222) format_g726.c.patch uploaded by moy (license 222) format_g729.c.patch uploaded by moy (license 222) format_gsm.c.patch uploaded by moy (license 222) format_h263.c.patch uploaded by moy (license 222) format_h264.c.patch uploaded by moy (license 222) format_ilbc.c.patch uploaded by moy (license 222) format_jpeg.c.patch uploaded by moy (license 222) format_ogg_vorbis.c.patch uploaded by moy (license 222) format_pcm.c.patch uploaded by moy (license 222) format_sln.c.patch uploaded by moy (license 222) format_vox.c.patch uploaded by moy (license 222) format_wav.c.patch uploaded by moy (license 222) format_wav_gsm.c.patch uploaded by moy (license 222) res_adsi.c.patch uploaded by eliel (license 64) res_ael_share.c.patch uploaded by eliel (license 64) res_clioriginate.c.patch uploaded by eliel (license 64) res_convert.c.patch uploaded by eliel (license 64) res_indications.c.patch uploaded by eliel (license 64) res_musiconhold.c.patch uploaded by eliel (license 64) res_smdi.c.patch uploaded by eliel (license 64) res_speech.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87889 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-5/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26Do a massive conversion for using the ast_verb() macrorussell1-2/+1
(closes issue #10277, patches by mvanbaak) Basically, this changes ... if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3, "Something\n"); to ... ast_verb(3, "Something\n"); git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-14I don't know how it worked earlier, but valgrindpcadach1-2/+2
produces core every time you try to load codec_g722. Fixed. ;-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54325 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21This little mod gets rid of that g722 compiler warning that breaks builds ↵murf1-1/+1
configured with --enable-dev-mode; the previous commit of 48767 was to merge in changes for bug 6334, unifying the open mode arguments for saner operation. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48781 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21Minor addition giving props to Steve Underwood for his hard work. Thanks again mattf1-0/+3
Steve! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48662 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21Add codec G.722 support.mattf1-0/+219
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48661 f38db490-d61c-443f-a65b-d21fe96a405b