hi jason,<div><br></div><div>no, i'm not changing resolution mid flight.</div><div>i'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"><<a href="mailto:darkshikari@gmail.com">darkshikari@gmail.com</a>></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 <<a href="mailto:kelchy@gmail.com">kelchy@gmail.com</a>> wrote:<br>
> i am currently doing a video telephony application via ffmpeg and<br>
> encountered a SIGSEGV whenever i increase my resolution<br>
> from QCIF to CIF or VGA.<br>
<br>
</div>What? x264 doesn't support switching resolutions in mid-flight.<br>
<div><div></div><div class="h5"><br>
> here is a backtrace:<br>
> Program received signal SIGSEGV, Segmentation fault.<br>
> [Switching to Thread 0xb0d77b70 (LWP 6549)]<br>
> 0x01080b52 in x264_me_search_ref () from /usr/local/lib/libx264.so.83<br>
> (gdb) bt<br>
> #0 0x01080b52 in x264_me_search_ref () from /usr/local/lib/libx264.so.83<br>
> #1 0x01077f60 in ?? () from /usr/local/lib/libx264.so.83<br>
> #2 0x0107b049 in x264_macroblock_analyse () from<br>
> /usr/local/lib/libx264.so.83<br>
> #3 0x010a34f2 in ?? () from /usr/local/lib/libx264.so.83<br>
> #4 0x010bf94b in ?? () from /usr/local/lib/libx264.so.83<br>
> #5 0x0109d5fb in ?? () from /usr/local/lib/libx264.so.83<br>
> #6 0x010a1441 in x264_encoder_encode () from /usr/local/lib/libx264.so.83<br>
> #7 0x00539b47 in ?? () from /usr/local/lib/libavcodec.so.52<br>
> #8 0x0806de81 in H264Encoder::EncodeFrame (this=0x8614498,<br>
> in=0xb0495008<br>
> "SSSTTTVVVWXXYYZZ[\\\\\\]]^^^__aaccdeeeefffggggfeefghijjjjkklll", 'm'<br>
> <repeats 19 times>, "llkkkkllmmmmmmmm", 'l' <repeats 20 times>,<br>
> "kkjjjjjjkklll", 'm' <repeats 13 times>,<br>
> "nnoopooooooooonnmlkkkkkkkkkjjjjjjjj", 'k' <repeats 14 times>,<br>
> "jjjjjjjkkkl"..., len=460800)<br>
> *H264Encoder::EncodeFrame is a function in my app<br>
> here is my encoding parameters:<br>
> ctx->rc_max_rate = (int) (((float)bitrate)*0.9/1000.0);<br>
> ctx->rc_min_rate = ctx->rc_max_rate;<br>
> ctx->rc_buffer_size = ctx->rc_max_rate;<br>
> ctx->intra_refresh = 1; //params.b_intra_refresh<br>
> ctx->sliced_threads = 1; //params.b_sliced_threads<br>
> ctx->me_range = 16; //analyse.i_me_range<br>
> ctx->qmin = 10; //rc.i_qp_min<br>
> ctx->qcompress = 0.6; //rc.f_qcompress<br>
> ctx->max_qdiff = 12; //rc.i_qp_step<br>
> ctx->b_quant_factor = 1.3; //minimum 1.26 params.rc.f_pb_factor<br>
> ctx->i_quant_factor = 1.4; //minimum 0.78<br>
> 1/params.rc.f_ip_factor<br>
> ctx->max_b_frames = 0; //params.i_bframe<br>
> ctx->keyint_min = 10; //min-keyint<br>
> ctx->coder_type = 0; //params.b_cabac<br>
> ctx->gop_size = 60; //keyint or keyint_max<br>
> ctx->b_annexb = 0; //disable start code prefix<br>
> ctx->level = 30;<br>
> ctx->rtp_payload_size = MTU-100; //params.i_slice_max_size<br>
> ctx->weighted_p_pred = 0; //params.analyse.i_weighted_pred<br>
> ctx->directpred = 1; //params.analyse.i_direct_mv_pred<br>
> ctx->flags |= CODEC_FLAG_PASS1; //PASS1<br>
> ctx->flags &= ~CODEC_FLAG_4MV; //advanced<br>
> prediction<br>
> whenever i disable b_intra_refresh, everything works perfectly. however i<br>
> wanted to enable<br>
> intra_refresh as i see a huge performance boost with it on QCIF resolution.<br>
> especially on a lossy network.<br>
> Kelvin Chua<br>
<br>
</div></div>Have you tried using libx264 directly instead of through libavcodec?<br>
We don't generally support using libx264 through libavcodec as it has<br>
a history of causing all kinds of problems (and it'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>