bayer2rgb: Fold src_stride into gst_bayer2rgb_process()

The source stride parameter can be easily obtained from GstBayer2RGB
structure, do it within gst_bayer2rgb_process() and drop the parameter.
No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
This commit is contained in:
Marek Vasut 2023-05-20 21:43:13 +02:00
parent ddcb45ffc0
commit 8bec6828f4

View file

@ -386,8 +386,9 @@ typedef void (*process_func) (guint8 * d0, const guint8 * s0, const guint8 * s1,
static void static void
gst_bayer2rgb_process (GstBayer2RGB * bayer2rgb, uint8_t * dest, gst_bayer2rgb_process (GstBayer2RGB * bayer2rgb, uint8_t * dest,
int dest_stride, uint8_t * src, int src_stride) int dest_stride, uint8_t * src)
{ {
const int src_stride = GST_ROUND_UP_4 (bayer2rgb->width);
int j; int j;
guint8 *tmp; guint8 *tmp;
process_func merge[2] = { NULL, NULL }; process_func merge[2] = { NULL, NULL };
@ -472,8 +473,7 @@ gst_bayer2rgb_transform (GstBaseTransform * base, GstBuffer * inbuf,
} }
output = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0); output = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0);
gst_bayer2rgb_process (filter, output, frame.info.stride[0], gst_bayer2rgb_process (filter, output, frame.info.stride[0], map.data);
map.data, GST_ROUND_UP_4 (filter->width));
gst_video_frame_unmap (&frame); gst_video_frame_unmap (&frame);
gst_buffer_unmap (inbuf, &map); gst_buffer_unmap (inbuf, &map);