Issue in mp4 video in IMX6Q/DL

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in mp4 video in IMX6Q/DL

Jump to solution
658 Views
KeshavaGN
Contributor V

Hi,

I'm trying to play 1080p MP4 video on WEC7 (Windows Embedded Compact 7)

I understand that there is no support for WinCE by NXP. I see lesser replies too.

So this question is more in general (Linux, or any OS) on iMX6 CPU.

So, the setup is, "multi-monitor" (extended mode) in WEC7. The screen will be taken as large combination of two displays.

I'm using two displays of different resolution. Primary is LCD with 800x480 (IPU1 DI0) and secondary is HDMI with 1920x1080 (IPU1 DI1).

Display is working fine and I'm able to get basic setup working.

The issue is, when I try to play video (MP4) of any resolution (on primary monitor alone), which uses hardware codec- VPU, it is not playing properly, I'm seeing high distortions. This even spreads to secondary display.

I've attached a pic for understanding.

This issue is not there if the secondary monitor is below 1024x768 resolution.

What could be the issue? Anything related to VPU, as this setup works fine for normal display?

Or related to IPU? Why higher resolution would cause this?

0 Kudos
1 Solution
280 Views
KeshavaGN
Contributor V

Hi all,

Below is some additional info. This must be common in all OSs, I assume. It's closely related to iMX6's IPU driver.

While debugging this issue, I came across this code patch in \WINCE700\platform\common\src\soc\COMMON_FSL_V3\IPUV3\DISPLAY\display.cpp

if ((dwWidth * 32 * iScale) < (4 * 128))
    {
        DEBUGMSG(1, (TEXT("%s: IDMAC frame width is too small! DMFC FIFO size must be smaller than frame width * 2.\r\n"), __WFUNCTION__));
        // Use smallest setting and hope that it works.
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_4x128;
    }
    else if ((dwWidth * 32 * iScale) < (8 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_4x128;
    }
    else if ((dwWidth * 32 * iScale) < (16 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_8x128;
    }
    else if ((dwWidth * 32 * iScale) < (32 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_16x128;
    }
    else if ((dwWidth * 32 * iScale) < (64 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_32x128;
    }
    else if ((dwWidth * 32 * iScale) < (128 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_64x128;
    }
    else if (dwWidth > 1024)
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_256x128; //1
    }
    else
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_64x128;    //2
    }

Here, In higher resolution case, FIFOSize is set as 1. This this case, issue is observed. If I set the FIFOSize to 2 (even for >1024 case), issue is not observed. But not understanding why this is causing issue in multi-monitor scenario!

Please let me know your ideas/suggestions on this, if any.

Thanks.
With regards,
Keshava

View solution in original post

0 Kudos
4 Replies
280 Views
joanxie
NXP TechSupport
NXP TechSupport

it seems that this issue belongs to WEC, in linux, I tested dual display lcd+hdmi, the first display lcd is WVGA and the second display hdim is 1080p, dual display successfully.

0 Kudos
280 Views
KeshavaGN
Contributor V

Hi joanxie‌,

Thanks for the reply.

Yes, I understand that issue is in WEC, as this feature itself is not supported natively in WEC.

I'm trying to implement this by modifying existing driver.

What is your suggestion on the issue, that, the monitors are appearing and I'm seeing the image on both the monitors, but Video playing using VPU HW codec (MP4) is failing (on primary LCD monitor), if HDMI is configured at FHD?

Also, I'm seeing this code (https://lxr.missinglinkelectronics.com/uboot/drivers/video/ipu_disp.c ) for Linux.

Here, dmfc_wr_chan and dmfc_dp_chan are being set in function _ipu_dmfc_init. Can you check and let me know how it will set for Dual monitor (LCD and HDMI FHD)? I'm not able to visualize and not able to test as I don't have Linux for my board right now.

Thanks a lot for the help

Keshava

0 Kudos
280 Views
KeshavaGN
Contributor V

also, I'm seeing similarity with this issue: https://community.nxp.com/thread/444029  But not able to get any resolution in that thread. Thanks

0 Kudos
281 Views
KeshavaGN
Contributor V

Hi all,

Below is some additional info. This must be common in all OSs, I assume. It's closely related to iMX6's IPU driver.

While debugging this issue, I came across this code patch in \WINCE700\platform\common\src\soc\COMMON_FSL_V3\IPUV3\DISPLAY\display.cpp

if ((dwWidth * 32 * iScale) < (4 * 128))
    {
        DEBUGMSG(1, (TEXT("%s: IDMAC frame width is too small! DMFC FIFO size must be smaller than frame width * 2.\r\n"), __WFUNCTION__));
        // Use smallest setting and hope that it works.
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_4x128;
    }
    else if ((dwWidth * 32 * iScale) < (8 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_4x128;
    }
    else if ((dwWidth * 32 * iScale) < (16 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_8x128;
    }
    else if ((dwWidth * 32 * iScale) < (32 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_16x128;
    }
    else if ((dwWidth * 32 * iScale) < (64 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_32x128;
    }
    else if ((dwWidth * 32 * iScale) < (128 * 128))
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_64x128;
    }
    else if (dwWidth > 1024)
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_256x128; //1
    }
    else
    {
        dmfcData.FIFOSize = IPU_DMFC_CHAN_DMFC_FIFO_SIZE_64x128;    //2
    }

Here, In higher resolution case, FIFOSize is set as 1. This this case, issue is observed. If I set the FIFOSize to 2 (even for >1024 case), issue is not observed. But not understanding why this is causing issue in multi-monitor scenario!

Please let me know your ideas/suggestions on this, if any.

Thanks.
With regards,
Keshava

View solution in original post

0 Kudos