[vlc-devel] [PATCH] adding vlc_uint10 to modules/video_filter/filter_picture.h (needed for yup420 10b color extraction)
victorien.lecouviour.tuffet at gmail.com
victorien.lecouviour.tuffet at gmail.com
Tue Apr 4 13:01:01 CEST 2017
From: Psilokos <victorien.lecouviour-tuffet at epitech.eu>
---
modules/video_filter/filter_picture.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/video_filter/filter_picture.h b/modules/video_filter/filter_picture.h
index 30aec839a7..ac987242e2 100644
--- a/modules/video_filter/filter_picture.h
+++ b/modules/video_filter/filter_picture.h
@@ -119,6 +119,15 @@ static inline uint8_t vlc_uint8( int v )
return v;
}
+static inline uint16_t vlc_uint10( int v )
+{
+ if( v > 1023 )
+ return 1023;
+ else if( v < 0 )
+ return 0;
+ return v;
+}
+
static inline void yuv_to_rgb( int *r, int *g, int *b,
uint8_t y1, uint8_t u1, uint8_t v1 )
{
--
2.12.0
More information about the vlc-devel
mailing list