Signed-off-by: Guo, Yejun <[email protected]>
---
libavcodec/libx264.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index a3493f3..8c96728 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -383,7 +383,9 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt,
const AVFrame *frame,
qoffset = roi->qoffset.num * 1.0f / roi->qoffset.den;
qoffset = av_clipf(qoffset, -1.0f, 1.0f);
- // 25 is a number that I think it is a possible proper
scale value.
+ /* qp range of x264 is from 0 to 51, just choose 25 as
the scale value,
+ * so the range of final qoffset is [-25.0, 25.0].
+ */
qoffset = qoffset * 25;
for (int y = starty; y < endy; y++) {
--
2.7.4
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel