[vlc-devel] [PATCH 3/5] vout: chroma chain: fix scaling before transform

Francois Cartegnie fcvlcdev at free.fr
Tue Sep 10 16:11:33 CEST 2019


---
 modules/video_chroma/chain.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c
index 6cb9589721..8b183d2686 100644
--- a/modules/video_chroma/chain.c
+++ b/modules/video_chroma/chain.c
@@ -295,8 +295,11 @@ static int BuildTransformChain( filter_t *p_filter )
         return VLC_SUCCESS;
 
     /* Lets try resize+chroma first, then transform */
-    msg_Dbg( p_filter, "Trying to build chroma+resize" );
-    EsFormatMergeSize( &fmt_mid, &p_filter->fmt_out, &p_filter->fmt_in );
+    msg_Dbg( p_filter, "Trying to build chroma+resize, then transform" );
+    es_format_Copy( &fmt_mid, &p_filter->fmt_out );
+    /* Set mid format to same rotation as source,
+     * so we get proper scaling before transform */
+    video_format_TransformTo( &fmt_mid.video, p_filter->fmt_in.video.orientation );
     i_ret = CreateChain( p_filter, &fmt_mid );
     es_format_Clean( &fmt_mid );
     if( i_ret == VLC_SUCCESS )
-- 
2.21.0



More information about the vlc-devel mailing list