[vlc-devel] commit: Fix image resizing with non accelerated vouts. Still uses chroma builtin (Antoine Cellerier )
git version control
git at videolan.org
Sun Jun 15 19:48:03 CEST 2008
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sun Jun 15 19:47:52 2008 +0200| [7640ddc6ada933e322eed7087929f2c75f3a6201]
Fix image resizing with non accelerated vouts. Still uses chroma builtin
resizing which is horrible. Upcomming commit will fix that.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7640ddc6ada933e322eed7087929f2c75f3a6201
---
src/video_output/video_output.c | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 2f26340..9a0b088 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1113,12 +1113,29 @@ static void RunThread( vout_thread_t *p_vout)
p_vout->b_error = 1;
}
- /* Need to reinitialise the chroma plugin */
+ /* Need to reinitialise the chroma plugin. Since we might need
+ * resizing too and it's not sure that we already had it,
+ * recreate the chroma plugin chain from scratch. */
+ /* dionoea */
if( p_vout->p_chroma->p_module )
{
- if( p_vout->p_chroma->p_module->pf_deactivate )
- p_vout->p_chroma->p_module->pf_deactivate( VLC_OBJECT(p_vout->p_chroma) );
- p_vout->p_chroma->p_module->pf_activate( VLC_OBJECT(p_vout->p_chroma) );
+ filter_t *p_chroma = p_vout->p_chroma;
+ module_Unneed( p_chroma, p_chroma->p_module );
+ p_chroma->fmt_out.video = p_vout->fmt_out;
+ p_chroma->fmt_out.video.i_rmask = p_vout->output.i_rmask;
+ p_chroma->fmt_out.video.i_gmask = p_vout->output.i_gmask;
+ p_chroma->fmt_out.video.i_bmask = p_vout->output.i_bmask;
+ p_chroma->fmt_out.video.i_rrshift = p_vout->output.i_rrshift;
+ p_chroma->fmt_out.video.i_lrshift = p_vout->output.i_lrshift;
+ p_chroma->fmt_out.video.i_rgshift = p_vout->output.i_rgshift;
+ p_chroma->fmt_out.video.i_lgshift = p_vout->output.i_lgshift;
+ p_chroma->fmt_out.video.i_rbshift = p_vout->output.i_rbshift;
+ p_chroma->fmt_out.video.i_lbshift = p_vout->output.i_lbshift;
+ p_chroma->p_module = module_Need( p_chroma, "video filter2", NULL, 0 );
+ if( !p_chroma->p_module )
+ {
+ msg_Err( p_vout, "WOW THIS SUCKS BIG TIME!!!!!" );
+ }
}
}
More information about the vlc-devel
mailing list