Commit a5f23e84 authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_filter/deinterlace.c: fixed aspect-ratio + pass on cropping...

* modules/video_filter/deinterlace.c: fixed aspect-ratio + pass on cropping info (could be optimized to only deinterlace cropped part).
parent bc9929ee
...@@ -319,6 +319,7 @@ static int Init( vout_thread_t *p_vout ) ...@@ -319,6 +319,7 @@ static int Init( vout_thread_t *p_vout )
p_vout->output.i_width = p_vout->render.i_width; p_vout->output.i_width = p_vout->render.i_width;
p_vout->output.i_height = p_vout->render.i_height; p_vout->output.i_height = p_vout->render.i_height;
p_vout->output.i_aspect = p_vout->render.i_aspect; p_vout->output.i_aspect = p_vout->render.i_aspect;
p_vout->fmt_out = p_vout->fmt_in;
break; break;
default: default:
...@@ -358,13 +359,7 @@ static vout_thread_t *SpawnRealVout( vout_thread_t *p_vout ) ...@@ -358,13 +359,7 @@ static vout_thread_t *SpawnRealVout( vout_thread_t *p_vout )
msg_Dbg( p_vout, "spawning the real video output" ); msg_Dbg( p_vout, "spawning the real video output" );
fmt.i_width = fmt.i_visible_width = p_vout->output.i_width; fmt = p_vout->fmt_out;
fmt.i_height = fmt.i_visible_height = p_vout->output.i_height;
fmt.i_x_offset = fmt.i_y_offset = 0;
fmt.i_chroma = p_vout->output.i_chroma;
fmt.i_aspect = p_vout->output.i_aspect;
fmt.i_sar_num = p_vout->output.i_aspect * fmt.i_height / fmt.i_width;
fmt.i_sar_den = VOUT_ASPECT_FACTOR;
switch( p_vout->render.i_chroma ) switch( p_vout->render.i_chroma )
{ {
...@@ -375,7 +370,8 @@ static vout_thread_t *SpawnRealVout( vout_thread_t *p_vout ) ...@@ -375,7 +370,8 @@ static vout_thread_t *SpawnRealVout( vout_thread_t *p_vout )
{ {
case DEINTERLACE_MEAN: case DEINTERLACE_MEAN:
case DEINTERLACE_DISCARD: case DEINTERLACE_DISCARD:
fmt.i_height = fmt.i_visible_height = p_vout->output.i_height / 2; fmt.i_height /= 2; fmt.i_visible_height /= 2; fmt.i_y_offset /= 2;
fmt.i_aspect /= 2; fmt.i_sar_den *= 2;
p_real_vout = vout_Create( p_vout, &fmt ); p_real_vout = vout_Create( p_vout, &fmt );
break; break;
......
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