<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xine-lib/src/video_out, branch 1.1.7</title>
<subtitle>xine-lib git mirror
</subtitle>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/'/>
<entry>
<title>[PATCH] video_out_fb crash</title>
<updated>2007-06-05T23:39:12+00:00</updated>
<author>
<name>Steve Freeland</name>
<email>caucasatron@yahoo.ca</email>
</author>
<published>2007-06-05T23:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=6f430a25e9cd653fdb6995ae4e427ea6be0d8c3a'/>
<id>6f430a25e9cd653fdb6995ae4e427ea6be0d8c3a</id>
<content type='text'>
I discovered some problems with the framebuffer output driver.  The first
problem I had was a segfault when trying to play a 480x360 clip on a 640x480
display.  I traced it to the yuv420_rgb16() color conversion function, which
was overrunning the input buffer (the "y" part of the image).  The reason
was that it was being called downstack from fb_frame_proc_slice(), multiple
times for each 16-pixel high horizontal slice of the image.  When it got to
the last slice, only 8 pixels were left to the bottom but it still tried to
process a 16-pixel high slice.

Nosing around a bit, I compared the configuration of the color converter as
used by the fb driver to the xshm driver and found some oddities:

1) The color converter was configured with a "source height" of 16 pixels no
matter what the size of the image, and a "dest height" based on what was
referred to within video_out_fb.c as a "stripe" -- essentially an input
slice scaled up or down as required by the output size.
2) Apparently to prevent the above from causing problems, the position in
the output buffer was managed by special code -- see the "stripe_incr"
variable.
3) The xshm driver calls yuv2rgb_next_slice() with a NULL argument at the
beginning of each frame to allow the color converter to reset its tracking
of the slice-by-slice progress through the image; the fb driver does not.

I'm not sure exactly why it was done that way, but my best guess would be
that whoever coded it didn't know about the need to call
yuv2rgb_next_slice() with a NULL argument, and the rest was built up to get
it to mostly work without that.

The attached patch changes the behaviour to match that of the xshm driver,
and also removes the reset_dest_pointers() function, replacing its single
invocation with one to fb_frame_field(), which is identical after removing
the "stripe" management.

It fixed my crash.  Can anyone see if I've misunderstood what was going on?
If not, it should probably be applied to the official version.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I discovered some problems with the framebuffer output driver.  The first
problem I had was a segfault when trying to play a 480x360 clip on a 640x480
display.  I traced it to the yuv420_rgb16() color conversion function, which
was overrunning the input buffer (the "y" part of the image).  The reason
was that it was being called downstack from fb_frame_proc_slice(), multiple
times for each 16-pixel high horizontal slice of the image.  When it got to
the last slice, only 8 pixels were left to the bottom but it still tried to
process a 16-pixel high slice.

Nosing around a bit, I compared the configuration of the color converter as
used by the fb driver to the xshm driver and found some oddities:

1) The color converter was configured with a "source height" of 16 pixels no
matter what the size of the image, and a "dest height" based on what was
referred to within video_out_fb.c as a "stripe" -- essentially an input
slice scaled up or down as required by the output size.
2) Apparently to prevent the above from causing problems, the position in
the output buffer was managed by special code -- see the "stripe_incr"
variable.
3) The xshm driver calls yuv2rgb_next_slice() with a NULL argument at the
beginning of each frame to allow the color converter to reset its tracking
of the slice-by-slice progress through the image; the fb driver does not.

I'm not sure exactly why it was done that way, but my best guess would be
that whoever coded it didn't know about the need to call
yuv2rgb_next_slice() with a NULL argument, and the rest was built up to get
it to mostly work without that.

The attached patch changes the behaviour to match that of the xshm driver,
and also removes the reset_dest_pointers() function, replacing its single
invocation with one to fb_frame_field(), which is identical after removing
the "stripe" management.

