summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-03-25 19:25:21 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-03-25 19:25:21 +0000
commitf3b3b4895a280904315616ccb3001ce43baedd8f (patch)
tree4c46b47b5935c0dc4783b3efb81bb087d1b7e2a2 /libavcodec/libx264.c
parent4896dd57facf9293038aa8d6fa95df81f9ae549a (diff)
Enable more libx264 options, aq, psy, rc lookahead and ssim
Originally committed as revision 22670 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 9a4c9f4006..a5f0a533d7 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -242,6 +242,14 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.i_me_method = X264_ME_TESA;
else x4->params.analyse.i_me_method = X264_ME_HEX;
+ x4->params.rc.i_aq_mode = avctx->aq_mode;
+ x4->params.rc.f_aq_strength = avctx->aq_strength;
+ x4->params.rc.i_lookahead = avctx->rc_lookahead;
+
+ x4->params.analyse.b_psy = avctx->flags2 & CODEC_FLAG2_PSY;
+ x4->params.analyse.f_psy_rd = avctx->psy_rd;
+ x4->params.analyse.f_psy_trellis = avctx->psy_trellis;
+
x4->params.analyse.i_me_range = avctx->me_range;
x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
@@ -272,6 +280,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
+ x4->params.analyse.b_ssim = avctx->flags & CODEC_FLAG2_SSIM;
x4->params.i_log_level = X264_LOG_DEBUG;
x4->params.b_aud = avctx->flags2 & CODEC_FLAG2_AUD;
@@ -291,10 +300,14 @@ static av_cold int X264_init(AVCodecContext *avctx)
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
x264_nal_t *nal;
- int nnal, s;
+ int nnal, s, i;
s = x264_encoder_headers(x4->enc, &nal, &nnal);
+ for (i = 0; i < nnal; i++)
+ if (nal[i].i_type == NAL_SEI)
+ av_log(avctx, AV_LOG_INFO, "%s\n", nal[i].p_payload+25);
+
avctx->extradata = av_malloc(s);
avctx->extradata_size = encode_nals(avctx, avctx->extradata, s, nal, nnal, 1);
}