[FFmpeg-devel] [PATCH] x264 pure interlaced mode config
Limin Wang
lance.lmwang
Tue Jul 3 03:52:31 CEST 2007
Hi Loren,
> If you're going to add a h.264 specific interlace flag, it should
> distinguish between paff and mbaff. But that would only be useful
> if x264 supported both. Otherwise reuse CODEC_FLAG_INTERLACED_DCT.
Thanks, I want to enable mbaff interlace mode in x264, so reuse
CODEC_FLAG_INTERLACED_DCT is OK. Update the patch to use it.
By the way, how about to change some like below code in below way?
-x4->params.b_bframe_pyramid = (avctx->flags2 & CODEC_FLAG2_BPYRAMID);
+x4->params.b_bframe_pyramid = !!(avctx->flags2 & CODEC_FLAG2_BPYRAMID);
Thanks,
Limin
-------------- next part --------------
Index: libavcodec/libx264.c
===================================================================
--- libavcodec/libx264.c (revision 9463)
+++ libavcodec/libx264.c (working copy)
@@ -160,6 +160,7 @@
// we do it this way because we cannot check if the bitrate has been set
if(!(avctx->crf || (avctx->cqp > -1))) x4->params.rc.i_rc_method = X264_RC_ABR;
+ x4->params.b_interlaced = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
x4->params.i_bframe = avctx->max_b_frames;
x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
x4->params.b_bframe_adaptive = avctx->b_frame_strategy;
More information about the ffmpeg-devel
mailing list