1 |
aballier 09/10/26 12:51:21 |
2 |
|
3 |
Added: transcode-1.1.4-x264.patch |
4 |
Log: |
5 |
Add a patch to fix build/runtime with latest x264 |
6 |
(Portage version: 2.2_rc46/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-video/transcode/files/transcode-1.1.4-x264.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/transcode/files/transcode-1.1.4-x264.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-video/transcode/files/transcode-1.1.4-x264.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: transcode-1.1.4-x264.patch |
15 |
=================================================================== |
16 |
Upstream status: Mailed to Francesco on 26/10/2009 |
17 |
|
18 |
Index: transcode-1.1.4/encode/encode_x264.c |
19 |
=================================================================== |
20 |
--- transcode-1.1.4.orig/encode/encode_x264.c |
21 |
+++ transcode-1.1.4/encode/encode_x264.c |
22 |
@@ -166,7 +166,11 @@ static TCConfigEntry conf[] ={ |
23 |
/* How often B-frames are used */ |
24 |
OPT_RANGE(i_bframe_bias, "b_bias", -90, 100) |
25 |
/* Keep some B-frames as references */ |
26 |
+#if X264_BUILD >= 78 |
27 |
+ OPT_RANGE(i_bframe_pyramid, "b_pyramid", 0, 2) |
28 |
+#else |
29 |
OPT_FLAG (b_bframe_pyramid, "b_pyramid") |
30 |
+#endif |
31 |
|
32 |
/* Use deblocking filter */ |
33 |
OPT_FLAG (b_deblocking_filter, "deblock") |
34 |
@@ -949,7 +953,11 @@ static int x264_encode_video(TCModuleIns |
35 |
* done? */ |
36 |
pic.i_pts = (int64_t) pd->framenum * pd->x264params.i_fps_den; |
37 |
|
38 |
+#if X264_BUILD >= 76 |
39 |
+ if (x264_encoder_encode(pd->enc, &nal, &nnal, &pic, &pic_out) < 0) { |
40 |
+#else |
41 |
if (x264_encoder_encode(pd->enc, &nal, &nnal, &pic, &pic_out) != 0) { |
42 |
+#endif |
43 |
return TC_ERROR; |
44 |
} |
45 |
|
46 |
@@ -962,6 +970,10 @@ static int x264_encode_video(TCModuleIns |
47 |
tc_log_error(MOD_NAME, "output buffer overflow"); |
48 |
return TC_ERROR; |
49 |
} |
50 |
+#if X264_BUILD >= 76 |
51 |
+ memcpy(outframe->video_buf + outframe->video_len, nal[i].p_payload, nal[i].i_payload); |
52 |
+ outframe->video_len += nal[i].i_payload; |
53 |
+#else |
54 |
ret = x264_nal_encode(outframe->video_buf + outframe->video_len, |
55 |
&size, 1, &nal[i]); |
56 |
if (ret < 0 || size > outframe->video_size - outframe->video_len) { |
57 |
@@ -969,6 +981,7 @@ static int x264_encode_video(TCModuleIns |
58 |
break; |
59 |
} |
60 |
outframe->video_len += size; |
61 |
+#endif |
62 |
} |
63 |
|
64 |
/* FIXME: ok, that sucks. How to reformat it ina better way? -- fromani */ |