]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/x264.c
vc1_split should be static
[ffmpeg] / libavcodec / x264.c
index 009cc97471de7d817ecc6a8e12438b405830338d..c9df820f5d851fbcf14acb779086ceb600e05d17 100644 (file)
@@ -66,7 +66,7 @@ encode_nals(uint8_t *buf, int size, x264_nal_t *nals, int nnal)
     return p - buf;
 }
 
-extern int
+static int
 X264_frame(AVCodecContext *ctx, uint8_t *buf, int bufsize, void *data)
 {
     X264Context *x4 = ctx->priv_data;
@@ -79,13 +79,13 @@ X264_frame(AVCodecContext *ctx, uint8_t *buf, int bufsize, void *data)
     x4->pic.img.i_plane = 3;
 
     if (frame) {
-    for(i = 0; i < 3; i++){
-        x4->pic.img.plane[i] = frame->data[i];
-        x4->pic.img.i_stride[i] = frame->linesize[i];
-    }
+        for(i = 0; i < 3; i++){
+            x4->pic.img.plane[i] = frame->data[i];
+            x4->pic.img.i_stride[i] = frame->linesize[i];
+        }
 
-    x4->pic.i_pts = frame->pts;
-    x4->pic.i_type = X264_TYPE_AUTO;
+        x4->pic.i_pts = frame->pts;
+        x4->pic.i_type = X264_TYPE_AUTO;
     }
 
     if(x264_encoder_encode(x4->enc, &nal, &nnal, frame? &x4->pic: NULL,
@@ -130,7 +130,7 @@ X264_close(AVCodecContext *avctx)
     return 0;
 }
 
-extern int
+static int
 X264_init(AVCodecContext *avctx)
 {
     X264Context *x4 = avctx->priv_data;
@@ -225,6 +225,7 @@ X264_init(AVCodecContext *avctx)
     x4->params.analyse.i_me_range = avctx->me_range;
     x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
 
+    x4->params.analyse.b_bidir_me = (avctx->bidir_refine > 0);
     x4->params.analyse.b_bframe_rdo = (avctx->flags2 & CODEC_FLAG2_BRDO);
     x4->params.analyse.b_mixed_references =
         (avctx->flags2 & CODEC_FLAG2_MIXED_REFS);