[FFmpeg-devel] [PATCH] G.722 decoder

Michael Niedermayer michaelni
Fri Sep 10 00:27:23 CEST 2010


On Fri, Sep 10, 2010 at 12:00:19AM +0300, Martin Storsj? wrote:
> On Thu, 9 Sep 2010, Michael Niedermayer wrote:
> 
> > On Thu, Sep 09, 2010 at 10:36:41PM +0300, Martin Storsj? wrote:
> > > On Wed, 8 Sep 2010, Michael Niedermayer wrote:
> > > 
> > > > lowres could be checked for this
> > > > except that iam fine with the patch
> > > 
> > > Applied the decoder and demuxer/muxer. I noticed that a separate AVOption 
> > > (which I named -audio_lowres) is needed for setting lowres for audio 
> > 
> > -alowres should work without this "a..." should be routed to the audio
> > context
> 
> Oh, nifty, didn't know about that!
> 
> > > @@ -3241,6 +3241,8 @@ static void opt_input_file(const char *filename)
> > >              input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(audio_codec_name);
> > >              if(audio_disable)
> > >                  st->discard= AVDISCARD_ALL;
> > > +            if (dec->lowres)
> > > +                audio_sample_rate >>= dec->lowres;
> > >              break;
> > >          case AVMEDIA_TYPE_VIDEO:
> > >              set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
> > 
> > with a comment that says av_find_stream_info() can add streams and we have no
> > chance to set lowres up for them early enough ...
> > this hunk should be ok
> 
> Applied this hunk.
> 
> The rest of it attached again.
> 
> // Martin
>  options.c |    2 +-
>  utils.c   |    3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 782f446994fb505825aa1f67e3c7c5a35120b610  0001-Allow-the-lowres-option-to-affect-audio-codecs-too.patch
> From 2fc7da9c196fc11ca56dc92acca4390481cda5ea Mon Sep 17 00:00:00 2001
> From: Martin Storsjo <martin at martin.st>
> Date: Thu, 9 Sep 2010 09:08:34 +0300
> Subject: [PATCH] Allow the lowres option to affect audio codecs, too
> 
> ---
>  libavcodec/options.c |    2 +-
>  libavcodec/utils.c   |    3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)

looks good if it passes tests

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- 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/20100910/1f71496a/attachment.pgp>



More information about the ffmpeg-devel mailing list