[FFmpeg-devel] [PATCH] Add a G.722 encoder
Michael Niedermayer
michaelni
Thu Sep 23 23:26:46 CEST 2010
On Fri, Sep 24, 2010 at 12:20:50AM +0300, Martin Storsj? wrote:
> On Thu, 23 Sep 2010, Michael Niedermayer wrote:
>
> > On Fri, Sep 17, 2010 at 09:31:15AM +0300, Martin Storsj? wrote:
> > [...]
> > > +static inline int encode_high(G722Context *c, int xhigh)
> > [...]
> > > +static inline int encode_low(const struct G722Band* state, int xlow)
> >
> > creepily inconsistant both should be G722Band if possible
>
> Changed
>
> > > +static int g722_encode_frame(AVCodecContext *avctx,
> > > + uint8_t *dst, int buf_size, void *data)
> > > +{
> > > + G722Context *c = avctx->priv_data;
> > > + const int16_t *samples = data;
> > > + int i;
> > > +
> > > + for (i = 0; i < buf_size >> 1; i++) {
> > > + int xlow, xhigh, ihigh, ilow;
> > > + filter_samples(c, &samples[2*i], &xlow, &xhigh);
> >
> > > + ihigh = encode_high(c, xhigh);
> > > + ilow = encode_low(&c->band[0], xlow);
> > > + update_low_predictor(&c->band[0], ilow >> 2);
> >
> > update_* is also inconsistantly called
>
> Changed so that encode_high doesn't update the predictor implicitly, to
> make them consistent.
>
> New round attached.
>
> // Martin
> Changelog | 2 -
> doc/general.texi | 2 -
> libavcodec/Makefile | 1
> libavcodec/allcodecs.c | 2 -
> libavcodec/g722.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++-
> 5 files changed, 86 insertions(+), 4 deletions(-)
> 733e0efcb07873ccf8627f815f193056fa3572d6 0001-Add-a-G.722-encoder.patch
> From 024592a9dc3f80e440d938dc8c07a9654ab0ad56 Mon Sep 17 00:00:00 2001
> From: Martin Storsjo <martin at martin.st>
> Date: Fri, 6 Aug 2010 23:06:37 +0300
> Subject: [PATCH 1/2] Add a G.722 encoder
ok
[...]
> g722.c | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 160 insertions(+)
> 7508aa6321b9e6c5edacfd2240f7fd90178f3e05 0002-Add-initial-trellis-support-in-the-G.722-encoder.patch
> From fc0da21457eced72672de02f36703877d905287b Mon Sep 17 00:00:00 2001
> From: Martin Storsjo <martin at martin.st>
> Date: Fri, 10 Sep 2010 15:55:52 +0300
> Subject: [PATCH 2/2] Add initial trellis support in the G.722 encoder
not reviweed yet
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100923/c3577b4a/attachment.pgp>
More information about the ffmpeg-devel
mailing list