Commit 3f01a84b authored by Laurent Aimar's avatar Laurent Aimar

Fixed J42X support in deinterlace filter.

parent 3959817d
......@@ -321,7 +321,8 @@ static void SetFilterMethod( vout_thread_t *p_vout, const char *psz_method )
}
else
{
const bool b_i422 = p_vout->render.i_chroma == VLC_CODEC_I422;
const bool b_i422 = p_vout->render.i_chroma == VLC_CODEC_I422 ||
p_vout->render.i_chroma == VLC_CODEC_J422;
if( strcmp( psz_method, "discard" ) )
msg_Err( p_vout, "no valid deinterlace mode provided, "
"using \"discard\"" );
......@@ -347,17 +348,19 @@ static void GetOutputFormat( vout_thread_t *p_vout,
p_dst->i_sar_den *= 2;
}
if( p_src->i_chroma == VLC_CODEC_I422 )
if( p_src->i_chroma == VLC_CODEC_I422 ||
p_src->i_chroma == VLC_CODEC_J422 )
{
switch( p_vout->p_sys->i_mode )
{
case DEINTERLACE_MEAN:
case DEINTERLACE_LINEAR:
case DEINTERLACE_X:
p_dst->i_chroma = VLC_CODEC_I422;
p_dst->i_chroma = p_src->i_chroma;
break;
default:
p_dst->i_chroma = VLC_CODEC_I420;
p_dst->i_chroma = p_src->i_chroma == VLC_CODEC_I422 ? VLC_CODEC_I420 :
VLC_CODEC_J420;
break;
}
}
......@@ -366,8 +369,10 @@ static void GetOutputFormat( vout_thread_t *p_vout,
static bool IsChromaSupported( vlc_fourcc_t i_chroma )
{
return i_chroma == VLC_CODEC_I420 ||
i_chroma == VLC_CODEC_J420 ||
i_chroma == VLC_CODEC_YV12 ||
i_chroma == VLC_CODEC_I422;
i_chroma == VLC_CODEC_I422 ||
i_chroma == VLC_CODEC_J422;
}
/*****************************************************************************
......@@ -621,6 +626,7 @@ static void RenderDiscard( vout_thread_t *p_vout,
switch( p_vout->render.i_chroma )
{
case VLC_CODEC_I420:
case VLC_CODEC_J420:
case VLC_CODEC_YV12:
for( ; p_out < p_out_end ; )
......@@ -633,6 +639,7 @@ static void RenderDiscard( vout_thread_t *p_vout,
break;
case VLC_CODEC_I422:
case VLC_CODEC_J422:
i_increment = 2 * p_pic->p[i_plane].i_pitch;
......@@ -685,6 +692,7 @@ static void RenderBob( vout_thread_t *p_vout,
switch( p_vout->render.i_chroma )
{
case VLC_CODEC_I420:
case VLC_CODEC_J420:
case VLC_CODEC_YV12:
/* For BOTTOM field we need to add the first line */
if( i_field == 1 )
......@@ -720,6 +728,7 @@ static void RenderBob( vout_thread_t *p_vout,
break;
case VLC_CODEC_I422:
case VLC_CODEC_J422:
/* For BOTTOM field we need to add the first line */
if( i_field == 1 )
{
......@@ -874,6 +883,7 @@ static void RenderBlend( vout_thread_t *p_vout,
switch( p_vout->render.i_chroma )
{
case VLC_CODEC_I420:
case VLC_CODEC_J420:
case VLC_CODEC_YV12:
/* First line: simple copy */
vlc_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
......@@ -891,6 +901,7 @@ static void RenderBlend( vout_thread_t *p_vout,
break;
case VLC_CODEC_I422:
case VLC_CODEC_J422:
/* First line: simple copy */
vlc_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
p_out += p_outpic->p[i_plane].i_pitch;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment