[FFmpeg-cvslog] Add support for AMR-WB encoding via libvo-amrwbenc

Michael Niedermayer michaelni at gmx.at
Thu Apr 14 00:24:57 CEST 2011


On Thu, Apr 14, 2011 at 12:11:30AM +0200, Michael Niedermayer wrote:
> On Wed, Apr 13, 2011 at 12:04:52AM +0300, Martin Storsjö wrote:
> > Hi Reimar,
> > 
> > On Tue, 12 Apr 2011, Reimar Döffinger wrote:
> [..]
> > > > +static int amr_wb_encode_frame(AVCodecContext *avctx,
> > > > +                               unsigned char *frame/*out*/,
> > > > +                               int buf_size, void *data/*in*/)
> > > > +{
> > > > +    AMRWBContext *s = avctx->priv_data;
> > > > +    int size;
> > > > +
> > > > +    if ((s->mode = getWBBitrateMode(avctx->bit_rate)) < 0) {
> > > > +        av_log(avctx, AV_LOG_ERROR, wb_bitrate_unsupported);
> > > > +        return -1;
> > > > +    }
> > > 
> > > Failing in the middle of an encode and just because we can't match the 
> > > bitrate seems a bit extreme and also not very consistent with other 
> > > codecs that might not take the bitrate very seriously in the first 
> > > place. From a user perspective it also means the codec can't be used 
> > > without special-case code.
> > 
> > The bitrate is checked during the init, too, so if you set it to an 
> > incorrect value, it will error out already at that point, but you're 
> > allowed to change between frames. Do you have a better suggestion on how 
> > to handle the case if the caller sets it to an unsupported rate during the 
> > encoding, while starting out at a supported bitrate?
> 
> simple suggestion
> 
> pick the closest rate, add the error to the frame

s/the frame/the next frame/

[...]



-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110414/9d6ff389/attachment.asc>


More information about the ffmpeg-cvslog mailing list