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.

memory organization problem

hi,

as i continue working on the video_preview example i was looking in the memory of the frame buffers.

  if (status == 0) {
    FVID_queue(hGioVpfeCcdc, frameBuffTable[0]);
    FVID_queue(hGioVpfeCcdc, frameBuffTable[1]);
    FVID_queue(hGioVpfeCcdc, frameBuffTable[2]);
  }

  /* prime up the video display channel */
  if (status == 0) {
    FVID_queue(hGioVpbeVid0, frameBuffTable[3]);
    FVID_queue(hGioVpbeVid0, frameBuffTable[4]);
    FVID_queue(hGioVpbeVid0, frameBuffTable[5]);

 

as i notice the buffers get this location in the memory:

frameBuffTable[0] = 0x800003E0
frameBuffTable[1] = 0x80000420
frameBuffTable[2] = 0x80195480
frameBuffTable[3] = 0x801954C0
frameBuffTable[4] = 0x8032A500
frameBuffTable[5] = 0x8032A540

why the size beetwen them is not the same should the size of the frame be always the same?

 

another qesion is come when i am looking on the order the  &frameBuffPtr take the buffers, for some reason it take in that order:

frameBuffTable[1] = 0x80000420
frameBuffTable[2] = 0x80195480
frameBuffTable[0] = 0x800003E0
frameBuffTable[3] = 0x801954C0
frameBuffTable[4] = 0x8032A500
frameBuffTable[5] = 0x8032A540

why the order is not correct and messy?

 

another question that also conect to the memory is, where the image itself being stored? (i am very sorry for not understanding such things)

if for example i want to see the inage in the grafh image in the code composer, what parametrs should i fill in the chart below:

  • Vadim said:
    why the size beetwen them is not the same should the size of the frame be always the same?

    The values you are looking at are not the actual pointer to the buffer itself but rather a structure, if you access the actual pointer within the structure you should see appropriately spaced pointers for the image data (i.e. address_of_frame= (int*)(frameBuffTable[n]->frame.frameBuffTable[n]); as opposed to address_of_frame=frameBuffTable[n]; ), as discussed in this wiki article.

    Vadim said:
    why the order is not correct and messy?

    I assume you mean the order that the video driver is passing the frame buffers? The order will likely end up varying over time, particularly if there are periods of time that you do not service the video driver in time such that it has to swap what buffer it is filling, which particular buffer you get is arbitrary.

    Vadim said:
    if for example i want to see the inage in the grafh image in the code composer, what parametrs should i fill in the chart below:

    Unfortunately the image viewer of today does not support the interleaved YCbCr 4:2:2 format that is used by the video drivers so you have to do some modification to the image data for it to display properly. In particular you can find code within the resizer examples at C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\system\dm6437\bios\dm6437_evm\src\video\sample\resizer that does this conversion (the TakeRszOutputImage() function), and the resizer example usage note at C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\drivers\resizer\docs\TII DM6437-VPSS_Resizer_Appnote.pdf shows how to setup the graph to work with the output of the conversion.

  • thanks for your replay!

    as you told me i tried to look in the frame pointer itself by this

    framepointer = (int*)(frameBuffPtr->frame.frameBufferPtr);

    but again the memory i get is messy and i cant understand from where he get the values:

    frameBuffTable[0] = 0x800003E0    -   0x803f4d80
    frameBuffTable[1] = 0x80000420    -   0x80195500
    frameBuffTable[2] = 0x80195480    -   0x800cac80
    frameBuffTable[3] = 0x801954C0    -   0x80000480
    frameBuffTable[4] = 0x8032A500    -   0x8025fd00
    frameBuffTable[5] = 0x8032A540    -   0x8032a580

    the values in the right are the value of  the " framepointer" that spose as you explained  to show me th beggining of the frame itself?

    but i still dont understad why the difference betwen them is not the same, shouldn't it fitt to the fram (720*576*2)?

     

    thank for the help, and sorry for noob questions,

    vadim

     

  • It wasn't clear to me which device you are targeting.  Also, what version of DVSDK software are you using?

    Regarding the distance between addresses of the frameBuffTable[] pointers, the distance is either 0x000CA800 or 0x000CA880 between any to pointers.  I just looked at the distance between the lowest address to the next lowest address, and recursed through the array.  This resulted in the two aforementioned distances.
    Still different, but not severely.