This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can buffer alloced by Utils_memBitBufAlloc share to A8?

Other Parts Discussed in Thread: SYSBIOS

Hi

I need to decode frame data and send to A8 to do other something.

But I doesn't want to use Utils_bitbufGetEmptyBuf!

So I  alloc a buffer using memBitBufAlloc , But I cann't received any data from DSP in A8.

is must using bitbufGetEmptyBuf to share buffer to A8? 

is there other method to do that?

How to increate bitbufGetEmptyBuf buffer size?

 

Thanks.

 

  • BitBuf is allocated from SR0. Refer Utils_mem.c. You need to do adjust memory map to have more memory for SR0.

  • Hi Sivagamy:

    Thanks very miuch!

    So if i share data to A8, i must use Utils_bitbufGetEmptyBuf?

    And I want to set buffer size for Utils_bitbufGetEmptyBuf, how to do ?

     

    Thanks.

  • 1. Refer the bitBuf usage in encLink_common.c.

    2. If you want to increase the memory used for bitBuf, you will have increase SR 0 size.

     

  • Hi Sivagamy:

    I donn't understand what you say!

    Because I only want to increate the buffer size which I call bitbufGetEmptyBuf, bitbufGetEmptyBuf returned!

     For example, when called bitbufGetEmptyBuf, it will return pOutBuf that contain405504 size. I want to it contain 1M memory size.

    is it possible?

  • Which bitBuf Handle are you using when you call Utils_bitbufGetEmptyBuf()?

    BitBuf queue creation is done via these steps-

    1. Create a queue - Utils_bitbufCreate() which just creates queue elements.

    2. Allocate memory for individual buffers using Utils_memBitBufAlloc(). This is where buffer size comes into picture

    3. Put individual buffers into bit buf queue using Utils_bitbufPutEmptyBuf().

    4. Steps 2 & 3 has to be done for required no. of buffers

    5. Later when you call Utils_bitbufGetEmptyBuf, the buffers returned will have the same size as used in Step 2.

    Hope you understand how this mechanism works. Reference in encoder link. I am not sure of your usage. Give a clear picture of what you are trying to do.

  • If you want to get decoded frame data on A8 use ipcFramesOutLink -> ipcFramesInHost link connection. No other changes are required. Any change like trying to do Utils_memAlloc and trying to do memcpy are wrong and will not work.

  • Hi Sivagamy:

    Thanks. I will try it.

    Using these step, then

    1 Utils_bitbufGetEmptyBuf(bufOutQue, &pOutBuf, 0, BIOS_NO_WAIT); 

    2 encode

    3 ti_sysbios_family_c64p_Cache_wb(pOutBuf->addr, pOutBuf->fillLength, ti_sysbios_family_c64p_Cache_Type_ALL,FALSE);

    4 System_sendLinkCmd(pObj->outQueParams[ALG_LINK_SCD_OUT_QUE].nextLink,SYSTEM_CMD_NEW_DATA);

     

    in Step 1, the pOutBuf that returned is the buffer I alloc?

     

  • Hi Badri:

    Thanks very much!

    Using pOutBuf that alloced by Utils_bitbufGetEmptyBuf(bufOutQue, &pOutBuf, 0, BIOS_NO_WAIT),

    I can encode and compress frame data.

    But sometimes I found that UV data will wrong, as you tell me before, I think buffer may be collapse!

    But Why UV data collapse? So I guess may be buffer not enough.

    Is it possible?

    Can you help me to deal with UV data wrong(sometimes)?

    Thanks.