summaryrefslogtreecommitdiffstats
path: root/thirdparties/patches/ffmpeg_libx24_svn.patch
blob: b9cf08950b5b85b278a1b2f6cfa76a521a7c17d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Index: libx264.c
===================================================================
--- libx264.c	(revision 24652)
+++ libx264.c	(working copy)
@@ -100,7 +100,14 @@
         }
 
         x4->pic.i_pts  = frame->pts;
-        x4->pic.i_type = X264_TYPE_AUTO;
+
+		// by MDI
+		if(frame->pict_type == FF_I_TYPE){
+			x4->pic.i_type = X264_TYPE_IDR;
+		}
+		else{
+			x4->pic.i_type = X264_TYPE_AUTO;
+		}
     }
 
     do {
@@ -153,7 +160,8 @@
     X264Context *x4 = avctx->priv_data;
 
     x4->sei_size = 0;
-    x264_param_default(&x4->params);
+    x264_param_default_preset(&x4->params, "veryfast", "zerolatency"); // By MDI
+	//x264_param_default(&x4->params);
 
     x4->params.pf_log               = X264_log;
     x4->params.p_log_private        = avctx;
@@ -164,6 +172,12 @@
     x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
     x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate    / 1000;
     x4->params.rc.b_stat_write      = avctx->flags & CODEC_FLAG_PASS1;
+
+	// --by MDI begin
+	//x4->params.i_slice_max_size     = 1350;
+    //x4->params.rc.i_lookahead       = 0; 
+	// --by MDI end
+
     if (avctx->flags & CODEC_FLAG_PASS2) {
         x4->params.rc.b_stat_read = 1;
     } else {
OpenPOWER on IntegriCloud