Commit 20feba63 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

deinterlace/win32: keep off filter owner private data

parent 2b7ef42e
......@@ -62,7 +62,6 @@ typedef struct
ID3D11VideoProcessorOutputView *processorOutput;
struct deinterlace_ctx context;
picture_t * (*buffer_new)( filter_t * );
} filter_sys_t;
struct filter_mode_t
......@@ -238,10 +237,10 @@ static struct picture_context_t *d3d11_pic_context_copy(struct picture_context_t
return &pic_ctx->s;
}
static picture_t *NewOutputPicture( filter_t *p_filter )
picture_t *AllocPicture( filter_t *p_filter )
{
filter_sys_t *p_sys = p_filter->p_sys;
picture_t *pic = p_sys->buffer_new( p_filter );
picture_t *pic = filter_NewPicture( p_filter );
picture_sys_t *pic_sys = pic->p_sys;
if ( !pic->context )
{
......@@ -464,8 +463,6 @@ int D3D11OpenDeinterlace(vlc_object_t *obj)
goto error;
}
sys->buffer_new = filter->owner.video.buffer_new;
filter->owner.video.buffer_new = NewOutputPicture;
filter->fmt_out.video = out_fmt;
filter->pf_video_filter = Deinterlace;
filter->pf_flush = Flush;
......
......@@ -57,7 +57,6 @@ typedef struct
SHORT Saturation;
struct deinterlace_ctx context;
picture_t * (*buffer_new)( filter_t * );
} filter_sys_t;
struct filter_mode_t
......@@ -250,10 +249,10 @@ static struct picture_context_t *d3d9_pic_context_copy(struct picture_context_t
return &pic_ctx->s;
}
static picture_t *NewOutputPicture( filter_t *p_filter )
picture_t *AllocPicture( filter_t *p_filter )
{
filter_sys_t *p_sys = p_filter->p_sys;
picture_t *pic = p_sys->buffer_new( p_filter );
picture_t *pic = filter_NewPicture( p_filter );
picture_sys_t *pic_sys = pic->p_sys;
if ( !pic->context )
{
......@@ -488,8 +487,6 @@ int D3D9OpenDeinterlace(vlc_object_t *obj)
CoTaskMemFree(processorGUIDs);
IDirectXVideoProcessorService_Release(processor);
sys->buffer_new = filter->owner.video.buffer_new;
filter->owner.video.buffer_new = NewOutputPicture;
filter->fmt_out.video = out_fmt;
filter->pf_video_filter = Deinterlace;
filter->pf_flush = Flush;
......
......@@ -139,7 +139,7 @@ picture_t *DoDeinterlacing( filter_t *p_filter,
bool b_top_field_first;
/* Request output picture */
p_dst[0] = filter_NewPicture( p_filter );
p_dst[0] = AllocPicture( p_filter );
if( p_dst[0] == NULL )
{
picture_Release( p_pic );
......@@ -221,7 +221,7 @@ picture_t *DoDeinterlacing( filter_t *p_filter,
{
/* Note that the effective buffer size depends also on the constant
private_picture in vout_wrapper.c, since that determines the
maximum number of output pictures filter_NewPicture() will
maximum number of output pictures AllocPicture() will
successfully allocate for one input frame.
*/
msg_Err( p_filter, "Framerate doubler: output buffer too small; "\
......@@ -235,7 +235,7 @@ picture_t *DoDeinterlacing( filter_t *p_filter,
for( int i = 1; i < i_double_rate_alloc_end ; ++i )
{
p_dst[i-1]->p_next =
p_dst[i] = filter_NewPicture( p_filter );
p_dst[i] = AllocPicture( p_filter );
if( p_dst[i] )
{
picture_CopyProperties( p_dst[i], p_pic );
......
......@@ -123,5 +123,6 @@ picture_t *DoDeinterlacing( filter_t *, struct deinterlace_ctx *, picture_t * );
*/
void FlushDeinterlacing( struct deinterlace_ctx * );
picture_t *AllocPicture( filter_t * );
#endif
......@@ -442,6 +442,11 @@ static void GetOutputFormat( filter_t *p_filter,
* video filter functions
*****************************************************************************/
picture_t *AllocPicture( filter_t *filter )
{
return filter_NewPicture( filter );
}
/* This is the filter function. See Open(). */
picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
{
......
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