Changeset 790:db0b1a806f4a in mediastreamer2
- Timestamp:
- Dec 2, 2009 4:49:37 PM (3 years ago)
- Branch:
- default
- Location:
- linphone/mediastreamer2/plugins/msx264
- Files:
-
- 4 edited
-
NEWS (modified) (1 diff)
-
README (modified) (2 diffs)
-
configure.ac (modified) (2 diffs)
-
src/msx264.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linphone/mediastreamer2/plugins/msx264/NEWS
r525 r790 1 Wednesday December 2, 2009: msx264-1.3.0 2 - use new official x264 support of multislicing (forked version no more required) 3 1 4 Friday July 4, 2009 : msx264-1.2.0 2 5 - modified to compile against new multisliced version of x264 to allow packetization-mode=0 -
linphone/mediastreamer2/plugins/msx264/README
r525 r790 2 2 It is based on ffmpeg for decoding and x264 for encoding. 3 3 4 It works with any version of x264. However if you want better performance and interroperability, it is 5 highly recommended to use the modified multiscling-enabled x264 available from linphone.org. 6 This patch enables multi-slicing, ie smaller video packets that fit into the network mtu. 7 It enables RFC3984 packetization-mode=0 to work. 8 You can download this special x264 here: 9 http://download.savannah.gnu.org/releases/linphone/plugins/sources/x264-snapshot-20090704-linphone-org.tar.gz 4 It works with x264 version later to september 2009. 5 So: 10 6 11 So: 12 * compile x264-snapshot-20090704-linphone-org.tar.gz with ./configure && make && make install 13 * compile msx264 with ./configure --enable-hacked-x264 && make && make install 7 * compile msx264 with ./configure && make && make install 14 8 15 9 … … 20 14 The linphone.org version of x264 was inspired by a patch submitted on x264-devel mailing list: 21 15 http://mailman.videolan.org/pipermail/x264-devel/2008-April/004427.html 16 http://download.savannah.gnu.org/releases/linphone/plugins/sources/x264-snapshot-20090704-linphone-org.tar.gz 17 This version is no more required since in august 2009, x264 team introduces new parameters 18 controlling slicing. -
linphone/mediastreamer2/plugins/msx264/configure.ac
r584 r790 1 1 dnl Process this file with autoconf to produce a configure script. 2 AC_INIT([msx264],[1. 2.0])2 AC_INIT([msx264],[1.3.0]) 3 3 4 4 AM_INIT_AUTOMAKE([tar-ustar]) … … 61 61 PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.1.0) 62 62 63 PKG_CHECK_MODULES(X264, x264 >= 0. 58.0)63 PKG_CHECK_MODULES(X264, x264 >= 0.67.0) 64 64 65 AC_ARG_ENABLE(hacked-x264,66 [ --enable-hacked-x264 Turn on compilation over a patched x264 that allows multislicing [default=no]],67 [hacked_x264=$enableval],68 [hacked_x264=no]69 )70 65 71 66 dnl test for ffmpeg presence -
linphone/mediastreamer2/plugins/msx264/src/msx264.c
r699 r790 71 71 EncData *d=(EncData*)f->data; 72 72 x264_param_t params; 73 73 74 rfc3984_init(&d->packer); 74 75 rfc3984_set_mode(&d->packer,d->mode); 75 76 rfc3984_enable_stap_a(&d->packer,FALSE); 77 76 78 x264_param_default(¶ms); 79 params.i_threads=1; 80 params.i_sync_lookahead=0; 77 81 params.i_width=d->vsize.width; 78 82 params.i_height=d->vsize.height; 79 83 params.i_fps_num=(int)d->fps; 80 84 params.i_fps_den=1; 81 #ifdef HACKED_X264 82 ms_message("Lucky guy, you have a hacked x264 lib that allows multislicing !"); 83 params.i_max_nalu_size=ms_get_payload_max_size()-100; /*-100 security margin*/ 84 #endif 85 params.i_slice_max_size=ms_get_payload_max_size()-100; /*-100 security margin*/ 85 86 /*params.i_level_idc=30;*/ 87 86 88 params.rc.i_rc_method = X264_RC_ABR; 87 89 params.rc.i_bitrate=(int)( ( ((float)d->bitrate)*0.8)/1000.0); … … 90 92 params.rc.i_vbv_buffer_size=params.rc.i_vbv_max_bitrate; 91 93 params.rc.f_vbv_buffer_init=0.5; 94 params.rc.i_lookahead=0; 92 95 /*enable this by config ?*/ 93 96 /* … … 109 112 for (i=0;i<num_nals;++i){ 110 113 m=allocb(xnals[i].i_payload+10,0); 111 /* 112 x264_nal_encode(m->b_wptr, &bytes, 0, &xnals[i] ); 113 m->b_wptr+=bytes; 114 */ 115 *m->b_wptr=( 0x00 << 7 ) | ( xnals[i].i_ref_idc << 5 ) | xnals[i].i_type; 116 m->b_wptr++; 117 memcpy(m->b_wptr,xnals[i].p_payload,xnals[i].i_payload); 118 m->b_wptr+=xnals[i].i_payload; 114 115 memcpy(m->b_wptr,xnals[i].p_payload+4,xnals[i].i_payload-4); 116 m->b_wptr+=xnals[i].i_payload-4; 119 117 if (xnals[i].i_type==7) { 120 118 ms_message("A SPS is being sent."); … … 150 148 xpic.i_qpplus1=0; 151 149 xpic.i_pts=d->framenum; 150 xpic.param=NULL; 152 151 xpic.img.i_csp=X264_CSP_I420; 153 152 xpic.img.i_plane=3; … … 160 159 xpic.img.plane[2]=pic.planes[2]; 161 160 xpic.img.plane[3]=0; 162 if (x264_encoder_encode(d->enc,&xnals,&num_nals,&xpic,&oxpic) ==0){161 if (x264_encoder_encode(d->enc,&xnals,&num_nals,&xpic,&oxpic)>=0){ 163 162 x264_nals_to_msgb(xnals,num_nals,&nalus); 164 163 rfc3984_pack(&d->packer,&nalus,f->outputs[0],ts); … … 270 269 .id=MS_FILTER_PLUGIN_ID, 271 270 .name="MSX264Enc", 272 #ifdef HACKED_X264273 271 .text="A H264 encoder based on x264 project (with multislicing enabled)", 274 #else275 .text="A H264 encoder based on x264 project.",276 #endif277 272 .category=MS_FILTER_ENCODER, 278 273 .enc_fmt="H264",
Note: See TracChangeset
for help on using the changeset viewer.
