[vlc-devel] Fixes for HDTV grey line bug
Marian Durkovic
md at bts.sk
Sat Oct 15 11:10:58 CEST 2005
Hi all,
in an attempt to fix the annoying HDTV grey line bug (caused by displaying
1088 lines instead of only 1080 real lines) I've found the following
changesets:
https://trac.videolan.org/vlc/changeset/10160
https://trac.videolan.org/vlc/changeset/10161
Looking at the video output modules, seems only the ones which deliver
more than 1 direct buffer are affected (namely xvideo and sdl, are there
others?). The modules which deliver only 1 direct buffer (e.g. directx)
and go through memcpy work fine, also indirect rendering works of course.
For the mentioned ones, the fixes seem to be quite simple:
xvideo:
-------
make sure that the buffer width/height is aligned to a multiple of 16,
xvideo handles cropping automatically.
The following code solves the problem, it needs to be put into
modules/video_output/x11/xcommon.c, functions CreateShmImage() and
CreateImage() - just under #ifdef MODULE_NAME_IS_xvideo
/* Make sure the buffer is aligned to multiple of 16 */
i_height = ( i_height + 15 ) >> 4 << 4;
i_width = ( i_width + 15 ) >> 4 << 4;
sdl:
----
unfortunately sdl doesn't seem to be able of cropping the buffer, so the
only solution seems to be reducing number of direct buffers to 1 in
modules/video_output/sdl.c:
#define SDL_MAX_DIRECTBUFFERS 1
With the above changes, changeset 10160 could be reapplied, but it needs
to be enhanced with the following check, since some broadcasters ignore
the MPEG2 spec:
if( i_height == 1088 )
{
i_height = 1080;
msg_Warn( p_vout, "Incorrect HDTV stream - reducing height to 1080");
}
With kind regards,
M.
--------------------------------------------------------------------------
---- ----
---- Marian Durkovic network manager ----
---- ----
---- Slovak Technical University Tel: +421 2 524 51 301 ----
---- Computer Centre, Nam. Slobody 17 Fax: +421 2 524 94 351 ----
---- 812 43 Bratislava, Slovak Republic E-mail/sip: md at bts.sk ----
---- ----
--------------------------------------------------------------------------
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list