Direct show filter porting to i.MX6-WEC7

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Direct show filter porting to i.MX6-WEC7

Jump to solution
2,199 Views
Ashfaque
Contributor II

Hi all,

Currently i am porting the Direct show multimedia filters( VPU encoder/decode, source and parser filter) from i.MX27 to i.MX6 platform for Windows Embedded Compact 7.

There are changes in the VPU driver from the i.MX27 which are mapped for the i.MX6 platform.

Also Parser and VPU encoder/decoder filter in i.MX27 supports only MPEG4, H264 and H263 formats.

I would like to know once these filter dlls are obtained, how to integrate these filters with the Windows Media player in order to play the MP4 media container files which has MPEG4 or H264 encoded video data. All the dlls are registered in platform.reg and included in NK by adding in the platform.bib.

Do we need any other Software packages or parses in order to work with Media player?

Thanks in advance.

Regards,

Ashfaque

Labels (4)
1 Solution
1,278 Views
karina_valencia
NXP Apps Support
NXP Apps Support
Re: Direct show filter porting to i.MX6-WEC7

Lauren PostEmployee

There is a big difference between MX27 and MX6 and difficult to use MX27 as a baseline for MX6 work.  Is there any way to access something newer - even MX53 last BSP released?

To answer your question, the player is integrated by setting up your registry.  If you use a later release either MX53 it will show a more current registry integration for the multimedia. 

View solution in original post

0 Kudos
7 Replies
1,278 Views
LaurenPost
NXP Employee
NXP Employee

There are definitely some changes from i.MX27 to the i.MX6 both with supporting the new codecs added since i.MX27 as well as a few changes.

The biggest change from i.MX27 is the clear flag support.   After i.MX27 the VPU support added a feature that after a frame was decoded and received from Get Output api, the frame was locked for decoding until the frame was cleared using the VPU api.  This prevented issues from tearing and garbage.   So the dshow filter has to manage calling this API after it is sure that the frame buffer has been displayed.

Also the changes after i.MX27 for adding VC1 and other codecs.    It might be easier working with a i.MX51 dshow filter which has all these changes regarding the clearflag api.

As for parsers, if you are running based on the i.MX51 it would probably be much easier than starting with MX27 which had a limited set of parsers released.

1,278 Views
Ashfaque
Contributor II

Hi Lauren,

You are absolutely right. The major change is in the clearing of the Display buffer flag. With that along with the few other changes i am able to test the filter successfully with a FileSink renderer filter. I am able to get correct YUV data for several frames.

Now i am trying to integrate with the Video renderer filter which should display the video on LCD. As the video renderer fitler prefers the RGB data, I am using IPU Post-Processor for conversion from YUV12 to RGB565 based on the Test Applications provided in the support/TEST/PPTEST.

When the filter is waiting for the Post Processor EndOfFrame Interrupt, i am getting following prints from the PPClass.cpp and the video in getting played very badly, with lots of stuck.

PpClass::PpWaitForNotBusy : Waiting for PP FRAME_INTERRUPT time out!

Please let me know why the PP is not able to provide the EndOfFrame interrupt within 1 sec(configured ).

Do any other interface need to be used?

I am using Video renderer from i.MX53 platform as it should be generic component.

Regards,

Ashfaque

0 Kudos
1,278 Views
LaurenPost
NXP Employee
NXP Employee

Are you using multiple output buffers?   After i.MX27 we moved to a direct memory model where all the output buffers are shared with display.   With i.MX27 it flipped between 2 output buffers only.   Also make sure to create 2 extra buffers beyond the minimum buffers returned at vpu initialization.   When you allocate physical memory factor in the 2 extra buffers and that might help. 

1,278 Views
Ashfaque
Contributor II

Hi Lauren,

Thanks for your inputs, Yes 2 extra buffers are allocated as I had taken the reference of VPU Test applications provided by Freescale. The Decoder filter is working after the changes and able to render a H264 encoded file with DShow Test bench application.

I want to integrate this filter with other filters (parsers and Video renders) as to play with Media player application. Currently i am reusing the Video render filter from i.MX53. Please let me know how to proceed?

Thanks for your support.

Regards,

Ashfaque

0 Kudos
1,278 Views
LaurenPost
NXP Employee
NXP Employee

I don't have the WinCE code  to answer your questions exactly specific to WinCE.

One thing that i.MX6 has different is that the VPU must be programmed into streaming mode only - not file play mode as was used in previous VPU chilps.  File play mode assumes that only one frame is passed to VPU at a time.  For streaming mode, the input buffer must be filled and VPU detects frame boundaries.   If your current code is still based on file play mode that could affect performance as VPU is probably expecting more input data before it can decode the first frame.

The vpu test applications can show examples of how to switch between file play mode and streaming mode as it requires a couple of changes in initialization as well as input buffer management.

0 Kudos
1,278 Views
Ashfaque
Contributor II

Hi..

With the Latest Windows Embedded Compact 7 BSP release for i.MX6 Sabre Platform, PlayWnd is able to play the Media files without any issues. But when Windows Video Player cataloge item is added, the media file is not getting played by either PlayWnd or by Windows Video Player.

Also the release Workspace does not include any Cataloge item for Windows Video player.

Please let me know whether the Release BSP supports Media playback through Windows Video player or it just supports through PlayWnd only.

Regards,

Ashfaque

0 Kudos
1,279 Views
karina_valencia
NXP Apps Support
NXP Apps Support
Re: Direct show filter porting to i.MX6-WEC7

Lauren PostEmployee

There is a big difference between MX27 and MX6 and difficult to use MX27 as a baseline for MX6 work.  Is there any way to access something newer - even MX53 last BSP released?

To answer your question, the player is integrated by setting up your registry.  If you use a later release either MX53 it will show a more current registry integration for the multimedia. 

0 Kudos