Commit 1ce6b355 authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Remove Deinterlace routines from old place...

Remove Deinterlace routines from old place (modules/codec/ffmpeg/video_filter.c), because they have moved to their own file (modules/codec/ffmpeg/deinterlace.c).
parent c0af827e
...@@ -63,7 +63,6 @@ struct filter_sys_t ...@@ -63,7 +63,6 @@ struct filter_sys_t
ImgReSampleContext *p_rsc; ImgReSampleContext *p_rsc;
}; };
/***************************************************************************** /*****************************************************************************
* OpenFilterEx: common code to OpenFilter and OpenCropPadd * OpenFilterEx: common code to OpenFilter and OpenCropPadd
*****************************************************************************/ *****************************************************************************/
...@@ -542,7 +541,7 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic ) ...@@ -542,7 +541,7 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic )
img_resample( p_sys->p_rsc, p_dst, p_src ); img_resample( p_sys->p_rsc, p_dst, p_src );
} }
#endif #endif
if (p_sys->b_enable_croppadd) if (p_sys->b_enable_croppadd)
{ {
if (p_filter->fmt_out.video.i_visible_width != p_filter->fmt_out.video.i_width || if (p_filter->fmt_out.video.i_visible_width != p_filter->fmt_out.video.i_width ||
...@@ -603,93 +602,4 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic ) ...@@ -603,93 +602,4 @@ static picture_t *Process( filter_t *p_filter, picture_t *p_pic )
return p_pic_dst; return p_pic_dst;
} }
/*****************************************************************************
* OpenDeinterlace: probe the filter and return score
*****************************************************************************/
int E_(OpenDeinterlace)( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t*)p_this;
filter_sys_t *p_sys;
/* Check if we can handle that formats */
if( E_(GetFfmpegChroma)( p_filter->fmt_in.video.i_chroma ) < 0 )
{
return VLC_EGENERIC;
}
/* Allocate the memory needed to store the decoder's structure */
if( ( p_filter->p_sys = p_sys =
(filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL )
{
msg_Err( p_filter, "out of memory" );
return VLC_EGENERIC;
}
/* Misc init */
p_sys->i_src_ffmpeg_chroma =
E_(GetFfmpegChroma)( p_filter->fmt_in.video.i_chroma );
p_filter->pf_video_filter = Deinterlace;
msg_Dbg( p_filter, "deinterlacing" );
/* libavcodec needs to be initialized for some chroma conversions */
E_(InitLibavcodec)(p_this);
return VLC_SUCCESS;
}
/*****************************************************************************
* CloseDeinterlace: clean up the filter
*****************************************************************************/
void E_(CloseDeinterlace)( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t*)p_this;
filter_sys_t *p_sys = p_filter->p_sys;
free( p_sys );
}
/*****************************************************************************
* Do the processing here
*****************************************************************************/
static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
{
filter_sys_t *p_sys = p_filter->p_sys;
AVPicture src_pic, dest_pic;
picture_t *p_pic_dst;
int i;
/* Request output picture */
p_pic_dst = p_filter->pf_vout_buffer_new( p_filter );
if( !p_pic_dst )
{
msg_Warn( p_filter, "can't get output picture" );
return NULL;
}
/* Prepare the AVPictures for the conversion */
for( i = 0; i < p_pic->i_planes; i++ )
{
src_pic.data[i] = p_pic->p[i].p_pixels;
src_pic.linesize[i] = p_pic->p[i].i_pitch;
}
for( i = 0; i < p_pic_dst->i_planes; i++ )
{
dest_pic.data[i] = p_pic_dst->p[i].p_pixels;
dest_pic.linesize[i] = p_pic_dst->p[i].i_pitch;
}
avpicture_deinterlace( &dest_pic, &src_pic, p_sys->i_src_ffmpeg_chroma,
p_filter->fmt_in.video.i_width,
p_filter->fmt_in.video.i_height );
p_pic_dst->date = p_pic->date;
p_pic_dst->b_force = p_pic->b_force;
p_pic_dst->i_nb_fields = p_pic->i_nb_fields;
p_pic_dst->b_progressive = VLC_TRUE;
p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
p_pic->pf_release( p_pic );
return p_pic_dst;
}
#endif #endif
\ No newline at end of file
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