Oh and the following comment in AVCodec.h

/**\
 * quality (between 1 (good) and FF_LAMBDA_MAX (bad)) \
 * - encoding: set by libavcodec. For coded_picture (and set by user for
input).\

And so on. It's round about line 607 in avcodec.h

Clive

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Clive Taylor
Sent: 02 April 2009 11:46
To: Libav* user questions and discussions
Subject: Re: [libav-user] Writing single frames to JPEG

OK. My comment was just because this morning I found this:

qmin = clip ( qmin, 1, FF_LAMBDA_MAX );
qmax = clip ( qmax, 1, FF_LAMBDA_MAX );

in

http://svn.tribler.org/ffmpeg/branches/arno/d07-01-04-ffmpeg-demo-from-e
xx-r2350/libavcodec/ratecontrol.c

(see the function get_qminmax ( ) )

I just had some idea that it might be related. One day, when I've
nothing else to do, it'd be good to document this lot. Might learn how
to use it then.

Clive

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Stas Oskin
Sent: 02 April 2009 11:16
To: Libav* user questions and discussions
Subject: Re: [libav-user] Writing single frames to JPEG

Hi.

2009/4/2 Clive Taylor <[email protected]>

> Stas, Edwin,
>
> So qmin and qmax are in the range 1 - FF_LAMBDA_MAX (32767), then? The
> highest quality has the lowest qmin/qmax value. In which case the 80%
that
> Stas wanted to know about would be 6553. Or to put it another way:
>
> If qp is desired quality as a percentage, then
> qmin = qmax = ((100 - qp) * FF_LAMBDA_MAX) / 100
>
> One thing that I've noticed: if you need to write more than 1 frame
from a
> video source to JPEG, keeping the same encoder session open, you need
to
> increment the pFrame->pts value. Pretty obvious, really.
>
> Clive
>

Actually, I always thought qmin/qmax range between 1 and 31?

Hence  qmin = qmax = ((100 - qp) * 31) / 100?

By the PTS advancing, you meant the one in the encoded JPEG packet?

Regards.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user


_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user


_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to