From 623d2df5a3199b1d42208c7e9be5d237095fd4c5 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 17 Apr 2017 17:02:48 +0200 Subject: [PATCH] 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 --- omx/gstomxvideoenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index 083be6ad14..c54d8a78e0 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -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 */