[vlc-devel] [PATCH 3/4] vout: win32: add a function to set the planes of a picture from the raw values
Steve Lhomme
robux4 at videolabs.io
Fri Feb 10 15:12:20 CET 2017
---
modules/video_output/win32/common.c | 12 ++++++++++++
modules/video_output/win32/common.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index f2b97b8..3b7e84b 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -438,6 +438,18 @@ void CommonDisplay(vout_display_t *vd)
}
#endif
+void picture_SetPlanes(picture_t *picture, uint8_t **planes, unsigned *pitches,
+ unsigned *heights)
+{
+ for (int n = 0; n < picture->i_planes; n++) {
+ picture->p[n].p_pixels = planes[n];
+ picture->p[n].i_pitch = pitches[n];
+ picture->p[n].i_lines = heights[n];
+ assert(picture->p[n].i_visible_pitch <= picture->p[n].i_pitch);
+ assert(picture->p[n].i_visible_lines <= picture->p[n].i_lines);
+ }
+}
+
/**
* It updates a picture data/pitches.
*/
diff --git a/modules/video_output/win32/common.h b/modules/video_output/win32/common.h
index a957048..27a71a3 100644
--- a/modules/video_output/win32/common.h
+++ b/modules/video_output/win32/common.h
@@ -95,6 +95,7 @@ void CommonManage(vout_display_t *);
int CommonControl(vout_display_t *, int , va_list );
void CommonDisplay(vout_display_t *);
int CommonUpdatePicture(picture_t *, picture_t **fallback, uint8_t *plane, unsigned pitch);
+void picture_SetPlanes(picture_t *, uint8_t **planes, unsigned *pitches, unsigned *heights);
void UpdateRects (vout_display_t *,
const vout_display_cfg_t *,
--
2.10.2
More information about the vlc-devel
mailing list