[vlc-devel] [PATCH 5/6] transcode: video: use i_chroma instead of i_codec
Alexandre Janniaux
ajanni at videolabs.io
Wed Jun 10 10:35:57 CEST 2020
Hi,
I agree that in the general case, they convey different
meaning. To be clear on the variable in the diff:
+ filter_fmt_out is the output format of the last user filter
+ encoder_fmt_in is the input format that has been modified
by the encoder, for example because x264 encoder will request
VLC_CODEC_I420 as input chroma.
But before the encoder, it seems to me that filter_fmt_out is
from a decoded picture (be it compressed) and that we should
really look at what the encoder request (meaning chroma), so
it cannot be H264 if I understand this part correctly.
Am I right or is that not how it's supposed to work?
Regards,
--
Alexandre Janniaux
Videolabs
On Tue, Jun 09, 2020 at 07:19:03PM +0200, Francois Cartegnie wrote:
> Le 09/06/2020 à 18:43, Alexandre Janniaux a écrit :
> > ---
> > modules/stream_out/transcode/video.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
> > index 14282ae864..e94588c978 100644
> > --- a/modules/stream_out/transcode/video.c
> > +++ b/modules/stream_out/transcode/video.c
> > @@ -627,7 +627,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
> > /* In case the encoder wasn't open yet, check if we need to add
> > * a converter between last user filter and encoder. */
> > if( !is_encoder_open &&
> > - filter_fmt_out.i_codec != encoder_fmt_in->i_codec )
> > + filter_fmt_out.video.i_chroma != encoder_fmt_in->video.i_chroma )
>
> Not sure about this. That's only equal with uncompressed formats.
>
> Codec could be H264 and chroma i420.
>
>
> --
> Francois Cartegnie
> VideoLAN - VLC Developer
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list