Forums - openmax IL

12 posts / 0 new
Last post
openmax IL
Luminix_Luminix
Join Date: 3 Mar 12
Posts: 7
Posted: Wed, 2012-03-14 21:42

I am meeting a problem when developing h.264 decoder on qualcom 8650.

After parsing the sps and pps, the dynamic port change event is occurred currently, but as I am starting to send DISABLE PORT cmd to the component, there is no response about this in callback func.

What is happened? is there any other condition to fix before sending DISABLEPORT cmd as component is EXECUTING?

Thanks.

  • Up0
  • Down0
Steve L (not verified)
Posted: Thu, 2012-03-15 10:51

Have you already attempted to run the video codec sample code as-is?  I recommend giving this a shot and then running a comparison between the sample code algorithm and your own, seeing where the call orders might differ and validating incrementally.

  • Up0
  • Down0
Luminix_Luminix
Join Date: 3 Mar 12
Posts: 7
Posted: Thu, 2012-03-22 03:34

Yes, I did the check. My program works fine at Android 2.2 on QSD serials, but not at 2.3 on MSM serials.

For H.264 decoder, in the initial process, I tested that DISABLE cmd works fine and callback is returned correctly after I freed the output port memory. However, after receiving port change event (after parsing sps pps),  when I send DISABLE cmd to output port, my program exited immediately and no callback is returned. I have no idea what happened about DISABLE cmd???????

Is it possible to give some specific suggestion for that?

Thank you very much.

  • Up0
  • Down0
Steve L (not verified)
Posted: Thu, 2012-03-22 09:30

Which devices did you test on that failed?  And was it consistently all 2.3 / MSM combinations?

  • Up0
  • Down0
Luminix_Luminix
Join Date: 3 Mar 12
Posts: 7
Posted: Thu, 2012-03-22 21:40

That seems right.

  • Up0
  • Down0
Steve L (not verified)
Posted: Fri, 2012-03-23 09:39

Okay.  I still need to know which devices you tested on that failed so I can see if we can replicate that behavior here.  Thanks.

  • Up0
  • Down0
Luminix_Luminix
Join Date: 3 Mar 12
Posts: 7
Posted: Sun, 2012-03-25 21:51

HTC G14 + ANDROID 2.3

The CPU is Qualcomm MSM8260.

After receiving PortChange msg in callback function, I send DISABLE command immediately, the program is crashed. I think there is a conflict between finishing fillbuffer command (FillBufferDone) and disable command.  

IIs there anything that need to be done between after receiving portchange and sending DISABLE port cmd? 

Thanks.

  • Up0
  • Down0
Steve L (not verified)
Posted: Mon, 2012-03-26 13:37

Do you mean HTC Sensation?  And you're running the sample code directly?  Are you testing from adb shell or through an apk?

In the logs, are you seeing it crash immediately upon calling disable, or do you first get the error message back that says "Unable to send command to disable port"?

  • Up0
  • Down0
Luminix_Luminix
Join Date: 3 Mar 12
Posts: 7
Posted: Tue, 2012-03-27 07:28

Yes. I am running a simplified sample code through an apk.

It crash immediately because of fillbuffer cmd I sent (in step3 below) before(I guess). Disable cmd works fine before portchange event comes(before step 3), which means before parsing sps, pps, disable port is working. 

Here is the procedure:

  (1) init, memory allocation and make component to be EXECUTING state.

  (2) INPUT sps pps, I ,P,P..... nalus into input buffers together, and each buffer contains one nalu.

  (3) send the cmd fillbuffer to all output buffers.

  (4) port change event comes correctly

  (5) send disable cmd to output buffers.

  (6) it crashes, no error log happens and sending command to disable port is OK. I do not think disable cmd makes it crash. I guess that fillbuffer cmd in step (3) could not work completely in order to return fillbuffer done message, BECAUSE I SEND DISABLE CMD TO OUTPUT. But I am not sure of that.

Plus, should I just send sps and pps two nalus into input buffers in step(2) and wait for the signal port change event (Step 4) and later(after re-enable the output port), I send following I, P, P,P nalus into input buffers??? Currently, I am inputting sps, pps, I, P, P,P... nalus into input buffers together in STEP 2 

If the steps I described above are all correct, is it possible that I send the demo example to you for some suggestion by Email? 

Thanks

 

  • Up0
  • Down0
Steve L (not verified)
Posted: Tue, 2012-03-27 09:29

Let's try an absolute base case first that we know works.  Can you build the sample code as-is (unsimplified) for Gingerbread but turn on LOG_VERBOSE?  Then feed it the same input that you're using.  See if it works.

I suspect the problem may be that you have to wait for all the port buffers to return after you've disabled the port, in effect flushing out all the commands before moving on to reconfiguring the port.  This is the contents of line 165 - 186 of QcomOmxInterfaceDecoder.cpp, which all occurs in the callback.  If this block fails (which you can track by the logging), then there may be a separate issue.

  • Up0
  • Down0
Luminix_Luminix
Join Date: 3 Mar 12
Posts: 7
Posted: Wed, 2012-03-28 01:44

Thanks. I will try that.

I check the lines you mentioned. Here comes a question I have to ask.

Is it possible that fillbufferdone msg will come before portchange event (before step 4)?

In my case, fillbufferdone msgs only come after sending disable cmd during portchange on android2.2 and fillbufferdone msgs come after disable port successfully. 

But on 2.3, fillbufferdone msg never come before sending disable cmd during portchange as well. Also,because it crashed after sending disable port cmd,  I have no idea fillbufferdone msgs come or not later.

Is it possible that fillbufferdone msg will come before portchange event (before step 4) or before successfully disabling port?

 

  • Up0
  • Down0
Re: openmax IL Best Answer
Luminix_Luminix
Join Date: 3 Mar 12
Posts: 7
Posted: Wed, 2012-03-28 20:25

I revised the code based on your suggestion,just using input codes from my own,  but it does not work as well. the fillbufferdone msg did not come (so as to post sem) as the program stopped at sem_wait during port change comes.

I have no idea what is wrong.

If I still use my program (there is no sem_wait during port change event comes), the program work fine in following chipests: 8650QSD, MSM7227, but not working on MSM8255 MSM8650 both on Android 2.2 and Android 2.3. If I use sem_wait, fillbufferdone did not come as port event changes.

Would you or other one contact me by luminix1999.at.hotmail.com since we are developping a product based on all serials of qualcom chipests?

By the way, Is it possible that fillbufferdone msg will come before portchange event (before step 4) or before successfully disabling port?

Thanks.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.