summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2017-04-17 17:02:48 +0200
committerTim-Philipp Müller <tim@centricular.com>2017-04-26 15:37:41 +0100
commit623d2df5a3199b1d42208c7e9be5d237095fd4c5 (patch)
tree30f5e16a3b89e724f92fbcbcbc7bdd4936ce9120
parentcbd375ce7102a087532b4f2fd2de3e9033ea7613 (diff)
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
-rw-r--r--omx/gstomxvideoenc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index 083be6a..c54d8a7 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 */