Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.0.2
-
None
-
Operating System: Windows 7
Platform: Intel
Description
When HD TV channel has DVB bitmap subtitles it is possible that users are seeing slight periodic stuttering on times when the new subtitle is displayed.
h4. Additional Information
Root cause for this issue is that subtitle bitmap to D3D texture copying is done on the rendering pass. And on slower CPUs the time spend on rendering the frame might be too long.
To solve this issue properly, it would be best if the DVBSub2.ax filter would already provide a directx texture, so MP side doesn't have to handle the copying. DVBSub2.ax filter's processing is running in a different thread than the rendering is done so it wont affect the frame rate video is rendered.
CPU usage comes from:
private void SetSubtitle(Subtitle subtitle)
...
// Quick copy of content
unsafe
{
byte* to = (byte*)a.InternalDataPointer;
byte* from = (byte*)bd.Scan0.ToPointer();
for (int y = 0; y < bd.Height; ++y)
{
for (int x = 0; x < bd.Width * 4; ++x)
{
to[pitch * y + x] = from[y * bd.Stride + x];
}
}
}
h4. Additional Information
Root cause for this issue is that subtitle bitmap to D3D texture copying is done on the rendering pass. And on slower CPUs the time spend on rendering the frame might be too long.
To solve this issue properly, it would be best if the DVBSub2.ax filter would already provide a directx texture, so MP side doesn't have to handle the copying. DVBSub2.ax filter's processing is running in a different thread than the rendering is done so it wont affect the frame rate video is rendered.
CPU usage comes from:
private void SetSubtitle(Subtitle subtitle)
...
// Quick copy of content
unsafe
{
byte* to = (byte*)a.InternalDataPointer;
byte* from = (byte*)bd.Scan0.ToPointer();
for (int y = 0; y < bd.Height; ++y)
{
for (int x = 0; x < bd.Width * 4; ++x)
{
to[pitch * y + x] = from[y * bd.Stride + x];
}
}
}