From 49ec82b2090f87f9fd78cb82677ec72ce197f32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 18 Mar 2022 19:06:05 +0200 Subject: [PATCH] videocrop: Use GST_ROUND_DOWN_2 instead of re-defining a local version Part-of: --- subprojects/gst-plugins-good/gst/videocrop/gstvideocrop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/videocrop/gstvideocrop.c b/subprojects/gst-plugins-good/gst/videocrop/gstvideocrop.c index 1312976c11..c12809a68f 100644 --- a/subprojects/gst-plugins-good/gst/videocrop/gstvideocrop.c +++ b/subprojects/gst-plugins-good/gst/videocrop/gstvideocrop.c @@ -240,8 +240,6 @@ gst_video_crop_init (GstVideoCrop * vcrop) vcrop->crop_bottom = 0; } -#define ROUND_DOWN_2(n) ((n)&(~1)) - static void gst_video_crop_transform_packed_yvyu (GstVideoCrop * vcrop, GstVideoFrame * in_frame, GstVideoFrame * out_frame, gint x, gint y) @@ -265,7 +263,7 @@ gst_video_crop_transform_packed_yvyu (GstVideoCrop * vcrop, /* rounding down here so we end up at the start of a macro-pixel and not * in the middle of one */ - in_data += ROUND_DOWN_2 (vcrop->crop_left) * + in_data += GST_ROUND_DOWN_2 (vcrop->crop_left) * GST_VIDEO_FRAME_COMP_PSTRIDE (in_frame, 0); dx = width * GST_VIDEO_FRAME_COMP_PSTRIDE (out_frame, 0);