diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-05-28 13:54:14 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-05-28 13:54:14 +0200 |
commit | 83fc39ccff50b2d6071650e4300f1239ef23f0c0 (patch) | |
tree | 93fa621e339528c52c0c4e869dec8eb0064c9dc5 /gst/videomixer/blend_i420.c | |
parent | 699b696db8dfa17db3f3fe34b19ea1722420e024 (diff) |
videomixer: Some cleanup and fix the calculation of the frame size in bytes
Diffstat (limited to 'gst/videomixer/blend_i420.c')
-rw-r--r-- | gst/videomixer/blend_i420.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/videomixer/blend_i420.c b/gst/videomixer/blend_i420.c index 85ce53d5..08b5f9fe 100644 --- a/gst/videomixer/blend_i420.c +++ b/gst/videomixer/blend_i420.c @@ -316,3 +316,10 @@ gst_videomixer_fill_i420_color (guint8 * dest, gint width, gint height, memset (dest + VIDEO_V_OFFSET (width, height), colV, size); } + +size_t +gst_videomixer_calculate_frame_size_i420 (gint width, gint height) +{ + return GST_ROUND_UP_4 (width) * GST_ROUND_UP_2 (height) + + 2 * (GST_ROUND_UP_8 (width) / 2) * (GST_ROUND_UP_2 (height) / 2); +} |