]> git.sesse.net Git - vlc/commitdiff
codec/schroedinger: inform vlc of clean area
authorDavid Flynn <davidf@rd.bbc.co.uk>
Fri, 27 Mar 2009 20:37:57 +0000 (20:37 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 3 Apr 2009 09:10:34 +0000 (11:10 +0200)
For SD, this should allow removal of black bars form the edge of frames.
i_aspect is set to the aspect ratio of the whole frame which may be
greater than that of the clean area.  VLC should then calculate the SAR,
and eventually display a clean area sized picture that is of the correct
aspect ratio.

NB, we do actually know the SAR, but it isn't known if vlc cares at this
point.

Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/schroedinger.c

index 83409edf4175e0614e65a971f09e78fbaf1a9a2e..cf81333fa3e3e3f960751f5db7d3b361c16bc634 100644 (file)
@@ -153,10 +153,12 @@ static void SetVideoFormat( decoder_t *p_dec )
         break;
     }
 
-    p_dec->fmt_out.video.i_visible_width =
+    p_dec->fmt_out.video.i_visible_width = p_sys->p_format->clean_width;
+    p_dec->fmt_out.video.i_x_offset = p_sys->p_format->left_offset;
     p_dec->fmt_out.video.i_width = p_sys->p_format->width;
 
-    p_dec->fmt_out.video.i_visible_height =
+    p_dec->fmt_out.video.i_visible_height = p_sys->p_format->clean_height;
+    p_dec->fmt_out.video.i_y_offset = p_sys->p_format->top_offset;
     p_dec->fmt_out.video.i_height = p_sys->p_format->height;
 
     /* aspect_ratio_[numerator|denominator] describes the pixel aspect ratio */