1
/*****************************************************************************
2
* video filter: video filter doing chroma conversion and resizing
3
* using the ffmpeg library
4
*****************************************************************************
5
* Copyright (C) 1999-2001 the VideoLAN team
6
* $Id: a6d66457c73a31abbe49d51c6f0ef10b6a57234b $
8
* Authors: Gildas Bazin <gbazin@videolan.org>
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
*****************************************************************************/
25
/*****************************************************************************
27
*****************************************************************************/
29
#include <vlc/decoder.h>
30
#include "vlc_filter.h"
33
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
34
# include <libavcodec/avcodec.h>
35
#elif defined(HAVE_FFMPEG_AVCODEC_H)
36
# include <ffmpeg/avcodec.h>
43
void E_(InitLibavcodec) ( vlc_object_t *p_object );
44
static int CheckInit( filter_t *p_filter );
45
static picture_t *Process( filter_t *p_filter, picture_t *p_pic );
46
static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic );
48
/*****************************************************************************
49
* filter_sys_t : filter descriptor
50
*****************************************************************************/
55
vlc_bool_t b_resize_first;
56
vlc_bool_t b_enable_croppadd;
59
int i_src_ffmpeg_chroma;
61
int i_dst_ffmpeg_chroma;
64
ImgReSampleContext *p_rsc;
68
/*****************************************************************************
69
* OpenFilterEx: common code to OpenFilter and OpenCropPadd
70
*****************************************************************************/
71
static int OpenFilterEx( vlc_object_t *p_this, vlc_bool_t b_enable_croppadd )
73
filter_t *p_filter = (filter_t*)p_this;
75
vlc_bool_t b_convert, b_resize;
77
/* Check if we can handle that formats */
78
if( E_(GetFfmpegChroma)( p_filter->fmt_in.video.i_chroma ) < 0 ||
79
E_(GetFfmpegChroma)( p_filter->fmt_out.video.i_chroma ) < 0 )
85
p_filter->fmt_in.video.i_width != p_filter->fmt_out.video.i_width ||
86
p_filter->fmt_in.video.i_height != p_filter->fmt_out.video.i_height;
88
if ( b_enable_croppadd )
90
b_resize = b_resize ||
91
p_filter->fmt_in.video.i_visible_width != p_filter->fmt_in.video.i_width ||
92
p_filter->fmt_in.video.i_visible_height != p_filter->fmt_in.video.i_height ||
93
p_filter->fmt_in.video.i_x_offset != 0 ||
94
p_filter->fmt_in.video.i_y_offset != 0 ||
95
p_filter->fmt_out.video.i_visible_width != p_filter->fmt_out.video.i_width ||
96
p_filter->fmt_out.video.i_visible_height != p_filter->fmt_out.video.i_height ||
97
p_filter->fmt_out.video.i_x_offset != 0 ||
98
p_filter->fmt_out.video.i_y_offset != 0;
102
p_filter->fmt_in.video.i_chroma != p_filter->fmt_out.video.i_chroma;
104
if( !b_resize && !b_convert )
110
/* Allocate the memory needed to store the decoder's structure */
111
if( ( p_filter->p_sys = p_sys =
112
(filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL )
114
msg_Err( p_filter, "out of memory" );
120
p_sys->b_enable_croppadd = b_enable_croppadd;
121
p_sys->i_src_ffmpeg_chroma =
122
E_(GetFfmpegChroma)( p_filter->fmt_in.video.i_chroma );
123
p_sys->i_dst_ffmpeg_chroma =
124
E_(GetFfmpegChroma)( p_filter->fmt_out.video.i_chroma );
125
p_filter->pf_video_filter = Process;
126
es_format_Init( &p_sys->fmt_in, 0, 0 );
127
es_format_Init( &p_sys->fmt_out, 0, 0 );
129
/* Dummy alloc, will be reallocated in CheckInit */
130
avpicture_alloc( &p_sys->tmp_pic, p_sys->i_src_ffmpeg_chroma,
131
p_filter->fmt_out.video.i_width,
132
p_filter->fmt_out.video.i_height );
134
if( CheckInit( p_filter ) != VLC_SUCCESS )
136
if( p_sys->p_rsc ) img_resample_close( p_sys->p_rsc );
137
avpicture_free( &p_sys->tmp_pic );
142
msg_Dbg( p_filter, "input: %ix%i %4.4s -> %ix%i %4.4s",
143
p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_height,
144
(char *)&p_filter->fmt_in.video.i_chroma,
145
p_filter->fmt_out.video.i_width, p_filter->fmt_out.video.i_height,
146
(char *)&p_filter->fmt_out.video.i_chroma );
148
/* libavcodec needs to be initialized for some chroma conversions */
149
E_(InitLibavcodec)(p_this);
154
/*****************************************************************************
155
* OpenFilter: probe the filter and return score
156
*****************************************************************************/
157
int E_(OpenFilter)( vlc_object_t *p_this )
159
return OpenFilterEx( p_this, VLC_FALSE );
162
/*****************************************************************************
163
* OpenCropPadd: probe the filter and return score
164
*****************************************************************************/
165
int E_(OpenCropPadd)( vlc_object_t *p_this )
167
return OpenFilterEx( p_this, VLC_TRUE );
171
/*****************************************************************************
172
* CloseFilter: clean up the filter
173
*****************************************************************************/
174
void E_(CloseFilter)( vlc_object_t *p_this )
176
filter_t *p_filter = (filter_t*)p_this;
177
filter_sys_t *p_sys = p_filter->p_sys;
179
if( p_sys->p_rsc ) img_resample_close( p_sys->p_rsc );
180
avpicture_free( &p_sys->tmp_pic );
185
/*****************************************************************************
186
* CheckInit: Initialise filter when necessary
187
*****************************************************************************/
188
static int CheckInit( filter_t *p_filter )
190
filter_sys_t *p_sys = p_filter->p_sys;
202
b_change= p_filter->fmt_in.video.i_width != p_sys->fmt_in.video.i_width ||
203
p_filter->fmt_in.video.i_height != p_sys->fmt_in.video.i_height ||
204
p_filter->fmt_out.video.i_width != p_sys->fmt_out.video.i_width ||
205
p_filter->fmt_out.video.i_height != p_sys->fmt_out.video.i_height;
207
if ( p_sys->b_enable_croppadd )
209
b_change = b_change ||
210
p_filter->fmt_in.video.i_y_offset != p_sys->fmt_in.video.i_y_offset ||
211
p_filter->fmt_in.video.i_x_offset != p_sys->fmt_in.video.i_x_offset ||
212
p_filter->fmt_in.video.i_visible_width != p_sys->fmt_in.video.i_visible_width ||
213
p_filter->fmt_in.video.i_visible_height != p_sys->fmt_in.video.i_visible_height ||
214
p_filter->fmt_out.video.i_y_offset != p_sys->fmt_out.video.i_y_offset ||
215
p_filter->fmt_out.video.i_x_offset != p_sys->fmt_out.video.i_x_offset ||
216
p_filter->fmt_out.video.i_visible_width != p_sys->fmt_out.video.i_visible_width ||
217
p_filter->fmt_out.video.i_visible_height != p_sys->fmt_out.video.i_visible_height;
222
if( p_sys->p_rsc ) img_resample_close( p_sys->p_rsc );
226
p_filter->fmt_in.video.i_chroma != p_filter->fmt_out.video.i_chroma;
229
p_filter->fmt_in.video.i_width != p_filter->fmt_out.video.i_width ||
230
p_filter->fmt_in.video.i_height != p_filter->fmt_out.video.i_height;
232
p_sys->b_resize_first =
233
p_filter->fmt_in.video.i_width * p_filter->fmt_in.video.i_height >
234
p_filter->fmt_out.video.i_width * p_filter->fmt_out.video.i_height;
236
if( p_sys->b_resize &&
237
p_sys->i_src_ffmpeg_chroma != PIX_FMT_YUV420P &&
238
p_sys->i_src_ffmpeg_chroma != PIX_FMT_YUVJ420P &&
239
p_sys->i_dst_ffmpeg_chroma != PIX_FMT_YUV420P &&
240
p_sys->i_dst_ffmpeg_chroma != PIX_FMT_YUVJ420P )
242
msg_Err( p_filter, "img_resample_init only deals with I420" );
245
else if( p_sys->i_src_ffmpeg_chroma != PIX_FMT_YUV420P &&
246
p_sys->i_src_ffmpeg_chroma != PIX_FMT_YUVJ420P )
248
p_sys->b_resize_first = VLC_FALSE;
250
else if( p_sys->i_dst_ffmpeg_chroma != PIX_FMT_YUV420P &&
251
p_sys->i_dst_ffmpeg_chroma != PIX_FMT_YUVJ420P )
253
p_sys->b_resize_first = VLC_TRUE;
256
if ( p_sys->b_enable_croppadd )
258
p_sys->b_resize = p_sys->b_resize ||
259
p_filter->fmt_in.video.i_visible_width != p_filter->fmt_in.video.i_width ||
260
p_filter->fmt_in.video.i_visible_height != p_filter->fmt_in.video.i_height ||
261
p_filter->fmt_in.video.i_x_offset != 0 ||
262
p_filter->fmt_in.video.i_y_offset != 0 ||
263
p_filter->fmt_out.video.i_visible_width != p_filter->fmt_out.video.i_width ||
264
p_filter->fmt_out.video.i_visible_height != p_filter->fmt_out.video.i_height ||
265
p_filter->fmt_out.video.i_x_offset != 0 ||
266
p_filter->fmt_out.video.i_y_offset != 0;
269
if( p_sys->b_resize )
271
if ( p_sys->b_enable_croppadd )
273
i_croptop=p_filter->fmt_in.video.i_y_offset;
274
i_cropbottom=p_filter->fmt_in.video.i_height
275
- p_filter->fmt_in.video.i_visible_height
276
- p_filter->fmt_in.video.i_y_offset;
277
i_cropleft=p_filter->fmt_in.video.i_x_offset;
278
i_cropright=p_filter->fmt_in.video.i_width
279
- p_filter->fmt_in.video.i_visible_width
280
- p_filter->fmt_in.video.i_x_offset;
283
i_paddtop=p_filter->fmt_out.video.i_y_offset;
284
i_paddbottom=p_filter->fmt_out.video.i_height
285
- p_filter->fmt_out.video.i_visible_height
286
- p_filter->fmt_out.video.i_y_offset;
287
i_paddleft=p_filter->fmt_out.video.i_x_offset;
288
i_paddright=p_filter->fmt_out.video.i_width
289
- p_filter->fmt_out.video.i_visible_width
290
- p_filter->fmt_out.video.i_x_offset;
293
#if LIBAVCODEC_BUILD >= 4708
294
p_sys->p_rsc = img_resample_full_init(
295
p_filter->fmt_out.video.i_width,
296
p_filter->fmt_out.video.i_height,
297
p_filter->fmt_in.video.i_width,
298
p_filter->fmt_in.video.i_height,
299
i_croptop,i_cropbottom,
300
i_cropleft,i_cropright,
301
i_paddtop,i_paddbottom,
302
i_paddleft,i_paddright );
304
p_sys->p_rsc = img_resample_full_init(
305
p_filter->fmt_out.video.i_width - i_paddleft - i_paddright,
306
p_filter->fmt_out.video.i_height - i_paddtop - i_paddbottom,
307
p_filter->fmt_in.video.i_width,
308
p_filter->fmt_in.video.i_height,
309
i_croptop,i_cropbottom,
310
i_cropleft,i_cropright );
312
msg_Dbg( p_filter, "input: %ix%i -> %ix%i",
313
p_filter->fmt_out.video.i_width,
314
p_filter->fmt_out.video.i_height,
315
p_filter->fmt_in.video.i_width,
316
p_filter->fmt_in.video.i_height);
320
msg_Err( p_filter, "img_resample_init failed" );
325
avpicture_free( &p_sys->tmp_pic );
327
if( p_sys->b_resize_first )
329
/* Resizing then conversion */
330
avpicture_alloc( &p_sys->tmp_pic, p_sys->i_src_ffmpeg_chroma,
331
p_filter->fmt_out.video.i_width,
332
p_filter->fmt_out.video.i_height );
336
/* Conversion then resizing */
337
avpicture_alloc( &p_sys->tmp_pic, p_sys->i_dst_ffmpeg_chroma,
338
p_filter->fmt_in.video.i_width,
339
p_filter->fmt_in.video.i_height );
342
p_sys->fmt_in = p_filter->fmt_in;
343
p_sys->fmt_out = p_filter->fmt_out;
349
/* fill padd code from ffmpeg */
350
static int padcolor[3] = { 16, 128, 128 };
352
/* Expects img to be yuv420 */
353
static void fill_pad_region( AVPicture* img, int height, int width,
354
int padtop, int padbottom, int padleft, int padright, int *color )
359
for ( i = 0; i < 3; i++ )
361
shift = ( i == 0 ) ? 0 : 1;
363
if ( padtop || padleft )
365
memset( img->data[i], color[i], ( ( ( img->linesize[i] * padtop ) +
366
padleft ) >> shift) );
369
if ( padleft || padright )
371
optr = img->data[i] + ( img->linesize[i] * ( padtop >> shift ) ) +
372
( img->linesize[i] - ( padright >> shift ) );
374
for ( y = 0; y < ( ( height - ( padtop + padbottom ) ) >> shift ); y++ )
376
memset( optr, color[i], ( padleft + padright ) >> shift );
377
optr += img->linesize[i];
383
optr = img->data[i] + ( img->linesize[i] * ( ( height - padbottom ) >> shift ) );
384
memset( optr, color[i], ( ( img->linesize[i] * padbottom ) >> shift ) );
389
#if LIBAVCODEC_BUILD < 4708
391
/* Workaround, because old libavcodec doesnt know how to padd */
393
static void img_resample_padd( ImgReSampleContext *s, AVPicture *output,
394
const AVPicture *input, int padtop, int padleft )
396
AVPicture nopadd_pic = *output;
398
/* shift out top and left padding for old ffmpeg */
399
nopadd_pic.data[0] += ( nopadd_pic.linesize[0] * padtop + padleft );
400
nopadd_pic.data[1] += ( nopadd_pic.linesize[1] * padtop + padleft ) >> 1;
401
nopadd_pic.data[2] += ( nopadd_pic.linesize[2] * padtop + padleft ) >> 1;
402
img_resample( s, &nopadd_pic, input );
408
/*****************************************************************************
409
* Do the processing here
410
*****************************************************************************/
411
static picture_t *Process( filter_t *p_filter, picture_t *p_pic )
413
filter_sys_t *p_sys = p_filter->p_sys;
414
AVPicture src_pic, dest_pic;
415
AVPicture *p_src, *p_dst;
416
picture_t *p_pic_dst;
419
/* Check if format properties changed */
420
if( CheckInit( p_filter ) != VLC_SUCCESS ) return 0;
422
/* Request output picture */
423
p_pic_dst = p_filter->pf_vout_buffer_new( p_filter );
426
msg_Warn( p_filter, "can't get output picture" );
427
if( p_pic->pf_release )
428
p_pic->pf_release( p_pic );
432
/* Prepare the AVPictures for the conversion */
433
for( i = 0; i < p_pic->i_planes; i++ )
435
src_pic.data[i] = p_pic->p[i].p_pixels;
436
src_pic.linesize[i] = p_pic->p[i].i_pitch;
438
for( i = 0; i < p_pic_dst->i_planes; i++ )
440
dest_pic.data[i] = p_pic_dst->p[i].p_pixels;
441
dest_pic.linesize[i] = p_pic_dst->p[i].i_pitch;
445
if( p_filter->fmt_in.video.i_chroma == VLC_FOURCC('Y','V','1','2') ||
446
p_filter->fmt_in.video.i_chroma == VLC_FOURCC('Y','V','U','9') )
449
src_pic.data[1] = p_pic->p[2].p_pixels;
450
src_pic.data[2] = p_pic->p[1].p_pixels;
452
if( p_filter->fmt_out.video.i_chroma == VLC_FOURCC('Y','V','1','2') ||
453
p_filter->fmt_out.video.i_chroma == VLC_FOURCC('Y','V','U','9') )
456
dest_pic.data[1] = p_pic_dst->p[2].p_pixels;
457
dest_pic.data[2] = p_pic_dst->p[1].p_pixels;
459
if( p_sys->i_src_ffmpeg_chroma == PIX_FMT_RGB24 )
460
if( p_filter->fmt_in.video.i_bmask == 0x00ff0000 )
461
p_sys->i_src_ffmpeg_chroma = PIX_FMT_BGR24;
465
if( p_sys->b_resize && p_sys->p_rsc )
468
if( p_sys->b_resize_first )
470
if( p_sys->b_convert ) p_dst = &p_sys->tmp_pic;
472
#if LIBAVCODEC_BUILD >= 4708
473
img_resample( p_sys->p_rsc, p_dst, p_src );
475
if ( p_sys->b_enable_croppadd )
477
img_resample_padd( p_sys->p_rsc, p_dst, p_src,
478
p_filter->fmt_out.video.i_y_offset,
479
p_filter->fmt_out.video.i_x_offset );
483
img_resample( p_sys->p_rsc, p_dst, p_src );
487
if (p_sys->b_enable_croppadd)
489
if (p_filter->fmt_out.video.i_visible_width != p_filter->fmt_out.video.i_width ||
490
p_filter->fmt_out.video.i_visible_height != p_filter->fmt_out.video.i_height ||
491
p_filter->fmt_out.video.i_x_offset != 0 ||
492
p_filter->fmt_out.video.i_y_offset != 0)
494
fill_pad_region(p_dst, p_filter->fmt_out.video.i_height,
495
p_filter->fmt_out.video.i_width,
496
p_filter->fmt_out.video.i_y_offset,
497
p_filter->fmt_out.video.i_height
498
- p_filter->fmt_out.video.i_visible_height
499
- p_filter->fmt_out.video.i_y_offset,
500
p_filter->fmt_out.video.i_x_offset,
501
p_filter->fmt_out.video.i_width
502
- p_filter->fmt_out.video.i_visible_width
503
- p_filter->fmt_out.video.i_x_offset,
512
if( p_sys->b_convert )
514
video_format_t *p_fmt = &p_filter->fmt_out.video;
516
if( p_sys->b_resize && !p_sys->b_resize_first )
518
p_dst = &p_sys->tmp_pic;
519
p_fmt = &p_filter->fmt_in.video;
522
img_convert( p_dst, p_sys->i_dst_ffmpeg_chroma,
523
p_src, p_sys->i_src_ffmpeg_chroma,
524
p_fmt->i_width, p_fmt->i_height );
529
if( p_sys->b_resize && !p_sys->b_resize_first && p_sys->p_rsc )
533
#if LIBAVCODEC_BUILD >= 4708
534
img_resample( p_sys->p_rsc, p_dst, p_src );
536
if ( p_sys->b_enable_croppadd )
538
img_resample_padd( p_sys->p_rsc, p_dst, p_src,
539
p_filter->fmt_out.video.i_y_offset,
540
p_filter->fmt_out.video.i_x_offset );
544
img_resample( p_sys->p_rsc, p_dst, p_src );
548
if (p_sys->b_enable_croppadd)
550
if (p_filter->fmt_out.video.i_visible_width != p_filter->fmt_out.video.i_width ||
551
p_filter->fmt_out.video.i_visible_height != p_filter->fmt_out.video.i_height ||
552
p_filter->fmt_out.video.i_x_offset != 0 ||
553
p_filter->fmt_out.video.i_y_offset != 0)
555
fill_pad_region(p_dst, p_filter->fmt_out.video.i_height,
556
p_filter->fmt_out.video.i_width,
557
p_filter->fmt_out.video.i_y_offset,
558
p_filter->fmt_out.video.i_height
559
- p_filter->fmt_out.video.i_visible_height
560
- p_filter->fmt_out.video.i_y_offset,
561
p_filter->fmt_out.video.i_x_offset,
562
p_filter->fmt_out.video.i_width
563
- p_filter->fmt_out.video.i_visible_width
564
- p_filter->fmt_out.video.i_x_offset,
570
/* Special case for RV32 -> YUVA */
571
if( !p_sys->b_resize &&
572
p_filter->fmt_in.video.i_chroma == VLC_FOURCC('R','V','3','2') &&
573
p_filter->fmt_out.video.i_chroma == VLC_FOURCC('Y','U','V','A') )
575
uint8_t *p_src = p_pic->p[0].p_pixels;
576
int i_src_pitch = p_pic->p[0].i_pitch;
577
uint8_t *p_dst = p_pic_dst->p[3].p_pixels;
578
int i_dst_pitch = p_pic_dst->p[3].i_pitch;
581
for( l = 0; l < p_filter->fmt_out.video.i_height; l++ )
583
for( j = 0; j < p_filter->fmt_out.video.i_width; j++ )
585
p_dst[j] = p_src[j*4+3];
587
p_src += i_src_pitch;
588
p_dst += i_dst_pitch;
591
else if( p_filter->fmt_out.video.i_chroma == VLC_FOURCC('Y','U','V','A') )
593
/* Special case for YUVA */
594
memset( p_pic_dst->p[3].p_pixels, 0xFF,
595
p_pic_dst->p[3].i_pitch * p_pic_dst->p[3].i_lines );
598
p_pic_dst->date = p_pic->date;
599
p_pic_dst->b_force = p_pic->b_force;
600
p_pic_dst->i_nb_fields = p_pic->i_nb_fields;
601
p_pic_dst->b_progressive = p_pic->b_progressive;
602
p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
604
if( p_pic->pf_release )
605
p_pic->pf_release( p_pic );
609
/*****************************************************************************
610
* OpenDeinterlace: probe the filter and return score
611
*****************************************************************************/
612
int E_(OpenDeinterlace)( vlc_object_t *p_this )
614
filter_t *p_filter = (filter_t*)p_this;
617
/* Check if we can handle that formats */
618
if( E_(GetFfmpegChroma)( p_filter->fmt_in.video.i_chroma ) < 0 )
623
/* Allocate the memory needed to store the decoder's structure */
624
if( ( p_filter->p_sys = p_sys =
625
(filter_sys_t *)malloc(sizeof(filter_sys_t)) ) == NULL )
627
msg_Err( p_filter, "out of memory" );
632
p_sys->i_src_ffmpeg_chroma =
633
E_(GetFfmpegChroma)( p_filter->fmt_in.video.i_chroma );
634
p_filter->pf_video_filter = Deinterlace;
636
msg_Dbg( p_filter, "deinterlacing" );
638
/* libavcodec needs to be initialized for some chroma conversions */
639
E_(InitLibavcodec)(p_this);
644
/*****************************************************************************
645
* CloseDeinterlace: clean up the filter
646
*****************************************************************************/
647
void E_(CloseDeinterlace)( vlc_object_t *p_this )
649
filter_t *p_filter = (filter_t*)p_this;
650
filter_sys_t *p_sys = p_filter->p_sys;
655
/*****************************************************************************
656
* Do the processing here
657
*****************************************************************************/
658
static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
660
filter_sys_t *p_sys = p_filter->p_sys;
661
AVPicture src_pic, dest_pic;
662
picture_t *p_pic_dst;
665
/* Request output picture */
666
p_pic_dst = p_filter->pf_vout_buffer_new( p_filter );
669
msg_Warn( p_filter, "can't get output picture" );
673
/* Prepare the AVPictures for the conversion */
674
for( i = 0; i < p_pic->i_planes; i++ )
676
src_pic.data[i] = p_pic->p[i].p_pixels;
677
src_pic.linesize[i] = p_pic->p[i].i_pitch;
679
for( i = 0; i < p_pic_dst->i_planes; i++ )
681
dest_pic.data[i] = p_pic_dst->p[i].p_pixels;
682
dest_pic.linesize[i] = p_pic_dst->p[i].i_pitch;
685
avpicture_deinterlace( &dest_pic, &src_pic, p_sys->i_src_ffmpeg_chroma,
686
p_filter->fmt_in.video.i_width,
687
p_filter->fmt_in.video.i_height );
689
p_pic_dst->date = p_pic->date;
690
p_pic_dst->b_force = p_pic->b_force;
691
p_pic_dst->i_nb_fields = p_pic->i_nb_fields;
692
p_pic_dst->b_progressive = VLC_TRUE;
693
p_pic_dst->b_top_field_first = p_pic->b_top_field_first;
695
if( p_pic->pf_release )
696
p_pic->pf_release( p_pic );