summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2006-10-16 17:44:29 +0000
committerLuca Barbato <lu_zero@gentoo.org>2006-10-16 17:44:29 +0000
commit9f1c1c9985fe5c2c4888b8b600ce2e59e037d05e (patch)
tree132c236f98f2a16f10094d8a2e9c53333ba584ef /libavcodec
parent212d84881a438e64ddf367f649cd359cfaec4198 (diff)
Make ffmpeg work with x264 r592
Originally committed as revision 6711 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.h2
-rw-r--r--libavcodec/utils.c2
-rw-r--r--libavcodec/x264.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index b4e5b03d19..724f4e743f 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1889,7 +1889,7 @@ typedef struct AVCodecContext {
* - encoding: set by user.
* - decoding: unused
*/
- int crf;
+ float crf;
/**
* constant quantization parameter rate control method
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 092c460738..ef0e167190 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -684,7 +684,7 @@ static const AVOption options[]={
{"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), FF_OPT_TYPE_INT, 256, INT_MIN, INT_MAX, V|E},
{"bidir_refine", NULL, OFFSET(bidir_refine), FF_OPT_TYPE_INT, DEFAULT, 0, 4, V|E},
{"brd_scale", NULL, OFFSET(brd_scale), FF_OPT_TYPE_INT, DEFAULT, 0, 10, V|E},
-{"crf", NULL, OFFSET(crf), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
+{"crf", NULL, OFFSET(crf), FF_OPT_TYPE_FLOAT, DEFAULT, 0, 51, V|E},
{"cqp", NULL, OFFSET(cqp), FF_OPT_TYPE_INT, -1, INT_MIN, INT_MAX, V|E},
{"keyint_min", NULL, OFFSET(keyint_min), FF_OPT_TYPE_INT, 25, INT_MIN, INT_MAX, V|E},
{"refs", NULL, OFFSET(refs), FF_OPT_TYPE_INT, 1, INT_MIN, INT_MAX, V|E},
diff --git a/libavcodec/x264.c b/libavcodec/x264.c
index 4f69f7c01b..c3db9f23cc 100644
--- a/libavcodec/x264.c
+++ b/libavcodec/x264.c
@@ -146,7 +146,7 @@ X264_init(AVCodecContext *avctx)
else{
if(avctx->crf){
x4->params.rc.i_rc_method = X264_RC_CRF;
- x4->params.rc.i_rf_constant = avctx->crf;
+ x4->params.rc.f_rf_constant = avctx->crf;
}else if(avctx->cqp > -1){
x4->params.rc.i_rc_method = X264_RC_CQP;
x4->params.rc.i_qp_constant = avctx->cqp;