Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-47465

WinRT: On some hardware camera preview aspect ratio is not kept.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.0 RC
    • 5.5.0
    • Multimedia
    • None
    • Lumin 630
      Qt 5.5 and Qt 5.5 dev
    • WinRT
    • 1b957a05fe7daba4d4c4b9551dd5d71c6f77a47a

    Description

      Lumian 630 returns different source dimension than was requested.

      Steps:
      1. Compile and run declarative-camera example from multimedia
      2. Change between landscape and portrait mode
      Expected: Aspect ratio for camera preview is kept.
      Actual: Aspect ratio is different

      qwinrtcameravideorenderercontrol.cpp

          void blit(ID3D11Texture2D *texture)
          {
              HRESULT hr;
              D3D11_TEXTURE2D_DESC desc;
              texture->GetDesc(&desc);
              if (!m_videoEnumerator) {
                  D3D11_VIDEO_PROCESSOR_CONTENT_DESC videoProcessorDesc = {
                      D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE,
                      { 0 }, desc.Width, desc.Height,
                      { 0 }, desc.Width, desc.Height,
                      D3D11_VIDEO_USAGE_PLAYBACK_NORMAL
                  };
                  hr = m_videoDevice->CreateVideoProcessorEnumerator(&videoProcessorDesc, &m_videoEnumerator);
                  RETURN_VOID_IF_FAILED("Failed to create video enumerator");
              }
      ...
      

      desc.Width == 800 and desc.Height == 480 but qt backend requested the sample size to be 640x480.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            samuelnevala Samuel Nevala
            samuelnevala Samuel Nevala
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes