[FFmpeg-devel] [PATCH] fixed granularity of video quality when encoding with theora codec

Michael Niedermayer michaelni at gmx.at
Fri Jan 4 18:48:12 CET 2013


On Fri, Jan 04, 2013 at 05:01:29PM +0100, Maximilian Seesslen wrote:
> Am Freitag, 4. Januar 2013, 16:25:40 schrieb Clément Bœsch:
> > On Fri, Jan 04, 2013 at 04:18:11PM +0100, Maximilian Seesslen wrote:
> > > A floating point version of av_clip has to be used when converting the
> > > quality level.
> > > 
> > > Signed-off-by: Maximilian Seesslen <mes at seesslen.net>
> > > ---
> > > 
> > >  libavcodec/libtheoraenc.c |    2 +-
> > >  libavutil/common.h        |   14 ++++++++++++++
> > >  2 files changed, 15 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
> > > index 1419723..350ac67 100644
> > > --- a/libavcodec/libtheoraenc.c
> > > +++ b/libavcodec/libtheoraenc.c
> > > @@ -212,7 +212,7 @@ static av_cold int encode_init(AVCodecContext*
> > > avc_context)
> > > 
> > >                  * 0 <= p <=63
> > >                  * an int value
> > >           
> > >           */
> > > 
> > > -        t_info.quality        = av_clip(avc_context->global_quality /
> > > (float)FF_QP2LAMBDA, 0, 10) * 6.3; +        t_info.quality        =
> > > av_fclip(avc_context->global_quality / (float)FF_QP2LAMBDA, 0, 10) *
> > > 6.3;
> > 
> > We have av_clipf() already.
> > 
> > [...]
> Oh, i must have been blind.
> Fixed patch attached.

applied

thanks

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

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- 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-devel/attachments/20130104/45caf22f/attachment.asc>


More information about the ffmpeg-devel mailing list