[x264-devel] Issue with lookahead when encoding (Android)
Wazar Apps
wazarapps at gmail.com
Sat Jan 5 14:16:53 CET 2013
Hello
I have compiled FFMPEG with x264 (v129) on Android and I am using the
encoder to encode frames to a video file. I am using the following call to
encode frames (as I decode them from another file):
*out_size = avcodec_encode_video2(gVideoWriteCodecCtx, &writePkt,
pCurrentFrame, &gotPacket);*
The first few frames get buffered and on the 14th a call is made to
lookahead_get_frames(). On slice type_decide, the following code is
executed:
*frames[0] = h->lookahead->last_nonb;*
*memcpy( &frames[1], h->lookahead->next.list, (bframes+1) * sizeof(
x264_frame_t*) );*
*if( IS_X264_TYPE_I( h->lookahead->next.list[bframes]->i_type ) )*
* p0 = bframes + 1;*
*else // P*
* p0 = 0;*
Here, *h->lookahead->last_nonb* is null. As a consequence, in
x264_slicetype_frame_cost I get a SIGSEGV in x264_weights_analyse (ref is
null)
*static void x264_weights_analyse( x264_t *h, x264_frame_t *fenc,
x264_frame_t *ref, int b_lookahead )*
*{*
* int i_delta_index = fenc->i_frame - ref->i_frame - 1;*
Shouldn't *last_nonb* have been set before this call? for example with
x264_lookahead_update_last_nonb(
h, h->lookahead->next.list[0] ); that is called in lookahead.c just after
slicetype_decide?
Thanks
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20130105/1b3fb6d2/attachment.html>
More information about the x264-devel
mailing list