vlc | branch: master | Alexandre Janniaux <[email protected]> | Tue Jun 9 18:43:58 2020 +0200| [c751159b600dc3a34b231b9d8d25a23b97c48783] | committer: Alexandre Janniaux
chroma: cvpx: avoid conversion to self without resize CVP* -> CVP* with the star equal to the same value is possible when building a resize+chroma chain, but in the case of chroma only we don't want to add additional steps. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c751159b600dc3a34b231b9d8d25a23b97c48783 --- modules/video_chroma/cvpx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/video_chroma/cvpx.c b/modules/video_chroma/cvpx.c index 24d14bb69f..1614aeb7ee 100644 --- a/modules/video_chroma/cvpx.c +++ b/modules/video_chroma/cvpx.c @@ -414,6 +414,12 @@ Open_CVPX_to_CVPX(vlc_object_t *obj) { filter_t *filter = (filter_t *)obj; + /* Avoid conversion to self if we're not resizing */ + if (filter->fmt_in.video.i_chroma == filter->fmt_out.video.i_chroma && + filter->fmt_in.video.i_visible_width == filter->fmt_out.video.i_visible_width && + filter->fmt_in.video.i_visible_height == filter->fmt_out.video.i_visible_height) + return VLC_EGENERIC; + if (filter->vctx_in == NULL || vlc_video_context_GetType(filter->vctx_in) != VLC_VIDEO_CONTEXT_CVPX) return VLC_EGENERIC; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
