Commit 21e527a0 authored by Laurent Aimar's avatar Laurent Aimar

Used video_format_ScaleCropAr in scale.c/swscale.c

parent 9cf0b9d4
...@@ -67,6 +67,7 @@ static int OpenFilter( vlc_object_t *p_this ) ...@@ -67,6 +67,7 @@ static int OpenFilter( vlc_object_t *p_this )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
video_format_ScaleCropAr( &p_filter->fmt_out.video, &p_filter->fmt_in.video );
p_filter->pf_video_filter = Filter; p_filter->pf_video_filter = Filter;
msg_Dbg( p_filter, "%ix%i -> %ix%i", p_filter->fmt_in.video.i_width, msg_Dbg( p_filter, "%ix%i -> %ix%i", p_filter->fmt_in.video.i_width,
...@@ -94,6 +95,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) ...@@ -94,6 +95,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
(p_filter->fmt_out.video.i_width == 0) ) (p_filter->fmt_out.video.i_width == 0) )
return NULL; return NULL;
video_format_ScaleCropAr( &p_filter->fmt_out.video, &p_filter->fmt_in.video );
/* Request output picture */ /* Request output picture */
p_pic_dst = filter_NewPicture( p_filter ); p_pic_dst = filter_NewPicture( p_filter );
if( !p_pic_dst ) if( !p_pic_dst )
......
...@@ -347,7 +347,7 @@ static int Init( filter_t *p_filter ) ...@@ -347,7 +347,7 @@ static int Init( filter_t *p_filter )
{ {
filter_sys_t *p_sys = p_filter->p_sys; filter_sys_t *p_sys = p_filter->p_sys;
const video_format_t *p_fmti = &p_filter->fmt_in.video; const video_format_t *p_fmti = &p_filter->fmt_in.video;
const video_format_t *p_fmto = &p_filter->fmt_out.video; video_format_t *p_fmto = &p_filter->fmt_out.video;
if( IsFmtSimilar( p_fmti, &p_sys->fmt_in ) && if( IsFmtSimilar( p_fmti, &p_sys->fmt_in ) &&
IsFmtSimilar( p_fmto, &p_sys->fmt_out ) && IsFmtSimilar( p_fmto, &p_sys->fmt_out ) &&
...@@ -424,6 +424,7 @@ static int Init( filter_t *p_filter ) ...@@ -424,6 +424,7 @@ static int Init( filter_t *p_filter )
p_sys->b_swap_uvi = cfg.b_swap_uvi; p_sys->b_swap_uvi = cfg.b_swap_uvi;
p_sys->b_swap_uvo = cfg.b_swap_uvo; p_sys->b_swap_uvo = cfg.b_swap_uvo;
video_format_ScaleCropAr( p_fmto, p_fmti );
#if 0 #if 0
msg_Dbg( p_filter, "%ix%i chroma: %4.4s -> %ix%i chroma: %4.4s extend by %d", msg_Dbg( p_filter, "%ix%i chroma: %4.4s -> %ix%i chroma: %4.4s extend by %d",
p_fmti->i_width, p_fmti->i_height, (char *)&p_fmti->i_chroma, p_fmti->i_width, p_fmti->i_height, (char *)&p_fmti->i_chroma,
......
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