After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 532454 - [NV12/NV21] videotestsrc and ffmpegcolorspace don't play well with each other
[NV12/NV21] videotestsrc and ffmpegcolorspace don't play well with each other
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-10 08:34 UTC by Sebastian Dröge (slomo)
Modified: 2008-05-22 18:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes the color's (959 bytes, patch)
2008-05-22 14:44 UTC, Thijs Vermeir
committed Details | Review

Description Sebastian Dröge (slomo) 2008-05-10 08:34:26 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)
Comment 1 Sebastian Dröge (slomo) 2008-05-10 08:53:01 UTC
Also crashes for odd heights it seems...only things valgrind complains about are when splatting the U and V in paint_hline_NV12_NV21.
Comment 2 Sebastian Dröge (slomo) 2008-05-10 08:55:49 UTC
When using odd widths it doesn't crash but valgrind complains about using uninitialized memory in nv12_to_rgb32, probably caused by videotestsrc too.
Comment 3 Thijs Vermeir 2008-05-22 14:44:57 UTC
Created attachment 111343 [details] [review]
fixes the color's
Comment 4 Sebastian Dröge (slomo) 2008-05-22 18:29:59 UTC
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.