niimaqdxsrc: use depth instead of bpp to correctly calculate stride
This commit is contained in:
parent
acbe262ed6
commit
87490ce952
@ -225,7 +225,7 @@ gst_niimaqdxsrc_pixel_format_from_caps (const GstCaps * caps, int *endianness)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
gst_niimaqdxsrc_pixel_format_get_bpp (const char *pixel_format, int endianness)
|
gst_niimaqdxsrc_pixel_format_get_depth (const char *pixel_format, int endianness)
|
||||||
{
|
{
|
||||||
ImaqDxCapsInfo *info =
|
ImaqDxCapsInfo *info =
|
||||||
gst_niimaqdxsrc_get_caps_info (pixel_format, endianness);
|
gst_niimaqdxsrc_get_caps_info (pixel_format, endianness);
|
||||||
@ -233,14 +233,14 @@ gst_niimaqdxsrc_pixel_format_get_bpp (const char *pixel_format, int endianness)
|
|||||||
if (!info)
|
if (!info)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return info->bpp;
|
return info->depth;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
gst_niimaqdxsrc_pixel_format_get_stride (const char *pixel_format,
|
gst_niimaqdxsrc_pixel_format_get_stride (const char *pixel_format,
|
||||||
int endianness, int width)
|
int endianness, int width)
|
||||||
{
|
{
|
||||||
return width * gst_niimaqdxsrc_pixel_format_get_bpp (pixel_format,
|
return width * gst_niimaqdxsrc_pixel_format_get_depth (pixel_format,
|
||||||
endianness) / 8;
|
endianness) / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user