[vlc-devel] [PATCH 3/4] color extraction: add vlc_uint10 range function
victorien.lecouviour.tuffet at gmail.com
victorien.lecouviour.tuffet at gmail.com
Tue Apr 4 18:52:35 CEST 2017
From: Victorien Le Couviour--Tuffet <victorien.lecouviour-tuffet at epitech.eu>
this function is needed to add YUV420 10b support
---
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