mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
d3d11converter: Simplify private struct ctor
Initialize transform matrix using memcpy Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5580>
This commit is contained in:
parent
e134cd8e09
commit
0e9fdabb1b
1 changed files with 2 additions and 10 deletions
|
@ -264,16 +264,8 @@ struct _GstD3D11ConverterPrivate
|
||||||
{
|
{
|
||||||
_GstD3D11ConverterPrivate ()
|
_GstD3D11ConverterPrivate ()
|
||||||
{
|
{
|
||||||
for (guint i = 0; i < 4; i++)
|
G_STATIC_ASSERT (sizeof (custom_transform) == sizeof (g_matrix_identity));
|
||||||
{
|
memcpy (custom_transform, g_matrix_identity, sizeof (g_matrix_identity));
|
||||||
for (guint j = 0; j < 4; j++)
|
|
||||||
{
|
|
||||||
if (i == j)
|
|
||||||
custom_transform[i * 4 + j] = 1.0;
|
|
||||||
else
|
|
||||||
custom_transform[i * 4 + j] = 0.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~_GstD3D11ConverterPrivate ()
|
~_GstD3D11ConverterPrivate ()
|
||||||
|
|
Loading…
Reference in a new issue