Uploaded image for project: 'MediaPortal 1'
  1. MediaPortal 1
  2. MP1-3205

DVB subtitle on HD channel can cause stutter

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.1.0 RC 1
    • 1.0.2
    • DVBSub2
    • 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];
                  }
                }
              }

      Attachments

        Activity

          People

            tourettes tourettes (Inactive)
            tourettes tourettes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: