videoenc: use GST_ROUND_UP_N() macro

Makes the code much easier to read and understand.

https://bugzilla.gnome.org/show_bug.cgi?id=781409
This commit is contained in:
Guillaume Desmottes 2017-04-17 17:02:48 +02:00 committed by Tim-Philipp Müller
parent cbd375ce71
commit 623d2df5a3

View file

@ -1053,8 +1053,7 @@ gst_omx_video_enc_set_format (GstVideoEncoder * encoder,
port_def.format.video.nFrameWidth = info->width;
if (port_def.nBufferAlignment)
port_def.format.video.nStride =
(info->width + port_def.nBufferAlignment - 1) &
(~(port_def.nBufferAlignment - 1));
GST_ROUND_UP_N (info->width, port_def.nBufferAlignment);
else
port_def.format.video.nStride = GST_ROUND_UP_4 (info->width); /* safe (?) default */