Mercurial > libavcodec.hg
diff libx264.c @ 11538:9beb570426f4 libavcodec
Enable more libx264 options, aq, psy, rc lookahead and ssim
author | bcoudurier |
---|---|
date | Thu, 25 Mar 2010 19:25:21 +0000 |
parents | b2ea6b0d17bf |
children | 8a4984c5cacc |
line wrap: on
line diff
--- a/libx264.c Wed Mar 24 17:09:21 2010 +0000 +++ b/libx264.c Thu Mar 25 19:25:21 2010 +0000 @@ -242,6 +242,14 @@ 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 @@ 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 @@ 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); }