Commit b1e0d9f9 authored by vitor's avatar vitor

RealAudio 14.4k encoder.

Patch by Francesco Lavra (firstnamelastname@interfree.it)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23579 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 55624006
...@@ -89,6 +89,7 @@ version 0.6: ...@@ -89,6 +89,7 @@ version 0.6:
- 35% faster VP3/Theora decoding - 35% faster VP3/Theora decoding
- faster AAC decoding - faster AAC decoding
- faster H.264 decoding - faster H.264 decoding
- RealAudio 1.0 (14.4K) encoder
......
...@@ -1270,6 +1270,7 @@ png_decoder_select="zlib" ...@@ -1270,6 +1270,7 @@ png_decoder_select="zlib"
png_encoder_select="zlib" png_encoder_select="zlib"
qcelp_decoder_select="lsp" qcelp_decoder_select="lsp"
qdm2_decoder_select="mdct rdft" qdm2_decoder_select="mdct rdft"
real_144_encoder_select="lpc"
rv10_decoder_select="h263_decoder" rv10_decoder_select="h263_decoder"
rv10_encoder_select="h263_encoder" rv10_encoder_select="h263_encoder"
rv20_decoder_select="h263_decoder" rv20_decoder_select="h263_decoder"
......
...@@ -635,7 +635,7 @@ following image formats are supported: ...@@ -635,7 +635,7 @@ following image formats are supported:
@item QCELP / PureVoice @tab @tab X @item QCELP / PureVoice @tab @tab X
@item QDesign Music Codec 2 @tab @tab X @item QDesign Music Codec 2 @tab @tab X
@tab There are still some distortions. @tab There are still some distortions.
@item RealAudio 1.0 (14.4K) @tab @tab X @item RealAudio 1.0 (14.4K) @tab X @tab X
@tab Real 14400 bit/s codec @tab Real 14400 bit/s codec
@item RealAudio 2.0 (28.8K) @tab @tab X @item RealAudio 2.0 (28.8K) @tab @tab X
@tab Real 28800 bit/s codec @tab Real 28800 bit/s codec
......
...@@ -282,6 +282,7 @@ OBJS-$(CONFIG_QTRLE_DECODER) += qtrle.o ...@@ -282,6 +282,7 @@ OBJS-$(CONFIG_QTRLE_DECODER) += qtrle.o
OBJS-$(CONFIG_QTRLE_ENCODER) += qtrleenc.o OBJS-$(CONFIG_QTRLE_ENCODER) += qtrleenc.o
OBJS-$(CONFIG_R210_DECODER) += r210dec.o OBJS-$(CONFIG_R210_DECODER) += r210dec.o
OBJS-$(CONFIG_RA_144_DECODER) += ra144dec.o ra144.o celp_filters.o OBJS-$(CONFIG_RA_144_DECODER) += ra144dec.o ra144.o celp_filters.o
OBJS-$(CONFIG_RA_144_ENCODER) += ra144enc.o ra144.o celp_filters.o
OBJS-$(CONFIG_RA_288_DECODER) += ra288.o celp_math.o celp_filters.o OBJS-$(CONFIG_RA_288_DECODER) += ra288.o celp_math.o celp_filters.o
OBJS-$(CONFIG_RAWVIDEO_DECODER) += rawdec.o OBJS-$(CONFIG_RAWVIDEO_DECODER) += rawdec.o
OBJS-$(CONFIG_RAWVIDEO_ENCODER) += rawenc.o OBJS-$(CONFIG_RAWVIDEO_ENCODER) += rawenc.o
......
...@@ -247,7 +247,7 @@ void avcodec_register_all(void) ...@@ -247,7 +247,7 @@ void avcodec_register_all(void)
REGISTER_ENCDEC (NELLYMOSER, nellymoser); REGISTER_ENCDEC (NELLYMOSER, nellymoser);
REGISTER_DECODER (QCELP, qcelp); REGISTER_DECODER (QCELP, qcelp);
REGISTER_DECODER (QDM2, qdm2); REGISTER_DECODER (QDM2, qdm2);
REGISTER_DECODER (RA_144, ra_144); REGISTER_ENCDEC (RA_144, ra_144);
REGISTER_DECODER (RA_288, ra_288); REGISTER_DECODER (RA_288, ra_288);
REGISTER_DECODER (SHORTEN, shorten); REGISTER_DECODER (SHORTEN, shorten);
REGISTER_DECODER (SIPR, sipr); REGISTER_DECODER (SIPR, sipr);
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include "libavutil/avutil.h" #include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 52 #define LIBAVCODEC_VERSION_MAJOR 52
#define LIBAVCODEC_VERSION_MINOR 75 #define LIBAVCODEC_VERSION_MINOR 76
#define LIBAVCODEC_VERSION_MICRO 1 #define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \
......
...@@ -23,13 +23,18 @@ ...@@ -23,13 +23,18 @@
#define AVCODEC_RA144_H #define AVCODEC_RA144_H
#include <stdint.h> #include <stdint.h>
#include "dsputil.h"
#define NBLOCKS 4 ///< number of subblocks within a block #define NBLOCKS 4 ///< number of subblocks within a block
#define BLOCKSIZE 40 ///< subblock size in 16-bit words #define BLOCKSIZE 40 ///< subblock size in 16-bit words
#define BUFFERSIZE 146 ///< the size of the adaptive codebook #define BUFFERSIZE 146 ///< the size of the adaptive codebook
#define FIXED_CB_SIZE 128 ///< size of fixed codebooks
#define FRAMESIZE 20 ///< size of encoded frame
#define LPC_ORDER 10 ///< order of LPC filter
typedef struct { typedef struct {
AVCodecContext *avctx; AVCodecContext *avctx;
DSPContext dsp;
unsigned int old_energy; ///< previous frame energy unsigned int old_energy; ///< previous frame energy
...@@ -41,6 +46,8 @@ typedef struct { ...@@ -41,6 +46,8 @@ typedef struct {
unsigned int lpc_refl_rms[2]; unsigned int lpc_refl_rms[2];
int16_t curr_block[NBLOCKS * BLOCKSIZE];
/** The current subblock padded by the last 10 values of the previous one. */ /** The current subblock padded by the last 10 values of the previous one. */
int16_t curr_sblock[50]; int16_t curr_sblock[50];
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment