Hi, On Mon, Jun 13, 2011 at 9:49 PM, Eric Glaser <[email protected]> wrote: > On Sun, Jun 12, 2011 at 7:13 PM, Tristan Matthews > <[email protected]> wrote: >> 2011/6/12 Ronald S. Bultje <[email protected]> >>> >>> Hi, >>> >>> On Sun, Jun 12, 2011 at 1:56 PM, Eric Glaser <[email protected]> wrote: >>> > Hi, I am having some trouble converting from YUYV to RGB format - it >>> > crashes in sws_scale. >>> >>> Can you provide a backtrace? >>> >>> > int numRGBBytes = ww * hh * 4; //src width * src height * 4 >>> > buffer = malloc (sizeof(uint8_t)*numRGBBytes); >>> >>> Use av_malloc(), malloc() return values are not aligned and crash >>> randomly when using SIMD functions. >> >> libavcodec/api-example.c uses malloc in a similar context, instead of >> av_malloc. Should this be updated? >> >> -T >> >>> >>> > int ret = sws_scale(pOGLContext->img_convert_ctx, >>> > (uint8_t**)pFrame->data, pFrame->linesize, 0, hh, pFrameRGB->data, >>> > pFrameRGB->linesize); >>> >>> So here it crashes? That's likely in the runtime-generated MMX code >>> then. Again, can you provide a backtrace, and then the output (in gdb) >>> "disass $pc-32,$pc+32" and "info all-registers". >>> >>> Ronald >>> _______________________________________________ >>> libav-api mailing list >>> [email protected] >>> https://lists.libav.org/mailman/listinfo/libav-api >> >> >> >> -- >> Tristan Matthews >> web: http://tristanswork.blogspot.com >> > > Hi Thanks for replying. > > It crashes inside libswscale function - but I noticed sometimes it > goes thru however nothing but some garbled pixels show up on the > screen. It might be my v4l reader not providing valid data. Resolution > is 720 x 576, format YUYV. > > (gdb) bt > #0 0x00007ffff005d4f0 in ?? () from /usr/local/lib/libswscale.so.0 > #1 0x00007ffff0060f5a in ?? () from /usr/local/lib/libswscale.so.0 > #2 0x00007ffff0063987 in sws_scale () from /usr/local/lib/libswscale.so.0
Can you try to compile ffmpeg with debug symbols, and possibly with CFLAGS="-fno-omit-frame-pointer -O0"? That makes debugging easier. Thanks, Ronald _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
