[vlc-commits] opengl: select yuv->rgb matrix based on colorspace
Ilkka Ollakka
git at videolan.org
Sun Apr 17 10:57:04 CEST 2016
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Apr 17 11:13:50 2016 +0300| [c3fc2683a9cde1d42674ebf9935dced05733a215] | committer: Ilkka Ollakka
opengl: select yuv->rgb matrix based on colorspace
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c3fc2683a9cde1d42674ebf9935dced05733a215
---
modules/video_output/opengl.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 09667fb..df15804 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -272,8 +272,16 @@ static void BuildYUVFragmentShader(vout_display_opengl_t *vgl,
1.164383561643836, -0.21324861427373, -0.532909328559444, 0.301482665475862 ,
1.164383561643836, 2.112401785714286, 0.0000, -1.133402217873451 ,
};
- const float (*matrix) = fmt->i_height > 576 ? matrix_bt709_tv2full
- : matrix_bt601_tv2full;
+ const float *matrix;
+ switch( fmt->space )
+ {
+ case COLOR_SPACE_BT601:
+ matrix = matrix_bt601_tv2full;
+ break;
+ case COLOR_SPACE_BT709:
+ case COLOR_SPACE_BT2020:
+ matrix = matrix_bt709_tv2full;
+ };
/* Basic linear YUV -> RGB conversion using bilinear interpolation */
const char *template_glsl_yuv =
More information about the vlc-commits
mailing list