mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
videotestsrc: fix 10 bits formats
We need to check the number of bits of the unpack format when we prepare the pixels for the pack function.
This commit is contained in:
parent
be369ff630
commit
fec11c7809
1 changed files with 5 additions and 2 deletions
|
@ -1133,11 +1133,14 @@ paint_tmpline_AYUV (paintinfo * p, int x, int w)
|
||||||
static void
|
static void
|
||||||
convert_hline_generic (paintinfo * p, GstVideoFrame * frame, int y)
|
convert_hline_generic (paintinfo * p, GstVideoFrame * frame, int y)
|
||||||
{
|
{
|
||||||
const GstVideoFormatInfo *finfo = frame->info.finfo;
|
const GstVideoFormatInfo *finfo, *uinfo;
|
||||||
gint i, width = GST_VIDEO_FRAME_WIDTH (frame);
|
gint i, width = GST_VIDEO_FRAME_WIDTH (frame);
|
||||||
gpointer src;
|
gpointer src;
|
||||||
|
|
||||||
if (GST_VIDEO_FORMAT_INFO_DEPTH (finfo, 0) == 16) {
|
finfo = frame->info.finfo;
|
||||||
|
uinfo = gst_video_format_get_info (finfo->unpack_format);
|
||||||
|
|
||||||
|
if (GST_VIDEO_FORMAT_INFO_DEPTH (uinfo, 0) == 16) {
|
||||||
/* 16 bits */
|
/* 16 bits */
|
||||||
for (i = 0; i < width; i++) {
|
for (i = 0; i < width; i++) {
|
||||||
p->tmpline_u16[i * 4 + 0] = TO_16 (p->tmpline[i * 4 + 0]);
|
p->tmpline_u16[i * 4 + 0] = TO_16 (p->tmpline[i * 4 + 0]);
|
||||||
|
|
Loading…
Reference in a new issue