vlc | branch: master | Steve Lhomme <[email protected]> | Thu Nov 12 13:02:41 2020 +0100| [3c7f5c1119f161f92202e4b763b2c082800d30b3] | committer: Steve Lhomme
display: remove range conversion filter There doesn't seem to be any display module that transforms these J4xx chromas into I4xx chromas for their input format. So we don't need 2 filters for this. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3c7f5c1119f161f92202e4b763b2c082800d30b3 --- src/video_output/display.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/video_output/display.c b/src/video_output/display.c index 1d304e2b32..fa00e8718d 100644 --- a/src/video_output/display.c +++ b/src/video_output/display.c @@ -334,14 +334,7 @@ static int VoutDisplayCreateRender(vout_display_t *vd) v_dst.i_sar_num = 0; v_dst.i_sar_den = 0; - video_format_t v_dst_cmp = v_dst; - if ((v_src.i_chroma == VLC_CODEC_J420 && v_dst.i_chroma == VLC_CODEC_I420) || - (v_src.i_chroma == VLC_CODEC_J422 && v_dst.i_chroma == VLC_CODEC_I422) || - (v_src.i_chroma == VLC_CODEC_J440 && v_dst.i_chroma == VLC_CODEC_I440) || - (v_src.i_chroma == VLC_CODEC_J444 && v_dst.i_chroma == VLC_CODEC_I444)) - v_dst_cmp.i_chroma = v_src.i_chroma; - - const bool convert = memcmp(&v_src, &v_dst_cmp, sizeof(v_src)) != 0; + const bool convert = memcmp(&v_src, &v_dst, sizeof(v_src)) != 0; if (!convert) return 0; @@ -355,16 +348,14 @@ static int VoutDisplayCreateRender(vout_display_t *vd) /* */ int ret = -1; - for (int i = 0; i < 1 + (v_dst_cmp.i_chroma != v_dst.i_chroma); i++) { + { es_format_t dst; - es_format_InitFromVideo(&dst, i == 0 ? &v_dst : &v_dst_cmp); + es_format_InitFromVideo(&dst, &v_dst); filter_chain_Reset(osys->converters, &src, osys->src_vctx, &dst); ret = filter_chain_AppendConverter(osys->converters, &dst); es_format_Clean(&dst); - if (ret == 0) - break; } es_format_Clean(&src); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
