From d8a74d1d95a3ac37d3f9807499630277ad983c51 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 14 Feb 2013 18:00:39 +0100 Subject: [PATCH 1/2] qtrle: use AV_LOG_ERROR in an error message. --- libavcodec/qtrle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index eca96e2d5f..cc31592f01 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -48,7 +48,7 @@ typedef struct QtrleContext { #define CHECK_PIXEL_PTR(n) \ if ((pixel_ptr + n > pixel_limit) || (pixel_ptr + n < 0)) { \ - av_log (s->avctx, AV_LOG_INFO, "Problem: pixel_ptr = %d, pixel_limit = %d\n", \ + av_log (s->avctx, AV_LOG_ERROR, "Problem: pixel_ptr = %d, pixel_limit = %d\n",\ pixel_ptr + n, pixel_limit); \ return; \ } \ From 2f325a6fd4421c4dd4e26d7065e5d4bf26ed52f2 Mon Sep 17 00:00:00 2001 From: John Van Sickle Date: Tue, 25 Sep 2012 12:29:22 -0400 Subject: [PATCH 2/2] libx264: change i_qfactor to use x264cli's default This also allows libx264 to modify its i_qfactor value when using the "-tune" setting. Previously it had a static value of 1.25 Signed-off-by: Anton Khirnov --- libavcodec/libx264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 17926627f5..bb92110801 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -279,7 +279,8 @@ static av_cold int X264_init(AVCodecContext *avctx) (float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size; } - x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); + if (avctx->i_quant_factor > 0) + x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor); x4->params.rc.f_pb_factor = avctx->b_quant_factor; x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset; @@ -559,6 +560,7 @@ static const AVCodecDefault x264_defaults[] = { { "b", "0" }, { "bf", "-1" }, { "g", "-1" }, + { "i_qfactor", "-1" }, { "qmin", "-1" }, { "qmax", "-1" }, { "qdiff", "-1" },