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.

Creating content on the c674x



Hi,

We have a system in which we get 16 H264 channels, decode them, and process a new frame from their content on the c674x dsp.

Today in order to get the newly created frame the dsp makes to the encoder, we overwrite the memory of one of the channels to output the frame, but we cannot use this method any more.

How can we produce a frame on the c674x even though it is a process link, and send this frame from the dsp process link forward to an encoder link?

regards,

Amit

  • algLink on c674 doesn't support output of video frames. You will have to modify algLink to allocate output frames at create time and then use that as the output buffer for your algoritm process. You can refer to current algLink code where BitBuffer is allocated and do similar modifications to allocate Video Frames (FVID2_Frame). Refer link like NsfLink to understand output frame buffer allocation and use.

    dupLink has a delay feature which may be sufficient for your usecase. If your requirement is:

                    --- Q0---(Original Frame required) -- Display

    dupLink   --- Q1--- (Input Frame modified )   --ipcFramesOut -- ipcFramesIn -- algLink

     

    In above configuration you can configure dupLink to delay output to Q1 such that frame will be received in ipcFramesOut only after display frees the buffer thereby ensuring display view original unmodified buffer.

     

  • Hi,
    We have a few more questions about this issue:

    I'll try and describe the desired system

    In N h264 channels ---->  Decoder ------> (timed buffering on input ch) DSP algLink  

                                                                                  out  FVID2_Frame ----> (timed by DSPAlgLink) Encoder

    In the current mcfw demo there is no output link from the dsp alg link. We would like to allocate output frames (FVID2_Frame) at the initialization of the alg link and use those frames in a seperate link chain which will go to the m3 encoder. 

    Is this possible using the 8168 and how can we setup this separate link chain between the process link and the encoder to be separate from the link chain which reads the frames from disk and inputs them to the dsp?

  • Dsp algLink doesn't support output of frames.

    You will have to modify the algLink to achieve this.

    algLink supports output of BitBuffer. You can refer that and implement similar logic for FVID2_Frames.

    The data flow should be

    algLink -> ipcFramesOut -> ipcFramesIn (VideoM3) -> encLink.

     

  • Can you refer me to the AlgLink which output bit buffer.

    Does it utilize the queue out and configured as part of the link chain or is it a ProcessLink?

    Thanks.

  • Refer /dvr_rdk/mcfw/src_bios6/links_c6xdsp/alg_link/scd/scdLink_alg.c

    AlgLink_ScdCreateOutObj create the output bit buffer queue and allocates the bitbuffers,

    AlgLink_getFullBufs and AlgLink_putEmptyBufs are called by the next link to get full bit buffers and free buffers.

    You will have to implement

    AlgLink_getFullFrames and AlgLink_putEmptyFrames and populate

            linkObj.linkGetFullFrames   = NULL;
            linkObj.linkPutEmptyFrames  = NULL;

    which are currently null.

    SCD uses the output bitbuffer queue to put meta data which is then exported to A8 via ipcBitsOutLink and ipcBitsInLink.

     

  • Thanks,

    That would help

  • One more question on that matter :)

    In the new implementation, can we replace the Process link between ipcFramesOutVpss --> ipcFramesInDsp 

    with a regular link.

    We want the AlgLink to free the decoded frames on his own term, and if would keep the ProcessLink they would be released too soon.

    Regards,

    Amit

  • Yes you don't have to use processLink. Actually using processLink or not has nothing to do with dspAlgLink supporting output frame queue. dspAlgLink will receive frames from ipcFramesIn on c674 and free the frames back to ipcFramesIn.It doesn't matter if ipcFramesIn was connected to ipcFramesOut processLink or ipcFramesOut nextLink.

    If you want to decouple the rate of processing from the input frame rate I don't see any option other than copying the frame.Can you explain how not using processLink enables you to decode frames on its own terms ?