It fixed my crash.  Can anyone see if I've misunderstood what was going on?
If not, it should probably be applied to the official version.
</pre>
</div>
</content>
</entry>
<entry>
<title>Port Simon Farnsworth's xv deinterlacing fix to xcbxv.</title>
<updated>2007-06-01T16:48:18+00:00</updated>
<author>
<name>Darren Salt</name>
<email>linux@youmustbejoking.demon.co.uk</email>
</author>
<published>2007-06-01T16:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=40bb772fadfdad2d08c4b5c7c8c02d9fdc1963b5'/>
<id>40bb772fadfdad2d08c4b5c7c8c02d9fdc1963b5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert comments (and the occasional string where it doesn't matter) to UTF-8.</title>
<updated>2007-05-16T23:24:21+00:00</updated>
<author>
<name>Darren Salt</name>
<email>linux@youmustbejoking.demon.co.uk</email>
</author>
<published>2007-05-16T23:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=5f170aeb405f44ce67bf8827494c2a933b3e3241'/>
<id>5f170aeb405f44ce67bf8827494c2a933b3e3241</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Enhance logging in demux_ts, input_dvb and video_out_xv</title>
<updated>2007-05-02T16:23:48+00:00</updated>
<author>
<name>Simon Farnsworth</name>
<email>simon.farnsworth@onelan.co.uk</email>
</author>
<published>2007-05-02T16:23:48+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=84133d2fad4c392de75d41d88a19850734ea5523'/>
<id>84133d2fad4c392de75d41d88a19850734ea5523</id>
<content type='text'>
The three attached patches (against 1.1.6) each increase the amount of
debug logging in their respective components. We've found the extra
logging useful when trying to track down faults.

I've split this into three patches to make it easier to apply only some
of our changes.
--
Comments welcome,

Simon Farnsworth
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The three attached patches (against 1.1.6) each increase the amount of
debug logging in their respective components. We've found the extra
logging useful when trying to track down faults.

I've split this into three patches to make it easier to apply only some
of our changes.
--
Comments welcome,

Simon Farnsworth
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Fix deinterlacing in video_out_xv.c</title>
<updated>2007-05-04T17:25:14+00:00</updated>
<author>
<name>Simon Farnsworth</name>
<email>simon.farnsworth@onelan.co.uk</email>
</author>
<published>2007-05-04T17:25:14+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=213eac661441a9c482f280c5cb5ec63240c8d29e'/>
<id>213eac661441a9c482f280c5cb5ec63240c8d29e</id>
<content type='text'>
Xv drivers are permitted to return a bigger image than we asked for, to
work around hardware constraints. If this happens, 1.1.6's video_out_xv
cannot deinterlace properly. Fix this by deinterlacing based on the
width of the Xv image; the Xv driver will discard the extra horizontal data.

Without this patch, you get a barber-pole effect if the input video is
interlaced *and* the Xv driver chooses to round up the width of the
requested image.
--
Simon Farnsworth
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Xv drivers are permitted to return a bigger image than we asked for, to
work around hardware constraints. If this happens, 1.1.6's video_out_xv
cannot deinterlace properly. Fix this by deinterlacing based on the
width of the Xv image; the Xv driver will discard the extra horizontal data.

Without this patch, you get a barber-pole effect if the input video is
interlaced *and* the Xv driver chooses to round up the width of the
requested image.
--
Simon Farnsworth
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge Reinhard Nissl's xxmc fixes and related changes.</title>
<updated>2007-05-06T13:54:30+00:00</updated>
<author>
<name>Darren Salt</name>
<email>linux@youmustbejoking.demon.co.uk</email>
</author>
<published>2007-05-06T13:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=9f0ee3dfe65977d83447d5412793d2cdcece6c38'/>
<id>9f0ee3dfe65977d83447d5412793d2cdcece6c38</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove #ifdef wrappers from the Xv &amp; XcbXv plugins. Allows XcbXv to be built.</title>
<updated>2007-04-13T23:33:12+00:00</updated>
<author>
<name>Darren Salt</name>
<email>linux@youmustbejoking.demon.co.uk</email>
</author>
<published>2007-04-13T23:33:12+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=638fbcc93c675844c1c337518eb00db65d65d563'/>
<id>638fbcc93c675844c1c337518eb00db65d65d563</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable bob deinterlacing on a per frame decision (continued).</title>
<updated>2007-04-12T22:01:57+00:00</updated>
<author>
<name>Reinhard Nißl</name>
<email>rnissl@gmx.de</email>
</author>
<published>2007-04-12T22:01:57+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=42db183b596601354643b6e8f4997109b2324f6d'/>
<id>42db183b596601354643b6e8f4997109b2324f6d</id>
<content type='text'>
One can assume that a still frame is to show when there are no more
frames left to display.
The changed code uses _x_query_buffer_usage() to retrieve the number
of frames waiting to be displayed to integrate this information into
the decision.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One can assume that a still frame is to show when there are no more
frames left to display.
The changed code uses _x_query_buffer_usage() to retrieve the number
of frames waiting to be displayed to integrate this information into
the decision.
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable bob deinterlacing on a per frame decision.</title>
<updated>2007-04-12T21:51:04+00:00</updated>
<author>
<name>Reinhard Nißl</name>
<email>rnissl@gmx.de</email>
</author>
<published>2007-04-12T21:51:04+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=60871f034457fb6727df480c311b76e81a4ca6fb'/>
<id>60871f034457fb6727df480c311b76e81a4ca6fb</id>
<content type='text'>
There are some situations where bob deinterlacing doesn't make much
sense, as the effect doesn't work for example for slow motion. And
in fast motion mode, the sleep between displaying the two fields
lowers the reachable fast motion frame rate. Another annoying effect
is the reduction in vertical resolution for still images.
The changed code tries to detect such issues and disables bob
deinterlacing for such frames. The detection of still images is
still to come.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are some situations where bob deinterlacing doesn't make much
sense, as the effect doesn't work for example for slow motion. And
in fast motion mode, the sleep between displaying the two fields
lowers the reachable fast motion frame rate. Another annoying effect
is the reduction in vertical resolution for still images.
The changed code tries to detect such issues and disables bob
deinterlacing for such frames. The detection of still images is
still to come.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make bob deinterlacing more precisely and skip it on demand.</title>
<updated>2007-04-12T21:36:51+00:00</updated>
<author>
<name>Reinhard Nißl</name>
<email>rnissl@gmx.de</email>
</author>
<published>2007-04-12T21:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://vdr-projects.e-tobi.net/git/xine-lib/commit/?id=7b50cbef25c8e2769bfbdd801b7318bb86047f87'/>
<id>7b50cbef25c8e2769bfbdd801b7318bb86047f87</id>
<content type='text'>
Bob deinterlacing is implemented as showing the top field, sleeping
for half the frame duration and showing the bottom field. Most
drivers tend to synchronize displaying a field on the VBI and thus
displaying a field may take up to half the frame duration in certain
cases.
According to the original code, the sleep took always half the
frame duration and therefore the second field could get displayed
too late. As a result, the driver was syncing to VBI most often,
so that things got even worse.
The changed code now calculates the sleep time in a way that the
second field gets displayed half the frame duration after the
first field. Moreover, it monitors how much time was spent to
display the first field and when this time exceeds 75 % of the
field time (= half the frame time), it skips displaying the second
field, as usually this is an indicator that the driver has no
more frame buffers left. So displaying the second field would just
make things go worse.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bob deinterlacing is implemented as showing the top field, sleeping
for half the frame duration and showing the bottom field. Most
drivers tend to synchronize displaying a field on the VBI and thus
displaying a field may take up to half the frame duration in certain
cases.
According to the original code, the sleep took always half the
frame duration and therefore the second field could get displayed
too late. As a result, the driver was syncing to VBI most often,
so that things got even worse.
The changed code now calculates the sleep time in a way that the
second field gets displayed half the frame duration after the
first field. Moreover, it monitors how much time was spent to
display the first field and when this time exceeds 75 % of the
field time (= half the frame time), it skips displaying the second
field, as usually this is an indicator that the driver has no
more frame buffers left. So displaying the second field would just
make things go worse.
</pre>
</div>
</content>
</entry>
</feed>
