hi jason,<div><br></div><div>no, i&#39;m not changing resolution mid flight.</div><div>i&#39;m doing several tests, with or without intra-refresh</div><div><br></div><div>still have not tried doing it directly with x264 as i am trying to </div>
<div>achieve a multi-codec support app</div><div><br clear="all">Kelvin Chua<br>
<br><br><div class="gmail_quote">On Mon, Apr 12, 2010 at 11:34 AM, Jason Garrett-Glaser <span dir="ltr">&lt;<a href="mailto:darkshikari@gmail.com">darkshikari@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sun, Apr 11, 2010 at 7:59 PM, Kelvin Chua &lt;<a href="mailto:kelchy@gmail.com">kelchy@gmail.com</a>&gt; wrote:<br>
&gt; i am currently doing a video telephony application via ffmpeg and<br>
&gt; encountered a SIGSEGV whenever i increase my resolution<br>
&gt; from QCIF to CIF or VGA.<br>
<br>
</div>What?  x264 doesn&#39;t support switching resolutions in mid-flight.<br>
<div><div></div><div class="h5"><br>
&gt; here is a backtrace:<br>
&gt; Program received signal SIGSEGV, Segmentation fault.<br>
&gt; [Switching to Thread 0xb0d77b70 (LWP 6549)]<br>
&gt; 0x01080b52 in x264_me_search_ref () from /usr/local/lib/libx264.so.83<br>
&gt; (gdb) bt<br>
&gt; #0  0x01080b52 in x264_me_search_ref () from /usr/local/lib/libx264.so.83<br>
&gt; #1  0x01077f60 in ?? () from /usr/local/lib/libx264.so.83<br>
&gt; #2  0x0107b049 in x264_macroblock_analyse () from<br>
&gt; /usr/local/lib/libx264.so.83<br>
&gt; #3  0x010a34f2 in ?? () from /usr/local/lib/libx264.so.83<br>
&gt; #4  0x010bf94b in ?? () from /usr/local/lib/libx264.so.83<br>
&gt; #5  0x0109d5fb in ?? () from /usr/local/lib/libx264.so.83<br>
&gt; #6  0x010a1441 in x264_encoder_encode () from /usr/local/lib/libx264.so.83<br>
&gt; #7  0x00539b47 in ?? () from /usr/local/lib/libavcodec.so.52<br>
&gt; #8  0x0806de81 in H264Encoder::EncodeFrame (this=0x8614498,<br>
&gt;     in=0xb0495008<br>
&gt; &quot;SSSTTTVVVWXXYYZZ[\\\\\\]]^^^__aaccdeeeefffggggfeefghijjjjkklll&quot;, &#39;m&#39;<br>
&gt; &lt;repeats 19 times&gt;, &quot;llkkkkllmmmmmmmm&quot;, &#39;l&#39; &lt;repeats 20 times&gt;,<br>
&gt; &quot;kkjjjjjjkklll&quot;, &#39;m&#39; &lt;repeats 13 times&gt;,<br>
&gt; &quot;nnoopooooooooonnmlkkkkkkkkkjjjjjjjj&quot;, &#39;k&#39; &lt;repeats 14 times&gt;,<br>
&gt; &quot;jjjjjjjkkkl&quot;..., len=460800)<br>
&gt; *H264Encoder::EncodeFrame is a function in my app<br>
&gt; here is my encoding parameters:<br>
&gt;         ctx-&gt;rc_max_rate        = (int) (((float)bitrate)*0.9/1000.0);<br>
&gt;         ctx-&gt;rc_min_rate        = ctx-&gt;rc_max_rate;<br>
&gt;         ctx-&gt;rc_buffer_size     = ctx-&gt;rc_max_rate;<br>
&gt;         ctx-&gt;intra_refresh      = 1;    //params.b_intra_refresh<br>
&gt;         ctx-&gt;sliced_threads     = 1;    //params.b_sliced_threads<br>
&gt;         ctx-&gt;me_range           = 16;    //analyse.i_me_range<br>
&gt;         ctx-&gt;qmin               = 10;   //rc.i_qp_min<br>
&gt;         ctx-&gt;qcompress          = 0.6;    //rc.f_qcompress<br>
&gt;         ctx-&gt;max_qdiff          = 12;    //rc.i_qp_step<br>
&gt;         ctx-&gt;b_quant_factor     = 1.3; //minimum 1.26 params.rc.f_pb_factor<br>
&gt;         ctx-&gt;i_quant_factor     = 1.4; //minimum 0.78<br>
&gt; 1/params.rc.f_ip_factor<br>
&gt;         ctx-&gt;max_b_frames       = 0;    //params.i_bframe<br>
&gt;         ctx-&gt;keyint_min         = 10;   //min-keyint<br>
&gt;         ctx-&gt;coder_type         = 0;    //params.b_cabac<br>
&gt;         ctx-&gt;gop_size           = 60;   //keyint or keyint_max<br>
&gt;         ctx-&gt;b_annexb           = 0;    //disable start code prefix<br>
&gt;         ctx-&gt;level              = 30;<br>
&gt;         ctx-&gt;rtp_payload_size   = MTU-100; //params.i_slice_max_size<br>
&gt;         ctx-&gt;weighted_p_pred    = 0;    //params.analyse.i_weighted_pred<br>
&gt;         ctx-&gt;directpred         = 1;    //params.analyse.i_direct_mv_pred<br>
&gt;         ctx-&gt;flags |= CODEC_FLAG_PASS1;                 //PASS1<br>
&gt;         ctx-&gt;flags &amp;= ~CODEC_FLAG_4MV;                  //advanced<br>
&gt; prediction<br>
&gt; whenever i disable b_intra_refresh, everything works perfectly. however i<br>
&gt; wanted to enable<br>
&gt; intra_refresh as i see a huge performance boost with it on QCIF resolution.<br>
&gt; especially on a lossy network.<br>
&gt; Kelvin Chua<br>
<br>
</div></div>Have you tried using libx264 directly instead of through libavcodec?<br>
We don&#39;t generally support using libx264 through libavcodec as it has<br>
a history of causing all kinds of problems (and it&#39;s also a big<br>
hassle).<br>
<br>
Dark Shikari<br>
_______________________________________________<br>
x264-devel mailing list<br>
<a href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/x264-devel" target="_blank">http://mailman.videolan.org/listinfo/x264-devel</a><br>
</blockquote></div><br></div>