summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-24 14:05:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-24 14:05:16 +0100
commita77a27a24b27fc29d119b00866740e4d0b69ba28 (patch)
treef3f21b0eb79152d88dab355297992d26d9d1c2a0 /libavcodec
parent6f5f0671f3d6db98551822728d413c367e52c377 (diff)
parent2f325a6fd4421c4dd4e26d7065e5d4bf26ed52f2 (diff)
downloadffmpeg-streaming-a77a27a24b27fc29d119b00866740e4d0b69ba28.zip
ffmpeg-streaming-a77a27a24b27fc29d119b00866740e4d0b69ba28.tar.gz
Merge commit '2f325a6fd4421c4dd4e26d7065e5d4bf26ed52f2'
* commit '2f325a6fd4421c4dd4e26d7065e5d4bf26ed52f2': libx264: change i_qfactor to use x264cli's default qtrle: use AV_LOG_ERROR in an error message. Conflicts: libavcodec/libx264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libx264.c5
-rw-r--r--libavcodec/qtrle.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 2e0404d..a394213 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -286,7 +286,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.b_deblocking_filter = avctx->flags & CODEC_FLAG_LOOP_FILTER;
- 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;
if (x4->preset || x4->tune)
@@ -357,6 +356,9 @@ static av_cold int X264_init(AVCodecContext *avctx)
}
}
+ if (avctx->i_quant_factor > 0)
+ x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor);
+
if (avctx->me_method == ME_EPZS)
x4->params.analyse.i_me_method = X264_ME_DIA;
else if (avctx->me_method == ME_HEX)
@@ -693,6 +695,7 @@ static const AVCodecDefault x264_defaults[] = {
{ "bf", "-1" },
{ "flags2", "0" },
{ "g", "-1" },
+ { "i_qfactor", "-1" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ "qdiff", "-1" },
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index 3bc87e8..1b92885 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; \
} \
OpenPOWER on IntegriCloud