[FFmpeg-cvslog] libtheoraenc: fix granularity of video quality
Maximilian Seesslen
git at videolan.org
Tue Jan 15 15:20:50 CET 2013
ffmpeg | branch: master | Maximilian Seesslen <mes at seesslen.net> | Fri Jan 4 16:56:00 2013 +0100| [055b37308080d1143b69a0dc488f63b2ea1d0043] | committer: Martin Storsjö
libtheoraenc: fix granularity of video quality
The floating point version of av_clip has to be used when
converting the quality level.
Signed-off-by: Maximilian Seesslen <mes at seesslen.net>
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=055b37308080d1143b69a0dc488f63b2ea1d0043
---
libavcodec/libtheoraenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index f20fabb..3990692 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -207,7 +207,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_clipf(avc_context->global_quality / (float)FF_QP2LAMBDA, 0, 10) * 6.3;
t_info.target_bitrate = 0;
} else {
t_info.target_bitrate = avc_context->bit_rate;
More information about the ffmpeg-cvslog
mailing list