[vlc-devel] [PATCH 06/15] video_filter:deinterlace: move all phosphor handling after GetOutputFormat
Steve Lhomme
robux4 at videolabs.io
Fri Jun 30 14:19:59 CEST 2017
--
replaces https://patches.videolan.org/patch/17099/
- don't use a flag anymore to detect phosphor mode
---
modules/video_filter/deinterlace/deinterlace.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c
index 541e87e55d..9e847dd385 100644
--- a/modules/video_filter/deinterlace/deinterlace.c
+++ b/modules/video_filter/deinterlace/deinterlace.c
@@ -253,15 +253,6 @@ static void GetOutputFormat( filter_t *p_filter,
{
p_dst->i_frame_rate *= 2;
}
-
- if( p_sys->i_mode == DEINTERLACE_PHOSPHOR &&
- 2 * p_sys->chroma->p[1].h.num == p_sys->chroma->p[1].h.den &&
- 2 * p_sys->chroma->p[2].h.num == p_sys->chroma->p[2].h.den &&
- p_sys->phosphor.i_chroma_for_420 == PC_UPCONVERT )
- {
- p_dst->i_chroma = p_src->i_chroma == VLC_CODEC_J420 ? VLC_CODEC_J422 :
- VLC_CODEC_I422;
- }
else
{
p_dst->i_chroma = p_src->i_chroma;
@@ -713,6 +704,10 @@ notsupp:
}
/* */
+ video_format_t fmt;
+ GetOutputFormat( p_filter, &fmt, &p_filter->fmt_in.video );
+
+ /* */
if( p_sys->i_mode == DEINTERLACE_PHOSPHOR )
{
int i_c420 = var_GetInteger( p_filter,
@@ -742,6 +737,14 @@ notsupp:
msg_Dbg( p_filter, "using Phosphor dimmer strength %d", i_dimmer );
/* The internal value ranges from 0 to 3. */
p_sys->phosphor.i_dimmer_strength = i_dimmer - 1;
+
+ if( 2 * chroma->p[1].h.num == chroma->p[1].h.den &&
+ 2 * chroma->p[2].h.num == chroma->p[2].h.den &&
+ i_c420 == PC_UPCONVERT )
+ {
+ fmt.i_chroma = p_filter->fmt_in.video.i_chroma == VLC_CODEC_J420 ?
+ VLC_CODEC_J422 : VLC_CODEC_I422;
+ }
}
else
{
@@ -749,9 +752,6 @@ notsupp:
p_sys->phosphor.i_dimmer_strength = 1;
}
- /* */
- video_format_t fmt;
- GetOutputFormat( p_filter, &fmt, &p_filter->fmt_in.video );
if( !p_filter->b_allow_fmt_out_change &&
( fmt.i_chroma != p_filter->fmt_in.video.i_chroma ||
fmt.i_height != p_filter->fmt_in.video.i_height ) )
--
2.12.1
More information about the vlc-devel
mailing list