From 552b93b46f79299a4b2d952bfd34e1d5eed7bbe0 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Sun, 3 May 2009 19:06:07 +0200 Subject: [PATCH] Added I420<->J420 (422/440/444) equivalence in vout_ChromaCmp. It will prevent a useless chroma conversion for the vout using it (x11/xvideo at least). It is not perfect are they are not exactly equal, but in the current state, I think it is the best workaround. --- src/video_output/vout_pictures.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c index 625799db00..d0da611c43 100644 --- a/src/video_output/vout_pictures.c +++ b/src/video_output/vout_pictures.c @@ -956,7 +956,16 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic, int vout_ChromaCmp( vlc_fourcc_t i_chroma, vlc_fourcc_t i_amorhc ) { static const vlc_fourcc_t p_I420[] = { - FOURCC_I420, FOURCC_IYUV, FOURCC_YV12, 0 + FOURCC_I420, FOURCC_IYUV, FOURCC_YV12, FOURCC_J420, 0 + }; + static const vlc_fourcc_t p_I422[] = { + FOURCC_I422, FOURCC_J422, 0 + }; + static const vlc_fourcc_t p_I440[] = { + FOURCC_I440, FOURCC_J440, 0 + }; + static const vlc_fourcc_t p_I444[] = { + FOURCC_I444, FOURCC_J444, 0 }; static const vlc_fourcc_t p_UYVY[] = { FOURCC_UYVY, FOURCC_UYNV, FOURCC_Y422, 0 @@ -968,7 +977,7 @@ int vout_ChromaCmp( vlc_fourcc_t i_chroma, vlc_fourcc_t i_amorhc ) FOURCC_GREY, FOURCC_Y800, FOURCC_Y8, 0 }; static const vlc_fourcc_t *pp_fcc[] = { - p_I420, p_UYVY, p_YUYV, p_GREY, NULL + p_I420, p_I422, p_I440, p_I444, p_UYVY, p_YUYV, p_GREY, NULL }; /* If they are the same, they are the same ! */ -- 2.20.1