[vlc-devel] [PATCH 04/13] decoder: copy the ES codec into the chroma

Rémi Denis-Courmont remi at remlab.net
Tue Feb 19 11:07:58 CET 2019


If you actually want to clean this up, then move i_codec into the anonymous union.

(This will also affect subs and audio for better or worse.)

Le 19 février 2019 11:38:17 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>This is odd but it's done everywhere.
>
>We also copy it in the original output video_format as it was done in
>most cases.
>---
> modules/stream_out/mosaic_bridge.c   | 3 ---
> modules/stream_out/sdi/SDIStream.cpp | 3 ---
> src/input/decoder.c                  | 1 -
> src/input/decoder_helpers.c          | 2 ++
> src/misc/image.c                     | 1 -
> 5 files changed, 2 insertions(+), 8 deletions(-)
>
>diff --git a/modules/stream_out/mosaic_bridge.c
>b/modules/stream_out/mosaic_bridge.c
>index 9608422748..15e8f6fbe4 100644
>--- a/modules/stream_out/mosaic_bridge.c
>+++ b/modules/stream_out/mosaic_bridge.c
>@@ -613,9 +613,6 @@ static void video_update_format( video_format_t
>*video, es_format_t *fmt_out )
> 
>         *video = fmt_out->video;
>     }
>-
>-    /* */
>-    fmt_out->video.i_chroma = fmt_out->i_codec;
> }
> 
>/**********************************************************************
>diff --git a/modules/stream_out/sdi/SDIStream.cpp
>b/modules/stream_out/sdi/SDIStream.cpp
>index 5202bd331c..f525b5700d 100644
>--- a/modules/stream_out/sdi/SDIStream.cpp
>+++ b/modules/stream_out/sdi/SDIStream.cpp
>@@ -325,9 +325,6 @@ int
>VideoDecodedStream::VideoDecCallback_update_format(decoder_t *p_dec)
>     struct decoder_owner *p_owner;
>     p_owner = container_of(p_dec, struct decoder_owner, dec);
> 
>-    /* fixup */
>-    p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;
>-
>     es_format_Clean(&p_owner->last_fmt_update);
>     es_format_Copy(&p_owner->last_fmt_update, &p_dec->fmt_out);
> 
>diff --git a/src/input/decoder.c b/src/input/decoder.c
>index 503e89d0b4..16e88702b7 100644
>--- a/src/input/decoder.c
>+++ b/src/input/decoder.c
>@@ -455,7 +455,6 @@ static int vout_update_format( decoder_t *p_dec )
>         }
> 
>         video_format_t fmt = p_dec->fmt_out.video;
>-        fmt.i_chroma = p_dec->fmt_out.i_codec;
> 
>         if( vlc_fourcc_IsYUV( fmt.i_chroma ) )
>         {
>diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
>index e532aa450e..b738525b1e 100644
>--- a/src/input/decoder_helpers.c
>+++ b/src/input/decoder_helpers.c
>@@ -94,6 +94,8 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
> 
>     video_format_AdjustColorSpace( &fmt_out );
> 
>+    dec->fmt_out.video.i_chroma = fmt_out.i_chroma =
>dec->fmt_out.i_codec;
>+
>     video_format_t original = dec->fmt_out.video;
>     dec->fmt_out.video = fmt_out;
>     int err = dec->cbs->video.format_update( dec );
>diff --git a/src/misc/image.c b/src/misc/image.c
>index 52edd0ff67..0c5fb9a384 100644
>--- a/src/misc/image.c
>+++ b/src/misc/image.c
>@@ -652,7 +652,6 @@ vlc_fourcc_t image_Mime2Fourcc( const char
>*psz_mime )
> 
> static int video_update_format( decoder_t *p_dec )
> {
>-    p_dec->fmt_out.video.i_chroma = p_dec->fmt_out.i_codec;
>     return 0;
> }
> 
>-- 
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190219/d1474ca7/attachment.html>


More information about the vlc-devel mailing list