GNOME Bugzilla – Bug 532454
[NV12/NV21] videotestsrc and ffmpegcolorspace don't play well with each other
Last modified: 2008-05-22 18:29:59 UTC
Hi, currently the NV12/NV21 produced by videotestsrc seems to be wrong or the conversions in ffmpegcolorspace: gst-launch-0.10 -v videotestsrc ! "video/x-raw-yuv,width=320,height=240,format=(fourcc)NV12" ! ffmpegcolorspace ! "video/x-raw-rgb,bpp=32,depth=24" ! ximagesink This shows wrong colors at the borders of the various colored bars. The strides used by both elements are the same and I think it's videotestsrc's fault here: ==19175== Invalid write of size 1 ==19175== at 0x4A8876A: splat_u8_ref (splat.c:87) ==19175== by 0x40D9581: paint_hline_NV12_NV21 (videotestsrc.c:1080) ==19175== by 0x40D87F2: gst_video_test_src_smpte (videotestsrc.c:684) ==19175== by 0x40D7479: gst_video_test_src_create (gstvideotestsrc.c:582) ==19175== by 0x4A33054: gst_push_src_create (gstpushsrc.c:117) ==19175== by 0x4A24634: gst_base_src_get_range (gstbasesrc.c:1818) ==19175== by 0x4A2845D: gst_base_src_loop (gstbasesrc.c:2060) ==19175== by 0x40937D2: gst_task_func (gsttask.c:192) ==19175== by 0x419812A: g_thread_pool_thread_proxy (gthreadpool.c:265) ==19175== by 0x41964FE: g_thread_create_proxy (gthread.c:635) ==19175== by 0x41F4FD2: start_thread (pthread_create.c:297) ==19175== by 0x42CBA8D: clone (in /usr/lib/debug/libc-2.7.so)
Also crashes for odd heights it seems...only things valgrind complains about are when splatting the U and V in paint_hline_NV12_NV21.
When using odd widths it doesn't crash but valgrind complains about using uninitialized memory in nv12_to_rgb32, probably caused by videotestsrc too.
Created attachment 111343 [details] [review] fixes the color's
Great, thanks :) 2008-05-22 Sebastian Dröge <slomo@circular-chaos.org> Patch by: Thijs Vermeir <thijsvermeir@gmail.com> * gst/videotestsrc/videotestsrc.c: (paint_hline_NV12_NV21): Fix generation of NV12/NV21 frames. Fixes bug #532454.