[vlc-commits] transcode: add chroma conversion to be the first filter if needed
Ilkka Ollakka
git at videolan.org
Fri Dec 27 16:57:37 CET 2013
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Dec 27 16:51:18 2013 +0200| [d16fb5e7ff31fb388b8e63285522ef7b95afaa7b] | committer: Ilkka Ollakka
transcode: add chroma conversion to be the first filter if needed
For example croppadd doesn't like if input and output chromas are not the same.
This is visible for example webcam input and h264 encode (YUV2->I420).
Reported by: Jean-Paul Saman
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d16fb5e7ff31fb388b8e63285522ef7b95afaa7b
---
modules/stream_out/transcode/video.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 92f4d8d..6716cc7 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -337,6 +337,13 @@ static void transcode_video_filter_init( sout_stream_t *p_stream,
p_stream->p_sys );
filter_chain_Reset( id->p_uf_chain, p_fmt_out,
&id->p_encoder->fmt_in );
+ if( p_fmt_out->video.i_chroma != id->p_encoder->fmt_in.video.i_chroma )
+ {
+ filter_chain_AppendFilter( id->p_uf_chain,
+ NULL, NULL,
+ p_fmt_out,
+ &id->p_encoder->fmt_in );
+ }
filter_chain_AppendFromString( id->p_uf_chain, p_stream->p_sys->psz_vf2 );
p_fmt_out = filter_chain_GetFmtOut( id->p_uf_chain );
es_format_Copy( &id->p_encoder->fmt_in, p_fmt_out );
More information about the vlc-commits
mailing list